content
stringlengths
1
15.9M
\section{Introduction} \label{sec:Sec1} In robotics, one is often tasked with designing algorithms to coordinate teams of robots to achieve a task. Some examples of such tasks are formation flying \cite{desai2001modeling,khan2019graph,alonso2015multi}, perimeter defense \cite{shishika2018local}, surveillance \cite{saldana2016dynamic}. In this paper, we concern ourselves with scenarios where a team of homogeneous or identical robots must execute a set of identical tasks such that each robot executes only one task, but it does not matter which robot executes which task. Concretely, this paper studies the concurrent goal assignment and trajectory planning problem where robots must simultaneously assign goals and plan motion primitives to reach assigned goals. This is the unlabelled multi-robot planning problem where one must simultaneously solve for goal assignment and trajectory optimization. In the past, several methods have been proposed to achieve polynomial-time solutions for the unlabelled motion planning problem \cite{adler2015efficient, macalpine2015scram,yu2012distance,turpin2014capt}. The common theme among these methods is the design of a heuristic best suited for the robots and the environment. For example \cite{turpin2014capt} minimizes straight line distances and solves for the optimal assignment using the Hungarian algorithm. However, when additional constraints such as constraints on dynamics, presence of obstacles in the space, desired goal orientations solving for a simple heuristic is no longer the optimal solution. In fact, one can think of the robot to goals matching problem with constraints as an instance of the minimum cost perfect matching problem with conflict pair constraints (MCPMPC) which is in fact known to be strongly $\mathcal{NP}$-hard \cite{darmann2011paths}. \begin{figure}[t!] \centering \includegraphics[scale=0.40]{fig/gpg_capt.png} \caption{\textbf{Graph Policy Gradients for Unlabeled Motion Planning.} $\mathbf{N}$ Robots and $\mathbf{N}$ goals are randomly initialized in some space. To define the graph, each robot is a node and threshold is connected to $\mathbf{n}$ nearest robots. Each robot observes relative positions of $\mathbf{m}$ nearest goals and other entities within a sensing region. Information from K-hop neighbors is aggregated at each node by learning local filters. Local features along with the robots own features are then used to learn policies to produce desired coverage behavior. \label{fig:mainfig}} \end{figure} In contrast to previous literature that relies on carefully designed but ultimately brittle heuristic functions, we hypothesize using reinforcement learning (RL) to compute an approximate solution for the assignment and planning problem without relaxing any constraints. When using RL to learn policies for the robots, it might be possible to simply use a cost function that is independent of any dynamics or constraints, i.e a cost function that is set to a high value if all goals are covered and zero otherwise. The idea of casting the unlabelled motion planning problem as a multi-agent reinforcement learning (MARL) problem has been explored before by Khan et. al \cite{khan2019learning}. They propose learning individual policies for each robot which are trained by using a central Q-network that coordinates information among all robots. However, the authors of \cite{khan2019learning} themselves note that the key drawback of their method is that does not scale as the number of robots increase. Further, there is a huge computational overhead attached with training individual policies for each robot. There exist two key obstacles in learning policies that scale with the number of robots: increase in dimensionality and partial observability. Consider an environment with $\mathbf{N}$ robots (This paper uses bold font to denote collection of items, vectors and matrices). In a truly decentralized setting, each robot can at best only partially sense its environment. In order for a robot to learn a meaningful control policy, it must communicate with some subset of all agents, $\mathbf{n} \subseteq \mathbf{N}$. Finding the right subset of neighbors to learn from which is in itself a research problem. Additionally, to ensure scalability, as the number of robots increase, one needs to ensure that the cardinality of the subset of neighbors that each robot must interact with $|\mathbf{n}|$, remains fixed or grows very slowly. To achieve scalable multi-robot motion planning, we look to exploit the inherent graph structure among the robots and learn policies using local features only. We hypothesize that graph convolutional neural networks (GCNs) \cite{kipf2016semi,wu2019comprehensive} can be a good candidate to parametrize policies for robots as opposed to the fully connected networks used in \cite{khan2019learning}. GCNs work similar to convolutional neural networks (CNNs) and can be seen as an extension of CNNs to data placed on irregular graphs instead of a two dimensional grid such as an image. A brief overview of the workings of a GCN is provided in Sec \ref{sec:GCNs}. We define a graph $\mathcal{G} = (\mathbf{V},\mathbf{E})$ where $\mathbf{V}$ is the set of nodes representing the robots and $\mathbf{E}$ is the set of edges defining relationships between them. These relationships can be arbitrary and are user defined. For example in this work we define edges between robots based on the Euclidean distance between them. This graph acts as a support for the data vector $\textbf{x}=[\mathbf{x}_1,\ldots,\mathbf{x}_N]^\top$ where $\mathbf{x}_n$ is the state representation of robot $n$. The GCN consists of multiple layers of graph filters and at each layer the graph filters extract local information from a node's neighbors, similar to how CNNs learn filters that extract features in a neighborhood of pixels. The information is propagated forward between layers after passing it through a non linear activation function similar to how one would propagate information in a CNN. The output of the final layer is given by $\Pi = [\pi_1,\ldots,\pi_N]$, where $\pi_1,\ldots,\pi_N$ are independent control policies for the robots. During training, each robot rolls out its own trajectory by executing its respective policy. Each robot also collects a centralized reward and using policy gradient methods ~\cite{sutton1998reinforcement} the weights of the GCN are updated. Further, since the robots are homogeneous and the graph filters only learn local information, we circumvent the computational burden of training many robots by training the GCN on only a small number of robots but during inference use the same filter across all robots. We call this algorithm Graph Policy Gradients (GPG) (Fig.\ref{fig:mainfig}) and first proposed it in our earlier work \cite{khan2019graph} where it was used to control swarms of robots with designated goals. This is in contrast to this paper which focuses on using GPG for simultaneous goal assignment and trajectory optimization. Through varied simulations we demonstrate that GPG provides a suitable solution that extends the learning formulation of the unlabeled motion planning algorithm to have the ability to scale to many robots. \section{Problem Formulation} \label{sec:problem_formulation} Consider a Euclidean space $\mathbb{R}^2$ populated with $\mathbf{N}$ homogeneous disk-shaped robots and $\mathbf{N}$ goals of radius $\text{R}$. Goal location $\mathbf{g}_m$ is represented as a vector of its position in the XY plane, i.e $\mathbf{g}_m = [x_m,y_m]$. Robot position at time $t$ is denoted as $\mathbf{p}_{nt}$ and is represented as a vector of its position in the XY plane, i.e $\mathbf{p}_{nt} = [x_{nt},y_{nt}]$. Each robot observes its relative position to $\mathbf{n}$ nearest goals where $\mathbf{n}$ is a parameter set by the user and depends on the task. Each robot also observes its relative position to $\mathbf{\hat{n}}$ nearest robots in order to avoid collisions. In the case that obstacles are present, each obstacle is represented by its position in the XY plane $\mathbf{o}_k = (x_k,y_k)$. Each robot also observes its relative position to $\mathbf{\tilde{n}}$ nearest obstacles. We motivate this choice of feature representation in Sec.\ref{subsec:permequi}. Thus, the state of robot $n$ at time $t$ is given as: \begin{equation} \mathbf{x}_{nt} := [\mathbf{G}_{\mathbf{n}t},\mathbf{R}_{\mathbf{\hat{n}}t},\mathbf{O}_{\mathbf{\tilde{n}}t}] \end{equation} where $\mathbf{G}_{\mathbf{n}t}$ is the vector that gives relative positions of robot $n$ at time $t$ to $\mathbf{n}$ nearest goals, $\mathbf{R}_{\mathbf{\hat{n}}t}$ is the vector that gives relative positions of robot $n$ at time $t$ to $\mathbf{\hat{n}}$ nearest robots and $\mathbf{O}_{\mathbf{\tilde{n}}t}$ is the vector that gives relative positions of robot $n$ at time $t$ to $\mathbf{\tilde{n}}$ nearest obstacles. At each time $t$, each robot executes an action $\mathbf{a}_{nt} \in \mathcal{A}$, that evolves the state of the robot accorwding to some stationary dynamics distribution with conditional density $p(\mathbf{x}_{n t+1}|\mathbf{x}_{nt},\mathbf{a}_{nt})$. In this work, all actions represent continuous control (change in position or change in velocity). Collision avoidance and goal coverage conditions are encoded to yield the desired collision free unlabelled motion planning behavior where all goals are covered. The necessary and sufficient condition to ensure collision avoidance between robots is given as : \begin{equation} \label{eq:collision_avoidance} E_c(\mathbf{p}_{it},\mathbf{p}_{jt}) > \delta, \\ \forall i \neq j \in \{1,\ldots \mathbf{N}\}, \forall {t} \end{equation} where $E_c$ is the euclidean distance and $\delta$ is a user-defined minimum separation between robots. The assignment matrix $\phi(t) \in \mathbb{R}^{\mathbf{N} \times \mathbf{N}}$ as \begin{equation} \phi_{ij}(t) = \begin{cases} 1, &\text{if } E_c(\mathbf{p}_i(t),\mathbf{g}_j) \leq \psi \\ 0, &\text{otherwise} \end{cases} \end{equation} where $\psi$ is some threshold region of acceptance. The necessary and sufficient condition for all goals to be covered by robots at some time $t=T$ is then: \begin{equation} \label{eq:stopping} \phi(T)^\top\phi(T) = \textbf{I}_{\mathbf{N}} \end{equation} where $\textbf{I}$ is the identity matrix. Lastly, since we are interested in exploiting local symmetry between robots, we define a graph $\mathcal{G}=(\mathbf{V},\mathbf{E})$ where the set of vertices $\mathbf{V}$ represents all the robots. An edge $e \in \mathbf{E}$ is said to exist between two vertices, if: \begin{equation} \label{eq:graph_node} E_c(\mathbf{p}_{i},\mathbf{p}_{j}) \leq \lambda, \\ \forall i \neq j \in \{1,\ldots \mathbf{N}\} \end{equation} where $\lambda$ is some user defined threshold to connect two robots. Robots cannot externally communicate with any other robots. Robot $n$ can directly communicate only with its one hop neighbors given by $\mathcal{G}$. In order to communicate with robots further away, the communication must be indirect. Robots are given access to this graph and their own state $\mathbf{x}_{nt}$. The problem statement considered in this paper can then be formulated as : \begin{problem} \label{prob:prob1} \textit{Given a set of $\mathbf{N}$ robots with some initial configurations, a set of $\mathbf{N}$ goals a graph $\mathcal{G}$ defining relationships between the robots} $\textbf{g}$\textit{, compute functions $\Pi = [\pi_1,\ldots,\pi_{\mathbf{N}}]$ such that execution actions $\{\mathbf{a}_{1t},\ldots,\mathbf{a}_{\mathbf{N}t}\}= \{\pi_1(\mathbf{a}_{1t}|\mathbf{x}_{1t},\mathcal{G}),\ldots,\pi_{\mathbf{N}}(\mathbf{a}_{\mathbf{N}t}|\mathbf{x}_{\mathbf{N}t},\mathcal{G})\}$ results in a sequence of states for the robots that satisfy Eq.\ref{eq:collision_avoidance} for all time and at some stopping time $t=T$, satisfy the assignment constraint in Eq.\ref{eq:stopping}.} \end{problem} \section{Graph Convolutional Networks} \label{sec:GCNs} A graph $\mathcal{G}=({\mathbf{V},\mathbf{E}})$ is described by a set of $\mathbf{N}$ nodes and a set of edges $\mathbf{E} \subseteq \mathbf{V} \times \mathbf{V}$. This graph can be represented by a graph shift operator $\mathbf{S}$, which respects the sparsity of the graph, i.e $s_{ij} = [\mathbf{S}]_{ij}=0$, $\forall$ $i\neq j \text{ and } (i,j) \notin \mathbf{E}$. Adjacency matrices, graph laplacians and their normalized versions are some examples of this graph shift operator which satisfy the sparsity property. At each node, there exists a data signal $\mathbf{x}_n$. Collectively, define $\textbf{x}=[\mathbf{x}_1,\ldots,\mathbf{x}_N]^\top \in \mathbb{R}^{\mathbf{N}}$ as the signal and its support is given by $\mathcal{G}$. $\mathbf{S}$ can be used to define a linear map $\mathbf{y}=\mathbf{S}\textbf{x}$ which represents local information exchange between a given node and its neighbors. For example, consider a node $n$ with immediate or one-hop neighbors defined by the set $\mathfrak{B}_n$. The following equation then gives us a simple aggregation of information at node $n$ from its one-hop neighbors $\mathfrak{B}_n$. \begin{equation}\label{eq:graph_signal} y_n = [\mathbf{S}\mathbf{x}]_n =\sum_{j=n,j\in \mathfrak{B}_n}s_{nj}x_n \end{equation} By repeating this operation over all nodes in the graph, one can construct the signal $\mathbf{y}=[y_1,\ldots,y_{\mathbf{N}}]$. Recursive application of this operation yields information from nodes further away i.e the operation $\mathbf{y}^k = \mathbf{S}^k\mathbf{x} = \mathbf{S}(\mathbf{S}^{k-1}\mathbf{x})$ aggregates information from nodes that are $k$-hops away. Then graph convolutional filters can be defined as polynomials on $\mathbf{S}$ : \begin{equation}\label{eq:z} \mathbf{z} = \sum_{k=0}^{K} h_k \mathbf{S}^k \mathbf{x} = \mathbf{H(S)x} \end{equation} Here, the graph convolution is localized to a $K$-hop neighborhood for each node. The output from the graph convolutional filter is fed into a pointwise non-linear activation function $\sigma$ akin to convolutional neural networks. \begin{equation} \label{eq:finalapproxform} \mathbf{z} = \sigma(\mathbf{H(S)x}) \end{equation} A graph convolution network can then be composed by stacking several of these layers together as seen in Fig. \ref{fig:gnnfig} \begin{figure}[hbt!] \centering \includegraphics[scale=0.25]{fig/gnn.png} \caption{\textbf{Graph Convolutional Networks.} Each layer consists of chosen graph filters with pointwise non linearities. \label{fig:gnnfig}} \end{figure} \subsection{Permutation Equivariance} \label{subsec:permequi} On-policy RL methods to train policies for robots such as the ones proposed in \cite{khan2019learning} collect trajectories from the current policy and then use these samples to update the current policy. The initial policy for all robots is a random policy. This is the exploration regime in RL. It is highly likely that as one were to randomly explore a space during training, the underlying graph $\mathcal{G}$ that connects robots based on nearest neighbors would change, i.e the graph at $t=0$, say $\mathcal{G}_0$ would be significantly different from the graph at $t=T$, say $\mathcal{G}_T$. We noted in Section \ref{sec:Sec1} that one of the key obstacles with learning scalable policies is that of dimensionality. At a first glance it seems that providing the underlying graph structure would only exacerbate the problem of dimensionality and will result in a large number of graphs that one needs to learn over as the number of robots are increased. However, we use a key result from \cite{gama2019stability} that minimizes the number of graphs one must learn over. The authors of \cite{gama2019stability} show that as long as the topology of the underlying graph is fixed, the output of the graph convolution remains the same even under node reordering. More concretely if given a set of permutation matrices $\bm{\mathcal{P}} = \{\mathbf{{P}}\in \{0,1\}^{\mathbf{N} \times \mathbf{N}}\ : \mathbf{{P1=1}},\mathbf{{P}^\top1 =1}\}$ such that the operation $\mathbf{\Bar{P}x}$ permutes elements of the vector $\mathbf{x}$, then it can be shown that \begin{theorem}\label{theorem:permutationequivariance} Given a graph $\mathcal{G}=(\mathbf{V},\mathbf{E})$ defined with a graph shift operator $\mathbf{S}$ and $\hat{\mathcal{G}}$ to be the permuted graph with $\mathbf{\hat{S}} = \mathbf{{P}}^{\top} \mathbf{S} \mathbf{{P}}$ for $\mathbf{{P}} \in \bm{\mathcal{P}}$ and any $\mathbf{x} \in \mathbb{R}^{\mathbf{N}}$ it holds that : \begin{equation} \mathbf{H}(\hat{\mathbf{S}})\mathbf{P}^{\top}\mathbf{x} = \mathbf{P}^{\top} \mathbf{H(S)x} \end{equation} \end{theorem} We direct the reader to \cite{gama2019stability} for the proof of Theorem \ref{theorem:permutationequivariance}. The implication of Theorem \ref{theorem:permutationequivariance} is that if the graph exhibits several nodes that have the same graph neighborhoods, then the graph convolution filter can be translated to every other node with the same neighborhood. We use this key property to bring down the number of training episodes one would need to learn over. In this work in order to keep the topology constant, we assume that the number nearest neighbors each robot is connected to, remains fixed during training and inference. \section{Graph Policy Gradients for Unlabelled Motion Planning} The unlabelled motion planning problem outlined in Sec \ref{sec:problem_formulation} can be recast as a reinforcement learning problem. The constraints in Eq. \ref{eq:collision_avoidance} and Eq. \ref{eq:stopping} can be captured by a centralized reward scheme that yield positive rewards only if all goals are covered by robots and negative or zero reward in case of collisions or otherwise. \begin{equation} \label{eq:rewardstruc} r(t) = \begin{cases} \alpha &\text{if } \phi(t)^\top\phi(t) = \textbf{I}_{\mathbf{N}}\\ -\beta, &\text{if } \text{any collisions}\\ 0 &\text{otherwise} \end{cases} \end{equation} where $\alpha$ and $\beta$ are scalar positive values. Each robot receives this centralized reward. This reward scheme is independent of any constraints on obstacles, dynamics or other constraints on the robots. Let $\Pi=[\pi_1,\ldots,\pi_{\mathbf{N}}]$. Then an approximate solution for \textbf{Problem \ref{prob:prob1}} can be computed by optimizing for the following loss function: \begin{equation} J = \sum_{n=1}^{\mathbf{N}} \max_{\theta} \mathbb{E}_{\Pi}\bigg[\sum_{t}^T r_t\bigg] \enspace \end{equation} where $\theta$ represents the parametrization for $\Pi$. In practice we optimize for a $\gamma$ discounted reward function \cite{sutton1998reinforcement}. We use graph convolutions to learn filters that aggregate information locally at each robot. $L$ layers of the GCN are used to aggregate information from neighbors $L$ hops away as given in Eqn \ref{eq:finalapproxform}. At every time step $t$, the input to the first layer $z^{0}$ is the vector robot states stacked together, i.e $z^{0}=\textbf{x}_t = [\mathbf{x}_1,\ldots,\mathbf{x}_{\mathbf{N}}]$ The output at the final layer at any time $t$, $z^{L} =\Pi = [\pi_1,\ldots,\pi_{\mathbf{N}}]$ represents the independent policies for the robots from which actions are sampled. During training, the weights of the graph filters or the GCN $\theta$, are randomly initialized. Constant graph topology is ensured by fixing the graph at start time. This graph is not varied as the policy is rolled out since the resulting graph convolution yields an equivalent result according to theorem \ref{theorem:permutationequivariance}. Each robot rolls out a trajectory $\tau=(\mathbf{x_0},\mathbf{a_0},\ldots,\mathbf{x_T},\mathbf{a_T})$ and collects a reward. It is important to note that this reward is the same for all the robots. The policies for the robots are assumed to be independent and as a consequence the policy gradient $\nabla_{\theta}J$ can be computed directly and is given as: \begin{equation} \label{eq:policygradient}\begin{split} \mathbb{E}_{\tau \sim (\pi_1,\ldots,\pi_{\mathbf{N}})}\Bigg[\Big(\sum_{t=1}^T\nabla_{\theta} \log[\pi_1(.)\ldots \pi_{\mathbf{N}}(.)]\Big) \Big(\sum_{t=1}^T r_t \Big) \Bigg] \end{split} \end{equation} To achieve results that are scalable, we train the filters with a smaller number of robots. This has the additional benefit of reducing the number of episodes required for the policy to converge. During inference, we test with a larger number of robots and execute the learned graph filter over all the robots. Since the filters learn only local information, they are invariant to the number of filters. This is analogous to CNNs where once a filter's weights have been learned, local features can be extracted from an image of any size by simply sliding the filter all over the image. It is important to note that the graph filter only needs centralized information during training. During testing, this solution is completely decentralized as each robot only has a copy of the trained filter and uses it to compute policies that enable all goals to be covered. We call this algorithm Graph Policy Gradients (GPG). In the next section, we demonstrate the use of these graph convolutions to learn meaningful policies for different versions of the unlabelled motion planning problem. \section{Experiments} To test the efficacy of GPG on the unlabelled motion planning problem, we setup a few experiments in simulation. To design a reward function that forces robots to cover all goals, we pick the following scheme. For each goal we compute the distance to its nearest robot. The maximum valued distance among these distances is multiplied with $-1$ and added to the reward. We denote this as $r_G(t)$ and it represents the part of the reward function that forces all goals to be covered. However, this does not account for collisions. In order to account for collisions, we compute distance between all robots and add a negative scalar to the reward if the distance between any pair of robots is less than a designed threshold. This part of the reward function is denoted as $r_R(t)$. In the case that the environment is also populated with obstacles, we follow a similar scheme and denote this part of the reward as $r_O(t)$. The overall reward at any time $t$ is then given as a weighted sum of these rewards \begin{equation} r(t) = w_1r_G(t) + w_2r_R(t) + w_3 r_O(t) \end{equation} where the weights $w_1, w_2$ and $w_3$ are balance the goal following, robot-robot collision avoidance and robot-obstacle collision avoidance. To test GPG, we establish four main experiments. \textbf{1)} Unlabelled motion planning with three, five and ten robots where robots obey point mass dynamics. \textbf{2)} In the second experiment, GPG is tested on three, five and ten robots but here robots obey single integrator dynamics. \textbf{3)} Here, the robots follow single integrator dynamics and additionally the environment is populated with disk shaped obstacles. \textbf{4)} In this experiment, the performance of GPG is tested against a model based provably optimal centralized solution for the unlabelled motion planning problem. We demonstrate empirically that the performance of GPG is almost always within a small margin of that of the model based method but comes with the additional advantage of being decentralized. Closest to our work is that of \cite{khan2019learning} where the robot policies are parametrized by fully connected networks. Thus, to establish relevant baselines, we compare GPG with Vanilla Policy Gradients (VPG) where the policies for the robots are parameterized by fully connected networks (FCNs). Apart from the choice of policy parametrization there are no other significant differences between GPG and VPG. \subsection{Experimental Details} \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{fig/rew_curves.png} \caption{\textbf{Training Curves for 3, 5 and 10 robots} Policies trained by GPG are able to converge on experiments with point mass robots, experiments where robots follow single integrator dynamics and are velocity controlled as well as experiments when disk shaped obstacles are present in the environment. Here iteration refers to episodes. Darker line represents mean and shaded line represents variance.} \label{fig:rew_curves} \end{figure*} \begin{figure*}[b] \centering \includegraphics[width=\textwidth]{fig/formationfig.png} \caption{\textbf{Transferring Learned GPG Filters for Large Scale Unlabelled Motion Planning.} (Left) A small number of robots are trained to cover goals and follow point mass dynamics. During testing the number of robots as well as the distance of the goals from the start positions are much greater than those seen during training. (Center) A similar experiment is performed but now robots have single integrator dynamics. (Right) In this experiment in addition to single integrator dynamics, the environment also has obstacles that robots must avoid.\label{fig:formationfig}} \end{figure*} For GPG, we setup a L-layer GCN depending on the experiment. For experiments involving 3 and 5 robots with point mass experiments we find a 2 layer GCN, i,e a GCN that aggregates information from neighbors that are at most 2 hops away to be adequate. For experiments with 10 robots we find that GCNs with 4 layers work the best. For the baseline VPG experiments, we experiment with 2-4 layers of FCNs. The maximum episode length is $200$ steps and the discount factor $\gamma= 0.95$. In experiments with 3 robots, each robot senses 2 nearest goals and 1 nearest robot. In experiments with 5 and more robots, robots sense 2 nearest goals and 2 nearest robots. The graph $\mathcal{G}$ connects each robot to its $1$,$2$ and $3$ nearest neighbors in experiments with $3,5$ and $10$ robots respectively. \subsection{Experimental Results - Training} The behavior of GPG v/s VPG during training can be observed from Fig. \ref{fig:rew_curves}. We observe that the in all cases GPG is able to produce policies that converge close to the maximum possible reward (in all three cases maximum possible reward is zero). When compared to the convergence plots of \cite{khan2019learning} who first proposed use of RL for the unlabelled motion planning problem, this represents a large improvement on just training. It can also be observed that GPG converges when robot dynamics are changed or obstacles are added to the environment. While this is not necessarily the optimal solution to the unlabelled motion problem, it is an approximate solution to the unlabelled motion planning problem. The fully connected network policies represented by VPG in Fig. \ref{fig:rew_curves} fails to converge even on the simplest experiments. \subsection{Experimental Results - Inference} The previous section shows the feasibility of GPG as a method for training a large swarm of robots to approximately solve the unlabelled motion planning problem. However, training a large number of robots is still a bottleneck due to the randomness in the system. Training 10 robots with simple dynamics on a state of the art NVIDIA 2080 Ti GPU with a 30 thread processor needs several hours (7-8). We see from our experiments that this time only grows exponentially as we increase the number of robots. Thus, to overcome this hurdle and to truly achieve large scale solutions for the unlabelled motion planning problem, we hypothesize that since the graph filters learned by GPG only operate on local information, in a larger swarm one can simply slide the same graph filter everywhere in the swarm to compute policies for all robots without any extra training. Intuitively, this can be attributed to the fact that while the topology of the graph does not change from training time to inference time, the size of the filter remains the same. As stated before, this is akin to sliding a CNN filter on a larger image to extract local features after training it on small images. To demonstrate the effect of GPG during inference time, we setup three simple experiments where we distribute goals along interesting formations. As described earlier, each robot only sees a certain number of closest goals, closest robots and if present closest obstacles. Our results can be seen in Fig. \ref{fig:formationfig}. The policies in Fig. \ref{fig:formationfig} (Left) and Fig. \ref{fig:formationfig} (Center) are produced by transferring policies trained to utilize information from 3-hop neighbors. In Fig. \ref{fig:formationfig} the policies are transferred after being trained to utilize information from 5-hop neighbors. Consider the formation shown in Fig \ref{fig:formationfig} (Left). Here each robot receives information about 3 of its nearest goals and these nearest goals overlap with its neighbors. Further, since the goals are very far away and robots are initialized close to each other, a robot and its neighbor receives almost identical information. In such a scenario the robots must communicate with each other and ensure that they each pick a control action such that they do not collide into each other and at the end of their trajectories, all goals must be covered. The GPG filters learn this local coordination and can be extended to every robot in the swarm. Thus, with these results it can be concluded that GPG is capable of learning solutions for the unlabelled motion planning problem that scale to a large number of robots. \subsection{Comparison to Centralized Model Based Methods} \begin{figure}[b!] \centering \includegraphics[scale=0.25]{fig/timeplots.png} \caption{\textbf{Time to Goals (Capt vs GPG)}. Time taken by Capt to cover all goals v/s time taken by GPG to cover all goals when robots follow velocity controls. The goals are arranged in different formations F1, F2 and F3 and differ from each other in terms of distance from the starting positions of the robots (on average goals in F3 > F2 > F1). \label{fig:timefig}} \end{figure} To further quantify the performance of GPG, we compare with a model based approach that uses centralized information, called concurrent assignment and planning (CAPT), proposed in \cite{turpin2014capt}. The CAPT algorithm is a probably correct and complete algorithm but needs centralized information. However, when used in an obstacle free environment, it guarantees collision free trajectories. We direct the reader to \cite{turpin2014capt} for more details about the CAPT algorithm. We set up three different formations F1, F2 and F3 similar to that in Fig \ref{fig:formationfig} (Center). On average the goals in F3 are further away from the starting positions of the robots than those in F2 and those in F2 are further away from goals in F1. In this work, we treat CAPT as the oracle and look to compare how well GPG performs when compared to this oracle. We use time to goals as a metric to evaluate GPG against this centralized oracle. Our results can be seen in Fig. \ref{fig:timefig}. The key takeaway from this experiment is that decentralized inference using GPG, performs always within an $\epsilon$ margin (approximately 12-15 seconds) of the optimal solution and this margin remains more or less constant even if the goals are further away and if the number of robots are increased. Thus, from this we empirically demonstrate that GPG trades some measure of optimality in exchange for decentralized behavior and this trade-off remains more or less constant even as the number of robots are increased. Hence, with these experiments we conclude that GPG offers a viable solution for Problem \ref{prob:prob1} and is in fact scalable to many robots and further, is very close in performance to the provably optimal centralized solution. \section{Acknowledgements} We gratefully acknowledge support from Semiconductor Research Corporation (SRC) and DARPA, ARL DCIST CRAW911NF-17-2-0181, and the Intel Science and Technology Center for Wireless Autonomous Systems (ISTC-WAS) and the Intel Student Ambassador Program. \section{Conclusion} In this paper, we look to achieve scalable solutions for the full unlabelled motion planning problem. In the recent past RL approaches have been proposed to compute an approximate solution but these do not scale. In this work, we propose connecting the robots with a naive graph and utilize this graph structure to generate policies from local information by employing GCNs. We show that these policies can be transferred over to a larger number of robots and the solution computed is close to the solution computed by a centralized $\textit{oracle}$. One of the caveats of this paper is the problem of guaranteed collision free trajectories. It might even be possible to add a safety projection set such as that in \cite{khaniros} in order to guarantee collision free trajectories. We leave this for future work. \addtolength{\textheight}{-12cm} \bibliographystyle{IEEEtran}
\section{Introduction} Control and estimation strategies must be implemented and validated into digital platforms. It is important to study carefully the issues concerning digital control such as sampling. This is because, if sampling is not addressed properly, the stability and estimation properties may be lost. For finite-dimensional systems, namely networked control systems modeled by ordinary differential equations (ODEs), digital control has been extensively developed and several schemes for discretization and for sampling in time continuous-time controllers have been investigated, e.g., by sampled-data control \cite{Hetel2017309} and event-triggered control strategies \cite{tabuada2007event,event-triger-Heeme-Johan-Tabu,Marchand2013-universal-formula,lemmon2010event,girard2014dynamic,Postoyan_Aframework_ETS2014,JiangSmallGainETC,Liu_ZPJiang2015}. The latter has become popular and promising due to not only its efficient way of using communication and computational resources by updating the control value aperiodically (only when needed) but also due to its rigorous way of implementing continuous-time controllers into digital platforms. In general, event-triggered control includes two main components: a feedback control law which stabilizes the system and an event-triggered mechanism which contains a triggering condition that determines the time instants at which the control needs to be updated. Two general approaches exist for the design: \textit{Emulation} from which the controller is a priori predesigned and only the event-triggered algorithm has to be designed (as in e.g. \cite{tabuada2007event}) and \textit{Co-design}, where the joint design of the control law and the event-triggering mechanism is performed simultaneously (see e.g. \cite{Seuret2016}). Nevertheless, for partial differential equations (PDEs) sampled-data and event-triggered control strategies without model reduction have not achieved a sufficient level of maturity as in the finite-dimensional case. It has not been sufficiently clear (from theoretical and practical point of view) how fast sampling the in-domain or the boundary continuous-time controllers should be for preserving both stability and convergence properties of PDE systems. Few approaches on sampled-data and event-triggered control of parabolic PDEs are considered in \cite{Fridman2012826,KARAFYLLIS2018226,Selivanov_FridmanAuto}, \cite{Yao2013,JIANG20162854}. In the context of abstract formulation of distributed parameter systems, sampled-data control is investigated in \cite{Logemann2005} and \cite{Tan2009}. For hyperbolic PDEs, sampled-data control is studied in \cite{Davosampling2018} and \cite{Sampled_dataKarafylis_Kristic}. Some recent works have introduced event-triggered control strategies for linear hyperbolic PDEs under an emulation approach \cite{Espitia2016_Aut,Espitia2016Nolcos,Espitia2018TAC}. In \cite{Espitia2016_Aut} and \cite{Espitia2016Nolcos}, for instance, event-triggered boundary controllers for linear conservation laws using output feedback are studied by following Lyapunov techniques (inspired by \cite{BastinCoron_book2016}). In \cite{Espitia2018TAC}, the approach relies on the backstepping method for coupled system of balance laws (inspired by \cite{Vazquez2011,krstic2008backstepping}) which leads to a full-state feedback control which is sampled according to a dynamic triggering condition. Under such a triggering policy, it has been possible to prove the existence of a minimal dwell-time between triggering time instants and therefore avoiding the so-called Zeno phenomena.\\ In sampled-data control as well as in event-triggered control scenarios for PDEs, the effect of sampling (and therefore, the underlying actuation error) has to be carefully handled. In particular, for reaction-diffusion parabolic PDEs the situation of having such errors at the boundaries has been challenging and has become a central issue; especially when having Dirichlet boundary conditions due to the lack of an ISS-Lyapunov function for the stability analysis. In \cite{KARAFYLLIS2018226} this problem has been overcome by studying ISS properties directly from the nature of the PDE system (see also e.g. \cite{Karafyllis_Krstic_SIAM2019,Karafyllis2019_book}) while using modal decomposition and Fourier series analysis. Lyapunov-based approach has not been necessary to perform the stability analysis and to be able to come up with ISS properties and small gain arguments. Thus, it has been possible to establish the robustness with respect to the actuation error. This approach has allowed the derivation of an estimate of the diameter of the sampling period on which the control is updated in a sampled-and-hold fashion. The drawback, however, is that such a period turns out to be truly small, rendering the approach very conservative. With periodic implementation, one may produce unnecessary updates of the sampled controllers, which cause over utilization of computational and communication resources, as well as actuator changes that are more frequent than necessary. This issue strongly motivates the study of event-triggered control for PDE systems. Therefore, inspired by \cite{KARAFYLLIS2018226}, in this paper we propose an event-triggered boundary control based on the emulation of the backstepping boundary control. An event-triggering condition is derived and the stability analysis is performed by using small-gain arguments. The main contributions are summed up as follows: \begin{itemize} \item We prove that under the event-triggered control no Zeno solutions can appear. A uniform minimal dwell-time (independent of the initial condition) between two consecutive triggering time instants has been obtained. \item Consequently, we guarantee the existence and uniqueness of solutions to the closed-loop system. \item We prove that under the event-triggered boundary control, the closed-loop system is globally exponentially stable in the $L^2$- norm sense. \end{itemize} The paper is organized as follows. In Section \ref{section_problem_form}, we introduce the class of reaction-diffusion parabolic systems, some preliminaries on stability and backstepping boundary control and the preliminary notion of existence and uniqueness of solutions. Section \ref{Event-triggered-strategySection} provides the event-triggered boundary control and the main results. Section~\ref{numerical_simulation} provides a numerical example to illustrate the main results. Finally, conclusions and perspectives are given in Section~\ref{conslusion_and_perspect}. \paragraph*{Notations} $ \mathbb{R}_{+}$ will denote the set of nonnegative real numbers. Let $S \subseteq \mathbb{R}^n$ be an open set and let $A \subseteq \mathbb{R}^n$ be a set that satisfies $S \subseteq A \subseteq \bar{S}$. By $C^0(A;\Omega)$, we denote the class of continuous functions on $A$, which take values in $\Omega \subseteq \mathbb{R}$. By $C^k(A;\Omega)$, where $k\geq 1$ is an integer, we denote the class of functions on $A$, which takes values in $\Omega$ and has continuous derivatives of order $k$. In other words, the functions of class $C^k(A;\Omega)$ are the functions which have continuous derivatives of order $k$ in $S=int(A)$ that can be continued continuously to all points in $\partial S \cap A$. $L^2(0,1)$ denotes the equivalence class of Lebesgue measurable functions $f: [0,1] \rightarrow \mathbb{R}$ such that $\Vert f\Vert =\left(\int_{0}^{1} \vert f(x)\vert ^{2}dx\right)^{1/2} < \infty$. Let $u:\mathbb{R}_{+}\times [0,1] \rightarrow \mathbb{R}$ be given. $u[t]$ denotes the profile of $u$ at certain $t\geq 0$, i.e. $(u[t])(x) = u(t,x)$, for all $x \in [0,1]$. For an interval $I \subseteq \mathbb{R}_{+}$, the space $C^{0}(I;L^2(0,1))$ is the space of continuous mappings $I\ni t \rightarrow u[t] \in L^2(0,1)$. $H^2(0,1)$ denotes the Sobolev space of functions $f \in L^2(0,1)$ with square integrable (weak) first and second-order derivatives $f^{'}(\cdot), f^{''}(\cdot) \in L^2(0,1)$. $I_m(\cdot)$, $J_m(\cdot)$ with $m \in \mathbb{Z}$, denote the modified Bessel and (nonmodified) Bessel functions of the first kind. \section{Preliminaries and problem description}\label{section_problem_form} Let us consider the following scalar reaction-diffusion system with constant coefficients: \begin{eqnarray}\label{eq:sysparabolic0} u_t(t,x) & =& \theta u_{xx}(t,x) + \lambda u(t,x) \\ u(t,0)&=&0\\ u(t,1)&=& U(t) \label{BC_parabolic_PDE_u0} \end{eqnarray} and initial condition: \begin{equation}\label{IC_parabolic_PDE_u0} u(0,x)=u_{0}(x) \end{equation} where $\theta >0$ and $\lambda \in \mathbb{R}$. $u: [0,\infty)\times[0,1] \rightarrow \mathbb{R} $ is the system state and $U(t) \in \mathbb{R}$ is the control input. The control design relies on the Backstepping approach \cite{Smyshlyaev-Krstic2004,krstic2008boundary} under which the following continuous-time controller (nominal boundary feedback) has been obtained: \begin{equation}\label{control_function_continuous_with_K} U(t)= \int_{0}^{1} K(1,y)u(t,y)dy \end{equation} It has then been proved that the under continuous-time controller \eqref{control_function_continuous_with_K} with control gain $K$ satisfying: \begin{equation}\label{solutionKernelexplicit} \begin{split} K(x,y)& = -y\gamma\frac{I_1\left(\sqrt{\gamma(x^2- y^2)}\right)}{ \sqrt{\gamma(x^2- y^2)}} \end{split} \end{equation} evolving in a triangular domain given by $\mathcal{T}= \{ (x,y): 0 \leq y < x \leq 1 \}$ and with $\gamma=(\lambda +c)/\theta$ (where $c\geq 0$ is a design parameter), the closed-loop system \eqref{eq:sysparabolic0}-\eqref{IC_parabolic_PDE_u0} is globally exponentially stable in $L^2$- norm sense. \subsection{ \textbf{Event-triggered control and emulation of the backstepping design}} We aim at stabilizing the closed-loop system on events while sampling the continuous-time controller \eqref{control_function_continuous_with_K} at certain sequence of time instants $(t_{j})_{j \in \mathbb{N}}$, that will be characterized later on. The control value is held constant between two successive time instants and it is updated when some state-dependent condition is verified. In this scenario, we need to suitably modify the boundary condition in \eqref{eq:sysparabolic0}-\eqref{BC_parabolic_PDE_u0}. The boundary value of the state is going to be given by: \begin{equation}\label{new_boundary_originalsystems} u(t,1) = U_d(t) \end{equation} with \begin{equation}\label{control_function_event-triggered_with_K} U_d(t)= \int_{0}^{1} K(1,y)u(t_{j},y)dy \end{equation} for all $t \in [t_{j},t_{j+1})$, $j \geq 0$. Note that $U_d(t)=U(t)+d(t)$ with $U(t)$ given by \eqref{control_function_continuous_with_K} and $d$ given by: \begin{equation}\label{deviation_actuation} d(t)=\int_{0}^{1} K(1,y)u(t_{j},y) dy - \int_{0}^{1} K(1,y) u(t,y) dy \end{equation} Here, $d$ (which will be fully characterized along with $(t_{j})_{j\in \mathbb{N}}$ in the next section) can be viewed as an actuation deviation between the nominal boundary feedback and the event-triggered boundary control \footnote{In sampled-data control as in \cite{KARAFYLLIS2018226}, such a deviation is called input holding error.}. Hence, the control problem we aim at handling is the following: \begin{eqnarray}\label{eq:sysparabolic} u_t(t,x) & =& \theta u_{xx}(t,x) + \lambda u(t,x) \\ u(t,0)&=&0\\ u(t,1)&=& U_d(t) \label{BC_parabolic_PDE_u} \end{eqnarray} for all $t \in [t_{j},t_{j+1})$, $j\geq 0$, and initial condition: \begin{equation}\label{IC_parabolic_PDE_u} u(0,x)=u_{0}(x) \end{equation} We will perform the emulation of the backstepping which requires also information of the target system. Indeed, let us recall that the backstepping method makes use of an invertible Volterra transformation: \begin{equation}\label{backstepping _inverse_trasf_1} \begin{split} w(t,x) &= u(t,x) - \int_{0}^{x} K(x,y)u(t,y) dy \end{split} \end{equation} with kernel $K(x,y)$ satisfying \eqref{solutionKernelexplicit} which maps the system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} into the following target system: \begin{eqnarray}\label{Target_system_w} w_t(t,x) & =& \theta w_{xx}(t,x) - c w(t,x) \\ w(t,0)&=&0\\ w(t,1)&=& d(t) \end{eqnarray} with initial condition: \begin{equation}\label{IC_Target_system_w} w(0,x)=u_{0}(x) - \int_{0}^{x} K(x,y)u_{0}(y) dy \end{equation} where $c>0$ can be chosen arbitrary.\\ \begin{remark} It is worth recalling that the Volterra backstepping transformation \eqref{backstepping _inverse_trasf_1} is invertible whose inverse is given as follows: \\ \begin{equation}\label{backstepping _trasf_inverse} \begin{split} u(t,x) &= w(t,x) + \int_{0}^{x} L(x,y)w(t,y) dy \end{split} \end{equation} where $L $ satisfies: \begin{equation}\label{solutionKernelexplicit_inverse} \begin{split} L(x,y)& = -y\gamma\frac{J_1\left(\sqrt{\gamma(x^2- y^2)}\right)}{ \sqrt{\gamma(x^2- y^2)}} \end{split} \end{equation} with $\gamma=(\lambda +c)/\theta$ \end{remark} \subsection{\textbf{Well-posedness issues}} The notion of solution for 1-D linear parabolic systems under boundary sampled-data control has been rigorously analyzed in \cite{KARAFYLLIS2018226}. In this paper, we follow the same framework. \\ \begin{Pro}\label{existence_and_continuity_solutions} There exists a unique solution $u \in \mathcal{C}^{0}([t_{j},t_{j+1}]; L^{2}(0,1))$ to the system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} between two time instants $t_{j}$ and $t_{j+1}$ satisfying $u \in C^{1}((t_{j},t_{j+1}) \times [0,1])$, $u[t] \in C^2([0,1])$ for all $t \in (t_{j},t_{j+1}] $ and initial data $u[t_{j}] \in L^2(0,1)$. \end{Pro} \begin{proof} It is a straightforward application of \cite[Theorem 2.1]{KARAFYLLIS2018226}. \end{proof} In what follows we assume that in open-loop, the system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} is unstable or neutrally stable, i.e., $\lambda \geq \theta \pi^2$. The analysis is similar (and far easier) for the case where the open-loop system is asymptotically stable, because in this case we can use the trivial feedback law with $K(1,y)=0$. \section{Event-triggered boundary control and main results}\label{Event-triggered-strategySection} In this section we introduce the event-triggered boundary control and the main results: the existence of a minimal dwell-time which is independent of the initial condition, the well-posedness and the exponential stability of the closed-loop system under the event-triggered boundary control.\\ Let us first define the event-triggered boundary control considered in this paper. It encloses both a triggering condition (which determines the time instant at which the controller needs to be sampled/updated) and the backstepping boundary feedback \eqref{control_function_event-triggered_with_K}. The proposed event-triggering condition is based on the evolution of the magnitude of the actuation deviation \eqref{deviation_actuation} and the evolution of the $L^2$- norm of the state. \\ \begin{Defi}[Definition of the event-triggered boundary control]\label{Definition_event_based_controller} Let $\beta >0$ and let $k(y):= K(1,y)$ with $K$ being the kernel given in \eqref{solutionKernelexplicit}. The event-triggered boundary control is defined by considering the following components: \\ \noindent I) (The event-trigger) The times of the events $t_j\geq 0$ with $t_0=0$ form a finite or countable set of times which is determined by the following rules for some $j\geq0$: \\ \begin{itemize} \item [a)] if $ \{ t \in \mathbb{R}_{+} \vert t > t_{j} \wedge \vert d(t) \vert > \beta \Vert k \Vert \Vert u[t] \Vert +\beta \Vert k \Vert \Vert u[t_{j}] \Vert \} = \emptyset$ then the set of the times of the events is $\{t_{0},...,t_{j}\}$.\\ \item [b)] if $\{ t \in \mathbb{R}_{+} \vert t > t_{j} \wedge \vert d(t) \vert > \beta \Vert k \Vert \Vert u[t] \Vert +\beta \Vert k \Vert \Vert u[t_{j}] \Vert \} \neq \emptyset$, then the next event time is given by: \begin{equation}\label{triggering_conditionISS_with_backstepping_original} \begin{split} t_{j+1} := & \inf \{ t \in \mathbb{R}_{+} \vert t > t_{j} \wedge \vert d(t) \vert > \beta \Vert k \Vert \Vert u[t] \Vert \\ & \hskip 2.9cm +\beta \Vert k \Vert \Vert u[t_{j}] \Vert \} \end{split} \end{equation} \end{itemize} \noindent II) (the control action) The boundary feedback law, \begin{equation}\label{operator_controlfunction} U_d(t) = \int_{0}^{1} k(y)u(t_{j},y) dy, \quad \forall t \in [t_{j},t_{j+1}) \end{equation} \end{Defi} \subsection{\textbf{Avoidance of the Zeno phenomena}} It is worth mentioning that guaranteeing the existence of a minimal dwell-time between two triggering times avoids the so-called Zeno phenomena that means infinite triggering times in a finite-time interval. It represents infeasible practical implementations into digital platforms because it would be required to sample infinitely fast. Before we tackle the result on existence of minimal dwell-time, let us first introduce the following intermediate result.\\ \begin{Lem}\label{Estimate_of_supNorm} For the closed-loop system \eqref{eq:sysparabolic}-\eqref{BC_parabolic_PDE_u}, the following estimate holds, for all $t \in [t_{j},t_{j+1}]$, $j\geq 0$: \begin{equation}\label{upper_bound_supNormofU} \sup_{t_{j} \leq s \leq t_{j+1}}(\Vert u[s] \Vert) \leq Q \Vert u[t_{j}] \Vert \end{equation} where $Q= e^{p/2(t_{j+1}- t_{j})}(1+ \frac{\sqrt{3}}{3} \Vert k \Vert + \frac{\Vert k \Vert}{\sqrt{p}}) + \frac{\sqrt{3}}{3} \Vert k \Vert$ and $p = -2\theta \pi^2 + 2 \lambda + \frac{1}{3} \lambda^2 $. \end{Lem} \begin{proof} We consider $U_d$ given by \eqref{operator_controlfunction} and define \begin{equation}\label{change_of_variable_Lemma1} v(t,x) = u(t,x) - x U_d \end{equation} It is straightforward to verify that $v$ satisfies the following PDE for all $t \in (t_{j},t_{j+1})$, $j\geq 0$, \begin{eqnarray}\label{eq:sysparabolic-v-fredholmtransform} v_t(t,x) & =& \theta v_{xx}(t,x) + \lambda v(t,x) + \lambda x U_d \\ v(t,0)&=&0\\ v(t,1)&=& 0 \label{BC_parabolic_PDE-v-fredholmtransform} \end{eqnarray} Well-posedness issues for \eqref{eq:sysparabolic-v-fredholmtransform}-\eqref{BC_parabolic_PDE-v-fredholmtransform} readily follows while being a particular case of the PDE considered in \cite[Lemma 5.2]{Karafyllis_Adaptive-regulation-triggered2019}. Now, by considering the function $V(t)=\frac{1}{2}\Vert v[t] \Vert^2$ and taking its time derivative along the solutions of \eqref{eq:sysparabolic-v-fredholmtransform}- \eqref{BC_parabolic_PDE-v-fredholmtransform} and using the Wirtinger's inequality, we obtain, for $t\in (t_{j}, t_{j+1})$: \begin{equation*} \dot{V} \leq - \theta \pi^2 \Vert v[t] \Vert^2 + \lambda \Vert v[t] \Vert^2 + U_d \int_{0}^{1}(\lambda x)v(t,x) dx \end{equation*} In addition, using the Young's inequality on the last term along with the Cauchy-Schwarz inequality, we get \begin{equation*} \dot{V}(t) \leq - \theta \pi^2 \Vert v[t] \Vert^2 + \lambda \Vert v[t] \Vert^2 + \frac{1}{2}U_d^2 + \frac{1}{6}\lambda^2 \Vert v[t] \Vert^2 \end{equation*} Then, for $t \in (t_{j}, t_{j+1})$: \begin{equation*} \dot{V}(t) \leq p V(t) + \frac{1}{2}U_d^2 \end{equation*} where $p = -2\theta \pi^2 + 2 \lambda + \frac{1}{3}\lambda^2 $. Using the Comparison principle on an interval $[a,b]$ where $a > t_{j}$ and $b < t_{j+1}$, one gets, for all $t \in [a,b]$: \begin{equation*} V(t) \leq e^{p(t-a)}(V(a)+ \frac{1}{2 p}U_d^2) \end{equation*} Due to the continuity of $V(t)$ on $[t_{j},t_{j+1}]$ and the fact that $a,b$ are arbitrary, we can conclude that \begin{equation}\label{Estimate_functional_p_tk+1} V(t) \leq e^{p(t_{j+1}-t_{j})}\left(V(t_{j})+ \tfrac{1}{2 p}U_d^2\right) \end{equation} for all $t \in [t_{j},t_{j+1}]$. Using the Cauchy-Schwarz inequality, we have that $\vert U_d \vert \leq \Vert k \Vert \Vert u[t_{j}] \Vert$. Using this fact in \eqref{Estimate_functional_p_tk+1}, we get, in addition: \begin{equation*} \Vert v[t] \Vert^2 \leq e^{p(t_{j+1}-t_{j})} \left(\Vert v[t_{j}] \Vert^2 + \tfrac{1}{p} \Vert k \Vert^2 \Vert u[t_{j}] \Vert^2 \right) \end{equation*} Using the above estimate in conjunction with \eqref{change_of_variable_Lemma1} and the triangle inequalities, we obtain the following inequalities: \begin{equation*} \begin{split} \Vert u[t] \Vert \leq \Vert v[t]\Vert + \tfrac{\sqrt{3}}{3} \vert U_d\vert \\ \Vert v[t_{j}] \Vert \leq \Vert u[t_{j}]\Vert + \tfrac{\sqrt{3}}{3} \vert U_d\vert \end{split} \end{equation*} together with $\vert U_d \vert \leq \Vert k \Vert \Vert u[t_{j}] \Vert$, we finally obtain, for all $t \in [t_{j}, t_{j+1}]$, \begin{equation*} \sup_{t_{j} \leq s \leq t_{j+1}}(\Vert u[s] \Vert) \leq Q \Vert u[t_{j}] \Vert \end{equation*} with $Q= e^{p/2(t_{j+1}- t_{j})}(1+ \tfrac{\sqrt{3}}{3} \Vert k \Vert + \frac{\Vert k \Vert}{\sqrt{p}}) + \tfrac{\sqrt{3}}{3} \Vert k \Vert$. This concludes the proof. \end{proof} \begin{Theo}\label{theo:minimal_dwellt_time} Under the event-triggered boundary control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction}, there exists a minimal dwell-time between two triggering times, i.e. there exists a constant $\tau >0$ (independent of the initial condition $u_0$) such that $t_{j+1} - t_{j} \geq \tau $, for all $j \geq 0$. \end{Theo} \begin{proof} Define $g \in C^2([0,1])$ by the following equation: \begin{equation}\label{definition_g_modaldecopsition} g(x):= \sum_{n=1}^{N}k_n \phi_{n}(x) \end{equation} where $N\geq 1$ is an integer, $k_n := \int_{0}^{1}k(y)\phi_n(y)dy$, $k(y)=K(1,y)$ with $K$ satisfying \eqref{solutionKernelexplicit} and $\phi_n(x) =\sqrt{2}\sin(n \pi x) ,n=1,2...$ are the eigenfunctions of the Sturm-Liouville operator $A: D \rightarrow L^2(0,1)$ defined by \begin{equation*} (Af)(x)= - \theta \frac{d^2 f}{dx^2}(x) - \lambda f(x) \end{equation*} for all $f \in D$ and $x \in (0,1)$ and $D \subset H^2([0,1])$ is the set of functions $f : [0,1] \rightarrow \mathbb{R} $ for which $f(0)= f(1)=0 $. \\ Let us also define \begin{equation}\label{tilde_deviation} \tilde{d}(t)= \int_{0}^{1} g(y)\left(u(t_{j},y) - u(t,y)\right)dy \end{equation} for $t \in [t_{j},t_{j+1})$, for $j\geq 0$ and $g$ given by \eqref{definition_g_modaldecopsition}. Taking the time derivative of $\tilde{d}(t)$ along the solutions of \eqref{eq:sysparabolic}-\eqref{BC_parabolic_PDE_u} yields, for all $t \in [t_{j},t_{j+1})$: \begin{equation*} \begin{split} \dot{\tilde{d}}(t) =& \theta \left( \frac{dg}{dx}(1)u(t,1) - g(1)\frac{\partial u}{\partial x}(t,1) \right) \\ & + \theta \left(g(0)\frac{\partial u}{\partial x}(t,0) - \frac{dg}{dx}(0)u(t,0) \right) \\ &+ \int_{0}^{1}(Ag)(y)u(t,y)dy \end{split} \end{equation*} Note that $g(1)\frac{\partial u}{\partial x}(t,1) = 0 $ by virtue of the function $g$ evaluated at $x=1$ as $\phi_n(1)=0$. In addition, by the eigenvalue problem $A\phi_n = \lambda_n \phi_n$ where $\lambda_n = n^2\pi^2\theta - \lambda $ are real eigenvalues and using the boundary conditions \eqref{BC_parabolic_PDE_u}, we get \begin{equation*} \begin{split} \dot{\tilde{d}}(t) =& \theta \int_{0}^{1}k(y)u(t_{j},y)dy \sum_{n=1}^{N}k_n \frac{d \phi_n}{dx}(1) \\ & + \sum_{n=1}^{N}k_n \lambda_n \int_{0}^{1}\phi_n(y)u(t,y)dy \end{split} \end{equation*} Using the Cauchy-Schwarz inequality and $\Vert \phi_n \Vert=1$ for $n=1,2,...$ the following estimate holds for $t \in (t_{j},t_{j+1})$, $j\geq 0$: \begin{equation}\label{estimate_tilded2} \vert \dot{\tilde{d}}(t) \vert \leq \theta \Vert k \Vert \Vert u[t_{j}] \Vert F_N + \Vert u[t] \Vert G_{N} \end{equation} where $F_N := \sum_{n=1}^{N}\Big\vert k_n \frac{d \phi_n}{dx}(1) \Big \vert $ and $G_N := \sum_{n=1}^{N} \vert k_n \lambda_n \vert $. Therefore, we obtain from \eqref{estimate_tilded2} and the fact that $\tilde{d}(t_{j})=0$, the following estimate: \begin{equation}\label{estimate_tilded3} \vert \tilde{d}(t) \vert \leq (t -t_{j})\theta \Vert k \Vert \Vert u[t_{j}] \Vert F_N + (t-t_{j})\sup_{t_{j} \leq s \leq t}(\Vert u[s] \Vert) G_N \end{equation} Note that from \eqref{deviation_actuation},\eqref{operator_controlfunction} and \eqref{tilde_deviation}, the deviation $d(t)$ can be expressed as follows: \begin{equation}\label{d(t)_in_termsof_Tilde_d} d(t) = \tilde{d}(t) + \int_{0}^{1}(k(y)-g(y))(u(t_{j},y) - u(t,y))dy \end{equation} Hence, combining \eqref{estimate_tilded3} and \eqref{d(t)_in_termsof_Tilde_d} we can obtain an estimate of $d$ as follows: \begin{equation}\label{esdtimateod_d_withnormk-g} \begin{split} \vert d(t) \vert & \leq (t -t_{j})\theta \Vert k \Vert \Vert u[t_{j}] \Vert F_N + (t-t_{j})\sup_{t_{j} \leq s \leq t}(\Vert u[s] \Vert) G_N \\ & \hskip 2 cm+ \Vert k-g \Vert\Vert u[t_{j}] \Vert + \Vert k-g \Vert\Vert u[t] \Vert \end{split} \end{equation} Using \eqref{esdtimateod_d_withnormk-g} and assuming that an event is triggered at $t=t_{j+1}$, we have \begin{equation}\label{estimate_d_at_tk+1} \begin{split} \vert d(t_{j+1}) \vert & \leq (t_{j+1} -t_{j})\theta \Vert k \Vert \Vert u[t_{j}] \Vert F_N \\ & \hskip 2 cm + (t_{j+1}-t_{j})\sup_{t_{j} \leq s \leq t_{j+1}}(\Vert u[s] \Vert) G_N \\ & \hskip 2 cm+ \Vert k-g \Vert\Vert u[t_{j}] \Vert + \Vert k-g \Vert\Vert u[t_{j+1}] \Vert \end{split} \end{equation} and, if $u[t_{j}] \neq 0$, by Definition \ref{Definition_event_based_controller}, we have that, at $t=t_{j+1}$ \begin{equation}\label{d_at_tk+1} \vert d(t_{j+1}) \vert \geq \beta \Vert k \Vert \Vert u[t_{j}] \Vert + \beta \Vert k \Vert \Vert u[t_{j+1}] \Vert \end{equation} Combining \eqref{estimate_d_at_tk+1} and \eqref{d_at_tk+1}, we get \begin{equation*} \begin{split} &\beta\Vert k \Vert \Vert u[t_{j}] \Vert + \beta \Vert k \Vert \Vert u[t_{j+1}] \Vert \\ & \leq (t_{j+1} -t_{j})\theta \Vert k \Vert F_N \Vert u[t_{j}] \Vert + (t_{j+1}-t_{j})G_N \sup_{t_{j} \leq s \leq t_{j+1}}(\Vert u[s] \Vert) \\ & \hskip 2cm + \Vert k-g \Vert\Vert u[t_{j}] \Vert + \Vert k-g \Vert\Vert u[t_{j+1}] \Vert \end{split} \end{equation*} therefore, \begin{equation*} \begin{split} & \left(\beta\Vert k \Vert - \Vert k-g \Vert \right) \Vert u[t_{j+1}] \Vert + \left( \beta \Vert k \Vert - \Vert k-g \Vert \right) \Vert u[t_{j}] \Vert \\ & \leq (t_{j+1} -t_{j})\theta \Vert k \Vert F_N \Vert u[t_{j}] \Vert + (t_{j+1}-t_{j})G_N\sup_{t_{j} \leq s \leq t_{j+1}}(\Vert u[s] \Vert) \end{split} \end{equation*} We select $N \geq 1$ in \eqref{definition_g_modaldecopsition} sufficiently large so that $\Vert k -g \Vert < \beta\Vert k \Vert$. Notice that we can always find $N$ sufficiently large so that the condition $\Vert k -g \Vert < \beta\Vert k \Vert$, since $g$ is simply the $N$-mode truncation of $k$ (which implies that $\Vert k-g\Vert$ tends to zero as $N$ tends to infinity). In addition, using the fact that $\Vert u[t_{j+1}] \Vert \geq 0$ and by \eqref{upper_bound_supNormofU} in Lemma \ref{Estimate_of_supNorm}, we obtain the following estimate: \begin{equation*} \begin{split} & \left( \beta\Vert k \Vert - \Vert k-g \Vert \right) \Vert u[t_{j}] \Vert \\ & \leq (t_{j+1} -t_{j})\theta \Vert k \Vert F_N \Vert u[t_{j}] \Vert + (t_{j+1}-t_{j})G_N Q \Vert u[t_{j}] \Vert \\ \end{split} \end{equation*} where $Q = e^{p/2(t_{j+1}- t_{j})}(1+ \tfrac{\sqrt{3}}{3} \Vert k \Vert + \frac{\Vert k \Vert}{\sqrt{p}}) + \tfrac{\sqrt{3}}{3} \Vert k \Vert$ and $p = -2\theta \pi^2 + 2 \lambda + \frac{1}{3}\lambda^2 $. Denoting \begin{itemize} \item $a_0:= \beta\Vert k \Vert - \Vert k-g \Vert $ \item $a_1:= \theta \Vert k \Vert F_N + G_N \tfrac{\sqrt{3}}{3} \Vert k \Vert$ \item $a_2:= G_N (1 + \tfrac{\sqrt{3}}{3} \Vert k \Vert + \tfrac{\Vert k \Vert}{\sqrt{p}})$ \end{itemize} we obtain an inequality of the form: \begin{equation}\label{inequality_for_dwell_time_LambertW} a_0 \leq a_1 (t_{j+1} - t_{j}) + a_2 (t_{j+1} - t_{j}) e^{p/2 (t_{j+1} - t_{j})} \end{equation} from which we aim at finding a lower bound for $(t_{j+1} - t_{j})$. Note that the right hand side of \eqref{inequality_for_dwell_time_LambertW} is a $\mathcal{K}_{\infty}$ function of $(t_{j+1} - t_{j})$. Let us denote it as $\alpha(s):= a_1 s + a_2 s e^{p/2 s} $ with $s= (t_{j+1} - t_{j})$. The solution of inequality \eqref{inequality_for_dwell_time_LambertW} is then $ s \geq \alpha^{-1}(a_0)$ where $\alpha^{-1}$ is the inverse of $\alpha$. Since $a_0$ is strictly positive, then there exists $\tau >0$ such that $s= (t_{j+1} - t_{j})\geq \tau > 0$. \\ If $u[t_{j}] = 0$, then Lemma \ref{Estimate_of_supNorm} guarantees that $u[t]$ remains zero. In this case, by Definition \ref{Definition_event_based_controller}, one would not need to trigger anymore and thus Zeno phenomenon is immediately excluded. It concludes the proof. \end{proof} \begin{remark}[Explicit dwell-time] We can upper bound the right-hand side of \eqref{inequality_for_dwell_time_LambertW} such that: \begin{equation}\label{inequality_for_dwell_time_LambertW2} a_0 \leq (a_1 +a_2 ) (t_{j+1} - t_{j}) e^{p/2 (t_{j+1} - t_{j})} \end{equation} which turns out to be more conservative (thus, one can expect solutions of \eqref{inequality_for_dwell_time_LambertW} to take smaller values). Furthermore, by rewriting \eqref{inequality_for_dwell_time_LambertW2} yields, \begin{equation}\label{inequality_for_dwell_time_LambertW3} \frac{p a_0}{2( a_1 + a_2 )} \leq \tfrac{p}{2}(t_{j+1} - t_{j}) e^{p/2 (t_{j+1} - t_{j})} \end{equation} so that the right-hand side corresponds to a transcendental function whose solution can be found using the so-called \textit{ Lambert W function} \footnote{To the best of our knowledge, in control theory, Lambert W functions have been used within the framework of time-delay systems (see e.g. \cite{Yi2010}).} (see e.g. \cite{Corless1996} for more details).\\ Hence, we have \begin{equation}\label{inequality_for_dewell_time_LambertW4} (t_{j+1} - t_{j}) \geq \frac{2}{p}W\left(\frac{p a_0}{2(a_1+a_2)}\right) \end{equation} Note that the argument $\tfrac{p a_0}{2(a_1+a_2)}$ of the Lambert W function is strictly positive yielding $W(\cdot)$ to take a strictly positive value. We denote then $\tau := \frac{2}{p} W \left( \tfrac{p a_0}{2(a_1+a_2)} \right) > 0$ being $\tau$ the minimal dwell-time between two triggering times, i.e. $t_{j+1} - t_{j} \geq \tau$ for all $j\geq 0$. \end{remark} \vskip 0.5cm \begin{remark}\label{Remark_aboutperiodicscheeme} It is worth remarking that if a periodic sampling scheme - where the the control value is updated periodically on a sampled-and-hold manner - is intended to be applied to stabilize the system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u}, then a period can be chosen according to \cite{KARAFYLLIS2018226}. However, an alternative way of choosing a suitable period while meeting the theoretical guarantees, is precisely by using the minimal dwell-time $\tau$ that was obtained from \eqref{inequality_for_dwell_time_LambertW} and its explicit form by the Lambert W function as in \eqref{inequality_for_dewell_time_LambertW4}. Unfortunately, as one may expect, such a dwell-time may be very small and conservative (similar to the sampling period obtained in \cite{KARAFYLLIS2018226} since the derivation was done using small gain arguments as well). This issue, however, supports the main motivation highlighted throughout the paper: stabilize on events only when is required and in an more efficient way. Event-triggered control offers advantages with respect period schemes as it reduces execution times and while meeting theoretical guarantees. \end{remark} Since there is a minimal dwell-time (which is uniform and does not depend on either the initial condition or on the state of the system), no Zeno solution can appear. Consequently, the following result on the existence of solutions in of the system system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} with \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction}, holds for all $ t \in \mathbb{R}_{+}$.\\ \begin{corollary}\label{existence_and_continuity_solutions_on_R} For every $u_{0} \in L^2(0,1)$, there exist a unique solution $u \in \mathcal{C}^{0}(\mathbb{R}_{+}; L^{2}(0,1))$ to the system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u}, \eqref{triggering_conditionISS_with_backstepping_original},\eqref{operator_controlfunction} satisfying $u \in C^{1}(I \times [0,1])$, $u[t] \in C^2([0,1])$ for all $t > 0 $ where $I = \mathbb{R}_{+} \backslash \{ t_{j} \geq 0, k= 0,1,2,...\} $ \end{corollary} \begin{proof} It is an immediate consequence of Proposition \ref{existence_and_continuity_solutions} and Theorem \ref{theo:minimal_dwellt_time}. Indeed, the solution is constructed (by the step method) iteratively between successive triggering times. \end{proof} \subsection{\textbf{Stability result}} In this subsection, we are going to follow small-gain arguments and seek for an Input-to-State stability property with respect to the deviation $d(t)$. \\ \begin{Lem}[ISS of the target system]\label{ISS_target_system} The target system \eqref{Target_system_w}-\eqref{IC_Target_system_w} is ISS with respect to $d(t)$; more precisely, the following estimate holds: \begin{equation}\label{ISS_estimate_targetsystem} \Vert w[t] \Vert \leq G e^{- \sigma t} \Vert w[0] \Vert + \gamma \sup_{0\leq s \leq t}\left(\vert d(s) \vert e^{-\sigma(t-s)}\right) \end{equation} where $\sigma \in (0, \mu_1)$ with $\mu_1=\pi^2\theta +c$, $G := \sqrt{(1+b^{-1})}$, for arbitrary $b >0$ and the gain $\gamma$ is given as follows: \begin{equation}\label{small_gain_parameter} \gamma:= \sqrt{(1+b)} \begin{cases} \left( \frac{\pi^2\theta + c}{\pi^2\theta + c - \sigma} \right) \frac{\left( \sinh\left(2\frac{\sqrt{c}}{\sqrt{\theta}}\right) - 2 \frac{\sqrt{c}}{\sqrt{\theta}} \right)}{2\sinh\left(\frac{\sqrt{c}}{\sqrt{\theta}}\right)\left(\frac{c}{\theta}\right)^{1/4}}, \quad \textit{if} \quad c \neq 0 \\ \frac{1}{\sqrt{3}}\left( \frac{\pi^2\theta }{\pi^2\theta - \sigma} \right), \quad \textit{if} \quad c = 0 \end{cases} \end{equation} \end{Lem} \begin{proof} See \cite[Appendix]{KARAFYLLIS2018226}. \end{proof} \begin{Theo}\label{main_theorem_EBC_backstepping} Let $\tilde{L} := 1+ \left(\int_{0}^{1} \left( \int_{0}^{x}\vert L(x,y) \vert^2 dy \right) dx \right)^{1/2} $ with $L$ satisfying \eqref{solutionKernelexplicit_inverse} and $k(y)=K(1,y)$ with $K$ satisfying \eqref{solutionKernelexplicit}. Let $\gamma$ be given as in Lemma \ref{ISS_target_system}. Let $\beta>0 $ be as in \eqref{triggering_conditionISS_with_backstepping_original}. If the following condition is fulfilled, \begin{equation}\label{coondition_for_small_gain} \Phi_e:= 2\beta \gamma \Vert k \Vert \tilde{L} < 1 \end{equation} then, the closed-loop system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} with event-triggered boundary control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction} has a unique solution and is globally exponentially stable; i.e. there exist $M, \sigma >0$ such that for every $u_0 \in L^2(0,1)$ the unique mapping $u \in \mathcal{C}^{0}(\mathbb{R}_{+}; L^{2}(0,1))$ satisfying $u \in C^{1}(I \times [0,1])$, $u[t] \in C^2([0,1])$ for all $t > 0 $ where $I = \mathbb{R}_{+} \backslash \{ t_{j} \geq 0, k= 0,1,2,...\} $ satisfies: \begin{equation}\label{GES} \Vert u[t] \Vert \leq M e^{-\sigma t} \Vert u[0] \Vert, \quad \text{for all} \quad t\geq 0 \end{equation} \end{Theo} \begin{proof} By Corollary \ref{existence_and_continuity_solutions_on_R}, the existence and uniqueness of a solution to the system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} with event-triggered boundary control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction} hold. Let us show that the system is globally exponential stable in the $L^2$-norm sense. \\ It follows from \eqref{triggering_conditionISS_with_backstepping_original} that the following inequality holds for all $t \in [t_{j},t_{j+1})$: \begin{equation}\label{estimateofd2} \vert d(t) \vert \leq \beta \Vert k \Vert \Vert u[t_{j}] \Vert + \beta \Vert k \Vert \Vert u[t] \Vert \end{equation} Therefore, inequality \eqref{estimateofd2} implies the following inequality for all $t\geq 0$: \begin{equation}\label{estimateofsup-d} \sup_{0\leq s \leq t} \left( \vert d(s)\vert e^{\sigma s} \right) \leq 2 \beta \Vert k \Vert \sup_{0 \leq s \leq t} \left( \Vert u[s] \Vert e^{\sigma s} \right) \end{equation} On the other hand, by Lemma \ref{ISS_target_system}, we have \begin{equation}\label{ISS_target-system-in_main_theorem} \Vert w[t] \Vert e^{\sigma t} \leq G \Vert w[0] \Vert + \gamma \sup_{0\leq s \leq t}\left(\vert d(s) \vert e^{\sigma s}\right) \end{equation} The following estimate is a consequence of \eqref{ISS_target-system-in_main_theorem}: \begin{equation}\label{estimateofsup-d2} \sup_{0\leq s \leq t}\left( \Vert w[s] \Vert e^{\sigma s} \right) \leq G \Vert w[0] \Vert + \gamma \sup_{0\leq s \leq t}\left(\vert d(s) \vert e^{\sigma s}\right) \end{equation} Hence, combining \eqref{estimateofsup-d} with \eqref{estimateofsup-d2}, we obtain \begin{equation*} \sup_{0\leq s \leq t}\left( \Vert w[s] \Vert e^{\sigma s} \right) \leq G \Vert w[0] \Vert + 2 \beta \gamma \Vert k \Vert \sup_{0 \leq s \leq t} \left( \Vert u[s] \Vert e^{\sigma s} \right) \end{equation*} and using the fact $\Vert u[t] \Vert \leq \tilde{L} \Vert w[t] \Vert$, we get \begin{equation}\label{estimateofsup-d3} \sup_{0\leq s \leq t}\left( \Vert w[s] \Vert e^{\sigma s} \right) \leq G \Vert w[0] \Vert + \Phi_e \sup_{0 \leq s \leq t} \left( \Vert w[s] \Vert e^{\sigma s} \right) \end{equation} where \begin{equation}\label{Phi_event2} \Phi_e:= 2 \beta \gamma \Vert k \Vert \tilde{L} \end{equation} Notice that, by virtue of \eqref{coondition_for_small_gain}, it holds that $ \Phi_e < 1$. Thereby, using the estimate of the backstepping transformation, i.e. $\Vert w[t] \Vert \leq \tilde{K} \Vert u[t] \Vert$ with $\tilde{K} := 1+ \left(\int_{0}^{1} \left( \int_{0}^{x}\vert K(x,y) \vert^2 dy \right) dx \right)^{1/2} $ and $K$ satisfying \eqref{solutionKernelexplicit}, we obtain from \eqref{estimateofsup-d3} and \eqref{Phi_event2} the following estimate for the solution to the closed-loop system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} with event-triggered control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction}: \begin{equation*} \sup_{0 \leq s \leq t} \left( \Vert u[s] \Vert e^{\sigma s} \right) \leq G(1-\Phi_e)^{-1} \tilde{K}\tilde{L} \Vert u[0] \Vert \end{equation*} which leads to \eqref{GES}: \begin{equation*} \Vert u[t] \Vert \leq M e^{-\sigma t}\Vert u[0] \Vert \end{equation*} with $M:= G(1-\Phi_e)^{-1} \tilde{K}\tilde{L}$. It concludes the proof. \end{proof} \section{Numerical simulations}\label{numerical_simulation} We consider the reaction-diffusion system with $\theta = c= 1$, $\lambda=\pi^2$ and initial condition $u_0(x) = \sum_{n=1}^3 \frac{\sqrt{2}}{n}\sin(n \pi x) + 3(x^2 - x^3)$, $x \in [0,1]$. For numerical simulations, the state of the system has been discretized by divided differences on a uniform grid with the step $h=0.01$ for the space variable. The discretization with respect to time was done using the implicit Euler scheme with step size $\Delta t=h^2 $. We stabilize the system on events under the event-triggered boundary control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction} where the parameter $\beta$ is selected such that condition \eqref{coondition_for_small_gain} in Theorem \ref{main_theorem_EBC_backstepping} is verified. In addition, $\tilde{L} = 1.8407$, $\Vert k \Vert = 5.61$ and $\gamma= 0.574 $ which is computed according to the information provided in Lemma \ref{ISS_target_system}. Therefore, two cases are pointing out: we choose e.g. $\beta = 0.07$ and $\beta = 0.02$ yielding $\Phi_e = 0.83 <1$ and $\Phi_e = 0.23 <1$, respectively. In the former case, $12$ events (updating times of the control) are obtained whereas in the later case, $47$ events are obtained. Figure \ref{component_solution} shows the numerical solution of the closed-loop system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} with event-triggered control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction} (on the left $\beta=0.07$ and on the right when $\beta=0.02$, which results in slow and fast sampling, respectively). The time-evolution of control functions under the event-triggered case is shown in Figure \ref{control_functions} (orange line with black circle marker for slow sampling and blue line with red circle marker for fast sampling). \begin{figure*}[t] \centering{ \subfigure{\includegraphics[width=1\columnwidth]{numericalsolution_slowV1} } \subfigure{\includegraphics[width=1\columnwidth]{numericalsolution_fastV2} \caption{Numerical solutions of the closed-loop system \eqref{eq:sysparabolic}-\eqref{IC_parabolic_PDE_u} with $\theta = c= 1$, $\lambda=\pi^2$, initial condition $u_0(x) = \sum_{n=1}^3 \frac{\sqrt{2}}{n}\sin(n \pi x) + 3(x^2 - x^3)$, $x \in [0,1]$ and under the event-triggered control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction}. With $\beta =0.07$ in \eqref{triggering_conditionISS_with_backstepping_original} the control updating is slower (closed-loop solution depicted on the left). With $\beta =0.02$ in \eqref{triggering_conditionISS_with_backstepping_original}, the control updating is faster (closed-loop solution depicted on the right).} \label{component_solution} } \end{figure*} \begin{figure}[t] \centering \subfigure{\includegraphics[width=1 \columnwidth]{control_fastandslowV3.eps} } \caption{Time-evolution of the event-triggered boundary control \eqref{triggering_conditionISS_with_backstepping_original}-\eqref{operator_controlfunction} (orange line with black circle marker for slow control updating, i.e. $\beta=0.07$ in \eqref{triggering_conditionISS_with_backstepping_original} and blue line with red circle marker for fast control updating, i.e. $\beta=0.02$ in \eqref{triggering_conditionISS_with_backstepping_original}).} \label{control_functions} \end{figure} In addition, Figure \ref{trajectories_triggering_condition} shows the time evolution of the functions appearing in the triggering condition \eqref{triggering_conditionISS_with_backstepping_original} (on the left with $\beta=0.07$ and on the right with $\beta=0.02$). Once the trajectory $ \vert d \vert$ reaches the trajectory $\beta \Vert k \Vert \Vert u[t] \Vert +\beta \Vert k \Vert \Vert u[t_{j}] \Vert $, an event is generated, the control value is updated and $d$ is reset to zero. It can be observed that the lower $\beta$ is, the faster the sampling and control updating which in turn implies smaller inter-executions times. This case turns out to be more conservative and the control function gets closer to the one in continuous case or even when considering a periodic scheme with a very small period. As a matter of fact, it is worth remarking that a sampling period can be computed from \cite[Section 3.3]{KARAFYLLIS2018226}. Indeed, for the reaction-diffusion system with a boundary control whose actuation is done in a sampled-and-hold fashion, such a period would be $T = 9.96 \times 10^{-7}$. Notice that this is very small (even smaller than the time step discretization for the current simulations); consequently the periodic scheme turns out not be implementable. This is one of the reasons why event-triggered boundary control offers advantages with respect to periodic schemes. In our framework, the control value is updated aperiodically and only when needed. \begin{figure*}[t] \centering{ \subfigure{\includegraphics[width=1\columnwidth]{Trajectories_newtriggering_slowV2} } \subfigure{\includegraphics[width=1\columnwidth]{Trajectories_newtriggering_fastV2} \caption{Trajectories involved in the triggering condition \eqref{triggering_conditionISS_with_backstepping_original} (on the left with $\beta=0.07$ and on the right with $\beta=0.02$, resulting in slow and fast sampling, respectively). Once the trajectory $ \vert d \vert$ reaches the trajectory $\beta \Vert k \Vert \Vert u[t] \Vert +\beta \Vert k \Vert \Vert u[t_{j}] \Vert $, an event is generated, the control value is updated and $d$ is reset to zero. } \label{trajectories_triggering_condition} } \end{figure*} \vskip 0.5cm \noindent Finally, we run simulations for 100 different initial conditions given by $u_{0}(x) = \sum_{n=1}^l n^2\sqrt{2}\sin(n\pi x) + l(x^2 - x^3)$ for $l=1,..,10$ and $u_{0}(x) = \sum_{n=1}^l n\sqrt{2}\sin(n^2\pi x) + l(x^2 - x^3)$, for $l=11,...,100$ on a frame of $1s$. We have computed the inter-execution times between two triggering times. We compared the cases for slow and fast sampling, i.e. when $\beta = 0.07 $ and $\beta=0.02$, respectively. Figure \ref{histograms} shows the density of the inter-execution times plotted in logarithmic scale where it can be observed that, the larger $\beta$ the less often is the sampling and control updating which in turn implies larger inter-executions times. It is interesting to notice that when choosing $\beta$ small (resulting in fast sampling, as aforementioned), there are several inter-execution times of the order of $10^{-1.7}$ as depicted in blue bars in Figure \ref{histograms} where the density predominates. It might suggest that a possible period (whenever one intends to sample periodically in a sampled-and-hold fashion) might be chosen with a length of the order $10^{-1.7}$. This issue is left for further tests and investigation with possible theoretical connections with periodic schemes as in \cite{KARAFYLLIS2018226}. This issue may give some hints on how to suitably choose sampling periods in order to reduce conservatism on periodic schemes. \begin{figure*}[t] \centering{ \includegraphics[width=0.9\textwidth]{histograma_slowandfast.eps} \caption{Density of the inter-execution times (logarithmic scale) computed for $100$ different initial conditions given by $u_{0}(x) = \sum_{n=1}^l n^2\sqrt{2}\sin(n\pi x) + l(x^2 - x^3)$ for $l=1,..,10$ and $u_{0}(x) = \sum_{n=1}^l n\sqrt{2}\sin(n^2\pi x) + l(x^2 - x^3)$, for $l=11,...,100$ on a frame of $1s$. With $\beta=0.07$ implying slow sampling and therefore larger inter-execution times (red bars) and with $\beta=0.02$ implying fast sampling and therefore smaller inter-execution times (blue bars). } \label{histograms} \end{figure*} \section{Conclusion}\label{conslusion_and_perspect} In this paper, we have proposed an event-triggered boundary control to stabilize (on events) a reaction-diffusion PDE system with Dirichlet boundary condition. A suitable state-dependent event-triggering condition is considered. It determines when the control has to be updated. It has been proved the existence of a minimal dwell-time which is independent of the initial condition. Thus, it has been proved that there is no Zeno behavior and thus the well-posedness and the stability of the closed-loop system are guaranteed. In future work, we may consider observer-based event-triggered control and possibly sampling output measurements on events as well. It may suggest that another event-triggered strategy shall be considered to be combined with the one for actuation. We expect also to address periodic event-triggered strategies inspired by some recent result from finite-dimensional systems \cite{BORGERS201881}. For that, we may use the obtained dwell-time as a period or to come up with a maybe less conservative period. In either cases, the period would be utilized to monitor periodically the triggering condition while the actuation is still on events. This would represent even a more realistic approach toward digital realizations while reducing the consumption of computational resources. \bibliographystyle{plain}
\section*{Introduction} In recent years there has been a lot of work on algebraic and homological properties of powers of graded ideals in the polynomial ring $S=K[x_1,\ldots,x_n]$, where $K$ is a field. Typically, many of the invariants known behave asymptotically well, that is, stabilize or show a regular behaviour for sufficiently high powers of $I$. Classical examples of this feature are Brodmann's results \cite{B1} and \cite{B2} which say that $\depth S/I^k$ is constant for $k\gg 0$ and $\Ass(I^{k+1})=\Ass(I^k)$ for $k\gg 0$, or the result by Cutkosky, Herzog, Trung \cite{CHT} and Kodyalam \cite{K} which says that the regularity of $I^k$ is a linear function for $k\gg 0$. Recently it was noted in \cite{HKM} that for $k\gg 0$, $\sat(I^k)$ is a quasi-linear function provided $I$ is a monomial ideal. Here, $\sat(I)$ denotes the saturation number of a graded ideal $I\subset S$, that is, the smallest number $\ell$ for which $I:\mm^{\ell+1}=I:\mm^\ell$, where $\mm=(x_1,\ldots, x_n)$ is the unique graded maximal ideal of $S$. Such number exists because $S$ is Noetherian and $I\subseteq I:\mm\subset I:\mm^2\subseteq\ldots $. The ideal $I^{\sat}=\Union_{\ell\geq 0}(I:\mm^\ell)$ is called the saturation of $I$. Thus $\sat(I)$ tells us how many steps are needed to reach $I^{\sat}$. If $I\subset S$ is a strongly stable ideal, then $\sat(I)=\max\{\ell\:\; \text{ $x_n^\ell|u$ for $u\in G(I)$}\}$, see Theorem~\ref{proffind}. Here, $G(I)$ denotes the unique minimal set of monomial generators of $I$. From this result one easily deduces (Corolary~\ref{plus}) that for two strongly stable ideals $I$ and $J$, one has $\sat(IJ)\leq \sat(I)+\sat(J)$ with equality if $I$ and $J$ are equigenerated. If either $I$ or $J$ is not equigenerated, then this inequality may be strict, and it fails to be true if the ideals $I$ and $J$ are not strongly stable. For example, if we consider the ideal $I=(x_1x_2,x_1x_3,x_2x_3)$, then $\sat(I)=0$ and $\sat(I^2)=1$. Of course, $I$ is not strongly stable, but it is squarefree strongly stable. More generally we may consider $\cb$-bounded strongly stable ideals, where $\cb\in \ZZ^n$ is an integer vector. We call $I$ to be $\cb$-bounded strongly stable, if $I$ is a monomial ideal, and (i) for all $u=x_1^{a_1}\cdots x_n^{a_n}\in G(I)$ we have $a_i\leq c_i$, and (ii) whenever $u\in G(I)$ and $i<j$ with $x_j|u$ and $x_iu/x_{j}$ is $\cb$-bounded, it follows that $x_iu/x_{j}\in I$. In the first section we consider the socle of $\cb$-bounded strongly stable ideals and prove in Theorem~\ref{d-1} that if $I$ is such an ideal and is generated in degree $d$, then $I:\mm=I+J$, where $J$ is generated in degree $d-1$ and is $(\cb-\eb)$-bounded strongly stable. Here, $\eb=(1,1,\ldots,1)$. In Section~2 we determine that the saturation number of equigenerated $\cb$-bounded strongly stable ideals and prove on Theorem~\ref{sat} for such an ideal $I$, the saturation number of $I$ is the maximal number $\ell$ for which there exists $u\in G(I)$ such that $x_n^\ell|u$ and the multidegree of $x_n^\ell|u$ is componentwise bounded above by $\cb-\ell\eb$. Examples show that this formula for $\sat(I)$ may fail, when $I$ is not equigenerated or $I$ is only a stable ideal. In Section~3 we apply the formula for $\sat(I)$ given in Theorem~\ref{sat} to determine the function $f(k)=\sat(I^k)$ when $I$ is a $\cb$-bounded principal strongly stable ideal, see Corollary~\ref{borelpower}. For the proof we need a fact, shown in Theorem~\ref{soclepower} that the $k$th power of $\cb$-bounded principal strongly stable ideal is a $k\cb$-bounded principal strongly stable ideal. This may fail, if $I$ is an equigenerated strongly stable but not principal strongly stable and it also may fail if $I$ is principal stable but not strongly stable. In the last section we make we give a more explicit formula for $\sat(I)$ when $I$ is an ideal of Veronese type. Given a positive integers $n$, an integer $d$ and an integer vector $\ab=(a_1,\ldots,a_n)$ with $a_1\geq a_2\geq \cdots\geq a_n$, one defines the monomial ideal $I_{\ab,n,d}\subset S=K[x_1,\ldots,x_n]$ with \[ G(I_{\ab,n,d})=\{x_1^{b_1}x_2^{b_2}\cdots x_n^{b_n}\; \mid \; \sum_{i=1}^nb_i=d \text{ and $b_i\leq a_i$ for $i=1,\ldots,n$}\}. \] Ideals of this type are called of {\em Veronese type}. It is obvious that $I_{\ab,n,d}$ is $\cb$-bounded strongly stable. The converse is not always true. In Theorem~\ref{satveronese} it is shown that if $I_{\ab,n,d}$ is a Veronese type ideal with $n>1$, $d\geq 0$, $a_1\geq a_2\geq \cdots \geq a_n\geq 0$ and $\sum_{i=1}^na_i\geq d$. Then $\sat(I_{\ab,n,d})=\min\bigg\{\bigg\lfloor \frac{\sum\limits_{i=1}^{n}a_i-d}{n-1}\bigg\rfloor, a_n, d\bigg\}$, where $\lfloor a\rfloor$ is the largest integer less than or equal to $a$. For any monomial ideal, the function $f(k)=\sat(I^k)$ is quasi-linear for $k\gg 0$, as noticed in \cite{HKM}. We use the formula for the saturation number of a Veronese type ideal to show in Theorem~\ref{qusilear} that for Veronese type ideals, $\sat(I^k)$ is quasi-linear from the very beginning and we determine the quasi-linear function explicitly. \section{The socle of $\cb$-bounded stable ideals} Let $K$ be a field and $S=K[x_1,\ldots,x_n]$ be the polynomial ring over $K$ in the variables $x_1,\ldots,x_n$. The set of monomials of $S$ will be denoted by $\Mon(S)$. Let $u\in \Mon(S)$, then $u=x_1^{a_1}\cdots x_n^{a_n}$ and we write $u=\xb^\ab$ where $\ab=(a_1,\ldots,a_n)$. The multidegree of $u$ is defined to be $\Deg(u)=\ab$. We also set $m(u)=\max\{i\:\; a_i\neq 0\}$. An ideal $I\subset S$ is called a {\em monomial ideal} if it is generated by monomials. The unique minimal set of monomial generators of $I$ will be denoted by $G(I)$. Let $\cb=(c_1,\ldots,c_n)$ be an integer vector with $c_i\geq 0$. The monomial $u=x_1^{a_1}\cdots x_n^{a_n}$ is called {\em $\cb$-bounded}, $\ab\leq \cb$, that is, $a_i\leq c_i$ for all $i$. Let $I$ be a monomial ideal generated by the monomials $u_1,\ldots, u_m$. We set \[ I^{\leq \cb}=(u_i\:\; \text{ $u_i$ is $\cb$-bounded}). \] \begin{Definition} {\em Let $I\subset S$ be a $\cb$-bounded monomial ideal.} \begin{enumerate} {\em \item[(a)] $I$ is called {\em $\cb$-bounded stable} if for all $u\in G(I)$ and all $i<m(u)$ for which $x_iu/x_{m(u)}$ is $\cb$-bounded, it follows that $x_iu/x_{m(u)}\in I$.} {\em \item[(b)] $I$ is called {\em $\cb$-bounded strongly stable} if for all $u\in G(I)$ and all $i<j$ with $x_j|u$ and $x_iu/x_{j}$ is $\cb$-bounded, it follows that $x_iu/x_{j}\in I$.} \end{enumerate} \end{Definition} Let $u_1,\ldots,u_m\in \Mon(S)$ be $\cb$-bounded. The smallest $\cb$-bounded strongly stable ideal containing $u_1,\ldots,u_m$ is denoted by $B^\cb(u_1,\ldots,u_m)$. A monomial ideal $I$ is called a $\cb$-bounded strongly stable principal ideal, if there exists a $\cb$-bounded monomial $u$ such that $I=B^{\cb}(u)$. The smallest strongly stable ideal containing $u_1,\ldots,u_m$ (with no restrictions on the exponents) is denoted $B(u_1,\ldots,u_m)$. The monomials $u_1,\ldots,u_m$ are called {\em Borel generators} of $I=B(u_1,\ldots,u_m)$. Similar definitions can be made for stable ideals. The $\cb$-bounded smallest stable ideal containing $u_1,\ldots, u_m$ will be denoted by $\B^\cb(u_1,\ldots,u_m)$, and the elements $u_1,\ldots, u_m$ are called {\em stable Borel generators} of $I=\B^\cb(u_1,\ldots,u_m)$. \medskip Let $I\subset S$ be a graded ideal. We have the following ascending chain of ideals $I\subseteq I:\mm\subseteq I:\mm^2\subseteq \ldots$. Since $S$ is Noetherian, there exists an integer $k\geq 0$ such that $I:\mm^k=I:\mm^{k+1}$. We set \[ \sat(I)=\min\{k\:\; I:\mm^k=I:\mm^{k+1}\}. \] \medskip We start with the following result. \begin{Theorem} \label{proffind} Let $I$ be a strongly stable ideal. Then \[ \sat(I)=\max\{\ell:\; x_n^{\ell}|u\ \ \text{for some }u\in G(I)\}. \] \end{Theorem} \begin{proof} Let $s=\max\{\ell:\; x_n^{\ell}|u \ \text{for some } u\in G(I)\}$. Let $G(I)=\{u_1,\ldots, u_m\}$. We prove the statement by induction on $s$. We use repeatedly the fact that $I:\mm=I:x_n$ and that $I:\mm$ is strongly stable is strongly stable, because $I$ is strongly stable. If $s=0$, then $x_n\nmid u_i$ for $i=1,\ldots,m$. It follows that $I:\mm=I:x_n=I$. Hence $\sat(I)=0$. Now we assume that $s\geq 1$. Furthermore, we may assume that $x_n\nmid u_\ell$ for $\ell=1,\ldots,i$, and $x_n|u_\ell$ for $\ell=i+1,\ldots,m$. Then $G(I:\mm)=\{u_{i_1},\ldots, u_{i_t},u_{i+1}/x_n,\ldots, u_m/x_n\}$, where $\{u_{i_1},\ldots, u_{i_t}\}$ is a suitable subset of $\{u_1,\ldots,u_i\}$. Indeed, $\{u_1,\ldots,u_i, u_{i+1}/x_n.\ldots u_m/x_n\}$ is a set of generators of $I:\mm$. Suppose $u_r|u_t/x_n$ for some $1\leq r\leq i$ and $i+1\leq t\leq m$. Then $x_nu_r$ divides $u_t$, a contradiction. It is also clear that $u_r/x_n$ and $u_t/x_n$ can not divide each other, unless $r=t$. This shows that the monomials $u_{i+1}/x_n,\ldots, u_m/x_n$ belong to $G(I:\mm)$, and this yields the assertion. It follows that $\max\{\ell:\; x_n^\ell|v \ \text{for some } v\in G(I:\mm)\}=s-1$. By our induction hypothesis, we have $\sat(I:\mm)=s-1$. Hence $\sat(I)=\sat(I:\mm)+1=s$. \end{proof} \begin{Corollary} \label{plus} Let $I$ and $J$ be two strongly stable ideals, then $IJ$ is a strongly stable ideal and $\sat(IJ)\leq \sat(I)+\sat(J)$. If $I$ and $J$ are equigenerated, then $\sat(IJ)=\sat(I)+\sat(J)$. \end{Corollary} \begin{proof} Let $w\in IJ$ and $x_j|w$. We may write $w=uv$ with $u\in I$, $v\in J$ and may assume $x_j|u$. For any $i<j$, we get $x_iu/x_j\in I$ since $I$ is strongly stable. It follows that $x_iw/x_j=(x_iu/x_j)v\in IJ$. Hence $IJ$ is strongly stable ideal. Let $G(I)=\{u_1,\dots,u_r\}$, $G(J)=\{v_1,\ldots,v_s\}$ and $G(IJ)=\{w_1,\ldots,w_t\}$, Then $\{w_1,\ldots,w_t\}\subseteq \{u_1v_1,\ldots,u_1v_s, u_2v_1,\ldots,u_rv_s\}$. It follows from Theorem~\ref{proffind} that \[ \sat(IJ)\leq \sat(I)+\sat(J). \] If $I$ and $J$ are equigenerated, then $\{w_1,\ldots,w_t\}=\{u_1v_1,\ldots,u_1v_s, u_2v_1,\ldots,u_rv_s\}$. Thus $\sat(IJ)=\sat(I)+\sat(J)$ from Theorem~\ref{proffind}. \end{proof} \begin{Remark} \label{funny} {\em (a) We may have $\sat(IJ)< \sat(I)+\sat(J)$ if $I$ and $J$ are strongly stable but either $I$ or $J$ is not equigenerated. For example, let $I=B(x_2^2x_3^2, x_1x_3)$, $J=B(x_1x_3^2, x_2^2x_3)$. Then $\sat(I)=\sat(J)=2$ and $\sat(IJ)=3$. (b) If $I$ and $J$ are not strongly stable, then none of the inequalities of Corollary~\ref{plus} may be valid. For example, if $I=(x_1x_2,x_1x_3,x_2x_3)$, then $1=\sat(I^2)>2\sat(I)=0$. } \end{Remark} Note that the ideal in the example of Remark~\ref{funny}(b) is a principal squarefree strongly stable, but fails the inequality given Corollary~\ref{plus} even for powers. Observe that squarefree monomial ideals are $(1,1,\ldots,1)$-bounded. Therefore, for the rest of the paper, we try at least to understand the behaviour the function $f(k)=\sat (I^k)$, when $I$ is a $\cb$-bounded strongly stable principal ideal. \medskip Let $\eb=(1,1,\ldots,1)\in \ZZ^n$. Then we have \begin{Theorem} \label{d-1} Let $I$ be a non-zero $\cb$-bounded stable ideal generated in degree $d$. Then $I:\mm=I+J$, where $J$ is a $(\cb-\eb)$-bounded ideal generated in degree $d-1$. Indeed, \[ J=(u/x_n\:\; u\in G(I),\; x_n|u \text{ and } \Deg (u/x_n)\leq \cb-\eb). \] Moreover, if $I$ be a $\cb$-bounded strongly stable ideal, then $J$ is a $(\cb-\eb)$-bounded strongly stable ideal. \end{Theorem} For the proof of the theorem we need the following \begin{Lemma} \label{socleres} Let $I\subset S$ be a monomial ideal with minimal multigraded free $S$-resolution \[ 0\to F_{n-1}\to \cdots \to F_1\to F_0\to I\to 0. \] Suppose that $F_{n-1}= \Dirsum\limits_{i=1}^{r} S(-\ab_i)$. Then the elements $\xb^{\ab_i}/x_1\cdots x_n$ ($i=1,\ldots,r$) are monomials in $S$ and \[ (\xb^{\ab_1}/x_1x_2\cdots x_n)+I, \ldots, (\xb^{\ab_r}/x_1x_2\cdots x_n)+I \] is a $K$-basis of $(I:\mm)/I$. \end{Lemma} \begin{proof} There exists the following isomorphisms of graded modules. \[ \Dirsum_{i=1}^rK(-\ab_i)\iso \Tor_{n-1}(K, I)\iso \Tor_n(K, S/I)\iso H_n(x_1,\ldots,x_n;S/I). \] Here $H_n(x_1,\ldots,x_n;S/I)$ denotes the $n$th Koszul homology of $S/I$ with respect to the sequence $x_1,\ldots,x_n$. Note that $H_n(x_1,\ldots,x_n;S/I)=(I:\mm/I)\bigwedge^n E$, where $E=\Dirsum_{i=1}^n(S/I)e_i$, and hence $(I:\mm/I)\bigwedge^n E=(I:\mm/I)e_1\wedge e_2\wedge \cdots \wedge e_n$. Therefore, for each $i$ there exists $z_i:=(u_i+I)e_1\wedge e_2\wedge \cdots \wedge e_n\in H_n(x_1,\ldots,x_n;S/I)$, where $u_i\in I:\mm$ is a monomial, and $z_i$ has multidegree $\ab_i$. Moreover, $z_1,\ldots,z_r$ is a $K$-basis of $H_n(x_1,\ldots,x_n;S/I)$. This implies that $u_1+I, \ldots,u_r+I$ is a $K$-basis of $I:\mm/I$. Comparing multidegrees we see that $u_i=\xb^{\ab_i}/x_1\cdots x_n$ for $i=1,\ldots,r$. \end{proof} \begin{proof}[Proof of Theorem~\ref{d-1}] Since $I$ is a non-zero $\cb$-bounded stable ideal, there exist $\cb$-bounded monomials $u_1,\ldots,u_m\in I$ of degree $d$ such that $I=\B^{\cb}(u_1,\ldots,u_m)$. By \cite[Lemma~\ref{principalbound}]{HMRZ} we have $\B^{\cb}(u_i) = \B(u_i)^{\leq \cb}$ for all $i$. Hence \begin{eqnarray} \label{cb} I&=&\B^{\cb}(u_1,\ldots,u_m)=\B^{\cb}(u_1)+\cdots +\B^{\cb}(u_m)=\B(u_1)^{\leq \cb}+\cdots +\B(u_m)^{\leq \cb}\\ &=&\B(u_1,\ldots,u_m)^{\leq \cb}.\nonumber \end{eqnarray} Let $\GG$ be the minimal multigraded free $S$-resolution of $\B(u_1,\ldots,u_m)$. By the theorem of Eliahou-Kervaire \cite{EK} it follows that $G_{n-1}= \Dirsum_i S(-\ab_i)$ where for each $\ab_i$ the monomial $\xb^{\ab_i}$ is of the form $x_1\cdots x_{n-1}u$ with $u\in G(I)$ and $m(u)=n$. Let $\FF$ be the minimal multigraded free $S$-resolution of $I$. From (\ref{cb}) and the Restriction Lemma (\cite[Lemma 4.4]{HHZ}) it follows that $F_{n-1}= \Dirsum_i S(-\ab_i)$ where for each $\ab_i$ the monomial $\xb^{\ab_i}$ is of the form $x_1\cdots x_{n-1}u$ with $u\in G(I)$, $m(u)=n$ and $\Deg(x_1\cdots x_{n-1}u)\leq \cb$. Lemma~\ref{socleres} implies that the elements $u/x_n$ with $u\in G(I)$, $x_n|u$ and $\Deg(u/x_n)\leq\cb-\eb$ are the generators of $J$. Now assume that $I$ is a $\cb$-bounded strongly stable ideal in degree $d$. Let $w\in G(J)$ and assume that $x_j|w$ and $w'=x_i(w/x_j)$ is $(\cb-\eb)$-bounded. Then $v=wx_n\in G(I)$, and since $I$ is $\cb$-bounded strongly stable and $v'=x_i(v/x_j)$ is $\cb$-bounded, it follows that $v'\in G(I)$. This implies that $w'=v'/x_n\in J$. \end{proof} \begin{Remark} \label{reza}{\em (a) The second part of Theorem~\ref{d-1} is not satisfied for $\cb$-bounded stable ideals. For example, the ideal $I=(x_1^3, x_1^2x_2, x_1x_2^2, x_1x_2x_3) \subset K[x_1,x_2,x_3]$ is a $\cb$-bounded stable ideal of degree $3$, where $\cb=(3,2,1)$, and $J=(x_1x_2)$. The ideal $J$ is not $(\cb-\eb)$-bounded stable, because $x_1^2\not\in J$. (b) The second part of Theorem~\ref{d-1} is not satisfied if $I$ is not equigenerated, even if it is $\cb$-bounded strongly stable. Indeed, $I=(x_1^3,x_1^2x_2^2,x_1^2x_2x_3,x_1^2x_3^2)$ be a $\cb$-bounded strongly stable ideal where $\cb=(3,2,2)$. But $J=(x_1^2x_2,x_1^2x_3)$ is not $(\cb-\eb)$-bounded strongly stable ideal.} \end{Remark} \medskip \section{The saturation number for $\cb$-bounded strongly stable ideals} Let $I\subset S$ be a graded ideal. Then we define the saturation of $I$ to be the ideal $$I^{\sat}=\Union_k (I:\mm^k).$$ If $I\subset S$ is a monomial ideal. For each $\ell\geq 1$, the $K$-vector space $(I:\mm^{\ell})/(I:\mm^{\ell-1})$ has unique $K$-basis of the form $u_1+(I:\mm^{\ell-1}),u_2+(I:\mm^{\ell-1}),\ldots, u_r+(I:\mm^{\ell-1})$, where the $u_i$ are monomials. We set \[ J_0(I)=I \text{ and } J_\ell(I)=(u_1,\ldots,u_r) \text{ if }\ell\geq 1. \] \begin{Lemma} \label{d-1already} Let $I$ be a monomial ideal with $d$-linear resolution. Then $J_1(I)$ is generated in degree $d-1$. \end{Lemma} \begin{proof} Let $\FF$ be the multigraded minimal free resolution of $I$, and let $F_{n-1}=\Dirsum_{i=1}^rS(-\ab_i)$. By Lemma~\ref{socleres}, $J_1(I)$ is generated by the monomials $\xb^{\ab_i}/x_1\cdots x_n$. Since $I$ has $d$-linear resolution, it follows that $\deg \xb^{\ab_i}=d+n-1$ for all $i$. Therefore, $J_1(I)$ is generated by monomials of degree $d-1$. \end{proof} \begin{Lemma} \label{jk} With the assumptions and notation introduced we have \begin{enumerate} \item[(a)] $I:\mm^\ell =\sum_{k=0}^\ell J_k(I)$. \item[(b)]$\sat(I)=\max\{\ell\:\; J_\ell(I)\neq 0\}$. \item[(c)] $I^{\sat} =\sum_{\ell\geq 0} J_\ell(I)$. \item[(d)] Let $\ell\geq 0$. Suppose that $J_i(I)$ has a $(d-i)$-linear resolution for $i=0,\ldots,\ell$. Then $J_\ell(I):\mm=J_\ell(I)+J_{\ell+1}(I)$. In particular, $J_1(J_\ell(I))=J_{\ell+1}(I)$. \end{enumerate} \end{Lemma} \begin{proof} (a), (b) and (c) are obvious. Proof of (d): We may assume that $J_\ell(I)\neq 0$, otherwise the assertion is trivial. We have $I:\mm^\ell +J_{\ell+1}(I)=I:\mm^{l+1}$. Therefore, $\mm J_{\ell+1}(I) \subset \sum_{k=0}^\ell J_k(I)$. It follows that the generators of $J_{\ell+1}(I)$ have degree $\geq d-\ell-1$, since by (a) and our assumption the least degree of generators of $I:\mm^\ell$ is $d-\ell$. Assume $J_{\ell+1}(I)$ has a monomial generator $u$ with $\deg(u)\geq d-\ell$. Then $x_i u\in \sum_{k=0}^{\ell-1}J_k(I)=I:\mm^{\ell-1}$ for $1\leq i\leq n$. Therefore, $u\in I:\mm^{\ell}$, a contradiction. This shows all generators of $J_{\ell+1}(I)$ are of degree $d-\ell-1$. Now let $u\in G(J_{\ell+1}(I))$. Then $x_iu\in J_{\ell+1}(I)$ for all $i$. This implies $J_\ell(I):\mm\supseteq J_\ell(I)+J_{\ell+1}(I)$. Let $u\in G(J_\ell(I):\mm)$. Then $\deg u=d-\ell-1$, and hence $u\not\in I:\mm^{\ell}$. Thus $u\in J_{\ell+1}(I)$, and this implies that $J_\ell(I):\mm\subseteq J_\ell(I)+J_{\ell+1}(I)$. Notice that $J_\ell(I)+J_{\ell+1}(I)=J_\ell(I):\mm=J_\ell(I)+J_1(J_{\ell}(I))$ and $J_{\ell+1}(I)$ is generated in degree $d-\ell-1$ from the above proof. Since $J_\ell(I)$ has a $(d-\ell)$-linear resolution, we get $J_1(J_\ell(I))$ is generated in degree $d-\ell-1$. It follows that $J_1(J_\ell(I))=J_{\ell+1}(I)$. \end{proof} \medskip Now, we prove the main results of this section. \begin{Theorem} \label{sat} Let $I$ be an equigenerated $\cb$-bounded strongly stable ideal. Then \begin{enumerate} \item[(a)] for all $\ell\geq 1$, $J_{\ell}(I)$ is a $(\cb-\ell\eb)$-bounded strongly stable ideal generated in degree $d-\ell$, and \[ J_{\ell}(I)= (u/x_n^{\ell}\:\; u\in G(I),\; x_n^\ell|u \text{ and } \Deg (u/x_n^{\ell})\leq \cb-\ell\eb) \text { if } J_{\ell-1}(I)\neq 0. \] \item[(b)] $\sat(I)$ is the maximal number $\ell$ for which there exists $u\in G(I)$ such that $x_n^\ell|u$ and $\Deg(u/x_n^\ell)\leq\cb-\ell\eb$. \end{enumerate} \end{Theorem} \begin{proof} We prove (a) by induction on $\ell$. For $\ell=1$, the assertion from Therem~\ref{d-1}. Now let $\ell\geq 2$, and assume that (a) holds for $\ell-1$. Since by induction hypothesis $J_{\ell-1}(I)$ is $(\cb-(\ell-1)\eb)$-bounded strongly stable, again using Theorem \ref{d-1}, we obtain $J_{\ell}(I)$ is a $(\cb-\ell\eb)$-bounded strongly stable ideal generated in degree $d-\ell$ and \[ J_{\ell}(I)= \{v/x_n\:\; v\in G(J_{\ell-1}(I)),\; x_n|v \text{ and } \Deg (v/x_n)\leq \cb-\ell\eb\}. \] The induction hypothesis implies that \[ G(J_{\ell-1}(I))= \{u/x_n^{\ell-1}\:\; u\in G(I),\; x_n^{\ell-1}|u \text{ and } \Deg (u/x_n^{\ell-1})\leq \cb-(\ell-1)\eb\}. \] It follows that $v$ is of the form $u/x_n^{\ell-1}$, where $x_n^{\ell-1}|u$ and $\Deg (u/x_n^{\ell-1})\leq \cb-(\ell-1)\eb$. Hence $v/x_n$ has the form $u/x_n^{\ell}$, where $x_n^{\ell}|u$ and $\Deg (u/x_n^{\ell})\leq \cb-\ell\eb$, as desired. (b) Let $s=\sat(I)$ and $k$ be the maximal number $\ell$ with the properties described in part (b) of the theorem. Then $J_s(I)\neq 0$, by Lemma \ref{jk} (b). This implies that $J_{s-1}(I)\neq 0$. By (a), we get $J_{s}(I)= (u/x_n^{s}\:\; u\in G(I),\; x_n^s|u \text{ and } \Deg (u/x_n^{s})\leq \cb-s\eb)$. It follows that $s\leq k$. Suppose that $s<k$. Then $J_{s+1}(I)\neq 0$, This contradicts Lemma~\ref{jk}(b). \end{proof} \begin{Remark}{\em (a) Part (b) of Theorem~\ref{sat} does not hold if $I$ is not equigenerated. For example, let $I=(x_1,x_2^4,x_2^3x_3,x_2^2x_3^2)\subset K[x_1,x_2,x_3]$, then $I$ is $\cb$-bounded strongly stable where $\cb=(1,4,2)$. By CoCoA, we get $sat(I)=2$. But $\max\{k\: x_n^k|u \text{ and } \Deg(u/x_n^k)\leq\cb-k\eb \text{ for $u\in G(I)$}\}=1$. (b) By the example in Remark~\ref{reza}(a), $J_1(I)$ need not to be stable if $I$ is an equigenerated stable ideal. Therefore, we can not apply an induction argument as used in Theorem~\ref{sat}(b). Nevertheless, Theorem~\ref{sat}(b) may be valid for any stable equigenerated monomial ideal, as many explicit examples indicate.} \end{Remark} \medskip \section{The saturation number of powers of $\cb$-bounded strongly stable monomial ideals} Let $u, v$ be $\cb$-bounded monomials of same degree $d$. Then we write $v\prec_\cb u$ if and only if $v\in B^\cb(u)$. This is a partial order on the $\cb$-bounded monomials of degree $d$. We also write $v\prec u$ if and only if $v\in B(u)$. \begin{Theorem} \label{soclepower} Let $u=x_{i_1}\cdots x_{i_d}$ be a $\cb$-bounded monomial in $S$ with $i_1\leq i_2\leq \cdots \leq i_d$ and $I=B^{\cb}(u)$. Then for any positive integer $k$ \begin{itemize} \item[(a)] $I^k=B^{k\cb}(u^k)$; \item[(b)] $I^k:\mm=I^k+B^{k\cb-\eb}(u^k/x_n)$, if $i_d=n$, otherwise $I^k:\mm=I^k$; \item[(c)]for all $\ell\geq 0$ such that $x_n^\ell|u^k$, $J_{\ell}(I^k)=B^{k\cb-\ell\eb}(u^k/x_n^\ell)$. \end{itemize} \end{Theorem} \begin{proof} Let $u^k=x_{j_1}x_{j_2}\cdots x_{j_{kd}}$ with $j_1\leq j_2\leq \cdots \leq j_{kd}$. Then $j_{tk+1}=j_{tk+2}=\cdots=j_{tk+k}=i_{t+1}$ for $t=0,1,\ldots, d-1$. (a) The inclusion $I^k\subseteq B^{k\cb}(u^k)$ is obvious. Conversely, let $w=x_{\ell_1}x_{\ell_2}\cdots x_{\ell_{kd}}$ $\in B^{k\cb}(u^k)$ with $\ell_1\leq \ell_2\leq \cdots \leq \ell_{kd}$, then $\ell_{s}\leq j_{s}$ for any $s=1,\ldots,kd$. Choose $v_1=x_{\ell_1}x_{\ell_k+1}\cdots x_{\ell_{k(d-1)+1}}$, $v_2=x_{\ell_2}x_{\ell_k+2}\cdots x_{\ell_{k(d-1)+2}}$, $\ldots$, $v_k=x_{\ell_k}x_{\ell_k+k}\cdots x_{\ell_{kd}}$, then $v_i\in B(u)$ for $i=1,\ldots,k$. Since $w$ is $k\cb$-bounded, we get each $v_i$ is $\cb$-bounded. This implies that $w\in I^k$. (b) If $i_d<n$, then it is clear $I^k:\mm=I^k$. Now we assume that $i_d=n$. Since $I^k=B^{k\cb}(u^k)$ is a $k\cb$-bounded strongly stable ideal and since $u^k/x_n\in I^k:\mm$, it follows from Theorem~\ref{d-1} that $B^{k\cb-\eb}(u^k/x_n)\subseteq I^k:\mm$. Hence $I^k+B^{k\cb-\eb}(u^k/x_n)\subseteq I^k:\mm$. Conversely, $v\in G(I^k:\mm)\setminus I^k$, then $\mm v\subset I^k$, where $\deg(v)=kd-1$ and $\Deg(v)\leq k\cb-\eb$ by Theorem \ref{d-1}. Let $v=x_{s_1}\cdots x_{s_{kd-1}}$ with $s_1\leq s_2\leq \cdots \leq s_{kd-1}\leq n$, then $x_nv=x_{s_1}\cdots x_{s_{kd-1}}x_n\in B^{k\cb}(u^k)$ by part (a). It follows that $s_\ell\leq j_\ell$ for $\ell=1,\ldots,kd-1$. This means that $v\in B^{k\cb-\eb}(u^k/x_n)$. (c) We prove the statement by induction on $\ell$. For $\ell=1$, the assertion from (b). Now let $\ell\geq 2$. By induction hypothesis we may assume that $J_{\ell-1}(I^k)=B^{k\cb-(\ell-1)\eb}(u^k/x_n^{\ell-1})$. Then $J_{\ell-1}(I^k)$ is $(k\cb-(\ell-1)\eb)$-bounded strongly stable. By Theorem~\ref{d-1} it follows that $J_{\ell}(I^k)$ is $(k\cb-\ell\eb)$-bounded generated in degree $kd-\ell$ and \begin{eqnarray} \label{weneedit} J_{\ell}(I^k)= \{w/x_n\:\; w\in G(J_{\ell-1}(I^k)),\; x_n|w \text{ and } \Deg (w/x_n)\leq k\cb-\ell\eb\}. \end{eqnarray} Now we prove that $J_{\ell}(I^k)=B^{k\cb-\ell\eb}(u^k/x_n^\ell)$. Let $v\in B^{k\cb-\ell\eb}(u^k/x_n^\ell)$, then $v\prec u^k/x_n^{\ell}$ and $\Deg (v)\leq k\cb-\ell\eb$. This implies that $x_nv\prec u^k/x_n^{\ell-1}$, and hence $vx_n\in B^{k\cb-(\ell-1)\eb}(u^k/x_n^{\ell-1})$. By induction hypothesis, $B^{k\cb-(\ell-1)\eb}(u^k/x_n^{\ell-1})=J_{\ell-1}(I^k)$, and so $x_nv\in G(J_{\ell-1}(I^k))$. Hence (\ref{weneedit}) implies that $v\in J_\ell(I^k)$ Conversely, let $v\in J_{\ell}(I^k)$. Then by (\ref{weneedit}), $v=w/x_n$, with $x_n|w$, $w\in G(J_{\ell-1}(I^k))$ and $\Deg (w/x_n)\leq k\cb-\ell\eb$. It follows that $\Deg (w)\leq k\cb-(\ell-1)\eb$. Since $J_{\ell-1}(I^k)=B^{k\cb-(\ell-1)\eb}(u^k/x_n^{\ell-1})$ by induction hypothesis, we have $w\prec u^k/x_n^{\ell-1}$ and $w$ is $k\cb-(\ell-1)\eb$-bounded. Since $x_n|w$, we get $x_n|(u^k/x_n^{\ell-1})$ and $w/x_n\prec u^k/x_n^{\ell}$. It follows that $w/x_n\prec u^k/x_n^{\ell}$ and is $(k\cb-\ell\eb)$-bounded. Hence $J_{\ell}(I^k)\subseteq B^{k\cb-\ell\eb}(u^k/x_n^\ell)$. \end{proof} \begin{Remarks} {\em (a) The product of two $\cb$-bounded strongly stable ideals is not necessarily a $\cb$-bounded strongly stable ideal. For example, let $I=(x_1x_2,x_1x_3,x_1x_4,x_2x_3)\subset K[x_1,x_2,x_3,x_4]$. Then \[ I^2=(x_1^2x_2^2,x_1^2x_2x_3,x_1^2x_2x_4,x_1x_2^2x_3,x_1^2x_3^2, x_1^2x_3x_4,x_1x_2x_3^2,x_1^2x_4^2,x_1x_2x_3x_4,x_2^2x_3^2). \] The ideal $I$ is $(1,1,1,1)$-bounded strongly stable. Since $x_1x_2^2x_4=x_2\frac{(x_1x_4)(x_2x_3)}{x_3}\notin I^2$, we see that $I^2$ is not $2\cb$-bounded strongly stable. Therefore, Theorem~\ref{d-1} cannot be used to compute $\sat(I^2)$. (b) A statement similar to Theorem~\ref{soclepower} (a) does not hold for $\cb$-bounded stable principal ideals. For example, let $u=x_1x_2x_3\in K[x_1,x_2,x_3]$ and $\cb=(2,2,2)$. Then $\B^\cb(u)=(x_1^2x_2,x_1x_2^2,x_1x_2x_3)$, and \[ (\B^\cb(u))^2=(x_1^4x_2^2,x_1^3x_2^3,x_1^2x_2^4,x_1^3x_2^2x_3,x_1^2x_2^3x_3,x_1^2x_2^2x_3^2). \] On the other hand, \[ \B^{2\cb}(u^2)=(x_1^4x_2^2,x_1^3x_2^3,x_1^2x_2^4,x_1^3x_2^2x_3,x_1^2x_2^3x_3,x_1^2x_2^2x_3^2,x_1^4x_3^2,x_1^3x_2x_3^2,x_1^4x_2x_3). \] (c) In general, $B^{\cb}(u_1)B^{\cb}(u_2)\neq B^{2\cb}(u_1u_2)$. Indeed, let $u_1=x_1x_2^2$, $u_2=x_1x_3^2$ and $\cb=(2,2,2)$. Then \[B^{\cb}(u_1)B^{\cb}(u_2)=(x_1^4x_2^2,x_1^3x_2^3,x_1^2x_2^4,\\ x_1^4x_2x_3,x_1^3x_2^2x_3,x_1^2x_2^3x_3,x_1^3x_2x_3^2,x_1^2x_2^2x_3^2)\] and \[B^{2\cb}(u_1u_2)=(x_1^4x_3^2, x_1^4x_2^2,x_1^3x_2^3,x_1^2x_2^4,x_1^4x_2x_3,\\ x_1^3x_2^2x_3,x_1^2x_2^3x_3,x_1^3x_2x_3^2,x_1^2x_2^2x_3^2).\] } \end{Remarks} \medskip For the powers of $\cb$-bounded strongly stable principal ideals, we have \begin{Corollary} \label{borelpower} Let $u=x_1^{a_1}\cdots x_n^{a_n}$ be a $\cb$-bounded monomial in $S$ and $I=B^{\cb}(u)$. Then for any positive integer $k$ \[ \sat(I^k)=\max\{\ell:\; \text{there exists}\ v\in G(B^{k\cb}(u^k))\ \text{with}\ x_n^\ell|v\ \text{and}\ \Deg(v/x_n^\ell)\leq k\cb-\ell\eb\}. \] \end{Corollary} \begin{proof} From Theorem~\ref{soclepower}(a), we know $I^k=B^{k\cb}(u^k)$. It follows that $I^k$ is $k\cb$-bounded strongly stable, the desired statement from Theorem~\ref{sat}. \end{proof} A special case of $\cb$-bounded strongly stable principal ideals are the so-called Veronese type ideals, as shown in \cite{HMRZ}. For this class of ideals we have a more precise information about the saturation number. This will be discussed in the next section. \section{The saturation number of powers of Veronese type ideals} In this section we consider a special class of $\cb$-bounded strongly stable ideals, that is, Veronese type ideals. Given a positive integers $n$, and an integer $d$ and an integer vector $\ab=(a_1,\ldots,a_n)$ with $a_1\geq a_2\geq \cdots\geq a_n$, one defines the monomial ideal $I_{\ab,n,d}\subset S=K[x_1,\ldots,x_n]$ with \[ G(I_{\ab,n,d})=\{x_1^{b_1}x_2^{b_2}\cdots x_n^{b_n}\; \mid \; \sum_{i=1}^nb_i=d \text{ and $b_i\leq a_i$ for $i=1,\ldots,n$}\}. \] It is obvious that $I_{\ab,n,d}$ is $\cb$-bounded strongly stable. For the proof of the next result we need the following simple result. \begin{Lemma} \label{veronsedepth} The following conditions are equivalent: \begin{enumerate} \item[(a)] $I_{\ab,n,d}=0$. \item[(b)] {\em (i)} $a_i<0$ for some $i$, or {\em(ii)} $\sum_{i=1}^na_i<d$, or {\em(iii)} $d<0$. \end{enumerate} \end{Lemma} \begin{proof} (b) $\Rightarrow$ (a) is obvious. (a) $\Rightarrow$ (b) Assume that $d, a_i\geq 0$ for all $i$, and $\sum_{i=1}^na_i\geq d$. Let $t$ be the smallest integer such that $\sum_{i=1}^ta_t\geq d$. Then $x_1^{a_1}\cdots x_{t-1}^{a_{t-1}}x_t^r\in I_{\ab,n,d}$, where $r=d-\sum_{i=1}^{t-1}a_i\leq a_t$, a contradiction. \end{proof} \medskip In the following theorem we give a formula for $\sat(I_{\ab,n,d})$. We assume that $\sum_{i=1}^na_i\geq d$ and $a_n\geq 0$, because otherwise $I_{\ab,n,d}=0$. We also assume that $n>1$. Because if $n=1$, then $\sat((x_1^d))=d$, and nothing is to prove. \begin{Lemma} \label{colonveronese} For any Veronese ideal $I_{\cb,n,g}$ with $\cb=(c_1,\ldots,c_n)$ and $c_1\geq c_2\geq \cdots\geq c_n$, we have \[ I_{\cb,n,g}:\mm=I_{\cb,n,g}+I_{\cb-\eb,n, g-1}, \] where $\eb=(1,1,\ldots,1)$. In particular, $J_1(I_{\cb,n,g})=I_{\cb-\eb,n, g-1}$. \end{Lemma} \begin{proof} If $I_{\cb,n,g}=0$, then $I_{\cb-\eb,n, g-1}=0$ by Lemma~\ref{veronsedepth}. Assume now that $I_{\cb,n,g}\neq 0$. Then $g, c_i\geq 0$ for all $i$, and $\sum_{i=1}^nc_i\geq g$, by Lemma~\ref{veronsedepth}. If $g=0$, then $I_{\cb-\eb,n, g-1}=0$ and $I_{\cb,n,g}=(1)$, and the assertion is trivial. Now we assume that $g\geq 1$. The inclusion $I_{\cb,n,g}+I_{\cb-\eb,n, g-1}\subseteq I_{\cb,n,g}:\mm$ is obvious. Conversely, let $v\in G(I_{\cb,n,g}:\mm)\setminus I_{\cb,n,g}$, Since $I_{\cb,n,g}$ is $\cb$-bounded strongly stable, Theorem~\ref{d-1} implies that $\deg(v)=g-1$ and $\Deg(v)\leq\cb-\eb$. Therefore, $v\in I_{\cb-\eb,n,g-1}$. Notice that $I_{\cb,n,g}+J_{1}(I_{\cb,n,g})=I_{\cb,n,g}:\mm=I_{\cb,n,g}+I_{\cb-\eb,n,g-1}$. Since $I_{\cb,n,g}$ has a $g$-linear resolution, we get $J_1(I_{\cb,n,g})$ is generated in degree $g-1$. It follows that $J_1(I_{\cb,n,g})=I_{\cb-\eb,n, g-1}$. \end{proof} \begin{Theorem} \label{satveronese} Let $I_{\ab,n,d}$ be a Veronese type ideal with $n>1$, $d\geq 0$, $a_1\geq a_2\geq \cdots \geq a_n\geq 0$ and $\sum_{i=1}^na_i\geq d$. Then \begin{enumerate} \item[(a)] for all $\ell\geq 0$, $J_{\ell}(I_{\ab,n,d})=I_{\ab-\ell\eb,n,d-\ell}$; \item[(b)] $\sat(I_{\ab,n,d})=\min\bigg\{\bigg\lfloor \frac{\sum\limits_{i=1}^{n}a_i-d}{n-1}\bigg\rfloor, a_n, d\bigg\}$. \end{enumerate} where $\lfloor a\rfloor$ is the largest integer less than or equal to $a$. \end{Theorem} \begin{proof} We prove (a) by induction on $\ell$. For $\ell=0$, the assertion is trivial. Next let $\ell>1$. By induction hypothesis, $J_{i}(I_{\ab,n,d})=I_{\ab-i\eb,n,d-i}$ for $i=0,\ldots, \ell-1$. Since each $I_{\ab-i\eb,n,d-i}$ has $(d-i)$-linear resolution, we may apply Lemma~\ref{jk}(d), and together with Lemma~\ref{colonveronese} we obtain \[ J_{\ell}(I)=J_1(J_{\ell-1}(I))=J_1(I_{\ab-(\ell-1)\eb)\eb,n,d-(\ell-1)})=I_{\ab-\ell\eb,n,d-\ell}. \] (b) By Lemma~\ref{jk}(b), we know $\sat(I_{\ab,n,d})=\max\{\ell\:\; J_\ell(I_{\ab,n,d})\neq 0\}$. It follows from (a) and Lemma~\ref{veronsedepth} \begin{eqnarray*} \sat(I_{\ab,n,d})&=&\max\{\ell\:\; I_{\ab-\ell\eb,n,d-\ell}\neq 0\}\\ &=&\max\{\ell\:\; a_n-\ell\geq 0\ \text{and}\ d-\ell\geq 0\ \text{and}\ \sum_{i=1}^n(a_i-\ell)\geq d-\ell \}\\ &=&\max\{\ell\:\; \ell\leq a_n\ \text{and}\ \ell\leq d\ \text{and}\ \ell\leq \frac{\sum_{i=1}^na_i-d}{n-1} \}\\ &=&\min\bigg\{\bigg\lfloor \frac{\sum\limits_{i=1}^{n}a_i-d}{n-1}\bigg\rfloor, a_n, d\bigg\}. \end{eqnarray*} \end{proof} \begin{Corollary} \label{satveronese} Let $I_{\ab,n,d}$ be a Veronese type ideal with $n>1$, $d\geq 0$, $a_1\geq a_2\geq \cdots \geq a_n\geq 0$ and $\sum_{i=1}^na_i\geq d$. Then for any $k$ \[ \sat((I_{\ab,n,d})^k)=\min\Bigg\{\bigg\lfloor \frac{(\sum\limits_{i=1}^{n}a_i-d)k}{n-1} \bigg\rfloor,ka_n,kd\Bigg\}. \] \end{Corollary} \begin{proof} By \cite[Lemma 5.1]{HRV}, we obtain that $(I_{\ab,n,d})^k=I_{k\ab,n,kd}$, the desired statements follow from Theorem \ref{satveronese}. \end{proof} \medskip \begin{Remark}{\em The product of two $\cb$-bounded Veronese type ideals is not necessarily a $\cb$-bounded Veronese type ideal. For example, let $\ab=(3,3,1,2)$, $\bb=(2,2,0,1)$, $\cb=\ab+\bb=(5,5,1,3)$, $d_1=6$, $d_2=5$, $d_3=d_1+d_2=11$ and $n=4$. Then \begin{eqnarray*} I_{\ab,n,d_1}\!&\!=\!&\!(x_1^3x_2^3,x_1^3x_2^2x_3,x_1^2x_2^3x_3,x_1^3x_2^2x_4, x_1^2x_2^3x_4,x_1^3x_2x_3x_4,x_1^2x_2^2x_3x_4,x_1x_2^3x_3x_4, x_1^3x_2x_4^2,\\ & &x_1^2x_2^2x_4^2,x_1x_2^3x_4^2,x_1^3x_3x_4^2,x_1^2x_2x_3x_4^2,x_1x_2^2x_3x_4^2,x_2^3x_3x_4^2),\\ I_{\bb,n,d_2}&=&(x_1^2x_2^2x_4). \end{eqnarray*} It follows that \begin{eqnarray*} I_{\ab,n,d_1}\cdot I_{\bb,n,d_2}&=&(x_1^5x_2^5x_4,x_1^5x_2^4x_3x_4,x_1^4x_2^5x_3x_4, x_1^5x_2^3x_3x_4^2,x_1^4x_2^4x_3x_4^2,x_1^3x_2^5x_3x_4^2,x_1^5x_2^3x_4^3,\\ & &x_1^4x_2^4x_4^3,x_1^3x_2^5x_4^3,x_1^5x_2^2x_3x_4^3, x_1^4x_2^3x_3x_4^3,x_1^3x_2^4x_3x_4^3,x_1^2x_2^5x_3x_4^3,x_1^3x_2^5x_3x_4^2,\\ & &x_1^5x_2^4x_4^2,x_1^4x_2^5x_4^2). \end{eqnarray*} However \begin{eqnarray*} I_{\cb,n,d_3}&=&(x_1^5x_2^5x_3,x_1^5x_2^5x_4,x_1^5x_2^4x_3x_4,x_1^4x_2^5x_3x_4, x_1^5x_2^3x_3x_4^2,x_1^4x_2^4x_3x_4^2,x_1^3x_2^5x_3x_4^2,x_1^5x_2^3x_4^3,\\ & &x_1^4x_2^4x_4^3,x_1^3x_2^5x_4^3,x_1^5x_2^2x_3x_4^3, x_1^4x_2^3x_3x_4^3,x_1^3x_2^4x_3x_4^3,x_1^2x_2^5x_3x_4^3,x_1^3x_2^5x_3x_4^2,x_1^5x_2^4x_4^2,\\ & &x_1^4x_2^5x_4^2). \end{eqnarray*} } \end{Remark} \medskip A function $f: \mathbb{Q}\to \mathbb{Q}$ is called {\em quasi-linear}, if there exists an integer $m\geq 1$ and for each $i=0, \ldots, m-1$, a linear function $f_i(x)=p_ix+q_i$ with $p_i, q_i\in \mathbb{Q}$ such that $f(k)=f_i(k)$ for $k\equiv i\ \mod m$. \medskip For Veronese type ideals, we can give concrete quasi-linear functions describing the saturation number of the powers. \begin{Theorem} \label{qusilear} Let $I_{\ab,n,d}$ be a Veronese type ideal with $n>1$, $d\geq 0$, $a_1\geq a_2\geq \cdots \geq a_n\geq 0$ and $\sum_{i=1}^na_i\geq d$. Let $\sum\limits_{i=1}^{n}a_i-d=s(n-1)$ with $s\in\QQ$ and $t=\min\{ s, a_n, d\}$. \begin{enumerate} \item[(a)]If $t=s$, then $\sat((I_{\ab,n,d})^k)=p_ik+q_i$ where $p_i=s$, $q_i=\lfloor si\rfloor-si$. \item[(b)]If $t=a_n$, then $\sat((I_{\ab,n,d})^k)=a_nk$. \item[(c)] If $t=d$, then $\sat((I_{\ab,n,d})^k)=dk$. \end{enumerate} \end{Theorem} \begin{proof} (a) If $t=s$, then $s\leq \min\{a_n,d\}$. Thus $ks\leq \min\{ka_n,kd\}$. It follows that $\lfloor ks\rfloor \leq \min\{ka_n,kd\}$. By Corollary \ref{satveronese}, we obtain $$\sat((I_{\ab,n,d})^k)=\lfloor ks\rfloor.$$ Let $k\equiv i\ \mod(n-1)$, then $k=(n-1)\ell+i$ with $0\leq i <n-1$. It follows that \[ ks=s(n-1)\ell+si=(\sum\limits_{i=1}^{n}a_i-d)\ell+si, \] Hence \begin{eqnarray*} \lfloor ks\rfloor&=&(\sum\limits_{i=1}^{n}a_i-d)\ell+\lfloor si\rfloor=(\sum\limits_{i=1}^{n}a_i-d)\frac{k-i}{n-1}+\lfloor si\rfloor\\ &=&\frac{\sum\limits_{i=1}^{n}a_i-d}{n-1}(k-i)+\lfloor si\rfloor=s(k-i)+\lfloor si\rfloor\\ &=&sk+\lfloor si\rfloor-si. \end{eqnarray*} Choose $p_i=s$, $q_i=\lfloor si\rfloor-si$, we have $\sat((I_{\ab,n,d})^k)=p_ik+q_i$. (b) If $t=a_n$, then $a_n\leq \min\{s,d\}$. It follows that $ka_n\leq \min\{ks,kd\}$. By Corollary \ref{satveronese}, $\sat((I_{\ab,n,d})^k)=a_nk$. (c) If $t=d$, then $d\leq \min\{s,a_n\}$. It follows that $kd\leq \min\{ks,ka_n\}$. By Corollary~\ref{satveronese}, $\sat((I_{\ab,n,d})^k)=dk$. \end{proof}
\section{Introduction} Coarse-grained (CG) representations of macromolecular liquids have gained widespread interest because of their ability to represent large-scale properties of systems that cannot be investigated by atomistic scale simulations because of their large size and long timescales~\cite{Clark2013,Renevey2017}. Among coarse-grained models, core-softened (CS) potentials (characterized by having two preferred particle-particle separations) have been attracting attention due to their connections with the anomalous behavior of liquid systems including water. They show a variety of shapes: they can be ramp-like~\cite{Jagla1999} or continuous shoulder-like~\cite{Evy2011,Formin2011,Ney2009,jonatan2010}. Despite their simplicity, these models originate from the desire of constructing a simple two-body isotropic potential capable of describing the complicated features of systems interacting via anisotropic potentials~\cite{birnbaum2013,kaplan2006}, and are able to reproduce waterlike anomalies in qualitative way if competition exists between the two characteristic distances~\cite{Galo2016,Vilaseca2011}. If the energy penalty to the particle moves from one scale to another is higher than the particle kinetic energy, then the particle will get trapped in one length scale, and there will be no competition. As a consequence, there will be no anomalous behavior. This procedure generates models that are analytically tractable and computationally less expensive than the atomistic models. Moreover, they are lead to conclusions that are more universal and are related to families of atomistic systems~\cite{Tsuchiya1991}. The study of chemical building blocks as amphiphilic molecules, colloids and nanoparticles have attracted much attention in soft matter physical chemistry in recent years due their properties of self-assembly \cite{Sacanna2013,Pham2015,Preisler2013, Kumar17}. When in water solution, these large molecules agglomerate. In order to circumvent this phase separation, one the most important practical methods for stabilizing colloids is by coating the particle with a polymers layers~\cite{jones2002,witten2004}. These polymer-grafted nanoparticles (GNPs), composed of an inorganic core and a grafted layer of polymer chains possess new intriguing electrical conductivity, optical and visco-elastic properties~\cite{Chremos2016,Chevigny2011,Ganesan2014,Sunday2015,Talapin2010} not present in the non coated system. The generated self-assembled structures have applications in medicine, self-driven molecules, catalysis, photonic crystals, stable emulsions, biomolecules and self-healing materials~\cite{Zhang2015}. Experiments~\cite{Lokupitiya2016} and simulations~\cite{Lindquist2017,Schwanzer2016} showed that in the case of spherical colloids the mechanism behind the formation of these distinct patterns is the presence of competitive interactions. These competing forces can appear from the combination of a short range attraction of the core and a long-range repulsion~\cite{Shukla2008} of the grafted polymers~\cite{BoK15,Bok16b,Bordin16, Bordin18a,Bordin18b,Bordin19d}. The objective of our work is to analyze the structural, thermodynamic and dynamic behavior of 2D polymer-grafted nanoparticle systems through effective potentials in light of molecular dynamics. Particularly, we are interested in how the specificity of the grafted polymers structure can affect the macroscopic morphology and dynamical behavior of these systems when absorbed in large surfaces or when assembled in quasi 2D solid-liquid interfaces~\cite{Volk19}. One of the characteristics of grafted nanoparticles is that by adding appropriated reactive groups in their surface, it is possible to design new materials. In particular polymers can be adsorbed to the nanoparticle core by fully or partially coating the surface. In the case of partially coated, the polymers are free to rotate at the nanoparticle surface. If the polymers are grafted to the surface by a reactive group or by the polymerization they can not rotate~\cite{Hore19}. Here we address the question of how the two types of attachments affect the phase behavior of the nanoparticle solution. We adopt two complementary strategies. We model the systems using a CG approach in which the chemical interactions are represented by classical interactions. Based in this CG model, we derive effective potentials for the two cases: polymers are pinned to a reactive group, and polymers grafted to the surface. CG models have been used as a powerful tool to explore rather complex systems~\cite{Lafitte14, Song17}. The additional simplification of using effective potentials not only allow for exploring the complete pressure versus temperature phase diagram with a low computational cost but also is able to focus in the physical mechanism behind the different degrees of freedom of free and non free cases. The remaining of the paper is organized as follows: in section 2 we discuss the model and details of the simulation. In section 3 the results and the main discussions; in section 4, the conclusions are listed. \section{The model and simulation details} Here we employ two complementary approximations to describe the polymer-grafted nanoparticles phase diagram: a coarse grained model and an effective core-softened potential. \subsection{The Coarse-Grained (CG) Model} We employ a two dimensional coarse-grained model proposed in previous works~\cite{Ackora09, Hong12, Lafitte14} to describe a polymer-grafted nanoparticles interactions. Each core-shell nanoparticle is composed of a central disk with diameter $\sigma_{core}$ and with 4 linear oligomer attached chains. Each chain consists of 3 beads with diameter $\sigma_{bead}$, connected by an harmonic bond \begin{equation} U_{bond}(r_{ij}) = k\left( r_{ij} - \sigma_{bead} \right) \end{equation} \noindent with $k = 5000$ in reduced LJ units. The bead-bead (bb) interaction is modeled by the standard Lennard Jones (LJ) potential \begin{equation} U_{bb}(r_{ij})=4\epsilon \left [\left (\frac{\sigma}{r_{ij}} \right )^{12} - \left (\frac{\sigma}{r_{ij}} \right )^{6} \right ] - U_{LJ}(r_{cut}) \end{equation} \noindent where $r_{cut} = 2.5\sigma_{mon}$ and $\epsilon = \epsilon_{core}/9.0$. For the core-core (cc) interaction was used a 14-7 LJ potential, \begin{equation} U_{cc}(r_{ij})=4\epsilon_c \left [\left (\frac{\sigma_{core}}{r_{ij}} \right )^{14} - \left (\frac{\sigma_{core}}{r_{ij}} \right )^{7} \right ] - U_{cc}(r_{cut}) \end{equation} \noindent where $r_{cut} = 2.5\sigma_{core}$. Finally, the core-bead (cp) interaction if give by a 13.5-6.5 LJ potential, \begin{equation} U_{cp}(r_{ij})=4\epsilon_{cp} \left [\left (\frac{\sigma_{cp}}{r_{ij}} \right )^{13.5} - \left (\frac{\sigma_{cp}}{r_{ij}} \right )^{6.5} \right ] - U_{cp}(r_{cut}) \end{equation} \noindent where $\sigma_{cp}$ and $\epsilon_{cp}$ are obtained by the well-known Lorentz-Berthelot combining rules. The first bead in the polymer chain is connected to the central core by a rigid bond~\cite{Ryc77}. Two cases of grafted NP were considered. In the first one the polymers are held fixed in the core surface with a separation of 45$^o$ by the bend cosine square bond angle potential, \begin{equation} U_{bend} = \frac{k_{bend}}{2}[cos(\phi) - \cos(\phi_0)]^2 \end{equation} \noindent with $k_{bond}$ = 50 and $\phi_0 = \pi/4$. In the second case no bending potential was applied, and the polymers are free to rotate around the central colloid. Both structures are illustrated in the figure~\ref{fig:coarse-grained-particles}. \begin{figure}[htb] \centering \includegraphics[width=12cm]{CG_model_schematic.png} \caption{Schematic depiction of the CG nanoparticles. (A) Nanoparticles with a bend potential that prevents the polymers of slide along the core surface and (B) nanoparticles without bend potential whose polymers are free to rotate along the core surface.} \label{fig:coarse-grained-particles} \end{figure} In order to simulate a small silica core we use in this work $\sigma_{core} = 1.4$ nm and $\epsilon_{core}/k_b = 10179$ K, as proposed by Lafitte and co-authors~\cite{Lafitte14}. The polymer beads have a diameter $\sigma_{bead} = 0.4$ nm and $\epsilon_{bead} = \epsilon_{core}/9.0$ and correspond to a ethoxy repeat unit~\cite{Hong12}. For simplicity, for now on this paper all physical quantities will be displayed in the standard LJ units. Distance, density of particles, time, pressure and temperature are given, respectively, by \begin{equation} r^*\equiv\frac{r}{\sigma_{core}}, \quad \rho^* \equiv \rho \sigma_{core}^3,\quad t^* \equiv t\left ( \frac{\epsilon_{core}}{m\sigma_{core}^2} \right )^{1/2}, \quad p^*\equiv \frac{p\sigma_{core}^3 }{\epsilon_{core}}, \quad and \quad T^*\equiv \frac{k_BT}{\epsilon_{core}}. \end{equation} \subsection{The Effective Core-Softened Potential} The effective core-softened (CS) potentials for the two polymer-grafted nanoparticles systems analyzed here were obtained as follows. Langevin Dynamics simulations using the ESPResSo package~\cite{espresso1, espresso2} were performed for the coarse-grained models (fixed and free beads). The two systems were analyzed in the $NVT$ ensemble for density $\rho^* = 0.25$ and temperature $T^* = 0.5$. These values were chosen to ensure that the coarse-grained models were both in the fluid state. \begin{figure} [htb] \centering \includegraphics[width=12cm]{CG-rdf.png} \caption{Radial distribution functions employed to obtain the effective interaction potential between NPs with polymers fixed (black squares) or free (red circles) to rotate. Both RDFs were obtained at the density of $\rho^* = 0.25$ and temperature $T^* = 0.5$.} \label{fig:coarse-grained-RDF} \end{figure} Then, the core-core radial distribution functions (RDF) for this state point for each fixed and free beads systems were computed as illustrated in the figure~\ref{fig:coarse-grained-RDF}. As we can see, the RDFs indicates a significant difference in the length scales occupancy. For the case of fixed polymers, black curve in the figure~\ref{fig:coarse-grained-RDF}, it is harder for the cores remain close to each other. As consequence, this NP has a higher occupancy in the second length scale (the polymer corona) and a smaller in the first length scale - the hard core. The opposite is observed in the red curve of the figure~\ref{fig:coarse-grained-RDF}, correspondent to NP with polymers free to rotate, where the cores can approximate easily, increasing the occupancy in the first length scale and decreasing in the second length scale. From these RDFs curves, using both the solution of the Ornstein-Zernike equation~\cite{head-gordon92} with integral equation approximation, the effective potentials for polymer-grafted nanoparticles with fixed and free beads were obtained~\cite{head-gordon92, yan08, Lafitte14}. The potentials were also obtained using the inverse-Boltzmann procedure~\cite{Alamarza04}. Essentially the same potentials were obtained by both methods. The polymer-grafted nanoparticles become represented by spherical particles interacting through these effective core-softened potentials as illustrated in figure~\ref{fig:core-softened-particles}. \begin{figure}[htb] \centering \includegraphics[width=6cm]{core-softened-particles.png} \caption{Schematic depiction of the effective nanoparticles. It has a central hard core (the red sphere) and a soft corona (the lighter red sphere).} \label{fig:core-softened-particles} \end{figure} Based in previous works~\cite{head-gordon92, yan08, Ney2009}, our effective potentials are composed by a short-range attractive Lennard Jones potential and three Gaussian terms, each one centered in $c_j$, with depth $h_j$ and width $w_j$: \begin{equation} U(r_{ij})=4\epsilon_{core} \left [\left (\frac{\sigma_{core}}{r_{ij}} \right )^{12} - \left (\frac{\sigma_{core}}{r_{ij}} \right )^{6} \right ]+ \sum_{j=1}^{3}h_jexp\left [ -\left ( \frac{r_{ij}-c_j}{w_j} \right )^2 \right ], \; . \end{equation} \noindent Here, $r_{ij} = |\vec r_i - \vec r_j|$ is the distance between two cores $i$ and $j$. The resulting potentials and fittings are shown in the figure~\ref{potentials} for case of NP with polymers fixed ($U_{fixed}$) or free ($U_{free}$) to rotate. The parameters correspondent to each case are given in the table \ref{table1}. \begin{figure}[htb] \centering \includegraphics[scale=0.6]{potentials} \caption{Core-softened potential for polymer-grafted nanoparticles with four monomers (a) fixed and (b) free to rotate around nanoparticle core. The red curve is the potential obtained by solving the Ornstein-Zernike equation, and the black curve is the LJ+Gaussian fit.} \label{potentials} \end{figure} \begin{table} \centering \setlength{\tabcolsep}{12pt} \begin{tabular}{c c | c c} \hline \multicolumn{2}{c|}{$\mathbf{U_{fixed}}$ \bf potential} & \multicolumn{2}{|c}{$\mathbf{U_{free}}$ \bf potential} \\ \hline Parameter & Value & Parameter & Value \\ \hline $h_1$ & 0.287379 & $h_1$ & -3.80084 \\ $c_1$ & 2.055295 & $c_1$ & 1.11192 \\ $w_1$ & 1.526922 & $w_1$ & 0.313324 \\ $h_2$ & 2.706034 & $h_2$ & 46.1324 \\ $c_2$ & 1.461441 & $c_2$ & 0.774361 \\ $w_2$ & 0.37436409 & $w_2$ & 0.191852 \\ $h_3$ & -0.0650439 & $h_3$ & 6.37621 \\ $w_3$ & 2.9884193 & $w_3$ & 0.192937 \\ $c_3$ & -0.4264772 & $c_3$ & 1.23615 \\ \hline \end{tabular} \caption{Parameters of the particle-particle potentials in reduced units.} \label{table1} \end{table} In the effective potentials is also clear the effect of the polymers mobility. When they are held fixed the energetic penalty for two NPs move from the further (or second) scale to the closer (or first) scale is higher than in the case when the polymers can rotate and expose one core to another. As consequence, the $U_{fixed}$ potential has a ramp-like shape, while the $U_{free}$ a short range attraction and a long range repulsion (SALR) shape. \subsection{Simulation Details for the Effective Potential} The systems consists of 800 disks with diameter $\sigma = \sigma_{core}$. Langevin Dynamics simulations were performed with a time step of $\delta t = 0.001$. Periodic boundary conditions were applied in both directions. We performed $5\times10^5$ steps to equilibrate the system. These steps were then followed by $2\times10^6$ steps for the results production stage. To ensure that the system was thermalized, the pressure, kinetic and potential energy were analyzed as function of time. The velocity-verlet algorithm was employed to integrate the equations of motion. The $NVE$ ensemble was employed for equilibration and $NPT$ ensemble for the production runs. The Langevin thermostat, with a damping parameter $\gamma = 1.0$, was employed to fixed the system temperature and the pressure was held fixed by the Nos\`e-Hoover barostat with a parameter 10$\delta t$. The simulations of the effective model were performed using the Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS) package~\cite{plimpton-jcp1995} and the $PT$, $T\rho$ and $P\rho$ phase diagrams for each potential were obtained. The dynamic anomaly was analyzed by the relation between the mean square displacement (MSD) and time, namely \begin{equation} \left \langle [r(t)-r(t_0)]^2 \right \rangle = \left \langle \Delta r^2(t) \right \rangle, \end{equation} where $r(t_0) = (x^2(t_0) + y^2(t_0))^{1/2}$ and $r(t) = (x^2(t) + y^2(t))^{1/2}$ denote the coordinate of the particle at a time $t_0$ and at a later time t, respectively. The MSD is related to the diffusion coefficient $D$ by\cite{allen2017} \begin{equation} D = \lim_{t\rightarrow \infty } \frac{\left \langle \Delta r^2(t) \right \rangle}{4t}. \end{equation} The structure of the fluid was analyzed using the radial distribution function (RDF) $g(r_{ij})$. In order to check if the system exhibits the density anomaly, the temperature of maximum density (TMD) was computed for different isobars in $T\rho$ diagram. The phase boundaries were defined analyzing the specific heat at constant pressure, $C_P$~\cite{allen2017},the system mean square displacement, the radial distribution function and the discontinuities in the density-pressure phase diagram. \section{Results and discussion} Here we analyze the thermodynamic and dynamic behavior of the system of polymer-grafted nanoparticles represented by the effective core-softened potentials generated for fixed and free beads systems. \subsection{Polymer-grafted nanoparticles with fixed polymers} The pressure versus temperature phase diagram obtained using the effective potential for the grafted nanoparticles with fixed polymers (see the potential in figure~\ref{potentials}(a)) is illustrated in figure~\ref{diagramPT_Uno}. Three solid structures were observed. At lower pressures, a hexagonal solid was obtained, as shown in the snapshot~\ref{diagramPT_Uno}(a). Increasing the pressure the system enters in the region were the anomalous behavior is observed - the waterlike anomalies which will be discussed next. A consequence of the anomalies in the phase diagram is the presence of a reentrant liquid phase and a transition from the well defined hexagonal lattice to an amorphous stripe-like structure. This ordered-disordered transition was observed in previous works where particles interact through two length potentials also known as the ramp-like potentials~\cite{Bok16a, Bok16b, Bordin18b}. In the previous works as here the anomalies arise from the competition between the two length scales. The figure~\ref{fig3} illustrated the density versus temperature for fixed pressure showing the maximum density, a water-like anomaly. \begin{figure}[htb] \centering \includegraphics[scale=0.6]{PT_Uno} \vspace{-1\baselineskip} \caption{left panel: Pressure versus temperature phase diagram of system with fixed polymers. The gray lines are the isochores,the black lines divide the distinct phases, I represents the hexagonal solid phase, the blue line indicates the TMD, the green and red lines are the maxima and minima in diffusion coefficient. Right panel: System snapshots for: (a) hexagonal solid($P^*=0.40$ and $T^*=0.05$); (b) amorphous solid($P^*=2.80$ and $T^*=0.10$); (c) honeycomb solid($P^*=5.00$ and $T^*=0.20$); (d) fluid ($P^*=5.00$ and $T^*=0.80$).} \label{diagramPT_Uno} \end{figure} \begin{figure} [htb] \includegraphics[scale=0.6]{rhoT_tmd} \caption{Temperature of Maxima Density for isobars between $P^*=1.10$ and $P^*=2.30$ from bottom to top.} \label{fig3} \end{figure} The effective model is obtained from the coarse-grained system using a radial distribution function for one specific temperature and pressure. This raises the question of how reliable is this approach to describe the system for many pressures and temperatures. In order to test how robust is the effective model, we performed additional simulations for the coarse-grained description of the polymer-grafted colloidal system in the region where the anomalous behavior in the effective model was observed. Then, new $NPT$ simulations of the CG system composed of 1000 NPs. Four points in the phase diagram were selected: (I) $T^* = $ 0.10 and $P^*$ = 1.0 (inside the hexagonal solid region of the effective model phase diagram), (II) $T^* = $ 0.10 and $P^*$ = 3.0 (inside the stripe solid region of the effective model phase diagram), (III) $T^* = $ 0.10 and $P^*$ = 4.0 (inside the honeycomb solid region of the effective model phase diagram) and (IV) $T^* = $ 0.20 and $P^*$ = 2.0 (inside the reentrant fluid phase of the effective model phase diagram). Figure~\ref{snapCGmodelfixed} illustrates these state points. The structures are similar to the obtained using the effective model, figure~\ref{diagramPT_Uno}. This indicates that the effective model was able to capture the proper behavior of the CG model phase diagram. \begin{figure}[htb] \begin{center} \includegraphics[width=08cm]{snaps-CGmodel-Ufixed.png} \end{center} \caption{Comparison between the patterns observed in the CG model and effect model.} \label{snapCGmodelfixed} \end{figure} One of the characteristics of systems interacting through two length scales potential as the potentials illustrated in the figure~\ref{potentials} is the presence of thermodynamic anomalies. The density anomaly is characterized by a maximum in the $\rho(T)$ curve along a isobar. For constant pressure as the temperature increases the density increases by making particles to rearrange from one length scale to the other. This can be also observed in the radial distribution function $g(r_{ij})$ which presents two peaks: one at the closest scale, $r_1$, and another at the furthest scale, $r_2$. Recently it has been suggested that a signature of the presence of TMD line would be given by the radial distribution function as follows: at fixed temperature, as the density is increased, the radial distribution function of the closest scale, g($r_1$), would increase its value, while the radial distribution function of the furthest scale, g($r_2$), would decrease~\cite{evy2013}. This can also be represented by the rule~\cite{franzese2010,Raposo2014}: \begin{equation} \Pi _{12}=\frac{\partial g(r) }{\partial \rho}\mid_{\rho_1} \times \frac{\partial g(r) }{\partial \rho}\mid_{\rho_2}<0 \;. \label{competition_tmd} \end{equation} The physical picture behind this condition is that, for a fixed pressure, as the temperature increases, particles that are located at the attractive scale, $r_2$, move to the repulsive scale, $r_1$ - the thermal effects, which occur up to a certain pressure threshold $P_{min}^*=0.90$. For pressures in range $0.90<P^*<3.00$, for a fixed temperature, as the pressure increases, particles exhibit the same offset between the potential length scales $r_1$ and $r_2$ - the pressure effects. Figure \ref{fig:rdfs_termal_effects} illustrate a typical radial distribution functions at fixed $T^*$ as $P^*$ is varied [(a) and (b)] and vice-verse [(c) and (d)]. \begin{figure}[htb] \centering \includegraphics[scale=0.7]{rdfs_Uno} \caption{Radial distribution function behaviour for pressure two values below the threshold and temperature variation ($P^*=0.40$ in (a) and $P^*=0.80$ in (b)) indicating thermal effects in this region. At bottom figures, RDF's for two fixed temperatures ($T^*=0.40$ in (c) and $T^*=0.80$ in (d)) and pressure variation inside range $0.90<P^*<3.00$ indicating pressure effects in TMD region.} \label{fig:rdfs_termal_effects} \end{figure} The regions identified by the radial distribution function as fulfilling the condition Eq. \ref{competition_tmd} are illustrated as red circles in figure \ref{tmd_and_rdf2}(a). The solid curve shows the TMD line. All the stable state points with density equal or higher the minimum density at the TMD line verify the relation $\Pi _{12}(\rho, T) < 0$. This result gives support to our assumption that the presence of anomalies is related to particles moving from the furthest scale, $r_2$, to closest length scale $r_1$. In addition it indicates that the two length scales in the effective potential are related to the core-core repulsion competing withe polymer-polymer attraction present in the coarse-grained potential. Another signature of anomalous fluids is the behavior of the the diffusion coefficient which increases with density. Figure \ref{diffusion_Uno} represents the diffusion coefficient versus pressure for different isotherms, showing that D in a certain range of temperatures and pressures increases with pressure. The minimum in the diffusion coincides with the melting line. This behavior of the diffusion and melting line is related to ordered - disordered transition and it was previously observed for ramp-like potentials in two dimensions~\cite{Bordin18b}. \begin{figure}[htb] \centering \includegraphics[scale=0.6]{diffusion_Uno} \caption{Diffusion coefficient versus pressure for (a) $T^*=0.05$ (black line), $T^*=0.10$ (red line), $T^*=0.15$ (blue line), $T^*=0.20$ (green line) and (b) $T^*=0.30$ (gray line), $T^*=0.40$ (magenta line), $T^*=0.50$ (orange line), $T^*=0.60$ (green line), $T^*=0.70$ (brown line).} \label{diffusion_Uno} \end{figure} \begin{figure}[htb] \centering \includegraphics[scale=0.6]{tmd_and_competition} \caption{(a) TMD line (red line) for distinct isobars in the effective model (b) Comparison of one $\rho(T)$ curve along the isobar $P^* = 2.0$ between the effective (black circles) and the CG model (red squares). }\label{tmd_and_rdf2} \end{figure} Finally in order to check if the CG model also shows anomaly, we run simulations along the isobar $P^* =2.0$. Figure~\ref{tmd_and_rdf2} (b) illustrates the density versus temperature for $P^* =2.0$ for both CG (red squares) and effective (black circles) potentials. The two behaviors are quite similar. This result indicates that our strategy to derive a simpler two length scales potential to describe a more sophisticated system obtaining some information about the origin of the anomaly is valid. \subsection{Polymer-Grafted nanoparticles with free nanoparticles} \begin{figure}[htb] \centering \includegraphics[scale=0.6]{PT_Uyes} \caption{left panel: Pressure temperature phase diagram of system which polymers are free to rotate. The gray dots are the simulated points. The lines divides the distinct phases, I is the hexagonal phase, II is the amorphous solid and the blue line is the TMD. right panel: System snapshots for (a) hexagonal solid ($P^*=0.40$ and $T^*=0.05$); (b) amorphous solid ($P^*=1.10$ and $T^*=0.10$) and (c) fluid ($P^*=1.10$ and $T^*=0.70$).} \label{diagramPT_Uyes} \end{figure} The pressure versus temperature phase diagram obtained using the effective potential for the grafted nanoparticles with free polymers is illustrated in figure~\ref{diagramPT_Uyes}. The phase behavior of the system is quite distinct when compared with the phase diagram for the system with fixed polymers. At low temperatures ($T^*\le 0.10$) , and for pressures up to $P^*=1.40$, the system is in a hexagonal solid phase. Increasing the temperature for $P^* < 0.12$, the system melts to a fluid phase, while in the range $0.12< P^* < 1.4$ there is a order-disordered transition in the solid structure, that changes from the hexagonal to amorphous. Both free and fixed polymers systems show a number of similarities in the phase space, here, however, we do not observe a reentrant fluid phase neither the honeycomb solid phase. Also, the solid-liquid separation line moves to higher temperatures. As consequence, the TMD line is smaller and no diffusion anomaly is present. The absence of diffusion anomaly when the system exhibits a TMD is not new. It arises in lattice systems in the presence of two length scales interactions depending of the balance between the two length scales~\cite{Szortyka09} and in confinement due the competition between the length scales and the confinement~\cite{BoK17}. In this case, it may be related to the fact that here there is no reentrant fluid region - as we saw, this two phenomena were correlated for the $U_{fixed}$ potential. \begin{figure}[htb] \centering \includegraphics[scale=0.6]{rhoT_Uyes} \caption{Density-temperature phase diagrams. (a) The color lines are the isobars from $P^*=0.10$ (bottom) to $P^*=1.70$(top). (b) The same diagram explaining the maximum density temperature (TMD) and the peaks in the specific heat at constant pressure (which coincide with the inflection points of the isobars with $P^*<1.00$.}\label{fig:lab} \end{figure} Usually the presence of the TMD, as shown in figure~\ref{fig:lab}, is related to a competition between the two length scales, as discussed earlier. However, some studies has shown that this same phenomena can occur in fluids without competitive scales, but just a weak softening of the interparticle repulsion can lead to anomalous behavior.~\cite{Prestipino10, Prestipino11}. \begin{figure}[htb] \centering \includegraphics[scale=0.7]{rdfs_Uyes} \caption{Radial distribution function behaviour for maintaining temperature fixed and varying pressure and vice-verse in order to verify relation between competition and structure. (a) $P^*=0.40$ and each curve is from one temperature. (b)$P^*=0.80$ analogously. (c) $T^*$ is fixed at $T^*=0.20$ and pressure is varying. (d)$T^*$ is fixed at $T^*=0.60$, analogously} \label{fig:rdfs_termal_Uyes} \end{figure} Therefore, unlike the previous case ($U_{fixed}$), it is not possible to establish the connection between structure and anomaly in density, as we can see in figure \ref{fig:rdfs_termal_Uyes}, which shows behaviour of RDF's by varying temperature (at fixed $P^*$) and pressure (at fixed $T^*$). This disconnection can also be analyzed taking into account that the unfilled points of the graph obey the relation between the migration of scales, and that , in turn, the TMD reaches all points (filled or not), it is concluded that, for this potential, it would not be the competition between the scales responsible for the density anomaly, as may seen in figure \ref{tmd_and_competition}. \begin{figure}[htb] \centering \includegraphics[scale=0.7]{rhoT_competition_Uyes} \caption{Density - temperature phase diagram confirming that's no relation between competition and structure. Filled symbols are dominated by thermal effects, and empty are those dominated by pressure effects. } \label{tmd_and_competition} \end{figure} \section{Summary and conclusions} In this work, a two dimensional system of polymer grafted nanoparticles is analyzed using large-scale Langevin Dymanics simulations. The use of effective core-softened potentials allow us to explore the complete system phase space. In this way, the $PT$, $T\rho$ and $P\rho$ phase diagrams for each potential were obtained The phase boundaries were defined analyzing the specific heat at constant pressure, the system mean square displacement, the radial distribution function and the discontinuities in the density-pressure phase diagram. Also, due the competition in the system we have observed the presence of water-like anomalies, such as the temperature of maximum density - in addition with a tendency of the TMD to move to lower temperatures (negative slope)- and the diffusion anomaly. It was observed different structural morphologies for each nanoparticle case. We observed that for the fixed polymers case the waterlike anomalies are originated by the competition between the potential characteristic length scales, while for the free to rotate case the anomalies arises due a smaller region of stability in the phase diagram and no competiton between the scales was observed. The main driving force for these different morphologies obtained is the competition between strong short-range attractions of the particle cores (the enthalpic gain upon the core-core aggregation) and long-range entropic repulsions of the grafted chains. \section{Acknowledgments} The authors thank the financial support from the Brazilian agencies FAPERGS and CNPq. TPON thanks the Coordena\c{c}\~ao de Aperfei\c{c}oamento de Pessoal de N\'ivel Superior (CAPES), Finance Code 001. The authors thank Prof. Alan Barros from Universidade Federal de Ouro Preto, Minas Gerais, Brazil, and Prof. Enrique Lomba from Instituto de Quimica Fisica Rocasolano, Madri, Spain, for computational time in cluster to run the effective model simulations.
\section{Introduction}\label{introduction} Jones and Alexander polynomials are two knot invariants which were defined initially by different tools, but can both be described from skein theory and also representation theory of the quantum group $U_q(sl(2))$ (\cite{RT}, \cite{ADO}). However, from the geometric perspective, the Alexander polynomial is well understood in terms of knot complements but there is an important open problem to describe the Jones polynomial by such means. Further on, categorifications for these two invariants provided by Khovanov homology and Heegaard Floer homology proved to be powerful tools, but which have different natures. It is an important problem to provide geometric type categorifications for the Jones polynomial and also to relate such theory to knot Floer homology (\cite{Ras}, \cite{D}, \cite{SM}). Bigelow \cite{Big} provided the first topological model for the Jones polynomial, as a graded intersection of submanifolds in configuration spaces, using the homological representations of braid groups introduced by \cite{Law}. They proved the invariance this model for the Jones polynomial using skein relations. In \cite{Cr} we constructed a graded intersection pairing in a configuration space, associated to a braid and taking values in the Laurent polynomial ring in two variables, which recovers the (coloured) Jones polynomial and (coloured) Alexander polynomial through specialisations of coefficients to polynomials in one variable. Based on this result, we pose the following question: which is the smallest ring in which this topological model provides link invariants? In this paper we show that it is necessary to quotient by a quadratic relation and in this case this construction provides a {\em topological model} for an {\em interpolation between Jones and Alexander polynomials}, constructed in a quotient of the Laurent polynomial ring by a quadratic relation. \subsection{Main result} For $n,m \in \mathbb N$, we consider $C_{n,m}$ to be the unordered configuration space of $m$ points in the $n$-punctured disc. We will construct two graded intersections in such configuration spaces in the punctured disc: $\Omega(\beta_n), \Omega'(\beta_n) \in \mathbb Z[x^{\pm1},d^{\pm 1}]$ for $\beta_n \in B_n$, which will be parametrised by the intersection points between two fixed Lagrangian submanifolds, graded in a certain way. The construction of the Lagrangians is done by fixing a collection of arcs/ circles in the punctured disc, taking their product and consider its image in the quotient to the unordered configuration space. In order to answer the problem coming from \cite{Cr}, we compute an example (Section \ref{S:3}) and remark that in order to obtain invariants from these topological models we should quotient the Laurent polynomial ring by a quadratic relation and work in this quotient (denoted by $\mathbb L$). Further on we proceed as follows. \begin{itemize} \item[•] We prove by {topological and homological techniques} that the intersection form $\Omega(\beta_n)$ becomes {invariant under the Markov moves in this quotient $\mathbb L$}, so it gives a {well defined link invariant}. \item[•] Then, we compute these two intersection forms $\Omega'(\beta_n)$ and $\Omega(\beta_n)$ in this quotient. \end{itemize} The main results that we we obtain are the following. \begin{itemize} \item[•] The open intersection form $\Omega'$ becomes an {\em interpolation between Jones and Alexander polynomials} given directly by a {\em graded intersection of two Lagrangians in a configuration space}, over the quotient ring $\mathbb L$. \item[•] We provide an {\em intrinsic homological construction of the Jones polynomial} and a {purely homological proof that it is a well-defined link invariant} (using the intersection $\Omega$). \item[•] Also, we obtain {\em general method for checking invariance under the Markov moves} of constructions based on {\em Lawrence type representations}. \end{itemize} \subsection{Description of the models} For the first intersection model, $\Omega(\beta_n)$, we start with $\mathscr S$ and $\mathscr T$ which are the Lagrangian submanifolds given by the collections of red arcs and green circles from the left hand side of figure \ref{IntroL}, in the configuration space of $n$ points in the $(3n)$-punctured disc. The second intersection pairing, $\Omega'(\beta_n)$, is constructed using the Lagrangian submanifolds encoded by the collections of red arcs and green circles from the right hand side of figure \ref{IntroL}, $\mathscr S'$ and $\mathscr T'$, seen in the configuration space of $n-1$ points in the $(3n-2)$-punctured disc. $$ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathscr S,\mathscr T \subseteq \text{Conf}_{n}(\mathscr D_{3n}) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathscr S',\mathscr T'\subseteq \text{Conf}_{n-1}(\mathscr D_{3n-2}) \ \ \ \ \ \ \ \ \ \ $$ \vspace{-10mm} \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.305]{Diffeotwo.pdf} \vspace{-3mm} \hspace{-10mm}\caption{Closed intersection $\Omega(\beta_n)$ \hspace{35mm} Open intersection $\Omega'(\beta_n)$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\label{IntroL} \end{figure} \end{center} \vspace{-10mm} We denote by $\mathbb I_{m}$ the trivial braid with $m$ strands. For the next part, we see the braid groups $B_{3n}$ and $B_{3n-2}$ as the mapping class groups of the $(3n)-$punctured disc and $(3n-2)-$punctured disc respectively. This will lead to two well-defined Lagrangians: $$(\beta_n\cup \mathbb I_{2n}) \ \mathscr S \subseteq C_{3n,n}; \ \ \ (\beta_n\cup \mathbb I_{2n-2}) \ \mathscr S' \subseteq C_{3n-2,n-1}$$ which are associated to a braid $\beta_n\in B_n$. We consider the sets of intersections: \begin{equation} I_{\beta_n}=(\beta_n \cup \mathbb I_{2n}) \mathscr S\cap \mathscr T; \ \ \ I'_{\beta_n}=(\beta_n \cup \mathbb I_{2n-2}) \mathscr S'\cap \mathscr T'. \end{equation} Then, we present two graded intersections, denoted by $\langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle$ and $\langle (\beta_n \cup \mathbb I_{2n-1}) \mathscr S', \mathscr T' \rangle$, which are parametrised by the set of intersection points between the above Lagrangians and graded using a local system, as presented in relation \eqref{int}. \begin{defn}(Graded intersections)\label{defn} Let us consider the following polynomials: $$\Omega(\beta_n)(x,d), \Omega'(\beta_n)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}],$$ which are defined from graded intersections using the Lagrangian submanifolds from picture \ref{IntroL}: \begin{equation} \begin{aligned} & \Omega(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n}{2}} \cdot d^{-n}\langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle\\ & \Omega'(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n-1}{2}} \cdot d^{-(n-1)}\langle (\beta_n \cup \mathbb I_{2n-1}) \mathscr S', \mathscr T' \rangle. \end{aligned} \end{equation} Here, $w(\beta_n)$ is the writhe of the braid $\beta_n$. We call $\Omega(\beta_n)(x,d)$ the graded intersection associated to the closed model and $\Omega'(\beta_n)(x,d)$ the graded intersection corresponding to the open model. \end{defn} We denote by $\tilde{J}(L)$ the normalised Jones polynomial and by $J(L)$ the un-normalised version of the Jones polynomial of the link $L$. In \cite{Cr}, we have proved that the open intersection model recovers the Jones and Alexander polynomials of the closure of the braid, through the following specialisations of coefficients: \begin{equation}\label{eq:1} \begin{aligned} &\Omega'(\beta_n)(x,d)|_{x=d^{-1}}=\tilde{J}(\hat{\beta}_n,x)\\ &\Omega'(\beta_n)|_{d=-1}=\Delta(\hat{\beta}_n,x). \end{aligned} \end{equation} Using that, we deduce that the closed intersection form recovers the Jones polynomial of the closure through the specialisation: \begin{equation} \begin{aligned} &\Omega(\beta_n)(x,d)|_{x=d^{-1}}=J(\hat{\beta}_n,x). \end{aligned} \end{equation} Let $\mathbb L:=\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right)$ and consider the quotient morphism: $$- : \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]\rightarrow \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right).$$ \vspace{-7mm} \begin{thm}(Invariant in the quotient ring)\label{THEOREM} The ring $\mathbb L$ is the largest quotient of $\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]$ such that the image of the intersection form $\Omega(\beta_n)$ in this quotient becomes a link invariant. More precisely, let us denote the image of the graded intersection in this quotient ring by: \begin{equation} \bar{\Omega}(\beta_n)(x,d) \in \mathbb Z[x^{\pm\frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right) \end{equation} Then $\bar{\Omega}(L)(x,d):=\bar{\Omega}(\beta_n)(x,d)$ is a well defined link invariant for an oriented link $L$ which is the closure of $\beta_n$. Also, if $\mathbb L'$ is a quotient of the Laurent polynomial ring in which $\Omega(\beta_n)$ becomes a link invariant then the quotient onto $\mathbb L'$ factors through $\mathbb L$. \end{thm} The proof of this result is topological. We use homological tools in order to prove that $\bar{\Omega}(\beta_n)$ is invariant under the two Markov moves. In the next part we want to understand this invariant, which takes values in the quotient of the Laurent polynomial ring. For the following part, we use algebraic arguments and, starting from the fact that the two intersection models recover Jones and Alexander polynomials, we conclude that in the quotient ring they have to be interpolations between these two invariants, as below. \begin{thm}(The closed intersection model as the Jones polynomial)\label{THEOREM3} \begin{equation} \bar{\Omega}(L)(x,d)=(d+1)\cdot \tilde{J}(L)(x) \text{ in } \mathbb L. \end{equation} \end{thm} \begin{thm}(The open intersection model interpolates between the Jones and Alexander polynomials)\label{THEOREM2} The open model gives a well defined invariant in the quotient, which is given by: \begin{equation} \bar{\Omega}'(L)(x,d)=\Delta(L)(x)+(d+1) \cdot \frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)} \text{ in } \mathbb L. \end{equation} \end{thm} \subsection{Further work} {\bf Categorifications} One motivation for this research direction concerns the description of geometrical type categorifications for Jones and Alexander polynomials and relations between them (such as spectral sequences \cite{Ras}, \cite{D}, \cite{SM}). We expect that there is a categorification procedure from the specialised open model $\bar{\Omega}'(L)_{d=-1}$ which gives knot Floer homology (for knots, the geometric supports of the Lagrangians from our picture are Heegaard diagrams). We are interested in studying this machinery directly at the interpolation level $\bar{\Omega}'(L)$ (over $\mathbb L$), where we have a grading for the intersection points given by two variables. In particular, we are interested in investigating the grading for this interpolation model, which is geometrically described as in section \ref{S:1}, and relating this to the grading from the Floer homology picture and certain gradings for possible geometrical categorifications for the Jones polynomial. {\bf Twisted invariants from Lawrence representations} This work is also part of a wider joint work with Fathi Ben Aribi (\cite{Fathi}) where we aim to define twisted invariants for knots starting from twisted Lawrence type representations. In section \ref{S:3} we see that the intersection form $\bar{\Omega}$ is given also by a {\em sum of traces of Lawrence representations} and we prove that this is in turn {\em invariant under Markov moves}. This provids a {\em method for checking Markov moves on constructions defined using Lawrence type representations}. This method is a starting point in this joint work, where we aim to check Markov moves for twisted versions of Lawrence representations. \subsection*{Structure of the paper} In Section \ref{S:1} we present the grading procedure and the construction of the two intersection models in the configuration space. Then, in Section \ref{S:2} we discuss the relation between these intersection models and two state sums of Lagrangian intersections, defined using pairings between Lawrence representations, from \cite{Cr2}. In Section \ref{S:3}, we compute the closed model $\Omega$ for the unknot and stabilised unknot and deduce that in order to have invariance we need a quadratic relation. Section \ref{S:4} is devoted to the proof of the invariance of the closed intersection $\Omega$ under the Markov moves (in the quotient ring). After that, in Section \ref{S:5} we show that these two models become interpolations of Jones and Alexander polynomials in the quotient. In the last section we compute the open intersection model for the trefoil knot and check that it is given by the above interpolation. \subsection{Acknowledgements} I would like to thank Rinat Kashaev very much for discussions concerning the form of these intersection models in the quotient ring and the conclusion that they are the above interpolations between Jones and Alexander polynomials. I acknowledge the support of SwissMAP, a National Centre of Competence in Research funded by the Swiss National Science Foundation. \section{Notations} We start with the quotient ring: \begin{equation} \mathbb L=\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right). \end{equation} \begin{rmk} Looking at $\mathbb L$ as an algebra over $\mathbb Z[x^{\pm\frac{1}{2}}]$, we have a basis given by: $$\{d^{i} \mid 0\leq i\leq 1\}.$$ In other words, the powers of $d$ which are bigger than $2$ can be expressed in terms of the above basis. For example, we have: \begin{equation}\label{relations} \begin{aligned} &d^{2}=x^{-1}d-d+x^{-1}\\ &d^3=(x^{-2}-x^{-1}+1)d+x^2-x^{-1}. \end{aligned} \end{equation} \end{rmk} \begin{notation}\label{ind} For a set of indices $\bar{i}=(i_1,...,i_n)$ where $i_1,...,i_n\in \{0,1\}$ we denote the symmetric set of indices by: \begin{equation} 1-\bar{i}:=(1-i_n,...,1-i_1). \end{equation} Also, we will change the coefficients for certain modules, using the following definition. \begin{notation}\label{N:spec} Let $R$ be a ring and consider $M$ an $R$-module which has a basis $\mathscr B$. We consider $S$ to be another ring and let us suppose that we have a specialisation of coefficients, given by a morphism: $$\psi: R \rightarrow S.$$ The specialisation of the module $M$ by the morphism $\psi$ is the following $S$-module: $$M|_{\psi}:=M \otimes_{R} S.$$ It will have a basis described by: $$\mathscr B_{M|_{\psi}}:=\mathscr B \otimes_{R}1 \in M|_{\psi}. $$ \end{notation} \end{notation} \begin{defn}(Specialisations of coefficients towards one variable)\label{N} We consider two specialisations of coefficients, given by: \begin{equation} \begin{aligned} \psi_{J}: \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/& \left((d+1)(dx-1) \right) \rightarrow \mathbb Z[x^{\pm \frac{1}{2}}]\\ &\psi_{J}(d)=x^{-1}; \psi_{J}(x)=x. \end{aligned} \end{equation} \begin{equation} \begin{aligned} \psi_{\Delta}: \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/&\left((d+1)(dx-1) \right)\rightarrow \mathbb Z[x^{\pm \frac{1}{2}}]\\ &\psi_{\Delta}(d)=-1; \psi_{\Delta}(x)=x. \end{aligned} \end{equation} \end{defn} We will use these two changes of coefficients $\psi_{J}$ and $\psi_{\Delta}$ in order to pass from the intersection form from the quotient ring in two variables $\mathbb L$ towards the Jones polynomial and Alexander polynomial respectively. \begin{figure}[H] \begin{center} \begin{tikzpicture} [x=1.2mm,y=1.4mm] \node (b1) at (44,0) {$\mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b5) at (0,0) {$\mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b4) at (22,15) {$\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right)$}; \node (s1) at (0,6) {$d=x^{-1}$}; \node (s2) at (44,6) {$d=-1$}; \draw[<-] (b1) to node [left,yshift=-2mm,font=\large]{$\psi_{\Delta}$} (b4); \draw[<-] (b5) to node [right,yshift=-2mm,font=\large] {$\psi_{J}$} (b4); \end{tikzpicture} \end{center} \end{figure} \section{Definition of the intersection forms}\label{S:1} For $n,m\in \mathbb N$ we consider the unordered configuration space of $m$ points in the $n$-punctured disc and denote it by $C_{n,m}:=\mathrm{Conf}_{m}(\mathscr D_{n}).$ We consider a collection of base points $d_1,...,d_m \in \mathscr D_n$ and the associated base point in the configuration space ${\bf d}=\{d_1,...,d_m\}\in C_{n,m}$. \vspace{-1mm} \begin{center} \begin{tikzpicture}[scale=0.95] \foreach \x/\y in {-0.3/2,2/2,4/2,2/1,2.5/1,3/1.06} {\node at (\x,\y) [circle,fill,inner sep=1pt] {};} \node at (-0.1,2.6) [anchor=north east] {$1$}; \node at (2.2,2.6) [anchor=north east] {$i$}; \node at (4.2,2.6) [anchor=north east] {$n$}; \node at (3,2) [anchor=north east] {$\sigma_i$}; \node at (2.2,1) [anchor=north east] {$\tiny \mathrm d_1$}; \node at (2.8,1) [anchor=north east] {$\tiny \mathrm d_2$}; \node at (3.6,1) [anchor=north east] {$\tiny \mathrm d_m$}; \node at (2.63,2.3) [anchor=north east] {$\wedge$}; \draw (2,1.8) ellipse (0.4cm and 0.8cm); \draw (1.9,1.8) ellipse (3.65cm and 1.65cm); \foreach \x/\y in {7/2,9/2,11/2,8.9/1,9.5/1,10/1.07} {\node at (\x,\y) [circle,fill,inner sep=1pt] {};} \node at (7.2,2.6) [anchor=north east] {$1$}; \node at (9.2,2.6) [anchor=north east] {$i$}; \node at (11.2,2.6) [anchor=north east] {$n$}; \node at (9.2,1) [anchor=north east] {$\tiny \mathrm d_1$}; \node at (9.8,1) [anchor=north east] {$\tiny \mathrm d_2$}; \node at (10.6,1) [anchor=north east] {$\tiny \mathrm d_m$}; \node at (9,1.5) [anchor=north east] {$\delta$}; \draw (9.4,1.8) ellipse (3.65cm and 1.65cm); \draw (9.5,1) arc[radius = 3mm, start angle= 0, end angle= 180]; \draw [->](9.5,1) arc[radius = 3mm, start angle= 0, end angle= 90]; \draw (8.9,1) to[out=50,in=120] (9.5,1); \draw [->](8.9,1) to[out=50,in=160] (9.25,1.12); \end{tikzpicture} \end{center} \begin{notation} We start with the abelianisation map $ab: \pi_1(C_{n,m}) \rightarrow H_1(C_{n,m})$. Then, for any for any $m\geq 2$ we have: \begin{equation*} \begin{aligned} H_1(C_{n,m}) \ & \simeq \ \ \ \ \mathbb Z^{n} \ \ \oplus \ \ \mathbb Z \\ & \hspace{6mm} \langle ab(\Sigma_i)\rangle \ \ \langle ab(\Delta)\rangle, \ {i\in \{1,...,n\}}. \end{aligned} \end{equation*} More specifically, the generators of the first group, $\mathbb Z^{n}$, are given by classes of loops defined by the property that their first component goes around one of the puncture $p_i$ and the other components are constant: $\Sigma_i(t):=\{ \left(\sigma_i(t), d_2,...,d_m \right) \}, t \in [0,1].$ The generator of the second group is the class of a loop $\Delta$ which swaps the first two base points: $\Delta(t):=\{ \left(\delta(t), d_3,...,d_m \right) \}, t \in [0,1].$ \end{notation} For the next part we fix $l \in \mathbb N$ such that $l \leq n$. We will continue with a morphism which distinguish between the $n$ punctures, by separating them into two sets: $n-l$ black punctures and $l$ blue punctures, as in figure \ref{Localsystem}. Further on, for orientation purposes, we also fix a number $k\in \{0,...,n-l\}$. \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.27]{Localsystem.pdf} \hspace{-10mm}\caption{Local system }\label{Localsystem} \end{figure} \end{center} \vspace{-8mm} \begin{defn}(Local system)\label{localsystem} For $l \in \{1,...,n\}$ and $k \in \{0,...,n-l\}$, we define the following morphism: \begin{equation} \begin{aligned} & \ \hspace{-6mm} \text{ab} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ f\\ \phi: \pi_1\left(C_{n,m} \right) \ \rightarrow \ & \ \mathbb Z^{n-l} \oplus \mathbb Z^{l} \oplus \mathbb Z \ \rightarrow \ \mathbb Z \ \oplus \mathbb Z \oplus \mathbb Z\\ & \langle [\sigma_i] \rangle \ \ \langle [\gamma_j]\rangle \ \ \langle [\delta]\rangle \ \ \ \ \langle x \rangle \ \ \langle y \rangle \ \ \langle d \rangle\\ &{i\in \{1,...,n-l\}}, j\in \{1,...,l\}\\ &\ \hspace{-28mm} \phi=f \circ ab. \end{aligned} \end{equation} Here, the morphism $f$ is defined as augmentations on the first two factors as follows: \begin{equation} \begin{cases} &f(\sigma_i)=x, i\in \{1,...,n-k-l\}\\ &f(\sigma_i)=-x, i\in \{n-k-l+1,...,n-l\}\\ &f(\gamma_j)=y, j\in \{1,...,l\}\\ &f(\delta)=d. \end{cases} \end{equation} \end{defn} \subsection{The open and closed intersection forms} In the next part we present the grading procedures that will be used for the definition of the two graded intersections. For $\Omega$, we will work in the setting from definition \ref{localsystem} where the ambient space and the parameters $n,l,k$ are: $$\Big(C_{3n,n}=\mathrm{Conf}_{n}(\mathscr D_{3n}), n\rightarrow 3n, l\rightarrow n, k\rightarrow n \Big).$$ For $\Omega'$ we will use the following data: $$\Big(C_{3n-2,n-1}=\mathrm{Conf}_{n-1}(\mathscr D_{3n-2}), n\rightarrow 3n-2, l\rightarrow n-1, k\rightarrow n-1 \Big).$$ The construction of the graded intersection $\Omega'$ is precisely the one presented in \cite{Cr}, for the case where the colour $N=2$. This is parametrised by the set of intersection points between the two Lagrangians: \begin{equation} I'_{\beta_n}:=(\beta_n \cup \mathbb I_{2n-1}) \mathscr S'\cap \mathscr T' \end{equation} together with a grading coming from a certain local system defined on the configuration space. For the closed model $\Omega$, the intersection will be defined in an analog manner, where we add one particle in our configuration space, as below. \subsubsection{Grading for $\Omega$} Let us fix $\beta_n \in B_n$. Using the property that the braid group is the mapping class group of the punctured disc, we act with such a braid (to which we add $2n$ trivial strands) on $\mathscr S$ and consider the submanifold: $$(\beta_n \cup \mathbb I_{2n}) \mathscr S \subseteq C_{3n,n}$$ We choose a representative of this action such that it is supported in a grey disk around the punctures labeled by $\{1,...,n\}$, and also such that the above submanifold is a Lagrangian submanifold, as discussed in \cite{Cr} Section 2.2. Further on, we define the graded intersection pairing, which is generated by the set of intersection points, denoted by: \begin{equation} I_{\beta_n}:=(\beta_n \cup \mathbb I_{2n}) \mathscr S\cap \mathscr T \end{equation} and graded by the above local system. The grading procedure will be done by associating to each intersection point $\bar{x}$ a loop $l_{\bar{x}}$ in the configuration space, which will be evaluated by the morphism $\phi$: $$x \in I_{\beta_n} \ \ \rightsquigarrow \ \ l_{\bar{x}} \ \ \rightsquigarrow \ \ \phi(l_{\bar{x}}).$$ In order to prescribe the loop, we use a base point which is chosen on the submanifold $\mathscr S$, and we denote it as ${\bf d}:=(d^1,...,d^{n})$, using picture \ref{Diffeo}. Let us denote by $s\mathscr S, s\mathscr T \subseteq \mathscr D_{3n}$ the collections of $n$ red curves and $n$ green circles which give the geometric supports for $\mathscr S$ and $\mathscr T$. \begin{defn}(Paths to the base points) For the next part, we fix a set of $n$ paths in the punctured disc which connect the red curves with the left hand side of the circles, as in figure \ref{Diffeo}, and denoted them by $\eta_1,...,\eta_{n}$. Similarly, we consider a collection of paths $\eta'_1,...,\eta'_{n}$ which start from the red curves and end on the right hand side of the circles.\end{defn} \vspace{-3mm} \begin{figure}[H] \centering \includegraphics[scale=0.4]{Diffeo.pdf} \vspace{-1mm} \caption{Braid action} \label{Diffeo} \end{figure} \begin{defn}(Loop associated to an intersection point) Let $\bar{x}=(x_1,...,x_{n}) \in I_{\beta_n}$. The loop, based in $\bf{d}$, will be constructed in two steps. For the first part, we fix $k \in \{1,...,n\}$ and use the $k^{th}$ green circle which goes around the punctures $(k, 2n+1-k)$. There is exactly one component of $\bar{x}$, denoted by $x_{\iota(k)}$, which belongs to this circle. If $x_{\iota(k)}$ is in the left hand side of the punctured disc, we define $\bar{\nu}^k$ to be the path (in the punctured disc) which starts from $d^k$ following $\eta_k$ and then continue on the green curve until it reaches the point $x_{\iota(k)}$, as in figure \ref{Picture1}. If $x_{\iota(k)}$ is on the right hand side of the punctured disc, then we do a similar procedure and define a path $\bar{\nu}^k$ by using the path $\eta'_k$ to begin with, and then go to the intersection point following part of the green circle. \begin{figure}[H] \centering \includegraphics[scale=0.4]{Pathsbasepoints.pdf} \caption{Paths from the base points}\label{Picture1} \end{figure} \vspace{-33mm} $$\eta_k \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \eta'_k \ \ \ \ \ \ \ \ \ \ $$ \vspace{20mm} \clearpage Doing this construction for all $k\in \{1,...,n\}$ we get a collection of $n$ paths in the punctured disc. Now we consider the path in the configuration space from $\bf d$ to $\bar{x}$ given by the union of these paths: \begin{equation} \bar{\gamma}_{\bar{x}}:= \{\bar{\nu}^1,...,\bar{\nu}^{n}\}. \end{equation} For the second part of the construction, we start from the components of $\bar{x}$ and we go back to the base points in the punctures disc using the red arcs. More precisely, each component $x_k$ of $\bar{x}$ belongs to a unique red arc, denoted by $j(k)$. Let $\nu_k$ be the path in the punctured disc starting in $x_k$ and ending in $d^{j(k)}$ following the $j(k)^{th}$ red curve. Now, we look at the path in the configuration space from $\bar{x}$ to $\bf{d}$ given by this collection of paths, and denote it as below: \begin{equation} \gamma_{\bar{x}}:= \{\nu^1,...,\nu^{n}\}. \end{equation} Now we define the loop associated to the intersection point $\bar{x}$ (base in $\bf d$) as the composition of the two previous paths: \begin{equation} l_{\bar{x}}:=\gamma_{\bar{x}} \circ \bar{\gamma}_{\bar{x}}. \end{equation} \end{defn} \subsection{Graded intersections} In this part we recall the definition of the graded intersection defined in \cite{Cr}. After that, we consider a smaller local system and use that to define the graded intersection which we use for the main result. \begin{defn}\label{D:int0} We consider a graded intersection $\ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg \ \in \mathbb Z[x^{\pm1},y^{\pm 1},d^{\pm 1}]$, which is parametrised by the intersection points and graded using the associated loops and the local system as below: \begin{equation}\label{int0} \ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg:= \sum_{\bar{x}\in I_{\beta_n}} \epsilon_{x_1}\cdot...\cdot \epsilon_{x_n}\cdot \phi(l_{\bar{x}}). \end{equation} In this formula $\epsilon_{x_i}$ is the sign of the local intersection between the circle and the red curve that $x_i$ belongs to, in the punctured disc. \end{defn} For the grading procedure that we need for this model, we will use a further quotient which is defined as follows: \begin{equation} \begin{aligned} F:~ & \mathbb Z[x^{\pm1},y^{\pm1},d^{\pm1}] \rightarrow \mathbb Z[x^{\pm1},d^{\pm1}]\\ & \hspace{-5mm}\begin{cases} F(x)=x; \\ F(y)=-d; F(d)=d. \end{cases} \end{aligned} \end{equation} \begin{defn}(Change of coefficients) Let us define the morphism $\tilde{\phi}$ which is obtained from $\phi$ but takes values in the group ring $\mathbb Z[\mathbb Z \oplus \mathbb Z \oplus \mathbb Z]\simeq \mathbb Z[x^{\pm1},y^{\pm1},d^{\pm1}]$ and the grading obtained from $\tilde{\phi}$ by taking the quotient using $F$: \begin{equation} \begin{aligned} &\varphi:\pi_1(C_{n,m})\rightarrow \mathbb Z[x^{\pm1},d^{\pm1}]\\ &\varphi=F \circ \tilde{\phi}. \end{aligned} \end{equation} \end{defn} \begin{defn}(Grading)\label{D:int} Let us define the following graded intersection: \begin{equation}\label{int} \begin{aligned} & \langle (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \rangle \in \mathbb Z[x^{\pm1},d^{\pm 1}]\\ &\langle (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \rangle:= \sum_{\bar{x}\in I_{\beta_n}} \epsilon_{x_1}\cdot...\cdot \epsilon_{x_{n}}\cdot \varphi(l_{\bar{x}}). \end{aligned} \end{equation} \end{defn} We remark that: \begin{equation*} \begin{aligned}\label{eq:2} \langle (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \rangle=&~F\left(\ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg\right)=\\ &=~\ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg |_{y=-d}. \end{aligned} \end{equation*} In the next part we use this graded intersection in order to define two intersection models: one which is associated to the total closure of a braid and another one which corresponds the closure which leaves the first strand open. \begin{center} $\mathscr S,\mathscr T \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathscr S',\mathscr T'$ \begin{figure}[H] \centering \includegraphics[scale=0.3]{Diffeotwo.pdf} \hspace{-10mm}\caption{Closed up intersection $\Omega(\beta_n)$ \hspace{30mm} Open intersection $\Omega'(\beta_n)$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\label{Openmodel} \end{figure} \end{center} \begin{defn}(Graded intersections)\label{defn} Let us consider the following polynomials: $$\Omega(\beta_n)(x,d), \Omega'(\beta_n)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}],$$ which are obtained from graded intersections coming from the the Lagrangian submanifolds form picture \ref{Openmodel}, and are given by the below formulas. \begin{equation} \begin{aligned} & \Omega(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n}{2}} \cdot d^{-n}\langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle\\ & \Omega'(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n-1}{2}} \cdot d^{-(n-1)}\langle (\beta_n \cup \mathbb I_{2n-1}) \mathscr S, \mathscr T \rangle. \end{aligned} \end{equation} We call $\Omega(\beta_n)(x,d)$ the graded intersection associated to the closed up model and $\Omega'(\beta_n)(x,d)$ the graded intersection corresponding to the open model. \end{defn} \section{Description of the closed and open graded intersections in terms of state sums}\label{S:2} In this part we present a different description of $\Omega(\beta_n)$ and $\Omega'(\beta_n)$, as a state sums of Lagrangian intersections following \cite{Cr}. \subsubsection{Homological representations}\label{homclasses} We will use the structure of certain Lawrence representations which are presented in \cite{Cr1} and \cite{CrM}. They are braid group representations on certain subspaces in the homology of a $\mathbb Z \oplus \mathbb Z$-covering of the configuration space $C_{n,m}$, which are generated by certain classes. For the following definitions we consider the parameter $l=0$. Let us look at the local system $\phi$ from definition \ref{localsystem}, where we replace the variable $d$ with a variable which we call $d'$ (this is for a sign reason that we will see later on), and denote it by $\phi'$. \begin{equation}\label{eq:23} \begin{aligned} \phi': \pi_1(C_{n,m}) \rightarrow \ & \mathbb Z \oplus \mathbb Z\\ & \langle x \rangle \ \langle d' \rangle\\ \end{aligned} \end{equation} Let $\tilde{C}_{n,m}$ be the $\mathbb Z \oplus \mathbb Z$-covering associated to $\phi'$. \begin{comment} \begin{itemize} \item[1)] Lawrence representations $H_{n,m}$ are $\mathbb Z[x^{\pm 1},d^{\pm 1}]$-modules that carry a $B_n$-action. \item[2)] Dual Lawrence representations $H^{\partial}_{n,m}$ which are $\mathbb Z[x^{\pm 1},d^{\pm 1}]$. \item[3)] Intersection pairing $ \lll, \ggg : H_{n,m} \otimes H^{\partial}_{n,m}\rightarrow \mathbb Z[x^{\pm 1},d^{\pm1}]$. \end{itemize} \end{comment} Let $w$ be a point on the boundary of the punctured disc and denote by $C_{w}$ the part of the boundary of the configuration space $C_{n,m}$ which is given by configurations containing $w$. Let $\bar{C}_{w}$ be the complement of $C_{w}$ in the boundary of the configuration space. Then, let $\pi^{-1}({w})$ be the part of the boundary of the covering $\tilde{C}_{n,m}$ given by the fiber over $C_{w}$. In the next part we consider part of the Borel-Moore homology of this covering which comes from the Borel-Moore homology of the base space twisted by the local system $\phi'$. \begin{prop}(\cite{Cr1}) Let $H^{\text{lf}}_m(\tilde{C}_{n,m},\pi^{-1}(w); \mathbb Z)$ be the Borel-Moore homology of the covering relative to part of the boundary given by $\pi^{-1}(w)$, which is a $\mathbb Z[x^{\pm1}, d'^{\pm1}]$-module via the group of deck transformations. Then there is a well defined braid group action which is compatible with the structure of a $\mathbb Z[x^{\pm1}, d'^{\pm1}]$-module: $$B_n \curvearrowright H^{\text{lf}}_m(\tilde{C}_{n,m},\pi^{-1}(x); \mathbb Z) \ (\text{as a }\mathbb Z[x^{\pm1}, d'^{\pm1}]\text{-module}).$$ \end{prop} \begin{notation} Let $H^{\partial}_{m}(\tilde{C}_{n,m}, \partial^{-}; \mathbb Z)$ the homology relative to the boundary of $\tilde{C}_{n,m}$ which is not in the fiber over $w$. \end{notation} \begin{prop}(\cite{CrM} Theorem E)\label{R:D} Let $H^{\text{lf}}_m(C_{n,m}, C_{w}; \mathscr L_{\phi})$ and $H_{m}(\tilde{C}_{n,m}, \bar{C}_{w}; \mathscr L_{\phi})$ be the Borel-Moore homology and the homology of the base space relative to the boundary, with coefficients in the local system associated to $\phi'$ (which we denote by $\mathscr L_{\phi}$). Then, we have natural injective maps, which are compatible with the braid group actions as below: \begin{equation} \begin{aligned} &\iota: H^{\text{lf}}_m(C_{n,m}, C_{w}; \mathscr L_{\phi})\rightarrow H^{\text{lf}}_m(\tilde{C}_{n,m}, \pi^{-1}({w});\mathbb Z)\\ &\iota^{\partial}: H_{m}(\tilde{C}_{n,m}, \bar{C}_{w}; \mathscr L_{\phi}) \rightarrow H^{\partial}_{m}(\tilde{C}_{n,m}, \partial^{-}; \mathbb Z). \end{aligned} \end{equation} \end{prop} \begin{notation}(Our homology groups)\label{R:1} We denote the images of the maps $\iota$ and $\iota^{\partial}$ by: \begin{equation} \begin{aligned} & H_{n,m}\subseteq H^{\text{lf}}_m(\tilde{C}_{n,m}, \pi^{-1}({w});\mathbb Z)\\ & H^{\partial}_{n,m}\subseteq H^{\partial}_{m}(\tilde{C}_{n,m}, \partial^{-}; \mathbb Z). \end{aligned} \end{equation} \end{notation} Also, let us consider the following set of partitions: \begin{equation} E_{n,m}=\{\bar{j}=(j_1,...,j_{n}) \mid j_1,...,j_{n} \in \mathbb Z, \ j_1+...+j_{n}=m \}. \end{equation} In the following part we consider a family of homology classes in the above homology groups, which will be given by lifts of submanifolds in the base configuration space. These submanifolds will be encoded by ``geometric supports'' which are collections of curves in the punctured disc. For this part, we fix $d_1,...,d_m$ on the boundary of the punctured disc and ${\bf d}:=(d_1,...,d_m)$ a base point in the configuration space. Moreover, let us fix $\tilde{\bf d}$ to be a lift of this base point in the covering $\tilde{C}_{n,m}$. \begin{defn}[Homology classes] Let $\bar{j}=(j_1,...,j_{n}) \in E_{n,m}$. The product of ordered configuration spaces on the geometric support from picture \ref{fig3}, whose number of particles is given by the partition $\bar{j}$, quotiented to the unordered configuration space $C_{n,m}$, gives a submanifold: $$\mathbb U_{\bar{j}}\subseteq C_{n,m}.$$ Then, in order to lift this submanifold in the covering, we will use ``paths to the base points'' which are collections of arcs in the punctured disc, from the base points towards the geometric support. More precisely, the collection of dotted paths from the base points towards the arcs from figure \ref{fig3} gives a path in the configuration space $\eta_{\bar{j}}$ from $\bar{d}$ to $\mathbb U_{\bar{j}}$. Then we lift this path to a path $\tilde{\eta}_{\bar{j}}$ through the base point $\tilde{\bf{d}}$. Now, we lift the submanifold $\mathbb U_{\bar{j}}$ to a submanifold $\tilde{\mathbb U}_{\bar{j}}$ through $\tilde{\eta}_{\bar{j}}(1)$. We consider the homology class given by this submanifold and denote it by: \begin{equation} \mathscr U'_{j_1,...,j_{n}}:=[\tilde{\mathbb U}_{\bar{j}}] \in H_{n,m}. \end{equation} \end{defn} \begin{figure}[H] \begin{center} \begin{tikzpicture}\label{pic'} [x=50 mm,y=10mm,font=\large] \foreach \x/\y in {-1.2/2, 0.4/2 , 1.3/2 , 2.5/2 , 3.6/2 } {\node at (\x,\y) [circle,fill,inner sep=1.3pt] {};} \node at (-1.2,2) [anchor=north east] {$w$}; \node at (0.6,2.5) [anchor=north east] {$1$}; \node at (0.2,1.65) [anchor=north east] {$\color{black!50!red}\eta^{\bar{j}}_1$}; \node at (1.5,1.6) [anchor=north east] {$\color{black!50!red} \eta^{\bar{j}}_{j_1}$}; \node at (3.7,1.7) [anchor=north east] {$\color{black!50!red} \eta^{\bar{j}}_{m}$}; \node (dn) at (8.3,1.5) [anchor=north east] {\large \color{black!50!red}$\eta_{\bar{j}}=(\eta^{\bar{j}}_1,...,\eta^{\bar{j}}_m)$}; \node at (2,5.2) [anchor=north east] {\Large \color{black!50!red}$\tilde{\eta}_{\bar{j}}$}; \node at (4.3,2.5) [anchor=north east] {n}; \node at (0.8,0.8) [anchor=north east] {\bf d$=$}; \node at (0.8,4.4) [anchor=north east] {\bf $\bf \tilde{d}$}; \node at (0.3,2.6) [anchor=north east] {$\color{black!50!red}\text{Conf}_{j_1}$}; \node at (3.6,2.6) [anchor=north east] {$\color{black!50!red}\text{Conf}_{j_{n}}$}; \node at (2.1,3) [anchor=north east] {\Large{\color{black!50!red}$\mathbb U_{\bar{j}}$}}; \node at (2.1,6.2) [anchor=north east] {\Large{\color{black!50!red}$\tilde{\mathbb U}_{\bar{j}}$}}; \node at (-2.5,2) [anchor=north east] {\large{$C_{n,m}$}}; \node at (-2.5,6) [anchor=north east] {\large{$\tilde{C}_{n,m}$}}; \draw [very thick,black!50!red,-][in=-160,out=-10](-1.2,2) to (0.4,2); \draw [very thick,black!50!red,->] [in=-158,out=-18](-1.2,2) to (3.6,2); \draw[very thick,black!50!red] (2.82, 5.6) circle (0.6); \draw (2,2) ellipse (3.25cm and 1.35cm); \draw (2,5.4) ellipse (3cm and 1.11cm); \node (d1) at (1.3,0.8) [anchor=north east] {$d_1$}; \node (d2) at (1.9,0.8) [anchor=north east] {$d_{j_1}$}; \node (dn) at (2.8,0.8) [anchor=north east] {$d_m$}; \draw [very thick,dashed, black!50!red,->][in=-60,out=-190](1.2,0.7) to (-0.2,1.9); \draw [very thick,dashed,black!50!red,->][in=-70,out=-200](1.3,0.7) to (0,1.9); \draw [very thick,dashed,black!50!red,->][in=-90,out=0](2.5,0.7) to (3,1.8); \draw [very thick,dashed,black!50!red,->][in=-70,out=-200](0.8,4.4) to (3,5); \end{tikzpicture} \end{center} \vspace{-6mm} \caption{Generators for the homology group $H_{n,m}$} \label{fig3} \end{figure} \begin{prop}[Version of the Lawrence representation]\label{gen} Following \cite{CrM}, this set of homology classes: \begin{equation} \mathscr{B}_{H_{n,m}}=\{ \mathscr U'_{j_1,...,j_{n}} \mid j_1,...,j_{n} \in \mathbb N, j_1+...+j_{n}=m\} \end{equation} forms a basis for $H_{n,m}$ and there is a braid group action, denoted by: $$L_{n,m}: B_n\rightarrow \mathrm{Aut}_{\mathbb Z[x^{\pm 1},d^{\pm 1}]}\left(H_{n,m}\right).$$ We called this the Lawrence representation. \end{prop} \begin{prop}(\cite{CrM}) There is a well defined intersection pairing between the two homology groups as follows: $$\lll \ , \ \ggg:H_{n,m} \otimes H_{n,m}^{\partial}\rightarrow \mathbb Z[x^{\pm 1}, d^{\pm 1}].$$ In this formula $d$ should be thought as $-d'$ and we make this change for computational reasons, as we will see below. \end{prop} This intersection pairing is defined at the level of homology groups, but it can be computed using the geometric supports, the paths to the base points and the local system, in the base configuration space. The precise formula is presented in \cite{Cr1} Proposition 4.4.2. For homology classes which are given by lifts of the geometric supports that we will work with, the formula for the pairing $\lll , \ggg$ at the homological level is actually the same formula as the one for the graded intersection $\ll , \gg$ from definition \ref{int0} in the situation where $l=0$. \subsubsection{Our context} Now we present a way to see our Lagrangian intersection through a state sum of intersection pairings between homology clsses belonging to these homology groups. This is based on two Theorems from \cite{Cr}, which we remind below. Let us fix $n\in \mathbb N$. \subsubsection{Open model} First, we work with the configuration space $C_{2n-1,n-1}$ and the associated homology groups, where the parameter $k=n-1$. For any multi-index $\bar{i}=(i_1,...,i_{n-1}), i_k \in \{0,1\}, k\in \{1,...,n-1\}$ we look at the two homology classes $\mathscr F'_{\bar{i}} \in H_{2n-1,n-1}, \mathscr L'_{\bar{i}}\in H^{\partial}_{2n-1,n-1}$ obtained by the lifts of the geometric supports together with the paths to the base points from the picture below: \begin{center} ${\color{red} \mathscr F'_{\bar{i}} \in H_{2n-1,n-1}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\color{dgreen} \mathscr L'_{\bar{i}}\in H^{\partial}_{2n-1,n-1}}.$ \begin{figure}[H] \centering \includegraphics[scale=0.4]{Picturethreee.pdf} \caption{State sum model}\label{Statesum'} \vspace{-25mm} $$\hspace{15mm} {\color{red}\eta^{F'_{\bar{i}}}} \hspace{53mm} {\color{dgreen}\eta^{L'_{\bar{i}}} }\hspace{14mm}$$ \vspace{2mm} \end{figure} \end{center} \begin{defn}[Specialisations]\label{D:1'''} Let $c \in \mathbb Z$ and consider the morphism: \begin{equation} \begin{aligned} &\gamma_{c,q,\lambda}: \mathbb Z[u^{\pm 1},x^{\pm1},d^{\pm1}]\rightarrow \mathbb Z[q^{\pm 1},q^{\pm \lambda}]\\ & \gamma_{c,q,\lambda}(u)= q^{c \lambda}; \ \ \gamma_{c,q,\lambda}(x)= q^{2 \lambda}; \ \ \gamma_{c,q,\lambda}(d)=q^{-2}. \end{aligned} \end{equation} \end{defn} Using the relations $(5.13),(5.14)$ from the proof of Theorem $5.1$ and Theorem $3.2$ from \cite{Cr}, we have the following model. \begin{thm}[Unified embedded state sum model \cite{Cr}]\label{Thstate'} Let $L$ be an oriented link and $\beta_n \in B_n$ such that $L=\hat{\beta}_n$. Let us consider the polynomial in $3$ variables given by the following state sum: \begin{equation}\label{Fstate'} \begin{aligned} \Lambda'_2(\beta_n)(u,x,d)&:=u^{-w(\beta_n)} u^{-(n-1)} \sum_{i_1,...,i_{n-1}=0}^{1} d^{-\sum_{k=1}^{n-1}i_k} \\ &\lll (\beta_{n} \cup {\mathbb I}_{n-1} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg \ \in \mathbb Z[u^{\pm1},x^{\pm 1},d^{\pm 1}]. \end{aligned} \end{equation} Then we have: \begin{equation}\label{eq:4'} \Omega'(\beta_n)=\Lambda'_2(\beta_n)|_{u=d^{-1}x^{-\frac{1}{2}}}. \end{equation} Moreover, this intersection pairing specialises to the normalised Jones polynomial and the Alexander polynomial of the closure of the braid, as below: \begin{equation}\label{eqC:3'} \begin{aligned} &\Omega'(\beta_n)|_{x=q^{2};d=q^{-2}}=\tilde{J}(L,q)\\ &\Omega'(\beta_n)|_{d=-1}=\Delta(L,x). \end{aligned} \end{equation} \end{thm} \subsubsection{Closed model} For the second model, we work with the configuration space $C_{2n,n}$ and the homology groups associated to the parameter $k=n$. For any multi-index $\bar{i}=(i_1,...,i_{n}), i_k \in \{0,1\}, k\in \{1,...,n\}$ we consider the homology classes obtained by the lifts of the following geometric supports: \begin{center} ${\color{red} \mathscr F_{\bar{i}} \in H_{2n,n}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{ and }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\color{dgreen} \mathscr L_{\bar{i}}\in H^{\partial}_{2n,n}}.$ \begin{figure}[H] \centering \includegraphics[scale=0.4]{Picturethree.pdf} \caption{State sum model-closed version}\label{Statesum} \vspace{-25mm} $$\hspace{15mm} {\color{red}\eta^{F_{\bar{i}}}} \hspace{53mm} {\color{dgreen}\eta^{L_{\bar{i}}} }\hspace{14mm}$$ \vspace{2mm} \end{figure} \end{center} By a similar method as the one used for Theorem \ref{Thstate'}, we deduce a state sum description for the closed intersection model, as follows. \begin{coro}[Unified embedded state sum model- closed version]\label{Thstate''} Let $L$ be an oriented link such that $L=\hat{\beta}_n$ for $\beta_n \in B_n$. Let us consider the following state sum: \begin{equation}\label{Fstate} \begin{aligned} \Lambda_2(\beta_n)(u,x,d)&:=u^{-w(\beta_n)} u^{-n} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \\ &\lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F_{\bar{i}}}, {\mathscr L_{\bar{i}}}\ggg \ \in \mathbb Z[u^{\pm1},x^{\pm 1},d^{\pm 1}]. \end{aligned} \end{equation} Then we have: \begin{equation}\label{eq:4} \Omega(\beta_n)=\Lambda_2(\beta_n)|_{u=d^{-1}x^{-\frac{1}{2}}}. \end{equation} \end{coro} This intersection corresponds to the quantum trace from the Reshetikhin-Turaev construction of $U_q(sl(2))$-quantum invariants. This means that for generic $q$ it leads to the un-normalized Jones polynomial. However, for $q$ a root of unity, it vanishes, this being a consequence of the vanishing of quantum dimensions at roots of unity. This shows the following property. \begin{coro} The closed intersection pairing specialises to the un-normalised Jones polynomial of the closure of the braid, and vanished for the specialisation of coefficients associated to roots of unity, as below: \begin{equation}\label{eqC:3} \begin{aligned} &\Omega(\beta_n)|_{x=q^{2}, d=q^{-2}}=J(L,q)\\ &\Omega(\beta_n)|_{d=-1}=0. \end{aligned} \end{equation} \end{coro} \section{Unknot and the stabilised unknot}\label{S:3} In this section we investigate the necessary conditions on the ring of coefficients such that the intersection model leads to a link invariant. Let us start with the unknot, seen as the closure of the following braids: $\mathbb I_1\in B_1$ and $ \sigma \in B_2$. Now we compute the intersection model, which is obtained from the intersection points between the following Lagrangian submanifolds: \begin{figure}[H] \centering \includegraphics[scale=0.4]{Exampleunlink.pdf} \caption{Unknot \hspace{50mm} Stabilised unknot} \end{figure} Computing the grading of these intersection points from the picture, we obtain the coefficients from below: \begin{center} \hspace{15mm}\label{tabel} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | } \hline $x_1$ & $(x_2)$\\ \hline $d$ & $1$\\ \hline \hline \end{tabular}} \quad \hspace{20mm}{\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | } \hline $(x_1,z_1)$ & $(x_2,z_1)$ & $(x_3,z_1)$ & $(x_4,z_2)$ \\ \hline $d^2$ & $d$ & $-dx^{-1}$ & $d^{-1}x^{-1}$ \\ \hline \hline \end{tabular}} \end{center} This means that the intersection form has the following formulas: \begin{equation} \begin{aligned} &\Omega(\mathbb I_1)=x^{\frac{1}{2}}(1+d)\\ &\Omega(\sigma)=dx^{\frac{3}{2}}(d^{2}+d-dx^{-1}+d^{-1}x^{-1}). \end{aligned} \end{equation} In order to obtain from $\Omega$ a link invariant, this should be the same for these two braids, which give the same knot by braid closure, so the following relation should be true: \begin{equation} \Omega(\mathbb I_1)=\Omega(\sigma). \end{equation} Using the formulas for the two intersections, we obtain the following relation: \begin{equation} d^{2}x+dx-d-1=0 \end{equation} which is equivalent to: \begin{equation} (d+1)(dx-1)=0. \end{equation} This shows that $\mathbb L=\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right)$ is the largest quotient in which the intersection form can become a link invariant. \section{Invariance under the Markov moves} \label{S:4} In this part we prove that it is enough to quotient towards $\mathbb L$ in order to have a link invariant. More specifically, we will present a topological proof of the invariance of the closed model $\bar{\Omega}(L)$. We split the proof into two main steps. \begin{itemize} \setlength\itemsep{-0.2em} \item[•] The first step concerns the invariance with respect to the Markov II move. For this, we compute the intersection pairing $\Omega(\beta_n)$ before and after pursuing a stabilisation move, and show that the two formulas become equal if we impose the relation $(d+1)(dx-1)=0$ (which means precisely to consider the quotient morphism and work over $\mathbb L$). \item[•]Secondly, we prove that the intersection form is invariant with respect to the Markov I move. We do this by proving that if we pass to the quotient $\mathbb L$, the image $\bar{\Omega}(\beta_n)$ can be interpreted as a sum of traces of braid group representations. Then we conclude that this sum is invariant with respect to braid conjugation. \end{itemize} \subsection{Markov II} In this part we want to prove that the intersection $\bar{\Omega}$ is invariant at stabilisations: \begin{equation} \bar{\Omega}(\beta_n)=\bar{\Omega}(\sigma^{\pm1}_n\circ \beta_n). \end{equation} We will do this by checking this move on the state sum $\Lambda_2$ and see which relation is needed in order to obtain the same result before and after the stabilisation. Following relation \eqref{Fstate} we have: \begin{equation}\label{equations} \begin{aligned} &\Lambda_2(\beta_n)(u,x,d)=u^{-w(\beta_n)} u^{-n} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg.\\ &\Lambda_2(\sigma^{\pm1}_n\circ\beta_n)(u,x,d)=u^{-w(\sigma^{\pm1}_n\circ\beta_n)} u^{-(n+1)} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k}\cdot \\ &\hspace{15mm}\cdot \left(\lll (\sigma^{\pm1}_n\circ\beta_{n} \cup {\mathbb I}_{n+1} ){ \mathscr F'_{\bar{i},0}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1}\lll (\sigma^{\pm1}_n\circ\beta_{n} \cup {\mathbb I}_{n+1} ){ \mathscr F'_{\bar{i},1}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{aligned} \end{equation} In the next part, for a set of indices $\bar{j}=(j_1,...,j_n)$ we denote their sum by: $$w(\bar{j}):=j_1+...+j_n.$$ Now we fix an index $\bar{i}$ and we look at the terms from the above state sums that are associated to this index. From the structure of the homology group $H_{2n,m}$ for $m=w(\bar{i})$ presented in Proposition \ref{gen}, there exists a collection of coefficients $\alpha_{\bar{j}}\in \mathbb Z[x^{\pm1}, d^{\pm1}]$ such that: \begin{equation}\label{coeff2} (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j},1-\bar{i}} \end{equation} (here we used the notation \ref{ind}). Then, in the first state sum, the term associated to the index $\bar{i}$ can be expressed as: \begin{equation} d^{-m}\sum_{\substack{\bar{j}\in E_{n,m}}} \alpha_{\bar{j}} \cdot \lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg. \end{equation} For the next part we are interested in the intersection with the dual class. \begin{prop} We have the following property of the intersection form: \begin{equation}\label{prop} \hspace{-3mm}\lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg=\begin{cases} 1, \text{ if } (j_1,...,j_{n})=(i_1,...,i_{n})\\ 0, \text{ otherwise}. \end{cases} \end{equation} \end{prop} The proposition follows by an analog argument as the one from Lemma 7.7.1 from \cite{Cr1}. This shows that if $$\lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg\neq 0$$ then we have to have $\bar{j}=\bar{i}$. So, in the first state sum, associated to the index $\bar{i}$ we have: \begin{equation}\label{1} \alpha_{\bar{i}} \cdot \lll \mathscr U'_{\bar{i},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg. \end{equation} For the next part we look at the classes from the second state sum (which are associated to a set of $(n+1)$ indices). Using relation \eqref{coeff2} we have the decomposition from below: \begin{equation}\label{coeff3} \left((\beta_{n}\cup{\mathbb I})\cup {\mathbb I}_{n+1}\right){ \mathscr F'_{\bar{i},\epsilon}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j},\epsilon,1-\epsilon,1-\bar{i}}, \forall \epsilon \in \{0,1\}. \end{equation} Then, in the second state sum, the term associated to the index $\bar{i}$ has the following formula: \begin{equation} d^{-m}\sum_{\substack{\bar{j}\in E_{n,m}}} \alpha_{\bar{j}} \cdot \left(\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{j},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1} \lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{j},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{equation} We remark that the $(\sigma^{\pm1}_n\cup {\mathbb I}_{n+1})$-action on $\mathscr U'_{\bar{j},0,1,1-\bar{i}}$ will be a linear combination of classes which correspond to indices that have the first components $j_1,...,j_{n-1}$. Just the indices which are associated to the $n^{th}$ and $(n+1)^{st}$ positions can be modified. Since we are intersecting with the dual class $\mathscr L'_{\bar{i},0}$, using the property from relation \eqref{prop}, we conclude that the above intersections give a non-trivial term just in the situation where: \begin{equation} (j_1,...,j_{n-1})=(i_1,...,i_{n-1}). \end{equation} Since $j_1+...+j_n=i_1+...+i_n=m$, we conclude that actually the two indexing sets have to coincide: \begin{equation} (j_1,...,j_{n})=(i_1,...,i_{n}), \text{ and so } \bar{j}=\bar{i}. \end{equation} As a conclusion, in the second state sum, corresponding to the index $\bar{i}$ we have: \begin{equation}\label{2} \alpha_{\bar{i}} \cdot \left(\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1} \lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{equation} Putting together relations \eqref{equations}, \eqref{1} and \eqref{2} we conclude that the invariance at the Markov II move is true if for any $\bar{i}=(i_1,...,i_n)$ with $i_1,...,i_n\in \{0,1\}$: \begin{equation} \begin{aligned} &\lll \mathscr U'_{\bar{i},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg=\\ &=u^{\mp-1} \cdot \left(\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1} \lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{aligned} \end{equation} On the other hand, all the coefficients that appear at the intersections $$\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg \text { and }\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{j},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg$$ come from the intersection points which belong to the two inner green circles, all the other points contribute by coefficients which are $1$. From this remark, we conclude that is enough to check the Markov II move for braids with two strands (which correspond to $n=1$). This means that the following condition should be satisfied: \begin{equation} \begin{aligned} &\lll \mathscr U'_{i,1-i}, {\mathscr L'_{i}}\ggg=\\ &=u^{\mp-1} \cdot \left(\lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{i,0,1,1-i}, {\mathscr L'_{i,0}}\ggg + d^{-1} \lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{i,1,0,1-i}, {\mathscr L'_{i,1}}\ggg \right). \end{aligned} \end{equation} for any $i\in \{0,1\}$. So, we have two conditions: \begin{equation}\label{conditions} \hspace{-3mm}\begin{cases} \begin{aligned} \lll \mathscr U'_{0,1},& {\mathscr L'_{0}}\ggg=\\ &=u^{\mp-1}\left(\lll (\sigma^{\pm}\cup {\mathbb I}_{2}) \mathscr U'_{0,0,1,1}, {\mathscr L'_{0,0}}\ggg + d^{-1} \lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{0,1,0,1}, {\mathscr L'_{0,1}}\ggg \right).\\ \lll \mathscr U'_{1,0},& {\mathscr L'_{1}}\ggg=\\ &=u^{\mp-1}\left(\lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{1,0,1,0}, {\mathscr L'_{1,0}}\ggg + d^{-1} \lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{1,1,0,0}, {\mathscr L'_{1,1}}\ggg \right). \end{aligned} \end{cases} \end{equation} For the left hand side of the above equations, we have the intersections from below: \begin{figure}[H] \centering $$ \ \ \ \ \ \lll \mathscr U'_{0,1}, {\mathscr L'_{0}}\ggg=1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll \mathscr U'_{1,0}, {\mathscr L'_{1}}\ggg=1 \ \ \ \ \ \ $$ \hspace{-3mm}\includegraphics[scale=0.4]{Stabilisation10.pdf} \caption{Coefficients before the stabilisation} \end{figure} In the following part we investigate the conditions from relation \eqref{conditions} for two cases, given by positive stabilisation or the negative stabilisation. \subsubsection{Positive stabilisation} We compute the intersections which appear in condition \eqref{conditions} for the case when we act with the positive generator $\sigma$. We have the following intersections: \begin{figure}[H] \centering $$\lll (\sigma\cup {\mathbb I}_{2}) \mathscr U'_{0,0,1,1}, {\mathscr L'_{0,0}}\ggg=1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma\cup {\mathbb I}_{2}) \mathscr U'_{1,0,1,0}, {\mathscr L'_{1,0}}\ggg=0$$ \includegraphics[scale=0.3]{Stabilisation1.pdf} $$\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{2}) \mathscr U'_{0,1,1,0}, {\mathscr L'_{0,1}}\ggg=1-x^{-1} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma \cup {\mathbb I}_{2}) \mathscr U'_{1,1,0,0}, {\mathscr L'_{1,1}}\ggg=d^{-1}x^{-1}$$ \caption{Coefficients of the positive stabilisation} \end{figure} We obtain the system: \begin{equation} \begin{cases} 1=u^{-2}\left(1+d^{-1}(1-x^{-1})\right)\\ 1=u^{-2}d^{-2}x^{-1}. \end{cases} \end{equation} This is equivalent to: \begin{equation} \begin{cases} 1=d^2x\left(1+d^{-1}(1-x^{-1})\right)\\ u^{-2}=d^2x. \end{cases} \end{equation} Then, the first condition becomes: \begin{equation} \begin{aligned} 1=d^2x+dx-d & \Leftrightarrow \ \ d^2x-1+dx-d=0 \ \ \Leftrightarrow \ \ dx(d+1)-(d+1)=0 \ \ \Leftrightarrow\\ & \Leftrightarrow (d+1)(dx-1)=0. \end{aligned} \end{equation} This is precisely the condition that we have in the quotient ring, so this equation is satisfied. For the second one, we choose $u=d^{-1}x^{-\frac{1}{2}}$, which is precisely the specialisation used in relation \eqref{eq:4}. \subsubsection{Negative stabilisation} In this part we investigate the invariance at the negative stabilisation and check relations \eqref{conditions} in this situation. We have the coefficients given by the following intersections: \begin{figure}[H] \centering $$\lll (\sigma^{-1}\cup {\mathbb I}_{2}) \mathscr U'_{0,0,1,1}, {\mathscr L'_{0,0}}\ggg=1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma^{-1}\cup {\mathbb I}_{2}) \mathscr U'_{1,0,1,0}, {\mathscr L'_{1,0}}\ggg=1-x$$ \includegraphics[scale=0.3]{Stabilisation2.pdf} $$\lll (\sigma^{-1}_n\cup {\mathbb I}_{2}) \mathscr U'_{0,1,1,0}, {\mathscr L'_{0,1}}\ggg=0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma^{-1} \cup {\mathbb I}_{2}) \mathscr U'_{1,1,0,0}, {\mathscr L'_{1,1}}\ggg=dx$$ \caption{Coefficients of the negative stabilisation} \end{figure} We obtain the relations: \begin{equation} \begin{cases} 1=1+d^{-1}\cdot 0\\ 1=1-x+d^{-1}(dx). \end{cases} \end{equation} These are both true, so we conclude that the negative stabilisation is always satisfied (even before we quotient to the quotient ring). This concludes the invariance of the intersection $\bar{\Omega}(\beta_n)$ with respect to the second Markov move. For the intersection form $\Omega'(\beta_n)$ we can pursue an analog argument, this time having $n-1$ particles in the configuration space, and conclude in a similar way that $\bar{\Omega}'(\beta_n)$ is invariant at stabilisations. \subsection{Markov I} In this part we aim to prove the invariance of the form $\bar{\Omega}$ with respect to braid conjugation. Let $\beta_n,\gamma_n \in B_n$. We want to show that: \begin{equation}\label{eq:3} \bar{\Omega}\left(\beta_n\right))(x,d)=\bar{\Omega}\left(\gamma_n \circ \beta_n \circ \gamma^{-1}_n\right)(x,d). \end{equation} We follow the formula presented in Corollary \ref{Thstate''}, use the intersection form $\Lambda_2(\beta_n)(u,x,d)$ and prove that after we take the quotient it becomes invariant under conjugation. We notice that the writhe and number of strands remain unchanged under conjugation, so the framing part from $\Lambda_2(\beta_n)(u,x,d)$ (which is given by the power of $u$) is invariant under conjugation. We will show that if we impose the condition $(d-1)(xd-1)=0$ then $\Lambda_2(\beta_n)(u,x,d)$ is invariant under conjugation. Our strategy is to prove that this state sum specialised by the above condition can be seen as a sum of traces of braid group representations, which in turn are conjugacy invariant. We start by introducing the following subspace in the Lawrence representation. \begin{defn}(Subspace in the Lawrence representation) Let us consider the set of partitions from $E_{n,m}$ with multiplicities at most one: \begin{equation} E^{1}_{n,m}=\{\bar{j}=(j_1,...,j_{n}) \mid j_1,...,j_{n} \in \mathbb Z, j_1+...+j_{n}=m, 0 \leq j_1,...,j_{n} \leq 1\}. \end{equation} Then, we consider the subspace $H^{1}_{n,m}\subseteq H_{n,m}$ generated by classes which are prescribed by such partitions, as below: \begin{equation} H^{1}_{n,m}=\langle \mathscr U'_{j_1,...,j_{n}} \mid \bar{j}=(j_1,...,j_{n}) \in E^{1}_{n,m}\rangle_{\mathbb Z[x^{\pm1},d^{\pm1}]}. \end{equation} \end{defn} As we will see in the next part, this subspace is not preserved by the braid group action given by the Lawrence representation on $H_{n,m}$. However, if we impose the extra relation, then the subspace will be preserved and we will have a well defined sub-representation. \begin{lem}[Sub-representation of the Lawrence representation] We consider the quotient morphism $s:\mathbb Z[x^{\pm1},d^{\pm1}]\rightarrow\mathbb Z[x^{\pm1},d^{\pm1}]/((d-1)(xd-1)).$ Then there is a well defined induced representation of the braid group on the following subspace: \begin{equation} B_n\curvearrowright H^{1}_{n,m}|_{s} \end{equation} (here, we use notation \ref{N:spec}). \end{lem} \begin{proof} We have to prove that for all $\bar{j}=(j_1,...,j_n)\in E^{1}_{n,m}$ and any $\beta_n\in B_n$ we have: $$\beta_n \mathscr U'_{j_1,...,j_{n}} \in H^{1}_{n,m}|_{s}.$$ It is enough to show this for the generators of the braid group and moreover, since the action of such generator is local and acts non-trivially just on a disc around two punctures, it is enough to check this in that punctured disc with two punctures. Let $j_0,j_1\in \{0,1\}$ and denote $j_0+j_1=m$. Then we will prove that: $$\sigma \mathscr U'_{j_0,j_{1}} \in H^{1}_{2,m}|_{s}.$$ If $j_1=0$, looking directly on the picture we see that we obtain another basis element associated to a partition without multiplicities. The only check that needs to be done is for $j_1=1$. The only case when we could get a multiplicity at least $2$ is if $j_0=1$. Using the structure of $H_{2,m}$, we know that in this homology group we have a decomposition: \begin{equation} \sigma \mathscr U'_{1,1}=\alpha_1 \mathscr U'_{1,1}+ \alpha_2 \mathscr U'_{0,2} + \alpha_3 \mathscr U'_{2,0}. \end{equation} \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decomposition.pdf} \vspace{-3mm} $$\sigma \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{0,2} \ \ \hspace{24mm} \ \mathscr U'_{2,0} $$ \caption{Coefficients} \end{figure} Now, intersecting with a dual class whose support has two semi-circles which start from the upper boundary of the disc and go around the first puncture, we see that all intersections vanish except the one with the class $\mathscr U'_{2,0}$-which is $1$. This shows that the coefficient $\alpha_3=0$. In the next part we compute the coefficient $\alpha_2$. We do this by intersecting with the dual class given by the following green barcode: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decomposition1.pdf} \vspace{-3mm} $$ \ \ \hspace{54mm} \ 0 \ \ \hspace{29mm} \ 1 \ \ \hspace{24mm} $$ \caption{Computing $\alpha_2$} \end{figure} \begin{figure}[H] \centering \includegraphics[scale=0.7]{Decomposition2.pdf} \caption{Coefficients $\sigma$} \end{figure} \begin{center} \label{tabel} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | } \hline $(x_1,z_2)$ & $(x_1,z'_2)$ & $(x_2,z_1)$ & $(x_2,z'_1)$ \\ \hline $1$ & $-x^{-1}$ & $d$ & $-x^{-1}d^{-1}$ \\ \hline \hline \end{tabular}} \end{center} It follows that the coefficient is: \begin{equation} \alpha_2=1+d-(x^{-1}+x^{-1}d^{-1})=(1+d)(1-x^{-1}d^{-1}). \end{equation} In order to compute the coefficient $\alpha_1$, we intersect with the barcode from the picture below: \begin{figure}[H] \centering \includegraphics[scale=0.7]{Decomposition3.pdf} \caption{Computing $\alpha_1$} \end{figure} \begin{center} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | } \hline $(x_1,z_2)$ & $(x_1,z'_2)$ & $(x_2,z_1)$ \\ \hline $1$ & $-x^{-1}$ & $d$ \\ \hline \hline \end{tabular}} \end{center} It follows that: \begin{equation} \alpha_1=1-x^{-1}+d. \end{equation} So, we have the decomposition: \begin{equation} \sigma \mathscr U'_{1,1}=(1-x^{-1}+d) \mathscr U'_{1,1}+ (1+d)(1-x^{-1}d^{-1}) \mathscr U'_{0,2}. \end{equation} It follows that if we impose the relation $(1+d)(1-x^{-1}d^{-1})$, the coefficient $\alpha_2$ vanishes. This shows that $\sigma \mathscr U'_{1,1} \in H^1_{2,2}|_s$, so we remain in the homological subspace given by multiplicity free partitions. In the next part we do the same procedure for the action of the elementary braid $\sigma^{-1}$. Similar to the previous case, the only situation that we need to check is given by the action on the class $\mathscr U'_{1,1}$ and we have a decomposition as below: \begin{equation} \sigma^{-1} \mathscr U'_{1,1}=\alpha'_1 \mathscr U'_{1,1}+ \alpha'_2 \mathscr U'_{0,2} + \alpha'_3 \mathscr U'_{2,0}. \end{equation} It is clear that we have the coefficient $\alpha'_2=0$, because we cannot get a geometric support with multiplicity two that ends in the second puncture. So, we have the following classes that appear in the decomposition: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decompositioninv.pdf} \vspace{-3mm} $$\sigma^{-1} \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{2,0} \ \ \ \ $$ \caption{Coefficients $\sigma^{-1}$} \end{figure} First of all, we want to compute $\alpha_1'$. In order to do this, we intersect with the following barcode: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decompositioninv1.pdf} \vspace{-3mm} $$ \ \ \hspace{18mm} \ xd \ \ \hspace{29mm} \ 1 \ \ \hspace{24mm} $$ \caption{Computing $\alpha'_1$} \end{figure} Computing the coefficients from the two intersections, we obtain: \begin{equation} \alpha'_1=xd. \end{equation} Further on, we want to find $\alpha_3'$. We intersect with the following barcode: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decompositioninv2.pdf} \vspace{-3mm} $$\hspace{17mm} 1+d \ \ \hspace{24mm} \ 1+d \ \ \hspace{27mm} \ 1 \ \ \hspace{20mm} $$ \caption{Computing $\alpha'_3$} \end{figure} This shows the following relation: \begin{equation} 1+d=(1+d)\alpha'_1+\alpha'_3. \end{equation} From the previous two equations we conclude that: \begin{equation} \alpha'_3=1+d-(1+d)xd=(1+d)(1-xd). \end{equation} This shows that if we pass to the quotient and impose this relation, then we remain in the subspace: $$\sigma^{-1} \mathscr U'_{1,1} \in H^1_{2,2}|_s.$$ This concludes the proof that the subspace $H_{n,m}^1$ remains invariant under the braid group action once we specialise the coefficients via the function $s$. \end{proof} \begin{notation}[Lawrence sub-representation] We denote this well defined sub-representation by: \begin{equation} L^1_{n,m}: B_n\rightarrow \mathrm{Aut}\left(H^{1}_{n,m}|_{s}\right). \end{equation} \end{notation} Now we are ready to show that the $s$-specialised intersection form is invariant under conjugation. We remind the formula \eqref{Fstate}: \begin{equation} \begin{aligned} \Lambda_2(\beta_n)(u,x,d)&:=u^{-w(\beta_n)} u^{-n} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \\ &\lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg \ \in \mathbb Z[u^{\pm1},x^{\pm 1},d^{\pm 1}]. \end{aligned} \end{equation} In the next part, we will show that the state sum $\Lambda_2$ can be interpreted using these Lawrence subrepresentations. \begin{prop} The state sum of intersections is a sum of traces of Lawrence sub-representations, as below: \begin{equation}\label{traceformula} \begin{aligned} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg|_{s} ~=\sum_{m=0}^{n} d^{-m} \ tr(L^1_{n,m}(\beta_n)). \end{aligned} \end{equation} \end{prop} \begin{proof} The state sum from the left hand side can be expressed as: \begin{equation}\label{relstate} \begin{aligned} &\sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg=\\ &=\sum_{m=0}^{n} d^{-m} \sum_{\bar{i}=(i_1,...,i_{n})\in E_{n,m}^1} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg. \end{aligned} \end{equation} Now, using the structure of the homology group $H_{2n,m}$ from proposition \ref{gen}, for $\bar{i}\in E_{n,m}^1$ there exists a collection of coefficients $\alpha_{\bar{j}} \in \mathbb Z[x^{\pm1},d^{\pm1}]$ such that: \begin{equation}\label{coeff1} L_{2n,m}(\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j},1-\bar{i}} \end{equation} (following notation \ref{ind}). This comes from the fact that on the last components we act with ${\mathbb I}_{n}$, so we do not change the associated indices of $\mathscr F'_{\bar{i}}$ through this action and so they remain $1-\bar{i}$. On the other hand, we will obtain a linear combination of classes associated to partitions whose first components are $\bar{j}$ for arbitrary $\bar{j}=(j_1,...,j_n)$. Since the Lawrence representation preserve the total sum of indices, it follows that we will get classes associated to $\bar{j}$ such that $$w(\bar{j})=w(\bar{i})=m.$$This explains relation \eqref{coeff1}. For the intersection with the dual class, we remind relation \eqref{prop}: \begin{equation} \hspace{-3mm}\lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg=\begin{cases} 1, \text{ if } (j_1,...,j_{n})=(i_1,...,i_{n})\\ 0, \text{ otherwise}. \end{cases} \end{equation} So, the pairing with the dual class $\mathscr L'_{\bar{i}}$ encodes precisely the diagonal coefficient and for any $\bar{i}\in E_{n,m}^{1}$ we have: \begin{equation}\label{diagonalelement} \begin{aligned} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg ~=\sum_{\substack{\bar{j}= (j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \lll \mathscr U'_{\bar{j},1-\bar{i}}, \mathscr L'_{\bar{i}}\ggg~=\alpha_{\bar{i}} . \end{aligned} \end{equation} On the other hand, we remark that these $\alpha$-coefficients are the same as the ones that give the decomposition of the $\beta_n$-action on the basis element $\mathscr U'_{\bar{i}}$ from the homology group $H_{n,m}$: \begin{equation} L_{n,m}(\beta_{n}){ \mathscr U'_{\bar{i}}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j}}. \end{equation} We notice that the above sum is indexed by elements from $E_{n,m}$, not necessarily from $E^{1}_{n,m}$. From the relation \eqref{diagonalelement} we see that for any index $\bar{i}\in E_{n,m}^{1}$ the pairing $$\lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg$$ encodes precisely the coefficient of the homology class $\mathscr U'_{\bar{i}}$ that appear in the decomposition of $L_{n,m}(\beta_{n}){ \mathscr U'_{\bar{i}}}$. Now we specialise through $s$ and use the property that we have a well defined action $L^1_{n,m}$ on the subspace $H^1_{n,m}$ (which is spanned by all $\mathscr U'_{\bar{j}}$ for $\bar{j}\in E_{n,m}^{1}$). From these remarks we obtain that: \begin{equation} \begin{aligned} \sum_{\bar{i}=(i_1,...,i_{n})\in E_{n,m}^1} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg|_{s}&=\sum_{\bar{i}=(i_1,...,i_{n})\in E_{n,m}^1} \alpha_{\bar{i}} \ =\\ &= tr \left(L^1_{n,m}(\beta_n)\right). \end{aligned} \end{equation} This together with relation \eqref{relstate} conclude the trace formula interpretation for the state sum, as presented in the statement. \end{proof} Using the property that the trace is invariant under conjugation together with relation \eqref{Fstate'} and \eqref{traceformula} we conclude that when we impose relation $(1+d)(xd-1)$ the state sum $\Lambda_2$ is invariant at conjugation. This shows that $\bar{\Omega}$ is invariant at conjugation as well and so the first Markov move is satisfied. Following the invariance of $\bar{\Omega}$ with respect to the two Markov moves, we conclude that it gives a well-defined link invariant with values in $\mathbb L$, and conclude Theorem \ref{THEOREM}. \section{Formulas for these invariants as interpolations of Jones and Alexander polynomials} \label{S:5} This section arose from joint discussions with Rinat Kashaev, and I would like to thank him for this. In this part, we consider algebraic varieties which are quotients of the Laurent polynomial ring by the product of two irreducible factors without multiplicity. Then, if we have an invariant taking values in this algebraic variety, and we consider its specialisations associated to the two irreducible factors then this invariant in the variety is forced to be an interpolation between these two specialisations. Let us make it precise for our cases. So far we have the intersection form $\bar{\Omega}$ which we know is a link invariant. We want to describe the precise form of this invariant. We will see that the fact that $\bar{\Omega}(\beta_n)(x,d)$ recovers the Jones polynomial and vanishes through the second specialisation of coefficients forces it to be a multiple of the Jones polynomial. On the other hand, something interesting happens with the open intersection form. In the second part of this section we will see that the fact that $\bar{\Omega}'(\beta_n)(x,d)$ is an element in the quotient ring which recovers the Jones and Alexander polynomials through the two specialisations forces it to be a specific interpolation between the Jones and Alexander polynomials. \subsection{The closed model in the quotient ring} Following Corollary \ref{Thstate''} and Definition \ref{N} we have: \begin{center} \begin{tikzpicture} [x=1.2mm,y=1.4mm] \node (b1) at (44,0) {$0 \in \mathbb Z[x^{\pm 1}]$}; \node (b5) at (0,0) {$J(L)(x) \in \mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b4) at (22,15) {$\bar{\Omega}(L)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right)$}; \node (s1) at (0,6) {$d=x^{-1}$}; \node (s2) at (44,6) {$d=-1$}; \draw[<-] (b1) to node [left,yshift=-2mm,font=\large]{$\psi_{\Delta}$} (b4); \draw[<-] (b5) to node [right,yshift=-2mm,font=\large] {$\psi_{J}$} (b4); \end{tikzpicture} \end{center} The specialisation $\psi_\Delta$ gives $\bar{\Omega}(L)(x,d)|_{d=-1}=0$, so there exists $B(x,d) \in \mathbb L$ such that: \begin{equation} \bar{\Omega}(L)(x,d)=(d+1) \cdot B(x,d). \end{equation} On the other hand the specialisation $\psi_J$ gives $\bar{\Omega}(L)(x,d)|_{d=x^{-1}}=J(L)(x)$. Using this property combined with the above relation we have: \begin{equation*} J(L)(x)=(x^{-1}+1) \cdot B(x,d)|_{d=x^{-1}}. \end{equation*} In other words, in the ring $\mathbb Z[x^{\pm \frac{1}{2}}]$ we have: \begin{equation*} \frac{J(L)(x)}{(x^{-1}+1)}=B(x,d)|_{d=x^{-1}}. \end{equation*} This shows that there exists $B'(x,d) \in \mathbb L$ with the property: \begin{equation} B(x,d)=\frac{J(L)(x)}{(x^{-1}+1)}+B'(x,d) \cdot (xd-1). \end{equation} This implies that that in the quotient ring we have: \begin{equation*} \bar{\Omega}(L)(x,d)=(d+1) \cdot \frac{J(L)(x)}{(x^{-1}+1)}+B'(x,d) \cdot (d+1)(xd-1)=(d+1) \cdot \frac{J(L)(x)}{(x^{-1}+1)}. \end{equation*} Using the normalised version of the Jones polynomial we obtain: \begin{equation*} \bar{\Omega}(L)(x,d)=(d+1) \cdot \tilde{J}(L)(x). \end{equation*} This concludes the relation from Theorem \ref{THEOREM3}. \subsection{The open model in the quotient ring} In this part we study which information we get from the fact that the open intersection form recovers the Jones and Alexander polynomials of the closure. Let $L$ be a link and we choose a braid representative $\beta_n\in B_n$. Then, following Theorem \ref{Thstate'} we have : \begin{center} \begin{tikzpicture} [x=1.2mm,y=1.4mm] \node (b1) at (44,0) {$\Delta(L)(x) \in \mathbb Z[x^{\pm 1}]$}; \node (b5) at (0,0) {$\tilde{J}(L)(x) \in \mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b4) at (22,15) {$\bar{\Omega}'(\beta_n)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right)$}; \node (s1) at (0,6) {$d=x^{-1}$}; \node (s2) at (44,6) {$d=-1$}; \draw[<-] (b1) to node [left,yshift=-2mm,font=\large]{$\psi_{\Delta}$} (b4); \draw[<-] (b5) to node [right,yshift=-2mm,font=\large] {$\psi_{J}$} (b4); \end{tikzpicture} \end{center} We start with the specialisation $\psi_\Delta$ and we know: \begin{equation} \bar{\Omega}'(\beta_n)(x,d)|_{d=-1}=\Delta(L)(x). \end{equation} Then this means that the difference between the intersection form and the Alexander polynomial is in the kernel of the specialisation. More precisely, there exists $A(x,d)\in \mathbb L$ such that: \begin{equation*} \bar{\Omega}'(\beta_n)(x,d)-\Delta(L)(x)=A(x,d) \cdot (d+1). \end{equation*} This is equivalent to: \begin{equation}\label{rel1} \bar{\Omega}'(\beta_n)(x,d)=\Delta(L)(x)+A(x,d) \cdot (d+1). \end{equation} Now, we look at the specialisation $\psi_J$ and we have $\bar{\Omega}'(\beta_n)(x,d)|_{d=x^{-1}}=\tilde{J}(L)(x)$, so: \begin{equation*} \tilde{J}(L)(x)=\Delta(L)(x)+A(x,d)|_{d=x^{-1}} \cdot (x^{-1}+1). \end{equation*} This shows that: \begin{equation} A(x,d)|_{d=x^{-1}}=\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}. \end{equation} This implies that there exists $A'(x,d)\in \mathbb L$ such that: \begin{equation*} A(x,d)-\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}=A'(x,d) \cdot (xd-1). \end{equation*} The last relation gives: \begin{equation} A(x,d)=\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}+A'(x,d) \cdot (xd-1). \end{equation} Following the last relation and equation \eqref{rel1} we have: \begin{equation*} \bar{\Omega}'(\beta_n)(x,d)=\Delta(L)(x)+(d+1)\left(\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}+A'(x,d) \cdot (xd-1)\right). \end{equation*} This shows that the open intersection form in the quotient ring is the following interpolation: \begin{equation} \bar{\Omega}'(\beta_n)(x,d)=\Delta(L)(x)+(d+1)\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}. \end{equation} So $\bar{\Omega}'(\beta_n)$ is a well-defined link invariant, denoted by $\bar{\Omega}'(L)$ which has the formula: \begin{equation} \bar{\Omega}'(L)(x,d)=\Delta(L)(x)+(d+1)\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}. \end{equation} This concludes the statement of Theorem \ref{THEOREM2}. \section{Example of computation}\label{S:6} \subsection{Trefoil knot} Let us compute the intersection model for the trefoil knot $T$, seen as the closure of the braid $\sigma^3 \in B_2$. We have the following Lagrangians in the punctured disc $\mathscr D_5$: $$ (\sigma^3 \cup \mathbb I_{3})\mathscr S'\cap\mathscr T'$$ \vspace{-10mm} \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.6]{Example.pdf} \caption{Trefoil knot} \end{figure} \end{center} \vspace{-5mm} Then, we compute the gradings of the $5$ intersection points as in the above picture and we obtain: \begin{equation} \begin{aligned} &\Omega'(\sigma^{3})(x,d)=x^2d^3 \left( -x^{-3}+x^{-2}-x^{-1}+1+d\right). \end{aligned} \end{equation} In the next part, we compute the formula for this intersection in the quotient ring: $$\bar{\Omega}'(T)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right).$$ Replacing $d^3$ in terms of the basis using relation \eqref{relations} we obtain: \begin{equation} \begin{aligned} &\bar{\Omega}'(T)(x,d)=x^2\left((x^{-2}-x^{-1}+1)d+x^2-x^{-1}\right) \left( -x^{-3}+x^{-2}-x^{-1}+1+d\right). \end{aligned} \end{equation} Now, we prove that this expression is an interpolation between the Jones and Alexander invariants of the trefoil knot, which have the following formulas: \begin{equation} \begin{aligned} &\Delta(T,x)=x-1+x^{-1}\\ &J(T,q)=-x^{-4}+x^{-1}+x^{-3}. \end{aligned} \end{equation} This means that we have: \begin{equation} \begin{aligned} \bar{\Omega}'(T)(x,d)&=\left((\Delta(T)(x) \cdot xd-x+1\right) \left( -x^{-3}+x^{-2}-x^{-1}+1+d\right)=\\ &=\left( (-x^{-2}+x^{-1}-1+x)d+xd^2\right)\Delta(T)(x)+\\ & \ \ \ +x^{-2}-x^{-1}+1-x-dx-x^{-3}+x^{-2}-x^{-1}+1+d. \end{aligned} \end{equation} Replacing $d^2$ using formula \eqref{relations} we obtain: \begin{equation} \begin{aligned} \bar{\Omega}'(T)(x,d)&=\Delta(T)(x)+d(1-x^{-1})(1-x^{-1}+x^{-2}-x)+\\ &\ \ \ +(1-x^{-1})(1-x^{-1}+x^{-2}-x)=\\ &=\Delta(T)(x)+(d+1)(1-x^{-1})(1-x)(1+x^{-2}). \end{aligned} \end{equation} On the other hand, the difference between Jones and Alexander polynomials of the trefoil has the expression: \begin{equation*} \tilde{J}(T)(x)-\Delta(T)(x)=(1+x^{-1})(1-x^{-1})(1-x)(1+x^{-2}). \end{equation*} From the previous two relations we conclude the interpolation model: \begin{equation} \bar{\Omega}'(T)(x,d)=\Delta(T)(x)+(d+1) \cdot \frac{\tilde{J}(T)(x)-\Delta(T)(x)}{(x^{-1}+1)}. \end{equation} \begin{comment} \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.5]{Example819.pdf} \vspace{-5mm} \hspace{100mm}$\Large{Conf_2(\mathscr D_8)}$ \vspace{5mm} \caption{Knot $8_{{19}}$} \end{figure} \end{center} \begin{center} \label{tabel} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | c | } \hline $(x_1,z_1)$ & $(x_1,z^{'}_1)$ & $(x_1,z^{"}_1)$ & $(x_1,z_4)$ & $(x_1,z_5)$ \\ \hline $y^2$ & $-y$ & $yx^{-1}$ & $-yx^{-3}$ & $yx^{-4}$ \\ \hline \hline $(x_4,z_1)$ & $(x_4,z^{'}_1)$ & $(x_4,z^{"}_1)$ & $(x_4,z_4)$ & $(x_4,z_5)$ \\ \hline $-yx^{-1}$ & $x^{-1}$ & $-x^{-2}$ & $d^{-2}x^{-4}$ & $-d^{-2}x^{-5}$ \\ \hline \hline $(x_5,z_1)$ & $(x_5,z^{'}_1)$ & $(x_5,z^{"}_1)$ & $(x_5,z_4)$ & $(x_5,z_5)$ \\ \hline $yx^{-2}$ & $-x^{-2}$ & $x^{-3}$ & $-d^{-2}x^{-5}$ & $d^{-2}x^{-6}$ \\ \hline \hline $(x_6,z_1)$ & $(x_6,z^{'}_1)$ & $(x_6,z^{"}_1)$ & $(x_6,z_4)$ & $(x_6,z_5)$ \\ \hline $-yx^{-3}$ & $x^{-3}$ & $-x^{-4}$ & $d^{-2}x^{-6}$ & $-d^{-2}x^{-7}$ \\ \hline \hline $(x_7,z_1)$ & $(x_7,z^{'}_1)$ & $(x_7,z^{"}_1)$ & $(x_7,z_4)$ & $(x_7,z_5)$ \\ \hline $yx^{-4}$ & $-x^{-4}$ & $x^{-5}$ & $-d^{-2}x^{-7}$ & $d^{-2}x^{-8}$ \\ \hline \hline $(x_2,z_2)$ & $(x_2,z_3)$ & $(x_2,z_6)$ & $(x_2,z_7)$ & $(x_2,z_8)$ \\ \hline $d^{-1}x^{-1}$ & $-d^{-1}x^{-2}$ & $d^{-1}x^{-4}$ & $-d^{-1}x^{-5}$ & $d^{-1}x^{-6}$ \\ \hline \hline $(x_3,z_2)$ & $(x_3,z_3)$ & $(x_3,z_6)$ & $(x_3,z_7)$ & $(x_3,z_8)$ \\ \hline -$d^{-1}x^{-2}$ & $d^{-1}x^{-3}$ &-$d^{-1}x^{-5}$ & $d^{-1}x^{-6}$ & -$d^{-1}x^{-7}$ \\ \hline \hline \end{tabular}} \end{center} Then the intersection pairing has the following form: \begin{equation} \begin{aligned} \Omega'(K_{8_{19}})(x,d)=(d^2x)^{5} \Bigl( &1+d^{-1}+(d^{-2}+d^{-3})x^{-1}+ \\ &+(-d^{-1}-2d^{-2}-2d^{-3})x^{-2}+ \\ &+(2d^{-1}+2d^{-2}+d^{-3})x^{-3} \\ &+(-2d^{-1}-2d^{-2}+d^{-3}+d^{-4})x^{-4}\\ &+(d^{-2}-2d^{-3}-2d^{-4})x^{-5} \\ &+(-2d^{-3}+2d^{-4})x^{-6}- \\ &-(d^{-3}+2d^{-4})x^{-7}+d^{-4}x^{-8}\Bigr). \end{aligned} \end{equation} In this subsection we aim to prove that our invariant recovers the Jones and Alexander polynomials through specialisations of coefficients. We know that the intersection from \cite{Cr} recovers the Jones and Alexander polynomials through specialisations. Then, we show that $\Gamma_2(\beta_n)$ recovers the un-normalized version of the Jones and the Alexander polynomial up to a factor. From that, we show that $\bar{\Omega}(\beta_n)$ inherits the same properties. We start with the following result from \cite{Cr}. \begin{thm}(\cite{Cr})\label{THE} Let us denote by $\tilde{\mathscr S}$ and $\tilde{\mathscr T}$ the submanifolds in the configuration space $C_{3n-2,n-1}$ whose geometric supports are depicted in the right hand side of figure \ref{Openmodel}. We consider the graded intersection: \begin{equation} \begin{aligned} &\tilde{\Gamma}_2(\beta_n)(u,x,y,d) \in \mathbb Z[u^{\pm}, x^{\pm}, y^{\pm}, d^{\pm}]\\ &\tilde{\Gamma}_2(\beta_n)(u,x,y,d):=u^{-w(\beta_n)} u^{-n} (-y)^{-n} \ll (\beta_n\cup \mathbb I_{2n-2}) \tilde{\mathscr S},\tilde{\mathscr T} \gg. \end{aligned} \end{equation} Then this intersection pairing specialises to the normalised Jones and Alexander polynomials of the closure of the braid, as below: \begin{equation}\label{eqC:3} \begin{aligned} &\tilde{J}(L,q)= \tilde{\Gamma}_2(\beta_n)|_{u=q;x=q^{2}, d=q^{-2}}\\ &\Delta(L,x)=\tilde{\Gamma}_2(\beta_n)|_{u=x^{-\frac{1}{2}};y=1;d=-1}. \end{aligned} \end{equation} \end{thm} Following this property, we will show that the following intersection pairing, which models the total closure of a braid rather than the closure with the first strand that is open shares similar properties, as follows. \begin{center} $\mathscr S,\mathscr T \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \tilde{\mathscr S},\tilde{\mathscr T}$ \begin{figure}[H] \centering \includegraphics[scale=0.3]{Diffeotwo.pdf} \hspace{-10mm}\caption{Closed up intersection $\Gamma_2(\beta_n)$ \hspace{30mm} Open intersection $\tilde{\Gamma}_2(\beta_n)$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\label{Openmodel} \end{figure} \end{center} \begin{thm}(Jones and Alexander polynomials from two Lagrangians in a configuration space)\label{THEOREM'}\\ Consider the following graded intersection: \begin{equation} \begin{aligned} &\Gamma_2(\beta_n)(u,x,y,d) \in \mathbb Z[u^{\pm}, x^{\pm}, y^{\pm}, d^{\pm}]\\ &\Gamma_2(\beta_n)(u,x,y,d):=u^{-w(\beta_n)} u^{-n} (-y)^{-n} \ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg. \end{aligned} \end{equation} This specialises to the Jones and Alexander polynomials of the closure of the braid, as below: \begin{equation}\label{eqC:3} \begin{aligned} &J(L,q)= \Gamma_2(\beta_n)|_{u=q;x=q^{2}, d=q^{-2}}\\ &\Delta(L,x)=\left(\frac{1}{d+1}\Gamma_2(\beta_n) \right)|_{u=x^{-\frac{1}{2}};y=1;d=-1}. \end{aligned} \end{equation} \end{thm} \begin{proof} The difference between $\tilde{\Gamma}_2(\beta_n)$ and $\Gamma_2(\beta_n)$ is that the former one has an extra red curve and green circle in the geometric support of the submanifolds. On the other hand, following the proof of Theorem \ref{THE} from \cite{Cr}, which uses \cite{Cr1}, one gets that $\tilde{\Gamma}_2(\beta_n)$ correspond to the partial quantum trace that is used for the definition of the normalised Jones polynomials or Alexander polynomials, seen as quantum invariants. Following that correspondence, the closed up intersection form $\Gamma_2(\beta_n)$ models the total quantum trace on the representation theory side. This means that for generic $q$, it recovers the un-normalised Jones polynomial, and so: \begin{equation} J(L,q)= \Gamma_2(\beta_n)|_{u=q;x=q^{2}, d=q^{-2}}. \end{equation} Now we discuss the case given by the other specialisation of coefficients. Following the above mentioned correspondence, this situation corresponds to the representation theory of the quantum group $U_q(sl(2))$ at roots of unity. The quantum trace of braid representations vanishes in this situation and so the Reshetikhin-Turaev construction (\cite{RT}) of quantum invariants gives vanishing invariants. In order to see the Alexander polynomial from representation theory at roots of unity, one has to cut a strand of the braid closure and use partial quantum traces (\cite{ADO}). This is reflected geometrically by removing from the supports of $\mathscr S,\mathscr T$ the red curve and green circle which connect the first point with the last one. This gives the supports of $\tilde{\mathscr S}$ and $\tilde{\mathscr T}$, and the associated intersection pairing $\tilde{\Gamma}_2(\beta_n)$. This means that for out model, we have: \begin{equation} \Gamma_2(\beta_n)|_{u=x^{-\frac{1}{2}};y=1;d=-1}=0. \end{equation} \end{proof} We remind the definition of the intersection pairing from the main statement \ref{THEOREM}: $$\Omega(\beta_n)(q,d):=(dq)^{w(\beta_n)+n}\cdot d^{-n} \langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle \in \mathbb Z[q^{\pm 1}, d^{\pm 1}].$$ Then, we see that this is the specialisation of the intersection form that recovers the Jones and Alexander invariants, using relation \eqref{eq:2}, so we have: \begin{equation}\label{eq:33} \Omega(\beta_n)(q,d)=\Gamma_2(\beta_n)(u,x,y,d)|_{x=q^{2};y=-d;u=q^{-1}d^{-1}}. \end{equation} Then, using relation \ref{eqC:3} we conclude that the intersection form $\Omega(\beta_n)(q,d)$ recovers the Alexander and Jones polynomials: \begin{equation}\label{eqC:33} \begin{aligned} &J(L,q)= \Omega(\beta_n)|_{d=q^{-2}}\\ &\Delta(L,q)=\left(\frac{1}{d+1}\Omega(\beta_n)\right)|_{d=-1}. \end{aligned} \end{equation} Further on, we use the quotient morphism: $$- : \mathbb Z[q^{\pm 1}, d^{\pm 1}]\rightarrow \mathbb Z[q^{\pm 1}, d^{\pm 1}]/\left( (d+1)(dq^2-1)\right).$$ Following relation \eqref{eqC:33} and the formula of this quotient, we see that the image of the interection form in the ring $\mathbb L$ still recovers the Jones and Alexander polynomials of the closure: \begin{equation}\label{eqC:333} \begin{aligned} &J(L,q)= \bar{\Omega}(\beta_n)|_{d=q^{-2}}\\ &\Delta(L,q)=\left(\frac{1}{d+1}\bar{\Omega}(\beta_n)\right)|_{d=-1}. \end{aligned} \end{equation} This shows that the condition \eqref{eq:1} from the statement holds. The main part that needs to be discussed concerns the invariance of the form $\bar{\Omega}(\beta_n)(q,d)$ with respect to the braid representative of a link. We will show this invariance by checking the independence of the formula with respect to the two Markov moves. \end{comment} \section{Introduction}\label{introduction} Jones and Alexander polynomials are two knot invariants which were defined initially by different tools, but can both be described from skein theory and also representation theory of the quantum group $U_q(sl(2))$ (\cite{RT}, \cite{ADO}). However, from the geometric perspective, the Alexander polynomial is well understood in terms of knot complements but there is an important open problem to describe the Jones polynomial by such means. Further on, categorifications for these two invariants provided by Khovanov homology and Heegaard Floer homology proved to be powerful tools, but which have different natures. It is an important problem to provide geometric type categorifications for the Jones polynomial and also to relate such theory to knot Floer homology (\cite{Ras}, \cite{D}, \cite{SM}). Bigelow \cite{Big} provided the first topological model for the Jones polynomial, as a graded intersection of submanifolds in configuration spaces, using the homological representations of braid groups introduced by \cite{Law}. They proved the invariance this model for the Jones polynomial using skein relations. In \cite{Cr} we constructed a graded intersection pairing in a configuration space, associated to a braid and taking values in the Laurent polynomial ring in two variables, which recovers the (coloured) Jones polynomial and (coloured) Alexander polynomial through specialisations of coefficients to polynomials in one variable. Based on this result, we pose the following question: which is the smallest ring in which this topological model provides link invariants? In this paper we show that it is necessary to quotient by a quadratic relation and in this case this construction provides a {\em topological model} for an {\em interpolation between Jones and Alexander polynomials}, constructed in a quotient of the Laurent polynomial ring by a quadratic relation. \subsection{Main result} For $n,m \in \mathbb N$, we consider $C_{n,m}$ to be the unordered configuration space of $m$ points in the $n$-punctured disc. We will construct two graded intersections in such configuration spaces in the punctured disc: $\Omega(\beta_n), \Omega'(\beta_n) \in \mathbb Z[x^{\pm1},d^{\pm 1}]$ for $\beta_n \in B_n$, which will be parametrised by the intersection points between two fixed Lagrangian submanifolds, graded in a certain way. The construction of the Lagrangians is done by fixing a collection of arcs/ circles in the punctured disc, taking their product and consider its image in the quotient to the unordered configuration space. In order to answer the problem coming from \cite{Cr}, we compute an example (Section \ref{S:3}) and remark that in order to obtain invariants from these topological models we should quotient the Laurent polynomial ring by a quadratic relation and work in this quotient (denoted by $\mathbb L$). Further on we proceed as follows. \begin{itemize} \item[•] We prove by {topological and homological techniques} that the intersection form $\Omega(\beta_n)$ becomes {invariant under the Markov moves in this quotient $\mathbb L$}, so it gives a {well defined link invariant}. \item[•] Then, we compute these two intersection forms $\Omega'(\beta_n)$ and $\Omega(\beta_n)$ in this quotient. \end{itemize} The main results that we we obtain are the following. \begin{itemize} \item[•] The open intersection form $\Omega'$ becomes an {\em interpolation between Jones and Alexander polynomials} given directly by a {\em graded intersection of two Lagrangians in a configuration space}, over the quotient ring $\mathbb L$. \item[•] We provide an {\em intrinsic homological construction of the Jones polynomial} and a {purely homological proof that it is a well-defined link invariant} (using the intersection $\Omega$). \item[•] Also, we obtain {\em general method for checking invariance under the Markov moves} of constructions based on {\em Lawrence type representations}. \end{itemize} \subsection{Description of the models} For the first intersection model, $\Omega(\beta_n)$, we start with $\mathscr S$ and $\mathscr T$ which are the Lagrangian submanifolds given by the collections of red arcs and green circles from the left hand side of figure \ref{IntroL}, in the configuration space of $n$ points in the $(3n)$-punctured disc. The second intersection pairing, $\Omega'(\beta_n)$, is constructed using the Lagrangian submanifolds encoded by the collections of red arcs and green circles from the right hand side of figure \ref{IntroL}, $\mathscr S'$ and $\mathscr T'$, seen in the configuration space of $n-1$ points in the $(3n-2)$-punctured disc. $$ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathscr S,\mathscr T \subseteq \text{Conf}_{n}(\mathscr D_{3n}) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathscr S',\mathscr T'\subseteq \text{Conf}_{n-1}(\mathscr D_{3n-2}) \ \ \ \ \ \ \ \ \ \ $$ \vspace{-10mm} \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.305]{Diffeotwo.pdf} \vspace{-3mm} \hspace{-10mm}\caption{Closed intersection $\Omega(\beta_n)$ \hspace{35mm} Open intersection $\Omega'(\beta_n)$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\label{IntroL} \end{figure} \end{center} \vspace{-10mm} We denote by $\mathbb I_{m}$ the trivial braid with $m$ strands. For the next part, we see the braid groups $B_{3n}$ and $B_{3n-2}$ as the mapping class groups of the $(3n)-$punctured disc and $(3n-2)-$punctured disc respectively. This will lead to two well-defined Lagrangians: $$(\beta_n\cup \mathbb I_{2n}) \ \mathscr S \subseteq C_{3n,n}; \ \ \ (\beta_n\cup \mathbb I_{2n-2}) \ \mathscr S' \subseteq C_{3n-2,n-1}$$ which are associated to a braid $\beta_n\in B_n$. We consider the sets of intersections: \begin{equation} I_{\beta_n}=(\beta_n \cup \mathbb I_{2n}) \mathscr S\cap \mathscr T; \ \ \ I'_{\beta_n}=(\beta_n \cup \mathbb I_{2n-2}) \mathscr S'\cap \mathscr T'. \end{equation} Then, we present two graded intersections, denoted by $\langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle$ and $\langle (\beta_n \cup \mathbb I_{2n-1}) \mathscr S', \mathscr T' \rangle$, which are parametrised by the set of intersection points between the above Lagrangians and graded using a local system, as presented in relation \eqref{int}. \begin{defn}(Graded intersections)\label{defn} Let us consider the following polynomials: $$\Omega(\beta_n)(x,d), \Omega'(\beta_n)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}],$$ which are defined from graded intersections using the Lagrangian submanifolds from picture \ref{IntroL}: \begin{equation} \begin{aligned} & \Omega(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n}{2}} \cdot d^{-n}\langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle\\ & \Omega'(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n-1}{2}} \cdot d^{-(n-1)}\langle (\beta_n \cup \mathbb I_{2n-1}) \mathscr S', \mathscr T' \rangle. \end{aligned} \end{equation} Here, $w(\beta_n)$ is the writhe of the braid $\beta_n$. We call $\Omega(\beta_n)(x,d)$ the graded intersection associated to the closed model and $\Omega'(\beta_n)(x,d)$ the graded intersection corresponding to the open model. \end{defn} We denote by $\tilde{J}(L)$ the normalised Jones polynomial and by $J(L)$ the un-normalised version of the Jones polynomial of the link $L$. In \cite{Cr}, we have proved that the open intersection model recovers the Jones and Alexander polynomials of the closure of the braid, through the following specialisations of coefficients: \begin{equation}\label{eq:1} \begin{aligned} &\Omega'(\beta_n)(x,d)|_{x=d^{-1}}=\tilde{J}(\hat{\beta}_n,x)\\ &\Omega'(\beta_n)|_{d=-1}=\Delta(\hat{\beta}_n,x). \end{aligned} \end{equation} Using that, we deduce that the closed intersection form recovers the Jones polynomial of the closure through the specialisation: \begin{equation} \begin{aligned} &\Omega(\beta_n)(x,d)|_{x=d^{-1}}=J(\hat{\beta}_n,x). \end{aligned} \end{equation} Let $\mathbb L:=\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right)$ and consider the quotient morphism: $$- : \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]\rightarrow \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right).$$ \vspace{-7mm} \begin{thm}(Invariant in the quotient ring)\label{THEOREM} The ring $\mathbb L$ is the largest quotient of $\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]$ such that the image of the intersection form $\Omega(\beta_n)$ in this quotient becomes a link invariant. More precisely, let us denote the image of the graded intersection in this quotient ring by: \begin{equation} \bar{\Omega}(\beta_n)(x,d) \in \mathbb Z[x^{\pm\frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right) \end{equation} Then $\bar{\Omega}(L)(x,d):=\bar{\Omega}(\beta_n)(x,d)$ is a well defined link invariant for an oriented link $L$ which is the closure of $\beta_n$. Also, if $\mathbb L'$ is a quotient of the Laurent polynomial ring in which $\Omega(\beta_n)$ becomes a link invariant then the quotient onto $\mathbb L'$ factors through $\mathbb L$. \end{thm} The proof of this result is topological. We use homological tools in order to prove that $\bar{\Omega}(\beta_n)$ is invariant under the two Markov moves. In the next part we want to understand this invariant, which takes values in the quotient of the Laurent polynomial ring. For the following part, we use algebraic arguments and, starting from the fact that the two intersection models recover Jones and Alexander polynomials, we conclude that in the quotient ring they have to be interpolations between these two invariants, as below. \begin{thm}(The closed intersection model as the Jones polynomial)\label{THEOREM3} \begin{equation} \bar{\Omega}(L)(x,d)=(d+1)\cdot \tilde{J}(L)(x) \text{ in } \mathbb L. \end{equation} \end{thm} \begin{thm}(The open intersection model interpolates between the Jones and Alexander polynomials)\label{THEOREM2} The open model gives a well defined invariant in the quotient, which is given by: \begin{equation} \bar{\Omega}'(L)(x,d)=\Delta(L)(x)+(d+1) \cdot \frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)} \text{ in } \mathbb L. \end{equation} \end{thm} \subsection{Further work} {\bf Categorifications} One motivation for this research direction concerns the description of geometrical type categorifications for Jones and Alexander polynomials and relations between them (such as spectral sequences \cite{Ras}, \cite{D}, \cite{SM}). We expect that there is a categorification procedure from the specialised open model $\bar{\Omega}'(L)_{d=-1}$ which gives knot Floer homology (for knots, the geometric supports of the Lagrangians from our picture are Heegaard diagrams). We are interested in studying this machinery directly at the interpolation level $\bar{\Omega}'(L)$ (over $\mathbb L$), where we have a grading for the intersection points given by two variables. In particular, we are interested in investigating the grading for this interpolation model, which is geometrically described as in section \ref{S:1}, and relating this to the grading from the Floer homology picture and certain gradings for possible geometrical categorifications for the Jones polynomial. {\bf Twisted invariants from Lawrence representations} This work is also part of a wider joint work with Fathi Ben Aribi (\cite{Fathi}) where we aim to define twisted invariants for knots starting from twisted Lawrence type representations. In section \ref{S:3} we see that the intersection form $\bar{\Omega}$ is given also by a {\em sum of traces of Lawrence representations} and we prove that this is in turn {\em invariant under Markov moves}. This provids a {\em method for checking Markov moves on constructions defined using Lawrence type representations}. This method is a starting point in this joint work, where we aim to check Markov moves for twisted versions of Lawrence representations. \subsection*{Structure of the paper} In Section \ref{S:1} we present the grading procedure and the construction of the two intersection models in the configuration space. Then, in Section \ref{S:2} we discuss the relation between these intersection models and two state sums of Lagrangian intersections, defined using pairings between Lawrence representations, from \cite{Cr2}. In Section \ref{S:3}, we compute the closed model $\Omega$ for the unknot and stabilised unknot and deduce that in order to have invariance we need a quadratic relation. Section \ref{S:4} is devoted to the proof of the invariance of the closed intersection $\Omega$ under the Markov moves (in the quotient ring). After that, in Section \ref{S:5} we show that these two models become interpolations of Jones and Alexander polynomials in the quotient. In the last section we compute the open intersection model for the trefoil knot and check that it is given by the above interpolation. \subsection{Acknowledgements} I would like to thank Rinat Kashaev very much for discussions concerning the form of these intersection models in the quotient ring and the conclusion that they are the above interpolations between Jones and Alexander polynomials. I acknowledge the support of SwissMAP, a National Centre of Competence in Research funded by the Swiss National Science Foundation. \section{Notations} We start with the quotient ring: \begin{equation} \mathbb L=\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right). \end{equation} \begin{rmk} Looking at $\mathbb L$ as an algebra over $\mathbb Z[x^{\pm\frac{1}{2}}]$, we have a basis given by: $$\{d^{i} \mid 0\leq i\leq 1\}.$$ In other words, the powers of $d$ which are bigger than $2$ can be expressed in terms of the above basis. For example, we have: \begin{equation}\label{relations} \begin{aligned} &d^{2}=x^{-1}d-d+x^{-1}\\ &d^3=(x^{-2}-x^{-1}+1)d+x^2-x^{-1}. \end{aligned} \end{equation} \end{rmk} \begin{notation}\label{ind} For a set of indices $\bar{i}=(i_1,...,i_n)$ where $i_1,...,i_n\in \{0,1\}$ we denote the symmetric set of indices by: \begin{equation} 1-\bar{i}:=(1-i_n,...,1-i_1). \end{equation} Also, we will change the coefficients for certain modules, using the following definition. \begin{notation}\label{N:spec} Let $R$ be a ring and consider $M$ an $R$-module which has a basis $\mathscr B$. We consider $S$ to be another ring and let us suppose that we have a specialisation of coefficients, given by a morphism: $$\psi: R \rightarrow S.$$ The specialisation of the module $M$ by the morphism $\psi$ is the following $S$-module: $$M|_{\psi}:=M \otimes_{R} S.$$ It will have a basis described by: $$\mathscr B_{M|_{\psi}}:=\mathscr B \otimes_{R}1 \in M|_{\psi}. $$ \end{notation} \end{notation} \begin{defn}(Specialisations of coefficients towards one variable)\label{N} We consider two specialisations of coefficients, given by: \begin{equation} \begin{aligned} \psi_{J}: \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/& \left((d+1)(dx-1) \right) \rightarrow \mathbb Z[x^{\pm \frac{1}{2}}]\\ &\psi_{J}(d)=x^{-1}; \psi_{J}(x)=x. \end{aligned} \end{equation} \begin{equation} \begin{aligned} \psi_{\Delta}: \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/&\left((d+1)(dx-1) \right)\rightarrow \mathbb Z[x^{\pm \frac{1}{2}}]\\ &\psi_{\Delta}(d)=-1; \psi_{\Delta}(x)=x. \end{aligned} \end{equation} \end{defn} We will use these two changes of coefficients $\psi_{J}$ and $\psi_{\Delta}$ in order to pass from the intersection form from the quotient ring in two variables $\mathbb L$ towards the Jones polynomial and Alexander polynomial respectively. \begin{figure}[H] \begin{center} \begin{tikzpicture} [x=1.2mm,y=1.4mm] \node (b1) at (44,0) {$\mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b5) at (0,0) {$\mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b4) at (22,15) {$\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right)$}; \node (s1) at (0,6) {$d=x^{-1}$}; \node (s2) at (44,6) {$d=-1$}; \draw[<-] (b1) to node [left,yshift=-2mm,font=\large]{$\psi_{\Delta}$} (b4); \draw[<-] (b5) to node [right,yshift=-2mm,font=\large] {$\psi_{J}$} (b4); \end{tikzpicture} \end{center} \end{figure} \section{Definition of the intersection forms}\label{S:1} For $n,m\in \mathbb N$ we consider the unordered configuration space of $m$ points in the $n$-punctured disc and denote it by $C_{n,m}:=\mathrm{Conf}_{m}(\mathscr D_{n}).$ We consider a collection of base points $d_1,...,d_m \in \mathscr D_n$ and the associated base point in the configuration space ${\bf d}=\{d_1,...,d_m\}\in C_{n,m}$. \vspace{-1mm} \begin{center} \begin{tikzpicture}[scale=0.95] \foreach \x/\y in {-0.3/2,2/2,4/2,2/1,2.5/1,3/1.06} {\node at (\x,\y) [circle,fill,inner sep=1pt] {};} \node at (-0.1,2.6) [anchor=north east] {$1$}; \node at (2.2,2.6) [anchor=north east] {$i$}; \node at (4.2,2.6) [anchor=north east] {$n$}; \node at (3,2) [anchor=north east] {$\sigma_i$}; \node at (2.2,1) [anchor=north east] {$\tiny \mathrm d_1$}; \node at (2.8,1) [anchor=north east] {$\tiny \mathrm d_2$}; \node at (3.6,1) [anchor=north east] {$\tiny \mathrm d_m$}; \node at (2.63,2.3) [anchor=north east] {$\wedge$}; \draw (2,1.8) ellipse (0.4cm and 0.8cm); \draw (1.9,1.8) ellipse (3.65cm and 1.65cm); \foreach \x/\y in {7/2,9/2,11/2,8.9/1,9.5/1,10/1.07} {\node at (\x,\y) [circle,fill,inner sep=1pt] {};} \node at (7.2,2.6) [anchor=north east] {$1$}; \node at (9.2,2.6) [anchor=north east] {$i$}; \node at (11.2,2.6) [anchor=north east] {$n$}; \node at (9.2,1) [anchor=north east] {$\tiny \mathrm d_1$}; \node at (9.8,1) [anchor=north east] {$\tiny \mathrm d_2$}; \node at (10.6,1) [anchor=north east] {$\tiny \mathrm d_m$}; \node at (9,1.5) [anchor=north east] {$\delta$}; \draw (9.4,1.8) ellipse (3.65cm and 1.65cm); \draw (9.5,1) arc[radius = 3mm, start angle= 0, end angle= 180]; \draw [->](9.5,1) arc[radius = 3mm, start angle= 0, end angle= 90]; \draw (8.9,1) to[out=50,in=120] (9.5,1); \draw [->](8.9,1) to[out=50,in=160] (9.25,1.12); \end{tikzpicture} \end{center} \begin{notation} We start with the abelianisation map $ab: \pi_1(C_{n,m}) \rightarrow H_1(C_{n,m})$. Then, for any for any $m\geq 2$ we have: \begin{equation*} \begin{aligned} H_1(C_{n,m}) \ & \simeq \ \ \ \ \mathbb Z^{n} \ \ \oplus \ \ \mathbb Z \\ & \hspace{6mm} \langle ab(\Sigma_i)\rangle \ \ \langle ab(\Delta)\rangle, \ {i\in \{1,...,n\}}. \end{aligned} \end{equation*} More specifically, the generators of the first group, $\mathbb Z^{n}$, are given by classes of loops defined by the property that their first component goes around one of the puncture $p_i$ and the other components are constant: $\Sigma_i(t):=\{ \left(\sigma_i(t), d_2,...,d_m \right) \}, t \in [0,1].$ The generator of the second group is the class of a loop $\Delta$ which swaps the first two base points: $\Delta(t):=\{ \left(\delta(t), d_3,...,d_m \right) \}, t \in [0,1].$ \end{notation} For the next part we fix $l \in \mathbb N$ such that $l \leq n$. We will continue with a morphism which distinguish between the $n$ punctures, by separating them into two sets: $n-l$ black punctures and $l$ blue punctures, as in figure \ref{Localsystem}. Further on, for orientation purposes, we also fix a number $k\in \{0,...,n-l\}$. \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.27]{Localsystem.pdf} \hspace{-10mm}\caption{Local system }\label{Localsystem} \end{figure} \end{center} \vspace{-8mm} \begin{defn}(Local system)\label{localsystem} For $l \in \{1,...,n\}$ and $k \in \{0,...,n-l\}$, we define the following morphism: \begin{equation} \begin{aligned} & \ \hspace{-6mm} \text{ab} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ f\\ \phi: \pi_1\left(C_{n,m} \right) \ \rightarrow \ & \ \mathbb Z^{n-l} \oplus \mathbb Z^{l} \oplus \mathbb Z \ \rightarrow \ \mathbb Z \ \oplus \mathbb Z \oplus \mathbb Z\\ & \langle [\sigma_i] \rangle \ \ \langle [\gamma_j]\rangle \ \ \langle [\delta]\rangle \ \ \ \ \langle x \rangle \ \ \langle y \rangle \ \ \langle d \rangle\\ &{i\in \{1,...,n-l\}}, j\in \{1,...,l\}\\ &\ \hspace{-28mm} \phi=f \circ ab. \end{aligned} \end{equation} Here, the morphism $f$ is defined as augmentations on the first two factors as follows: \begin{equation} \begin{cases} &f(\sigma_i)=x, i\in \{1,...,n-k-l\}\\ &f(\sigma_i)=-x, i\in \{n-k-l+1,...,n-l\}\\ &f(\gamma_j)=y, j\in \{1,...,l\}\\ &f(\delta)=d. \end{cases} \end{equation} \end{defn} \subsection{The open and closed intersection forms} In the next part we present the grading procedures that will be used for the definition of the two graded intersections. For $\Omega$, we will work in the setting from definition \ref{localsystem} where the ambient space and the parameters $n,l,k$ are: $$\Big(C_{3n,n}=\mathrm{Conf}_{n}(\mathscr D_{3n}), n\rightarrow 3n, l\rightarrow n, k\rightarrow n \Big).$$ For $\Omega'$ we will use the following data: $$\Big(C_{3n-2,n-1}=\mathrm{Conf}_{n-1}(\mathscr D_{3n-2}), n\rightarrow 3n-2, l\rightarrow n-1, k\rightarrow n-1 \Big).$$ The construction of the graded intersection $\Omega'$ is precisely the one presented in \cite{Cr}, for the case where the colour $N=2$. This is parametrised by the set of intersection points between the two Lagrangians: \begin{equation} I'_{\beta_n}:=(\beta_n \cup \mathbb I_{2n-1}) \mathscr S'\cap \mathscr T' \end{equation} together with a grading coming from a certain local system defined on the configuration space. For the closed model $\Omega$, the intersection will be defined in an analog manner, where we add one particle in our configuration space, as below. \subsubsection{Grading for $\Omega$} Let us fix $\beta_n \in B_n$. Using the property that the braid group is the mapping class group of the punctured disc, we act with such a braid (to which we add $2n$ trivial strands) on $\mathscr S$ and consider the submanifold: $$(\beta_n \cup \mathbb I_{2n}) \mathscr S \subseteq C_{3n,n}$$ We choose a representative of this action such that it is supported in a grey disk around the punctures labeled by $\{1,...,n\}$, and also such that the above submanifold is a Lagrangian submanifold, as discussed in \cite{Cr} Section 2.2. Further on, we define the graded intersection pairing, which is generated by the set of intersection points, denoted by: \begin{equation} I_{\beta_n}:=(\beta_n \cup \mathbb I_{2n}) \mathscr S\cap \mathscr T \end{equation} and graded by the above local system. The grading procedure will be done by associating to each intersection point $\bar{x}$ a loop $l_{\bar{x}}$ in the configuration space, which will be evaluated by the morphism $\phi$: $$x \in I_{\beta_n} \ \ \rightsquigarrow \ \ l_{\bar{x}} \ \ \rightsquigarrow \ \ \phi(l_{\bar{x}}).$$ In order to prescribe the loop, we use a base point which is chosen on the submanifold $\mathscr S$, and we denote it as ${\bf d}:=(d^1,...,d^{n})$, using picture \ref{Diffeo}. Let us denote by $s\mathscr S, s\mathscr T \subseteq \mathscr D_{3n}$ the collections of $n$ red curves and $n$ green circles which give the geometric supports for $\mathscr S$ and $\mathscr T$. \begin{defn}(Paths to the base points) For the next part, we fix a set of $n$ paths in the punctured disc which connect the red curves with the left hand side of the circles, as in figure \ref{Diffeo}, and denoted them by $\eta_1,...,\eta_{n}$. Similarly, we consider a collection of paths $\eta'_1,...,\eta'_{n}$ which start from the red curves and end on the right hand side of the circles.\end{defn} \vspace{-3mm} \begin{figure}[H] \centering \includegraphics[scale=0.4]{Diffeo.pdf} \vspace{-1mm} \caption{Braid action} \label{Diffeo} \end{figure} \begin{defn}(Loop associated to an intersection point) Let $\bar{x}=(x_1,...,x_{n}) \in I_{\beta_n}$. The loop, based in $\bf{d}$, will be constructed in two steps. For the first part, we fix $k \in \{1,...,n\}$ and use the $k^{th}$ green circle which goes around the punctures $(k, 2n+1-k)$. There is exactly one component of $\bar{x}$, denoted by $x_{\iota(k)}$, which belongs to this circle. If $x_{\iota(k)}$ is in the left hand side of the punctured disc, we define $\bar{\nu}^k$ to be the path (in the punctured disc) which starts from $d^k$ following $\eta_k$ and then continue on the green curve until it reaches the point $x_{\iota(k)}$, as in figure \ref{Picture1}. If $x_{\iota(k)}$ is on the right hand side of the punctured disc, then we do a similar procedure and define a path $\bar{\nu}^k$ by using the path $\eta'_k$ to begin with, and then go to the intersection point following part of the green circle. \begin{figure}[H] \centering \includegraphics[scale=0.4]{Pathsbasepoints.pdf} \caption{Paths from the base points}\label{Picture1} \end{figure} \vspace{-33mm} $$\eta_k \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \eta'_k \ \ \ \ \ \ \ \ \ \ $$ \vspace{20mm} \clearpage Doing this construction for all $k\in \{1,...,n\}$ we get a collection of $n$ paths in the punctured disc. Now we consider the path in the configuration space from $\bf d$ to $\bar{x}$ given by the union of these paths: \begin{equation} \bar{\gamma}_{\bar{x}}:= \{\bar{\nu}^1,...,\bar{\nu}^{n}\}. \end{equation} For the second part of the construction, we start from the components of $\bar{x}$ and we go back to the base points in the punctures disc using the red arcs. More precisely, each component $x_k$ of $\bar{x}$ belongs to a unique red arc, denoted by $j(k)$. Let $\nu_k$ be the path in the punctured disc starting in $x_k$ and ending in $d^{j(k)}$ following the $j(k)^{th}$ red curve. Now, we look at the path in the configuration space from $\bar{x}$ to $\bf{d}$ given by this collection of paths, and denote it as below: \begin{equation} \gamma_{\bar{x}}:= \{\nu^1,...,\nu^{n}\}. \end{equation} Now we define the loop associated to the intersection point $\bar{x}$ (base in $\bf d$) as the composition of the two previous paths: \begin{equation} l_{\bar{x}}:=\gamma_{\bar{x}} \circ \bar{\gamma}_{\bar{x}}. \end{equation} \end{defn} \subsection{Graded intersections} In this part we recall the definition of the graded intersection defined in \cite{Cr}. After that, we consider a smaller local system and use that to define the graded intersection which we use for the main result. \begin{defn}\label{D:int0} We consider a graded intersection $\ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg \ \in \mathbb Z[x^{\pm1},y^{\pm 1},d^{\pm 1}]$, which is parametrised by the intersection points and graded using the associated loops and the local system as below: \begin{equation}\label{int0} \ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg:= \sum_{\bar{x}\in I_{\beta_n}} \epsilon_{x_1}\cdot...\cdot \epsilon_{x_n}\cdot \phi(l_{\bar{x}}). \end{equation} In this formula $\epsilon_{x_i}$ is the sign of the local intersection between the circle and the red curve that $x_i$ belongs to, in the punctured disc. \end{defn} For the grading procedure that we need for this model, we will use a further quotient which is defined as follows: \begin{equation} \begin{aligned} F:~ & \mathbb Z[x^{\pm1},y^{\pm1},d^{\pm1}] \rightarrow \mathbb Z[x^{\pm1},d^{\pm1}]\\ & \hspace{-5mm}\begin{cases} F(x)=x; \\ F(y)=-d; F(d)=d. \end{cases} \end{aligned} \end{equation} \begin{defn}(Change of coefficients) Let us define the morphism $\tilde{\phi}$ which is obtained from $\phi$ but takes values in the group ring $\mathbb Z[\mathbb Z \oplus \mathbb Z \oplus \mathbb Z]\simeq \mathbb Z[x^{\pm1},y^{\pm1},d^{\pm1}]$ and the grading obtained from $\tilde{\phi}$ by taking the quotient using $F$: \begin{equation} \begin{aligned} &\varphi:\pi_1(C_{n,m})\rightarrow \mathbb Z[x^{\pm1},d^{\pm1}]\\ &\varphi=F \circ \tilde{\phi}. \end{aligned} \end{equation} \end{defn} \begin{defn}(Grading)\label{D:int} Let us define the following graded intersection: \begin{equation}\label{int} \begin{aligned} & \langle (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \rangle \in \mathbb Z[x^{\pm1},d^{\pm 1}]\\ &\langle (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \rangle:= \sum_{\bar{x}\in I_{\beta_n}} \epsilon_{x_1}\cdot...\cdot \epsilon_{x_{n}}\cdot \varphi(l_{\bar{x}}). \end{aligned} \end{equation} \end{defn} We remark that: \begin{equation*} \begin{aligned}\label{eq:2} \langle (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \rangle=&~F\left(\ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg\right)=\\ &=~\ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg |_{y=-d}. \end{aligned} \end{equation*} In the next part we use this graded intersection in order to define two intersection models: one which is associated to the total closure of a braid and another one which corresponds the closure which leaves the first strand open. \begin{center} $\mathscr S,\mathscr T \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mathscr S',\mathscr T'$ \begin{figure}[H] \centering \includegraphics[scale=0.3]{Diffeotwo.pdf} \hspace{-10mm}\caption{Closed up intersection $\Omega(\beta_n)$ \hspace{30mm} Open intersection $\Omega'(\beta_n)$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\label{Openmodel} \end{figure} \end{center} \begin{defn}(Graded intersections)\label{defn} Let us consider the following polynomials: $$\Omega(\beta_n)(x,d), \Omega'(\beta_n)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}],$$ which are obtained from graded intersections coming from the the Lagrangian submanifolds form picture \ref{Openmodel}, and are given by the below formulas. \begin{equation} \begin{aligned} & \Omega(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n}{2}} \cdot d^{-n}\langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle\\ & \Omega'(\beta_n)(x,d):=(d^2x)^{\frac{w(\beta_n)+n-1}{2}} \cdot d^{-(n-1)}\langle (\beta_n \cup \mathbb I_{2n-1}) \mathscr S, \mathscr T \rangle. \end{aligned} \end{equation} We call $\Omega(\beta_n)(x,d)$ the graded intersection associated to the closed up model and $\Omega'(\beta_n)(x,d)$ the graded intersection corresponding to the open model. \end{defn} \section{Description of the closed and open graded intersections in terms of state sums}\label{S:2} In this part we present a different description of $\Omega(\beta_n)$ and $\Omega'(\beta_n)$, as a state sums of Lagrangian intersections following \cite{Cr}. \subsubsection{Homological representations}\label{homclasses} We will use the structure of certain Lawrence representations which are presented in \cite{Cr1} and \cite{CrM}. They are braid group representations on certain subspaces in the homology of a $\mathbb Z \oplus \mathbb Z$-covering of the configuration space $C_{n,m}$, which are generated by certain classes. For the following definitions we consider the parameter $l=0$. Let us look at the local system $\phi$ from definition \ref{localsystem}, where we replace the variable $d$ with a variable which we call $d'$ (this is for a sign reason that we will see later on), and denote it by $\phi'$. \begin{equation}\label{eq:23} \begin{aligned} \phi': \pi_1(C_{n,m}) \rightarrow \ & \mathbb Z \oplus \mathbb Z\\ & \langle x \rangle \ \langle d' \rangle\\ \end{aligned} \end{equation} Let $\tilde{C}_{n,m}$ be the $\mathbb Z \oplus \mathbb Z$-covering associated to $\phi'$. \begin{comment} \begin{itemize} \item[1)] Lawrence representations $H_{n,m}$ are $\mathbb Z[x^{\pm 1},d^{\pm 1}]$-modules that carry a $B_n$-action. \item[2)] Dual Lawrence representations $H^{\partial}_{n,m}$ which are $\mathbb Z[x^{\pm 1},d^{\pm 1}]$. \item[3)] Intersection pairing $ \lll, \ggg : H_{n,m} \otimes H^{\partial}_{n,m}\rightarrow \mathbb Z[x^{\pm 1},d^{\pm1}]$. \end{itemize} \end{comment} Let $w$ be a point on the boundary of the punctured disc and denote by $C_{w}$ the part of the boundary of the configuration space $C_{n,m}$ which is given by configurations containing $w$. Let $\bar{C}_{w}$ be the complement of $C_{w}$ in the boundary of the configuration space. Then, let $\pi^{-1}({w})$ be the part of the boundary of the covering $\tilde{C}_{n,m}$ given by the fiber over $C_{w}$. In the next part we consider part of the Borel-Moore homology of this covering which comes from the Borel-Moore homology of the base space twisted by the local system $\phi'$. \begin{prop}(\cite{Cr1}) Let $H^{\text{lf}}_m(\tilde{C}_{n,m},\pi^{-1}(w); \mathbb Z)$ be the Borel-Moore homology of the covering relative to part of the boundary given by $\pi^{-1}(w)$, which is a $\mathbb Z[x^{\pm1}, d'^{\pm1}]$-module via the group of deck transformations. Then there is a well defined braid group action which is compatible with the structure of a $\mathbb Z[x^{\pm1}, d'^{\pm1}]$-module: $$B_n \curvearrowright H^{\text{lf}}_m(\tilde{C}_{n,m},\pi^{-1}(x); \mathbb Z) \ (\text{as a }\mathbb Z[x^{\pm1}, d'^{\pm1}]\text{-module}).$$ \end{prop} \begin{notation} Let $H^{\partial}_{m}(\tilde{C}_{n,m}, \partial^{-}; \mathbb Z)$ the homology relative to the boundary of $\tilde{C}_{n,m}$ which is not in the fiber over $w$. \end{notation} \begin{prop}(\cite{CrM} Theorem E)\label{R:D} Let $H^{\text{lf}}_m(C_{n,m}, C_{w}; \mathscr L_{\phi})$ and $H_{m}(\tilde{C}_{n,m}, \bar{C}_{w}; \mathscr L_{\phi})$ be the Borel-Moore homology and the homology of the base space relative to the boundary, with coefficients in the local system associated to $\phi'$ (which we denote by $\mathscr L_{\phi}$). Then, we have natural injective maps, which are compatible with the braid group actions as below: \begin{equation} \begin{aligned} &\iota: H^{\text{lf}}_m(C_{n,m}, C_{w}; \mathscr L_{\phi})\rightarrow H^{\text{lf}}_m(\tilde{C}_{n,m}, \pi^{-1}({w});\mathbb Z)\\ &\iota^{\partial}: H_{m}(\tilde{C}_{n,m}, \bar{C}_{w}; \mathscr L_{\phi}) \rightarrow H^{\partial}_{m}(\tilde{C}_{n,m}, \partial^{-}; \mathbb Z). \end{aligned} \end{equation} \end{prop} \begin{notation}(Our homology groups)\label{R:1} We denote the images of the maps $\iota$ and $\iota^{\partial}$ by: \begin{equation} \begin{aligned} & H_{n,m}\subseteq H^{\text{lf}}_m(\tilde{C}_{n,m}, \pi^{-1}({w});\mathbb Z)\\ & H^{\partial}_{n,m}\subseteq H^{\partial}_{m}(\tilde{C}_{n,m}, \partial^{-}; \mathbb Z). \end{aligned} \end{equation} \end{notation} Also, let us consider the following set of partitions: \begin{equation} E_{n,m}=\{\bar{j}=(j_1,...,j_{n}) \mid j_1,...,j_{n} \in \mathbb Z, \ j_1+...+j_{n}=m \}. \end{equation} In the following part we consider a family of homology classes in the above homology groups, which will be given by lifts of submanifolds in the base configuration space. These submanifolds will be encoded by ``geometric supports'' which are collections of curves in the punctured disc. For this part, we fix $d_1,...,d_m$ on the boundary of the punctured disc and ${\bf d}:=(d_1,...,d_m)$ a base point in the configuration space. Moreover, let us fix $\tilde{\bf d}$ to be a lift of this base point in the covering $\tilde{C}_{n,m}$. \begin{defn}[Homology classes] Let $\bar{j}=(j_1,...,j_{n}) \in E_{n,m}$. The product of ordered configuration spaces on the geometric support from picture \ref{fig3}, whose number of particles is given by the partition $\bar{j}$, quotiented to the unordered configuration space $C_{n,m}$, gives a submanifold: $$\mathbb U_{\bar{j}}\subseteq C_{n,m}.$$ Then, in order to lift this submanifold in the covering, we will use ``paths to the base points'' which are collections of arcs in the punctured disc, from the base points towards the geometric support. More precisely, the collection of dotted paths from the base points towards the arcs from figure \ref{fig3} gives a path in the configuration space $\eta_{\bar{j}}$ from $\bar{d}$ to $\mathbb U_{\bar{j}}$. Then we lift this path to a path $\tilde{\eta}_{\bar{j}}$ through the base point $\tilde{\bf{d}}$. Now, we lift the submanifold $\mathbb U_{\bar{j}}$ to a submanifold $\tilde{\mathbb U}_{\bar{j}}$ through $\tilde{\eta}_{\bar{j}}(1)$. We consider the homology class given by this submanifold and denote it by: \begin{equation} \mathscr U'_{j_1,...,j_{n}}:=[\tilde{\mathbb U}_{\bar{j}}] \in H_{n,m}. \end{equation} \end{defn} \begin{figure}[H] \begin{center} \begin{tikzpicture}\label{pic'} [x=50 mm,y=10mm,font=\large] \foreach \x/\y in {-1.2/2, 0.4/2 , 1.3/2 , 2.5/2 , 3.6/2 } {\node at (\x,\y) [circle,fill,inner sep=1.3pt] {};} \node at (-1.2,2) [anchor=north east] {$w$}; \node at (0.6,2.5) [anchor=north east] {$1$}; \node at (0.2,1.65) [anchor=north east] {$\color{black!50!red}\eta^{\bar{j}}_1$}; \node at (1.5,1.6) [anchor=north east] {$\color{black!50!red} \eta^{\bar{j}}_{j_1}$}; \node at (3.7,1.7) [anchor=north east] {$\color{black!50!red} \eta^{\bar{j}}_{m}$}; \node (dn) at (8.3,1.5) [anchor=north east] {\large \color{black!50!red}$\eta_{\bar{j}}=(\eta^{\bar{j}}_1,...,\eta^{\bar{j}}_m)$}; \node at (2,5.2) [anchor=north east] {\Large \color{black!50!red}$\tilde{\eta}_{\bar{j}}$}; \node at (4.3,2.5) [anchor=north east] {n}; \node at (0.8,0.8) [anchor=north east] {\bf d$=$}; \node at (0.8,4.4) [anchor=north east] {\bf $\bf \tilde{d}$}; \node at (0.3,2.6) [anchor=north east] {$\color{black!50!red}\text{Conf}_{j_1}$}; \node at (3.6,2.6) [anchor=north east] {$\color{black!50!red}\text{Conf}_{j_{n}}$}; \node at (2.1,3) [anchor=north east] {\Large{\color{black!50!red}$\mathbb U_{\bar{j}}$}}; \node at (2.1,6.2) [anchor=north east] {\Large{\color{black!50!red}$\tilde{\mathbb U}_{\bar{j}}$}}; \node at (-2.5,2) [anchor=north east] {\large{$C_{n,m}$}}; \node at (-2.5,6) [anchor=north east] {\large{$\tilde{C}_{n,m}$}}; \draw [very thick,black!50!red,-][in=-160,out=-10](-1.2,2) to (0.4,2); \draw [very thick,black!50!red,->] [in=-158,out=-18](-1.2,2) to (3.6,2); \draw[very thick,black!50!red] (2.82, 5.6) circle (0.6); \draw (2,2) ellipse (3.25cm and 1.35cm); \draw (2,5.4) ellipse (3cm and 1.11cm); \node (d1) at (1.3,0.8) [anchor=north east] {$d_1$}; \node (d2) at (1.9,0.8) [anchor=north east] {$d_{j_1}$}; \node (dn) at (2.8,0.8) [anchor=north east] {$d_m$}; \draw [very thick,dashed, black!50!red,->][in=-60,out=-190](1.2,0.7) to (-0.2,1.9); \draw [very thick,dashed,black!50!red,->][in=-70,out=-200](1.3,0.7) to (0,1.9); \draw [very thick,dashed,black!50!red,->][in=-90,out=0](2.5,0.7) to (3,1.8); \draw [very thick,dashed,black!50!red,->][in=-70,out=-200](0.8,4.4) to (3,5); \end{tikzpicture} \end{center} \vspace{-6mm} \caption{Generators for the homology group $H_{n,m}$} \label{fig3} \end{figure} \begin{prop}[Version of the Lawrence representation]\label{gen} Following \cite{CrM}, this set of homology classes: \begin{equation} \mathscr{B}_{H_{n,m}}=\{ \mathscr U'_{j_1,...,j_{n}} \mid j_1,...,j_{n} \in \mathbb N, j_1+...+j_{n}=m\} \end{equation} forms a basis for $H_{n,m}$ and there is a braid group action, denoted by: $$L_{n,m}: B_n\rightarrow \mathrm{Aut}_{\mathbb Z[x^{\pm 1},d^{\pm 1}]}\left(H_{n,m}\right).$$ We called this the Lawrence representation. \end{prop} \begin{prop}(\cite{CrM}) There is a well defined intersection pairing between the two homology groups as follows: $$\lll \ , \ \ggg:H_{n,m} \otimes H_{n,m}^{\partial}\rightarrow \mathbb Z[x^{\pm 1}, d^{\pm 1}].$$ In this formula $d$ should be thought as $-d'$ and we make this change for computational reasons, as we will see below. \end{prop} This intersection pairing is defined at the level of homology groups, but it can be computed using the geometric supports, the paths to the base points and the local system, in the base configuration space. The precise formula is presented in \cite{Cr1} Proposition 4.4.2. For homology classes which are given by lifts of the geometric supports that we will work with, the formula for the pairing $\lll , \ggg$ at the homological level is actually the same formula as the one for the graded intersection $\ll , \gg$ from definition \ref{int0} in the situation where $l=0$. \subsubsection{Our context} Now we present a way to see our Lagrangian intersection through a state sum of intersection pairings between homology clsses belonging to these homology groups. This is based on two Theorems from \cite{Cr}, which we remind below. Let us fix $n\in \mathbb N$. \subsubsection{Open model} First, we work with the configuration space $C_{2n-1,n-1}$ and the associated homology groups, where the parameter $k=n-1$. For any multi-index $\bar{i}=(i_1,...,i_{n-1}), i_k \in \{0,1\}, k\in \{1,...,n-1\}$ we look at the two homology classes $\mathscr F'_{\bar{i}} \in H_{2n-1,n-1}, \mathscr L'_{\bar{i}}\in H^{\partial}_{2n-1,n-1}$ obtained by the lifts of the geometric supports together with the paths to the base points from the picture below: \begin{center} ${\color{red} \mathscr F'_{\bar{i}} \in H_{2n-1,n-1}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\color{dgreen} \mathscr L'_{\bar{i}}\in H^{\partial}_{2n-1,n-1}}.$ \begin{figure}[H] \centering \includegraphics[scale=0.4]{Picturethreee.pdf} \caption{State sum model}\label{Statesum'} \vspace{-25mm} $$\hspace{15mm} {\color{red}\eta^{F'_{\bar{i}}}} \hspace{53mm} {\color{dgreen}\eta^{L'_{\bar{i}}} }\hspace{14mm}$$ \vspace{2mm} \end{figure} \end{center} \begin{defn}[Specialisations]\label{D:1'''} Let $c \in \mathbb Z$ and consider the morphism: \begin{equation} \begin{aligned} &\gamma_{c,q,\lambda}: \mathbb Z[u^{\pm 1},x^{\pm1},d^{\pm1}]\rightarrow \mathbb Z[q^{\pm 1},q^{\pm \lambda}]\\ & \gamma_{c,q,\lambda}(u)= q^{c \lambda}; \ \ \gamma_{c,q,\lambda}(x)= q^{2 \lambda}; \ \ \gamma_{c,q,\lambda}(d)=q^{-2}. \end{aligned} \end{equation} \end{defn} Using the relations $(5.13),(5.14)$ from the proof of Theorem $5.1$ and Theorem $3.2$ from \cite{Cr}, we have the following model. \begin{thm}[Unified embedded state sum model \cite{Cr}]\label{Thstate'} Let $L$ be an oriented link and $\beta_n \in B_n$ such that $L=\hat{\beta}_n$. Let us consider the polynomial in $3$ variables given by the following state sum: \begin{equation}\label{Fstate'} \begin{aligned} \Lambda'_2(\beta_n)(u,x,d)&:=u^{-w(\beta_n)} u^{-(n-1)} \sum_{i_1,...,i_{n-1}=0}^{1} d^{-\sum_{k=1}^{n-1}i_k} \\ &\lll (\beta_{n} \cup {\mathbb I}_{n-1} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg \ \in \mathbb Z[u^{\pm1},x^{\pm 1},d^{\pm 1}]. \end{aligned} \end{equation} Then we have: \begin{equation}\label{eq:4'} \Omega'(\beta_n)=\Lambda'_2(\beta_n)|_{u=d^{-1}x^{-\frac{1}{2}}}. \end{equation} Moreover, this intersection pairing specialises to the normalised Jones polynomial and the Alexander polynomial of the closure of the braid, as below: \begin{equation}\label{eqC:3'} \begin{aligned} &\Omega'(\beta_n)|_{x=q^{2};d=q^{-2}}=\tilde{J}(L,q)\\ &\Omega'(\beta_n)|_{d=-1}=\Delta(L,x). \end{aligned} \end{equation} \end{thm} \subsubsection{Closed model} For the second model, we work with the configuration space $C_{2n,n}$ and the homology groups associated to the parameter $k=n$. For any multi-index $\bar{i}=(i_1,...,i_{n}), i_k \in \{0,1\}, k\in \{1,...,n\}$ we consider the homology classes obtained by the lifts of the following geometric supports: \begin{center} ${\color{red} \mathscr F_{\bar{i}} \in H_{2n,n}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{ and }\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\color{dgreen} \mathscr L_{\bar{i}}\in H^{\partial}_{2n,n}}.$ \begin{figure}[H] \centering \includegraphics[scale=0.4]{Picturethree.pdf} \caption{State sum model-closed version}\label{Statesum} \vspace{-25mm} $$\hspace{15mm} {\color{red}\eta^{F_{\bar{i}}}} \hspace{53mm} {\color{dgreen}\eta^{L_{\bar{i}}} }\hspace{14mm}$$ \vspace{2mm} \end{figure} \end{center} By a similar method as the one used for Theorem \ref{Thstate'}, we deduce a state sum description for the closed intersection model, as follows. \begin{coro}[Unified embedded state sum model- closed version]\label{Thstate''} Let $L$ be an oriented link such that $L=\hat{\beta}_n$ for $\beta_n \in B_n$. Let us consider the following state sum: \begin{equation}\label{Fstate} \begin{aligned} \Lambda_2(\beta_n)(u,x,d)&:=u^{-w(\beta_n)} u^{-n} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \\ &\lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F_{\bar{i}}}, {\mathscr L_{\bar{i}}}\ggg \ \in \mathbb Z[u^{\pm1},x^{\pm 1},d^{\pm 1}]. \end{aligned} \end{equation} Then we have: \begin{equation}\label{eq:4} \Omega(\beta_n)=\Lambda_2(\beta_n)|_{u=d^{-1}x^{-\frac{1}{2}}}. \end{equation} \end{coro} This intersection corresponds to the quantum trace from the Reshetikhin-Turaev construction of $U_q(sl(2))$-quantum invariants. This means that for generic $q$ it leads to the un-normalized Jones polynomial. However, for $q$ a root of unity, it vanishes, this being a consequence of the vanishing of quantum dimensions at roots of unity. This shows the following property. \begin{coro} The closed intersection pairing specialises to the un-normalised Jones polynomial of the closure of the braid, and vanished for the specialisation of coefficients associated to roots of unity, as below: \begin{equation}\label{eqC:3} \begin{aligned} &\Omega(\beta_n)|_{x=q^{2}, d=q^{-2}}=J(L,q)\\ &\Omega(\beta_n)|_{d=-1}=0. \end{aligned} \end{equation} \end{coro} \section{Unknot and the stabilised unknot}\label{S:3} In this section we investigate the necessary conditions on the ring of coefficients such that the intersection model leads to a link invariant. Let us start with the unknot, seen as the closure of the following braids: $\mathbb I_1\in B_1$ and $ \sigma \in B_2$. Now we compute the intersection model, which is obtained from the intersection points between the following Lagrangian submanifolds: \begin{figure}[H] \centering \includegraphics[scale=0.4]{Exampleunlink.pdf} \caption{Unknot \hspace{50mm} Stabilised unknot} \end{figure} Computing the grading of these intersection points from the picture, we obtain the coefficients from below: \begin{center} \hspace{15mm}\label{tabel} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | } \hline $x_1$ & $(x_2)$\\ \hline $d$ & $1$\\ \hline \hline \end{tabular}} \quad \hspace{20mm}{\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | } \hline $(x_1,z_1)$ & $(x_2,z_1)$ & $(x_3,z_1)$ & $(x_4,z_2)$ \\ \hline $d^2$ & $d$ & $-dx^{-1}$ & $d^{-1}x^{-1}$ \\ \hline \hline \end{tabular}} \end{center} This means that the intersection form has the following formulas: \begin{equation} \begin{aligned} &\Omega(\mathbb I_1)=x^{\frac{1}{2}}(1+d)\\ &\Omega(\sigma)=dx^{\frac{3}{2}}(d^{2}+d-dx^{-1}+d^{-1}x^{-1}). \end{aligned} \end{equation} In order to obtain from $\Omega$ a link invariant, this should be the same for these two braids, which give the same knot by braid closure, so the following relation should be true: \begin{equation} \Omega(\mathbb I_1)=\Omega(\sigma). \end{equation} Using the formulas for the two intersections, we obtain the following relation: \begin{equation} d^{2}x+dx-d-1=0 \end{equation} which is equivalent to: \begin{equation} (d+1)(dx-1)=0. \end{equation} This shows that $\mathbb L=\mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right)$ is the largest quotient in which the intersection form can become a link invariant. \section{Invariance under the Markov moves} \label{S:4} In this part we prove that it is enough to quotient towards $\mathbb L$ in order to have a link invariant. More specifically, we will present a topological proof of the invariance of the closed model $\bar{\Omega}(L)$. We split the proof into two main steps. \begin{itemize} \setlength\itemsep{-0.2em} \item[•] The first step concerns the invariance with respect to the Markov II move. For this, we compute the intersection pairing $\Omega(\beta_n)$ before and after pursuing a stabilisation move, and show that the two formulas become equal if we impose the relation $(d+1)(dx-1)=0$ (which means precisely to consider the quotient morphism and work over $\mathbb L$). \item[•]Secondly, we prove that the intersection form is invariant with respect to the Markov I move. We do this by proving that if we pass to the quotient $\mathbb L$, the image $\bar{\Omega}(\beta_n)$ can be interpreted as a sum of traces of braid group representations. Then we conclude that this sum is invariant with respect to braid conjugation. \end{itemize} \subsection{Markov II} In this part we want to prove that the intersection $\bar{\Omega}$ is invariant at stabilisations: \begin{equation} \bar{\Omega}(\beta_n)=\bar{\Omega}(\sigma^{\pm1}_n\circ \beta_n). \end{equation} We will do this by checking this move on the state sum $\Lambda_2$ and see which relation is needed in order to obtain the same result before and after the stabilisation. Following relation \eqref{Fstate} we have: \begin{equation}\label{equations} \begin{aligned} &\Lambda_2(\beta_n)(u,x,d)=u^{-w(\beta_n)} u^{-n} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg.\\ &\Lambda_2(\sigma^{\pm1}_n\circ\beta_n)(u,x,d)=u^{-w(\sigma^{\pm1}_n\circ\beta_n)} u^{-(n+1)} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k}\cdot \\ &\hspace{15mm}\cdot \left(\lll (\sigma^{\pm1}_n\circ\beta_{n} \cup {\mathbb I}_{n+1} ){ \mathscr F'_{\bar{i},0}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1}\lll (\sigma^{\pm1}_n\circ\beta_{n} \cup {\mathbb I}_{n+1} ){ \mathscr F'_{\bar{i},1}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{aligned} \end{equation} In the next part, for a set of indices $\bar{j}=(j_1,...,j_n)$ we denote their sum by: $$w(\bar{j}):=j_1+...+j_n.$$ Now we fix an index $\bar{i}$ and we look at the terms from the above state sums that are associated to this index. From the structure of the homology group $H_{2n,m}$ for $m=w(\bar{i})$ presented in Proposition \ref{gen}, there exists a collection of coefficients $\alpha_{\bar{j}}\in \mathbb Z[x^{\pm1}, d^{\pm1}]$ such that: \begin{equation}\label{coeff2} (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j},1-\bar{i}} \end{equation} (here we used the notation \ref{ind}). Then, in the first state sum, the term associated to the index $\bar{i}$ can be expressed as: \begin{equation} d^{-m}\sum_{\substack{\bar{j}\in E_{n,m}}} \alpha_{\bar{j}} \cdot \lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg. \end{equation} For the next part we are interested in the intersection with the dual class. \begin{prop} We have the following property of the intersection form: \begin{equation}\label{prop} \hspace{-3mm}\lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg=\begin{cases} 1, \text{ if } (j_1,...,j_{n})=(i_1,...,i_{n})\\ 0, \text{ otherwise}. \end{cases} \end{equation} \end{prop} The proposition follows by an analog argument as the one from Lemma 7.7.1 from \cite{Cr1}. This shows that if $$\lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg\neq 0$$ then we have to have $\bar{j}=\bar{i}$. So, in the first state sum, associated to the index $\bar{i}$ we have: \begin{equation}\label{1} \alpha_{\bar{i}} \cdot \lll \mathscr U'_{\bar{i},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg. \end{equation} For the next part we look at the classes from the second state sum (which are associated to a set of $(n+1)$ indices). Using relation \eqref{coeff2} we have the decomposition from below: \begin{equation}\label{coeff3} \left((\beta_{n}\cup{\mathbb I})\cup {\mathbb I}_{n+1}\right){ \mathscr F'_{\bar{i},\epsilon}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j},\epsilon,1-\epsilon,1-\bar{i}}, \forall \epsilon \in \{0,1\}. \end{equation} Then, in the second state sum, the term associated to the index $\bar{i}$ has the following formula: \begin{equation} d^{-m}\sum_{\substack{\bar{j}\in E_{n,m}}} \alpha_{\bar{j}} \cdot \left(\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{j},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1} \lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{j},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{equation} We remark that the $(\sigma^{\pm1}_n\cup {\mathbb I}_{n+1})$-action on $\mathscr U'_{\bar{j},0,1,1-\bar{i}}$ will be a linear combination of classes which correspond to indices that have the first components $j_1,...,j_{n-1}$. Just the indices which are associated to the $n^{th}$ and $(n+1)^{st}$ positions can be modified. Since we are intersecting with the dual class $\mathscr L'_{\bar{i},0}$, using the property from relation \eqref{prop}, we conclude that the above intersections give a non-trivial term just in the situation where: \begin{equation} (j_1,...,j_{n-1})=(i_1,...,i_{n-1}). \end{equation} Since $j_1+...+j_n=i_1+...+i_n=m$, we conclude that actually the two indexing sets have to coincide: \begin{equation} (j_1,...,j_{n})=(i_1,...,i_{n}), \text{ and so } \bar{j}=\bar{i}. \end{equation} As a conclusion, in the second state sum, corresponding to the index $\bar{i}$ we have: \begin{equation}\label{2} \alpha_{\bar{i}} \cdot \left(\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1} \lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{equation} Putting together relations \eqref{equations}, \eqref{1} and \eqref{2} we conclude that the invariance at the Markov II move is true if for any $\bar{i}=(i_1,...,i_n)$ with $i_1,...,i_n\in \{0,1\}$: \begin{equation} \begin{aligned} &\lll \mathscr U'_{\bar{i},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg=\\ &=u^{\mp-1} \cdot \left(\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg + d^{-1} \lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg \right). \end{aligned} \end{equation} On the other hand, all the coefficients that appear at the intersections $$\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{i},0,1,1-\bar{i}}, {\mathscr L'_{\bar{i},0}}\ggg \text { and }\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{n+1}) \mathscr U'_{\bar{j},1,0,1-\bar{i}}, {\mathscr L'_{\bar{i},1}}\ggg$$ come from the intersection points which belong to the two inner green circles, all the other points contribute by coefficients which are $1$. From this remark, we conclude that is enough to check the Markov II move for braids with two strands (which correspond to $n=1$). This means that the following condition should be satisfied: \begin{equation} \begin{aligned} &\lll \mathscr U'_{i,1-i}, {\mathscr L'_{i}}\ggg=\\ &=u^{\mp-1} \cdot \left(\lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{i,0,1,1-i}, {\mathscr L'_{i,0}}\ggg + d^{-1} \lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{i,1,0,1-i}, {\mathscr L'_{i,1}}\ggg \right). \end{aligned} \end{equation} for any $i\in \{0,1\}$. So, we have two conditions: \begin{equation}\label{conditions} \hspace{-3mm}\begin{cases} \begin{aligned} \lll \mathscr U'_{0,1},& {\mathscr L'_{0}}\ggg=\\ &=u^{\mp-1}\left(\lll (\sigma^{\pm}\cup {\mathbb I}_{2}) \mathscr U'_{0,0,1,1}, {\mathscr L'_{0,0}}\ggg + d^{-1} \lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{0,1,0,1}, {\mathscr L'_{0,1}}\ggg \right).\\ \lll \mathscr U'_{1,0},& {\mathscr L'_{1}}\ggg=\\ &=u^{\mp-1}\left(\lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{1,0,1,0}, {\mathscr L'_{1,0}}\ggg + d^{-1} \lll (\sigma^{\pm1}\cup {\mathbb I}_{2}) \mathscr U'_{1,1,0,0}, {\mathscr L'_{1,1}}\ggg \right). \end{aligned} \end{cases} \end{equation} For the left hand side of the above equations, we have the intersections from below: \begin{figure}[H] \centering $$ \ \ \ \ \ \lll \mathscr U'_{0,1}, {\mathscr L'_{0}}\ggg=1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll \mathscr U'_{1,0}, {\mathscr L'_{1}}\ggg=1 \ \ \ \ \ \ $$ \hspace{-3mm}\includegraphics[scale=0.4]{Stabilisation10.pdf} \caption{Coefficients before the stabilisation} \end{figure} In the following part we investigate the conditions from relation \eqref{conditions} for two cases, given by positive stabilisation or the negative stabilisation. \subsubsection{Positive stabilisation} We compute the intersections which appear in condition \eqref{conditions} for the case when we act with the positive generator $\sigma$. We have the following intersections: \begin{figure}[H] \centering $$\lll (\sigma\cup {\mathbb I}_{2}) \mathscr U'_{0,0,1,1}, {\mathscr L'_{0,0}}\ggg=1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma\cup {\mathbb I}_{2}) \mathscr U'_{1,0,1,0}, {\mathscr L'_{1,0}}\ggg=0$$ \includegraphics[scale=0.3]{Stabilisation1.pdf} $$\lll (\sigma^{\pm1}_n\cup {\mathbb I}_{2}) \mathscr U'_{0,1,1,0}, {\mathscr L'_{0,1}}\ggg=1-x^{-1} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma \cup {\mathbb I}_{2}) \mathscr U'_{1,1,0,0}, {\mathscr L'_{1,1}}\ggg=d^{-1}x^{-1}$$ \caption{Coefficients of the positive stabilisation} \end{figure} We obtain the system: \begin{equation} \begin{cases} 1=u^{-2}\left(1+d^{-1}(1-x^{-1})\right)\\ 1=u^{-2}d^{-2}x^{-1}. \end{cases} \end{equation} This is equivalent to: \begin{equation} \begin{cases} 1=d^2x\left(1+d^{-1}(1-x^{-1})\right)\\ u^{-2}=d^2x. \end{cases} \end{equation} Then, the first condition becomes: \begin{equation} \begin{aligned} 1=d^2x+dx-d & \Leftrightarrow \ \ d^2x-1+dx-d=0 \ \ \Leftrightarrow \ \ dx(d+1)-(d+1)=0 \ \ \Leftrightarrow\\ & \Leftrightarrow (d+1)(dx-1)=0. \end{aligned} \end{equation} This is precisely the condition that we have in the quotient ring, so this equation is satisfied. For the second one, we choose $u=d^{-1}x^{-\frac{1}{2}}$, which is precisely the specialisation used in relation \eqref{eq:4}. \subsubsection{Negative stabilisation} In this part we investigate the invariance at the negative stabilisation and check relations \eqref{conditions} in this situation. We have the coefficients given by the following intersections: \begin{figure}[H] \centering $$\lll (\sigma^{-1}\cup {\mathbb I}_{2}) \mathscr U'_{0,0,1,1}, {\mathscr L'_{0,0}}\ggg=1 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma^{-1}\cup {\mathbb I}_{2}) \mathscr U'_{1,0,1,0}, {\mathscr L'_{1,0}}\ggg=1-x$$ \includegraphics[scale=0.3]{Stabilisation2.pdf} $$\lll (\sigma^{-1}_n\cup {\mathbb I}_{2}) \mathscr U'_{0,1,1,0}, {\mathscr L'_{0,1}}\ggg=0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \lll (\sigma^{-1} \cup {\mathbb I}_{2}) \mathscr U'_{1,1,0,0}, {\mathscr L'_{1,1}}\ggg=dx$$ \caption{Coefficients of the negative stabilisation} \end{figure} We obtain the relations: \begin{equation} \begin{cases} 1=1+d^{-1}\cdot 0\\ 1=1-x+d^{-1}(dx). \end{cases} \end{equation} These are both true, so we conclude that the negative stabilisation is always satisfied (even before we quotient to the quotient ring). This concludes the invariance of the intersection $\bar{\Omega}(\beta_n)$ with respect to the second Markov move. For the intersection form $\Omega'(\beta_n)$ we can pursue an analog argument, this time having $n-1$ particles in the configuration space, and conclude in a similar way that $\bar{\Omega}'(\beta_n)$ is invariant at stabilisations. \subsection{Markov I} In this part we aim to prove the invariance of the form $\bar{\Omega}$ with respect to braid conjugation. Let $\beta_n,\gamma_n \in B_n$. We want to show that: \begin{equation}\label{eq:3} \bar{\Omega}\left(\beta_n\right))(x,d)=\bar{\Omega}\left(\gamma_n \circ \beta_n \circ \gamma^{-1}_n\right)(x,d). \end{equation} We follow the formula presented in Corollary \ref{Thstate''}, use the intersection form $\Lambda_2(\beta_n)(u,x,d)$ and prove that after we take the quotient it becomes invariant under conjugation. We notice that the writhe and number of strands remain unchanged under conjugation, so the framing part from $\Lambda_2(\beta_n)(u,x,d)$ (which is given by the power of $u$) is invariant under conjugation. We will show that if we impose the condition $(d-1)(xd-1)=0$ then $\Lambda_2(\beta_n)(u,x,d)$ is invariant under conjugation. Our strategy is to prove that this state sum specialised by the above condition can be seen as a sum of traces of braid group representations, which in turn are conjugacy invariant. We start by introducing the following subspace in the Lawrence representation. \begin{defn}(Subspace in the Lawrence representation) Let us consider the set of partitions from $E_{n,m}$ with multiplicities at most one: \begin{equation} E^{1}_{n,m}=\{\bar{j}=(j_1,...,j_{n}) \mid j_1,...,j_{n} \in \mathbb Z, j_1+...+j_{n}=m, 0 \leq j_1,...,j_{n} \leq 1\}. \end{equation} Then, we consider the subspace $H^{1}_{n,m}\subseteq H_{n,m}$ generated by classes which are prescribed by such partitions, as below: \begin{equation} H^{1}_{n,m}=\langle \mathscr U'_{j_1,...,j_{n}} \mid \bar{j}=(j_1,...,j_{n}) \in E^{1}_{n,m}\rangle_{\mathbb Z[x^{\pm1},d^{\pm1}]}. \end{equation} \end{defn} As we will see in the next part, this subspace is not preserved by the braid group action given by the Lawrence representation on $H_{n,m}$. However, if we impose the extra relation, then the subspace will be preserved and we will have a well defined sub-representation. \begin{lem}[Sub-representation of the Lawrence representation] We consider the quotient morphism $s:\mathbb Z[x^{\pm1},d^{\pm1}]\rightarrow\mathbb Z[x^{\pm1},d^{\pm1}]/((d-1)(xd-1)).$ Then there is a well defined induced representation of the braid group on the following subspace: \begin{equation} B_n\curvearrowright H^{1}_{n,m}|_{s} \end{equation} (here, we use notation \ref{N:spec}). \end{lem} \begin{proof} We have to prove that for all $\bar{j}=(j_1,...,j_n)\in E^{1}_{n,m}$ and any $\beta_n\in B_n$ we have: $$\beta_n \mathscr U'_{j_1,...,j_{n}} \in H^{1}_{n,m}|_{s}.$$ It is enough to show this for the generators of the braid group and moreover, since the action of such generator is local and acts non-trivially just on a disc around two punctures, it is enough to check this in that punctured disc with two punctures. Let $j_0,j_1\in \{0,1\}$ and denote $j_0+j_1=m$. Then we will prove that: $$\sigma \mathscr U'_{j_0,j_{1}} \in H^{1}_{2,m}|_{s}.$$ If $j_1=0$, looking directly on the picture we see that we obtain another basis element associated to a partition without multiplicities. The only check that needs to be done is for $j_1=1$. The only case when we could get a multiplicity at least $2$ is if $j_0=1$. Using the structure of $H_{2,m}$, we know that in this homology group we have a decomposition: \begin{equation} \sigma \mathscr U'_{1,1}=\alpha_1 \mathscr U'_{1,1}+ \alpha_2 \mathscr U'_{0,2} + \alpha_3 \mathscr U'_{2,0}. \end{equation} \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decomposition.pdf} \vspace{-3mm} $$\sigma \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{0,2} \ \ \hspace{24mm} \ \mathscr U'_{2,0} $$ \caption{Coefficients} \end{figure} Now, intersecting with a dual class whose support has two semi-circles which start from the upper boundary of the disc and go around the first puncture, we see that all intersections vanish except the one with the class $\mathscr U'_{2,0}$-which is $1$. This shows that the coefficient $\alpha_3=0$. In the next part we compute the coefficient $\alpha_2$. We do this by intersecting with the dual class given by the following green barcode: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decomposition1.pdf} \vspace{-3mm} $$ \ \ \hspace{54mm} \ 0 \ \ \hspace{29mm} \ 1 \ \ \hspace{24mm} $$ \caption{Computing $\alpha_2$} \end{figure} \begin{figure}[H] \centering \includegraphics[scale=0.7]{Decomposition2.pdf} \caption{Coefficients $\sigma$} \end{figure} \begin{center} \label{tabel} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | } \hline $(x_1,z_2)$ & $(x_1,z'_2)$ & $(x_2,z_1)$ & $(x_2,z'_1)$ \\ \hline $1$ & $-x^{-1}$ & $d$ & $-x^{-1}d^{-1}$ \\ \hline \hline \end{tabular}} \end{center} It follows that the coefficient is: \begin{equation} \alpha_2=1+d-(x^{-1}+x^{-1}d^{-1})=(1+d)(1-x^{-1}d^{-1}). \end{equation} In order to compute the coefficient $\alpha_1$, we intersect with the barcode from the picture below: \begin{figure}[H] \centering \includegraphics[scale=0.7]{Decomposition3.pdf} \caption{Computing $\alpha_1$} \end{figure} \begin{center} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | } \hline $(x_1,z_2)$ & $(x_1,z'_2)$ & $(x_2,z_1)$ \\ \hline $1$ & $-x^{-1}$ & $d$ \\ \hline \hline \end{tabular}} \end{center} It follows that: \begin{equation} \alpha_1=1-x^{-1}+d. \end{equation} So, we have the decomposition: \begin{equation} \sigma \mathscr U'_{1,1}=(1-x^{-1}+d) \mathscr U'_{1,1}+ (1+d)(1-x^{-1}d^{-1}) \mathscr U'_{0,2}. \end{equation} It follows that if we impose the relation $(1+d)(1-x^{-1}d^{-1})$, the coefficient $\alpha_2$ vanishes. This shows that $\sigma \mathscr U'_{1,1} \in H^1_{2,2}|_s$, so we remain in the homological subspace given by multiplicity free partitions. In the next part we do the same procedure for the action of the elementary braid $\sigma^{-1}$. Similar to the previous case, the only situation that we need to check is given by the action on the class $\mathscr U'_{1,1}$ and we have a decomposition as below: \begin{equation} \sigma^{-1} \mathscr U'_{1,1}=\alpha'_1 \mathscr U'_{1,1}+ \alpha'_2 \mathscr U'_{0,2} + \alpha'_3 \mathscr U'_{2,0}. \end{equation} It is clear that we have the coefficient $\alpha'_2=0$, because we cannot get a geometric support with multiplicity two that ends in the second puncture. So, we have the following classes that appear in the decomposition: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decompositioninv.pdf} \vspace{-3mm} $$\sigma^{-1} \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{1,1} \ \ \hspace{24mm} \ \mathscr U'_{2,0} \ \ \ \ $$ \caption{Coefficients $\sigma^{-1}$} \end{figure} First of all, we want to compute $\alpha_1'$. In order to do this, we intersect with the following barcode: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decompositioninv1.pdf} \vspace{-3mm} $$ \ \ \hspace{18mm} \ xd \ \ \hspace{29mm} \ 1 \ \ \hspace{24mm} $$ \caption{Computing $\alpha'_1$} \end{figure} Computing the coefficients from the two intersections, we obtain: \begin{equation} \alpha'_1=xd. \end{equation} Further on, we want to find $\alpha_3'$. We intersect with the following barcode: \begin{figure}[H] \centering \includegraphics[scale=0.3]{Decompositioninv2.pdf} \vspace{-3mm} $$\hspace{17mm} 1+d \ \ \hspace{24mm} \ 1+d \ \ \hspace{27mm} \ 1 \ \ \hspace{20mm} $$ \caption{Computing $\alpha'_3$} \end{figure} This shows the following relation: \begin{equation} 1+d=(1+d)\alpha'_1+\alpha'_3. \end{equation} From the previous two equations we conclude that: \begin{equation} \alpha'_3=1+d-(1+d)xd=(1+d)(1-xd). \end{equation} This shows that if we pass to the quotient and impose this relation, then we remain in the subspace: $$\sigma^{-1} \mathscr U'_{1,1} \in H^1_{2,2}|_s.$$ This concludes the proof that the subspace $H_{n,m}^1$ remains invariant under the braid group action once we specialise the coefficients via the function $s$. \end{proof} \begin{notation}[Lawrence sub-representation] We denote this well defined sub-representation by: \begin{equation} L^1_{n,m}: B_n\rightarrow \mathrm{Aut}\left(H^{1}_{n,m}|_{s}\right). \end{equation} \end{notation} Now we are ready to show that the $s$-specialised intersection form is invariant under conjugation. We remind the formula \eqref{Fstate}: \begin{equation} \begin{aligned} \Lambda_2(\beta_n)(u,x,d)&:=u^{-w(\beta_n)} u^{-n} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \\ &\lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg \ \in \mathbb Z[u^{\pm1},x^{\pm 1},d^{\pm 1}]. \end{aligned} \end{equation} In the next part, we will show that the state sum $\Lambda_2$ can be interpreted using these Lawrence subrepresentations. \begin{prop} The state sum of intersections is a sum of traces of Lawrence sub-representations, as below: \begin{equation}\label{traceformula} \begin{aligned} \sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg|_{s} ~=\sum_{m=0}^{n} d^{-m} \ tr(L^1_{n,m}(\beta_n)). \end{aligned} \end{equation} \end{prop} \begin{proof} The state sum from the left hand side can be expressed as: \begin{equation}\label{relstate} \begin{aligned} &\sum_{i_1,...,i_{n}=0}^{1} d^{-\sum_{k=1}^{n}i_k} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg=\\ &=\sum_{m=0}^{n} d^{-m} \sum_{\bar{i}=(i_1,...,i_{n})\in E_{n,m}^1} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg. \end{aligned} \end{equation} Now, using the structure of the homology group $H_{2n,m}$ from proposition \ref{gen}, for $\bar{i}\in E_{n,m}^1$ there exists a collection of coefficients $\alpha_{\bar{j}} \in \mathbb Z[x^{\pm1},d^{\pm1}]$ such that: \begin{equation}\label{coeff1} L_{2n,m}(\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j},1-\bar{i}} \end{equation} (following notation \ref{ind}). This comes from the fact that on the last components we act with ${\mathbb I}_{n}$, so we do not change the associated indices of $\mathscr F'_{\bar{i}}$ through this action and so they remain $1-\bar{i}$. On the other hand, we will obtain a linear combination of classes associated to partitions whose first components are $\bar{j}$ for arbitrary $\bar{j}=(j_1,...,j_n)$. Since the Lawrence representation preserve the total sum of indices, it follows that we will get classes associated to $\bar{j}$ such that $$w(\bar{j})=w(\bar{i})=m.$$This explains relation \eqref{coeff1}. For the intersection with the dual class, we remind relation \eqref{prop}: \begin{equation} \hspace{-3mm}\lll \mathscr U'_{\bar{j},1-\bar{i}}, {\mathscr L'_{\bar{i}}}\ggg=\begin{cases} 1, \text{ if } (j_1,...,j_{n})=(i_1,...,i_{n})\\ 0, \text{ otherwise}. \end{cases} \end{equation} So, the pairing with the dual class $\mathscr L'_{\bar{i}}$ encodes precisely the diagonal coefficient and for any $\bar{i}\in E_{n,m}^{1}$ we have: \begin{equation}\label{diagonalelement} \begin{aligned} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg ~=\sum_{\substack{\bar{j}= (j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \lll \mathscr U'_{\bar{j},1-\bar{i}}, \mathscr L'_{\bar{i}}\ggg~=\alpha_{\bar{i}} . \end{aligned} \end{equation} On the other hand, we remark that these $\alpha$-coefficients are the same as the ones that give the decomposition of the $\beta_n$-action on the basis element $\mathscr U'_{\bar{i}}$ from the homology group $H_{n,m}$: \begin{equation} L_{n,m}(\beta_{n}){ \mathscr U'_{\bar{i}}}=\sum_{\substack{\bar{j}=(j_1,...,j_{n})\in E_{n,m}}}\alpha_{\bar{j}} \cdot \mathscr U'_{\bar{j}}. \end{equation} We notice that the above sum is indexed by elements from $E_{n,m}$, not necessarily from $E^{1}_{n,m}$. From the relation \eqref{diagonalelement} we see that for any index $\bar{i}\in E_{n,m}^{1}$ the pairing $$\lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg$$ encodes precisely the coefficient of the homology class $\mathscr U'_{\bar{i}}$ that appear in the decomposition of $L_{n,m}(\beta_{n}){ \mathscr U'_{\bar{i}}}$. Now we specialise through $s$ and use the property that we have a well defined action $L^1_{n,m}$ on the subspace $H^1_{n,m}$ (which is spanned by all $\mathscr U'_{\bar{j}}$ for $\bar{j}\in E_{n,m}^{1}$). From these remarks we obtain that: \begin{equation} \begin{aligned} \sum_{\bar{i}=(i_1,...,i_{n})\in E_{n,m}^1} \lll (\beta_{n} \cup {\mathbb I}_{n} ){ \mathscr F'_{\bar{i}}}, {\mathscr L'_{\bar{i}}}\ggg|_{s}&=\sum_{\bar{i}=(i_1,...,i_{n})\in E_{n,m}^1} \alpha_{\bar{i}} \ =\\ &= tr \left(L^1_{n,m}(\beta_n)\right). \end{aligned} \end{equation} This together with relation \eqref{relstate} conclude the trace formula interpretation for the state sum, as presented in the statement. \end{proof} Using the property that the trace is invariant under conjugation together with relation \eqref{Fstate'} and \eqref{traceformula} we conclude that when we impose relation $(1+d)(xd-1)$ the state sum $\Lambda_2$ is invariant at conjugation. This shows that $\bar{\Omega}$ is invariant at conjugation as well and so the first Markov move is satisfied. Following the invariance of $\bar{\Omega}$ with respect to the two Markov moves, we conclude that it gives a well-defined link invariant with values in $\mathbb L$, and conclude Theorem \ref{THEOREM}. \section{Formulas for these invariants as interpolations of Jones and Alexander polynomials} \label{S:5} This section arose from joint discussions with Rinat Kashaev, and I would like to thank him for this. In this part, we consider algebraic varieties which are quotients of the Laurent polynomial ring by the product of two irreducible factors without multiplicity. Then, if we have an invariant taking values in this algebraic variety, and we consider its specialisations associated to the two irreducible factors then this invariant in the variety is forced to be an interpolation between these two specialisations. Let us make it precise for our cases. So far we have the intersection form $\bar{\Omega}$ which we know is a link invariant. We want to describe the precise form of this invariant. We will see that the fact that $\bar{\Omega}(\beta_n)(x,d)$ recovers the Jones polynomial and vanishes through the second specialisation of coefficients forces it to be a multiple of the Jones polynomial. On the other hand, something interesting happens with the open intersection form. In the second part of this section we will see that the fact that $\bar{\Omega}'(\beta_n)(x,d)$ is an element in the quotient ring which recovers the Jones and Alexander polynomials through the two specialisations forces it to be a specific interpolation between the Jones and Alexander polynomials. \subsection{The closed model in the quotient ring} Following Corollary \ref{Thstate''} and Definition \ref{N} we have: \begin{center} \begin{tikzpicture} [x=1.2mm,y=1.4mm] \node (b1) at (44,0) {$0 \in \mathbb Z[x^{\pm 1}]$}; \node (b5) at (0,0) {$J(L)(x) \in \mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b4) at (22,15) {$\bar{\Omega}(L)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right)$}; \node (s1) at (0,6) {$d=x^{-1}$}; \node (s2) at (44,6) {$d=-1$}; \draw[<-] (b1) to node [left,yshift=-2mm,font=\large]{$\psi_{\Delta}$} (b4); \draw[<-] (b5) to node [right,yshift=-2mm,font=\large] {$\psi_{J}$} (b4); \end{tikzpicture} \end{center} The specialisation $\psi_\Delta$ gives $\bar{\Omega}(L)(x,d)|_{d=-1}=0$, so there exists $B(x,d) \in \mathbb L$ such that: \begin{equation} \bar{\Omega}(L)(x,d)=(d+1) \cdot B(x,d). \end{equation} On the other hand the specialisation $\psi_J$ gives $\bar{\Omega}(L)(x,d)|_{d=x^{-1}}=J(L)(x)$. Using this property combined with the above relation we have: \begin{equation*} J(L)(x)=(x^{-1}+1) \cdot B(x,d)|_{d=x^{-1}}. \end{equation*} In other words, in the ring $\mathbb Z[x^{\pm \frac{1}{2}}]$ we have: \begin{equation*} \frac{J(L)(x)}{(x^{-1}+1)}=B(x,d)|_{d=x^{-1}}. \end{equation*} This shows that there exists $B'(x,d) \in \mathbb L$ with the property: \begin{equation} B(x,d)=\frac{J(L)(x)}{(x^{-1}+1)}+B'(x,d) \cdot (xd-1). \end{equation} This implies that that in the quotient ring we have: \begin{equation*} \bar{\Omega}(L)(x,d)=(d+1) \cdot \frac{J(L)(x)}{(x^{-1}+1)}+B'(x,d) \cdot (d+1)(xd-1)=(d+1) \cdot \frac{J(L)(x)}{(x^{-1}+1)}. \end{equation*} Using the normalised version of the Jones polynomial we obtain: \begin{equation*} \bar{\Omega}(L)(x,d)=(d+1) \cdot \tilde{J}(L)(x). \end{equation*} This concludes the relation from Theorem \ref{THEOREM3}. \subsection{The open model in the quotient ring} In this part we study which information we get from the fact that the open intersection form recovers the Jones and Alexander polynomials of the closure. Let $L$ be a link and we choose a braid representative $\beta_n\in B_n$. Then, following Theorem \ref{Thstate'} we have : \begin{center} \begin{tikzpicture} [x=1.2mm,y=1.4mm] \node (b1) at (44,0) {$\Delta(L)(x) \in \mathbb Z[x^{\pm 1}]$}; \node (b5) at (0,0) {$\tilde{J}(L)(x) \in \mathbb Z[x^{\pm \frac{1}{2}}]$}; \node (b4) at (22,15) {$\bar{\Omega}'(\beta_n)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left((d+1)(dx-1) \right)$}; \node (s1) at (0,6) {$d=x^{-1}$}; \node (s2) at (44,6) {$d=-1$}; \draw[<-] (b1) to node [left,yshift=-2mm,font=\large]{$\psi_{\Delta}$} (b4); \draw[<-] (b5) to node [right,yshift=-2mm,font=\large] {$\psi_{J}$} (b4); \end{tikzpicture} \end{center} We start with the specialisation $\psi_\Delta$ and we know: \begin{equation} \bar{\Omega}'(\beta_n)(x,d)|_{d=-1}=\Delta(L)(x). \end{equation} Then this means that the difference between the intersection form and the Alexander polynomial is in the kernel of the specialisation. More precisely, there exists $A(x,d)\in \mathbb L$ such that: \begin{equation*} \bar{\Omega}'(\beta_n)(x,d)-\Delta(L)(x)=A(x,d) \cdot (d+1). \end{equation*} This is equivalent to: \begin{equation}\label{rel1} \bar{\Omega}'(\beta_n)(x,d)=\Delta(L)(x)+A(x,d) \cdot (d+1). \end{equation} Now, we look at the specialisation $\psi_J$ and we have $\bar{\Omega}'(\beta_n)(x,d)|_{d=x^{-1}}=\tilde{J}(L)(x)$, so: \begin{equation*} \tilde{J}(L)(x)=\Delta(L)(x)+A(x,d)|_{d=x^{-1}} \cdot (x^{-1}+1). \end{equation*} This shows that: \begin{equation} A(x,d)|_{d=x^{-1}}=\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}. \end{equation} This implies that there exists $A'(x,d)\in \mathbb L$ such that: \begin{equation*} A(x,d)-\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}=A'(x,d) \cdot (xd-1). \end{equation*} The last relation gives: \begin{equation} A(x,d)=\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}+A'(x,d) \cdot (xd-1). \end{equation} Following the last relation and equation \eqref{rel1} we have: \begin{equation*} \bar{\Omega}'(\beta_n)(x,d)=\Delta(L)(x)+(d+1)\left(\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}+A'(x,d) \cdot (xd-1)\right). \end{equation*} This shows that the open intersection form in the quotient ring is the following interpolation: \begin{equation} \bar{\Omega}'(\beta_n)(x,d)=\Delta(L)(x)+(d+1)\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}. \end{equation} So $\bar{\Omega}'(\beta_n)$ is a well-defined link invariant, denoted by $\bar{\Omega}'(L)$ which has the formula: \begin{equation} \bar{\Omega}'(L)(x,d)=\Delta(L)(x)+(d+1)\frac{\tilde{J}(L)(x)-\Delta(L)(x)}{(x^{-1}+1)}. \end{equation} This concludes the statement of Theorem \ref{THEOREM2}. \section{Example of computation}\label{S:6} \subsection{Trefoil knot} Let us compute the intersection model for the trefoil knot $T$, seen as the closure of the braid $\sigma^3 \in B_2$. We have the following Lagrangians in the punctured disc $\mathscr D_5$: $$ (\sigma^3 \cup \mathbb I_{3})\mathscr S'\cap\mathscr T'$$ \vspace{-10mm} \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.6]{Example.pdf} \caption{Trefoil knot} \end{figure} \end{center} \vspace{-5mm} Then, we compute the gradings of the $5$ intersection points as in the above picture and we obtain: \begin{equation} \begin{aligned} &\Omega'(\sigma^{3})(x,d)=x^2d^3 \left( -x^{-3}+x^{-2}-x^{-1}+1+d\right). \end{aligned} \end{equation} In the next part, we compute the formula for this intersection in the quotient ring: $$\bar{\Omega}'(T)(x,d) \in \mathbb Z[x^{\pm \frac{1}{2}}, d^{\pm 1}]/\left( (d+1)(dx-1)\right).$$ Replacing $d^3$ in terms of the basis using relation \eqref{relations} we obtain: \begin{equation} \begin{aligned} &\bar{\Omega}'(T)(x,d)=x^2\left((x^{-2}-x^{-1}+1)d+x^2-x^{-1}\right) \left( -x^{-3}+x^{-2}-x^{-1}+1+d\right). \end{aligned} \end{equation} Now, we prove that this expression is an interpolation between the Jones and Alexander invariants of the trefoil knot, which have the following formulas: \begin{equation} \begin{aligned} &\Delta(T,x)=x-1+x^{-1}\\ &J(T,q)=-x^{-4}+x^{-1}+x^{-3}. \end{aligned} \end{equation} This means that we have: \begin{equation} \begin{aligned} \bar{\Omega}'(T)(x,d)&=\left((\Delta(T)(x) \cdot xd-x+1\right) \left( -x^{-3}+x^{-2}-x^{-1}+1+d\right)=\\ &=\left( (-x^{-2}+x^{-1}-1+x)d+xd^2\right)\Delta(T)(x)+\\ & \ \ \ +x^{-2}-x^{-1}+1-x-dx-x^{-3}+x^{-2}-x^{-1}+1+d. \end{aligned} \end{equation} Replacing $d^2$ using formula \eqref{relations} we obtain: \begin{equation} \begin{aligned} \bar{\Omega}'(T)(x,d)&=\Delta(T)(x)+d(1-x^{-1})(1-x^{-1}+x^{-2}-x)+\\ &\ \ \ +(1-x^{-1})(1-x^{-1}+x^{-2}-x)=\\ &=\Delta(T)(x)+(d+1)(1-x^{-1})(1-x)(1+x^{-2}). \end{aligned} \end{equation} On the other hand, the difference between Jones and Alexander polynomials of the trefoil has the expression: \begin{equation*} \tilde{J}(T)(x)-\Delta(T)(x)=(1+x^{-1})(1-x^{-1})(1-x)(1+x^{-2}). \end{equation*} From the previous two relations we conclude the interpolation model: \begin{equation} \bar{\Omega}'(T)(x,d)=\Delta(T)(x)+(d+1) \cdot \frac{\tilde{J}(T)(x)-\Delta(T)(x)}{(x^{-1}+1)}. \end{equation} \begin{comment} \begin{center} \begin{figure}[H] \centering \includegraphics[scale=0.5]{Example819.pdf} \vspace{-5mm} \hspace{100mm}$\Large{Conf_2(\mathscr D_8)}$ \vspace{5mm} \caption{Knot $8_{{19}}$} \end{figure} \end{center} \begin{center} \label{tabel} {\renewcommand{\arraystretch}{1.7}\begin{tabular}{ | c | c | c | c | c | } \hline $(x_1,z_1)$ & $(x_1,z^{'}_1)$ & $(x_1,z^{"}_1)$ & $(x_1,z_4)$ & $(x_1,z_5)$ \\ \hline $y^2$ & $-y$ & $yx^{-1}$ & $-yx^{-3}$ & $yx^{-4}$ \\ \hline \hline $(x_4,z_1)$ & $(x_4,z^{'}_1)$ & $(x_4,z^{"}_1)$ & $(x_4,z_4)$ & $(x_4,z_5)$ \\ \hline $-yx^{-1}$ & $x^{-1}$ & $-x^{-2}$ & $d^{-2}x^{-4}$ & $-d^{-2}x^{-5}$ \\ \hline \hline $(x_5,z_1)$ & $(x_5,z^{'}_1)$ & $(x_5,z^{"}_1)$ & $(x_5,z_4)$ & $(x_5,z_5)$ \\ \hline $yx^{-2}$ & $-x^{-2}$ & $x^{-3}$ & $-d^{-2}x^{-5}$ & $d^{-2}x^{-6}$ \\ \hline \hline $(x_6,z_1)$ & $(x_6,z^{'}_1)$ & $(x_6,z^{"}_1)$ & $(x_6,z_4)$ & $(x_6,z_5)$ \\ \hline $-yx^{-3}$ & $x^{-3}$ & $-x^{-4}$ & $d^{-2}x^{-6}$ & $-d^{-2}x^{-7}$ \\ \hline \hline $(x_7,z_1)$ & $(x_7,z^{'}_1)$ & $(x_7,z^{"}_1)$ & $(x_7,z_4)$ & $(x_7,z_5)$ \\ \hline $yx^{-4}$ & $-x^{-4}$ & $x^{-5}$ & $-d^{-2}x^{-7}$ & $d^{-2}x^{-8}$ \\ \hline \hline $(x_2,z_2)$ & $(x_2,z_3)$ & $(x_2,z_6)$ & $(x_2,z_7)$ & $(x_2,z_8)$ \\ \hline $d^{-1}x^{-1}$ & $-d^{-1}x^{-2}$ & $d^{-1}x^{-4}$ & $-d^{-1}x^{-5}$ & $d^{-1}x^{-6}$ \\ \hline \hline $(x_3,z_2)$ & $(x_3,z_3)$ & $(x_3,z_6)$ & $(x_3,z_7)$ & $(x_3,z_8)$ \\ \hline -$d^{-1}x^{-2}$ & $d^{-1}x^{-3}$ &-$d^{-1}x^{-5}$ & $d^{-1}x^{-6}$ & -$d^{-1}x^{-7}$ \\ \hline \hline \end{tabular}} \end{center} Then the intersection pairing has the following form: \begin{equation} \begin{aligned} \Omega'(K_{8_{19}})(x,d)=(d^2x)^{5} \Bigl( &1+d^{-1}+(d^{-2}+d^{-3})x^{-1}+ \\ &+(-d^{-1}-2d^{-2}-2d^{-3})x^{-2}+ \\ &+(2d^{-1}+2d^{-2}+d^{-3})x^{-3} \\ &+(-2d^{-1}-2d^{-2}+d^{-3}+d^{-4})x^{-4}\\ &+(d^{-2}-2d^{-3}-2d^{-4})x^{-5} \\ &+(-2d^{-3}+2d^{-4})x^{-6}- \\ &-(d^{-3}+2d^{-4})x^{-7}+d^{-4}x^{-8}\Bigr). \end{aligned} \end{equation} In this subsection we aim to prove that our invariant recovers the Jones and Alexander polynomials through specialisations of coefficients. We know that the intersection from \cite{Cr} recovers the Jones and Alexander polynomials through specialisations. Then, we show that $\Gamma_2(\beta_n)$ recovers the un-normalized version of the Jones and the Alexander polynomial up to a factor. From that, we show that $\bar{\Omega}(\beta_n)$ inherits the same properties. We start with the following result from \cite{Cr}. \begin{thm}(\cite{Cr})\label{THE} Let us denote by $\tilde{\mathscr S}$ and $\tilde{\mathscr T}$ the submanifolds in the configuration space $C_{3n-2,n-1}$ whose geometric supports are depicted in the right hand side of figure \ref{Openmodel}. We consider the graded intersection: \begin{equation} \begin{aligned} &\tilde{\Gamma}_2(\beta_n)(u,x,y,d) \in \mathbb Z[u^{\pm}, x^{\pm}, y^{\pm}, d^{\pm}]\\ &\tilde{\Gamma}_2(\beta_n)(u,x,y,d):=u^{-w(\beta_n)} u^{-n} (-y)^{-n} \ll (\beta_n\cup \mathbb I_{2n-2}) \tilde{\mathscr S},\tilde{\mathscr T} \gg. \end{aligned} \end{equation} Then this intersection pairing specialises to the normalised Jones and Alexander polynomials of the closure of the braid, as below: \begin{equation}\label{eqC:3} \begin{aligned} &\tilde{J}(L,q)= \tilde{\Gamma}_2(\beta_n)|_{u=q;x=q^{2}, d=q^{-2}}\\ &\Delta(L,x)=\tilde{\Gamma}_2(\beta_n)|_{u=x^{-\frac{1}{2}};y=1;d=-1}. \end{aligned} \end{equation} \end{thm} Following this property, we will show that the following intersection pairing, which models the total closure of a braid rather than the closure with the first strand that is open shares similar properties, as follows. \begin{center} $\mathscr S,\mathscr T \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \tilde{\mathscr S},\tilde{\mathscr T}$ \begin{figure}[H] \centering \includegraphics[scale=0.3]{Diffeotwo.pdf} \hspace{-10mm}\caption{Closed up intersection $\Gamma_2(\beta_n)$ \hspace{30mm} Open intersection $\tilde{\Gamma}_2(\beta_n)$ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\label{Openmodel} \end{figure} \end{center} \begin{thm}(Jones and Alexander polynomials from two Lagrangians in a configuration space)\label{THEOREM'}\\ Consider the following graded intersection: \begin{equation} \begin{aligned} &\Gamma_2(\beta_n)(u,x,y,d) \in \mathbb Z[u^{\pm}, x^{\pm}, y^{\pm}, d^{\pm}]\\ &\Gamma_2(\beta_n)(u,x,y,d):=u^{-w(\beta_n)} u^{-n} (-y)^{-n} \ll (\beta_n\cup \mathbb I_{2n}) \mathscr S,\mathscr T \gg. \end{aligned} \end{equation} This specialises to the Jones and Alexander polynomials of the closure of the braid, as below: \begin{equation}\label{eqC:3} \begin{aligned} &J(L,q)= \Gamma_2(\beta_n)|_{u=q;x=q^{2}, d=q^{-2}}\\ &\Delta(L,x)=\left(\frac{1}{d+1}\Gamma_2(\beta_n) \right)|_{u=x^{-\frac{1}{2}};y=1;d=-1}. \end{aligned} \end{equation} \end{thm} \begin{proof} The difference between $\tilde{\Gamma}_2(\beta_n)$ and $\Gamma_2(\beta_n)$ is that the former one has an extra red curve and green circle in the geometric support of the submanifolds. On the other hand, following the proof of Theorem \ref{THE} from \cite{Cr}, which uses \cite{Cr1}, one gets that $\tilde{\Gamma}_2(\beta_n)$ correspond to the partial quantum trace that is used for the definition of the normalised Jones polynomials or Alexander polynomials, seen as quantum invariants. Following that correspondence, the closed up intersection form $\Gamma_2(\beta_n)$ models the total quantum trace on the representation theory side. This means that for generic $q$, it recovers the un-normalised Jones polynomial, and so: \begin{equation} J(L,q)= \Gamma_2(\beta_n)|_{u=q;x=q^{2}, d=q^{-2}}. \end{equation} Now we discuss the case given by the other specialisation of coefficients. Following the above mentioned correspondence, this situation corresponds to the representation theory of the quantum group $U_q(sl(2))$ at roots of unity. The quantum trace of braid representations vanishes in this situation and so the Reshetikhin-Turaev construction (\cite{RT}) of quantum invariants gives vanishing invariants. In order to see the Alexander polynomial from representation theory at roots of unity, one has to cut a strand of the braid closure and use partial quantum traces (\cite{ADO}). This is reflected geometrically by removing from the supports of $\mathscr S,\mathscr T$ the red curve and green circle which connect the first point with the last one. This gives the supports of $\tilde{\mathscr S}$ and $\tilde{\mathscr T}$, and the associated intersection pairing $\tilde{\Gamma}_2(\beta_n)$. This means that for out model, we have: \begin{equation} \Gamma_2(\beta_n)|_{u=x^{-\frac{1}{2}};y=1;d=-1}=0. \end{equation} \end{proof} We remind the definition of the intersection pairing from the main statement \ref{THEOREM}: $$\Omega(\beta_n)(q,d):=(dq)^{w(\beta_n)+n}\cdot d^{-n} \langle (\beta_n \cup \mathbb I_{2n}) \mathscr S, \mathscr T \rangle \in \mathbb Z[q^{\pm 1}, d^{\pm 1}].$$ Then, we see that this is the specialisation of the intersection form that recovers the Jones and Alexander invariants, using relation \eqref{eq:2}, so we have: \begin{equation}\label{eq:33} \Omega(\beta_n)(q,d)=\Gamma_2(\beta_n)(u,x,y,d)|_{x=q^{2};y=-d;u=q^{-1}d^{-1}}. \end{equation} Then, using relation \ref{eqC:3} we conclude that the intersection form $\Omega(\beta_n)(q,d)$ recovers the Alexander and Jones polynomials: \begin{equation}\label{eqC:33} \begin{aligned} &J(L,q)= \Omega(\beta_n)|_{d=q^{-2}}\\ &\Delta(L,q)=\left(\frac{1}{d+1}\Omega(\beta_n)\right)|_{d=-1}. \end{aligned} \end{equation} Further on, we use the quotient morphism: $$- : \mathbb Z[q^{\pm 1}, d^{\pm 1}]\rightarrow \mathbb Z[q^{\pm 1}, d^{\pm 1}]/\left( (d+1)(dq^2-1)\right).$$ Following relation \eqref{eqC:33} and the formula of this quotient, we see that the image of the interection form in the ring $\mathbb L$ still recovers the Jones and Alexander polynomials of the closure: \begin{equation}\label{eqC:333} \begin{aligned} &J(L,q)= \bar{\Omega}(\beta_n)|_{d=q^{-2}}\\ &\Delta(L,q)=\left(\frac{1}{d+1}\bar{\Omega}(\beta_n)\right)|_{d=-1}. \end{aligned} \end{equation} This shows that the condition \eqref{eq:1} from the statement holds. The main part that needs to be discussed concerns the invariance of the form $\bar{\Omega}(\beta_n)(q,d)$ with respect to the braid representative of a link. We will show this invariance by checking the independence of the formula with respect to the two Markov moves. \end{comment}
\section{Introduction} This document is a model and instructions for \LaTeX. Please observe the conference page limits. \section{Ease of Use} \subsection{Maintaining the Integrity of the Specifications} The IEEEtran class file is used to format your paper and style the text. All margins, column widths, line spaces, and text fonts are prescribed; please do not alter them. You may note peculiarities. For example, the head margin measures proportionately more than is customary. This measurement and others are deliberate, using specifications that anticipate your paper as one part of the entire proceedings, and not as an independent document. Please do not revise any of the current designations. \section{Prepare Your Paper Before Styling} Before you begin to format your paper, first write and save the content as a separate text file. Complete all content and organizational editing before formatting. Please note sections \ref{AA}--\ref{SCM} below for more information on proofreading, spelling and grammar. Keep your text and graphic files separate until after the text has been formatted and styled. Do not number text heads---{\LaTeX} will do that for you. \subsection{Abbreviations and Acronyms}\label{AA} Define abbreviations and acronyms the first time they are used in the text, even after they have been defined in the abstract. Abbreviations such as IEEE, SI, MKS, CGS, ac, dc, and rms do not have to be defined. Do not use abbreviations in the title or heads unless they are unavoidable. \subsection{Units} \begin{itemize} \item Use either SI (MKS) or CGS as primary units. (SI units are encouraged.) English units may be used as secondary units (in parentheses). An exception would be the use of English units as identifiers in trade, such as ``3.5-inch disk drive''. \item Avoid combining SI and CGS units, such as current in amperes and magnetic field in oersteds. This often leads to confusion because equations do not balance dimensionally. If you must use mixed units, clearly state the units for each quantity that you use in an equation. \item Do not mix complete spellings and abbreviations of units: ``Wb/m\textsuperscript{2}'' or ``webers per square meter'', not ``webers/m\textsuperscript{2}''. Spell out units when they appear in text: ``. . . a few henries'', not ``. . . a few H''. \item Use a zero before decimal points: ``0.25'', not ``.25''. Use ``cm\textsuperscript{3}'', not ``cc''.) \end{itemize} \subsection{Equations} Number equations consecutively. To make your equations more compact, you may use the solidus (~/~), the exp function, or appropriate exponents. Italicize Roman symbols for quantities and variables, but not Greek symbols. Use a long dash rather than a hyphen for a minus sign. Punctuate equations with commas or periods when they are part of a sentence, as in: \begin{equation} a+b=\gamma\label{eq} \end{equation} Be sure that the symbols in your equation have been defined before or immediately following the equation. Use ``\eqref{eq}'', not ``Eq.~\eqref{eq}'' or ``equation \eqref{eq}'', except at the beginning of a sentence: ``Equation \eqref{eq} is . . .'' \subsection{\LaTeX-Specific Advice} Please use ``soft'' (e.g., \verb|\eqref{Eq}|) cross references instead of ``hard'' references (e.g., \verb|(1)|). That will make it possible to combine sections, add equations, or change the order of figures or citations without having to go through the file line by line. Please don't use the \verb|{eqnarray}| equation environment. Use \verb|{align}| or \verb|{IEEEeqnarray}| instead. The \verb|{eqnarray}| environment leaves unsightly spaces around relation symbols. Please note that the \verb|{subequations}| environment in {\LaTeX} will increment the main equation counter even when there are no equation numbers displayed. If you forget that, you might write an article in which the equation numbers skip from (17) to (20), causing the copy editors to wonder if you've discovered a new method of counting. {\BibTeX} does not work by magic. It doesn't get the bibliographic data from thin air but from .bib files. If you use {\BibTeX} to produce a bibliography you must send the .bib files. {\LaTeX} can't read your mind. If you assign the same label to a subsubsection and a table, you might find that Table I has been cross referenced as Table IV-B3. {\LaTeX} does not have precognitive abilities. If you put a \verb|\label| command before the command that updates the counter it's supposed to be using, the label will pick up the last counter to be cross referenced instead. In particular, a \verb|\label| command should not go before the caption of a figure or a table. Do not use \verb|\nonumber| inside the \verb|{array}| environment. It will not stop equation numbers inside \verb|{array}| (there won't be any anyway) and it might stop a wanted equation number in the surrounding equation. \subsection{Some Common Mistakes}\label{SCM} \begin{itemize} \item The word ``data'' is plural, not singular. \item The subscript for the permeability of vacuum $\mu_{0}$, and other common scientific constants, is zero with subscript formatting, not a lowercase letter ``o''. \item In American English, commas, semicolons, periods, question and exclamation marks are located within quotation marks only when a complete thought or name is cited, such as a title or full quotation. When quotation marks are used, instead of a bold or italic typeface, to highlight a word or phrase, punctuation should appear outside of the quotation marks. A parenthetical phrase or statement at the end of a sentence is punctuated outside of the closing parenthesis (like this). (A parenthetical sentence is punctuated within the parentheses.) \item A graph within a graph is an ``inset'', not an ``insert''. The word alternatively is preferred to the word ``alternately'' (unless you really mean something that alternates). \item Do not use the word ``essentially'' to mean ``approximately'' or ``effectively''. \item In your paper title, if the words ``that uses'' can accurately replace the word ``using'', capitalize the ``u''; if not, keep using lower-cased. \item Be aware of the different meanings of the homophones ``affect'' and ``effect'', ``complement'' and ``compliment'', ``discreet'' and ``discrete'', ``principal'' and ``principle''. \item Do not confuse ``imply'' and ``infer''. \item The prefix ``non'' is not a word; it should be joined to the word it modifies, usually without a hyphen. \item There is no period after the ``et'' in the Latin abbreviation ``et al.''. \item The abbreviation ``i.e.'' means ``that is'', and the abbreviation ``e.g.'' means ``for example''. \end{itemize} An excellent style manual for science writers is \cite{b7}. \subsection{Authors and Affiliations} \textbf{The class file is designed for, but not limited to, six authors.} A minimum of one author is required for all conference articles. Author names should be listed starting from left to right and then moving down to the next line. This is the author sequence that will be used in future citations and by indexing services. Names should not be listed in columns nor group by affiliation. Please keep your affiliations as succinct as possible (for example, do not differentiate among departments of the same organization). \subsection{Identify the Headings} Headings, or heads, are organizational devices that guide the reader through your paper. There are two types: component heads and text heads. Component heads identify the different components of your paper and are not topically subordinate to each other. Examples include Acknowledgments and References and, for these, the correct style to use is ``Heading 5''. Use ``figure caption'' for your Figure captions, and ``table head'' for your table title. Run-in heads, such as ``Abstract'', will require you to apply a style (in this case, italic) in addition to the style provided by the drop down menu to differentiate the head from the text. Text heads organize the topics on a relational, hierarchical basis. For example, the paper title is the primary text head because all subsequent material relates and elaborates on this one topic. If there are two or more sub-topics, the next level head (uppercase Roman numerals) should be used and, conversely, if there are not at least two sub-topics, then no subheads should be introduced. \subsection{Figures and Tables} \paragraph{Positioning Figures and Tables} Place figures and tables at the top and bottom of columns. Avoid placing them in the middle of columns. Large figures and tables may span across both columns. Figure captions should be below the figures; table heads should appear above the tables. Insert figures and tables after they are cited in the text. Use the abbreviation ``Fig.~\ref{fig}'', even at the beginning of a sentence. \begin{table}[htbp] \caption{Table Type Styles} \begin{center} \begin{tabular}{|c|c|c|c|} \hline \textbf{Table}&\multicolumn{3}{|c|}{\textbf{Table Column Head}} \\ \cline{2-4} \textbf{Head} & \textbf{\textit{Table column subhead}}& \textbf{\textit{Subhead}}& \textbf{\textit{Subhead}} \\ \hline copy& More table copy$^{\mathrm{a}}$& & \\ \hline \multicolumn{4}{l}{$^{\mathrm{a}}$Sample of a Table footnote.} \end{tabular} \label{tab1} \end{center} \end{table} \begin{figure}[htbp] \centerline{\includegraphics{fig1.png}} \caption{Example of a figure caption.} \label{fig} \end{figure} Figure Labels: Use 8 point Times New Roman for Figure labels. Use words rather than symbols or abbreviations when writing Figure axis labels to avoid confusing the reader. As an example, write the quantity ``Magnetization'', or ``Magnetization, M'', not just ``M''. If including units in the label, present them within parentheses. Do not label axes only with units. In the example, write ``Magnetization (A/m)'' or ``Magnetization \{A[m(1)]\}'', not just ``A/m''. Do not label axes with a ratio of quantities and units. For example, write ``Temperature (K)'', not ``Temperature/K''. \section*{Acknowledgment} The preferred spelling of the word ``acknowledgment'' in America is without an ``e'' after the ``g''. Avoid the stilted expression ``one of us (R. B. G.) thanks $\ldots$''. Instead, try ``R. B. G. thanks$\ldots$''. Put sponsor acknowledgments in the unnumbered footnote on the first page. \section*{References} Please number citations consecutively within brackets \cite{b1}. The sentence punctuation follows the bracket \cite{b2}. Refer simply to the reference number, as in \cite{b3}---do not use ``Ref. \cite{b3}'' or ``reference \cite{b3}'' except at the beginning of a sentence: ``Reference \cite{b3} was the first $\ldots$'' Number footnotes separately in superscripts. Place the actual footnote at the bottom of the column in which it was cited. Do not put footnotes in the abstract or reference list. Use letters for table footnotes. Unless there are six authors or more give all authors' names; do not use ``et al.''. Papers that have not been published, even if they have been submitted for publication, should be cited as ``unpublished'' \cite{b4}. Papers that have been accepted for publication should be cited as ``in press'' \cite{b5}. Capitalize only the first word in a paper title, except for proper nouns and element symbols. For papers published in translation journals, please give the English citation first, followed by the original foreign-language citation \cite{b6}. \section{Introduction} The preferred treatment of end-stage kidney disease is transplantation, with better long-term outcomes and patient quality of life compared to dialysis for the selected patients that are eligible for a transplantation~\cite{abecassis2008kidneyTx}. Individually adapted immunosuppressive therapy is a key factor for optimal long-term outcomes after kidney transplantation. Maintenance immunosuppressive therapy usually consists of two to three immunosuppressive drugs in combination, with individually tailored doses to obtain exposure within prespecified therapeutic windows. Tacrolimus, a calcineurin inhibitor, is the backbone of most standard protocols world-wide following kidney transplantation~\cite{brunet2019consensus}. Tacrolimus dosing is challenging even for experienced clinicians due to high individual variability in drug exposure. Standard \ac{TDM} is performed based on measuring trough concentrations, i.e., the concentration immediately prior to the subsequent dosing. However, recent consensus guidelines recommend a transfer to target systemic exposure measures for tacrolimus \ac{TDM}, i.e., the \ac{AUC} within a dose interval. Consequently, a tool that accurately predicts the systemic exposure of tacrolimus based on a reasonable number of blood samples for a given patient would be of high clinical value. The aim of this study is to develop a \ac{ML} model for predicting the systemic tacrolimus exposure in kidney transplanted patients utilizing a limited sampling strategy applicable in clinical practice. We aim that the model, which is trained using XGBoost~\cite{Chen2016xgboost}, is robust to varying blood sampling time schedules, increasing the model's usability for real-life settings. Our model is prospectively externally validated in data from kidney transplant recipients not included in the model development. \section{Related work} The standard method for measuring systemic exposure of drugs like tacrolimus is to obtain 8-12 blood samples spread over a dosing interval. This is challenging to implement in clinical practice, expensive, and not patient friendly. Hence, several methods requiring less frequent blood sampling have been developed for prediction of tacrolimus exposure. The majority of the methods aims to estimate the \ac{PK} parameters of the drug, and use these values to calculate the drug exposure in individual patients, based on 1-4 blood samples obtained within the first few hours after the previous dose. Population \ac{PK} modeling is a commonly used approach that estimates both the \ac{PK} parameter values and their variability within the population by using a \textit{maximum a posteriori} Bayesian technique~\cite{brooks2016popPKreview}. Population \ac{PK} models can be useful in a clinical setting for predicting drug responses in individuals given a specific dosing schedule~\cite{storset2015improved}. Both parametric and non-parametric modelling are applied in the field of \ac{TDM}, with different advantages and limitations. Non-parametric population \ac{PK} models avoid the normality assumption for the \ac{PK} parameters. This is advantageous when the population of interest includes differently distributed sub-populations~\cite{neely2012Pmetrics}. Non-parametric population \ac{PK} modeling has shown promising results for predicting tacrolimus trough concentrations in kidney transplanted patients~\cite{storset2015improved} and for limited sampling \ac{AUC} determination~\cite{gustavsen2020tacdrop}. Despite their popularity, such models are time consuming and computationally expensive to train, and performance depends on how well the model structure captures \ac{PK} properties of the drug in the population of interest. \Ac{ML} models are trained from data without being explicitly programmed. Model development hence does not require explicit assumptions regarding the \ac{PK} properties of a drug. In order to predict the \ac{AUC} of tacrolimus using \ac{ML}, \cite{niel2018artificial} trained an \ac{ANN} with one hidden layer on concentrations measured three hours after drug administration. Their dataset included $53$ observations, and the resulting \ac{ANN} successfully predicted the \ac{AUC} values, with superior performance compared to existing Bayesian models. Woillard et al.~\cite{woillard2021tacrolimus} used XGBoost to predict tacrolimus exposure in kidney transplant recipients for tacrolimus administered twice a day. Their models were trained and tested on data from $3,748$ and $1,249$ patients, respectively, and all showed better predictive power than existing population \ac{PK} models. However, neither~\cite{niel2018artificial} or~\cite{woillard2021tacrolimus} report prospective testing of their models. Existing studies applying \ac{ML} models for prediction of tacrolimus exposure indicate that \ac{ML} constitutes a powerful alternative to traditional approaches. In this study, we therefore develop \ac{ML} models that estimate tacrolimus exposure based on individual patient characteristics and measured drug concentrations. \section{Data description}\label{sec:data} The data used for model development includes tacrolimus measurements from $68$ individual adult kidney transplanted patients with $93$ unique visits at the clinic (some patients had visited the clinic more than once). The patients in the dataset had registered $8$ to $15$ drug concentrations for each dose interval. All patients administered tacrolimus twice a day, i.e., every $12$ hours. The data is obtained from four clinical studies performed at Oslo University Hospital - Rikshospitalet, Norway in the period 2011-2018~\cite{midtvedt2011advagraf,robertsen2015genTac,gustavsen2020dayNight,gustavsen2020tacdrop}. All studies were performed in accordance with the Helsinki Declaration and Good Clinical Practice and were approved by the local ethic committee (REK). All patients provided written informed consent for using the data in analyses like the present one. Characteristics of the $68$ patients in the development dataset are summarised in~\cref{tab:demographics}. The distribution is relevant for the overall transplant population at our center, with, e.g., more males and an average age in the mid 50'ies. The variation in \ac{TXT} is large, ranging from $12$ days to more than $15$ years. The morning dose of tacrolimus ranges from $1$ to $8$ mg. \input{tables/demographics} The data used for external testing of the final models includes tacrolimus measurements from seven adult kidney transplanted patients, all of them providing two dosing events. All patients had $12$ registered concentrations for each dose interval. The data was obtained from an ongoing clinical study performed at Oslo University Hospital - Rikshospitalet. The study was approved by the local ethical committee (reference number 146884) and the Norwegian Medicine Agency (EudraCT number 2020-002621-29). \Cref{tab:demographics_testset} shows the demographic characteristics for the seven patients. Again, most of the patients are male. The mean age is higher, and the \ac{TXT} is lower for the patients in the test set than for the patients in the development set. \input{tables/test_demographics} \section{Methodology} \subsection{Data preprocessing}\label{sec:preprocessing} Reference \ac{AUC} values are obtained using all measured blood concentrations in each individual, using the \texttt{makeAUC} function in the R-library Pmetrics~\cite{neely2012Pmetrics}. \ac{AUC} is calculated using the log-linear trapezoidal method for the measured tacrolimus blood concentrations within a dose interval. When a concentration at $12$ hours is missing, the trough concentration is used as an estimate of the concentration since all measurements were obtained in steady-state conditions. Development and test datasets are made using all available concentrations in the original datasets. The 16 time points with available concentrations are $0, 0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12$ hours after drug administration. For each time point, two features are created; one representing the drug concentration and one representing the time difference between the actual and ideal time points. Missing concentrations are estimated using linear regression or log-linear regression: If missing concentrations come before the maximum concentration, linear regression using all available concentrations up to and including the maximum concentration, except the trough concentration, is used. If missing concentrations come after the concentration following the maximum concentration, log-linear regression using all available concentrations after the maximum concentration is applied. Linear regression is used for missing concentrations between the maximum and next available concentration. \footnote{One event in the development dataset has only one measured concentration after the maximum concentration. For this event, the trough concentration is used as an estimate of the $12$-hour concentration before log-linear estimation of the missing concentrations is used to avoid constant concentration over time.} Additional patient characteristics included in the data are body weight and height, body mass index, body surface area, sex, hematocrit (percentage of red blood cells), \ac{TXT}, type of assay used in the blood sample bioanalyses, and an error term representing the uncertainty of the bioanalyses. In total, each data point is characterised by 43 features. \subsection{Experiments} Various feature combinations were explored for predicting \ac{AUC}. To increase applicability in the clinic, we focus on trough concentrations and concentrations measured one and three hours after drug administration. Most \ac{ML} models require all features used during development to be present when making predictions. However, the patient might not be available for blood sampling at exactly the desired time. We therefore relax the time constraint of the third concentration by adding additional features, representing the time deviation from three hours after dose administration. Five different time points are considered for measuring the last concentration during model development: 2, 2.5, 3, 4 and 5 hours after drug administration. Consequently, events for all these scenarios are created for each of the 68 patients, resulting in 340 events in total. Two different approaches are tested in order to create \ac{ML} models that handle deviations in time for measuring the third concentration. The first approach provides the measured concentration and the time deviation away from three hours directly to the model. The second approach estimates the concentration at three hours based on the other available drug concentrations. The estimated concentration is then provided to the \ac{ML} model together with a binary feature flagging whether the concentration was measured on time or was estimated. For the first approach, the following combinations of features are explored: \begin{itemize} \item Feature representing time difference between three hours and actual time \item Features for exact times for all three concentrations \item Combination of the two first points and features for body weight and height, sex, body mass index, body surface area, hematocrit and type of assay for the analysis \item Combination of the two first points without adding more features \end{itemize} For the second approach, the following methods are explored for estimating the concentration at three hours: \begin{itemize} \item Linear regression between the concentration measured at one hour and the latest concentration \item Linear regression, but the one-hour concentration and last concentration are swapped if the last concentration is higher than the one-hour concentration. This is done to prevent the estimated concentration at three hours to become unrealistically high, as the maximum concentration most likely arise before three hours. The approach is referred to as `reverse linear regression' in the following sections \item Log-linear regression between the latest concentration and the trough concentration, representing the 12-hour concentration \item Estimations from an earlier developed population \ac{PK} model~\cite{aasberg2013popPKmodel} receiving patient characteristics, the three drug concentrations and corresponding time points \end{itemize} Leave-one-patient-out \ac{CV} is performed for all the \ac{ML} experiments. When the dataset is small and no external test set is available, leave-one-out \ac{CV} is regarded as best practice. Only the first visit for each patient is applied, resulting in $68$ events for fixed time points, and $340$ events for the flexible time points. Before prospective testing, the \ac{ML} models are trained on all available events in the development dataset. If a patient has been investigated several times, all events are included, treating each event as an independent patient. This results in $93$ and $465$ events for the models trained on fixed and flexible time points, respectively. The models are then tested on the external test set, which was not applied for model development. The XGBoostRegressor algorithm~\cite{Chen2016xgboost} is used to build the \ac{ML} models. For experiments using leave-one-patient-out, the best hyperparameter combinations identified in preliminary experiments are used for training the \ac{ML} models. For the models used in prospective testing, hyperparameter search using GroupKFold \ac{CV} from sklearn~\cite{scikit-learn} is performed to find the best combination of hyperparameter values. GroupKFold ensures that events from the same patient are always placed together in either the training or validation set during \ac{CV}. The performance of the \ac{ML} models are compared to an established population \ac{PK} model~\cite{aasberg2013popPKmodel}. The population \ac{PK} model receives the same concentrations as the \ac{ML} models and the corresponding exact sampling time points. The population \ac{PK} model automatically handles deviations in time. For flexible time points, the model therefore receives drug concentrations and corresponding deviating times instead of using the approaches outlined above. Moreover, the population \ac{PK} model receives the dose of the drug, body weight and height, \ac{TXT}, hematocrit, sex, body mass index and fat-free mass. These features must be present for the model to run the analysis. In addition, the DummyRegressor from sklearn~\cite{scikit-learn} is applied as a baseline model. The DummyRegressor always predicts the mean target value of the training dataset. \subsection{Model evaluation} Relative \ac{RMSE} is used for model evaluation and model selection. Relative \ac{RMSE} is calculated by dividing the \ac{RMSE} by the mean target value of the validation or test data for leave-one-patient-out \ac{CV} and prospective testing, respectively. The percentages of patients with absolute \acp{PE} above 15\% and 10\% of the target value are also calculated. For a model to be clinically applicable, the number of observations with absolute \acp{PE} above $15 \%$ should not exceed $15 \%$. As a rule of thumb, models with relative \acp{RMSE} below $10 \%$ are generally regarded as `good', while values below $15 \%$ are regarded as `okay'~\cite{gustavsen2020tacdrop}. \ac{SHAP} is a popular explanation method that approximates Shapley values~\cite{lundberg2019SHAP}. Shapley values originate from game theory, and the value for a given player, or feature, reflects its contribution to the total payoff, or prediction~\cite{Shapley1953}. We use \ac{SHAP} during prospective testing to identify the most important features for our \ac{ML} models. If the important features are clinically plausible, this can strengthen the trust in the models. \section{Results} \subsection{Leave-one-patient-out cross-validation} The results from the leave-one-patient-out \ac{CV} experiments on the development dataset are shown in~\cref{tab:loo_1}. All XGBoost models perform better than the DummyRegressor baseline model. The best model performance is achieved when all available features are included. When the last time point is not fixed at three hours after drug administration, model performances drop, meaning that the \ac{ML} models are less robust to deviations in sampling time. For flexible time points, the lowest relative \ac{RMSE} is achieved when the time difference from three hours is combined with features describing the time point in minutes after the previous dose, as well as other patient characteristics. \input{tables/leave_one_out} \subsection{Prospective testing} \Cref{tab:test_resultsFixed} shows the results from prospective external testing of the \ac{ML} models. As for the development data, all models outperform the baseline model, and the best results are obtained when all features are included. For the models that are trained on three concentrations, performances slightly drop when more features are included, as opposed to the results from internal model evaluation. The best approach for flexible time points is when missing concentrations at three hours post-dose are estimated by the population \ac{PK} model. Based only on the criteria for clinical applicability, four of the \ac{ML} models presented here could be used in the clinic, from which one handles deviations in the last time point. \input{tables/test_resultsFixedTimes} The ranking of \ac{SHAP} values is investigated for the \ac{ML} models when making predictions on the test set. For all the models, the top-ranked features represent drug concentrations. The best performing \ac{ML} model, which received $16$ drug concentrations, treats the three-hour concentration as the most important feature. The first feature not representing either a drug concentration or a part of the error term for the analysis is ranked as number $17$ (hematocrit). Since the \ac{AUC} calculations are based only on measured drug concentrations, it makes sense that these are regarded as most important by the model. In fact, it might be that the best performing model more or less learns the trapezoidal method. \ac{SHAP} values for the best performing model are shown in~\cref{fig:SHAP_plots}. For the two models trained on three drug concentrations at fixed times, the three-hour concentration is ranked as either number one or two, respectively, competing with the feature measuring the concentration difference between three and zero hours. Trough and one-hour concentrations are also highly ranked. Height, hematocrit and \ac{TXT} are the most important features not representing drug concentrations. \ac{SHAP} values for the model trained on three drug concentrations and additional features are shown in~\cref{fig:SHAP_plots}. Similar results are achieved for the models developed with a flexible time point for the last concentration. The model where missing three-hour concentrations are imputed by the population \ac{PK} model, treats the three-hour concentration as the most important feature, followed by the one-hour and trough concentrations. The same is true for the model where missing three-hour concentrations are estimated using log-linear regression. \Cref{fig:SHAP_plots} plots the \ac{SHAP} values for both models. \begin{figure*} \centering \includegraphics[trim=0cm 6.82cm 0cm 6.9cm, clip,width=\linewidth]{figures/LongStanding_4SHAP_plots.pdf} \caption{From left to right: \ac{SHAP} values for the ML models trained on all concentrations, on three concentrations and additional features, flexible times where missing concentrations at three hours are estimated by the population PK model and flexible times where concentrations missing at three hours are imputed using log-linear regression, respectively. Only the top ten features are included for convenience.} \label{fig:SHAP_plots} \end{figure*} \subsection{Population pharmacokinetic model} The results from the \ac{AUC} estimations on the development data using the previously developed population \ac{PK} model are included in the upper part of~\cref{tab:pop_model}. As for the \ac{ML} models, the best performance is achieved when the number of provided concentrations is the largest. The performance drops when only three concentrations are available. The model performance is not significantly different between predictions made on fixed and flexible time points, which is in contrast to the \ac{ML} models. Corresponding results on the test data are shown in the lower part of~\cref{tab:pop_model}. The trend is similar to the trend on the development data. However, the relative \ac{RMSE} and percentages of samples with \acp{PE} outside $10$ and $15 \%$ are significantly lower when the population \ac{PK} model receives $16$ concentrations. Overall, the population \ac{PK} model performs better than the \ac{ML} models. \input{tables/population_model} \section{Discussion} Our results show that the population \ac{PK} model tends to outperform the \ac{ML} models, with similar performance for the population \ac{PK} and \ac{ML} models for fixed concentrations. This can have several reasons. Because the population \ac{PK} model learns the underlying \ac{PK} processes leading to the observed drug concentrations that are used to estimate the \ac{AUC} values, it might capture relationships not learned by the \ac{ML} models. Moreover, the population \ac{PK} model handles exact sample times and estimates missing concentrations without further manipulation. This could be advantageous, especially when the last concentration sampling time deviates from three hours. This is reflected in the results, as the population \ac{PK} model clearly outperforms the \ac{ML} models for flexible time for the three-hour concentration. According to the external test results, the best performing \ac{ML} model for flexible times estimates the concentration at three hours using the population \ac{PK} model. The population \ac{PK} model performs well when the last concentration is not measured at exactly three hours post-dose, which might explain its good performance. A drawback is that the workflow is more complex than for the other approaches, as the population \ac{PK} model must pass the estimated values to the \ac{ML} model before making predictions. The second best performing approach, using log-linear regression to estimate the three-hour concentration, is faster and less computationally expensive. However, the percentage of samples with \acp{PE} outside $15 \%$ of the reference \ac{AUC} values is above the recommended value of $15 \%$. According to \ac{SHAP}, features representing drug concentrations and differences between drug concentrations at different times are most important for all our \ac{ML} models. This makes sense, as the \ac{AUC} calculations are based on drug concentrations. Moreover, high concentrations and large differences between the three-hour concentration and trough concentration lead to higher predicted \ac{AUC}. This is also reasonable considering the tacrolimus blood concentration profile, as higher concentrations and large increases in concentrations leads to higher \ac{AUC}. Drug dose is not among the top features. This supports the fact that different patients might experience different drug exposures although they administer the same dose of tacrolimus. Consequently, the tacrolimus dose is not a good predictor of the \ac{AUC}, which is why obtaining a good prediction model for individualizing dosing is important. Apart from features related to drug concentrations, hematocrit is ranked relatively high for some of the best performing models. Higher hematocrit contributes to higher predicted \ac{AUC}, although the effect is not large according to \ac{SHAP}. Tacrolimus binds extensively to red blood cells~\cite{venkataramanan1995tacRedBloodCells}, and it is only the free concentration that is available for elimination. Consequently, higher hematocrit results in less free tacrolimus, lower total clearance and higher total \ac{AUC}. Prior research suggests that \ac{TXT} affects the drug exposure of tacrolimus~\cite{staatz2004tacPKreview}. However, \ac{TXT} is not an important feature for the \ac{ML} models according to \ac{SHAP}. All patients in the test set are transplanted less than two months ago, and the variation in \ac{TXT} is relatively small. Consequently, the effect of \ac{TXT} on tacrolimus \ac{AUC} might not be detectable in the current test set. This study has some limitations. First, the log-linear trapezoidal method is used to calculate the reference \ac{AUC} values. This is a conservative recognized method that does not anticipate any information about the population or data distributions. It provides accurate \acp{AUC} for patients with frequently sampled data, but is less accurate when the number of available concentrations per individual is limited. For patients without registered concentrations at $12$ hours, the trough concentration is used as an estimate. This introduces some uncertainty, making the reference \ac{AUC} values slightly biased. Still, our data includes at least $8$ drug concentrations for each event, which should yield reasonably accurate \ac{AUC} estimations. For log-linear estimation of missing concentrations, we use all available concentrations in the relevant time interval. Using only the two closest concentrations might give more accurate estimations, considering the \ac{PK} properties of tacrolimus, and should be tested as future work. When creating the datasets applied for flexible time, 2, 2.5, 3, 4 and 5 hours are considered. In a real-life setting, concentrations are not necessarily measured at these times. However, it would not be feasible to include all possible time points during model development. We believe that these five times are representative and cover most time intervals likely to be used in clinical practice. Moreover, we only test flexible times for the last concentration. In future work, deviations for trough and one-hour concentrations should also be explored. With population \ac{PK} models, it is possible to investigate the underlying \ac{PK} properties of drugs. They are more interpretable than \ac{ML} models, but also tedious to develop, not necessarily supporting automatic hyperparameter tuning, and requiring much computational power. Our \ac{ML} models are faster to train and run and support automatic hyperparameter optimization. They are less computationally heavy, but still achieve results comparable to the population \ac{PK} model. They are, however, not suitable for describing the \ac{PK} properties of drugs. It is, however, still possible to gain insight into the model using explainable artificial intelligence, as demonstrated here using \ac{SHAP}. Such analyses can increase trust in the \ac{ML} models, as our findings suggest that our models are able to reflect some of the processes that affect the \ac{PK} of tacrolimus. \section{Conclusion} To conclude, we have developed \ac{ML} models that predict tacrolimus exposure in kidney transplanted patients. Results from prospective testing are promising and indicate that \ac{ML} models can have predictive performances at the same level as more established population \ac{PK} models. For future work, we plan to increase the dataset size using synthetic data generation and test if this can improve performance or even compensate for missing values. \bibliographystyle{IEEEtran} \small \section{Related work}
\section{Background} \label{sec:background} \subsection{Consistent Hashing} \label{sec:consistent_hashing} Consistent hashing is a common way of distributing requests among a changing population of servers~\cite{mirrokni2018consistent,stoica2003chord} (often times, the problem and the technique are referred to as \textit{consistent hashing} indistinctly). The algorithm, which gave rise to Akamai~\cite{nygren2010akamai}, is used in many other real-world large scale applications such as Dynamo on Amazon Web Services~\cite{decandia2007dynamo} and Google Cloud Platform~\cite{eisenbud2016maglev}. To describe consistent hashing, let $h(\cdot)$ denote a hash function that takes requests as inputs (in practice an IP address or unique identifier, for example) and $S=\{s_1 , \dots , s_n \}$ a set of servers. In modular hashing, a request $r$ is simply assigned to $s_i$ where $i=h(r)\bmod n$. Instead, consistent hashing maps both requests and servers uniformly to the unit interval $[0,1]$, which is interpreted as a circular interval. Thereafter, each request is assigned to the first server that succeeds it in the circle in clockwise order. This assignment is usually done in $\mathcal{O}(\log n)$ time using binary search. \subsection{Rendezvous Hashing} \label{sec:rendezvous_hashing} The basic idea of rendezvous hashing~\cite{thaler1998using}, also known as highest random weight (HRW) hashing, is very simple. Given a hash function $h(\cdot)$ that takes as input a server and a request, each request $r$ is assigned to the server $s_i$ where: \begin{align*} s_i =\underset{s\in S}{\arg\max} \;h(s,r) \end{align*} Each assignment is therefore done in $\mathcal{O}(n)$ time, since it is necessary to compute the hash of the request paired with each server in the system in order to compute the maximum value. In practice, Rendezvous hashing is used less often than consistent hashing, despite distributing the requests more uniformly, because of the increased time complexity. \subsection{Hyperdimensional Computing} \label{sec:HDC} From a comparative study of computing in animal brains and computer logic circuits~\cite{kanerva2009hyperdimensional}, Hyperdimensional Computing (HDC) emerged as a robust and efficient alternative computation model. The central observation is that large circuits are fundamental to the brain's computation. HDC incorporates this notion by computing with 10,000-bit words (hypervectors), instead of 8-to-64-bit. Such hyperspaces (short for hyperdimensional spaces) have properties that explain certain rich brain properties that are otherwise difficult to reproduce on computers. For example, hypervectors encode information holographically, meaning that each of the thousands of bits contains the same amount of information, ensuring inherent robustness~\cite{kanerva2009hyperdimensional, wu2018brain}. In addition to representation, the other crucial part of a computer system is information manipulation, or arithmetic. The arithmetic in HDC is based on well-defined operations between hypervectors, such as addition (bundling), multiplication (binding) and permutation. Another important function is information comparison, which in HDC usually means measuring the similarity between hypervectors using the inverse Hamming distance or the cosine similarity. All those operations are typically dimension-independent, providing an opportunity for massive parallelism~\cite{li2016hyperdimensional,rahimi2017high}. Computational efficiency is one of the core motivations aimed at since the conception of HDC and it is envisioned for and expected to reach full potential in specialized hardware~\cite{kanerva2009hyperdimensional}. In addition to the just mentioned parallelizability, optimizations such as in-memory processing promise to further increase the computational efficiency of HDC~\cite{imani2017ultra}. Schmuck et al.~\cite{schmuck2019hardware} apply a series of hardware techniques to optimize HDC, such as on-the-fly \textit{rematerialization} of hypervectors and special memory architectures, to improve chip area and throughput at the same time. Particularly important to substantiate the claims we make in this paper about efficiency (see Section~\ref{sec:HD_consistent_hashing}), they demonstrate an FPGA implementation that uses deep adder trees to perform inference in a single clock-cycle. \section{Circular-Hypervectors} \label{sec:circular_encoding} To understand circular-hypervectors we first describe random and level-hypervectors, both types are used to represent information in hyperspace, a process called \textit{encoding}. Encoding strategies have already been proposed for various types of input data, such as images~\cite{manabat2019performance}, time series~\cite{imani2017voicehd} and text~\cite{najafabadi2016hyperdimensional}. The process usually starts by generating a set of randomly sampled hypervectors that represent discrete atomic pieces of information (e.g. discretized amplitudes of a signal, values of a feature, symbols or identifiers). From these so-called basis-hypervectors more complex objects like the ones listed above can be encoded by combining and manipulating the basis-hypervectors using bundling, binding and permutation operations. The basis-hypervectors can be correlated with each other depending on what they represent. For example, consider temperature. Clearly there is a stronger correlation between closer temperatures. On the other hand, for symbols such as letters, this correlation does not necessarily exist. Naturally, the most successful encoding techniques are able to translate these correlations into hyperspace. For this reason, categorical data (letters for example) are encoded with independently and uniformly sampled \textit{random-hypervectors}, while scalar information (e.g. temperature) is represented using \textit{level-hypervectors}~\cite{rahimi2016hyperdimensional}. Level-hypervectors are created by quantizing an interval to $m$ levels and assigning a hypervector to each. The similarity between hypervectors is proportional to the distance between the intervals. This correlation is achieved by assigning a random $d$-dimensional hypervector to the first interval, and after this, subsequent intervals are obtained by flipping $d/m$ random bits at each interval. As a result, the last hypervector is completely dissimilar to the first one. \begin{figure} \centering \includegraphics[width=\columnwidth]{images/similarity-map.png} \includegraphics[width=\columnwidth]{images/similarity-fig.png} \caption{\label{fig:periodic-distances} Pairwise cosine similarities between hypervectors $i$ and $j$ within different sets of 12 basis-hypervectors. An alternative visualization in which each hypervector is represented by a node is shown below. The colors indicate the similarity with the yellow reference node.} \end{figure} Circular-hypervectors are an extension to level-hypervectors that eliminate the discontinuity in similarity between the last and first interval, as visualized in the similarity profiles in Figure~\ref{fig:periodic-distances}. By removing the discontinuity, the hypervectors become a set with circular correlation. The procedure for generating circular-hypervectors, illustrated in Figure~\ref{fig:periodic-hvs} and detailed in Algorithm~\ref{alg:create_periodic}, starts with a single random-hypervector, uniformly sampled from the hyperspace of dimension $d$ (generated by the function \textit{random\_hypervector($d$)} in the algorithm). From there, inspired by the creation of the level-hypervectors, a sequence of transformations (T) are made to create $n/2$ level correlated hypervectors. Such transformations consist of XORing (also called \textit{binding} in HDC, represented by the symbol $\oplus$) with what we name transformation-hypervectors ($\mathbf{t}$), which are placed in a queue ($Q$). The second half of hypervectors are then obtained by performing backward transformations (T$^{-1}$): the transformation-hypervectors are popped from $Q$ (\textit{first-in-first-out}) and sequentially bound to the current vector in order to generate the next one. \begin{figure}[h] \centering \includegraphics[width=.75\columnwidth]{images/periodic-hvs.png} \caption{\label{fig:periodic-hvs} Illustration of the process to create circular-hypervectors. The curved arrows represent transformation-hypervectors being inserted in/removed from $Q$.} \end{figure} \begin{algorithm} \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{Two integers $n$ and $d$.\footnotemark} \Output{A set $\{\mathbf{c}_1 ,\dots,\mathbf{c}_n \}$ of $n$ $d$-dimensional circular-hypervectors.} Define an empty queue $Q$ \hfill\tcp{Transformation Hv Queue} $\mathbf{c}_1 \gets$ random\_hypervector($d$)\\ \tcc{Perform forward transformations (T)} \For{$i\in\{2, \ldots, \frac{n}{2}\}$} { $\mathbf{t} \gets \mathbf{0}^d$ \hfill\tcp{$d$-dimensional zeros vector} Flip $d/m$ random bits of $\mathbf{t}$\\ $\mathbf{c}_i \gets \mathbf{c}_{i-1}\oplus \mathbf{t}$\\ Enqueue$(Q,\mathbf{t})$ } \tcc{Perform backwards transformations (T$^{-1}$)} \For{$i \in \{\frac{n}{2}+1,\dots,n\}$} { $\mathbf{t} \gets$ Dequeue$(Q)$\\ $\mathbf{c}_i \gets \mathbf{c}_{i-1}\oplus \mathbf{t}$ } { \Return $\{\mathbf{c}_1 ,\dots,\mathbf{c}_n \}$ } \caption{Creation of circular-hypervectors} \label{alg:create_periodic} \end{algorithm} \footnotetext{For ease of understanding, this version assumes that $n$ is even. To generate a set of odd cardinality of circular-hypervectors, simply generate $2n$ and return just $\{\mathbf{c}_1 ,\mathbf{c}_3 ,\mathbf{c}_5 ,\dots,\mathbf{c}_{2n} \}$.} \section{Conclusion} \label{sec:conclusion} We propose Hyperdimensional (HD) hashing---a novel algorithm based on Hyperdimensional Computing (HDC) which allows dynamic scaling of the hash table with minimal rehashing, a problem found in some of the most popular web applications. Through an emulation framework, we compare our method with consistent and rendezvous hashing and the experimental results show that HD hashing is the only approach that guarantees both efficiency and robustness. HD hashing scales similar to consistent hashing, while both are significantly more efficient than rendezvous hashing. Consistent hashing suffers from more than 20\% mismatches with a realistic level of memory errors, which are common in large-scale cloud systems, while HD hashing remains unaffected. This superior level of tolerance to bit errors reduces the chance of critical failures in load balancing and web caching systems, among others. \section{Future work} \label{sec:future_work} Besides being a central component of our work, circular-hypervectors provide a way to represent periodic information that has not been available in the HDC literature thus far. Consider, for example, the seasons of the year, clearly there is a periodic relationship between them. Several other time-related examples can be listed such as hours of a day or days of a week, as well as other angular data such as directions, geolocation or color spaces. Whether this can be used to improve data representation in HDC, for instance in machine learning applications, is a promising direction of future work. Our method can utilize the work by Schmuck et al.~\cite{schmuck2019hardware} that shows how HDC accelerators can optimize server lookup (inference in HDC) to a single clock-cycle. Realizing an implementation of the HD hashing algorithm in special hardware is future work. \section{Results and Discussion} \label{sec:results} \subsection{Experimental setup} \label{sec:experimental_setup} We have created a purpose build emulation framework to empirically verify our results. The emulator consists of two modules, a hash table and a generator. The generator emulates the requests from the outside world being sent to the hash table. The hash table module reads incoming requests from a buffer and uses a hashing algorithm to map them to an available server. Servers are added and removed using two special case requests, a \texttt{join} and \texttt{leave} request, respectively, with a unique identifier of the server. This functional emulator can be used to determine the computational efficiency of various hashing algorithms as well as their robustness to memory errors as we will describe next. Since we do not have access to specialized HDC hardware and building the hardware is outside the scope of our work we had to implement the HDC operations using commodity hardware. To closely match the parallel nature of HDC hardware, we decided to implement HDC operations on a GPU. We used an Nvidia TITAN Xp GPU with 3840 cores and 12~GB of memory. The GPU's communication overhead was reduced by performing mappings in batches of 256 requests. Each test was performed with different numbers of servers in the pool, going up to 2048. This scale is enough to show the results and trends of interest, but it is important to emphasize that like the other methods HD hashing can scale to much larger clusters, and even be used hierarchically (standard way to scale such hashing systems~\cite{wang2009hash,shen2006cycloid}) to handle extremely high numbers of servers. \subsection{Efficiency} \label{sec:efficiency} We executed each hashing function in our emulator to empirically determine its computational efficiency. First the generator sends $n$ \texttt{join} requests to add available servers to the hash table module. Then, the generator sends 10,000 requests and tracks the wall-time. From this we determine the average time to handle a request. \begin{figure}[ht] \centering \includegraphics[width=0.9\columnwidth]{images/uniformity.png} \caption{\label{fig:uniformity} The discrepancy between the distribution of requests per server obtained by each algorithm and the uniform distribution, for different numbers of servers and bit errors, measured with the Pearson's $\chi^2$ statistical test.} \end{figure} For various numbers of $n$, ranging from 2 to 2048 in powers of 2 the results are shown in Figure~\ref{fig:timing}. The $\mathcal{O}(n)$ time complexity of rendezvous hashing is clearly evident as is the superior computational efficiency of consistent hashing with respect to rendezvous hashing. Our HDC implementation using commodity hardware has a very similar scaling profile to consistent hashing. This confirms our belief that HDC hardware can appropriately be simulated by a GPU. However, as highlighted in Section~\ref{sec:HD_consistent_hashing}, we expect the use of HDC accelerators to reduce the request handling time to a constant with the extreme of a single clock-cycle. \subsection{Robustness} \label{sec:robustness} As motivated before, the other main goal of HD hashing is to be a robust alternative to consistent and rendezvous hashing. In order to assess the performance of each hashing algorithm in an environment subject to noise, two experiments were performed using the emulator's noise injection capabilities. The first and most important, whose results are in Figure~\ref{fig:robustness}, shows how the ability of each technique to map keys to the correct value degrades when a certain number of bits in memory are randomly flipped. Ibe et al.~\cite{ibe2010impact} show that for 22~nm technology, 4-bit and 8-bit bursts occur 10\% and 1\% of the time, respectively. Moreover, errors within a machine are found to be strongly correlated, if a machine experienced an error it is 13-228 times more likely to experience another error in the same month~\cite{schroeder2009dram}. To capture such features of a realistic scenario, we test each hashing technique in the range of 0 to 10 bit flips. In our experiments, HD hashing confirmed our expectations, turning out to be far superior as none of the requests sent were matched to the wrong server. Meanwhile, in both consistent and rendezvous hashing an increasing percentage of mismatches occur, depending on the noise level. In the second experiment we tested how uniform the distribution of requests among servers is and how uniform they remain when bits of the hash values are randomly inverted. For evaluation, we used the following \textit{Pearson's chi-squared test}~\cite{greenwood1996guide} to measure goodness of fit between our observed frequency distribution and the uniform distribution: \begin{align*} \chi^2 = \sum_{s_i \in S}\frac{\big(R\left(s_i \right) - E\big)^2}{E} \end{align*} where $R(s_i )$ is the number of requests mapped to server $s_i$ by the algorithm and $E = \frac{|R|}{|S|}$ is the uniformity expectation where $|R|$ and $|S|$ are the total number of requests and servers, respectively. The results, illustrated in Figure~\ref{fig:uniformity}, show that not only does HD hashing distribute requests more uniformly than consistent hashing in an ideal scenario, but also that the presence of bit errors worsens the uniformity of consistent hashing even more, while that of HD hashing remains intact. To make the plot more readable, we omit the rendezvous hashing result. Note, from the description of the algorithm in Section~\ref{sec:rendezvous_hashing}, that rendezvous hashing is based only on the output of the hash function, that is, a pseudo-random number. Therefore, its assignment is perfectly (pseudo-) uniform and is not affected by bit errors. Rendezvous hashing, however, still suffers from mismatches and the method has less applicability due to its lower efficiency as illustrated in Figures~\ref{fig:robustness} and~\ref{fig:timing}, respectively. \section{Distributed Hash Table Using Hyperdimensional Computing} \section{Hyperdimensional Hashing} \label{sec:HD_consistent_hashing} HD hashing, illustrated in Figure~\ref{fig:HD_hashing}, draws inspiration from consistent and rendezvous hashing, but seeks a solution that is both robust and efficient by translating the problem into a hyperdimensional computing task. \begin{figure}[ht] \centering \includegraphics[width=.75\columnwidth]{images/HD_hashing.png} \caption{\label{fig:HD_hashing} Illustration of the operation of HD hashing. In this example, after encoding each of the three servers and two requests to a circular-hypervector, $r_1$ is assigned to server $s_3$, which is the server whose hyperspace representation is closest to its. Likewise, $r_2$ is assigned to $s_2$. Note that, unlike consistent hashing, the direction of rotation does not matter.} \end{figure} Let $S=\{s_1 ,\dots,s_k \}$ be a set of $k$ servers, $R=\{r_1 ,\dots,r_\ell \}$ a set of $\ell$ requests and $C=\{\mathbf{c}_1 ,\dots,\mathbf{c}_n \}$ a set of $n>k$ hypervectors. We also denote by $h(\cdot)$ a hash function that takes as input a server or request. The process of adding servers to the system in HD hashing is similar to consistent hashing, but instead of mapping them to a unit interval (see Sec.~\ref{sec:consistent_hashing}), HD hashing assigns (or "\textit{encodes}" in HDC terminology) each server to a hypervector. To distribute requests among servers, HD hashing also encodes each request. Let us represent this encoding by the function $\mathrm{Enc}: S\cup R \to C$. Then, HD hashing encodes every server and request as follows: \begin{equation} \label{eq:encoding} \mathrm{Enc}\left(x\right)\;=\;C\big[h(x)\bmod n\big] \end{equation} where $x$ is either a server or a request and $C\left[h(x)\bmod n\right]$ denotes the hypervector at position $h(x)\bmod n$ in $C$. With all servers and requests encoded to the hyperspace, each request $r_i$ is mapped to server $s_j$, such that: \begin{equation} \label{eq:inference} s_j\;=\;\underset{s \in S}{\arg\max} \;\delta\big(\mathrm{Enc}(s), \mathrm{Enc}(r_i )\big) \end{equation} where $\delta$ is a given similarity metric between a pair of hypervectors such as inverse Hamming distance or the cosine similarity. The operation above is the one mentioned in Section~\ref{sec:HDC}, and it is called inference due to the first applications of HDC in learning tasks. This is exactly the operation that Schmuck et al.~\cite{schmuck2019hardware} show to be optimizable to the extreme of a single clock-cycle in special hardware. In other words, by using hardware accelerators for HDC each mapping in HD hashing could be executed in $\mathcal{O}(1)$ time. One remaining, but crucial, question is: how do we create the set of hypervectors $C$? Similar to consistent hashing, we map servers and requests onto a circle. We then map the request to the server that is assigned to the nearest node on the circle according to Eq.~\ref{eq:inference}. To accomplish this, we introduce \textit{circular-hypervectors} as a way of representing a circle in hyperspace such that the closer a node is on the circle the more similar its hypervector. More properties of circular-hypervectors and the process to create them are described in the next section. \section{Introduction} \label{sec:intro} An important problem in many cloud services and distributed network applications is the process of mapping requests to available resources. Example systems include: load balancing in cloud data centers, web caching, peer-to-peer (P2P) services, and distributed databases. Difficulty arises in such highly dynamic systems because resources join and leave the cluster at any time, due for example to cloud elasticity~\cite{al2017elasticity}, server failures, or availability of peers in a P2P network. It is often desirable to distribute requests evenly among resources and to minimize the number of redistributed requests when a resource joins or leaves. A non-uniform mapping results in overloading of resources and critical failure points. The simplest hash table solves the mapping problem using modular hashing. Despite having a great lookup time complexity of $\mathcal{O}(1)$, a change in table size (number of available resources) requires virtually all requests to be redistributed due to the modulo operation (more details in Section~\ref{sec:background}). \textit{Consistent hashing}~\cite{karger1997consistent} and \textit{rendezvous hashing}~\cite{thaler1998using} are alternative hashing algorithms that minimize redistribution when the hash table is resized. They prevent resource overloading at the cost of increased lookup time---$\mathcal{O}(\log n)$ and $\mathcal{O}(n)$ respectively. However, we show that when considered in a dynamic environment subject to errors and failures (i.e., noise), the performance of consistent hashing and rendezvous hashing in minimizing the number of redistributed requests degrades. Noise can be introduced in many aspects of a system. We focus on memory errors which can for instance be caused by soft errors in the form of single event upsets (SEU), multi-cell upsets (MCUs) or hard errors~\cite{hwang2012cosmic, sridharan2012study}. MCUs, or burst errors, occur during a single event and are becoming more common as the feature size decreases. For 22~nm technology MCUs are estimated to be 45\% of all SEUs~\cite{ibe2010impact}. Moreover, analysis of memory failures in Google's data centers revealed that each year a third of the machines experiences a memory error~\cite{schroeder2009dram}. More robust hashing alternatives make it possible for cloud providers to perform fewer memory swaps, reducing operation cost. Hyperdimensional Computing (HDC) is an inherently robust emerging computational model developed by Kanerva~\cite{kanerva2009hyperdimensional} inspired by neuroscience. HDC tries to emulate brain-like computing by representing information using high-dimensional random vectors, called \textit{hypervectors}. This representation shares qualities from biological neural systems such as robustness and efficiency. Representation and transformations of data in HDC are performed over hypervectors of fixed dimensions, allowing for massive parallelism. Fueled by the demonstrated properties of HDC and the aforementioned limitations of current hashing algorithms, we propose \textit{Hyperdimensional (HD) hashing}, a new HDC-based dynamic hashing algorithm. HD hashing scales similarly to consistent hashing while proving to be much more efficient than rendezvous hashing. HDC's highly parallelizable operations have been exploited in recent research, showing that special hardware can make HD hashing far superior in efficiency (more details in Sec.~\ref{sec:HDC}). Moreover, we show that our algorithm is significantly more robust against noise. With 512 servers and a 10-bit MCU, HD hashing is unaffected while rendezvous and consistent hashing mismatch 4\% and 12\% of requests, respectively. With MCUs becoming more common this poses a risk for critical failures. Our second contribution is a novel HDC encoding for representing a circle in hyperdimensional space, we call these \textit{circular-hypervectors}. They are a core component of HD hashing as they provide the mechanism for mapping requests to servers. \section*{Acknowledgment} This work was supported in part by a UCI Seed grant for Artificial Intelligence Research for Precision Health. \bibliographystyle{ACM-Reference-Format}
\section{Introduction}% The coupling of a single quantum emitter to a continuum of electromagnetic modes is an important problem since the birth of quantum theory \cite{Weisskopf1930}. Current experiments, involving different technological platforms have shown that propagating photons can be coupled efficiently to localized quantum emitters. This field, known as waveguide quantum electrodynamics (wQED), has received a lot of attention due to the interesting theoretical and experimental applications \cite{Wilson2017,Sasha2021,Tao2018}. In most scenarios, emitters are described as point-like particles of negligible size compared with the wavelength of the electromagnetic radiation. This justifies the standard dipole approximation widely employed in quantum optics. In recent years, however, experiments with artificial emitters have led to a reconsideration of atoms as point-like matter \cite{GustafssonSci2014,AnderssonNatPhys2019}. In the literature, they are called \emph{giant atoms}, for obvious reasons. As a consequence of the non-local light-matter interaction, new phenomena have been reported. Examples are non-Markovian emission \cite{KockumPRA2017,AnderssonNatPhys2019, LonghiOpt2020}, tunable decay rates and Lamb shifts \cite{KockumPRA2014,KockumPRL2018,KannanNat2020}, engineering of energy levels \cite{VadirajPRA2021}, as well as bound states emerging from interference between coupling points, including oscillating \cite{KockumPRR2020, GuoPRA2020} and chiral \cite{WangPRL2021} bound states. In addition, bound states originating from photonic band edges for giant atoms have been studied in \cite{ZhaoPRA2020}. The large size of the system also allows for a giant emitter to be coupled to a waveguide in between the connection points of other giant atoms. The many possible configurations can lead to decoherence-free interactions between giant emitters \cite{KockumPRL2018, KannanNat2020} or nonreciprocal excitation transfer \cite{DuPRA2021}. See Ref. \cite{KockumReview2021} for a recent overview of the field. The breakdown of the dipolar approximation leads to the appearance of deviations form Markovian dynamics. These typically arise from the coupling of quantum emitters to structured environments with non-flat spectral functions \cite{vats1998,breuer, deVega2017}. However, it has been shown that retardation effects can induce strong non-Markovian features whenever coherent feedback is allowed to influence the dynamics \cite{Dorner2002, Pichler2016, Tuffarelli2013, Kanu2020, DistantEmitters2021, Regidor2020, Regidor2021, Wen2019}. Giant emitters fall naturally into this last category of non-Markovian systems \cite{KockumReview2021} and they have been a relevant topic in waveguide QED systems. Another assumption that is being reconsidered, thanks to experiments, is the fact that photons are weakly coupled to matter, so their interaction can be described in a perturbative way. Several experiments have reached the so-called ultrastrong coupling regime (USC) between light and single quantum emitters, both in cavity \cite{Niemczyk2010,forn2010,Yoshihara2017} and waveguide QED \cite{forn2017,martinez2019,leger2019}. In the USC regime higher order processes, than the creation (annihilation) of one photon by annihilating (creating) one matter excitation play a role. Then, the rotating wave approximation (RWA) for the interaction breaks down, the atomic bare parameters get renormalized, and the ground state becomes nontrivial. This has interesting consequences. Some of them are the possibility of transforming virtual onto real photons by perturbing the ground state \cite{Ciuti2005, Stassi2013, QiKai2018, gheeraert2018, SanchezBurillo2018, Cirio2017}, the localization-delocalization transition \cite{peropadre2013,shi2018}, or the possibility to perform non-linear optics at the single and zero photon limit \cite{sanchez2014,sanchez2015,Stassi2017,Kockum2017, Chen2017, Kockum2017b}. Reviews for light-matter interactions in the USC regime can be found in \cite{KockumUSCReview2019,forn2019}. In this work, we discuss the low energy physics (both at and out of equilibrium) of a giant atom coupled to a continuum in the USC regime. To do so, the light-matter coupling is treated within the spin-boson model. In the USC this is a paradigmatic example of a non analytically solvable model \cite{Weiss}. Different techniques are available in the literature to deal with it, such as Matrix-product states \cite{peropadre2013,sanchez2014,sanchez2015}, density matrix renormalization group \cite{prior2010}, hierarchical equations of motion or pseudomodes methods \cite{Lambert2019}, and path integral \cite{grifoni1998,lehur2010}, polaron-like \cite{shi2018,sanchez2019,silbey1984,Bera2014,DiazCamacho2016,Zueco2019,ashida2021} or Gaussian approaches \cite{shi2018b}. % During the completion of this work, it has been recently reported \cite{noachtar2022nonperturbative} how to use matrix product states to describe the dynamics of giant atoms in a waveguide in the USC regime. In this paper we employ polaron-like techniques, complementing and extending their work. We examine the renormalization of atomic parameters and provide expressions for them. We prove the the existence of the localization-delocalization transition in giant emitters, as well as a profile of the virtual photons in the ground state which we characterize for both phases. Regarding the dynamics, we discuss the spontaneous emission, its rate and the Lamb shift in the USC regime. Within the non-Markovian regime we provide numerical results and analytical expressions for the emission and the existence of bound states, also oscillating ones. The rest of the manuscript is organized as follows. In Sec. \ref{sec:Model} we introduce the theoretical model, including the discrete model for the waveguide as well as the spin-boson Hamiltonian and spectral density of the system. In Sec. \ref{sec:Polaron} we describe the polaron formalism and apply it to our model to reach the effective Hamiltonian used throughout the work. In Sec. \ref{sec:Equilibrium} we analyze the equilibrium properties of the system, including its ground state and renormalization of the transition energy leading to the discussion of the quantum phase transition. In Sec. \ref{sec:DecayRateLambShift} we compute the Lamb-Shift and effective decay rate for the system. In Sec. \ref{sec:nonMarkDyn} we study different cases of the non-Markovian dynamics of the system, using numerical simulations and approximate analytical expressions with a special focus on oscillating bound states. Finally, a summary and conclusions of this work are given in Sec. \ref{sec:Conclusion}. \section{Spin-Boson model for a giant emitter}\label{sec:Model}% Let us consider a giant atom well described by a two-level system or qubit with energy splitting $\Delta$. Furthermore, we assume that the coupling of such qubit to a one-dimensional waveguide is through a discrete set of \emph{contact points}, see Fig. \ref{fig:fig1}(a). This covers the current realizations with superconducting qubits as reported in Ref. \cite{KockumPRL2018, KannanNat2020}. So the (giant) atom and waveguide can be described by the following spin boson model: \begin{eqnarray} \label{spin::boson} H=\frac{\Delta}{2}\sigma^{z}+\sum_{k}\omega_k a^{\dagger}_{k}a_{k}+\sigma^x\sum_{k}\left(\tilde g_{k}a_{k}+\rm {h.c.}\right), \end{eqnarray} The waveguide modes are found by diagonalizing the corresponding microscopic model via the standard procedure described in \cite{DevoretFluctuations}. A discretization length is chosen $\delta x = L/N$, being $L$ the length of the transmission line and $N$ the number of propagating modes. For a linear medium in one dimension, discretization yields the LC-chain, with set of momenta $k_n=2\pi n/L,$ $n\in\{-N/2, ..., N/2\}$ and the dispersion relation to use in \eqref{spin::boson}: \begin{eqnarray} \label{disp::rel} \omega_k =\omega_c\sqrt{2-2\cos \left(k_{n}\delta x\right)} \; . \end{eqnarray} Here, $\omega_c=v_{g}/\delta x$ is the cutoff frequency. The emitter-field couplings \cite{KockumReview2021} are dependent on the positions of the coupling points as: \begin{eqnarray} \label{gk} \tilde g_{k} =\frac{g_{k}}{N_c}\sum_{j=1}^{N_c}e^{i k x_{j}}. \end{eqnarray} Here, $g_k$ is the coupling strength of a single contact point to the mode $k$, which we assume to be equal at every connection, and $N_c$ the total number of contact points at positions $x_{j}$. $1/N_c$ is a normalization factor chosen to ensure that in the zero distance limit $\tilde g_k = g_k$, that is, it fixes the total coupling strength and facilitates the comparison for different $N_c$. Besides, it has a well defined limit as $N_c\to \infty$. Hamiltonian \eqref{spin::boson} is completed with the couplings that can be written as \begin{equation} \label{eq:gk} g_k=g\sqrt{\frac{\omega_k}{2 L}} \; , \end{equation} where $g = \sqrt{\pi v_g \alpha}$ and $\alpha$ denoting the coupling strength to each contact point. Spin-boson models are characterized by their spectral function: \begin{equation} J(\omega)\equiv 2\pi\sum_{k}|\tilde{g}_{k}|^2\delta(\omega-\omega_k). \end{equation} The spectral function encapsulates all the information about the bath frequency modes and their coupling to the two-level system \cite{weiss2012quantum}. The discretization, just sketched, guarantees that in the continuum limit $N\to\infty$ ($\delta x\to0$), $\omega_k\approx v_{g}|k|$, see Fig. \ref{fig:fig1}(c), and \begin{eqnarray} \label{J::omega} J(\omega)= J_{\rm {Ohm}}(\omega)G(\omega) \; . \end{eqnarray} The Ohmic part, $J_{\rm Ohm}(\omega)= \pi\alpha\omega $, comes from the local coupling to a one dimensional continuum, while the modulation function \begin{equation} G(\omega)=\frac{1}{N_c ^2} \; \sum_{j,l}e^{i\omega(x_j-x_l)/v_{g}} \end{equation} arises from interference caused by the multiple coupling points. For equidistant contact points with distance $x$, the modulation function simplifies to \begin{equation} \label{eq:Gw} G(\omega)=\frac{1}{N^{2}_{c}} \frac{1-\cos (N_{c}\omega x/v_{g})}{1-\cos(\omega x/v_{g})}. \end{equation} Figure \ref{fig:fig1}(d) shows the spectral function of the waveguide and its modification for different $N_c$, compared to the small emitter limit $N_c=1$ for both the discrete (open circles) and continuous descriptions (solid lines). % The inter distance $x$ is fixed, so the main peaks coincide for all $N_c$. % On the other hand, as the contact points increase, the peaks become narrower with a width $\propto N_{c}^{-1}$. % \begin{figure} \centering \includegraphics[width = \columnwidth]{Fig1_update.pdf} \caption{(a) Pictorial illustration of the giant emitter with three connection points. (b) Schematic of a circuit-QED implementation of a giant atom coupled to an Ohmic waveguide with three connection points. (c) Dispersion relations for the discrete and continuous models for the Ohmic waveguide. The group velocity for the waveguide is $v_g = c = 1$ throughout this work. (d) Spectral function $J(\omega)$ for a continuous dispersion relation $\omega_k = v_g \lvert k \rvert$ in solid lines and, in circles, the corresponding for the discrete model from Eq. \eqref{disp::rel} with spacing between coupling points $x = 5 \delta x$ and coupling strength $\alpha = 0.1$. The cutoff frequency is $\omega_c = 3$ and the number of modes is $N = 300$ for both plots (c) and (d).} \label{fig:fig1} \end{figure} \section{Effective RWA models in the USC: Polaron theory for the giant atom} \label{sec:Polaron}% The low-energy spectrum of a spin-boson model \eqref{spin::boson} can be well approximated by an effective excitation-number-conserving Hamiltonian derived from a polaron transformation \cite{Bera2014, DiazCamacho2016, Zueco2019}. Furthermore, it has been shown to be accurate for various realizations of the model, e.g. considering multiple emitters \cite{JRR2020, DistantEmitters2021} and for different functional forms of the spectral function \cite{Zueco2019}. In this section we summarize the main aspects of the static and dynamical polaron theory in order to proceed with its application to the case at hand, a giant atom beyond the rotating wave approximation. The unitary transformation \begin{equation} \label{Up} U_p=\exp\left[-\sigma^{x}\sum_{k}\left(f_{k}a^{\dagger}_{k}-f^{*}_{k}a_{k}\right)\right] \end{equation} disentangles the atom and waveguide, by choosing the displacements $f_k$ such that the ground state of $H_{p}=U^{\dagger}_{p}HU_{p}$ to be as close as possible to $| g \rangle \otimes |{\bf 0 } \rangle$ the ground state of the uncoupled atom $|g\rangle$ and waveguide $|{\bf 0} \rangle$. For \eqref{spin::boson} this is equivalent to minimize the ground state energy ${\rm min}_{f_k} \{ \langle {\bf 0} | \langle g | \, U_p^\dagger H U_p \, | g \rangle|{\bf 0 } \rangle \} $. It turns out that [Cf. Eq. \eqref{gk}], \begin{equation} \label{eq:fks} f_{k}=\frac{\tilde{g}_{k}} {\omega_k+\Delta_r }, \end{equation} with, \begin{equation} \label{deltar} \Delta_r=\Delta\exp\left(-2\sum_{k}|f_{k}|^2\right). \end{equation} Both, $\Delta_r$ and $f_k$ are related by a self-consistent equation that can be solved numerically. Once such parameters are found, we can obtain all the properties of the model. Within the scope of the present work, we can restrict our treatment to the low-energy sector, where the polaron model can be well approximated by the effective number-preserving Hamiltonian, \begin{eqnarray} \label{Hp} H_{p}&\approx& H_{\rm eff} \nonumber\\ &=& \frac{\Delta_r}{2}\sigma^{z}+\sum_{k}\omega_k a^{\dagger}_{k}a_{k} +2\Delta_{r}\sum_{k}f_k\left(\sigma^{+}a_{k}+\rm{h.c.}\right) \nonumber\\ &+&V_{\rm local}+E_{\rm ZP}, \end{eqnarray} where $V_{\rm local}=-2\Delta_r\sigma^{z}\sum_{k,k^{\prime}}f_{k}f_{k^{\prime}}a^{\dagger}_{k}a_{k^\prime}$, and \begin{equation} \label{eq:ZPEn} E_{\rm ZP}=-\Delta_r/2+\sum_{k}f_{k}\left[\omega_{k} f_{k}-\tilde{g}_{k}-\tilde{g}^{*}_{k}\right]. \end{equation} \subsection{Lab and polaron frames} Hamiltonian \eqref{Hp} is rather convenient for calculations, because it commutes with the excitation operator $N_e =\sigma^{+}\sigma^{-}+\sum_{k}a^{\dagger}_{k}a_{k}$. This allows the use of the standard methods for the study of waveguide-QED within the RWA. In the polaron frame the ground state is trivial and the dynamics split in subspaces of different number of excitations. Expected values of observables in the polaron frame are of minor physical relevance but they are convenient for calculations because the physical observables can be found in terms of them. Since measurements are performed in the Lab frame, where Hamiltonian \eqref{spin::boson} is expressed, it is mandatory to find the relation between both pictures. In what follows, observables with superscript $^p$ are observables computed in the polaron frame, i.e. \begin{equation} O^p := \langle \psi^p(t) | O | \psi^p(t) \rangle = \langle \psi(t) U_p^\dagger | O | U_p \psi(t) \rangle \; , \end{equation} whereas actual observables are given by \begin{equation} O = \langle \psi(t) | O | \psi(t) \rangle = \langle \psi^p(t) | U_p O U_p^\dagger | \psi^p(t) \rangle \; . \end{equation} With this, the atomic excitation probability can be written as, \begin{align} \nonumber P_e =& \frac{\Delta_r}{\Delta}\left[P^p_e+2\Re\left\{c\sum_k f_k \phi_k^{*}\right\}+2\sum_{k k^\prime }f_{k}f^{*}_{k^{\prime}}\phi^{*}_{k}\phi_{k^\prime}\right]\\ &+P^{\rm GS}_e\;, \label{eq:PolLabExcit} \end{align} where $c = \bra{\bf 0} \otimes \bra{g} \sigma^{-}\ket{\psi^p}$ and $\phi_k = \bra{\bf 0}\otimes\bra{g} a_k \ket{\psi^p}$ are the amplitudes for the excited state and the $k$-mode field of an arbitrary state in the polaron frame, respectively. The first and last terms of Eq. \eqref{eq:PolLabExcit} are the probability of excitation in the polaron frame and in the ground state, respectively. Concretely, \begin{equation} \label{eq:GSExcit} P^{\rm GS}_e = \frac{1}{2}\left(1+\ave{\sigma^{z}}_{\rm{GS}}\right) = \frac{1}{2}\left( 1 - \frac{\Delta_r}{\Delta}\right) \end{equation} We also note that to return to the laboratory framework, both the atomic and field amplitudes are needed. This is a consequence of the \emph{non-local} character of $U_p$ in equation \eqref{Up}, which mixes matter and light operators. Last but not least, we will be interested in the temporal evolution of the occupation of mode $n_k$. In terms of quantities in the polaron frame we obtain the relationship: \begin{align} n_k(t) = n^{\rm GS}_k + | \phi_k(t) |^2 -2 \Re\left[c(t)\phi_k(t)f_k\right] \; . \label{eq:PolLabField} \end{align} The same comments as for $P_e$ can be repeated here. Both relations will be used through this work. \section{Equilibrium properties}\label{sec:Equilibrium}% For sufficiently weak atom-waveguide coupling, the ground state is well approximated by the trivial vacuum $|g\rangle \otimes|{\bf 0} \rangle$. This is consistent with performing the RWA on \eqref{spin::boson}. A first consequence of entering the USC regime is that strong light-matter correlations are formed. This is easily understood with the polaron \emph{ansatz}, since the actual ground state (GS) of \eqref{spin::boson} can be approximated by \begin{align} \label{gs} \nonumber \ket{\psi_{\rm GS}} & \cong U_p \, |g\rangle\otimes |{\bf 0} \rangle \\ & = \frac{1}{\sqrt{2}}\left(\ket{+}\prod_{k}\ket{-f_k}-\ket{-}\prod_{k}\ket{f_k}\right), \end{align} where $\ket{f_{k}}=D(f_{k})\ket{0_{k}}$ is a $k$-mode coherent state, being $D(f_{k})=\exp\left({f_{k}a^{\dagger}_{k}-f^{*}_{k}a_{k}}\right)$ the bosonic displacement operator. States, $| \pm \rangle = \frac{1}{\sqrt{2}} ( |g \rangle \pm |e \rangle)$, are the atom symmetric (antisymmetric) superpositions. The state in Eq. \eqref{gs} is a multiphoton Schr\"odinger cat state. Its photon number can be obtained via $\bra{\psi_{ \rm GS}}a^{\dagger}_{k}a_{k}\ket{\psi_{\rm GS}}=|f_{k}|^{2}$. The photonic profile in position space can be recovered via a discrete Fourier transform, \begin{equation} \label{eq:FourierTransf} f_{x} = \frac{1}{N_c}\sum_{j,k}f_{k}e^{ik(x-x_{j})}, \end{equation} which indicates that the photonic amplitudes are superpositions of small emitter contributions $f_{k}$ centered at each coupling point to the waveguide. The ground state, together with the atomic renormalization frequency $\Delta_r$ in Eq. \eqref{deltar}, encapsulate the equilibrium properties at zero temperature. In particular, the existence of virtual excitations, both in the atom and in the photonic field, as well as the existence (or not) of a quantum phase transition. It is known that the spin boson model undergoes a localization-delocalization transition when $\Delta_r \to 0$ \cite{Leggett1987}. Again, this transition can also be understood within the polaron formalism. If we look at $\eqref{Hp}$, when $\Delta_r =0$, the ground state is degenerate, so the gap closes and a quantum phase transition can occur. \begin{figure} \centering\includegraphics[width=\columnwidth]{Deltars_Nc3_panel_vert_final.jpeg} \caption{(a) Renormalization of the two-level system energy with the coupling strength $\alpha$ and the distance between coupling points $x$ for $N_c = 3$. (b) A set of specific values for the distance $x$ between connections showing the phase transition as $\alpha$ increases. For limiting cases we have analytical expressions, for intermediate distances, the transition is more abrupt.} \label{fig:DeltarPanel} \end{figure} \subsection{Atom excitations, renormalization and the existence of a QPT} A consequence of light-matter entanglement in the ground state is that the atom is dressed by the quantum fluctuations of waveguide photons. This is reflected in a renormalization of the dressed atomic frequency, see $\Delta_r$ in Eqs. \eqref{deltar} and \eqref{Hp}. This is well known in the spin-boson model \cite{Leggett1987}. Furthermore, using the polaron theory the qubit excitation probability is given by Eq. \eqref{eq:GSExcit}. Thus, the discussion on $\Delta_r$ directly applies to the existence of excitations in the ground state because of the coupling to the waveguide. \\ In Fig. \ref{fig:DeltarPanel} (a) we plot $\Delta_r$ as function of the contact points distance $x$ and the coupling strength $\alpha$ for a giant emitter with $N_c=3$. Fig. \ref{fig:DeltarPanel} (b) focuses on particular cases and limits of the renormalization of $\Delta_r$. We have verified that in the limit $x \to 0$ the \emph{dipole approximation} is recovered, i.e. results must reduce to the case $N_c=1$. This is a consequence of the normalization used in Eq. \eqref{gk}. For $N_c=1$, we know that for an Ohmic waveguide $\Delta_r\sim\Delta(\Delta/\omega_c)^{\alpha/(1-\alpha)}$ in the scaling limit $\Delta/\omega_c\ll 1$ \cite{DiazCamacho2016}, which is shown as a dotted line in Fig. \ref{fig:DeltarPanel}(b). On the other hand, when $x \to \infty$, $\Delta_r$ behaves as if the contacts points were \emph{independent}, thus approaching the dipole approximation but with a coupling \emph{per contact} $\alpha \to \alpha/N_c$ (shaded line), showing perfect agreement with the numerical calculation. An interesting finding is the appearance of a \emph{distance-dependent localization transition} for a giant emitter, which resembles the one observed for the two-impurity spin boson model \cite{McCutcheon2010, DistantEmitters2021}. This a consequence of the presence of position-dependent couplings in the giant emitter and the competition between the bare qubit energy and dissipation induced by the Ohmic bath. The polaron calculations predict a more abrupt fall down of $\Delta_r$, in contrast with the single emitter limit(s). However, it is not clear that our polaron theory is valid in these (intermediate) ranges of coupling, and the results must be contrasted with other approaches. Thus, now we resort to a field theoretical argument. In fact, the existence of a qunatum phase transition in the spin boson model is well studied in the literature \cite{Leggett1987, weiss2012quantum}. A condition for a symmetry breaking point and thus $\langle \sigma^x \rangle \neq 0$ is that $\int {\rm d} \omega J(\omega)\, \omega^{-2}$ diverges. This happens whenever $J(\omega) \sim \omega^{1-\beta}$ for $0 < \beta < 1$. The Ohmic case ($N_c=1$) lies at the margin \cite{Spohn1985}. It is known that, in this case, there is a continuum transition of the Berezinskii–Kosterlitz–Thouless transition type. This can be proven by mapping the spin-boson model \eqref{spin::boson} to a gas of charges. Concretely, the partition function can be approximated by \cite{guinea1998} \begin{equation} Z \sim \exp\left({- 4 \int _0^\beta d\tau_i \int_0 ^\beta d \tau_j \epsilon_i \epsilon_j \; \lambda \left( \frac{\tau_i - \tau_j}{\tau_c} \right)}\right) \end{equation} with $\epsilon_i = \pm 1$, $\tau_c = \omega_c^{-1}$ ($\beta^{-1}$ is the temperature) and the \emph{effective} interaction is given by \begin{equation} \frac{ d^2 \lambda(\tau)}{d \tau^2} = \omega_c^2 \; \int d \omega J(\omega) \; e^{- \omega \tau}, \end{equation} which yields $\lambda(\tau) \sim \log(\tau)$ in the dipole approximation for the Ohmic case, thus a Berezinskii–Kosterlitz–Thouless-like transition. For a giant atom with arbitrary contact points, the integral on the right side can be computed using the general spectral function in Eq.\eqref{J::omega}, such that \begin{eqnarray} \frac{d^2 \lambda(\tau)}{d\tau^2} \sim \sum_{j,l}^{N_c}\left[\tau+i\left(x_l-x_j\right)/v_{g}\right]^{-2}. \end{eqnarray} As an example, for a giant emitter with $N_c=3$ equidistant points it yields, \begin{equation} \lambda (\tau) \sim -3 \log (\tau )-2 \log \left(\tau ^2+x^2\right)-\log \left(\tau ^2+4 x^2\right), \end{equation} i.e., logarithmic interactions persist, one per each leg of the giant emitter. Thus, \emph{confirming the existence of a quantum phase transition in a giant emitter} with arbitrary coupling points. \subsection{Virtual Photons in the Ground State} \begin{figure}[!t] \centering \includegraphics[width=\columnwidth]{GS3_ph_Nc5_update.pdf} \caption{(a) Ground-state photons for a giant atom with five connection points ($N_c = 5$) with coupling strength $\alpha/N_c = 1/5$, in this case $\Delta_r \neq 0$. The inset plot focuses on the profile of the photonic clouds around the right-most coupling point. A fitting into a power-law decay $x^{-a}$, plotted in a black dashed line, leads to the exponent $a \simeq 2.96$. (b) Illustrates the ground-state photons for $\alpha/N_c = 2/5$, corresponding to $\Delta_r = 0$. The decay also fits into a power-law, in this case with $a \simeq 1.09$. For both plots, the distance between the closest couplings is $x = 20 \delta x$, the cutoff frequency is $\omega_c$ = 3, $\Delta = 1$ and the number of modes $N$ = 15001.} \label{fig:GSphotons} \end{figure} The existence of virtual photons around the contact points at ultrastrong coupling has been hypothesized in \cite{KockumReview2021}. Photon localization of the ground state has been successfully studied using polaron and matrix product states simulations for a small emitter in \cite{sanchez2019,JRR2020}, corroborating the usefulness of the variational polaron ansatzes. In this section, we describe such photonic clustering for a giant emitter and analyze its spatial profile. For atoms coupled to cavity-array systems in the USC regime, the photonic cloud generated around the emitter has been found to have an exponentially decaying profile \cite{sanchez2014,sanchez2019,JRR2020}. Interestingly, the Ohmic model for the waveguide predicts a power-law decay for the photonic cloud localized around each of the contact points of the giant emitter. Furthermore, this power-law decay changes when crossing the QPT. Using Eq. \eqref{eq:FourierTransf} and at the scaling limit where $\omega_k \approx v_g \lvert k \rvert$, the virtual photons are given by the Fourier transform of $\sqrt{\lvert k \rvert}/(\lvert k \rvert + \Delta_r/v_g)$. We are interested in the decay of the photonic cloud well away from the connection points, so the corresponding contribution of the integral is that of small-$k$ values. Therefore, there are two limits of the Fourier transform that interest us. Within the delocalized phase $\Delta_r \neq 0$, so we can assume that the contributing $k$ are negligible in front of $\Delta_r/v_g$, leading to a power-law decay with the form $f_x\sim (x-x_j)^{-3/2}$. Instead, after crossing the quantum phase transition to the localized regime $\Delta_r = 0$ and the decay goes as $f_x \sim (x-x_j)^{-1/2}$. In Fig. \ref{fig:GSphotons} we plot an example of the ground state photons in real space $\bra{\psi_{\rm GS}}a^{\dagger}_{x}a_{x}\ket{\psi_{\rm GS}} = \lvert f_x \rvert^2$ for both cases, with $N_c = 5$ and $x = 20\delta x$. Figure \ref{fig:GSphotons} (a) illustrates the case for $\Delta_r \neq 0$. We observe sharp peaks around each of the coupling points, each of these peaks is surrounded by abrupt dips and a slowly decaying profile. The dips can be attributed to the overlap between the sharp peaks and slow decays. For this case we predict a power-law decay of the photonic profile away from the emitter scaling as $\sim x^{-3}$. The inset of the figure zooms into the rightmost coupling point and shows a power-law fit in a black shaded line. From the fit we recover a decay $\sim x^{-2.96}$ agrees with our prediction. The other example shown in Fig. \ref{fig:GSphotons} (b) corresponds to $\Delta_r = 0$. Here, the peaks become higher and sharper, the dips disappear and the decay becomes slower. Again, fitting the profile away from the rightmost coupling point we have a power-law decay $\sim x^{-1.09}$, which perfectly agrees with our analytical estimation. \section{Relaxation Rate and Lamb Shift} \label{sec:DecayRateLambShift} \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{Fig4_update.png} \caption{(a) and (b) Scaled effective decay rate and Lamb shift for a giant emitter with three coupling points ($N_c = 3$) and bare qubit frequency $\Delta = 1$ as a function of the spacing between connections. Solid lines indicate the behavior for $\alpha = 0.16$ while dashed lines show a case within the RWA, $\alpha = 0.01$. (c) Full dependence of the effective decay rate of both the coupling strength and the distance between coupling points. \label{fig:RatioGammaUSC}} \end{figure} In the simplest approach, the spontaneous emission of an emitter in a continuum is obtained by means of the Fermi's golden rule. Using second-order perturbation theory (in the light-matter coupling) a two-level system with level splitting $\Delta$ decays with a rate $\gamma = J(\Delta)$. Also, the atom frequency is dressed by the Lamb shift $\delta$. Interestingly, for a giant emitter with multiple contact points, interference effects start to play an important role in the relaxation dynamics. The fact that the emitter-waveguide interaction is no longer local introduces a new time scale in the system-accounting for the time-delay between different coupling points $\zeta = x/v_g$. When this time-delay is much smaller than the excited state lifetime of the system as if it had a single coupling point. $\zeta \ll J_{\mathrm{Ohm}}(\Delta)^{-1}$, memory effects can be neglected \cite{KockumPRA2014, KockumReview2021}. Consequently, an effective relaxation rate $\gamma_r$ and the frequency shift can be obtained in this regime by using the Fermi golden rule, which now depends on the distance between coupling points, and can be engineered to suppress or enhance spontaneous emission. In the USC regime, both the emission rates and Lamb shift can be calculated in a similar way as in the perturbative regime. The only difference is that the formulas are now evaluated at the renormalized frequency $\Delta_r$ instead of the bare one $\Delta$, Cf. Eq. \eqref{deltar} \cite{DiazCamacho2016, Zueco2019}. % Then, \begin{eqnarray} \label{eq:Gammar} \gamma_r=J(\Delta_r)=J_{\rm{Ohm}}(\Delta_r)G(\Delta_r), \end{eqnarray} and \begin{eqnarray} \label{eq:LambShift} \delta=\frac{2\Delta_r^{2}}{\pi}\mathcal{P}\int_{0}^{\infty}d\omega\frac{J(\omega)}{(\Delta_r-\omega)(\omega+\Delta_r)^2}. \end{eqnarray} In Fig. \ref{fig:RatioGammaUSC} (a) we show the normalized relaxation rate as a function of the distance $x/\delta x$ between contact points, for two values of the coupling parameter: $\alpha=0.01$, where we recover the weak coupling or RWA results \cite{KockumPRA2014, KockumReview2021}; and $\alpha=0.16$, where the RWA breaks down. We observe that increasing the emitter-waveguide coupling beyond RWA produces a \emph{shift in position for the relaxation rate}, displacing characteristic points of destructive and constructive interference. This shift is a consequence of the renormalization of the giant emitter frequency and it has to be taken into account in order to observe interference effects in experiments with ultrastrongly coupled giant emitters. A more complete image of this behavior is given in Fig. \ref{fig:RatioGammaUSC} (b) where the shift is limited by the localization transition appearing at larger values of the coupling (deep strong coupling). Therefore, the spontaneous decay in a giant emitter is strongly affected by interference between contact points. This behavior persists in the USC regime but with values that become strongly modified as the coupling $\alpha$ increases. Figure \ref{fig:RatioGammaUSC}(c) plots the Lamb shift, reflecting the same shift in position as the relaxation rate in the USC regime. \section{Emitter and Field Dynamics}\label{sec:nonMarkDyn} The effective number-preserving Hamiltonian \eqref{Hp} permits us to work in the single-excitation sector and apply standard RWA methods. Using the dynamical polaron \emph{ansatz}, the time-dependent state vector in the polaron frame can be described as \cite{DiazCamacho2016}, \begin{eqnarray} \ket{\psi^{p}(t)}=c(t)\ket{e}\ket{\mathbf{0}}+\sum_{k}\phi_k(t)\ket{g}a^{\dagger}_{k}\ket{\mathbf{0}}. \end{eqnarray} The amplitudes of the polaron state vector satisfy the set of dynamical equations, \begin{subequations} \begin{align} i\dot{\tilde{c}}&= 2\Delta_r\sum_{k}f_{k}\tilde{\phi}_{k}e^{-i(\omega_k-\Delta_r)t},\label{eq:DynSyst1}\\ i\dot{\tilde{\phi}}_{k}&= 2\Delta_r f_{k}\left(\tilde{c}e^{i(\omega_k-\Delta_r)t}+ \sum_l f_l \tilde{\phi}_l\right), \label{eq:DynSyst2} \end{align} \end{subequations} where we have shifted to different rotating frames $\tilde{c}=e^{i\Delta_r t/2}c$, and $\tilde{\phi}_{k}=e^{i(\omega_k-\Delta_r/2)t}\phi_{k}$, in order to simplify the equations. Equations \eqref{eq:DynSyst1} and \eqref{eq:DynSyst2} can be integrated numerically, obtaining any observable in the polaron frame. Then, by using relations \eqref{eq:PolLabExcit} or \eqref{eq:PolLabField}, the observables in the Lab frame can be computed. Before looking at the numerical results, it is convenient to discuss some generalities about the expected dynamical behavior. For this, we can neglect the contributions of the $V_{\text{local}}$ operator, which only produces a photon frequency shift that does not significantly contribute to the single-excitation dynamics. Besides, it makes further analytical treatment difficult and it is not relevant for the results discussed in this section. If this is done, the set of equations are formally equivalent to the one excitation dynamics in RWA models and the Wigner-Weisskopf theory can be directly applied. Integrating out the photonic degrees of freedom a (non-local) differential equation for $\tilde{c}(t)$ is obtained, \begin{eqnarray} \label{eq:EqIntDiff} \dot{\tilde{c}}=-\frac{2\Delta_r^2}{\pi}\int_{0}^{\infty}\frac{J(\omega)d\omega}{(\omega+\Delta_r)^2}\int_{0}^{t}d\tau\tilde{c}(t-\tau)e^{i(\omega-\Delta_r)\tau}.\nonumber\\ \end{eqnarray} The dependence of the spectral function on the time delays between coupling points $\zeta$, gives rise to a multiple-time-delay differential equation for the excited state amplitude, \begin{eqnarray} \label{eq:EqMovimNM} \dot{\tilde{c}}(t) &=& - \frac{\gamma}{2 N^2_c}\sum^{N_c-1}_{j=0}(N_c-j)e^{\textrm{i} \Delta_r j\zeta} \tilde{c}(t- j \zeta) \Theta(t- j\zeta). \nonumber\\ \end{eqnarray} Here $\Theta(\cdot)$ is the Heaviside step function. The time delays $j \zeta$ introduce new time scales in the system and non-Markovian effects are expected. An analogous time-delay equation was first presented in \cite{KockumPRR2020} within the RWA regime for the same continuous model studied here. These type of non-Markovian dynamical equations have also been found in the study of the spontaneous emission in single-end optical fibers \cite{Tuffarelli2013}, atoms in front of reflecting mirrors \cite{Dorner2002}, and two distant emitters in waveguide-QED, within RWA \cite{Kanu2020} and beyond RWA \cite{DistantEmitters2021}. In particular, in addition to the relaxation rate previously discussed, oscillations in the emitter dynamics will occur. \\ On top of that, already in the RWA regime the existence of bound states for giant atoms has been discussed \cite{KockumPRR2020}. These can exist even in the absence of band gaps as an interference effect, as seen in Fig. \ref{fig:decays}, due to the spatial separation of coupling points. Bound states arising from interference effects are also present in the USC regime, as we will show later in numerical simulations. Applying a Laplace transform in Eq. \eqref{eq:EqMovimNM} gives us insight on the nature of these bound states. By defining the excited state amplitude in Laplace space as $\hat{c}(s) = \int^{\infty}_0 dt e^{-st} \tilde{c}(t)$ we have \begin{equation} \label{eq:LaplTransf} \hat{c}(s) = \left[s+ \frac{i \Delta_r}{2}+\frac{\gamma}{2N_c^2}\sum^{Nc-1}_{j=0}(N_c-j)e^{(-s+i\Delta_r/2)j|\zeta|}\right]^{-1} \end{equation} where we have set $\tilde{c}(0) = 1$ in order to study the spontaneous emission. The above dynamical equation in the Laplace space is exactly the same as the obtained for the RWA limit in \cite{KockumPRR2020}, with the difference that the bare qubit frequency $\Delta$ must be replaced by $\Delta_r$. By definition, bound states do not radiate, thus (if they exist) they are purely imaginary poles of Eq. \eqref{eq:LaplTransf}. Searching for purely imaginary poles with the form $s_n = -i2n\pi/(N_c \zeta)$ with $n \in \mathbb{N}$ we obtain \begin{equation} \label{eq:DarkStates} \Delta_r \zeta = \frac{2n\pi}{N_c} - \frac{J_{\text{Ohm}}(\Delta_r) \zeta }{2N_c}\text{cot}\left(\frac{n \pi}{N_c} \right), \end{equation} where $\zeta = x/v_g$ is the time delay between the two closest coupling points. It is worth recalling that all these relations neglect the local $V_{\rm local}$ operator, Cf. Hamiltonian \eqref{Hp}. They are, however, a good estimation for understanding the emitter dynamics and locating the appearance of bound states in the parameter space of the model. In particular, that their existence requires a finite time delay ($\zeta$) and that the renormalized atom frequency and spontaneous emission play a role. \begin{figure}[t] \centering \includegraphics[width = \columnwidth]{Fig_5_updated_final.pdf} \caption{Evolution of the excited state probability of a giant emitter with three coupling points $N_c = 3$, for three different distances between contact points and fixed coupling strength $\alpha = 0.8$, transition energy $\Delta = 1$, cutoff $\omega_c = 6$ and $N = 3000$ modes. The expected equilibrium probabilities $P^{\rm GS}_e$ are illustrated with dotted lines.} \label{fig:decays} \end{figure} Both the existence of bound states and non-Markovian dynamics in the USC regime can be proven by monitoring the spontaneous emission. In doing so we assume the atom-waveguide at the GS, then the qubit is driven within a $\pi$-pulse. After the pulse the wavefunction is given by $\ket{\psi(0)} =\sigma^{+}\ket{\rm GS}$. Since $[\sigma^{x}, U_p] = 0$, we may work in the single-excitation manifold in the polaron picture. Therefore, we can numerically integrate \eqref{eq:DynSyst1} and \eqref{eq:DynSyst2}, including the $V_{\text{local}}$ terms, and transform back to the Lab frame using \eqref{eq:PolLabExcit}. In figure \ref{fig:decays} we plot the spontaneous emission. We notice that $P_e(t=0) \neq 1$, since for our initial state $P_e= 1/2(1+ \Delta_r/\Delta)$, Cf. Eq. \eqref{eq:PolLabExcit}. % Furthermore, each of the plotted decay processes has a different equilibrium excited state occupancy, as given by Eq. \eqref{eq:GSExcit}. \begin{figure*}[!t] \centering \includegraphics[width = \linewidth, keepaspectratio]{OBS_Panel_62_new_updated_final_1000.png} \caption{(a) Time evolution of the excited state population $P_e$ with increasing coupling $\alpha$. Black horizontal lines point to the two cases highlighted in the other plots of the figure. (b) Plot of the spontaneous emission into an oscillating bound state in the RWA for $\alpha \simeq 0.118$ (solid line) and for an increased coupling of $\alpha \simeq 0.557$, within USC (dashed line). The field emitted into the waveguide for these cases is plot in (d) and (c) respectively. These simulations are carried out for a giant atom with three connections $N_c = 3$, with the parameters $\zeta = 186\delta x$, $\omega_c = 3$, $\Delta = 1$ and number of modes $N = 3002$.} \label{fig:OBSPanel} \end{figure*} As shown in Fig. \ref{fig:decays} for $x = 3\delta x$, short time delays between coupling points lead to relaxations that can be closely described by an exponential decay defined by the effective spontaneous emission rate in Eq. \eqref{eq:Gammar}. The evolution of the excited state occupancy can be well approximated by: \begin{equation} \label{eq:PolaronDecay} P_e \approx P^{\rm GS}_e + \frac{\Delta_r}{\Delta}e^{-\gamma_r t}, \end{equation} plotted in the dashed black line in Fig. \ref{fig:decays}. The lack of major non-Markovian effects can be seen via Eq. \eqref{eq:LaplTransf}, as the limit ${\zeta \to 0}$ leads to a time evolution governed by the decay rate $\gamma_r$. For a sufficiently large distance between coupling points, non-Markovianity takes a central role, as illustrated by the decay for $x = 20 \delta x$ in Fig. \ref{fig:decays}. Initially, it has an approximately exponential decay given by $J_\mathrm{Ohm}(\Delta_r)$, until the emitted light reaches a coupling point. Then, an oscillatory behavior rises as the light emitted from one connection point is partially reabsorbed and emitted back to the waveguide by another contact point. At longer times, these oscillations become damped as the energy is gradually emitted outside the atom, until the system reaches the equilibrium at the corresponding $P^{\rm GS}_e$. We encounter a different behavior for $x = 30\delta x$ in Fig. \ref{fig:decays}. Due to the interference of the field emitted from each coupling point, the system relaxes to a bound state, as signaled by the difference in occupancy from the ground state once the evolution reaches the equilibrium. This comes as a direct consequence of the initial excited state having a non-zero overlap with bound states for these parameters. Furthermore, Fig. \ref{fig:decays} illustrates yet a another type of decay. For $x = 100 \delta x$ we find long-lived oscillations around an equilibrium value higher than $P^{\rm GS}_{e}$. This is reminiscent of the reported oscillating bound states in the RWA \cite{KockumPRR2020}. In the next section we discuss how these oscillating bound states behave whenever the coupling cannot be treated perturbatively. \subsection{Oscillating bound states} Some interest has been aroused in the existence of \emph{oscillating} bound states \cite{KockumPRR2020, noachtar2022nonperturbative}. They originate from the interplay of two coexisting bound states. Consequently, part of the field emitted during the spontaneous emission process is trapped while oscillating between the coupling points of the emitter. In USC, approximate oscillating bound states are found by searching two coexisting solutions of Eq. \eqref{eq:DarkStates}. Due to the dependence of $\Delta_r$ with $\alpha$ and $\zeta$, via the variational parameters $f_k$, the existence of two solutions for the same set of parameters cannot be analytically proven. This numerically requires fine tuning, which at most allows for the prediction of oscillating bound states with large but finite lifetime in USC, as illustrated in Fig. \ref{fig:decays} for $x = 100\delta x$. Figure \ref{fig:OBSPanel} (a) illustrates the excited state population $P_e$ of a giant atom with increasing coupling strength $\alpha$. The rest of the parameters are set so that in the RWA regime the excited state decays into an oscillating bound state. It is clear that the oscillating bound state found for the lower couplings is lost as $\alpha$ increases. Figure \ref{fig:OBSPanel} (b) focuses on two specific values of the coupling strength showing the long time behavior of the oscillating bound state and its counterpart at higher coupling, for which the population revivals slowly decrease in amplitude. The field evolutions corresponding to both cases are plotted in Figs. \ref{fig:OBSPanel} (c) and (d), respectively. Within the RWA, fixing the distance between coupling points and increasing the coupling should eventually reach another pair of simultaneous solutions for Eq. \eqref{eq:DarkStates} and therefore an oscillating bound state \cite{KockumPRR2020}. In contrast, our simulations indicate that entering the USC regime leads to the loss of the oscillating bound state due to the renormalization of $\Delta_r$ and eventually to the quantum phase transition. This same trend has also been recently reported in \cite{noachtar2022nonperturbative} where matrix product states simulations showed this same breakdown of the periodicity for the existence of oscillating bound states in parameter space with the coupling strength. \section{Summary and Conclusions}\label{sec:Conclusion} In this work we have developed a semianalytical approach for the low energy sector of giant emitters in the ultrastrong regime based on polaron-like methods. In particular, we have focused on a single giant atom coupled via $N_c$ connection points to an Ohmic waveguide. We have characterized the ground state of the system. In particular we have analyzed the virtual photons surrounding each of the coupling points. The latter decays spatially away from the connection points to the waveguide as a power law, unlike what occurs for point-like emitters in a cavity array \cite{JRR2020}. We also have studied the renormalization of the atomic frequency $\Delta_r$ and shown that the system exhibits a localization-delocalization quantum phase transition which is dependent not only on the coupling strength $\alpha$ but also on the distance between coupling points. For the dynamics of the system we have focused on the spontaneous emission. We have derived analytical expressions for the Lamb-shift $\delta$ and effective decay rate $\gamma_r$ which characterize the early evolution of the system whenever its lifetime is much larger than the distance between coupling points. Both of these values were reported to have a periodic behavior with the distance between coupling points in the RWA regime \cite{KockumPRA2014}. We find that this periodicity is lost in USC due to the renormalization of $\Delta_r$. We were able to fully characterize the dynamics within the polaron frame, providing an approximate analytical expression for the evolution of the excited state amplitude. We find that some of the non-Markovian dynamics found in the RWA, such as the non-exponential decay \cite{KockumPRA2017} and bound states rising from the interference of the spontaneous emission from different coupling points \cite{KockumPRR2020}, still hold in the USC regime. However, other behaviors such as the recurrence of oscillating bound states as the coupling increases \cite{KockumPRR2020} are lost when entering the USC regime. Instead, as the localization-delocalization transition is approached by increasing the coupling strength $\alpha$, the oscillations in the excited state occupancy have a sharp drop in amplitude, becoming irregular in time and eventually disappear. \begin{acknowledgments} The authors acknowledge funding from the EU (COST Action 15128 MOLSPIN, QUANTERA SUMO and FET-OPEN Grant 862893 FATMOLS), the Spanish Government Grants MAT2017-88358-C3-1-R and PID2020-115221GB-C41/AEI/10.13039/501100011033, the Gobierno de Arag\'on (Grant E09-17R Q-MAD) and the CSIC Quantum Technologies Platform PTI-001. C.A.G.-G. acknowledges funding from the program Acciones de Dinamización “Europa Excelencia” Grant No. EUR2019-103823. F.N. is supported in part by: Nippon Telegraph and Telephone Corporation (NTT) Research, the Japan Science and Technology Agency (JST) [via the Quantum Leap Flagship Program (Q-LEAP), and the Moonshot R\&D Grant Number JPMJMS2061], the Japan Society for the Promotion of Science (JSPS) [via the Grants-in-Aid for Scientific Research (KAKENHI) Grant No. JP20H00134], the Army Research Office (ARO) (Grant No. W911NF-18-1-0358), the Asian Office of Aerospace Research and Development (AOARD) (via Grant No. FA2386-20-1-4069), and the Foundational Questions Institute Fund (FQXi) via Grant No. FQXi-IAF19-06. \end{acknowledgments}
\section{Introduction} Researchers have a strong incentive to find, report, and publish novel results \citep[e.g.,][p.158]{imbens2021statistical}. Translated mathematically, this often results in a strong incentive to find useful results that have small $p$-values when conducting hypothesis tests examining if the data fits with the current conventional beliefs. \citet{simonsohn2014p} used the term ``$p$-hacking'' to encompass decisions made by researchers in conducting their work that are made to improve the novelty of their results as seen through the lens of the reported $p$-values. Their work has generated an empirical literature that examines empirically the distribution of $p$-values across studies (the ``$p$-curve'') in an attempt to determine if $p$-hacking is prevalent or not.\footnote{See, for example, \citet{masicampo2012peculiar,simonsohn2014correcting,lakens2015what,simonsohn2015better,head2015extent,ulrich2015p} for early applications and further discussions and \citet[][]{christensen2018transparency} for a review.} To be able to understand how useful tests are in detecting $p$-hacking, we need to understand both how $p$-hacking impacts the distribution of $p$-values and how powerful tests are in detecting these impacts. This paper examines theoretically and through Monte Carlo analysis the power of tests available to test for $p$-hacking using data on $p$-values across studies.\footnote{We focus on detecting $p$-hacking based on the distribution of $p$-values across studies and do not consider tests based on the distribution of $t$-statistics and $z$-scores \citep[e.g.,][]{gerber2008do,gerber2008publication,brodeur2016,brodeur2020methods,bruns2019reporting,vivalt2019specification,adda2020phacking}.} A careful study of power is relevant to this literature because the implications of $p$-hacking on the distribution of reported $p$-values are not clear. Many tests sprang from the early intuition that $p$-hacking would result in ``humps'' in the distribution of $p$-values just below common thresholds for size like $5\%$. But intuition also might suggest that if all researchers $p$-hack, then this might simply push the distributions to the left. It is also the case that there are limits to how much can be gained by $p$-hacking; approaches such as searching across regressions with different control variables can help improve $p$-values but do not allow the researcher to attain any $p$-value they desire. Of interest in examining power is that power is useful if it is directed towards alternatives where the costs of $p$-hacking are higher. As the ASA notes ``Valid scientific conclusions based on $p$-values and related statistics cannot be drawn without at least knowing how many and which analyses were conducted, and how those analyses (including $p$-values) were selected for reporting.'' \citep[][p.132]{asa_statement} This translated mathematically is that $p$-hacking has two costs in terms of understanding the statistical results --- empirical sizes of tests will be larger than the stated size and in many cases coefficient estimates will be biased in the direction of being more impressive. In our power analyses, we relate power to the costs of $p$-hacking. We examine two approaches to $p$-hacking in four situations in which we might think opportunities for $p$-hacking in economics and other fields commonly arise.\footnote{Here our focus is on understanding whether we can detect $p$-hacking, and we do not explicitly model selective publication \citep[e.g.,][]{andrews2019identification,kasy2021forking,frankel2022which}. Publication bias interacting with $p$-hacking is likely to increase the rejection probability of tests.} The two approaches are what we refer to as a ``threshold'' approach where a researcher targeting a specific threshold stops if the obvious model rejects at this size and conducts a search over alternative specifications if not and a second approach of simply choosing the best $p$-value from a set of specifications (denoted the ``minimum'' approach below). We examine four situations where opportunities for $p$-hacking arise: (a) searching across linear regression models with different control variables, (b) searching across different choices of instruments in estimating causal effects, (c) searching across datasets, and (d) searching across bandwidth choices in constructing standard errors in time series regressions. We construct theoretical results for the implied distribution of $p$-values under each approach to $p$-hacking in a simple model. The point of this exercise is twofold --- by seeing how exactly $p$-hacking affects the distribution we can determine the testing method appropriate for detecting the $p$-hacking, and also we will be able to determine the features that lead to large or small deviations from the distribution of $p$-values when there is no $p$-hacking.\footnote{While we focus on the impact of these different types of $p$-hacking on the shape of the $p$-curve and the power of tests for detecting $p$-hacking, such explicit models of $p$-hacking are also useful in other contexts. For example, \citet{mccloskey2022incentive} use a model of $p$-hacking to construct incentive compatible critical values.} We then examine in Monte Carlo analyses extensions of these cases. Our theoretical results and Monte Carlo simulations shed light on how distributions of $p$-values are impacted by $p$-hacking and provide a careful understanding of the power of existing tests for detecting $p$-hacking. The main implications are as follows: \begin{enumerate}\setlength\itemsep{0em} \item From a scientific perspective, the ability of tests to detect $p$-hacking can be quite low. The threshold approach to $p$-hacking is more easily detected than when researchers simply take the minimum of the $p$-values. \item For the threshold approach, target values for the $p$-value result in discontinuities in the distribution of $p$-values as well as violations on upper bounds for this distribution, resulting in tests for these violations having power. It is only in special cases that the intuitive ``humps'' in this distribution appear, violating the condition that this curve is monotonically non-increasing. \item When researchers choose the minimum $p$-value from a set of models that nests the true model, the distribution of $p$-values is shifted to the left, and only tests based on upper bounds for this distribution have power. For this reason this approach to $p$-hacking is much harder to detect. \item The power of different tests for $p$-hacking depends strongly on where the mass of true values being tested actually lies. If most of the tests are of null hypotheses that are true, tests looking for humps and discontinuity tests can still have power. However, if the majority of the $p$-values are constructed from tests where the null is false, tests based on upper bounds on the $p$-curve are more appropriate. \item The costs of $p$-hacking in terms of biases through model specification can be quite small. In many cases the estimates and $t$-statistics are strongly positively correlated across specifications. We show that the power of the tests is positively related to the cost in terms of bias of $p$-hacking. \end{enumerate} \section{Setup and Testable Restrictions} \citet{elliott2022detecting} provided a general characterization of the distribution of $p$-values across studies in the absence of $p$-hacking for general distributions of true effects.\footnote{See, for example, \citet{hung1997}, \citet{simonsohn2014p}, and \citet{ulrich2018some} for numerical and analytical examples of $p$-curves for specific tests and/or effect distributions.} The notation here follows that work. Individual researchers provide test results of a hypothesis that is reported as a test statistic $T$, which is distributed according to a distribution with cumulative distribution function (CDF) $F_{h}$, where $h \in \mathcal{H}$ indexes parameters of either the exact or asymptotic distribution of the test. Researchers are testing the null hypothesis that $h \in \mathcal{H}_0$ against $h \in \mathcal{H}_1$ with $\mathcal{H}_0 \cap \mathcal{H}_1$ empty. Suppose the test rejects for large values of $T$ and denote by $cv(p)$ the critical value for level $p$ tests. For any individual study the researcher tests a hypothesis at a particular $h$. We denote the power function of the test for that study by $\beta\left(p,h \right) = \Pr\left(T>cv(p)\mid h\right)$. Across researchers, there is a distribution $\Pi$ of effects $h$, which is to say that different researchers testing different hypotheses examine different problems that have different ``true'' effects. The resulting CDF of $p$-values across all these studies is then \begin{eqnarray*} G(p)=\int_\mathcal{H}\Pr\left(T>cv(p)\mid h\right)d\Pi(h)=\int_\mathcal{H}\beta\left(p,h\right) d\Pi(h). \end{eqnarray*} Under mild regularity assumptions (differentiability of the null and alternative distributions, boundedness and support assumptions; see \citet{elliott2022detecting} for details) then in the absence of $p$-hacking we can write the $p$-curve (density of $p$-values) as \begin{equation*} g(p)=\int_\mathcal{H}\frac{\partial \beta\left(p,h\right)}{\partial p} d\Pi(h). \end{equation*} Our goal is to evaluate the power of statistical tests based on the different testable implications derived in the literature. \citet{elliott2022detecting} provide general sufficient conditions for when the $p$-curve is non-increasing, $g'\le 0$, and continuous when there is no $p$-hacking, allowing for tests of these properties of the distribution to be interpreted as tests of the null hypothesis of no $p$-hacking.\footnote{These results imply that classical approaches for detecting $p$-hacking based on non-increasingness, such as the Binomial test and Fisher's test \citep[e.g.,][]{simonsohn2014p,head2015extent}, are valid in a wide range of empirically relevant settings.} These conditions hold for many possible distributions $F_h$ that arise in research, for example, normal, folded normal (relevant for two-sided tests), and $\chi^2$ distributions. When $T$ is normally distributed (for example, tests on means or regression parameters when central limit theorems apply), \citet{elliott2022detecting} show that in addition to the non-increasing property the $p$-curves are completely monotonic (i.e., have derivatives of alternating signs so that $g''\ge 0$, $g'''\le 0$, etc.) and there are testable upper bounds on the $p$-curve and its derivatives. If researchers do $p$-hack, this affects the distribution of reported $t$-statistics. It is then possible that the resulting $p$-curve violates the properties listed above in one way or another, providing the opportunity to test for $p$-hacking. It may be that humps appear below popular significance levels such as $0.05$ violating the monotonicity condition, discontinuities may appear in the $p$-curve, and in the case of tests based on $t$-statistics, the bounds derived in \citet{elliott2022detecting} may be violated. Researchers have a number of options in modeling that allow for the possibility of $p$-hacking. To understand the likely violation under the alternative that there is $p$-hacking, and hence the relevant test to use for testing for $p$-hacking, it is useful to consider how different approaches to $p$-hacking impact the $p$-curve. This is also useful in understanding the likely power of tests for $p$-hacking. We consider two basic approaches to $p$-hacking. The first of these we refer to as the ``threshold'' approach, where the researcher constructs a test from their preferred model, accepting this test if it corresponds to a $p$-value below a target value (for example, $5\%$). If the $p$-value does not achieve this goal value, additional models are considered, and the smallest $p$-value over the model choices is reported. This is representative of the ``intuitive'' approach to $p$-hacking that is discussed in much of the literature on testing for $p$-hacking, where humps in the $p$-curve around common critical levels are examined. Our second approach to $p$-hacking is to simply take the smallest $p$-value from a set of correctly specified or overspecified models. We refer to this below as the ``minimum'' approach. Intuitively, we would expect that for this approach the distribution of $p$-values would shift to the left, be monotonically non-increasing, and there would be no expected hump in the distribution of $p$-values near commonly reported significance levels. This is true, for example, if the researchers report the minimum $p$-value across independent tests; see Section \ref{sec:specification_search_3}. The actual form and properties of the $p$-curve differ from situation to situation. We examine four examples in more depth in Section \ref{sec:theory}. \section{Implications of $p$-Hacking} \label{sec:theory} Here we study the shape of the distribution of $p$-values under different forms of $p$-hacking. Appendix \ref{app:detailed_derivations} presents the analytical derivations underlying the results in this section. \subsection{Selecting Control Variables in Linear Regression} \label{sec:specification_search_regression} Linear regression has been suggested to be particularly prone to $p$-hacking \citep[e.g.,][]{hendry1980econometrics,leamer1983lets,bruns2016p,bruns2017metaregression}. Researchers usually have available a number of control variables that could be included in a regression along with the variable of interest. Selection of various configurations for the linear model allows multiple chances to obtain a small $p$-value, perhaps below a threshold such as $0.05$. The theoretical results in this section yield a careful understanding of the shape of the $p$-curve when researchers engage in this type of $p$-hacking. They clarify which statistical tests can be expected to have power for detecting $p$-hacking. \subsubsection{Shape of the $p$-Curve} We construct a stylized model and consider the two approaches to $p$-hacking discussed above in order to provide analytical results that capture the impact of $p$-hacking. Suppose that the researchers estimate the impact of a scalar regressor $X_i$ on an outcome of interest $Y_i$. The data are generated as \[ Y_i = X_i\beta+U_i, \quad i=1,\dots,N, \] where $U_i\overset{iid}\sim\mathcal{N}(0,1)$. For simplicity, we assume that $X_i$ is non-stochastic. The researchers test the following hypothesis \[ H_0:\beta=0\qquad \text{against} \qquad H_1:\beta>0. \] In addition to $X_i$, the researchers have access to two additional non-stochastic control variables, $Z_{1i}$ and $Z_{2i}$.\footnote{For simplicity, we consider a setting where $Z_{1i}$ and $Z_{2i}$ do not enter the true model so that their omission does not lead to omitted variable biases (unlike, e.g., in \citet{bruns2016p}). It is straightforward to generalize our results to settings where $Z_{1i}$ and $Z_{2i}$ enter the model: $Y_i = X_i\beta_1+Z_{1i}\beta_2 +Z_{2i}\beta_3 + U_i$.} To simplify the exposition, we assume that $(X_i,Z_{1i},Z_{2i})$ are scale normalized so that $N^{-1}\sum_{i=1}^{N}X^2_i = N^{-1}\sum_{i=1}^{N}Z^2_{1i}=N^{-1}\sum_{i=1}^{N}Z^2_{2i}=1$, that $N^{-1}\sum_{i=1}^{N}Z_{1i}Z_{2i}=\gamma^2$, and that $N^{-1}\sum_{i=1}^{N}X_iZ_{1i}= N^{-1}\sum_{i=1}^{N}X_iZ_{2i}= \gamma$, where $|\gamma|\in (0, 1)$.\footnote{We omit $\gamma = 0$, i.e., adding uncorrelated control variables, because in this case the $t$-statistics and thus $p$-values for each regression are equivalent and hence there is no opportunity for $p$-hacking of this form.} Let $h := \sqrt{N}\beta \sqrt{1-\gamma^2}$, where $h$ is drawn from a distribution of effects with support $\mathcal{H}\subseteq [0,\infty)$. First consider the threshold form of $p$-hacking. \begin{enumerate} \item Researchers regress $Y_i$ on $X_i$ and $Z_{1i}$ and report the resulting $p$-value, $P_1$, if $P_1\le \alpha$. \item If $P_1> \alpha$, researchers regress $Y_i$ on $X_i$ and $Z_{2i}$ instead of $Z_{1i}$ and obtain $p$-value, $P_2$. They report $P_r=\operatorname{min}\{P_1,P_2\}$. \end{enumerate} Under this threshold form of $p$-hacking, the reported $p$-value, $P_r$, is given by \begin{equation*} P_r=\begin{cases} P_1, & \text{if $P_1\le \alpha$},\\ \min\{P_1,P_2\}, & \text{if $P_1> \alpha$}. \end{cases} \end{equation*} Define $\hat{\beta}_r^t$ to be the OLS estimate from the regression that accords with the chosen $p$-value. The minimum approach takes the minimum of the two $p$-values that can be constructed. Denote the regression estimate for the chosen model as $\hat{\beta}_r^m$. Each approach results in different distributions of $p$-values, and, consequently, tests for $p$-hacking will have different power properties. In Appendix \ref{app:derivation_example1}, we show that for the thresholding approach the resulting $p$-curve is \begin{eqnarray*} g_1^{t}(p) =\int_\mathcal{H}\exp\left(hz_0(p)-\frac{h^2}{2}\right)\Upsilon^t_1(p; \alpha, h, \rho)d\Pi(h), \end{eqnarray*} where $\rho = 1-\gamma^2$, $z_h(p) = \Phi^{-1}(1-p) - h$, $\Phi$ is the standard normal CDF, and \begin{equation*} \Upsilon^t_1(p;\alpha, h, \rho)=\begin{cases} 1+ \Phi\left(\frac{z_{h}(\alpha) - \rho z_{h}(p)}{\sqrt{1-\rho^2}}\right), & \text{if $p\le \alpha$},\\ 2\Phi\left(z_h(p)\sqrt{\frac{1-\rho}{1+\rho}}\right), & \text{if $p> \alpha$}. \end{cases} \end{equation*} In interpreting this result, note that when there is no $p$-hacking $\Upsilon_1(p; \alpha, h, \rho)=1$. It follows directly from the properties of $\Phi$ that the threshold $p$-curve lies above the curve when there is no $p$-hacking for $p \le \alpha$. We can also see that since $\Phi\left(\frac{z_{h}(\alpha) - \rho z_{h}(p)}{\sqrt{1-\rho^2}}\right)$ is decreasing in $h$ that for larger $h$ the difference between the threshold $p$-curve and the curve without $p$-hacking becomes smaller. This follows intuitively since for a larger $h$, the need to $p$-hack diminishes as most of the studies find an effect without resorting to manipulation. If researchers simply just compute both $p$-values and report $P_r=\min\{P_1,P_2\}$ the distribution of $p$-values follows directly from calculations deriving the above result and is equal to \begin{eqnarray*} g_1^{m}(p) =2\int_\mathcal{H}\exp\left(hz_0(p)-\frac{h^2}{2}\right)\Phi\left(z_h(p)\sqrt{\frac{1-\rho}{1+\rho}}\right)d\Pi(h). \end{eqnarray*} For $p$-hacking of this form, the entire distribution of $p$-values is shifted to the left. For $p$ less than one half, the curve lies above the curve when there is no $p$-hacking. This distribution is monotonically decreasing for all $\Pi$, so does not have a hump and remains continuous. Because of this, only the tests based on upper bounds have any potential for testing the null hypothesis of no $p$-hacking. If $\Pi$ is a point mass distribution, there is a range over which $g_1^{m}(p)$ exceeds the upper bound $\exp(z_0(p)^2/2)$ derived in \citet{elliott2022detecting}, the upper end (largest $p$) of which is at $p=1-\Phi(h)$. Figure \ref{fig:p_curves_example1} shows the theoretical $p$-curves for various $h$ and $\gamma$. In terms of violating the condition that the $p$-curve is monotonically decreasing, violations for the threshold case can occur but only for $h$ small enough. For $p<\alpha$, the derivative is \begin{eqnarray*} {g^{t}_1}'(p) = \int_\mathcal{H}\frac{\phi(z_h(p))\left[\frac{\rho}{\sqrt{1-\rho^2}}\phi\left(\frac{z_h(\alpha) - \rho z_h(p)}{\sqrt{1-\rho^2}}\right) - h\left(1+\Phi\left(\frac{z_{h}(\alpha) - \rho z_{h}(p)}{\sqrt{1-\rho^2}}\right)\right)\right]}{\phi^2(z_0(p))}d\Pi(h),\\ \end{eqnarray*} where $\phi$ is the standard normal probability density function (PDF). Note that $\rho$ is always positive and, when all nulls are true (i.e., when $\Pi$ assigns probability one to $h=0$), ${g^t}'(p)$ is positive for all $p\in (0,\alpha)$.\footnote{For $p>\alpha$, the derivative of $g_1^t(p)$ is negative and equal to $${g^t_1}'(p)=-\int_{\mathcal{H}}\frac{\phi(z_h(p))}{\phi^2(z_0(p))}\left(h+ \sqrt{\frac{1-\rho}{1+\rho}}\phi\left(z_h(p)\sqrt{\frac{1-\rho}{1+\rho}}\right)\right).$$} This can be seen for the dashed line in Figure \ref{fig:p_curves_example1} (left panel). However at $h=1$ this effect no longer holds, and the $p$-curve is downward sloping. From Figure \ref{fig:p_curves_example1} (right panel) we see that violations for monotonicity are larger for smaller $\gamma$. Figure \ref{fig:p_curves_example1} indicates that the thresholding approach to $p$-hacking does imply a discontinuity at $p$-values equal to size. Here the size of the discontinuity is larger for larger $h$ and remains for each $\gamma$, although how that translates to power of tests for discontinuity also depends on the shape of the rest of the curve. We examine this in Monte Carlo experiments in Section \ref{sec:mc}. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{CovarChoice1_bw-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{CovarChoice2_bw-eps-converted-to.pdf} \caption{$p$-Curves from covariate selection with thresholding. Left panel: $\gamma=0.5$. Right panel: $h=1$.} \label{fig:p_curves_example1} \end{figure} Figure \ref{fig:p_curves_covh=1} examines both the threshold approach to $p$-hacking as well as the $p$-hacking approach of directly taking the minimum $p$-value. Results are presented across the two choices for $h=1$ and $\gamma=0.5$, with respect to the bounds under no $p$-hacking. We also report the no-$p$-hacking distribution for the same value of $h$. Simply taking the minimum $p$-value as a method of $p$-hacking results in a curve that remains downward sloping and has no discontinuity --- tests for these two features will have no power against such $p$-hacking. But as Figure \ref{fig:p_curves_covh=1} shows, the upper bounds on the $p$-curve are violated for both methods of $p$-hacking. The violation in the thresholding case is pronounced; for taking the minimum $p$-value the violation is much smaller and harder to detect. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{CovarChoice3_bw-eps-converted-to.pdf} \caption{$p$-Curves from covariate selection for threshold and minimum approaches ($h=1$, $\gamma=0.5$).} \label{fig:p_curves_covh=1} \end{figure} \subsubsection{Costs of $p$-Hacking} There are two costs to $p$-hacking. The first is that when we account for the searching over models, the size of tests when $h=0$ is understated, larger than the empirical size claimed. The second cost is that the reported estimates will be larger in magnitude and hence biased. The magnitude of size distortions follows from the derived CDF for the $p$-hacked curve evaluated at $h=0$. The size distortion is the same for both the thresholding case and the situation where the researcher simply reports the minimum $p$-value, since in either case, if there is a rejection at the desired size, each method of $p$-hacking will use it. Empirical size for any nominal size is given by \begin{equation*} G_0(\alpha)= 1 - \Phi_2(z_0(\alpha), z_0(\alpha); \rho), \end{equation*} where $\Phi_2(\cdot, \cdot;\rho)$ is the CDF of the bivariate normal distribution with standard marginals and correlation $\rho$. Figure \ref{fig:Covsize} shows the difference between empirical and nominal size. The left panel shows, for nominal size $\alpha = 0.05$, how empirical size varies with $\gamma$. For small $\gamma$ the tests are highly correlated ($\rho$ is close to one), leaving little room for effective $p$-hacking, and hence there is only a small effect on size. As $\gamma$ becomes larger, so does the size distortion as it moves towards having an empirical size double that of the nominal size. The right-hand size panel shows, for three choices of $\gamma$ ($\gamma \in\{ 0.1,0.5,0.9\}$), how the empirical size exceeds nominal size. The lower line is nominal size; the empirical size is larger for each value of $\gamma$. Essentially, the result is somewhat uniform over this empirical size range, with size coming close to double empirical size for the largest value of $\gamma$. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{CovarSize1_bw-eps-converted-to.pdf} \includegraphics[width=0.45\textwidth]{CovarSize2_bw-eps-converted-to.pdf} \caption{Rejection rate under $p$-hacking. Left panel: rejection rate as a function of $\gamma$ for $\alpha=0.05$. Right panel: rejection rate as a function of $\alpha$ for $\gamma\in \{0.1,0.5,0.9\}$.} \label{fig:Covsize} \end{figure} Selectively choosing larger $t$-statistics results in selectively choosing larger estimated effects. The bias for the threshold case is given by \begin{equation*} E\hat{\beta}^t_r-\beta =\frac{ \left({\sqrt{2(1-\rho)}} \phi(0)\Phi\left(\sqrt{\frac{2}{1+\rho}}z_h(\alpha)\right) +(1-\rho)\phi(z_h(\alpha))\left(1-\Phi\left(\sqrt{\frac{1-\rho}{1+\rho}}z_h(\alpha)\right)\right)\right)}{{\sqrt{N\rho}}}, \end{equation*} and for the minimum approach it is given by \begin{equation*} E\hat{\beta}^m_r-\beta = \frac{ \sqrt{2(1-\rho)}\phi(0)}{\sqrt{N\rho}} . \end{equation*} The bias as a function of $h$ can be seen in Figure \ref{fig:CovBias}. For the threshold case, most $p$-hacking occurs when $h$ is small. As a consequence, the bias is larger for small $h$. A larger $\gamma$ means a smaller $\rho$, and hence draws of the estimate and the $p$-value are less correlated, allowing for larger impacts. For the minimum approach, the bias does not depend on $h$, and is larger than that for the threshold approach. The reason is that the minimum approach always chooses the largest effect since in our simple setting the standard errors are the same in both regressions. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{CovarBias_bw-eps-converted-to.pdf} \caption{Bias from covariate selection for $\gamma\in\{0.1, 0.5, 0.9\}$} \label{fig:CovBias} \end{figure} \subsection{Selecting amongst Instruments in IV Regression} \label{sec: iv_example} \subsubsection{Shape of the $p$-Curve} Suppose that the researchers use an instrumental variables (IV) regression to estimate the causal effect of a scalar regressor $X_i$ on an outcome of interest $Y_i$. The data are generated as \begin{align*} Y_i &= X_i\beta+U_i, \\%\quad i=1,\dots,N,\\ X_i &= Z_{1i}\gamma_1 + Z_{2i}\gamma_2 + V_{i}, \end{align*} where $(U_i,V_i)'\overset{iid}\sim\mathcal{N}(0,\Omega)$ with $\Omega_{12}\ne 0$. The instruments are generated as $Z_i\overset{iid}\sim \mathcal{N}(0, I_2)$ and independent of $(U_i, V_i)$. The researchers test the following hypothesis \[ H_0:\beta=0\qquad \text{against} \qquad H_1:\beta>0. \] To simplify the exposition, suppose that ${\Omega_{11}=\Omega_{22}=1}$ and $\gamma_1=\gamma_2=\gamma$, where $|\gamma|\in (0,1)$ is known. We let $h := \sqrt{N}\beta|\gamma|$, where $h$ is drawn from an effect distribution supported on $\mathcal{H}\subseteq [0,\infty)$. We again consider the two forms of $p$-hacking. For the threshold approach, first the researchers run an IV regression of $Y_i$ on $X_i$ using $Z_{1i}$ and $Z_{2i}$ as instruments and report the corresponding $p$-value, $P_{12}$, if $P_{12}\le \alpha$. If $P_{12}> \alpha$, the researchers then run IV regressions of $Y_i$ on $X_i$ using $Z_{1i}$ and $Z_{2i}$ as single instruments and obtain $p$-values, $P_1$ and $P_2$. They report $\text{min}\{P_1,P_2, P_{12}\}$ so that reported $p$-value, $P_r$, is \begin{equation*} P_r=\begin{cases} P_{12}, & \text{if $P_{12}\le \alpha$},\\ \min\{P_1,P_2, P_{12}\}, & \text{if $P_{12}> \alpha$}. \end{cases} \end{equation*} The second approach is to report the $\min \{P_1,P_2, P_{12}\}$, that is to just check for the smallest $p$-value and report that. Researchers report the estimated effect that accords with the reported $p$-value in both approaches, defined as $\hat{\beta}_r^t$ and $\hat{\beta}_r^m$, accordingly. For the threshold approach, the $p$-curve (see Appendix \ref{app:derivation_example2} for derivations) is \begin{equation*} g_2 ^t(p) = \int_{\mathcal{H}}\exp\left(hz_0(p) - \frac{h^2}{2}\right)\Upsilon^t_2(p; \alpha, h)d\Pi(h), \end{equation*} where \begin{equation*} \Upsilon^t_2(p;\alpha, h)=\begin{cases} \frac{\phi(z_{\sqrt{2}h}(p))}{\phi(z_h(p))} + 2\Phi(D_h(\alpha)-z_h(p)), & \text{if $0<p\le\alpha$},\\ \frac{\phi(z_{\sqrt{2}h}(p))}{\phi(z_h(p))}\zeta(p) + 2\Phi(D_h(p)-z_h(p)), & \text{if $\alpha<p\le1/2$},\\ 2\Phi(z_h(p)), & \text{if $1/2<p<1$},\\ \end{cases} \end{equation*} and $\zeta(p) = 1 - 2\Phi((1-\sqrt{2})z_0(p))$ and $D_h(p)=\sqrt{2}z_0(p)-2h$. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{IVChoice1_bw-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{IVChoice2_bw-eps-converted-to.pdf} \caption{$p$-Curves from IV selection. Left panel: thresholding. Right panel: minimum.} \label{fig:p_curves_example2} \end{figure} In Figure \ref{fig:p_curves_example2} the $p$-curves for $h\in \{0,1,2\}$ are shown for the threshold approach in the left panel. As in the covariate selection example, it is only for small values of $h$ that we see upward sloping curves and a hump below size. For $h=1$ and $h=2$, no such violation of non-increasingness occurs, and tests aimed at detecting such a violation will have no power. The reason is similar to that of the covariate selection problem --- when $h$ becomes larger many tests reject anyway, so whilst there is still a possibility to $p$-hack the actual rejections overwhelm the ``hump'' building of the $p$-hacking. For all $h$ there is still a discontinuity in the $p$-curve arising from $p$-hacking, so tests for a discontinuity at size will still have power. If researchers simply report $P_r=\min\{P_1,P_2, P_{12}\}$, the distribution of $p$-values follows directly from calculations deriving the above result and is equal to \begin{equation*} g^m_2(p) = \int_{\mathcal{H}}\exp\left(hz_0(p) - \frac{h^2}{2}\right){\Upsilon}^m_2(p; \alpha, h)d\Pi(h), \end{equation*} where \begin{equation*} {\Upsilon}^m_2(p;\alpha, h)=\begin{cases} \frac{\phi(z_{\sqrt{2}h}(p))}{\phi(z_h(p))}\zeta(p) + 2\Phi(D_h(p)-z_h(p)), & \text{if $0<p\le1/2$},\\ 2\Phi(z_h(p)), & \text{if $1/2<p<1$}.\\ \end{cases} \end{equation*} The right hand side panel of Figure \ref{fig:p_curves_example2} displays the $p$-curves for $h\in \{0,1,2\}$ for the minimum approach. There is no hump as expected, and all the curves are non-increasing. Only tests based on upper bounds for the $p$-curve have the possibility of rejecting the null hypothesis of no $p$-hacking in this situation. As displayed, the upper bound is violated for large $h$ for low $p$-values, and is violated for smaller $h$ at larger $p$-values. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{IVChoice3_bw-eps-converted-to.pdf} \caption{$p$-Curves from IV selection for threshold and minimum approaches ($h=1$). } \label{fig:p_curves_example2a} \end{figure} Figure \ref{fig:p_curves_example2a} shows the comparable figure for the IV problem as Figure \ref{fig:p_curves_covh=1} shows for the covariates example. The results are qualitatively similar across these examples, although quantitatively the $p$-hacked curves in the IV problem are closer to the bounds than in the covariates problem. For $h=1$, we do find that the $p$-curves under $p$-hacking violate the bounds on $(0,0.1]$, hence suggesting that the tests based on upper bounds can be employed to test the null hypothesis of no $p$-hacking. Overall, as with the case of covariate selection, both the relevant tests for $p$-hacking and their power will depend strongly on the range of $h$ relevant to the studies underlying the data employed for the tests. \subsubsection{Costs of $p$-Hacking} Again, one of the costs of $p$-hacking is an inflated size of tests when $h=0$, i.e. when the null hypothesis is true, but the paper hopes to claim it is not. The second is inflated coefficient estimates resulting in a bias of reported results, which occurs to some extent at all values of $h$. Size distortions follow from the derivation of the results above. The corresponding CDF for the $p$-curve evaluated at size $\alpha$ is given by the expression \begin{equation*} G_0(\alpha)= 1 - \Phi(z_0(\alpha))\Phi((\sqrt{2}-1)z_0(\alpha))-\int_{(\sqrt{2}-1)z_0(\alpha)}^{z_0(\alpha)} \phi(x) \Phi(\sqrt{2}z_0(\alpha)-x)dx. \end{equation*} The expression is the same for both the threshold approach and taking the minimum, for the same reason as in the case of covariate selection. The magnitude of the size distortion is given in Figure \ref{fig:IVsize}. Size is essentially double the stated size, with the $p$-hacked size at 11\% when nominal size is 5\%. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{IVSize1_bw-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{IVBias1_bw-eps-converted-to.pdf} \caption{Rejection rate under $p$-hacking. Left panel: rejection rate as a function of $\alpha$. Right panel: bias from $p$-hacking for different values of $h$.} \label{fig:IVsize} \end{figure} In terms of the bias induced by $p$-hacking, distributions over $h$ will induce distributions over the biases since the bias for any study depends on the true model. We report here the bias for different $h$ rather than choose a (non-degenerate) distribution. For the special case example of this section, for the threshold and minimum approaches with $\alpha\le 1/2$, we can write for any $h$ the scaled mean (first-order) biases\footnote{Since the first moments of the IV estimators do not exist in just-identified cases \citep{kinal1980existence}, we define $\mathcal{B}_2^j$ to be the mean of the asymptotic distribution of $\sqrt{N}(\hat\beta^j_r-\beta)$, where $\hat\beta^j_r$ is the $p$-hacked estimate and $j\in\{m,t\}$.}, $\mathcal{B}_2^t$ and $\mathcal{B}_2^m$ respectively, as follows \begin{eqnarray*} \mathcal{B}_2^t &=& \mathcal{B}_2^m -{\frac{|\gamma|^{-1}}{\sqrt{2-\sqrt{2}}}}\phi\left(\sqrt{\frac{\sqrt{2}-1}{\sqrt{2}}}h\right)\Phi\left(\frac{h}{\sqrt{2-\sqrt{2}}}-\sqrt{4-2\sqrt{2}}z_0(\alpha) \right),\\ \mathcal{B}_2^m &=& {\frac{|\gamma|^{-1}}{\sqrt{2-\sqrt{2}}}}\phi\left(\sqrt{\frac{\sqrt{2}-1}{\sqrt{2}}}h\right)\Phi\left(\frac{h}{\sqrt{2-\sqrt{2}}}\right)+|\gamma|^{-1}\sqrt{2} \phi(0) (1-\Phi(\sqrt{2}h). \end{eqnarray*} The right-hand panel in Figure \ref{fig:IVsize} shows the bias as a function of $h$ for both approaches to $p$-hacking. For the threshold approach, calculations are for tests of size 5\%. Estimates are more biased for smaller $h$. A larger $h$ means that tests are more likely to reject anyway, so there is less likely reason to $p$-hack. Thus the bias is maximized when the null hypothesis is likely to be true. This indicates that it would be preferable for tests of $p$-hacking to have higher power when the majority of the underlying studies are examining hypotheses that are more likely to be correct. For the minimum approach, unlike the results of the previous subsection, the bias for the minimum approach is a function of $h$ --- this effect is due to the higher power of the test using two instruments resulting in that test being selected more as $h$ is larger. Bias decreases in $h$ as this test statistic becomes more dominant (since it is itself unbiased), but remains higher than that for the threshold approach since taking the minimum results in the researcher being better able to find a smaller $p$-value. \subsection{Selecting Across Datasets} \label{sec:specification_search_3} Consider a setting where a researcher runs a finite number of $K>1$ independent analyses over which they can choose the best results. In each case the researcher uses a $t$-test to test their hypothesis, with $T_i \sim \mathcal{N}(h,1)$. We assume that the true local effect $h$ is the same across datasets. This gives the researcher $K$ possible $p$-values to consider, enabling the possibility of $p$-hacking. For example, a researcher conducting experiments with students, as is common in experimental economics, could have several independent sets of students on which to test a hypothesis. As with the other examples, researchers could simply search over all datasets and report the smallest $p$-value or engage in a strategy of searching for a low $p$-value. Let $K=2$, and consider a search where first the researchers construct a dataset for their study and compute a $p$-value for their hypothesis on this dataset, then report this $p$-value if it is below size. Otherwise, they construct a new dataset and report the smallest of the two possible $p$-values (threshold approach). For illustration, we assume they use one-sided $t$-tests to test their hypothesis. For the threshold approach, the $p$-curve is given by \begin{eqnarray*} g_3^{t}(p) =\int_\mathcal{H}\exp\left(hz_0(p)-\frac{h^2}{2}\right)\Upsilon^t_3(p; \alpha, h)d\Pi(h), \end{eqnarray*} where \begin{equation*} \Upsilon^t_3(p;\alpha, h)=\begin{cases} 1+ \Phi\left(z_{h}(\alpha) \right), & \text{if $p\le \alpha$},\\ 2\Phi\left(z_h(p) \right), & \text{if $p> \alpha$}. \end{cases} \end{equation*} This is a special case of the results in Section \ref{sec:specification_search_regression} where $\rho=0$ because of the independence assumption across datasets. If the $t$-statistics were correlated through dependence between the datasets, then setting $\rho$ equal to that correlation and using the results in Section \ref{sec:specification_search_regression} would yield the correct distribution of $p$-values. Figure \ref{fig:p_curves_example3} shows $p$-curves for $h\in \{0,1,2\}$. For all values of $h$, no upward sloping $p$-curves are induced over any range of $p$. So for this type of $p$-hacking, even with thresholds such as in this example, tests that look for $p$-hacking through a lack of monotonically downward sloping $p$-curves will not have power. This method does suggest that tests for discontinuities in the distribution will have power, but likely only if studies have a large $h$. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{DataChoice1_bw-eps-converted-to.pdf} \caption{$p$-Curves from dataset selection based on the threshold approach with $\gamma=0.5$} \label{fig:p_curves_example3} \end{figure} An alternative strategy is to simply report the smallest of the $p$-values across all datasets or subsamples. For general $K$, the $p$-curve is \begin{equation} g_3^{m}(p;K) = K\int_\mathcal{H}\exp\left(hz_0(p)-\frac{h^2}{2}\right)\Phi(z_h(p))^{K-1}d\Pi(h),\label{eq:generalized_um} \end{equation} Equation \eqref{eq:generalized_um} generalizes the analysis in \citet{ulrich2015p}, who considered the case where all nulls are true, that is $h=0$. See also \citet{elliott2022detecting}. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{DataChoice2_bw-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{DataChoice3_bw-eps-converted-to.pdf} \caption{$p$-Curves from dataset selection based on the minimum approach. Left panel: $h=0$. Right panel: $h=1$.} \label{fig:p_curves_example3bnd} \end{figure} The $p$-curve under $p$-hacking, $g^m_3$, is non-increasing (completely monotone) whenever the distribution with no $p$-hacking is non-increasing (completely monotone) \citep{elliott2022detecting}. This can be seen in Figure \ref{fig:p_curves_example3bnd} where for various $K$ and $h$ each of the curves are decreasing. Tests for violations of monotonicity will have no power. Similarly, tests for discontinuities will also not have power. Figure \ref{fig:p_curves_example3bnd} also shows (solid line) the bounds under the null hypothesis of no $p$-hacking. Clearly, each of the curves violates the bounds for some range of $p$; see also Figure 2 in \citet{elliott2022detecting}. Alternatively, the researcher could consider the threshold strategy of first using both datasets, choosing to report this $p$-value if it is below a threshold and, otherwise, choosing the best of the available $p$-values. For $K=2$, this gives three potential $p$-values to choose between. For many such testing problems (for example, testing a regression coefficient in a linear regression), $T_k \sim \mathcal{N}(h,1)$, $k=1,2$, approximately so that the $t$-statistic from the combined samples is $T_{12} \simeq (T_1+T_2)/\sqrt{2}$. This is precisely the same setup asymptotically as in the IV case presented above, so those results apply directly to this problem. As such, we refer to the discussion there rather than re-present the results. \subsection{Variance Bandwidth Selection for Means} \label{sec:variance_selection_analytical} In time series regression, sums of random variables such as means or regression coefficients are standardized by an estimate of the spectral density of the relevant series at frequency zero. A number of estimators exist; the most popular in practice is a nonparametric estimator that takes a weighted average of covariances of the data. With this method, researchers are confronted with a choice of the bandwidth for estimation. Different bandwidth choices allow for multiple chances at constructing $p$-values, hence allowing for the potential for $p$-hacking. To examine this analytically, consider the model $Y_{t}=\beta+U_{t}, t=1,\dots,N$ where we assume that $U_{t}\overset{iid}\sim \mathcal{N}(0,1)$. We can consider two statistics for testing the null hypothesis that the mean is zero versus a positive mean. First the usual $t$-statistic testing the null of zero $T_0=\sqrt{N}\bar{Y}_{N}$ and secondly $T_1=(\sqrt{N}\bar{Y}_{N})/\hat\omega$, where $\bar{Y}_{N}=N^{-1} \sum_{t=1}^N Y_t$, $\hat\omega^2:={\omega}^2(\hat\rho):=1+2\kappa \hat{\rho}$ and $\hat{\rho} = (N-1)^{-1} \sum_{t=2}^N\hat{U}_t \hat{U}_{t-1}$. Here ${\kappa}$ is the weight in the spectral density estimator. In line with the previous subsections, we consider both a threshold approach to $p$-hacking as well as simply choosing the best $p$-value from a set. In the threshold approach, the researcher constructs $T_0$ and calculates the corresponding $p$-value. If it is below $\alpha\le 1/2$, this $p$-value is reported. Otherwise, the researcher calculates $T_1$ and reports the smaller of the $p$-values from the two $t$-statistics.\footnote{If $\hat\rho$ is such that $\hat\omega^2$ is negative, the researcher always reports the initial result.} In the second approach, the smallest $p$-value of the two computed is reported. In Appendix \ref{app:derivation_example4}, we show that the distribution of $p$-values has the form \begin{eqnarray*} g_4^{t}(p) =\int_\mathcal{H}\exp\left(h z_0(p)-\frac{h^2}{2}\right)\Upsilon^t_4(p; \alpha, h, \kappa)d\Pi(h), \end{eqnarray*} with $\Upsilon_4(p; \alpha, h, \kappa)$ taking different forms over different parts of the support of the distribution. Define $l(p)=(2\kappa)^{-1} \left( \left(\frac{z_0(\alpha)}{z_0(p)} \right)^2-1 \right)$ and let $H_N$ and $\eta_N$ be the CDF and PDF of $\hat\rho$, respectively. Then we have \begin{equation*} \Upsilon^t_4= \begin{cases} 1+\frac{1}{\phi(z_h(p))}\int_{-(2\kappa)^{-1}}^{l(p)}\omega(r)\phi(z_0(p)\omega(r)-h)\eta_N(r)dr, & \text{if $0<p\le\alpha$},\\ 1-H_N(0)+H_N(-(2\kappa)^{-1})+\frac{1}{\phi(z_h(p))}\int_{-(2\kappa)^{-1}}^{0}\omega(r)\phi(z_0(p)\omega(r)-h)\eta_N(r)dr, & \text{if $\alpha<p\le 1/2$},\\ H_N(0)+\frac{1}{\phi(z_h(p))}\int_{0}^{\infty}\omega(r)\phi(z_0(p)\omega(r)-h)\eta_N(r)dr, & \text{if $1/2<p<1$}. \end{cases} \end{equation*} \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{LagLengthT_bw-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{LagLengthM_bw-eps-converted-to.pdf} \caption{$p$-Curves from lag length selection with $N=200$ and $\kappa=1/2$. Left panel: thresholding. Right panel: minimum.} \label{fig:pcurves_lag} \end{figure} The left-hand side panel in Figure \ref{fig:pcurves_lag} presents the $p$-curves for the thresholding case. Notice that, unlike the earlier examples, thresholding creates the intuitive hump in the $p$-curve at the chosen size (here $0.05$) for all of the values for $h$. Thus tests that attempt to find such humps may have power. Discontinuities at the chosen size also occur. For $h$ large enough, the $p$-curves also violate the bounds for smaller $p$-values. When the minimum over the two $p$-values is chosen, the $p$-curve is given by \begin{eqnarray*} g_4^{m}(p) =\int_\mathcal{H}\exp\left(h z_0(p)-\frac{h^2}{2}\right){\Upsilon}^m_4(p; \alpha, h, \kappa)d\Pi(h), \end{eqnarray*} where \begin{equation*} \Upsilon^m_4= \begin{cases} 1-H_N(0)+H_N(-(2\kappa)^{-1})+\frac{1}{\phi(z_h(p))}\int_{-(2\kappa)^{-1}}^{0}\omega(r)\phi(z_0(p)\omega(r)-h)\eta_N(r)dr, & \text{if $0<p\le 1/2$},\\ H_N(0)+\frac{1}{\phi(z_h(p))}\int_{0}^{\infty}\omega(r)\phi(z_0(p)\omega(r)-h)\eta_N(r)dr, & \text{if $1/2<p<1$}. \end{cases} \end{equation*} The right-hand side panel in Figure \ref{fig:pcurves_lag} presents the $p$-curves for the minimum case. When $p$-hacking works through taking the minimum $p$-value, as in earlier cases for $p$-values near commonly used sizes, the impact is to move the distributions towards the left, making the $p$-curves fall more steeply. The effect here is modest and likely difficult to detect. Of more interest is what happens at $p=0.5$, where taking the minimum (this effect is also apparent in the thresholding case) results in a discontinuity. The reason for this is that choices over the denominator of the $t$-statistic used to test the hypothesis cannot change the sign of the $t$-test. Within each side, the effect is to push the distribution to the left, so this results in a discontinuity at $p=0.5$. This effect will extend to all methods where $p$-hacking is based on searching over different choices of variance covariance matrices --- for example, different choices in estimators, different choices in the number of clusters, etc. Figure \ref{fig:pcurves_lag} shows that for $h=1,2$ the bound is not reached, and any discontinuity at $p=0.5$ is very small. For $h=0$, the bound is slightly below the $p$-curve after the discontinuity. For size at $h=0$ and $p=\alpha$ we have \begin{eqnarray*} G_0(\alpha) &=& \alpha+(1-\alpha)(H_N(0)-H_N(-(2\kappa)^{-1}))-\int_{-(2\kappa)^{-1}}^{0}\Phi(z_0 (\alpha)\omega(r)-h) \eta_N(r)dr \end{eqnarray*} Figure \ref{fig:p_curves_example4size} shows that the size distortions through this example of $p$-hacking are quite modest. The reason is that for a reasonable sample size, the estimated first-order correlation is very close to zero. Thus estimated standard errors when an additional lag is included are very close to one, meaning that the two $t$-statistics are quite similar and very highly correlated. This means that there is not much room to have size distortions due to this $p$-hacking. \begin{figure}[H] \centering \includegraphics[width=0.43\textwidth]{LagLengthSize1_bw-eps-converted-to.pdf} \caption{Rejection rate under $p$-hacking from lag length selection with $N=200$ and $\kappa=1/2$} \label{fig:p_curves_example4size} \end{figure} \section{Statistical Tests for $p$-Hacking} \label{sec:tests} In this section, we discuss several statistical tests for the null hypothesis of no $p$-hacking based on a sample of $n$ $p$-values, $\{P_i\}_{i=1}^n$. We discuss in detail the histogram-based tests, which are the most powerful and flexible in the simulations, and then provide an overview of alternative tests. \subsection{Histogram-based Tests} Histogram-based tests \citep{elliott2022detecting} provide a flexible framework for constructing tests for different combinations of testable restrictions. Let $0=x_0<x_1<\cdots< x_J=1$ be an equidistant partition of $[0,1]$ and define the population proportions \[ \pi_j = \int_{x_{j-1}}^{x_j}g(p)dp, \quad j=1,\dots, J. \] The main idea of histogram-based tests is to express the testable implications of $p$-hacking in terms of restrictions on the population proportions $(\pi_{1},\dots,\pi_J)$. For instance, non-increasingness of the $p$-curve implies that $\pi_{j} - \pi_{j-1}\le 0$ for $j=2,\dots,J$. More generally, \citet{elliott2022detecting} show that $K$-monotonicity\footnote{A function $g$ is $K$-monotone if $0\le (-1)^{k}g^{(k)}$ for and all $k=0,1,\dots,K$, where $g^{(k)}$ is the k$^{th}$ derivative of $g$. By definition, a completely monotone function is $K$-monotone for all $K$.} restrictions and upper bounds on the $p$-curve and its derivatives can be expressed as \begin{equation} H_0:~ A\pi_{-J}\le b, \label{eq:H0_proportions} \end{equation} for a matrix $A$ and vector $b$, where $\pi_{-J} := (\pi_1,\dots, \pi_{J-1})'$.\footnote{Here we incorporate the adding up constraint $\sum_{j=1}^J\pi_j=1$ into the definition of $A$ and $b$ and express the testable implications in terms of the ``core moments'' $(\pi_1,\dots, \pi_{J-1})$ instead of $(\pi_1,\dots, \pi_{J})$.} To test hypothesis \eqref{eq:H0_proportions}, we estimate $\pi_{-J}$ using the vector of sample proportions $\hat\pi_{-J}$. The estimator $\hat\pi_{-J}$ is asymptotically normal with mean $\pi_{-J}$, such that the problem of testing \eqref{eq:H0_proportions} becomes the problem of testing affine inequalities about the mean of a multivariate normal distribution \citep[e.g.,][]{kudo1963,wolak1987,cox2020simple}. Following \citet{elliott2022detecting}, we use the conditional chi-squared test of \citet{cox2020simple}, which is easy to implement and remains computationally tractable when the number of bins, $J$, is moderate or large. \subsection{Other Tests} In addition to the histogram-based tests, we also investigate the performance of several other tests proposed in the literature. These tests can be categorized based on the testable implications they consider. \subsubsection{Tests for Non-Increasingness of the $p$-Curve} A popular test for non-increasingness of the $p$-curve is the Binomial test \citep[e.g.,][]{simonsohn2014p,head2015extent}, where researchers compare the number of $p$-values in two adjacent bins right below significance cutoffs. Under the null of no $p$-hacking, the fraction of $p$-values in the bin closer to the cutoff should be weakly smaller than the fraction in the bin farther away. Implementation is typically based on an exact Binomial test. Binomial tests are ``local'' tests that ignore information about the shape of the $p$-curve farther away from the cutoff, which often leads to low power in our simulations. A ``global'' alternative is Fisher's test \citep[e.g.,][]{simonsohn2014p}.\footnote{An alternative to Fisher's test is Stouffer's method \citep{simonsohn2015better}.} In addition to the classical Binomial test and Fisher's test, we consider tests based on the least concave majorant (LCM) \citep{elliott2022detecting}.\footnote{LCM tests have been successfully applied in many different contexts \citep[e.g.,][]{carolan2005,beare2015nonparametric,fang2019refinements}} LCM tests are based on the observation that non-increasingness of $g$ implies that the CDF $G$ is concave. Concavity can be assessed by comparing the empirical CDF of $p$-values, $\hat{G}$, to its LCM $\mathcal{M}\hat{G}$, where $\mathcal{M}$ is the LCM operator. We choose the test statistic $\|\hat{G}-\mathcal{M}\hat{G}\|_\infty$. The uniform distribution is least favorable for the LCM test \citep{kulikov2008distribution,beare2021least}, and critical values can be obtained via simulations. \subsubsection{Tests for Continuity of the $p$-Curve} Continuity of the $p$-curve at pre-specified cutoffs $p=\alpha$ can be assessed using standard density discontinuity tests \citep[e.g.,][]{mccrary2008manipulation,cattaneo2020simple}. Following \citet{elliott2022detecting}, we use the approach by \citet{cattaneo2020simple} with automatic bandwidth selection implemented in the \texttt{R}-package \texttt{rddensity} \citep{cattaneo2021rddensity}. \section{Monte Carlo Simulations} \label{sec:mc} In this section, we investigate the finite sample properties of the tests in Section \ref{sec:tests} using a Monte Carlo simulation study. The Monte Carlo study is based on generalizations of the analytical examples of $p$-hacking in Section \ref{sec:theory}. We do not consider selection across datasets, as this example can be viewed as a special case of covariate selection and IV selection. \subsection{Generalized $p$-Hacking Examples} In all examples that we consider, researchers are interested in testing a hypothesis about a scalar parameter $\beta$: \begin{equation} H_0:\beta=0\qquad \text{against}\qquad H_{1}:\beta>0. \label{eq:H0_simul} \end{equation} Researchers may $p$-hack their initial results by exploring additional model specifications or estimators and report a different result of their choice. Specifically, we consider the two general approaches to $p$-hacking discussed in Section \ref{sec:theory}: the threshold and the minimum approach. In what follows, we discuss the generalized examples of $p$-hacking in more detail. \subsubsection{Selecting Control Variables in Linear Regression} Researchers have access to a random sample with $N=200$ observations generated as \[ Y_i=X_{i}\beta+u_i, \quad i=1,\dots,N, \] where $X_i\sim \mathcal{N}(0,1)$ and $u_i\sim \mathcal{N}(0,1)$ are independent of each other. Researchers have access to $K$ additional control variables, $Z_i:=(Z_{1i},\dots, Z_{Ki})'$, which are generated as \begin{equation*} Z_{ki}= \gamma_kX_{i}+\sqrt{1-\gamma_k^2} \epsilon_{Z_k,i}, \quad \epsilon_{Z_k,i} \sim \mathcal{N}(0,1), \quad \gamma_k\sim U[-0.8, 0.8],\quad k=1,\dots,K. \label{eq:z_gen} \end{equation*} We set $\beta=h/\sqrt{N}$ with $h\in \{0,1,2\}$ and show results for $h\sim \chi^2(1)$ in the Appendix. Researchers use either a threshold or a minimum approach to $p$-hacking. \begin{itemize} \item[] \textbf{Threshold approach.} Researchers regress $Y_i$ on $X_i$ and $Z_i$ and test \eqref{eq:H0_simul}. Denote the resulting $p$-value as $P$. If $P\le 0.05$, the researchers report the $p$-value. If $P>0.05$, they regress $Y_i$ on $X_i$ trying all $(K-1)\times 1$ subvectors of $Z_i$ as controls and select the result with the smallest $p$-value. If the smallest $p$-value is larger than $0.05$, they continue and explore all $(K-2)\times 1$ subvectors of $Z_i$ etc. If all results are insignificant, they report the smallest $p$-value. \item[] \textbf{Minimum approach.} Researchers run regressions of $Y_i$ on $X_i$ and each possible configuration of covariates $Z_i$ and report the minimum $p$-value. \end{itemize} Figures \ref{fig:hists_cov_K3}, \ref{fig:hists_cov_K5}, and \ref{fig:hists_cov_K7} show the null and $p$-hacked distributions for $K\in\{3,5,7\}$.\footnote{To generate these distributions, we run the algorithm one million times and collect $p$-hacked and non-$p$-hacked results.} The $p$-curves are similar to those in the simple analytical example of Section \ref{sec:specification_search_regression}. The threshold approach leads to a discontinuity in the $p$-curve and may lead to non-increasing $p$-curves and humps below significance thresholds. By contrast, reporting the minimum $p$-value across all possible specifications generally leads to continuous and non-increasing $p$-curves. The distribution of $h$ is an important determinant of the shape of the $p$-curve, especially when researchers use the threshold approach. For example, for the threshold approach, the larger $h$, the higher the probability that they find significant results in the initial specification and thus will not engage in further specification search. Finally, as expected, the violations of the testable restrictions are more pronounced when $K$ is large, that is when researchers have many degrees of freedom. \subsubsection{Selecting amongst Instruments in IV Regression} Researchers have access to a random sample with $N=200$ observations generated as \begin{eqnarray*} Y_i&=&X_{i}\beta+U_i, \\ X_{i} &=& Z_i'\pi + V_i, \end{eqnarray*} where $u_i\sim \mathcal{N}(0,1)$ and $v_i\sim \mathcal{N}(0,1)$ with $\operatorname{Cov}(U_i, V_i)=0.5$. The instruments $Z_i:=(Z_{1i},\dots, Z_{Ki})'$ are generated as \begin{equation*} Z_{ki}= \gamma_k\xi_{i}+\sqrt{1-\gamma_k^2} \epsilon_{Z_k,i}, \quad \xi_i\sim \mathcal{N}(0,1), \quad \epsilon_{Z_k,i} \sim \mathcal{N}(0,1), \quad \gamma_k\sim U[-0.8, 0.8],\quad k=1,\dots,K, \end{equation*} where $\xi_i, \epsilon_{Z_k, i}$, and $\gamma_k$ are independent for all $k$. Also, $\pi_k\overset{iid}\sim \text{ Uniform[1, 3]}$, $k=1,\dots, K$. We set $\beta=h/(3 \sqrt{N})$ with $h\in \{0,1,2\}$ and show results for $h\sim \chi^2(1)$ in the Appendix. Researchers use either a threshold or a minimum approach to $p$-hacking. \begin{itemize} \item[] \textbf{Threshold approach.} Researchers estimate the model using all instruments $Z_i$, test \eqref{eq:H0_simul}, and obtain the $p$-value $P$. If $P\le 0.05$, the researchers report the $p$-value. If $P>0.05$, they try all $(K-1)\times 1$ subvectors of $Z_i$ as instruments and select the result corresponding to the smallest $p$-value. If the smallest $p$-value is larger than $0.05$, they continue and explore all $(K-2)\times 1$ subvectors of $Z_i$ etc. If all results are insignificant, they report the smallest $p$-value. \item[] \textbf{Minimum approach.} The researchers run IV regressions of $Y_i$ on $X_i$ using each possible configuration of instruments and report the minimum $p$-value. \end{itemize} Figures \ref{fig:hists_iv_K3} and \ref{fig:hists_iv_K5} display the null and $p$-hacked distributions for $K\in\{3,5\}$. We do not show results for $K=7$ since there is a very high concentration of $p$-values at zero in this case. The $p$-curves in the general case here are similar to those in the simple analytical example of Section \ref{sec: iv_example}. As with covariate selection, the threshold approach yields discontinuous $p$-curves and may lead to non-increasingness and humps, whereas reporting the minimum $p$-value leads to continuous and decreasing $p$-curves. The distribution of $h$ and the number of instruments, $K$, are important determinants of the shape of the $p$-curve. We note that the distribution of $p$-values under the null hypothesis of no $p$-hacking when $h=0$ is not exactly uniform because of the relatively small sample size. \subsubsection{Lag Length Selection in Regression} Researchers have access to a random sample with $N=200$ observations generated as \begin{equation*} Y_i=X_i\beta+U_i, \end{equation*} where $X_i\sim \mathcal{N}(0,1)$ and $U_i\sim \mathcal{N}(0,1)$ are independent. We set $\beta=h/\sqrt{N}$ with $h\in \{0,1,2\}$ and show results for $h\sim \chi^2(1)$ in the Appendix. Researchers use either a threshold or a minimum approach to $p$-hacking. \begin{itemize} \item[] \textbf{Threshold approach.} Researchers first regress $Y_i$ on $X_i$ and calculate the standard error using the classical Newey-West estimator with the number of lags selected using the Bayesian Information Criterion (researchers only choose between $0,1,2,3$, and $4$ lags). They then use a $t$-test to test \eqref{eq:H0_simul} and calculate the $p$-value $P$. If $P\le 0.05$, the researchers report the $p$-value. If $P>0.05$, they try Newey-West estimator with one extra lag. If there is no significant result, they try two extra lags etc. If all results are insignificant, they report the smallest $p$-value. \item[] \textbf{Minimum approach.} Researchers regress $Y_i$ on $X_i$ and calculate the standard error using Newey-West with $0,1,2,3,$ and $4$ lags and report the specification that yields the minimum $p$-value. \end{itemize} The null and $p$-hacked distributions are displayed in Figure \ref{fig:hists_var}. The $p$-curves exhibit features similar to those in the simple analytical example in Section \ref{sec:variance_selection_analytical}. The threshold approach induces a sharp spike right below 0.05. The reason is that $p$-hacking via judicious lag selection does not lead to huge improvements in terms of $p$-value. Both approaches to $p$-hacking lead to a discontinuity at $0.5$. \subsection{Simulations} \subsubsection{Setup} We model the distribution of $p$-values as a mixture: \begin{equation*} g(p) = \tau \cdot g^p(p)+(1-\tau)\cdot g^{np}(p) \end{equation*} Here, $g^p$ is the distribution under the different $p$-hacking approaches described above; $g^{np}$ is the distribution in the absence of $p$-hacking (i.e., the distribution of the first $p$-value that the researchers obtain). In our simulations we vary the fraction of researchers who $p$-hack, $\tau\in [0,1]$. To generate the data, we first simulate the algorithm one million times to obtain samples corresponding to $g^p$ and $g^{np}$. Then, to construct samples in every Monte Carlo iteration, we draw with replacement from a mixture of those samples. The overall sample size is $n=5000$. Following \citet{elliott2022detecting}, we apply the test to the subinterval $(0, 0.15]$. Therefore, the number of $p$-values used in the tests (i.e., effective sample size) depends on the $p$-hacking strategy, the distribution of $h$, and the fraction of $p$-hackers $\tau$. We compare the finite sample performance of the tests described in Section \ref{sec:tests}. See Table \ref{tab:tests} for more details. We do not show results for Fisher's test since we found that this test has essentially no power for detecting the types of $p$-hacking we consider. The simulations are implemented using the statistical software \texttt{MATLAB} \citep{MATLAB:2020} and \texttt{R} \citep{R2022}. \begin{table}[H] \footnotesize \centering \caption{Tests for $p$-hacking} \begin{tabular}{l l} \toprule \midrule \multicolumn{2}{c}{\textbf{Testable restriction:} non-increasingness of $p$-curve}\\ \cmidrule(l{5pt}r{5pt}){1-2} CS1 & Histogram-based test based on \citet{cox2020simple} with $J=15$\\ LCM & LCM test \\ Binomial & Binomial test with bins $[0.40,0.45)$ and $[0.45,0.50]$ \\ \\ \multicolumn{2}{c}{\textbf{Testable restriction:} continuity of $p$-curve}\\ \cmidrule(l{5pt}r{5pt}){1-2} Discontinuity & Density discontinuity test with automatic bandwidth selection \citep{cattaneo2021rddensity}\\\\ \multicolumn{2}{c}{\textbf{Testable restriction:} upper bounds on $p$-curve, first, and second derivative}\\ \cmidrule(l{5pt}r{5pt}){1-2} CSUB & Histogram-based test based on \citet{cox2020simple} with $J=15$\\ \\ \multicolumn{2}{c}{\textbf{Testable restriction:} 2-monotonicity and upper bounds on $p$-curve, first, and second derivative}\\ \cmidrule(l{5pt}r{5pt}){1-2} CS2B & Histogram-based test based on \citet{cox2020simple} with $J=15$\\ \midrule \bottomrule \end{tabular} \label{tab:tests} \end{table} \normalsize \subsubsection{Power Curves} \label{sec:power_curves} In this section, we present power curves for the different data generating processes (DGPs). For covariate and instrument selection, we focus on the results for $K=3$ in the main text and present the results for larger values of $K$ in Appendix \ref{app:additional_simulation_results}. The nominal level is 5\% for all tests. All results are based on 1000 simulation draws. Figures \ref{fig:power_cov_K3}, \ref{fig:power_iv_K3}, and \ref{fig:power_var} present the results. The power for detecting $p$-hacking crucially depends on the type of $p$-hacking, the econometric method, the fraction of $p$-hackers, $\tau$, and the value of $h$. As shown in Section \ref{sec:theory}, when researchers $p$-hack using a threshold approach, the $p$-curves are discontinuous at the threshold, may violate the upper bounds, and may be non-monotonic; see also Appendix \ref{app: histograms}. Thus, tests exploiting these testable restrictions may have power when the fraction of $p$-hackers is large enough. The CS2B test, which exploits monotonicity restrictions and bounds, has the highest power overall. However, this test may exhibit some small size distortions when the effective sample size is small (see, for example, the results lag length selection with $h=0$). Among the tests that exploit the classical monotonicity restriction, the CS1 test exhibits higher power than the LCM and the widely-used Binomial test. The LCM test can exhibit non-monotonic power curves because the test statistic converges to zero in probability for strictly decreasing $p$-curves \citep{beare2015nonparametric}. The widely-used Binomial test often exhibits low power. The reason is that the $p$-hacking approaches we consider do not lead to isolated humps or spikes near $0.05$, even if researchers are using a thresholding $p$-hacking approach. There is one notable exception. When researchers engage in variance bandwidth selection, our theoretical results show that $p$-hacking based on the threshold approach can yield isolated humps right below the cutoff (see Figure \ref{fig:pcurves_lag} and also Figure \ref{fig:hists_var}). By construction, the Binomial test is well-suited for detecting this type of $p$-hacking and is among the most powerful tests in this case. Our results for the Binomial test demonstrate the inherent disadvantage of using tests that only exploit testable implications locally. Such tests only have power against very specific forms of $p$-hacking, limiting their usefulness in practice. Discontinuity tests constitute a useful complement to tests based on monotonicity and upper bounds because $p$-hacking based on thresholding approaches often yields pronounced discontinuities. These tests are particularly powerful for detecting $p$-hacking based on lag length selection, which leads to spikes and pronounced discontinuities at $0.05$ as discussed above. When researchers always report the minimum $p$-value, the power of the tests is much lower than when they use a threshold approach. The minimum approach to $p$-hacking does not lead to violations of monotonicity and continuity over $p\in (0,0.15]$. Therefore, by construction, tests based on these restrictions have no power, irrespective of the fraction of researchers who are $p$-hacking. In Section \ref{sec:theory}, we show theoretically that the minimum approach may yield violations of the upper bounds. The range over which the upper bounds are violated and the extent of these violation depend on $h$ and the econometric method used by the researchers (see Figures \ref{fig:p_curves_covh=1}, \ref{fig:p_curves_example2}, and \ref{fig:pcurves_lag}). Consistent with the analysis in Section \ref{sec:theory}, the simulations show a moderate amount of power for the tests based on upper bounds (CSUB and CS2B) for IV selection with $h=0$ and $h=1$ when a sufficiently large fraction of researchers $p$-hacks. Our theoretical results show that the violations of the upper bounds may be small, so the moderate power of these tests is not unexpected. Under the minimum approach, the power curves of the CSUB and CS2B tests overlap, suggesting that the power of the CS2B test comes from using upper bounds. This finding demonstrates the importance of exploiting upper bounds in addition to monotonicity and continuity restrictions in practice. Figure \ref{fig:power_iv_K3} further shows that the power of the CSUB and the CS2B test may not be monotonic in $h$. On the one hand, for large $h$, there are more $p$-values close to zero, where the upper bounds are more difficult to violate. On the other hand, the effective sample size increases with $h$, leading to more power. Finally, the results for covariate and IV selection in Appendix \ref{app:additional_simulation_results} show that the larger $K$ --- the more degrees of freedom the researchers have when $p$-hacking --- the higher the power of the CSUB and CS2B test. \begin{figure}[H] \begin{center} \textbf{Thresholding} \includegraphics[width=0.32\textwidth]{power_sel03-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_sel13-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_sel23-eps-converted-to.pdf} \textbf{Minimum} \vspace{0.15em} \includegraphics[width=0.32\textwidth]{power_sel03min-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_sel13min-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_sel23min-eps-converted-to.pdf} \end{center} \vspace*{-3mm} \caption{Power curves covariate selection with $K=3$}\label{fig:power_cov_K3} \end{figure} \begin{figure}[H] \begin{center} \textbf{Thresholding} \includegraphics[width=0.32\textwidth]{power_iv03-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_iv13-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_iv23-eps-converted-to.pdf} \textbf{Minimum} \vspace{0.15em} \includegraphics[width=0.32\textwidth]{power_iv03min-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_iv13min-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_iv23min-eps-converted-to.pdf} \end{center} \vspace*{-3mm} \caption{Power curves IV selection with $K=3$}\label{fig:power_iv_K3} \end{figure} \begin{figure}[H] \begin{center} \textbf{Thresholding} \includegraphics[width=0.32\textwidth]{power_var0-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_var1-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_var2-eps-converted-to.pdf} \textbf{Minimum} \vspace{0.15em} \includegraphics[width=0.32\textwidth]{power_var0min-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_var1min-eps-converted-to.pdf} \includegraphics[width=0.32\textwidth]{power_var2min-eps-converted-to.pdf} \end{center} \vspace*{-3mm} \caption{Power curves lag length selection}\label{fig:power_var} \end{figure} Overall, the tests' ability to detect $p$-hacking is highly context-specific and can be low in some cases. As we show theoretically in Section \ref{sec:theory}, this is because $p$-hacking may not lead to violations of the testable restrictions used by the statistical tests for $p$-hacking. Moreover, even if $p$-hacking leads to violations of the testable restrictions, these violations may be small and can thus only be detected based on large samples of $p$-values. Regarding the choice of testable restrictions, the simulations demonstrate the importance of exploiting upper bounds in addition to monotonicity and continuity for constructing powerful tests against plausible $p$-hacking alternatives. \subsubsection{Power vs.\ Costs of $p$-Hacking} Our simulation results show that the tests' ability to detect $p$-hacking crucially depends on the shape of the $p$-curve under the alternative of $p$-hacking, which depends on the type of $p$-hacking, the econometric method, the distribution of effects, and the fraction of $p$-hackers. This result is expected since the alternative space of $p$-curves under $p$-hacking is very large. It begs the question: What alternatives are relevant for empirical practice? To determine which alternatives are relevant, we consider the costs of $p$-hacking. As discussed in Section \ref{sec:theory}, there are at least two types of costs: size distortions when $h=0$ and bias in the estimated coefficients. Here we focus on the bias, which is relevant for all values of $h$. In Figure \ref{fig:power_bias}, we plot the relationship between bias and power for the threshold and the minimum approach across all DGPs and all $K$. We compare three tests: the classical Binomial test, the discontinuity test, and the CS2B test (the most powerful test overall). Each dot in Figure \ref{fig:power_bias} corresponds to the power of one test under one DGP. We only show results for covariate and IV selection; the bias under lag length selection is always zero. For the thresholding approach, we present results for $\tau=0.25$. For the minimum approach, we set $\tau=0.75$ since no test has non-trivial power for $\tau=0.25$. When researchers $p$-hack using a threshold approach, there is a positive association between the average bias and the power of all three tests: the higher the costs of $p$-hacking, the higher the power of the tests on average. The CS2B test has power close to one when the bias is large. This test is able to detect $p$-hacking with high probability when it is costly, even when only 25\% of the researchers are $p$-hacking. Although less powerful than the CS2B test, the discontinuity test also has high power in settings where $p$-hacking yields large biases. By contrast, the power of the Binomial test does not exceed 30\%, even when $p$-hacking leads to large biases. $p$-Hacking based on the minimum approach is difficult to detect. This type of $p$-hacking does not lead to violations of continuity and monotonicity. As a result, the discontinuity and the Binomial test, by construction, have no power, irrespective of the magnitude of the bias. Our simulations confirm this. Therefore, we only discuss results for the CS2B test, which may have power since the minimum approach may yield $p$-curves that violate the upper bounds. Our simulation results suggest that the relationship between bias and power crucially depends on the econometric method. The CS2B test does not have meaningful power for covariate selection, irrespective of the bias. By contrast, there is again a positive relationship between bias and power for IV selection. Overall, our results show that whenever the tests have non-trivial power, there is a positive association between their power and the bias from $p$-hacking. This is desirable from a meta-analytic perspective. However, we also document cases where the proposed tests do not have non-trivial power, even when $p$-hacking is very costly. \begin{figure}[H] \begin{center} \includegraphics[width=0.43\textwidth]{CovSel_scatter_t-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{IV_scatter_t-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{CovSel_scatter_m-eps-converted-to.pdf} \includegraphics[width=0.43\textwidth]{IV_scatter_m-eps-converted-to.pdf} \end{center} \caption{Power vs.\ bias} \label{fig:power_bias} \end{figure} \section{Conclusion} \label{sec:conclusion} The ability of researchers to choose between possible results to report to put their work in the best possible light ($p$-hack) has reasonably caused concern within the empirical sciences. General approaches to limit or detect this ability are welcome, for example, replication studies and pre-registration. One strand of detection is to undertake meta-studies examining reported $p$-values (the $p$-curve) over many papers. A number of different tests have been suggested, and in empirical work based on these tests, evidence for $p$-hacking is mixed. Interpreting empirical work based on these tests requires a careful understanding of their ability to detect $p$-hacking. We examine from both a statistical and scientific perspective how well these tests are able to detect $p$-hacking in practice. To do this, we examine four situations where we might expect researchers to $p$-hack --- search over control variables in linear regressions, search over available instruments in IV regressions, selecting amongst datasets, and selecting bandwidth in variance estimation. In a stylized version of each of these, we show how $p$-hacking affects the distribution of $p$-values under the alternative, which tells us which types of tests might have power. These results motivate Monte Carlo experiments in more general settings. Threshold approaches to $p$-hacking (where a predetermined significance level is targeted) result in $p$-curves that typically have discontinuities, $p$-curves that exceed upper bounds under no $p$-hacking, and less often violations of monotonicity restrictions. Many tests have some power to find such $p$-hacking, and the best tests are those exploiting both monotonicity and upper bounds and those based on testing for discontinuities. $p$-Hacking based on reporting the minimum $p$-value does not result in $p$-curves exhibiting discontinuities or monotonicity violations. However, tests based on bound violations have some power. Overall this second approach to $p$-hacking is much harder to detect. From a scientific perspective, the relevant question is how hard it is to detect $p$-hacking when the costs of $p$-hacking --- size distortions when there is no effect to find and biases induced in estimates through reporting the best results --- are high. From this perspective, the results are more positive. For the $p$-hacking strategies we examine, the opportunities to change results significantly through $p$-hacking are often limited. Test statistics are often quite highly (positively) correlated when they are based on a single dataset so that the effects can be small. We show that for the threshold case the power of tests that work well is positively correlated with the biases in estimated effects induced by $p$-hacking. This is less so when the minimum $p$-value is reported because of the low power of the tests in general. Of final note is that this study examines situations where the model is correctly specified or over-specified, so estimates are consistent for their true values. For poorly specified models, for example, the omission of important variables that leads to omitted variables (confounding) effects, it is possible to generate a larger variation in $p$-values. Such problems with empirical studies are well understood and perhaps best found through theory and replication than meta-studies. \bibliographystyle{apalike}
\section*{Acknowledgment} { \bibliographystyle{IEEEtran} \section{Introduction} \begin{figure*}[h] \includegraphics[width=0.99\textwidth]{frontfig.png} \centering \caption{Under our framework, the robot first learns \textit{human-guided representations} by asking the human for \color{orange}representation-specific input \color{black}to capture specific aspects of the task that they care about (e.g. distance to laptop, cup orientation, cup near table). The robot then uses the representation to learn how to perform the task from \color[HTML]{5072A7}task-specific input \color{black} like demonstrations, corrections, etc.} \label{fig:front_fig} \vspace{-4mm} \end{figure*} Imagine a world where you wake up in the morning, arise from bed, and your home robot assistant makes your bed. After getting ready, you head downstairs where your robot has placed a steaming mug of fresh coffee on the table exactly where it knows you will sit. After drinking the coffee, your robot picks up the empty mug and places it in the dishwasher as you leave the house and set off for work. The entire morning, your robot is incorporated seamlessly into your daily life and home. This scene of domestic bliss captures the essence of what we hope for from our advanced collaborative assistants -- the ability to effectively complete desired tasks while integrating into our environments and adapting to our individual preferences, akin to human-like collaboration. Today, autonomous systems are increasingly able to learn advanced behaviors like those mentioned above~\cite{abbeel2010autonomous,kolter2010probabilistic,wulfmeier2016maxentirl}. However, designing learning algorithms that match the adaptability and generalizability of human reasoning remains challenging: while these systems may perform their tasks successfully in the environment(s) and under the conditions they were trained on, their learned behaviors may not necessarily work well in novel deployment environments. This problem can rear its head in a variety of instances: when physical constraints change (while it's okay for the robot to break mugs when trying out new grip poses in the lab, we may wish for them to be more careful in a home), when environment conditions, layouts, or compositions change (we may wish for the robot to grasp an octopus-shaped mug that it's never before seen), or when the task preferences of the human that the robot interacts with change (one human may prefer that the coffee is prepared as quickly as possible irrespective of mess, while another may prefer that the robot prioritizes not spilling the coffee while navigating the kitchen). The key issue in all these cases is that, while the designer can anticipate some of the possible task specifications when training the robot, these specifications do not necessarily reflect the desires of the other humans the robot will interact with in its lifetime~\cite{ng1999policy,levine2020offline}. In other words, the \textit{representation}, or abstraction, of the tasks the human hopes for the robot to perform in one environment may be \textit{misaligned} with the representation of the tasks that the robot has learned in another. Our observation is that because humans have adapted their environments to capture the full idiosyncrasies of completing tasks that they desire, they are best equipped to help insert knowledge specifically describing aspects of the environment that are useful to the robot in the learning process. Specifically, human input can best help solve the \textit{representation alignment} problem of understanding what task aspects matter to the human when adapting to a new environment. Traditional methods of robot learning from human input instantiate representations as a set of hand-engineered \textit{features}---specific aspects of the task that a human may care about~\cite{ziebart2008maximum,HadfieldMenell2017InverseRD,abbeel2004apprenticeship,bajcsy2017phri,osa2018algorithmic}. These features are pre-specified by a system designer and function as state-space abstractions that insert structure for learning the task efficiently. However, they can be difficult to construct and impossible to exhaustively specify. Meanwhile, state-of-the-art deep learning methods~\cite{wulfmeier2016maxentirl,finn2016gcl,christiano2017preferences,fu2018learning,fu2018variational,brown2020brex,abbeel2004apprenticeship,torabi2018behavioral} bypass feature specification by operating directly on high-dimensional state spaces, thereby automatically constructing an \textit{implicit} representation from the person's task-specific input (e.g. demonstrations). Unfortunately, because these methods are optimized to learn the task while bypassing the explicit need to learn the representation, there is difficulty in disentangling the high-level representation from the specific task provided~\cite{fu2018learning,Reddy2020SQILIL,bobu2022inducing}. Consequently, effective task learning requires massive amounts of training data and renders generalization to new tasks difficult. In summary, one paradigm inserts useful structure to solve the robot learning problem efficiently but that structure is difficult to define; the other avoids explicitly specifying the structure but requires too much human data to extract it implicitly and thus struggles to generalize across different domains. We postulate that effective learning from human input requires methodologies that combine the best of both traditional feature engineering and highly-expressive deep learning worlds. Our core idea is to \textbf{divide and conquer} the learning problem: \textit{explicitly} focus human input on teaching robots good intermediate representations before using those representations for downstream tasks. We call these \textit{human-guided representations}: abstractions that, if learned well, can enable robots to better solve tasks when deployed into the real world. We discuss several directions for learning human-guided representations as well as strategies for identifying misalignment and improving effective downstream task learning. \section{Learning Human-Guided Representations} \label{sec:HGR} The representation learning literature has accrued a vast body of work on learning disentangled latent spaces in an unsupervised manner~\cite{chen2016infogan,Higgins2017betaVAELB,chen2018betaTCVAE}. However, because these methods are purposefully designed to bypass direct human supervision, the disentangled factors in the learned embedding do not necessarily correspond to concepts in the human's representation. In other words, the robot's learned representation does not necessarily align with the human's, therefore adapting to how they want the task to be done is difficult. Self-supervised learning inserts some human guidance by allowing for the designer to specify proxy tasks useful for feature learning~\cite{Doersch2015UnsupervisedVR,pathak2018zero,aytar2018playing,brown2020brex,laskin2020curl} (for example, predicting forward dynamics to capture what constrains movement). In this process, the human designer hopes to instill good representations into the robot by using their intuition to construct tasks which illustrate specific features. However, devising proxy tasks is an exercise that requires nontrivial effort and expertise: human effort to manually specify features is instead traded for human effort to specify objective functions for extracting those features. A more direct way to guide representation alignment is to learn directly from human input. In standard imitation learning, the robot learns a policy that copies---or clones---human demonstrations ~\cite{osa2018algorithmic,abbeel2004apprenticeship}. However, it cannot learn to imitate what it has not seen before, thus rendering human input non-generalizable to new tasks~\cite{levine2020offline,torabi2018behavioral}. Moreover, BC suffers from the problem of covariate shift, where once a learned policy drifts away from the demonstrations, errors compound more and more over time. Inverse reinforcement learning (IRL) attempts to extract a reward function from demonstrations that is intended to capture \textit{why} a specific behaviour is desirable~\cite{abbeel2004apprenticeship}, but unfortunately requires massive amounts of data to truly learn a fully-specified reward~\cite{fu2018learning,Reddy2020SQILIL}. IRL also requires expert or close to expert demonstrations \cite{ziebart2008maximum}. Meta-learning reduces this sample complexity by reusing demonstrations from an array of different tasks in the training distribution~\cite{finn2017maml,xu2019metaIRL}, but ultimately still requires the human to know the test time task distribution \textit{a priori}, which brings us back to the manual specification problem: we now trade hand-crafting features for hand-crafting tasks. Because demonstrations are intended for teaching the robot \textit{how} to do the tasks, not \textit{what matters} for doing the tasks, they can only contribute to aligning representations implicitly. This might not result in learning algorithms extracting salient features that matter to the human for performing the desired tasks~\cite{bobu2022inducing}. As shown in Fig. \ref{fig:front_fig}, we propose that the robot should explicitly ask for \textit{representation-specific} human input to teach it the intermediate representation before using it to learn more generalizable downstream tasks from task-specific input. Importantly, because of this separation, these representations are not specific to any one particular task the human may want the robot to carry out; instead, they capture aspects causal for the potential task \textit{distribution} in the environment. \textbf{Designing human input for representation learning.} One option for learning intermediate human-guided representations is to instantiate them as feature sets like those in traditional methods, and let the human teach individual, novel features themselves~\cite{bobu2021ferl, bobu2022inducing}. A natural way to represent any specific new feature is via a neural network which is trained by asking the human for supervision labels representing the feature values at different states. Unfortunately, querying the human for labels to train this neural network requires a burdensome amount of human interaction. Even worse, humans are notoriously imprecise at giving these types of numerical inputs, rendering learned representations likely erroneous~\cite{Braziunas2008elicitation}. We propose that a key direction for future work is considering new types of representation-specific input that are highly informative about the feature without requiring too much effort from the human. For example, a new type of structured human input called a \textit{feature trace}~\cite{bobu2021ferl}, where a human guides the robot from states where the feature is highly expressed to states where it is not, has been found to recover more robust and generalizable rewards with far less human effort. Moving forward, we can study additional forms of human input such as language or gaze and pose, that can also be targeted for feature learning. Moreover, we can also consider types of human input that recover the feature representation as a whole (rather than one by one) via representation-specific proxy tasks -- \textit{calibration} tasks where the robot's goal is to specifically align itself with the demonstrating human. \textbf{Transforming the representation for human input.} Instead of designing the type of input the person can give to teach the representation, we can directly design the type of representation itself. Previously, when we instantiated the representation as a set of learnable features, we gave the human freedom to decide what feature each dimension of the representation was and provide feedback for teaching it to the robot. This enabled the human to add desirable task aspects to the representation even if the system designer did not originally think of them. In some cases, though, it may be possible for the system designer to specify the necessary dimensions of the representation, just not the mapping to the representation itself. This could happen, for example, if the designer has prior knowledge that the class of features the robot needs to express for its tasks has a well-studied representation. For instance, recent work defines a model to relate emotions expressed in natural language, such as `happy' or `sad', into the Valence-Arousal-Dominance spectrum inspired by social psychology~\cite{sripathy2022teaching}. The human can teach the representation efficiently with natural language by having the robot map their utterances to their emotive latent VAD equivalent. This way, all user feedback for this representation contributes to learning about all emotions, and the robot can model new emotions that interpolate those seen during training. Moving forward, we should consider leveraging existing methods that define transformations of natural human-comprehensible concepts, such as language or images, into robot-comprehensible representations for downstream task learning~\cite{shridhar2022cliport,radford2021learning}. \textbf{Designing the human-robot interface for learning.} In order to truly deploy collaborative robots in the world, we must eventually develop usable interactive interfaces that allow for effective information exchange of representations understood by both the human and robot. Existing work has highlighted the importance of the interface when a human and robot collectively share the same workspace, with key considerations being ease of use, specificity of communication, and reliability of feedback~\cite{wright2019agent,bansal2019updates}. Current methods suggest using visual displays, hand or face gestures, physical interaction and haptics, and verbal language can all be viable solutions towards effective human communication~\cite{berg2020review}. However, less work has been done in interfaces for how the robot can effectively communicate the representation of what it has learned with the human. For example, it would be desirable to have an interface by which the robot can effectively demonstrate or show the human what it \textit{thinks} is the correct desired task prior to actually deploying it in the real-world. This could be done in the form of mapping the proposed robot policy to simulated demonstrations or even natural language to communicate the intended behaviour. We propose that effective human-robot interaction which leads to learning human-guided representations will require the development of both streams of information flow in order to fully achieve its potential. \section{Identifying Misalignment} Along with learning transferable human-guided representations, it is also important to detect when misalignment exists in the first place. Misaligned representations may cause the robot to misinterpret the human's guidance for how to complete the task, execute unexpected or undesired behaviors, or degrade in overall performance~\cite{bobu2020quantifying}. Ergo, we wish for the robot to \textit{know when it does not know} the aspects that matter to the human \textit{before} it starts incorrectly learning how to perform the task. If misalignment is correctly detected, then a process which begins with expanding or re-learning the representation will better help ultimately learn the downstream task. The key question is: how can the robot autonomously identify representation misalignment and know when to ask for help? Several methods suggest an introspective approach where the robot can maintain uncertainty in its representation's ability to explain the human's input. By modeling humans as noisily rational agents choosing inputs in proportion to their exponentiated rewards~\cite{baker2007goal, jaynes1957infotheory, von1945theory}, Bayesian approaches can jointly infer both the reward parameter and a \textit{confidence} in whether the desired reward function can be captured by the current representation~\cite{fridovich-keil2019confidence,bobu2018learning,Losey2018IncludingUW, bobu2020quantifying,zurek2021situational}. When the human input refers to a reward that the robot's representation cannot support, the inferred confidence is low, signaling misalignment. Meanwhile, deep learning methods often study this uncertainty through an \textit{ensemble} of neural networks~\cite{Lakshminarayanan2017ensemble,Sun2021OnCE}. The intuition here is that if multiple (identically trained) networks disagree on their predictions, this suggests that the input is out of distribution and therefore the learned representation is misaligned. In both cases, once the robot detects misalignment there are a few options for how to proceed: discard the human input entirely, continue learning in proportion to its assessed confidence, or halt execution and ask the human to undergo the process of representation alignment from the previous section~\cite{bobu2020quantifying}. Assuming the robot identified misalignment correctly, any of these options are viable alternatives to re-learning from the original human feedback. Unfortunately, robustly detecting misalignment remains difficult in many real-world scenarios. We highlight three key areas where identifying misalignment is particularly challenging and offer brief suggestions for future work. \textbf{Disambiguating between misalignment and noise.} When a robot's representation cannot explain the human input, it may be difficult to disambiguate whether this is due to representation misalignment or human noise~\cite{bobu2020quantifying}. This issue often arises from inexperienced users and is inherent to the types of data designers must work with in human-robot interaction scenarios. A proposed, albeit expensive, method of addressing this challenge is to collect more data to balance out noise, but this solution would not fare well in online learning scenarios where the robot must detect misalignment in real time, from just a few observations. We suggest that a more sustainable alternative is to investigate better human modeling for separating out these two sources of error~\cite{ramakrishnan2021bayesian}. \textbf{Poor feature learning.} Misalignment can additionally occur due to two reasons: either the robot's representation does not fully capture an aspect that the human cares about or it does, but \textit{poorly}. The latter can occur if some of the features the robot learned were not learned well enough; for example, a feature might have required more data from the human in order to cover the state space and generalize to new areas. We propose that it is crucial for the robot to distinguish between misalignment due to an incomplete representation or due to incorrectly learned dimensions of the representation so that instead of attempting to re-learn a new feature, the robot knows to query for more data on the existing one. Future work is needed for understanding whether the robot needs to repair an existing learned feature, detecting which feature that might be, and developing interactive methods to elicit informative data to improve existing features. \textbf{Feature confusion.} An even more fundamental issue exists when the human's input refers to something not captured by the robot's learned representation, but the representation nonetheless can explain their input. In this case, we have confused misalignment for human noise ~\cite{Sun2021OnCE,bobu2020quantifying}. This problem will especially occur if the representation is highly expressive and can only be solved by intaking additional human input: each input might be explainable by some hypothesis, but eventually no hypothesis can explain all input. More work is needed to study how to query for a broad and diverse set of human input, how the robot would best demonstrate the features it has learned to the human, and how to best balance between querying for data vs. learning with existing data. \section{Learning the Downstream Task} Once we have learned a human-guided representation, it is easy to then apply that representation towards learning a downstream task by using standard policy ~\cite{ng1999policy,levine2020offline,finn2017maml,levine2010feature} or reward learning techniques~\cite{jain2015learning,bajcsy2017phri,christiano2017preferences,brown2019extrapolating,fu2018variational,HadfieldMenell2017InverseRD,shah2018state}. However, human-guided representations have important implications for how they impact the downstream learning pipeline. We subsequently discuss three considerations that future work should consider to fully close the learning loop. \textbf{Using the right features at the right time.} In this proposal, we have advocated for learning a human-guided representation that is sufficiently decoupled from any specific task the human may have provided feedback for and focuses instead on capturing causal aspects for the potential task distribution in the environment. When the robot specializes on a task, the representation by construction will contain features that are irrelevant for that task. If all feature dimensions in the representation were orthogonal to one another, this would not cause any issue. However, in the real world, many relevant features may be related and, thus, \textit{spurious correlation} between features could affect task learning~\cite{dehaan2019causal}. Future directions of work should enable the robot to \textit{focus on the right features at the right time}. One idea for accomplishing this is to employ feature selection strategies to activate the subset of the representation that matters for the specific task at hand. This strategy could be heuristic-based, like choosing the minimum set that maximizes coverage~\cite{sax2018midlevel}. Alternatively, since we would hope for our learned representations to be more human interpretable in nature, we could also consider building interfaces where the person themselves can quickly indicate to the robot which features are important for the specific task they want~\cite{cakmak2012questions}. \textbf{Using representations to better understand humans.} Human-guided representations also enable us to learn something about how the person generates the task input in the first place. In particular, the previously mentioned human decision-making models~\cite{baker2007goal,von1945theory,Luce1959choice} assumed that, out of a set of choices, the person selects their input in proportion to these choices' exponentiated rewards. However, we suggest that human-guided representations inform the robot how it should interpret the person's task input, thus we should \textit{reinterpret the available choices from the perspective of the learned representation}~\cite{bobu2020less}. We suggest future research must revisit how popular robot learning methods are affected by reinterpreting human input through the lens of their representation. \textbf{Grounding representations to real-world tasks.} Much of HRI has historically assumed that the robot already has access to all the aspects in the environment that the interacting human might care about. This assumption has enabled researchers to make progress on human-robot collaborative algorithms without needing to worry about how to formally ground the robot's behaviour to complex environments and tasks that we would see in the deployment scenarios. Human-guided representations can help bridge the gap towards learning from high-dimensional state spaces as we know the real-world to be, opening the door to HRI applications more challenging and tractable than ever before. \section{Conclusion} Ultimately, the true evaluators of any system deployed in the real world will be the humans that it interacts with, and thus soliciting input from them to effectively learn downstream tasks appears critical. Learning effective methods to learn from human input holds the promise of enabling more advanced, collaborative human-aligned robotic systems. In this paper, we proposed several methods for learning more generalizable intermediate representations from humans and suggested directions for moving towards a more continual and interactive learning framework. It is through understanding and utilizing this bi-directional communication flow that truly effective human-robot collaboration can exist.
\section{Introduction}\label{Sec1} The Standard Model (SM) of particle physics has two sources of $CP$ violation. The well established and measured source of $CP$-violation in the quark mixing sector, the Kobayashi-Maskawa phase~\cite{Kobayashi:1973fv}, is responsible for a multitude of $CP$ violating phenomena observed in the quark flavor-changing transitions. At the same time, this phase induces electric dipole moments (EDMs) of neutrons and heavy atoms well below current experimental limits. The other source of $CP$ violation, the non-perturbative parameter $\theta$ of quantum chromodynamics (QCD), is largely irrelevant for flavor physics, but tends to induce large EDMs. The non-observation of EDMs that imply the smallness of theta, $|\theta| \lesssim 10^{-10}$ \cite{Abel:2020pzs,Graner:2016ses}, contrasted with the naive expectation of $\theta \sim {\mathcal O}(1)$, poses a naturalness problem for the Standard Model, the strong $CP$ problem. There are two generic approaches to resolve the strong $CP$ problem. The first approach involves promoting the $\theta$ parameter to a new dynamical field, the QCD axion~\cite{Peccei:1977hh,Weinberg:1977ma, Wilczek:1977pj,Kim:1979if, Shifman:1979if, Dine:1981rt,Zhitnitsky:1980tq}, which symbolically can be represented as \begin{equation} \frac{\theta}{32\pi^2} G_{\mu\nu}^c {\widetilde G}^{c\mu\nu} ~\to~ \frac12(\partial_\mu a)^2+ \frac{a}{32\pi^2f_a} G_{\mu\nu}^c {\widetilde G}^{c\mu\nu}, \end{equation} where $G_{\mu\nu}^c$ is the gluon field strength, ${\widetilde G}^{c\mu\nu}\equiv \frac{1}{2}\varepsilon^{\mu\nu\rho\sigma}G_{\rho\sigma}^c$ with $c$ the adjoint index and $f_a$ is the decay constant of the axion field $a$. The QCD vacuum energy, which for small $\theta$ can be parametrically expressed as \begin{equation} \label{Evac} E(\theta)\propto \theta ^2 m_q \Lambda_{\rm QCD}^3 ~\to ~V(a)= \frac12m_a^2 a^2, \end{equation} can be made to dynamically relax to the minimum of the potential $V(a)$. In this expression, $\Lambda_{\rm QCD}$ is the non-perturbative scale of the strong interactions, and $m_q$ is the light quark mass. As a result, any initial value of $\theta = a/f_a$ will relax to the minimum of the axion potential. In the absence of additional sources of $CP$ violation, this minimum is exactly at $\theta =0$, as in Eq.(\ref{Evac}). Therefore, the neutron EDM that scales as \begin{equation} d_n \propto \frac{m_q\theta}{ \Lambda_{\rm QCD}^2}~, \end{equation} is also relaxed to zero. Consider now additional sources of $CP$ violation placed at some new physics scale $\Lambda_{\rm CP}$ that we will assume to be larger than the electroweak scale (for example, this could be due to supersymmetric theories with large $CP$-violating phases). Integrating out the new physics at this scale will, in general, result in a number of generic consequences: \begin{enumerate} \item The theta parameter may receive additive corrections to its value, $\theta \to \theta + \theta_{rad}$. Since $G\widetilde G$ is a dimension four operator, $\theta_{rad}$ can depend only on the ratio of scales, and therefore has $\Lambda_{\rm CP}^0$ scaling. Potentially, this can be a large correction, but the axion mechanism will remove the theta term together with $\theta_{rad}$. \item $CP$-violating new physics will generically induce higher-dimensional $CP$-odd operators, of which the most relevant are dimension six operators, ${\cal O}_6$ that are suppressed by the square of the new physics scale, and the resulting EDMs will have scaling $d_n({\cal O}_6) \propto \Lambda_{\rm QCD}/\Lambda_{\rm CP}^2$ (or $m_q/\Lambda_{\rm CP}^2$, depending on the chiral properties of ${\cal O}_6$). \item In the presence of higher-dimensional $CP$-odd new physics operators, the axion potential minimum shifts away from zero inducing a low-energy value of theta, $\theta_{\rm ind} \propto \Lambda_{\rm QCD}^2/\Lambda_{\rm CP}^2$. This leads to an additional $\theta$-induced contribution to $d_n$ that has, for example, a comparable $m_q/\Lambda_{\rm CP}^2$ scaling~\cite{Bigi:1990kz,Pospelov:2000bw,Pospelov:2005pr}. \end{enumerate} An important conclusion can be drawn from these observations: the QCD axion mechanism ensures that for sufficiently large $\Lambda_{\rm CP}$, the observable EDMs can be made small and indeed within current bounds for $\Lambda_{\rm CP} \gtrsim 100$\,TeV, one can allow for an arbitrarily large amount of (strong) $CP$ violation above these scales. In this sense, the axion mechanism allows for a proper decoupling of new physics contributions to EDMs. The second class of models do not introduce an axion, and instead appeal to symmetry arguments that help to argue why $\theta$ is zero or small. Historically, models with an exact $CP$ symmetry or exact parity that is spontaneously broken at some UV scale, have been argued to give a viable solution to the strong $CP$ problem (see Refs. \cite{Nelson:1983zb,Barr:1984qx,Babu:1988mw,Babu:1989rb,Mohapatra:1995xd,Kuchimanchi:1995rp,Holdom:1999ny,Hiller:2001qg} for a representative set of ideas). Models based on mirror symmetries have also been used to implement this approach~\cite{Berezhiani:2000gh, Hook:2014cda}. The most important feature of these models is the absence of a dynamical axion and the sensitivity of EDM observables to the value of $\theta$ generated at a UV scale. For example, the spontaneous breaking of $CP$ symmetry may also result in complex quark Yukawa couplings that feed into $\theta_{rad}$ (a representative set of calculations can be found in Refs.~\cite{Ellis:1978hq,Khriplovich:1985jr,Pospelov:1996be,Frampton:1996vxg,deVries:2021pzl}). Since the $\theta$ term has $\Lambda_{\rm CP}^0$ scaling, this non-decoupling means that all possible sources of $CP$ breaking have to be ``controlled" to very high scales. Recently, there has been renewed interest in models that solve the strong $CP$ problem which occupy an intermediate niche between the QCD axion solution and solutions based on discrete symmetries. In this class of models there is still a dynamical axion field and Peccei-Quinn symmetry at a high scale, but the axion mass is now enhanced compared to (\ref{Evac}) by additional dynamical mechanisms at the small-instanton scale $\Lambda_{\rm SI}$. By small instantons we refer to instantons whose size $1/\Lambda_{\rm SI}$ is smaller than the inverse electroweak scale. For example, extending the strong gauge interactions and the corresponding axion to a larger group where the non-QCD partners confine at a much larger scale $\Lambda'_{\rm QCD}$ (identified with $\Lambda_{\rm SI}$) can lead to a significant parametric increase in the axion mass provided $\Lambda'_{\rm QCD} \gg \Lambda_{\rm QCD}$ \cite{Dimopoulos:1979pp,Rubakov:1997vp,Fukuda:2015ana, Gherghetta:2016fhp,Gherghetta:2020ofz}. Similarly, an axion ``portal" between QCD and a mirror QCD with the alignment of $\theta$ and $\theta'$ can also result in a heavier axion for $\Lambda'_{\rm QCD} \gg \Lambda_{\rm QCD}$ \cite{Hook:2014cda,Hook:2019qoh}. Alternatively, if the QCD coupling running is modified to become strong above the TeV scale, the QCD axion mass would receive new contributions from ``small"-size instantons~\cite{Holdom:1982ex, Holdom:1985vx, Flynn:1987rs, Agrawal:2017ksf, Csaki:2019vte}. This naturally occurs in models where at some UV scale, QCD propagates in five dimensions~\cite{Gherghetta:2020keg,Gherghetta:2021jnn}. These models which significantly enhance the axion mass compared to the minimal QCD axion models have a distinctively different phenomenology. Indeed, given the conventional axion mass range $10^{-6}-10^{-3}$ eV, the enhancement mechanisms imply heavy axions could be in the 100 MeV range or above. These heavier axions avoid most of the astrophysical bounds, and makes the axion amenable to searches at beam dump and collider experiments \cite{Agrawal:2017ksf,Hook:2019qoh}. Moreover, such heavy axions will be less susceptible to possible distortions of the axion potential by the imperfections of the Peccei-Quinn global symmetry. Besides the enhanced axion mass it is therefore also interesting to consider whether EDM observables could be enhanced in these models. In this paper we investigate heavy axion models in the presence of additional sources of $CP$-violation, which are parametrized as higher-dimensional operators that arise from SM fields. The central question we would like to address is whether there is a similar decoupling as for the standard QCD axion, where all observables from, for example, dimension six operators, scale as $\Lambda_{\rm QCD}^2/\Lambda_{\rm CP}^2$, or if there is an enhancement of $CP$ violation mediated by the induced $\theta$ which is similar to models attempting to solve the strong $CP$ problem using exact parity or $CP$ symmetries. To answer this question we compute the topological susceptibility and mixed correlators in heavy axion models that arise from two sources of $CP$ violation: the dimension-six Weinberg gluonic operator and a $CP$-odd four-fermion operator. Such $CP$-odd operators induce a linear term in $\theta$ (or equivalently $a$) in the axion potential leading to a shift $\theta_{\rm ind}$ in the potential minimum. While our computation employs a simple, non-interacting instanton (or anti-instanton) background that ignores strong coupling effects, we are able to extract qualitative results which show that the induced theta, $\theta_{\rm ind} \propto \Lambda_{\rm SI}^2/\Lambda_{\rm CP}^2$. This induced shift is qualitatively different from the usual QCD axion scenario and solutions based on exact discrete symmetries due to the presence of the new scale $\Lambda_{\rm SI}$. While there is still decoupling in the $\Lambda_{\rm CP} \to \infty$ limit, our results show that the induced $\theta$ can enhance the magnitude of observable EDMs, even to the point that if $\Lambda_{\rm SI}^2/\Lambda_{\rm CP}^2$ is too large, the strong $CP$ problem will re-appear. Thus, models with a dynamically enhanced axion mass are subject to bounds depending on the amount of $CP$ violation that is present at energy scales that may significantly exceed 100 TeV. Interestingly, the enhanced EDMs are potentially observable in future EDM experiments. \begin{figure} \centering { \begin{tikzpicture}[scale=0.6] \shade[top color=black!20,bottom color=black!60] (3,3.5) rectangle (-5,2); \draw [ very thick](-5,2) -- (3,2);\node at (4,2){${M}_{P}$}; \draw (-5,0.5) -- (3,0.5);\node at (4,0.5){${\Lambda}_{CP}$ }; \draw [dashed](-5,-1) -- (3,-1); \node at (4,-1){$f_a$}; \draw (-5,-2.5) -- (3,-2.5); \node at (4,-2.5){${\Lambda}_{\rm SI}$}; \draw (-5,-4) -- (3,-4); \node at (4,-4){$v$ }; \draw [very thick](-5,-5.5) -- (3,-5.5); \node at (4,-5.5){$\quad{\Lambda}_{\rm QCD}$}; \shade[top color=black!40,bottom color=black!10] (3,-5.5) rectangle (-5,-6.5) ; \end{tikzpicture}} \caption{Schematic diagram of the different scales referred to in the text. The scale of $CP$-violation, $\Lambda_{\rm CP}$ due to dimension six operators is a UV scale near the Planck scale, $M_P$, and $\Lambda_{\rm SI} $ is the small-instanton scale (assumed to be above the electroweak scale, $v$ and QCD strong coupling scale, ${\Lambda}_{\rm QCD}$) where new dynamics enhances the axion mass. The PQ symmetry breaking scale $f_a$ is assumed to be an independent parameter that can either be above (as shown in the figure) or below the scale $\Lambda_{\rm SI}$. } \end{figure} This paper is organized as follows: in Section 2 we investigate vacuum correlators in an instanton (or anti-instanton) background with different sources of $CP$ violation that shift the axion potential minimum. In section 3, we consider different heavy QCD axion models with small instantons, deriving the resulting size of the induced $\theta$ and subsequent constraints on the $CP$-violating scale, $\Lambda_{\rm CP}$. We reach our conclusions in Section 4. \section{Instanton Correlation Functions} \label{sec:InstCF} We begin with briefly reviewing QCD dynamics and the instanton solution that will be used to compute various instanton correlation functions. The pure Yang-Mills part of the QCD Lagrangian is given by \begin{equation}\label{eq:QCD_Lag} {\cal L}_{\rm QCD} = -\frac{1}{4 g^2} G_{\mu\nu}^a G^{a\mu\nu} + \frac{\theta}{32\pi^2} G_{\mu\nu}^a {\widetilde G}^{a\mu\nu}~, \end{equation} where $g$ is the QCD gauge coupling, $\theta$ is the QCD vacuum angle and $a=1,\dots, 8$ labels the gauge adjoint representation. The BPST instanton solution~\cite{Belavin:1975fg} is given by \begin{equation} A_\mu^{a}(x) = \frac{2\eta_{\mu\nu}^a(x-x_0)_\nu}{(x-x_0)^2+\rho^2}~, \label{eq:4Dinstanton} \end{equation} where the instanton is located at $x_0$ and has a size $\rho$. The $\eta^a_{\mu\nu}$ denote the group-theoretic 't Hooft $\eta$-symbols~\cite{tHooft:1976snw}. The topological charge is defined to be \begin{equation} Q=\frac{1}{32\pi^2} \int d^4 x\, G_{\mu\nu}^a {\widetilde G}^{a\mu\nu}~, \end{equation} where $Q=1$ for the one instanton solution \eqref{eq:4Dinstanton}. We will next compute correlation functions in the instanton (or anti-instanton) background \eqref{eq:4Dinstanton} that will be useful in obtaining contributions to EDM observables such as the neutron EDM. \subsection{Topological susceptibility} The vacuum-to-vacuum amplitude in QCD can be written as: \begin{equation}\label{eq:qcd_vac_amp} \left\langle 0| 0 \right\rangle =\sum_Q\int {\cal D} A^{(Q)}_\mu~ e^{-S_E}~, \end{equation} where the Euclidean action for \eqref{eq:QCD_Lag} in an instanton background of charge $Q$ \cite{Jackiw1977ConformalConfigurations} is given by \begin{equation}\label{eq:QinstantonEuclidean} S_{E} = \frac{8\pi^2}{g^2}|Q| +iQ\theta~. \end{equation} The topological susceptibility is then introduced as \cite{Witten:1979vv, Shifman:1979if, Bigi:1990kz} \begin{equation} \chi(0)=-i\, \lim_{k\rightarrow 0} \int d^4x \, e^{ikx} \left\langle 0 \left|T\left\{\frac{1}{32\pi^2} G{\widetilde G}(x), \frac{1}{32\pi^2} G{\widetilde G}(0)\right\}\right|0\right\rangle~, \label{eq:topsusc} \end{equation} where $G{\widetilde G}$ is shorthand notation for $G_{\mu\nu}^a{\widetilde G}^{a\mu\nu}$. Since the amplitude in the $|Q|>1$ instanton background becomes more exponentially suppressed, only the $Q=\pm 1$ configurations dominate the path integral. Henceforth, we refer to $S_E$ in \eqref{eq:QinstantonEuclidean} only for $|Q|=1$. In the instanton background \eqref{eq:4Dinstanton} we then obtain the two-point correlator \begin{eqnarray} && \left\langle 0\left| T\left\{G{\widetilde G}(x), G{\widetilde G}(0)\right\}\right| 0 \right\rangle_{ Q =+ 1} \nonumber \\ &=& \int {\cal D} A_\mu~ G{\widetilde G}(x) G{\widetilde G}(0)~e^{-\frac{8\pi^2}{g^2_0}}~, \label{eq:instantonint0}\\ &=&\int d^4 x_0\, \frac{d\rho}{\rho^5}\, C[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-\frac{8\pi^2}{g^2(1/\rho)}} \frac{192 \rho^4}{((x-x_0)^2+\rho^2)^4} \frac{192 \rho^4}{(x_0^2+\rho^2)^4}~, \label{eq:instantonint} \end{eqnarray} where the running coupling $g(1/\rho)$ encodes corrections from the quantum fluctuations. In \eqref{eq:instantonint0} we have replaced the path integral over the fluctuation $A_\mu$ with an integration in \eqref{eq:instantonint} over the collective coordinates (see Ref.~\cite{tHooft:1976snw}) where, assuming an $SU(N)$ gauge group,\footnote{In principle, we should also include the normalized Haar measure of the group, as computed in \cite{Cordes:1985um, Csaki:2019vte}. We will omit this measure since its value is simply one for \eqref{eq:instantonint} (or an ${\cal O}(1)$ number in more generic cases), and therefore our qualitative results remain unchanged.} the coefficient \begin{equation} C[N] = \frac{C_1\,e^{-C_2 N}}{(N-1)!(N-2)!} ~, \label{eq:Cdef} \end{equation} and $C_1,C_2$ are order one constants ($C_1=0.466, C_2=1.679$ using Pauli-Villars regularization~\cite{Vainshtein:1981wh}). The gauge coupling running is given by \begin{equation} \frac{8\pi^2}{g^2(1/\rho)}= \frac{8\pi^2}{g_0^2}- b_0 \log(M_{UV} \rho)~, \label{eq:gaugecoupling} \end{equation} where $b_0=4N-N/3=11N/3$ is the pure $SU(N)$ Yang-Mills $\beta$-function coefficient and $g_0=g(M_{UV})$ with UV cutoff $M_{UV}$. In principle, we could consider an ensemble of instantons and anti-instantons~\cite{Callan:1977gz,Diakonov:1983hh,Shuryak:1988rf} to compute correlation functions. However, the qualitative aspects of such an ensemble can be simply captured by one instanton and one anti-instanton~\cite{Diakonov:1985eg, Diakonov:1995qy}, where the (anti-)instantons are assumed to be non-interacting with each other. Thus, we will compute correlation functions by adding the contribution from an instanton background to that in an anti-instanton background. The total contribution to the topological susceptibility, obtained by performing the $x$ integration first that arises from \eqref{eq:topsusc}, followed by the $x_0$ integration in \eqref{eq:instantonint}, is then given by \begin{equation} \label{eq:topsuscint} \chi(0)= -2i\int \frac{d\rho}{\rho^5} C[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-\frac{8\pi^2}{g^2(1/\rho)}}~. \end{equation} Assuming an asymptotically free theory, the integral in \eqref{eq:topsuscint} is divergent for large instantons but can be evaluated with a IR cutoff $\rho_{IR}$ on the instanton size. Assuming $N=3$ with $\rho_{IR}=1/\Lambda_{\rm QCD}$ we obtain $\chi(0) \propto \Lambda_{\rm QCD}^4$. \subsubsection{Fermion contributions} The introduction of fermions modifies the path integral and the collective coordinate integration. In the massless fermion limit, the pure vacuum-to-vacuum transition amplitude is zero. Instead, the instanton now causes transitions from left-handed to right-handed fermions violating the $U(1)$ chiral symmetry so that, for example, $\langle 0| \bar\psi_{Ri} \psi_{Li}|0\rangle \neq 0$. Thus, instantons only contribute to correlation functions in which each fermion flavor and chirality appears at least once. The effect of massless fermions is usually formulated as an ``effective" Lagrangian~\cite{tHooft:1976snw, Vainshtein:1981wh} \begin{equation} {\cal L}_f = \int d^4 x_0\, \frac{d\rho}{\rho^5}\, C[N] e^{0.292 N_f}\left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-\frac{8\pi^2}{g^2(1/\rho)}-i\theta} \rho^{3N_f} {\rm det} \left[\bar\psi_{R}(x_0) \psi_{L}(x_0)\right] + h.c.~, \label{eq:fermioneffL} \end{equation} where the determinant is taken over the $N_f$ fermion flavors, and $\psi_{L,R}^\alpha(x_0)$ are the fermion zero modes. The constant $e^{0.292 N_f}$ assumes Pauli-Villars regularization and the gauge coupling running \eqref{eq:gaugecoupling} now includes the fermion contributions $b_0 \rightarrow b_0-2/3 N_f$. Note that because of the explicit appearance of the fermion zero modes $\psi_{L,R}(x_0)$ in \eqref{eq:fermioneffL}, there is only a contribution to the axion potential if the external fermion zero mode legs are closed. There are two ways this can occur. The first way is to assume that the fermions have an explicit mass $m_f$ (corresponding to a nonzero Higgs vacuum expectation value (VEV), $v\approx 246$~GeV) that connects left and right-handed fermion fields. The determinant in the effective action then gives a contribution $\propto (\rho\, m_f)^{N_f}$ for $N_f$ fermion flavors. This is the case for the usual contributions from ``large" instantons with $\rho\sim \rho_{IR}=1/\Lambda_{\rm QCD}$ and $m_f \lesssim \Lambda_{\rm QCD}$. However, since we are interested in ``small" instantons corresponding to instanton sizes ($\sim 1/\Lambda_{\rm SI}$) much smaller than the inverse of the electroweak scale, a second possibility is to close the external fermion zero-mode legs in \eqref{eq:fermioneffL} with $N_f/2$ Higgs bosons. This contribution will be proportional to the product of Yukawa couplings (times a loop factor) and is larger than the Higgs VEV contribution that now scales as $\sim \left({m_f}/{\Lambda_{\rm SI}}\right)^{N_f}$ (assuming $\Lambda_{\rm SI}\gg v$). Instead of proceeding with the 't Hooft determinant operator in the effective Lagrangian \eqref{eq:fermioneffL} we will follow the approach taken in Ref.~\cite{Flynn:1987rs, Csaki:2019vte} and directly compute the vacuum-to-vacuum amplitude by including the Higgs-fermion Yukawa interaction in the path integral. Consider a Higgs field $H$ which couples to $N_f$ flavors of massless fermions with the following Euclidean action \begin{equation} S_H=S_H^{(0)} -i \int d^4 x \sum_{i=1}^{N_f} \frac{y_i}{\sqrt{2}} H(x) \bar\psi_i(x) \psi_i(x)~, \end{equation} where $S_H^{(0)}$ is the quadratic (free) part of the Higgs action and $y_i$ are the Yukawa couplings. The Yukawa couplings, or equivalently the fermion masses, have been redefined to be real with their phase included in $\bar\theta=\theta+\text{Arg~Det}M_q$, where $M_q$ is the quark mass matrix. The vacuum-to-vacuum amplitude now takes the form \begin{eqnarray} \langle 0|0\rangle_{\Delta Q=1} &=& \int d^4 x_0\, \frac{d\rho}{\rho^5}\, C[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-S_E}\nonumber\\ &&\qquad\times \int {\cal D H}\,e^{-S_H^{(0)}}\,{\cal D \psi}{\cal D \bar\psi}\, e^{~-S_\psi^{(0)}+i \int d^4 x \sum_{i=1}^{N_f} \frac{y_i}{\sqrt{2}} H(x) \bar\psi_i(x) \psi_i(x)}\nonumber\\ &=& \int d^4 x_0\, \frac{d\rho}{\rho^5}\, C[N] e^{0.292 N_f}\left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-S_E} (N_f-1)!! \left(\prod_{i=1}^{N_f}\frac{y_i \rho}{\sqrt{2}}\right) ~{\cal I}^{N_f/2} \label{eq:vacampF} \end{eqnarray} where the action $S_E$ is defined in \eqref{eq:QinstantonEuclidean} with $\theta\rightarrow\Bar{\theta}$. The first line in \eqref{eq:vacampF} shows the collective coordinate integration arising from the gauge field part of the path integral and the second line contains the Higgs and massless fermion contributions to the path integral with $S_\psi^{(0)}$ the quadratic (free) part of the fermion action. Integrating over the fermionic fields introduces the factor $e^{0.292 N_f}$ and the running gauge coupling now contains fermionic contributions via $b_0\rightarrow b_0 - 2/3 N_f$. Finally, the path integral over the Higgs field gives a nonzero contribution to the amplitude provided all Higgs fields are contracted where $(N_f-1)!!$ is the number of Higgs contractions and the quantity ${\cal I}$ is given by \cite{Flynn:1987rs,Csaki:2019vte} \begin{eqnarray} {\cal I} &=&-\int d^4 x_1 \int d^4 x_2\, \bar\psi_i^{(0)}(x_1)\psi_i^{(0)}(x_1)\bar\psi_j^{(0)}(x_2)\psi_j^{(0)}(x_2)\Delta_H(x_1-x_2)~,\nonumber\\ &=& \frac{\rho^4}{4\pi^8} \int d^4 x_1 \int d^4 x_2\, \int d^4 k\,\frac{1}{k^2+m_H^2}\, \frac{e^{-i k(x_1-x_0)}}{((x_1-x_0)^2+\rho^2)^3}\frac{e^{i k(x_2-x_0)}}{((x_2-x_0)^2+\rho^2)^3}~,\nonumber\\ &\approx&\begin{cases} \frac{1}{12\pi^2\rho^2}\qquad m_H\rho \ll 1~,\\ \frac{1}{5\pi^2m_H^2\rho^4}\qquad m_H\rho \gg 1~. \end{cases} \label{eq:Iintegral} \end{eqnarray} In the second line of \eqref{eq:Iintegral} we have substituted for the scalar Feynman propagator $\Delta_H(x_1-x_2)$ and the fermions have been replaced with their respective zero mode expressions given in \cite{Vainshtein:1981wh}. Note that for an instanton background we have two zero modes $\bar{\psi}_{i,L}^{(0)},{\psi}_{j,R}^{(0)}$ (and $\bar{\psi}_{i,R}^{(0)}, {\psi}_{j,L}^{(0)}$ in an anti-instanton background) where the subscripts $L,~R$, which are suppressed hereon, denote left- and right- handed fields, respectively. Thus, combining \eqref{eq:Iintegral} and \eqref{eq:vacampF} gives the final expression (assuming $m_H \rho \ll 1$) \begin{equation}\label{eq:fermionCont} \langle 0|0\rangle_{\Delta Q=1} = \int d^4 x_0\, \frac{d\rho}{\rho^5}\, C_f[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-S_E} ~, \end{equation} with $S_E$ defined in \eqref{eq:QinstantonEuclidean} (assuming $\theta\rightarrow \bar\theta$), and \begin{equation} C_f[N]\equiv (N_f-1)!! \left(\frac{2}{3}\right)^{N_f/2} \left(\prod_{i=1}^{N_f} \frac{y_i}{4\pi} \right) e^{0.292 N_f} C[N]~. \label{eq:Cfdef} \end{equation} The expression \eqref{eq:fermionCont} shows how the instanton density in the vacuum-to-vacuum amplitude is modified in the presence of massless fermions and a Higgs-fermion Yukawa interaction. As expected, the amplitude vanishes if any Yukawa coupling is zero. Thus, the topological susceptibility \eqref{eq:topsuscint} in the presence of massless fermions is obtained by the substitutions $C[N]\rightarrow C_f[N]$, $\theta\rightarrow \bar\theta$ and $b_0\rightarrow b_0-2/3 N_f$. In the case of ``large" instantons associated with the scale $1/\Lambda_{\rm QCD}$, the expression for the vacuum-to-vacuum amplitude differs from \eqref{eq:fermionCont}. As already mentioned, each light fermion ($m_f\lesssim \Lambda_{\rm QCD}$) introduces a $e^{0.292 }\rho\, m_f$ factor \footnote{In QCD, $\chi(0)\propto m_f$, whereas the $\chi(0)$ resulting from \eqref{eq:QCD:integral} $\propto m_f^{N_L}$. The difference can be understood in terms of instanton-(anti-)instanton interactions- either via mixing between the fermion zero modes of the instanton with those of the anti-instanton~\cite{Diakonov:1984vw}, or using 't Hooft vertices with fermion legs joined between an instanton and anti-instanton~\cite{Diakonov:1983hh}.}. This can be seen via the first line in \eqref{eq:Iintegral} where $\Delta_H$ can be replaced by $v^2$, which just gives ${\cal I}=v^2$, and hence: \begin{equation}\label{eq:QCD:integral} \langle 0|0\rangle_{\Delta Q=1} = \int d^4 x_0\, \frac{d\rho}{\rho^5}\left(\prod_{i=1}^{N_L} \rho\, m_i \right)\,e^{0.292 N_L} C[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-S_E} ~, \end{equation} where the product runs only over $N_L$ light fermions and $m_i=y_i\,v/\sqrt{2}$. \subsection{Weinberg gluonic operator} \label{sec:WeinOp} The Weinberg operator is a purely gluonic, $CP$ odd, dimension six term given by ${\cal O}_W=GG{\widetilde G}$~\cite{Weinberg:1989dx} that leads to the Lagrangian term \begin{equation} {\cal L} \supset \frac{1}{\Lambda_W^2}GG{\widetilde G}~, \label{eq:WLag} \end{equation} where $\Lambda_W$ is an effective UV scale. The operator \eqref{eq:WLag} can induce a shift in the axion potential minimum, which can be computed by considering the mixed correlator~\cite{Pospelov:2005pr, Weiss:2021kpt} \begin{equation} \label{eq:Wsusc} \chi_{W}(0)=-i\, \lim_{k\rightarrow 0} \int d^4x \, e^{ikx} \left\langle 0\left| T\left\{\frac{1}{32\pi^2}G{\widetilde G}(x), \frac{1}{\Lambda_W^2} GG{\widetilde G}(0)\right\}\right|0 \right\rangle~. \end{equation} In the instanton background \eqref{eq:4Dinstanton} we obtain \begin{equation} {\cal O}_W= f_{abc} G_{\mu\kappa}^a G_{\kappa\nu}^b{\widetilde G}^{c\nu\mu}(x) = -\frac{1536 \rho^6}{((x-x_0)^2+\rho^2)^6}~, \label{eq:instWeinberg} \end{equation} where $f_{abc}$ are the structure constants. Note that for an $SU(N)$ gauge group, the $SU(2)$ instanton solution is embedded in the top left corner of the $N\times N$ matrix of $SU(N)$ generators. Thus, the sum in \eqref{eq:instWeinberg} only gives nonzero contributions for $a,b,c=1,2,3$. Furthermore, \begin{eqnarray} && \left\langle 0\left| T\left\{G{\widetilde G}(x), GG{\widetilde G}(0)\right\}\right|0\right\rangle_{ Q=+1} \nonumber \\ &=& \int {\cal D} A_\mu~ G{\widetilde G}(x) GG{\widetilde G}(0)~e^{-\frac{8\pi^2}{g^2_0}}~,\nonumber\\ &=&\int d^4 x_0\, \frac{d\rho}{\rho^5}\, C[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-\frac{8\pi^2}{g^2(1/\rho)}} \frac{192 \rho^4}{((x-x_0)^2+\rho^2)^4} \frac{-1536 \rho^6}{(x_0^2+\rho^2)^6}~. \label{eq:Wcorrelator} \end{eqnarray} Again performing the integrals first over $x$ and then $x_0$ gives \begin{equation} \chi_{W}(0)=2i\frac{384\pi^2}{5\Lambda_W^2}\int \frac{d\rho}{\rho^7} C[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-\frac{8\pi^2}{g^2(1/\rho)}}~, \label{eq:Wmixed} \end{equation} where we have also included the anti-instanton contribution. In the presence of fermions, $\chi_{W}(0)$ is obtained by making the substitutions $C[N]\rightarrow C_f[N]$ for small instantons (or by introducing the factor $(\rho\,m_f)^{N_L}$, as in \eqref{eq:QCD:integral} for large instantons), $\theta\rightarrow \bar\theta$ and $b_0\rightarrow b_0-2/3 N_f$ in the running gauge coupling $g(1/\rho)$. \subsection{Four-fermion operators } Another class of dimension six operators which can affect the axion solution are the four-fermion operators. Such operators are suppressed by an effective mass scale $\Lambda_F$ and given by \begin{equation}\label{Fermi_operator} \mathcal{L}\supset\sum_{ijkl}\frac{\lambda_{ijkl}}{\Lambda^2_F}\Bar{\psi}_i\psi_j\Bar{\psi}_k\psi_l~, \end{equation} where $\lambda_{ijkl}$ are complex coefficients with flavor indices $i,j,k,l$. Note that the spinor and electroweak structure has been suppressed in \eqref{Fermi_operator}, although it is straightforward to incorporate these details. Of particular interest is the spinor structure of \eqref{Fermi_operator} resulting in $CP$ violation. These are operators of the type ${\cal O}_{F,ijkl}=\Bar{\psi}_ii\gamma_5\psi_j\Bar{\psi}_k\psi_l$ which are anti-Hermitian with the corresponding $\lambda_{ijkl}$ purely imaginary. The $CP$-violating effect arising from \eqref{Fermi_operator} can be obtained by including the four-fermion interactions in the path integral \eqref{eq:vacampF}. These operators allow for new ways to close the fermion legs in the 't Hooft vertex, as depicted in Figure~\ref{fig:4fermioncpv}. The largest contribution arises from just one insertion of ${\cal O}_F$, as shown in Figure \ref{fig:4fermioncpv}(a), while more insertions of the four-fermion operator, such as in Figure \ref{fig:4fermioncpv}(b) are suppressed by powers of $\Lambda_F$. Similar to the definition \eqref{eq:Wsusc} for $ \chi_W(0)$ we can define a fermion mixed correlator \begin{equation} \chi_{F,ijkl}(0)=-i\, \lim_{k\rightarrow 0} \int d^4x \, e^{ikx} \left\langle 0\left| T\left\{\frac{1}{32\pi^2}G{\widetilde G}(x), \frac{\lambda_{ijkl}}{\Lambda^2_F}{\cal O}_{F,ijkl}(0)\right\}\right|0 \right\rangle~. \label{eq:4FermiSuscDef} \end{equation} \begin{figure}[h!] \centering \centering \subfigure[] {% \begin{tikzpicture}[scale=0.450] \begin{feynhand} \setlength{\feynhandblobsize}{8mm} \vertex (h1) at (-1.2941/1.4,4.82963/1.4); \vertex (h2) at (-4.82963/1.4,1.2941/1.4); \vertex (h3) at (-3.53553/1.4,-3.53553/1.4); \vertex (h4) at (1.2941/1.4,-4.82963/1.4); \vertex [dot] (f4) at (4.95722/1.4,0.652631/1.4) {}; \vertex (v1) at (1.29904/2,.75/2); \vertex (v2) at (.75/2,1.29904/2); \vertex (v3) at (0,1.5/2); \vertex (v4) at (-0.75/2,1.29904/2); \vertex (v5) at (-1.29904/2,0.75/2); \vertex (v6) at (-1.5/2,0); \vertex (v7) at (-1.29904/2,-0.75/2); \vertex (v8) at (-0.75/2,-1.29904/2); \vertex (v9) at (0,-1.5/2); \vertex (v10) at (.75/2,-1.29904/2); \vertex (v11) at (1.29904/2,-.75/2); \vertex (v12) at (1.5/2,0); \propag[fer] (h1) to [quarter left, edge label'=$t$](v3); \propag[fer] (v4) to [quarter left](h1); \propag[fer] (h2) to [quarter left, edge label'=$b$](v5); \propag[fer] (v6) to [quarter left](h2); \propag[fer] (h3) to [quarter left, edge label'=$s$](v7); \propag[fer] (v8) to [quarter left](h3); \propag[fer] (h4) to [quarter left, edge label'=$c$](v9); \propag[fer] (v10) to [quarter left](h4); \propag[fer] (v1) to [quarter left](f4); \propag[fer] (v11) to [half right, looseness=1.4](f4); \propag[fer] (f4) to [half right, looseness=1.4](v2); \node at (6/2.3,1.3) {$u$}; \node at (6/2.3,-0.65) {$d$}; \propag[fer] (f4) to [quarter left](v12); \propag[sca](h1) to [quarter right, looseness=1.1, edge label'=$H$](h2); \propag[sca](h3) to [quarter right, looseness=1.1, edge label'=$H$](h4); \vertex[grayblob] (tv) at (0,0) {}; \node at (0,0) {{I}}; \node at (6/1.3,0.65/1.4) {$\mathcal{O}_F$}; \end{feynhand} \end{tikzpicture} } \hspace{12mm} \subfigure[] {% \begin{tikzpicture}[scale=0.450] \begin{feynhand} \setlength{\feynhandblobsize}{8mm} \vertex [dot](f1) at (-3.04381/1.4,3.96677/1.4){} ; \vertex [dot] (f2) at (-1.91342/1.4,-4.6194/1.4) {}; \vertex [dot] (f4) at (4.95722/1.4,0.652631/1.4) {}; \node at (6/1.3,0.65/1.3) {$\mathcal{O}_F$}; \node at (-3.4/1.2,4.5/1.3) {$\mathcal{O}_F$}; \node at (-2/1.2,-5.2/1.3) {$\mathcal{O}_F$}; \vertex (v1) at (1.29904/2,.75/2); \vertex (v2) at (.75/2,1.29904/2); \vertex (v3) at (0,1.5/2); \vertex (v4) at (-0.75/2,1.29904/2); \vertex (v5) at (-1.29904/2,0.75/2); \vertex (v6) at (-1.5/2,0); \vertex (v7) at (-1.29904/2,-0.75/2); \vertex (v8) at (-0.75/2,-1.29904/2); \vertex (v9) at (0,-1.5/2); \vertex (v10) at (.75/2,-1.29904/2); \vertex (v11) at (1.29904/2,-.75/2); \vertex (v12) at (1.5/2,0); \node at (6/2.3,1.3) {$u$}; \node at (-0.9,2.73) {$t$}; \node at (-0.1,-3) {$c$}; \node at (6/2.3,-0.65) {$d$}; \node at (-2.45,01.45) {$b$}; \node at (-1.9,-2.2) {$s$}; \propag[fer] (v5) to [quarter left](f1); \propag[fer] (v3) to [half right, looseness=1.4](f1); \propag[fer] (f1) to [half right, looseness=1.4](v6); \propag[fer] (f1) to [quarter left](v4); \propag[fer] (v9) to [quarter left](f2); \propag[fer] (v7) to [half right, looseness=1.4](f2); \propag[fer] (f2) to [half right, looseness=1.4](v10); \propag[fer] (f2) to [quarter left](v8); \propag[fer] (v1) to [quarter left](f4); \propag[fer] (v11) to [half right, looseness=1.4](f4); \propag[fer] (f4) to [half right, looseness=1.4](v2); \propag[fer] (f4) to [quarter left](v12); \vertex[grayblob] (tv) at (0,0) {}; \node at (0,0) {{I}}; \end{feynhand}\label{fig:cpv2} \end{tikzpicture} }\caption{The t'Hooft vertex that includes the insertion of four-fermion operators. Fermion legs are closed with one four-fermion operator ${\cal O}_{F}$ and two Higgs-fermion Yukawa interactions in (a) and three four-fermion operators ${\cal O}_F$ in (b).} \label{fig:4fermioncpv} \end{figure} The only operators contributing to the fermion path integral are those with two pairs of flavor indices ($i=j\neq k=l$ or $i=l\neq k=j$), i.e. ${\cal O}_{F,iijj},~\text{and}~{\cal O}_{F,ijji}$, both of which are hereon generically referred to as ${\cal O}_{F,ij}$ with the corresponding coupling constant $\lambda_{ij}\equiv \lambda_{iijj}$ (or $\lambda_{ijij})$. The explicit expression for such a generic operator $\mathcal{O}_{F,ij}$ can be computed as: \begin{eqnarray} \chi_{F,ij}(0)&=&-2i\,\int d^4 x_0\, \frac{d\rho}{\rho^5}\, C[N]e^{0.292 N_f}\left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} e^{-\frac{8\pi^2}{g^2(1/\rho)}} \nonumber \\ &&\times~\frac{2\lambda_{ij}}{y_iy_j}(N_f-3)!! \left(\prod_{k=1}^{N_f}\frac{y_k \rho }{\sqrt{2}}\right) ~{\cal I}^{N_f/2-1}\frac{1}{\Lambda^2_F}\Bar{\psi}_i^{(0)}i\gamma_5\psi_i^{(0)}\Bar{\psi}_j^{(0)}\psi_j^{(0)}(0)\frac{1}{32\pi^2} \int d^4x\, G{\widetilde G}(x) ~, \nonumber \\ &=&2i~\frac{2(-i\lambda_{ij})}{y_iy_j}\int \frac{d\rho}{\rho^5}\,\frac{C_f[N]}{N_f-1} \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N}\frac{12}{5\rho^2\Lambda_F^2}~e^{-\frac{8\pi^2}{g^2(1/\rho)}}~,\label{eq:4FermiIntegral} \end{eqnarray} where we have also included the effect of the anti-instanton. The part of ${\cal O}_{F,ij}$ contributing to the path integral in the instanton background is $ i{\psi}^{\dagger}_{L,i}\psi_{R,i}{\psi}^{\dagger}_{L,j}\psi_{R,j} $, while in the anti-instanton background (where $G{\widetilde G}\rightarrow -G{\widetilde G}$) it is $-i{\psi}^{\dagger}_{R,i}\psi_{L,i}{\psi}^{\dagger}_{R,j}\psi_{L,j} $. These two contributions add up\footnote{Instead, for $CP$ even operators of the type $\Bar{\psi}_i\psi_i\Bar{\psi}_j\psi_j$ there is a cancellation between the two contributions since $ {\psi}^{\dagger}_{L,i}\psi_{R,i}{\psi}^{\dagger}_{L,j}\psi_{R,j} $ and ${\psi}^{\dagger}_{R,i}\psi_{L,i}{\psi}^{\dagger}_{R,j}\psi_{L,j} $ both appear with the same sign.} to give the factor of $2i$ in \eqref{eq:4FermiIntegral}. The result \eqref{eq:4FermiIntegral} can also be understood in terms of the results \eqref{eq:vacampF} and \eqref{eq:Iintegral} from the fermionic path integral, up to the overall ratio of couplings. If we assume that ${\cal O}_F$ is generated by a heavy scalar of mass $\Lambda_F$, interacting with Standard Model quarks via Yukawa interactions, \eqref{eq:Iintegral} implies a factor of $12\pi^2\rho^2/5\pi^2\Lambda_F^2\rho^4 = 12/5\rho^2 \Lambda_F^2$ relative to the expression \eqref{eq:fermionCont}, which matches the factor inside the integral. The factor $1/({N_f-1})$ arises from having a fewer number of contractions-$({N_f-3})!!$ compared to \eqref{eq:vacampF}, assuming only one insertion of the operator ${\cal O}_{F,ij}.$ Furthermore, notice that $y_i$ and $y_j$ have been explicitly factored out of \eqref{eq:4FermiIntegral} to write the result in terms of $C_f[N]$ defined in \eqref{eq:Cfdef}. For $-i\lambda_{ij}\sim 1$, this shows that the effect of the four-fermion operator, being $\propto 1/y_iy_j$, is most enhanced for the up and down quarks compared to that from the Weinberg gluonic operator or the second and third generation quarks. However, the four-fermion operator coefficient $\lambda_{ij}$ can be chirally suppressed by Yukawa couplings~\cite{Kitano:2021fdl}. For example, such four-fermion operators with a chiral suppression can arise from the overlap of fermion profiles in extra dimension models~\cite{Bonnefoy:2020llz}. Thus, we will henceforth assume that $-i\lambda_{ij} \propto y_i y_j$ so that the effect of the four-fermion operator is similar to that of the Weinberg gluonic operator as well as the contributions from the other generations of quarks. Assuming $-i\lambda_{ij}=y_iy_j/2$, we then have $N_f(N_f-1)$ contributions of the fermion susceptibility \eqref{eq:4FermiIntegral} for both types of operators ${\cal O}_{F,iijj},~\text{and}~{\cal O}_{F,ijji}$, each. Thus, for $N_f=6$ we obtain \begin{equation} \chi_{F}(0)\equiv 2 N_f(N_f-1)\chi_{F,ij}(0) =2i \frac{144}{5\Lambda_F^2}\int \frac{d\rho}{\rho^7}\,C_f[N] \left( \frac{8\pi^2}{g^2(1/\rho)}\right)^{2N} ~e^{-\frac{8\pi^2}{g^2(1/\rho)}}~.\label{eq:FermiSusc6} \end{equation} Using \eqref{eq:FermiSusc6} we will place limits on a generic scale $\Lambda_F$ that represents all these fermion effects. Finally, note that in supersymmetric theories the operator ${\cal O}_F$ can arise from a dimension-four term in the superpotential~\cite{Pospelov:2005ks}. After integrating out the scalar superpartners this leads to a four-fermion term with \begin{equation} \frac{1}{\Lambda_F^2} \sim \frac{g^2}{16\pi^2}\frac{1}{\Lambda_{\rm UV} m_{\rm SUSY}}~, \end{equation} where $\Lambda_{\rm UV}$ is the UV scale of the superpotential term and $m_{\rm SUSY}$ is the supersymmetry-breaking scale of the scalar superpartners. The bounds on $\Lambda_F$ can thus be interpreted as bounds on the scalar superpartner masses. \section{Induced $\theta$} Using the results in Section~\ref{sec:InstCF} we can now obtain an estimate for the shift in the axion potential minimum due to $CP$ odd operators. In the presence of the Weinberg operator the axion potential is modified by a linear term in the axion field \begin{equation}\label{axion_pot_F} V(a) = {\chi_{W}(0)} \left(\frac{a}{f_a}\right) +\frac{1}{2} \chi{(0)} \left(\frac{a}{f_a} \right)^2~, \end{equation} where we have promoted the theta angle to the axion field, $\bar{\theta}\rightarrow a/f_a$. This leads to a shift in the potential minimum by an amount \begin{equation} \left \langle \frac{a}{f_a}\right\rangle\equiv \theta_{\rm ind} = -\frac{\chi_{W}(0)}{\chi{(0)}}~. \label{eq:indth} \end{equation} In the case of four-fermion operators the linear potential term again causes a shift in the potential minimum given by \eqref{eq:indth}, with $\chi_{W}(0)$ replaced by $\chi_{F}(0)$. The induced $\theta$ then directly contributes to EDM observables such as the neutron EDM where \begin{equation} d_n~ \propto~ \frac{m_q}{ \Lambda_{\rm QCD}^2} |{\theta}_{\rm ind}|~=~ \frac{m_q}{ \Lambda_{\rm QCD}^2}\frac{\chi_{W,F}(0)}{\chi{(0)}}~. \label{dn} \end{equation} The experimental limit arising from the neutron EDM gives the constraint \begin{equation} |\theta_{\rm ind}| \lesssim 10^{-10}~, \label{eq:indthlimit} \end{equation} which can now be used to obtain constraints on various heavy axion scenarios\footnote{For simplicity, we will present limits that arise from the individual operators ${\cal O}_W$ and ${\cal O}_F$ separately. Our results can be straightforwardly generalized by summing the contributions in \eqref{eq:indth} if both operators are present.}. \subsection{QCD} We first consider the effect of dimension six operators in QCD with $N_L$ light fermions (i.e. $m_f\lesssim \Lambda_{\rm QCD}$). The induced $\theta$ \eqref{eq:indth} that arises from including the Weinberg operator is given by \begin{equation}\theta_{\rm ind}^{\rm QCD}\approx \xi_W\frac{b_0-4+N_L}{b_0-6+N_L} \frac{\Lambda_{\rm QCD}^2}{\Lambda_{W}^2}~, \label{eq:QCDindth} \end{equation} where $\xi_W=384\pi^2/5$, $b_0$ is the $\beta$-function coefficient and the $CP$- violation scale $\Lambda_{\rm CP}$ is identified with $\Lambda_{W}$. Note that in \eqref{eq:QCDindth} the product of all light quark masses cancel and the induced $\theta$ becomes small (or decouples) as $\Lambda_{W}\rightarrow \infty$. Imposing the constraint \eqref{eq:indthlimit} for QCD ($b_0^{\rm QCD}=9$, $N_L=3$ and $\Lambda_{\rm QCD}\approx 300 ~$MeV), gives the limit $\Lambda_W\gtrsim 10^6$~GeV on the effective scale of the Weinberg operator. For the case of the $CP$- odd four-fermion operator, the 't Hooft vertex now has two fewer factors of $\rho\, m_f$ compared to the topological susceptibility resulting from \eqref{eq:QCD:integral}. This gives a bound similar to $\Lambda_W$ when there is no chirality suppression in the four-fermion operator, otherwise the $\Lambda_F$ bound is much weaker. A calculation for $\theta_{\rm ind}$ using the chiral anomaly can be found in \cite{An:2009zh}, which agrees with our estimate of the bound on $\Lambda_F$ within an order of magnitude. As such, current constraints on the neutron EDM correspond to new $CP$-violating physics at $\sim 10^6$~GeV. Thus, future neutron EDM experiments can probe new $CP$ violating sources at scales ranging from $\sim 10^6 - 10^9$~GeV, beyond which the SM contribution due to the CKM phase becomes comparable in size. \subsection{4D Small Instantons}\label{4DInst} \subsubsection{Product gauge group} A heavy axion can be generated by extending the QCD gauge group into a product gauge group $SU(3)^k=SU(3)_1\times SU(3)_2\times\dots \times SU(3)_k$ which is spontaneously broken at a scale $\Lambda_{\rm SI}$~\cite{Agrawal:2017ksf,Csaki:2019vte}. Small instantons at the scale $\Lambda_{\rm SI}$ associated with the product gauge groups lead to this enhancement. The SM quarks are assumed to be charged under only $SU(3)_1$. In addition, there are $k$ axions, labelled by $i$, which couple to the $k$ SU(3) $G\widetilde G$ terms with decay constants $f_{a_i}$, eliminating the $k$ theta terms. At the scale $\Lambda_{\rm SI}$ the QCD gauge coupling, $\alpha$ is matched to the $SU(3)_k$ gauge couplings, $\alpha_i$ via the relation \begin{equation} \frac{1}{\alpha(\Lambda_{\rm SI})}=\sum_{i=1}^k \frac{1}{\alpha_i(\Lambda_{\rm SI})}~. \end{equation} This relation implies that each individual coupling $\alpha_i$ must be larger than the QCD coupling at the scale $\Lambda_{\rm SI}$. Therefore, the larger couplings $\alpha_i(\Lambda_{\rm SI})$ can make the small instanton effects dominate over the usual QCD large instantons. This effect is most dominant in the limit $k\gg 1$, where the axion masses scale as $m_{a_1} \sim \sqrt{\Pi_f y_f} {\Lambda^2_{\rm SI}}/f_{a_1}$ (with $y_f$ the quark Yukawa couplings) and $m_{a_i} \sim {\Lambda^2_{\rm SI}}/f_{a_i}$ for $i=2\dots, k$, showing that the lightest axion mass ($m_{a_1}$) can remain much heavier that the QCD axion mass for $\Lambda_{\rm SI}\gg \Lambda_{\rm QCD}$. For concreteness, let us consider the case with small $k$, where there is some perturbative control and the instanton (or anti-instanton) background still gives us qualitatively accurate results. Assuming the product gauge group is broken by scalars with a VEV, $v_\phi $, the effective cutoff for the instanton size then becomes $2\pi v_\phi$, in contrast to the naive expectation, $\Lambda_{\rm SI}$~\cite{Csaki:2019vte}. The constraint \eqref{eq:indthlimit} can then be used to obtain limits on the scales associated with the sources of $CP$ violation from the Weinberg and four-fermion operators. Since the QCD instanton contribution to $\chi_{W,F}(0)$ is suppressed by at least ${\Lambda_{\rm QCD}^2}/{\Lambda_{W,F}^2}$, the small instanton contribution from the UV gauge group dominates and results in \begin{equation} \theta_{\rm ind}\approx \xi_{W,F}\frac{2}{b_{0,i}-6} \frac{(2\pi v_\phi)^2}{\Lambda_{W,F}^2}\approx \xi_{W,F}\frac{8\pi^2}{b_{0,i}-6} \frac{\Lambda_{\rm SI}^2}{\Lambda_{W,F}^2}~, \label{eq:SIindth_product} \end{equation} where $\xi_F=24 N_f/5$, $\xi_W$ is defined under \eqref{eq:QCDindth} and we have assumed $\Lambda_{\rm SI} \approx v_\phi$ in the second expression in \eqref{eq:SIindth_product}. The constraint \eqref{eq:indthlimit} then implies $\Lambda_{\rm SI}/\Lambda_{W}\lesssim 10^{-8}$ and $\Lambda_{\rm SI}/\Lambda_{F}\lesssim 10^{-7}$ or $\Lambda_{\rm SI}\lesssim 10^{10}(10^{11})$~GeV for $\Lambda_{W} (\Lambda_F)=M_P$ where $M_P=2.4\times 10^{18}$~GeV is the (reduced) Planck mass\footnote{The difference in these two bounds results from the size of the different prefactors $\xi_{W,F}$, where $\xi_W$ results from the large number of color contractions in \eqref{eq:Wsusc}, while $\xi_F$ arises from the smaller flavor multiplicity of the four-fermion operator \eqref{Fermi_operator}.}, $b_{0,1}=13/2$ and $b_{0,k}=21/2$. For $i=2,\dots, k-1$, the same expression \eqref{eq:SIindth_product} holds with $b_{0,i}=10$, and $v_\phi\rightarrow \sqrt{2} v_\phi$, which does not change the bounds significantly\footnote{It is possible that the axion mass could instead be dominated by QCD large instantons. But in this case the $CP$ violation arising from small instantons of the product gauge group gives the much weaker constraint that $\Lambda_{\rm SI}/\Lambda_{W}\lesssim 10^{-8}\times m_{a, \rm QCD}/m_{a_1}$. For instance, assuming $m_{a,\rm QCD}/m_{a_1}=10^3$ implies that $\Lambda_{\rm SI}\lesssim 10^{13}$~GeV for $\Lambda_W=M_P$.}. Note that if UV couplings are included in \eqref{eq:WLag} then the effective scale $\Lambda_W$ can be larger than $M_P$. Assuming $f_a>\Lambda_{\rm SI}$, the limits on $\Lambda_{W,F}$ correspond to a maximum possible axion mass enhancement of $\sim 10^7$ for $k=3$ relative to the QCD axion~\cite{Agrawal:2017ksf,Csaki:2019vte}. As such, axion masses $m_a\gtrsim 100$~MeV with $f_a\lesssim 10^7$~GeV~\cite{Cadamuro:2011fd, Jaeckel:2015jla} can be explored in future experimental searches. However, when $f_a<\Lambda_{\rm SI}$, we need to UV complete the dimension five axion-$G\widetilde G$ coupling and explain the PQ breaking. This can be done in a minimal KSVZ-type scenario~\cite{Shifman:1979if, Kim:1979if}, by introducing a single heavy Dirac fermion $\Psi$, with mass $m_\Psi$, charged under the $U(1)_{PQ}$ symmetry, which changes the instanton measure by a factor of $e^{0.292}\rho\, m_\Psi$. Combining this with the contribution arising from the running of the gauge coupling between $m_\Psi$ and $\Lambda_{\rm SI}$, the topological susceptibility (or any similar correlator) is modified to \begin{equation} \chi(0)\rightarrow \chi(0)\, \frac{b_0-4}{b_0-11/3} \left(\frac{m_\Psi}{\Lambda_{\rm SI}}\right)^{-2/3}\,e^{0.292}\left(\frac{m_\Psi}{\Lambda_{\rm SI}}\right)\approx\chi(0)\left(\frac{f_a}{\Lambda_{\rm SI}}\right)^{1/3}~, \label{eq:topsussuppress} \end{equation} where the Yukawa coupling between $\Psi$ and the PQ scalar is assumed to be order one, i.e. $m_\Psi\approx f_a$. Since $m_a^2\propto \chi(0)$ this suppresses the axion mass enhancement by an amount $( f_a/\Lambda_{\rm SI})^{1/6}$~\cite{CGK}. Thus for the experimentally interesting region of $m_a\gtrsim 100$~MeV and $f_a\lesssim 10^7$~GeV, the axion mass enhancement is reduced by up to a factor of 10 when $f_a<\Lambda_{\rm SI}$. A similar result is also obtained for an enlarged color group~\cite{Holdom:1982ex, Holdom:1985vx,Gherghetta:2016fhp} where $\Lambda_{\rm SI}$ is identified with the scale where the enlarged symmetry group is broken and the appropriate $b_0$ is used. In all these cases, there is again a non-decoupling effect that depends on the ratio $\Lambda_{\rm SI}/\Lambda_{W,F}$. \subsubsection{Mirror QCD} A heavy axion can also be obtained by assuming that there exists a $\mathbb{ Z}_2$ mirror copy of QCD that becomes strong at a scale $\Lambda^\prime_{\rm QCD}(\equiv\Lambda_{\rm SI}) \gg \Lambda_{\rm QCD}$~\cite{Rubakov:1997vp,Berezhiani:2000gh,Hook:2014cda,Fukuda:2015ana,Hook:2019qoh}. The axion is $\mathbb{Z}_2$ neutral and couples to both QCD and mirror QCD, via the interaction \begin{align} \frac{1}{32\pi^2}\frac{a}{f_a}\varepsilon^{\mu\nu \rho \sigma}\left(G^c_{\mu\nu} G_{\rho \sigma }^c + G_{\mu\nu}^{\prime c} G_{\rho \sigma }^{\prime c}\right), \end{align} where $G'_{\mu\nu}$ is the mirror QCD field strength. The axion now receives contributions from the mirror QCD instantons (which are small relative to those from QCD). The mirror QCD expression for the induced $\theta$ due to the Weinberg operator can be obtained by substituting $\Lambda_{\rm SI}$ in \eqref{eq:QCDindth}. This leads to the bounds $\Lambda_{\rm SI}/\Lambda_W \lesssim 10^{-7}$ or $\Lambda_{\rm SI} \lesssim 10^{11}$~GeV for $\Lambda_W = M_P$, assuming the mirror Higgs VEV, $v' \gg \Lambda_{\rm SI}$ such that QCD$^{\prime}$ is a pure Yang-Mills theory at $\Lambda_{\rm SI}$ with $b_0^{\rm QCD'}=11$. These bounds for the Weinberg operator do not change appreciably if this assumption is relaxed. The induced $\theta$ from the four-fermion operator can be obtained by considering $N_L\geq 2$ light flavors in QCD$^\prime$. Applying the QCD result \eqref{eq:QCD:integral} for QCD$^\prime$ then gives \begin{equation} \theta_{\rm ind, F}\approx \frac{2 N_L(N_L-1)}{5\pi^2}\frac{b_0-4+N_L}{b_0-8+N_L} \frac{\Lambda_{\rm SI}^4}{v'^2\,\Lambda_{F}^2}\approx \frac{2 N_L(N_L-1)}{5\pi^2}\frac{b_0-4+N_L}{b_0-8+N_L} \frac{\Lambda_{\rm SI}^2}{\Lambda_{F}^2}~, \label{eq:QCDFindth} \end{equation} where we have taken $v'\approx\Lambda_{\rm SI}$ in the last expression in \eqref{eq:QCDFindth}. Assuming $b_0=9$ and $N_L=3$, implies $\Lambda_{\rm SI}/\Lambda_F \lesssim 10^{-5}$, or $\Lambda_{\rm SI} \lesssim 10^{13}$~GeV for $\Lambda_{F} = M_P$. Again, the difference in the $\Lambda_{W,F}$ bounds arises from the different color and flavor multiplicity factors. \subsection{5D Small Instantons}\label{5DInst} Another way for the QCD coupling to become large at a UV scale and increase the effect of small instantons is to consider a 5D model where QCD gluons propagate in a 5th dimension of size $R$. The axion can be identified with a UV boundary localized field that couples to QCD via a coupling proportional to $1/f_a$, with $f_a$ an independent parameter of the theory. Above the scale $1/R$ the QCD coupling increases in strength until the coupling becomes strong at the cutoff scale $\Lambda_5$ which is defined by the relation~\cite{Gherghetta:2020keg} \begin{equation} \Lambda_5 R=\frac{6\pi\epsilon}{\alpha(1/R)}~, \end{equation} where $\alpha=g^2/(4\pi)$ and $\epsilon\leq 1$ is a perturbativity parameter\footnote{Note that in the 5D model, small instantons can be made to dominate when perturbativity still holds. This implies that our instanton (or anti-instanton) approximation used for the correlators will give more accurate quantitative results relative to QCD.}. The small instanton scale can be identified as $\Lambda_{\rm SI}\equiv \Lambda_5$. The 4D effective action is approximately given by~\cite{Gherghetta:2020keg} \begin{equation} S_{\rm eff}\approx \frac{2\pi}{\alpha_s(1/R)}-\frac{R}{\rho}+b_0\ln\frac{R}{\rho}~, \label{eff_action} \end{equation} where the power-law term $R/\rho$ arises from summing over the 5D Kaluza-Klein gluons. Thus, small instantons of size $1/\Lambda_{\rm SI}\lesssim \rho \lesssim R$ can now reduce the effective action and contribute greatly to the path integral. \begin{figure}[h!] \centering \includegraphics[width=0.8\textwidth]{Figures/Lambda_WF.pdf} \caption{Lower limit on the effective scale of the dimension-six Weinberg (four-fermion) operator, depicted in purple (orange) as a function of the extra dimension scale $1/R$, assuming $\epsilon=0.30$. The Planck scale is shown as a dotted line for reference. The dashed lines represent the limit from the approximation \eqref{eq:approx5Dtheta}. The deviation from \eqref{eq:approx5Dtheta} arises since for small $1/R$, large QCD instantons begin to dominate the instanton integral $\chi(0)$.} \label{fig:6limit} \end{figure} Using an approximate expression for the integrals in \eqref{eq:topsuscint} and \eqref{eq:Wmixed} with the effective action \eqref{eff_action}, the induced $\theta$ from 5D small instantons is \begin{equation} \theta_{\rm ind}\approx \xi_{W,F}\frac{\Lambda_{\rm SI}^2}{\Lambda_{W,F}^2}~, \label{eq:approx5Dtheta} \end{equation} where $\xi_{W}$ and $\xi_F$ are defined under \eqref{eq:QCDindth} and \eqref{eq:SIindth_product}, respectively. The induced $\theta$ no longer necessarily decouples in the limit $\Lambda_{\rm SI},\Lambda_{W,F}\rightarrow \infty$. Imposing the constraint \eqref{eq:indthlimit} leads to the limit $\Lambda_{\rm SI}/\Lambda_{W}(\Lambda_{F}) \lesssim 10^{-7}(10^{-6})$. For $\Lambda_{W}(\Lambda_{F}) = M_P$ this implies an upper bound $\Lambda_{\rm SI} \lesssim 10^{11}(10^{12})$~GeV on the 5D strong coupling scale. The limit on $\Lambda_{W,F}$ from an exact numerical evaluation of $\theta_{\rm ind}$ is shown in Figure~\ref{fig:6limit}. We see that the limit on $\Lambda_{W,F}$ deviates from \eqref{eq:approx5Dtheta} for small $1/R$ (and hence small $\Lambda_5$). The limits on the ratio $\Lambda_{\rm SI}/\Lambda_{W,F}$ imply that for the case when $\Lambda_{W,F}\sim \Lambda_5(=\Lambda_{\rm SI})$, the dimension six terms would need to be generated in the UV completion of the 5D model with an additional suppression in the otherwise order-one coefficients. The corresponding range of axion mass enhancement is depicted in Figure~\ref{fig:axion5Dmass}. Note that both effects of small instantons - the enhancement of the axion mass and the shift in the axion potential minimum due to $CP$ violating operators - are dominant only for large $1/R$, since eventually large (QCD) instantons dominate the susceptibility at small values of $1/R$. \begin{figure*}[h!] \centering \includegraphics[width=0.8\textwidth]{Figures/mass_ratio_.pdf} \caption{The ratio of the enhanced axion mass to the QCD axion mass as a function of the extra dimension scale, $1/R$. The dotted contour lines assume $f_a>\Lambda_{\rm SI}$ and depict the ratio for different values of the perturbitivity parameter $\epsilon$, up to the maximum possible enhancement in the red shaded region. The dashed contours assume $f_a=10^6$~GeV and include the suppression \eqref{eq:topsussuppress} when $f_a< \Lambda_{\rm SI}$. The blue shaded region to the right shows the excluded $1/R$ range due to the Weinberg gluonic operator.} \label{fig:axion5Dmass} \end{figure*} Furthermore, when $f_a< \Lambda_{\rm SI}$ the axion mass enhancement is reduced by the factor $(f_a/\Lambda_{\rm SI})^{1/6}$ as obtained from \eqref{eq:topsussuppress}. This means that in the experimentally viable region of $ m_a \gtrsim 100$~MeV and $f_a\lesssim 10^7$~GeV~\cite{Cadamuro:2011fd, Jaeckel:2015jla}, the axion mass enhancement is reduced by up to an order of magnitude, as can be seen in Figure \ref{fig:axion5Dmass}, where we have taken $f_a=10^6$~GeV as a representative value. \subsection{Enhanced EDMs} Compared to QCD, the small instanton contributions provide an enhancement to the EDMs due to $CP$ violating sources. In particular, using \eqref{eq:SIindth_product}, \eqref{eq:QCDFindth} and \eqref{eq:approx5Dtheta} we see that the neutron EDM \eqref{dn} is enhanced by a factor of $\Lambda_{\rm SI}^2/\Lambda_{\rm QCD}^2$ compared to the $\theta$ induced from new $CP$- odd sources in QCD (see \eqref{eq:QCDindth}). Therefore, measuring the neutron EDM can be interpreted as a probe of the small instanton scale, $\Lambda_{\rm SI}$. For example, if $\Lambda_{W,F} = M_P$, this corresponds to modified strong dynamics at scales of order $\Lambda_{\rm SI}\sim 10^{8}-10^{11}$~GeV, where the lower limit represents a neutron EDM value equivalent to the Standard Model CKM contribution. Furthermore, if the $CP$ violating sources appear at scales lower than the Planck scale, then any new contribution due to small instantons will appear at even lower scales $10^4\text{~GeV}\lesssim\Lambda_{\rm SI}\lesssim 10^8$~GeV, where the model-dependent lower limit corresponds to the scale of axion mass enhancement. Finally note that when $f_a\lesssim \Lambda_{\rm SI}$, the UV completion of the dimension five axion-gluon coupling does not affect the predictions for the induced $\theta$. Since the neutron EDM \eqref{dn} depends only on the ratio of the mixed correlators with the topological susceptibility, the suppression factor in \eqref{eq:topsussuppress} cancels, leaving the results for the induced $\theta$ unchanged. \section{Conclusion} The QCD axion solution provides an elegant mechanism for solving the strong $CP$ problem in such a way that an arbitrarily large amount of $CP$ violation at UV scales, $\Lambda_{\rm CP}$ can be sufficiently decoupled as $\Lambda_{\rm CP}\rightarrow \infty$. This is in contrast with solutions to the strong $CP$ problem that invoke exact discrete symmetries. For these solutions there is a non-decoupling of the additional sources of $CP$ violation, which means that arbitrarily large amounts of $CP$ violation cannot be tolerated at UV scales in models with exact parity or $CP$ symmetry. Heavy axion models represent a qualitatively different class of solution to the strong $CP$ problem in which new dynamics at some UV scale, $\Lambda_{\rm SI}$ magnifies the effect of small instantons (which are normally exponentially suppressed), giving rise to a new contribution and enhancement of the axion mass. This has led to renewed interest in axion searches outside the usual QCD axion mass window. However, in the presence of additional sources of $CP$- violation, the enhanced effect of small instantons could also lead to enhanced EDM observables such as the neutron EDM as well as possible non-decoupling effects. We have estimated these effects by calculating the topological susceptibility and mixed correlators in the presence of two $CP$-violating dimension-six operators: the Weinberg gluonic operator and a $CP$-odd four-fermion operator. The calculation is performed using an instanton (or anti-instanton) background where Standard Model fermion chiral zero modes in the t'Hooft vertex are closed with the Higgs boson. Identifying the scale of the additional sources of $CP$ violation with $\Lambda_{\rm CP}$ we find that the axion potential minimum shifts by an amount $\theta_{\rm ind}\propto \Lambda^2_{\rm SI}/\Lambda^2_{\rm CP}$ in several heavy axion models, where $\Lambda_{\rm SI}$ is the scale where small instanton effects dominate. This result reveals that unlike the minimal QCD axion models, the amount of decoupling is limited, although not as restrictive as models with exact discrete symmetries. Imposing the neutron EDM derived limit $|{\bar\theta}|\lesssim 10^{-10}$, we obtain the constraint $\Lambda_{\rm SI}/\Lambda_{\rm CP}\lesssim 10^{-8}$, which is stronger than the naive estimate of $10^{-5}$ due to sizeable prefactors that depend on the particular heavy axion model. In particular, for a benchmark value of $\Lambda_{\rm CP}\simeq M_P$ requires $\Lambda_{\rm SI}\lesssim 10^{10}$ GeV (as can be seen in Figure~\ref{fig:axion5Dmass} for the 5D small instanton model). The modification of the decoupling behaviour is a direct consequence of the new dynamical scale $\Lambda_{\rm SI}$. Our results therefore imply that EDM observables such as the neutron EDM can be enhanced in heavy axion models up to the current experimental limit $d_n\lesssim 10^{-26}$~e$\cdot$cm. This compares with the SM CKM prediction ($\sim 10^{-32}-10^{-31}$~e$\cdot$cm). Thus, besides axion searches, EDM observables provide another probe of UV scales in heavy axion models associated with new dynamics, assuming that this class of models plays any role in solving the strong $CP$ problem. \section*{Acknowledgments} T.G. thanks Raymond Co and Keisuke Harigaya for useful discussions. This work is supported in part by the Department of Energy under Grant DE-SC0011842 at the University of Minnesota. T.G. is also supported by the Simons Foundation. \bibliographystyle{JHEP}
\section{Introduction} \label{section:intro} Artificial neural networks (ANNs) have shown to be able to solve a wide array of challenging tasks \cite{schmidhuber2015deep}, including in the field of reinforcement learning and the development of artificial agents \cite{arulkumaran2017brief}. Consider for illustration a standard feedforward network (FFN). By tuning an often large amount of parameters, such a network can be made to approximate any function \cite{hornik1991approximation}. However, once the parameters have been optimized, they are tied to the specific structure that they were optimized in. This rigidity does most often not allow for adding elements to the input after training without having to optimize an entirely new neural network from scratch. The fact that the parameters of an optimized ANN are strictly tied to their specific indices in the network architecture, also means that they are dependent on the elements of the external inputs always being presented in the same ordering. There are several downsides to this inflexibility. First, we might not always know beforehand the number of inputs that are ideal for our model. Ideally we would be able to add a new sensor and the model would during deployment figure out how to integrate that information. However, most neural architectures do not easily allow this, and we would be forced to start all over, if we wanted to incorporate the new input. Additionally, there might be cases where we cannot guarantee that inputs to our model will always arrive in the same ordering as during the optimization phase. When parameters are tied to the indices of the ANN, any permutation of the input elements might be catastrophic. Recently, multiple methods have been proposed to mitigate the inflexibility of ANNs and make them invariant to permutations of inputs \cite{tang2021sensory, kirsch2021introducing}. In these studies, it was also found that the properties of invariance to permutations and changes in size of the input vector was accompanied by extra robustness of the models to unseen perturbations after training. This paper aims to contribute to this trend of making the neural architectures of artificial agents more flexible. We do so by proposing a conceptually simple model that after optimization can output coherent actions for a performing agent, even when the inputs to the model are continually shuffled in short intervals. Throughout, we emphasize the minimal requirements that an ANN must follow in order to be invariant to both changes in size and to permutations. For the latter, no parameter in the network can be optimized in relation to any specific index in the input vector. In order to be able to take in inputs with varying lengths after optimization, the input must somehow be aggregated to a representation, the size of which does not increase with the number of inputs. An example of such an aggregation is simply to take the average of a range of numbers; regardless of how many numbers there are in the range, their average will always be represented by a single number. With these requirements in mind, we can choose the simplest solutions to each of them, in order to keep our model as minimal as possible. Thus, the model and its variations presented below do not include a Transformer layer like in the model of Tang and Ha \cite{tang2021sensory}. Indeed, in one ablation study, we show that it is possible to evolve a network that is invariant to permutations of its input vector and to changes in the input size, even when all elements of the network are simple feedforward networks. Kirsch et al. \cite{kirsch2021introducing} aims at meta-learning a black-box reinforcement learning algorithm with a shallow network structure that has invariance properties for both inputs and outputs. In terms of the model structure, our model is similar to that of Kirsch et al., but adding an integrator unit (explained further in Section \ref{section:approach}) gives us the flexibility to choose to focus only on invariance properties for the input. This makes our model comparably easy to optimize. However, we also show how our model can easily be extended to also have invariance properties for the output. \section{Related Work} \label{section:related} Transformer-based models have properties that allow them to take sequences of different lengths as input \cite{vaswani2017attention}. Further, in language tasks where Transformers in recent years have been used to great effect \cite{devlin2018bert, brown2020language}, explicit steps must be taken in order to avoid invariance to permutation of the inputs. This is because it is most often useful to be able to interpret words differently depending on where in a sentence they occur. The use of Transformers in RL-tasks is less frequent (but see \cite{chen2021decision,gupta2022metamorph}). Recently, however, Tang and Ha \cite{tang2021sensory} presented a model to control artificial agents that utilized the properties of Transformers to gain invariance properties for the input. The fact that their Transformer-based model comply with both conditions for permutation and size invariance, can be seen by considering that the key, query, and value transformations use shared parameters for all instances in the input. Then, by fixing the size of one of the transformation matrices ($Q$ in their model), as opposed to letting it depend on the input, the attention matrix is always reduced to a representation of the same size, regardless of the number of elements in the input. Together, this means that parameters in the rest of the network can be optimized in relation to indices in the aggregated representation without being related to any specific indices in the input vector. This highlights relatedness of the problems of size and permutation invariance. By meeting the condition for size invariance by aggregation of the inputs, the problem of input permutation invariance is contained in the part of the network prior to the aggregation. The rest of the network can thus be structured as any normal network. However, attention-based aggregation is not the only type that meets the conditions; as we show below, a simpler aggregation by averaging can also be used. Plastic neural networks \cite{soltoggio2018born, coleman2012evolving} is an other class of models that under the right circumstances can be permutation invariant as well as size invariant. Although this field can be related to Transformers and Fast Weight Programmers \cite{schlag2021linear}, plastic networks are usually framed quite differently, with a stronger emphasis on biological inspiration. Plastic networks are also more often used for RL-tasks \cite{soltoggio2018born}. A neural network can be considered to be plastic if some function updates the connection strengths of the network during the network's lifetime \cite{mouret2014artificial}. Not all plastic networks have the properties that we are interested in here. Interestingly, plastic neural networks, where a single plasticity mechanism governs all connections in randomly initialized networks, automatically meet conditions to be invariant to permutations in the input, as well as to changes in size. This observation might give a clue as to how biological neural networks achieve their high level of architectural flexibility. Biological brains learn complicated tasks as a whole \cite{caligiore2019super}, but vary in the number of neurons over a lifetime \cite{breedlove2013biological}. Of course, the brain is governed by a plethora of different plasticity mechanisms \cite{abbott2000synaptic, dan2004spike, dayan2012twenty}, not just a single one, but not all parts of a brain might necessarily need to be invariant in relation to all other parts. Further, the conditions could also be met if there instead of a single plasticity mechanism is a meta-function that organizes local plasticity mechanisms, just as the plasticity mechanisms in turn organize the individual connection strengths. An early example of a plastic neural network governed by a single learning rule is that of Chalmers \cite{chalmers1991evolution} that evolves a learning rule to update randomly initialized weights of a shallow neural network. A more recent approach that also falls into this category is presented by Yaman et al. \cite{yaman2021evolving}. In this work, the authors evolve a single discrete Hebbian rule to change the synapses of a randomly initialized network to solve a simple foraging task. They also test their rule's ability to control networks with more hidden neurons. More closely related to our method, is the work of Bertens and Lee \cite{bertens2020network}. They evolve a set of recurrent neural network cells and use them as basic units to form a network between them. In this approach, the synapses and neurons of the overall network are thus recurrent units, and the plastic parameters are the hidden states of the recurrent units. Since all synaptic recurrent units share parameters, and all neural recurrent units share parameters, the network is effectively governed by one overall, homogeneous non-linear platicity mechanism. The network is shown to be permutation invariant, and this type of network was shown to be able to solve a simple t-maze task with non-stationary rewards. Closely related to the approach of Bertens and Lee \cite{bertens2020network} is the work of Kirsch et al. \cite{kirsch2021introducing}. They evolve a shallow network structure where all connections consist of recurrent neural networks with shared parameters. Like Bertens and Lee, the goal of the approach of Kirsch et al. is to evolve a network with learning capabilities, and they showcase the abilities of their network to exhibit some level of learning in tasks unseen during training. As we extend our model to have invariance properties in the output vector as well as the input in Section ~\ref{subsubsection:output}, we show that we can have an intermediate integrator unit, between input and output units, and is therefore not bound to a shallow network structure like Kirsch et al. \cite{kirsch2021introducing}. Common to all methods mentioned in this section is that no parameters are optimized in relation to any specific index in the network. Further, new elements can be added to the network architecture after optimization. This is possible as such added elements will be adapted by the same plasticity mechanism as all other elements in the network. \begin{figure} \includegraphics[scale=0.105]{overview1.png} \caption{Model Overview: \normalfont At each time step,the external input is presented to the network (1). Each element of the input vector is send into a separate recurrent neural network (RNN) cell that we call \emph{input units} (2). The RNNs in (2) all share the same parameters in their gates. This means that none of the parameters are evolved to be specific to a single element in the external input. The output vectors of the RNNs in (2) are then summed onto a single vector (3). This vector is then passed on to a single RNN (4). The output of this RNN is used to update the hidden states of the RNNs in (2). The same output is also propagated through a dense layer (6) that is connected to the final output of the model (7). } \centering \label{fig:overview} \end{figure} \section{Approach: A Minimal Neural Model for Permutation Invariance} \label{section:approach} The requirement a network needs to meet in order to be invariant to permutations in the input is that no parameter can be optimized in relation to any specific element in the input. This has to hold throughout the entire network. As noted by Tang and Ha \cite{tang2021sensory}, a trivial strategy to achieve this is to constantly permute the input vector throughout the optimization phase. The logic behind this strategy is similar to that of data augmentation strategies used in some image classification studies \cite{taylor2018improving}. If the original dataset does not include examples of rotated objects, a way to make the classifier more general is to augment the dataset with rotated copies of original images. Rotation is a continuous operation and meaningful interpolations can be made between rotations with different angles. However, permutations of indices are discrete and have no meaningful interpolations between them. This means that we would need to augment the dataset with every single possible permutation and thus potentially increase optimization time exponentially. A visual presentation of the model introduced here is shown in Figure~\ref{fig:overview}. When the input vector from the environment is presented to the model at each time step, each element of the input vector is passed into a separate \emph{input unit}. These \emph{input units} are a type of recurrent neural network called Gated Recurrent Unit (GRU) \cite{cho2014properties} with an added output gate. Other types of RNNs, such as the Long Short-Term Memory unit \cite{hochreiter1997long}, or any of the many other RNN variations \cite{yu2019review} could also have been used. Importantly, the \emph{input units} all share the same weight matrices. This means that regardless of how many elements there are in the input vector, we only optimize parameters for a single \emph{input unit} and copy these to all the \emph{input units}. This separation of the input elements to \emph{input units} with shared parameters is crucial for achieving input permutation invariance, and is a major difference from how inputs are processed by traditional deep RNNs. Note, that even though the \emph{input units} share their evolved weight matrices, their hidden states and their outputs are not necessarily the same at any given time, since these are influenced by the different inputs presented to each input unit. With this approach of routing the input elements into separate units, our method can be described as falling under the category of \emph{instance slot} models (reviewed by Greff, van Steenkiste \& Schmidhuber \cite{greff2020binding}). Each \emph{input unit} outputs a vector of dimension $(m,1)$. All these vectors are summed into a single vector of dimension $(m,1)$ each element of this vector is divided by the number of \emph{input units}. This averaging of the \emph{input units}' outputs will have the same dimensionality of $(m,1)$ regardless of the number of \emph{input units}. This vector is analogous to the \emph{global latent code} in the approach by Tang and Ha \cite{tang2021sensory}. It is then passed to another RNN (also a GRU with an output gate). We call this the \emph{integrator unit}. It processes the summed outputs of the \emph{input units} just as any normal GRU cell with an output gate would do. The output vector of the \emph{integrator} is passed through two dense layers, the last of which projects to a vector with the number of elements that is needed to make an action in the given environment. The output vector of the \emph{integrator} is also fed back to the \emph{input units}. The \emph{input units} get their hidden states updated through a separate set of GRU gates, the parameters of which are also shared between all the \emph{input units}. This model complies with both requirements for permutation and size invariance. First, no parameters are specifically optimized in relation to any specific input index. This is ensured by making the \emph{input units} share their optimized parameters, and averaging all their outputs to a single vector. The optimized parameters of the rest of the network are optimized in relation to indices of this aggregate of input units' outputs, but these cannot be traced back to any specific indices of the input vector. Second, the averaging also means that we can add any number of the input units without disrupting the structure of the rest of the network, and without the need for additional optimized parameters. All RNN cells in all experiments below are Gated Recurrent Units with and additional output gate. The hidden state and the outputs are determined as follows \cite{cho2014properties}: \begin{equation} \mathbf{z}_t = \sigma( W_z[\mathbf{h}_{t-1}, \mathbf{x}_t]+\mathbf{b}_z ) , \end{equation} \begin{equation} \mathbf{r}_t = \sigma( W_r[\mathbf{h}_{t-1}, \mathbf{x}_t]+\mathbf{b}_r ) , \end{equation} \begin{equation} \mathbf{g}_t = tanh( W_g[ \mathbf{r}_t \odot \mathbf{h}_{t-1}, \mathbf{x}_t]+\mathbf{b}_g ) , \end{equation} \begin{equation} \mathbf{h}_t = (1 -\mathbf{z}_t ) \odot \mathbf{h}_{t-1} + \mathbf{z}_t \odot \mathbf{g}_t, \end{equation} \begin{equation} \mathbf{o}_t = W_o[\mathbf{h}_{t}, \mathbf{x}_t]+\mathbf{b}_o , \end{equation} Here,$\sigma$ is the sigmoid function, $\odot$ is the Hadamard product, $\mathbf{h}_t$ is the hidden state of the recurrent unit and $\mathbf{o}_t$ is the output of the recurrent unit. $W_i$ and $\mathbf{b}_i$ are weight matrices and bias vectors, respectively. \todo{describe the symbols in this formula} \section{Experiments} \label{subsection:experiments} We test the model described in Section~\ref{section:approach}, as well as several variations of it with different ablations and three different environments. The particulars of each of these are specified in the sections below. \subsection{Environments} \label{subsection:environments} We test our model in multiple simple control tasks (Fig.~\ref{fig:environments}) from the OpenAI gym suite \cite{brockman2016openai}. In all experiments, the ordering of the inputs to the models stay fixed throughout the entire optimization time. \begin{figure} \includegraphics[scale=0.105]{environments.png} \caption{Environments Used in Experiments \normalfont From left to right: Acrobot-v1, MountainCar-v0, CartPole-v1} \centering \label{fig:environments} \end{figure} \subsubsection{CartPole-v1} \label{subsubsection:cart} In this classic control task, a pole is balancing on a cart and the agent needs to control the cart such that the pole does not fall for as long as possible \cite{barto1983neuronlike}. The environment has four inputs and two discrete actions. A stopping condition score for the evolution strategy (see below) was set to 495 for this environment. \subsubsection{Acrobot-v1} \label{subsubsection:acro} The task in \emph{Acrobot-v1} is to move a fixed 2-dimensional robotic arm with two joints such that non-fixed end of the arm reaches a certain height \cite{sutton1995generalization}. The faster this is achieved the better the score, and a fitness point of -1 is given for each time step spend. The environment has six inputs and three discrete actions. We set the stopping condition to be an average score of -96. \subsubsection{MonutainCar-v0} \label{subsubsection:mount} The goal is to move a car from a valley on a one-dimensional track up a large hill \cite{moore1990efficient}. The car needs to build up momentum by first moving up a smaller hill on the opposite side. The environment has two inputs and three discrete actions. We set the stopping condition to be an average score of -105. \subsection{Optimization Details} \label{subsection:ES} We use an evolutionary strategy \cite{salimans2017evolution} (ES) to optimize the parameters of the system. We use an off-the-shelf implementation of ES \cite{ha2017evolving} with its default hyperparameters, except that we set weight decay to zero (unless stated otherwise, hyperparameter configurations of all experiments matches those in Table~\ref{tab:hyper}). However, for experiments in the Mountain Car experiments, weight decay is set to $0.01$. This is because successes in this environment are initially very sparse, and if all individuals score the same, there is an increased risk of the evolution getting stuck. Weight decay helps evolution differentiating between individuals. The implementation uses mirrored sampling, fitness ranking, and uses the Adam optimizer for optimization. This optimization implementation is similar to that used by Palm et al. \cite{palm2021testing, palm2020} and Pedersen and Risi \cite{pedersen2021evolving}. Every 20th generation, the mean solution of the population is evaluated over 128 episodes, and if it achieves an acceptable average score, the solution is saved and the evolution run is ended. For all experiments, if a solution was not found within $5,000$ generations, the run was terminated. \begin{table} \caption{Hyperparameters for ES} \label{tab:hyper} \begin{tabular}{cc} \toprule Parameter& Value\\ \midrule Population Size & 128\\ Learning Rate & 0.1\\ Learning Rate Decay & 0.9999\\ Learning Rate Limit& 0.001\\ Sigma & 0.1\\ Sigma Decay& 0.999\\ Sigma Limit & 0.01\\ Weight Decay & 0\\ \bottomrule \end{tabular} \end{table} \subsection{Model Ablations} \subsubsection{Full Model} \label{subsubsection:full} We refer to the model described in Section~\ref{section:approach} as the full model. It is fully specified by the following weights matrices: Four weight matrices and bias vectors in the \emph{input units} that adjusts the units' hidden states according to the external input following equations (1) through (5) in Section~\ref{section:approach}. Three more weight matrices and bias vectors in the \emph{input units} that adjusts the units' hidden states according to the feedback from the \emph{integrator} following equations (1) through (4). The feedback only serves to adjust the hidden states of the units, and there are thus no output gates for the feedback. Then, there are the four weight matrices and bias vectors in the \emph{integrator}, and two weight matrices and bias vectors for the dense layers that determine the final output of the model. The sizes of the matrices of the GRUs are fully determined by the their input sizes, the size of their hidden states and the output sizes. These hyperparameters are summarized in \ref{tab:sizes}. Each \emph{input unit} receives a value from a particular environmental input element, copied eight times to produce a vector. The input size of eight for in the \emph{input units} was chosen partly to dictate the sizes of the following matrices, and to ensure that the input would be able to impact the hidden state better than if it had just been represented by a single value. The sizes of the networks for different tasks only differ in the output vector. CartPole-v1 has two discrete actions, whereas MountainCar-v0 and Acrobot-v1 both have three. For each time step in any environment the index of the largest element of the output vector becomes the action taken by the agent at that time step. In the beginning of each episode, all hidden states are initialized with noise from a Normal Distribution, $\mathcal{N}(0, 0.05)$. The total number of optimized parameters in the network is $24,064$ for the Cart-Pole environment and $24,096$ for the two other environments. \begin{table} \caption{Network Size Specifications} \label{tab:sizes} \begin{tabular}{cc} \toprule Name & Size\\ \midrule Input Unit In & 8\\ Input Unit Hidden & 16 \\ Input Unit Out & 24\\ Inp. Un. Feedback In. & 24 \\ Integrator In & 24\\ Integrator Hidden & 16\\ Integrator Out& 24\\ Dense 1 & 32\\ Dense 2 & environment dependent\\ \bottomrule \end{tabular} \end{table} \subsubsection{No Feedback Model} \label{subsubsection:nofeed} We run the same experiments with a variation of the full model with the only difference being that the \emph{input units} do not receive a feedback signal from the \emph{integrator}. The total number of optimized parameters in the network is $5,584$ for the Cart-Pole environment and $5,616$ for the two other environments. \subsubsection{Integrator as Feedforward Network} \label{subsubsection:neuffn} In another variation of the full model, we skip the \emph{integrator} and send the averaged outputs of the \emph{input units} directly to the first dense layer. The \emph{input units} receive the output of the first dense layer as feedback to adjust their hidden states. Total number of optimized parameters for Cart-Pole: $20,904$, others: $20,928$. \subsubsection{Input Units as Feedforward Networks} \label{subsubsection:synffn} In this variation, the \emph{input units} are not GRUs but simple feedforward networks with multiple hidden layers. As in the other variations, the optimized parameters in the weight matrices are shared between the input units. The number of hidden units in the layers of the input units are from beginning to end: 8, 32, 24, 24, 24. The activation function for all the layers is \emph{tanh}. The rest of the network is identical to the full model with no feedback. Total number of optimized parameters for Cart-Pole: $6,064$, others: $6,096$. \subsubsection{No RNNs} \label{subsubsection:nornn} Finally, we run experiments with a model with no recurrence in the network at all; \emph{input units} are feedforward networks with multiple hidden layers and their averaged outputs are send through multiple dense layers. The size of the \emph{input units} are the same as in Section~\ref{subsubsection:synffn}, and the average output is then send through layers of sizes: 24, 32, 24, 24, 16, 32, before being projected to the number of actions in the given environment. Total number of optimized parameters for Cart-Pole: $5,760$, others: $5,792$. \subsubsection{Standard RNN} \label{subsubsection:rnn} In addition to variations of our proposed model, we run experiments with a traditional RNN structure. This consists a GRU unit with additional output gates following equations (1) through (5) in Section ~\ref{section:approach}. The input size of the this RNN is equal to the input vector given by the environment that it is optimized in. Its hidden state has 16 elements, and so does its output. It is connected to two dense layers, one with 32 hidden notes, and one that has a number of nodes equal to the number of possible actions in the environment. Total number of optimized parameters for Cart-Pole: $1,954$, Mountain Car: $1,859$, Acrobot:$2,115$. \subsubsection{Output Permutations} \label{subsubsection:output} In our last experiment, we adapt the full model to also be invariant to permutations and changes in size to the output of the network. The first half of this model is identical the that of the full model. However, instead of projecting to a dense layer, the \emph{integrator} projects to two units of the same type as the \emph{input units,} but with their own set of shared optimized parameters. In this experiment, these \emph{output units} have weight matrices of sizes equal to those of the \emph{input units}, but this is not required. The \emph{output units} have no weight matrices for feedback. Only experiments on the Cart-Pole environment is done with this model and the total number of optimized parameters is $24,176$. For these evolution runs, weight decay was set to $0.01$. Further, the fitness of each individual of a generation was here the average performance over four episodes, instead of just a single episode. We extend the optimization is this way, as we are now attempting to solve another problem on top of what was solved by the previous models. \begin{figure} \includegraphics[scale=0.105]{output_overview.png} \caption{Model Extended to Output Permutation Invariance: \normalfont The first part of this model is identical to that in Fig.~\ref{fig:overview}. However, instead of dense layers projecting to the output, this model has two recurrent units with shared parameters as the final output nodes. } \centering \label{fig:out_overview} \end{figure} \section{Results} \label{section:results} Training curves of each experiment are shown in Figure \ref{fig:aggr}, except for the experiment described in Section ~\ref{subsubsection:output} that is presented in Figure \ref{fig:cart_outperm}. Each curve represents the mean of five independent evolutionary runs. From Figure~\ref{fig:aggr}, it is clear that evolution tends to find solutions much faster with some models than for others. Specifically, the full model, the full model without feedback and the standard RNN finds solutions in the matter of hundreds of generations for all problems. On the contrary, for the models where the \emph{input units} are not RNNs a solution was often not found within the time limit of 5,000 generations. After optimization, we are interested in how well the models do with online permutations of the input vectors. In Table ~\ref{tab:eval}, such evaluations are shown for an optimized full model, the model consisting of feedforward units only, and the standard RNN model. Across the board, the models designed for invariance tend to achieve similar scores under all conditions, even when the inputs are shuffled at intervals as frequent as every 5th time step. The standard RNN fails under all permutation conditions. Following \cite{tang2021sensory}, we also evaluate the models when given a larger input vector than seen during optimization with redundant values. Here too, the models designed for invariance show no signs of deterioration in performance. It was not possible to evaluate the standard RNN using a doubled input size, due to its rigid structure. Figure ~\ref{fig:cart_outperm} shows that it takes longer for evolution to find solutions to the Cart-Pole environment when the full model is extended to also have \emph{output units} with shared parameters, but that solutions are consistently found. Further, in Figure ~\ref{fig:out_perm_results}, we see that the optimized model does not tend to perform well with frequent permutations of both the input and output vectors. However, as shown by the left-most box plot in the figure, the model performs well under random orderings, as long as they stay fixed during the episode. We can look closer at how the \emph{input units} behave under conditions without and with online input permutations. Such cases are presented for a full model performing in the Cart-Pole environment in Figure ~\ref{fig:noshuffle} and Figure ~\ref{fig:shuffle} respectively, where we see the 16 hidden state elements of each of the four \emph{input units} over a full episode. Figure ~\ref{fig:noshuffle} shows that when no permutations occur, the mode of each \emph{input unit} tends to look similar throughout the episode. However, as can be seen in Figure ~\ref{fig:shuffle}, the \emph{input units} are able to quickly switch roles in response to a permutation. \begin{table*} \caption{Table of Results. \normalfont Means and standard deviations over $1000$ episodes. For each method, we choose the run with the highest population mean score at the end of evolution. Input Doubling means that each element of the input vector is copied. E.g., in the Cart-Pole environment, this means that there are eight input elements and therefore also eight \emph{input units} instead of four. No. Perm. means that the input vector is not permuted online. However, in the beginning of each new episode, the ordering is randomized. Results show that variations of our model both with and without recurrent dynamics are able to do well in the tasks, even when the input is permuted online several times. Note, however, as seen in Figure \ref{fig:aggr}, evolution runs of the model without recurrent dynamics, did not reliably result in a solution within the set time limit. The standard RNN model does not do well in any of these scenarios.} \label{tab:eval} \begin{tabular}{ccccccc} \toprule Full Model \\ \hline Env. & Input Doubling & No Perm. & Every 100 & Every 50 & Every 10 & Every 5\\ \midrule Cart-Pole & 488.3 $\pm$ 67.9 & 485.2 $\pm$ 76.7 & 488.5 $\pm$ 68.2 & 488.9 $\pm$ 68.4 & 489.6 $\pm$ 66.0 & 481.8 $\pm$ 86.7\\ Acrobot & -106.3 $\pm$ 48.2 & -108.9 $\pm$ 57.9 & -106.8 $\pm$54.9 & -107.1 $\pm$ 57.1 & -108.2 $\pm$ 60.7 & -104.5 $\pm$ 44.7 \\ Mountain Car & -99.7 $\pm$ 5.6 & -99.5 $\pm$ 5.7 & -99.7 $\pm$ 5.5 & -99.9 $\pm$ 5.8 & -100.0 $\pm$ 5.6 & -107.5 $\pm$ 21.6\\ \hline Standard RNN \\ \hline Cart-Pole & N/A & 172.8 $\pm$ 210.0 & 73.4 $\pm$ 87.3 & 47.8 $\pm$ 50.7 & 20.1 $\pm$ 14.5 & 23.1 $\pm$ 13.4 \\ Acrobot & N/A & -396.3 $\pm$ 168.4 & -293.4 $\pm$ 152.1 & -295.9 $\pm$ 137.6 & -279.3 $\pm$ 108.0 & -280.1 $\pm$ 106.1 \\ Mountain Car & N/A & -149.4 $\pm$ 48.3 & -146.3 $\pm$ 45.8 & -171.4 $\pm$ 40.8 & -180.1 $\pm$ 34.7 & -193.3$\pm$ 20.9 \\ \hline No RNNs \\ \hline Cart-Pole & 496.4 $\pm$ 35.4 & 496.4 $\pm$ 35.7 & 494.7 $\pm$ 43.4 & 496.3 $\pm$ 36.5 & 497.6 $\pm$ 29.1 & 496.1$\pm$37.2 \\ Acrobot & -118.7$\pm$ 63.0 & -118.5$\pm$ 63.3 & -121.8$\pm$68.5 & -120.1$\pm$70.1 & -123.9$\pm$76.2 & -116.5$\pm$ 61.6 \\ Mountain Car & -105.5 $\pm$ 7.0 & -104.8 $\pm$ 7.6 & -105.2 $\pm$ 7.0 & -105.0$\pm$7.0 & -105.2$\pm$7.7 & -105.0$\pm$7.4 \\ \bottomrule \end{tabular} \end{table*} \begin{figure*} \includegraphics[scale=0.38]{wide_aggregated_curves.pdf} \caption{Training Curves: \normalfont Means and standard deviations. Each curve represents the mean of five independent evolution runs with a specific method. The full model as described in Figure \ref{fig:overview} and its variation without feedback from the integrator to the \emph{input units} tend to find solutions to the tasks quickly. The same is true for the standard RNN. When the \emph{input units} are feedforward networks rather than RNNs, evolution in most cases did not end up finding a solution within the set time limit of 5000 generations. } \label{fig:aggr} \end{figure*} \begin{figure} \includegraphics[scale=0.18]{cartpole_outputInv_curve.pdf} \captionsetup{justification=centering} \caption{Training Curve for Model with Output Units. \normalfont Means and standard variations of five independent evolution runs. } \centering \label{fig:cart_outperm} \end{figure} \begin{figure} \includegraphics[scale=0.18]{output_permutation_performance3.pdf} \captionsetup{justification=centering} \caption{Performance Under Online Permutation of Input and Output. \normalfont The model performs well under random permutations of both the input and output when the random ordering is fixed during the episode. However, online permutations makes the model fail at increasing levels. } \label{fig:out_perm_results} \end{figure} \begin{figure*} \includegraphics[scale=0.31]{hidden_no_shuffle.pdf} \caption{CartPole Hidden States: No Shuffling \normalfont The 16 hidden state elements of each of the four input unit over a full episode in the Cart-Pole environment. The units seem to have seperate, fixed roles.} \centering \label{fig:noshuffle} \end{figure*} \begin{figure*} \includegraphics[scale=0.31]{hidden_shuffle_100.pdf} \caption{CartPole Hidden States: Shuffle Every 100th Step \normalfont Black dotted lines indicate the times at which the input vector was randomly permuted. The hidden states rapidly adapt their activity levels in response to permutations.} \centering \label{fig:shuffle} \end{figure*} \section{Discussion} \label{section:discussion} In this paper we demonstrate that the requirements needed for making a network invariant to permutation and size changes of the external inputs can be met by relatively simple models. Importantly, no parameters can be optimized in relation to any specific index of the input vector, and projections of the input must at some point in the network be aggregated to a representation that does not grow with the number of inputs. The simple solution we use in the model presented here, is to average the outputs of input units with shared parameters. Even when optimized with fixed inputs, the models are remarkably robust to frequent permutations of the input vector. The solution does not specify that the \emph{input units} need to be recurrent neural networks. Indeed, we find that in the environments we use for experimentation here, it is possible to find solutions solely using feedforward networks. However, such solutions tends to be more difficult to find compared to when \emph{input units} are RNNs. This effect might only be exacerbated in more difficult environments. The use of feedback from the \emph{integrator} did not tend to make a difference in our experiments. This could be due to the simplicity of the environments, as Tang and Ha \cite{tang2021sensory} report that their analogous \emph{input units} need to get the model's previous outputs as additional inputs in order to work. One might expect that the more overlapping the values of the input vector can be, the more need there is for some form of global signal as well as a memory of previous inputs. We further show that it is simple to extend the model to also be able to work with different permutations of the output vector. This is done by following the same principle as for the input vector: no parameters in the network can optimized in relation to a specific index of the output vector. We solve this by having \emph{output units} with shared parameters that receive a common input from the \emph{integrator}. However, the problem of invariance to permutations of the output vector is different in important ways. First of all, the \emph{output units} almost certainly need to be recurrent, as having different hidden states is the only way that the units are be able to give different outputs in response to the identical inputs they are presented with from the \emph{integrator}. Second, dealing with online permutations of the output vector is much harder than of the input vector as indicated by the results in Figure ~\ref{fig:out_perm_results}. This is not surprising considering that every time the output vector is permuted, the next action of the network will be random. For the Cart-Pole environment with only two actions that are oppositely directed, this might be somewhat feasible, as only a single random action is needed in order to have a perfect overview over all actions. For environments with larger numbers of available actions, the agent would have to behave randomly for potentially many time steps before being able to settle into a learned behavior. Still, even though rapid online permutations of the output might insurmountable at large scales, the properties of a model like the one presented in Section ~\ref{subsubsection:output} can still be interesting. In this model, the number of parameters to be optimized is completely decoupled from the size of the external input and the number of actions in the environment. As such, the model can potentially be optimized on multiple different environments that do not need to share the input and output spaces. This idea is not unlike the one presented by Kirsch et al. \cite{kirsch2021introducing}. However, Kirsch et al. are in their work aiming for evolving a black-box reinforcement learning algorithm. While the optimization procedure of the model presented in this paper could be altered to mimick that of Kirsch et al., our model currently does not take any rewards into account, but focuses solely on solving the problems of invariance. With the model presented here, we get these invariance properties with only a small fraction of the optimization time reported by Kirsch et al. on the same problems. \subsection{Future Directions} \label{future} Having shown that our model can be reliably evolved to be invariant to permutations on simple problems, it is worth considering how the model might be scaled up to bigger problems. In future experiments, we aim at also using our model to solve continuous control problems with more inputs and outputs. Trivially, it is always a possibility to make the model more expressive by increasing the sizes of the weight matrices throughout the network. However, there are other ways the model can be expanded, while still conforming to the laid out restriction. It should for example be possible to add a layer of \emph{input units} parallel to the ones in the model in Figure ~\ref{fig:overview}. Each element in the input vector would thus be send through two different \emph{input units}. The added \emph{input units} would still have to share optimized parameters with each other, but, importantly, not with the "original" layer of \emph{input units}. The averaged output vectors of the \emph{input unit} layers can then be concatenated and send through the network as in Figure ~\ref{fig:overview}. An added, separate set of optimized parameters for processing the input could allow for more specialization, without hurting the ability to deal with permutations of the input. \section{Conclusion} \label{section:conclusion} The world is a messy place and it might not always be possible for us to fully anticipate how inputs will be presented to agents meant to perform in it. With this paper, we contribute to the efforts of making artificial agents more adaptable to changes to their inputs. We do so by being explicit about what the models at the very least will need for being able to adapt to permutations and size changes, and use these restrictions to develop simple models that adhere to them. We hope that this will inspire even more research in making more adaptable artificial agents. \begin{acks} This project was funded by a DFF-Research Project1 grant (9131-00042B). \end{acks} \bibliographystyle{ACM-Reference-Format}
\section{Introduction} \label{sec:intro} Neutron stars (NSs) are formed during the core-collapse supernovae (CCSNe) of stars with zero age main sequence masses of $\gtrsim$ 8M$_{\sun}$. Observations of neutron stars and pulsars indicate high space velocities with $v_{\mathrm{3D}}$ $\approx$ 300--400 km s$^{-1}$ \citep{Hobbs2005,igoshev2020I}. There are currently believed to be two possible mechanisms which can accelerate neutron stars to these high velocities at birth: anisotropic neutrino emission \citep[e.g.,][]{Woosley1987,Socrates2005,Fryer2006}, and hydrodynamic kicks \citep[e.g.,][]{Janka1994,Burrows1996}. In the case of anisotropic neutrino emission, an anisotropy of only $\sim$1\% would be sufficient to impart a kick velocity of several hundred km s$^{-1}$ \citep[e.g.,][]{Socrates2005}, though \citet{Wongwathanarat2013} argue that an anisotropy of this size is difficult to achieve without invoking strong assumptions about the proto-neutron star. In particular, exotic theories concerning neutrino interactions, strong magnetic fields ($B > 10^{15}$ G) in the proto-neutron star, or turbulence in the neutrinosphere of the neutron star are required \citep{Wongwathanarat2010}. In contrast, recent two- and three-dimensional models for neutrino-driven core-collapse supernovae suggest that NS kicks of $\lesssim$ 1500 km s$^{-1}$ are achievable solely through bulk hydrodynamic kicks \citep[e.g.,][]{Nakamura2019}. By way of momentum conservation, the neutron star is imparted a momentum in the direction opposite to that of asymmetrically ejected stellar debris. On short timescales ($t$ $\sim$ 1 second) both hydrodynamic and gravitational forces work to impart momentum to the neutron star \citep{Wongwathanarat2010,Wongwathanarat2013}, while on longer timescales, additional momentum is imparted by gravity from high velocity ejecta \citep[the gravitational ``tugboat" effect;][]{Wongwathanarat2013}. Recent studies by \citet{HollandAshford2017} and \citet{Katsuda2018} investigated, by independent means, the relationship between neutron star kick velocity and direction, and the location of iron-group and intermediate mass elements in the shocked supernova ejecta of several Galactic supernova remnants (SNRs). In both instances, the authors concluded that the measured or inferred kick velocities of the neutron stars in their sample were brought about by asymmetric explosions. In both papers, neutron star proper motions were incorporated either from a direct measurement of the proper motion or by measuring the offset of the neutron star from the geometric center of expansion (center of mass). However, in two cases, Cas A and G292.0+1.8, the authors note that they compute the proper motion based off of the offset of the neutron star from the optically determined center of expansion \citet{HollandAshford2017}. For G292.0+1.8, both papers assume a kick velocity of $\sim$ 450 km s$^{-1}$ \citep{Winkler2009}. G292.0+1.8 (hereafter G292) is a young ($t_{\mathrm{SNR}}$ $\sim$ 3000 year old, \citet{Winkler2009}) oxygen-rich SNR. The remnant is bright in X-ray emission from shocked ejecta and exhibits a prominent bar of shocked circumstellar material across the middle. A pulsar (J1124--5916) and bright pulsar wind nebula are associated with this remnant. The SNR is located at a distance of $\sim$ 6 kpc, and has an angular diameter of $\sim$ 8$\arcmin$ \citep{Gaensler2003}. The SNR is thought to be the remnant of a IIL/IIb supernova \citep{Chevalier2005}, with initial progenitor mass estimates of 13--30 M$_{\sun}$ \citep{Bhalerao2019}. X-ray studies of shocked circumstellar material suggest it is still expanding into the red supergiant wind \citep{Lee2010}. The mass loss rate during the red supergiant phase is estimated to be 2--5$\times$10$^{-5}$ M$_{\sun}$ yr$^{-1}$, with 15--40 M$_{\sun}$ of circumstellar material shock heated to X-ray temperatures \citep{Lee2010}. A recent analysis by \citet{Jacovich2021} placed tighter constraints on the progenitor properties, suggesting an initial mass of $\lesssim$ 20 M$_{\sun}$, though the estimated mass loss rate from \citet{Lee2010} is broadly consistent with values from \citet{Jacovich2021} for a 20 M$_{\sun}$ progenitor. \citet{Bhalerao2019} performed a fairly complete census of the X-ray emitting material, and derived a total ejecta mass of $\sim$ 6 M$_{\sun}$. Here we report on the first direct measurement of the proper motion of J1124--5916 in G292. Combining deep multi-epoch {\it Chandra} observations registered against the {\it Gaia} Data Release 3, we are able to correct the astrometry to an accuracy of 50 milliarcseconds (mas). In Sections~\ref{sec:data} and~\ref{sec:registration}, we present the {\it Chandra} observations and our registration technique; in Section~\ref{sec:propermotion} we present the proper motion measurement. In Section~\ref{sec:discussion}, we discuss our results, and attempt to place the measured proper motion of J1124--5916 in the context of other neutron stars. \section{Data and Reduction} \label{sec:data} G292 has been observed several times over the course of the {\it Chandra} mission. Here we make use of two large programs from 2006 and 2016. Our goal is to match faint point sources detected in the {\it Chandra} observations against known sources from the Gaia 3rd Data Release (DR3). In order to minimize any cumulative error which we might incur when adding several shorter {\it Chandra} observations performed at different roll angles and exposure times, we limited ourselves to the longest observations from each program, all performed at a similar roll angle, in order to minimize any systematic error. The observations are listed in Table~\ref{tab:obslist}, where we also list relevant observation information, and the $\Delta t$ between the individual exposure and the Gaia DR3 reference epoch of $2016.0$ (denoted as $\Delta t_{\mathrm{2016.0}}$). \subsection{Relevant Software and Archives} \label{sec:tools} Using the \textit{CIAO}\xspace tool \texttt{chandra\_repro}\footnote{https://cxc.harvard.edu/ciao/ahelp/chandra\_repro.html} and CALDB 4.9.5, we reprocessed each observation to generate new L2 event lists. \textit{MARX}\xspace\footnote{https://space.mit.edu/cxc/marx/} and \textit{SAOTrace}\xspace\footnote{https://cxc.cfa.harvard.edu/cal/Hrma/SAOTrace.html} were used for simulating the point spread function (PSF) of point sources. The positions of the point sources, as determined by the \textit{CIAO}\xspace tool \texttt{wavedetect} were fitted using the PSF image with \textit{Sherpa}\xspace, following the CIAO thread that discusses how to account for PSF effects in 2D image fitting\footnote{https://cxc.harvard.edu/sherpa/threads/2dpsf/}. To correct for time dependent changes to the quantum efficiency and exposure time differences among observations event-by-event, we used the \textit{CIAO}\xspace tool \texttt{eff2evt}, by setting the option \texttt{detsubsysmod} to the start time of the observation, and the start time of the reference observation, \texttt{ObsID}\xspace 19892. Finally, we used the GAIA Archive\footnote{https://gea.esac.esa.int/archive/} to search for optical counterparts to detected X-ray sources. The matched optical point sources are used as a reference frame to register all the observations. \begin{table}[htb] \caption{Observation List} \begin{center} \label{tab:obslist} \begin{tabular}{ l l c c c} \hline\hline ObsID & Start Date & Exposure & Roll Angle & $\Delta t_{2016.0} $\\ & & (ks) & & (yr)\\ \hline \phantom{0}6677 & 2006-10-16 & 159.13 & 140.19 & 9.21 \\ \phantom{0}6679 & 2006-10-03 & 153.95 & 156.69 & 9.24 \\ \phantom{0}8221 & 2006-10-20 & \phantom{0}64.96 & 140.19 & 9.20 \\ 19892 & 2016-10-05 & \phantom{0}49.48 & 150.19 & -0.76 \\ 19899 & 2016-10-18 & \phantom{0}42.57 & 144.19 & -0.80 \\ \hline \end{tabular} \end{center} \end{table} \subsection{Position of X-ray point sources} \label{sec:pointsource} To determine the position of the X-ray sources, we use a PSF fitting method based on the CIAO thread on 2D image fitting described in the previous section. We include more details specific to our analysis in the discussion below. We first create an image of the source to be modelled from a $31\farcs5 \times 31\farcs5$ box region, which we refer to as the ``data image''. We then use \textit{SAOTrace}\xspace to simulate the PSF at the off-axis position appropriate for each point source of interest with a power-law spectrum with an index of 2.94 consistent with the average spectral properties of the sources used for registration. We scale the source flux by a factor of five thousand to reduce the statistical noise. This simulation is used to create an image of a point source at this position in the focal plane. We convolve this PSF model image with a Gaussian plus a constant. The convolution with a Gaussian smooths the statistical fluctuations in the simulated data, ensures that the values are strictly positive, and allows for interpolation between pixels to non-integer values. This smoothing is necessary to prevent the possible source positions from being quantized to the original grid of values determined by the detector coordinate system. The constant term accounts for the background in the real data. We refer to this image as the ``model image''. We then fit the model image to the data image (both binned to 1/4 sky pixels). The center, amplitude, and sigma of the Gaussian function, and the constant value are free to vary in the fit. We employed the C-statistic \citep{Cash1979} to determine the best fit value of the parameters. The fitted center of the Gaussian function $(x,y)$ is the position of the point source in image coordinates. The coordinates are transformed to sky coordinates using the WCS tranformations. The $1 \sigma$ confidence intervals are determined using the sherpa \texttt{conf}\footnote{https://cxc.harvard.edu/sherpa/ahelp/conf.html} routine, which finds the root of the C-stat function \textit{vs} $x$ or $y$: $c(x)-(c_{\mathit{min}} +1)=0$ or $c(y)-(c_{\mathit{min}} +1)=0$. The root of the C-stat function \textit{vs} $x$ or $y$ is determined using Muller's method. An approximate root $x_\mathit{k}$ is generated for each iteration $k$; the iteration is halted when $x_\mathit{k+1} - x_\mathit{k} < 0.01$; $x_\mathit{k+1}$ is then the root of $c(x) - (c_{\mathit{min}}+1) = 0$. The sigma of the Gaussian must remain small in our fits in order to avoid broadening the model image significantly beyond the resolution of the Chandra PSF. The fitted values of $\sigma$ were never larger than 0\farcs35 in our fits. The point sources were all at off-axis angles $\ga4\arcmin$. The Chandra 90\% encircled energy is $2\farcs0$ at an off-axis angle of 4\farcm0. The additional broadening due to our Gaussian smoothing is small or negligible compared to the scale of the Chandra PSF. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{position_err_area_sim.pdf} \caption{The ratio of counts to 90\% enclosed area of the simulated point sources versus the fitted positional error. The cyan line is the fitted power-law model using the least absolute deviation (LAD) method. The red dashed line indicates a positional error of $0\farcs3$. Those point sources with a positional error larger than $0\farcs3$ indicate that the relationship between positional error, surface brightness, and off-axis angle is not well described by a power-law model beyond $0\farcs3$. For high precision source registration, these sources would be excluded, as nonlinear effects appear to influence the measured positional error. \label{fig:positionerror}} \end{figure} The measured error in an X-ray source's position depends upon at least the number of counts in the source and the size and shape of the PSF, which depends primarily on the off-axis angle of the source and roll angle of the telescope. In Table~\ref{tab:counts}, we list the number of counts, off-axis angle and the positional errors for each of the X-ray sources. \begin{table*}[htb] \caption{Point source and the pulsar counts ($C$), off-axis angles ($\theta$) and the fitted positional errors $\sigma_{P}$ of the point sources.} \begin{center} \begin{tabular}{ l|c c c c c c c c c c c c c c c} \hline\hline & &6677 & & & 6679 & & &8221 & & &19892 & & &19899& \\ Source ID$^{\dagger}$ & $C$ & $\theta$ & $\sigma_{P}$ & $C$ & $\theta$ & $\sigma_{P}$& $C$ & $\theta$ & $\sigma_{P}$& $C$ & $\theta$ & $\sigma_{P}$& $C$ & $\theta$ & $\sigma_{P}$\\ \hline 1 & 1263 & $7.0\arcmin$ & 0.04\arcsec & 1201 & $6.9\arcmin$ & 0.04\arcsec & 529 & $7.1\arcmin$ & 0.06\arcsec & 388 & $6.8\arcmin$ & 0.07\arcsec & 398 & $6.8\arcmin$& 0.06\arcsec\\ 2 & 1485 & $8.6\arcmin$ & 0.05\arcsec & 1126 & $8.5\arcmin$ & 0.05\arcsec & 465 & $8.7\arcmin$ & 0.08\arcsec & 643 & $8.3\arcmin$ & 0.06\arcsec & 599 & $8.4\arcmin$& 0.09\arcsec\\ 3 & 99 & $4.5\arcmin$ & 0.14\arcsec & 92 & $4.6\arcmin$ & 0.17\arcsec & 51 & $4.5\arcmin$ & 0.21\arcsec & 20 & $4.8\arcmin$ & 0.21\arcsec & 18 & $4.7\arcmin$& 0.27\arcsec\\ 4 & 197 & $4.4\arcmin$ & 0.10\arcsec & 130 & $4.6\arcmin$ & 0.09\arcsec & 86 & $4.4\arcmin$ & 0.10\arcsec & 25 & $4.7\arcmin$ & 0.26\arcsec & 23 & $4.6\arcmin$& 0.19\arcsec\\ 5 & 304 & $5.2\arcmin$ & 0.07\arcsec & 148 & $5.4\arcmin$ & 0.09\arcsec & 57 & $5.2\arcmin$ & 0.17\arcsec & 36 & $5.5\arcmin$ & 0.29\arcsec & 23 & $5.4\arcmin$& 0.25\arcsec\\ 6 & 441 & $4.7\arcmin$ & 0.05\arcsec & 517 & $4.6\arcmin$ & 0.05\arcsec & 163 & $4.7\arcmin$ & 0.14\arcsec & 102 & $4.5\arcmin$ & 0.10\arcsec & 147 & $4.5\arcmin$& 0.10\arcsec\\ 7 & 795 & $7.7\arcmin$ & 0.05\arcsec & 1119 & $7.6\arcmin$ & 0.05\arcsec & 314 & $7.7\arcmin$ & 0.09\arcsec & 106 & $7.7\arcmin$ & 0.16\arcsec & 191 & $7.7\arcmin$& 0.10\arcsec\\ 8 & 376 & $7.7\arcmin$ & 0.08\arcsec & 433 & $7.5\arcmin$ & 0.06\arcsec & 163 & $7.7\arcmin$ & 0.19\arcsec & 64 & $7.5\arcmin$ & 0.17\arcsec & 71 & $7.5\arcmin$& 0.17\arcsec\\ 9 & 391 & $4.0\arcmin$ & 0.08\arcsec & 306 & $4.0\arcmin$ & 0.16\arcsec & 122 & $4.0\arcmin$ & 0.28\arcsec & 64 & $3.9\arcmin$ & 0.26\arcsec & 69 & $3.9\arcmin$& 0.30\arcsec\\ J1124--5916$^{*}$\tnote{1}& 4804 & $0.6\arcmin$ & & 4698 & $0.6\arcmin$ & & 1961 & $0.5\arcmin$ & & 1436 & $0.7\arcmin$ & & 1273 & $0.7\arcmin$ & \\ \hline \end{tabular} \begin{tablenotes} \footnotesize \tablenotetext{\dagger} {The point source's number of counts are from energy band 0.5-7.0 keV.} \tablenotetext{*} {The pulsar's number of counts are from energy band 1.2-7.0 keV.} \end{tablenotes} \end{center} \label{tab:counts} \end{table*} We investigated this relationship by conducting simulations where we modeled sources with 5--400 counts and at off-axis angles from 1$\arcmin$--6$\arcmin$. The results of the simulations are shown in Figure~\ref{fig:positionerror}. The data follow a roughly power-law relationship between measured position error and surface brightness and off-axis angle, until the surface brightness decreases below $\sim5$ counts arcsec$^{-2}$ and the off-axis angle increases above 4$\arcmin$. Sources with the highest surface brightness and smallest off-axis angles have the smallest positional errors. At lower surface brightness values and larger off-axis angles, the power-law relationship begins to break down and the positional errors increase significantly (Figure~\ref{fig:positionerror}). We interpret this to mean that for a point source with lower counts and/or higher off-axis angle, our method will result in a larger error in the measured position. We use the results of the simulations shown in Figure~\ref{fig:positionerror} to develop criteria to inform us on the suitability of sources for image registration in the 2006 and 2016 observations. The 2006 observations \texttt{ObsID}\xspace 6677 and \texttt{ObsID}\xspace 6679 are $\sim$ 3 times longer than the 2016 observations (Table~\ref{tab:obslist}). Additionally, the continued accumulation of the ACIS contaminant will reduce the relative number of counts in any one source between 2006 and 2016. Therefore, we apply different criteria for source acceptance between the 2006 and 2016 observations. For the purposes of registration at high precision, we exclude point sources with measured positional errors larger than $0\farcs1$ in the 2006 observations \texttt{ObsID}\xspace 6677 and \texttt{ObsID}\xspace 6679. For the 2006 observation \texttt{ObsID}\xspace 8211, we exclude point sources with measured positional errors larger than $0\farcs15$. In order to include enough sources for proper registration of the 2016 observations, we exclude those sources which have measured positional errors greater than $0\farcs2$. \subsection{Optical Counterparts} \label{sec:registration} As noted in \S~\ref{sec:tools}, we used \texttt{wavdetect} to detect X-ray point sources for all four observations. We only use those point sources which are detected in all four observations and which meet our criteria laid out at the end of \S~\ref{sec:pointsource}. For each X-ray point source, we searched GAIA DR3 to find an optical counterpart within $1.5 \arcsec$ radius of the X-ray source. We identified nine optical point sources which match our detected X-ray sources (Figure~\ref{fig:pointsource}). Table~\ref{tab:sourcelist} lists the matched GAIA point sources together with coordinates and proper motions. The RA and Dec columns are the values for epoch $2016.0$. We precessed the RA and Dec values of the GAIA sources using the proper motions to the epoch of the start date of each X-ray observation. Accordingly the error of the RA and Dec will be corrected using the error of the proper motion and the time baseline between 2016 and the start dates of the observations as listed in Table~\ref{tab:obslist}. The nine point sources with optical counterparts are shown in Figures~\ref{fig:source6677} -- ~\ref{fig:source19899}, where we plot the GAIA DR3 positions and the X-ray point source fitted positions. The corrected coordinates of an optical point source are: \begin{equation}\label{eq:position} \begin{pmatrix} \alpha\\ \delta \end{pmatrix} = \begin{pmatrix} \alpha_{2016}\\ \delta_{2016} \end{pmatrix} + \begin{pmatrix} v_{\alpha}\cdot \cos(\delta_{2016})\\ v_{\delta} \end{pmatrix} \Delta t \end{equation} \noindent Here, $(\alpha, \delta)$ are the corrected RA and Dec values, $(\alpha_{2016}, \delta_{2016})$ are the coordinates of the optical point sources at epoch 2016.0. $v_{\alpha}$, $v_{\delta}$ are the proper motions in Right Ascension and Declination, respectively. The corrected error of RA and Dec value is: \begin{equation}\label{eq:positionerr} \begin{pmatrix} \sigma_{\alpha}^{2}\\ \sigma_{\delta}^{2} \end{pmatrix} = \begin{pmatrix} \sigma_{\alpha_{2016}}^{2}\\ \sigma_{\delta_{2016}}^{2} \end{pmatrix} + \begin{pmatrix} \sigma_{v_{\alpha}}^{2} \cdot \cos^{2}(\delta_{2016})\\ \sigma_{v_{\delta}}^{2} \end{pmatrix} \Delta t^{2} \end{equation} \noindent In Eq~\ref{eq:positionerr}, $(\sigma_{\alpha},\sigma_{\delta})$ are the corrected errors of RA and Dec. $(\sigma_{\alpha_{2016}},\sigma_{\delta_{2016}})$ are the errors of RA and Dec of the optical point sources at epoch 2016.0. $(\sigma_{v_{\alpha}},\sigma_{v_{\delta}})$ are the errors of proper motion in RA and Dec. \begin{figure}[ht!] \plotone{gaia3_point_source.pdf} \caption{The x-ray point sources used to register to optical counterparts from GAIA DR3. See Table~\ref{tab:sourcelist} for details on the individual sources.} \label{fig:pointsource} \end{figure} \begin{table*}[htb] \label{tbl:gaia.dr3.point.sources.2016} \caption{Gaia DR 3 point sources (Epoch 2016)} \begin{center} \label{tab:sourcelist} \begin{tabular}{ l|l c l c c c c c c} \hline\hline Source & RA & $\mathrm{RA_{error}}$ & Dec & $\mathrm{Dec_{error}}$ & PMRA & $\mathrm{PMRA_{error}}$ & PMDec & $\mathrm{PMDec_{error}}$ \\ ID & $\alpha$ deg & $\sigma_{\alpha}$ mas & $\delta$ deg & $\sigma_{\delta}$ mas & $v_{\alpha}$ $\mathrm{mas\, yr^{-1}}$ & $\sigma_{v_{\alpha}}$ $\mathrm{mas\, yr^{-1}}$ & $v_{\delta}$ $\mathrm{mas\, yr^{-1}}$ & $\sigma_{v_{\alpha}}$ $\mathrm{mas\, yr^{-1}}$ \\ \hline 1 & 170.94734977 & 0.41 & -59.30954920 & 0.39 & -7.00 & 0.55 & 3.30 & 0.43\\ 2 & 170.88732949 & 2.40 & -59.30245101 & 2.00 & 0.00 & 0.00 & 0.00 & 0.00\\ 3 & 171.29742299 & 0.05 & -59.24006532 & 0.04 & -10.09 & 0.05 & 4.36 & 0.04\\ 4 & 171.29006194 & 0.04 & -59.234464888 & 0.03 & -6.60 & 0.05 & 1.90 & 0.04\\ 5 & 171.31207660 & 0.03 & -59.226011711 & 0.03 & -6.61 & 0.04 & 1.94 & 0.03\\ 6 & 171.06676207 & 0.07 & -59.200712270 & 0.07 & -12.77 & 0.09 & 3.26 & 0.08\\ 7 & 171.10550819 & 0.01 & -59.388699202 & 0.01 & -21.10 & 0.01 & 4.37 & 0.01\\ 8 & 170.96760530 & 0.02 & -59.346279838 & 0.02 & -10.34 & 0.02 & 4.94 & 0.02\\ 9 & 171.10721361 & 0.02 & -59.201670503 & 0.02 & -21.53 & 0.02 & 6.82 & 0.02\\ \hline \end{tabular} \end{center} \end{table*} \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{point_source_6677.pdf} \caption{The GAIA point source position (blue crosses) at the epoch of the start time of \texttt{ObsID}\xspace 6677. White crosses indicate the X-ray source positions based on the PSF fit method. The red numbers in the upper left corners identify the sources used in the registration of this obsid, while white numbers indicate that the source was not included in the registration process.\label{fig:source6677}} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{point_source_6679.pdf} \caption{The GAIA point source position (blue cross) at the epoch of the start time of \texttt{ObsID}\xspace 6679. White crosses indicate the X-ray source positions based on the PSF fit method. The red numbers in the upper left corners identify the sources used in the registration of this obsid, while white numbers indicate that the source was not included in the registration process.\label{fig:source6679}} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{point_source_8221.pdf} \caption{The GAIA point source position (blue cross) at the epoch of the start time of \texttt{ObsID}\xspace 8221. White crosses indicate the X-ray source positions based on the PSF fit method. The red numbers in the upper left corners identify the sources used in the registration of this obsid, while white numbers indicate that the source was not included in the registration process.\label{fig:source8221}} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{point_source_19892.pdf} \caption{The GAIA point source position (blue cross) at the epoch of the start time of \texttt{ObsID}\xspace 19892. White crosses indicate the X-ray source positions based on the PSF fit method. The red numbers in the upper left corners identify the sources used in the registration of this obsid, while white numbers indicate that the source was not included in the registration process.\label{fig:source19892} } \end{figure*} \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{point_source_19899.pdf} \caption{The GAIA point source position (blue cross) at the epoch of the start time of \texttt{ObsID}\xspace 19899. White crosses indicate the X-ray source positions based on the PSF fit method. The red numbers in the upper left corners identify the sources used in the registration of this obsid, while white numbers indicate that the source was not included in the registration process . \label{fig:source19899}} \end{figure*} \section{Registration method} \label{sec:registration} Using point sources from each X-ray observation, we can register the observation by shifting the positions of the point sources, $(x,y)$, to match positions of the corresponding GAIA point sources, $(x_{0}, y_{0})$. The shifted positions are: \begin{equation} \begin{pmatrix} x^{\prime}\\ y^{\prime} \end{pmatrix} = \begin{pmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{pmatrix} \begin{pmatrix} x\\ y \end{pmatrix} + \begin{pmatrix} t_{1}\\ t_{2} \end{pmatrix} \end{equation} \noindent The parameters $a_{11}$, $a_{12}$, $a_{21}$, and $a_{22}$ account for the scale factor and rotation angle, while $t_{1}$, and $t_{2}$ account for the translation in the x and y directions. To match the positions of the point sources to those in the reference observation, $(x_{0},y_{0})$, we minimize a loss function which is weighted by the the position errors: \begin{equation} D=\sum^{n} \left(\left[1+\frac{(x^{\prime}-x_{0})^{2}}{\sigma_{x}^{2}+\sigma_{x_{0}}^{2}}+\frac{(y^{\prime}-y_{0})^{2}}{\sigma_{y}^{2}+\sigma_{y_{0}}^{2}}\right]^\frac{1}{2} - 1 \right) \end{equation} The loss function, $D$, is a sum of softened $L_1$ (absolute value) functions. The softened L1 varies quadratically near the minimum, but asymptotically approaches a linear variation with distance from the minimum. This is provided by the \texttt{soft\_l1} option of \texttt{python} routine \texttt{scipy.optimize.least\_squares}. This loss function is more robust than least-squares or chi-squared since the weighting of outliers approaches a linear rather than quadratic penalty. \color{black} Here $n$ is the number of matched point sources, $\sigma_{x}$ and $\sigma_{y}$ are the position error of the X-ray point sources at positions $(x,y)$; $\sigma_{x_{0}}$ and $\sigma_{y_{0}}$ are the position error of the GAIA point sources at positions $(x_{0},y_{0})$. The fitted parameters $a_{11}$, $a_{12}$, $a_{21}$, $a_{22}$, $t_{1}$ and $t_{2}$ will be used by the \textit{CIAO}\xspace tool \texttt{wcs\_update}, to update the aspect solution file and the WCS of each L2 event list for each observation which is registered to the reference GAIA point sources. Finally, the error of the registration method is estimated by the weighted average position residual of the matched point sources of the two observations: \begin{equation}\label{eq:regis_err} r=\frac{\sum^n (d/\sigma_{d}^2)} {\sum^n (1/\sigma_{d}^2)} \end{equation} \noindent In Eq~\ref{eq:regis_err}, $d$ is the position residual of the point sources after registration, $\sigma_{d}$ is the combined position error: \begin{equation} \begin{split} d &=\sqrt{(x^{\prime}-x_{0})^{2}+(y^{\prime}-y_{0})^{2}}\\ \sigma_{d}&=\sqrt{\sigma_{x^{\prime}}^{2}+\sigma_{x_{0}}^{2}+\sigma_{y^{\prime}}^{2}+\sigma_{y_{0}}^{2}} \end{split} \end{equation} \noindent The registration error of each X-ray observation to the GAIA point sources is shown in Table~\ref{tab:registration}. \begin{table}[htb] \caption{Registration error of X-ray data to Gaia point sources.} \begin{center} \label{tab:registration} \begin{tabular}{ l r r r r r} \hline\hline ObsID & 6677 & 6679 & 8221 & 19892 & 19899\\ \hline n & 7 & 7 & 5 & 5 & 6\\ $r^{*}$& $0.050\arcsec$ & $0.035\arcsec$ & $0.043\arcsec$ & $0.056\arcsec$ & $0.078\arcsec$\\ \hline \end{tabular} \begin{tablenotes} \footnotesize \tablenotetext{*} {Registration error} \end{tablenotes} \end{center} \end{table} We note here that our ultimate goal is to measure the motion of J1124--5916. Since we are using the positions of the GAIA stars to correct the astrometry of the Chandra observations, we must consider the effects of solar motion and of differential galactic rotation on the measured positions of the GAIA sources and J1124--5916 \citep[e.g.,][]{Halpern2015}. We have considered this effect and found that it results in at most a $0 \farcs 02$ difference in measured positions for our GAIA sources over the $\sim$ 10 year baseline between observations, and the effects of Galactic rotation will not be measurable in the reference frame of our GAIA field stars. \section{Proper motion of the pulsar} \label{sec:propermotion} To measure the proper motion of the pulsar, we employed a similar method to that used to determine the positions of the X-ray point sources. After registering the images with the new WCS, for each observation we extracted a $14.76\arcsec \times 14.76\arcsec$ box region around the pulsar. We used the pulsar image from observation \texttt{ObsID}\xspace 6677 as the ``template'' image, and the pulsar image from a later observation, for instance \texttt{ObsID}\xspace 19892, as the data image. In \textit{Sherpa}\xspace the template image was convolved with a 2-D symmetric Gaussian function plus a constant value to make a model image. The Gaussian function is used to reduce the Poisson error among the adjacent pixels, and the constant value is added to account for the difference of the sky background plus diffuse pulsar wind emission level. Even though the pulsar is embedded in a wind nebula and there is shocked ejecta and circumstellar material along the line of sight, it is nevertheless reasonable to assume that the sky background is homogeneous over the small extraction region. In the model image, the center, amplitude and sigma of the Gaussian function and the constant value are free to vary. The C-statistic is again used as the fit statistic. The difference between the fitted center of the Gaussian function $(x,y)$ and that of the center of the pulsar image for which the proper motion is being computed is the absolute shift in the position between the epochs. As in \S~2.2, we use the sherpa \texttt{conf} routine to determine this difference in two dimensions. However, in this case, we use the 2006 observation as our template image, instead of a raytrace of the PSF. The $1 \sigma$ errors of the center $(\sigma_{x},\sigma_{y})$ are calculated by varying the value of $x$ or $y$ along a grid of values while the values of all the other thawed parameters are allowed to float to new best-fit values. The measured shifts and inferred transverse velocities are listed in Table~\ref{tab:propermotion}. In Figure~\ref{fig:pulsarpm} we plot the difference images between the 2006 and 2016 observations; the resulting measurements are presented in Table~\ref{tab:propermotion}. Also shown in Figure~\ref{fig:pulsarpm} are vectors indicating the measured direction of motion of J1124--5916, with lengths that are proportional to the measured shift in the pulsar centroid. \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{g292_proper_motion.pdf} \caption{The difference counts images of the pulsar in the energy band 1.2--7.0 keV, in a $9\arcsec \times 7\arcsec$ region, binned to $1/4$ of ACIS sky pixel ($0\farcs123$). The salmon arrows indicate the direction of the proper motion. The salmon-colored arrows show the proper motions scaled by a factor of 10. \label{fig:pulsarpm}} \end{figure*} As indicated in Table~\ref{tab:propermotion}, the mean measured positional shift of J1124--5916 is $0.208 \arcsec \pm 0.010 \arcsec$. At a distance of 6.2 kpc to G292.0+1.8, this corresponds to a mean transverse velocity of $\mathrm{612\,km \, s^{-1} \pm 30\,km \, s^{-1}}$. Considering the registration errors of the observations to the GAIA point sources, there is a systematic error which should be added to the proper motion result. To combine the statistical uncertainty and the systematic error, we adopt the multiple imputation method to calculate the total error \citep{Lee2011}. Because the spread in the time deltas between our observations spans the narrow range of 9.96 yr to 10.05 yr, it is reasonable to assume the proper motion does not change within the precision of our measurement over that time period. We have six measurements of the proper motion. The average value of the six measurements is reported as the estimated proper motion. The statistical uncertainty is the average of each individual measurement. The systematic error is from the registration error, and is estimated from the variance of the six measurements. The total error is the combined statistical uncertainty and the systematic error, according to the Equations 4--6 in \citep{Lee2011}. Therefore, the proper motion velocity with the total error is $\mathrm{612\,km \, s^{-1} \pm 152\,km \,s^{-1}}$. \begin{table*}[htb] \caption{Proper motion measured between 2006 and 2016 observations and relative shifts of pulsar position between 2006 and 2016 epochs} \begin{center} \label{tab:propermotion} \begin{tabular}{ l c c c c c c c c} \hline\hline ObsID & 6677-19892 & 6677-19899 & 6679-19892 & 6679-19899 & 8221-19892 & 8221-19899 &average & total error\\ \hline $\mathrm{\Delta x\,(mas)}$ & $-162 \pm 20 $ & $-176 \pm 21 $ & $-229 \pm 20$ & $-203 \pm 19$& $-125 \pm 21$& $-112 \pm 20$& -168 & 52\\ $\mathrm{\Delta y\,(mas)}$ & $-118\pm 14$ & $-84\pm 14$ & $-158\pm 14$ & $-112\pm 14$ & $-142 \pm 15$ & $-106 \pm 15$ & -120 & 32\\ $\mathrm{\Delta R\,(mas)}$ & $201 \pm 24 $ & $195 \pm 25 $ & $278 \pm 25$ & $232 \pm 24$ & $189 \pm 26$ & $154 \pm 25$ & 208 & 52\\ $\mathrm{\Delta t\,(yrs)}$ & 9.97 & 10.02 & 10.02 & 10.05 & 9.96 & 10.00 & -- & --\\ $\mathrm{v\,(km\,s^{-1})}$ & $592\pm 71 $ & $572 \pm 73 $ & $ 816 \pm 73$ & $679 \pm 70$ & $558 \pm 76$ & $452 \pm 74$ & 612 & 152\\ Position angle & $126 \pm 7$ & $116 \pm 6$ & $125 \pm 5$ & $119 \pm 5$ & $139 \pm 8$ & $133 \pm 9$ & 126 & 17\\ \hline \end{tabular} \end{center} \end{table*} \section{Discussion} \label{sec:discussion} As mentioned in Section~\ref{sec:propermotion}, we measure a proper motion of 612 km s$^{-1}$ assuming a distance of 6.2 kpc. In Figure~\ref{fig:nskicks} we plot our measured kick velocity for the neutron star in G292 against the distribution of Galactic neutron stars presented in \citet{Hobbs2005}. We include recent results presented by \citet{Mayer2021} for a sample of central compact objects (CCOs) in SNRs, and the recent measurement of the pulsar proper motion in MSH 15--56 \citep{Temim2017}. As seen in Figure~\ref{fig:nskicks}, the proper motion of the neutron star in G292 lies at the higher end of the distribution of kick velocities for Galactic neutron stars, and has a transverse kick velocity similar to the pulsar located in MSH 15-56 \citep{Temim2017}. \citet{Wongwathanarat2013} noted that some neutrino-driven supernova models can impart kick velocities in excess of 600 km s$^{-1}$ within the first few seconds of core-collapse, but that study only considered 20 models, with a limited range of progenitor masses. Interestingly, Figure~8 of \citet{Wongwathanarat2013} suggests that the 20 M$_{\sun}$ progenitor model did not impart a large kick velocity on the neutron star. The progenitor mass for G292 is poorly constrained, with an estimate between 13--30 M$_{\sun}$ \citep{Bhalerao2019}, though a recent study by \citet{Jacovich2021} suggests a progenitor mass of $\sim$ 22~M$_{\sun}$. In this sense and in light of this new result, additional high fidelity simulations may be required in order to connect the measured kick velocity back to supernova explosion models. We also consider whether the kick velocity arises from anisotropic neutrino emission. \citet{Burrows2007} parametrized the degree of anisotropy as $\sin{(i)}$ and derived an expression for the kick velocity as: \begin{equation} V_k \sim 1000 \left(\frac{E_{SN}}{10^{51} \, \mathrm{erg}}\right) \sin{(i)} \, \mathrm{km \ s^{-1}}\, , \end{equation} \noindent For our measured value of 612 km s$^{-1}$ we require an explosion energy of $\sim$ 10$^{51}$ erg and a high degree of anisotropy is required ($\sin{(i)}$ $\sim$ 1). In studying the X-ray properties of the SNR shock, \citet{Lee2010} assumed an explosion energy of 0.5--1.0$\times$10$^{51}$ erg. The models of \citet{Jacovich2021} were tuned to match the $^{56}$Ni yields of 1D explosion models, with explosion energies of $\sim$ 8$\times$10$^{50}$ erg, which is bracketed by the assumed energies in \citet{Lee2010}. In order to match the blastwave kinematics, a lower explosion energy requires a lower ejecta mass. The cradle-to-grave models of \citet{Jacovich2021} give an ejecta mass of $\sim$ 10M$_{\sun}$, while those of \citet{Lee2010} range from $\sim$ 5 -- 20 M$_{\sun}$. 20 M$_{\sun}$ of ejecta seems unlikely, ruling out an explosion energy of 10$^{51}$ erg, unless the density of the circumstellar environment was considerably higher than what was assumed in \citet{Lee2010}. In light of this, we choose explosion energies of 0.5--0.8$\times$10$^{51}$ erg. This gives an asymmetry parameter $\sin{(i)}$ $\gtrsim$ 0.8. This degree of anisotropy is considerably higher than what is found for the neutron star in Puppis A \citep[e.g., $ \sin{(i)} $ $\sim$ 0.7;][]{Becker2012}, suggesting that the lower explosion energies required to explain the X-ray properties are only feasible if the explosion that imparted the high kick velocity on the G292 neutron star was highly asymmetric. \begin{figure*} \centering \includegraphics[width=\textwidth]{ns-velocity-histo-v002.png} \caption{Distribution of transverse neutron star kick velocities from \citet{Hobbs2005}. We overplot our measurement as well as measurements from recent studies. \textsc{References:} (a): This work; (b): \citet{Mayer2021}; (c): \citet{Mayer2020}; (d): \citet{Mignani2007,Mignani2019}; (e): \citet{Halpern2015}; (f): \citet{Temim2017}.} \label{fig:nskicks} \end{figure*} We are now in a position to compare the measured proper motion to the center of expansion as determined from optical observations \citep{Winkler2009} and from the distribution of intermediate mass elements in the shocked ejecta \citep{HollandAshford2017,Katsuda2018}. In Figure~\ref{fig:ns-pm} we project the motion of the neutron star back 3000 years, using our mean proper motion of $0\farcs021$ yr$^{-1}$. We also mark the geometric center of expansion and the center of mass for intermediate mass elements as measured by \citet{Katsuda2018}. Using the range of position errors, we find good agreement with our direction of motion and the center of expansion measured from proper motions of optical knots \citep{Winkler2009}. G292 is quoted as being 2990$\pm$60 years old \citep{Winkler2009}. As seen in Figure~\ref{fig:ns-pm}, our mean proper motion implies an age much closer to 2000 years old, suggesting that G292 might be the remnant of an historical supernova. Unfortunately, the low declination of G292 means that a historical companion to G292 would be below the horizon to Europe, China, and the Middle East \citep{Clark1976}. The closest historical SN is that of AD 185, but a reconstruction of the historical record places all candidate SNRs for that event in the range of 310--320$\degr$ in Galactic longitude \citep{Stephenson2002}. \begin{figure*} \centering \includegraphics[width=\textwidth]{pm-ns.png} \caption{Projection of G292 neutron star back to the center of expansion. The opening angle corresponds to the range of position angle (including the error on that angle). We assume the mean proper motion of $0\farcs021$ yr$^{-1}$. The blue shaded ellipse corresponds to the center of expansion from proper motion measurements of optical ejecta \citep{Winkler2009}. The magenta cross corresponds to the geometrical center of the X-ray emission, while the black cross corresponds to the center of mass for the distribution of intermediate mass elements \citep{Katsuda2018}. The length of each shaded segment corresponds to 1000 years of motion of the neutron star, assuming no deceleration.} \label{fig:ns-pm} \end{figure*} Lastly, we briefly comment on the kick direction with respect to the apparent rotation of the pulsar. In Figure~\ref{fig:ns-rot}, we show a zoomed in image of the pulsar wind nebula, with the direction of motion indicated. \citet{Park2007} first noted in a deep \textit{Chandra} observation of G292.0+1.8 the torus and jet structure in the PWN in high detail, with the jet appearing to be aligned along the north--south axis \citep[see inset of Figure~1;][]{Park2007}. The nearly north-south alignment of the jet is misaligned from the kick direction by $\sim$ 45$\degr$. This observed misalignment is consistent with recent results which demonstrated a seemingly random distribution of spin--kick alignments in 3D simulations of core-collapse supernovae \citep{Janka2022}, though at odds with observations of spin--kick alignment in other systems \citep[e.g.,][]{ng2007,noutsos2012,yao2021}. \begin{figure*} \centering \includegraphics[width=0.5\textwidth]{pulsar_wind_nebula.png} \caption{The pulsar and pulsar wind nebula image stacked from all 5 observations registered to the observation \texttt{ObsID}\xspace 6677. The bin size is 1/4 sky pixel ($0.123\arcsec$). The black arrow shows the proper motion direction of the pulsar; the length of the arrow is 10 times the measured shift of the pulsar. The image has been smoothed with a Gaussian kernel with a $\sigma$ of 1 bin and diameter of 5 bins.} \label{fig:ns-rot} \end{figure*} \section{Conclusions} \label{sec:conclusions} We measure a position shift of the pulsar in supernova remnant G292.2+1.8 of $0\farcs21 \pm 0\farcs05$ over a 10 year observation baseline. At a distance of $\sim$ 6.2 kpc, this corresponds to a transverse velocity of: $\mathrm{612\,km \, s^{-1} \pm 152\,km \, s^{-1}}$. The measured velocity of the pulsar is $\sim$ 30\% higher than the $\sim$ 450 km s$^{-1}$ which was determined by comparing the position of the pulsar to that of the optical center of expansion inferred from kinematic fits to the motion of O-rich ejecta knots which also give an age of $\lesssim$ 3000 yr \citep{Winkler2009}. We compute the degree of neutrino anisotropy which is required to impart a kick velocity of 600 km s$^{-1}$, and find that an extreme degree of anisotropy is required to explain the high velocity, unless the explosion energy was considerably higher than what is typically assumed. A high explosion energy is inconsistent with other observables in G292. We therefore conclude that the neutron star kick in G292 has a hydrodynamic origin. Lastly our new measured velocity suggests an age $\sim$ two-thirds of what is typically assumed. For a 2000 year old SNR, we explore the possibility that G292 is the result of a historical supernova. However, a literature search notes that the Galactic longitude of G292 is below the horizon for most northern hemisphere civilizations that might have observed it. The closest candidate is SN AD 185, which is still located several degrees in Galactic latitude and longitude from G292. There is no record in the literature of a SN being observed in the southern hemisphere in the direction of G292. \begin{acknowledgments} T.J.G, D.J.P, and P.P.P acknowledge support under NASA Contract NAS8-03060. X.L. acknowledges support from CXC grants SP8-19002X and GO9-20068X, and NASA grant 80NSSC18K0988. \end{acknowledgments} \vspace{5mm} \facilities{\textit{Chandra}\xspace, GAIA} \software{\textit{CIAO}\xspace\citep[v4.13;][]{fruscione2006}, \textit{MARX}\xspace\citep[v5.5.1;][]{davis2012}, \textit{SAOTrace}\xspace\citep[v2.05;][]{jerius2004}, \textit{Sherpa}\xspace\citep{freeman2001,doe2007,burke2020}, \textsc{AstroPy}\citep{astropy:2013,astropy:2018}}
\section{Introduction} \label{s.intro} The proton and neutron, known as nucleons, are the fundamental building blocks of all atomic nuclei, and themselves are emerged as strongly interacting and relativistic bound states of quarks and gluons of Quantum Chromodynamics (QCD). Understanding the internal structure of nucleons in terms of their constituents, quarks and gluons, and their interactions has been one of the central goals of modern particle and nuclear physics. However, owing to the color confinement of QCD, it has been an unprecedented intellectual challenge to explore and quantify the structure of nucleons without being able to see quarks and gluons directly. QCD color interaction is so strong at a typical hadronic scale ${\cal O}(\Lambda_{\rm QCD})\sim 1/R$ with a typical hadron radius $R\sim 1$~fm that any cross section with identified hadron(s) cannot be calculated fully in QCD perturbation theory. Fortunately, with the help of asymptotic freedom of QCD by which the color interaction becomes weaker and calculable perturbatively at short distances, the QCD factorization theorem~\cite{Collins:1989gx} has been developed to factorize the dynamics at different momentum scales to identify good cross sections (or good physical observables) whose leading non-perturbative dynamics can be organized into universal distribution functions, while other non-perturbative contributions are shown to be suppressed by inverse power of the large momentum transfer of the collision. Predictions follow when cross sections with different hard scatterings but the same nonperturbative distributions are compared. It is the QCD factorization for physical scattering processes with a large momentum transfer $Q\gg 1/R$ that has enabled us to probe the particle (or partonic) nature of quarks and gluons at the short-distance, and to connect them to observed hadron(s) in terms of universal distribution functions. With a set of well determined universal distribution functions to find a quark ($q$), antiquark ($\bar{q}$), or gluon ($g$) with a momentum fraction $x$ inside a colliding hadron of momentum $p$ with $xp\sim Q$, known as the parton distribution functions (PDFs) $f_{i/h}(x,\mu^2)$ for finding a parton of type $i=q,\bar{q},g$ inside a colliding hadron $h$ probed at a hard scale $\mu\sim Q$, QCD factorization formalism has been extremely successful in interpreting high energy experimental data from all facilities around the world, covering many orders in kinematic reach in both $x$ and $Q$ and as large as 15 orders of magnitude in difference in the size of observed scattering cross sections, which is a great success story of QCD and the Standard Model at high energy and has given us the confidence and the tools to discover the Higgs particle in proton-proton collisions \cite{CMS:2012qbp,ATLAS:2012yve}, and to search for the new physics \cite{CidVidal:2018eel}. However, the probe with a large momentum transfer $Q\, (\gg 1/R)$ is so localized in space that it is not very sensitive to the details of confined three-dimensional (3D) internal structure of the colliding hadron, in which a confined parton should have a characteristic transverse momentum scale $\langle k_T\rangle \sim 1/R \ll Q$ and an uncertainty in transverse position $\langle b_T\rangle \sim R \gg 1/Q$. Recently, new and more precise data are becoming available for {\it two-scale} observables with a hard scale $Q$ to localize the collision to probe the partonic nature of quarks and gluons along with a soft scale to be sensitive to the dynamics taking place at ${\cal O}(1/R)$. In addition, theoretical advances over the past decades have resulted in the development of QCD factorization formalism for two types of two-scale observables, distinguished by their inclusive or exclusive nature, which enables quantitative matching between the measurements of such two-scale observables and the 3D internal partonic structure of a colliding hadron. For inclusive two-scale observables, one well-studied example is the production of a massive boson that decays into a pair of measured leptons in hadron-hadron collisions (known as the Drell-Yan process), as a function of the pair's invariant mass $Q$ and transverse momentum $Q_T$ in the Lab frame \cite{Collins:1984kg}. When $Q \gg 1/R$, the production is dominated by the annihilation of one active parton from one colliding hadron with another active parton from the other colliding hadron, including quark-antiquark annihilation to a vector boson ($\gamma$, $W/Z$) or gluon-gluon fusion to a Higgs particle. When $Q\gg Q_T \gtrsim 1/R$, the measured transverse momentum of the pair is sensitive to the transverse momenta of the two colliding partons before they annihilate into the massive boson, providing the opportunity to extract the information on the active parton's transverse motion inside the colliding hadron, which is encoded in transverse momentum dependent (TMD) PDFs (or simply, TMDs), $f_{i/h}(x,k_T,\mu^2)$ \cite{Collins:2011zzd}. Like PDFs, TMDs are universal distribution functions to find a quark (or gluon) with a momentum fraction $x$ and transverse momentum $k_T$ from a colliding hadron of momentum $p$ with $xp\sim \mu\sim Q \gg k_T$, and describe the 3D motion of this active parton, its flavor dependence and its correlation with the property of the colliding hadron, such as its spin \cite{Bacchetta:2006tn,Diehl:2015uka,Sivers:1989cc,Collins:1992kk,Qiu:1991pp}. However, the probed transverse momentum $k_T$ of the active parton in the hard collision is {\it not} the same as the intrinsic or confined transverse momentum of the same parton inside a bound hadron. When the colliding hadron is broken by the large momentum transfer of the collision, a parton shower (the collision induced partonic radiation) is developed during the collision, generating additional transverse momentum to the probed active parton, which is encoded in the QCD evolution of the TMDs and could be non-perturbative, depending on the hard scale $Q$ and the phase space available for the shower~\cite{Collins:1984kg,Qiu:2000hf}. With more data from current and future experiments, including lepton-hadron semi-inclusive deep inelastic scatterings, better understanding of the scale dependence of TMDs could provide us with valuable information on the confined motion of quarks and gluons inside a bound hadron \cite{Accardi:2012qut, AbdulKhalek:2021gbh, Liu:2021jfp}. Without breaking the colliding hadron, the exclusive observables could provide different aspects of the hadron's internal structure. Since any cross section with identified hadron(s) cannot be calculated fully in QCD perturbation theory, it is necessary to have a hard scale $Q\gg 1/R$ for good exclusive observables for studying hadron's partonic structure. One classic example of exclusive hadronic observables is the high energy elastic $\pi$-scattering from atomic electrons \cite{Akerlof:1967zza}, from which the electromagnetic form factor $F_{\pi}(Q^2)$ of the pion could be extracted as a function of the invariant mass of the exchanged virtual photon momentum $q$ in the collision with $Q^2\equiv -q^2 \geq 0$. But, with the size and limited range of $Q^2$, the extracted form factor $F_{\pi}(Q^2)$ did not reveal much information on the partonic nature of the pion. On the other hand, when $Q^2\gg 1/R^2$, $F_{\pi}(Q^2)$ could be factorized in terms of a convolution of two pion distribution amplitudes (DAs), $\phi_{\pi}(x,\mu)$ with momentum fraction $x$ for an active quark, $1-x$ for the corresponding antiquark and factorization scale $\mu$, along with a perturbatively calculable short-distance coefficient function, as seen in eq.~\eqref{eq:pionFF}\footnote{where instead of $x$, variables $z_1$ and $z_2$ are used for parton momentum fractions of DAs.}. The contributions from the pion's partonic states beyond a pair of active quark and antiquark are expected to be suppressed by powers of $1/(QR)$ \cite{Brodsky:1989pv}. Various experimental efforts have been devoted to measure the pion form factors at larger momentum transfers, from which the pion DAs could be extracted \cite{JeffersonLabFpi:2000nlc,JeffersonLabFpi-2:2006ysh,JeffersonLabFpi:2007vir}. However, with the \textit{localized} single hard interaction from the exchanged virtual photon, the factorized pion form factor $F_{\pi}(Q^2)$ is not very sensitive to the detailed shape of $\phi_{\pi}(x,\mu)$ as a function of $x$, other than the integral of $\phi_{\pi}(x,\mu)$ over $x$; see the discussion following eq.~\eqref{eq:H4pionFF}. \begin{figure}[htb] \begin{center} \begin{minipage}[c]{0.25\textwidth} \includegraphics[width=0.99\textwidth]{figures/dvcs.pdf} \\ \end{minipage} $+ ...$\hskip 0.03\textwidth \begin{minipage}[c]{0.25\textwidth} \includegraphics[width=0.99\textwidth]{figures/dvmp.pdf} \\ \end{minipage} $+ ...$\hskip 0.03\textwidth \begin{minipage}[c]{0.25\textwidth} \includegraphics[width=0.99\textwidth]{figures/dvhq.pdf} \\ \end{minipage} $+ ...$ \\ \hskip -0.055\textwidth (a) \hskip 0.29\textwidth (b) \hskip 0.29\textwidth (c) \caption{Sample two-scale observables from exclusive deeply virtual lepton-hadron scattering: (a) deeply virtual Compton scattering (DVCS), (b) deeply virtual meson production (DVMP), and (c) deeply virtual heavy quarkonium production (DVQP). } \label{figuredvlhs} \end{center} \end{figure} Nucleon's internal structure could be much more rich and complex than the pion structure. QCD factorization of hard exclusive processes involving nucleons, such as large angle exclusive hadronic scattering, could be worked out, but, the corresponding calculations are much more difficult \cite{Brodsky:1989pv}. On the other hand, exclusive lepton-nucleon scattering with a virtual photon of invariant mass $Q^2\gg 1/R^2$ could provide various two-scale observables, such as those in figure~\ref{figuredvlhs}, where the hard scale is $Q^2\equiv -q^2$ and the soft scale is $t\equiv (p-p')^2$. When $Q^2\gg |t|$, which is equivalent to requiring the time scale of the partonic hard collision $\sim 1/Q$ to be much shorter than the lifetime of the exchanged partonic states $\sim 1/\sqrt{|t|}$, these two-scale exclusive processes are dominated by the exchange of an active $q\bar{q}$ or $gg$ pair, as shown in figure~\ref{figuredvlhs}, and can be systematically treated in QCD factorization approach~{\cite{Collins:1997hv,Collins:1996fb,Collins:1998be}. The hadronic properties of the diffracted nucleon, the bottom part of the diagrams in figure~\ref{figuredvlhs}, could be represented by generalized parton distribution functions (or simply, GPDs), $f_{i/h}(x,\xi,t,\mu)$, where $\xi\equiv (p-p')^+/(p+p')^+$. The $(p-p')^+ = 2\xi [(p+p')^+/2]$ represents a total light-cone momentum transfer between the diffracted nucleon $h$ and the hard partonic collision, where the light-cone components are defined as $v^{\pm}=(v^0\pm v^z)/\sqrt{2}$ for any four vector $v^\mu$. The GPDs were introduced by D.~M\"{u}ller {\it et al.} in 1994~\cite{Muller:1994ses}, and their important roles in charactering hadron's partonic structure were further established by pioneering work in \cite{Ji:1996ek,Radyushkin:1997ki} and many years' theoretical development since then, which could be summarized in the reviews~\cite{Goeke:2001tz,Diehl:2003ny,Belitsky:2005qn,Boffi:2007yc} and references therein. By Fourier transforming the transverse component of the momentum transfer $(p-p')_T$ to position space $b_T$ in the forward limit, $p'^+\to p^+$ (or $\xi\to 0$), the transformed GPD as a function of $b_T$ provides a transverse spatial distribution of quarks or gluons inside a colliding hadron at different values of momentum fraction $x$ \cite{Burkardt:2000za}, That is, measuring GPDs could provide an opportunity to study QCD tomography to obtain images of the transverse spatial densities of quarks and gluons slicing at different momentum fraction $x$ inside a colliding hadron. Their spatial $b_T$ dependence could allow us to define an effective hadron radius in terms of its quark (or gluon) spatial distributions, $r_q(x)$ (or $r_g(x)$), as a function of $x$, in contrast to its electric charge radius, allowing us to ask some interesting questions, such as should $r_q(x) > r_g(x)$ or vice versa, and could $r_g(x)$ saturate if $x\to 0$, which could reveal valuable information on how quarks and gluons are bounded inside a hadron. Although we could expect that $r_q(x)$ (or $r_g(x)$) is small at large $x$ and increases when $x$ decreases, as demonstrated in explicit model calculations \cite{Burkardt:2002hr}, it is the precise knowledge of GPDs as functions of the parton flavor and kinematic variables, $(x,\xi, t)$, that is needed for us to address these kinds of interesting and fundamental questions about the hadron, in particular, the proton and neutron, the fundamental building blocks of our visible world. However, as clearly evident from the leading order diagrams in figure~\ref{figuredvlhs}, the scattering with the exchange of a single virtual photon in figure~\ref{figuredvlhs} is effectively an exclusive $2\to 2$ process: $\gamma^*(q)+h(p)\to X(q')+h'(p')$ with a final-state particle $X=\gamma, \pi, {\rm J}/\psi, ...$, whose momentum is uniquely fixed by the virtual photon momentum $q$ and total momentum transfer $(p-p')$ from the diffracted hadron (or $\xi$- and $t$-dependence of GPDs). Any sensitivity to the dependence of GPDs on the momentum fraction $x$, which is proportional to the relative momentum of the active quark and antiquark in figure~\ref{figuredvlhs}(a) and (b), or the two gluons in figure~\ref{figuredvlhs}(c), has to come from high order contribution and scale dependence of the process. More specifically, let's consider the deeply virtual Compton scattering (DVCS), first introduced in~\cite{Ji:1996nm}, as sketched in figure~\ref{figuredvlhs}(a). The DVCS cross section can be naturally expressed in terms of Compton form factors (CFFs), which are then factorized as convolutions of GPDs with perturbatively calculable coefficients according to QCD factorization~\cite{Radyushkin:1997ki,Ji:1998xh,Collins:1998be}. Extracting full details of GPDs from CFFs is a challenging inverse or deconvolution problem~\cite{Kumericki:2016ehc}. Due to the lack of sensitivity on the $x$-dependence for CFFs, it was shown \cite{Bertone:2021yyz} that based on a next-to-leading order analysis and a careful study of evolution effects, the reconstruction of GPDs from DVCS measurements does not possess a unique solution. Actually, two sample GPDs with different $x$-dependence can both fit the same CFFs \cite{Bertone:2021yyz}. \begin{figure}[htb] \begin{center} \begin{tabular}{ccc} \includegraphics[scale=0.6]{figures/emgg.pdf} & \includegraphics[scale=0.6]{figures/emdy.pdf} & \includegraphics[scale=0.6]{figures/emgg-t0.pdf} \\ (a) & (b) & (c) \end{tabular} \caption{ Exclusive massive photon-pair (a) and lepton-pair (b) production in pion-nucleon collision, and (c) the photon-pair productions when $|t| \equiv |(p-p')^2| \to 0$. } \label{figureempp} \end{center} \end{figure} Meanwhile, new exclusive diffractive processes have been introduced to enhance our capability to extract various GPDs from experimental measurements. Instead of the lepton-nucleon scattering in figure~\ref{figuredvlhs}, it was proposed to study the diffractive photo-production of a massive photon pair: $\gamma(q)+N(p_1)\to \gamma(k_1)+\gamma(k_2)+N'(p_2)$ with the pair's invariant mass $M_{\gamma\gamma}\gg\Lambda_{\rm QCD}$~\cite{Pedrak:2017cpp,Pedrak:2020mfm,Grocholski:2021man,Grocholski:2022rqj}. Similarly, the diffractive photo-production of a massive photon and meson pair: $\gamma(q)+N(p_1)\to \gamma(k_1)+\rho(k_2)+N'(p_2)$~\cite{Boussarie:2016qop} and $\gamma(q)+N(p_1)\to \gamma(k_1)+\pi^\pm(k_2)+N'(p_2)$~\cite{Duplancic:2018bum}, as well as the diffractive production of two jets with a large invariant mass~\cite{Golec-Biernat:1998exl,Braun:2005rg,Ji:2016jgn} were also proposed. Unlike the lepton-scattering processes in figure~\ref{figuredvlhs}, whose factorization was proved by Collins {\it et al.}~\cite{Collins:1997hv,Collins:1996fb,Collins:1998be}, the challenge for these new processes has been the lack of the same level of justification for the QCD factorization. In this paper, we study exclusive pion-nucleon diffractive production of a pair of high transverse momentum photons: $\pi(p_\pi)+N(p)\to \gamma(q_1) +\gamma(q_2) +N'(p')$, as sketched in figure~\ref{figureempp}(a), with the photon's transverse momentum with respect to the collision axis between the colliding pion and the quark-antiquark pair from the diffracted nucleon being $q_T=|q_{1T}| = |q_{2T}| \gg \Lambda_{\rm QCD}$. Similar to the exclusive Drell-Yan process in pion-nucleon collision in figure~\ref{figureempp}(b)~\cite{Berger:2001zn}, or the exclusive deeply virtual lepton-hadron scattering processes in figure~\ref{figuredvlhs}, the $\pi N$ scattering process of our consideration in figure~\ref{figureempp}(a) is also a $2\to 3$ exclusive process with a diffractive nucleon. Instead of measuring the lepton pair from the decay of a massive virtual photon in figure~\ref{figureempp}(b), or the scattered lepton to have the deeply virtual photon in figure~\ref{figuredvlhs}, the hard scale of this new type of exclusive two-scale processes is provided by the large transverse momentum $q_T$, which flows between the two back-to-back photons. The soft scale of this new type of two-scale processes is provided by $t=(p-p')^2$, the invariant mass squared of momentum transfer from the diffractive nucleon, which is the same as the soft scale of those exclusive processes in figure~\ref{figuredvlhs} and \ref{figureempp}(b). With $q_T\gg \sqrt{-t}$, we demonstrate that this new observable can be systematically studied in terms of QCD factorization approach with the same level of justification as those in figure~\ref{figuredvlhs}, and our factorization arguments can be generalized to the similar type of exclusive processes, including some mentioned above. We also show that this observable can be not only a good probe of the factorized GPDs, complementary to those known exclusive processes, but also capable of providing more sensitivity to the much needed $x$-dependence of GPDs. When the hard scale $q_T$ is sufficiently large, the diffractive scattering on the nucleon $N(p)$ is likely dominated by an exchange of a quark-antiquark pair, as indicated in figure~\ref{figureempp}(a), pulling more physically polarized partons into the hard collision would be suppressed by powers of $q_T^{-1}/R$. Depending on the momentum flow of the active quark and antiquark, there are two distinctive kinematic regions for this exclusive process: (1) both active quark and antiquark have their momenta flowing into the hard part, as indicated in figure~\ref{figureempp}(c), and (2) only one of the active partons (quark or antiquark) has its momentum entering into the hard collision while the other has its momentum flowing out the hard collision to recombine with the spectators to form the diffracted hadron $N'(p')$, as sketched in figure~\ref{figureempp}(a). As explained in Sec.~\ref{s.pih2gg}, the factorization proof for these two regions requires different consideration due to the characteristic difference of soft gluons in the Glauber region. Once factorized, the region (1) gets contribution from the ERBL region of GPDs, while the other is relevant to the GPDs' DGLAP region~\cite{Diehl:2003ny}. When $|t|\to 0$, while $q_T^2 \gg \Lambda_{\rm QCD}^2$, the diffractive scattering with the nucleon in figure~\ref{figureempp}(c) is kinematically similar to the Sullivan process in lepton-nucleon scattering \cite{Sullivan:1971kd} and becomes sensitive to the nucleon's pion cloud. The production of the massive photon-pair in this kinematic regime ($|t|\to 0$) could be viewed approximately as an annihilation of a real pion and a virtual (or almost real) pion of the colliding nucleon. To help present our justification of QCD factorization for exclusive massive photon-pair production in pion-nucleon collision in figure~\ref{figureempp}(a), we first demonstrate how the exclusive scattering amplitude of a simpler exclusive process, $\pi^+(p_1)+\pi^-(p_2)\to \gamma(q_1)+\gamma(q_2)$ with $q_T\gg \Lambda_{\rm QCD}$ in figure~\ref{fig:pipi_LO}, can be systematically factorized into a convolution of two pion DAs along with an infrared safe and perturbatively calculable short-distance coefficient in Sec.~\ref{s.toy}. With the large transverse momentum flow from one photon to the other through the hard scattering, interfering with the relative momentum flow between the active quark and antiquark of the colliding pion(s), the $q_T$ distribution of one of the two produced photons (or the equivalent $\cos\theta$ distribution of the photon with respect to the collision axis in the pair's rest frame) can be sensitive to the momentum difference between the quark and antiquark of colliding pion(s), providing the sensitivity to the shape of factorized pion DAs. In Sec.~\ref{s.pih2gg}, we extend our collinear factorization arguments for the single-scale exclusive process: $\pi^+(p_1)+\pi^-(p_2)\to \gamma(q_1)+\gamma(q_2)$ to the two-scale exclusive observable: $\pi(p_\pi) + N(p) \to \gamma(q_1)+\gamma(q_2)+N'(p')$ with $q_T\gg \sqrt{|t|}$. With the nonlocal color coherence between the incoming and the outgoing (or diffracted) nucleon, the $N$ and $N'$, we need additional discussions and reasoning for justifying the factorization of soft gluon interactions for this two-scale observable. We argue that when $q_T \gg \sqrt{|t|}$, the leading contribution to exclusive scattering amplitude of $\pi(p_\pi) + N(p) \to \gamma(q_1)+\gamma(q_2)+N'(p')$ can be factorized into the universal GPDs convoluted with a pion DA along with infrared safe and perturbatively calculable coefficients. The corrections to this factorized expression is suppressed by powers of $|t|/q_T^2$. We show that by extending the $\pi^+\pi^-$ process to $\pi N$ process, the scattering amplitude develops both real and imaginary parts, both of which contribute to the cross section, and contains contributions from both unpolarized and polarized GPDs. Consequently, this new type of two-scale exclusive processes can be sensitive to both unpolarized and polarized GPDs. In Sec.~\ref{s.numerical}, we demonstrate numerically the sensitivity of this new type of exclusive high transverse momentum observables to the functional forms of pion DAs and nucleon GPDs in terms of their $x$-dependence. We introduce a flexible parametrization for DAs and a simplified version of the GK model for nucleon GPDs \cite{Goloskokov:2005sd,Goloskokov:2007nt,Goloskokov:2009ia} with parameters to adjust their dependence on the parton momentum fraction. With our perturbatively calculated short-distance coefficients and our models for nucleon GPDs and pion DAs, we show explicitly how sensitive this exclusive production of a pair of high-$q_T$ photons can be to the shape of nucleon GPDs and pion DAs as functions of $x$. We also point out that such sensitivity could be enhanced with improved high-order calculation of the short-distance coefficients so that they are more perturbatively reliable at the end points where the momentum fraction of active parton from DAs and GPDs vanishes. Finally, in Sec.~\ref{s.outlook}, we present our summary and outlook on opportunities to measure this new type of exclusive process at J-PARC and other facilities. We also discuss possibilities of additional two-scale observables of this type, which have the hard scale provided by the large transverse momentum $q_T$ of two exclusively produced ``back-to-back" final-state particles (or jets) with $q_T\gg\sqrt{|t|}\gtrsim\Lambda_{\rm QCD}$. The results of the hard coefficients are presented in the Appendix. \section{Exclusive production of a pair of high transverse momentum photons in a $\pi^+\pi^-$ annihilation} \label{s.toy} Exclusive production of a pair of high transverse momentum photons in $\pi^+\pi^-$ annihilation, as sketched in figure~\ref{fig:pipi_LO}, has a single observed hard scale, $q_T$, the transverse momentum of one of the two produced photons with respect to the $\pi^+\pi^-$ collision axis. The large scale $q_T$ leads to a point-like interaction that is sensitive to the partonic structure of the pions. It is then natural to consider QCD collinear factorization approach for studying this exclusive process. We show in this section that when $q_T \gg \Lambda_{\rm QCD}$, the scattering amplitude of this exclusive process can be factorized in terms of two pion DAs and a perturbatively calculable hard part, with corrections suppressed by powers of $1/q_T$. One of the main steps in deriving the factorization is to deform the soft gluon momenta out of the Glauber region. This is straightforward for the $\pi^+\pi^-$ annihilation process because there is no pinch in the Glauber region, as we will show below. When we generalize the factorization formalism to the diffractive $\pi N$ process in Sec.~\ref{s.pih2gg}, an additional kinematic region, referred to as DGLAP region for GPD, appears, for which the soft gluon momentum is partly pinched in the Glauber region, and some modification is needed to prove the factorization. \begin{figure}[htb] \begin{center} \hskip0.05in \begin{minipage}[c]{0.35\textwidth} \includegraphics[width=0.99\textwidth]{figures/pi-pi_diphoton.pdf} \end{minipage} \hskip 0.02\textwidth \begin{minipage}[c]{0.61\textwidth} \includegraphics[width=0.99\textwidth]{figures/pipi2gg-LO.pdf} \end{minipage} \\ \vspace{0.1in} \hskip -0.12\textwidth (a) \hskip 0.46\textwidth (b) \caption{ (a) Exclusive massive photon-pair production in $\pi^+\pi^-$ annihilation, and (b) sample diagram to show the existence of perturbative pinch needed to separate the dynamics at different scales. } \label{fig:pipi_LO} \end{center} \end{figure} \subsection{The process and corresponding kinematics} \label{ss.definion} We study the exclusive production of a pair of high transverse momentum back-to-back photons in $\pi^+\pi^-$ annihilation in the center-of-mass (CM) frame of the collision, \begin{equation} \pi^+(p_1) + \pi^-(p_2) \longrightarrow \gamma(q_1) + \gamma(q_2)\, , \end{equation} as sketched in figure~\ref{fig:pipi_LO}(a), where $\pi^+$ moves along $+\hat{z}$ direction and $\pi^-$ along $-\hat{z}$ direction. The scattering amplitude of this exclusive process is defined as \begin{equation} {\cal M}_{\pi^+\pi^- \to \gamma(\lambda)\gamma(\lambda')} \equiv \varepsilon^{\lambda *}_{\mu}(q_1)\, \varepsilon^{\lambda' *}_{\nu}(q_2) \, {\cal M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma} \, , \end{equation} where $\varepsilon^{\lambda}_{\mu}(q)$ is the polarization vector for a photon of momentum $q$ and polarization $\lambda$. In the CM frame of this $2\to 2$ process, the energy of the colliding pion is the same as the energy of the observed photon and equal to $\sqrt{s}/2$ with $s=(p_1+p_2)^2 = (q_1+q_2)^2 = \hat{s}_{\gamma\gamma} \gg \Lambda_{\rm QCD}^2$. By requiring $q_T\gg\Lambda_{\rm QCD}$, we can safely neglect the pion mass $m_{\pi}$ in the following discussion of the leading power QCD factorization of this process in the power expansion of $1/q_T$. Using the light-cone coordinates defined with respect to the $\hat{z}$ axis, we define all the relevant momenta as follows, \begin{subequations} \label{eq:kin} \begin{align} p_1 &= \left( p_1^+, \; \frac{m_{\pi}^2}{2 p_1^+} , \; \bm{0}_T \right) \simeq \left( p_1^+, \; 0^- , \; \bm{0}_T \right), \\ p_2 &= \left( \frac{m_{\pi}^2}{2 p_2^-} ,\; p_2^-, \; \bm{0}_T \right) \simeq \left( 0^+,\; p_2^-, \; \bm{0}_T \right), \\ q_1 &= \left( q_1^+,\; \frac{q_T^2}{2 q_1^+},\; -\bm{q}_T \right), \\ q_2 &= \left( \frac{q_T^2}{2 q_2^-},\; q_2^-,\; \bm{q}_T \right), \end{align}\end{subequations} where $q_T\equiv |\bm{q}_T|$. Introducing the light-cone unit vectors, \begin{equation} \bar{n}^{\mu}=(1,0,\bm{0}_T),\quad n^{\mu}=(0,1,\bm{0}_T),\quad n^{\mu}_T=(0,0,\bm{1}_T), \label{eq:n nb} \end{equation} with $\bar{n}^2=n^2=0$, $\bar{n}\cdot n =1$, $\bar{n}\cdot n_T = n\cdot n_T=0$, and $n_T^2=-1$, we can express the momenta of colliding pions as $p_1^\mu = \sqrt{s/2}~\bar{n}^\mu$ and $p_2^\mu = \sqrt{s/2}~{n}^\mu$ in the CM frame. Similarly, the observed photon momenta $q_1$ and $q_2$ are fully determined once $\bm{q}_T$ is specified, \begin{subequations}\label{eq:kin q12} \begin{align} q_1 &= \left( \frac{p_1^+}{2} \left( 1 \pm \sqrt{1-\kappa} \right),\, \frac{p_2^-}{2} \left( 1 \mp \sqrt{1-\kappa} \right),\, -\bm{q}_T \right) \, , \\ q_2 &= \left( \frac{p_1^+}{2} \left( 1 \mp \sqrt{1-\kappa} \right),\, \frac{p_2^-}{2} \left( 1 \pm \sqrt{1-\kappa} \right),\, \bm{q}_T \right) \, , \end{align} \end{subequations} where $\kappa=4q_T^2/s \leq 1$, $p_1^+ = p_2^- = \sqrt{s/2}$ in the CM frame, and the $\pm$ solution refers to $q_1$ goes to the forward ($+\hat{z}$) or backward ($-\hat{z}$) direction. \subsection{All-order factorization of exclusive scattering amplitude} \label{sec:factorization1} The development of factorized cross sections starts with an examination of scattering amplitudes in terms of general properties of Feynman diagrams in QCD perturbation theory. When $q_T \sim \sqrt{s}$ becomes large, the exclusive $\pi^+\pi^-$ annihilation process, as sketched in figure~\ref{fig:pipi_LO}(a), is associated with two distinctive scales: (1) the hard scale $q_T$ characterizing the short-distance (perturbative) hard collision to produce the massive photon pair, as shown by the middle blob of the diagram in figure~\ref{fig:pipi_LO}(b), and (2) the soft scale ${\cal O}(m_{\pi})\sim \Lambda_{\rm QCD}$ characterizing the long-distance (non-perturbative) hadronic dynamics associated with the colliding pions. A consistent separation of QCD dynamics taking place at these two distinctive scales can lead to a factorization formalism, which is an approximation up to corrections suppressed in power of $m_{\pi}/q_T$. The validity of perturbative QCD factorization formalism requires the suppression of quantum interference between the dynamics taking place at these two different momentum scales. That is, the dominant contributions to the factorized formalism should necessarily come from the phase space where the active parton(s) linking the dynamics at two different scales are forced onto their mass shells, and are consequently long-lived compared to the time scale of the hard collision. For example, for the exclusive scattering amplitude in figure~\ref{fig:pipi_LO}(b), the suppression of quantum interference between the dynamics taking place in the middle blob at ${\cal O}(q_T)$ and the blobs on its left and right associated with the colliding pions requires us to demonstrate that the active quark, antiquark and gluon(s) from the colliding pions are effectively forced to be near their mass shells. However, all internal loop momentum integrals to any scattering amplitude are defined by contours in complex momentum space, and it is only at momentum configurations where some subset of loop momenta are pinched that the contours are forced to or near mass-shell poles that correspond to long-distance behavior. These ‘‘pinch surfaces’’ in multidimensional momentum space can be classified according to their {\it reduced diagrams}, found by contracting off-shell lines to points, from which we then derive the factorization formalism. \subsubsection{Reduced diagrams and leading pinch surfaces} \label{sec:rd} Reduced diagrams specify the regions in the multidimensional loop momentum space that give dominant contributions to the loop integrals. Such leading regions are more conveniently realized in cut diagram notation of inclusive cross sections, in which graphical contributions to the cross sections are represented by the scattering amplitude to the left of the final state cut and the complex conjugate amplitude to the right. In the complex conjugate graphs all roles of momentum integrals are reversed with an opposite sign of $i\epsilon$, which are responsible for the pinched poles associated with initial- and final-state interactions. However, for the factorization of exclusive scattering amplitudes, like the one in figure~\ref{fig:pipi_LO}(b), all partons are internal and virtual. Their pinched poles, if there is any, do not come from the pair of the same propagators in the amplitude and its complex conjugate amplitude, since the momentum flows through them do not have to be the same in the amplitude and its complex conjugate amplitude. For the exclusive scattering amplitudes, like the one in figure~\ref{fig:pipi_LO}(b), it is the integration of the relative momentum of any two active partons that pinches their momenta to be approximately on mass-shell if the invariant mass of these two active partons from the colliding pion is much smaller than their total energy. We illustrate this pinch of loop momenta by using the sample diagram in figure~\ref{fig:pipi_LO}(b) and labeling the active quark and antiquark momenta from $\pi^+$ on the left as $k_q=K/2 + k$ and $k_{\bar{q}}=K/2-k$, respectively. The scattering amplitude in figure~\ref{fig:pipi_LO}(b) then takes the form, \begin{eqnarray} \label{eq:amplitude} {\cal M}(q_T,s) &\propto & \int \frac{d^4K}{(2\pi)^4} \int \frac{d^4k}{(2\pi)^4}\, {\rm Tr}{\Big [} \hat{R}_{\pi^-}(p_2,l_j)\otimes_{l_j} \hat{H}(K,k,k_i; l_j; q_T,s) \nonumber\\ && {\hskip 0.6in}\otimes_{k_i} \frac{\gamma\cdot(K/2+k)}{(K/2+k)^2+i\epsilon}\, \hat{D}_{\pi^+}(p_1,K,k,k_i) \, \frac{-\gamma\cdot(K/2-k)}{(K/2-k)^2+i\epsilon} {\Big ]} \, , \end{eqnarray} where $\hat{H}$ and $\hat{R}_{\pi^-}$ represent the middle blob and right-hand-side of the diagram, respectively, the $\otimes_{l_j}$ and $\otimes_{k_i}$ indicate the convolution of parton momenta $l_j$ and $k_i$, respectively, with $i,j=1,2,...$, $\hat{D}_{\pi^+}$ represents the DA of the $\pi^+$ of momentum $p_1$, and $K$ and $k$ are the total and relative momentum of the active quark-antiquark pair on the left. If the total momentum of the pair is dominated by $K^+$, we can identify the relevant perturbative contribution from the integration of $k$ in eq.~\eqref{eq:amplitude} by examining the pole structure of its $k^-$ integration. From the denominators of eq.~\eqref{eq:amplitude}, we have the two poles for $k^-$, \begin{subequations}\label{eq:pinch} \begin{align} k^- &= \frac{-1}{K^+} \left[ \frac{K^2}{4} - \frac{k_T^2 }{ 1 + 2k^+/K^+} \right] - i\epsilon \, \sgn{K^+ + 2k^+} {\hskip 0.2in} \rightarrow\ \ 0 - i\epsilon, \\ k^- &= \frac{1}{K^+} \left[ \frac{K^2}{4} - \frac{k_T^2 }{ 1 - 2k^+/K^+} \right] + i\epsilon \, \sgn{K^+ - 2k^+} {\hskip 0.2in} \rightarrow -0 + i\epsilon \, , \end{align} \end{subequations} where we neglected the quark mass and overall transverse momentum of the pair $K_T$. These two denominators pinch the $k^-$ integral, when the total energy of the pair (or its light-cone momentum $K^+$) is much larger than the virtuality of the pair, so long as we are away from the region $k^+ \to \pm K^+/2$, where the quark (or antiquark) of the pair carries all the momentum while the other carries none. We should assume that this region is strongly suppressed by the $\pi$'s DA when $p_1^+\gg m_\pi$. It is then clear from eq.~\eqref{eq:pinch} that the contributions from the diagram in figure~\ref{fig:pipi_LO}(b) are forced into the region of phase space where the active quark and antiquark are both close to their mass shells. The same consideration can be applied to any pair of almost parallel active partons from the nonperturbative blob either on the left or the right in figure~\ref{fig:pipi_LO}(b). That is, at the amplitude level, pinches happen among each pair of collinear partons from either the $\pi^+$ or $\pi^-$ side, as long as their total energy (or light-cone plus or minus momentum) is much greater than their invariant mass, which means that those partons evolve well before they enter the short-time hard interaction. Therefore, it is possible to factorize the two non-perturbative blobs associated with $\pi^+$ and $\pi^-$, respectively, from the short-distance hard scattering process. \begin{figure}[htbp] \centering \includegraphics[scale=0.75]{figures/pion_pion_reduced_diagram.pdf} \caption{General reduced diagram for the scattering amplitude of exclusive annihilation process for $\pi^+\pi^-\to\gamma\gamma$. Both dashed and solid lines can represent quarks and/or gluons. } \label{fig:pi-pi-reduced-graph} \end{figure} The generalization of the above pinch analysis leads to the so-called Libby-Sterman analysis~\cite{Libby:1978qf, Libby:1978bx}, by which all loop momenta can be categorized into three groups: hard, collinear and soft, which we do not repeat here. Each external particle is associated with a group of collinear lines. With the assumption that the two observed high-$q_T$ photons are produced in the same hard scattering, the relevant reduced diagrams for the exclusive $\pi^+\pi^-\to\gamma\gamma$ scattering amplitude are illustrated in figure~\ref{fig:pi-pi-reduced-graph}. At the pinch surfaces, there are two groups of collinear lines associated with the directions of colliding $\pi^+$ and $\pi^-$, respectively, shown as solid lines, and a hard part for the exclusive production of two back-to-back high-$q_T$ photons. We can have an arbitrary number of collinear lines attaching the collinear subgraph $\hat{D}_1$ or $\hat{D}_2$ to the hard subgraph $\hat{H}$. In addition, we can have an arbitrary number of soft lines attaching to $\hat{D}_1, \hat{D}_2$ and/or $\hat{H}$, represented by the dashed lines. Important contributions to the exclusive scattering amplitude come from the neighborhood of the pinch surfaces characterized by the reduced diagram in figure~\ref{fig:pi-pi-reduced-graph}, but, not all of them contribute to the leading power term in $1/q_T$ expansion. The leading pinch surfaces, contributing to the leading power, can be identified and determined by performing a power-counting analysis for the neighborhood of the reduced diagram in figure~\ref{fig:pi-pi-reduced-graph}. We characterize these regions of momentum space by introducing dimensionless scaling variables, denoted as $\lambda$, which control the relative rates at which components of loop momenta vanish near the pinch surfaces. A leading region is the one for which a vanishing region of loop momentum space near a pinch surface produces leading power behavior in $1/q_T$ expansion. For the loop momenta $k_i$ and $l_j$, which attach $\hat{D}_1$ and $\hat{D}_2$ to the $\hat{H}$, respectively, we choose \begin{equation} k_i \sim \left( 1,\, \lambda^2,\, \lambda \right) Q \quad {\rm and} \quad l_j \sim \left( \lambda^2,\, 1,\, \lambda \right)Q\, , \label{eq:co-scaling} \end{equation} with $Q\sim {\cal O}(q_T) \gg \Lambda_{\rm QCD}$ as a characteristic hard scale and $\lambda \sim {\cal O}(\Lambda_{\rm QCD}/Q)$. We have $k_i^2\sim {\cal O}(\lambda^2Q^2)\to 0$ and $l_j^2\sim {\cal O}(\lambda^2Q^2)\to 0$ to quantify how the loop momenta approach to the pinch surface as $\lambda\to 0$. We choose the momentum of the soft loops to have the following scaling behavior, \begin{equation} k_s \sim \left( \lambda_s,\, \lambda_s,\, \lambda_s \right) Q\, , \label{eq:soft-scaling} \end{equation} with all components vanishing at the same rate, maintaining $k_s^2\sim {\cal O}(\lambda_s^2 Q^2)\to 0$. In principle, the two scaling variables, $\lambda$ and $\lambda_s$, need not be the same or related. In our discussion of power-counting, we choose $\lambda_s \sim \lambda^2$. Considering the sample diagram in figure~\ref{fig:soft-momentum}, we have \begin{equation} (k_i+k_s)^2 \sim 2k_i^+ k_s^-[\sim \lambda^2Q^2]+ {\cal O}(\lambda^3)\, , \quad (l_j-k_s)^2 \sim - 2l_j^- k_s^+[\sim \lambda^2Q^2] + {\cal O}(\lambda^3)\, . \label{eq:soft-approx} \end{equation} That is, for the leading power contribution, we only need to keep the components $k_s^-$ and $k_s^+$ for soft gluon momentum $k_s$ to enter the $\hat{D}_1$ and $\hat{D}_2$, respectively. A more comprehensive discussion including power-counting for subdivergences, as some loop lines approach the mass-shell faster than others, can be found in~\cite{Sterman:1978bi}. \begin{figure}[htbp] \centering \includegraphics[scale=0.6]{figures/glauber.pdf} \caption{Sample diagram for identifying the leading soft contribution. } \label{fig:soft-momentum} \end{figure} Following the power-counting analysis arguments in~\cite{Collins:2011zzd, Collins:1996fb}, we obtain the scaling behavior for the reduced diagram in figure~\ref{fig:pi-pi-reduced-graph} as \begin{align} {\cal M}_{\pi^+\pi^-\to\gamma\gamma}\sim \hat{H}\otimes \hat{D}_1\otimes \hat{D}_2\otimes S \ \propto\ \lambda^{\alpha} \, , \label{eq:scale1} \end{align} where $\otimes$ indicates both the contraction of Lorentz indices, spinor indices and convolution of loop momenta, and the power $\alpha$ is given by \begin{align} \alpha =\, & N_{q_{(D_1\to H)}} + N_{q_{(D_2\to H)}} -2 + N_{{\bf g}_{(D_1\to H)}} + N_{{\bf g}_{(D_2\to H)}} \nonumber\\ & + N_{q_{(S\to D_1)}} + N_{q_{(S\to D_2)}} + 3 N_{q_{(S\to H)} } + N_{{\bf g}_{(S\to D_1)}} + N_{{\bf g}_{(S\to D_2)}} + 2 N_{g_{(S\to H)}} \, , \label{eq:pc1} \end{align} where $N_{q_{(A\to B)}}$, $N_{g_{(A\to B)}}$ and $N_{{\bf g}_{(A\to B)}}$ represent, respectively, the number of quarks, gluons and physically polarized gluons connecting from subgraph $A$ to $B$. It is clear from eqs.~\eqref{eq:scale1} and \eqref{eq:pc1} that the leading pinch surfaces (or leading regions) to the scattering amplitude are those in figure~\ref{fig:pipi LR} with the minimal power $\alpha=2$. Given the fact that the meson $\pi^{\pm}$ has one valence quark and antiquark, we must have a pair of quark and antiquark lines out of both $\hat{D}_1$ and $\hat{D}_2$ for this exclusive scattering process in figure~\ref{fig:pipi LR}. At $\alpha=2$, all the gluons linking $\hat{D}_1$ (and $\hat{D}_2$) to $\hat{H}$ (and $S$) are longitudinally polarized. \begin{figure}[htbp] \centering \begin{subfigure}{.35\textwidth} \centering \includegraphics[scale=0.7]{figures/leading-pinch1.pdf} \caption{} \label{fig:LR1} \end{subfigure} {\hskip 0.6in} \begin{subfigure}{.35\textwidth} \centering \includegraphics[scale=0.7]{figures/leading-pinch2.pdf} \caption{} \label{fig:LR2} \end{subfigure} \caption{Two possible leading regions for the exclusive $\pi^+\pi^-$ annihilation to two photons. An arbitrary number of {\it longitudinally} polarized gluons can connect the collinear subgraph $\hat{D}_1$ or $\hat{D}_2$ to $\hat{H}$ or $S$. } \label{fig:pipi LR} \end{figure} Although the pinch surfaces in figure~\ref{fig:LR2} are expected to provide the leading contributions from the perturbative power-counting analysis, reasonable arguments would make these contributions power suppressed. One simple argument is to recognize that with the quark lines from the soft factor $S$, these contributions are likely proportional to the end point of the pion wave function, where one of the two valence quarks carries almost no momentum. Since the pion wave function is expected to vanish at this point, we could conclude that figure~\ref{fig:LR2} does not contribute at the leading power, but, might impact factorization at higher powers. Another possible argument for the contribution from figure~\ref{fig:LR2} to be power suppressed could be achieved by studying the situation in which the soft loop momentum is scaled with $\lambda_s \sim \lambda$~\cite{Collins:1996fb}. \subsubsection{Approximations} \label{sec:approx} With the leading region identified as figure~\ref{fig:LR1}, we introduce some controllable approximations to pick up the leading power contributions from the Feynman diagrams to prepare ourselves for performing the factorization of the collinear and soft gluons in next two subsections, respectively. We first introduce two sets of auxiliary vectors to help extract leading contributions from the collinear and soft regions, respectively, \begin{subequations}\label{eq:aux vec} \begin{align} & w_1=\left(1,0,\bm{0}_T \right),\\ & w_2=\left(0,1,\bm{0}_T \right),\\ & n_1=w_1-e^{-2y_1}w_2 =\left(1,-e^{-2y_1},\bm{0}_T \right),\\ & n_2=w_2-e^{2y_2}w_1 =\left(-e^{2y_2},1,\bm{0}_T \right) , \end{align} \end{subequations} where the non-light-like vectors $n_1$ and $n_2$ are introduced to regulate rapidity divergence with finite parameters $y_1$ and $y_2$ to keep them slightly off light cone. To avoid confusion of notations, in this subsection, we do not use the $n$ and $\bar{n}$ as in eq.~\eqref{eq:n nb}. The leading reduced diagram in figure~\ref{fig:LR1} can be formally expressed and approximated at the leading power as, \begin{align} {\cal M}_{\pi^+\pi^-\to\gamma\gamma} & = \hat{H}^{\{a\},\{b\},\{\mu\},\{\nu\}}_{i,j;\,m,n}(k_q,k_{\bar{q}},\{k\};l_q,l_{\bar{q}},\{l\};q_1,q_2) \nonumber \\ &{\hskip 0.3in} \times \hat{D}_{1\, {j,i,\{\mu\},\{\rho\}}}^{\,\{a\},\{c\}}(k_q, k_{\bar q}, \{k\}; \{k_{s}\})\, \hat{D}_{2\, {n,m,\{\nu\},\{\sigma\}}}^{\,\{b\},\{d\}}(l_q, l_{\bar q}, \{l\}; \{l_{s}\}) \nonumber \\ &{\hskip 0.3in} \times S^{\{c\}, \{d\}, \{ \rho \}, \{ \sigma \}}(\{ k_{s} \}, \{ l_{s} \}) \label{eq:rc-full} \\ & \approx \left[ \hat{H}^{\{a\},\{b\},\{\mu\},\{\nu\}}_{i,j; \, m,n}(\hat{k}_q, \hat{k}_{\bar{q}}, \{ \hat{k} \}; \hat{l}_q, \hat{l}_{\bar{q}}, \{ \hat{l} \}; q_1,q_2) \, \cdot \{ \hat{k}_{\mu} \} \cdot \{ \hat{l}_{\nu} \} \right] \nonumber \\ & {\hskip 0.3in} \times \bigg\{ \frac{w_{2}^{\bar{\mu}}}{k\cdot w_2 + i\epsilon} \bigg\} \cdot \left[ \hat{D}^{\,\{a\},\{c\}}_{1\, {j,i,\{\bar{\mu}\},\{\bar{\rho}\}}}(k_q, k_{\bar q}, \{ k \}; \{ \hat{k}_{s} \}) \cdot \{\hat{k}_{s}^{\,\bar{\rho}}\}\right] \nonumber \\ & {\hskip 0.3in} \times \bigg\{ \frac{w_{1}^{\bar{\nu}}}{l \cdot w_1 + i\epsilon}\bigg\} \cdot \left[\hat{D}^{\,\{b\},\{d\}}_{2\, {n,m,\{\bar{\nu}\},\{\bar{\sigma}\}} }(l_q, l_{\bar q}, \{ l \}; \{\hat{l}_{s}\}) \cdot \{\hat{l}_{s}^{\,\bar{\sigma}}\} \right] \nonumber \\ & {\hskip 0.3in} \times \left[\left\{\frac{n_{1\rho}}{k_{s}\cdot n_1 + i\epsilon} \right\} \cdot \left\{\frac{n_{2\sigma}}{l_{s}\cdot n_2 + i\epsilon} \right\} \cdot S^{\{c\},\{d\},\{\rho\},\{\sigma\}}(\{k_{s}\},\{l_{s}\}) \right] \, , \label{eq:rc-app} \end{align} where $k_q$ and $k_{\bar{q}}$ ($l_q$ and $l_{\bar{q}}$) are the active quark and antiquark momenta from the collinear part $\hat{D}_1$ ($\hat{D}_2$) to the hard part $\hat{H}$, respectively, $\{k\}=k_1,k_2,...$ ($\{l\}=l_1,l_2,...$) are momenta of longitudinally polarized gluons flowing from $\hat{D}_1$ ($\hat{D}_2$) into $\hat{H}$, $\{k_{s}\}=k_{s_1},k_{s_2},... $ ($\{l_{s}\}= l_{s_1},l_{s_2},... $) are soft gluon momenta flowing from $S$ into $\hat{D}_1$ ($\hat{D}_2$); $\{\mu\}=\mu_1,\mu_2,...$ ($\{\nu\}=\nu_1,\nu_2,...$) are Lorentz indices for gluons attached from $\hat{D}_1$ ($\hat{D}_2$) to $\hat{H}$, and $\{\rho\}=\rho_1,\rho_2,...$ ($\{\sigma\}=\sigma_1,\sigma_2,...$) are Lorentz indices for gluons attached from $S$ to $\hat{D}_1$ ($\hat{D}_2$); and $i,j$ ($m,n$) are color indices for active quark and antiquark, $\{a\}=a_1,a_2,...$ ($\{b\}=b_1,b_2,...$) are color indices for gluons linking $\hat{D}_1$ ($\hat{D}_2$) and $\hat{H}$, and $\{c\}=c_1,c_2,...$ ($\{d\}=d_1,d_2,...$) are color indices for gluons linking $S$ to $\hat{D}_1$ ($\hat{D}_2$). In eq.~\eqref{eq:rc-app}, we used some simplified notations, \begin{align} \{\hat{k}_\mu\} & \equiv \prod_{i=1,2,...} \hat{k}_{i\mu_i}\, , \quad \{\hat{l}_\nu\} \equiv \prod_{i=1,2,...} \hat{l}_{i\nu_i}\, , \nonumber \\ \{\hat{k}_{s}^{\bar{\rho}}\} & \equiv \prod_{i=1,2,...} \hat{k}_{s_i}^{\bar{\rho}_i}\, , \quad \{\hat{l}_{s}^{\bar{\sigma}}\} \equiv \prod_{i=1,2,...} \hat{l}_{s_i}^{\bar{\sigma}_i} \, ; \label{eq:prod_mom} \end{align} and similarly, \begin{align} \left\{\frac{w_{2}^{\bar{\mu}}}{k\cdot w_2 + i\epsilon}\right\} & = \prod_{i=1,2,...} \frac{w_{2}^{\bar{\mu}_i}}{k_i\cdot w_2 + i\epsilon}\, , \quad \left\{\frac{w_{1}^{\bar{\nu}}}{l\cdot w_1+ i\epsilon }\right\} = \prod_{i=1,2,...} \frac{w_{1}^{\bar{\nu}_i}}{l_i\cdot w_1 + i\epsilon}\, , \nonumber \\ \left\{\frac{n_{1\rho}}{k_s\cdot n_1 + i\varepsilon}\right\} & = \prod_{i=1,2,...} \frac{n_{1\rho_i}}{k_{s_i}\cdot n_1 + i\varepsilon}\, , \quad \left\{\frac{n_{2\sigma}}{l_s\cdot n_2 + i\varepsilon}\right\} = \prod_{i=1,2,...} \frac{n_{2\sigma_i}}{l_{s_i}\cdot n_2 + i\varepsilon}\, . \label{eq:eikonal} \end{align} In deriving eq.~\eqref{eq:rc-app}, we made the following approximations for all parton momenta to pick up leading power contribution, \begin{subequations}\label{eq:coll-m} \begin{align} k_{i}\mapsto \hat{k}_{i} &= w_1 \frac{k_{i}\cdot w_2}{w_1\cdot w_2} = \left(k_{i}^+, 0, \bm{0}_T \right), &&i = q, \bar{q}, 1, 2, \cdots, \label{eq:k1H} \\ l_{j}\mapsto \hat{l}_{j} &= w_2 \frac{l_{j}\cdot w_1}{w_1\cdot w_2} = \left(0, l_{j}^-, \bm{0}_T \right), &&j = q, \bar{q}, 1, 2, \cdots, \label{eq:k2H} \\ k_{s_i}\mapsto \hat{k}_{s_i} &= w_2 \frac{k_{s_i}\cdot n_1}{w_2\cdot n_1} = \left(0, k_{s_i}^- - e^{-2y_1} k_{s_i}^+, \bm{0}_T \right), &&i = 1, 2, \cdots, \label{eq:ks}\\ l_{s_j}\mapsto \hat{l}_{s_j} &= w_1 \frac{l_{s_j}\cdot n_2}{w_1\cdot n_2} = \left(l_{s_j}^+ - e^{2y_2} l_{s_j}^-, 0, \bm{0}_T \right), &&j = 1, 2, \cdots. \label{eq:ks2} \end{align} \end{subequations} In eqs.~\eqref{eq:rc-full} and \eqref{eq:rc-app}, corresponding convolution of loop momenta (or momentum components) are suppressed. In deriving the first three lines of eq.~\eqref{eq:rc-app}, we used \begin{subequations}\label{eq:HC} \begin{align} & \hat{H}^{\{\mu\},\{\nu\}}(k_q,k_{\bar{q}},\{k\};l_q,l_{\bar{q}},\{l\};q_1,q_2)\, \hat{D}_{1{\{\mu\},\{\rho\}}}(k_q, k_{\bar q}, \{k\}; \{k_{s}\}) \label{eq:HC1} \\ & \quad\quad \mapsto \hat{H}^{\{\mu\},\{\nu\}}(\hat{k}_q, \hat{k}_{\bar{q}}, \{\hat{k}\}; \hat{l}_q, \hat{l}_{\bar{q}}, \{ \hat{l} \}; q_1,q_2) \cdot \bigg\{ \frac{ \hat{k}_{\mu} w_{2}^{\bar{\mu}} }{ k \cdot w_2 + i\epsilon} \bigg\} \cdot \hat{D}_{1 { \{ \bar{\mu} \}, \{ \rho \} } }(k_q, k_{\bar q}, \{ k \}; \{ k_{s} \}) \, , \nonumber\\ & \hat{H}^{\{\mu\},\{\nu\}}(k_q, k_{\bar{q}}, \{ k \}; l_q, l_{\bar{q}}, \{l\}; q_1,q_2) \, \hat{D}_{2 { \{ \nu \}, \{ \sigma \} } }(l_q, l_{\bar q}, \{ l \}; \{ l_{s} \}) \label{eq:HC2} \\ & \quad\quad \mapsto \hat{H}^{\{ \mu \}, \{ \nu \}}(\hat{k}_q, \hat{k}_{\bar{q}}, \{ \hat{k} \}; \hat{l}_q, \hat{l}_{\bar{q}}, \{ \hat{l} \}; q_1, q_2) \cdot \bigg\{ \frac{ \hat{l}_{\nu} w_{1}^{ \bar{ \nu } } }{l \cdot w_1 + i \epsilon} \bigg\} \cdot \hat{D}_{2 {\{ \bar{\nu} \}, \{ \sigma \} }}(l_q, l_{\bar q}, \{ l \}; \{ l_{s} \}) \nonumber \end{align} \end{subequations} to pick up gluons' Lorentz components that give the leading power contribution in the Feynman gauge, where we suppressed the color indices. In eq.~\eqref{eq:HC}, the $i\varepsilon$ prescription is chosen such that the poles of $k_i\cdot w_2=k_i^+$ and $l_j\cdot w_1=l_j^-$ introduced by the inserted factors do not affect the deformation of soft Glauber gluon momentum discussed later. Even though we are considering the collinear gluons now, the same momenta can also reach soft region and especially the Glauber region, which are treated coherently, and the approximators must be applied on the whole momentum integration regions in order for the use of subtraction formalism for the overlapping regions~\cite{Collins:2011zzd}. In deriving the last line of eq.~\eqref{eq:rc-app}, we used \begin{subequations}\label{eq:SC} \begin{align} & \hat{D}_{1{\{\mu\},\{\rho\}}}(k_q, k_{\bar q}, \{ k \}; \{ k_{s} \}) \, S^{\{\rho\},\{\sigma\}} (\{k_{s}\},\{l_{s}\}) \nonumber \\ & \quad\quad \mapsto \hat{D}_{1{\{\mu\}, \{\rho}\}}(k_q, k_{\bar q}, \{ k \}; \{\hat{k}_s\}) \cdot \bigg\{\frac{\hat{k}_{s}^{\rho}\, n_{1\bar{\rho}}}{k_{s}\cdot n_1 + i\varepsilon}\bigg\} \cdot S^{\{\bar{\rho}\},\{\sigma\}}(\{k_{s}\},\{l_{s}\})\, , \label{eq:SC1}\\ & \hat{D}_{2{\{\nu\},\{\sigma\}}}(l_q, l_{\bar q}, \{ l \}; \{l_{s}\}) \, S^{\{\rho\},\{\sigma\}} (\{k_{s}\}, \{l_{s}\}) \nonumber \\ & \quad\quad \mapsto \hat{D}_{2{\{\nu\},\{\sigma\}}}(l_q, l_{\bar q}, \{ l \}; \{\hat{l}_{s}\}) \cdot \bigg\{\frac{\hat{l}_{s}^{\sigma}\, n_{2\bar{\sigma}}}{l_{s}\cdot n_2 + i\varepsilon}\bigg\} \cdot S^{\{\rho\},\{\bar{\sigma}\}}(\{k_{s}\},\{l_{s}\}) \, , \label{eq:SC2} \end{align} \end{subequations} where the color indices are again suppressed and the sign of $i\varepsilon$ as well as the space-like $n_{1,2}$ vectors in eq.~\eqref{eq:SC} are chosen to be compatible with the contour deformation of ``$+$'' and ``$-$'' components of soft momenta when they are in the Glauber region as discussed later. With the large $\{k^+\}$ in $\hat{D}_1$ and $\{l^-\}$ in $\hat{D}_2$, we only need to keep $\{k_s^-\}$ in $\hat{D}_1$ and $\{l_s^+\}$ in $\hat{D}_2$, respectively, in eq.~\eqref{eq:rc-app} for ensuring the leading power contributions, as indicated in eq.~\eqref{eq:soft-approx}\footnote{In the actual treatment, we also use the space-like vectors $n_1$ and $n_2$ to introduce some small components $\{k_s^+\}$ ($\{l_s^-\}$) in $\hat{D}_1$($\hat{D}_2$) to regulate rapidity divergences, which does not affect the leading-power accuracy.}. This is justified for the canonical scaling in eq.~\eqref{eq:soft-scaling}, but may not be valid for the soft momenta $k_s$ in the Glauber region, where we have soft gluons with \begin{equation} k_s^{\rm Glauber}\sim \left(\lambda^2,\,\lambda^2,\,\lambda \right) Q \label{eq:Glauber-scaling} \end{equation} connecting $\hat{D}_1$ and $\hat{D}_2$. See figure~\ref{fig:soft-momentum} as an example, where the propagator $(k_i+k_s^{\rm Glauber})^2$ [or $(l_j-k_s^{\rm Glauber})^2$] can get additional ${\cal O}(\lambda^2)$ leading contribution from ${\bm k}_{iT}\cdot {\bm k}_{sT}^{\rm Glauber}$ [or ${\bm l}_{jT}\cdot {\bm k}_{sT}^{\rm Glauber}$] and $({\bm k}_{sT}^{\rm Glauber})^2$ terms. As part of the soft region that also gives leading-power contribution, the Glauber region endangers factorization since it forbids the approximations made in eq.~\eqref{eq:rc-app} or \eqref{eq:SC} which are key to the use of Ward identities (to be discussed in the next two subsections) to factorize soft gluons out of the collinear subgraphs $\hat{D}_1$ and $\hat{D}_2$. Fortunately, in the Glauber region, we can approximate the propagator of the soft gluon of momentum $k_s$ as $1/(k_s^2+i\varepsilon) \mapsto 1/(- {\bm k}_{sT}^2+i\varepsilon)$ to be independent of $k_s^{+}$ and $k_s^{-}$. Then with neglect of $k_s^+$ in $\hat{D}_1$ and $k_s^-$ in $\hat{D}_2$, the only poles of $k_s^+$ ($k_s^-$) come from the propagators in $\hat{D}_2$ ($\hat{D}_1$), which all lie on one side of integration contour in the complex plane because all the collinear parton lines in $\hat{D}_2$ ($\hat{D}_1$) move {\it into} the hard part with positive minus (plus) momenta, as a special feature of $\pi^+\pi^-\to \gamma\gamma$ annihilation process. The integrations of $k_s^{+}$ and $k_s^{-}$ are thus not pinched in the Glauber region, so that we can get out of it by deforming the contours of integration over $k_s^{+}$, $k_s^{-}$. Specifically, for a soft gluon of momentum $k_s$ in the Glauber region to enter $\hat{D}_1$, we deform the $k_{s}^-$ contour as $k_{s}^- \mapsto k_{s}^- + i \mathcal{O}(\lambda Q)$, and for a soft gluon of momentum $l_s$ in the Glauber region to enter $\hat{D}_2$, we deform the $l_{s}^+$ contour as $l_{s}^+ \mapsto l_{s}^+ + i \mathcal{O}(\lambda Q)$. This deformation keeps all the components, $k_s^{+}$, $k_s^{-}$ and ${\bm k}_{sT}$ (or $l_s^{+}$, $l_s^{-}$ and ${\bm l}_{sT}$), effectively in the same order $\sim {\cal O}(\lambda Q)$, allowing us to keep only $\{ k_s^- \}$ in $\hat{D}_1$, and $\{ l_s^+ \}$ in $\hat{D}_2$. Unfortunately, for the meson-baryon case, $\pi N\to \gamma\gamma N'$ to be discussed in the next section, the soft gluon momentum component $k_s^-$ can be trapped in the Glauber region if $N$ is moving in the ``$+$" direction, and additional discussion is needed for treating the Glauber region. For extracting the leading power contribution from the spinor of active quark entering $\hat{H}$ from $\hat{D}_1$ or leaving $\hat{H}$ into $\hat{D}_2$, we insert the following spinor projector~\cite{Collins:2011zzd}, \begin{equation} \mathcal{P}_A = \frac{1}{2}\gamma^-\gamma^+ \, . \label{eq:spinorPA} \end{equation} For a quark line entering $\hat{H}$ from $\hat{D}_2$ or leaving $\hat{H}$ into $\hat{D}_1$, we have corresponding spinor projector, \begin{equation} \mathcal{P}_B = \frac{1}{2}\gamma^+\gamma^- \, . \label{eq:spinorPB} \end{equation} These projectors effectively project out the largest components of the spinor indices of active quarks and antiquarks, which give the leading power contributions to the exclusive scattering amplitude in the $1/q_T$ expansion. Among all approximations listed above, the biggest error comes from neglecting the transverse components of active parton momenta entering into $H$, which leads to an error of order $ \Lambda_{\rm QCD} /q_T$. The approximate expression in eq.~\eqref{eq:rc-app}, with the spin projections in eqs.~\eqref{eq:spinorPA} and \eqref{eq:spinorPB} applied to active quark and antiquark lines, represents the leading power contribution to the exclusive $\pi\pi\to\gamma\gamma$ scattering amplitude in $1/q_T$ expansion. In next two subsections, we demonstrate that this leading power contribution can be factorized into a convolution of two universal pion distribution amplitudes with a perturbatively calculable short-distance hard part that produces the two observed high transverse momentum photons. \begin{figure}[htbp] \centering \begin{align*} \adjincludegraphics[valign=c, scale=0.45]{figures/d1g.pdf} = - \adjincludegraphics[valign=c, scale=0.45]{figures/d1g_q1.pdf} - \adjincludegraphics[valign=c, scale=0.45]{figures/d1g_qbar1.pdf} = \adjincludegraphics[valign=c, scale=0.45]{figures/d1g_qlink.pdf} + \adjincludegraphics[valign=c, scale=0.45]{figures/d1g_qbarlink.pdf} \end{align*} \caption{Graphic representation of the two steps to detach a longitudinally polarized collinear gluon from the $\hat{D}_1$ to the $\hat{H}$, and reconnect it to corresponding gauge links of the $\hat{D}_1$. The triangles at the end of gluon lines mean the use of Ward identity, and the red thin dashed lines represent the color flows. } \label{fig:ward_identity} \end{figure} \begin{figure}[htbp] \centering \includegraphics[scale=0.65]{figures/ward1.pdf} \caption{Factorization of longitudinally polarized collinear gluons to the $H$ into the Wilson lines in the fundamental representation of the SU(3) color. The arrows on the Wilson line indicate the color flow. See text for the meaning of other symbols. } \label{fig:ward-col} \end{figure} \subsubsection{Ward identity and factorization of collinear gluons} With the leading power contribution to the scattering amplitude given in eq.~\eqref{eq:rc-app}, we can use Ward identity to factorize all collinear and longitudinally polarized gluons from the hard part $\hat{H}$. From the first line in eq.~\eqref{eq:rc-app}, all Lorentz indices of attached gluon lines are effectively contracted by corresponding gluon momenta, $\hat{H}^{\{\mu\},\{\nu\}}(\hat{k}_q,\hat{k}_{\bar{q}},\{\hat{k}\};\hat{l}_q, \hat{l}_{\bar{q}}, \{\hat{l}\};q_1,q_2) \{\hat{k}_{\mu}\} \{\hat{l}_{\nu}\}$, which enables the use of Ward identity. We will first consider the situation with one longitudinally polarized collinear gluon of momentum $k$ from $\hat{D}_1$ to $\hat{H}$, as shown in figure~\ref{fig:ward_identity}. As an identity, summing over all the possible attachments of a longitudinally polarized gluon to the $\hat{H}$ is equivalent to attaching it to the active quark and antiquark lines of the $\hat{H}$ with a minus sign, as illustrated by the first equal sign in the graphic representation in figure~\ref{fig:ward_identity}. With the spinor projectors in eqs.~\eqref{eq:spinorPA} and \eqref{eq:spinorPB} for the active quark and antiquark lines linking the $\hat{H}$ and $\hat{D}_1$ and the use of the graphic Ward identity, we can move the attachment of a longitudinally polarized gluon to an active quark (or antiquark) line of the $\hat{H}$ to a gauge link of the same active quark (or antiquark) of the $\hat{D}_1$ along the direction $w_2$, as illustrated by the second equal sign in the graphic representation in figure~\ref{fig:ward_identity}, multiplied by the same $\hat{H}$ without the gluon attachment while its active quark (or antiquark) momentum is adjusted, \begin{subequations}\label{eq:Hcollinear} \begin{align} & \hat{H}^{a,\{b\},\mu,\{\nu\}}_{i,j;\,m,n}(\hat{k}_q,\hat{k}_{\bar{q}},\hat{k};\hat{l}_q,\hat{l}_{\bar{q}},\{\hat{l}\};q_1,q_2)\, \hat{k}_{\mu} \left[\frac{w_{2}^{\bar{\mu}}}{k\cdot w_2 + i\epsilon }\right] \left[\mathcal{P}_A \hat{D}_{1\, {j,i,\bar{\mu},\{\rho\}}}^{\,a,\{c\}}(k_q,k_{\bar{q}},k;\{k_{s}\}) \mathcal{P}_B\right] \nonumber \\ & {\hskip 0.4in} = \hat{H}^{\{b\},\{\nu\}}_{i,j';\,m,n}(\hat{k}_q+\hat{k},\hat{k}_{\bar{q}};\hat{l}_q,\hat{l}_{\bar{q}},\{\hat{l}\};q_1,q_2) \nonumber \\ & {\hskip 0.7in} \times \left(\frac{-i}{k\cdot w_2 + i\epsilon} \right) \left(-ig_s(t^a)_{j'j}w_2^{\bar{\mu}}\right) \left[\mathcal{P}_A \hat{D}_{1\, {j,i,\bar{\mu},\{\rho\}}}^{\,a,\{c\}}(k_q,k_{\bar{q}},k;\{k_{s}\}) \mathcal{P}_B\right] \nonumber\\ & {\hskip 0.6in} + \hat{H}^{\{b\},\{\nu\}}_{i',j;\,m,n}(\hat{k}_q,\hat{k}_{\bar{q}}+\hat{k};\hat{l}_q,\hat{l}_{\bar{q}},\{\hat{l}\};q_1,q_2) \nonumber \\ & {\hskip 0.7in} \times \left(\frac{i}{k\cdot w_2 + i\epsilon} \right) \left(-ig_s(t^a)_{ii'}w_2^{\bar{\mu}}\right) \left[\mathcal{P}_A \hat{D}_{1\, {j,i,\bar{\mu},\{\rho\}}}^{\,a,\{c\}}(k_q,k_{\bar{q}},k;\{k_{s}\}) \mathcal{P}_B\right] \label{eq:HcollinearD1}\\ & {\hskip 0.4in} = \hat{H}^{\{b\},\{\nu\}}_{i,j;\,m,n}(\hat{k}_q,\hat{k}_{\bar{q}};\hat{l}_q,\hat{l}_{\bar{q}},\{\hat{l}\};q_1,q_2) \nonumber \\ & {\hskip 0.5in} \times \bigg( \frac{-i}{-k\cdot w_2 + i\epsilon} \left(-ig_s(t^a)_{jj'}w_2^{\bar{\mu}}\right) \left[\mathcal{P}_A \hat{D}_{1\, {j',i,\bar{\mu},\{\rho\}}}^{\,a,\{c\}}(k_q + k, k_{\bar{q}},k;\{k_{s}\}) \mathcal{P}_B\right] \nonumber\\ & {\hskip 0.7in} + \frac{i}{k\cdot w_2 + i\epsilon} \left(-ig_s(t^a)_{i'i}w_2^{\bar{\mu}}\right) \left[\mathcal{P}_A \hat{D}_{1\, {j,i',\bar{\mu},\{\rho\}}}^{\,a,\{c\}}(k_q,k_{\bar{q}}-k,k;\{k_{s}\}) \mathcal{P}_B\right] \bigg)\, , \label{eq:HcollinearD2} \end{align} \end{subequations} where $g_s$ is the strong coupling constant and $t^a$ is the generator for the fundamental representation of SU(3) color. In order to formally factor out the $\hat{H}$ without attachment from $\hat{D}_1$ in eq.~\eqref{eq:HcollinearD2}, we shifted the active quark and antiquark momenta in $\hat{D}_1$ accordingly. And in the second line of eq.~\eqref{eq:HcollinearD2}, we also reversed the gluon momentum $k$ such that it flows along the same direction of the gauge link. Eq.~\eqref{eq:Hcollinear} and its graphic representation in figure~\ref{fig:ward_identity} clearly indicate that the attachment of a longitudinally polarized gluon of momentum $\hat{k}$ from $\hat{D}_1$ to $\hat{H}$ can be effectively detached from $\hat{H}$ and connected to the gauge links of active quark of momentum $k_q$ and antiquark of momentum $k_{\bar{q}}$ along the direction of $w_2$ with its momentum effectively flowing through the active quark (or antiquark) line into the $\hat{H}$. Similarly, by applying the Ward identity to the attachment of a longitudinally polarized gluon of momentum $\hat{l}$ from $\hat{D}_2$ to $\hat{H}$, we can effectively detach this gluon from the $\hat{H}$ with its momentum effectively flowing through the active quark (or antiquark) line from $\hat{D}_2$, as sketched in figure~\ref{fig:ward-col}, where the hooks on the external quark lines of $\hat{H}$ indicate the amputation with the spinor projectors in eqs.~\eqref{eq:spinorPA} and \eqref{eq:spinorPB}. The attachment of multiple collinear and longitudinally polarized gluons of momenta $\hat{k}_i^{\mu_i}$ with $i=1,2, ...,I$ from $\hat{D}_1$ ($\hat{l}_j^{\nu_j}$ with $j=1,2, ...,J$ from $\hat{D}_2$) to $\hat{H}$ can be detached in the same way, by summing over all possible attachments and using the Ward identity multiple times. The corresponding factor from detaching such gluons from $\hat{D}_1$ ($\hat{D}_2$) to $\hat{H}$ can be combined with the factor in front of $\hat{D}_1$ ($\hat{D}_2$) in the second (third) line of eq.~\eqref{eq:rc-app} to make up the eikonal vertices and eikonal propagators that match the expansion of a product of two gauge links in the fundamental representation along the direction of $w_2$ ($w_1$), one from the active quark of momentum $k_q$ ($l_q$) and the other to the active antiquark of momentum $k_{\bar{q}}$ ($l_{\bar{q}}$), to the order with a total of $I$ ($J$) gluons~\cite{Collins:1985ue}. And then by summing over all possible numbers of attachments of collinear and longitudinally polarized gluons with $I, J=1,2,...,\infty$, we are able to detach all of them from the $\hat{H}$ and attach them to two gauge links along the direction of $w_2$ ($w_1$), or the Wilson lines in momentum space, one from the active quark of momentum $k_q$ ($l_q$) and the other to the active antiquark of momentum $k_{\bar{q}}$ ($l_{\bar{q}}$). That is, we are able to factorize all attachments of collinear and longitudinally polarized gluons from $\hat{D}_1$ (or $\hat{D}_2$) to the $\hat{H}$ into the well-defined gauge links that become a part of the $\hat{D}_1$ (or $\hat{D}_2$), as shown in figure~\ref{fig:ward-col}, where the red thin lines indicate the color flow between collinear subgraphs, $\hat{D}_1$ and $\hat{D}_2$, and the hard subgraph, $\hat{H}$. As pointed out above, the Wilson lines in figure~\ref{fig:ward-col} are in the fundamental $\bm{3}$ or $\bar{ \bm{3} }$ color representation, indicated by the arrows on the Wilson line which denote the color flow. With the signs of $i\epsilon$ necessitated by the deformation out of the Glauber region, we have the Wilson line as \begin{align} \Phi_{ij}(\infty, x;-n) = {\cal P}\exp\left\{ig \int_0^{\infty} \dd{\lambda} n^{\mu} A^a_{\mu} \left(x - \lambda n\right) (t^a_{ij}) \right\}, \label{eq:gaugelink} \end{align} where $t^a$ is again the generator for the fundamental representation of SU(3) color and will be suppressed in the rest of this paper, and the indices $i,j$ are color indices in fundamental representation. This Wilson line in eq.~\eqref{eq:gaugelink} points from $x$ to $-\infty$ along the direction $-n^{\mu} (n^0> 0)$, and is a past-pointing Wilson line, like those in parton distribution functions from factorized Drell-Yan process, which is consistent with the picture that all the collinear parton lines from colliding pions come from the past to the hard collision, $\hat{H}$, to produce a pair of high transverse momentum photons. \begin{figure}[htbp] \centering \includegraphics[scale=0.65]{figures/ward2.pdf} \caption{The result of using Ward identity for attachments of soft gluons to $\hat{D}_1$ and $\hat{D}_2$. The Wilson lines are in fundamental $\bm{3}$ or $\bar{ \bm{3} }$ color representation. The Wilson lines on $\hat{D}_1$ side come from the past along $n_1$, and those on $\hat{D}_2$ side come from the past along $n_2$. The red and blue dashed lines indicate the color flow among collinear, soft and hard subgraphs. $i,j,m,n,i',j',m',n'$ are the color indices.} \label{fig:ward-soft} \end{figure} \subsubsection{Ward identity and cancellation of the soft factor} \label{sec:soft_cancel} It was demonstrated in the last subsection that the collinear factors $\hat{D}_1$ and $\hat{D}_2$ can be detached from the hard part $\hat{H}$. But, they are still connected by soft gluons from the soft factor $S$, which can communicate the colors between them. In this subsection, we use the approximations in eq.~\eqref{eq:SC}, which lead to the second and third lines of eq.~\eqref{eq:rc-app}, and the Ward identity to decouple the soft gluon attachments between $\hat{D}_1$ and $\hat{D}_2$ to achieve the factorization that we hope to derive. As discussed in the subsection~\ref{sec:approx}, we only need to consider the ``$-$'' component of the soft momentum $k_s$ flowing from $S$ to $\hat{D}_1$, and ``$+$'' component of the soft momentum $l_s$ flowing from $S$ to $\hat{D}_2$ for the leading power contribution to the amplitude. Similar to the collinear gluons, we can apply the Ward identity to $ \hat{D}_{1\,{\{\bar{\mu}\},\{\bar{\rho}\}}}(k_q, k_{\bar q}, \{k\};\{\hat{k}_{s}\}) \{\hat{k}_{s}^{\,\bar{\rho}}\}$ and $ \hat{D}_{2\,{\{\bar{\nu}\},\{\bar{\sigma}\}}}(l_q, l_{\bar q}, \{l\};\{\hat{l}_{s}\}) \{\hat{l}_{s}^{\,\bar{\sigma}}\} $ in the second and third lines of eq.~\eqref{eq:rc-app}, respectively, trying to detach all the soft gluons from their attachments to $\hat{D}_1$ and $\hat{D}_2$. However, with the Wilson lines from detaching collinear longitudinal gluons from the $\hat{H}$, the collinear subgraphs, $\hat{D}_1$ and $\hat{D}_2$, are more complicated. Fortunately, as in eq.~\eqref{eq:ks}, the soft momentum $k_s$ flowing into $\hat{D}_1$ is approximated by $\hat{k}_{s} \propto w_2$ and since the Wilson line on $\hat{D}_1$ has the vertices proportional to $w_2$, the attachment of soft gluon of momentum $\hat{k}_{s}$ to the gauge links of $\hat{D}_1$ vanishes. Therefore, we are allowed to sum over all possible attachments of the soft gluons to $\hat{D}_1$, including to the gauge links. Consequently, the use of Ward identity allows to detach all the soft gluons that are attached to $\hat{D}_1$ and group them into two gauge links along the direction $n_1$ in the same way as we detach collinear gluons from the $\hat{H}$. Similarly, since $\hat{l}_{s} \propto w_1$, we can apply the Ward identify to $\hat{D}_{2\,{\{\bar{\nu}\},\{\bar{\sigma}\}}}(l_q, l_{\bar q}, \{l\};\{\hat{l}_{s}\}) \{\hat{l}_{s}^{\,\bar{\sigma}}\} $ to detach all the soft gluons that are attached to $\hat{D}_2$ and group them into two gauge links along the direction $n_2$ on the side of $\hat{D}_2$, as shown in figure~\ref{fig:ward-soft}. With all collinear and longitudinally polarized gluons detached from the hard part $\hat{H}$ and their impact represented by the Wilson lines to $\hat{D}_1$ and $\hat{D}_2$, as shown in figure~\ref{fig:ward-col}, and all soft gluons detached from the $\hat{D}_1$ and $\hat{D}_2$ and included into gauge links to the $S$, as shown in figure~\ref{fig:ward-soft}, we can express the exclusive scattering amplitude for $\pi^+\pi^-\to \gamma\gamma$ as \begin{align} {\cal M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma}=& \int \dd z_1 \dd z_2 \ S_{ij,i'j';mn,m'n'} \, [{\cal P}_A\, \hat{D}_{1}(z_1,p_1)\, {\cal P}_B]_{i'j'}\, [{\cal P}_B\, \hat{D}_{2}(z_2,p_2)\, {\cal P}_A]_{m'n'}\, \label{eq:color convo} \\ &{\hskip 0.5in}\times \hat{H}^{\mu\nu}_{ij;mn}(k_1^+=z_1\, p_1^+; k_2^-=z_2\, p_2^-;q_T) \, , \nonumber \end{align} where $i,j,m,n$, etc.~are color indices as labeled in figure~\ref{fig:ward-soft}, the sum of repeated color indices is understood, and $z_1\equiv k_1^+/p_1^+$ and $z_2\equiv k_2^-/p_2^-$ are momentum fractions. In eq.~(\ref{eq:color convo}), the soft factor is given by \begin{align} S_{ij,i'j';mn,m'n'} = \langle 0| &\Phi(0, -\infty; n_1)_{ii'} \Phi^{\dag}(0, -\infty; n_1)_{j'j} \nonumber\\ &\times \Phi(0, -\infty; n_2)_{mm'} \Phi^{\dag}(0, -\infty; n_2)_{n'n} |0 \rangle \, . \end{align} In deriving the collinear factors $\hat{D}_1$ and $\hat{D}_2$ in eq.~(\ref{eq:color convo}), we took into account the fact that at the leading power, only $\hat{k}_1$ and $\hat{k}_2$ flow into the hard part $\hat{H}^{\mu\nu}$. For a generic pion distribution amplitude (suppressing the Wilson lines), \begin{align} {\cal D}(k,p)=\int \dd^4\xi\, e^{ik\cdot \xi} \langle 0|\overline{\psi}(0)\psi(\xi)|\pi(p)\rangle\, , \end{align} we apply the following identify, \begin{align} & \int\frac{\dd^4k_1}{(2\pi)^4} {\cal D}(k_1,p_1)\, \hat{H}(\hat{k}_1;\hat{k}_2;q_T) \nonumber\\ &{\hskip 0.3in} =\int \dd z_1 \left[ \int\frac{\dd^4k_1}{(2\pi)^4} \delta\left(z_1-\frac{k_1^+}{p_1^+}\right){\cal D}(k_1,p_1)\right] \hat{H}(\hat{k}_1=z_1\,p_1^+;\hat{k}_2;q_T) \\ &{\hskip 0.3in} =\int \dd z_1 \left[ \int\frac{\dd(p_1^+\xi^-)}{2\pi}\, e^{i z_1p_1^+\xi^-} \langle 0|\overline{\psi}(0)\psi(\xi^-)|\pi(p)\rangle|_{\xi^+=0, \, \xi_\perp=0_\perp} \right] \hat{H}(\hat{k}_1=z_1\,p_1^+;\hat{k}_2;q_T) , \nonumber \end{align} to $\hat{D}_1(k_1,p_1)$ and similar identity to $\hat{D}_2(k_2,p_2)$, and obtain the collinear factors in eq.~(\ref{eq:color convo}), \begin{align} \hat{D}_{1}(z_1, p_1)_{i'j'} = & \int\frac{\dd (p_1^+ \xi^-)}{2\pi} e^{i z_1p_1^+ \xi^-} \langle 0 | T\, \bar{d}_j(0) \Phi^{\dag}(\infty, 0; w_2)_{jj'} \nonumber\\ & {\hskip 1.2in}\times \Phi(\infty, \xi^-; w_2)_{i'i} \, u_i(\xi^-) | \pi^+(p_1) \rangle \, , \label{eq.da1} \end{align} and \begin{align} \hat{D}_{2}(z_2, p_2)_{m'n'} = & \int\frac{\dd (p_2^- \zeta^+)}{2\pi} e^{i z_2p_2^- \zeta^+} \langle 0 | T\, \bar{u}_n(0) \Phi^{\dag}(\infty, 0; w_1)_{nn'} \nonumber\\ & {\hskip 1.2in}\times \Phi(\infty, \zeta^+; w_1)_{m'm} \, d_m(\zeta^+) | \pi^-(p_2) \rangle \, , \label{eq.da2} \end{align} where $T$ represents the time-ordering and $u$ and $d$ are up and down quark fields, respectively. In eq.~(\ref{eq:color convo}), the spinor projectors ${\cal P}_A$ and ${\cal P}_B$ are given in eqs.~(\ref{eq:spinorPA}) and (\ref{eq:spinorPB}), respectively, and the superscripts, $\mu$ and $\nu$, are Lorentz indices of the two produced photons. The spinor indices in eq.~(\ref{eq:color convo}), convoluting between $\hat{H}$ and $\hat{D}$'s, are suppressed, and their factorization will be discussed in the next subsection. The colliding hadrons, $\pi^+$ and $\pi^-$ in our case, are color neutral. With all the soft gluons factored out of them, the collinear factors must be in a color singlet state, \begin{equation} \hat{D}_{1i'j'} \equiv \hat{D}_{1} \frac{\delta_{i'j'}}{N_c}, \quad\quad \hat{D}_{2m'n'} \equiv \hat{D}_{2} \frac{\delta_{m'n'}}{N_c}, \label{eq:C-singlet} \end{equation} where $\hat{D}_{1(2)} = \delta_{ij}\,\hat{D}_{1(2)ij}$. This color contraction connects the two Wilson lines in each collinear factor to give \begin{align} \hat{D}_{1}(z_1, p_1) = \int\frac{\dd (p_1^+\xi^-)}{2\pi} e^{i z_1p_1^+ \xi^-} \langle 0 | T\, \bar{d}_m(0) \Phi(0,\xi^-; w_2)_{mn} \, u_n(\xi^-) | \pi^+(p_1) \rangle, \label{eq:D1 factor} \end{align} and \begin{align} \hat{D}_{2}(z_2, p_2) = \int\frac{\dd (p_2^-\zeta^+) }{2\pi} e^{i z_2p_2^- \zeta^+} \langle 0 | T\, \bar{u}_m(0) \Phi(0,\zeta^+; w_1)_{mn} \, d_n(\zeta^+) | \pi^-(p_2) \rangle, \label{eq:D2 factor} \end{align} where the sum of repeated color indices is understood, while the spinor indices are not summed over. $\Phi(0,\xi^-;w_2)$ and $\Phi(0,\zeta^+;w_1)$ are the Wilson lines in the fundamental representation, joining the $u$ and $d$ quark fields to make the DAs gauge invariant, which is a result of factorization. Substituting eq.~\eqref{eq:C-singlet} into eq.~\eqref{eq:color convo}, we have \begin{align} {\cal M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma} =& \frac{1}{N_c^2} \int \dd z_1 \dd z_2 \ S_{ij,i'i';mn,m'm'} \, [{\cal P}_A\, \hat{D}_{1}(z_1,p_1)\, {\cal P}_B]\, [{\cal P}_B\, \hat{D}_{2}(z_2,p_2)\, {\cal P}_A]\, \label{eq:color convo2} \\ & \hskip 0.8in \times \hat{H}^{\mu\nu}_{ij;mn}(k_1^+=z_1\,p_1^+;k_2^-=z_2\, p_2^-;q_T) \, , \nonumber \end{align} where the repeated color indices, $i'$ and $m'$ are summed. The soft factor now becomes \begin{align} S_{ij,i'i';mn,m'm'} &= \langle 0| \left[ \Phi(0, -\infty; n_1) \Phi^{\dag}(0, -\infty; n_1) \right]_{ij} \left[ \Phi(0, -\infty; n_2) \Phi^{\dag}(0, -\infty; n_2) \right]_{mn} |0 \rangle \nonumber\\ &= \delta_{ij} \delta_{mn}. \end{align} That is, the soft factor $S$ is in fact an identity matrix in the color space, and the exclusive scattering amplitude in eq.~\eqref{eq:color convo} is effectively factorized in color space, \begin{align} {\cal M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma}=& \int \dd z_1 \dd z_2 \, {\rm Tr}\Big\{ [{\cal P}_A\, \hat{D}_{1}(z_1,p_1)\, {\cal P}_B] [{\cal P}_B\, \hat{D}_{2}(z_2,p_2)\, {\cal P}_A] \nonumber \\ & \hskip 0.8in \times \Big[ \frac{1}{N_c^2} \hat{H}^{\mu\nu}_{ii;mm}(k_1^+=z_1\, p_1^+;k_2^-=z_2\, p_2^-;q_T) \Big] \Big\} \, , \label{eq:color convo3} \end{align} where the repeated color indices, $i$ and $m$ are summed, and averaged with the factor $1/N_c^2$, and the ``${\rm Tr}$'' indicates the trace over all spinor indices between $\hat{D}_1$, $\hat{D}_2$, and $\hat{H}$. The hard part $\hat{H}$ that produces the pair of high-$q_T$ photons is given by the collision of two color-singlet, collinear, and on-shell quark-antiquark pairs, one from each colliding hadron ($\pi^+$ or $\pi^-$ in this case). The cancellation of long-range soft gluon interactions between the colliding hadrons is essential to the factorization. It means that \textit{long-distance} connections between the two collinear subgraphs are canceled, so that the evolution of each collinear part is independent. Therefore, the collinear functions can be universal. In our case, the soft gluon cancellation happens because the active parton lines entering the hard interactions are collinear and color-neutral pairs, so that the soft gluons only see a color-neutral object from each colliding hadron, and thus there are no color correlations between the two collinear systems. This is the feature for \textit{exclusive} processes, which is also seen in the factorization of two-quarkonium exclusive production in $e^+ e^-$ annihilation~\cite{Bodwin:2010fi}. But, this is different from the soft gluon cancellations for inclusive processes, for example in~\cite{Collins:1981ta}, where it is the unitarity (inclusiveness of the final states) that guarantees the soft cancellation. We also stress that the above steps of factorizing collinear gluons and soft cancellation should be viewed as for a given order of perturbative diagram expansion with a given number of soft gluon lines and $\hat{D}_1$- and $\hat{D}_2$-collinear lines. Summing over different attachments of gluon lines in the same kinematic region amounts to summing over different diagrams with the same region decomposition, along with subtractions of smaller regions to avoid double counting. Since such subtraction does not affect the used of Ward identity, after factorizing the whole amplitude into $\hat{D}_1$, $\hat{D}_2$ and $\hat{H}$, each factor should be regarded as subtracted ones. Due to the cancellation of soft gluons, the subtracted collinear factors $\hat{D}_1$ and $\hat{D}_2$ are the same as the unsubtracted ones in eqs.~\eqref{eq:D1 factor} and \eqref{eq:D2 factor}. And the subtracted hard factor $\hat{H}$ can be derived perturbatively order-by-order by using the factorization formula. \begin{figure}[htbp] \centering \includegraphics[scale=0.85]{figures/pion-pion-factorize.pdf} \caption{The factorized form for the exclusive $\pi\pi$ annihilation process.} \label{fig:pi-pi factorize} \end{figure} \subsubsection{Factorization formula} After the cancellation of soft gluons, the leading power contributions to the exclusive scattering amplitude of $\pi^+\pi^-\to \gamma\gamma$ can be factorized into the structure shown in figure~\ref{fig:pi-pi factorize}, while the spinor indices from $\hat{D}_1$, $\hat{D}_2$ and $\hat{H}$ are still convoluted, as indicated in eq.~(\ref{eq:color convo3}), which need to be disentangled. The factor $\hat{D}_1$ is sandwiched between $\mathcal{P}_A$ and $\mathcal{P}_B$, which indicates that only the term in $\hat{D}_1$ proportional $\gamma^-$, $\gamma_5\gamma^-$ or $\gamma_5\gamma^-\gamma_i$ with $i=1,2$ survives. Since $\pi^+$ has negative parity and zero spin, only $\gamma_5\gamma^-$ contributes. Similarly, $\hat{D}_2$ only has its $\gamma_5\gamma^+$ term that contributes. The result is \begin{align} \left[ \mathcal{P}_A \hat{D}_1(z_1,p_1) \mathcal{P}_B \right]_{\alpha\beta} &= \frac{1}{2p_1^+}{\rm Tr}\left[ \gamma^+ \gamma_5\, \hat{D}_1(z_1,p_1) \right] \left[\frac{1}{2}\gamma_5 (p_1^+\gamma^-) \right]_{\alpha\beta} \nonumber\\ &\equiv D_{\pi^+}(z_1) \left[\frac{1}{2}\gamma_5 (p_1^+\gamma^-) \right]_{\alpha\beta} \, , \label{eq:PA D1 PB} \\ \left[ \mathcal{P}_B \hat{D}_2(z_2,p_2) \mathcal{P}_A \right]_{\rho\sigma} &= \frac{1}{2p_2^-}{\rm Tr}\left[ \gamma^- \gamma_5\, \hat{D}_2(z_2,p_2) \right] \left[\frac{1}{2}\gamma_5 (p_2^-\gamma^+) \right]_{\rho\sigma} \nonumber\\ &\equiv D_{\pi^-}(z_2) \left[\frac{1}{2}\gamma_5 (p_2^-\gamma^+) \right]_{\rho\sigma} \, , \label{eq:PB D2 PA} \end{align} where the indices $\alpha, \beta, \rho, \sigma$ here are the spinor indices, and the distribution amplitudes for $\pi^{\pm}$ are given by \begin{subequations} \label{eq:DA def} \begin{align} D_{\pi^+}(z_1) &= \int\frac{\dd \xi^-}{4\pi} e^{i z_1p_1^+ \xi^-} \langle 0 | \bar{d}(0) \gamma^+ \gamma_5 \, \Phi(0,\xi^-;w_2) u(\xi^-) | \pi^+(p_1) \rangle \, , \\ D_{\pi^-}(z_2) &= \int\frac{\dd \zeta^+}{4\pi} e^{i z_2 p_2^- \zeta^+} \langle 0 | \bar{u}(0) \gamma^- \gamma_5 \, \Phi(0,\zeta^+;w_1) d(y^+) | \pi^-(p_1) \rangle \, . \end{align} \end{subequations} Charge conjugation and isospin symmetry imply $D_{\pi^+}(z) = -D_{\pi^-}(z)$, following the convention of taking $(\pi^+, \pi^0, \pi^-)$ state as an isospin triplet. This particular choice does not affect our prediction for the cross section, since it is proportional to the squared amplitude. With the separation of spinor indices, we have our final factorized expression for the exclusive $\pi^+\pi^-$ annihilation amplitude, \begin{align} \mathcal{M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma}=& \int_0^1 \dd z_1 \int_0^1 \dd z_2 \ D_{\pi^+}(z_1)\, D_{\pi^-}(z_2)\, C^{\mu\nu}(z_1,z_2;p_1^+,p_2^-,q_T) \, , \label{eq:factorization M pi pi} \end{align} where the short-distance hard coefficient function $C^{\mu\nu}$ is given by \begin{align} C^{\mu\nu}(z_1,z_2;p_1^+,p_2^-,q_T) &\equiv \left[ \frac{\gamma_5(p_1^+\gamma^-)}{2} \right]_{\alpha\beta} \hat{H}^{\mu\nu}_{\beta\alpha; \sigma\rho}(\hat{k}_1=z_1p_1^+,\hat{k}_2=z_2p_2^-;q_T) \left[\frac{\gamma_5(p_2^-\gamma^+)}{2} \right]_{\rho\sigma} \, , \label{eq:hard C} \end{align} where a sum over repeated indices is understood, which is effectively the trace of spinor indices. The correction to the factorized formula in eq.~(\ref{eq:factorization M pi pi}) is suppressed by powers of $m_{\pi}/q_T$. With the renormalization group improvement from the fact that the exclusive scattering amplitude for $\pi^+(p_1)+\pi^-(p_2)\to \gamma(q_1)+\gamma(q_2)$ should not depend on the specific hard scale (or, the factorization scale) at which we perform our factorization steps. And with the choice of this factorization scale, the pion distribution amplitudes and the short-distance coefficient function in eq.~(\ref{eq:factorization M pi pi}) become dependent on the factorization scale $\mu$. \subsection{Gauge invariant tensor structures for the hard coefficient} The short-distance hard coefficient, $C^{\mu\nu}(z_1, z_2; p_1^+, p_2^-, q_T)$ in eq.~\eqref{eq:hard C}, is a function of the external momenta, and its tensor structure is constrained by the symmetry of the underlying theory. The most important constraint comes from electromagnetic gauge invariance or current conservation for the two external photons \begin{equation} q_{1\mu}C^{\mu\nu} = C^{\mu\nu} q_{2\nu} = 0\, , \label{eq:emcurrent} \end{equation} which requires $C^{\mu\nu}$ to be expressed in terms of independent and gauge invariant tensor structures. Because of the explicit light-cone projection $\gamma^{\pm}$ in eq.~\eqref{eq:hard C}, we express all external momenta, $p_1, p_2, q_1, q_2$, in light-cone coordinates, \begin{align} p_1^{\mu} = p_1^+ \, \bar{n}^{\mu}\, , \quad p_2^{\mu} = p_2^- \, {n}^{\mu}\, , \quad q_{1,2}^{\mu}= q_{1,2}^+ \,\bar{n}^{\mu} + q_{1,2}^-\, n^{\mu} \mp q_T^{\mu}\, , \label{eq:p1p2q12} \end{align} as we have done for $q_{1,2}^{\mu}$ in eq.~\eqref{eq:kin q12}. We choose three independent vectors, $p_1^{\mu}, p_2^{\mu}$ and $q_T^{\mu}$. Using $q_1\cdot q_T = -q_T^\mu q_T^\nu\,g_{\mu\nu}=q_T^2$ and $q_2\cdot q_T = -q_T^2$, we can write down all the independent parity-even (P-even) current-conserving tensor structures, \begin{align} \widetilde{g}_{\perp}^{\mu\nu},\quad \widetilde{p}_{1}^{\mu}\bar{p}_{1}^{\nu}\, ,\quad \widetilde{p}_{2}^{\mu}\bar{p}_{2}^{\nu}\, ,\quad \widetilde{p}_{1}^{\mu}\bar{p}_{2}^{\nu}\, ,\quad \widetilde{p}_{2}^{\mu}\bar{p}_{1}^{\nu}\, , \label{eq:P-even tensors} \end{align} where we defined \begin{gather} \widetilde{g}_{\perp}^{\mu\nu} = g_{\perp}^{\mu\nu} + \frac{q_T^{\mu} q_T^{\nu} }{q_T^2} \quad {\rm with} \quad g_{\perp}^{\mu\nu} = g^{\mu\nu} - \bar{n}^\mu \, n^\nu - n^\mu\, \bar{n}^\nu\, , \nonumber\\ \begin{align} \widetilde{p}_{1}^{\mu} = p_1^{\mu} - \frac{p_1\cdot q_1}{q_T^2} q_{T}^{\mu}\, ,\quad \widetilde{p}_{2}^{\mu} = p_2^{\mu} - \frac{p_2\cdot q_1}{q_T^2} q_{T}^{\mu}\, ,\nonumber\\ \bar{p}_{1}^{\nu} = p_1^{\nu} + \frac{p_1\cdot q_2}{q_T^2} q_{T}^{\nu}\, ,\quad \bar{p}_{2}^{\nu} = p_2^{\nu} + \frac{p_2\cdot q_2}{q_T^2} q_{T}^{\nu}\, , \label{eq:projected p1 p2} \end{align} \end{gather} so that \begin{align} q_{1\mu}\, \widetilde{p}_{i}^{\mu} = 0 \, , \quad\quad q_{2\nu}\, \bar{p}_{i}^{\nu} = 0\, , \quad {\rm and} \quad q_{1\mu}\, \widetilde{g}_{\perp}^{\mu\nu} = \widetilde{g}_{\perp}^{\mu\nu} \, q_{2\nu} = 0 \, , \label{eq:current-conv} \end{align} with $i=1,2$. Similarly, we have parity-odd (P-odd) current-conserving tensor structures \begin{align} \widetilde{p}_{1}^{\mu}\varepsilon_{\perp}^{\nu\rho}q_{T\rho}\, ,\quad \widetilde{p}_{2}^{\mu}\varepsilon_{\perp}^{\nu\rho}q_{T\rho}\, , \quad \bar{p}_{1}^{\nu}\varepsilon_{\perp}^{\mu\rho}q_{T\rho}\, ,\quad \bar{p}_{2}^{\nu}\varepsilon_{\perp}^{\mu\rho}q_{T\rho}\, , \label{eq:P-odd tensors} \end{align} where we used the abbreviation $ \varepsilon_{\perp}^{\mu\nu} = \varepsilon^{+-\mu\nu}\, , $ with the convention $\varepsilon_{\perp}^{12}=-\varepsilon_{\perp}^{21}=1$. One might consider another P-odd tensor structure $q_T^2 \varepsilon_{\perp}^{\mu\nu} + q_T^{\mu} \varepsilon_{\perp}^{\rho\nu} q_{T\rho} + q_T^{\nu} \varepsilon_{\perp}^{\mu\rho} q_{T\rho}$, which satisfies the current conservation in eq.~\eqref{eq:emcurrent}. But, this tensor itself vanishes for any components of $\mu$ and $\nu$. The next constraint is from parity conservation. If we have $n$ $\gamma_5$'s in a given diagram, parity conservation requires corresponding scattering amplitude to satisfy \begin{equation} C^{\mu\nu}(p_{1\alpha}, p_{2\alpha}, q_{1\alpha}, q_{2\alpha}) = (-1)^n C_{\mu\nu}( p_1^\alpha,{p}_2^\alpha,{q}_1^\alpha,{q}_2^\alpha ) \, , \label{eq:parity} \end{equation} which holds for each individual diagram. For $\pi^+\pi^-$ scattering, $n=2$ and parity conservation excludes the tensor structures in eq.~\eqref{eq:P-odd tensors}. In next section, we will generalize the pion-pion process to pion-nucleon scattering, for which we will have both P-even and P-odd tensor structures. For the exclusive $\pi^+\pi^-$ scattering in this section, we can express the hard coefficient in terms of a linear combination of the P-even tensors in eq.~\eqref{eq:P-even tensors}, \begin{align} C^{\mu\nu} \equiv -\frac{i e^2 g^2}{2s^2}\frac{C_F}{N_c}\,\bigg( C_{0} \, \widetilde{g}_{\perp}^{\mu\nu}\, s + C_{1} \, \widetilde{p}_{1}^{\mu}\bar{p}_{1}^{\nu} + C_{2} \, \widetilde{p}_{2}^{\mu}\bar{p}_{2}^{\nu} + C_{3} \, \widetilde{p}_{1}^{\mu}\bar{p}_{2}^{\nu} + C_{4} \, \widetilde{p}_{2}^{\mu}\bar{p}_{1}^{\nu} \bigg) \, , \label{eq:gauge-inv expansion} \end{align} where we introduced an overall factor $-i e^2 g^2 (C_F/N_c)/(2s^2)$ with electric charge $e$, strong coupling constant $g$, color factor $C_F/N_c$ for the leading order contribution, and collision energy squared $s=2p_1^+p_2^-$ to make the scalar coefficients $C_i=C_i(z_1, z_2; \kappa)$ dimensionless for $i=0,\cdots,4$, with $\kappa$ introduced in eq.~\eqref{eq:kin q12}. Substituting eq.~\eqref{eq:gauge-inv expansion} in eq.~\eqref{eq:factorization M pi pi}, we obtain \begin{align} \mathcal{M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma} = & -\frac{i\, e^2 g^2 f_{\pi}^2 }{8 s^2} \frac{C_F}{N_c} \,\bigg( \mathcal{M}_{0} \, \widetilde{g}_{\perp}^{\mu\nu}\, s + \mathcal{M}_{1} \, \widetilde{p}_{1}^{\mu}\bar{p}_{1}^{\nu} + \mathcal{M}_{2} \, \widetilde{p}_{2}^{\mu}\bar{p}_{2}^{\nu} + \mathcal{M}_{3} \, \widetilde{p}_{1}^{\mu}\bar{p}_{2}^{\nu} + \mathcal{M}_{4} \, \widetilde{p}_{2}^{\mu}\bar{p}_{1}^{\nu} \bigg) \, , \label{eq:M result} \end{align} where $\mathcal{M}_i$ is the convolution of the hard scalar coefficient $C_i$ with the normalized DA $\phi(z)$ \begin{align} \mathcal{M}_i = \int_0^1 \dd z_1 \int_0^1 \dd z_2 \, \phi(z_1)\, \phi(z_2) \, C_i(z_1,z_2; \kappa) \, , \quad (i=0,\cdots, 4), \end{align} with $\phi(z)$ defined as \begin{equation} \phi(z) \equiv - \frac{2i}{f_\pi} D_{\pi^+}(z) \, ,\quad \int_0^1 \dd z\, \phi(z) = 1, \end{equation} and $f_{\pi}=130~{\rm MeV}$ being the pion decay constant. To help simplify some long expressions in this paper, we introduce a notation \def\mathfrak{M}{\mathfrak{M}} \begin{align} \mathfrak{M}[C; D_1, (z_1^m, z_1^M); D_2, (z_2^m, z_2^M)] \equiv \int_{z_1^m}^{z_1^M} \dd{z_1} \int_{z_2^m}^{z_2^M} \dd{z_2}\, D_1(z_1)\, D_2(z_2)\, C(z_1, z_2). \end{align} We can then express our factorization formalism in eq.~\eqref{eq:factorization M pi pi} as \begin{equation} \mathcal{M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma} = \mathfrak{M}[C^{\mu\nu}; D_{\pi^+}, (0,1); D_{\pi^-}, (0,1)] \, , \end{equation} and all scalar functions $\mathcal{M}_{i}$ in eq.~\eqref{eq:M result} as \begin{equation} \mathcal{M}_{i} = \mathfrak{M}[C_i; \phi, (0,1); \phi, (0,1)] \, , \label{eq:Mi} \end{equation} with $i=0,1, ..., 4$. \subsection{The leading-order hard coefficients} \label{sec:hard coef} At leading-order of $\alpha_s$, there are two types of Feynman diagrams contributing to the short-distance hard coefficients: $A$) the two observed photons are radiated from the different fermion lines, which we refer to as Type-$A$ diagrams shown in figure~\ref{fig:hard1}, and $B$)\ they are radiated from the same fermion line, which we refer to as Type-$B$ diagrams shown in figure~\ref{fig:hard2}. With the two identical photons in the final-state, we need to consider additional diagrams that are the same as those in figure~\ref{fig:hard1} and \ref{fig:hard2}, but with the two photons switched. That is, we need to evaluate a total of 8 Type-$A$ diagrams and 12 Type-$B$ diagrams for the leading-order hard coefficients. \begin{figure}[htbp] \begin{center} \begin{subfigure}{.23\textwidth} \centering \includegraphics[scale=0.65]{figures/hard11.pdf} \caption{} \label{fig:hard11} \end{subfigure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[scale=0.65]{figures/hard14.pdf} \caption{} \label{fig:hard12} \end{subfigure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[scale=0.65]{figures/hard12.pdf} \caption{} \label{fig:hard13} \end{subfigure} \begin{subfigure}{.23\textwidth} \centering \includegraphics[scale=0.65]{figures/hard13.pdf} \caption{} \label{fig:hard14} \end{subfigure} \caption{\label{fig:hard1} The Type-$A$ diagrams, plus those with $q_1$ and $q_2$ switched. Relatively thicker gluon lines are used to indicate the large transverse momentum flow from one photon to another, in contrast to those in figure~\ref{fig:hard2}.} \end{center} \end{figure} \begin{figure}[htbp] \begin{center} \begin{subfigure}{.25\textwidth} \centering \includegraphics[scale=0.65]{figures/hard21.pdf} \caption{} \label{fig:hard21} \end{subfigure} \begin{subfigure}{.25\textwidth} \centering \includegraphics[scale=0.65]{figures/hard22.pdf} \caption{} \label{fig:hard22} \end{subfigure} \begin{subfigure}{.25\textwidth} \centering \includegraphics[scale=0.65]{figures/hard23.pdf} \caption{} \label{fig:hard23} \end{subfigure} \\ \begin{subfigure}{.25\textwidth} \centering \includegraphics[scale=0.65]{figures/hard24.pdf} \caption{} \label{fig:hard24} \end{subfigure} \begin{subfigure}{.25\textwidth} \centering \includegraphics[scale=0.65]{figures/hard25.pdf} \caption{} \label{fig:hard25} \end{subfigure} \begin{subfigure}{.25\textwidth} \centering \includegraphics[scale=0.65]{figures/hard26.pdf} \caption{} \label{fig:hard26} \end{subfigure} \caption{\label{fig:hard2} The Type-$B$ diagrams, plus those with $q_1$ and $q_2$ switched. } \end{center} \end{figure} In the CM frame of this exclusive scattering process, the large transverse momentum $q_T$ of one-photon should be balanced by that of the other photon. This large transverse momentum $q_T$ flows through the gluon connecting the two fermion lines for all Type-$A$ diagrams, while it does not flow through the gluon for all Type-$B$ diagrams. Since the relative momentum of the quark and antiquark of the colliding pion, represented by the $z_1$ (or $z_2$) dependence of the pion DA in eq.~(\ref{eq:factorization M pi pi}), flows through the gluon line of the hard scattering back to the pion, the $q_T$-dependence of the gluon propagator of the Type-$A$ diagrams makes the hard coefficient, and hence, the cross section $\dd\sigma/\dd q_T^2$ of this exclusive process, be a sensitive probe for the $z_1$ (or $z_2$) dependence of pion DA. Its sensitivity depends on the relative size of contributions to the cross section from these two-types of diagrams. For our calculation of the leading-order hard coefficients, we denote the diagrams in figure~\ref{fig:hard1}(a)-(d) by $A1, \cdots, A4$, sequentially, and the ones with $q_1$ and $q_2$ switched by $A1' , \cdots, A4'$, respectively. Their contributions to the hard coefficient $C^{\mu\nu}$ are denoted sequentially by $C^{\mu\nu}_{A1}, C^{\mu\nu}_{A2}$, etc. Similarly, we label the individual contribution from the Type-$B$ diagrams in a similar way. We use $C_A^{\mu\nu}$ and $C_B^{\mu\nu}$ to represent total contribution from the Type-$A$ and Type-$B$ diagrams, respectively. The contribution from each individual diagram in figure~\ref{fig:hard1} and \ref{fig:hard2} can be evaluated by using eq.~\eqref{eq:hard C}. The collinear momenta of colliding partons, as labeled in figure~\ref{fig:hard1} and \ref{fig:hard2}, are defined as \begin{align} \hat{k} = z_1\, p_1, \quad \hat{k}' = (1-z_1) \, p_1, \quad \hat{l} = z_2\, p_2, \quad \hat{l}' = (1-z_2) \, p_2, \quad \end{align} and the photon momenta are given in eq.~\eqref{eq:kin q12} and also in \eqref{eq:p1p2q12}. The external collinear quark and antiquark lines from $\pi^+$ on the left are contracted with $\gamma_5(p_1^+\gamma^-)/2$, while the collinear quark and antiquark lines from $\pi^-$ on the right are contracted with $\gamma_5(p_2^-\gamma^+)/2$. At this order, all momenta of internal propagators are completely determined. For example, for figure~\ref{fig:hard1}(a), we have \begin{gather} k_1 = q_1 - \hat{l}' \, ,\quad k_2 = q_2 - \hat{k}' \, , \nonumber\\ q = \hat{k} - k_1 = \hat{k} + \hat{l}' - q_1 = k_2 - \hat{l} = q_2 - \hat{l} - \hat{k}' \, , \end{gather} and its contribution to $C^{\mu\nu}$ is given by \begin{align} C_{A1}^{\mu\nu} =& \, i e_u e_d \, e^2 g^2 \cdot\frac{C_F}{N_c}\cdot \frac{1}{k_1^2+i\varepsilon} \cdot \frac{1}{k_2^2+i\varepsilon} \cdot \frac{1}{q^2+i\varepsilon} \nonumber\\ & \times {\rm Tr}\left[\, \left( \frac{\gamma_5}{2}(p_2^-\gamma^+)\right) \gamma^{\mu} \slash{k}_1 \gamma^{\alpha} \left( \frac{\gamma_5}{2} (p_1^+\gamma^-)\right) \gamma^{\nu} \slash{k}_2 \gamma_{\alpha} \,\right] \nonumber\\ =& \, -i e_u e_d \, e^2 g^2 \cdot\frac{C_F}{N_c}\cdot \frac{1}{k_1^2 + i\varepsilon} \cdot \frac{1}{k_2^2 + i\varepsilon}\cdot \frac{1}{q^2+i\varepsilon} \nonumber\\ &\times 2s \left[ g_{\perp}^{\mu\nu} p_2 \cdot q_1 + \hat{l}^{\mu} q_T^{\nu} - \hat{k}^{\nu} q_T^{\mu} - q^2 n^{\mu} \bar{n}^{\nu} \right], \label{eq:CA1} \end{align} where $e_u=2/3$ and $e_d=-1/3$, $s=2p_1^+p_2^-$ and the observed photon momenta are defined in eq.~\eqref{eq:p1p2q12}. In eq.~(\ref{eq:CA1}), the momenta of internal fermion propagators are fixed as \begin{subequations}\label{eq:A k1k2} \begin{align} k_1^2 & = -2 \, \hat{l}'\cdot q_1 = -2 (1-z_2) \, (p_2\cdot q_1), \\ k_2^2 & = -2 \, \hat{k}'\cdot q_2 = -2 (1-z_1) \, (p_1\cdot q_2), \end{align} \end{subequations} where the dependence on the parton momentum fractions $z_{1,2}$ is factored out from the external kinematic variables. On the other hand, the exchanged gluon momentum between the two fermion lines, which is the same for the gluon propagators in all the diagrams in figure~\ref{fig:hard1}, is given by \begin{align} q^2 & = 2 q^+ q^- - q_T^2 = s\left[ \left(z_1 - \frac{q_1^+}{p_1^+} \right) \left(1-z_2 - \frac{q_1^-}{p_2^-} \right) - \frac{\kappa}{4} \right] \nonumber\\ & = -\frac{s}{4} \left[ \left( 2z_1 - 1 \mp \sqrt{1-\kappa} \right) \left( 2z_2 - 1 \mp \sqrt{1-\kappa} \right) +\kappa \right] \, , \label{eq:A q} \end{align} for which the parton fractions $z_{1,2}$ cannot be factorized out of the dependence on $q_T$. It is this entanglement of parton momentum fractions $z_{1,2}$ and external variable $q_T$ that makes Type-$A$ diagrams sensitive to the DA's functional form. For the Type-$B$ diagrams in figure~\ref{fig:hard2}, the momenta of the internal propagators are different, although they have the same external parton momenta. For example, we have the contribution from figure~\ref{fig:hard2}(a), \begin{align} C_{B1}^{\mu\nu} =& \, i \,e_u^2 \, e^2 g^2 \cdot\frac{C_F}{N_c} \cdot \frac{1}{ \widetilde{k}_1^2 + i\varepsilon} \cdot \frac{1}{ \widetilde{k}_2^2 + i\varepsilon} \cdot \frac{1}{ \widetilde{q}^2 + i\varepsilon} \nonumber\\ &\times{\rm Tr} \left[ \left( \frac{\gamma_5}{2} (p_1^+\gamma^-) \right) \gamma^{\alpha} \left( \frac{\gamma_5}{2} (p_2^-\gamma^+) \right) \gamma^{\nu} \slash{\widetilde{k}}_2 \gamma_{\alpha} \slash{\widetilde{k}}_1 \gamma^{\mu} \right] \nonumber\\ =& -i \,e_u^2 \, e^2 g^2 \cdot\frac{C_F}{N_c} \cdot \frac{1}{ \widetilde{k}_1^2 + i\varepsilon} \cdot \frac{1}{ \widetilde{k}_2^2 + i\varepsilon} \cdot \frac{1}{ \widetilde{q}^2 + i\varepsilon} \nonumber\\ &\times s \left[ g_{\perp}^{\mu\nu} q_T^2 + 2 q_T^{\mu} q_T^{\nu} - 4 \bar{n}^{\mu} n^{\nu} \left(\hat{k}^+ - q_1^+ \right) \left(\hat{l}'^- - q_2^- \right) \right. \nonumber\\ &\hspace{2em}\left. +2 \bar{n}^{\mu} q_T^{\nu} \left(\hat{k}^+ - q_1^+ \right) -2 n^{\nu} q_T^{\mu} \left(\hat{l}'^- - q_2^- \right) \right] \, , \label{eq:CB1} \end{align} where the momenta of internal propagators are given by \begin{align} \widetilde{k}_1 = \hat{k} - q_1, \quad \widetilde{k}_2 = q_2 - \hat{l}', \quad \widetilde{q} = \hat{k}' + \hat{l}. \end{align} Similar to eq.~\eqref{eq:A k1k2}, all the three internal propagators, including the gluon propagator, \begin{subequations}\label{eq:A k1k2q}\begin{align} \widetilde{k}_1^2 &=-2\hat{k}\cdot q_1 = -2 z_1 (p_1\cdot q_1),\\ \widetilde{k}_2^2 &=-2\hat{l}'\cdot q_2 = -2 (1-z_2) (p_2\cdot q_2),\\ \widetilde{q}^2 &=2\hat{k}'\cdot\hat{l} = z_2 (1-z_1) s , \end{align}\end{subequations} have their dependence on parton momentum fractions $z_{1,2}$ factored out from the external kinematic variables. This is actually true for all the diagrams in figure~\ref{fig:hard2}. Consequently, when the hard coefficient $C_{B}^{\mu\nu}$ is convoluted with DAs in eq.~(\ref{eq:factorization M pi pi}), the measured kinematic variables are factored out of the $z_1$ and $z_2$ integration. Therefore, for the contribution from the Type-$B$ diagrams, changing external kinematics does not directly probe the functional form of DAs. That is, the contribution from the Type-$B$ diagrams in figure~\ref{fig:hard2} to the factorized scattering amplitude in eq.~(\ref{eq:factorization M pi pi}) is not directly sensitive to the functional form of DAs, but rather to their integrated values or some kind of ``moments''. The contribution from one single diagram, such as that in eq.~\eqref{eq:CA1} or in eq.~\eqref{eq:CB1}, is not gauge invariant, and does not have the invariant form in eq.~\eqref{eq:gauge-inv expansion}, while the sum over all the diagrams at the same order should be gauge invariant and can be organized in the form in eq.~\eqref{eq:gauge-inv expansion}. Actually, the sum of all Type-$A$ diagrams and the sum of all Type-$B$ diagrams are gauge invariant separately, and each of them can be organized into the form in eq.~\eqref{eq:gauge-inv expansion}. We can get the contribution to the scalar coefficient $C_i$ in eq.~\eqref{eq:gauge-inv expansion} from each diagram by extracting the coefficient of $g^{\mu\nu}_{\perp}$, $p_1^{\mu} p_1^{\nu}$, $p_2^{\mu} p_2^{\nu}$, $p_1^{\mu} p_2^{\nu}$ and $p_2^{\mu} p_1^{\nu}$ sequentially. The terms containing $q_T^{\mu}$ or $q_T^{\nu}$ will be naturally organized such that we have the gauge-invariant form of eq.~\eqref{eq:gauge-inv expansion}, and can be used as a cross-checking. For example, for the diagram in figure~\ref{fig:hard11}, we have its contribution to each scalar coefficient $C_i$, \begin{subequations}\label{eq:scalar C A1} \begin{align} C_{0}^{(A1)} & = e_u e_d \cdot \frac{s^2 }{(p_1\cdot q_2) q^2} \cdot \frac{1}{(1-z_1)(1-z_2)}, \\ C_{4}^{(A1)} & = - e_u e_d \cdot \frac{2 s^2}{(p_1\cdot q_2)(p_2\cdot q_1)} \cdot \frac{1}{(1-z_1)(1-z_2)}, \\ C_{1}^{(A1)}&=C_{2}^{(A1)}=C_{3}^{(A1)}=0, \end{align}\end{subequations} where we have omitted the $+i\varepsilon$ since for the simple $\pi^+\pi^-$ case, those poles happen at the end points where the DA vanishes, and it does not matter to which side of the $z_{1(2)}$ integration contour the poles lie. The complete contribution to the scalar coefficients $C_i$ in eq.~\eqref{eq:gauge-inv expansion} from all diagrams are reorganized in compact forms and given in the Appendix, where the interplay between measured $q_T$ distribution and the $z$-dependence of the DA is further discussed. Charge conjugation sets some useful relations among the results of individual diagrams. Applying charge conjugation on a diagram effectively exchanges the $u$ and $d$ quark lines, and can be visualized by simply reversing the fermion arrows and reassigning the parton momenta such that we still have $u$ quark carrying the momentum fraction $z_1$ or $z_2$. At the level of calculating Feynman diagrams, this simply reverses the order of the $\gamma$ matrices, which does not change the value of the Dirac trace. However, for the contraction with $\gamma_5\gamma^{\mp}$ on the $\pi^{\pm}$ sides, we need to reverse $\gamma^{\mp}\gamma_5$ back to $\gamma_5\gamma^{\mp}$, so one $\gamma_5$ would bring one extra minus sign, which leads to the following relations among the diagrams, \begin{align} &\{ C_{A1}, \, C_{A1'}, \, C_{A3}, \, C_{A4} \}^{\mu\nu} (z_1,z_2) =\{ C_{A2'}, \, C_{A2}, \, C_{A3'}, \, C_{A4'}\}^{\mu\nu}(1-z_1,1-z_2), \label{eq:C conjugation A} \end{align} for Type-$A$ diagrams, and \begin{align} &\{ C_{B1}, \, C_{B1'}, \, C_{B2}, \, C_{B2'}, \, C_{B3}, \, C_{B3'} \}^{\mu\nu}(z_1,z_2) \nonumber \\ & = \{ C_{B4}, \, C_{B4'}, \, C_{B5}, \, C_{B5'}, \, C_{B6}, \, C_{B6'} \}^{\mu\nu}(1-z_1,1-z_2) \bigg|_{e_u\leftrightarrow e_d} \label{eq:C conjugation B} \end{align} for Type-$B$ diagrams, where we also need to exchange $e_u$ and $e_d$. Consequently, we have the symmetry \begin{equation} C^{\mu\nu}_A(z_1,z_2)=C^{\mu\nu}_A(1-z_1, 1-z_2), \label{eq:CA symmetry} \end{equation} for Type-$A$ diagrams, while for $C_B$ this symmetry is broken by the difference of $e_u^2$ and $e_d^2$. These relations carry through to the scalar coefficients $C_i$ ($i = 0,\cdots, 4$), which can also serve as a useful check; see the Appendix for some more discussion. \subsection{Exclusive differential cross section} In this paper, we focus on the exclusive production of two unpolarized back-to-back photons in $\pi^+(p_1)\pi^-(p_2)$ collisions, and derive the differential cross section as follows, \begin{align} \dd\sigma=\frac{1}{2s}\, \left|\overline{ \mathcal{M}} \right|^2 \, \frac{\dd^3\bm{q}_1}{(2\pi)^3 2|\bm{q}_1|}\frac{\dd^3\bm{q}_2}{(2\pi)^3 2|\bm{q}_2|} (2\pi)^4 \,\delta^{(4)}(p_1+p_2-q_1-q_2) \, , \label{eq:diffsigma} \end{align} where $\left|\overline{ \mathcal{M}} \right|^2$ represents scattering amplitude squared, with final-state photon polarizations summed, \begin{align} \left|\overline{ \mathcal{M}} \right|^2 =\sum_{\lambda \lambda'} | \mathcal{M}_{\pi^+\pi^- \to \gamma(\lambda) \gamma(\lambda')} |^2 = g_{\mu\rho} \, g_{\nu\sigma} \, \mathcal{M}^{\mu\nu}_{\pi^+\pi^- \to \gamma \gamma} \mathcal{M}^{\rho\sigma*}_{\pi^+\pi^- \to \gamma \gamma} \, , \label{eq:T} \end{align} where $\sum_{\lambda} \varepsilon^{\lambda \,*}_\mu\, \varepsilon^{\lambda}_{\mu'} = -g_{\mu\mu'}$ was used. From the factorized scattering amplitude in eq.~\eqref{eq:M result}, and using \begin{align} \widetilde{p}_{1}^2 &= - \frac{(p_1\cdot q_1)^2}{q_T^2}, \quad \widetilde{p}_{2}^2 = - \frac{(p_2\cdot q_1)^2}{q_T^2}, \quad \bar{p}_{1}^2 = - \frac{(p_1\cdot q_2)^2}{q_T^2}, \quad \bar{p}_{2}^2 = - \frac{(p_2\cdot q_2)^2}{q_T^2}, \nonumber\\ &\hspace{1.1in} \widetilde{p}_{1}\cdot \widetilde{p}_{2} =\bar{p}_{1}\cdot \bar{p}_{2} =\frac{1}{2} p_1\cdot p_2 \, , \end{align} we obtain the scattering amplitude square as \begin{align} \left|\overline{ \mathcal{M}} \right|^2 = & \left(\frac{e^2\,g^2\, f_{\pi}^2}{8s}\frac{C_F}{N_c}\right)^2 \bigg[ |\mathcal{M}_0|^2 + \bigg|\frac{\mathcal{M}_1 + \mathcal{M}_2}{4} - \frac{(p_1\cdot q_1)^2 \mathcal{M}_3 + (p_1\cdot q_2)^2 \mathcal{M}_4}{s\, q_T^2} \bigg|^2 \bigg] \, , \label{eq:M2} \end{align} where $\mathcal{M}_i$ with $i=0,1,...,4$ can be factorized if $q_T \gg \Lambda_{\rm QCD}$ and are given in eq.~\eqref{eq:Mi}. In eq.~\eqref{eq:M2}, the terms in the bracket are dimensionless and only functions of $\kappa=4q_T^2/s$. Therefore, from eq.~\eqref{eq:diffsigma} with the azimuthal angle of $\bm{q}_T$ integrated, we derive the differential cross section in $q_T$, \begin{align} \frac{\dd\sigma}{\dd q_T^2} = \frac{1}{\sqrt{1- 4q_T^2/s}} \frac{ 1}{16\pi s^2} \left|\overline{ \mathcal{M}} \right|^2 \, , \label{eq:qT xsec} \end{align} with $\left|\overline{ \mathcal{M}} \right|^2$ given in eq.~\eqref{eq:M2}. The first factor in eq.~\eqref{eq:qT xsec} is the Jacobian peak. The differential cross section could be smoother if one changes $q_T$-distribution to $\cos\theta$-distribution with $\theta$ being the angle between the direction of one of the observed photon and the collision axis. One should note that the value of $q_T$ alone is not enough to completely specify an event, due to the ambiguity of whether $q_1$ is in the forward or backward direction of $p_1$, corresponding to the $\pm$ solutions in eq.~\eqref{eq:kin q12}. However, since the two photons are identical, the cross section must be the same for the forward and backward configurations. Therefore, we can take the forward solution in eq.~\eqref{eq:qT xsec}, without adding a $1/2$ factor to account for the factor that two photons are identical. For the rest of this paper, we will stick to the forward solution of eq.~\eqref{eq:kin q12}. We can also defined the integrated ``total'' cross section for $q_T^2\ge q^2_{T{\rm min}}$ as \begin{align} \sigma(q^2_{T{\rm min}}) \equiv \int_{q^2_{T{\rm min}}}^{s/4} \frac{\dd\sigma}{\dd q_T^2}\, \dd q_T^2 \, , \label{eq:xsec} \end{align} with $q^2_{T{\rm min}} \gg \Lambda^2_{\rm QCD}$ to ensure the factorization. In our numerical estimate below, we choose $q^2_{T{\rm min}} =1$~GeV$^2$. \section{Exclusive production of a pair of high transverse momentum photons in diffractive meson-baryon scatterings} \label{s.pih2gg} Having explained the main steps in factorizing the amplitude for the exclusive photon-pair production in the $\pi^+\pi^-$ annihilation, we now generalize the factorization formalism to an exclusive process involving diffractive scattering of a nucleon $N$ of momentum $p$, \begin{equation} \pi(p_2) + N(p) \to \gamma(q_1)+\gamma(q_2) + N'(p'), \label{eq:p pi process} \end{equation} where $N$ can be a neutron ($n$) or a proton ($p$) and $\pi$ can be $\pi^+$ or $\pi^-$, making up various exclusive processes, such as, $n\,\pi^+\to p\gamma\gamma$, $p\,\pi^-\to n\gamma\gamma$, $p\,\pi^-\to \Lambda^0\gamma\gamma$, and those that could be measured with a pion beam at J-PARC and other facilities. The pion beam can also be replaced by a kaon beam and make up more processes. As shown in figure~\ref{figureempp}(c), the exclusive process, $p\,\pi^-\to n\gamma\gamma$, could be made analogous to the $\pi^+\pi^-$ collision by thinking of the $p\to n$ transition as taking a virtual $\pi^+$ out of the proton, carrying momentum $\Delta = p - p'$ and colliding with $\pi^-$ to produce two hard photons exclusively. Nevertheless, the factorization cannot be trivially adapted, because that analogy only corresponds to the ERBL region of GPD for which all the active partons from the nucleon enter into the hard part and the soft gluon momentum is not pinched in the Glauber region. Now that we are considering diffractive scattering, the presence of the spectator particles from the $N\to N'$ transition implies another kinematic region where some partons enter into the hard part and then come out to recombine with the spectators to form the diffracted $N'$. This corresponds to the DGLAP region for GPD, in which the soft gluon momentum can be partly trapped in the Glauber region. Additional argument is needed for the factorization proof, which will be given in subsection~\ref{s.proton-factorize}. \subsection{Kinematics} \label{sec:kin} In the lab frame, the nucleon (pion) is moving along $+\hat{z}$ ($-\hat{z}$) direction, carrying a large plus (minus) momentum. Two photons with large and opposite transverse momenta are produced in the final state, together with a recoiled nucleon, or a baryon in general. We focus on the region of phase space where $-t = -\Delta^2 \ll (q_1+q_2)^2 $. That is, we require that the proton be recoiled in an approximately collinear direction and the invariant mass of the momentum transfer $\Delta$ be much smaller than the energy of this transfer. This is the condition that allows the scattering amplitude of the exclusive process in eq.~\eqref{eq:p pi process} to be factorized into a transition GPD of the nucleon. Since $\Delta$ carries a small transverse component and sufficiently large longitudinal component, it is convenient for our analysis to boost the lab frame into the CM frame of $\Delta$ and $p_2$ where $\vec{\Delta}$ is along $+\hat{z}$ direction, which is also the rest frame of $q_1$ and $q_2$, so that the $\Delta$ could mimic the momentum $p_1$ of $\pi^+$ in the Sec.~\ref{s.toy}. We denote this frame as photon frame $S_{\gamma}$, distinguished from the lab frame $S_{\rm lab}$. The transformation from $S_{\rm lab}$ to $S_{\gamma}$ can be done by first boosting along $\vec{\Delta}_T$ such that $\vec{\Delta}$ is in parallel and head-to-head with $\vec{p}_2$, followed by a rotation in the $\vec{\Delta}_T$-$\vec{p}_2$ plane to make $\vec{\Delta}$ along $+\hat{z}$ direction. In the $S_{\gamma}$ frame, we have the momentum conservation, \begin{equation} \Delta + p_2 = q_1 + q_2 \, , \label{eq:mom_conv} \end{equation} and the CM collision energy square $\hat{s} \equiv (\Delta + p_2)^2 = (q_1 + q_2)^2 \gg \Lambda_{\rm QCD}^2$. For the leading power contribution, in analog to eq.~\eqref{eq:kin}, we can parametrize $\Delta$ and $p_2$ as \begin{align} \Delta & = \left( \Delta^+, \, \frac{t}{2\Delta^+}, \, \bm{0}_T \right)_{\gamma} \simeq \left( \Delta^+, \, 0, \, \bm{0}_T \right)_{\gamma} \, ,\nonumber\\ p_2 & = \left( \frac{m_{\pi}^2 }{2 p_2^-}, \, p_2^-, \bm{0}_T \right)_{\gamma} \simeq \left( 0, \, p_2^-, \, \bm{0}_T \right)_{\gamma} \, , \label{eq:kin2} \end{align} where in the second step (and in the following) the ``$\simeq$'' means the neglect of small quantities suppressed by powers of $m_{\pi}^2/Q^2$ or $t/Q^2$ with the hard scale $Q\sim {\cal O}(q_T) \lesssim \sqrt{\hat{s}}$. In addition, we also implicitly take the {\it rescaled} light-like $\Delta$ and $p_2$ as the momenta entering the hard process, with \begin{equation} \Delta^+ = p_2^- = \sqrt{\frac{(\Delta + p_2)^2}{2}} = \sqrt{\frac{\hat{s}}{2}}\, , \end{equation} to keep the momentum conservation manifest, which is useful for the factorization of this process. The skewness in the lab frame is defined as \begin{equation} \xi = \frac{\Delta_{\rm lab}^+}{ 2 P_{\rm lab}^+}, \end{equation} where $P = (p+ p')/2$. We then have $p_{\rm lab}^+ = (1+\xi)P_{\rm lab}^+$, $p'^+_{\rm lab} = (1-\xi)P_{\rm lab}^+$, and \begin{equation} \hat{s} = (\Delta + p_2)^2 \simeq 2 \Delta^+ p_2^- = \frac{2\xi}{1+\xi} (2p^+ p_2^-)_{\rm lab} \simeq \frac{2\xi}{1+\xi}\, s \, , \label{eq:S s} \end{equation} which defines a unique role of the skewness, quantifying the momentum flowing into the hard process from the colliding hadron of momentum $p$. The invariant mass squared of the momentum transfer, $t = \Delta^2$, can be related to $\xi$ and the transverse component of the momentum transfer $\Delta_T$ by \begin{equation} t =- \left( \frac{4\xi^2}{1-\xi^2} m_p^2 + \frac{1+\xi}{1-\xi} \Delta_T^2 \right), \label{eq:t-DeltaT} \end{equation} where $m_p$ is the proton mass and we neglect the mass difference between proton and neutron. For a given small $t$, $\Delta_T$ is bounded to be small, and $\xi$ is effectively constrained by \begin{equation} 0 < \xi \leq \sqrt{\frac{-t/m_p^2}{4 - t /m_p^2}} \, . \label{eq:xi range t} \end{equation} Every event of the exclusive process in eq.~\eqref{eq:p pi process} is specified by three momenta $p'$, $q_1$ and $q_2$, which are constrained by on-shell conditions and momentum conservation, leading to $9-4=5$ degrees of freedom in kinematics. $\bm{\Delta}_T$ and $\xi$ are sufficient to specify the neutron momentum. The photon momenta are to be described by $\bm{q}_T$ in the photon frame $S_{\gamma}$, where they are back-to-back. That is, $(\bm{\Delta}_T, \xi, \bm{q}_T)$ fixes all the kinematics. Our process is insensitive to azimuthal angle in either $\bm{\Delta}_T$ or $\bm{q}_T$, and we will integrate out these angles, leaving only three degrees of freedom, $\Delta_T$, $\xi$ and $q_T$, or equivalently, $t$, $\xi$ and $q_T$ as independent variables. \subsection{Factorization} \label{s.proton-factorize} \begin{figure}[htbp] \centering \includegraphics[scale=0.75]{figures/proton-pion_pinch.pdf} \caption{The general pinch-singular surface for the process \eqref{eq:p pi process}.} \label{fig:p-pi-PSS} \end{figure} We generalize the factorization formula derived in Sec.~\ref{sec:factorization1} to describe the scattering amplitude of the exclusive process in eq.~\eqref{eq:p pi process}. As indicated by the general pinch-singular surface in figure~\ref{fig:p-pi-PSS}, the initial-state nucleon momentum $p$ and slightly recoiled hadron momentum $p'$ define the direction of a collinear subgraph, $\hat{D}_1$, which is joined by a set of collinear parton lines to the hard subgraph, from which two photons with large transverse momenta are produced. The power counting for a pinch surface is derived in the same way as what was done in the last section. The only difference is that the dimension for the $\hat{D}_1$ is reduced by 1 because we have an extra external final-state hadron line connected to $\hat{D}_1$ in figure~\ref{fig:p-pi-PSS}. Like eq.~\eqref{eq:scale1}, we obtain the scaling behavior for corresponding reduced diagram as \begin{align} {\cal M}_{N\pi\to N'\gamma\gamma}\sim \hat{H}\otimes \hat{D}_1\otimes \hat{D}_2\otimes S \ \propto\ \lambda^{\alpha-1} \, , \label{eq:pc p pi} \end{align} where $\alpha$ is the same as that in eq.~\eqref{eq:pc1}. With the minimum power $\alpha=2$, we obtain the leading pinch surfaces to the scattering amplitude of exclusive process in eq.~\eqref{eq:p pi process}, as shown in figure~\ref{fig:p pi LR}, which are slightly modified from those in figure~\ref{fig:pipi LR}. Due to the electric charge or isospin exchange, $\hat{D}_1$ or $\hat{D} _2$ must be connected to other subdiagrams by at least two quark lines. By the same argument at the end of Sec.~\ref{sec:rd}, the pinch surface in figure~\ref{fig:p-pi LR2} is power suppressed compared to that in figure~\ref{fig:p-pi LR1}. \begin{figure}[htbp] \begin{center} \begin{subfigure}{.35\textwidth} \centering \includegraphics[scale=0.7]{figures/proton-pion_leading1.pdf} \caption{} \label{fig:p-pi LR1} \end{subfigure} {\hskip 0.6in} \begin{subfigure}{.35\textwidth} \centering \includegraphics[scale=0.7]{figures/proton-pion_leading2.pdf} \caption{} \label{fig:p-pi LR2} \end{subfigure} \caption{Two possible leading regions for the process \eqref{eq:p pi process}. Arbitrary number of gluons can connect to the collinear subgraphs $\hat{D}_1$ or $\hat{D}_2$ from $S$ or $\hat{H}$, but they have to be longitudinally polarized. } \label{fig:p pi LR} \end{center} \end{figure} \subsubsection{Deformation out of Glauber region} Before we adopt the approximations listed in Sec.~\ref{sec:approx} to start our factorization arguments, we note one complication that distinguishes the diffractive meson-baryon process in eq.~\eqref{eq:p pi process} from the $\pi^+\pi^-$ case discussed in the last section. The factorization proof of $\pi^+\pi^-$ process was simplified by the fact that all the collinear parton lines go from the \textit{past} to \textit{now} when the hard collision takes place, without going to the future as spectators, as shown in figure~\ref{fig:soft-momentum}. All the parton lines collinear to $\pi^+$ ($\pi^-$) have positive plus (minus) momenta, and the plus/minus momenta of the soft gluons are not trapped to be much smaller than their transverse components. We can get those soft gluons out of the Glauber region by deforming the contours of their momentum integrations, as discussed in Sec.~\ref{sec:approx}. However, in the $\pi N$ case, or more specifically, in $p \pi^- \to n\gamma\gamma$ case, the proton-neutron transition can have either (i) all the collinear parton lines going from the proton \textit{into} the hard part, as shown in figure~\ref{fig:p-pi-xt1}, or (ii) some parton lines going from the proton \textit{into} the hard part, but others going to the future as spectators and merging with partons coming out the hard part to form a neutron, as shown in figure~\ref{fig:p-pi-xt2}. The type (i) corresponds to the ERBL region of GPD, and the type (ii) is for the DGLAP region. \begin{figure}[htbp] \begin{center} \begin{subfigure}{.38\textwidth} \centering \includegraphics[scale=0.65]{figures/erbl-glauber.pdf} \caption{} \label{fig:p-pi-xt1} \end{subfigure} {\hskip 0.3in} \begin{subfigure}{.48\textwidth} \centering \includegraphics[scale=0.65]{figures/true-glauber.pdf} \caption{} \label{fig:p-pi-xt2} \end{subfigure} \caption{ Difference in soft gluon interaction between ERBL region (a) and DGLAP region (b) in the elastic $\pi N$ process. In (a), the $k_s^-$ integration is not pinched, while in (b), the $k_s^-$ integration is pinched to be in the Glauber region. } \label{fig:p-pi-xt} \end{center} \end{figure} For the ERBL region, the contour deformations and approximations made to the leading regions for every possible diagram are the same as those in Sec.~\ref{sec:approx}. But for the DGLAP region, the presence of proton spectator may trap the minus momenta of soft gluons at small values. For example, as shown in figure~\ref{fig:p-pi-xt2}, the attachment of a soft gluon of momentum $k_s$ to a spectator of the colliding proton leads to two propagators with the denominators, \begin{align} ((1-z)p + k_s)^2 +i\varepsilon \approx \ & 2(1-z)p^+ k_s^- -{\bm k}_{sT}^2+i\varepsilon \, , \nonumber \\ &\Rightarrow \quad k_s^- \mbox{ pole } \approx \frac{{\bm k}_{sT}^2}{2(1-z)p^+ } - i\varepsilon \quad \to \quad {\cal O}(\lambda^2 Q) - i\varepsilon \, , \nonumber \\ (z p - k_s)^2 +i\varepsilon \approx \ & 2zp^+(-k_s^-) -{\bm k}_{sT}^2+i\varepsilon \, , \nonumber \\ &\Rightarrow \quad k_s^- \mbox{ pole } \approx - \frac{{\bm k}_{sT}^2}{2zp^+} + i \varepsilon \quad \to \quad -{\cal O}(\lambda^2 Q) + i\varepsilon \, , \label{eq:glauber} \end{align} which pinch the $k_s^-$-integration of the soft gluon momentum $k_s$ to be ${\cal O}(\lambda^2 Q)$ when $k_{sT}={\cal O}(\lambda Q)$ and trap the $k_s^-$ in the Glauber region. The same conclusion arrives if we let $k_s$ flow through $N'(p')$ in figure~\ref{fig:p-pi-xt2}. Therefore, the argument that we used in Sec.~\ref{sec:approx} to deform the contours of plus/minus components of soft gluon momenta to get them out of the Glauber region does not work for the soft minus components in the $\pi N$ case when the nucleon $N$ is moving in the ``+'' direction. Luckily, the poles for the plus components of the soft momenta are solely provided by the collinear lines from the $\pi$, which all go \textit{into} the hard part with positive minus momenta. All the poles from $l_j + k_s$ lie on the same half plane, and therefore, we can deform $k_s^+$ as \begin{equation} k_s^+ \to k_s^+ + i\mathcal{O}(p^+), \end{equation} when it lies in the Glauber region flowing into the $\hat{D}_2$ subgraph. This is the maximal extent that we can deform $k_s^+$, which leads the soft momentum $k_s$ all the way into $\hat{D}_1$-collinear region. That is, the soft Glauber mode is deformed to be a collinear mode, which is only possible when all the collinear lines from the $\pi$ flow into the hard part $\hat{H}$. Had we considered an exclusive double diffractive process: $pn\to pn\gamma\gamma$, with a pair of back-to-back high transverse momentum photons produced while the nucleons are slightly diffracted, we would have both plus and minus components of soft momenta pinched in the Glauber region, which forbids the double diffractive processes, like $pn\to pn\gamma\gamma$, $p\bar{p}\to p\bar{p}+{\rm jet}+{\rm jet}$, etc., to be factorized into two GPDs and a hard part~\cite{Soper:1997gj}, even though there is indeed a hard scale provided by the transverse momenta of the photons or the jets. After the deformation of Glauber gluons, we can apply all the approximations in Sec.~\ref{sec:approx}. Since we will not deform $k_s^-$ in DGLAP region, it does not matter what $i\varepsilon$ prescription we assign to $k_s^-$. We choose the same convention as in Sec.~\ref{sec:approx} to be compatible with ERBL region, for which we do need to deform $k_s^-$. \subsubsection{Soft cancellation and factorization} We first use the same arguments presented in the last section to factorize the collinear subgraph $\hat{D}_2$ from the hard part $\hat{H}$ and the soft factor $S$. The approximation in eqs.~\eqref{eq:k2H} and \eqref{eq:HC2} allows us to use Ward identity to detach all longitudinally polarized collinear gluons of $\hat{D}_2$ from the hard part $\hat{H}$, and factorize them into Wilson lines along $w_1$, as shown in figure~\ref{fig:p-pi-ward-col}. Like the $\pi^+\pi^-\to \gamma\gamma$ case in the last section, the Wilson lines connected to $\hat{D}_2$ point to the past due to the choice of $i\varepsilon$ in eq.~\eqref{eq:HC2}. \begin{figure}[htbp] \centering \includegraphics[scale=0.65]{figures/pion-proton_ward_col2.pdf} \caption{The result of using Ward identity for $\hat{D}_2$-collinear gluons. The Wilson lines point along $w_1$ to the past. The notations are similar to figure~\ref{fig:ward-col}.} \label{fig:p-pi-ward-col} \end{figure} \begin{figure}[htbp] \centering \includegraphics[scale=0.65]{figures/pion-proton_ward_soft.pdf} \caption{The result of using Ward identity for soft gluons coupling to $\hat{D}_2$. Those gluons cancel. The Wilson line is along $w_1$.} \label{fig:p-pi-ward-soft} \end{figure} \begin{figure}[htbp] \centering \includegraphics[scale=0.85]{figures/proton-pion_factorize.pdf} \caption{The factorized form for the process \eqref{eq:p pi process}.} \label{fig:p-pi factorize} \end{figure} Next, having eqs.~\eqref{eq:ks2} and \eqref{eq:SC2}, we can use Ward identity to factorize soft gluons out of the collinear factor $\hat{D}_2$. This leaves the collinear factor $\hat{D}_2$ uncoupled to $\hat{D}_1$, so that $\hat{D}_2$ ends up being color singlet. By the same method of Sec.~\ref{sec:soft_cancel}, the soft gluons coupling to $\hat{D}_2$ cancel. The rest of the soft gluons only couple to $\hat{D}_1$, as in figure~\ref{fig:p-pi-ward-soft}, and can be grouped into $\hat{D}_1$. We can then use eqs.~\eqref{eq:k1H} and \eqref{eq:HC1}, and the Ward identity to factorize all longitudinally polarized collinear gluons of $\hat{D}_1$ out of the hard part $\hat{H}$. This step is similar to that of the $\pi^+\pi^-$ case, since the soft gluon connection to $\hat{D}_2$ has been canceled, which would have pinched the minus components of soft gluon momenta into the Glauber region. After factorizing the longitudinally polarized collinear gluons from the $\hat{H}$ into Wilson line, we get a color singlet $\hat{D}_1$. Therefore, we complete the factorization arguments and have a factorized result, as shown in figure~\ref{fig:p-pi factorize}. The color structure of the hard part takes the same form as in eq.~\eqref{eq:color convo3}. But, the spinor indices are still convoluted between $\hat{D}_1$ and $\hat{H}$, as well as between $\hat{D}_2$ and $\hat{H}$, and will be dealt with in next subsection. \subsubsection{Factorization formula} Similar to eq.~\eqref{eq:color convo3}, we derived the factorized formalism for the scattering amplitude of the exclusive process in \eqref{eq:p pi process}, corresponding to the factorized diagram in figure~\ref{fig:p-pi factorize}, \begin{align} \mathcal{M}^{\mu\nu}_{N\pi\to N'\gamma\gamma} =& \int \dd z_1 \dd z_2 \,{\rm Tr}\Big\{ [\mathcal{P}_A\, \hat{D}_1(z_1,p,p')\, \mathcal{P}_B] [\mathcal{P}_B\, \hat{D}_2(z_2,p_2)\, \mathcal{P}_A] \nonumber\\ &\hspace{0.7in}\times \Big[ \frac{1}{N_c^2} \hat{H}^{\mu\nu}_{ii;mm}(k_1^+=z_1\, \Delta^+;k_2^-=z_2\, p_2^-;q_1,q_2;\mu) \Big] \Big\} , \label{eq:M p pi} \end{align} where the repeated color indices, $i$ and $m$ are summed, and averaged with the factor $1/N_c^2$, and the ``${\rm Tr}$'' indicates the trace over all spinor indices between $\hat{D}_1$, $\hat{D}_2$, and $\hat{H}$. In eq.~\eqref{eq:M p pi}, $\mathcal{P}_A$, $\mathcal{P}_B$, and $\hat{D}_2(z_2,p_2)$ are the same as those in eq.~\eqref{eq:color convo3}, but $\hat{D}_1(z_1,p,p')$ is different, which now represents the transition GPD of the nucleon $N$, \begin{align} &\hat{D}_{1}(z_1,p,p')_{\alpha\beta} = \int\frac{\dd (\Delta^+y^-)}{2\pi} e^{iz_1\Delta^+ y^-} \langle N'(p') | \bar{d}_{\beta}(0) \Phi(0,y^-;w_2)\, u_{\alpha}(y^-) | N(p) \rangle \\ &\quad = \int\frac{\dd (\Delta^+y^-)}{2\pi} e^{i(2z_1-1)\xi P^+ y^-} \langle N'(p') | \bar{d}_{\beta} \left(-\frac{y^-}{2}\right) \Phi\left(-\frac{y^-}{2},\frac{y^-}{2};w_2\right)\, u_{\alpha}\left(\frac{y^-}{2}\right) | N(p) \rangle \, , \nonumber \end{align} where $\alpha,\beta$ are spinor indices, $w_2$ is as in eq.~\eqref{eq:aux vec}, color indices have been implicitly summed, and in the second line, we shifted the position of the operator to be consistent with the convention in~\cite{Diehl:2003ny}. Now $\mathcal{P}_A$ and $\mathcal{P}_B$ sandwiching $\hat{D}_1$ picks out only the term proportional $\gamma^-$, $\gamma^-\gamma_5$ or $\gamma^-\gamma_5\gamma_i$. Because of helicity conservation, the transversity GPD associated with $\gamma^-\gamma_5\gamma_i$ does not contribute at leading power. Effectively, we have \begin{align} &\left[\mathcal{P}_A \hat{D}_1(z_1,p, p') \mathcal{P}_B\right]_{\alpha\beta} \nonumber \\ & {\hskip 0.2in} = \frac{1}{2\Delta^+}{\rm Tr}\left[ \gamma^+ \hat{D}_1 \right] \left[\frac{1}{2}(\Delta^+\gamma^-) \right]_{\alpha\beta} + \frac{1}{2\Delta^+}{\rm Tr}\left[ \gamma^+ \gamma_5 \hat{D}_1 \right] \left[\frac{1}{2}\gamma_5(\Delta^+\gamma^-) \right]_{\alpha\beta} \nonumber \\ & {\hskip 0.2in} \equiv {\cal F}^{ud}_{NN'}(z_1, \xi, t)\left[ \frac{1}{2}(\Delta^+\gamma^-) \right]_{\alpha\beta} + \widetilde{\cal F}^{ud}_{NN'}(z_1, \xi, t) \left[\frac{1}{2}\gamma_5(\Delta^+\gamma^-) \right]_{\alpha\beta} \, , \label{eq:PA C1 PB} \end{align} where ${\cal F}^{ud}_{NN'}(z_1, \xi, t)$ and $\widetilde{\cal F}^{ud}_{NN'}(z_1, \xi, t)$ are GPDs with different chirality characterizing the amplitude for the transition of hadron $N$ to $N'$, \begin{subequations} \label{eq:GPD def} \begin{align} &{\cal F}^{ud}_{NN'}(z_1, \xi, t) = \int\frac{\dd y^-}{4\pi} e^{iz_1\Delta^+ y^-} \langle N'(p') | \bar{d}(0) \gamma^+ \Phi(0, y^-;w_2)\, u(y^-) | N(p) \rangle \\ &\hspace{2em} = \int\frac{\dd y^-}{4\pi} e^{i(2z_1-1)\xi P^+ y^-} \langle N'(p') | \bar{d}\left(-\frac{y^-}{2}\right) \gamma^+ \Phi \left(-\frac{y^-}{2},\frac{y^-}{2};w_2\right)\, u\left(\frac{y^-}{2}\right) | N(p) \rangle \nonumber \\ &\hspace{2em}= F^{ud}_{NN'}(x=(2z_1-1)\xi, \xi, t)\, , \label{eq:gpd_z2x}\\ &\widetilde{\cal F}^{ud}_{NN'}(z_1, \xi, t) = \int\frac{\dd y^-}{4\pi} e^{iz_1\Delta^+ y^-} \langle N'(p') | \bar{d}(0) \gamma^+\gamma_5 \Phi(0,y^-;w_2)\, u(y^-) | N(p) \rangle \\ &\hspace{2em} = \int\frac{\dd y^-}{4\pi} e^{i(2z_1-1)\xi P^+ y^-} \langle N'(p') | \bar{d}\left(-\frac{y^-}{2}\right) \gamma^+\gamma_5 \Phi\left(-\frac{y^-}{2},\frac{y^-}{2};w_2\right)\, u\left(\frac{y^-}{2}\right) | N(p) \rangle \nonumber \\ &\hspace{2em} = \widetilde{F}^{ud}_{NN'}(x=(2z_1-1)\xi, \xi, t)\, , \label{eq:gpd_z2xa} \end{align} \end{subequations} where $F^{ud}_{NN'}(x, \xi, t)$ and $\widetilde{F}^{ud}_{NN'}(x, \xi, t)$ are the GPDs defined with the convention in Ref.~\cite{Diehl:2003ny}. Note that we are using an unusual variable $z_1$ to label the momentum fraction of an active parton ($u$ quark here), as indicated in figure~\ref{fig:p-pi factorize}, in order to have a direct analogy to the $\pi^+\pi^-$ process that we studied in the last section. As clearly indicated in eqs.~\eqref{eq:gpd_z2x} and \eqref{eq:gpd_z2xa}, the momentum fraction $z_1$ is closely related to the common variables of GPDs, such as $x$ and $\xi$, \begin{equation} z_1 = \frac{x+\xi}{2\xi}. \label{eq:z_1} \end{equation} Consequently, the range of $z_1$ is different from $[0,1]$ for the nucleon side, as opposed to $z_2$ for the $\pi$, and is given by \begin{equation} z_m \equiv \frac{-1+\xi}{2\xi} \leq z_1 \leq \frac{1+\xi}{2\xi} \equiv z_M. \label{eq:z1limits} \end{equation} The choice of $z_1$ parameter highlights the so-called ERBL region, which lies between $-\xi < x < \xi$, and is now given by $0<z_1<1$. In this region, a pair of quark and antiquark with positive momentum fractions enters the hard scattering. On the other hand, one of the DGLAP regions $\xi < x < 1$ with a quark scattering configuration corresponds to $1<z_1<(1+\xi)/2\xi$, while the other DGLAP region $-1 < x < -\xi$ with an antiquark scattering configuration becomes $-(1-\xi)/2\xi < z_1 < 0$. Inserting eqs.~\eqref{eq:PA C1 PB} and \eqref{eq:PB D2 PA} into eq.~\eqref{eq:M p pi} we obtain the factorized scattering amplitude for the elastic process in eq.~\eqref{eq:p pi process} \begin{align} \mathcal{M}^{\mu\nu} =& \int_{z_m}^{ z_M} \dd z_1 \int_0^1 \dd z_2 \, \Big[ \widetilde{\cal F}^{ud}_{NN'}(z_1,\xi,t) D_{\pi^-}(z_2) C^{\mu\nu}(z_1,z_2) \nonumber\\ & {\hskip 1.1in} + {\cal F}^{ud}_{NN'}(z_1,\xi,t) D_{\pi^-}(z_2) \widetilde{C}^{\mu\nu}(z_1,z_2) \Big] \, , \label{eq:factorization M p pi} \end{align} where $C^{\mu\nu}$ is the same as that in eq.~\eqref{eq:hard C} with $p_1^+$ replaced by $\Delta^+$, which has $\gamma_5$ attached on both proton and pion sides so is chiral even, while $\widetilde{C}^{\mu\nu}$ is given by \begin{equation} \widetilde{C}^{\mu\nu}(z_1,z_2) \equiv {\rm Tr}\left[ \frac{\Delta^+\gamma^-}{2} H^{\mu\nu}(\hat{k}_1,\hat{k}_2;q_1,q_2;\mu) \frac{\gamma_5(p_2^-\gamma^+)}{2} \right] \, , \label{eq:hard C odd} \end{equation} which only has one $\gamma_5$ on the pion side and is referred as chiral odd. The correction to the factorized scattering amplitude in eq.~\eqref{eq:factorization M p pi} is suppressed by an inverse power of the high transverse momentum of observed photon $q_T$ in $S_\gamma$. The hard coefficients $C^{\mu\nu}$ and $\widetilde{C}^{\mu\nu}$, and the factorized formalism in eq.~\eqref{eq:factorization M p pi} are manifestly invariant under a boost along $\hat{z}$. Since the transformation from $S_{\rm lab}$ to $S_{\gamma}$ is only by a boost along $\hat{z}$, up to a boost and rotation characterized by $\Delta_T$, which is neglected at leading power, the factorization formula \eqref{eq:factorization M p pi} takes the same form in the $S_{\gamma}$ frame, and the hard coefficients $C^{\mu\nu}$ and $\widetilde{C}^{\mu\nu}$ can be calculated in $S_{\gamma}$, in the same way as for $\pi^+\pi^-$ case. If $N={\rm proton}$ and $N'={\rm neutron}$, these transition GPDs can be related to the nucleon GPDs by isospin symmetry~\cite{Mankiewicz:1997aa} \begin{align} {\cal F}^{ud}_{pn}(z_1, \xi, t) &= {\cal F}^u_{p}(z_1, \xi, t) - {\cal F}^u_{n}(z_1, \xi, t), \nonumber\\ \widetilde{{\cal F}}^{ud}_{pn}(z_1, \xi, t) &= \widetilde{{\cal F}}^u_{p}(z_1, \xi, t) - \widetilde{{\cal F}}^{u}_{n}(z_1, \xi, t). \label{eq:isospin Fud} \end{align} \subsection{The leading-order hard coefficients} \label{sec:C C-odd} The leading-order diagrams are the same as those in figure~\ref{fig:hard1} and \ref{fig:hard2}, except that now we have two sets of hard coefficients, obtained with different spinor projectors on the nucleon side. The calculation of the chiral-even coefficients is the same as $\pi^+\pi^-$ case, and the results are reorganized in a compact form in the Appendix with $z_1$ taking the value within $[z_m, z_M]$. From the parity constraint \eqref{eq:parity}, the chiral-odd coefficient $\widetilde{C}^{\mu\nu}$ can be expanded into the P-odd gauge invariant tensor structures in eq.~\eqref{eq:P-odd tensors}, with $p_1$ replaced by $\Delta$. Similarly to eq.~\eqref{eq:gauge-inv expansion}, we have \begin{align} \widetilde{C}^{\mu\nu} = -\frac{e^2g^2}{2\,\hat{s}^{2}}\frac{C_F}{N_c}\bigg( & \widetilde{C}_{1} \, \widetilde{\Delta}^{\mu} \varepsilon_{\perp}^{\nu\rho} q_{T\rho} + \widetilde{C}_{2} \, \widetilde{p}_{2}^{\mu} \varepsilon_{\perp}^{\nu\rho} q_{T\rho} + \widetilde{C}_{3} \, \bar{\Delta}^{\nu} \varepsilon_{\perp}^{\mu\rho} q_{T\rho} + \widetilde{C}_{4} \, \bar{p}_{2}^{\nu} \varepsilon_{\perp}^{\mu\rho} q_{T\rho} \bigg) \, , \label{eq:gauge-inv expansion odd} \end{align} where $\widetilde{\Delta}^{\mu}$ and $\bar{\Delta}^{\nu}$ are defined in the same way as $\widetilde{p}_1^{\mu}$ and $\bar{p}_1^{\nu}$ in eq.~\eqref{eq:projected p1 p2}, respectively. The dimensionless scalar coefficients $\widetilde{C}_1$ to $\widetilde{C}_4$ can be extracted from the calculated result of each diagram by using eq.~\eqref{eq:gauge-inv expansion odd}, and isolating the coefficient of the term proportional to $\Delta^{\mu}$, $p_2^{\mu}$, $\Delta^{\nu}$ and $p_2^{\nu}$ sequentially. The results are collected in the Appendix. Following the discussion above eqs.~\eqref{eq:C conjugation A} and \eqref{eq:C conjugation B}, charge conjugation implies similar relations for the chiral-odd coefficients, but with a minus sign, i.e., \begin{align} &\{ \widetilde{C}_{A1}, \, \widetilde{C}_{A1'}, \, \widetilde{C}_{A3}, \, \widetilde{C}_{A4} \}^{\mu\nu} (z_1,z_2) = -\{ \widetilde{C}_{A2'}, \, \widetilde{C}_{A2}, \, \widetilde{C}_{A3'}, \, \widetilde{C}_{A4'}\}^{\mu\nu}(1-z_1,1-z_2) \label{eq:C conjugation A tilde} \end{align} for Type-$A$ diagrams, and \begin{align} &\{ \widetilde{C}_{B1}, \, \widetilde{C}_{B1'}, \, \widetilde{C}_{B2}, \, \widetilde{C}_{B2'}, \, \widetilde{C}_{B3}, \, \widetilde{C}_{B3'} \}^{\mu\nu}(z_1,z_2)\bigg|_{e_u\leftrightarrow e_d} \nonumber\\ &\hspace{2em} = -\{ \widetilde{C}_{B4}, \, \widetilde{C}_{B4'}, \, \widetilde{C}_{B5}, \, \widetilde{C}_{B5'}, \, \widetilde{C}_{B6}, \, \widetilde{C}_{B6'} \}^{\mu\nu}(1-z_1,1-z_2) \label{eq:C conjugation B tilde} \end{align} for Type-$B$ diagrams. These relations carry through to each scalar coefficient $\widetilde{C}_1,\cdots, \widetilde{C}_4$, which has been checked in the calculations. Similar to the symmetric relation in eq.~\eqref{eq:CA symmetry}, we obtain an antisymmetric relation for $\widetilde{C}^{\mu\nu}$, \begin{equation} \widetilde{C}^{\mu\nu}_A(z_1,z_2)=-\widetilde{C}^{\mu\nu}_A(1-z_1, 1-z_2) , \label{eq:CA O symmetry} \end{equation} for Type-$A$ diagrams, while for $\widetilde{C}_B$ this antisymmetry is broken by the difference of $e_u^2$ and $e_d^2$. \subsection{Cross section} Using eqs.~\eqref{eq:gauge-inv expansion}, \eqref{eq:gauge-inv expansion odd} and \eqref{eq:factorization M p pi}, we obtain the factorized scattering amplitude $\mathcal{M}^{\mu\nu}$ as \begin{align} \mathcal{M}^{\mu\nu}_{N\pi\to N'\gamma\gamma} &= \frac{i e^2 g^2f_{\pi}}{4\hat{s}^2} \frac{C_F}{N_c} \nonumber\\ & \times \bigg[ i \left( \mathcal{M}_{0} \, \widetilde{g}_{\perp}^{\mu\nu}\, \hat{s} + \mathcal{M}_{1} \, \widetilde{\Delta}^{\mu}\bar{\Delta}^{\nu} + \mathcal{M}_{2} \, \widetilde{p}_{2}^{\mu}\bar{p}_{2}^{\nu} + \mathcal{M}_{3} \, \widetilde{\Delta}^{\mu}\bar{p}_{2}^{\nu} + \mathcal{M}_{4} \, \widetilde{p}_{2}^{\mu}\bar{\Delta}^{\nu} \right) \nonumber\\ & \quad + \left( \widetilde{\mathcal{M}}_{1} \, \widetilde{\Delta}^{\mu} \varepsilon_{\perp}^{\nu\rho} q_{T\rho} + \widetilde{\mathcal{M}}_{2} \, \widetilde{p}_{2}^{\mu} \varepsilon_{\perp}^{\nu\rho} q_{T\rho} + \widetilde{\mathcal{M}}_{3} \, \bar{\Delta}^{\nu} \varepsilon_{\perp}^{\mu\rho} q_{T\rho} + \widetilde{\mathcal{M}}_{4} \, \bar{p}_{2}^{\nu} \varepsilon_{\perp}^{\mu\rho} q_{T\rho} \right) \bigg] \, , \end{align} where \begin{align} \mathcal{M}_i &= \int_{z_m}^{z_M} \dd z_1 \int_0^1 \dd z_2 \, \widetilde{\cal F}^{ud}_{NN'}(z_1,\xi,t) \, \phi(z_2) \, C_i(z_1,z_2) \nonumber\\ & {\hskip 0.2in} = \mathfrak{M}[C_i; \widetilde{\cal F}^{ud}_{NN'}, (z_m,z_M); \phi, (0,1)] , \nonumber\\ \widetilde{\mathcal{M}}_i & = \int_{ z_m}^{ z_M } \dd z_1 \int_0^1 \dd z_2 \, {\cal F}^{ud}_{NN'}(z_1,\xi,t) \, \phi(z_2) \, \widetilde{C}_i(z_1,z_2) \nonumber\\ & {\hskip 0.2in} = \mathfrak{M}[\widetilde{C}_i; {\cal F}^{ud}_{NN'}, (z_m,z_M); \phi, (0,1)] \, , \label{eq:Mi F Ft} \end{align} with $i = 0, \cdots, 4$ for $\mathcal{M}_i$ or $1, \cdots, 4$ for $\widetilde{\mathcal{M}}_i$. Like eq.~\eqref{eq:M2}, we have the full scattering amplitude squared, summing over the photon polarizations, \begin{align} \left|\overline{\mathcal{M}}\right|^2 &= \left( \frac{e^2 g^2 f_{\pi}}{4\hat{s}} \frac{C_F}{N_c} \right)^2 \Bigg[ \bigg( |\mathcal{M}_0|^2 +\bigg|\frac{\mathcal{M}_1 + \mathcal{M}_2}{4} - \frac{(\Delta\cdot q_1)^2 \mathcal{M}_3 + (\Delta\cdot q_2)^2 \mathcal{M}_4}{ \hat{s} \, q_T^2} \bigg|^2 \bigg) \nonumber\\ & \hspace{0.8in}+ \bigg| \frac{(\Delta\cdot q_1) \widetilde{\mathcal{M}}_1 - (\Delta\cdot q_2) \widetilde{\mathcal{M}}_2}{\hat{s}} \bigg|^2 + \bigg| \frac{(\Delta\cdot q_2) \widetilde{\mathcal{M}}_3 - (\Delta\cdot q_1) \widetilde{\mathcal{M}}_4}{\hat{s}} \bigg|^2 \Bigg] \, , \label{eq:T p pi} \end{align} where the average (sum) over the spins of initial-state nucleon $N$ (final-state $N'$) is included in $|\mathcal{M}_i|^2$ and $|\widetilde{\mathcal{M}}_i|^2$. Instead of summing (or averaging) over all nucleon spins, we can introduce GPDs sensitive to the hadron spin by expressing the matrix elements of nucleon states in eq.~\eqref{eq:GPD def} in terms of independent combinations of nucleon spinors and corresponding ``form factors'' or spin dependent GPDs, \begin{align} {\cal F}^{ud}_{NN'}(z_1,\xi,t)=&\frac{1}{2P^+} \bigg[\, {\cal H}^{ud}_{NN'}(z_1,\xi,t) \,\bar{u}(p')\gamma^+ u(p) \nonumber \\ & {\hskip 0.4in} - {\cal E}^{ud}_{NN'}(z_1,\xi,t) \,\bar{u}(p')\frac{i\sigma^{+\alpha} \Delta_{\alpha}}{2m_p} u(p) \bigg], \\ \widetilde{\cal F}^{ud}_{NN'}(z_1,\xi,t)=&\frac{1}{2P^+} \bigg[\, \widetilde{\cal H}^{ud}_{NN'}(z_1,\xi,t) \,\bar{u}(p')\gamma^+\gamma_5 u(p) \nonumber \\ & {\hskip 0.4in} - \widetilde{\cal E}^{ud}_{NN'}(z_1,\xi,t) \, \bar{u}(p')\frac{i\gamma_5\sigma^{+\alpha}\Delta_\alpha}{2m_p} u(p) \bigg] . \end{align} Consequently, all scattering amplitudes corresponding to independent tensor structures, $\mathcal{M}_i$ and $\widetilde{\mathcal{M}}_i$ in eq.~\eqref{eq:T p pi} can be expressed in terms of the spin dependent GPDs, \begin{align} \mathcal{M}_i = & \frac{1}{2P^+} \left[\, \mathcal{M}_i^{[\widetilde{\cal H}]}\, \bar{u}(p')\gamma^+\gamma_5 u(p) - \mathcal{M}_i^{[\widetilde{\cal E}]} \, \bar{u}(p')\frac{i\gamma_5\sigma^{+\alpha}\Delta_\alpha}{2m_p} u(p) \right] \, ,\nonumber\\ \widetilde{\mathcal{M}}_i = & \frac{1}{2P^+} \left[\, \widetilde{\mathcal{M}}_i^{[{\cal H}]}\, \bar{u}(p')\gamma^+ u(p) - \widetilde{\mathcal{M}}_i^{[{\cal E}]} \, \bar{u}(p')\frac{i\sigma^{+\alpha} \Delta_{\alpha}}{2m_p} u(p) \right] \, , \end{align} where the superscript ``$[{\cal H}]$'' means to replace the corresponding ${\cal F}^{ud}_{NN'}$ in eq.~\eqref{eq:Mi F Ft} by ${\cal H}^{ud}_{NN'}$, etc. Multiplied by their complex conjugate with the spin of $N$ ($N'$) averaged (summed), we have \begin{subequations}\label{eq:M2 spin sum} \begin{align} \left| \mathcal{M}_i \right|^2 = & (1-\xi^2)\, \left|\mathcal{M}_i^{[\widetilde{\cal H}]}\right|^2 - 2\xi^2\, {\rm Re} \left( \mathcal{M}_i^{[\widetilde{\cal H}]}{}^* \mathcal{M}_i^{[\widetilde{\cal E}]} \right) - \frac{\xi^2 t}{4m^2_p} \left|\mathcal{M}_i^{[\widetilde{\cal E}]} \right|^2 \, , \\ \left|\widetilde{\mathcal{M}}_i \right|^2 = & (1-\xi^2)\, \left|\widetilde{\mathcal{M}}_i^{[{\cal H}]} \right|^2 - 2\xi^2\, {\rm Re} \left( \widetilde{\mathcal{M}}_i^{[{\cal H}]}{}^* \widetilde{\mathcal{M}}_i^{[{\cal E}]} \right) - \left( \frac{t}{4m^2_p} + \xi^2 \right) \left| \widetilde{\mathcal{M}}_i^{[{\cal E}]} \right|^2 \, , \end{align}\end{subequations} where the factor $1/2$ for the spin average has been included. In our numerical analysis in the next section, we take $|t| \leq 0.2~{\rm GeV}^2$, which constrains $\xi$ to be $\xi \leq 0.23 $ by eq.~\eqref{eq:xi range t}. Then the terms containing $\mathcal{M}_i^{[\widetilde{\cal E}]}$ or $\widetilde{\mathcal{M}}_i^{[{\cal E}]}$ are suppressed by a factor of about $0.1$ or smaller, compared to the terms containing $|\mathcal{M}_i^{[\widetilde{\cal H}]} |^2$ or $|\widetilde{\mathcal{M}}_i^{[{\cal H}]} |^2$ . We can thus neglect them for a rough estimate. Using eq.~\eqref{eq:M2 spin sum}, we can rewrite eq.~\eqref{eq:T p pi} as \begin{align} \left|\overline{\mathcal{M}}\right|^2 &\approx (1-\xi^2) \left( \frac{e^2 g^2 f_{\pi}}{4\hat{s}} \frac{C_F}{N_c} \right)^2 \nonumber\\ & \hspace{0.5em} \times \Bigg[ \bigg( |\mathcal{M}_0^{[\widetilde{\cal H}]}|^2 +\bigg|\frac{\mathcal{M}_1^{[\widetilde{\cal H}]} + \mathcal{M}_2^{[\widetilde{\cal H}]} }{4} - \frac{(\Delta\cdot q_1)^2 \mathcal{M}_3^{[\widetilde{\cal H}]} + (\Delta\cdot q_2)^2 \mathcal{M}_4^{[\widetilde{\cal H}]} }{ \hat{s} \, q_T^2} \bigg|^2 \bigg) \nonumber\\ & \hspace{1.5em} + \bigg| \frac{(\Delta\cdot q_1) \widetilde{\mathcal{M}}_1^{[{\cal H}]} - (\Delta\cdot q_2) \widetilde{\mathcal{M}}_2^{[{\cal H}]}}{\hat{s}} \bigg|^2 + \bigg| \frac{(\Delta\cdot q_2) \widetilde{\mathcal{M}}_3^{[{\cal H}]} - (\Delta\cdot q_1) \widetilde{\mathcal{M}}_4^{[{\cal H}]}}{\hat{s}} \bigg|^2 \Bigg] \, . \label{eq:T p pi 2} \end{align} As discussed in Sec.~\ref{sec:kin}, we can specify an event by $\bm{\Delta}_T, \xi$ and $\bm{q}_T$, with $\bm{q}_T$ being the transverse momentum of the photons in the photon frame $S_{\gamma}$. This gives \begin{align} \dd\sigma = \frac{1}{2s} \frac{\dd\xi \dd^2\bm{\Delta}_T}{(1-\xi^2) (2\pi)^3} \frac{\dd^2\bm{q}_T}{8\pi^2 \hat{s}} \frac{ \left|\overline{\mathcal{M}}\right|^2 }{ \sqrt{ 1-\hat{\kappa} } } \, , \label{eq:xsec formula0} \end{align} where $\left|\overline{\mathcal{M}}\right|^2$ is given in eq.~\eqref{eq:T p pi 2} and $\hat{\kappa} = 4q_T^2/\hat{s} \leq 1$ is the analog of $\kappa$ (defined below eq.~\eqref{eq:kin q12}) for the photon system in the $S_{\gamma}$ frame. The direction of $\bm{q}_T$ can be defined with respect to the $N-N'$ plane, or $\bm{p}$-$\bm{\Delta}_T$ plane. But since $\left|\overline{\mathcal{M}}\right|^2$ is for unpolarized scattering, it does not depend on the azimuthal angles of $\bm{q}_T$ and $\bm{\Delta}_T$, so we can integrate them out. That allows us to only use three scalars $\Delta_T$, $\xi$ and $q_T$ to describe the events, which by eq.~\eqref{eq:t-DeltaT} can be transformed to the three scalar variables $(t, \xi, q_T)$, and corresponding differential cross section, \begin{align} \frac{\dd\sigma}{\dd |t|\, \dd \xi\, \dd q_T^2} = \frac{\pi}{64} \left(\alpha_e \alpha_s \frac{f_{\pi}}{s^2} \frac{C_F}{N_c} \right)^2 \frac{(1-\xi^2)}{\xi^2} \frac{(1+\xi)}{\xi} \frac{\mathcal{B} }{\sqrt{1-\hat{\kappa}}} \, , \label{eq:xsec formula} \end{align} where $\mathcal{B}$ stands for the big square bracket in eq.~\eqref{eq:T p pi 2}, which is dimensionless and can be evaluated numerically once we know the pion DAs and nucleon's GPDs. In eq.~\eqref{eq:xsec formula}, we have separated the $\xi$ dependent factor into two parts, in which the second part, $(1+\xi)/\xi$, is canceled when we integrate over $q_T^2$ from $q_{T {\rm min}}^2$ to $\hat{s}/4 = \xi/(1+\xi) (s/2)$. \section{Numerical results} \label{s.numerical} In this section, we evaluate the cross sections for producing a pair of high transverse momentum photons in exclusive pion-pion and pion-nucleon scattering and test their sensitivity to the shape of DAs and GPDs in terms of active parton's momentum fraction. \subsection{End-point sensitivity and improvement from Sudakov suppression} \label{sec:Sudakov} Before we introduce our choices of DAs and GPDs to evaluate the factorized cross sections, we discuss the well-known ``end-point'' sensitivity associated with perturbative evaluation of factorized elastic scattering processes, and its impact on the new type of exclusive processes introduced in this paper. \begin{figure}[htbp] \centering \includegraphics[scale=0.6]{figures/pion-ff.pdf} {\hskip 0.15\textwidth} \includegraphics[scale=0.6]{figures/pionFF1.pdf}\quad \includegraphics[scale=0.6]{figures/pionFF2.pdf}\quad \\ (a) \hskip 0.5\textwidth (b) \caption{(a) Sketch for pion Form Factor; (b) Leading order Feynman diagrams for the partonic hard part of the factorized pion Form Factor.} \label{fig:pionFF} \end{figure} For the comparison, we consider the well-known perturbative calculation of pion Form Factor $F_{\pi}(Q^2)$, as sketched in figure~\ref{fig:pionFF}(a), which can be extracted from elastic electron-pion scattering: $e(\ell)+\pi(p_\pi) \to e(\ell')+\pi(p_{\pi}')$. When the momentum transfer $q = \ell-\ell'$ has a high virtuality, with $Q^2\equiv -q^2 \gg \Lambda_{\rm QCD}^2$, the pion Form Factor takes the factorized form as~\cite{Lepage:1979zb}, \begin{equation} F_\pi(Q^2) \approx \int_0^1 \dd z_1 \int_0^1 \dd z_2\, \phi(z_1) T_B(z_1,z_2,Q^2)\, \phi(z_2) \, , \label{eq:pionFF} \end{equation} where $\phi$ is pion DA, $T_B(z_1,z_2,Q^2)$ represents the hard scattering, and the factorization scale dependence is suppressed. With the leading order diagrams in figure~\ref{fig:pionFF}(b), the short-distance hard part is given by~\cite{Lepage:1979zb} \begin{equation} T_B(z_1,z_2,Q^2) \approx 16\pi C_F\, \frac{\alpha_s(Q^2)}{z_1 z_2 Q^2} \, , \label{eq:H4pionFF} \end{equation} with color factor $C_F=4/3$ for SU(3) color. By substituting this lowest order hard part in eq.~\eqref{eq:H4pionFF} into eq.~\eqref{eq:pionFF}, it is clear that the pion Form Factor measurement is only sensitive to the ``moment'' of pion DA, $\int_0^1 dz z^{-1} \phi(z)$, not the detailed shape of $\phi(z)$, even when the probing scale $Q^2$ varies. Although the ``moment'' $\int_0^1 dz z^{-1} \phi(z)$ is expected to be finite since $\phi(z)\to 0 $ as $z\to 0$, the short-distance hard part in eq.~\eqref{eq:H4pionFF} is actually singular as $z_1$ (and/or $z_2$) $\to 0$, corresponding to the situation when the virtuality of the exchanged gluon in figure~\ref{fig:pionFF} goes to zero and the ``hard'' scattering is actually not taking place at a ``short-distance''. The reliability of this perturbative fixed-order calculation near the ``end-point'' region when $z_1$ (and/or $z_2$) $\to 0$ could be improved by taking into account the ``Sudakov suppression'' from resumming high order Sudakov logarithmic contributions. For example, the leading order perturbatively calculated hard part in eq.~\eqref{eq:H4pionFF} could be improved as~\cite{Li:1992nu} \begin{equation} T_B(z_1,z_2,Q^2) \approx 16\pi C_F \int_0^{\infty} \dd b\, \alpha_s(t)\, b\, K_0(\sqrt{z_1z_2}Q\, b) \, e^{-{\cal S}(z_1,z_2,b,Q)} \, , \label{eq:ModifiedH} \end{equation} where the running coupling constant $\alpha_s$ is evaluated at $t={\rm max}(\sqrt{z_1 z_2}Q, 1/b)$, $K_0$ is the modified Bessel function of order zero and the Sudakov factor ${\cal S}(z_1,z_2,b,Q)$ is given in eq.~(14) of Ref.~\cite{Li:1992nu}. In keeping the same factorized form in eq.~\eqref{eq:pionFF} with the modified hard part in eq.~\eqref{eq:ModifiedH}, an evolution of pion $\phi(z)$'s factorization scale from $1/b$ to the hard scale $Q$ was neglected. With the Sudakov suppression, the perturbative hard part $T_B(z_1,z_2,Q^2)$ in eq.~\eqref{eq:ModifiedH} is no longer singular as $z_1$ (and/or $z_2$) goes to zero. Like the pion Form Factor, the perturbative hard part calculated from the Type-$B$ diagrams in figure~\ref{fig:hard2} is also singular in the ``end-point'' region when $z_1$ (and/or $z_2$) $\to 0$ or $1$, as clearly evident from the behavior of the three propagators in eq.~\eqref{eq:A k1k2q}. In addition, like the hard part of pion Form Factor in eq.~\eqref{eq:H4pionFF}, the dependence on active parton momentum fractions $z_1$ and $z_2$ in eq.~\eqref{eq:A k1k2q} is completely decoupled from the external kinematic variables, and consequently, the contribution from the Type-$B$ diagrams to the exclusive cross section is only sensitive to the ``moment'' of pion DA. On the other hand, the three propagators for the Type-$A$ diagrams in figure~\ref{fig:hard1}, as shown in eqs.~\eqref{eq:A k1k2} and \eqref{eq:A q}, have slightly different features. The contribution from the Type-$A$ diagrams is less singular in the ``end-point'' region when $z_1$ or $z_2$ goes to zero. The dependence on active parton momentum fractions $z_1$ and $z_2$ cannot be completely decoupled from the external kinematic variables. As shown in eq.~\eqref{eq:A q}, $z_1$ and $z_2$ are entangled with externally measured photon transverse momentum $q_T$. It is this entanglement that makes the $q_T$-distribution of this exclusive cross section to be sensitive to the shape of the $z$-dependence of pion DA, or GPDs in pion-baryon scattering. \subsection{Enhanced sensitivity to the shape of pion DAs} \label{sec:DA shape} To demonstrate that the differential cross section $\dd\sigma/\dd q_T^2$ for exclusive $\pi^+\pi^- \to \gamma\gamma$ process is sensitive to both the ``moment'' as well as the detailed shape of pion DA, we introduce a power-form parametrization for the normalized pion DA, \begin{equation} \phi_{\alpha}(z) = \frac{ z^{\alpha}(1-z)^{\alpha} }{ {\rm B}(1+\alpha, 1+\alpha) }\, , \label{eq:DA power} \end{equation} with $\alpha > 0$ so that the ``moment'' $\int_0^1 \dd z z^{-1} \phi_{\alpha}(z)$ is finite. When $\alpha=1$, this normalized pion DA is effectively the same as the so-called asymptotic form of pion DA when factorization scale $\mu\to\infty$~\cite{Lepage:1980fj}. In this subsection, we vary the power $\alpha$ to show how $\dd\sigma/\dd q_T^2$ changes. In the following numerical calculation, we use fixed electromagnetic coupling $\alpha_e = 1/137$ and the one-loop running strong coupling constant $\alpha_s(\mu)$ evaluated at the scale $\mu = q_T$. For exclusive $\pi^+\pi^- \to \gamma\gamma$, which could be a Sullivan-type process as a part of the $p\pi^-\to n \gamma\gamma$ diffractive scattering when the $|t|$ is small, we choose the collision energy $\sqrt{s} = 3-6$~GeV, and require $q_T$ to be greater than $1~{\rm GeV}$. \begin{figure}[htbp] \centering \includegraphics[scale=0.55]{figures/total-xsec.pdf}\quad \includegraphics[scale=0.55]{figures/DA_plot.pdf}\quad \caption{The total cross section (in (a)) for different DAs (shown in (b)) and different CM energies, where a scaling factor $s^2$ has been multiplied. The total cross section is obtained by integrating over $q_T$ from $1~{\rm GeV}$ to $\sqrt{s}/2$. The dots on the curves are the points that were explicitly calculated.} \label{fig:xsec pi pi plot} \end{figure} In figure~\ref{fig:xsec pi pi plot}(a), we plot the ``total'' cross section defined in eq.~\eqref{eq:xsec} with $q_{T{\rm min}}=1$~GeV as a function of the power $\alpha$ of the normalized pion DA for various collision energies. Corresponding shapes of the normalized pion DAs are shown in figure~\ref{fig:xsec pi pi plot}(b). To minimize its dependence on the collision energy, we multiplied a scaling factor $s^2$ to the cross section, which effectively puts all the curves with four different collision energies on top of each other. However, as shown in figure~\ref{fig:xsec pi pi plot}(a), the scaled cross section shows a very strong dependence on the value of $\alpha$, which is not because the partonic hard part is a good probe of the shape of DAs. Instead, such a strong dependence on $\alpha$ is caused by the ``end-point'' sensitivity of the perturbatively calculated partonic hard part as discussed in the last subsection, and the fact, as shown in figure~\ref{fig:xsec pi pi plot}(b), that the value of pion DAs at different $\alpha$ have very different values near the ``end-point''. Like the ``Sudakov'' suppression treatment for the ``end-point'' region of the pion Form Factor, an improvement of the ``end-point'' sensitivity is also needed to improve the reliability of perturbative calculation of the factorized hard parts for this new type of exclusive processes, which is beyond the scope of the current paper. As pointed out in Sec.~\ref{sec:Sudakov}, the propagator of the gluon has a very different momentum structure for Type-$A$ diagrams from those of the Type-$B$ diagrams. The entanglement of momentum fraction $z_1$, $z_2$ and the observed $q_T$ in the Type-$A$ diagrams makes the $q_T$ distribution sensitive to the $z$-dependence of the pion DAs. \begin{figure}[htbp] \centering \includegraphics[scale=0.5]{figures/relative_total.pdf} \quad \includegraphics[scale=0.5]{figures/relative_tot_qT_4.pdf}\quad \caption{(a) The relative $q_T$ shape for a few choices of power-form DAs with different values of $\alpha$. The relative $q_T$ shape is obtained by dividing the normalized $q_T$ distribution by the one with the asymptotic DA form. (b) The same normalized $q_T$ distribution as a function of $\alpha$ of the power-form DAs.} \label{fig:relative qT} \end{figure} In figure~\ref{fig:relative qT}(a), we plot the normalized $q_T$ distribution, defined as $\dd \sigma/\dd q_T$ divided by the total cross section $\sigma_{\rm tot}\equiv \sigma(q_{T{\rm min}}=1~{\rm GeV})$ as defined in eq.~\eqref{eq:xsec}, with respect to the same normalized $q_T$ distribution evaluated with asymptotic pion DA ($\alpha=1$). Corresponding normalized pion DAs are plotted in figure~\ref{fig:xsec pi pi plot}(b). In figure~\ref{fig:relative qT}(b), we plot the same normalized $q_T$ distribution as a function of the power $\alpha$ at different values of $q_T$. The normalized $q_T$ distribution at different $q_T$ values have very different dependence on the $\alpha$. Naively, from figure~\ref{fig:relative qT}, it seems that the $q_T$-dependence provides additional 10\% sensitivity on the shape of the pion DA. Actually, the $q_T$-dependence should have provided a much stronger sensitivity to the shape of pion DAs, if the ``end-point'' sensitivity of the perturbatively calculated partonic hard parts are better controlled. As pointed out in Sec.~\ref{sec:Sudakov}, the Type-$B$ diagrams have a much stronger singular behavior at the ``end-point'' than that of Type-$A$ diagrams. Consequently, the Type-$B$ diagrams give a much bigger fraction of $\dd\sigma/\dd q_T$ from the ``end-point'' region of the pion DAs than what the Type-$A$ diagrams can give, while the Type-$A$ diagrams are more sensitive to the shape of pion DAs. If we can improve the reliability of perturbatively calculated partonic hard cross section near the ``end-point'' for both Type-$A$ and Type-$B$ diagrams, the Type-$A$ diagrams would contribute a much bigger fraction to the differential cross section $\dd\sigma/\dd q_T$, making the measurement of $\dd\sigma/\dd q_T$ more sensitive to the shape of the $z$-dependence of the pion DAs. \subsection{Enhanced sensitivity to the shape of GPDs} \label{sec:GPD shape} In this subsection, we try to demonstrate that the photon $q_T$ distribution of exclusive meson-baryon scattering process is sensitive to the functional shapes of nucleon GPD and pion DA. The dependence on pion DA was discussed in Sec.~\ref{sec:DA shape} along with the exclusive $\pi\pi$ annihilation process. We now focus on the sensitivity to the shape of nucleon GPD, and fix pion DA to the power-form in eq.~\eqref{eq:DA power} with $\alpha = 0.63$, which is the value compatible with the Lattice QCD calculation of the second moment of DA~\cite{Bali:2019dqc}. As discussed in Sec.~\ref{s.pih2gg}, the integration range of active momentum fraction $z_1$ of GPDs is extended from $(0, 1)$ to $((\xi-1)/2\xi, (\xi+1)/2\xi)$, as shown in eq.~\eqref{eq:z1limits}, and consequently, the propagators in partonic diagrams could be on-shell leading to poles along the integration contour of $z_1$. As discussed in Sec.~\ref{sec:factorization1}, the reduced diagram analysis ensures that the only perturbative pinch singularity at leading power is on the lines collinear to the external hadrons, which are systematically removed from the hard part of partonic scattering and absorbed into universal long-distance DAs or GPDs. The only possible singularities of the perturbatively calculated partonic hard part could appear at the ``end-point" of the integration, and need to be suppressed by the behavior of non-perturbative DAs and/or GPDs, or by improving high order perturbative calculations as discussed in Sec.~\ref{sec:Sudakov}. When the non-pinched pole of $z_1$ locates along the contour, we use the distribution identity \begin{equation} \frac{1}{z_1 - a \pm i\varepsilon} = P\frac{1}{z_1 - a} \mp i\pi \delta(z_1 - a) \label{eq:pole avoid} \end{equation} as a practical method to deform the contour~\cite{Qiu:1991wg}, where $P$ means the principal-value integration. Our numerical integration strategy is to individually separate each pole and use Eq.~\eqref{eq:pole avoid} to deal with the poles on the integration contour of $z_1$. In this approach, the non-pinched poles lead to imaginary parts to the scalar coefficients $\mathcal{M}_i$ and $\widetilde{\mathcal{M}}_i$ of the factorized scattering amplitude, and both their real and imaginary parts contribute to the exclusive cross section through the absolute values in eq.~\eqref{eq:T p pi 2}. For our numerical analysis below, we use the kinematics of J-PARC~\cite{Aoki:2021cqa} with a charged pion beam of energy around $20$~GeV, as well as that of AMBER~\cite{Adams:2018pwt} with a pion beam of energy $150~{\rm GeV}$ hitting on fixed targets. For nucleon GPD, we choose the GK parametrization~\cite{Goloskokov:2005sd,Goloskokov:2007nt,Goloskokov:2009ia,Kroll:2012sm}, which models the GPD using double distribution, \begin{align} H_i(x, \xi, t) = \int_{-1}^1 \dd\beta \int_{-1+|\beta|}^{1-|\beta|}\dd\alpha \, \delta(x-\beta-\xi \alpha) \, f_i(\beta, \alpha, t) \, , \label{eq:DD int} \end{align} where the subscript $i$ refers to the choice of parton flavor and nucleon GPDs $H_i(x,\xi,t)$ are defined with the convention in Ref.~\cite{Diehl:2003ny}, as specified in eq.~\eqref{eq:GPD def}. The double distribution $ f_i(\beta, \alpha, t)$ is parametrized as \begin{align} f_i(\beta, \alpha, t) = e^{\left( b_i + \alpha_i' \ln|\beta|^{-1} \right) t } \cdot h_i(\beta)\cdot w_i(\beta, \alpha) \, , \label{eq:DD ansatz} \end{align} where $h_i(\beta)$ is the forward PDF of flavor $i$, and $w_i$ is a weight function \begin{align} w_i(\beta, \alpha) = \frac{\Gamma(2n_i+2)}{2^{2n_i+1} \Gamma^2(n_i+1)} \frac{\left[(1-|\beta|)^2 - \alpha^2 \right]^{n_i} }{(1-|\beta|)^{2n_i+1}} \, , \label{eq:weight} \end{align} which characterizes the $\xi$ dependence of GPD $H_i(x, \xi, t)$ and is normalized as \begin{align} \int_{-1+|\beta|}^{1-|\beta|}\dd\alpha \, w_i(\beta, \alpha) = 1 \, . \end{align} The larger the power $n_i$ is, the less dependent $H_i(x, \xi, t)$ is on $\xi$. In the limit that $n_i \to \infty$, $w_i \to \delta(\alpha)$, and we have \begin{align} H_i(x, \xi, t) = e^{\left( b_i + \alpha_i' \ln|x|^{-1} \right) t } h_i(x) \, , \end{align} which has no dependence on $\xi$ at all. \begin{figure}[h!] \centering \includegraphics[scale=0.65]{figures/gpd_even.pdf} \includegraphics[scale=0.65]{figures/gpd_odd.pdf} \caption{Chiral-even GPD $H(x,\xi,t)$ (a) and chiral-odd GPD $\widetilde{H}(x,\xi,t)$ (b) for $t= -0.1~{\rm GeV}^2$ and different power parameters $(\rho, \tau)$.} \label{fig:gpd_model} \end{figure} The quark double distribution is decomposed into valence and sea components, and sea quark components are taken to be the same for $u_{\rm sea}$ and $d_{\rm sea}$. Since our process is only sensitive to $H_u - H_d$ (or $\widetilde{H}_u - \widetilde{H}_d$) (see eq.~\eqref{eq:isospin Fud}), the sea components cancel, and only valence components contribute,\footnote{This is also the reason that we neglected the so-called $D$-term in eq.~\eqref{eq:DD ansatz} since it only appears for gluon and sea quarks.} for which we have \begin{align} f^q_{\rm val}(\beta, \alpha, t) = \left[ f^q(\beta, \alpha, t) + \varepsilon_f f^q( - \beta, \alpha, t) \right] \theta(\beta) \, , \label{eq:DD val} \end{align} where $\varepsilon = +1$ for $H$ and $-1$ for $\widetilde{H}$. The condition $\theta(\beta)$ means that $H^q_{\rm val}(x,\xi,t)\neq 0$ only when $-\xi < x \leq 1$. In the GK model, $b_{\rm val} = 0$ for both $H$ and $\widetilde{H}$, and $\alpha'_{\rm val} = 0.9~\rm{GeV}^{-2}$ for $H$ and $0.45~\rm{GeV}^{-2}$ for $\widetilde{H}$. The forward parton density $h_i(\beta)$ is parametrized as a ``power series" of $\beta$, fitted to global-fit PDFs. It is not our purpose to use a realistic GPD, but instead we want to see how different forms of GPDs affect the $q_T$ distribution, so it is convenient to use a simple functional form for $h(\beta)$, for which we choose \begin{align} h_{ud}(\beta) = h_{u_{\rm v}}(\beta) - h_{d_{\rm v}}(\beta) = N \frac{\beta^{\rho} (1-\beta)^{\tau} }{B(1+\rho, 1+ \tau)} \, , \label{eq:h(beta)} \end{align} which is similar to eq.~\eqref{eq:DA power} but with possibly different powers $\rho$ and $\tau$. The normalization factor is $N = 1$ for $H$ and $N = \eta_u - \eta_d = 1.267$ for $\widetilde{H}$~\cite{Kroll:2012sm}. The parameters $\rho$ and $\tau$ are fitted to the GK model at $\mu = 2~{\rm GeV}$, and we have the best fit \begin{align} (\rho_0, \tau_0) &= (-0.30, 2.24) \mbox{ for } H \, , \nonumber\\ (\rho_0, \tau_0) &= (-0.22, 2.33) \mbox{ for } \widetilde{H} \, . \label{eq:best-fit} \end{align} This gives a $h(\beta)$ peaked near $\beta = 0$. We will vary the powers $(\rho, \tau)$ around the best-fit values and compare the change of observables. \begin{figure*}[htbp] \centering \includegraphics[scale=0.6]{figures/gpd_qt_xsec_20_kin1.pdf}\quad \includegraphics[scale=0.58]{figures/gpd_qt_xsec_20_kin2.pdf}\\ \vspace{1em} \includegraphics[scale=0.6]{figures/gpd_qt_xsec_150_kin1.pdf}\quad \includegraphics[scale=0.6]{figures/gpd_qt_xsec_150_kin2.pdf} \caption{Differential cross section in eq.~\eqref{eq:xsec formula} as a function of photon $q_T$ for two choices of pion beam energies, along with two sets of $(t, \, \xi)$ values. Different curves correspond to different $(\rho, \tau)$ parameters for the GPD models of the chiral-even GPDs followed by that of the chiral-odd GPDs. The rise at large $q_T$ is due to the Jacobian peak of the differential cross section.} \label{fig:pi-p absolute qt} \end{figure*} \begin{figure*}[htbp] \centering \includegraphics[scale=0.6]{figures/gpd_c_xsec_20_kin1.pdf}\quad \includegraphics[scale=0.6]{figures/gpd_c_xsec_20_kin2.pdf}\\ \vspace{1em} \includegraphics[scale=0.6]{figures/gpd_c_xsec_150_kin1.pdf}\quad \includegraphics[scale=0.6]{figures/gpd_c_xsec_150_kin2.pdf} \caption{Differential cross section in eq.~\eqref{eq:xsec formula} as a function of $\cos\theta$ of the observed photon with all parameters chosen to be the same as that in figure~\ref{fig:pi-p absolute qt}. } \label{fig:pi-p absolute c} \end{figure*} \subsubsection{Sensitivity to GPD's $x$ dependence} \label{sec:x-dependence GPD} First, we examine the sensitivity of measured photon $q_T$ distribution to the $x$-dependence of nucleon GPDs. For simplicity we take $n_i \to \infty$ in eq.~\eqref{eq:weight} to remove the $\xi$ dependence for both $H$ and $\widetilde{H}$, and have a simplified model for nucleon transition GPDs \begin{align} H^{ud}_{pn}(x, \xi, t) &= \theta(x) x^{-0.9\, t/{\rm GeV}^2} \frac{x^{\rho} (1-x)^{\tau} }{B(1+\rho, 1+ \tau)} \, , \nonumber\\ \widetilde{H}^{ud}_{pn}(x, \xi, t) &= \theta(x) x^{-0.45\, t/{\rm GeV}^2} \frac{1.267 \, x^{\rho} (1-x)^{\tau} }{B(1+\rho, 1+ \tau)} \, . \label{eq:H no-xi} \end{align} Apart from the best-fit parameters in eq.~\eqref{eq:best-fit}, we choose an additional set of parameters, \begin{equation} (\rho,\tau) = (0.5, 2),\, (0.8, 1.2),\, (1.5, 0.3), \end{equation} for both $H^{ud}_{pn}(x, \xi, t)$ and $\widetilde{H}^{ud}_{pn}(x, \xi, t)$. This gives a set of GPDs with their $x$-dependence peaked between $x=0$ and $1$, as shown in Figs.~\ref{fig:gpd_model} for $t = -0.1~{\rm GeV}^2$. Although there is no explicit $\xi$ dependence in eq.~\eqref{eq:H no-xi}, the hard-part integration in \eqref{eq:Mi F Ft} still knows about $\xi$ since $z_1$ is a function of $x$ and $\xi$ as defined in eq.~\eqref{eq:z_1}. Moreover, $\xi$ characterizes the CM energy of the hard collision (eq.~\eqref{eq:S s}) and thus the range of $q_T$. Therefore, the integration of $q_T$ also differs for different $\xi$. As a result there will still be substantial $\xi$ dependence of the cross section. \begin{figure*}[htbp] \centering \includegraphics[scale=0.6]{figures/gpd_qt_shape_20_kin1.pdf}\quad \includegraphics[scale=0.6]{figures/gpd_qt_shape_20_kin2.pdf}\\ \vspace{1em} \includegraphics[scale=0.6]{figures/gpd_qt_shape_150_kin1.pdf}\quad \includegraphics[scale=0.6]{figures/gpd_qt_shape_150_kin2.pdf} \caption{Ratio of normalized differential cross sections $\sigma^{-1} \dd \sigma/\dd t\, \dd\xi \, \dd q_T$ as a function of observed photon $q_T$ evaluated with the GPD model in eq.~\eqref{eq:H no-xi}. Different curves correspond to different parameter sets of the GPD model in eq.~\eqref{eq:H no-xi}.} \label{fig:pi-p relative qt} \end{figure*} With the model nucleon GPDs in figure~\ref{fig:gpd_model}, we plot in figure~\ref{fig:pi-p absolute qt} the absolute differential cross section in eq.~\eqref{eq:xsec formula} as a function of measured photon $q_T$ at both J-PARC and AMBER pion beam energies, along with two choices of $(t, \, \xi)$ values. We have restricted $q_T \ge 1$~GeV to ensure that power correction to the factorization formalism is sufficiently small. The upper bound of $q_T$ depends on the collision energy and $\xi$. Different curves correspond to different choices of $(\rho, \tau)$ parameters for the GPD models, which are chosen to be the same for both chiral-even and chiral-odd GPDs. The rise at large $q_T$ is due to the Jacobian peak of the differential cross section. We can avoid the Jacobian peak by plotting the differential cross sections with respect to $\cos\theta = \sqrt{1-4q_T^2/\hat{s}}$ with $\theta$ being the angle between the observed photon and collision $\hat{z}$-axis, instead of $q_T$, as shown in figure~\ref{fig:pi-p absolute c}. By comparing plots on the left and right --- with different $\xi$, and plots on the top and bottom --- with increase of collision energy $\sqrt{s}$, the $q_T$ distribution becomes more and more dominated by small $q_T$. As $\sqrt{s}$ and $\xi$ (or $\sqrt{\hat{s}}$) increase, more phase space opens up for the production of the two back-to-back photons. As $q_T$ decreases, the virtualities of the quark propagators in the leading-order diagrams in figure~\ref{fig:hard1} and \ref{fig:hard2} decrease, leading to the enhancement of differential cross sections. To make the difference of $q_T$ shapes more manifest to better visualize the sensitivity of measured $q_T$ distribution to the $x$-dependence of nucleon GPDs, we plot in figure~\ref{fig:pi-p relative qt} the {\it ratio} of the normalized differential cross sections as a function of $q_T$ for two different collision energies, like what we plotted in figure~\ref{fig:relative qT}. The normalized cross sections are defined by dividing the differential cross sections by $\sigma(q_{T{\rm min}}=1~{\rm GeV})$. The ratio of the normalized differential cross sections is defined by dividing by the one evaluated with the best-fit GPD model parameters in eq.~\eqref{eq:best-fit} --- the red curve. Taking the ratio of normalized differential cross sections effectively removes the huge variation of the absolute values of the cross sections and enhances the dependence on the parameters of GPD models, as clearly shown in figure~\ref{fig:pi-p relative qt}. It is evident that as the peak in $x$-distribution of GPD model in figure~\ref{fig:gpd_model} shifts from $0$ to $1$, the $q_T$ shape differs by around $10\%$ to $20\%$, without even considering the possible improvement from better control of the ``end-point'' sensitivity as discussed in Sec.~\ref{sec:Sudakov}. And by comparing figure~\ref{fig:relative qT} and \ref{fig:pi-p relative qt}, we find more sensitivity to the shape of GPD than that of DA, which means the sensitivity comes more from the DGLAP region than the ERBL region. Hence, we can conclude that the \textit{shape} of $q_T$ distribution has significant sensitivity to the $x$-dependence (or equivalently, the $z_1$-dependence) of GPDs. \subsubsection{Sensitivity to GPD's $\xi$ dependence} In contrast to the $x$-dependence of GPDs, which is proportional to the relative momentum of the active quark-antiquark pair from the diffractive nucleon, the $\xi$ and $t$ are direct kinematic observables once we measure the momentum of the diffracted nucleon in an event. So, in principle, getting information on $\xi$ and $t$ is much more direct than getting the $x$-dependence. However, since GPDs are collective functions of $(x, \xi, t)$, extracting the $(\xi,t)$ dependence of GPDs from measured $(\xi, t)$ dependence of exclusive cross sections depends on how $x$-dependence is entangled with $\xi$- and $t$-dependence in GPDs, and also, in practice, how GPDs are parametrized in terms of their $(x,\xi,t)$-dependence. The measured $\xi$-dependence of this new type of exclusive processes has three major sources: (1) $\xi$-dependence of GPDs, e.g., the parameter $n_i$-dependence of the GK model in eq.~\eqref{eq:weight}; (2) $\xi$-dependence from the factorized scattering amplitudes, i.e., the convolution in eq.~\eqref{eq:Mi F Ft}); and (3) kinematic effect from the fact that $\xi$ characterizes the CM energy of the hard collision when cross section is expressed in terms of $(t, \xi, q_T^2)$. The kinematic effect is reflected by the $(1-\xi^2)/\xi^2$ factor in eq.~\eqref{eq:xsec formula} and is independent of (1) and (2). In principle, it is not possible to separate the $x$-dependence from the $\xi$-dependence of GPD because of (2), i.e., the convolution of GPD and hard coefficient depends on $\xi$. In this subsection, we try to explore to what extent the cross section depends on how $\xi$ is parametrized in the GPD. To focus on the $x$-dependence, we set $n_i\to \infty$ in our GPD model in eq.~\eqref{eq:weight} in our discussion in last subsection, which led to a model of GPDs that has no dependence on $\xi$ as shown in eq.~\eqref{eq:H no-xi}. To test the sensitivity to $\xi$-dependence, we choose $n_i = 0$ and $n_i = 1$ as two additional model GPDs. We still keep the same parametrization of $h_i(\beta)$ in eq.~\eqref{eq:h(beta)}. The advantage of using small integers for $n_i$ is that we can analytically integrate out eq.~\eqref{eq:DD int} and express GPD in terms of special functions. Since our proposed process is only sensitive to the valence region, letting $n_i\to n_{\rm val}$, and combining eq.~\eqref{eq:DD int} with eqs.~\eqref{eq:DD ansatz}, \eqref{eq:weight}, \eqref{eq:DD val}, and \eqref{eq:h(beta)} gives us the GPD model, \begin{align} {\rm (GPD)}^{ud}_{pn}(x,\xi, t) = N \begin{dcases} \frac{ {\rm B}_{x_1}(1+\rho - \alpha_v' t, \tau) - {\rm B}_{x_2}(1+\rho - \alpha_v' t, \tau) }{ 2 \, \xi \, B(1+\rho,\, 1+\tau)} & x\geq \xi \, ,\\ \frac{ {\rm B}_{x_1}(1+\rho - \alpha_v' t, \tau) }{ 2 \, \xi \, B(1+\rho,\, 1+\tau)} & - \xi \leq x < \xi \, ,\\ \hspace{4em} 0 & x < -\xi \, , \end{dcases} \label{eq:n=0} \end{align} for $n_{\rm val} = 0$, and \begin{align} &{\rm (GPD)}^{ud}_{pn}(x,\xi, t) = N \nonumber\\ & \times \begin{dcases} \frac{3(1-\xi^2)}{4\xi^3 {\rm B}(1+\rho,\, 1+\tau)} \times \bigg[ - {\rm B}_{x_1}(3 + \rho - \alpha_v' t, \tau - 2) + {\rm B}_{x_2}(3 + \rho - \alpha_v' t, \tau - 2) \\ \hspace{2em} + (x_1+x_2) \bigg( {\rm B}_{x_1}(2 + \rho - \alpha_v' t, \tau - 2) - {\rm B}_{x_2}(2 + \rho - \alpha_v' t, \tau - 2) \bigg) \\ \hspace{2em} - x_1 x_2 \bigg( {\rm B}_{x_1}(1 + \rho - \alpha_v' t, \tau - 2) - {\rm B}_{x_2}(1 + \rho - \alpha_v' t, \tau - 2) \bigg) \bigg] & {\hskip -0.1in} x\geq \xi \, , \\ \frac{3(1-\xi^2)}{4\xi^3 {\rm B}(1+\rho,\, 1+\tau)} \times \bigg[ - {\rm B}_{x_1}(3 + \rho - \alpha_v' t, \tau - 2) \\ \hspace{2em} + (x_1+x_2) {\rm B}_{x_1}(2 + \rho - \alpha_v' t, \tau - 2) - x_1 x_2 {\rm B}_{x_1}(1 + \rho - \alpha_v' t, \tau - 2) \bigg] &{\hskip -0.3in} - \xi \leq x < \xi \, , \\ \hspace{4em} 0 & {\hskip -0.1in} x < -\xi \, , \end{dcases} \label{eq:n=1} \end{align} for $n_{\rm val} = 1$, where \begin{equation} x_1 = \frac{x+\xi}{1+\xi}, \quad x_2 = \frac{x-\xi}{1-\xi} \, , \end{equation} and \begin{equation} {\rm B}_x(a, \, b) = \int_0^x \dd y \, y^{a-1} \, (1-y)^{b-1} \end{equation} is the incomplete Beta function. The parameter $b_v$ in eq.~\eqref{eq:DD ansatz} has been set to $0$. $\alpha_v'$ and $N$ are taken unchanged from $n_i = \infty$. \begin{figure}[htbp] \centering \includegraphics[scale=0.38]{figures/gpd_even_xi_0.pdf} \, \includegraphics[scale=0.38]{figures/gpd_even_xi_1.pdf} \, \includegraphics[scale=0.38]{figures/gpd_even_xi_inf.pdf} \caption{Chiral-even GPD $H(x,\xi,t)$ as a distribution of $x$ for three different $\xi$ and three different values of $n_{\rm val}$, which controls the GPD $\xi$ dependence in the GK model. } \label{fig:gpd xi} \end{figure} \begin{figure}[htbp] \centering \includegraphics[scale=0.5]{figures/gpd_xi.pdf} \hspace{2em} \includegraphics[scale=0.5]{figures/gpd_rel_xi.pdf} \caption{(a) Absolute and (b) relative distributions of $\xi$ at $t = -0.1~{\rm GeV}^2$ for $150~{\rm GeV}$ pion beam, for the three different GPD models shown in figure~\ref{fig:gpd xi}. The relative distribution in (b) is obtained by dividing each curve in (a) by the one with $n=\infty$.} \label{fig:gpd xi xsec} \end{figure} In figure~\ref{fig:gpd xi}, we plot our models for chiral-even GPD $H(x,\xi,t)$ as functions of $x$ for three values of $n_{\rm val} = 0, 1, \infty$. Our model GPDs for $n_{\rm val} = 0$ and $1$ are given in eqs.~\eqref{eq:n=0} and \eqref{eq:n=1}, respectively. For $n_{\rm val} = \infty$, the GPDs are given in eq.~\eqref{eq:H no-xi}. We fix $(\rho, \tau)$ to be the best-fit values~\eqref{eq:best-fit}, $t=-0.1~{\rm GeV}^2$ and show GPDs for three values of $\xi (=0.1,0.2,0.3)$. GPDs with $n_{\rm val} = 0$ have the maximum $\xi$ dependence while those with $n_{\rm val} = \infty$ have no $\xi$ dependence, which is clearly evident from the examples of chiral-even GPD $H(x,\xi,t)$ in figure~\ref{fig:gpd xi}. By integrating out $q_T$, we plot the cross section as a distribution of $\xi$ in figure~\ref{fig:gpd xi xsec} for the AMBER energy $E_{\pi} = 150~{\rm GeV}$, where the kinematic factor $(1-\xi^2)/\xi^2$ has been divided out. We see that different $\xi$ parametrizations do reflect themselves in the $\xi$-distribution of differential cross sections. Their relative differences are better seen by taking ratios to the one with $n=\infty$, as seen in figure~\ref{fig:gpd xi xsec}(b). Comparing $n=\infty$ with $n=1$, we see that introducing some $\xi$ dependence to GPDs through $n=1$ leads to $20\%$ change to the $\xi$ distribution of the cross sections. Then increasing the $\xi$ dependence from $n=1$ to $n=0$ leads to a further $20\% \sim 40\%$ change. \subsubsection{Sensitivity to GPD's $t$ dependence} Same as the $\xi$-dependence, the $t$-dependence of the diffractive cross section is experimentally determined. On the other hand, the $t$-dependence of theoretically factorized cross section comes from (1) the $t$ dependence of GPD and (2) kinematic effect of hard process. As shown in eq.~\eqref{eq:xi range t} the value of $t$ actually constrains the available range of the $\xi$. It is worth emphasizing that $t$ does not enter the hard process directly as an immediate consequence of the leading-power factorization, which is accurate up to power corrections of $|t|/Q^2$. However, the information of $t$ is not lost, but is captured by GPDs. The Fourier transform of GPDs with respect to the transverse component of $t$ leads to transverse spatial density distributions of quarks and gluons inside a bound hadron, which could reveal very valuable information on how quarks and gluons are distributed in an environment of a confined hadron. Comparing with the $x$-dependence, $t$-dependence is more visible in a physical process and will not be explored in more details in this work. \section{Discussion and Outlook} \label{s.outlook} Exclusive processes provide valuable information that is different from and complementary to inclusive processes. Without breaking the hadron, exclusive diffractive processes that can be factorized into DAs and GPDs provide not only one hard scale to characterize the particle nature of quarks and gluons inside the hadron, but also a secondary soft scale $t$ that allows us to probe into the transverse structure of the hadron to explore much needed information on spatial distributions of quarks and gluons in a bound hadron. However, the hard scale for many existing exclusive processes, such as pion Form Factor and DVCS on a nucleon, is provided by a single virtual particle, and measured exclusive cross sections are most sensitive to the total momentum transfer from the diffracted hadron, but not to the relative momentum of the quark-antiquark or two gluons from the diffractive hadron. Consequently, such exclusive processes are only sensitive to the ``moments'' of DAs and/or GPDs, such as $ \int_0^1 \dd z \, z^{-1} \, \phi_{\pi}(z)$, as discussed in Sec.~\ref{s.numerical}. The information on such ``moments'' is far from enough to constrain the functional forms of DAs and GPDs, and three-dimensional spatial imaging of quarks and gluons. That is, we need to seek for more exclusive processes, like the one that we proposed in this paper, to provide better constraints on the hadron tomography. In this paper, we introduced exclusive production of a pair of high transverse momentum photons in pion-nucleon collisions and demonstrated that this new $2\to 3$ exclusive diffractive process can be systematically factorized into universal pion's distribution amplitude and nucleon's generalized parton distributions, which are convoluted with corresponding infrared safe and perturbatively calculable short-distance hard parts. The correction to the factorization of this exclusive process is suppressed by powers of $\Lambda_{\rm QCD}/q_T$. We also showed quantitatively that this new type of exclusive processes is not only complementary to existing processes for extracting GPDs, but also capable of providing an enhanced sensitivity to the parton momentum fraction of both DAs and GPDs from the measured transverse momentum $q_T$ distribution. This new $2\to 3$ exclusive process could be measured at J-PARC and AMBER. In addition, our proof of the leading-power factorization for exclusive production of a pair of high transverse momentum photons can be carried through for justifying the factorization of exclusive Drell-Yan production in $\pi N\to \ell^+\ell^-(Q) N'$ when $Q\gg\sqrt{|t|}$, which could be measured at J-PARC and other facilities as well. We stress that the sensitivity of observed $q_T$ shape to the functional form of GPDs is because there are {\it two} back-to-back particles coming out of the hard collision and the momentum flow between these two back-to-back particles entangles with the relative momentum of the two active partons from the diffractive hadron. It is this entanglement of momenta that provides the additional sensitivity to the $x$-dependence of GPDs. In addition to the exclusive production of two high transverse momentum photons in the diffractive pion-nucleon collisions, discussed in this paper, we introduce a new class of similar $2\to 3$ exclusive processes for diffractive production of a back-to-back high transverse momentum pair of particles (or jets), $C(p_c)$ and $D(p_d)$, from a hadron $h(p)$ to a hadron $h'(p')$, \begin{equation} A(p_1) + h(p)\to C(p_c) + D(p_d) + h'(p') \label{eq:diff2p} \end{equation} \noindent with $\sqrt{|(p-p')^2|} \ll |p_{c_T}| \sim |p_{d_T}|$. The exclusive process in eq.~\eqref{eq:diff2p} can be viewed effectively as a combination of a diffractive production of the virtual and ``long-lived'' partonic state(s) $B^*$: $h(p) \to B^*(p_2) + h'(p')$ and an exclusive production of two back-to-back high transverse momentum particles (or jets) on such virtual state(s):\ $A(p_1)+B^*(p_2) \to C(p_c)+D(p_d)$. The necessary condition for QCD factorization of the exclusive process in eq.~\eqref{eq:diff2p} is that the virtuality of the intermediate state(s) $B^*$ is much smaller than its energy, i.e., the lifetime of $B^*$ is much longer than the timescale of the hard exclusive scattering to produce the two back-to-back high transverse momentum particles (or jets). It is the long lifetime of the intermediate state $B^*$ that effectively suppresses the quantum interference between the diffractive production of the $B^*$ and the hard exclusive scattering between $A(p_1)$ and $B^*(p_2)$. This necessary condition effectively requires that the transverse momentum $p_{c_T}\sim p_{d_T}$ be much larger than the soft scale, $\sqrt{-t}=\sqrt{-(p-p')^2}$. We will present the sufficient condition(s) for QCD factorization of various $2\to 3$ exclusive processes of the type in eq.~\eqref{eq:diff2p} in a future publication. For example, from the elastic large angle pion-pion scattering, $\pi(p_1)+\pi(p_2)\to \pi(p_c) + \pi(p_d)$ we can have a new exclusive $2\to 3$ diffractive production of a back-to-back pair of high transverse momentum pions: $\pi(p_1)+h(p)\to \pi(p_c) + \pi(p_d) +h'(p')$ with $p_{c_T}\sim p_{d_T}\gg \sqrt{-(p-p')^2}$, if the $\pi\pi\to\pi\pi$ large-angle elastic scattering is dominated by a single hard scattering. Similarly, instead of the exclusive pion-baryon scattering to produce two back-to-back high transverse momentum photons, we can switch one of the final-state photon with the initial-state pion to have another $2\to 3$ exclusive process: $\gamma(p_1) + N(p) \to \gamma (q_1)+\pi(p_\pi) + N'(p')$ with the back-to-back high transverse momentum photon-pion pair~\cite{Boussarie:2016qop,Duplancic:2018bum}. Taking the advantage of photon polarization at Jefferson Lab, polarization asymmetries of an exclusive diffractive photo-production of two high transverse momentum and back-to-back particles could provide additional channels of observables to extract various GPDs with better sensitivities on their $x$-dependence, which will be explored in our future publications. \paragraph*{Acknowledgements.} We thank Profs. Wen-Chen Chang, Shunzo Kumano and Shin\'ya Sawada for correspondence on measuring GPDs at J-PARC, Profs.~Geoffrey Bodwin, Markus Diehl and C.-P.~Yuan for helpful discussions, and also Prof.~Bernard Pire for correspondence on some important references. This work is supported in part by the US Department of Energy (DOE) Contract No.~DE-AC05-06OR23177, under which Jefferson Science Associates, LLC operates Jefferson Lab, and within the framework of the TMD Collaboration. The work of Z.Y. at MSU is partially supported by the U.S.~National Science Foundation under Grant No.~PHY-2013791, and the fund from the Wu-Ki Tung endowed chair in particle physics. The Feynman diagrams in this paper were all drawn using JaxoDraw~\cite{Binosi:2003yf, Binosi:2008ig}.
\section{Introduction} Continuum dynamics models often describe the underlying physical laws by one or more partial differential equations (PDEs). Numerical methods are well-established for approximately solving PDEs with high accuracy, however, they are computationally expensive \citep{spencer}. Deep learning techniques have been shown to accelerate physical simulations \citep{Guo2016}, however, their relatively poor accuracy and limited ability to generalise restricts their application in practice. Most deep learning models for simulating continuum physics have been developed around convolutional neural networks (CNNs) \citep{Thuerey2018,Wiewel2019}. CNNs constrain input and output fields to be defined on rectangular domains represented by regular grids, which is not suitable for more complex domains. This has motivated the recent interest in graph neural networks (GNN) for learning to simulate continuum dynamics, which allow complex domains to be represented and the resolution spatially varied \citep{pfaff2020learning}. Most physical processes possess several symmetries, among which translation and rotation are perhaps the most common. Translation invariance/equivariance can be easily satisfied by using CNNs or GNNs \citep{battaglia2018relational}. For rotation, the general approach is to approximately learn invariance/equivariance by training against augmented training data which includes rotations \citep{chu2017data,li2018learning,mrowca2018flexible,lino2021simulating}. Here, we propose REMuS-GNN{}, a \textit{R}otation \textit{E}quivariant \textit{Mu}lti-\textit{S}cale \textit{GNN} model that enforces the rotation equivariance of input and output vector fields, and improves the accuracy and generalisation over the data-augmentation approach. REMuS-GNN{} forecasts the spatio-temporal evolution of continuum systems, discretised on unstructured sets of nodes, and processes the physical data at different resolutions or length scales, enabling the network to more accurately and efficiently learn spatially global dynamics. We introduce a general directional message-passing (MP) algorithm and an edge-unpooling algorithm that is rotation invariant. The accuracy and generalisation of REMuS-GNN{} was assessed on simulations of the incompressible flow around elliptical cylinders, an example of Eulerian dynamics with a global behaviour due the infinite speed of the pressure waves. \section{Related work} \paragraph{Neural solvers} During the last five years, most of the neural network models used for simulating continuum physics have included convolutional layers. For instance, CNNs have been used to solve the Poisson's equation \citep{Tang2018,Ozbay2019} and to solve the Navier-Stokes equations{} \citep{Guo2016,Thuerey2018,Lee2018,Kim2019,Wiewel2019}, achieving an speed-up of one to four orders of magnitude with respect to numerical solvers. To the best of our knowledge \cite{alet2019graph} were the first to explore the use of GNNs to infer continuum physics by solving the Poisson PDE, and subsequently \cite{pfaff2020learning} proposed a mesh-based GNN to simulate a wide range of continuum dynamics. Multi-resolution graph models were later introduced by \cite{li2020multipole,lino2021simulating,liu2021multi} and \cite{chen2021graph}. \paragraph{Rotation invariance and equivariance} There has been a constant interest to develop neural networks that are equivariant to symmetries, and particularly to rotation. For instance, \cite{weiler2019general} and \cite{weiler20183d} introduced an SE(2)-equivariant and an SE(3)-equivariant CNNs respectively, both later applied to simulate continuum dynamics by \cite{wang2020incorporating} and \cite{siddani2021rotational}. However, rotation equivariant CNNs only achieve equivariance with respect to a small set of rotations, unlike rotation equivariant GNNs \citep{thomas2018tensor,fuchs2020se,schutt2021equivariant,satorras2021n}. All these rotation equivariant networks require a careful design of each of their components. On the other hand, rotation invariant GNNs, such as directional MP neural networks \citep{klicpera2020directional,klicpera2021directional}, ensure the rotation invariance by a proper selection of the input and output attributes \citep{klicpera2021gemnet,liu2021spherical}. Nevertheless, these GNNs can only be applied to scalar fields, but not vector fields \citep{klicpera2020directional}. On the other hand, although Tensor Flow Networks \citep{thomas2018tensor} and SE(3)-Transformers \citep{fuchs2020se} can handle equivariant vector fields and could be applied to Eulerian dynamics, they lack an efficient mechanism for processing and propagating node features across long distances. \section{REMuS-GNN{}} For a PDE $\frac{\partial \bm{u}}{\partial t}=\mathcal{F}(\bm{u})$ on a spatial domain $\mathcal{D} \subset \mathbb{R}^2$, REMuS-GNN \ infers the temporal evolution of the two-dimensional vector field $\bm{u}(t,\bm{x})$ at a finite set of nodes $V^1$, with coordinates $\bm{x}^1_i \in \mathcal{D}$. Given an input vector field $\bm{u}(t_0, \bm{x}_{V^1})$ at time $t=t_0$ and at the $V^1$ nodes, a single evaluation of REMuS-GNN{} returns the output field $\bm{u}(t_0+dt, \bm{x}_{V^1})$, where $dt$ is a fixed time-step size. REMuS-GNN{} is equivariant to rotations of $\mathcal{D}$, i.e., if a two-dimensional rotation $\mathcal{R}: \bm{x} \rightarrow R\bm{x}$ with $R \in \mathbb{R}^{2\times2}$ is applied to $\bm{x}_{V^1}$ and $\bm{u}(t_0, \bm{x}_{V^1})$ then the output field is $R\bm{u}(t_0+dt, \bm{x}_{V^1})$. Such rotation equivariance is achieved through the selection of input attributes that are agnostic to the orientation of the domain (but still contain information about the relative position of the nodes) and the design of a neural network that is invariant to rotations. REMuS-GNN{} is applied to a data structure expanded from a directed graph. We denote it as $H^1:=(V^1,E^1,A^1)$, where $E^1:=\{(i,j)| i,j \in V^1\}$ is a set of directed edges and $A^1:=\{(i,j,k)|(i,j),(j,k) \in E^1\}$ is a set of directed angles. The edges in $E^1$ are obtained using a k-nearest neighbours (k-NN) algorithm that guarantees that each node has exactly $\kappa$ incoming edges. Unlike traditional GNNs, there are no input node-attributes to the network. The input attributes at edge $(i,j)$ are $\bm{e}_{ij}: = [u_{ij}, p(\bm{x}_j), \Omega_j]$, where $p(\bm{x})$ can be any physical parameter and $\Omega_j=1$ on Dirichlet boundaries and $\Omega_j=0$ elsewhere. The edge attribute $u_{ij}$ is defined as \begin{equation} u_{ij} := \hat{\bm{e}}_{ij} \cdot \bm{u}(t_0,\bm{x}_j), \label{eq:projection} \end{equation} where $\hat{\bm{e}}_{ij}:=(\bm{x}_j - \bm{x}_i)/||\bm{x}_j - \bm{x}_i||_2$; that is, $u_{ij}$ is the projection of the input vector field at node $j$ along the direction of the incoming edge $(i,j)$ (see Figure \ref{fig:proj_aggr}a). The input attributes at angle $(i,j,k)$ are $\bm{a}_{ijk} := [||\bm{x}_j - \bm{x}_i||_2, ||\bm{x}_k - \bm{x}_j||_2, \cos(\alpha_{ijk}), \sin(\alpha_{ijk})],$ where $\alpha_{ijk}:=\measuredangle (i,j)(j,k)$. Since all the input attributes are independent of the chosen coordinate system, any function applied exclusively to them is invariant to both rotations and translations. We denote as $u'_{ij} \in \mathbb{R}$ to the output at edge $(i,j)$ of a forward pass through the network, and it represents the projection of the output vector field at node $j$ along the direction of the incoming edge $(i,j)$. In order to obtain the desired output vectors at each node, $\bm{u}(t_0+dt,\bm{x}_{V^{1}})$, from these scalar values; we solve the overdetermined system of equations (if $\kappa > 2$) given by \begin{equation} [\hat{\bm{e}}^1_{1:\kappa,j}][\bm{u}(t_0+dt,\bm{x}_j)] = [u'_{1:\kappa,j}], \ \ \ \forall j \in V^1, \label{eq:aggr} \end{equation} where matrix $[\hat{\bm{e}}_{1:\kappa,j}] \in \mathbb{R}^{\kappa \times 2}$ contains in its rows the unit vectors along the directions of the $\kappa$ incoming edges at node $j$, $[\bm{u}(t_0+dt,\bm{x}_j)] \in \mathbb{R}^{2\times1}$ is a column vector with the horizontal and vertical components of the output vector field at node $j$, and $[u'_{1:\kappa,j}] \in \mathbb{R}^{\kappa \times 1}$ is another column vector with the value of $u'$ at each of the $\kappa$ incoming edges. This step can be regarded as the inverse of the projection in equation (\ref{eq:projection}). To solve equation (\ref{eq:aggr}) we use the Moore-Penrose pseudo-inverse of $[\hat{\bm{e}}_{1:\kappa,j}]$, which we denote as $[\hat{\bm{e}}_{1:\kappa,j}]^{+} \in \mathbb{R}^{2 \times \kappa}$. Thus, if we define the \textit{projection-aggregation} function at scale $\ell$, $\rho^\ell: \mathbb{R}^\kappa \rightarrow \mathbb{R}^2$, as the matrix-vector product given by \begin{equation} \rho^\ell(e_1, e_2, \dots, e_\kappa) := [\hat{\bm{e}}^\ell_{1:\kappa,j}]^{+} [e_1, e_2, \dots, e_\kappa]^T \label{eq:solve_aggr} \end{equation} then $\bm{u}(t_0+dt,\bm{x}_j) = \rho^1(u'_{1:\kappa,j})$ (see Figure \ref{fig:proj_aggr}b). The output $\bm{u}(t_0+dt,\bm{x}_{V^{1}})$ can be successively re-fed to REMuS-GNN{} to produce temporal roll-outs. In each forward pass the information processing happens at $L$ length-scales in a U-Net fashion, as illustrated in Figure \ref{fig:net}. A single MP layer applied to $H^1$ propagates the edge features only locally between adjacent edges. To process the information at larger length-scales, REMuS-GNN{} creates an $H$ representation for each level, where MP is also applied. The lower-resolution representations ($H^2, H^3, \dots, H^L$; with $|V_1| > |V_2| > \dots > |V_L|$) possess fewer nodes, and hence, a single MP layer can propagate the features of edges and angles over longer distances more efficiently. Each $V^{\ell+1}$ is a subset of $V^{\ell}$ obtained using Guillard's coarsening algorithm \citep{guillard1993node}, and $E^{\ell+1}$ and $A^{\ell+1}$ are obtained in an analogous manner to how $E^{1}$ and $A^{1}$ were obtained, as well as their attributes $\bm{e}_{ij}^{\ell+1}$ and $\bm{a}_{ij}^{\ell+1}$. Before being fed to the network, all the edge attributes $\bm{e}_{ij}^{\ell}$ and angle attributes $\bm{a}_{ij}^{\ell}$ are encoded through independent multi-layer perceptrons (MLPs). At the end, another MLP decodes the output edge-features of $E^1$ to return $u'_{ij}$. As depicted in Figure \ref{fig:net}, the building blocks of REMuS-GNN{}'s network are a directional MP (EdgeMP) layer, an edge-pooling layer and an edge-unpooling layer. \paragraph{EdgeMP layer} Based on the GNBlock introduced by \cite{Sanchez-Gonzalez2018} and \cite{battaglia2018relational} to update node and edge attributes, we define a general MP layer to update angle and edge attributes. The angle-update, angle-aggregation and edge-update at scale $\ell$ are given by \begin{alignat}{2} \bm{a}^{\ell}_{ijk} &\leftarrow f^{a}([\bm{a}^{\ell}_{ijk},\bm{e}^{\ell}_{ij},\bm{e}^{\ell}_{jk}]), \ \ \ &\forall (i,j,k) \in A^\ell, \label{eq:angle_model} \\ \overline{\bm{a}}^{\ell}_{jk} &\leftarrow \frac{1}{\kappa} \sum_{k \in \mathcal{N}^{-}_j} \bm{a}^{\ell}_{ijk}, \ &\forall (j,k) \in E^\ell, \label{eq:angle_aggr} \\ \bm{e}^{\ell}_{jk} &\leftarrow f^e([\bm{e}_{jk}, \overline{\bm{a}}^{\ell}_{jk}]), \ &\forall (j,k) \in E^\ell. \label{eq:edge_model} \end{alignat} Functions $f^a$ and $f^e$ are MLPs in the present work. This algorithm is illustrated in Figure \ref{fig:EdgeMP}. \paragraph{Edge-pooling layer} Given a node $j \in V^{\ell}$ (hence $j \in V^{\ell-1}$ too), an outgoing edge $(j,k) \in E^{\ell}$ and its $\kappa$ incoming edges $(i,j) \in E^{\ell-1}$, we can define $\kappa$ new angles $(i,j,k) \in A^{\ell-1,\ell}$ that connect scale $\ell-1$ to scale $\ell$. Pooling from $H^{\ell-1}$ to $H^{\ell}$ is performed as the EdgeMP, but using the incoming edges $(i,j) \in E^{\ell-1}$, outcoming edge $(j,k) \in E^{\ell}$ and angles $(i,j,k) \in A^{\ell-1,\ell}$. \paragraph{Edge-unpooling layer} To perform the unpooling from $H^{\ell+1}$ to $H^{\ell}$ we first aggregate the features of incoming edges into node features. Namely, given the $\kappa$ incoming edges at node $j \in V^{\ell+1}$ and their $F$-dimensional edge-features, $\bm{e}^{\ell+1}_{ij} = [(e_1)^{\ell+1}_{i,j}, (e_2)^{\ell+1}_{i,j}, \dots, (e_F)^{\ell+1}_{i,j}]$, the node-feature matrix $W_j^{\ell+1} \in R^{2\times F}$ is obtained applying the projection-aggregation function $\rho^{\ell+1}$ to each component of the edge features according to \begin{equation} W_j^{\ell+1} = \bigg[ \rho^\ell \big( (e_1)^{\ell+1}_{1:\kappa,j} \big)^T \Big| \rho^\ell \big( (e_2)^{\ell+1}_{1:\kappa,j} \big)^T \Big| \dots \Big| \rho^\ell \big( (e_F)^{\ell+1}_{1:\kappa,j} \big)^T \bigg], \label{eq:desproject_unpool} \end{equation} where $\cdot \ | \ \cdot$ denotes the horizontal concatenation of column vectors. Then, $W_j^{\ell+1}$ is interpolated to the set of nodes $V^{\ell}$ following the interpolation algorithm introduced by \cite{qi2017pointnet++}, yielding $W_k^{\ell} \in \mathbb{R}^{2\times F}$ at each node $k \in V^{\ell}$. Next, these node features are projected to each edge $(l,k)$ on $E^{\ell}$ to obtain $\bm{w}^{\ell}_{lk} \in \mathbb{R}^{F}$, where \begin{equation} \bm{w}^{\ell}_{lk} := \hat{\bm{e}}_{lk}^{\ell} W_k^{\ell} , \ \ \ \forall (l,k) \in E^{\ell}. \label{eq:projection_unpool} \end{equation} Finally, the MLP $f^u$ is used to update the edge features $\bm{e}^{\ell}_{lk}$ as \begin{equation} \bm{e}^{\ell}_{lk} \leftarrow f^u([\bm{e}^{\ell}_{lk}, \bm{w}_{lk}^\ell]), \ \ \ \forall (l,k) \in E^{\ell}. \label{eq:update_unpool} \end{equation} \section{Experiments} \paragraph{Datasets} Datasets \texttt{Ns} and \texttt{NsVal} where use for training and validation respectively. Both contain solutions of the incompressible Navier-Stokes equations{} for the flow around an elliptical cylinder with an aspect ratio $b \in [0.5,0.8]$ on a rectangular fluid domain with top and bottom boundaries separated by a distance $H \in [5,6]$. Each sample consists of the vector-valued velocity field at 100 time-points within the periodic vortex-shedding regime with a Reynolds number $Re \in [500,1000]$. Domains are discretised with between 4800 and 9200 nodes. In REMuS-GNN{}, the input $\bm{u}(t,\bm{x})$ corresponds to the velocity field and $p(\bm{x})$ to $Re$. Besides these datasets, six datasets with out-of-distribution values for $b$, $H$ and $Re$ were used for assessing the generalisation of the models; and dataset \texttt{NsAoA} includes rotated ellipses. Further details are included in Appendix \ref{sec:datasets_details}. \paragraph{Models} We compare REMuS-GNN{} with MultiScaleGNN \citep{lino2021simulating}, a state-of-the-art model for inferring continuum dynamics; and with MultiScaleGNNg, a modified version of MultiScaleGNN. MultiScaleGNN and MultiScaleGNNg possess the same U-Net-like architecture as REMuS-GNN{}, while MultiScaleGNNg and REMuS-GNN{} also share the same low-resolution representations. The benchmark models are not rotation equivariant, so they were trained with and without rotations of the domain. All the models have three scales ($L=3$) and a similar number of learnable parameters. For hyper-parameter choices and training setup see Appendix \ref{sec:models_details}. \paragraph{Results} \begin{wrapfigure}[18]{L}{0.5\columnwidth} \begin{center} \includegraphics[clip, width=0.48\columnwidth, trim={0mm, 0mm, 0mm, 0mm}]{figures/rots_vs_mae.png} \end{center} \caption{\small MAE ($\times 10^{-2}$) on the \texttt{NsVal} dataset under rotations of $\mathcal{D}$. \label{fig:rots_vs_mae} } \end{wrapfigure} From Figure \ref{fig:rots_vs_mae} it is clear that the MAEs of the predictions of MultiScaleGNN and MultiScaleGNNg trained without rotations grow significantly during inference on rotations of the domain greater than 5 degrees. On the other hand, these models trained with rotations are able to maintain an approximately constant MAE for each rotation of the domain. Hence, from now on we only consider these benchmark models. It can be seen that REMuS-GNN{} outperforms the benchmark models on every rotation of the validation dataset. Table \ref{table:mae_val_test} collects the MAE on the velocity field (measured with the free-stream as reference) and the MAE on the $x$-coordinate of the separation point on the upper wall of the ellipses. It can be concluded that REMuS-GNN{} also has a much better generalisation than the benchmark models. Additional results are included in Appendix \ref{sec:results}. \begin{table}[ht] \centering \caption{\small MAE $\times 10^{-2}$ in the velocity field and the $x$-coordinate of the separation point} \label{table:mae_val_test} \begin{center} \footnotesize \begin{tabularx}{\textwidth}{llYYYYYYY} \toprule & & \texttt{\scriptsize NsLowRe} & \texttt{\scriptsize NsHighRe} & \texttt{\scriptsize NsThin} & \texttt{\scriptsize NsThick} & \texttt{\scriptsize NsNarrow} & \texttt{\scriptsize NsWide} & \texttt{\scriptsize NsAoA} \\ \midrule \multirow{2}{*}{\scriptsize REMuS-GNN{}} & \scriptsize{Velocity field} & \textbf{4.514} & \textbf{9.576} & \textbf{3.152} & \textbf{4.430} & \textbf{2.861} & \textbf{2.873} & \textbf{2.504}\\ & \scriptsize{Separation point} & \textbf{3.082} & \textbf{6.464} & \textbf{2.477} & \textbf{4.488} & \textbf{2.934} & \textbf{2.964} & \textbf{3.219}\\ \midrule \multirow{2}{*}{\scriptsize MultiScaleGNN} & \scriptsize{Velocity field}\scriptsize{} & 5.723 & 13.886 & 3.703 & 5.531 & 3.583 & 3.454 & 3.451 \\ & \scriptsize{Separation point} & 4.424 & 7.524 & 2.825 & 4.873 & 3.830 & 3.959 & 4.386\\ \midrule \multirow{2}{*}{\scriptsize MultiScaleGNNg} & \scriptsize{Velocity field} & 4.826 & 8.552 & 4.085 & 7.201 & 4.759 & 4.666 & 4.593\\ & \scriptsize{Separation point} & 4.414 & 7.264 & 3.025 & 6.405 & 4.222 & 4.468 & 4.993\\ \bottomrule \end{tabularx} \end{center} \end{table} \section{Conclusion} We proposed a translation and rotational equivariant model for predicting the spatio-temporal evolution of vector fields defined on continuous domains, where the dynamics may encompass a range of length scales and/or be spatially global. The proposed model employs a generalised directional message-passing algorithm and a novel edge-unpooling algorithm specifically designed to satisfy the rotation invariance requirement. The incorporation of rotation equivariance as a strong inductive bias results in a higher accuracy and better generalisation compared with the vanilla data-augmentation approach for approximately learning the rotation equivariance. To the best of the authors' knowledge, REMuS-GNN{} is the first multi-scale and rotation-equivariant GNN model for inferring Eulerian dynamics. \FloatBarrier
\section{Introduction} \label{sec:intro} \noindent Statistical inference in the context of parametrized models of observable quantities forms a cornerstone in addressing a variety of scientific questions. Focusing on astrophysics and cosmology, in particular, the advent of targeted experiments and observatories \citep{Komatsu2010,Planck18-VI-cosmoparam,borucki16,ricker+14,hobbs+10,abbott+19-GWTC-1} and large surveys \citep{eBOSS20,abbott+22-DES-Y3cosmo} has led to unprecedented statistical precision being achieved on a number of observables spanning a large range of physical conditions and length scales in, both, the local and distant Universe. Ongoing and upcoming surveys and experiments are set to further enhance the statistical precision of measurements \citep{merloni+12,abazajian+16-CMBS4,Laureijs11,LSST+09,DESI+16,baker+19-LISA}, as well as open up new avenues for exploring the Universe \citep[see, e.g.,][]{koopmans+15}, thus firmly placing the onus on model builders to produce ever-more-accurate models of the Universe. In this context, the use of semi-analytical techniques and full-fledged numerical simulations as theoretical machines has now become common in data analysis and statistical inference \citep{kitaura+16,elucidV,alam+21a,yuan+22a}. These numerical tools are typically much more time-consuming and computationally expensive than (much simpler, but less accurate) analytical models, as is needed in order to correctly capture a large number of non-linear and uncertain model elements. For example, it is now common to have to describe complex physical phenomena such as galaxy formation and evolution using semi-analytical or heuristic models involving between $10$-$20$ free parameters \citep{guo+11,henriques+15,alam+21b}. Within the cosmology community, such situations have led to several parallel lines of investigation, all aimed at robust statistical inference using high-precision data. The recognition that not all aspects of a full numerical simulation may be relevant for modelling specific observables has led to fast but approximate simulation techniques (typically with free parameters calibrated using full simulations) being developed to model cosmic structure formation \citep{ss02,pinocchio,mfc11,pinocchio-reloaded,kh12,tze13,hmp15,fcsm16,cp18}. The requirement of precision of a few percent in predicting observables such as the power spectrum of cosmic matter fluctuations has led to the development of `emulators', which smoothly interpolate the observable in multi-dimensional parameter space using full numerical simulations performed on a sparse set of carefully chosen parameter locations \citep{heitmann+14,heitmann+16,lawrence+17,knabenhans+19}. More recently, several groups have begun exploiting machine learning techniques \citep[e.g.,][]{adb18,lppl18,villaescusa-navarro+21-CAMELS,ds21,delgado+22,schaurecker+22} to train artificial neural networks to reproduce the results of a full simulation at a fraction of the cost. Similar lines of approach can also be found in the gravitational waves \citep{schmidt+21}, strong gravitational lensing \citep{hpm17} and exoplanets communities \citep{cranmer+21}. The techniques listed above are typically optimized in a highly model- and/or observable-specific manner. It is therefore also useful to explore more general-purpose techniques for parameter inference that combine accuracy and speed. For example, the Derivative Approximation for LIkelihoods \citep[DALI,][]{sqa14} uses analytical expansions around a multivariate Gaussian (which would be the exact answer for a linear model with Gaussian data errors), to model the non-Gaussian posterior of non-linear models. Schemes invoking DALI have been used in recent analyses of specific data sets \citep{rs22,wlzs22}. To account for arbitrary levels of non-Gaussianity in the parameter posterior, however, accurate likelihood calculations are essential. In situations where each likelihood calculation requires an expensive (semi-)numerical simulation, this can make efficient sampling of parameter space -- using, e.g., Markov Chain Monte Carlo (MCMC) techniques -- problematic. There have already been several attempts to circumvent these problems. E.g., \citet{yuan+22b} have explored a hybrid MCMC, in which an emulator for the 2-point correlation function observables is fed into a standard MCMC implementation, for analysing data from the BOSS survey. \citet{bcd22} have used a Metropolis-within-Gibbs scheme to accelerate the sampling of nuisance parameters when searching for gravitational waves in pulsar timing array (PTA) data. The distinction between fast (typically nuisance) and slow (typically physically interesting) parameters has also been exploited in the construction of standard MCMC samplers based on the Metropolis-Hastings algorithm \citep{lewis13}. In this work, we present a new algorithm to accelerate the exploration of parameter space for generic problems with a calculable likelihood (or, equivalently, a cost function). Unlike DALI-based schemes such as the one proposed by \citet{rs22}, we do not assume any specific functional dependence of the cost function on the parameters. Our method instead is inspired by the ideas underlying simulated annealing -- an established technique for approximate optimization which we recapitulate below -- and essentially involves a simultaneous minimization and sparse multi-dimensional exploration of the cost function landscape. Building on this, our algorithm then further sparsely samples the parameter space in the vicinity of the minimum, followed by the construction of an interpolation scheme to enable inexpensive evaluations of the cost function at arbitrary parameter values. This interpolator is finally fed into a standard MCMC implementation to perform rapid exploration of the parameter space. We will demonstrate that our method uses fewer cost function evaluations than a standard MCMC solution by factors ranging from $\gtrsim10$ to $\gtrsim100$ depending on the problem; this is clearly particularly useful when the cost function (or likelihood) is expensive to compute. Our implementation is released publicly in the form of a code \textsc{picasa} whose main features we describe later. The paper is organised as follows. We describe our new method in section~\ref{sec:method}, followed by a description of the \textsc{picasa} framework in section~\ref{sec:picasa}. We present applications to some example linear and non-linear problems in section~\ref{sec:examples} and conclude with a discussion in section~\ref{sec:conclude}. \section{Method} \label{sec:method} \subsection{Recap: simulated annealing} \label{subsec:simann} Simulated annealing \citep{kgv83} is a technique for locating the global optimum of a cost function that can depend on several parameters, useful for cases when the function evaluation is difficult. The idea involves starting a search at some finite `temperature', leading to high probabilities of accepting non-optimal parameters, and slowly decreasing this temperature as better solutions are explored. The technique therefore allows for a stochastic exploration of parameter space that can effectively `jump out' of local optima, unlike standard optimization algorithms such as gradient descent. The original implementations of simulated annealing were closely connected to the Metropolis-Hastings algorithm \citep{metropolis+53,hastings70}, and probabilistically accept or reject parameters sequentially (\citealp{kgv83}, although see \citealp{ds90,mf90} for a deterministic updating approach). The gradual decrease of the `temperature' of the system ensures that the probability for accepting unlikely parameter values steadily decreases as the algorithm progresses. Adjusting the rate of this decrease (or the annealing schedule) leads to some level of control over the amount of resources that will eventually be spent in the cost function evaluations. Our new method, described in the subsequent sections, is conceptually inspired by the idea of a steadily decreasing temperature. In particular, the algorithm we describe below progressively zooms in on smaller and smaller regions of parameter space enclosing the global minimum of a given cost function. However, we replace the probabilistic accept/reject scheme with a stochastic sampling strategy that leads to multiple parameter values being simultaneously sampled and stored. This is useful when we interface our algorithm with a standard MCMC implementation using interpolation schemes for evaluating the cost function. We also introduce several additional features that enable the algorithm to efficiently find a path towards the global optimum in multi-dimensional parameter space. \subsection{Anisotropic Simulated Annealing} \label{subsec:ASA} In the following, we will use $\chi^2(\mathbf{a})$ to denote the cost function in the $D$-dimensional space of parameters $\mathbf{a}$. Throughout, we interpret $\chi^2$ as \begin{equation} \chi^2(\mathbf{a}) \equiv -2\,\ln\Cal{L} + {\rm constant}\,, \label{eq:chi2} \end{equation} where $\Cal{L}\equiv p(\Cal{O}|\mathbf{a})$ is the likelihood, or probability density (in observable space) of observing the data set $\Cal{O}$ given a model with fixed parameters $\mathbf{a}$. For many applications of interest, when data errors are assumed to be (approximately) normally distributed with a parameter-independent covariance matrix, the constant can be assumed to remove the effect of determinant factors, so that $\chi^2(\mathbf{a})$ corresponds to the quantity usually minimized in least squares applications. This allows us to cleanly connect to standard Bayesian MCMC applications later.\footnote{For cases where the likelihood is significantly non-Gaussian (e.g., count statistics in cluster cosmology), the constant can be adjusted so as to ensure that the minimum value of $\chi^2$ remains close to the number of degrees of freedom.} We emphasize again that we are not assuming any specific dependence of $\chi^2$ on the model parameters $\mathbf{a}$ (e.g., unlike DALI, we are not assuming that $\Cal{L}$ is close to a multi-variate Gaussian in the parameters). \subsubsection{Iterative sampling} The anisotropic simulated annealing (ASA) algorithm is built around the idea that an approximate minimum of $\chi^2(\mathbf{a})$ can be obtained using a sparse stochastic sampling in parameter space, and then iteratively refined. With some assumption on parameter priors, the samples obtained over multiple iterations can then also be used to map out the parameter posterior distribution around the minimum of $\chi^2$, using appropriate $D$-dimensional interpolation. To this end, the ASA algorithm first evaluates $\chi^2(\mathbf{a})$ on Latin hypercube samples generated in progressively zoomed regions of the $D$-dimensional parameter space, with progressively higher density, for some number of iterations. The zoomed region at iteration $n$ is centered on the evaluated minimum of iteration $n-1$, with a volume decided by the estimated width of $\Cal{L}=\e{-\chi^2/2}$ in each parameter direction at iteration $n-1$, and having the same number of samples \ensuremath{N_{\rm samp}}. The shape of the zoomed region at iteration $n$ is allowed to respond to anisotropic gradients of $\chi^2$ by setting the parameter range in the $p^{\rm th}$ direction to the dispersion $\sigma_p^{(n-1)}$ estimated by treating $\Cal{L}$ defined by the points in iteration $n-1$ as a probability density along each parameter direction and numerically evaluating the corresponding variance: $\sigma_p^{(n-1)2} = \int \ensuremath{{\rm d}} a_p\,\Cal{L}_{(n-1)}(a_p - \avg{a_p})^2/\int \ensuremath{{\rm d}} a_p\,\Cal{L}_{(n-1)}$, where $\avg{a_p} = \int \ensuremath{{\rm d}} a_p\,\Cal{L}_{(n-1)}\,a_p/\int \ensuremath{{\rm d}} a_p\,\Cal{L}_{(n-1)}$.\footnote{If the initial range of parameters is very broad and the sampling is not dense enough, the first few iterations may be dominated by points having exceedingly large $\chi^2$ values, which would incorrectly lead to the dispersion estimate being numerically zero. To avoid such situations, we artificially replace all values of $\chi^2 > 20$ with zero. The starting iterations in such cases then essentially respond to the user-specified width, while later iterations become increasingly (and correctly) dominated by points having $\chi^2$ values closer to the number of degrees of freedom.} The use of points only in iteration $n-1$, rather than in all previous iterations, means that the algorithm explores regions of $\Cal{L}$ progressively closer to its maximum. The choice of setting the width of subsequent iterations exactly equal to the dispersion calculated above effectively fixes the rate of decrease of the `temperature' of the annealing process. Since the \ensuremath{N_{\rm samp}}\ evaluations in each iteration are completely independent, they can be trivially parallelized over $N_{\rm proc}\geq1$ processors. Maximum efficiency is then clearly achieved when $N_{\rm proc}$ is a multiple of \ensuremath{N_{\rm samp}}. \subsubsection{Detecting edges} \label{subsubsec:edges} If the estimated minimum is too close to the edge of the parameter range in the $p^{\rm th}$ direction at any iteration $n$, the estimate of the dispersion along that direction may be inaccurate, leading to errors that could propagate into subsequent iterations. To avoid this, in such a situation the algorithm forces the \emph{width} of the parameter range in the $p^{\rm th}$ direction for iteration $n+1$ to be the same as in iteration $n$ for that direction, but centered on the updated estimate of the minimum. Thus, the algorithm can automatically `claw' its way outside ranges that are too narrow, in its search for the true minimum. The condition of being `too close' is parametrized by a variable $\epsilon_{\rm close}$. If the absolute difference between the location of the minimum and either edge of the current parameter range along the $p^{\rm th}$ parameter direction is less than $\epsilon_{\rm close}$ times the width of the current parameter range along that direction, then the minimum is declared `too close' to the edge. Unless specified, we set $\epsilon_{\rm close}=0.1$ in what follows. \subsubsection{Convergence criterion} The iterations are terminated when a pre-decided convergence criterion is met. Below, we use two criteria to define convergence: \begin{enumerate} \item[(a)] The values of the minimum $\chi^2$ between iterations $n-1$ and $n$ change by a relative amount smaller than $\epsilon_{\rm conv}$, i.e., \begin{equation} |\chi^2_{{\rm min},(n-1)}/\chi^2_{{\rm min},(n)} - 1| \leq \epsilon_{\rm conv}\,, \label{eq:ASAconv} \end{equation} where $0<\epsilon_{\rm conv}<1$. We demand that this criterion be met over two successive iterations. \item[(b)] The flow towards the minimum of $\chi^2$ is converging, i.e., the estimated dispersion along each parameter direction must have decreased from iteration $n-1$ to $n$. \end{enumerate} Convergence is declared to be achieved when both these criteria are simultaneously met. \subsubsection{Escaping local minima} In practice, it is possible for the above algorithm to become stuck in a local minimum, with the convergence criterion being properly met but at relatively large $\chi^2$. This is because, as we mentioned earlier, the rate of decrease of the annealing `temperature' in our case is fixed by our choice of how the width of subsequent iterations is made. This can sometimes lead to the temperature decreasing `too quickly' for a given data and model setup. (This is not surprising, since the annealing schedule in the original simulated annealing algorithm is also highly model specific.) To detect such situations, our implementation in section~\ref{sec:picasa} performs a simple goodness-of-fit test using the evaluated minimum $\chi^2_{\rm min}$ and the number of degrees of freedom $d \equiv N_{\Cal{O}} - D$, where $N_{\Cal{O}}$ is the length of the data (or observable) vector \Cal{O}. We demand that the $p$-value assuming that the converged value $\chi^2_{\rm min}$ is $\chi^2$-distributed with $d$ degrees of freedom is larger than a certain threshold. If not, then the algorithm attempts to break out of the local minimum by starting a new iteration centered on the current minimum but with a large parameter range. In practice, we have found that such situations can also occur if the starting range is very broad and the sampling density is too low, in which case the algorithm can potentially get stuck in an erroneous local minimum created by numerical errors. In such situations, it can become difficult for the algorithm to settle onto a track towards the true minimum and, instead, resources are wasted in very unlikely regions of parameter space. It then becomes advisable to quickly detect such pathological situations and restart the algorithm with a narrower starting range and/or higher sampling density. This is included in our implementation below. \subsubsection{Quadratic form estimate} \label{subsub:quadform} Once an acceptable minimum $\mathbf{a}_\ast^{\rm (eval)}$ over the sampled parameter points is located, we fit a positive-definite quadratic form $Q(\mathbf{a})$ in its vicinity: \begin{equation} Q(\mathbf{a}) = \chi^2_\ast + (\mathbf{a} - \mathbf{a}_\ast)^T\,C^{-1}\,(\mathbf{a} - \mathbf{a}_\ast)\,, \label{eq:quadform} \end{equation} where the scalar $\chi^2_\ast$, the $D$-vector $\mathbf{a}_\ast$ and the symmetric $D\times D$ matrix $C$ are obtained using a standard least squares criterion by minimizing $|Q(\mathbf{a}^{(i)}) - \chi^{2}_i|^2$ for a given sample of points $\{\chi^2_i,\mathbf{a}^{(i)}\}$. In practice, we ensure that $C^{-1}$ (which would be the Fisher matrix for strictly linear models) is positive definite by starting with a small number of points to fit for $Q$ and gradually increase the sample size outwards from $\mathbf{a}_\ast^{\rm (eval)}$ until a positive definite $C^{-1}$ is obtained, inverting which gives us $C$. This fitting exercise has the dual advantage of not only refining the estimate for the true minimum (i.e., we use $\mathbf{a}_\ast$ rather than $\mathbf{a}_\ast^{\rm (eval)}$ as our best estimate), but also providing a zeroth order estimate for the errors on the best-fit (assuming broad priors) through the covariance matrix $C$. In section~\ref{subsec:picasa:ASA}, we also discuss how failures in estimating a positive definite $C$ can be handled. \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{images/example_visualdemo_standard_scatter.pdf} \includegraphics[width=0.45\textwidth]{images/example_visualdemo_minimizer_scatter.pdf} \caption{{\bf ASA behaviour.} Distribution of sampled points for the 2-dimensional linear model discussed in section~\ref{subsec:visualdemo} assuming a wide (narrow) starting parameter range in the \emph{left (right) panel}, using $\ensuremath{N_{\rm samp}}=50$. In each panel, the black star and dotted black lines indicate the true parameter values, the blue star and ellipse indicate the analytical best fit and $1\sigma$ confidence region (see equation~\ref{eq:visualdemo-analytical}), and the red star and ellipse (nearly indistinguishable from the analytical values) indicate the ASA best fit and $1\sigma$ confidence region. The sampled points are coloured by the corresponding value of reduced $\chi^2$, which shows how the ASA algorithm progresses towards regions of low $\chi^2$ in each case.} \label{fig:visualdemo_scatter} \end{figure*} \subsection{Visual demonstration} \label{subsec:visualdemo} To demonstrate the basic behaviour of the ASA algorithm, consider some predicted scalar observable $y$ as a function of a $1$-dimensional predictor variable $x$, sampled at $N_{\Cal{O}}$ points $\{x_i\}$, $1\leq i\leq N_{\Cal{O}}$ (the algorithm is insensitive to this choice). The data $\{y_i\}$ are assumed to be normally distributed around the `truth' $y=f(x)$ with independent errors $\{\sigma_i\}$ (i.e., a diagonal covariance matrix with diagonal entries $\sigma_i^2$): \begin{equation} y_i\sim\Cal{N}(f(x_i),\sigma_i^2)\,. \notag \end{equation} The cost function minimized by the ASA algorithm is then taken to be \begin{equation} \chi^2(\mathbf{a}) = \sum_{i=1}^{N_{\Cal{O}}} \frac1{\sigma_i^2}\left(y_i - M(x_i;\mathbf{a})\right)^2\,, \label{eq:example-chi2} \end{equation} where $M(x;\mathbf{a})$ is the model function which depends on the $D$-dimensional parameter vector $\mathbf{a}$. As a warm-up, and to visually display how the ASA algorithm locates the minimum of the cost function, consider the simple case $f(x)=x$ which we fit using the straight line $M(x;\mathbf{a}) = a_0 + a_1\,x$. For this exercise, we sampled the data at $11$ linearly spaced values between $0\leq x \leq 2$, assigning errors $\sigma_i = 0.5$ for each point. The minimization of $\chi^2$ (equation~\ref{eq:example-chi2}) can be performed analytically \citep[e.g.,][]{numerical-recipes} and gives the following best fit $\mathbf{a}$ and covariance matrix $C$ for the particular data realisation $\{y_i\}$ we used: \begin{align} a_0 &= -0.495253\,;\quad a_1 = 1.497192\,, \label{eq:visualdemo-analytical}\\ C_{00} &= 0.079545\,;\quad C_{01} = -0.056818\,;\quad C_{11} = 0.056818\,. \notag \end{align} Notice that, although the data errors were assumed constant and independent (hence isotropic in data space), the resulting parameter covariance is not even diagonal, much less isotropic. The ASA algorithm must therefore explore a genuinely anisotropic parameter landscape. This is generically true for all the examples below. To implement ASA, we must choose the starting range of parameters and the value of \ensuremath{N_{\rm samp}}, which then also decides the starting sampling density. Fig.~\ref{fig:visualdemo_scatter} shows the sampled points when starting with a broad \emph{(left panel)} or narrow \emph{(right panel)} starting parameter range, using $\ensuremath{N_{\rm samp}}=50$. In the first case, where the starting range comfortably enclosed the analytical values $(a_0,a_1)$ from \eqn{eq:visualdemo-analytical}, the algorithm quickly (within 2 zooms) centered itself close to the analytical values and converged to better than $0.1\%$ variation in the minimum value of $\chi^2$ after 8 zoom iterations, i.e., $400$ $\chi^2$ evaluations in total. In the second case, where the analytical values were far outside the starting range, the algorithm took 8 zooms to discover the vicinity of the analytical values and subsequently converged after the 14th zoom level, i.e. $700$ $\chi^2$ evaluations in total. (The visualisation also demonstrates how the algorithm `clawed' its way to the minimum in this case; see section~\ref{subsubsec:edges}) Thus, a broader starting range (analogous to a higher starting `temperature') actually led to fewer overall evaluations for this simple case. The fitted quadratic form in the vicinity of the evaluated minimum $\chi^2$ for the first (second) case returns a best fit and covariance within one part in $10^9 (10^8)$ of the analytical values. This can also be seen from the excellent agreement between the red and blue stars and corresponding $1\sigma$ ellipses in Fig.~\ref{fig:visualdemo_scatter}. We also repeated this exercise with lower values of \ensuremath{N_{\rm samp}}\ for the same starting parameter ranges for each case. For the first case (broad starting range), we find that \ensuremath{N_{\rm samp}}\ as small as 10 still leads to excellent convergence centered on the analytical values with a correspondingly smaller number of function evaluations ($\simeq90$), and a similar recovery of the best fit and covariance matrix. The second case (narrow starting range) shows interesting behavior: while the algorithm itself converges increasingly farther from the analytical values as \ensuremath{N_{\rm samp}}\ is decreased ($\gtrsim2\sigma$ away for $\ensuremath{N_{\rm samp}}=10$), the resulting best fit and covariance matrix estimated from the fitted quadratic form remain within one part in $10^4$ of the analytical values. This demonstrates the interplay of \ensuremath{N_{\rm samp}}\ and the starting parameter width for a simple 2-dimensional linear problem, and already suggests that, to ensure good sampling around the true minimum of $\chi^2$ in a generic situation, it is always useful to perform a few sparse iterations post-convergence, centered on the best-fit returned by the quadratic form fitting. Below we will see how this behaviour is affected by an increase in the dimensionality and/or non-linearity of the problem. \subsection{Interpolating the cost function} \label{subsec:interpolate} Once the ASA algorithm converges, possibly along with additional iterations to improve the uniformity of sampling around the estimated minimum, we can use the resulting sample of points $\{\chi^2_i,\mathbf{a}^{(i)}\}$ to set up a $D$-dimensional interpolating function $\hat\chi^2(\mathbf{a})$. An accurate enough and computationally inexpensive enough $\hat\chi^2(\mathbf{a})$ can then be fed into a standard MCMC routine to explore parameter space. Several choices of interpolating functions are in principle possible. We impose the requirements that the error in $\hat\chi^2(\mathbf{a})$ should be under control, and also that the choice of interpolation should be applicable to a wide variety of likelihood shapes (e.g., not necessarily close to Gaussian-shaped). We have found that a Gaussian Process Regression (GPR) defined with one of two kernels as discussed below works adequately, provided we employ an iterative training procedure. We give the details of our GPR usage below. For an introduction to Gaussian Processes, we refer the reader to the excellent exposition in \citet[][hereafter, RW05]{rw05}. Any GPR is defined by the choice of its kernel, which defines the variance of the Gaussian probability density in function space which characterises the GPR. While the specific choice of kernel can be model-dependent, our focus on interpolating $\chi^2(\mathbf{a})$ rather than the prediction for the model itself suggests that a relatively small number of choices might suffice. In practice, we have found that either an anisotropic $D$-dimensional Gaussian kernel, or the so-called isotropic `rational quadratic' kernel, work adequately for a range of problems. Indeed, this is a distinct advantage of our method over the usual `emulator' approach which typically approximates the observable rather than the likelihood, and correspondingly requires highly specialised choices of kernel to accurately capture the full response to changes in parameter values. Each GPR kernel is specified by a `hyper-parameter' vector $\mathbf{h}$: e.g., an anisotropic Gaussian kernel describing $\hat\chi^2(\mathbf{a})$ for a $D$-dimensional parameter space $\mathbf{a}$ requires a $D+1$-dimensional $\mathbf{h}$ to be specified (the dispersions in each parameter direction, along with an overall amplitude), while the isotropic rational quadratic kernel requires 3 parameters, namely, an amplitude, a dispersion scale and a shape parameter \citepalias[see chapter 4 of][]{rw05}. The values of the components of $\mathbf{h}$ are model-specific and need to be fixed by an appropriate comparison (or `training') with the provided sample $\{\chi^2_i,\mathbf{a}^{(i)}\}$. We use Algorithm 2.1 of \citetalias{rw05} as implemented in Scikit-Learn, which maximises a (hyper-)likelihood function for a given training set, to set up an iterative training procedure as follows. \begin{itemize} \item We start with a small fraction of the available sample as the training set to estimate $\mathbf{h}$, using the ASA algorithm to explore hyper-parameter space. \item We cross-validate this choice of $\mathbf{h}$ using the remaining samples and compute the $1$ and $99$ percentiles of the relative difference $\hat\chi^2(\mathbf{a})/\chi^2(\mathbf{a})-1$. \item If the magnitudes of these percentiles are smaller than a pre-defined threshold $\epsilon_{\rm cv}$, then we declare the GPR as trained with the hyper-parameter $\mathbf{h}$. If not, we increase the size of the training set by a small amount ($20\%$, below) and repeat. \end{itemize} If the GPR cannot be trained with more than, say, $80\%$ of the sample, then the interpolation may not be accurate. This typically corresponds to situations where the $\chi^2$ sampling near sharp features is not fine enough, or when the overall sampling density is too low. In this case, one could either weaken the requirements for converged training (e.g., by increasing $\epsilon_{\rm cv}$ or/and thresholding on the 16, 84 percentiles rather than the extremes), or use a different kernel, or, failing all else, increase the sample size around the estimated minimum of $\chi^2$ and repeat. Our implementation in section~\ref{sec:picasa} checks for such failures and warns the user accordingly. In this regard, our technique is less robust than standard MCMC implementations which are mathematically guaranteed to sample the posterior distribution correctly. The gains we will see in section~\ref{sec:examples}, however, suggest that this decrease of robustness may be well worth the price for expensive likelihoods. We emphasize that the GPR training and its subsequent use in MCMC exploration is relatively inexpensive once a well-defined ASA sample is available (we provide some usage statistics later). \section{\textsc{picasa} framework} \label{sec:picasa} We have implemented the ASA algorithm along with GPR training and subsequent sampling using standard MCMC, in the Python code \textsc{picasa} ({\bf P}arameter {\bf I}nference using {\bf C}obaya with {\bf A}nisotropic {\bf S}imulated {\bf A}nnealing). We use the publicly available \textsc{cobaya} framework \citep{tl19-cobaya,tl21-cobaya} to interface the ASA algorithm with MCMC sampling. We describe the main functionality of \textsc{picasa} in this section and discuss a few examples in section~\ref{sec:examples}. \subsection{ASA implementation} \label{subsec:picasa:ASA} The ASA algorithm is implemented by a collection of methods in the Python class \texttt{ASAUtilities} which, by default, are called by the black-box methods defined in the class \texttt{PICASA}, but can also be directly accessed by the user. The user provides a dictionary (or `data pack') containing the function objects and data arrays required to calculate the cost function $\chi^2(\mathbf{a})$ for any specified parameter vector $\mathbf{a}$. In other words, both the model as well as shape of the likelihood are entirely user-defined, making our implementation generic. The data pack also requires the specification of \ensuremath{N_{\rm samp}}\ (key \texttt{Nsamp}) and the starting range of parameter values (keys \texttt{param\_mins} and \texttt{param\_maxs}), along with a writable output file location (key \texttt{chi2\_file}). Keeping in mind the discussion in section~\ref{sec:method}, the default implementation performs two basic passes over parameter space to locate the minimum $\chi^2$, followed by a nested sequence of independent `last iterations' that sample $\chi^2$ around its minimum. In detail, these steps proceed as follows: \begin{enumerate} \item In the first pass, the ASA algorithm starts with the user-specified parameter ranges and value of \ensuremath{N_{\rm samp}}\ to crudely estimate the minimum of $\chi^2(\mathbf{a})$. This is done by setting $\epsilon_{\rm conv}=0.1$ (a relatively large value), allowing for quick convergence to a possibly inaccurate minimum. \item Given this `coarse' sampling, the algorithm sets up a higher resolution second pass as follows. First, it attempts to perform the quadratic fit discussed in section~\ref{subsub:quadform}. If successful, the parameters are rotated into the eigenspace of the covariance matrix $C$ and the parameter ranges for the second pass are set to be $1\sigma$ wide in each eigen-direction around the estimated minimum. If a positive definite quadratic form cannot be obtained, the parameters are not rotated and the ranges for the second pass are set to be $10\%$ of the user-specified width, centered in this case on the currently evaluated minimum. We refer to this setup as the `minimizer mode' of the ASA algorithm. \item The second pass of the ASA algorithm proceeds in this minimizer mode with the same \ensuremath{N_{\rm samp}}, but with a more demanding convergence criterion $\epsilon_{\rm conv}$. By default this is set to be $\epsilon_{\rm conv}=0.001$ (i.e., only $<0.1\%$ variations in minimum $\chi^2$ are tolerated), but can also be specified by the user. In this mode, the algorithm uses high-density samples in small parameter volumes (`clawing' its way, if needed, towards the minimum; see section~\ref{subsubsec:edges}) to find a well-converged answer. \item If the minimizer mode is successful, a new estimate of the quadratic form is obtained using, by default, the full set of samples now available.\footnote{If a positive definite quadratic form cannot be obtained after the minimizer mode, the algorithm attempts to adjust by restarting the optimization procedure around the current minimum, using half the current starting range. The maximum number of such restarts is controlled by the data pack key \texttt{max\_opt\_iter} (default value $10$).} This is already expected to give a high-precision estimate of the true minimum. To facilitate further parameter exploration, the algorithm now proceeds to set up the `last iterations' sampling the vicinity of the true minimum. This is done by performing a series of single ASA iterations, each using fixed hyper-rectangles in parameter eigenspace having widths ranging from $0.25\sigma$ to $\delta_\sigma\sigma$ in steps of $0.25\sigma$ along each eigen-direction. Here, the dispersion along each eigen-direction is determined by the eigenvalues of the covariance matrix $C$, and $\delta_\sigma$ (set by the data pack key \texttt{dsig}) is a user-defined constant. We have found that $\delta_\sigma\simeq5$-$6$ is sufficient for linear or nearly linear problems, while sufficiently non-linear problems may need $\delta_\sigma\gtrsim10$ (since the Gaussianised estimate of parameter error might not capture the true width of the non-Gaussian posterior). Working in eigenspace is very useful in ensuring efficient sampling when two or more parameters have strong degeneracies. The number of samples evaluated in each of these last iterations is controlled by a variable $f_{\rm last}$ (set by the data pack key \texttt{last\_frac}, with a default value $f_{\rm last}=0.05$), which specifies the fraction of the total sample size at the end of the minimizer mode that should be used to sample each iteration. Along with the value of $\delta_\sigma$, $f_{\rm last}$ can be adjusted by the user to ensure that the total number of samples is dominated by those in the last iterations, which helps the GPR training below to be performed efficiently. \item Steps (i) and (iii) above are further constrained by demanding that the total number of iterations in each not exceed 50 and 100, respectively. This ensures that, in cases where the algorithm gets pathologically stuck in local (numerically generated) minima, precious computational resources are not wasted in unlikely parameter regions. If either of these maximum iterations are exceeded, the code exits with a recommendation to the user to either decrease the width of the initial sampling range, or increase \ensuremath{N_{\rm samp}}, or both. \item The user can optionally set the data pack key \texttt{parallel} to True, which invokes parallelization of the \ensuremath{N_{\rm samp}}\ evaluations in any single iteration using the \texttt{multiprocessing} package. For optimal efficiency, the attribute \texttt{PICASA.NPROC} may be set to a multiple of $N_{\rm samp}$. \item Finally, the code discards any samples where the value of $\chi^2$ is not finite. This can be utilised by the user to impose sharp priors, by simply requiring the model function to evaluate to infinity (\texttt{numpy.inf}) in undesirable or unphysical regions of parameter space. \end{enumerate} The end result of this exercise is a complete sample of finite $\chi^2$ values and parameter vectors, along with a final, more accurate estimate of the quadratic form close to the minimum, which can be fed into the GPR training procedure described in the next subsection. In cases where the problem is known to be nearly linear in the parameters, or where the location of the minimum is more important than its error, the ASA output at this stage may already provide all the required information. For this reason, the above steps are collected together in a single black-box method \texttt{PICASA.optimize}. \subsection{GPR training} \label{subsec:picasa:GPR} We use the output of the ASA implementation above to train a GPR for interpolating $\chi^2(\mathbf{a})$ using the technique outlined in section~\ref{subsec:interpolate}. This is implemented by the method \texttt{PICASA.gpr\_train\_and\_run}. The choice of GPR kernel is specified by the data pack key \texttt{kernel} which can take values `rbf' (this is the default) for the anisotropic Gaussian kernel or `rq' for the isotropic rational quadratic kernel. The starting training set size is set to the minimum of 1000 and $5\%$ of the full sample, with a lower cap at 100. The training set is chosen by uniformly downsampling the full sample. The method invokes the ASA algorithm to optimize the GPR hyper-parameter vector $\mathbf{h}$, setting $\epsilon_{\rm conv}=0.005$ and $\epsilon_{\rm close}=0.2$. The starting training iteration employs ASA with $\ensuremath{N_{\rm samp}}=50$ and a logarithmic hyper-parameter range centered on zero for each component of $\ln(\mathbf{h})$ with a width of $\pm\ln(2)$. While the cross-validation threshold $\epsilon_{\rm cv}$ (data pack key \texttt{cv\_thresh}) is exceeded, further training iterations are performed, using training sets successively larger by factors of $1.2$, $\ensuremath{N_{\rm samp}}$ successively larger by factors of $1.15$ and ASA starting ranges successively centered on the current best estimate of $\ln(\mathbf{h})$ with widths successively larger by factors of $1.25$. Thus, the training iterations use gradually increasing training sets and explore gradually increasing regions of hyper-parameter space with gradually increasing \ensuremath{N_{\rm samp}}. If the GPR training and cross-validation has not converged for a training set size larger than $80\%$ of the sample size, or if a maximum number of training iterations (by default 25) has been exceeded, the method exits with the last available hyper-parameter values and training size. In such cases, it is recommended to either alter the training thresholds and/or change the GPR kernel and/or increase the size of the original $\chi^2$ sample (say by performing additional last iterations, see also section~\ref{subsec:interpolate}). This introduces an element of problem-specific user intervention in the GPR training, which we comment on in section~\ref{sec:conclude}. The user must supply a writable directory location (data pack key \texttt{chain\_dir}) which is used (among other things) to store the output of the training iterations, namely, the training size, values of hyper-parameter components and cross-validation percentiles. The final such outputs are used below for performing an MCMC run by feeding a trained GPR to the \textsc{cobaya} framework. \subsection{MCMC exploration} \label{subsec:picasa:mcmc} We use the publicly available \textsc{cobaya} framework to perform MCMC sampling using a trained GPR to evaluate $\chi^2(\mathbf{a})$. We use the \texttt{Likelihood} class of \textsc{cobaya} to define the class \texttt{ASALike}, in which the method \texttt{ASALike.logp} calculates $-0.5\chi^2$ using the provided trained GPR. This setup is accessible to the \texttt{mcmc} sampler \citep{lewis13} available in \textsc{cobaya}, which we use for our MCMC exploration. The functionality for running \textsc{cobaya}'s \texttt{mcmc} sampler using the trained GPR is collected in the method \texttt{PICASA.run\_trained\_gpr}. This performs and stores the MCMC chains at the same writable location specified by the data pack key \texttt{chain\_dir} that was used by the GPR training above. We refer the reader to the \textsc{cobaya} documentation page for implementation details of the \texttt{mcmc} sampler and other usage. We optimize the MCMC run by utilising the information collected during the ASA implementation, as follows. \begin{itemize} \item \emph{Priors} are chosen to be uniform in ranges $\pm\delta_\sigma\,\sigma$ along each parameter direction, centered on the best-fit parameter vector $\mathbf{a}_\ast$ obtained from quadratic form fitting on the full sample, where $\delta_\sigma$ is the same variable specified by the data pack key \texttt{dsig} (see section~\ref{subsec:picasa:ASA}). Note that the ASA optimization used $\delta_\sigma$ in eigenspace, in contrast to the parameter space priors here. \item The \emph{reference point} (starting location of each chain) is set equal to $\mathbf{a}_\ast$. \item The \emph{proposal covariance matrix} is initialised to be a small factor (default 0.1, set by the data pack key \texttt{prop\_fac}) times the best-fit covariance matrix $C$ from the quadratic form estimate. \end{itemize} The \texttt{mcmc} sampler is run in its standard mode where it learns the proposal covariance matrix dynamically. The user can adjust the MCMC stopping criterion (data pack key \texttt{Rminus1\_stop}, default value 0.005). We emphasize that, since the MCMC sampling uses the trained GPR to estimate $\chi^2(\mathbf{a})$, rather than performing expensive actual calculations of $\chi^2(\mathbf{a})$, a demanding value of \texttt{Rminus1\_stop} such as 0.005 is not computationally challenging. Rather, it is the ASA parameter $\epsilon_{\rm conv}$ (accessible through the optional data pack key \texttt{eps\_conv} which specifies the value of $100\,\epsilon_{\rm conv}$) that behaves analogously in \textsc{picasa} to \texttt{Rminus1\_stop} in a standard MCMC run. \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{images/example_poly_deg3_data.pdf} \includegraphics[width=0.45\textwidth]{images/example_poly_deg5_data.pdf} \caption{{\bf PICASA versus MCMC: Linear models.} Recovery of a polynomial of degree $P=3$ ($P=5$) in the \emph{left (right) panel} using \textsc{picasa} (solid red curve with error band) and a standard MCMC implemented using \textsc{cobaya} (dashed purple curve). In each panel, green points with errors show the data realisation, dotted black curve shows the true model and dashed blue curve shows the analytical best fitting polynomial of degree $P$ (i.e., the equivalent of equation~\ref{eq:visualdemo-analytical} for the respective polynomial). See also Figs.~\ref{fig:poly_deg3_result} and~\ref{fig:poly_deg5_result}.} \label{fig:poly_data} \end{figure*} For the user's convenience, we have collected together all aspects of this parameter inference framework in the single black box method \texttt{PICASA.mcmc}. This calls \texttt{PICASA.optimize} (if needed, repeatedly) to obtain accurate estimates of $\mathbf{a}_\ast$ and $C$, then calls the GPR training and MCMC running routines described above to produce and store a full MCMC sample. We have also provided some convenience flags using the data pack keys \texttt{no\_cost}, \texttt{read\_file\_mcmc} and \texttt{no\_train} that function as follows. \begin{itemize} \item If \texttt{no\_cost} is True, the user must provide a single callable function that calculates $\chi^2$, rather than separate data and error arrays along with model and cost function callables. This allows for easier integration with pre-existing codes set up for MCMC sampling. \item If \texttt{read\_file\_mcmc} is set to a valid file path containing $\{\chi^2_i,\mathbf{a}_i\}$ samples, then the ASA optimization step is skipped by \texttt{PICASA.mcmc} and the code directly proceeds to GPR training after reading the specified file. This is useful if the outputs of several, separate last iterations have been manually collected by the user. \item Finally, if \texttt{no\_train} is True, then \texttt{PICASA.mcmc} assumes that a trained GPR has been specified at the default locations determined by the key \texttt{chain\_dir}, hence skips the GPR training and directly proceeds to the MCMC run. Combined with setting \texttt{read\_file\_mcmc}, this is particularly useful for restarting stuck chains, changing the stopping criterion, etc. \end{itemize} We refer the reader to the \textsc{picasa} repository page listed under data availability below for further usage details. \section{Examples} \label{sec:examples} We now turn to a more detailed comparison of the performance of the ASA algorithm and its integration with MCMC sampling using \textsc{picasa}, as compared to standard MCMC sampling. For simplicity, we use the same data structure discussed in section~\ref{subsec:visualdemo} (see the text around equation~\ref{eq:example-chi2}). Throughout, whenever discussing standard MCMC results, we discard only $1000$ accepted steps as burn-in. While this appears overly generous when comparing the total number of likelihood calls with \textsc{picasa}, it is offset by the fact that we will use a rather stringent convergence criterion for MCMC chains in all our comparisons. \textsc{picasa} does not suffer from burn-in, so that the total number of $\chi^2$ evaluations is relatively easy to track. Throughout, to define the standard MCMC, we will use the \texttt{mcmc} sampler \citep{lewis13} in the \textsc{cobaya} framework \citep{tl19-cobaya,tl21-cobaya}. We leave a comparison with other popular MCMC frameworks such as \textsc{emcee} \citep{f-mhlg13} or \textsc{zeus} \citep{kb20} to future work, although we expect similar results to hold. \subsection{Linear models} \label{subsec:linear} We first consider polynomial forms for the `truth' $f(x)$ as prototypical of generic linear models: for a degree $P$ polynomial, we have \begin{equation} f(x) = \sum_{p=0}^P\,\bar a_p\,x^p\,, \label{eq:poly-def} \end{equation} with $\bar{\mathbf{a}}=\{\bar a_p\}_{p=0}^P$ being the true values of the $P+1$ model parameters. We show results for the cases $P=3$ and $P=5$, leading to $4$- and $6$-dimensional parameter spaces, respectively. We use the following forms for the truth $f(x)$: \begin{align} P=3: &\quad f(x) = 2 - 3x/2 - x^2 + x^3/2 \label{eq:P3f(x)} \\ P=5: &\quad f(x) = 2 - 3x/2 + x^2/5 - x^3/5 + x^4 - x^5/2 \label{eq:P5f(x)} \end{align} We fit these using polynomial models of the respective degree $P$, i.e., we assume that the polynomial degree is known.\footnote{This is not a particularly restrictive assumption because, e.g., not knowing $P$ and fitting with a polynomial of degree $Q>P$ is equivalent to fitting a model with known degree $Q$ but having $\bar a_{P+1},\ldots, \bar a_{Q} = 0$.} In each case, we sample the data on 40 linearly spaced points in the range $-0.5 \leq x \leq 2$, with constant errors $\sigma_i=0.2$. The data realisation for $P=3$ ($P=5$) is shown in the \emph{left (right) panel} of Fig.~\ref{fig:poly_data}. \begin{figure*} \centering \includegraphics[width=0.8\textwidth]{images/example_poly_deg3_result.pdf} \caption{{\bf Parameter constraints: cubic polynomial.} Corner plot showing pair-wise 1$\sigma$, 2$\sigma$ and 3$\sigma$ confidence contours for the parameters defining the cubic ($P=3$) polynomial in section~\ref{subsec:linear} (see equation~\ref{eq:P3f(x)}). Red filled (purple empty) contours show the results of \textsc{picasa} (standard MCMC). The correspondingly coloured vertical and horizontal lines indicate the respective best-fit values. The blue dashed vertical and horizontal lines indicate the analytical best-fit values. For comparison, the dotted black lines indicate the true parameter values from \eqn{eq:P3f(x)}. The labels indicate the total number of cost function evaluations in the respective runs. (For the MCMC, this is a slight underestimate, since we ignored the samples rejected during the burn-in phase, while the value for \textsc{picasa} is exact.) We see that the \textsc{picasa} result is essentially identical to that of the standard MCMC, despite using more than 100 times fewer evaluations, and also correctly accounts for the relatively strong degeneracy between $a_2$ and $a_3$.} \label{fig:poly_deg3_result} \end{figure*} We use the full \textsc{picasa} framework with starting ranges as discussed below and the default set of last iterations out to $5\sigma$ in each parameter eigen-direction in each case (see section~\ref{sec:picasa} for details). The subsequent MCMC using a trained GPR (defined using the default anisotropic Gaussian kernel) is then compared with a standard MCMC implemented using \textsc{cobaya} with the \texttt{mcmc} sampler \citep{lewis13}. The latter is performed using uniform priors in the range $-5\leq a_p\leq 5$ and arbitrarily chosen reference points for each parameter, while the MCMC in \textsc{picasa} is initialised using the ASA output as described in section~\ref{subsec:picasa:mcmc}. Both sets of MCMC chains are run until the modified Gelman-Rubin index $R-1$ used by the \texttt{mcmc} sampler falls below $0.002$. \subsubsection{Cubic polynomial} For the case $P=3$, we set $\ensuremath{N_{\rm samp}}=30$ with starting ranges $-5\leq a_p\leq 5$ for each parameter for the ASA, and set a relatively low sampling for the last iterations using $f_{\rm last}=0.025$. The ASA optimization for the displayed example successfully completed using $850$ samples in total (i.e., including all last iterations). The iterative GPR training converged (with the 1,99 cross-validation percentiles being smaller than $0.01$) using $144$ of the $850$ samples. The resulting best fit and $68\%$ confidence interval in data space is shown by the solid red curve and error band in the \emph{left panel} of Fig.~\ref{fig:poly_data}. The corresponding $1\sigma$ and $2\sigma$ confidence regions in parameter space after MCMC sampling are displayed by the red contours in Fig.~\ref{fig:poly_deg3_result}. \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{images/example_poly_deg5_result.pdf} \caption{{\bf Parameter constraints: quintic polynomial.} Same as Fig.~\ref{fig:poly_deg3_result}, showing results for the quintic polynomial ($P=5$) from \eqn{eq:P5f(x)}. We again see excellent agreement between \textsc{picasa} and the standard MCMC even at the 3$\sigma$ level despite strong parameter degeneracies, with \textsc{picasa} outperforming the standard MCMC by a factor $\sim35$. See text for a discussion of typical gains averaged over many runs.} \label{fig:poly_deg5_result} \end{figure*} These results can be compared with the output of the standard MCMC, shown by the dashed purple curve in the \emph{left panel} of Fig.~\ref{fig:poly_data} and the purple contours in Fig.~\ref{fig:poly_deg3_result}. The analytical best fit is shown by the dot-dashed blue curve in the \emph{left panel} of Fig.~\ref{fig:poly_data}. We see excellent agreement between the \textsc{picasa}, standard MCMC and analytical results. The agreement between \textsc{picasa} and standard MCMC extends to the pairwise 3$\sigma$ contours, which is important for applications requiring the calculation of the Bayesian evidence. The key point to emphasize, though, is that the total number of likelihood evaluations $N_{\rm eval}$ in the standard MCMC exceeded $92000$, while \textsc{picasa} achieved its results with $850$ evaluations, a gain of a factor $\simeq108$. For a fair comparison, it is also important to consider that the total number of likelihood evaluations in both \textsc{picasa} and the standard MCMC can fluctuate from run to run. By repeating the standard MCMC sampling multiple times, we determined that the median and central $68\%$ region of the distribution of $N_{\rm eval}$ with the standard MCMC is $(58.9^{+20.0}_{-19.7})\times10^3$ for this data realisation of the $P=3$ model. A similar exercise for \textsc{picasa} with exactly the same setup as above but changing the random number seed for ASA sampling and subsequent steps gave $N_{\rm eval}=1365^{+796}_{-515}$, with $\sim 18\%$ of runs having optimization convergence failures leading to discarding $\ensuremath{N_{\rm samp}}\times50=1500$ samples each (see section~\ref{subsec:picasa:ASA}). Thus, we see that gains of factors exceeding $50$ are typical when comparing \textsc{picasa} with standard MCMC, although \textsc{picasa} is less robust to the choice of starting parameter range. Indeed, simply decreasing the initial parameter range to $-2.5\leq a_p\leq 2.5$ for \textsc{picasa} led to $N_{\rm eval}=1080^{+721}_{-360}$ with a failure rate of only $3\%$. \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{images/example_nonlin_type1_data.pdf} \includegraphics[width=0.45\textwidth]{images/example_nonlin_type2_data.pdf} \caption{{\bf PICASA versus MCMC: Non-linear models.} Same as Fig.~\ref{fig:poly_data}, showing the recovery of the non-linear models given by \eqn{eq:nonlin-truth-1} \emph{(left panel)} and~\eqn{eq:nonlin-truth-2} \emph{(right panel)}. See also Fig.~\ref{fig:nonlin_result}.} \label{fig:nonlin_data} \end{figure*} \subsubsection{Quintic polynomial} We repeated a similar exercise for the $P=5$ case from \eqn{eq:P5f(x)}. For the example run displayed in the \emph{right panel} of Fig.~\ref{fig:poly_data}, we used $\ensuremath{N_{\rm samp}}=100$ with a starting range $-3\leq a_p\leq 3$ and a relatively high sampling for the last iterations using $f_{\rm last}=0.1$, leading to a total sample size of $N_{\rm eval}=5400$, with GPR training convergence achieved using $388$ samples. Fig.~\ref{fig:poly_deg5_result} is formatted identically to Fig.~\ref{fig:poly_deg3_result} and shows the resulting comparison with the standard MCMC with uniform priors in the range $-5\leq a_p\leq 5$. Again, we see a comparable level of recovery of the analytical best fit using both \textsc{picasa} and standard MCMC, as well as very good agreement between \textsc{picasa} and MCMC even at 3$\sigma$, with the MCMC requiring $N_{\rm eval}\sim191000$, a gain by a factor of $\sim35$ when using \textsc{picasa}. In statistical terms, in this case, a standard MCMC led to $N_{\rm eval} \simeq (129.1^{+43.1}_{-38.4})\times10^3$. For \textsc{picasa}, using a starting range of $-5\leq a_p\leq 5$ with \ensuremath{N_{\rm samp}}\ as high as $300$ led to ASA optimization failure rates exceeding $50\%$, with $\ensuremath{N_{\rm samp}}=500$ giving a lower failure rate of $27\%$ but a median $N_{\rm eval}\simeq41000$, suggesting that it is imperative to use a smaller starting range in this case. Using $-3\leq a_p\leq 3$ with $\ensuremath{N_{\rm samp}}=100$ (the same as displayed in Fig.~\ref{fig:poly_deg5_result}) gave a failure rate of $40\%$ with $N_{\rm eval}\simeq(9.2^{+5.3}_{-2.3})\times10^3$, while $-2\leq a_p\leq 2$ with $\ensuremath{N_{\rm samp}}=100$ gave a failure rate of $24\%$ with $N_{\rm eval}\simeq(9.5^{+4.1}_{-3.2})\times10^3$. We see that, despite high rates of optimization failure in this case, $\ensuremath{N_{\rm samp}}\lesssim100$ gives a median $N_{\rm eval}$ of $\lesssim10^4$ when the run succeeds, compared to $\gtrsim10^5$ for the standard MCMC. We also emphasize that all successful optimization runs invariably led to quadratic forms that recovered the analytical best fit with very high precision (less than $0.01\%$ deviation in all cases). Thus, we see that with increasing dimensionality, broad starting ranges lead to high rates of optimization failure in \textsc{picasa}, which fall as the starting range decreases in width, and \textsc{picasa} very effectively recovers the minimum of $\chi^2$ whenever the run succeeds. In practice, for example, starting with $-5\leq a_p\leq 5$ and $\ensuremath{N_{\rm samp}}=30$ in our $P=5$ example above would almost certainly lead to a failed optimization, with $\simeq1500$ samples wasted. However, if the user then restarts \textsc{picasa} with a smaller starting range and a larger \ensuremath{N_{\rm samp}}, convergence will typically be achieved within a few thousand evaluations, so that the overall gain compared to standard MCMC (even accounting for the wasted samples), would still be factors of $\sim10$-$50$. \subsection{Non-linear models} \label{subsec:nonlinear} We next move on to models that are non-linear in the parameters $\mathbf{a}$, considering the following two examples for the `truth': \begin{align} f_1(x) &= |x|^{3/2}\,\sin^2(x)\,, \label{eq:nonlin-truth-1}\\ f_2(x) &= |x - 1/2|\,\cos(\sqrt{|x|/2})\,, \label{eq:nonlin-truth-2} \end{align} which we sample in the range $-2\leq x\leq 4$. For the errors, we assume a constant value $\sigma(x)=0.4$ for $f_1(x)$ and $\sigma(x) = (1/2)\left[\tanh(|x|+1)/\tanh(1)\right]^3$ for $f_2(x)$. The resulting data realisations for $f_1$ and $f_2$ are respectively shown in the \emph{left} and \emph{right panel} of Fig.~\ref{fig:nonlin_data}. We respectively fit these two data sets using the 3-dimensional models \begin{align} M_1(x;\mathbf{a}) &= a_0\,|x|^{a_1}\,\sin^2(x+a_2)\,, \label{eq:nonlin-model-1}\\ M_2(x;\mathbf{a}) &= a_0\,|x - a_1|\,\cos(\sqrt{a_2 |x|})\,. \label{eq:nonlin-model-2} \end{align} In \eqn{eq:nonlin-model-2}, we have chosen to place the parameter $a_2$ under the square-root, along with a prior $a_2\geq0$, to avoid a perfectly degenerate maximum of the likelihood. Similarly, in \eqn{eq:nonlin-model-1}, we impose a prior $-\pi\leq a_2\leq \pi$ by ensuring that the model returns infinity outside this range (such values are discarded by the ASA sampling, see section~\ref{subsec:picasa:ASA}). The current implementation of ASA would otherwise always sample only one of the multiple, perfectly degenerate minima of $\chi^2$. We leave a more careful treatment of (nearly) degenerate minima of the cost function to future work. \begin{figure*} \centering \includegraphics[width=0.48\textwidth]{images/example_nonlin_type1_result.pdf} \includegraphics[width=0.48\textwidth]{images/example_nonlin_type2_result.pdf} \caption{Same as Figs.~\ref{fig:poly_deg3_result} and~\ref{fig:poly_deg5_result}, showing results for the non-linear models given by \eqn{eq:nonlin-truth-1} \emph{(left panel)} and~\eqn{eq:nonlin-truth-2} \emph{(right panel)}. We see excellent agreement between \textsc{picasa} and the standard MCMC, despite the high level of non-Gaussianity and parameter degeneracy, with \textsc{picasa} requiring $\sim35$-$65$ times fewer cost function evaluations. See text for a detailed discussion.} \label{fig:nonlin_result} \end{figure*} The \emph{left} and \emph{right panels} of Fig.~\ref{fig:nonlin_result} are formatted identically to Fig.~\ref{fig:poly_deg3_result} and respectively show the MCMC results for recovering $f_1$ and $f_2$. In both cases, the \textsc{picasa} runs used starting ranges of $-1\leq a_p \leq 3$ for all parameters, with the same ranges also being used to set uniform priors for the standard MCMC runs. The MCMC convergence criterion was set to $R-1<0.002$ ($0.001$) for $f_1$ ($f_2$). While the \textsc{picasa} run for recovering $f_1$ succeeded with $\delta_\sigma=5$ and $f_{\rm last}=0.05$ (i.e., the default values), the recovery of $f_2$ used $\delta_\sigma=18$ and $f_{\rm last}=0.1$, and we found that $\delta_\sigma\lesssim10$ for this case led to highly truncated results and unstable GPR training. This is easy to understand in retrospect from studying the shapes of the 2$\sigma$ and 3$\sigma$ contours in the \emph{right panel} of Fig.~\ref{fig:nonlin_result}, which shows a highly non-Gaussian posterior. We emphasize that this choice of last iterations can be made \emph{after} the basic ASA optimization is complete, so it does not waste any evaluations. We also see that the 3$\sigma$ contours (particularly in the $a_1$-$a_2$ plane) are now noisier than in the other examples, which explains our choice of a more stringent MCMC convergence criterion. For the specific runs shown, \textsc{picasa} with $\ensuremath{N_{\rm samp}}=30$ ($100$) led to recovery using $N_{\rm eval}= 880$ ($5884$) evaluations, a gain of a factor of $\sim65$ ($\sim35$) over the standard MCMC in recovering $f_1$ ($f_2$). For the GPR training for $f_1$ ($f_2$), we set the \texttt{robust\_convergence} key to False (True), the \texttt{cv\_thresh} key to $0.005\, (0.05)$ and the \texttt{kernel} key to `rbf' (`rq') (see section~\ref{subsec:picasa:GPR} for details). The GPR training then succeeded with $296$ ($2602$) samples. We also performed a statistical analysis of $N_{\rm eval}$ for each of the models, comparing the standard MCMC with \textsc{picasa}. For $f_1$, the median and central $68\%$ range of the distribution of $N_{\rm eval}$ for the standard MCMC, demanding $R-1<0.002$, was $N_{\rm eval}\simeq(32.2^{+11.5}_{-8.5})\times10^3$, while for \textsc{picasa} with the default $\delta_\sigma$ and $f_{\rm last}$ and $\ensuremath{N_{\rm samp}}=30$, it was $N_{\rm eval}\simeq770^{+206}_{-120}$, with an optimization failure rate of $1\%$. Thus, \textsc{picasa} leads to typical gains of factors of $\sim40$ as compared to the standard MCMC in this case. For $f_2$, the standard MCMC demanding $R-1<0.001$ used $N_{\rm eval}\simeq(104.4^{+66.6}_{-27.2})\times10^3$. With the $\delta_\sigma$ and $f_{\rm last}$ choices mentioned earlier, \textsc{picasa} with $\ensuremath{N_{\rm samp}}=30$ led to $N_{\rm eval}\simeq 2460^{+984}_{-236}$ with an optimization failure rate of $5\%$, while increasing \ensuremath{N_{\rm samp}}\ to $100$ (the displayed example) gave $N_{\rm eval}\simeq 6272^{+850}_{-645}$ and decreased the failure rate to $1\%$. Thus, in this case, gains of factors of $15$-$40$ are typical. \subsection{Relative performance of ASA and GPR training} Although \textsc{picasa} clearly outperforms a standard MCMC in terms of total number of cost function evaluations, in order for it to be a practical alternative to the latter, the computational expense of the GPR training step must also be understood. The main bottleneck in GPR training is the inversion of a $N_{\rm train}\times N_{\rm train}$ matrix, where $N_{\rm train}$ is size of the training set. Our iterative training procedure slowly increases $N_{\rm train}$ until convergence is achieved, making the total computational cost of GPR training highly problem-specific. In general, the GPR for likelihoods with features will of course be harder to train than for smooth likelihoods. The examples discussed above give us some idea of possible variations. We saw that the GPR for all but the non-linear $f_2$ model was successfully trained with a few hundred training samples, while $f_2$ used $\sim2600$ samples. In terms of total wall time used by the iterative GPR training and subsequent MCMC, using $6$ processors on a laptop, all the examples except $f_2$ completed in $\lesssim3$ minutes (in some cases, less than a minute), while $f_2$ required $\sim27$ minutes. For these simple examples, the ASA optimization step was dramatically faster in terms of wall time, simply because the cost functions we used could be calculated extremely fast. In fact, in almost all the above cases, the standard MCMC outperformed \textsc{picasa} in terms of wall time (especially for the non-linear $f_2$ example). The true utility of \textsc{picasa} is expected to emerge in problems where each cost function evaluation takes, say, tens of seconds or more on a single processor.\footnote{E.g., if the cost function of $f_2$ were to take 20 seconds for each evaluation and we used 16 processors, the standard MCMC shown in Fig.~\ref{fig:nonlin_result} would take $\sim75$ hours to complete $\sim217000$ evaluations. The ASA optimization in \textsc{picasa} with $\ensuremath{N_{\rm samp}}=96$ (a multiple of 16) would use $N_{\rm eval}\sim5900$, taking $\sim2$ hours. Adding the $\sim0.5$ hours for GPR training, this still gives a factor $\sim30$ improvement in wall time. Upon increasing the computational expense of the cost function, eventually the GPR training ceases to be a significant fraction of the cost, and the relative wall time gain for \textsc{picasa} in this example would asymptote to the ratio of $N_{\rm eval}$ values, $\gtrsim35$.} We chose to display 3$\sigma$ contours in the examples above, so as to assess the performance of \textsc{picasa} under stringent requirements of accurately reproducing the outer tails of the posterior distribution. If one is interested in at most 2$\sigma$ contours, \textsc{picasa} can be run with smaller values of $\delta_\sigma$ (data pack key \texttt{dsig}), leading to even fewer evaluations. Of course, in this case the standard MCMC would also require fewer evaluations, but we have checked that the relative improvements seen above do not change significantly. Finally, all our examples used diagonal covariance matrices for the data errors, so it is also interesting to ask whether correlated data errors have any impact on the performance of \textsc{picasa}. Using some simple forms for positive-definite non-diagonal covariance matrices $C_{\rm data}$ \citep[e.g.,][]{ms14-markov} to define data errors in the examples above, we have checked that the comparisons of $N_{\rm eval}$ between \textsc{picasa} and standard MCMC are essentially unchanged. These examples demonstrate the basic behaviour of \textsc{picasa} in a variety of situations with different levels of non-linearity and dimensionality of parameter space. We discuss a few caveats and avenues for improvement in section~\ref{sec:conclude}. \section{Conclusion} \label{sec:conclude} We have presented a new technique for efficient parameter exploration, dubbed Anisotropic Simulated Annealing (ASA), particularly aimed at computationally expensive likelihoods. ASA builds on the ideas underlying simulated annealing and iteratively samples smaller and smaller regions of parameter space using Latin hypercubes, zooming in on the minimum of a pre-defined cost function. In addition to efficient recovery of the location of this minimum (i.e., the best-fit parameters), the resulting sample can be interpolated using Gaussian Process Regression to subsequently perform a standard MCMC algorithm with inexpensive sampling. We have combined these features into the Python code \textsc{picasa} ({\bf P}arameter {\bf I}nference using {\bf C}obaya with {\bf A}nisotropic {\bf S}imulated {\bf A}nnealing), with the integration with MCMC implemented using the \textsc{cobaya} framework \citep{tl19-cobaya,tl21-cobaya}. Through a number of linear and non-linear examples, we demonstrated that \textsc{picasa} can easily achieve effective gains in the number of likelihood evaluations of factors of $\gtrsim10$ to $\gtrsim100$, depending on the specific problem, in comparison to a standard MCMC approach. The code \textsc{picasa} is being actively developed and currently has several aspects which can be improved further. These include: \begin{enumerate} \item Handling situations where the best-fit lies close to a sharp prior (in other words, when the data provide a limit rather than a constraint on a parameter). Currently, the ASA optimization will find it troublesome to settle onto an acceptable fit in such cases, and the GPR training will also likely not converge well. It should be possible to address this issue by allowing for the likelihood to be evaluated (e.g., by analytic continuation) in undesirable regions of parameter space, and then separating the imposition of the prior from the likelihood evaluator, just like in standard MCMC implementations. \item The efficiency and robustness of the GPR training can likely be enhanced by allowing for dynamic assessment of the best choice of kernel (akin to a low-level neural network), as well as automated and robust assessment of the need for additional $\chi^2$ samples. At present, the GPR training described in section~\ref{subsec:picasa:GPR} can require some level of user intervention, which is also not desirable. \item Handling multiple (nearly) degenerate minima of the cost function. At present, \textsc{picasa} is guaranteed to remain stuck in one such minimum. It should be possible to allow for exploration of degenerate minima using, e.g., known or suspected symmetries of the cost function. \item Handling non-Gaussian errors defining the log-likelihood. At present, \textsc{picasa} interprets the value of the cost function $\chi^2(\mathbf{a})$ assuming Gaussian errors on the observable data. This can be a problem when the likelihood is substantially non-Gaussian in the data (e.g., when analysing galaxy cluster counts for cosmological inference). Since the goodness-of-fit is only used to assess whether or not an acceptable minimum is being reached, at present we recommend shifting the definition of $\chi^2$ in such cases by an additive constant, to make its expected value near the best fit close to the number of degrees of freedom. It should, however, also be possible to modify this condition by allowing for alternate (more Bayesian, say) criteria to assess the quality of the fit. \item Combining with approximate likelihood schemes. At present, \textsc{picasa} places the onus of accurate likelihood evaluation on the user. It will be interesting to explore whether approximation schemes such as DALI \citep{sqa14} can be integrated into \textsc{picasa} for increased robustness and speed, especially for estimating the best fit, GPR training and extensions to non-Gaussian data errors. \end{enumerate} These and other improvements will continue to be updated on the public repository for \textsc{picasa} listed under data availability below. We expect \textsc{picasa} to be useful in a number of situations requiring numerically expensive likelihood calls. A concrete example could be the reconstruction of the baryon acoustic oscillation (BAO) feature as discussed by \citet{nsz22}. More generally, since \textsc{picasa} is agnostic to the nature of the observable, the list of these potential applications can span numerous topics in cosmology, extra-Galactic astrophysics, gravitational waves science, exoplanetary science, and so on. We will explore some of these applications in future work. \section*{Acknowledgments} It is a pleasure to thank Tirthankar Roy Choudhury for encouragement and invaluable input in developing \textsc{picasa} functionality, and both him and Barun Maity for stress-testing \textsc{picasa}. I am also grateful to Ravi Sheth and Shadab Alam for collaboration on a project that used an early version of the ASA algorithm, as well as comments on an earlier draft. Finally, I thank Dipankar Bhattacharya for discussions regarding simulated annealing which originally sparked the ideas underlying this work. This work made extensive use of the open source computing packages NumPy \citep{vanderwalt-numpy},\footnote{\url{http://www.numpy.org}} SciPy \citep{scipy},\footnote{\url{http://www.scipy.org}} Scikit-Learn \citep{scikit-learn},\footnote{\url{https://scikit-learn.org/}} Matplotlib \citep{hunter07_matplotlib}\footnote{\url{https://matplotlib.org/}} and Jupyter Notebook.\footnote{\url{https://jupyter.org}} \section*{Data availability} The code \textsc{picasa} is publicly available at \url{https://bitbucket.org/aparanjape/picasa/}. The \textsc{cobaya} framework for parameter inference is publicly available at \url{https://cobaya.readthedocs.io/}.
\section{Introduction} Near out-of-distribution detection (OOD) aims at distinguishing one or several data classes from semantically similar data points. For instance, identifying samples from one class of CIFAR10 among samples of the other classes of the same dataset solves a near OOD task. On the other hand, separating CIFAR10 samples from MNIST simples is a far OOD task: there is no strong semantic proximity between the data points being separated. OOD defines a kind of anomaly detection (AD) since OOD can be seen as separating a normal class from infinitely diverse anomalies, with a training set only or mostly composed of normal samples, and anomalies being possibly semantically close to normal samples~\cite{ren2021simple}. This training paradigm relies on lower supervision requirements compared to supervised classification, for which each class calls for a representative set of samples in the training data. This work considers both unsupervised and semi-supervised AD (SAD). Unsupervised AD trains the model with a representative set of normal data samples, while semi-supervised AD also benefits from labeled anomalies~\cite{hendrycks2019oe,ruff2019deep} that can not be representative, since anomalies are by definition infinitely diverse. A distinction can however be observed between benefiting from far and near anomalies, in analogy with far and near OOD, to refine the discrimination training. The contribution of self-supervision will be taken into account through the supply of far artificial anomalies for additional supervision during training. Near OOD constitutes an ideal mean to achieve radar targets discrimination, where an operator wants an alarm to be raised everytime specific targets of interest are detected. This implies discriminating between different kinds of planes, or ships, sometimes being quite similar from a radar perspective. For example, two ships can have close hull and superstructure sizes, implying close radar cross-sections, even though their purpose and equipment on deck are completely different. Analogous observations could be made for helicopters, planes and drones. In an aerial radar context, whereas separating aerial vehicles would constitute a near OOD task, spotting weather-related clutter would define a far OOD. Such an OOD-based detection setup is directly applicable to other sensors. The motivation behind the application of OOD methods to low-resolution pulse Doppler radar (PDR) signatures stems from the constraints of some air surveillance radars. Air surveillance PDRs with rotating antennas are required to produce very regular updates of the operational situation and to detect targets located at substantial ranges. The regular updates dictates the rotation rate and limits the number of pulses, and thus the number of Doppler spectrum bins, over which to integrate and refine a target characterization. The minimum effective range restricts the pulse repetition frequency (PRF), which in turns diminishes the range of velocities covered by the Doppler bins combined. The operating frequencies of air surveillance radars are such that they can not make up for this Doppler resolution loss~\cite{levanon2004radar}. This work aims at exploring the potential of machine learning to discriminate targets within these air surveillance radars limitations, using the targets Doppler spectrums. Refining radar targets discrimination with limited supervision is critical to enable the effective detection of targets usually hidden in cluttered domains, such as small and slow targets. The AD methods examined will take a series of target Doppler spectrums as an input sample. This series is converted into a second-order representation through the computation of a covariance matrix to include an AD method adapted to process symmetric positive definite (SPD) inputs in our comparison. Radar Doppler signatures with sufficient resolution to reveal micro-Doppler spectrum modulations is a common way to achieve targets classification in the radar literature, notably when it comes to detecting drones hidden in clutter~\cite{brooks2018temporal,bjorklund2019target,gerard2021micro}. The processing of second-order representations is inspired by their recent use in the machine learning literature~\cite{huang2017riemannian,yu2017second}, including in radar processing~\cite{brooks2019hermitian,arnaudon2013riemannian}, and is part of the much larger and very active research on machine learning on Riemannian manifolds~\cite{brooks2019riemannian,bronstein2017geometric}. This paper first details the simulation setup which generates the micro-Doppler dataset, then describes the OOD methods compared. Finally, an experimental section compares quantitatively various supervision scenarios involving SAD and self-supervision. The code for both the data generation and the OOD experiments is available\footnote{\url{https://github.com/Blupblupblup/Doppler-Signatures-Generation} \url{https://github.com/Blupblupblup/Near-OOD-Doppler-Signatures}}. The code made available does not restrict itself to the experiments put forward in the current document, pieces of less successful experiments being kept for openness and in case they help the community experiment on the data with similar approaches. \section{Micro-Doppler dataset} \label{Dataset} A PDR is a radar system that transmits bursts of modulated pulses, and after each pulse transmission waits for the pulse returns. The pulse returns are sampled and separated into range bins depending on the amount of time observed between transmission and reception. The spectral content of the sampled pulses is evaluated individually in each range bin, as depicted on Fig.~\ref{fig1}. This content translates into the Doppler information which amounts to a velocity descriptor: the mean Doppler shift reveals the target bulk speed, and the spectrum modulation its rotating blades. These Doppler features are available for each burst, under the assumption that the velocities detected in a given range bin change negligibly during a burst. The number of pulses in a burst, equating the number of samples available to compute a spectrum, determines the resolution of the Fourier bins or Doppler bins. The PRF sampling frequency defines the range of speeds covered by the spectrum. PDR signatures are generated by a MATLAB~\cite{matlab} simulation. The Doppler signatures are series of periodograms, i.e. the evolution of spectral density over several bursts, one periodogram being computed per burst. Both periodograms and the series of periodograms can be called spectrum in the remainder of this paper. The samples on which the discrete Fourier transform is computed are sampled at the PRF frequency, i.e. one sample is available per pulse return for each range bin. \begin{figure} \includegraphics[width=0.85\textwidth]{burst_no_spectrum.pdf} \caption{Each pulse leads to one complex-valued I/Q sample per range bin, while each burst is composed of several pulses. Each range bin is thus associated with a complex-valued discrete signal with as many samples as there are pulses. Air surveillance radars with rotating antennas are required to provide regular situation updates in every direction, severely constraining the number of pulses per burst acceptable.} \label{fig1} \end{figure} The main parameters of the simulation are close to realistic radar and target characteristics. A carrier frequency of 5 GHz was selected, with a PRF of 50 KHz. An input sample is a Doppler signature extracted from 64 bursts of 64 pulses, i.e. 64 spectrums of 64 points, ensuring the full rank of the covariance matrix computed over non-normalized Doppler, i.e. Fourier, bins. The only simulation parameter changing across the classes of helicopter-like targets is the number of rotating blades: Doppler signatures are associated with either one, two, four or six rotating blades, as can be found on drones and radio-controlled helicopters. The quality of the dataset is visually verified: a non-expert human is easily able to distinguish the four target classes, confirming the discrimination task is feasible. The classes intrinsic diversity is ensured by receiver noise, blade size and revolutions-per-minute (RPM) respectively uniformly sampled in $\left[4.5,7\right]$ and $\left[450,650\right]$, and a bulk speed uniformly sampled so that the signature central frequency changes while staying approximately centered. The possible bulk speeds and rotor speeds are chosen in order for the main Doppler shift and the associated modulations to remain in the unambiguous speeds covered by the Doppler signatures. Example signatures and their covariance representations are depicted for each class on Fig.~\ref{example-samples}. For each class, 3000 samples are simulated, thus creating a 12000-samples dataset. While small for the deep learning community, possessing thousands of relevant and labeled real radar detections would not be trivial in the radar industry, making larger simulated datasets less realistic for this use case. \begin{figure} \includegraphics[width=0.6 \textwidth]{four_classes.png} \caption{One sample of each target class: the varying number of rotating blades defines the classes, the modulation pattern being easily singled out. The first line of images shows signatures, i.e. the time-varying periodogram of targets over 64 bursts of 64 pulses. On those images, each row is the periodogram computed over one burst, and each column a Fourier i.e. a Doppler bin. The second line contains the covariance SPD representation of the first line samples. The width of the Doppler modulations around the bulk speed on the periodograms varies within each class, as well as the bulk speed, the latter being portrayed by the central vertical illumination of the spectrum.} \label{example-samples} \end{figure} \section{OOD methods} \label{OOD} This work compares deep and non-deep OOD methods, called shallow, including second-order methods harnessing the SPD representations provided by the covariance matrix of the signatures. The extension of the deep learning architectures discussed to SAD and self-supervised learning (SSL) is part of the comparison. The use of SSL here consists in the exploitation of a rotated version of every training signature belonging to the normal class in addition to its non-rotated version, whereas SAD amounts to the use of a small minority of actual anomalies taken in one of the other classes of the dataset. In the first case one creates artificial anomalous samples from the already available samples of a single normal class, whereas in the second case labeled anomalies stemming from real target classes are made available. To avoid confusion, one should note that this single normal class can be made of one or several target classes, which end up being considered as a unique normality. No SSL or SAD experiments were conducted on the SPD representations, since the SSL and SAD extensions of the deep methods are achieved through training loss modifications, and the SPD representations were confined to shallow baselines. \subsection{Non-deep methods} \label{non-deep-methods} Common non-deep anomaly detection methods constitute our baselines: one-class support vector machines (OC-SVM)~\cite{scholkopf2001estimating}, isolation forests (IF)~\cite{liu2008isolation}, local outlier factor (LOF)~\cite{breunig2000lof} and random projections outlyingness (RPO)~\cite{donoho1992breakdown}. The three first methods are selected for their widespread use~\cite{chandola2009anomaly,ruff2018deep,bauw2020unsupervised}, and the diversity of the underlying algorithms. OC-SVM projects data points in a feature space where a hyperplane separates data points from the origin, thus creating a halfspace containing most samples. Samples whose representation lies outside of this halfspace are then considered to be anomalies. IF evaluates how easy it is to isolate data points in the feature space by recursively partitioning the representation space. The more partitions are required to isolate a data point, the more difficult it is to separate this point from other samples, and the less anomalous this point is. LOF uses the comparison of local densities in the feature space to determine whether a point is anomalous or not. Points that have local densities similar to the densities of their nearest neighbors are likely to be inliers, whereas an outlier will have a much different local density than its neighbors. RPO combines numerous normalized outlyingness measures over 1D projections with a $max$ estimator in order to produce a unique and robust multivariate outlyingness measure, which translates into the following quantity: \begin{equation} \label{RPO} O(x;p, X) = \underset{u \in \mathbb{U}}{max} \dfrac{\vert u^Tx - MED(u^TX) \vert}{MAD(u^TX)} \end{equation} where $x$ is the data point we want to compute the outlyingness for, $p$ the number of random projections (RP) $u$ of unit norm gathered in the set $\mathbb{U}$, and $X$ the training data matrix. $MED$ stands for median, a location estimator, and $MAD$ for median absolute deviation, a spread estimator. The $max$ implies retaining only the worst outlyingness measure available among all the 1D projections, i.e. the worst normalized deviation from the projected median. In~\cite{velasco2012robust}, the equivalence between the square, $max$ excluded, of Eq.~\ref{RPO} for a large number of RPs and the Mahalanobis distance is established, with the motivation of obtaining an equivalent of the latter without computing a covariance matrix. This equivalence with the Mahalanobis distance indicates that with enough RPs, RPO with the square, after the $max$ integration over RPs, describes a normality ellipsoid in the input space, i.e. the representation space of $x$ (see Appendix). The RPO outlyingness actually leads to the definition of a statistical depth approximation~\cite{donoho1992breakdown,huber1985projection}, another quantity that orders data points from a given set from most to least normal. \subsection{Deep methods} \label{deep-methods} The deep AD methods experimented on in this work are inspired by the deep support vector data description (SVDD) original paper~\cite{ruff2018deep}. Deep SVDD achieves one-class classification by concentrating latent space representations around a normality centroid with a neural network trained to minimize the distance of projected data samples to the centroid. The centroid is defined by the average of the initial forward pass of the training data, composed of normal samples. The intuition behind the use of Deep SVDD for AD is similar to the way one can detect anomalies with generative models: whereas generative models detect outliers because they are not as well reconstructed as normal samples, deep SVDD projects outliers further away from the normality centroid in the latent space. The AD score is thus the distance to the normality centroid after projection by the trained deep SVDD network. One can note that Deep SVDD is a deep learning adaptation of SVDD~\cite{tax2004support}, which can be equivalent to the OC-SVM method in our comparison if one uses a Gaussian kernel. The training loss of Deep SVDD for a batch of size $n$ with a neural network $\Phi$ with weights $W$ distributed over $L$ layers is as follows: \begin{equation} \label{DeepSVDD} \min_{W} \Bigg[ \dfrac{1}{n} \sum_{i=1}^n \vert \vert \Phi(x_i;W) - c \vert \vert^2 + \dfrac{\lambda}{2} \sum_{l=1}^L \vert \vert W^l \vert \vert^2_{F} \Bigg] \end{equation} where $c$ is the fixed normality centroid. The second term is a weights regularization controlled by $\lambda$. Deep SVDD naturally calls for a latent multisphere extension. An example of such an extension is Deep multi-sphere SVDD (MSVDD)~\cite{ghafoori2020deep}, which is part of our comparison. Deep MSVDD initializes numerous latent normality hyperspheres using k-means and progressively discards the irrelevant centroids during training. The relevance of latent hyperspheres is determined thanks to the cardinality of the latent cluster they encompass. The deep MSVDD training loss is: \begin{equation} \label{DeepMSVDD} \underset{W,r}{min} \Bigg[ \dfrac{1}{K} \sum_{k=1}^K r_k^2 + \dfrac{1}{\nu n} \sum_{i=1}^n max(0, \vert \vert \Phi(x_i;W) - c_j \vert \vert^2 - r_j^2) + \dfrac{\lambda}{2} \sum_{l=1}^L \vert \vert W^l \vert \vert^2_{F} \Bigg] \end{equation} The first term minimizes the volume of hyperspheres of radius $r_k$, while the second is controlled by $\nu \in [0,1]$ and penalizes points lying outside of their assigned hypersphere, training samples being assigned to the nearest hypersphere. A second Deep SVDD derivative considered here is Deep RPO~\cite{bauw2021deep}, which replaces the latent Euclidean distance to the normality centroid with a RPs-based outlyingness measure adapted from Eq.~\ref{RPO} in the latent space, leading to the following loss: \begin{equation} \label{deepRPO} \min_{W} \Bigg[ \dfrac{1}{n} \sum_{i=1}^n \left(\underset{u \in \mathbb{U}}{mean} \dfrac{\vert u^T \Phi(x_i;W) - MED(u^T\Phi(X;W)) \vert}{MAD(u^T\Phi(X;W))} \right)\\+ \frac{\lambda}{2} \sum_{l=1}^L \vert \vert W^l \vert \vert^2_{F} \Bigg] \end{equation} This training loss uses the outlyingness defined in Eq.~\ref{RPO} after the neural network encoding, with a $max$ estimator transformed into a $mean$ as suggested in~\cite{bauw2021deep} for better integration with the deep learning setup. The $mean$ estimator computes a mean over the set of RPs available to compute the latent outlyingness, while the $\frac{1}{n}$ computes a mean over the batch samples. The use of a $mean$ instead of a $max$ removes the convergence to the square root of the Mahalanobis distance-inferred ellipsoid already mentioned in the RPO definition for a large set of RPs. The loss nonetheless still combines 1D outlyingness measures individually centered by their median and normalized by their median absolute deviation, but with no ellipsoid-like score distribution guarantee in the input space once integrated (see Appendix). No square was applied to the first loss term, in accordance with the quantity put forward in~\cite{donoho1992breakdown}. SAD is achieved through outlier exposure~\cite{hendrycks2019oe,ruff2019deep}, which adds supervision to the training of the model thanks to the availability of few and non representative labeled anomalies. To take into account anomalies during training, Deep SAD~\cite{ruff2019deep} repels the outliers from the normality centroid by replacing the minimization of the distance to the centroid with the minimization of its inverse in the training loss. With $m$ labeled anomalies $\tilde{x}$ in a batch the Deep SVDD loss thus becomes, with a training objective balancing parameter $\eta$: \begin{equation} \label{DeepSAD} \min_{W} \Bigg[ \dfrac{1}{n+m} \sum_{i=1}^n \vert \vert \Phi(x_i;W) - c \vert \vert^2 \\ + \dfrac{\eta}{n+m} \sum_{j=1}^m (\vert \vert \Phi(\widetilde{x_j};W)-c\vert \vert^2)^{-1} +\dfrac{\lambda}{2} \sum_{l=1}^L \vert \vert W^l \vert \vert^2_{F} \Bigg] \end{equation} Labeled anomalies in the training set need to be distinguished from potential unlabeled anomalies that are considered to be normal samples, which confuse the AD by contaminating the training set instead of providing supervision. This adaptation can be repeated for both Deep RPO and Deep MSVDD, although for Deep MSVDD the multiplicity of normality centers calls for an additional consideration on how to choose from which centroid the labeled anomalies should be repelled as long as several centroids are kept active. The experiments implementing Deep MSVDD adapted to SAD with an additional loss term for labeled anomalies were inconclusive, such an adaptation will therefore not be part of the presented results. The additional loss term either minimized the latent distance between anomalies and dedicated centroids, or maximized the latent distance between anomalies and normality centroids. Once adapted to SAD, the Deep RPO loss becomes, similarly to the transformation that led to Eq.~\ref{DeepSAD}: \begin{equation} \label{deepRPO-SAD} \begin{split} \min_{W} \Bigg[ \dfrac{1}{n+m} \sum_{i=1}^n \left(\underset{u \in \mathbb{U}}{mean} \dfrac{\vert u^T \Phi(x_i;W) - MED(u^T\Phi(X;W)) \vert}{MAD(u^T\Phi(X;W))} \right)\\+ \dfrac{\eta}{n+m} \sum_{j=1}^m \left(\underset{u \in \mathbb{U}}{mean} \dfrac{\vert u^T \Phi(\widetilde{x_j};W) - MED(u^T\Phi(X;W)) \vert}{MAD(u^T\Phi(X;W))} \right)^{-1}\\+ \frac{\lambda}{2} \sum_{l=1}^L \vert \vert W^l \vert \vert^2_{F} \Bigg] \end{split} \end{equation} Arbitrary sets of outliers could not be completely gathered around a reference point since they are not necessarily concentrated in a common mode~\cite{ruff2019deep,steinwart2005classification}. However, this does not forbid the concentration of identified modes among labeled anomalies close to dedicated centroids to provide additional supervision during training, a case which is part of the experiments presented. The possibly arbitrary distribution of normal and anomalous centroids and the relative distance between the centroids adds a way to use prior information regarding the proximity between the training samples. Such a setup can seem close to classification with rejection~\cite{hendrycks2019oe,bartlett2008classification}, since the concentration of data points around dedicated normal and anomalous centroids can be interpreted as classification while the data points attached to no centroid and thus supposedly repelled from all centroids by the trained network constitutes a rejection. This parallel with classification with rejection is not necessarily relevant since the availability of labeled anomalies to train AD methods is usually very limited if not nonexistent. In contrast, supervised classification of identified data modes would imply rich, representative and relatively balanced datasets for each latent mode. The limited availability of labeled anomalies applies to actual anomalies and not to artificial anomalies provided by the transformation of existing training samples i.e. through self-supervision. With proper transformations self-supervision can produce as many labeled anomalies for training as there are normal samples, or even more if each normal sample is transformed multiple times. However this does not overcome the lack of representativeness of labeled anomalies. This is also made difficult since the choice of transformations requires expert knowledge. The reunion of normal latent representations achieved through the deep one-class classification methods mentioned is analogous to the alignment principle put forward in~\cite{wang2020understanding}, which also argued for a latent uniformity. Whereas the alignment principle compels similar samples to be assigned similar representations, the uniformity principle demands the preservation of maximal information. One way to achieve that according to~\cite{wang2020understanding} is to push all features away from each other on the unit hypersphere to intuitively facilitate a uniform distribution. The extension of the Deep SVDD loss to encourage a form of latent uniformity using the pairwise distance between normal samples during training was investigated without ever improving the baselines. The experiments conducted to evaluate the contribution of a pairwise distance of normal samples latent representations loss term revolved around the following training loss format, where the term tasked with enforcing latent uniformity is weighted using $\beta$ and was expected to be judiciously balanced with the overall latent concentration: \begin{equation} \label{DeepSVDD-uniformity} \min_{W} \Bigg[ \dfrac{1}{n} \sum_i^n \left\Vert \Phi(x_i;W) - c \right\Vert^2 + \dfrac{\beta}{n} \sum_{i \ne j}^n \left( \left\Vert x_i - x_j \right\Vert^2 \right)^{-1} + \dfrac{\lambda}{2} \sum_{l=1}^L \vert \vert W^l \vert \vert^2_{F} \Bigg] \end{equation} The failure to make a loss term enforce a form of latent uniformity could signal the necessity of associating such a constraint with latent representations confined to a relevant manifold. \subsection{Riemannian methods for covariance matrices} \label{riemannian-methods} Two SPD-specific AD approaches were considered. The first approach consists in replacing the principal component analysis (PCA) dimensionality reduction preceding shallow AD with an SPD manifold-aware tangent PCA (tPCA). The tPCA projects SPD points on the tangent space of the Fréchet mean, a Riemannian mean which allows to compute an SPD mean, keeping the computed centroid on the Riemannian manifold naturally occupied by the data. Using tPCA offers the advantage of being sensible to the manifold on which the input samples lie, but implies that input data is centered around the Riemannian mean and not too scattered. This makes tPCA a questionable choice when the objective set is AD with multimodal normality~\cite{pennec2018barycentric}, something that is part of the experiments put forward in this work. Nonetheless, the Euclidean PCA being a common tool in the shallow AD literature, tPCA remains a relevant candidate for this study since it enables us to take a step back with respect to non-deep dimensionality reduction. The second SPD-specific approach defines a Riemannian equivalent to Deep SVDD: inspired by recent work on SPD neural networks~\cite{lou2020differentiating,brooks2019riemannian,huang2017riemannian,yu2017second}, which learn intermediate representations while keeping them on the SPD matrices manifold, a Deep SVDD SPD would transform input covariance matrices and project the latter into a latent space comprised within the SPD manifold. Taking into account SAD and SSL labeled anomalies during training was expected to be done as for the semi and self-supervised adaptations of Deep SVDD described earlier, where labeled anomalies are pushed away from the latent normality centroid thanks to an inverse distance term in the loss. Despite diverse attempts to make such a Deep SVDD SPD model work, with and without geometry-aware non-linearities in the neural network architecture, no effective learning was achieved on our dataset. This second approach will therefore be missing from the reported experimental results. Since this approach defined the ReEig~\cite{huang2017riemannian} non-linearity rectifying small eigenvalues of SPD representations, the related shallow AD approach using the norm of the last PCA components as an anomaly score was also considered. This \emph{negated PCA} is motivated by the possibility that, in one-class classification where fitting occurs on normal data only, the first principal components responsible for most of the variance in normal data are not the most discriminating ones when it comes to distinguishing normal samples from anomalies~\cite{miolane2021iclr,rippel2021modeling}. This approach was applied to both spectral and covariance representations, with the PCA and tPCA last components respectively, but was discarded as well due to poor performances. The latter indicate that anomalous samples are close enough to the normal ones for their information to be carried in similar components, emphasizing the near OOD nature of the discrimination pursued. \section{Experiments} \label{Experiments} AD experiments are conducted for two setups: a first setup where normality is made of one target class, and a second setup where normality is made of two target classes. When a bimodal normality is experimented on, the normal classes are balanced. Moreover, the number of normal modes is not given in any way to the AD methods, making the experiments closer to the arbitrary and, to a certain extent, unspecified one-class classification useful to a radar operator. Within the simulated dataset, 90\% of the samples are used to create the training set, while the rest is equally divided to create the validation and test sets. All non-deep AD methods are used after a preliminary dimensionality reduction. The number of RPs used to compute the outlyingness score with RPO and Deep RPO is the same and set to 1000, even though the estimator used differs between the shallow and the deep approach. \paragraph{Preprocessing} This work is inspired by~\cite{ruff2018deep}, which experimented on MNIST, a dataset in which samples are images of objects without background or irrelevant patterns. In order to guarantee a relevant neural architecture choice, this kind of input format is deliberately reproduced. The idea of creating MNIST-like benchmarks has been of interest in different scientific communities such as biomedical images~\cite{yang2021medmnist} and 3D modeling~\cite{jimenez2016unsupervised}. The series of periodograms, i.e. non-SPD representations are therefore preprocessed such that only the columns with top 15\% values in them are kept, this operation being done after a switch to logarithmic scale. This results in periodograms where only the active Doppler bins, portraying target bulk speed and micro-Doppler modulations, have non-zero value. Only a grayscale region of interest (ROI) remains in the input matrix with various Doppler shifts and modulation widths, examples of which are shown on Figure~\ref{preprocessed-samples}. This preprocessing leads to the "(SP)" input format as indicated in the results tables, and is complementary to the covariance representation. Covariance matrices are computed without such preprocessing, except for the switch to logarithmic scale which precedes the covariance computation. Comparing covariance-based OOD to spectral representations is fair since both representations stem from the same inputs, the covariance only implying an additional transformation of the input before training the AD. All input data is min-max normalized except for the covariance matrices used by tPCA. \paragraph{Deep learning experiments} The test AUC score of the best validation epoch in terms of AUC is retained, in line with~\cite{chong2020simple}. All experiments were conducted with large $1000$ samples batches, which stabilizes the evolution of the train, validation and test AUCs during training. The training is conducted during 300 epochs, the last 100 epochs being fine-tuning epochs with a reduced learning rate, a setup close to the one in~\cite{ruff2018deep}. As was suggested in~\cite{chong2020simple} a relatively small learning rate of $10^{-4}$ is chosen to help avoid the latent normality hypersphere collapse, i.e. the convergence to a constant projection point in the latent space in the non-SAD and non-SSL cases, with $\lambda=10^{-6}$. Such a latent normality collapse is made impossible when SAD or SSL samples are concentrated around dedicated centroids or scattered away from normality centroids, since the network is then trained to disperse representations. Loss terms integrating labeled anomalies for extra training supervision are balanced with $\eta=1$, and for Deep MSVDD $\nu=0.1$. Hyperparameters are kept constant across all experiments conducted, in order to ensure fair comparisons. In the results tables, the second and third columns indicate whether SAD and SSL samples were used for additional supervision during training, and describe how such samples affected the training loss if present. When the SAD or SSL loss term is defined by a centroid, it means that the distance to the mentioned centroid is minimized during training, whereas "away" implies the projection of the SAD or SSL samples are repelled from the normality centroid thanks to an inverse distance as described previously. For example, the first line of the second part of Table~\ref{sad-ssl-results} describes an experiment where SAD samples are concentrated around the SAD samples latent centroid, and SSL samples concentrated around the SSL samples latent centroid. Centroids are computed, as for the normal training samples, with the averaging of an initial forward pass, therefore yielding the average latent representation. \paragraph{Non-deep learning experiments} Shallow AD conducted on the covariance representation after a common PCA uses the upper triangular part of the min-max normalized input as a starting point, avoiding redundant values. This contrasts with the Riemannian approach replacing PCA with the tPCA, the latter requiring the raw SPD representation. Furthermore, shallow approaches were also tried on the periodograms individually, where each row of an input signature, i.e. one vector of Doppler bins described for one burst, was given a score, the complete signature being then given the mean score of all its periodograms. This ensemble method did not yield relevant results and is therefore missing from our comparison. Such an approach ignores the order of periodograms in signatures. \begin{figure} \floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=6cm}}]{figure}[\FBwidth] {\caption{Random samples of the fourth class after the preprocessing erasing the irrelevant background, which makes the dataset closer to the MNIST data format. One can notice the varying modulation width of the target spectrum and central Doppler shift. The fourth class has the highest number of rotating blades on the helicopter-like target, hence the higher complexity in the pattern. These samples illustrate the input format of the various AD methods compared in this work, and are min-max normalized so that their values belong to $[0,1]$. Only the inputs of the Riemannian setup where shallow learning AD is used on SPD inputs after tPCA uses a different input format, where the input covariance is not normalized.}\label{preprocessed-samples}} {\includegraphics[width=5.5cm]{within_class_diversity.png}} \end{figure} \paragraph{Neural network architecture} While the MNIST-like input format is thus replicated, the 2D features remain specific to radar signal processing and may therefore benefit from a different neural network architecture. Several neural networks architectures were considered, including architectures beginning with wider square and rectangular convolutions extended along the (vertical) bursts input axis, with none of the investigated architectures scoring systematically higher than the Fashion-MNIST architecture from the original Deep SAD work~\cite{ruff2019deep}, which was only modified in order to handle the larger input size. The latter was consequently selected to produce the presented results. This architecture projects data with two convolutional layers followed by two linear layers, each layer being separated from the next one by a batch normalization and a leaky ReLU activation. The outputs of the two convolutional layers are additionally passed through a 2D max-pooling layer. \paragraph{Riemannian AD} The tPCA was computed thanks to the dedicated Geomstats\footnote{\url{https://geomstats.github.io/}}~\cite{geomstats} function, while experiments trying the implement a Riemannian equivalent of Deep SVDD were conducted using the SPD neural networks library torchspdnet\footnote{\url{https://gitlab.lip6.fr/schwander/torchspdnet}}~\cite{brooks2019second}. The AD experiments based on a SPD neural network ending up inconclusive, they are not part of the results tables. \subsection{Unsupervised OOD with shallow and deep learning} \label{unsupervised-AD} Unsupervised AD results, for which the training is only supervised by normal training samples, are presented in Table~\ref{unsupervised-results}. These results indicate the superiority of deep learning for the OOD task considered, while demonstrating the substantial contribution of geometry-aware dimensionality reduction through the use of tPCA for non-deep AD. RPO is kept in Table~\ref{unsupervised-results} even though it does not achieve useful discrimination because it is the shallow equivalent of Deep RPO, one of the highlighted deep AD methods, deprived of the neural network encoder and with a $max$ estimator instead of a $mean$, as was previously justified. Deep MSVDD does not lead to the best performances, and is as effective as Deep SVDD and Deep RPO, which could have seemed surprising at least when normality is made of two target classes. Indeed, since Deep MSVDD has the possibility to use several disjointed hyperspheres to capture the latent normality distribution, one could expect it to better model more complex, e.g. multimodal, normality. \begin{table} \caption{Unsupervised AD experiments results (average test AUCs in \% $\pm$ StdDevs over ten seeds). These machine learning methods are trained on fully normal training sets, without labeled anomalies for SAD or self-supervision transformations. The four last methods are our deep AD baselines, trained on normalized spectral representations only. Deep MSVDD "mean best" indicates the neural network was trained using a simpler loss, analogous to the Deep SVDD loss, where only the distance to the best latent normality centroid is minimized. PCA and tPCA indicate that the AD model is trained after an initial dimensionality reduction, which is either PCA or tangent PCA.} \label{unsupervised-results} \begin{tabular}{|l|c|c|c|c|c|c|} \hline AD method (input format) & SAD loss & SSL loss & Mean test AUC (1 mode) & Mean test AUC (2 modes) \\ \hline OC-SVM (SP-PCA) & / & / & 49.16 $\pm$ 26.69 & 45.48 $\pm$ 27.53 \\ OC-SVM (SPD-PCA) & / & / & 64.68 $\pm$ 9.10 & 58.23 $\pm$ 15.12 \\ OC-SVM (SPD-tPCA) & / & / & 57.59 $\pm$ 3.91 & 55.33 $\pm$ 9.48\\ IF (SP-PCA) & / & / & 50.96 $\pm$ 17.37 & 48.50 $\pm$ 18.76 \\ IF (SPD-PCA) & / & / & 52.36 $\pm$ 22.47 & 47.50 $\pm$ 20.32 \\ IF (SPD-tPCA) & / & / & 66.91 $\pm$ 9.65 & 61.23 $\pm$ 12.65 \\ LOF (SP-PCA) & / & / & 56.80 $\pm$ 2.38 & 61.55 $\pm$ 10.29 \\ LOF (SPD-PCA) & / & / & 66.44 $\pm$ 21.37 & 65.83 $\pm$ 19.52 \\ LOF (SPD-tPCA) & / & / & 78.38 $\pm$ 8.86 & 73.56 $\pm$ 10.09 \\ RPO (SP-PCA) & / & / & 49.61 $\pm$ 6.89 & 50.43 $\pm$ 7.13 \\ RPO (SPD-PCA) & / & / & 51.08 $\pm$ 19.66 & 54.95 $\pm$ 17.58 \\ RPO (SPD-tPCA) & / & / & 33.97 $\pm$ 7.36 & 38.08 $\pm$ 14.58 \\ \hline Deep SVDD (SP) & no SAD & no SSL & 83.03 $\pm$ 6.83 & \textbf{78.29} $\pm$ \textbf{6.68} \\ Deep MSVDD (SP) & no SAD & no SSL & 82.27 $\pm$ 9.67 & \textbf{78.30} $\pm$ \textbf{8.28} \\ Deep MSVDD "mean best" (SP) & no SAD & no SSL & 82.29 $\pm$ 7.20 & 78.02 $\pm$ 6.80 \\ Deep RPO (SP) & no SAD & no SSL & \textbf{83.60} $\pm$ \textbf{5.35} & 78.13 $\pm$ 6.02\\ \hline \end{tabular} \end{table} \subsection{Potential contribution of SAD and SSL} \label{SAD-SSL-potential} The contribution of additional supervision during training through the introduction of SAD samples and SSL samples is examined in Table~\ref{sad-ssl-results}. Regarding SAD experiments, labeled anomalies will be taken from a single anomalous class for simplicity, and because only four classes are being separated, this avoids unrealistic experiments where labeled anomalies from every anomalous class are seen during training. When SAD samples are used during training, labeled anomalies represent one percent of the original training set size. This respects the spirit of SAD, for which labeled anomalies can only be a minority of training samples, which is not representative of anomalies. This is especially realistic in the radar processing setup initially described where labeled detections would rarely be available. SSL samples are generated thanks to a rotation of the spectral input format, rendering the latter absurd but encouraging better features extraction since the network is asked to separate similar patterns with different orientations. SSL samples are as numerous as normal training samples, implying they don't define a minority of labeled anomalies for training as SAD samples do, when they are taken into account. Individually, SAD samples lead to better performances than SSL ones, but the best results are obtained when combining the two sets of samples for maximal training supervision. Deep SVDD appears to be substantially better at taking advantage of the additional supervision provided by SAD and SSL samples. Quite surprisingly for a radar operator, the best test AUC is obtained when SSL samples are concentrated around a specialized centroid while SAD samples are repelled from the normality centroid. Indeed, SSL samples being the only absurd samples considered in our experiments radarwise, it could seem more intuitive to project SAD samples, which remain valid targets, next to a dedicated centroid while repelling SSL samples. Likewise, on an ideal outlyingness scale, SSL samples should be further away from normality than SAD samples. This counter-intuitive performance could stem from the test set which only evaluates the separation of targets in a near OOD context. No invalid target representation, like the SSL samples are, is present in the test set, only valid representation from the four target classes make up the latter. This is consistent with the application put forward in this study: use OOD to discriminate between various kinds of radar detections. \begin{table} \caption{Experiments with additional supervision provided by SAD and/or SSL labeled samples during training (average test AUCs in \% $\pm$ StdDevs over ten seeds). When available, SAD samples are the equivalent of one percent of the normal training samples in quantity. The first half of the Table reports performances where only one of the two kinds of additional supervision is leveraged, while the second half describes the performances for setups where both SAD and SSL labeled samples contribute to the model training. Each couple of lines compares Deep SVDD and Deep RPO in a shared AD supervision setup, thus allowing a direct comparison. \textit{c.} stands for centroid.} \label{sad-ssl-results} \begin{tabular}{|l|l|l|c|c|c|c|} \hline AD method (input format) & SAD loss & SSL loss & Mean test AUC (1 mode) & Mean test AUC (2 modes) \\ \hline Deep SVDD (SP) & no SAD & SSL c. & 86.79 $\pm$ 6.54 & 83.91 $\pm$ 7.92 \\ Deep RPO (SP) & no SAD & SSL c. & 88.70 $\pm$ 5.10 & 84.59 $\pm$ 8.54 \\ \hline Deep SVDD (SP) & no SAD & away & 81.43 $\pm$ 8.62 & 77.01 $\pm$ 8.20 \\ Deep RPO (SP) & no SAD & away & 80.21 $\pm$ 9.06 & 78.93 $\pm$ 9.39 \\ \hline Deep SVDD (SP) & SAD c. & no SSL & 86.79 $\pm$ 8.94 & 87.65 $\pm$ 6.44 \\ Deep RPO (SP) & SAD c. & no SSL & 81.38 $\pm$ 6.09 & 76.45 $\pm$ 6.30 \\ \hline Deep SVDD (SP) & away & no SSL & 93.93 $\pm$ 4.82 & 93.50 $\pm$ 7.61 \\ Deep RPO (SP) & away & no SSL & 84.19 $\pm$ 5.32 & 80.37 $\pm$ 7.22 \\ \hline \hline Deep SVDD (SP) & SAD c. & SSL c. & 91.00 $\pm$ 6.45 & 90.51 $\pm$ 7.38 \\ Deep RPO (SP) & SAD c. & SSL c. & 87.79 $\pm$ 5.81 & 82.69 $\pm$ 8.51 \\ \hline Deep SVDD (SP) & SAD c. & away & 89.98 $\pm$ 7.79 & 91.03 $\pm$ 6.71 \\ Deep RPO (SP) & SAD c. & away & 78.86 $\pm$ 9.10 & 79.11 $\pm$ 9.64 \\ \hline Deep SVDD (SP) & away & SSL c. & \textbf{95.06} $\pm$ \textbf{4.20} & 93.91 $\pm$ 7.31 \\ Deep RPO (SP) & away & SSL c. & 89.82 $\pm$ 5.21 & 87.17 $\pm$ 8.17 \\ \hline Deep SVDD (SP) & away & away & 94.63 $\pm$ 4.31 & \textbf{94.02} $\pm$ \textbf{7.30} \\ Deep RPO (SP) & away & away & 90.91 $\pm$ 5.94 & 92.69 $\pm$ 7.98 \\ \hline \end{tabular} \end{table} \begin{figure} \includegraphics[width=17cm]{metrics.png} \caption{\textbf{Left} - Training metrics of a successful run where normal samples are concentrated around their average initial projection, and SAD and SSL samples are pushed away thanks to a loss term using the inverse of the distance with respect to the normality latent centroid. This is one of the most successful setups in Table~\ref{sad-ssl-results}, and one of the easiest AD experiments since the two classes defining normality here are class 3 (four blades are responsible for the modulation pattern around the central Doppler shift) and class 4 (six blades are responsible for the modulation pattern around the central Doppler shift), meaning the separation with the other classes deemed anomalous is actually a binary modulation complexity threshold. One of the contributions of the SAD and SSL supervisions can be observed on the evolution of AUCs during training: no AUC collapse can be seen during training, discarding the possibility of a latent distribution collapse during training. Experiments showed that large training batches contributed to stable AUCs growth. Spikes in the training loss match the drops in AUCs. \textbf{Right} - Latent distribution of the training samples visualized in 2D using t-SNE after projection by the untrained (top) and the trained neural network (bottom). One can notice that normal training samples from both normal classes are completely mixed up with the minority of SAD labeled anomalies from class 1 in red (one blade), semantically similar, whereas SSL samples which are rotated normal training samples are already gathered in their own latent subclusters. SAD labeled anomalies end up well separated after training.} \label{training-metrics} \end{figure} \subsection{Training with a contaminated training set} \label{SAD-SSL-potential} Unsupervised AD refers to the experiments of Table~\ref{unsupervised-results} where only training samples assumed to be normal supervise the training of the neural network. Real-life datasets, labeled by algorithms or experts, are unlikely to respect that assumption and will suffer from contamination of normal samples with unlabeled anomalies. The results in Table~\ref{contamination-experiments} depict how sensible the deep AD methods previously introduced are to training set contamination. The contamination is carried out using the one percent SAD samples already used for SAD experiments. While in the SAD experiments SAD samples were repelled from the normality centroid or concentrated next to their dedicated latent reference point, here they will be processed as normal samples. SSL samples again appear to better contribute to improving AD when concentrated next to a specialized centroid, while the performance drop due to contamination does not seem to be particularly stronger for one of the approaches considered. \begin{table} \caption{Contamination experiments results (average test AUCs in \% $\pm$ StdDevs over ten seeds): the SAD labeled anomalies are integrated within the training samples and taken into account as normal samples during training, thus no SAD loss term is used for SAD samples. The contamination rate is one percent, i.e. the equivalent of one percent of the normal training samples in labeled anomalies is added to confuse the AD.} \label{contamination-experiments} \begin{tabular}{|l|c|c|c|c|c|c|} \hline AD method (input format) & SAD loss & SSL loss & Mean test AUC (1 mode) & Mean test AUC (2 modes) \\ \hline Deep SVDD (SP) & no SAD & no SSL & 80.76 $\pm$ 7.11 & 76.02 $\pm$ 6.66 \\ Deep MSVDD (SP) & no SAD & no SSL & 78.31 $\pm$ 11.18 & 74.49 $\pm$ 9.13 \\ Deep MSVDD "mean best" (SP) & no SAD & no SSL & 79.84 $\pm$ 7.82 & 74.89 $\pm$ 7.01 \\ Deep RPO (SP) & no SAD & no SSL & 81.29 $\pm$ 5.92 & 74.82 $\pm$ 5.89 \\ \hline Deep SVDD (SP) & no SAD & SSL c. & 85.34 $\pm$ 6.85 & 81.36 $\pm$ 7.47 \\ Deep RPO (SP) & no SAD & SSL c. & \textbf{86.66} $\pm$ \textbf{6.41} & \textbf{82.78} $\pm$ \textbf{8.25} \\ \hline Deep SVDD (SP) & no SAD & away & 79.62 $\pm$ 9.02 & 75.38 $\pm$ 8.28 \\ Deep RPO (SP) & no SAD & away & 76.16 $\pm$ 9.87 & 76.56 $\pm$ 8.69 \\ \hline \end{tabular} \end{table} \section{Conclusion} The near OOD performances of various deep and non-deep, unsupervised and semi-supervised AD methods were compared on a radar Doppler signatures simulated dataset. Deep AD approaches were evaluated in various supervision setups, which revealed the relevance of combining a minority of labeled anomalies with transformed normal training samples to improve semi-supervised near OOD performances, and avoid latent normality distribution collapse. Among the limitations of our study, one can note the lack of OOD experiments on a multimodal normal training set with unbalanced normal classes, which would make the OOD task more realistic. The benefits of deep learning clearly showed, and while not leading to the best overall performances, geometry-aware processing with tangent PCA proved to be the source of a substantial improvement for non-deep AD. \subsubsection*{Acknowledgements} This work was supported by the French Defense Innovation Agency (Cifre-Défense 001/2019/AID). \bibliographystyle{plain}
\section{Introduction} \label{sec:Introduction} Deep neural network (DNN) models continue to enjoy wide application in very challenging and complex real-time cognitive applications such as machine translation, autonomous driving, object detection, recommender systems, etc., due to their superlative ability to detect and recognize complex features in text, images, and speech. The inherently scalable nature of this ability of DNN models has enabled the design and deployment of very large models in commercial and industrial application~\cite{Burrgeo2021,Onasami2022UnderwaterAC,Yang2022AJE,Fagbohungbe2021EfficientPP}. Despite their impressive success, DNN models require millions of multiply and accumulate operations that consumes a lot of computing and memory resources. This requirement makes them unattractive for deployment in application areas with power envelopes of sub-Watt or of very few Watts, which are generally referred to as the IoT or edge computing realm~\cite{Kariyappa,dazzi2021, NoisyNN}. Although several methods such as low precision quantization techniques and weight prunning~\cite{han2015deep,luo2017thinet} methods have been introduced to reduce the arithmetic complexity and memory requirement of DNN models and many digital accelerators proposed, the progress has been very limited due to the von-Neumann nature of the platforms these models are deployed on~\cite{Kariyappa,dazzi2021, NoisyNN}. The von-Neumann nature means there is a continuous need for data movement and communication between the memory and compute unit, leading to high latency and high energy cost~\cite{Kariyappa,dazzi2021}. Hence, there is a need for hardware accelerators that are fast, reliable, and energy-efficient as an alternative to these von Neumann digital hardware~\cite{NoisyNN,joshi}. This requirement has led to significant interest in analog accelerators, a form of analog computation which uses in-memory computing~\cite{Kariyappa,NoisyNN}. The interest in these accelerators can be attributed to the fact that they can potentially help perform matrix-vector multiplication, a significant computation load in DNN, with unprecedented speed and energy efficiency~\cite{dazzi2021, Fasoli2020, Kariyappa}. Leveraging on the physical characteristics of these resistant-based or charge-based memory devices and arranging them in a crossbar array configuration, a matrix-vector multiplication can be carried out with $O(1)$ time complexity using Ohm's and Kirchhoff's laws, compared to the $O(N^2)$ time complexity in digital accelerators~\cite{dazzi2021, Kariyappa, Fasoli2020}. With the computation happening in the memory unit, data transfer is substantially reduced, data parallelism is increased, and significant improvement in energy efficiency is achieved~\cite{Kariyappa,dazzi2021,Chen2020}. However, computation in analog accelerators is very imprecise due to the inherent presence of noise or variability such as device-to-device variability, write noise, and conductance drift~\cite{dazzi2021,Chen2020,Kariyappa}. This noise can severely impact the performance of DNN models, as demonstrated in~\cite{Fagbohungbe2020BenchmarkingIP,NoisyNN}. Therefore, there is a need to design DNN models with excellent noise-resistant property to minimize the impact of these noise on the model performance. To achieve this, there is a need to investigate and understand the impact of various model hyperparameters on the noise-resistant property of DNN models. This is critical as this could help maintain the delicate balance between the model inference performance and its noise-resistant property. Although many methods have been proposed to improve the noise-resistant property of DNN models~\cite{joshi,NoisyNN,Kariyappa}, the majority of these methods did not investigate the impact or leverage on model hyperparameters to achieve these goals. Hence, this research seeks to know if model hyperparameters affect a model noise-resistant property, and if they can be explored to design models that are more resistant to noise. Specifically, the impact of the learning rate on the resulting model noise-resistant property is investigated in this paper. The choice of learning rate is informed by its significant importance in the model training process as it determines if the model training process is going to converge and also the speed of convergence. Noise, either those inherently present in the training process or externally injected during the training process, has played a critical role in designing DNN models by helping the training algorithm converge to or close to the global minima. In fact, one of the popular methods to improve the noise-resistant property of DNN model is the noise injection method, which is injecting either the model input, model weight, or gradient of the model weight with noise during the forward propagation during training alone or in combination with other methods like knowledge distillation~\cite{joshi,NoisyNN,Kariyappa}. In fact, the default noise-resistant property of DNN models can be attributed to the inherent presence of noise in the training process in the form of an error term that has zero mean~\cite{Bjorck2018UnderstandingBN,Merolla2016DeepNN}. The zero mean value of the noise is due to the constant batch size during the training process. The error term is mathematically defined below in equation~(\ref{eequ4}) where $\alpha$ is the learning rate, $\nabla$ is the gradient, $ L_D(x)$ is the loss function over all the dataset, $ L_i(x)$ is the loss function for a single data point $i$, $\nabla L_{SGD}(x)$ is the estimated true loss gradient, and $B$ is the Batch size. This error term introduces some noise into the computed gradient of the weight, hence influencing the weights and properties of the resulting model. The upper bound of the noise of the gradient due to the error term is defined in equation (\ref{eequ7}) where $C$ is given in equation (\ref{eequ6})~\cite{Bjorck2018UnderstandingBN}. \begin{equation} \label{eequ4} \alpha \nabla_{SGD}(x)= \alpha \nabla L_D(x) + \frac{\alpha}{B}{\sum_{i \in B} ({\nabla L_i(x) - \nabla L_D(x)})} \end{equation} \begin{equation} \label{eequ7} E[\|{{\alpha\nabla L_B(x) - \alpha\nabla L_{SGD}(x)}}\|^2] < \frac{\alpha^2}{|B|}{C} \end{equation} \begin{equation} \label{eequ6} C=E[\|{{\nabla L_i(x) - \nabla L_D(x)}}\|^2] \end{equation} It can be inferred that the learning rate affects the power of the inherent noise present in the training process, which in turn influences the noise-resistant property of the resulting DNN model. Hence, there is a range of learning rate values that strikes the delicate balance between model inference performance and the model noise-resistant property. With other factors fixed, the learning rate value below the sweet spot reduces the power of the inherent noise, which potentially can lead to a model with low noise resistant value, long training time, and poor inference performance. Learning rate values greater than the sweet spot increase the power of the inherent noise, leading to a model with poor noise-resistant property and excellent model inference performance. Therefore, selecting the appropriate learning rate value influences the gradient noise, resulting in DNN models of excellent noise-resistant property and outstanding inference performance. To validate the postulations above, DNN models are trained with different learning rates, and the noise-resistant property of the resulting model is measured. The noise-resistant property is measured by injecting additive noise into all the model layers, and new inference accuracy due to the noise is measured and normalized using the model inference accuracy in the absence of noise. The normalized accuracy represents the degradation due to the injected noise. This paper makes the following contributions: \begin{enumerate} \item Provided theoretical analysis and insights on how learning rate affects the noise-resistant property of DNN models; \item Established that there is a range of learning rate values that maintains the delicate balance between model inference performance and model noise-resistant property; \item Discovered that for a fixed learning rate, the choice of model optimizer would impact the noise-resistant property of the resulting DNN model. \end{enumerate} The remainder of this paper is organized as follows: The detailed proposed methodology for this work is discussed in Section~\ref{sec:methods}. Results and analysis are presented in Section~\ref{sec:results}. Further discussions and related works are reviewed in Section~\ref{sec:discussion} and Section~\ref{sec:conclusion} concludes the paper. \begin{table*} \centering \caption{The details of the DNN models and dataset used in the experiments.} \label{table:details} \begin{tabular}{|*{6}{c|} } \hline Model Name & Dataset & Number of Classes & Model Input Dimension & \# Images per class\\ \hline\hline ResNet20 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600] \\ \hline ResNet32 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600]\\ \hline ResNet44 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600] \\ \hline ResNet56 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600]\\ \hline \end{tabular} \end{table*} \section{Proposed Methodology} \label{sec:methods} This section details the procedures followed in performing the various experiments to study the impact of the learning rate on the noise-resistant property of the DNN model. The discussion covers various headings such as dataset used, model design and training, software and hardware used. \subsection{Dataset} \label{subsec:ExpSetup} The CIFAR10 and CIFAR100 dataset~\cite{krizhevsky2009learning}, designed, compiled, and labeled by the Canadian Institute for Advanced Research out of the 80 million tiny images dataset, is used in this work. The datasets are very similar in that they contain colored images of dimension $32\times32\times3$ and are used for image classification tasks. Furthermore, they both contain 60,000 colored images, which can be sub-divided into 50,000 training images and 10,000 testing/inference images. The difference lies in that the CIFAR10 dataset contains images that can be grouped into ten mutually exclusive classes without any semantic overlap between the classes. However, the CIFAR100 contains images that can be grouped into 100 non-mutually exclusive classes with some form of semantic overlap as the dataset contain just 20 superclasses. \subsection{Model Design and Training} \label{subsec:ExpSetup} ResNet~\cite{resnet} model of various depths trained on CIFAR10 and CIFAR100 datasets as detailed in Table~\ref{table:details} is used in this work. ResNet models are a form of convolutional neural network based on the residual learning framework, which eases the training and optimization of deeper models. It achieves this by reformulating the constituent layers of a model as a learning residual function with reference to the layers inputs instead of learning unreferenced function~\cite{resnet}. The choice of ResNet models is influenced by their popularity and excellent performance on various classification tasks of varying complexity. Furthermore, the models used in this work are trained from scratch until convergence is achieved by minimizing the cost function, which is the categorical cross-entropy. The cost function minimizes the error between the ground truth and the predicted label. This is achieved using the glorot-uniform method as an initializer, Adams optimization algorithm as the optimizer, and performing Data augmentation during training to prevent overfitting. \begin{table*} \centering \caption{Comparison of the baseline inference accuracy of DL models trained with learning rate of 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150 using CIFAR10 and CIFAR100 dataset without noise injection to the weights of the trained model during testing. The performance metric is the model classification accuracy.} \label{tab:result_baseline} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline {Dataset}& \multicolumn{6}{|c|}{CIFAR10}& \multicolumn{6}{|c|}{CIFAR100}\\ \hline & \multicolumn{6}{|c|}{Learning Rate}& \multicolumn{6}{|c|}{Learning Rate}\\ \hline {Model Name} & {0.0005} & {0.000625} & {0.000725}& {0.001} & {0.00125} & {0.0015} & {0.0005} & {0.000625} & {0.000725}& {0.001} & {0.00125} & {0.0015}\\ \hline {Resnet\_20} & {91.11\%} & {91.39\%}& {91.87\%}& {91.27\%} & {91.53\%}& {91.49\%} & {65.22\%} & {66.05\%} & {66.79\%}& {66.89\%} & {67.37\%} & {68.37\%}\\ \hline {Resnet\_32} & {91.51\%} & {92.13\%}& {91.18\%}& {91.72\%} & {89.471\%}& {91.54\%} & {67.78\%} & {68.27\%} & {68.60\%}& {69.39\%} & {68.70\%} & {67.68\%}\\ \hline {Resnet\_44} & {92.11\%} & {92.63\%}& {92.26\%}& {92.24\%} & {91.62\%}& {91.23\%} & {68.69\%} & {69.36\%} & {70.07\%}& {69.38\%} & {69.57\%} & {68.77\%}\\ \hline {Resnet\_56} & {92.24\%} & {92.62\%}& {92.39\%}& {91.94\%} & {91.75\%}& {91.72\%} & {69.10\%} & {69.93\%} & {70.01\%}& {69.79\%} & {69.82\%} & {68.79\%}\\ \hline \hline \end{tabular} \end{table*} \subsection{Model Training Stage} \label{sec:training} The four DL models, namely, ResNet20, ResNet34, ResNet44 and ResNet56 are trained from scratch using six different learning rates (0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150) until convergence. This results in 24 trained models for each dataset. \subsection{Model Inference stage} \label{sec:inference} The performance of the various models trained in section \ref{sec:training} in the absence and presence of noise is evaluated in this section using the appropriate metrics in order to understand the impact of learning rate on model noise-resistant property. The performance metric of the models in this work is the model inference accuracy (\%), as all the models under consideration are classification models. The inference accuracy of the models in the absence of noise is the baseline inference value of the models, and it is essential in order to calculate the performance degradation due to the presence of noise measured using the normalized inference accuracy defined in equation (\ref{equ4}). To measure the performance of the models in the presence of noise, noise is injected into all the model layers. The noise in this work is modeled as white additive Gaussian noise of zero mean and a standard deviation of $\sigma_{noise}$, which is also defined as the power/energy of the noise. The value of $\sigma_{noise}$ of a noise added to a particular layer is selected using the signal to noise ratio ($SNR$) or noise form factor (${\eta}$) and the standard deviation of the weights in that layer as defined in equations (\ref{equ1}) - (\ref{equ3}). An additive Gaussian noise of zero mean and $\sigma_{noise}$ value equivalent to the noise form factor of 1\%, 5\%, 10\%, 20\%, 30\%, and 40\% is injected into all the model weights to evaluate the model noise-resistant property in this paper. It should be noted that the model baseline value, which is the model performance in the absence of noise, is equivalent to additive Gaussian noise of zero mean and ${\eta}$ value of zero, and it is denoted by $a_o$. \begin{equation} \label{equ1} {\sigma_{noise}}=\frac{\sigma_w}{SNR} \end{equation} \begin{equation} \label{equ2} {\eta}=\frac{1}{SNR} \end{equation} \begin{equation} \label{equ3} {\sigma_{noise}}={\eta}\times{\sigma_w} \end{equation} \newcommand{\comment}[1]{} \begin{figure*}[htbp] \centering \includegraphics[width=18cm]{fig/Figure1_lr.pdf} \caption{The comparative study of noise resistant property of various models trained with CIFAR10 dataset with learning rate of values 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150, respectively. The noise resistant property is measured with Normalized Test Accuracy. The figure shows the plot of noise form factor against the Normalized Test Accuracy for ResNet20 (top left), ResNet32 (top right), ResNet44 (bottom left), and ResNet56 (bottom right), respectively. Noise form factor of 0 is equivalent to when no noise is injected into the models.} \label{cifar10NormalizedImage} \end{figure*} After that, the impact of the noise is evaluated by measuring the new inference accuracy value of the DNN model on the test dataset. This is done for each of the six noise form factor values of 1\%, 5\%, 10\%, 20\%, 30\%, and 40\%, respectively, and for all the variants of each of the DNN models in Table~\ref{table:details}. The variants are because of the use of different learning rate values of 0.0005, 0.000625, 0.00075, 0.001, 0.00125, and 0.00150, respectively, to train each of the DNN models. It should be noted that the steps to calculate the inference accuracy due to the presence of white noise of $\sigma_{noise}$ value of $X$ is repeated multiple times due to the stochastic nature of the noise and average calculated as stated in equation (\ref{avg}) where $a_i$ is the inference accuracy at instant $i$ and $N$ is the number of times the experiment is performed. Furthermore, the inference accuracy due to the presence of noise is then normalized using the baseline inference accuracy value to get the normalized inference accuracy as stated in equation (\ref{equ4}) where ${A^x}$, ${a^x}$, and ${a}_o$ are the normalized classification accuracy, classification accuracy due to the presence of noise of $\eta$ value of $x\%$, and the baseline classification accuracy respectively. The normalized inference accuracy is essential as it is a fairer way of comparing the performance of the various DNN models due to noise as it captures the percentage change in model inference accuracy. \begin{equation} \label{avg} {a^{x}}=\frac{\sum\limits_{i=1}^{N} a_i}{N} \end{equation} \begin{equation} \label{equ4} {A^x}=\frac{{a^x}} {{a}_o} \\ \end{equation} \subsection{Software and Hardware} \label{subsec:ExpSetup} All the models used in this work are trained and tested using Keras deep learning framework installed on the NVIDIA V100-DGXS-32GB GPU. \section{RESULTS and ANALYSIS} \label{sec:results} \begin{figure*}[htbp] \centering \includegraphics[width=18cm]{fig/Figure2_lr.pdf} \caption{The comparative study of noise resistant property of various models trained with CIFAR100 dataset with learning rate of values 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150, respectively. The noise resistant property is measured with Normalized Test Accuracy. The figure shows the plot of noise form factor against the Normalized Test Accuracy for ResNet20 (top left), ResNet32 (top right), ResNet44 (bottom left), and ResNet56 (bottom right), respectively. Noise form factor of 0 is equivalent to when no noise is injected into the models.} \label{cifar100NormalizedImage} \end{figure*} The noise-resistant property of various models trained with different learning rate values in section \ref{sec:methods} is compared in this section. The noise-resistant property is evaluated by injecting analog noise into all the model layers and evaluating the resulting inference accuracy and the normalized inference accuracy. \begin{table*} \centering \caption{Comparison of the average normalized inference accuracy of ResNet20, ResNet32, ResNet44, and ResNet56 models trained with learning rate values of 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150 with CIFAR10 and CIFAR100 dataset. The average normalized accuracy is defined in equation (\ref{equu}).} \label{tab:result_summary} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline {Dataset}& \multicolumn{6}{|c|}{CIFAR10}& \multicolumn{6}{|c|}{CIFAR100}\\ \hline & \multicolumn{6}{|c|}{Learning Rate}& \multicolumn{6}{|c|}{Learning Rate}\\ \hline {Model Name} & {0.0005} & {0.000625} & {0.000725}& {0.001} & {0.00125} & {0.0015} & {0.0005} & {0.000625} & {0.000725}& {0.001} & {0.00125} & {0.0015}\\ \hline {ResNet20} &{72.28\%} & {71.93\%} & {71.57\%}& {68.15\%} & {60.87\%} & {55.26\%} & {51.77\%} & {53.81\%} & {52.50\%}& {53.30\%} & {45.50\%} & {41.36\%}\\ \hline {ResNet32} & {74.36\%} & {75.53\%} & {68.90\%}& {60.67\%} & {53.72\%} & {38.48\%} & {54.02\%} & {55.60\%} & {53.87\%}& {39.11\%} & {32.14\%} & {17.84\%}\\ \hline {ResNet44} & {71.80\%} & {72.61\%} & {65.09\%}& {35.23\%} & {43.93\%} & {30.48\%} & {57.52\%} & {56.97\%} & {55.20\%}& {24.79\%} & {17.67\%} & {14.17\%}\\ \hline {ResNet56} & {72.67\%} & {62.81\%} & {59.81\%}& {42.24\%} & {26.47\%} & {25.93\%} & {58.83\%} & {55.38\%} & {39.45\%}& {25.83\%} & {3.67\%} & {15.67\%}\\ \hline \hline \end{tabular} \end{table*} \subsubsection{Baseline Performance} \label{sec:baseline} Table \ref{tab:result_baseline} presents the baseline inference accuracy of the DNN models given in Table~\ref{table:details}. The baseline inference accuracy is obtained when evaluating trained DNN models on the testing dataset without noise, equivalent to injecting with Gaussian noise of zero mean and zero standard deviation. The baseline inference accuracy of a DNN model trained on CIFAR10 is higher than that of the corresponding DNN model trained on CIFAR100. The higher number of classes and the classes' overlapping nature mean that the classification task on the CIFAR100 dataset is more complex than the one on the CIFAR10 dataset. Furthermore, the reduction in the number of data per class for the CIFAR100 dataset and the small dimensions of the image means that the performance of the DNN models is limited. Also, It can be observed that for both CIFAR10 and CIFAR100 datasets, the use of lower or higher value of the learning rate did not substantially give any performance advantage to the trained DNN models. For example, the ResNet20 model has a baseline inference value of 91.11\%, 91.39\%, 91.87\%, 91.27\%, 91.53\% and 91.49\% for learning rate value of 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150 respectively. A similar observation is also made for ResNet20 trained on the CIFAR100 dataset with a baseline inference value of 65.22\%, 66.05\%, 66.79\%, 66.89\%, 67.37\%, and 68. 37\% for learning rate values of 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150 respectively. It must be noted that a higher learning rate confers an advantage in that the training process is faster, although the weight might end up at the saddle point or the local minimum. This observation is also true for ResNet33, ResNet44 and ResNet56 models. \subsubsection{Performance in the presence of Analog noise} \label{sec:noise_performance} The impact of the learning rate on the noise-resistant property of a DNN model is analyzed by comparing the normalized inference accuracy of the six variants of the same DNN model architecture obtained when trained with different learning rates. The normalized learning rate is used to fairly capture the percentage change in model inference accuracy due to the noise. Figures \ref{cifar10NormalizedImage} and \ref{cifar100NormalizedImage} show the normalized inference accuracy due to the injected noise for ResNet20, ResNet32, ResNet34, and ResNet56 models trained with different learning rate as stated in section \ref{sec:training} using CIFAR10 and CIFAR100 datasets, respectively. It can be observed that the normalized inference accuracy, which is a measure of the noise-resistant property of the DNN model, decreases with the noise form factor, which is a measure of the power of the injected noise. Furthermore, the degradation in the model's performance also occurred gracefully, speaking to the noise-resistant property of DNN models. This observation is the same irrespective of the model's type, the classification task's complexity, and the learning rate used in training the model, although the degradation rate varies. The observation can be attributed to the stronger tendency of the noise to corrupt the model weight due to its higher magnitude, which increases with an increase in noise power/noise form factor. For a variant of ResNet56 trained with a learning rate of 0.0.00075 on the CIFAR100 dataset, normalized accuracy value of 98.34\%, 88.81\%, 80.91\%, 53.32\%, 25.25\%, and 12.27\% is obtained when the model is injected with the noise of noise form factor of 1\%, 5\%, 10\%, 20\%, 30\%, and 40\%, respectively. A normalized accuracy value of 91.12\%, 63.87\%, 56.98\%, 18.33\%, 4.29\%, and 2.09\% is also obtained when the same model, trained and tested with CIFAR100 dataset, is injected with the noise of noise form factor of 1\%, 5\%, 10\%, 20\%, 30\%, and 40\%, respectively. \begin{figure}[htbp] \centering \includegraphics[width=9.5cm]{fig/Fi.pdf} \caption{ Comparative study of the effect of different optimizers (with or without adaptive learning rate) on model inference performance and model noise-resistant property using ResNet20 trained on CIFAR10 dataset. The optimizers used are SGD, SGD with momentum, SGD with Nesterov momentum, and Adam, Nadam, and AdamX algorithms. The model inference performance is measured using the baseline inference accuracy, and the model noise-resistant property is measured using the average normalized accuracy as defined in equation (\ref{equu}). } \label{adaptive} \end{figure} \subsubsection{Impact of Different Learning Rates with Adam Optimizer} \label{sec:BatchNorm} The noise-resistant property of the variants of each of the DNN models, under consideration in this work, is compared in this section. The performance of the variants, obtained by training the same model architecture with different learning rates, when injected with additive Gaussian noise and measured using the normalized inference accuracy is shown in Figures \ref{cifar10NormalizedImage} and \ref{cifar100NormalizedImage}. It can be observed that the noise-resistant property of a DNN model of specific architecture is affected by the learning rate. The observation holds for all the DNN models irrespective of learning rate values and datasets the models are trained on. For example, a normalized inference accuracy value of 95.93\%, 96.17\%, 94.78\%, 85.35\%, 84.93\%, and 80.52\% is obtained for ResNet20 models trained on CIFAR10 dataset with learning rate of 0.0005, 0.000625, 0.00075, 0.001, 0.00125 and 0.00150 respectively when injected with Gaussian noise of noise form factor of 10\%. This trend is also observed for variants of ResNet20 DNN model trained on CIFAR100 dataset trained with learning rates of 0.0005, 0.000625, 0.00075, 0.001, 0.00125, and 0.00150, which has normalized inference accuracy values of 76.55\%, 81.26\%, 79.43\%, 83.33\%, 58.78\%, and 52.48\% when injected with additive Gaussian noise of noise form factor of 10\%. This shows that the noise-resistant property of a DNN model can be tuned by varying the learning rate without compromising too much on the model performance. A new metric, average normalized inference accuracy, defined in equation (\ref{equu}) is used to summarize the performances of the variant of each model in the presence of noise and stated in Table \ref{tab:result_summary} where $A_i$ is the normalized inference accuracy at a noise form factor, and $N$ is the number of non-baseline noise factor which is 6. \begin{equation} \label{equu} A_{avr}=\frac{\sum\limits_{i=1}^{N} A_i}{N} \end{equation} Table \ref{tab:result_summary} shows that the learning rate that gives the best performance in the presence of analog noise varies from one model to another. While the learning rate value of 0.0005 gives the best noise-resistant property for ResNet20 and ResNet56 trained on the CIFAR10 dataset, the learning rate value of 0.000625 gives the best noise-resistant property for ResNet32 and ResNet44 trained on the CIFAR10 dataset. This observation also applies to these models trained on the CIFAR100 dataset, where the learning rate value of 0.000625 gives the best performance for ResNet20 and ResNet32, and the learning rate of 0.0005 gives the best noise-resistant property for ResNet44 and ResNet56. \begin{figure*}[htbp] \centering \includegraphics[width=18cm]{fig/final.pdf} \caption{The plot shows the tradeoff between model inference performance and its noise-resistant property as the learning rate is increased for CIFAR10 (left) and CIFAR100 (right) for ResNet20 and ResNet32. The model inference accuracy is measured using the baseline inference accuracy, and the model noise-resistant property is measured using the average normalized accuracy as defined in equation (\ref{equu}).} \label{tradeoff} \end{figure*} \subsubsection{Impact of Different Optimizers (with or without adaptive learning rate)} \label{sec:BatchNorm} A comparison study of the noise-resistant property of DNN models trained with adaptive learning rate and fixed global learning rate is done in this section. This is done by training the ResNet20 model with a global learning rate of 0.0.00075 using SGD, SGD with momentum, SGD with Nesterov momentum, Adam, Nadam, and AdamX optimizer. The Adam, Nadam, and AdamX optimizers are types of adaptive learning rate, as they use localized learning rate for each parameter during training compared with SGD, SGD with momentum, and SGD with Nesterov momentum that uses fixed and equal learning rates for all parameters. The result of our comparative study is shown in Figure \ref{adaptive} which shows a plot of baseline inference accuracy and average normalized accuracy for ResNet20 model trained using a global learning rate value of 0.0.00075 using the selected optimizers. It can be observed that the different optimizers do affect both the model inference performance and its noise-resistant property. The result showed that the ResNet20 model has a baseline inference accuracy value of 68.51\%, 87.09\%, 86.65\%, 91.87\%, 91.57\%, 89.47\% using SGD, SGD with momentum, SGD with Nesterov momentum, Adam, Nadam and AdamX optimizers, respectively. Average normalized accuracy of 52\%, 60\%, 60\%, 72\%, 70\%, and 68\% are also obtained for the resulting ResNet20 model trained using SGD, SGD with momentum, SGD with Nesterov momentum, Adam, Nadam, and AdamX optimizers, respectively. The result shows that the models with adaptive learning rates have better model inference performance and noise-resistant property than models with fixed learning. The improved performance might be due to the dependence of the effective local learning rate in the adaptive learning rate algorithm on the past learning rate, which increases the learning rate used for training. This means that the power of the gradient noise present during training is higher for adaptive learning rate scenarios as the resulting learning rate influences the power of the noise. \subsubsection{Tradeoff between Prediction Accuracy and Model Noise Resistant Property} \label{sec:BatchNorm} The plot of baseline inference accuracy for ResNet20 in the absence of noise and normalized inference accuracy for ResNet20 due to the injection of the noise of noise form factor of 10\% for learning rate values of 0.0005, 0.000625, 0.00075, 0.001, 0.00125, and 0.00150 is shown in Figure~\ref{tradeoff}. The table shows that at a learning rate value of 5e-5 and lower, the model inference performance measured using the baseline inference accuracy and the noise-resistant property when injected with the noise of noise factor of 10\% is adversely affected. This learning rate region is not desirable even if the noise-resistant property is perfect as the baseline inference performance is poor. At a learning rate value of 1e-3 and above, improved inference performance is obtained as measured by the baseline inference accuracy. However, the noise-resistant property of the model as measured by the normalized inference accuracy trends downward with an increase in the learning rate. This region is desirable if an excellent noise-resistant property is not desired as the baseline inference accuracy value is good. However, the need for excellent noise-resistant property for analog devices means that this region is not desirable as this property is the most desirable as training models in this region might be faster. The region with great noise-resistant property and excellent inference performance are the most desirable for analog hardware as this region finds a balance between performance and noise-resistant property. This desired region is the region with a learning rate value between 0.0005 and 0.001 in Figure \ref{tradeoff} for ResNet20 as the baseline inference accuracy, and normalized inference accuracy is high in this region, finding a balance between performance and noise-resistant property is achieved. The three regions establish that changing the learning rate also impacts the noise-resistant property and inference performance of the DNN model. Hence, there is a need to select the learning rate value in the region where there is a balance between model performance and model noise-resistant property. \subsubsection{Impact of Task Complexity on Model Noise Resistant Property} \label{sec:complexity} Table \ref{tab:result_summary} showed that the average normalized inference accuracy of DNN models due to the injection of noise into the model weight is affected by the complexity of the task. The table showed that ResNet20, ResNet32, ResNet44, and ResNet56 trained on the CIFAR10 dataset with a learning rate of 0.000625 has an average normalized inference accuracy of 71.93\%, 75.53\%, 72.61\%, and 62.81\%, respectively. These values are higher than 53.81\%, 55.06\%, 56.97\%, and 55.38\% normalized inference accuracy values obtained for the same models trained on the CIFAR100 dataset. This performance gap is noticed irrespective of the DNN model type and the learning rates the models are trained with. These show that the complexity of the model's task strongly influences its performance in the presence of Gaussian noise as the CIFAR100 dataset is a more complex classification task than CIFAR10. The complexity of the CIFAR100 dataset is because it contains 100 classes, with most of the classes overlapping compared to the ten non-overlapping classes in the CIFAR10 dataset. \section{Related Works and Discussions} \label{sec:discussion} Learning rate is the most critical hyperparameter for stochastic gradient-based optimization problems as it influences if convergence is possible and the rate of convergence. It works by influencing the size of the steps to take in the direction of the negative gradient of the parameters to be estimated. Therefore, there is a need to find an effective method to select and design an appropriate value for the learning rate at each iteration. This need has given rise to many heuristics for estimating a reasonable learning rate at each iteration by either increasing the learning rate when suitable or decreasing the learning rate when near a local minimal~\cite{zeiler2012adadelta}. For example, the authors in \cite{Robbins2007ASA} introduced a learning rate annealing method, a method that automatically reduces the size of the learning rate based on the number of epoch. It is also possible to decrease the learning rate when the validation accuracy appears to have plateaus~\cite{zeiler2012adadelta}. These approaches are critical to prevent the parameter values from oscillating back and forth around the minimal. Also, there is a recent paradigm that involves allowing the global learning rate to cyclically vary between reasonable boundary values during training~\cite{smith2017cyclical}. This method automatically eliminates the need to tune the learning rate and needs no extra calculation. In recent times, there has been an introduction of adaptive learning rate~\cite{schaul2013pesky,gulcehre2017robust} such as Adam~\cite{kingma2017adam}, Adadelta~\cite{zeiler2012adadelta}, RMSprop, etc. instead of a global learning rate, and this new method can be used in combination with the Cyclical Learning Rates. The need for an adaptive learning rate is because different dimensions in the model parameter vectors interact with the cost function in entirely different ways, and using a localized learning rate for this dimension can significantly improve the training process. Also, the authors in ~\cite{smith2018superconvergence} demonstrated the use of a large learning rate to achieve improved speed and performance. The authors argued that a large learning rate provides some form of regularization for model training when other forms of regularization are reduced to maintain an optimal balance in regularization. The work in~\cite{jastrzebski2018factors} also showed that learning rate in conjunction with the batch size and gradient covariance influences the minima found by SGD during model training. The need to design models with excellent noise-resistant properties for deployment on analog accelerators has led to studies on noise-resistant properties of popular DNN models and also novel methods to design and train models with excellent noise-resistant properties~\cite{Fagbohungbe2020BenchmarkingIP,joshi}. The authors in ~\cite{joshi} and ~\cite{Kariyappa} proposed the use of additive and multiplication noise injection methods, respectively, to increase the noise-resistant property of DNN models. These noise injection methods are also combined with knowledge distillation to achieve even better noise-resistant property in~\cite{NoisyNN}. Also, the impact of Batch Normalization on the noise-resistant property of DNN models is investigated, and a novel DNN design and training method that finds a balance between model inference performance and model noise-resistant property is proposed in \cite{BatchNorm2020}. A comparative performance of various BatchNorm types on the model noise-resistant property is also done in \cite{bay1}. A method that conditions DNN models by exposing them to a noisy computation environment are proposed in~\cite{Bo,schmid} and a chip in the loop method that adapts pre-trained model weights for the inference only chip is introduced in~\cite{NeuroSmith}. The use of generalized fault aware pruning technique to improve model resilience to hardware fault is also discussed in~\cite{Zhang2019}. The use of error correction code~\cite{Upadhyaya2019ErrorCF} only or in combination with other methods such as reinforcement learning~\cite{huang2020functional} can also be used to ensure models are resistant to fault during computation. This work is different from existing work on learning rate as it does not propose new ways of selecting learning rate values~\cite{schaul2013pesky} or design learning rate for model training~\cite{smith2017cyclica,kingma2017adam}. To the best of our knowledge, it is the first paper to investigate the impact of the learning rate on the noise-resistant property of DNN models. This work is significant as the noise-resistant property of DNN models can be tuned by increasing/decreasing the learning rate. This paper shares some similarities with~\cite{joshi, NoisyNN} in that computational noise is modeled as analog noise. It is still very different as this research did not explore the use of external analog noise to improve the DNN model noise-resistant property as done in those works. Furthermore, the insight from this work can help select appropriate learning rate values that maintain the delicate balance between model inference performance and its noise-resistant property. It is also very different from the work in ~\cite{Upadhyaya2019ErrorCF,Zhang2019,huang2020functional} where model noise is modeled as digital noise. \section{{Conclusion}} \label{sec:conclusion} The impact of the learning rate on the analog noise-resistant property of DNN models is studied in this work. The finding is significant because the learning rate is a critical model training hyperparameter. The study is achieved by training DNN models with different learning rates and comparing the resulting models' inference performances when analog noise is injected (additive white Gaussian noise) into the model parameters. The experimental results demonstrate that the choice of learning rate value and the optimizer type significantly impact the noise-resistant property of DNN models. Specifically, this work established a range of learning rate values that maintain the delicate balance between model prediction accuracy and model noise-resistant property. At a learning rate value below this range of values, the model inference performance and noise resistant property are adversely affected. At a learning rate value above this range, the resulting model has excellent model inference performance but poor noise-resistant property. In addition, through theoretical analysis of the model training process, it is clear that the impact of learning rate on the model noise-resistant property is due to its influence on the inherent noise present in the model training process, which is responsible for the noise-resistant property of DNN models. \section{Acknowledgments} \label{acknowledgement} This research work is supported by the U.S. Office of the Under Secretary of Defense for Research and Engineering (OUSD(R\&E)) under agreement number FA8750-15-2-0119. 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 the Office of the Under Secretary of Defense for Research and Engineering (OUSD(R\&E)) or the U.S. Government. \bibliographystyle{IEEEtran} \section{Introduction} \label{sec:Introduction} Deep learning (DL)~\cite{deeplearning} has revolutionised the field of Artificial intelligence as it has successfully gained widespread traction and achieve impressive progress in various real-life and notorious difficult applications such as computer vision~\cite{resnet}, speech recognition\cite{Graves2013SpeechRW}, machine translation\cite{Sutskever2014SequenceTS}, autonomous driving, anomaly detection etc. The progress was achieved by advancing the state-of-the-arts and surpassing human-level performance in cognitive applications. The unprecedented performance and resurgence of deep learning in recent years can be attributed to large scale dataset, high-performance hardware, algorithmic and architectural techniques~\cite{Kingma2015AdamAM,Relu, Sutskever13} and more sophisticated optimization methods~\cite{noh2017regularizing}. Batch normalisation,BatchNorm~\cite{Ioffe2015BatchNA},a popular method used in designing deep learning model for research and real life application by default ,is one of the new techniques.The popularity can be attributed to its ability to ease model training and achieving faster convergence by enabling the use of bigger learning rate, reduce model sensitivity to initialization and also acts a regularizer\cite{Ioffe2017BatchRT, Ioffe2015BatchNA,Wu2019L1B}. It achieves these by increasing the network with an extra layer before the activation that aims to stabilize the mini-batch input distribution to a given network layer during training~\cite{Santurkar2018HowDB}.BatchNorm also stabilizes the training process by controlling and setting the first two moments (mean and variance) of the distribution of each activation to be zero and one respectively\cite{Santurkar2018HowDB, Qiao2019MicroBatchTW}. Furthermore, it preserves the model expressivity by normalizing, scaling and shifting of the batch input based on the trainable parameters~\cite{Santurkar2018HowDB}. Batch normalisation plays an important role in training models that are particularly deep by help reduce internal covariate shift (ICS)\cite{Ioffe2015BatchNA}. \begin{figure}[htbp] \centering \includegraphics[width=8.6cm]{fig/HardwareNoiseV1.png} \caption{Noise induced performance degradation of hardware implemented deep learning models } \label{fig:Hardwareerrorinducedperformancedegradation} \end{figure} Deep learning model still require high computational and energy resource during training/testing as the model's fundamental extremely resource intensive operation has remained largely the same despite huge improvement in model design~\cite{mixedsignal,Li,joshi,charan}. The is further exacerbated by large increase in the number of fundamental operation and required memory size as the model gets deeper and wider, which is common in modern deep learning models\cite{resnet}. Furthermore, the data intensive nature of their operations means that deep learning models also need larger memory and memory bandwidth in order to achieve reasonable performance.Hence, this models are not well suited for deployment on devices with limited performance and power budget\cite{NoisyNN,mixedsignal}. With CMOS technology approaching its limit, DL models and required data are stored in the off-chip memory leading to presence of a memory wall~\cite{xiao}, as the GPU and CPU do not have enough memory resource to store them. The presence of the memory wall, a physical separation between the processing unit and the memory, leads to high energy consumption and high latency as there is always a constant shuttle between the memory and the processing unit for data access~\cite{xiao,joshi}. The above mentioned factors and the desire to deploy DL models at the edge are fueling the demand for specialised, in-memory computing hardware which operates within a tight computational resource and power envelope for model inferencing~\cite{Li}. This specialised hardware must be fast,energy efficient, reliable and accurate\cite{joshi,mixedsignal}. This tight requirement and advances in analog-grade dense non-volatile memories~\cite{MahmoodiAnalog} is propelling a significant interest in analog specialized hardware for DL inferencing\cite{NoisyNN}. Analog hardware represents digital values in analog quantities like voltages or light pulses and performs computation in analog domain~\cite{NoisyNN}. This form of computation is cheap and projects a 2X performance improvement over digital hardware in speed and energy efficiency~\cite{Ni,Shen_2017} as they can achieve projected throughput of multiple tera-operations (TOPs) per seconds and femto-joule energy budgets per multiply-and-accumulate (MAC) operation~\cite{charan,Bennett2020,Burr,marinella}. Although there are several types, the electronic analog hardware, a form of in-memory computing which encodes network parameters as analog values using non-volatile memory(NVM) crossbar arrays, are the most common. These crossbar arrays enjoy multi-level storage capability and also allow a single time step matrix-vector multiplication to be perform in parallel~\cite{xiao,NoisyNN} and the addition operation is achieved by simply connecting two wires together where the current add linearly based on Kirchhoff's current law~\cite{NoisyNN,xiao,MITTAL2020101689,joshi}. However, analog accelerators are imprecise as they do not enjoy bit-exact precision digital hardware. Furthermore, computation in analog hardware is also very noisy which can lead to degradation in performance of deep learning model or failure during inferencing\cite{mixedsignal,NoisyNN}, as shown in Figure~\ref{fig:Hardwareerrorinducedperformancedegradation}. The factors contributing to computation noise in analog hardware are thermal noise, quantization noise, circuit non-linearity, and device failure~\cite{mixedsignal} etc. Some of these factors are hard to control and can significantly affect the reliability of DL models or limit their performance despite the known robustness of DL models to analog noise~\cite{Merolla2016DeepNN}. The effect of these factors on the performance of deep learning model was investigated in~\cite{Fagbohungbe2020BenchmarkingIP}. The systematically study of Batch Normalisation on the noise resistant characteristics of DL models implemented in analog accelerators is carried out in this work. Specifically, the performance of trained deep learning model for image classification task with/without the batch normalisation layer in the presence of analog noise is investigated.This is achieved by adding noise of a particular power to the model and measuring the impact on the classification accuracy. There after, a comparison study is performed between the model with and without batch normalisation. The analog noise in this work is modelled as an additive gaussian noise which is added to the parameters of the model. The remainder of this paper is organized as follows: The methodology used for this work is discussed in Section~\ref{sec:methods}. Experimental results and analysis are given in Section~\ref{sec:result}. Further discussions and related works are reviewed in Section~\ref{sec:discussion}. Section~\ref{sec:conclusion} concludes the paper. \section{Methodology} \label{sec:methods} The methodology to study the effect of batch normalisation layer on the inherent resistance characteristics of deep learning models to analog noise is discussed in this section. Deep learning models for image classification task are only used for this work. Hence, the performance metric for this work is the classification accuracy (\%), a common metric for deep learning models for image classification task. The proposed methodology can be divided into training and testing stages. \subsection{Training Stage} \label{sec:training} A deep learning model with batch normalised layers is trained using the selected dataset from scratch. The deep learning model architecture is designed such that there is one batch normalisation layer after every convolutional and fully connected layer in the model. The model is trained until convergence is achieved and this model is considered the baseline model. After wards, the same deep learning model without the batch normalisation is trained from scratch until convergence is achieved. If the model convergence is not achieved, the model architecture is modified slightly by inserting a minimum number of batch normalisation layer required for convergence to be achieved. This minimum number varies from one model to another, hence a trial and error method is used to determine it. A choice of trial and error method to determine this minimum number of batch normalisation layer(s) need to achieve convergence for a particular model is informed by the non-trivial nature of the problem. \subsection{Inference stage} \label{sec:inference} The inference performance of the models obtained from section \ref{sec:inference} in the presence of analog noise is investigated in this section. The analog noise is modeled as additive white gaussian noise which is added to the model weight. The weight of the model due to the presence of noise is represented in the equation \ref{equ1} below. \begin{table*} \centering \caption{The details of the DL models and dataset used in the experiments.} \label{table:details} \begin{tabular}{|*{6}{c|} } \hline Model Name & Dataset & Number of Classes & Model Input Dimension & \# Images per class\\ \hline\hline ResNet\_18 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600] \\ \hline ResNet\_34 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600]\\ \hline ResNet\_44 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600] \\ \hline ResNet\_56 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600]\\ \hline VGG\_16 & [CIFAR10, CIFAR100] & [10,100] & 32*32*3 & [6000,600]\\ \hline \end{tabular} \end{table*} The white gaussian noise is used in this work is of zero mean and a standard deviation of $\sigma_{noise}$,which is the represents the energy of the noise. The value of $\sigma_{noise}$ is calculated using equation \ref{equ1} below where $SNR$ is the signal to noise ratio and $\sigma_w$ is the the standard deviation of the weights in a layer. \begin{equation} \label{equ1} {\sigma_{noise}}=\frac{\sigma_w}{SNR} \end{equation} Equation \ref{equ3} is obtained by substituting equation \ref{equ2} into equation \ref{equ1} where $\eta$ is defined as a noise form factor. \begin{equation} \label{equ2} {\eta}=\frac{1}{SNR} \end{equation} \begin{equation} \label{equ3} {\sigma_{noise}}={\eta}\times{\sigma_w} \end{equation} The $SNR$ values of the standard deviation of the gaussian noise used in this work value are 100, 10, 5, and 2.5. These $SNR$ values are equivalent to Gaussian noise of zero mean and standard deviations equivalent to 1\%, 10\%, 20\%, and 40\% form factor of the standard deviation of the weights of a particular layer $\sigma_w$. The models with batch normalisation obtained in section \ref{sec:training} above is put in inference mode and the performance of the model on the test dataset is evaluated in order to obtain the model classification accuracy. The classification accuracy obtained for the model without the analog noise ($\eta$=0) is the baseline inference accuracy for the model. The additive gaussian noise of zero mean and the desired standard deviation equal to 1\% of the $\sigma_w$ at a layer 1 is added to weights in layer 1 of the model. This is equivalent to $SNR$ value of 100\% and $\eta$ value of 1\%. This procedure is repeated for all the layers in the model until noise is added to all the weights in the model. The performance of the model with the new weight is then evaluated using the test dataset to obtain the inference classification due to the noise. The procedure above for a fixed value of $\eta$ is then repeated multiple times and the average inference classification accuracy recorded. The average classification accuracy due to the present of the noise is then normalised with the baseline inference classification accuracy using the formulae in equation \ref{equ4}. \begin{equation} \label{equ4} A_1=\frac{a_1}{a_o} \end{equation} where $a_o$ are the baseline classification accuracy, $A_1$ and $a_1$ are the normalized classification accuracy and average classification accuracy due to the present of noise of $\eta$ value of $1$. These procedures are then repeated for $\eta$ values of 10\%,20\%,30\% and 40\% and the corresponding average and normalised classification accuracy noted. The procedure above is then repeated with the model without batch normalisation layer for the same $\eta$ values above and the corresponding classification accuracy recorded. \section{Experiment details} \label{sec:result} \subsection{Dataset} \label{subsec:ExpSetup} The CIFAR10 and CIFAR100 datasets are used for the classification task in this paper and the details about the dataset are provided in Table~\ref{table:details}. CIFAR10 and CIFAR100 datasets are labelled datasets that are part of 80 million tiny images datasets. Furthermore, each datasets contains 60,000 images divided into 50,000 training and 10, 000 testing datasets.The images in the dataset are of dimension $32\times32\times3$. The images in CIFAR10 dataset can be grouped into 10 classes, with each class containing 5000 training images and 1000 testing images. The classes are mutually exclusive as there is no semantic overlap between the classes. The CIFAR100 dataset contains images that can be grouped into 100 classes with each class containing 500 training images and 100 testing images. The classes in the CIFAR100 dataset are not mutually exclusive and it can be said that there is some form of semantic overlap as the dataset contain 20 superclass. \subsection{Model Design and Training} \label{subsec:ExpSetup} The models used for this work are stated in \ref{table:details} and they are all used for image classification task. The models can generally grouped into ResNet and VGG16 models. ResNet models are form of convolutional neural network based on the residual learning framework which eases the training and optimisation of deeper models. It achieves this by reformulating the constituent layers of a model as learning residual function with reference to the layers inputs instead of learning unreferenced function~\cite{resnet}. The VGG16 is also a form of CNN that leverages on the convolutional network depth using an architecture with very small (3x3) convolution filters to achieve better performance~\cite{vgg}. All the models used for in this work were trained from scratch until convergence, as the model weights was not initialise from weights from other model. With glorot-uniform method as initializer, categorical cross entropy as the loss function and Adams optimization algorithm as the optimizer, model convergence was achieved by minimizing the prediction error and maximize the model accuracy. Data augmentation was also performed to prevent overfitting and maximize model performance. \subsection{Software and Hardware} \label{subsec:ExpSetup} Keras deep learning framework, using tensorflow backend, is used for training and testing all the models used in this work. The Keras framework was installed on the NVIDIA V100-DGXS-32GB GPU. \section{RESULTS and ANALYSIS} \label{results} \begin{table*} \centering \caption{Comparison of the performance of VGG16 and ResNet Models with and without Batch Normalisation layer in the presence of noise in all its layer during inference when tested with CIFAR10 dataset. The performance metric is the model classification accuracy.} \label{tab:result_cifar10} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{3}{4em}{} & \multicolumn{12}{|c|}{Noise factor, $\eta$}\\ \hline & \multicolumn{2}{|c|}{0\%}& \multicolumn{2}{|c|}{1\%}& \multicolumn{2}{|c|}{10\%}& \multicolumn{2}{|c|}{20\%}& \multicolumn{2}{|c|}{30\%}& \multicolumn{2}{|c|}{40\%}\\ \hline {Model Name} & {With BN} & {No BN}& {With BN}& {No BN}& {With BN} & {No BN}& {With BN}& {No BN}& {With BN} & {No BN}& {With BN} & {No BN}\\ \hline {Resnet\_20} & {92.16\%} & {89.62\%}& {91.48\%}& {89.60\%}& {87.20\%}& {88.49\%}& {66.16\%}& {84.90\%} & {26.47\%}& {76.65\%} & {13.83\%}& {61.37\%}\\ \hline {Resnet\_36} & {92.46\%} & {89.25\%}& {90.46\%}& {89.27\%}& {81.65\%} & {88.13\%}& {47.18\%}& {84.30\%}& {20.94\%}& {75.62\%}& {12.59\%} & {62.67\%}\\ \hline {Resnet\_44} & {91.81\%} & {87.99\%}& {85.00\%}& {88.06\%} & {57.67\%}& {87.32\%}& {22.55\%}& {84.11\%} & {14.74\%}& {77.71\%} & {9.73\%}& {67.32\%}\\ \hline {Resnet\_56} & {92.71\%} & {87.78\%}& {88.40\%}& {88.81\%}& {31.81\%} & {86.74\%}& {22.02\%}& {82.85\%}& {12.67\%} & {74.41\%}& {11.09\%} & {61.77\%}\\ \hline {VGG\_16} & {93.06\%} & {93.02\%}& {10.00\%}& {93.01\%}& {10.00\%} & {92.30\%}& {10.00\%}& {89.84\%}& {10.00\%} & {89.84\%}& {10.00\%} & {76.17\%}\\ \hline \end{tabular} \end{table*} \begin{table*} \centering \caption{Comparison of the performance of VGG16 and ResNet Models with and without Batch Normalisation layer in the presence of noise in all its layer during inference when tested with CIFAR100 dataset. The performance metric is the model classification accuracy.} \label{tab:result_cifar100} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{3}{4em}{} & \multicolumn{12}{|c|}{Noise factor, $\eta$}\\ \hline & \multicolumn{2}{|c|}{0\%}& \multicolumn{2}{|c|}{1\%}& \multicolumn{2}{|c|}{10\%}& \multicolumn{2}{|c|}{20\%}& \multicolumn{2}{|c|}{30\%}& \multicolumn{2}{|c|}{40\%}\\ \hline {Model Name} & {With BN} & {No BN}& {With BN}& {No BN}& {With BN} & {No BN}& {With BN}& {No BN}& {With BN} & {No BN}& {With BN} & {No BN}\\ \hline {Resnet\_20} & {66.69\%} & {63.07\%}& {66.61\%}& {62.90\%}& {55.63\%} & {54.84\%}& {26.38\%}& {34.98\%}& {8.43\%} & {16.12\%}& {2.69\%} & {5.80\%}\\ \hline {Resnet\_36} & {69.60\%} & {66.84\%}& {69.00\%}& {66.69\%}& {43.42\%} & {57.42\%}& {21.97\%}& {27.25\%}& {6.78\%} & {7.44\%}& {1.78\%} & {2.66\%}\\ \hline {Resnet\_44} & {69.50\%} & {65.47\%}& {68.45\%}& {65.42\%}& {34.85\%} & {58.95\%}& {12.34\%}& {36.76\%}& {4.01\%} & {11.20\%}& {1.80\%} & {2.86\%}\\ \hline {Resnet\_56} & {69.54\%} & {66.53\%}& {68.27\%}& {66.20\%}& {3.29\%} & {53.50\%}& {1.64\%}& {23.40\%}& {1.25\%} & {3.94\%}& {1.16\%}& {1.85\%}\\ \hline {VGG\_16} & {69.65\%} & {66.02\%}& {1.00\%}& {66.07\%}& {1.00\%} & {1.00\%}& {1.00\%}& {1.00\%}& {1.00\%} & {1.00\%}& {1.00\%} & {1.00\%}\\ \hline \end{tabular} \end{table*} The results and analysis of the experimental work to understand the effect of batch normalisation on the robustness of deep neural network to analog noise using CIFAR10 and CIFAR100 dataset are presented in this section. This effect is studied by comparing the performance of a deep learning model with batch normalisation layer after each layer (convolutional and fully connected layer) and the same model architecture without the batch normalisation layer after each layer or partially present in some layers. The partial presence of batch normalisation is a situation where batch normalisation layer are present in some layers in order to kick-start the training process. This generally apply to situation where models with reasonable performance are difficult to train without batch normalisation due to classification task complexity and/or model architecture. In this work, the use of partial presence of batch normalisation is only used as substitute for the full absence of batch normalisation for the VGG16 model training on CIFAR10 dataset and all models on the CIFAR100 dataset. It should be noted that the minimum number of batch normalisation layers needed to train the models varies from one use case to another. \begin{figure*}[htbp] \centering \includegraphics[width=18cm]{fig/cifar10_compare_bn.pdf} \caption{The inference performance comparison of pre-trained VGG16 model and ResNet models trained with and without batch normalisation layer trained on CIFAR10 dataset when gaussian noise is added to all the weights. The performance metric is the (a) Actual average test accuracy(b)Normalised average test accuracy} \label{cifar10NormalisedImage} \end{figure*} \begin{figure*}[htbp] \centering \includegraphics[width=18cm]{fig/Cifar100.pdf} \caption{The inference performance comparison of pre-trained VGG16 model and ResNet models trained with and without batch normalisation layer trained on CIFAR100 dataset when gaussian noise is added to all the weights. The performance metric is the (a) Actual average test accuracy(b)Normalised average test accuracy} \label{cifar100NormalisedImage} \end{figure*} The results of the experimental work is presented in Tables \ref{tab:result_cifar10} and \ref{tab:result_cifar100}. The inference classification accuracy due to the analog noise of noise factor($\eta$) of 0\% in the Tables represents the baseline case, which is the equivalent to the testing classification accuracy after training. The CIFAR10 baseline inference accuracy of all the models is greater than baseline for CIFAR100 dataset. The is because the classification task on CIFAR100 data is complex than that of CIFAR10 dataset as the CIFAR100 contain 100 classes as compared to 10 classes in CIFAR10 dataset. The semantic overlap between the classes in CIFAR100, unlike CIFAR10 where there is none, also makes the classification task even non-trivial. Furthermore, the number of images per class is smaller for CIFAR100 (600) than CIFAR10 (6000) making the task even more difficult. The baseline inference accuracy of all the models with batch normalisation fully present is greater than models with batch normalisation fully absent or partially present. This is expected as batch normalisation eases model training and achieves faster convergence by enabling the use of bigger learning rate, reduce model sensitivity to initialization and also acts a regularizer\cite{Ioffe2017BatchRT, Ioffe2015BatchNA,Wu2019L1B}. It is also observed that the influence of batch normalisation layer on the training process and the resulting model grows with the increase in the number of batch normalisation layer in the model. The plot of actual and normalised test/inference accuracy of all models used in this work (with and without Batch Normalisation), trained on CIFAR10 dataset and CIFAR100 dataset, in the presence of additive gaussian noise against the noise factor of the analog noise is shown in Figure \ref{cifar10NormalisedImage} and Figure \ref{cifar100NormalisedImage} respectively. The normalised inference accuracy of the model is obtained by normalising average inference accuracy of a model by the baseline inference accuracy of the model as stated in equation \ref{equ4}. It can be observed that there is zero or almost zero gradient between noise factor value of 0\% and 10\% for some models in Figure \ref{cifar10NormalisedImage}b and 0\% and 1\% noise factor for some models in Figure \ref{cifar100NormalisedImage}b. The zero gradient line means that the model did not suffer any degradation in performance when gaussian noise is injected into the weight of the model. This zero degradation in model performance confirms the robustness of neural network model to gaussian noise as stated in \cite{Merolla2016DeepNN} and it is depend on the classification task complexity an the model architecture. In comparison to some models trained on CIFAR10 dataset shown in Figure \ref{cifar10NormalisedImage}, the models trained on CIFAR100 dataset are less robust to analog noise as they can only tolerate noise of noise factor of 1\% as compared to 10\% for some models trained on CIFAR10 dataset. The differences can be attributed to the degree of complexity of the classification task on the dataset.The classification task on the CIFAR100 dataset is more difficult that the classification task on the CIFAR10 dataset as CIFAR100 dataset has 100 classes with semantic overlap between the classes and 600 images per class as compared with 10 classes without any semantic overlap and 6,000 images per class in CIFAR10 dataset. Beyond this noise factor with zero performance degradation, It is noticed that the inference accuracy of each model generally degrades when analog noise is injected into the model weight during testing and this degradation in performance also increases with increase in the power of the gaussian noise i.e $\eta$. The trend is generally true and it is independent of the absence or presence of the batch normalisation layer or the type of dataset as stated in \cite{Fagbohungbe2020BenchmarkingIP}.However, the degree of degradation is depended on the model architecture, complexity of the classification task etc.. It is observed that percentage change in model performance degradation due to analog noise is higher with models with batch normalisation layer than models without batch normalisation layer for all models for CIFAR10 and CIFAR100 datasets. For example, the ResNet44 model with batch normalisation layer trained on CIFAR10 dataset suffers a degradation ($100\%- A_i$) of 7.42\%, 37.19\%, 75.44\%, 83.95\%, 89.41\% when gaussian noise of noise factor of 1\%, 10\%, 20\%, 30\% and 40\% are injected to the weights of the model respectively.A percentage model performance degradation of 0.00\%, 0.76\%,4.41\%,11.68\%, and 23.49\% is experienced by the same model without the batch normalisation layer for the same noise factors. This trend is also noticed for all models trained on the CIFAR100 dataset as shown in Figure \ref{cifar100NormalisedImage}b. The high percentage performance degradation sufferred by models with batch normalisation layer in the presence of analog noise means that the model loses their initial performance advantage in the form of better inference classification accuracy. In fact, the classification accuracy of the model with batch normalisation layer reduces significantly below the classification accuracy of the model without the batch normalisation layer particularly at higher noise factor. This trend can be observed in Figure \ref{cifar10NormalisedImage}a and Figure \ref{cifar100NormalisedImage}a where the inference accuracy for most of models with the batch normalisation layer has degraded below the inference accuracy of the models without the batch normalisation layer by the noise factor of 10\% and 1\% respectively. A performance comparison between the models trained on the CIFAR10 and CIFAR100 datasets using their normalised inference accuracy when gaussian noise is injected into their model weight is shown in Figure \ref{cifar10-cifar100-normalised}. While the comparison is done with models with batch normalisation layer trained on CIFAR10 and CIFAR100 datasets in \ref{cifar10-cifar100-normalised}a, the comparison in Figure \ref{cifar10-cifar100-normalised}b is between models without or partial batch normalisation layer. It is observed from Figure \ref{cifar10-cifar100-normalised}a that models trained on CIFAR10 dataset suffered less percentage performance degradation as compared to models trained on CIFAR100 dataset. This performance difference can be attributed to the complexity of the task as both models contain the same amount of batch normalisation layer. This trend is also noticed in Figure \ref{cifar10-cifar100-normalised}b except that models In Figure \ref{cifar10-cifar100-normalised}a suffers more degradation due to the presence of more batch normalisation layer in their model architecture. However, there is also a significant difference in percentage performance degradation between the models without batch normalisation layer trained on CIFAR10 and CIFAR100 dataset as shown in \ref{cifar10-cifar100-normalised}b. This can be attributed to the complexity of the classification task of the CIFAR100 dataset and presence of some batch normalisation layer in the architecture of the model trained on the CIFAR100 dataset. Some batch normalisation layer are present in the 'model without batch normalisation' trained on CIFAR100 dataset as the model did not achieve reasonable performance without batch normalisation. However, the number of batch normalisation layer in this models are significantly less than the number in the model with batch normalisation layer as the number of batch normalisation layer is reduced to the minimum required to train the model. \begin{figure*}[htbp] \centering \includegraphics[width=18cm]{fig/Cifar10-100.pdf} \caption{(a)The inference performance comparison of pre-trained VGG16 model and ResNet models trained with batch normalisation layer on both CIFAR10 and CIFAR100 dataset when gaussian noise is added to all the weights. The performance metric is the actual average test accuracy(b)The inference performance comparison of pre-trained VGG16 model and ResNet models without batch normalisation layer trained on both CIFAR10 and CIFAR100 dataset when gaussian noise is added to all the weights. The performance metric is the normalised average test accuracy} \label{cifar10-cifar100-normalised} \end{figure*} It can be observed that the testing accuracy of the model without batch normalisation layer is lower than the model with batch normalisation layer for both CIFAR10 and CIFAR100 datasets a expected. However, it is possible to get better results by exploring the partial batch normalisation case in order to achieve better result by gradually increasing the number of batch normalisation layer in order to achieve higher baseline accuracy. However, these improved in the baseline inference accuracy is achieved at the expense of the robustness of the resulting model to gaussian noise. Hence, the current practise of using a batch normalisation layer at the top of every convolutional might not be the best for models that needs to be deployed on analog hardware as the robustness of the resulting model might be low. The use of partial batch normalisation might be better as we can gradually find the number of batch normalisation layer needed to achieve a desired performance value. This design philosophy helps us to find some tradeoff between performance and robustness to noise. In order to aid better summarization and analysis of results, a new metric called average normalized percentage classification accuracy is introduced. This is mathematically defined as: \begin{equation} A_{avr}=\frac{\sum\limits_{i=1}^{N} A_i}{N} \end{equation} where $A_{avr}$ is the average normalized percentage classification accuracy and $N$ is the number of non-baseline noise factor which is 5. This new metric summarizes the performance of all the model trained on the CIFAR10 and CIFAR100 datasets over the 5 non-baseline noise factor and the result is given in Table \ref{tab:result_cifar100-cifar10}.VGG16 model has the best performance among all the models trained on CIFAR10 dataset and ResNet\_20 model has the best performance among all the models trained on CIFAR100 dataset as they suffer a performance degradation of 6.20\% and 54.62\% respectively. \begin{table} \centering \caption{Comparison of the average normalized percentage classification of VGG16 and ResNet Models with and without Batch Normalisation accuracy over 5 non-baseline noise factor in the presence of gaussian noise in all its layer during inference when tested with CIFAR10 and CIFAR100 dataset. The performance metric is the model classification accuracy.} \label{tab:result_cifar100-cifar10} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{3}{4em}{} & \multicolumn{4}{|c|}{Dataset}\\ \hline & \multicolumn{2}{|c|}{CIFAR10}& \multicolumn{2}{|c|}{CIFAR100}\\ \hline {Model Name} & {With BN} & {No BN}& {With BN}& {No BN}\\ \hline {Resnet\_20} & {61.88\%} & {89.49\%}& {47.71\%}& {55.38\%}\\ \hline {Resnet\_36} & {54.69\%} & {89.63\%}& {41.08\%}& {48.31\%}\\ \hline {Resnet\_44} & {41.32\%} & {91.95\%}& {34.95\%}& {53.52\%}\\ \hline {Resnet\_56} & {35.81\%} & {89.68\%}& {21.74\%}& {44.76\%}\\ \hline {VGG\_16} & {10.75\%} & {93.80\%}& {1.44\%}& {21.23\%}\\ \hline \end{tabular} \end{table} \section{{Discussion and Related Works}} \label{sec:discussion} Batch normalisation is a novel method introduced in \cite{Ioffe2015BatchNA} to dramatically accelerate the training and improve model performance by reducing the internal covariate shift in layers or subnetwork of a deep learning model. It achieves this by performing normalisation for each training mini-batch, allowing the use of higher learning rate and making the process to be insensitive to model initialisation. However, batch normalisation performance reduces when training batch is small or do not consist of independent samples. Furthermore, the low bit-width quantization technique impedes fundamental mathematical operations in Batch normalisation in addition to needing additional computation and memory resource. Many methods has been proposed to resolve these issues including batch renormalisation~\cite{Ioffe2017BatchRT}, group normalisation~\cite{Wu2018GroupN}, layer normalisation~\cite{Ba2016LayerN} , weight normalisation~\cite{Salimans2016WeightNA}, L1-Norm Batch Normalization~\cite{Wu2018GroupN} etc. The noise resistant ability of neural networks have attracted significant attention in recent time due to the desire to deploy deep learning model on analog accelerators that contain significant noise. There are several work in the literature as it relates to analog noise and neural network models. The use of noisy input to improve the ability of neural network to generalize to previous unseen data, recognise faulty input and improve their fault tolerant ability is done in\cite{SIETSMA199167,Minnix,Meng, Rusiecki2014TrainingNN}. Deep Noise injection, injecting of noise into the model weight during training, to improve the noise resistant ability of neural network is also done in \cite{Murray, Qin,Qin2018TrainingRN,Miyashita}. The use of langevin noise which is adding noise to the weight change to improve model generalisation is discussed in \cite{An}. Furthermore, the work by \cite{Bishop, Matsuoka,An,Holmstrom,noh2017regularizing} also provides the various theoretical and mathematical justification for use of analog noise for training neural network for the various scenarios mentioned earlier. Recently, knowledge distillation, a training method which involves a one model learning from another model, and deep noise injection is further used to improve on the existing result \cite{NoisyNN}. Also, method to improve the robustness of neural network against adversarial noise was studied in \cite{Zheng2016ImprovingTR} and the generalisation of neural network trained with with noisy labels was discussed in \cite{Chen2019UnderstandingAU,Reed2015TrainingDN}. The robustness of neural network models to noise can also be achieved by exposing the model to circuit non-linearities and other constraints during training as done in~\cite{Bo,schmid}. By using the same analog hardware during training and testing, the model is being conditioned to give good performance in a noisy computational environment. Despite the effectiveness of this method, implementing low power training procedure on analog device is non-trivial and too laborious for a procedure needed only once. Furthermore,implementing the circuitry needed for backpropagation leads to increase in chip's area and complicates chip design~\cite{mixedsignal}.Chip-in-the-loop method, a method suited for inference only hardware, is introduced in~\cite{Bayraktaroglu,NeuroSmith} by adapting pre-trained model weights for the inference only chip. This slow and inefficient involves programming the pre-trained weight of a model to the hardware of interest in order to measure the precise error using forward computation pass. The measured error is them used to update the weights of the pre-trained model via back-propagation in software using traditional processors~\cite{mixedsignal}. The protection of the weights and bias of neural network from noise using linear and non-linear analog error correction codes in order to prevent performance degradation is done in \cite{Upadhyaya2019ErrorCF,Upadhyaya2019ErrorCF2}. The work also explored the use of unequal error protection method for weights at different layers of a binarized network due to the uneven effect of noise in different layers. Furthermore, alternative binary representation of the parameters and weight nulling,a simple parameter error detection method, is proposed in \cite{QinBitFlipping} to mitigate the effect of the distortion caused by bit flips to improve on model robustness. An algorithm based on deep reinforcement learning which uses selection protection scheme to choose critical bit for error correction code(ECC) protection is proposed in \cite{huang2020functional}. This critical bit, which is not always the most significant bit, is selected in order to achieve optimal tradeoff between ECC'S redundancy and neural network model performance. This algorithm, a form of function oriented error correction code algorithm, achieves this by using an optimization function that optimizes the neural network performance after error correction instead of minimizing the uncorrectable bit error rate in the protected bits. Th existing works are different from this work as they explore ways to improve the robustness of deep learning models to analog noise using various methods . However, the effect of batch normalisation on the robustness property of deep learning models in the presence of analog noise is investigated in order to provide some insight and intuitions. Although this work share some similarities with this work \cite{Fagbohungbe2020BenchmarkingIP, Upadhyaya2019ErrorCF} in the modeling of the analog noise and in adding noise to all the layers of the model, this work is unique as it proposes new ways to design deep learning model with an optimal trade off between model performance and model robustness to analog noise. This work is also different from \cite{Qiao2019MicroBatchTW} where the noise is modelled as digital noise. The work on batch normalisation is also different from \cite{Santurkar2018HowDB,Bjorck2018UnderstandingBN} which aim to provide an alternate reasons and mathematical derivation why batch normalisation accelerates training. \section{{Conclusion}} \label{sec:conclusion} The effect of batch normalisation on the robustness of deep learning models inference performance to analog noise is investigated in this paper. The investigation is done by comparing the performance of a deep learning model with batch normalisation layer with the same deep learning model without batch normalisation layer in the presence of noise. The effect of the noise on the model is modelled as a form of weight change. This paper established that batch normalisation layer negatively impacts on the robustness properties of deep learning model to analog noise. The influence of the batch normalisation layer on the noise resistant property of model is such that it increases with increase in the number of batch normalisation layer. In fact, the extra performance improvement in model inference due to the presence of the batch normalisation layer is lost and the model performs poorly when compared with models without batch normalisation layer. In cases where the model training is impossible without batch normalisation layer, it is proposed that the minimum amount of batch normalisation layer needed to get the model trained and achieved the target model performance is encouraged. This case is defined as partial case of batch normalisation. These training paradigm ensures that a tradeoff is achieved between model performance and model's robustness property to analog noise. This paradigm also applies in situation when there is significant difference in inference performance between model with batch normalisation layer and model without any batch normalisation layer. It is also observed that for a fixed model, the noise resistant ability of a model is negatively impacted as the complexity of the classification task increases. \section{Acknowledgments} \label{acknowledgement} This research work is supported in part by the U.S. Dept. of Navy under agreement number N00014-17-1-3062 and the U.S. Office of the Under Secretary of Defense for Research and Engineering (OUSD(R\&E)) under agreement number FA8750-15-2-0119. 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 the Dept. of Navy or the Office of the Under Secretary of Defense for Research and Engineering (OUSD(R\&E)) or the U.S. Government. \bibliographystyle{IEEEtran}
\section{Introduction} It is said that coffee has an inspiring effect. This true piece of wisdom can only be acknowledged by the authors; as the central question of this paper arose from following a strict recipe to prepare a good and reproducible espresso: "Can a usual (kitchen) scale weigh a coffee bean more precise than the scale's reading precision would allow?". In a more provocative version: "Can a single rice corn be weighed with a truck scale?". These and similar questions open out to the central hypothesis of this paper: Considering numerous combinations out of a set of labeled mass elements leads to higher precision of the weight of a single entity than its individual weighing alone. \\ The result of a scale, being analogue or digital, is obviously rounded towards its reading precision. There are, however, particular cases where weighing a set of masses can give more accurate information about the individual mass. Imagine a set where the variance of the weights is far below the precision of the scale. The total weight of all elements divided by the number of elements will allow to estimate the single masses more precise than the precision limit. However, if the variance is somewhere above the scale precision, this approach fails as nothing is gained by determining average weights. Early approaches of mass standard estimation supported by linear regression were published in the textbook "Praktische Physik" (German for practical physics) by F. Kohlrausch in 1870, meanwhile established as a common build-up method in the field of mass metrology. The relevant chapter therein about mass determination is based on a linear equation system, and was part of the book until its last edition in 1996 \cite{Kohlrausch:1996}. In the chapter 1.1.4.3 "Masse\-skala" (German for mass scale) of the 1996 edition, a weighing scheme is suggested to create a mass scale over several orders of magnitude, starting with only one known mass element of small relative uncertainty (reference mass) among a set of unknown masses. The idea behind is to build up a chain of measurements with each two comparable total masses balanced against each other, and beginning with the reference. In this sense, a linear equation system is set up whose solution is minimized by linear regression approaches. Such a procedure allows to precisely estimate the unknown masses within small uncertainty. A similar experimental procedure is presented in several publications (e.g. \cite{Glaeser_2009, Borys:2012:Springer}) around the Physi\-kalisch-Technische Bundesanstalt (PTB) located in Braunschweig, Germany. On the occasion of the 125th anniversary of the institute, the PTB put online a digital open-access copy of the \textit{Kohlrausch} and refers to its close historic connection to this important textbook since firstly published. Rather than insufficiently giving a wrap-up of the history of mass determination and metrology, we want to refer to the all-encompassing reviews and details within the mentioned publications and numerous references therein. The method of least square fitting goes back more than 200 years to Legendre and Gau{\ss}, who used it to fit orbits to astronomic observations (see e.g. \cite{wikipedia:Regression,Freedman:2009} and references therein). In the late $19^{\text{th}}$ century, the method was used to fit biological and social science models. In recent times, least square regression has become an important tool in machine learning \cite{bishop:2006:PRML}. The reason for the large success of least square regression in all fields of science is expressed in the \textit{Gau\ss-Markov} theorem which states that minimizing the square error of a measurement yields the best linear unbiased estimate in case the errors are uncorrelated, have equal variances, and an expectation value of zero. If the measurements have non-equal error variance, one may normalize the errors by their known variance to obtain an optimal regression result (see e.g. \cite{Freedman:2009}). A recent general examination about this so-called weighted measurement method was presented in \cite{Wiora2016, Ho2020} with a focus on weighted estimations and numerous applications beyond mass metrology. In case of error correlations, the more generic \textit{Gau\ss-Markov} approach is suggested which minimizes the error covariance \cite{Kruskal_1968}. In \cite{Bich_1990} this method has been used to perform estimates with mass restraints of known uncertainties incorporated, being a classical problem in mass metrology \cite{Borys:2012:Springer}. A combinatorial method is discussed in \cite{White2008} as a general calibration technique for indicating instruments. Therein, a variety of applications in the field of mass metrology, optical detectors, and resistance bridges is presented. In 2012, Siuda and Grabowski \cite{SIUDA20121165} came up with the idea of using the combined measurements approach to improve the accuracy of measurements of additive quantities, e.g. without the need of any mass standards of known uncertainty. Their idea supposedly came up rather independent from previous work done in the field of mass metrology, as only a few references and no state of the art are given therein. The focus is fully put to the feasibility of the idea with brief theoretical estimations, simulations, and measurements that are limited to low $n$ (e.g. $n = 5$). A following "comment on..." paper \cite{WIORA20132259} picked up the discussion about how strong the additive quantities correlate, giving a comparison between outcomes of correlated and uncorrelated considerations. The combined measurements approach presented in \cite{SIUDA20121165} is rather similar to our initial idea. In this publication, however, we will go into more detail with deeper insights gained by theoretical considerations that are supported by simulations and comprehensive experimental verification. Thus, a more general expression for the uncertainty of estimated masses is established, depending on the measurement design comprising the weighing scheme and all measurement parameters. We consequently see in our work a valuable contribution and, moreover, want to help this approach to gain general visibility beyond an important, however rather specialized scientific sector. Our work wants to motivate interested and exploratory people to develop further inspiring applications in diverse fields of metrology, and to provide guidance for designing optimal combined measurement schemes as required. The further structure of this paper is as follows: In section \ref{sec:concept}, we discuss the basic concept of the combined measurements method introducing the nomenclature, as well as fundamental equations and the approach of error minimization via linear regression estimation. Section \ref{sec:Experiment} presents the set-up and results for an experimental proof of concept. We therein demonstrate that it is possible to accurately determine the weights of small stones with a common kitchen scale that has only a rough reading precision of the order of the stone weights. Therefore, we put forward two particular weighing schemes of different levels of experimental effort and estimation accuracy. In section \ref{sec:Theory}, we first briefly recapitulate the mathematical basics of linear regression by least square fitting. We then derive a generic expression for the covariance matrix of the estimated parameters, which reveals the dependence of the regression accuracy on the number of parameters (i.e.~the set size of masses) and on the number of experiments. Applying these findings to the weighing scheme cases presented in the experimental part, we give particular analytic expressions for the regression errors. Corresponding simulation results are given in section \ref{sec:Simulations}, again picking up the two weighing schemes with a comparison of experiment, theory, and comprehensive simulations. \section{Concept -- the linear scale model} \label{sec:concept} We assume a mass scale to measure a weight $w$ according to the linear model \begin{eqnarray} \label{eq:linModel} y(w) = \mgt_0 + w + \varepsilon(w) \end{eqnarray} with $\mgt_0$ being a constant offset and $\varepsilon$ an error with variance $\sigma^2$ and mean zero. Further, we consider in the following the weight $w$ being a combination of $n$ unknown mass elements $\{\mgt_i, i=1 \dots n\}$, i.e. \begin{equation} \label{eq:sumWeight} w = \sum \limits_{i=1}^n x_i \mgt_i . \end{equation} Thereby, the coefficients $x_i \in \{0,1\}$ indicate if the corresponding mass $\mgt_i$ contributes to the weight or not. The model (\ref{eq:linModel}) thus becomes \begin{equation} \label{eq:linEqSys} y = \mathbf{x}\mathbf{\mgt} + \varepsilon \end{equation} with $\mathbf{\mgt} = (\mgt_0,\mgt_1,\ldots,\mgt_n)^T$ and $\mathbf{x} = (1,x_1,\ldots,x_n)$. Here the column vector $\mathbf{\mgt}$ of the masses has been extended by one element for the offset $\mgt_0$ and the row vector $\mathbf{x}$ of coefficients by a corresponding constant element $x_0\!=\!1$.\\ Performing $N\ge n+1$ measurements $\{y_j, j=1,\dots,N\}$ from different combinations $\{\mathbf{x}_j, j=1,\dots,N\}$ of the $n$ unknown masses elements $\mgt_i$ allows to determine these masses as well as the offset $\mgt_0$ via linear regression. Therefore one minimizes the square error \begin{align} \label{eq:SEdef1} E = \sum \limits_{j=1}^N \varepsilon_j^2 &= \sum \limits_{j=1}^N |y_j - \mathbf{x}_j \mathbf{\mgt}|^2 . \end{align} The common way to find the minimum of the square error is to solve a linear equation derived from (\ref{eq:SEdef1}). In section \ref{sec:Theory}, we discuss the solution of this linear equation and derive therefrom the accuracy of the mass estimation in dependence of the parameter of a weighing experiment, being the number of masses $n$ and measurements $N$, as well as the variance of the measurement error. As a proof of concept, we perform an experiment with a set of $n = 8$ mass elements. Under consideration of a constant offset $\mgt_0$ as introduced in (\ref{eq:linModel}), we have $n+1=9$ unknowns $\{\mgt_i, i=0,\dots,n\}$, which we determine from a large set of measurements $N$. Experimental details will be given in the following section \ref{sec:Experiment}. Before, we exemplify the concept according to this realization.\\ Combining the $N$ measurements $y_j$ to a column vector $\mathbf{y}$ and the coefficient vectors $\mathbf{x}_j$ to a $N \times (n\!+\!1)$ matrix $\mathbf{X}$, the linear model \eqref{eq:linEqSys} can be written as a linear equation system \begin{equation} \label{eq:linEqSysVec} \mathbf{y} = \mathbf{X\mgt} + \boldmath{\varepsilon} \end{equation} with a so-called {\em design matrix} $\mathbf{X}$. With $n \!=\! 8$ mass elements, $N \!=\! 2^n\! =\! 256$ combinations are possible, thus resulting in a $256$ dimensional measurement vector $\mathbf{y} = (y_1, \ldots, y_{256})^T$. One particular experimental realization of the linear equation system~\eqref{eq:linEqSysVec} might read as \begin{equation} \label{eq:xmplLinEqSys} \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ y_4 \\ \vdots\\ \vdots\\ \vdots\\ y_{253} \\ y_{254} \\ y_{255} \\ y_{256} \\ \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 1\\ 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\ 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 0\\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0\\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\\ \end{pmatrix} \begin{pmatrix} \mgt_0 \\ \mgt_1 \\ \mgt_2 \\ \mgt_3 \\ \mgt_4 \\ \mgt_5 \\ \mgt_6 \\ \mgt_7 \\ \mgt_8 \\ \end{pmatrix} + \begin{pmatrix} \varepsilon_1 \\ \varepsilon_2 \\ \varepsilon_3 \\ \varepsilon_4 \\ \vdots\\ \vdots\\ \vdots\\ \varepsilon_{253} \\ \varepsilon_{254} \\ \varepsilon_{255} \\ \varepsilon_{256} \\ \end{pmatrix}. \end{equation} The rows of the equation system can be permuted without changing the result of the regression. One may therefore choose a scheme for the order of the experiments, in which as less elements as possible are exchanged between two measurements \cite{Savage1997}.\\ \section{Experimental proof of concept} \label{sec:Experiment} \subsection{Set-up} \label{ssec:setup} The proof-of-concept experiments are intentionally kept simple with regard to the required equipment. Consequently, they only incorporate a mechanical kitchen scale with a reading precision of $a = \SI{20}{\g}$, cf. figure \ref{fig:kitchenscale}, and a set of stones. \begin{figure} \begin{center} \includegraphics*[width = 0.75\textwidth]{set-up_kitchenWeight_a20g.jpg} \caption{Proof-of-concept set-up: Mechanical spring scale for kitchen purposes and numbered stones resembling the set of unknown masses.} \label{fig:kitchenscale} \end{center} \end{figure} Twelve numbered stones resemble the full set of unknown masses. In one of our measurements campaigns, we also consider a subset of eight stones. The presented experiments were guided by a graphical user interface app which is shared in a public \textit{GitHub} repository \cite{githubRep:Reiswaage}. Now, following the proposed concept, the task is to determine the weight of each stone as precisely as possible. For verifying the accuracy of the result, we use a digital precision scale with a reading precision of \SI{1}{\milli\gram}. The determined values are considered as ground truth (GT). In section \ref{sec:Theory}, the theoretical considerations will give an estimate of how precise the method can get and what the influencing parameters are. \subsection{Results} \label{sec:ExpResults} In the following sections, we will compare the estimates of each of the mass elements with the according GT values determined with the reference scale of higher precision. However, measuring the ground truth for the offset $m_0$ (the tare) is a more complex process and cannot be done directly in a single measurement with a reference scale. One approach is to weigh multiple reference masses and build the average difference of the known masses to the values shown by the scale in question. In our proof of concept experiments, we will perform exactly such a measurement campaign, and additionally, we know the GT values $\mgt_i$ of the $n$ mass elements. We moreover assume that the rounding error (see \eqref{eq:linEqSys}) is equally distributed such that its average over $N$ measurements becomes small, i.e. \begin{equation*} \frac{1}{N}\sum\limits_{j = 1}^N \left( y_j - \mathbf{x}_j \mathbf{\mgt} \right) = \frac{1}{N}\sum\limits_{j = 1}^N \varepsilon_j \approx 0. \end{equation*} And hence, we can separate $m_0$ easily as it equally contributes to every measurement (see \eqref{eq:linModel} and \eqref{eq:sumWeight}), yielding \begin{equation} \label{eq:m0_GT} m_0=\frac{1}{N}\sum\limits_{j = 1}^N \left(y_j - \sum\limits_{i = 1}^n x_{i,j} m_i\right). \end{equation} The GT values for $m_0$ presented in the following are determined in this way and marked with an asterisk in the respective tables below. \begin{table}[h] \centering \begin{tabular}{|r|c|c|c|c|c|} \hline $i$ & $\mgt_i$ & $\miw_i$ & $\mlr_i$ & $\miw_i - \mgt_i$ & $\mlr_i - \mgt_i$\\ \hline 0 & -4.711* & 0 & -2.344 & 0 & 2.368\\ 1 & 36.421 & 40 & 36.250 & 3.579 & -0.171\\ 2 & 33.269 & 40 & 32.500 & 6.731 & -0.769\\ 3 & 19.998 & 20 & 19.688 & 0.002 & -0.311\\ 4 & 31.083 & 40 & 30.625 & 8.917 & -0.458\\ 5 & 28.949 & 20 & 27.813 & -8.949 & -1.137\\ 6 & 27.284 & 20 & 26.875 & -7.284 & -0.409\\ 7 & 16.664 & 20 & 15.938 & 3.336 & -0.727\\ 8 & 16.692 & 20 & 15.938 & 3.308 & -0.755\\ \hline \end{tabular} \caption{$\mgt_i$:~Ground truth values, $\miw_i$:~individual weighing with reading precision $a = \SI{20}{\g}$, $\mlr_i$:~values determined with proposed method; all values in [g]. *: Estimate of the GT calculated according to \eqref{eq:m0_GT}.} \label{tab:expResult_N256} \end{table} \subsubsection{$N = 2^n$ weighing scheme} \label{ssec:expTwoToN} First, we consider a set of $n = 8$ stones, which gives $N = 2^n = 256$. Their averaged mass is $\overline{\mgt} = \SI{23.37}{\g}$ with a standard deviation of $\sigma_{\mgt} = \SI{11.30}{\g}$. Each of the $N = 256$ measurements $y_j$ is, of course, a multiple of the reading precision $a$. The particular realization \eqref{eq:xmplLinEqSys} of a design matrix yields, e.g the measurement vector \begin{equation*} \mathbf{y} = (0, 20, 40, 60, 40,\ldots, 140, 120, 160, 200)^T \si{\g}. \end{equation*} With a linear regression approach as described in detail in section \ref{sec:Theory}, we look for a solution $\mathbf{\mlr}$ that minimizes the square error \eqref{eq:SEdef1}. The resulting estimates $\mlr_i$ are given in table \ref{tab:expResult_N256} together with the ground truth values $\mgt_i$ and the individual weighing results $\miw_i$. To summarize the experimental outcome, we found a maximum difference of the linear regression results to the ground truth values of $\text{max}(|\mlr_i - \mgt_i|) = \SI{1.14}{\g}$ for $i = 1\ldots8$. In comparison to the expected maximum difference for an individual weighing $\text{max}(|\miw_i - \mgt_i|) = a/2 = \SI{10}{\g}$, this means an increase of precision by around one order! Moreover, the root mean square (RMS) error \begin{equation} \label{eq:RMS} \rms_{\mlr} = \sqrt{\frac{1}{n}\sum_{i=1}^n(\mlr_i-\mgt_i)^2} \end{equation} of the estimated masses with respect to the GT values is $\rms_{\mlr} = \SI{0.66}{\g}$. The negative offset $\mgt_0=\SI{-4.7}{g}$ of the scale, determined via formula \eqref{eq:m0_GT}, indicates that the scale weighs too less in comparison with the true weights. With the proposed linear regression method, this offset is also estimated, though with a lower accuracy than the $n$ masses $\mgt_i$ (compare section \ref{ssec:Theo_alln}). Notice that all the estimated values $\mlr_i, i=1,\ldots,n$ are smaller than the corresponding ground truth values $\mgt_i$. On the contrary, the negative offset is overestimated thus compensating for the underestimation of the masses in the linear model. With $N = 256$ measurements, achieving $\rms_{\mlr} = \SI{0.66}{\g}$ is a major improvement compared to the individual weighing procedure with $\rms_{\miw} = \SI{6.05}{\g}$. Going to higher $n$ would consequently increase the effort rapidly as for increasing $n$ by one would mean a doubling of the amount of possible combinations. It is, however, certainly not necessary to measure all combinations, and adapting the weighing scheme to the desired precision and required effort might be beneficial. \subsubsection{Scheme with fixed number of masses on scale} \label{ssec:expnCHk} In this scheme the number $k$ of mass elements on the scale is fixed to a constant value. One obvious advantage is the smaller effort compared to the $N = 2^n$ approach and -- on top -- the scheme can be adapted by selecting a particular value for $k$. As one can easily see, it is possible to build up this scheme by exchanging only two masses at a time between two measurements. For this scheme the needed dynamic range of the scale is much smaller than for performing all possible measurements. This implies that the scale can be calibrated more accurately in a desired weight range in case it shows some non-linearities over the full range. Later on in section \ref{sec:Theory}, we will see why it is wise to include the null-measurement, e.g. measuring once without any element (or an offset element only) on the scale. With this additional measurement, we have a total number of combinations of $N = {n\choose{k}} + 1$. In a particular experimental realization, we expand our set of stones with another $4$ entities to $n = 12$. Their averaged mass is $\overline{\mgt} = \SI{24.94}{\g}$ with a standard deviation of $\sigma_{\mgt} = \SI{7.80}{\g}$. Now choosing $k = 9$, we consequently end up with $N = 221$ measurements. This is about the same amount of measurements as for the $N = 2^{n=8}$ experiment. \begin{table}[] \centering \begin{tabular}{|r|c|c|c|c|c|} \hline $i$ & $\mgt_i$ & $\miw_i$ & $\mlr_i$ & $\miw_i - \mgt_i$ & $\mlr_i - \mgt_i$\\ \hline 0 & -3.344* & 0 & 0 & 0 & 3.344\\ 1 & 36.421 & 40 & 35.232 & 3.579 & -1.189\\ 2 & 33.269 & 40 & 32.566 & 6.731 & -0.703\\ 3 & 19.998 & 20 & 20.566 & 0.002 & 0.568\\ 4 & 31.083 & 40 & 30.343 & 8.917 & -0.740\\ 5 & 28.949 & 20 & 28.566 & -8.949 & -0.383\\ 6 & 27.284 & 20 & 27.232 & -7.284 & -0.052\\ 7 & 16.664 & 20 & 15.677 & 3.336 & -0.987\\ 8 & 16.692 & 20 & 15.677 & 3.308 & -1.015\\ 9 & 27.683 & 20 & 27.677 & -7.683 & -0.006\\ {10} & 29.705 & 20 & 28.566 & -9.075 & -0.509\\ {11} & 20.328 & 20 & 21.899 & -0.328 & 1.571\\ {12} & 27.821 & 20 & 26.788 & -7.821 & -1.033\\ \hline \end{tabular} \caption{$\mgt_i$:~Ground truth values, $\miw_i$:~individual weighing with reading precision $a = \SI{20}{\g}$, $\mlr_i$:~values determined with proposed method; all values in [g]. *: Estimate of the GT calculated according to \eqref{eq:m0_GT}.} \label{tab:expResult_12CH9} \end{table} Results for each mass element are presented in table \ref{tab:expResult_12CH9}. Here, we find a RMS of $\rms_{\mlr} = \SI{0.85}{\g}$ with a maximum difference to the ground truth of \nolinebreak{$\text{max}(|\mlr_i-\mgt_i|) = \SI{1.57}{\g}$}. With a comparable effort (amount of measurements) as the $N = 2^n$ experiment, we find the RMS value around $\SI{30}{\percent}$ less precise than the estimates found in section \ref{ssec:expTwoToN}. In turn, we have estimated the weights of four additional masses! The estimated offset $\mgt_0$ is, however, identical to the zero measurement of the scale, as discussed in \ref{ssec:Theo_nChk+1}. This means that for this weighing scheme the offset accuracy is not increased. \subsection{Experimental résumé} The initial question of whether the reading precision of a scale can be under-run with the proposed combined measurements method can definitely be answered with "yes". We have seen that the two weighing schemes reduce the precision range drastically by more than one order. However, further questions related to the obtainable precision or crucial influencing factors arise immediately. To give answers more quantitatively, we will analytically examine the proposed method in the following section before presenting results of more general experimental simulations and statistics. \newpage \section{Analytical considerations} \label{sec:Theory} \subsection{Basic mathematical concept} The concept of linear regression emerges already more than 200 years ago with Legendre and Gau{\ss} (see e.g. \cite{wikipedia:Regression} and references therein). A modern representation of multiple linear regression can, e.g.,~be found in \cite{Freedman:2009}. We recommend also the thorough and comprehensive representation of linear models for regression and classification in the context of machine learning by Bishop \cite{bishop:2006:PRML}. Here we very briefly recapitulate the basic mathematical concept in order to be able to investigate analytically the dependence of the regression accuracy on the number of masses $n$ and measurements $N$ and to understand the limits of the approach. The so-called multiple regression assumes a linear measurement model \begin{equation} \label{eq:linEqSysVec_rep} \mathbf{y} = \mathbf{X\mgt} + \boldmath{\varepsilon} \end{equation} which has already been introduced for the weighing process in section \ref{sec:concept}. Thereby $\mathbf{X}$ is the $N \times (n\!+\!1)$ so-called {\em design matrix} of $N$ measurements and $\mathbf{y}$ a column vector that combines the $N$ measurement results $y_j$\,. Linear regression estimates the $(n\!+\!1)$ coefficients $\mathbf{m}=(m_0,\ldots,m_n)$ by minimizing the square error \eqref{eq:SEdef1} which can be written in matrix notation as \begin{align} \label{eq:SEdef2} E = (\mathbf{y}-\mathbf{Xm})^T(\mathbf{y}-\mathbf{Xm}). \end{align} The standard way to find the minimum of \eqref{eq:SEdef2} is to take the derivative with respect to $m$ and setting it to zero, i.e. \begin{equation} \begin{aligned} \label{eq:zero} \mathbf{X}^T(\mathbf{y}-\mathbf{X}\mathbf{\hat{m}}) &= 0 \\ \Leftrightarrow \quad \mathbf{X}^T\mathbf{X} \mathbf{\hat{m}} &= \mathbf{X}^T\mathbf{y}. \end{aligned} \end{equation} The solution of this normal equation yields the estimated coefficients $\mathbf{\hat{m}}$ as \begin{equation} \label{eq:wsol} \mathbf{\hat{m}} = \mathbf{A}^+ \mathbf{X}^T\mathbf{y} \end{equation} with $\mathbf{A}^+$ being the inverse of the symmetric $(n+1)\times (n+1)$ matrix \begin{equation} \label{eq:Adef} \mathbf{A} = \mathbf{X}^T\mathbf{X}. \end{equation} In case $\mathbf{A}$ is singular, i.e.~having not the full rank $n\!+\!1$, one can still compute the so-called {\em Moore-Penrose inverse} (also called {\em pseudo inverse}) of $\mathbf{A}$ (see \cite{Ben-Israel:2003,wikipedia:Moore-Penrose}). The solution provided by \eqref{eq:wsol} may, however, then not be the unique solution of (\ref{eq:zero}). \subsubsection{Accuracy of the regression} \label{se_ep} The fundamental question we treat in this and in the next subsection is how accurate linear regression can estimate the coefficients of a linear model. The {\em Gau{\ss}-Markov} theorem states that minimizing the square error \eqref{eq:SEdef2} yields the best linear unbiased estimate, if the errors in the linear measurement model \eqref{eq:linEqSysVec_rep} are uncorrelated, have equal variances, and an expectation value of zero, i.e. \begin{align} \label{eq:GM-condition1} \langle \boldsymbol{\varepsilon} \rangle &= \mathbb{0}\\%_{(n+1)\times 1}\\ \label{eq:GM-condition2} \mathrm{cov}(\boldsymbol{\varepsilon}) &= \sigma^2\,\mathbb{1 \end{align} with $\mathbb{1}$ being the $(n\!+\!1)\!\times\!(n\!+\!1)$ identity matrix and $\mathbb{0}$ the $(n\!+\!1)$ dimensional vector of zeros. The best linear unbiased estimate means thereby the estimate $\hat{\mathbf{m}}$ of the model parameter with the smallest sampling variance around the true parameter ${\mathbf{m}}$. In appendix \ref{sec:ycor}, we identify the condition under which the {\em Gau{\ss}-Markov} theorem is fulfilled for the case that the measurement error originates from a rounding error. That is, one can assume a mean value free rounding error with constant variance, as required in equations \eqref{eq:GM-condition1} and \eqref{eq:GM-condition2}, if the standard deviation $\sigma_m$ of the ground-truth masses $m_i$ is larger than half of the scale resolution $a$, e.g. \begin{equation} \label{eq:GMcondition} \sigma_m > \frac{a}{2}. \end{equation} In case the measure error variances are not equal, one can still obtain an optimal estimate by performing a weighted least square fit. Therefore, one introduces a diagonal $N \times N$ matrix in the error function \eqref{eq:SEdef2} in which each diagonal element corresponds to the inverse of the respective measurement variance \cite{Wiora2016,Ho2020,Montgomery2012}. An even more general approach that also takes error correlations into account is the {\em Gau{\ss}-Markov} method. This method provides a minimum variance, linearly unbiased estimator rather than a minimum least square estimator \cite{Kruskal_1968,Bich_1990}. To obtain an expression for the error in the estimated coefficients, one inserts the model \eqref{eq:linEqSysVec_rep} into the solution (\ref{eq:wsol}) yielding \begin{equation} \label{eq:error_m} \hat{\mathbf{m}} = \mathbf{m} + \mathbf{A}^+ \mathbf{X}^T\, \boldsymbol{\varepsilon}\, \end{equation} This expression shows that the estimate $\mathbf{\hat m}$ is bias free, i.e.~$\langle \mathbf{\hat m} \rangle = \mathbf{m}$, if the error $\boldsymbol{\varepsilon}$ is mean value free, as required by the {\em Gau{\ss}-Markov} theorem. Therefore, it is wise to incorporate a constant term in the linear model as described in section \ref{sec:concept} to account for eventual systematic offsets in the measurement errors, which otherwise would bias the linear regression. The covariance of the estimate $\mathbf{\hat m}$ is \begin{equation} \label{eq:sem1} \mathrm{cov}({\mathbf{\hat m}}) = \mathbf{A}^+ \mathbf{X}^T \mathrm{cov}(\boldsymbol{\varepsilon}) \mathbf{X}\mathbf{A}^+. \end{equation} If the second condition \eqref{eq:GM-condition2} of the {\em Gau{\ss}-Markov} theorem is fulfilled, the noise covariance matrix commutes with the other matrices and \eqref{eq:sem1} takes thus the simple form \begin{equation} \label{eq:sem2} \mathrm{cov}({\mathbf{\hat m}}) = \sigma^2 \mathbf{A}^+ \mathbf{A} \mathbf{A}^+ = \sigma^2 \mathbf{A}^+. \end{equation} Note that the later equation uses explicitly one of the definitions of a pseudo-inverse \cite{Ben-Israel:2003, wikipedia:Moore-Penrose}. \subsection{Analytical treatment of the regression error} \label{sec:error_calc2n} Formula \eqref{eq:sem2} expresses the relation (\ref{eq:sem1}) between the expected regression error of the estimated coefficients (in our cases the masses) and the measurement errors, in which the the matrix $A$ plays the role of an inverse scale factor. This matrix, which counts the correlated occurrences of the $n$ different masses, can in practice for each experiment be easily calculated from the design matrix of the experiment using definition (\ref{eq:Adef}). While this formula is known in the state of the art (see e,g,~\cite{Montgomery2012,Freedman:2009}) we here go further and gain a deeper insight into the dependencies of the accuracy of the estimated masses on the number of measurements and contributing masses. For the analytic treatment we restrict ourselves to the case that all masses $m_i, i\!=\!1,\ldots,n$ occur with equal probability $p$ in the $N$ measurement combinations, i.e.\ they occur $pN$ times, while the offset $m_0$ occurs always. Assuming furthermore that the joint probability for two different masses to occur together is equal to $q$ for all pairs of masses, the $(n+1)\times(n+1)$ matrix $A$ takes the special form \begin{equation} \label{eq:AN} \mathbf{A}=N \begin{pmatrix} 1 & p & \cdots &\cdots & p\\ p & p & q & \cdots & q\\ \vdots & q & \ddots & \ddots & \vdots\\ \vdots & \vdots & \ddots & \ddots & q\\ p & q & \cdots & q & p \end{pmatrix}. \end{equation} The inverse $A^+$ of a matrix $A$ exists if its rows are linearly independent. In this case the inverse, being the solution of the linear equation system \begin{equation} \label{eq:AAinv} AA^+=\mathbb{1}\,, \end{equation} can be calculated with the well-known {\em Gau\ss-Jordan} algorithm, in which the matrix $A$ is brought into a diagonal form by subsequent linear combinations of the rows of the linear equation system. Applying the same transformations to the identity matrix yields the inverse matrix. In order to obtain the general form of the inverse of $A$, we make the following ansatz \begin{equation} \label{eq:AN_inv} \mathbf{A^+}=\frac{1}{N} \begin{pmatrix} \alpha & \beta & \cdots &\cdots & \beta\\ \beta & \gamma & \delta & \cdots & \delta\\ \vdots & \delta & \ddots & \ddots & \vdots\\ \vdots & \vdots & \ddots & \ddots & \delta\\ \beta & \delta & \cdots & \delta & \gamma\\ \end{pmatrix} \end{equation} with four unknowns $\alpha, \beta, \gamma, \delta$. With this ansatz the linear equation system \eqref{eq:AAinv} is reduced to a set of only $5$ linear equations, which are \begin{equation} \label{eq:AAinv5} \mathbb{1}_{i,j} = \left\{ \begin{aligned} \alpha + n p \,\beta &= 1 \quad \mathrm{for} \quad i=j=1 \\ p\alpha + [p+(n-1) q]\beta &= 0 \quad \mathrm{for} \quad i>1, j=1\\ \beta + p\gamma +(n-1)p\delta &= 0 \quad \mathrm{for} \quad i=1, j>1 \\ p\beta + p\gamma + (n-1)q\delta &= 1 \quad \mathrm{for} \quad i=j>1 \\ p\beta + q\gamma +[p+(n-2)q]\delta &= 0 \quad \mathrm{for} \quad i\neq j;\, i,j>1 \end{aligned} \right. \end{equation} or, written as linear equation system with the unknown parameters as vector $(\alpha, \beta, \gamma, \delta)^T$: \begin{equation} \label{eq:AAinv5M} \begin{pmatrix} 1 & np & 0 & 0\\ p & p\!+\!(n\!-\!1)& 0 & 0\\ 0 & 1 & p & (n\!-\!1) p\\ 0 & p & p & (n\!-\!1) q\\ 0 & p & q & p\!+\!(n\!-\!2) q\\ \end{pmatrix} \begin{pmatrix} \alpha\\ \beta\\ \gamma\\ \delta \end{pmatrix} = \begin{pmatrix} 1\\ 0\\ 0\\ 1\\ 0 \end{pmatrix} . \end{equation} Equation \eqref{eq:AAinv5M} can again be solved with the {\em Gau\ss-Jordan} algorithm with the result \begin{align} \label{eq:Ainv5M} \begin{split} \alpha &= 1+\frac{np^2}{Q}\\ \beta &= -\frac{p}{Q}\\ \gamma &= \frac{1}{Q}\left(1-(n\!-\!1)\frac{p^2-q}{p-q}\right)\\ \delta &= \frac{1}{Q}\frac{p^2-q}{p-q}\\ \end{split}\\ \mathrm{with}\qquad &Q = p - np^2+(n\!-\!1)q. \label{eq:Q} \end{align} The normalization factor $Q$ which occurs in all $4$ parameters in a denominator has been introduced for convenience. The step-by-step derivation of this solution using the {\em Gau\ss-Jordan} algorithm is presented in appendix A. One recognizes immediately that the solution (\ref{eq:Ainv5M}) becomes singular for $Q=0$. We have thus derived a simple criteria which tells us when the matrix (\ref{eq:AN}) is singular. In this case, the pseudo-inverse may be computed, but which does not provide a unique solution, unless the matrix $A$ has full column rank \cite{Ben-Israel:2003, wikipedia:Moore-Penrose}. With the five parameters provided by \eqref{eq:Ainv5M} and \eqref{eq:Q}, the inverse $A^+$ \eqref{eq:AN_inv} of the special matrix $A$ \eqref{eq:AN} is fully determined. Thereby, according to formula \eqref{eq:sem2}, the two diagonal values $\alpha$ and $\gamma$ are proportionality factors between the measurement noise $\sigma$ and the expected errors in the estimated coefficients $\hat{m}_i$, which scale also inverse with the total number $N$ of experiments i.e. \begin{align} \begin{split} \label{eq:delta_m} \text{var}(\mlr_0) &=\alpha \,\frac{\sigma^2}{N}\\ \text{var}(\mlr_i) &= \gamma \,\frac{\sigma^2}{N}, \quad \text{for} \quad i=1,\ldots,n. \end{split} \end{align} This result will in the following be applied to different cases of experiment designs. \subsubsection{Example 1: The case $N=2^n$} \label{ssec:Theo_alln} As discussed above, in the case that all $N=2^n$ combinations of the $n$ masses are weighed, each weight occurs $N/2$ times and each combination of two weights $N/4$ times. This implies for the probabilities in the matrix (\ref{eq:AN}) $p=1/2$ and $q=1/4$. Inserting these values in \eqref{eq:Q} one obtains $Q=1/4=p^2=q$ and thus from \eqref{eq:Ainv5M} \begin{align} \begin{split} \alpha &= 1+n\\ \beta &= -2\\ \gamma &= 4\\ \delta &= 0\, . \end{split} \end{align} Considering these values for $\alpha$ and $\gamma$ of $A^+$ in \eqref{eq:delta_m} yields \begin{eqnarray} \label{eq:thMdl_2TOn_m0} \text{var}(\mlr_0) &=& \frac{(1+n)\,\sigma^2}{N}\\ \label{eq:thMdl_2TOn_mi} \text{var}(\mlr_i) &=& \frac{4\,\sigma^2}{N}\,, \qquad\mathrm{for}\quad i = 1 \ldots n. \end{eqnarray} One recognizes that the variances of the estimated masses decay inversely with the number of experiments $N$. The dependencies are visualized in figure \ref{fig:simDelmVSn}, below in section \ref{sec:Simulations}. \subsubsection{Example 2: The case $N = {n\choose k}$} \label{AppSec:nChk_expl} In case that one weighs all possible combinations of $k$ mass elements chosen from $n$, one performs in total a number of \begin{equation} N = {{n}\choose{k}} = \frac{n!}{k! \, (n\!-\!k)!} \end{equation} weight measurements. In order to determine the occurrence probabilities $p$ and $q$ in matrix $A$ (\ref{eq:AN}), one needs to determine the number of combinations in which a certain mass element, respectively a combination of two mass elements, occurs. Selecting one mass element out of $n$, leaves $(n\!-\!1)$ elements to choose the other $(k\!-\!1)$. And selecting two elements out of $n$ leaves $(n\!-\!2)$ elements to choose the remaining $(k\!-\!2)$. One obtains thus \begin{align} p &= \frac{1}{N}{{n\!-\!1}\choose{k\!-\!1}}={{n}\choose{k}}^{-1}{{n\!-\!1}\choose{k\!-\!1}} = \frac{k}{n} \\ q &= \frac{1}{N}{{n\!-\!2}\choose{k\!-\!2}}={{n}\choose{k}}^{-1}{{n\!-\!2}\choose{k\!-\!2}} = \frac{k(k\!-\!1)}{n(n\!-\!1)}. \end{align} Inserting $p$ and $q$ in (\ref{eq:Q}), one finds $Q\!=\!0$ which means that the matrix $A$ (\ref{eq:AN}) is singular and thus there is no unique solution. One quickly realizes that the $n \choose k$ case is under-determined for $k = 1$ or $k = n$ as, with the scale offset $m_0$, there are $n\!+\!1$ parameters in the linear equation system rather than $n$. However, even for $1\!<\!k\!<\!n$, there is no unique solution $\mathbf{\mlr}$ minimizing the error \eqref{eq:SEdef2}. One sees easily that if $(\mlr_0,\mlr_1,\ldots,\mlr_n)$ minimizes the error \eqref{eq:SEdef1}, also $(\mlr_0\!+\!\delta_0,m_1\!-\!\delta_0/k,\ldots,m_n\!-\!\delta_0/k)$ does for any offset $\delta_0$, because each measurement involves the same number $k$ of mass elements. \subsubsection{Example 2a: The case $N = {n\choose k} + 1$} \label{ssec:Theo_nChk+1} The singularity in $A$ \eqref{eq:AN} can be overcome by considering an additional null-measurement $y_0$ without any elements on the scale such that one ends up with $N = {{n}\choose{k}}+1$ measurements in total. The additional term $(y_0\!-\!m_0)^2$ in the error \eqref{eq:SEdef1} is obviously minimal for $\mlr_0\!=\!y_0$, and in this way, the above discussed ambiguity in the solution $\mathbf{\mlr}$ is resolved. With similar arguments as in \ref{ssec:Theo_alln}, one obtains \begin{align} \begin{split} p &= \frac{1}{N}{{n\!-\!1}\choose{k\!-\!1}}= \frac{k (N\!-\!1)}{nN}, \\ q &= \frac{1}{N}{{n\!-\!2}\choose{k\!-\!2}}= \frac{k(k\!-\!1)(N\!-\!1)}{n(n\!-\!1)N}, \\ Q &= \frac{k^2(N\!-\!1)}{nN^2}. \end{split} \end{align} Since $Q\!\neq\!0$ for $N > 1$, analytical expressions for the $A^+$ elements can be found, which are \begin{align} \begin{split} \alpha & = N, \\ \beta &= -\frac{N}{k},\\ \gamma &= \frac{N}{k(N\!-\!1)}\left(\frac{N}{k} + \frac{(n\!-\!1)^2}{(n\!-\!k)}\right),\\ \delta &= \frac{N}{k(N\!-\!1)}\left(\frac{N}{k} - \frac{(n\!-\!1)}{(n\!-\!k)}\right). \end{split} \end{align} Inserting these expressions in \eqref{eq:delta_m} one obtains as error variances \begin{eqnarray} \label{eq:thMdl_nCHk_m0} \text{var}(\mlr_0) &=& \sigma^2\qquad \qquad \text{and}\\ \label{eq:thMdl_nCHk_mi} \text{var}(\mlr_i) &=& \frac{\sigma^2}{k(N\!-\!1)}\left(\frac{N}{k} + \frac{(n\!-\!1)^2}{(n\!-\!k)}\right) \end{eqnarray} for $i = 1 \ldots n$. Remarkable is the fact that the error in the estimated offset $\mlr_0$ equals the measurement error $\sigma$ independently of the number of measurements, because the estimated offset equals the null measurement. In contrast, the error variance of the estimated masses $\mlr_i$ shows a rather complex dependency on $k$, as illustrated in the theoretical curves plotted in figure~\ref{fig:sim_nCHk} below in section \ref{sec:Simulations}. \section{Statistical simulations} \label{sec:Simulations} In order to verify the results of the theoretical part, we need to make statistical statements. With regard to the number of measurements and comprehensive simulation campaigns to be performed, experimental verification would be an enormous effort. But instead, we build up a system of experimental simulations to gain the necessary statistical significance. \subsection{General framework} The basis for the statistical simulations is a randomized set of mass elements as a ground truth input where the number, average, and standard deviation of normally distributed masses are the only parameters. For instance, we generate a ground truth set of $n = 8$ masses with the average and standard deviation values given by our experiment. Additionally, the scale offset $m_0$ is randomized uniformly within the reading precision interval $]\!-\!a/2, a/2]$. This implies that we assume for the zero measurement the same accuracy as for any other measurement. A more precise taring of the scale could also be simulated and accounted for in the theory within the framework of weighted least square fit, briefly discussed in section \ref{se_ep}, where the zero measurement would get a higher weight than the $N-1$ other measurements. Having generated such a random set of GT, we simulate $N$ weighing processes. That is, for each $j$ of all $N$ measurements, building the ground truth total weight from this input set $\mathbf{\mgt}$ and a particular binary mass-selection vector $\mathbf{x}_j$ before rounding it through the predefined reading precision $a$, i.e. \begin{eqnarray} y_j = a\left[\mathbf{x}_j \cdot \mathbf{\mgt}/a\right], \label{eq:rounding} \end{eqnarray} where $[\cdot]$ denotes the nearest integer. Such sets of identical parameters are drawn $P = 1000$ times in order to apply our linear regression approach with statistically varying prerequisites, receiving $\mathbf{\mlr}_l,\,l\!=\!1,\!\ldots,\! P$. For each experiment, we compute the squared RMS error of the estimated masses, $\rms_{\mlr}^2$, according to \eqref{eq:RMS}, and average over all $P$ experiments, yielding \begin{align} \label{eq:statRMSmasses} \srms^2_{\mlr} &= \frac{1}{P} \sum_{l=1}^P \frac{1}{n} \sum_{i=1}^n (\mlr_{i,l} - \mgt_{i,l})^2\\ \label{eq:statRMSoffset} \srms^2_{\mlr_0} &= \frac{1}{P} \sum_{l=1}^P (\mlr_{0,l} - \mgt_{0,l})^2, \end{align} to receive numerical values for the variance of the estimated masses and offset, which we compare with the theoretical values $\text{var}(\mlr_i)$ calculated from equations (\ref{eq:delta_m}). The statistical evidence we gain will allow us to judge about the correctness of our theoretical assumptions. \subsection{Case $N = 2^n$} In a first simulation campaign, we have a look at the feasible precision depending on the number of mass elements where all possible $N = 2^n$ measurements were performed. Therein, we step-wise increase the number of considered mass elements $n$ from $1$ to $12$. \begin{figure}[t] \begin{center} \includegraphics*[width = 1\textwidth]{2TOn_nmax12_exDat.png} \caption{Left axis (log scale): Uncertainties $\srms_{\mlr}$ against the number of total mass elements $n$. Black crosses represent the mean errors of the simulated mass estimates, black circles give the offset errors. Theory curves for mass (straight line) and offset mass (dashed) errors in blue. Blue shapes show experimental data from sec. \ref{sec:ExpResults}. Right axis (log scale): Number of performed measurements $N$ for $n$ mass elements representing the effort.} \label{fig:simDelmVSn} \end{center} \end{figure} In figure \ref{fig:simDelmVSn}, simulated data points are presented for $\srms_{\mlr_0}$ and $\srms_{\mlr}$ from equations \eqref{eq:statRMSmasses} and \eqref{eq:statRMSoffset} against the number of mass elements $n$. These data, which excellently match the dashed and solid lines of the theoretical predictions from equations \eqref{eq:thMdl_2TOn_m0} and \eqref{eq:thMdl_2TOn_mi}, refer to the log scaled left-hand ordinate and are labelled as uncertainty. In addition, the effort as amount of performed measurements $N$ is presented along the right-hand ordinate. The presented data nicely indicate an exponential decrease of the errors $\srms_{\mlr_0}$ and $\srms_{\mlr}$, going along with an exponential growth of the effort $N$. Thus, we achieve an error of around $\srms_{\mlr} = \SI{0.18}{\g}$ for $n = 12$ with $2^{12}$ measurements performed. Remarkable is that compared to $\srms_{\mlr}$ the offset error $\srms_{\mlr_0}$ is smaller for very few mass elements, but decays slower with $n$, such that it becomes relatively larger for more than $n = 3$ elements considered. In agreement with the results of our experiment with $n = 8$, $\rms_{\mlr} = \SI{0.66}{\g}$ (cf. blue diamond shape in Fig. \ref{fig:simDelmVSn}), we find the average error of $\srms_{\mlr}$ approximately at $\SI{0.72}{\g}$. However, the offset value of the experiment, indicated as blue square in the figure, seems too high to conform to the simulation and theory data. This deviation can be understood as a sampling fluctuation in the regression error depending on the (random) choice of the $n$ masses in the specific experiments. In the simulation, this sampling fluctuation has been eliminated by averaging over many experiments with randomly sampled masses. \subsection{Case $N = {n\choose k}+1$} In another simulation campaign, we consider the case of exactly $k$ of $n$ elements on the scale. The null measurement with empty scale pan completes a set of measurements. Adding the null measurement to the set prevents singularity, as discussed in section \ref{AppSec:nChk_expl}. \begin{figure}[ht] \begin{center} \includegraphics*[width = 1\textwidth]{nCHk_n12_exDat.png} \caption{Left axis (log scale): Uncertainties $\srms_{\mlr}$ against the number $k$ of mass elements on scale for $n = 12$. Black crosses represent the mean errors of the simulated mass estimates, black circles give the offset errors. Theory curves for mass (straight line) and offset mass (dashed) errors in blue. Dotted blue line indicates mass element error for all $2^n$ measurements. Blue shapes show experimental data from sec. \ref{sec:ExpResults}. Right axis (log scale): Relative effort in terms of number of performed measurements $N$ over the number of all possible measurements $2^n$.} \label{fig:sim_nCHk} \end{center} \end{figure} Figure \ref{fig:sim_nCHk} represents the case $n = 12$ with errors $\srms_{\mlr_0}$ and $\srms_{\mlr}$ (cf.\,\eqref{eq:statRMSmasses} and \eqref{eq:statRMSoffset}), labelled as uncertainty and plotted against $k$. The data points from the simulations again match excellently the theoretical curves calculated from equations \eqref{eq:thMdl_nCHk_m0} and \eqref{eq:thMdl_nCHk_mi}. As an orientation, the blue dotted line in figure \ref{fig:sim_nCHk} indicates the uncertainty for the $2^n$ case as the lower limit. Besides a constant error of the offset element at $\srms_{\mlr_0} = \SI{5.8}{\g}$, we find a minimal error at $k = 8$ with $\srms_{\mlr} = \SI{0.9}{\g}$. This error is only slightly smaller than $\SI{1}{\g}$ for $k = 9$. However, the $221$ performed measurements for $k=9$ are significantly less compared to $496$ that have to be taken for $k = 8$. Simulation and theory yield slightly larger values for the regression error $\srms_{\mlr}$ compared to the experimental result we found in section \ref{ssec:expnCHk} with $\rms_{\mlr} = \SI{0.85}{g}$ (depicted as blue diamond shape in the figure). Again, this emerges from statistical fluctuations as we only compare one single experiment against a set of $P = 1000$ simulated experiments for each $n$. We also find such a fluctuation among the experimental offset value (blue square), though having here a smaller error than expected by simulation and theory. The asymmetry of the mass elements' uncertainty curve is remarkable as~-- due to the underlying similarity of the binomial coefficients to \textit{Pascal}'s triangle -- one would intuitively assume a symmetric distribution, as well. We find such a symmetric distribution, e.g., for the effort that is presented additionally on the right-hand-side axis. Here, the effort is the ratio of $N\!=\! {n\choose{k}}\!+\!1$ over $2^n$. An explanation for the observed asymmetric uncertainty is that an error $\delta\!=\!\mlr_0\!-\mgt_0$ in the estimated offset is in the regression compensated by a bias in the other estimated masses $\mlr_i$. As discussed in section \ref{AppSec:nChk_expl} this bias is proportional to $\delta/k$ which is illustratively clear if one considers that in all measurements except the null measurement the same number $k$ of mass elements are involved. As a result, this bias is relatively small for a larger number $k$ compared to a small number. \section{Summary and conclusion} In this paper, we initially discussed the basic concept of the combined measurements method by introducing the nomenclature, fundamental equations, and the approach of error minimization via linear regression estimation. We further performed an experimental proof of concept, where we estimated the weight of stones as exemplary mass elements by two weighing schemes of different levels of experimental effort and estimation accuracy. The accuracy of the estimates under-run the reading precision of the scale in use by one order of magnitude related to the ground-truth values. In a next step, we summarized the mathematical basics of linear regression by least square fitting and derived a generic expressions for the covariance matrix of the estimated parameters. This expression reveals the dependence of the regression accuracy on the set size of mass elements and number of experiments. We subsequently gave particular analytic expressions for the regression errors that motivated experimental simulations to establish founded statistical statements. Finally, we picked up the two weighing schemes from a comparing point of view between experiment, theory, and comprehensive simulations and found excellent agreement of the proposed concepts from all three perspectives.\\ The initial question of the feasibility to weigh individual rice corns with a truck scale remains to be answered. It turned out that the \textit{Gau\ss-Markov} theorem provides conditions that need to be considered for answering this question. We found, based on the considerations in the appendix \ref{sec:ycor}, that the conditions of the theorem are fulfilled if the variance of the weights is larger than a quarter of the square of the scale precision. If this condition is not fulfilled, correlations in the measurement errors occur. These may bias the regression result and lead to deviations not consistent with the theoretical statements for the achievable regression accuracy derived in this work. The above condition is obviously violated if applied to the weighing of a single rice corn. Nonetheless, we see a certain chance to shift the limits of this condition by introducing combined weighing schemes, as such combinations can show larger variances. We can, however, hardly judge currently if the rice-truck scale experiment could be successful. Therefore future work is clearly indicated to investigate the limits of the \textit{Gau\ss-Markov} theorem for combined weighing schemes.\\ With a very simple set-up, we gained impressive results to document that weighing uncertainties limited by the scale's reading precision can be drastically reduced by magnitudes of order. The only price to pay is an increased effort to stringently process a weighing scheme of choice, and its the choice of the experimenter of how complex the scheme is to gain a certain accuracy of estimates. The novel analytic expressions for the expected accuracy of the combined weighing scheme allows to design optimal measurement schemes for the application under consideration, and to estimate the required effort therefore.\\ To guide the conductance of such a potentially highly complex series of combined measurements as presented, a graphical user interface was developed and shared in a public \textit{GitHub} repository. The app is open source and as such provided as installation file within \textit{MATLAB}, and in a future release as \textit{Python} based stand-alone install. Within this desktop app, the user can select among diverse weighing schemes. Besides the two presented binary schemes for a total number of measurements $N \!=\! 2^n$ or $N \!=\! {n \choose k}\!+\!1 $, also a ternary scheme is available, where the design matrix offers three different states for each mass element: $\{-1, 0, +1\}$. This ternary scheme simulates a classical beam balance with two weighing pans on opposite sides of the beam, indicated by the coefficients $\{+1,-1\}$. This type of balance was considered in early publications on mass metrology mentioned in the introduction. The intention of the repository is to share data sets of inspiring and creative realizations -- why not overstepping the field of weight determination? Besides improving the app in community work, the repository should also give room to discuss -- and maybe marvel -- about experiments and their results. An active contribution to this platform by the reader or interested person would be gratefully appreciated by the authors.
\section{Introduction} Over the last decade, most research has emphasized the advantages of secondary studies (i.e., Systematic Literature Reviews (SLR) or Systematic Mapping (SM)) compared with traditional reviews~\cite{Kitchenham15, Kuhrmann17, Lavallee13, Riaz10}. In particular, an SLR is a type of literature review that systematically collects studies, critically appraises them, and synthesizes findings on a specific research topic~\cite{Kitchenham15}. SLR is also widely known as a valuable means to gather research gaps and topics for further investigation~\cite{Dyba05, Kitchenham11using, Zhang11, Kitchenham15, Niazi15}. In parallel, no matter the graduate courses, students need to conduct a deep literature review during their Ph.D. or even Master's projects \cite{Daigneault14, Puljak17}. In this scenario, we observe many computer science graduate students have conducted SLR replacing traditional reviews. For instance, around 50\% of SLR conducted in the Software Engineering (SE) area (of a total of 436 SLR published in SE, within the period from January 2004 to May 2016 \cite{Mendes20} have a Ph.D. student involved). Hence, these and other students have benefited from SLR, which enables the identification of the state of the art of their research interest, the existing research gaps, and a better positioning of their project in relation to the others. At the same time, most computer science graduate courses in Brazil and other countries have not offered the SLR subject; exceptions are few universities, such as XXX\footnote{To be replaced after blind review.}, YYY\footnote{To be replaced after blind review.}. Hence, the real benefits and drawbacks of this subject for students are not still entirely understood. It is not also clear how this subject could be structured regarding the taught topics and, more importantly, how to better balance theory and practice. In this scenario, the main issue that motivated the conduction of this work is that many graduate students that could take advantage of this subject may not be benefiting from it. Regarding the related work, \cite{Oates09} observed the SLR subject could develop research skills in Master's students, including the ability to handle literature and formulate research questions. \cite{Pejcinovic15} pointed out that graduate students should perform SLR to improve their ability to search, select, understand, and critically appraise studies, as well as integrate data and more precisely identify research gaps and improve their academic writing skills. \cite{Borrego15} analyzed how the engineering area has conducted SLR and proposed improvements in the SLR process focusing on engineering graduate courses. In the same direction, \cite{Froyd15} showed the way to adapt the SLR process to be taught in the engineering area. Despite these related works have brought important contributions, as far as we know, there is still a lack of studies investigating the real benefits and drawbacks of SLR subject to graduate students. There are also no recommendations on SLR topics that could be taught and the ways to better teach them. In this scenario, the main goal of this work is to report an experience teaching SLR, focusing mainly on the benefits and drawbacks of the SLR subject for computer science graduate students. To do that, we performed a long-term study by analyzing the SLR subject offered in the computer science graduate course at XXX\footnote{To be replaced after blind review.}. This one-semester subject that combines theory and practice was offered nine times (once a year), and a total of 153 students attended it. More importantly, SLR was offered as a principal topic, i.e., the subject only focused on SLR and its process. Considering that the design of graduate subjects is sometimes challenging for graduate courses with respect to topics to be included and abilities/knowledge to be improved in students, this work also delineates the essential topics of SLR and experimented means to teach them. Finally, this work intends to show the undeniable value of SLR and also motivate graduate courses to offer it. The remainder of this work is structured as follows. Section ~\ref{Section:ResearchMethod} presents the research method used in this work. Section ~\ref{sec:survey} discusses the survey results. Section ~\ref{Section:results} presents the main results of this work, i.e., the benefits and drawbacks of SLR subject to graduate students and the SLR topics and means to teach them. Lastly, Section ~\ref{Section:FinalRemarks} provides the final remarks. \section{Research Method} \label{Section:ResearchMethod} Figure~\ref{fig:method} summarizes the research method used in this long-term study. It is worth saying three of the authors of this paper are professors (i.e., educators) who have taught the SLR subject in their institutions and have conducted SLR and SM for more than 15 years together with their Ph.D. and Master's students, such as ()\footnote{To be replaced after blind review.} These professors have also worked as researchers on SLR and published their contributions, such as in ()()\footnote{To be replaced after blind review.}. Hence, after these professors taught the SLR subject for almost 10 years, we surveyed students who attended this subject. Following, considering the survey results (presented in Section \ref{sec:survey}) together with our experience, knowledge, and insights collected during the years, we delineated the benefits and drawbacks of this subject for students and also difficulties to professors who teach it (presented in Section \ref{Section:Benefits}). We also delineate the set of topics relevant to be taught as well as better ways to teach them (described in Section \ref{Section:Topics}). \begin{figure}[ht] \centering \includegraphics[width=0.8 \linewidth]{2021_TeachingSLR_ResearchProcess.png} \caption{Overall of the research method applied in this work} \label{fig:method} \end{figure} In particular, regarding the survey, its planning and conduction were organized in five steps according to \cite{Kitchenham08}: \begin{itemize} \item \textbf{Steps 1: Survey definition}: We established four goals (G) to gather the students' opinions: \textbf{G1}: Identification of who should attend the SLR subject; \textbf{G2}: Identification of the contents that should be taught in the SLR subject; \textbf{G3}: Identification of the skills developed in students who attended the SLR subject; and \textbf{G4}: Identification of difficulties of who attended the SLR subject. \item \textbf{Step 2: Survey instrument development\footnote{ Complete instrument of this survey is available in \url{https://drive.google.com/file/d/10lipRCOnUBtuSBNmdjs2-h_aSHTvsT1k/view?usp=sharing}}}: The questionnaire had four sections: (i) Consent (one question); (ii) Student's profile (10 questions); (iii) SLR subject (three questions, each one for achieving G1 to G3); and (iv) Students' impressions (three questions for G4). Questions associated with G1 to G3 were rated using the Likert scale (Strong agree = 5, Agree = 4, Undecided = 3, Disagree = 2, and Strong Disagree = 1), while those associated with G4 were open questions. \item \textbf{Step 3: Evaluation of the survey instrument}: We conducted a pre-test with a smaller sample (a postdoctoral researcher who had already attended the SLR subject) to identify improvements in the questionnaire. We also analyzed the reliability of the survey considering Cronbach's alpha test \cite{Cronbach51}, which verified that the Likert scale was reliable. The reliability of our survey is 94\% (or Excellent). \item \textbf{Step 4: Data collection}: We invited 153 students who attended the SLR subject between 2011 to 2019. They were from various computing areas, including software engineering, artificial intelligence, computing network, human-computer interaction, reconfigurable computing, and education. A total of 32 participants (16 Ph.D. students and 16 Master's students) answered our questionnaire and data was collected through an online form. \item \textbf{Step 5: Results}: We used two statistical methods (mode and medium) to interpret results associated with G1 to G3. For the open questions (G4), to systematically analyze the information collected from participants, we used Grounded Theory \cite{Seaman08Qualitative, Strauss1998basics}, which encompasses two techniques \cite{Strauss1998basics}: (i) open coding that identifies codes that are separated into discrete parts for analysis; and (ii) axial coding that handles connections between codes and groups them according to their similarities (in our case, the impressions and/or difficulties of students when attending the SLR subject). The next section presents the survey results. \end{itemize} \section{Survey Results}\label{sec:survey} Figure \ref{fig:g1} summarizes \textbf{G1} and shows who should attend the SLR subject according to participants\footnote{The raw data is available on \url{https://drive.google.com/file/d/1_6WYik223__MIOQ-RPSh5X0bVRf5sI-n/view?usp=sharing}}. Most of them agreed or strongly agreed with five (of six items), as the mode and medium show. As expected, participants claimed that those who need to understand better the SLR process should attend it. At the same time, students that need to develop research skills (which are actually fundamental for graduate students) should attend it, similarly to those that need to develop the ability to systematically search for evidence/studies in the literature and understand and get knowledge from scientific studies. Otherwise, SLR subject seems not relevant to those that need to develop teamwork skill and networking. We argue this occurs because each student has interest in a specific research topic and, hence, they focus on his/her own SLR; however, students should be closely accompanied by specialists in their research topic (e.g., their supervisors) who should be able to mainly revise confidently the SLR protocol. \begin{figure*}[!ht] \centering \includegraphics[width=0.95 \linewidth]{G1_Elisa.png} \caption{Who should attend the SLR subject} \label{fig:g1} \end{figure*} To achieve \textbf{G2}, we questioned participants about the relevance of the topics taught in the subject. Figure \ref{fig:g2} shows that almost all participants agreed or strongly agreed that all topics are relevant, as also pointed out by mode and medium. There is an inclination that the preparation of the SLR protocol and analysis/synthesis of results are more relevant. Meanwhile, the discussion about the difference between SM and SLR as well as challenges to the SLR conduction seem to some extent less relevant compared with the others. We observe all topics considered relevant (i.e., topics 1 to 6) are essential to conducting SLR as a whole, i.e., (i) a good understanding of theoretical and practical aspects; (ii) preparation of a good SLR protocol (which guides the review and documents its execution); (iii) conduction of the SLR following the protocol (i.e., systematic search for studies and application of selection criteria); (iv) synthesis of results; and (v) identification of threats to validity. \begin{figure*}[ht] \centering \includegraphics[width=0.8 \linewidth]{G2_Elisa.png} \caption{Topics taught in the SLR subject} \label{fig:g2} \end{figure*} Concerning \textbf{G3}, Figure \ref{fig:g3} shows most students agreed or strongly agreed that SLR subject made it possible to develop various skills. As expected, two skills or knowledge directly associated with the subject's contents highlighted, i.e., the knowledge about the SLR process and the SLR protocol elaboration. It is also expressive that knowledge and practical skills essential for graduate students are highlighted. Another relevant skill is the ability to accurately use the tools and databases (i.e., database search engines) to find evidence of a given research topic. Other three skills for graduate students can be also developed, i.e., the ability to recognize research problems (of studies being analyzed or even of their graduate projects), the enhancement of thinking critically (on the studies analyzed or even on their studies), and also the ability to interpret data. Another skill considered essential for good researchers is the ability to plan, write, and publish scientific papers. We claim this skill is developed because this subject requires the reading of various studies and also tightly motivates students to publish their SLR in a scientific event or journal. Actually, most respondents (16 of 32) published their SLR in scientific events or specialized journals\footnote{Available on \url{https://drive.google.com/file/d/1O5RYzZ5v7FWDbyuFm2lVogbaZbN5ZP5m/view}}, while almost all of them (26 of 32) used the SLR in their dissertations/thesis. Otherwise, as previously pointed out, this subject seems not to promote teamwork skills and networking. Moreover, when asked if participants would recommend the subject to their colleagues, they claimed the attendance leveraged their research activities by mainly making it possible to better understand their research area (through the accurate discovery of associated studies), besides the opportunity to publish a paper. \begin{figure*}[!ht] \centering \includegraphics[width=0.85\linewidth]{G3_Elisa.png} \caption{Skills developed in students who attended the SLR subject} \label{fig:g3} \end{figure*} The three open questions gathered the students' impressions and/or difficulties and achieved \textbf{G4}. After analyzing the answers using coding\footnote{Raw data and data analysis are available on \url{https://drive.google.com/file/d/1ivZ6GxkAHus5FozMdBA8EDtvX0ogWQte/view}}, three issues highlighted: (i) lack of deeper knowledge of their research area; (ii) inherent difficulty of the SLR; and (iii) time constraints. Participants pointed out the \textit{lack of deeper knowledge of their research area} as the main difficulty when attending the subject. Most of them were starting in a new research topic and did not have the confidence to, for instance, define the main goal of the SLR or the right research questions. We observe that almost always students proceed with various changes and adjustments in the SLR protocol, including in the SLR scope, search strategies, and even synthesis of results. This result is in line with a study published in ()\footnote{To be replaced after blind review.}, which showed that the protocol must be iteratively defined through many refinements during the planning phase. These refinements are expected to achieve good SLR, while they can occur independently of the level of experience of the researchers with SLR. The lack of knowledge of students on their research area directly leads to the \textit{difficulty in all tasks required to the SLR conduction}. Hence, the search for relevant studies was pointed out as challenging due to the need for a suitable search string (composed of keywords, synonymous, and appropriate combination among them). In most cases, students are required to read various studies to identify suitable keywords and their synonyms. The correct use of such string in digital databases is another challenge. In general, these databases are not well-suited to support automated searches; hence, a given search string needs to be accurately adapted to each database, which also continuously updates its search engine (e.g., ACM DL has updated its engine each around two years). Besides, students have sometimes difficulty determining whether a given study is relevant or not only considering the selection criteria. Elaboration of the data extraction form was also mentioned as another difficulty due to the doubt about what to extract from the studies. Participants also revealed \textit{time constraint} was another difficulty. Performing an SLR demands considerable time and effort, together with the need to balance effort and time with other activities. Most students start their SLR during the subject, but data extraction and results synthesis are further completed, intending to use the SLR to replace the literature review required for their Master's or Ph.D. projects. This survey supported us to the elaboration of the main contributions of this paper, presented in the next section. \section{Results}\label{Section:results} The survey results associated with G1 to G4 together with our experience teaching the SLR subject for years made us possible to find: (i) five benefits of this subject for graduate students; (ii) three drawbacks of this subject for these students; (iii) two main difficulties for professors who teach SLR; and (iv) the main topics that could be taught in the SLR subject and the way to better teach them. The next subsection details the benefits, drawbacks, and difficulties, as summarized in Figure~\ref{fig:results}, while the other subsection discusses the main topics of SLR. \begin{figure}[!ht] \centering \includegraphics[width=1.0\linewidth]{Benefits_drawbacks_difficulies.png} \caption{Benefits, Drawbacks, and Difficulties of SLR Subject} \label{fig:results} \end{figure} \subsection{Benefits, Drawbacks, and Difficulties}\label{Section:Benefits} As with any other graduate subject, the SLR subject can benefits students. We identified a set of five benefits that together could contribute to leverage students to become more prepared researchers in their field. Considering that graduate students, and undoubtedly all Ph.D. students, should conduct a \textbf{deep literature review} as part of their projects, the SLR subject can provide an opportunity for them to perform that task through a non-biased, transparent, and well-defined process. Grounded on a systematic research method~\cite{Kitchenham15}, a detailed state of the art of the research topic can be gathered, including the identification and combination of commonalities and differences among evidence from various studies, identification of existing research gaps and challenges, and production of reliable and accurate conclusions about a given topic. In this perspective, we recommend students conduct SLR to perform the required deep literature review. However, it is worth highlighting the gains aforementioned can be achieved only if SLR are correctly planned and conducted, following well-experimented guidelines and processes as well as assuring that all tasks are properly performed and auditable. From our experience teaching SLR, we observe there are many decisions that students need to take along with the entire SLR process, and wrong decisions usually lead to many mistakes and, as a consequence, erroneous answers to the research questions. Examples of decisions, just to mention a few, are regarding the: (i) search string (i.e., which keywords, their synonymous, and composition among them should be adopted); (ii) databases (i.e., depending on the research topics, specific databases are required, in particular, when such topics are positioned in a multidisciplinary area, like computing and social science); (iii) use of databases' search engine (i.e., the wrong configuration of the search string for each database's search engine is a recurrent error and, as a consequence, a greater number of not-related studies could be returned or important studies could be missed); and (iv) selection criteria (i.e., which the better inclusion and exclusion criteria are, from diverse selection criteria that could be adopted, aiming at correctness and productivity of the selection task). At the same time, by usually addressing emerging research topics, almost all SLR conducted during the SLR subject have been unique so that decisions taken in existing SLR even those in closer topics cannot be exactly reused. In this scenario, the SLR subject has supported students to take righter decisions. Students are also sometimes required to update the literature review to include it in the final version of their theses. In this case, when the review was previously conducted via an SLR, it can be more easily updated. To do that, SLR must have been well-documented, registering not only those elements usually recommended to be documented such as the SLR protocol \cite{Mendes20} but also we particularly recommend documenting those non-trivial elements, such as keywords or databases not used, studies excluded, and all decisions taken during the SLR conduction together with existing alternatives, the selected alternative, and rationales, e.g., all publications databases that were not used and reasons for that. With their projects ahead still starting, students who have attended the SLR subject do not completely understand yet their projects regarding the exact research problem to be addressed, goals, research method to be followed, and expected contributions. The SLR conduction can support them to identify the state of the art of the associated research, existing gaps, and challenges of their research topic. Hence, another benefit is that the SLR subject makes it possible for students to start to \textbf{better understand and position their Ph.D. or Master's projects} within the research area. At the same time, we have observed the students have recurrently used the SLR results to make decisions about their project, including regarding the scope, goals, and expected contributions. Hence, we believe the SLR subject and the conduction of an SLR are valuable means to drive research, enabling the opening of novel research topics. It is worth highlighting that students can then conduct evidence-based research, i.e., decisions taken are based on evidence from several studies found in the SLR. More importantly, having a broader and deeper knowledge of the research area, students can use the SLR to somehow assure the originality of their theses. The \textbf{self-confidence of the students on the research topic} is another important benefit. As SLR requires that students systematically and rigorously explore studies in a topic, they become more familiarized with that topic and can gain confidence that they know possibly all related studies. SLR subject could then contribute to reducing the lack of confidence and uncertainty commonly faced by students who are sometimes novices in the area. Moreover, during the SLR conduction, important information about the research topic can be also collected, such as the research tendency (e.g., increase or decrease in the number of studies over the years), main researchers, research groups, and industry involvement working on that topic, leading countries or regions, maturity of the research topic, and research trends (e.g., if the topic and its subtopics are promising). All this knowledge is fundamental for somehow pushing students to become better researchers in their area. The fourth benefit is the \textbf{development of research skills} by students. In turn, there exist different sets of research skills desired to be developed in graduate students \cite{Hermanowicz16, Tarasova21, Bravo21, Alhumoud20}. By analyzing these studies, we found the SLR subject could support the development of five important skills: \begin{itemize} \item Increase of knowledge on the research topic: Besides learning a rigorous and effective means to the literature surveys and its associated processes (which are taught in the SLR subject), this subject is an important opportunity for students to increase the knowledge concerning the background and foundations of their research topic by looking into the background section presented in almost all studies. Moreover, students can learn about different scientific methods and assessment methods (presented in the studies), while they can develop practical skills, e.g., dealing better with publications databases; \item Recognition of research problems: SLR subject requires that students look into the existing research problems as well as the research gaps, difficulties, and even contradictions being addressed by studies. Hence, students can develop the ability to recognize them and also the ability to elaborate the research problems for their projects and papers; \item Critical thinking: The SLR subject faces students to understand different solutions and alternatives, as well as positive and negative points from a variety of studies, pushing these students to engage in reflective and independent thinking and understand the logical connections among different ideas and, as a consequence, enhance the critical thinking; \item Analysis and synthesis of data: SLR subject requires that students summarize data from various studies, define how to organize it, identify relevant data, and synthesize results. All these tasks require the ability to analyze and synthesize data, leading to the development of such important skills; and \item Writing and publishing: SLR subject demands the full reading of various types of scientific literature, such as theoretical and empirical original research, case report, case study, researchers' opinion (or position paper), surveys/reviews, including secondary studies. Students can then accumulate knowledge of this diversity that is surely positive to organize their future publications. At the same time, students can gain experience in writing papers when they report the results of their SLR as a paper. \end{itemize} The aforementioned skills are undoubtedly relevant for students, as also discussed in \cite{Froyd15}, mainly those unmeasurable abilities, such as research problem recognition, critical thinking, and paper planning, writing, and publishing. Finally, aligned to the latter (writing and publishing), the fifth benefit is the possibility of students to \textbf{publish a paper} reporting the SLR conduction and results. We observe that, when attending the SLR subject, most students are starting their Ph.D. or Master's projects, which have not still produced results suitable for publication. Hence, by attending this subject, the publication of a paper containing results of their SLR is interesting. As previously found in our survey, around half part of students published the SLR started during the SLR subject in journals and scientific events. At the same time, good SLR are important contributions for any research area \cite{Borrego15}, possibly attracting a number of citations. Regarding the drawbacks of the SLR subject for students, we identified three drawbacks and also directions that could mitigate them. The first drawback is related to the \textbf{lack of knowledge of students concerning their research area}. Students in their first or second semester of graduate courses have usually attended the SLR subject at XYZ\footnote{To be replaced after blind review.}. At that moment, most of them have not still defined the exact topic of their project and sometimes have little knowledge of the topic that will be possibly researched. However, conducting high-quality SLR requires a deeper knowledge of the research topic \cite{Ribeiro18}. To mitigate this lack, we recommend students have the support of more experienced researchers such as their supervisors to assure the quality of the SLR. If this support is not provided, we have observed students have difficulty proceeding with the steps of the SLR process, e.g., the definition of search strings and elaboration of adequate answers for research questions. The second drawback refers to the difficulty of the \textbf{SLR protocol elaboration}. The SLR conduction and, in particular, the elaboration of the SLR protocol, are not trivial tasks. Such protocol involves various elements that need to be well-defined (e.g., research questions, search string, search strategies, studies selection process, data extraction form, etc.). To mitigate this difficulty, we recommend building the SLR protocol iteratively, i.e., students perform iterative pre-tests of the protocol to observe its correctness, conciseness, coherence, and completeness and iteratively refine it. Considering our experience from the SLR subject, when such protocol is well-defined by students, they can to some extent more easily perform the next steps of the SLR process. Another drawback is the \textbf{time constraints} of students. Graduation students have various time- and effort-consuming demands, such as other subjects, a part-time job (in some cases), responsibilities as teaching assistants, and other graduate program requirements that must be completed timely and satisfactorily. In the meantime, the SLR conduction actually consumes considerable time and effort; for instance, it is common for SLR to have more than 2,000 candidate studies to be verified. A big challenge is then to conciliate all academic and non-academic tasks together with the conduction of an SLR. To mitigate this issue, we recommend students focus specifically on the preparation and validation of the SLR protocol during the subject, which usually provides important support for those tasks. Following this, they can start the SLR conduction itself and finish it after the subject. We have also observed that the amount of time and effort required for SLR depends directly on the students' skills (e.g., ability of critical thinking and data synthesis) as well as their knowledge of the area. We also have observed that the protocol elaboration can particularly help students to gain such skills and knowledge; hence, the dedication to such protocol becomes even more important. Concerning the difficulties that professors have faced when teaching SLR, two are relevant to be discussed. The first one is the \textbf{hard-working nature of this subject}. During the subject, each student usually conducts his/her SLR to comply with the literature review necessary for his/her graduate project proposal. In turn, each SLR is sometimes unique in the sense there are no others to be used as a closer reference. In this scenario, professors need to provide meaningful support for each student aiming to make the subject effective. But supporting concomitantly diverse SLR is a very complicated task. It is also hard due to the different rhythm of each SLR with, for instance, different numbers of studies to be managed, data to be extracted, and distinct methods to synthesize results. To minimize this difficulty, a closer involvement of supervisors or other experts in the research topic is necessary, but in many cases, they do not have enough knowledge of particularities of the SLR conduction. At the same time, it is debatable if all students could conduct an SLR of the same research topic, while the professor could have a level of control regarding, e.g., the search string, databases, and selection criteria to be used. We believe such ``toy example'' could be useful only for illustration and exercise, but not for an effective step towards the deep literature review that students need. Another difficulty is the \textbf{lack of didactic materials}. It is known that there are many scientific materials of SLR (e.g., articles, technical reports, and books) sometimes addressing theoretical issues. However, good didactic materials (in particular, books) are missing besides materials that address practical issues that we believe are core to assure the successful conduction of SLR. Some examples of practical issues are, to mention a few, the configuration of the search string to different databases' search engines, management of sometimes a large number of studies, and correct use of supporting tools. In this scenario, professors have difficulty connecting SLR theory and practice and provide suitable materials to be followed for the students. We summarize that as with other subjects, there are difficulties for those who teach the SLR subject and also difficulties for students. However, this subject provides important benefits, in particular, those that can directly contribute to the Ph.D. and Master's theses. Hence, the next section presents some directions of the way that the SLR subject could be taught. \subsection{Topics of SLR Subject}\label{Section:Topics} After many adjustments done over the years regarding the topics taught in the SLR subject, we were able to define a set of eight main topics that we believe are comprehensive enough and relevant to be taught, as detailed below: \begin{enumerate} \item Theoretical foundation: This topic presents an overview of various types of literature review, including traditional literature review (a comparison between traditional literature review and SLR is provided in \cite{Zhang11,Zhang13}), rapid review \cite{Khangura12}, multi-vocal literature review \cite{Garousi16,Garousi19}, grey-literature review \cite{Garousi20}, tertiary study \cite{Imtiaz13} and mainly SLR and SM. Comparison among them, highlighting their purposes, differences, and commonalities, as well as advantages and limitations, are discussed; \item SLR process: This topic presents the theoretical aspects of SLR, an overview of the SLR 3-phase process (planning, conduction, and synthesis), and existing guidelines to conduct SLR. More importantly, this topic also encompasses discussions on the iterative nature of the SLR process that provides benefits and difficulties to students who are sometimes conducting their first SLR; \item SLR planning: This topic addresses the core artifact of SLR, i.e., the SLR protocol. All items of the protocol, including the goal of the SLR, research questions, search string (and the ways to define and calibrate it), search strategy, primary study selection criteria, data extraction methods, and result synthesis methods, are discussed together with the most common approaches to define them; \item SLR conduction: It is presented the means to search studies in the publication databases, the relevant databases for specific areas, and the particularities of each database. This topic also addresses existing strategies to increase the coverage and completeness of the search for studies, such as experts' opinions and snowballing technique \cite{badampudi15, jalali12, wohlin14, wohlin16}. Moreover, assuring the coverage and completeness of the searches for studies is another issue presented and widely discussed with students; \item SLR analysis and synthesis: This topic presents methods for the data analysis supported by tables or other visual/graphical representations (e.g., graphs, graphics, charts, infographics, word clouds, and geographical maps). Besides that, more importantly, methods for synthesis of SLR results, such as descriptive and quantitative synthesis (obtained through a statistical calculation), are also widely discussed with students; \item Threats to validity: As with any other research method, diverse threats to the validity occur in SLR \cite{Ampatzoglou19}. Hence, the main threats to validity, including construct validity, internal validity, and conclusion validity, and also how they could be mitigated, are presented and discussed; \item SLR update: In the case of SLR conducted during the SLR subject by graduate students, such SLR are sometimes required to be updated to adhere to the final theses. Hence, this topic discusses the ways and important requirements, mainly regarding the documentation of SLR, so that SLR are more easily updated \cite{Mendes20}; and \item Supporting tools: Aiming at increasing the productivity and reliability of SLR results, the use of supporting tools is highly recommended. There are tools that can support almost all SLR process such as Parsifal\footnote{\url{https://www.parsif.al}}, while bibliography management tools or reference managers are also useful, e.g., EndNote\footnote{\url{http://endnote.com}}, JabRef\footnote{\url{http://www.jabref.org}}, and Mendeley\footnote{\url{https://www.mendeley.com}}. \end{enumerate} It is worth highlighting Topics 1 to 5 should be taught in that order, while the others could be provided along with the semester. For each topic, we also suggest possible ways to teach it, as summarized in Table~\ref{tab:topics} (second column). The first two topics are mainly presented in expository classes, while the remaining are distributed in expository and hands-on classes aiming at achieving the synergy between theory and practice. Moreover, this subject must pay special attention to the learning method adopted to increase the students' engagement and learning. For instance, flipped classroom \cite{Al15, Urfa17} is interesting for this subject since it could leverage the motivation and engagement of students. Another approach is Case-Based Learning (CBL), which uses realistic narratives (cases) for educational purposes \cite{Herreid94CSSN, Yadav07TSCS} and has been already successfully applied in other subjects by promoting the students' learning and their critical thinking \cite{Yadav07TSCS}. In terms of duration and number of classes, we believe SLR can be adequately addressed in a one-semester subject with around 2-hour class and 6-hour out-of-class per week, whose distribution is presented in Table~\ref{tab:topics}. Considering a 16-week semester, we believe such distribution of the topics in those classes can work well. In particular, the SLR subject should focus mainly on the SLR planning and conduction consuming approximately 50\% of the classes. As stated before, a deeper discussion on the SLR planning during the classes should be performed, considering the time constraints of students. Regarding the bibliography, there are relevant papers published in main journals and conferences on Empirical Software Engineering that could be adopted in this subject. For each topic, we selected a set of materials that has worked well in our classes, as listed in Table~\ref{tab:topics}. As stated before, each SLR developed during the SLR subject has been sometimes unique and has presented its specificity, including its scope, research topic covered, research questions, and publication databases. Although there exists such specificity, some commonality with SLR previously conducted also exists and can be reused. For instance, part of a search string or the same databases used in closer SLR can be used. Hence, good examples of SLR published in important vehicles can serve as references. Good vehicles to find these SLR in the software engineering area are the Journal of Systems and Software\footnote{\url{https://www.journals.elsevier.com/journal-of-systems-and-software}}, Information and Software Technology\footnote{\url{https://www.journals.elsevier.com/information-and-software-technology}}, and conferences like International Conference on Software Engineering (ICSE)\footnote{\url{http://www.icse-conferences.org}}, International Symposium on Empirical Software Engineering and Measurement (ESEM)\footnote{\url{http://www.esem-conferences.org}}, and International Conference on Evaluation and Assessment in Software Engineering (EASE)\footnote{\url{https://conf.researchr.org/home/ease-2022}}. \begin{table*}[!ht] \footnotesize \caption{Essential topics to be taught in the SLR subject} \label{tab:topics} \begin{minipage}{1.0\linewidth} \begin{tabular}{|p{0.13cm}|p{2.1cm}|p{4.6cm}|p{1.2cm}|p{8.0cm} |}\hline \textbf{\#} & \textbf{Topic} & \textbf{Learning Means} & \textbf{Number of Classes} & \textbf{Main Materials}\\ \hline\hline 1 & Theoretical foundation & Expository class complemented with examples from the literature & 1 (of 16) & SLR \cite{Kitchenham15}, SM \cite{Kitchenham11using,Petersen15}, traditional literature review \cite{Zhang11,Zhang13}, grey-literature review \cite{Garousi20}, rapid review \cite{Khangura12}, multi-vocal literature review \cite{Garousi16,Garousi19}, and tertiary study \cite{Imtiaz13} \\ \hline 2 & SLR process & Expository class complemented with examples from the literature & 1 (of 16) & Procedures and guidelines to perform SLR \cite{Kitchenham15} \\ \hline 3 & SLR planning & Hands-on classes complemented with expository classes & 5 (of 16) & SLR planning \cite{Kitchenham15} \\ \hline 4 & SLR conduction & Hands-on classes complemented with expository classes & 3 (of 16) & SLR conduction \cite{Kitchenham15}, snowballing \cite{badampudi15,jalali12,wohlin14,wohlin16} \\ \hline 5 & SLR analysis and synthesis & Hands-on classes complemented with expository classes & 2 (of 16) & SLR analysis and synthesis \cite{Kitchenham15} \\ \hline 6 & Threats to validity & Expository class & 1 (of 16) & Identification, classification, and mitigation of threats to validity in SLR \cite{Ampatzoglou19} \\ \hline 7 & SLR update & Expository class complemented with examples from the literature & 2 (of 16) & When and how to update SLR \cite{Mendes20} \\ \hline 8 & Supporting tools & Hands-on classes & 1 (of 16) & Practical issues (e.g., configuration of the search string for databases' search engine) and hands-on class using tools such as Parsifal. \\ \hline \end{tabular} \end{minipage} \end{table*} \section{Final Remarks} \label{Section:FinalRemarks} Graduate subjects can contribute to engaging students in their formation and paves the way to further become them good researchers. This paper presented an experience report on teaching SLR in a subject for computer science graduate students. While diverse benefits and drawbacks for students were observed together with the associated causes, this experience report intends to motivate the discussion about the trade-off to offer this subject. From our point of view, attendance to the SLR subject seems to be a valuable opportunity for students, mainly regarding a means to evolve their Ph.D. or Master's project. This subject seems to have an important role to develop required research skills in graduate students, including the ability to recognize research problems, analyze and synthesize data, think critically, and write papers. At the same time, professors responsible for this subject have some difficulties teaching it due to the inherent nature of this subject as well as the lack of didactic materials due to SLR is a novel topic to be addressed in graduate courses. During the conduction of this work, we found and mitigated the threats to the validity. In particular, regarding the survey, a threat to the construct validity was a given question could influence the answers to the others. To mitigate it, we were concerned with elaborating the questions and ordered them to avoid any influence. We also elaborated on all questions considering our long-term experience teaching SLR. Following this, we performed a pre-test with a postdoctoral researcher who was also an expert in SLR. In addition, we encouraged respondents to share their impressions through open questions. Concerning the conclusion validity, the representativeness and the number of respondents could be a threat; hence, we cannot generalize the results, including the benefits, and drawbacks reported in this work, for other graduate courses and students. Different students' backgrounds, the moment when students attend it, and specific issues of the courses can lead to different results compared with ours. Moreover, the difficulties faced by professors who teach this subject cannot be also generalized. Their background and experience with SLR can mitigate or accentuate these or other difficulties. However, we believe that results (i.e., benefits, drawbacks, difficulties, and SLR topics) can be considered relevant because the long-term experience teaching this SLR subject was considered together with the opinion of students that attended the subject along with the years. We have also observed that SLR has attracted the attention of students from diverse areas, like artificial intelligence, computing network, and education, besides software engineering that previously introduced SLR in computing. Such areas have also started the publication of SLR and SMS. In this scenario, the SLR subject should deal with specificities of these areas such as the publication databases relevant to be adopted, since they should consider others than those suggested for software engineering. For future work, this experience could be replicated in other graduate courses, different regions, and diverse students' profiles. Finally, this work intends to motivate graduate courses not only in software engineering but also in other areas to teach SLR and use it as an added-value means to leverage the students' formation and, as a consequence, the quality of graduate courses. \begin{comment} \section*{Acknowledgment} This work was supported by the Coordination of Superior Level Staff Improvement - CAPES (Grant: PROEX-11357580/D), São Paulo Research Foundation - FAPESP (Grants: 2015/24144-7, 2019/23663-1) and the National Council for Scientific and Technological Development - CNPq (Grants: 312634/2018-8, 313245/2021-5). \end{comment} \bibliographystyle{IEEEtran}
\section{Introduction} The nearby spiral galaxy NGC 4258 hosts one of the closest active galactic nuclei (AGN), at a distance of $7.58 \pm 0.11$ Mpc \citep{reid19}. However, its historical importance goes beyond its mere distance. Since the discovery of nuclear megamaser emission at 22 GHz from water vapour molecules \citep{claussen84}, NGC 4258 soon became the cleanest evidence for the existence of extragalactic supermassive black holes (SMBHs). The mapping and temporal monitoring of the masers through Very Long Baseline Interferometry (VLBI) revealed a sub-pc molecular, dusty disk in Keplerian rotation around a central mass $M = 4 \times 10^7 M_\odot$ \citep{nakai93, miyoshi95}. Moreover, NGC 4258 has since been an anchor galaxy to calibrate the distance ladder and to measure the expansion rate of the Universe $H_0$ \citep{pesce20}. Nowadays, water masers tracing edge-on molecular disks around AGN -- called disk megamasers -- have been (more or less securely) detected in a couple dozen of galaxies, and allow to measure both the most precise extragalactic SMBH masses to date \citep[e.g.,][]{kuo11}, and geometric distances \citep[e.g.,][]{kuo15, reid19}. NGC 4258 has historically been considered as the archetype for the class of disk megamasers, although today it is well accepted to be a somewhat anomalous source with respect to the others \citep[e.g., for its low obscuration along the line of sight; see][]{masini16}. After the discovery of water maser spots in the nucleus of NGC 4258, slight, albeit significant, deviations from a pure Keplerian rotation were then noticed \citep{herrnstein05}, indicating that a simple flat, geometrically thin molecular disk was a too simplistic model to explain their dynamics. By introducing both a position angle and inclination warps, \citet{herrnstein05} were instead able to reconcile the maser spots kinematics with a pure Keplerian rotation. Furthermore, in this model the projected clustering of the systemic masers was naturally explained by their confinement in the bottom of the "bowl" caused by the inclination warp. A natural implication of a warped maser disk was that it would rise in front of the observer, hiding the central engine and possibly providing the observed moderate absorption in the X-ray spectrum \citep{fruscione05}, first noticed more than 25 years ago \citep{makishima94}. \citet{herrnstein05} were able to put a constraint on the radial distance at which the warp crosses the line of sight, by comparing their warp model with the radius at which the X-ray irradiation would cause a transition from molecular to atomic gas in the disk \citep{neufeldmaloney95}. The transition radius was found to be at $\sim 0.28$ pc from the nucleus, and was also used to constrain the accretion rate through the maser disk assuming a steady state, geometrically thin and optically thick accretion disk \citep{shakurasunyaev73}. \par Also, NGC 4258 is a very interesting AGN because its particularly low bolometric luminosity in Eddington units\footnote{The bolometric luminosity of NGC 4258 has been historically estimated in the literature through SED fitting \citep{lasota96, yuan02, wu13}, and has been found to be around $\sim10^{-4}$ times the Eddington luminosity. The optical/UV data employed by those works are either upper limits from continuum observations, or those by \citet{wilkes95}, who directly detected the nucleus of NGC 4258 in polarized light at 5500 \AA.} ($L_{\rm Bol}/L_{\rm Edd} \sim 10^{-4}$) could be either explained by a very low accretion rate, or by invoking a radiatively inefficient accretion flow \citep[RIAF; see, e.g.,][and references therein]{narayanyi95}. The acronym RIAF generally refers to physically different accretion flows, such as advection-dominated flows \citep[ADAF,][]{narayanyi95} or adiabatic inflow-outflow solutions \citep[ADIOS,][]{blandfordbegelman99}. In these models, the inner regions of the accretion disk do not follow the usually assumed \citet{shakurasunyaev73} one. Therefore, a detailed study of this source offers a unique opportunity to explore the inner fraction of a parsec of an under-luminous AGN. \par Several previous studies have investigated the nature of the accretion flow in NGC 4258, both through its broadband spectral energy distribution (SED) and detailed X-ray spectroscopy. After the discovery of the sub-pc maser disk, for instance, \citet{neufeldmaloney95} derived an accretion rate $\dot{M} = 7\times 10^{-5}\alpha$ \citep[where $\alpha$ is the standard viscosity parameter of][]{shakurasunyaev73}, by assuming a viscous accretion disk whose midplane is traced by the masers, and obliquely illuminated by a central X-ray source. By combining the low X-ray luminosity with such an accretion rate and assuming a bolometric correction typical of Seyfert galaxies \citep{mushotzky93}, \citet{neufeldmaloney95} derived a ``standard'' radiative efficiency of order $\eta \sim 0.1$, thus not requiring radiatively inefficient accretion to explain the low luminosity of the AGN. On the other hand, \citet{lasota96} and \citet{gammie99} fitted the SED of the source with an ADAF with a much higher accretion rate ($\dot{M} \sim 10^{-2}$). However, \citet{yuan02} later demonstrated that a ``classical'' ADAF-like accretion flow was not able to account for the nuclear IR data, in particular the steep power-law shape, indicative of non-thermal emission \citep{chary00}. Moreover \citet{fiore01}, analyzing BeppoSAX data, found that pure bremsstrahlung emission \citep[as expected from an ADAF,][]{narayanyi95} is ruled out by the X-ray data. Rather, the X-ray spectrum of NGC 4258 resembles an average Seyfert-like spectrum, being successfully described by the combination of a power-law modified at low energy by photoelectric absorption, and soft X-ray emission due to the extended (kpc-scale) structures connected to the so-called twisted anomalous arms \citep[and references therein]{wilson01}. \citet{yuan02} suggested that a composite model, in which an outer thin disk transitions to an inner RIAF, which then transfers energy to a relativistic jet, was able to account for the radio to X-ray SED of NGC 4258. In this model, the X-ray emission would arise from Comptonization by hot electrons at the base of the jet. This picture was broadly supported by \citet{herrnstein05}, who inferred a consistently low ($\sim 10^{-4}\alpha$ $M_\odot$ yr$^{-1}$) accretion rate. The absence of a broad Fe K$\alpha$ line, paired with the detection of a weak, narrow and rapidly variable component \citep{reynolds09}, further supported the view that the inner regions of NGC 4258 might deviate significantly from a canonical radiatively efficient disk. Later on, \citet{wu13} fit again the broadband nuclear SED of NGC 4258 with a composite model (inner RIAF + outer truncated thin disk + a jet), suggesting that the SED can be reproduced by a combination of the three components, and placing a constraint over the spin parameter of the SMBH ($a = 0.7 \pm 0.2$). \par The goal of this work is to comprehensively review the X-ray properties of NGC 4258, to possibly shed new light on its accretion flow and long term ($\sim 20$ years) evolution. To this aim, we take advantage of the wealth of available data: we re-analyze with state of the art models archival (from $\sim 2000-2016$) spectroscopic observations of the \textit{Chandra}\xspace X-ray telescope \citep{weisskopf00}, the \textit{XMM-Newton}\xspace observatory \citep{jansen01}, the \textit{Swift}/BAT\xspace telescope \citep{gehrels04, barthelmy05}, and \textit{NuSTAR}\xspace \citep{harrison13}. The obtained results are then complemented with others from the literature (from $\sim 1993-2000$), to obtain a complete and thorough X-ray view of a nearby under-luminous AGN spanning 23 years of observations. \par The paper is structured as follows: in Section \ref{sec:datareduction}, both the observations used in this work and their associated data reduction are presented. Section \ref{sec:offnuc} discusses the contribution to the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace fluxes of the non-AGN components, i.e. the large-scale plasma emission and the off-nuclear point source. The broadband spectral analysis is conducted in Section \ref{sec:analysis}, with the setup presented in \ref{sec:setup} and results discussed in Section \ref{sec:results} and \ref{sec:context}. Both the short and long term variability are discussed in Section \ref{sec:variability}. The discussion of the general results obtained is found in Section \ref{sec:discussion}, while our conclusions are drawn in Section \ref{sec:conclusions}. Tables with spectral analysis results are reported in Appendix \ref{sec:appendix}. \par Throughout the paper, uncertainties are given at the 90\% confidence level, unless otherwise stated, and no cosmology is assumed, given the adopted geometric distance \citep{reid19}. \begin{table} \caption{Log of the observations analyzed in this work.} \label{tab:info} \centering \begin{tabular}{l c c c} \hline\hline Telescope & ObsID & Date & Exp (ks) \\ \hline \multirow{4}{5em}{\textit{Chandra}\xspace} & 349 & 08-Mar-2000 & 2.8 \\ & 350 & 17-Apr-2000 & 14.2 \\ & 1618 & 28-May-2001 & 21.3 \\ & 2340 & 29-May-2001 & 7.6 \\ \hline \multirow{8}{5em}{\textit{XMM-Newton}\xspace} & 0110920101 & 08-Dec-2000 & 13.3/20.1 \\ & 0059140101 & 06-May-2001 & 7.8/12.0\\ & 0059140201 & 17-Jun-2001 & 2.7/8.4\\ & 0059140401 & 17-Dec-2001 & 0.3/3.3\\ & 0059140901 & 22-May-2002 & 9.8/13.6\\ & 0400560301 & 17-Nov-2006 & 45.3/57.2\\ \hline \multirow{2}{5em}{\textit{NuSTAR}\xspace} & 60101046002 & 16-Nov-2015 & 54.8 \\ & 60101046004 & 10-Jan-2016 & 103.6 \\ \hline \textit{Swift}/BAT\xspace & $-$ & 105 months & $1.85 \times 10^5$ \\ \hline \end{tabular} \tablefoot{Exposure times relative to the \textit{XMM-Newton}\xspace observations are the final, cleaned exposure times of each spectrum, for the PN and MOS cameras, respectively.} \end{table} \section{Observations and Data reduction}\label{sec:datareduction} \begin{figure*} \centering \includegraphics[width=0.95\textwidth]{figures/m106_cxo.png} \caption{{\it Left.} \textit{Chandra}\xspace ACIS-S $0.5-7.0$ keV image of NGC 4258. The green box labels the extraction region of the soft, diffuse emission. The red dashed box marks the size of the zoomed inset in the right panel. {\it Right.} \textit{Chandra}\xspace ACIS-S $0.5-7.0$ keV image of NGC 4258, zoomed on the nuclear region with the off-nuclear source clearly visible. Its spectrum has been extracted from the green circular region. The red dashed box marks the corresponding size of the zoomed inset in the left panel. In both panels, north is up and east to the left.} \label{fig:cxo} \end{figure*} NGC 4258 was observed multiple times by all major X-ray astronomical facilities in the last decades. Here we focus on the most recent \textit{Chandra}\xspace ACIS-S, \textit{XMM-Newton}\xspace EPIC PN and MOS, \textit{NuSTAR}\xspace FPMA and FPMB, and Swift/BAT observations. A summary of the observations considered, with their dates and cleaned exposure times, is shown in Table \ref{tab:info}. Together with this data, we will consider previously published results from the literature, regarding ASCA \citep{makishima94, reynolds00, terashima02}, BeppoSAX \citep{fiore01} and \textit{Suzaku}\xspace \citep{reynolds09} observations. For all of the analysis we use the fitting package XSPEC \citep{arnaud96} v.12.11.1. \subsection{\textit{Chandra}\xspace} NGC 4258 has been observed four times by \textit{Chandra}\xspace with the ACIS-S instrument, for a total exposure time of 46 ks. The nucleus is so bright that its emission is piled-up even in a modest \textit{Chandra}\xspace exposure \citep{youngwilson04}. Indeed, the majority of the ACIS-S exposure time was intended to study the anomalous arms, while very few ks of observations with short time frames ($0.4 s$ and $0.1 s$) could in principle be used to extract less-piled-up spectra of the nuclear source. Pile-up manifests as a spectral distortion, hardening the spectrum and making it unnaturally flat. Although there are {\it ad-hoc} models available in spectral fitting software to mitigate the effects of pile up, they rely on a few poorly known parameters \citep[see, e.g., the pile up model by][]{davis01}. Therefore, we have chosen not to increase the number of parameters in our modeling, and instead took advantage of the excellent angular resolution of \textit{Chandra}\xspace to extract the spectra of the non-nuclear components that are very likely to contaminate the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace data, due to their lower angular resolution and larger point spread function (PSF). \textit{Chandra}\xspace observations were downloaded from the \textit{Chandra}\xspace\xspace {\it Data Archive} and reprocessed with the \texttt{chandra\_repro} task in CIAO \citep{fruscione06} v.4.12. The \texttt{specextract} task was used to extract the spectrum of the circum-nuclear soft, diffuse emission and of an off-nuclear X-ray source, $2\farcs5$ south-east from the nucleus and already known in the literature \citep{wilson01, pietschread02, youngwilson04}. \subsection{\textit{XMM-Newton}\xspace} NGC 4258 was observed by \textit{XMM-Newton}\xspace multiple times, in particular for five epochs during the early 2000s \citep{fruscione05}, and once in 2006 \citep{reynolds09}. The \textit{XMM-Newton}\xspace observations were downloaded from the HEASARC archive and reduced with the SAS v.19.1.0. In particular, cleaned event files were created for both the PN and MOS cameras onboard XMM with the \texttt{epproc} and \texttt{emproc} tasks, respectively. No pileup was detected, as reported in \citet{fruscione05}. High background time intervals were selected using light curves in the $10-12$ keV energy range. The event files were thus filtered with these defined good time intervals, and adopting the standard FLAG=0 and pixel groups with pattern $\leq 4$ and $\leq 12$ for the PN and MOS cameras, respectively. Finally, source and background spectra, as well as ancillary files and responses, were extracted using the SAS task \texttt{xmmselect}. Source spectra were extracted from 15"-radius circular apertures, while background spectra were extracted from larger circles (with size ranging from 60" to 90") on the same detector chips. \texttt{epicspeccombine} was used to co-add MOS1 and MOS2 spectra for each of the six epochs, resulting in a total of 12 \textit{XMM-Newton}\xspace spectra. All the spectra have been rebinned to have at least 20 counts per bin with the HEASOFT tool \texttt{grppha}. \subsection{\textit{NuSTAR}\xspace} \textit{NuSTAR}\xspace observed NGC 4258 twice, for a total exposure time of $\sim 158$ ks. We downloaded the ObsIDs from the HEASARC archive, and reduced the observations with the NuSTARDAS package, using the standard \texttt{nupipeline} task to clean the raw data. The cleaned event files were used to extract the spectral products, through the task \texttt{nuproducts}. Source and background spectra were extracted from circles of 50" and 120" radius, respectively. The background regions were chosen on the same detector chip where the source spectra were extracted. All the spectra have been rebinned to have at least 20 counts per bin with the HEASOFT tool \texttt{grppha}. \subsection{\textit{Swift}/BAT\xspace} We downloaded the \textit{Swift}/BAT\xspace spectrum of NGC 4258 from the \textit{Swift}/BAT\xspace 105-Month Hard X-ray Catalog \citep{ricci17BASS, oh18} \footnote{https://swift.gsfc.nasa.gov/results/bs105mon/609}, for a final broad band range $0.3-195$ keV. \section{Off-nuclear contaminants}\label{sec:offnuc} The deepest \textit{Chandra}\xspace ACIS-S observation (ObsID 1618, see Table \ref{tab:info}) was used to extract the spectrum of the diffuse, extended soft X-ray emitting plasma in the nucleus of NGC 4258 and of the off-nuclear point source. While the former basically disappears at energies $E \gtrsim 2$ keV, contributing negligibly to the hard X-ray flux, the latter component is expected to contribute, to some extent, to the flux in the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace energy bands. \subsection{Soft, diffuse emission} \label{sec:soft} As detailed in \citet{wilson01}, the clear diffuse X-ray emission coincident with NGC 4258 anomalous arms, historically detected also with radio and H$\alpha$ imaging, is due to galactic disk gas that has been shocked by mass motions driven by the out-of-plane radio jets. More recently, evidence for shocks has also been found in cold molecular gas \citep{ogle14}. Thus, much of the gas originally in the disk has been ejected into the galaxy halo in an X-ray hot outflow. As a consequence, the star formation in the central few kpc is rather low \citep[0.08 $M_\odot$/yr,][]{ogle14}. In addition, the anomalous arms themselves have been suggested to be free of star formation \citep{courtes93}. We extract the \textit{Chandra}\xspace spectrum of the diffuse, soft emission along the anomalous arms of NGC 4258, from a rectangular region south-east of the nucleus (left panel of Figure \ref{fig:cxo}). The spectrum is grouped to have at least 20 counts per bin, and is fitted with a double \texttt{mekal} \citep{mewe85} component in XSPEC. The spectrum is equally well fit either by two different temperatures with solar abundance, or assuming only one component, in which case the abundance is sub-solar. To be consistent throughout the paper, we assume solar abundance and adopt two \texttt{mekal} components to describe this component \citep[e.g.,][]{reynolds09}. \subsection{Off-nuclear point source} \label{sec:oa} The presence of an off-nuclear point source, located 2\farcs5 to the south-east of the nucleus of NGC 4258, has been known for more than two decades \citep{wilson01, pietschread02, youngwilson04}. Despite this, its exact nature is still unknown. Its \textit{Chandra}\xspace spectrum is extracted from a small circular region, carefully avoiding the emission from the active nucleus of NGC 4258 itself (right panel of Figure \ref{fig:cxo}). The spectrum is equally well fit by an absorbed power-law \citep[in which case we find results consistent with those of][]{youngwilson04}, and by a multicolor blackbody model (\texttt{diskbb} in XSPEC). In the first case, the source could be a background AGN with a fairly typical photon index ($\Gamma = 1.74^{+0.45}_{-0.41}$) obscured by a column density $N_{\rm H} = 2.9^{+2.5}_{-2.1} \times 10^{21}$ cm$^{-2}$ (which could be due to gas in NGC 4258 itself), while in the second case it could be an X-ray binary in the nuclear region of the galaxy, with a temperature $kT = 1.4^{+0.6}_{-0.3}$ keV, and whose flux is again absorbed by a column density in excess of $10^{21}$ cm$^{-2}$. The unknown nature of this source results in an uncertain extrapolation of its contribution to the X-ray flux at higher energies, depending on the spectral model assumed. To be conservative, we consider the absorbed power-law model (which provides the largest contribution at hard X-ray energy) fixing the best fit column density, photon index and power-law normalization to their best fit values. We have also verified that across the three \textit{Chandra}\xspace observations in which the source is detected (spanning approximately one year), its $0.5-7$ keV flux is rather stable, showing possible variations at the $20\%$ level -- albeit consistent with being constant within the uncertainties. Its spectral shape is also constant within the uncertainties. However, the quality of the data in the other observations allowed only a rough assessment of the X-ray spectral shape of the off-nuclear point source to be done. Its observed $2-10$ keV flux is $F_{2-10} \sim 10^{-13}$ erg cm$^{-2}$ s$^{-1}$\xspace, $\approx 2\%$ of the average observed flux in the same band from NGC 4258. \section{X-ray spectral analysis}\label{sec:analysis} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/spec.pdf} \caption{Broad band $0.3-195$ keV spectrum of NGC 4258, composed of the 17 spectra analyzed in this work (12 \textit{XMM-Newton}\xspace, 4 \textit{NuSTAR}\xspace and 1 \textit{Swift}/BAT\xspace) spanning more than 15 years of observations. While the soft emission $\lesssim 2$ keV is due to extended plasma and is constant throughout the years, the harder component shows significant variability across different observations. In particular, NGC 4258 was caught in its faintest state during the \textit{NuSTAR}\xspace observations. The spectral turnover below $4-5$ keV is due to the moderate absorption, possibly due to the line of sight intercepting the warped maser disk.} \label{fig:spec} \end{figure} The broadband \textit{XMM-Newton}\xspace + \textit{NuSTAR}\xspace + \textit{Swift}/BAT\xspace spectra, covering almost three orders of magnitude in energy ($0.3-195$ keV) and more than 15 years in time, are shown in Figure \ref{fig:spec}. They show two peaks, around $\sim 4-5$ keV and $\sim1$ keV. While the latter peak is due to the diffuse plasma at large scales, the higher energy one is due to the absorbing column density affecting preferentially soft X-ray photons, hence producing the observed spectral curvature. Consistently with this interpretation, the soft ($\lesssim 2$ keV) emission is stable over the years, while the hard X-ray flux is variable by a factor of $\sim 10$ at $E > 3$ keV. Can this variability be accounted for by {\it flux variability} only, or is it more complex (i.e., a {\it spectral variability})? To answer this question, we will test two different setups for any given spectral model. \subsection{Models setup}\label{sec:setup} \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{figures/absplA_eemo.pdf} \includegraphics[width=0.45\textwidth]{figures/absplB_eemo.pdf} \includegraphics[width=0.45\textwidth]{figures/delchiA.pdf} \includegraphics[width=0.45\textwidth]{figures/delchiB.pdf} \caption{{\it Top row.} The two different setups assumed in the spectral analysis are shown here, adopting the ABSPL model as an example. The left panel refers to setup A, in which the spectral parameters are the same for all the data sets (labeled with different colors), modulo a normalization constant that encapsulates the nuclear flux variability of the hard X-ray emission alone. Setup B is shown in the right panel, for which the diversity in spectral slope, column density and normalization can be appreciated. {\it Bottom row.} Data vs model residuals, as fit with the setup A (left panel), and B (right panel): from top to bottom: ABSPL, BORUS and WARPDSK models, respectively.} \label{fig:setups} \end{figure*} In the first setup, dubbed setup A, we assume that the observed variability is due only to flux variability; thus, we fit all the 17 spectra using the same set of parameters, allowing for a free normalization constant for the nuclear component alone, relative to the first epoch, December 2000 (see the left panel of Figure \ref{fig:setups})\footnote{When simultaneously fitting datasets from different instruments, a multiplicative cross-calibration constant is usually considered. However, in this case we do not include a cross-calibration constant in Setup A, since the cross-calibration uncertainty is much smaller \citep[$\sim10-15\%$;][]{madsen15,madsen17} than the observed flux spread, and the fit would be insensitive to its value.}. In the second setup, dubbed setup B, we instead allow for spectral variability, leaving the column density, photon index and normalization of the coronal power-law free for each epoch\footnote{In setup B, we have fitted at each epoch the cross-calibration constant among cameras of the same instrument (see Table \ref{tab:B}).} (right panel of Figure \ref{fig:setups}). In both setups, the soft emission is modeled in the same way. In all the analysis, the Galactic absorption is fixed to $N_{\rm H,Gal} = 4.19\times 10^{20}$ cm$^{-2}$ \citep{hi4pi16}. The data requires multiple components to reproduce the broadband spectrum of NGC 4258. First, a soft X-ray component to fit the emission below 2 keV. This has been extensively studied, and is usually fitted with two plasma emission models, as discussed in Section \S \ref{sec:soft}. Then, the nuclear hard X-ray emission is generally well described, to first order, by the ``typical'' spectrum of a local AGN, i.e. a power-law modified at low energies by some intervening absorption along the line of sight, and declining at high energies as an approximately exponential cutoff. We fix the high energy cutoff at the median observed value for local Seyfert IIs, i.e. $290$ keV, which is found to be consistent with that of Seyfert Is \citep{balokovic20}. When some degree of absorption is present, both a scattered power-law at soft energies, mirroring the primary one, and a narrow fluorescent Fe K$\alpha$ line at $E\approx 6.4$ keV are also expected. In this particular case, the controversial significance of the line detection which has been somewhat debated in the literature \citep[see, e.g.,][]{reynolds09}, further motivated us to include in our baseline model a Gaussian line component. Finally, an absorbed power-law describing the contamination from the off nuclear point source is taken into account and it is fixed by the best fit values derived from the \textit{Chandra}\xspace spectrum (\S \ref{sec:oa}). In XSPEC notation, this baseline model (dubbed ``ABSPL") reads out as \begin{multline} \overbrace{\texttt{TBabs}}^{\text{Galactic $N_{\rm H}$}}\times \{ \overbrace{\texttt{zphabs}\times \texttt{cabs}\times \texttt{cutoffpl} + \texttt{zgauss}}^{\text{Intrinsic absorbed emission and Fe K$\alpha$}} + \\ + \underbrace{\texttt{mekal} + \texttt{mekal} + \texttt{zpowerlw}}_{\text{Soft plasma and scattered power-law}} + \underbrace{\texttt{phabs}\times \texttt{powerlw}}_{\text{Point source contaminant}} \}. \end{multline} The ABSPL model provides a very good phenomenological description of the data. However, more recent self-consistent models have been developed, based on Monte Carlo simulations of the radiative transfer of X-ray photons emitted by a central source and propagating through some neutral medium with a given assumed geometry \citep{ikeda09, murphy09, brightmannandra11, balokovic18}. Therefore, we will also fit the broad band spectrum with one such more physically motivated descriptions, the \texttt{Borus02} (BORUS) model of \citet{balokovic18}. The assumed geometry of the obscuring medium is a homogeneous sphere with polar cutouts, in which opening angle $\theta_{oa}$ of the torus, measured from the polar axis of the system, is an adjustable parameter. The covering factor CF, defined as the fraction of the sky as seen from the corona obscured by the torus, in this model is $\text{CF}= \cos{\theta_{oa}}$, and allows to explore both sphere-like and disk-like geometries. In XSPEC, its implementation is similar to the ABSPL model: \begin{multline} \overbrace{\texttt{TBabs}}^{\text{Galactic $N_{\rm H}$}}\times \{ \overbrace{\texttt{zphabs}\times \texttt{cabs}\times \texttt{cutoffpl}}^{\text{Intrinsic absorbed emission}} +\hspace{-0.2cm}\overbrace{\texttt{Borus02}}^{\text{Torus reprocesssing}}+\\ + \underbrace{\texttt{mekal} + \texttt{mekal} + \texttt{zpowerlw}}_{\text{Soft plasma and scattered power-law}} + \underbrace{\texttt{phabs}\times \texttt{powerlw}}_{\text{Point source contaminant}} \}. \end{multline} The warped megamaser disk of NGC 4258 has been robustly studied and mapped in detail \citep[e.g.,][]{herrnstein98, herrnstein05, humphreys13} and it has been suggested to be responsible for the obscuration along the line of sight \citep{fruscione05}. \citet{buchner21} recently proposed a spectral model, based on a warped disk geometry, which we will refer to as WARPDSK. The total emission of WARPDSK is the sum of two components: the primary one (\texttt{warpeddisk.fits}) consisting of photons coming directly from the central source and accounting for Compton scattering and absorption from the warped disk, and a second one (\texttt{warpeddisk-omni.fits}) being the so-called omni-directional scattered component due to photons randomly scattered into our line of sight. This warm mirror emission is the angle-averaged (omni-directional) spectrum, predominantly comprising the incident power-law from unobscured lines of sight, and effectively replaces the scattered power-law of the ABSPL and BORUS models. The free parameter \texttt{diskfrac} basically represents the ``strength'' of the warp: a value \texttt{diskfrac} close to unity suggests a strong warp, while a smaller value hints to a flatter geometry. As such, it can be interpreted as a CF as well, although it is not trivial to directly compare the CF from BORUS with \texttt{diskfrac} in WARPDSK. All the parameters of the omni-directional component are linked to those of the main one -- but its normalization, which effectively sets the scattered fraction. In XSPEC notation, the WARPDSK model is implemented as follows: \begin{multline} \overbrace{\texttt{TBabs}}^{\text{Galactic $N_{\rm H}$}}\times \{ \overbrace{\texttt{zphabs}\times \texttt{cabs}\times \texttt{warpeddisk}}^{\text{Intrinsic absorbed emission}} + \\ +\overbrace{\texttt{warpeddisk-omni}}^{\text{emission scattered into the LOS}} + \overbrace{\texttt{mekal} + \texttt{mekal}}^{\text{Soft plasma emission}} + \\ +\underbrace{\texttt{phabs}\times \texttt{powerlw}}_{\text{Point source contaminant}} \}. \end{multline} \subsection{Results}\label{sec:results} The simplest model is the ABSPL with the same parameters for all 17 spectra, modulo a free constant to account for flux variability only (setup A). The reduced $\chi^2$ is already acceptable ($\chi^2/\text{dof} = 3976/3761$), with the two \texttt{mekal} components, with significantly different temperatures, describing sufficiently well the soft emission $< 2$ keV (see \S\ref{sec:soft}). The hard X-ray power-law is obscured by a column of almost $10^{23}$ cm$^{-2}$ and has a slope consistent with a typical value $\Gamma \sim 1.8$. As expected, the constants encapsulating the flux variability are significantly different from unity (set by the flux of the first \textit{XMM-Newton}\xspace observation) and interestingly, show a decreasing trend with time: the flux at the last \textit{NuSTAR}\xspace epoch is around $\sim 25\%$, while the average \textit{Swift}/BAT\xspace flux is roughly 65\%\footnote{Taking the \textit{Swift}/BAT\xspace flux as a reference, this means that the first \textit{XMM-Newton}\xspace and last \textit{NuSTAR}\xspace epochs caught NGC 4258 with a flux $\sim 54\%$ higher and $\sim 62\%$ lower than the average, respectively.}. The other two models, BORUS and WARPDSK, give results consistent with those of the ABSPL one ($\chi^2/\text{dof} = 3969/3760$ and $\chi^2/\text{dof} = 3976/3760$, respectively; bottom left panel of Figure \ref{fig:setups}), both in terms of the soft X-ray emission and the hard X-ray coronal slope and obscuration. Across all models, the scattered power law component needed to fit the spectrum in the $1-3$ keV range gets washed out at lower energies, due to the thermal plasma emission. The only noticeable difference, although within the uncertainties, is in the intrinsic normalization, which results $\sim 50\%$ higher adopting the WARPDSK model. Despite this, the combination of the higher normalization with the softer photon index of the WARPDSK model (see \S \ref{sec:longterm}) gives fully consistent intrinsic $2-10$ keV flux (and therefore luminosity) among models. A detailed comparison with results from previous work \citep[e.g.,][]{fruscione05, reynolds09, kawamuro16, panagiotouwalter19, osorioclavijo21} is not trivial, especially due to different, more recent models being adopted here. In general, however, our spectral parameters are consistent with those found in the literature. The ABSPL model allows to make an assessment over the significance of the Fe K$\alpha$ emission line, whose rest frame energy has been fixed to 6.4 keV: its average equivalent width (EW) results rather low (EW $= 45\pm12$ eV), similar to the EW of the Si K$\alpha$ line identified at $\sim 1.84$ keV. If the energy of the Fe line feature is left free to vary, the $\chi^2$ is not significantly improved and the energy is well constrained ($E_{\rm FeK\alpha} = 6.40\pm0.03$) around the expected value for neutral Fe K$\alpha$ emission. One clear advantage of both the BORUS and WARPDSK models is their self-consistency in treating radiative transfer within the assumed geometry. As previously mentioned, BORUS has the CF of the torus as a free parameter: when fitting for the CF, we find an upper limit of $\text{CF}<0.16$, strongly suggesting that the maser disk is responsible for the obscuration and supporting previous independent claims \citep[e.g.,][]{fruscione05}. Furthermore, if we leave both the $N_{\rm H}$\xspace (representing the line of sight column density) and the parameter $\log{N_{\rm H,Tor}}$ of BORUS \citep[interpreted as a global average $N_{\rm H}$\xspace; see][]{balokovic18} free, slightly different values are returned, suggesting the obscuring medium to be clumpy. The fit with the WARPDSK model in setup A returns a \texttt{diskfrac} parameter $\sim 0.9$, suggesting a strong warp. The detailed results for setup A are summarized in Table \ref{tab:A}. The most interesting results are obtained when refining the analysis by leaving the photon index, column density and coronal flux normalization free for each epoch, i.e. adopting setup B. This setup allows also to explore if and how the spectral shape and X-ray luminosity of the source have changed over the years. For simplicity, when fitting with BORUS we linked the global average $N_{\rm H}$\xspace of the torus and the line of sight $N_{\rm H}$\xspace. In general, the three models return acceptable fits with much better reduced $\chi^2$ with respect to the corresponding setup A. This is not merely due to the increase of the free parameters, as the $\Delta\chi^2/\Delta\text{dof} = 356/28, 345/21, 323/23$ for the ABSPL, BORUS and WARPDSK models, respectively (bottom right panel of Figure \ref{fig:setups}). This supports evidence for spectral variability between different epochs. Indeed, clear column density and spectral slope variations are detected, independently of the spectral model assumed, and will be further discussed in Section \S\ref{sec:variability}. At any given epoch, the three models give consistent results as shown in Figure \ref{fig:var} and Table \ref{tab:B}. Both the CF parameter of BORUS and the \texttt{diskfrac} parameter of the WARPDSK model were free to vary but kept linked for all epochs, and the fitted values are significantly different from those of setup A, suggesting a slightly larger CF (CF$=0.37\pm0.14$), and a much less prominent warping of the disk ($\texttt{diskfrac}=0.25\pm0.01$), respectively. This last result could be somewhat expected. First, the larger number of free parameters in setup B allows to better fit the spectral shape at each epoch, thus returning a new value for the warp strength which is significantly different from before. Furthermore, as detailed in \citet{buchner21}, WARPDSK is tailored for heavily Compton-thick AGN, as the vast majority of disk megamasers turn out to be. Hence the megamaser disk, by construction, has an assigned column $\log{N_{\rm H}/\text{cm}^{-2}} = 25$ to provide the extreme obscuration often observed in the best studied local megamasers \citep[e.g.,][]{arevalo14,puccetti14,bauer15,masini16}. In this particular case, however, in order to account for the relatively low column density affecting the spectrum, WARPDSK is forced by the fixed inclination of the inner disk \citep[72\degree,][]{humphreys13} to graze the warp, fitting the \texttt{diskfrac} parameter to the lower reported value. \subsection{NGC 4258 in the context of local, low-$\lambda_{\rm Edd}$ AGN}\label{sec:context} Disk megamasers, when compared with the local \textit{Swift}/BAT\xspace-selected AGN population, generally occupy the high-end of the $\lambda_{\rm Edd}$ distribution \citep[see, e.g., Figure 8 of][]{masini19}. In this regard, NGC 4258 is definitely peculiar with respect to other disk megamasers, although other \textit{Swift}/BAT\xspace-selected AGN show accretion rates comparable with that of NGC 4258. Thus, it is interesting to consider this source in a broader context, comparing its properties with those of other local, low-Eddington ratio AGN. The sample of 81 local AGN observed by \textit{NuSTAR}\xspace with $\log{\lambda_{\rm Edd} < -3}$ presented by \citet{osorioclavijo21}, in which NGC 4258 is included as a LINER, is the ideal sample to make such a comparison. In terms of black hole mass, bolometric luminosity and Eddington ratio, NGC 4258 is fully consistent with the average values found for their sample of local LINERs. The same holds true also regarding its X-ray properties: both the photon index and the average column density are consistent with their respective averages of the LINER sample. In general, the results about NGC 4258 reported in this work and \citet{osorioclavijo21} are consistent, despite applying different models, and we also do not find any significant contribution of a reflection component in the hard X-ray spectrum of NGC 4258. These findings support the hypothesis that at low accretion rate the standard picture of the torus may break down. In the specific case of NGC 4258, the missing reflection component may be a consequence of the low covering factor of the warped maser disk surrounding the AGN. \section{Short and long term variability}\label{sec:variability} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/lc.pdf} \caption{\textit{NuSTAR}\xspace (average of FPMA and FPMB) $10-40$ keV light-curve across two observations, showing the background-subtracted count rate in bins of 5 ks. The shorter observation of November 2015 displays variability on short timescales (a few ks), which are intrinsic to the source (not due to obscuration).} \label{fig:lc} \end{figure} As shown in the previous Section, setup B allows to keep track of the spectral parameters and the luminosity of NGC 4258 as a function of time. Moreover, the last two \textit{NuSTAR}\xspace epochs allow to explore also the intrinsic, hard X-ray emission from the putative corona. In the following, we thus focus on both the short and long term variability of NGC 4258. \subsection{Short term variability} We take advantage of the \textit{NuSTAR}\xspace data to explore the intrinsic hard X-ray variability (i.e., not caused by variable absorption) of the AGN. The background-subtracted $10-40$ keV \textit{NuSTAR}\xspace light curve for both ObsIDs is shown in Figure \ref{fig:lc}, where data of the two focal plane modules have been averaged together and binned with a 5 ks bin size. First, we note again that the average, net count rate from NGC 4258 has decreased between the two \textit{NuSTAR}\xspace observations by roughly $\sim20\%$. While the most recent data do not show any particular trend, a clear peak is visible in the first dataset around 17-Nov-2015. We have extracted the \textit{NuSTAR}\xspace spectrum of the ``mini-flare'' and compared it with the quiescent spectrum, finding no significant difference in either spectral slope or column density. This could be due to the relatively weak intensity of the peak, which is actually less than a $50\%$ increase in count rate. Figure \ref{fig:lc} shows that a rise time of $\sim 20$ ks is observed for the mini-flare on 17-Nov-2015. This timescale looks halfway between those found by \citet{reynolds09}, who detected both a significant brightening of NGC 4258 during the 2007 {\it \textit{Suzaku}\xspace} exposure with a timescale of $\sim50$ ks, and lower amplitude fluctuations over much shorter timescale of $\sim5$ ks. Assuming that variability is associated with accretion disk processes, \citet{reynolds09} equated these variability timescales with the dynamical time of a Keplerian disk $\Omega^{-1} = \sqrt{r^3/GM}$, to put constraints over the size of the X-ray emitting region. Under the same assumption, the observed timescale of $\sim 20$ ks corresponds to an emitting region size of $\sim 20r_g$, where $r_g = GM/c^2$ is the usual definition of the gravitational radius. \subsection{Long term variability and Fe K$\alpha$ line}\label{sec:longterm} \begin{figure*} \centering \includegraphics[width=\textwidth]{figures/var.pdf} \caption{Long term evolution of the main spectral parameters. From top to bottom: column density in units of $10^{22}$ cm$^{-2}$, photon index $\Gamma$ (generally between $1.6-2.0$), intrinsic (de-absorbed) $2-10$ keV luminosity, EW of the Fe K$\alpha$ line (only for the ABSPL model and for values from the literature; the inset shows the logarithmic flux of the Fe K$\alpha$ line in the ABSPL model, for the data considered in this work). The values referring to the three models employed in our analysis are labeled with different empty markers and colors (blue circles, orange squares and green upward triangles for the ABSPL, BORUS and WARPDSK models, respectively), and are fully consistent with each other. Red diamonds, the blue star and the purple downward triangle refer to ASCA \citep{reynolds00, terashima02}, BeppoSAX \citep{fiore01} and \textit{Suzaku}\xspace \citep{reynolds09} observations, respectively. In the top panel, the dashed black line is a simple sinusoid with a period of 10 years, and is not a fit to the data. Most notably, the intrinsic de-absorbed 2-10 keV luminosity shows an approximately steady decrease of more than a factor of three over $\sim20$ years.} \label{fig:var} \end{figure*} The spectrum of NGC 4258 shows moderate flux variability among the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace observations, as previously reported in the literature, and as demonstrated also by our analysis. Therefore, we collected the spectral parameters of the three models employed in Section \S\ref{sec:analysis} as a function of time, along with previous results from the literature. This allows us to explore the long term behavior of NGC 4258, spanning 23 years, between 1993 and 2016. The first panel from the top of Figure \ref{fig:var} shows the variability of the the X-ray obscuring column density $N_{\rm H}$\xspace. The column density is always around $\sim 10^{23}$ cm$^{-2}$, with fluctuations of a factor of $\sim2$. As detailed in \citet{fruscione05}, $N_{\rm H}$\xspace has been observed to increase over a few months timescale in 2001, with an associated length scale of about $10^{15}$ cm, very similar to the expected scale height of a standard thin accretion disk. We find a fully consistent trend in the first five \textit{XMM-Newton}\xspace epochs analyzed here, in which $N_{\rm H}$\xspace increases from $\sim 8\times 10^{22}$ cm$^{-2}$ to $\sim 14\times 10^{22}$ cm$^{-2}$ over $\Delta t = 530$ days. Assuming that the absorbing gas is located at the radius where the warp is expected to cross the line of sight, i.e. $R \sim 0.3$ pc, and that it orbits in a Keplerian rotation the central mass of $M = 4 \times 10^{7}$ M$_\odot$, the orbital velocity is $v = \sqrt{GM/R} \sim 760$ km s$^{-1}$. The characteristic size is then $s = v\Delta t \sim 3.5 \times 10^{15}$ cm. Assuming the typical density for masers to occur $\rho \sim 10^8$ cm$^{-3}$, and the column density variation $\Delta N_{\rm H} \sim 6 \times 10^{22}$ cm$^{-2}$, the associated depth variation (i.e., size along the line of sight) is $\Delta L \sim \Delta N_{\rm H}/\rho \sim 6 \times 10^{15}$ cm, which is roughly twice the previously derived characteristic size $s$. This increase in column density could be obtained either by doubling the number of clouds along the line of sight, or doubling the density of the absorbing medium. Interestingly, the column density seems to oscillate more or less regularly on a timescale of about 10 years, as suggested by the sinusoidal function with a period of 10 years we have plotted over the data. Although the reduced $\chi^2$ of fitting a simple sinusoidal function to the data is large enough to reject the null hypothesis ($\chi^2_{\nu} \sim 2.5$), a simple linear fit with roughly constant column density returns a much worse result ($\chi^2_{\nu} \sim 6.8$). If this remarkable, oscillatory trend is confirmed, its period ($\sim 10$ years) is much shorter than the orbital period at the warp radius ($\sim 2600$ years), and it may suggest periodic density variations in the absorbing gas, happening on a temporal scale of 5-10 years. This timescale corresponds to a linear scale of $1-2 \times 10^{16}$ cm ($0.003-0.006$ pc) at the warp radius. Interestingly, spiral density waves have been proposed to explain the periodicity and clustering of the masers in NGC 4258 \citep{humphreys08}. In the same paper, \citet{humphreys08} show that massive He I stars with a mass of $50-100 M_\odot$, comparable to those found in the Galactic center \citep{genzel03}, would be able to create gaps in the maser disk, with a size consistent with that observed here, and potentially responsible for the column density fluctuations. The second panel from the top shows the long term evolution of the photon index $\Gamma$. It is generally measured between $1.6-2.0$, and there is no significant variability. We note that, at any given epoch, the WARPDSK model tends to return systematically softer (although statistically consistent) photon indices with respect to the ABSPL and BORUS models. The third panel of Figure \ref{fig:var} shows the intrinsic, absorption-corrected $2-10$ keV luminosity: after the early 2000s, the luminosity has been steadily decreasing, by a factor of $\sim 3$. The 2007 {\it \textit{Suzaku}\xspace} observation seems to be the exception to this trend but, as mentioned earlier, \citet{reynolds09} caught NGC 4258 in a bright flux state during this observation. Since the luminosity is already corrected for variable absorption, the data strongly suggest that NGC 4258 is constantly getting fainter during the period considered. It is interesting to compare the intrinsic $2-10$ keV luminosity derived here from that expected from the well known $12 \mu$m -- $2-10$ keV correlation. NGC 4258 has a nuclear $12 \mu$m luminosity $\log{L_{12 \mu m}/\text{erg s}^{-1}} = 41.26 \pm 0.05$, from which an expected $\log{L_{2-10 \text{keV}}/\text{erg s}^{-1}} = 41.03\pm0.04$ is derived \citep{asmus15}. This luminosity is consistent with that measured until the early 2000s, while the MIR observations described in \citet{asmus15} refer to the years 2010-2011, when NGC 4258 was already a factor of $\sim$ two fainter, according to our results. If there are no sources of contamination contributing significantly to the 12 $\mu$m flux, and if NGC 4258 has kept steadily decreasing its X-ray luminosity, this result could suggest a lag of the MIR with respect to the X-ray emission of at least a decade, thereby placing the MIR-emitting dust on a scale of $\sim 3$ pc. Finally, the behavior of the Fe K$\alpha$ line (bottom panel of Figure \ref{fig:var}) is not easy to interpret. While the first ASCA observations suggested the presence of a moderately prominent emission line with an EW around $\sim 100$ eV, the subsequent \textit{XMM-Newton}\xspace observations we have considered in this work set only upper limits and never firmly detect the line, apart from the 2007 epoch \citep{reynolds09}, in which the line has in any case a modest EW. In the two most recent \textit{NuSTAR}\xspace epochs, the line has been marginally detected only in the last (and longer) observation. This could be due to the more stable and systematically lower count rate of the source during the last \textit{NuSTAR}\xspace epoch, as shown in Figure \ref{fig:lc}, which would make the line stand out more easily. If this hypothesis is correct, this would also imply that the Fe line is produced on large scales ($\sim$ pc scale) and lags significantly behind the continuum, differently from the inner disk origin interpretation of \citet{reynolds09}. Independently of its origin interpretation, the line EW from the \textit{NuSTAR}\xspace epochs is consistent with that reported by \citet{reynolds09}. The inset in the last panel of Figure \ref{fig:var} shows the logarithmic flux of the Fe K$\alpha$ line for the spectra that we have analyzed in this work, derived through the XSPEC command \texttt{cflux}. The behavior of the line flux is fully consistent with that seen for its EW. \section{Discussion}\label{sec:discussion} The comparison of the X-ray spectra of NGC 4258 across two decades has shown that its X-ray properties have changed through the years both due to factor of $\sim$ two variations of the absorbing column density, plausibly associated with the dusty megamaser disk, and to intrinsic changes in the emission from the central engine -- most notably the coronal luminosity, which appears to have steadily decreased by a factor of $\sim$ three across $\sim15$ years, the only exception being the \textit{Suzaku}\xspace observation which caught the source in a high state \citep{reynolds09}. The short variability timescale ($\sim 20$ ks) observed in the hard X-ray \textit{NuSTAR}\xspace data suggests that the variations might be due to changes in the accretion rate, in turn related to the rate of energy deposition in the corona. Accretion rate variability would also explain the long term decrease in intrinsic luminosity observed through 15 years of observations. The viscous timescale of a standard thin disk is generally much longer than few years. On the other hand, the SEDs of low luminosity AGN such as NGC 4258 are often explained in the context of RIAFs, i.e. with a combination of truncated \citet{shakurasunyaev73} disks with inner ADAFs and relativistic jets. Past efforts have successfully explained the broadband SED of NGC 4258 with such a model, although with their own shortcomings \citep[e.g.,][]{yuan02, wu13}. Interestingly, the viscous timescale is $\propto (r/H)^2$, thus becoming significantly shorter for an ADAF \citep{narayanyi95}. Both the \citet{shakurasunyaev73} and the RIAF models are in turn part of the so-called standard and normal evolution (SANE) models, in which the magnetic field is assumed to not significantly impact the dynamics of the disk. Opposed to SANE there are magnetically arrested disk models \citep[MAD;][]{narayan03}, expected to form when the accretion flow is supplied with a sufficient amount of magnetic flux. Unfortunately, it is difficult to observationally disentangle the two families of models \citep{xiezdziarski19}. Furthermore, given the above results is not trivial to even discriminate between a RIAF and a standard thin disk. Indeed, the absorption-corrected X-ray luminosity $L_{\rm X}$, combined with archival determinations of the bolometric luminosity, implies a bolometric correction of $k_{\rm bol} \sim 20$, intriguingly typical of Seyferts powered by accretion through thin disks \citep{lusso12, duras20}. We note, however, that NGC 4258 could nonetheless be in a ``sweet spot'' in which the bolometric correction is consistent with that of a typical Seyfert, being it still powered by a RIAF \citep{nemmen14}. Moreover, its average photon index $\Gamma \sim 1.8$ is consistent with the typical value of the broader AGN population \citep[e.g.,][]{ricci17BASS}. Thus, our work suggests that NGC 4258 is a standard, low luminosity Seyfert II, despite its accretion rate in Eddington units being well within the expected RIAF regime. Further discussion arises considering the X-ray photon index $\Gamma$ as a function of X-ray Eddington ratio $\lambda_{\rm X} = L_{\rm X}/L_{\rm Edd}$ (Figure \ref{fig:gammaEddrat}). Previous work has found somewhat conflicting results related to the $\Gamma-\lambda_{\rm Edd}$ correlation: \citet{brightman13} and \citet{brightman16} found a positive correlation between these two quantities, both for unobscured and heavily obscured AGN. On the other hand, \citet{trakhtenbrot17} found a much shallower correlation using a large, local \textit{Swift}/BAT\xspace-selected sample. Analyzing a sample of low-luminosity AGN, \citep{gucao09} found instead an anti-correlation, similar to what is observed for X-ray binaries in the hard state \citep[e.g.,][]{liu19}. In our case, the spanned range in $\lambda_{\rm X}$ is around one order of magnitude, and there seems not to be any significant correlation between the two quantities considering the whole range. A possible anti-correlation may exist for $\log{\lambda_X} < -5$, similar to what is observed in other low-luminosity AGN \citep[e.g.,][]{kawamuro16}, and may suggest a transition between hot and cold accretion flows below and above a critical value $\log{\lambda_X} = -5$. Assuming a typical bolometric correction of order $\sim20$, this critical value would roughly correspond to $\lambda_{\rm Edd} \sim 10^{-4}$, which appears to be somewhat low for the transition between cold and hot accretion flows. However, this may suggest a MAD scenario to be in place, given the lower accretion rate at which a cold solution can still exist, with respect to SANE models \citep{xiezdziarski19}. In summary, if the change of slope in the $\Gamma-\lambda_{\rm X}$ plane is real, we may be witnessing the switch between cold and hot accretion flows in NGC 4258. Of course, at $\log{\lambda_{\rm X}} \lesssim -5$ there are just three data points at the moment, so future observations are highly warranted to support or discard this finding, especially if the trend of steady decrease in X-ray luminosity will be confirmed. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/gammaEddrat.pdf} \caption{Photon index $\Gamma$ as a function of the X-ray Eddington ratio $\lambda_{\rm X}$ ($\lambda_{\rm X} = L_{\rm X}/L_{\rm Edd}$). Yellow points, red diamonds, the blue star and the purple triangle refer to the data analyzed in this work with the BORUS model, and to archival ASCA, BeppoSAX and \textit{Suzaku}\xspace data, respectively. The black dashed lines are simple linear fits below and above the separation value of $\log{\lambda_{\rm X}} = -5$ (broadly corresponding to a canonical Eddington ratio of $\approx 10^{-4}$ for a bolometric correction of order $10$), showing two possible regimes.} \label{fig:gammaEddrat} \end{figure} \section{Conclusions}\label{sec:conclusions} In this paper, we have analyzed the accretion properties of a well studied, nearby low-luminosity AGN, NGC 4258. We have collected and re-analyzed \textit{Chandra}\xspace, \textit{XMM-Newton}\xspace, \textit{NuSTAR}\xspace and \textit{Swift}/BAT\xspace observations, building a broadband X-ray spectrum ($0.3-150$ keV) and spanning from the early 2000s up to 2016; we have furthermore added results from earlier archival observations taken from the literature, for a total timespan of $\sim 23$ years. Our main findings are as follows: \begin{itemize} \item The soft X-ray emission ($E<2$ keV) is stable across the years (Figure \ref{fig:spec}), and is well described by emission from hot plasma consistent with that found in the anomalous arms on kpc scales. \item The hard X-ray emission ($E>2$ keV), on the other hand, displays significant variability (Figure \ref{fig:spec}), both on timescales of hours (Figure \ref{fig:lc}) and years (Figure \ref{fig:var}), both intrinsic and due to absorbing gas. \item We have employed three different models to fit the dataset of 17 spectra: a simple absorbed power law, a torus, and a warped disk. All three models gave consistent results over the spectral parameters, either when fitting the data simultaneously with a single model, or when a full spectral variability is allowed for (Figure \ref{fig:setups}). \item The average spectral properties of NGC 4258 are typical of low luminosity obscured Seyferts, with a photon index and column density fluctuating in the range $\Gamma = 1.6-2.2$ and $N_{\rm H} = 0.8-2.1 \times 10^{23}$ cm$^{-2}$, respectively (Figure \ref{fig:var}). \item The obscuring column density shows fluctuations of a factor of two, as previously reported in the literature. Its variations appear to be qualitatively periodic, with a period of about 10 years (Figure \ref{fig:var}). If confirmed, this trend would suggest smooth density variations, possibly induced by spiral density waves and/or gaps in the disk carved by massive He I stars. \item The Fe K$\alpha$ line, as previously reported in the literature, is weak, with an average $\text{EW} = 45\pm12$ eV. Its detectability is significantly different among the dataset considered here, and in only two epochs it is detected at $\sim 2 \sigma$ level of confidence (Figure \ref{fig:var}). \item The absorption-corrected, intrinsic $2-10$ keV luminosity is observed to be almost steadily decreasing by a factor of 3 between 2000 and 2016 (Figure \ref{fig:var}). \item The variations in photon index and luminosity appear to follow two different behaviors (Figure \ref{fig:gammaEddrat}): when the source is brighter than a certain critical value in X-ray-scaled Eddington ratio ($\log{\lambda_{\rm X}} > -5$), no apparent trend is seen; at lower accretion rate, there seems to be an anti-correlation between the two quantities, which may indicate a transition between hot and cold accretion states, similar to what is observed in X-ray binaries. \end{itemize} \begin{acknowledgements} We thank J. Buchner for useful guidance in using the warped disk model. This work made use of data from the \textit{NuSTAR}\xspace mission, a project led by the California Institute of Technology, managed by the Jet Propulsion Laboratory, and funded by the National Aeronautics and Space Administration. This research made use of the \textit{NuSTAR}\xspace Data Analysis Software (NuSTARDAS) jointly developed by the ASI Science Data Center (ASDC, Italy) and the California Institute of Technology (USA). This research has also made use of data obtained from the \textit{Chandra}\xspace Data Archive and software provided by the \textit{Chandra}\xspace X-ray Center (CXC). This work is also based on observations obtained with \textit{XMM-Newton}\xspace, an ESA science mission with instruments and contributions directly funded by ESA Member States and NASA. We acknowledge the use of public data from the {\it Swift} data archive. P. B. acknowledges financial support from the Czech Science Foundation project No. 22-22643S. \end{acknowledgements} \bibliographystyle{aa} \section{Introduction} The nearby spiral galaxy NGC 4258 hosts one of the closest active galactic nuclei (AGN), at a distance of $7.58 \pm 0.11$ Mpc \citep{reid19}. However, its historical importance goes beyond its mere distance. Since the discovery of nuclear megamaser emission at 22 GHz from water vapour molecules \citep{claussen84}, NGC 4258 soon became the cleanest evidence for the existence of extragalactic supermassive black holes (SMBHs). The mapping and temporal monitoring of the masers through Very Long Baseline Interferometry (VLBI) revealed a sub-pc molecular, dusty disk in Keplerian rotation around a central mass $M = 4 \times 10^7 M_\odot$ \citep{nakai93, miyoshi95}. Moreover, NGC 4258 has since been an anchor galaxy to calibrate the distance ladder and to measure the expansion rate of the Universe $H_0$ \citep{pesce20}. Nowadays, water masers tracing edge-on molecular disks around AGN -- called disk megamasers -- have been (more or less securely) detected in a couple dozen of galaxies, and allow to measure both the most precise extragalactic SMBH masses to date \citep[e.g.,][]{kuo11}, and geometric distances \citep[e.g.,][]{kuo15, reid19}. NGC 4258 has historically been considered as the archetype for the class of disk megamasers, although today it is well accepted to be a somewhat anomalous source with respect to the others \citep[e.g., for its low obscuration along the line of sight; see][]{masini16}. After the discovery of water maser spots in the nucleus of NGC 4258, slight, albeit significant, deviations from a pure Keplerian rotation were then noticed \citep{herrnstein05}, indicating that a simple flat, geometrically thin molecular disk was a too simplistic model to explain their dynamics. By introducing both a position angle and inclination warps, \citet{herrnstein05} were instead able to reconcile the maser spots kinematics with a pure Keplerian rotation. Furthermore, in this model the projected clustering of the systemic masers was naturally explained by their confinement in the bottom of the "bowl" caused by the inclination warp. A natural implication of a warped maser disk was that it would rise in front of the observer, hiding the central engine and possibly providing the observed moderate absorption in the X-ray spectrum \citep{fruscione05}, first noticed more than 25 years ago \citep{makishima94}. \citet{herrnstein05} were able to put a constraint on the radial distance at which the warp crosses the line of sight, by comparing their warp model with the radius at which the X-ray irradiation would cause a transition from molecular to atomic gas in the disk \citep{neufeldmaloney95}. The transition radius was found to be at $\sim 0.28$ pc from the nucleus, and was also used to constrain the accretion rate through the maser disk assuming a steady state, geometrically thin and optically thick accretion disk \citep{shakurasunyaev73}. \par Also, NGC 4258 is a very interesting AGN because its particularly low bolometric luminosity in Eddington units\footnote{The bolometric luminosity of NGC 4258 has been historically estimated in the literature through SED fitting \citep{lasota96, yuan02, wu13}, and has been found to be around $\sim10^{-4}$ times the Eddington luminosity. The optical/UV data employed by those works are either upper limits from continuum observations, or those by \citet{wilkes95}, who directly detected the nucleus of NGC 4258 in polarized light at 5500 \AA.} ($L_{\rm Bol}/L_{\rm Edd} \sim 10^{-4}$) could be either explained by a very low accretion rate, or by invoking a radiatively inefficient accretion flow \citep[RIAF; see, e.g.,][and references therein]{narayanyi95}. The acronym RIAF generally refers to physically different accretion flows, such as advection-dominated flows \citep[ADAF,][]{narayanyi95} or adiabatic inflow-outflow solutions \citep[ADIOS,][]{blandfordbegelman99}. In these models, the inner regions of the accretion disk do not follow the usually assumed \citet{shakurasunyaev73} one. Therefore, a detailed study of this source offers a unique opportunity to explore the inner fraction of a parsec of an under-luminous AGN. \par Several previous studies have investigated the nature of the accretion flow in NGC 4258, both through its broadband spectral energy distribution (SED) and detailed X-ray spectroscopy. After the discovery of the sub-pc maser disk, for instance, \citet{neufeldmaloney95} derived an accretion rate $\dot{M} = 7\times 10^{-5}\alpha$ \citep[where $\alpha$ is the standard viscosity parameter of][]{shakurasunyaev73}, by assuming a viscous accretion disk whose midplane is traced by the masers, and obliquely illuminated by a central X-ray source. By combining the low X-ray luminosity with such an accretion rate and assuming a bolometric correction typical of Seyfert galaxies \citep{mushotzky93}, \citet{neufeldmaloney95} derived a ``standard'' radiative efficiency of order $\eta \sim 0.1$, thus not requiring radiatively inefficient accretion to explain the low luminosity of the AGN. On the other hand, \citet{lasota96} and \citet{gammie99} fitted the SED of the source with an ADAF with a much higher accretion rate ($\dot{M} \sim 10^{-2}$). However, \citet{yuan02} later demonstrated that a ``classical'' ADAF-like accretion flow was not able to account for the nuclear IR data, in particular the steep power-law shape, indicative of non-thermal emission \citep{chary00}. Moreover \citet{fiore01}, analyzing BeppoSAX data, found that pure bremsstrahlung emission \citep[as expected from an ADAF,][]{narayanyi95} is ruled out by the X-ray data. Rather, the X-ray spectrum of NGC 4258 resembles an average Seyfert-like spectrum, being successfully described by the combination of a power-law modified at low energy by photoelectric absorption, and soft X-ray emission due to the extended (kpc-scale) structures connected to the so-called twisted anomalous arms \citep[and references therein]{wilson01}. \citet{yuan02} suggested that a composite model, in which an outer thin disk transitions to an inner RIAF, which then transfers energy to a relativistic jet, was able to account for the radio to X-ray SED of NGC 4258. In this model, the X-ray emission would arise from Comptonization by hot electrons at the base of the jet. This picture was broadly supported by \citet{herrnstein05}, who inferred a consistently low ($\sim 10^{-4}\alpha$ $M_\odot$ yr$^{-1}$) accretion rate. The absence of a broad Fe K$\alpha$ line, paired with the detection of a weak, narrow and rapidly variable component \citep{reynolds09}, further supported the view that the inner regions of NGC 4258 might deviate significantly from a canonical radiatively efficient disk. Later on, \citet{wu13} fit again the broadband nuclear SED of NGC 4258 with a composite model (inner RIAF + outer truncated thin disk + a jet), suggesting that the SED can be reproduced by a combination of the three components, and placing a constraint over the spin parameter of the SMBH ($a = 0.7 \pm 0.2$). \par The goal of this work is to comprehensively review the X-ray properties of NGC 4258, to possibly shed new light on its accretion flow and long term ($\sim 20$ years) evolution. To this aim, we take advantage of the wealth of available data: we re-analyze with state of the art models archival (from $\sim 2000-2016$) spectroscopic observations of the \textit{Chandra}\xspace X-ray telescope \citep{weisskopf00}, the \textit{XMM-Newton}\xspace observatory \citep{jansen01}, the \textit{Swift}/BAT\xspace telescope \citep{gehrels04, barthelmy05}, and \textit{NuSTAR}\xspace \citep{harrison13}. The obtained results are then complemented with others from the literature (from $\sim 1993-2000$), to obtain a complete and thorough X-ray view of a nearby under-luminous AGN spanning 23 years of observations. \par The paper is structured as follows: in Section \ref{sec:datareduction}, both the observations used in this work and their associated data reduction are presented. Section \ref{sec:offnuc} discusses the contribution to the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace fluxes of the non-AGN components, i.e. the large-scale plasma emission and the off-nuclear point source. The broadband spectral analysis is conducted in Section \ref{sec:analysis}, with the setup presented in \ref{sec:setup} and results discussed in Section \ref{sec:results} and \ref{sec:context}. Both the short and long term variability are discussed in Section \ref{sec:variability}. The discussion of the general results obtained is found in Section \ref{sec:discussion}, while our conclusions are drawn in Section \ref{sec:conclusions}. Tables with spectral analysis results are reported in Appendix \ref{sec:appendix}. \par Throughout the paper, uncertainties are given at the 90\% confidence level, unless otherwise stated, and no cosmology is assumed, given the adopted geometric distance \citep{reid19}. \begin{table} \caption{Log of the observations analyzed in this work.} \label{tab:info} \centering \begin{tabular}{l c c c} \hline\hline Telescope & ObsID & Date & Exp (ks) \\ \hline \multirow{4}{5em}{\textit{Chandra}\xspace} & 349 & 08-Mar-2000 & 2.8 \\ & 350 & 17-Apr-2000 & 14.2 \\ & 1618 & 28-May-2001 & 21.3 \\ & 2340 & 29-May-2001 & 7.6 \\ \hline \multirow{8}{5em}{\textit{XMM-Newton}\xspace} & 0110920101 & 08-Dec-2000 & 13.3/20.1 \\ & 0059140101 & 06-May-2001 & 7.8/12.0\\ & 0059140201 & 17-Jun-2001 & 2.7/8.4\\ & 0059140401 & 17-Dec-2001 & 0.3/3.3\\ & 0059140901 & 22-May-2002 & 9.8/13.6\\ & 0400560301 & 17-Nov-2006 & 45.3/57.2\\ \hline \multirow{2}{5em}{\textit{NuSTAR}\xspace} & 60101046002 & 16-Nov-2015 & 54.8 \\ & 60101046004 & 10-Jan-2016 & 103.6 \\ \hline \textit{Swift}/BAT\xspace & $-$ & 105 months & $1.85 \times 10^5$ \\ \hline \end{tabular} \tablefoot{Exposure times relative to the \textit{XMM-Newton}\xspace observations are the final, cleaned exposure times of each spectrum, for the PN and MOS cameras, respectively.} \end{table} \section{Observations and Data reduction}\label{sec:datareduction} \begin{figure*} \centering \includegraphics[width=0.95\textwidth]{figures/m106_cxo.png} \caption{{\it Left.} \textit{Chandra}\xspace ACIS-S $0.5-7.0$ keV image of NGC 4258. The green box labels the extraction region of the soft, diffuse emission. The red dashed box marks the size of the zoomed inset in the right panel. {\it Right.} \textit{Chandra}\xspace ACIS-S $0.5-7.0$ keV image of NGC 4258, zoomed on the nuclear region with the off-nuclear source clearly visible. Its spectrum has been extracted from the green circular region. The red dashed box marks the corresponding size of the zoomed inset in the left panel. In both panels, north is up and east to the left.} \label{fig:cxo} \end{figure*} NGC 4258 was observed multiple times by all major X-ray astronomical facilities in the last decades. Here we focus on the most recent \textit{Chandra}\xspace ACIS-S, \textit{XMM-Newton}\xspace EPIC PN and MOS, \textit{NuSTAR}\xspace FPMA and FPMB, and Swift/BAT observations. A summary of the observations considered, with their dates and cleaned exposure times, is shown in Table \ref{tab:info}. Together with this data, we will consider previously published results from the literature, regarding ASCA \citep{makishima94, reynolds00, terashima02}, BeppoSAX \citep{fiore01} and \textit{Suzaku}\xspace \citep{reynolds09} observations. For all of the analysis we use the fitting package XSPEC \citep{arnaud96} v.12.11.1. \subsection{\textit{Chandra}\xspace} NGC 4258 has been observed four times by \textit{Chandra}\xspace with the ACIS-S instrument, for a total exposure time of 46 ks. The nucleus is so bright that its emission is piled-up even in a modest \textit{Chandra}\xspace exposure \citep{youngwilson04}. Indeed, the majority of the ACIS-S exposure time was intended to study the anomalous arms, while very few ks of observations with short time frames ($0.4 s$ and $0.1 s$) could in principle be used to extract less-piled-up spectra of the nuclear source. Pile-up manifests as a spectral distortion, hardening the spectrum and making it unnaturally flat. Although there are {\it ad-hoc} models available in spectral fitting software to mitigate the effects of pile up, they rely on a few poorly known parameters \citep[see, e.g., the pile up model by][]{davis01}. Therefore, we have chosen not to increase the number of parameters in our modeling, and instead took advantage of the excellent angular resolution of \textit{Chandra}\xspace to extract the spectra of the non-nuclear components that are very likely to contaminate the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace data, due to their lower angular resolution and larger point spread function (PSF). \textit{Chandra}\xspace observations were downloaded from the \textit{Chandra}\xspace\xspace {\it Data Archive} and reprocessed with the \texttt{chandra\_repro} task in CIAO \citep{fruscione06} v.4.12. The \texttt{specextract} task was used to extract the spectrum of the circum-nuclear soft, diffuse emission and of an off-nuclear X-ray source, $2\farcs5$ south-east from the nucleus and already known in the literature \citep{wilson01, pietschread02, youngwilson04}. \subsection{\textit{XMM-Newton}\xspace} NGC 4258 was observed by \textit{XMM-Newton}\xspace multiple times, in particular for five epochs during the early 2000s \citep{fruscione05}, and once in 2006 \citep{reynolds09}. The \textit{XMM-Newton}\xspace observations were downloaded from the HEASARC archive and reduced with the SAS v.19.1.0. In particular, cleaned event files were created for both the PN and MOS cameras onboard XMM with the \texttt{epproc} and \texttt{emproc} tasks, respectively. No pileup was detected, as reported in \citet{fruscione05}. High background time intervals were selected using light curves in the $10-12$ keV energy range. The event files were thus filtered with these defined good time intervals, and adopting the standard FLAG=0 and pixel groups with pattern $\leq 4$ and $\leq 12$ for the PN and MOS cameras, respectively. Finally, source and background spectra, as well as ancillary files and responses, were extracted using the SAS task \texttt{xmmselect}. Source spectra were extracted from 15"-radius circular apertures, while background spectra were extracted from larger circles (with size ranging from 60" to 90") on the same detector chips. \texttt{epicspeccombine} was used to co-add MOS1 and MOS2 spectra for each of the six epochs, resulting in a total of 12 \textit{XMM-Newton}\xspace spectra. All the spectra have been rebinned to have at least 20 counts per bin with the HEASOFT tool \texttt{grppha}. \subsection{\textit{NuSTAR}\xspace} \textit{NuSTAR}\xspace observed NGC 4258 twice, for a total exposure time of $\sim 158$ ks. We downloaded the ObsIDs from the HEASARC archive, and reduced the observations with the NuSTARDAS package, using the standard \texttt{nupipeline} task to clean the raw data. The cleaned event files were used to extract the spectral products, through the task \texttt{nuproducts}. Source and background spectra were extracted from circles of 50" and 120" radius, respectively. The background regions were chosen on the same detector chip where the source spectra were extracted. All the spectra have been rebinned to have at least 20 counts per bin with the HEASOFT tool \texttt{grppha}. \subsection{\textit{Swift}/BAT\xspace} We downloaded the \textit{Swift}/BAT\xspace spectrum of NGC 4258 from the \textit{Swift}/BAT\xspace 105-Month Hard X-ray Catalog \citep{ricci17BASS, oh18} \footnote{https://swift.gsfc.nasa.gov/results/bs105mon/609}, for a final broad band range $0.3-195$ keV. \section{Off-nuclear contaminants}\label{sec:offnuc} The deepest \textit{Chandra}\xspace ACIS-S observation (ObsID 1618, see Table \ref{tab:info}) was used to extract the spectrum of the diffuse, extended soft X-ray emitting plasma in the nucleus of NGC 4258 and of the off-nuclear point source. While the former basically disappears at energies $E \gtrsim 2$ keV, contributing negligibly to the hard X-ray flux, the latter component is expected to contribute, to some extent, to the flux in the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace energy bands. \subsection{Soft, diffuse emission} \label{sec:soft} As detailed in \citet{wilson01}, the clear diffuse X-ray emission coincident with NGC 4258 anomalous arms, historically detected also with radio and H$\alpha$ imaging, is due to galactic disk gas that has been shocked by mass motions driven by the out-of-plane radio jets. More recently, evidence for shocks has also been found in cold molecular gas \citep{ogle14}. Thus, much of the gas originally in the disk has been ejected into the galaxy halo in an X-ray hot outflow. As a consequence, the star formation in the central few kpc is rather low \citep[0.08 $M_\odot$/yr,][]{ogle14}. In addition, the anomalous arms themselves have been suggested to be free of star formation \citep{courtes93}. We extract the \textit{Chandra}\xspace spectrum of the diffuse, soft emission along the anomalous arms of NGC 4258, from a rectangular region south-east of the nucleus (left panel of Figure \ref{fig:cxo}). The spectrum is grouped to have at least 20 counts per bin, and is fitted with a double \texttt{mekal} \citep{mewe85} component in XSPEC. The spectrum is equally well fit either by two different temperatures with solar abundance, or assuming only one component, in which case the abundance is sub-solar. To be consistent throughout the paper, we assume solar abundance and adopt two \texttt{mekal} components to describe this component \citep[e.g.,][]{reynolds09}. \subsection{Off-nuclear point source} \label{sec:oa} The presence of an off-nuclear point source, located 2\farcs5 to the south-east of the nucleus of NGC 4258, has been known for more than two decades \citep{wilson01, pietschread02, youngwilson04}. Despite this, its exact nature is still unknown. Its \textit{Chandra}\xspace spectrum is extracted from a small circular region, carefully avoiding the emission from the active nucleus of NGC 4258 itself (right panel of Figure \ref{fig:cxo}). The spectrum is equally well fit by an absorbed power-law \citep[in which case we find results consistent with those of][]{youngwilson04}, and by a multicolor blackbody model (\texttt{diskbb} in XSPEC). In the first case, the source could be a background AGN with a fairly typical photon index ($\Gamma = 1.74^{+0.45}_{-0.41}$) obscured by a column density $N_{\rm H} = 2.9^{+2.5}_{-2.1} \times 10^{21}$ cm$^{-2}$ (which could be due to gas in NGC 4258 itself), while in the second case it could be an X-ray binary in the nuclear region of the galaxy, with a temperature $kT = 1.4^{+0.6}_{-0.3}$ keV, and whose flux is again absorbed by a column density in excess of $10^{21}$ cm$^{-2}$. The unknown nature of this source results in an uncertain extrapolation of its contribution to the X-ray flux at higher energies, depending on the spectral model assumed. To be conservative, we consider the absorbed power-law model (which provides the largest contribution at hard X-ray energy) fixing the best fit column density, photon index and power-law normalization to their best fit values. We have also verified that across the three \textit{Chandra}\xspace observations in which the source is detected (spanning approximately one year), its $0.5-7$ keV flux is rather stable, showing possible variations at the $20\%$ level -- albeit consistent with being constant within the uncertainties. Its spectral shape is also constant within the uncertainties. However, the quality of the data in the other observations allowed only a rough assessment of the X-ray spectral shape of the off-nuclear point source to be done. Its observed $2-10$ keV flux is $F_{2-10} \sim 10^{-13}$ erg cm$^{-2}$ s$^{-1}$\xspace, $\approx 2\%$ of the average observed flux in the same band from NGC 4258. \section{X-ray spectral analysis}\label{sec:analysis} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/spec.pdf} \caption{Broad band $0.3-195$ keV spectrum of NGC 4258, composed of the 17 spectra analyzed in this work (12 \textit{XMM-Newton}\xspace, 4 \textit{NuSTAR}\xspace and 1 \textit{Swift}/BAT\xspace) spanning more than 15 years of observations. While the soft emission $\lesssim 2$ keV is due to extended plasma and is constant throughout the years, the harder component shows significant variability across different observations. In particular, NGC 4258 was caught in its faintest state during the \textit{NuSTAR}\xspace observations. The spectral turnover below $4-5$ keV is due to the moderate absorption, possibly due to the line of sight intercepting the warped maser disk.} \label{fig:spec} \end{figure} The broadband \textit{XMM-Newton}\xspace + \textit{NuSTAR}\xspace + \textit{Swift}/BAT\xspace spectra, covering almost three orders of magnitude in energy ($0.3-195$ keV) and more than 15 years in time, are shown in Figure \ref{fig:spec}. They show two peaks, around $\sim 4-5$ keV and $\sim1$ keV. While the latter peak is due to the diffuse plasma at large scales, the higher energy one is due to the absorbing column density affecting preferentially soft X-ray photons, hence producing the observed spectral curvature. Consistently with this interpretation, the soft ($\lesssim 2$ keV) emission is stable over the years, while the hard X-ray flux is variable by a factor of $\sim 10$ at $E > 3$ keV. Can this variability be accounted for by {\it flux variability} only, or is it more complex (i.e., a {\it spectral variability})? To answer this question, we will test two different setups for any given spectral model. \subsection{Models setup}\label{sec:setup} \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{figures/absplA_eemo.pdf} \includegraphics[width=0.45\textwidth]{figures/absplB_eemo.pdf} \includegraphics[width=0.45\textwidth]{figures/delchiA.pdf} \includegraphics[width=0.45\textwidth]{figures/delchiB.pdf} \caption{{\it Top row.} The two different setups assumed in the spectral analysis are shown here, adopting the ABSPL model as an example. The left panel refers to setup A, in which the spectral parameters are the same for all the data sets (labeled with different colors), modulo a normalization constant that encapsulates the nuclear flux variability of the hard X-ray emission alone. Setup B is shown in the right panel, for which the diversity in spectral slope, column density and normalization can be appreciated. {\it Bottom row.} Data vs model residuals, as fit with the setup A (left panel), and B (right panel): from top to bottom: ABSPL, BORUS and WARPDSK models, respectively.} \label{fig:setups} \end{figure*} In the first setup, dubbed setup A, we assume that the observed variability is due only to flux variability; thus, we fit all the 17 spectra using the same set of parameters, allowing for a free normalization constant for the nuclear component alone, relative to the first epoch, December 2000 (see the left panel of Figure \ref{fig:setups})\footnote{When simultaneously fitting datasets from different instruments, a multiplicative cross-calibration constant is usually considered. However, in this case we do not include a cross-calibration constant in Setup A, since the cross-calibration uncertainty is much smaller \citep[$\sim10-15\%$;][]{madsen15,madsen17} than the observed flux spread, and the fit would be insensitive to its value.}. In the second setup, dubbed setup B, we instead allow for spectral variability, leaving the column density, photon index and normalization of the coronal power-law free for each epoch\footnote{In setup B, we have fitted at each epoch the cross-calibration constant among cameras of the same instrument (see Table \ref{tab:B}).} (right panel of Figure \ref{fig:setups}). In both setups, the soft emission is modeled in the same way. In all the analysis, the Galactic absorption is fixed to $N_{\rm H,Gal} = 4.19\times 10^{20}$ cm$^{-2}$ \citep{hi4pi16}. The data requires multiple components to reproduce the broadband spectrum of NGC 4258. First, a soft X-ray component to fit the emission below 2 keV. This has been extensively studied, and is usually fitted with two plasma emission models, as discussed in Section \S \ref{sec:soft}. Then, the nuclear hard X-ray emission is generally well described, to first order, by the ``typical'' spectrum of a local AGN, i.e. a power-law modified at low energies by some intervening absorption along the line of sight, and declining at high energies as an approximately exponential cutoff. We fix the high energy cutoff at the median observed value for local Seyfert IIs, i.e. $290$ keV, which is found to be consistent with that of Seyfert Is \citep{balokovic20}. When some degree of absorption is present, both a scattered power-law at soft energies, mirroring the primary one, and a narrow fluorescent Fe K$\alpha$ line at $E\approx 6.4$ keV are also expected. In this particular case, the controversial significance of the line detection which has been somewhat debated in the literature \citep[see, e.g.,][]{reynolds09}, further motivated us to include in our baseline model a Gaussian line component. Finally, an absorbed power-law describing the contamination from the off nuclear point source is taken into account and it is fixed by the best fit values derived from the \textit{Chandra}\xspace spectrum (\S \ref{sec:oa}). In XSPEC notation, this baseline model (dubbed ``ABSPL") reads out as \begin{multline} \overbrace{\texttt{TBabs}}^{\text{Galactic $N_{\rm H}$}}\times \{ \overbrace{\texttt{zphabs}\times \texttt{cabs}\times \texttt{cutoffpl} + \texttt{zgauss}}^{\text{Intrinsic absorbed emission and Fe K$\alpha$}} + \\ + \underbrace{\texttt{mekal} + \texttt{mekal} + \texttt{zpowerlw}}_{\text{Soft plasma and scattered power-law}} + \underbrace{\texttt{phabs}\times \texttt{powerlw}}_{\text{Point source contaminant}} \}. \end{multline} The ABSPL model provides a very good phenomenological description of the data. However, more recent self-consistent models have been developed, based on Monte Carlo simulations of the radiative transfer of X-ray photons emitted by a central source and propagating through some neutral medium with a given assumed geometry \citep{ikeda09, murphy09, brightmannandra11, balokovic18}. Therefore, we will also fit the broad band spectrum with one such more physically motivated descriptions, the \texttt{Borus02} (BORUS) model of \citet{balokovic18}. The assumed geometry of the obscuring medium is a homogeneous sphere with polar cutouts, in which opening angle $\theta_{oa}$ of the torus, measured from the polar axis of the system, is an adjustable parameter. The covering factor CF, defined as the fraction of the sky as seen from the corona obscured by the torus, in this model is $\text{CF}= \cos{\theta_{oa}}$, and allows to explore both sphere-like and disk-like geometries. In XSPEC, its implementation is similar to the ABSPL model: \begin{multline} \overbrace{\texttt{TBabs}}^{\text{Galactic $N_{\rm H}$}}\times \{ \overbrace{\texttt{zphabs}\times \texttt{cabs}\times \texttt{cutoffpl}}^{\text{Intrinsic absorbed emission}} +\hspace{-0.2cm}\overbrace{\texttt{Borus02}}^{\text{Torus reprocesssing}}+\\ + \underbrace{\texttt{mekal} + \texttt{mekal} + \texttt{zpowerlw}}_{\text{Soft plasma and scattered power-law}} + \underbrace{\texttt{phabs}\times \texttt{powerlw}}_{\text{Point source contaminant}} \}. \end{multline} The warped megamaser disk of NGC 4258 has been robustly studied and mapped in detail \citep[e.g.,][]{herrnstein98, herrnstein05, humphreys13} and it has been suggested to be responsible for the obscuration along the line of sight \citep{fruscione05}. \citet{buchner21} recently proposed a spectral model, based on a warped disk geometry, which we will refer to as WARPDSK. The total emission of WARPDSK is the sum of two components: the primary one (\texttt{warpeddisk.fits}) consisting of photons coming directly from the central source and accounting for Compton scattering and absorption from the warped disk, and a second one (\texttt{warpeddisk-omni.fits}) being the so-called omni-directional scattered component due to photons randomly scattered into our line of sight. This warm mirror emission is the angle-averaged (omni-directional) spectrum, predominantly comprising the incident power-law from unobscured lines of sight, and effectively replaces the scattered power-law of the ABSPL and BORUS models. The free parameter \texttt{diskfrac} basically represents the ``strength'' of the warp: a value \texttt{diskfrac} close to unity suggests a strong warp, while a smaller value hints to a flatter geometry. As such, it can be interpreted as a CF as well, although it is not trivial to directly compare the CF from BORUS with \texttt{diskfrac} in WARPDSK. All the parameters of the omni-directional component are linked to those of the main one -- but its normalization, which effectively sets the scattered fraction. In XSPEC notation, the WARPDSK model is implemented as follows: \begin{multline} \overbrace{\texttt{TBabs}}^{\text{Galactic $N_{\rm H}$}}\times \{ \overbrace{\texttt{zphabs}\times \texttt{cabs}\times \texttt{warpeddisk}}^{\text{Intrinsic absorbed emission}} + \\ +\overbrace{\texttt{warpeddisk-omni}}^{\text{emission scattered into the LOS}} + \overbrace{\texttt{mekal} + \texttt{mekal}}^{\text{Soft plasma emission}} + \\ +\underbrace{\texttt{phabs}\times \texttt{powerlw}}_{\text{Point source contaminant}} \}. \end{multline} \subsection{Results}\label{sec:results} The simplest model is the ABSPL with the same parameters for all 17 spectra, modulo a free constant to account for flux variability only (setup A). The reduced $\chi^2$ is already acceptable ($\chi^2/\text{dof} = 3976/3761$), with the two \texttt{mekal} components, with significantly different temperatures, describing sufficiently well the soft emission $< 2$ keV (see \S\ref{sec:soft}). The hard X-ray power-law is obscured by a column of almost $10^{23}$ cm$^{-2}$ and has a slope consistent with a typical value $\Gamma \sim 1.8$. As expected, the constants encapsulating the flux variability are significantly different from unity (set by the flux of the first \textit{XMM-Newton}\xspace observation) and interestingly, show a decreasing trend with time: the flux at the last \textit{NuSTAR}\xspace epoch is around $\sim 25\%$, while the average \textit{Swift}/BAT\xspace flux is roughly 65\%\footnote{Taking the \textit{Swift}/BAT\xspace flux as a reference, this means that the first \textit{XMM-Newton}\xspace and last \textit{NuSTAR}\xspace epochs caught NGC 4258 with a flux $\sim 54\%$ higher and $\sim 62\%$ lower than the average, respectively.}. The other two models, BORUS and WARPDSK, give results consistent with those of the ABSPL one ($\chi^2/\text{dof} = 3969/3760$ and $\chi^2/\text{dof} = 3976/3760$, respectively; bottom left panel of Figure \ref{fig:setups}), both in terms of the soft X-ray emission and the hard X-ray coronal slope and obscuration. Across all models, the scattered power law component needed to fit the spectrum in the $1-3$ keV range gets washed out at lower energies, due to the thermal plasma emission. The only noticeable difference, although within the uncertainties, is in the intrinsic normalization, which results $\sim 50\%$ higher adopting the WARPDSK model. Despite this, the combination of the higher normalization with the softer photon index of the WARPDSK model (see \S \ref{sec:longterm}) gives fully consistent intrinsic $2-10$ keV flux (and therefore luminosity) among models. A detailed comparison with results from previous work \citep[e.g.,][]{fruscione05, reynolds09, kawamuro16, panagiotouwalter19, osorioclavijo21} is not trivial, especially due to different, more recent models being adopted here. In general, however, our spectral parameters are consistent with those found in the literature. The ABSPL model allows to make an assessment over the significance of the Fe K$\alpha$ emission line, whose rest frame energy has been fixed to 6.4 keV: its average equivalent width (EW) results rather low (EW $= 45\pm12$ eV), similar to the EW of the Si K$\alpha$ line identified at $\sim 1.84$ keV. If the energy of the Fe line feature is left free to vary, the $\chi^2$ is not significantly improved and the energy is well constrained ($E_{\rm FeK\alpha} = 6.40\pm0.03$) around the expected value for neutral Fe K$\alpha$ emission. One clear advantage of both the BORUS and WARPDSK models is their self-consistency in treating radiative transfer within the assumed geometry. As previously mentioned, BORUS has the CF of the torus as a free parameter: when fitting for the CF, we find an upper limit of $\text{CF}<0.16$, strongly suggesting that the maser disk is responsible for the obscuration and supporting previous independent claims \citep[e.g.,][]{fruscione05}. Furthermore, if we leave both the $N_{\rm H}$\xspace (representing the line of sight column density) and the parameter $\log{N_{\rm H,Tor}}$ of BORUS \citep[interpreted as a global average $N_{\rm H}$\xspace; see][]{balokovic18} free, slightly different values are returned, suggesting the obscuring medium to be clumpy. The fit with the WARPDSK model in setup A returns a \texttt{diskfrac} parameter $\sim 0.9$, suggesting a strong warp. The detailed results for setup A are summarized in Table \ref{tab:A}. The most interesting results are obtained when refining the analysis by leaving the photon index, column density and coronal flux normalization free for each epoch, i.e. adopting setup B. This setup allows also to explore if and how the spectral shape and X-ray luminosity of the source have changed over the years. For simplicity, when fitting with BORUS we linked the global average $N_{\rm H}$\xspace of the torus and the line of sight $N_{\rm H}$\xspace. In general, the three models return acceptable fits with much better reduced $\chi^2$ with respect to the corresponding setup A. This is not merely due to the increase of the free parameters, as the $\Delta\chi^2/\Delta\text{dof} = 356/28, 345/21, 323/23$ for the ABSPL, BORUS and WARPDSK models, respectively (bottom right panel of Figure \ref{fig:setups}). This supports evidence for spectral variability between different epochs. Indeed, clear column density and spectral slope variations are detected, independently of the spectral model assumed, and will be further discussed in Section \S\ref{sec:variability}. At any given epoch, the three models give consistent results as shown in Figure \ref{fig:var} and Table \ref{tab:B}. Both the CF parameter of BORUS and the \texttt{diskfrac} parameter of the WARPDSK model were free to vary but kept linked for all epochs, and the fitted values are significantly different from those of setup A, suggesting a slightly larger CF (CF$=0.37\pm0.14$), and a much less prominent warping of the disk ($\texttt{diskfrac}=0.25\pm0.01$), respectively. This last result could be somewhat expected. First, the larger number of free parameters in setup B allows to better fit the spectral shape at each epoch, thus returning a new value for the warp strength which is significantly different from before. Furthermore, as detailed in \citet{buchner21}, WARPDSK is tailored for heavily Compton-thick AGN, as the vast majority of disk megamasers turn out to be. Hence the megamaser disk, by construction, has an assigned column $\log{N_{\rm H}/\text{cm}^{-2}} = 25$ to provide the extreme obscuration often observed in the best studied local megamasers \citep[e.g.,][]{arevalo14,puccetti14,bauer15,masini16}. In this particular case, however, in order to account for the relatively low column density affecting the spectrum, WARPDSK is forced by the fixed inclination of the inner disk \citep[72\degree,][]{humphreys13} to graze the warp, fitting the \texttt{diskfrac} parameter to the lower reported value. \subsection{NGC 4258 in the context of local, low-$\lambda_{\rm Edd}$ AGN}\label{sec:context} Disk megamasers, when compared with the local \textit{Swift}/BAT\xspace-selected AGN population, generally occupy the high-end of the $\lambda_{\rm Edd}$ distribution \citep[see, e.g., Figure 8 of][]{masini19}. In this regard, NGC 4258 is definitely peculiar with respect to other disk megamasers, although other \textit{Swift}/BAT\xspace-selected AGN show accretion rates comparable with that of NGC 4258. Thus, it is interesting to consider this source in a broader context, comparing its properties with those of other local, low-Eddington ratio AGN. The sample of 81 local AGN observed by \textit{NuSTAR}\xspace with $\log{\lambda_{\rm Edd} < -3}$ presented by \citet{osorioclavijo21}, in which NGC 4258 is included as a LINER, is the ideal sample to make such a comparison. In terms of black hole mass, bolometric luminosity and Eddington ratio, NGC 4258 is fully consistent with the average values found for their sample of local LINERs. The same holds true also regarding its X-ray properties: both the photon index and the average column density are consistent with their respective averages of the LINER sample. In general, the results about NGC 4258 reported in this work and \citet{osorioclavijo21} are consistent, despite applying different models, and we also do not find any significant contribution of a reflection component in the hard X-ray spectrum of NGC 4258. These findings support the hypothesis that at low accretion rate the standard picture of the torus may break down. In the specific case of NGC 4258, the missing reflection component may be a consequence of the low covering factor of the warped maser disk surrounding the AGN. \section{Short and long term variability}\label{sec:variability} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/lc.pdf} \caption{\textit{NuSTAR}\xspace (average of FPMA and FPMB) $10-40$ keV light-curve across two observations, showing the background-subtracted count rate in bins of 5 ks. The shorter observation of November 2015 displays variability on short timescales (a few ks), which are intrinsic to the source (not due to obscuration).} \label{fig:lc} \end{figure} As shown in the previous Section, setup B allows to keep track of the spectral parameters and the luminosity of NGC 4258 as a function of time. Moreover, the last two \textit{NuSTAR}\xspace epochs allow to explore also the intrinsic, hard X-ray emission from the putative corona. In the following, we thus focus on both the short and long term variability of NGC 4258. \subsection{Short term variability} We take advantage of the \textit{NuSTAR}\xspace data to explore the intrinsic hard X-ray variability (i.e., not caused by variable absorption) of the AGN. The background-subtracted $10-40$ keV \textit{NuSTAR}\xspace light curve for both ObsIDs is shown in Figure \ref{fig:lc}, where data of the two focal plane modules have been averaged together and binned with a 5 ks bin size. First, we note again that the average, net count rate from NGC 4258 has decreased between the two \textit{NuSTAR}\xspace observations by roughly $\sim20\%$. While the most recent data do not show any particular trend, a clear peak is visible in the first dataset around 17-Nov-2015. We have extracted the \textit{NuSTAR}\xspace spectrum of the ``mini-flare'' and compared it with the quiescent spectrum, finding no significant difference in either spectral slope or column density. This could be due to the relatively weak intensity of the peak, which is actually less than a $50\%$ increase in count rate. Figure \ref{fig:lc} shows that a rise time of $\sim 20$ ks is observed for the mini-flare on 17-Nov-2015. This timescale looks halfway between those found by \citet{reynolds09}, who detected both a significant brightening of NGC 4258 during the 2007 {\it \textit{Suzaku}\xspace} exposure with a timescale of $\sim50$ ks, and lower amplitude fluctuations over much shorter timescale of $\sim5$ ks. Assuming that variability is associated with accretion disk processes, \citet{reynolds09} equated these variability timescales with the dynamical time of a Keplerian disk $\Omega^{-1} = \sqrt{r^3/GM}$, to put constraints over the size of the X-ray emitting region. Under the same assumption, the observed timescale of $\sim 20$ ks corresponds to an emitting region size of $\sim 20r_g$, where $r_g = GM/c^2$ is the usual definition of the gravitational radius. \subsection{Long term variability and Fe K$\alpha$ line}\label{sec:longterm} \begin{figure*} \centering \includegraphics[width=\textwidth]{figures/var.pdf} \caption{Long term evolution of the main spectral parameters. From top to bottom: column density in units of $10^{22}$ cm$^{-2}$, photon index $\Gamma$ (generally between $1.6-2.0$), intrinsic (de-absorbed) $2-10$ keV luminosity, EW of the Fe K$\alpha$ line (only for the ABSPL model and for values from the literature; the inset shows the logarithmic flux of the Fe K$\alpha$ line in the ABSPL model, for the data considered in this work). The values referring to the three models employed in our analysis are labeled with different empty markers and colors (blue circles, orange squares and green upward triangles for the ABSPL, BORUS and WARPDSK models, respectively), and are fully consistent with each other. Red diamonds, the blue star and the purple downward triangle refer to ASCA \citep{reynolds00, terashima02}, BeppoSAX \citep{fiore01} and \textit{Suzaku}\xspace \citep{reynolds09} observations, respectively. In the top panel, the dashed black line is a simple sinusoid with a period of 10 years, and is not a fit to the data. Most notably, the intrinsic de-absorbed 2-10 keV luminosity shows an approximately steady decrease of more than a factor of three over $\sim20$ years.} \label{fig:var} \end{figure*} The spectrum of NGC 4258 shows moderate flux variability among the \textit{XMM-Newton}\xspace and \textit{NuSTAR}\xspace observations, as previously reported in the literature, and as demonstrated also by our analysis. Therefore, we collected the spectral parameters of the three models employed in Section \S\ref{sec:analysis} as a function of time, along with previous results from the literature. This allows us to explore the long term behavior of NGC 4258, spanning 23 years, between 1993 and 2016. The first panel from the top of Figure \ref{fig:var} shows the variability of the the X-ray obscuring column density $N_{\rm H}$\xspace. The column density is always around $\sim 10^{23}$ cm$^{-2}$, with fluctuations of a factor of $\sim2$. As detailed in \citet{fruscione05}, $N_{\rm H}$\xspace has been observed to increase over a few months timescale in 2001, with an associated length scale of about $10^{15}$ cm, very similar to the expected scale height of a standard thin accretion disk. We find a fully consistent trend in the first five \textit{XMM-Newton}\xspace epochs analyzed here, in which $N_{\rm H}$\xspace increases from $\sim 8\times 10^{22}$ cm$^{-2}$ to $\sim 14\times 10^{22}$ cm$^{-2}$ over $\Delta t = 530$ days. Assuming that the absorbing gas is located at the radius where the warp is expected to cross the line of sight, i.e. $R \sim 0.3$ pc, and that it orbits in a Keplerian rotation the central mass of $M = 4 \times 10^{7}$ M$_\odot$, the orbital velocity is $v = \sqrt{GM/R} \sim 760$ km s$^{-1}$. The characteristic size is then $s = v\Delta t \sim 3.5 \times 10^{15}$ cm. Assuming the typical density for masers to occur $\rho \sim 10^8$ cm$^{-3}$, and the column density variation $\Delta N_{\rm H} \sim 6 \times 10^{22}$ cm$^{-2}$, the associated depth variation (i.e., size along the line of sight) is $\Delta L \sim \Delta N_{\rm H}/\rho \sim 6 \times 10^{15}$ cm, which is roughly twice the previously derived characteristic size $s$. This increase in column density could be obtained either by doubling the number of clouds along the line of sight, or doubling the density of the absorbing medium. Interestingly, the column density seems to oscillate more or less regularly on a timescale of about 10 years, as suggested by the sinusoidal function with a period of 10 years we have plotted over the data. Although the reduced $\chi^2$ of fitting a simple sinusoidal function to the data is large enough to reject the null hypothesis ($\chi^2_{\nu} \sim 2.5$), a simple linear fit with roughly constant column density returns a much worse result ($\chi^2_{\nu} \sim 6.8$). If this remarkable, oscillatory trend is confirmed, its period ($\sim 10$ years) is much shorter than the orbital period at the warp radius ($\sim 2600$ years), and it may suggest periodic density variations in the absorbing gas, happening on a temporal scale of 5-10 years. This timescale corresponds to a linear scale of $1-2 \times 10^{16}$ cm ($0.003-0.006$ pc) at the warp radius. Interestingly, spiral density waves have been proposed to explain the periodicity and clustering of the masers in NGC 4258 \citep{humphreys08}. In the same paper, \citet{humphreys08} show that massive He I stars with a mass of $50-100 M_\odot$, comparable to those found in the Galactic center \citep{genzel03}, would be able to create gaps in the maser disk, with a size consistent with that observed here, and potentially responsible for the column density fluctuations. The second panel from the top shows the long term evolution of the photon index $\Gamma$. It is generally measured between $1.6-2.0$, and there is no significant variability. We note that, at any given epoch, the WARPDSK model tends to return systematically softer (although statistically consistent) photon indices with respect to the ABSPL and BORUS models. The third panel of Figure \ref{fig:var} shows the intrinsic, absorption-corrected $2-10$ keV luminosity: after the early 2000s, the luminosity has been steadily decreasing, by a factor of $\sim 3$. The 2007 {\it \textit{Suzaku}\xspace} observation seems to be the exception to this trend but, as mentioned earlier, \citet{reynolds09} caught NGC 4258 in a bright flux state during this observation. Since the luminosity is already corrected for variable absorption, the data strongly suggest that NGC 4258 is constantly getting fainter during the period considered. It is interesting to compare the intrinsic $2-10$ keV luminosity derived here from that expected from the well known $12 \mu$m -- $2-10$ keV correlation. NGC 4258 has a nuclear $12 \mu$m luminosity $\log{L_{12 \mu m}/\text{erg s}^{-1}} = 41.26 \pm 0.05$, from which an expected $\log{L_{2-10 \text{keV}}/\text{erg s}^{-1}} = 41.03\pm0.04$ is derived \citep{asmus15}. This luminosity is consistent with that measured until the early 2000s, while the MIR observations described in \citet{asmus15} refer to the years 2010-2011, when NGC 4258 was already a factor of $\sim$ two fainter, according to our results. If there are no sources of contamination contributing significantly to the 12 $\mu$m flux, and if NGC 4258 has kept steadily decreasing its X-ray luminosity, this result could suggest a lag of the MIR with respect to the X-ray emission of at least a decade, thereby placing the MIR-emitting dust on a scale of $\sim 3$ pc. Finally, the behavior of the Fe K$\alpha$ line (bottom panel of Figure \ref{fig:var}) is not easy to interpret. While the first ASCA observations suggested the presence of a moderately prominent emission line with an EW around $\sim 100$ eV, the subsequent \textit{XMM-Newton}\xspace observations we have considered in this work set only upper limits and never firmly detect the line, apart from the 2007 epoch \citep{reynolds09}, in which the line has in any case a modest EW. In the two most recent \textit{NuSTAR}\xspace epochs, the line has been marginally detected only in the last (and longer) observation. This could be due to the more stable and systematically lower count rate of the source during the last \textit{NuSTAR}\xspace epoch, as shown in Figure \ref{fig:lc}, which would make the line stand out more easily. If this hypothesis is correct, this would also imply that the Fe line is produced on large scales ($\sim$ pc scale) and lags significantly behind the continuum, differently from the inner disk origin interpretation of \citet{reynolds09}. Independently of its origin interpretation, the line EW from the \textit{NuSTAR}\xspace epochs is consistent with that reported by \citet{reynolds09}. The inset in the last panel of Figure \ref{fig:var} shows the logarithmic flux of the Fe K$\alpha$ line for the spectra that we have analyzed in this work, derived through the XSPEC command \texttt{cflux}. The behavior of the line flux is fully consistent with that seen for its EW. \section{Discussion}\label{sec:discussion} The comparison of the X-ray spectra of NGC 4258 across two decades has shown that its X-ray properties have changed through the years both due to factor of $\sim$ two variations of the absorbing column density, plausibly associated with the dusty megamaser disk, and to intrinsic changes in the emission from the central engine -- most notably the coronal luminosity, which appears to have steadily decreased by a factor of $\sim$ three across $\sim15$ years, the only exception being the \textit{Suzaku}\xspace observation which caught the source in a high state \citep{reynolds09}. The short variability timescale ($\sim 20$ ks) observed in the hard X-ray \textit{NuSTAR}\xspace data suggests that the variations might be due to changes in the accretion rate, in turn related to the rate of energy deposition in the corona. Accretion rate variability would also explain the long term decrease in intrinsic luminosity observed through 15 years of observations. The viscous timescale of a standard thin disk is generally much longer than few years. On the other hand, the SEDs of low luminosity AGN such as NGC 4258 are often explained in the context of RIAFs, i.e. with a combination of truncated \citet{shakurasunyaev73} disks with inner ADAFs and relativistic jets. Past efforts have successfully explained the broadband SED of NGC 4258 with such a model, although with their own shortcomings \citep[e.g.,][]{yuan02, wu13}. Interestingly, the viscous timescale is $\propto (r/H)^2$, thus becoming significantly shorter for an ADAF \citep{narayanyi95}. Both the \citet{shakurasunyaev73} and the RIAF models are in turn part of the so-called standard and normal evolution (SANE) models, in which the magnetic field is assumed to not significantly impact the dynamics of the disk. Opposed to SANE there are magnetically arrested disk models \citep[MAD;][]{narayan03}, expected to form when the accretion flow is supplied with a sufficient amount of magnetic flux. Unfortunately, it is difficult to observationally disentangle the two families of models \citep{xiezdziarski19}. Furthermore, given the above results is not trivial to even discriminate between a RIAF and a standard thin disk. Indeed, the absorption-corrected X-ray luminosity $L_{\rm X}$, combined with archival determinations of the bolometric luminosity, implies a bolometric correction of $k_{\rm bol} \sim 20$, intriguingly typical of Seyferts powered by accretion through thin disks \citep{lusso12, duras20}. We note, however, that NGC 4258 could nonetheless be in a ``sweet spot'' in which the bolometric correction is consistent with that of a typical Seyfert, being it still powered by a RIAF \citep{nemmen14}. Moreover, its average photon index $\Gamma \sim 1.8$ is consistent with the typical value of the broader AGN population \citep[e.g.,][]{ricci17BASS}. Thus, our work suggests that NGC 4258 is a standard, low luminosity Seyfert II, despite its accretion rate in Eddington units being well within the expected RIAF regime. Further discussion arises considering the X-ray photon index $\Gamma$ as a function of X-ray Eddington ratio $\lambda_{\rm X} = L_{\rm X}/L_{\rm Edd}$ (Figure \ref{fig:gammaEddrat}). Previous work has found somewhat conflicting results related to the $\Gamma-\lambda_{\rm Edd}$ correlation: \citet{brightman13} and \citet{brightman16} found a positive correlation between these two quantities, both for unobscured and heavily obscured AGN. On the other hand, \citet{trakhtenbrot17} found a much shallower correlation using a large, local \textit{Swift}/BAT\xspace-selected sample. Analyzing a sample of low-luminosity AGN, \citep{gucao09} found instead an anti-correlation, similar to what is observed for X-ray binaries in the hard state \citep[e.g.,][]{liu19}. In our case, the spanned range in $\lambda_{\rm X}$ is around one order of magnitude, and there seems not to be any significant correlation between the two quantities considering the whole range. A possible anti-correlation may exist for $\log{\lambda_X} < -5$, similar to what is observed in other low-luminosity AGN \citep[e.g.,][]{kawamuro16}, and may suggest a transition between hot and cold accretion flows below and above a critical value $\log{\lambda_X} = -5$. Assuming a typical bolometric correction of order $\sim20$, this critical value would roughly correspond to $\lambda_{\rm Edd} \sim 10^{-4}$, which appears to be somewhat low for the transition between cold and hot accretion flows. However, this may suggest a MAD scenario to be in place, given the lower accretion rate at which a cold solution can still exist, with respect to SANE models \citep{xiezdziarski19}. In summary, if the change of slope in the $\Gamma-\lambda_{\rm X}$ plane is real, we may be witnessing the switch between cold and hot accretion flows in NGC 4258. Of course, at $\log{\lambda_{\rm X}} \lesssim -5$ there are just three data points at the moment, so future observations are highly warranted to support or discard this finding, especially if the trend of steady decrease in X-ray luminosity will be confirmed. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/gammaEddrat.pdf} \caption{Photon index $\Gamma$ as a function of the X-ray Eddington ratio $\lambda_{\rm X}$ ($\lambda_{\rm X} = L_{\rm X}/L_{\rm Edd}$). Yellow points, red diamonds, the blue star and the purple triangle refer to the data analyzed in this work with the BORUS model, and to archival ASCA, BeppoSAX and \textit{Suzaku}\xspace data, respectively. The black dashed lines are simple linear fits below and above the separation value of $\log{\lambda_{\rm X}} = -5$ (broadly corresponding to a canonical Eddington ratio of $\approx 10^{-4}$ for a bolometric correction of order $10$), showing two possible regimes.} \label{fig:gammaEddrat} \end{figure} \section{Conclusions}\label{sec:conclusions} In this paper, we have analyzed the accretion properties of a well studied, nearby low-luminosity AGN, NGC 4258. We have collected and re-analyzed \textit{Chandra}\xspace, \textit{XMM-Newton}\xspace, \textit{NuSTAR}\xspace and \textit{Swift}/BAT\xspace observations, building a broadband X-ray spectrum ($0.3-150$ keV) and spanning from the early 2000s up to 2016; we have furthermore added results from earlier archival observations taken from the literature, for a total timespan of $\sim 23$ years. Our main findings are as follows: \begin{itemize} \item The soft X-ray emission ($E<2$ keV) is stable across the years (Figure \ref{fig:spec}), and is well described by emission from hot plasma consistent with that found in the anomalous arms on kpc scales. \item The hard X-ray emission ($E>2$ keV), on the other hand, displays significant variability (Figure \ref{fig:spec}), both on timescales of hours (Figure \ref{fig:lc}) and years (Figure \ref{fig:var}), both intrinsic and due to absorbing gas. \item We have employed three different models to fit the dataset of 17 spectra: a simple absorbed power law, a torus, and a warped disk. All three models gave consistent results over the spectral parameters, either when fitting the data simultaneously with a single model, or when a full spectral variability is allowed for (Figure \ref{fig:setups}). \item The average spectral properties of NGC 4258 are typical of low luminosity obscured Seyferts, with a photon index and column density fluctuating in the range $\Gamma = 1.6-2.2$ and $N_{\rm H} = 0.8-2.1 \times 10^{23}$ cm$^{-2}$, respectively (Figure \ref{fig:var}). \item The obscuring column density shows fluctuations of a factor of two, as previously reported in the literature. Its variations appear to be qualitatively periodic, with a period of about 10 years (Figure \ref{fig:var}). If confirmed, this trend would suggest smooth density variations, possibly induced by spiral density waves and/or gaps in the disk carved by massive He I stars. \item The Fe K$\alpha$ line, as previously reported in the literature, is weak, with an average $\text{EW} = 45\pm12$ eV. Its detectability is significantly different among the dataset considered here, and in only two epochs it is detected at $\sim 2 \sigma$ level of confidence (Figure \ref{fig:var}). \item The absorption-corrected, intrinsic $2-10$ keV luminosity is observed to be almost steadily decreasing by a factor of 3 between 2000 and 2016 (Figure \ref{fig:var}). \item The variations in photon index and luminosity appear to follow two different behaviors (Figure \ref{fig:gammaEddrat}): when the source is brighter than a certain critical value in X-ray-scaled Eddington ratio ($\log{\lambda_{\rm X}} > -5$), no apparent trend is seen; at lower accretion rate, there seems to be an anti-correlation between the two quantities, which may indicate a transition between hot and cold accretion states, similar to what is observed in X-ray binaries. \end{itemize} \begin{acknowledgements} We thank J. Buchner for useful guidance in using the warped disk model. This work made use of data from the \textit{NuSTAR}\xspace mission, a project led by the California Institute of Technology, managed by the Jet Propulsion Laboratory, and funded by the National Aeronautics and Space Administration. This research made use of the \textit{NuSTAR}\xspace Data Analysis Software (NuSTARDAS) jointly developed by the ASI Science Data Center (ASDC, Italy) and the California Institute of Technology (USA). This research has also made use of data obtained from the \textit{Chandra}\xspace Data Archive and software provided by the \textit{Chandra}\xspace X-ray Center (CXC). This work is also based on observations obtained with \textit{XMM-Newton}\xspace, an ESA science mission with instruments and contributions directly funded by ESA Member States and NASA. We acknowledge the use of public data from the {\it Swift} data archive. P. B. acknowledges financial support from the Czech Science Foundation project No. 22-22643S. \end{acknowledgements} \bibliographystyle{aa}
\section{conclusion} \iffalse In this paper, we propose a dual-agent interactive reinforcement learning framework to formulate and solve the joint selection problem with dual interaction. Our methodology actually reveals a workable design of dual-agent reinforcement learning, which can be further transferred to other pairs of interactive tasks. We also notice that interactive reinforcement learning strategies can be adapted to more applications other than the joint selection. Though the experiments have shown the superiority of our methods in data selection, this work still has limitations. The data scalability is comparatively limited: reinforcement learning always needs much time for exploration and training; thus for larger datasets the training process would be longer and need more memories of computer. \fi In this paper, we propose a dual-agent reinforcement learning framework towards the feature and instance joint selection task. We formulate the joint selection into a reinforcement learning framework with the tailor-designed sequential-scanning mechanism and collaboratively-changing environment, in order to simulate fine-grained interaction of feature space and instance space. The selection knowledge of the random forest trainer and the isolation forest trainer is applied to improve the efficiency of agent learning. The extensive experiments have demonstrated the superiority of our model on data preprocessing, which also reveals a workable design of reinforcement learning on the joint selection task. \vspace{-1mm} \section*{Acknowledgements} This research was partially supported by the National Science Foundation (NSF) grant 2040950, 2006889, 2045567, IIS-2040799, IIS-2006387, IIS-1814510. \section{Experiment} \begin{table*}[t] \centering \caption{Predictive performance of different selection methods with logistic regression as the downstream model.} \vspace{-3mm} \label{exp1} \small \begin{tabular}{c|c|c|c|c|c|c|c|c}% \hline \multirow{2}{*}{\diagbox{Model}{Dataset}} & \multicolumn{2}{|c}{FC} & \multicolumn{2}{|c}{Madelon} & \multicolumn{2}{|c}{Spam} & \multicolumn{2}{|c}{USPS}\\ \cline{2-9} \multirow{3}{*}{} & {Accuracy} & {F1-score} & {Accuracy} & {F1-score} & {Accuracy} & {F1-score} & {Accuracy} & {F1-score} \\ \hline DROP1 & 58.928& 59.477& 51.923& 52.048& 89.572& 89.531 & 86.559& 86.464 \\ DROP5 & 64.682& 64.975& 52.435& 52.431& 89.717& 89.718 & 91.612& 91.607 \\ GCNN & 61.419& 61.460& 53.717& 53.732& 90.803& 90.846 & 93.570 &93.585\\ LASSO & 61.684& 62.705& 54.230& 54.223& 90.658& 90.699 & 91.899&91.937 \\ RFE & 65.828& 66.430& 55.256& 55.261& 88.776& 88.862 & 93.763 &93.786 \\ LS2AOD & 65.057& 65.665& 53.974& 53.983& 90.948& 90.978& 93.293& 93.343 \\ GeneticFSIS& 65.834& 66.033& 55.938& 55.837& 90.742 & 90.675& 93.242&93.321 \\ IFS-CoCo & 66.102& 65.723& 58.384& 58.323& 91.042& 91.021& 93.417& 93.519 \\ sCOs & 66.213& 66.104& 57.992& 57.976& 90.810& 90.632& 93.792& 93.738 \\ DAIRS (Ours) & \textbf{67.328}& \textbf{66.908}& \textbf{61.282} & \textbf{61.281}& \textbf{91.745}& \textbf{91.389} & \textbf{94.122} &\textbf{94.071}\\ \hline \end{tabular} \label{overall_table} \vspace{-3mm} \end{table*} \begin{table}[h] \footnotesize \centering \caption{Selection ratio on different datasets.} \vspace{-3mm} \begin{tabular}{ccccc} \hline Dataset& FC&Madelon&Spam&USPS \\ \hline Feature & 0.8703& 0.5980& 0.8771& 0.7187 \\ Instance& 0.7483& 0.8829& 0.6770& 0.6266\\ \hline \end{tabular} \label{table3} \vspace{-4mm} \end{table} \subsection{Experimental Setup} \noindent \underline{\textit{Datasets and Metrics}}: we use four public datasets of different domains on classification task to validate our methods: {\textit{ForestCover (FC)}} dataset is a publicly available dataset from Kaggle\footnote{\url{https://www.kaggle.com/c/forest-cover-type-prediction/data}} including characteristics of wilderness areas. {\textit{Madelon}} dataset is a Nips 2003 workshop dataset containing data points grouped in 32 clusters and labeled by 1 and -1 \cite{Dua:2019}. {\textit{Spam}} dataset is a collection of spam emails \cite{Dua:2019}. {\textit{USPS}} dataset is a handwritten digit database including handwritten digit images \cite{cai2010graph}. We report {\textit{Accuracy}} and {\noindent\textit{F1-score}} of certain downstream models to show the quality of selected data. \noindent \underline{\textit{Baseline Algorithms}}: We compare predictive performance of our proposed model with different baselines, including instance selection methods, feature selection methods and feature instance joint selection methods: \textbf{DROPs.} It includes different instance reduction algorithms where we take DROP1 and DROP5 as baselines \cite{wilson2000reduction}. \textbf{GCNN.} \cite{chou2006generalized} proposes the weak criterion employed by Condensed Nearest Neighbor. \textbf{LASSO}. \cite{tibshirani1996regression} conducts feature selection and shrinkage via $l1$ penalty. \textbf{RFE} (Recursive Feature Elimination) recursively deselects the least important features. \textbf{LS2AOD} selects features via Laplacian Score and then samples via AOD. \textbf{GeneticFSIS}. \cite{tsai2013genetic} applies genetic algorithms to alternatively select features and instances. \textbf{IFS-CoCo}. \cite{derrac2010ifs} applies the cooperative co-evolutionary algorithm to select features and instances. \textbf{sCOs}. \cite{benabdeslem2020scos} uses a similarity preserving for co-selection of features and instances. For evaluation, we use these algorithms to select features/instances to get the data subset, and evaluate the quality of selected data towards prediction. \noindent \underline{\textit{Implications}}: To compare fairly, we set the downstream task as a simple classifier logistic regression. The downstream task takes selected data as input and output the classification results. We randomly split the data into train data (70\%) and test data (30\%) where categorical features are encoded in one-hot. Baseline models are set the same selection ratio as our model. The size of memory unit is set to 300 in experience replay. For the reward measurement, we consider accuracy, relevance score and redundancy score following \cite{liu2019automating}. The policy networks are set as two fully-connected layers of 512 middle states with ReLU as activation function. In RL exploration, the discount factor $\gamma$ is set to 0.9, and we use $\epsilon$-greedy exploration with $\epsilon$ equal to 0.8. \subsection{Overall Performances} Table \ref{overall_table} shows the overall predictive performance of logistic regression on the data selected by our proposed DAIRS and compared baselines. We report on four different datasets with respect to accuracy and f1-score and can observe our proposed model outperforms other selection methods, which signifies the best quality of our selected data for downstream predictions. Apart from our model, we notice other joint selection methods (e.g., IFS-CoCo) can have better performance than other baselines, for these methods consider both two dimensions (feature selection and instance selection). \begin{figure}[h] \vspace{-0mm} \centering \includegraphics[width=6.0cm]{exp_fig/wild_compare.pdf} \vspace{-4mm} \caption{Performance of DAIRS variants on FC dataset.} \label{exp1} \vspace{-4mm} \end{figure} \begin{figure}[h] \vspace{-0mm} \centering \includegraphics[width=6.0cm]{exp_fig/madelon_compare.pdf} \vspace{-4mm} \caption{Performance of DAIRS variants on Madelon dataset.} \label{exp2} \vspace{-3mm} \end{figure} Accordingly, as it shows in Table \ref{table3}, our model can also acquire the best selection ratio to achieve higher predictive performance in exploration, while many other methods (e.g., DROP, RFE) cannot automatically learn the ratio that needs to be pre-defined. This demonstrates the superiority of our methods for automating to select the best data without handcrafted tunning. Also, it is easy to find out in most cases, most features and instances are useful for accurate predictions, while a few ones disturb predictions \subsection{Study of the Dual-agent Reinforced Selection} We aim to study the impacts of different components in our dual-agent reinforced selection framework. We consider four variant methods: (1) \textit{FA} removes the instance agent, only considers the Feature Agent and creates environment for selected features as \cite{liu2019automating}. (2) \textit{IA} removes the feature agent and only considers Instance Agent. (3) \textit{IA+FA-CE} removes Collaborative-changing Environment and creates an independent environment for each agent. (4) \textit{IA+FA} is our proposed DAIRS model with two agents. Figure \ref{exp1} and \ref{exp2} show performance comparison of these variants on FC and Madelon dataset. Compared to single agent's exploration, we can easily observe a performance gain by dual agents. Moreover, while both features and instances decide quality of the selected data, feature agent is more influential on predictions than instance agent when single agent explores. This suggests feature's quality is more important in data selection. We also find out the sharing environment is actually important for dual-agent coordination, which can make for better performance. From both figures, we observe the trend of blue line is more significant than yellow line; this shows our method achieves better results in long-term learning. \subsection{Study of Interactive Reinforced Trainer} We study the impacts of proposed trainers for interactive reinforcement learning. We consider four variants: (1) \textit{Non-trainer} removes both random forest trainer (RFT) and isolation forest trainer (IFT); (2) \textit{RFT} removes IFT and takes only RFT for advice; (3) \textit{IFT} removes RFT with only IFT for advice; (4) \textit{RFT+IFT} has both two trainers for advice. Figure \ref{exp3} shows comparisons of variant methods. It can be observed that both two trainers help improve the data quality for better predictive performances, while the highest score is achieved when combining two trainers. Figure \ref{exp4} shows the efficiency comparison of each variant in terms of the explored best accuracy until current step. The result signifies that without trainers' help, agents need more steps for exploration to achieve better results, and both trainers can help for more efficient exploration and agent learning, especially when both the feature agent and the instance agent take external advice. \subsection{Case Study of Exploration Process} We also try to study and visualize the exploration process of agents. Figure \ref{exp5} shows the accuracy in different steps with respect to selected feature number and instance number on FC dataset and Spam dataset. We visualize 10,000 points of exploration (colored in blue) and mark the top 10 best performed points in red. We easily observe that most blue points are on the certain part of data space, for example the space where feature number is (30 to 50) and instance number is (5,000 to 10,000) of the left subfigure. This signifies after the initial exploration, the exploration efficiently concentrates on the optimal data subspace. Then, the agents can continue searching until finally finding out the best feature and instance selection results. \begin{figure} \centering \subfigure[\small FC dataset] { \label{} \includegraphics[width=3.8cm]{exp_fig/1.pdf} } \hspace{+1.2mm} \subfigure[\small Madelon dataset] { \label{} \includegraphics[width=3.7cm]{exp_fig/2.pdf} } \vspace{-3mm} \caption{Performance of variants towards different interactive reinforced trainer setting.} \label{exp3} \vspace{-6mm} \end{figure} \begin{figure} \centering \subfigure[\small FC dataset] { \label{} \includegraphics[width=3.8cm]{exp_fig/efficiency_wild.pdf} } \subfigure[\small Madelon dataset] { \label{} \includegraphics[width=3.8cm]{exp_fig/efficiency_madelon.pdf} } \vspace{-3mm} \caption{Exploration efficiency of variants with different interactive reinforced trainers.} \label{exp4} \vspace{-4mm} \end{figure} \iffalse \begin{figure} \centering \subfigure[\small FC] { \label{} \includegraphics[width=4.0cm]{exp_fig/efficiency_wild.pdf} } \hspace{-3mm} \subfigure[\small Madelon] { \label{} \includegraphics[width=4.0cm]{exp_fig/efficiency_madelon.pdf} } \vspace{-4mm} \caption{Exploration efficiency of interactive trainer variants} \label{exp4} \vspace{-1mm} \end{figure} \fi \section{Introduction} The {\it IJCAI--22 Proceedings} will be printed from electronic manuscripts submitted by the authors. These must be PDF ({\em Portable Document Format}) files formatted for 8-1/2$''$ $\times$ 11$''$ paper. \subsection{Length of Papers} All paper {\em submissions} must have a maximum of six pages, plus at most one for references. The seventh page cannot contain {\bf anything} other than references. The length rules may change for final camera-ready versions of accepted papers and will differ between tracks. Some tracks may include only references in the last page, whereas others allow for any content in all pages. Similarly, some tracks allow you to buy a few extra pages should you want to, whereas others don't. If your paper is accepted, please carefully read the notifications you receive, and check the proceedings submission information website\footnote{\url{https://proceedings.ijcai.org/info}} to know how many pages you can finally use. That website holds the most up-to-date information regarding paper length limits at all times. Please notice that if your track allows for a special references-only page, the {\bf references-only page(s) cannot contain anything else than references} (i.e.: do not write your acknowledgments on that page or you will be charged for it). \subsection{Word Processing Software} As detailed below, IJCAI has prepared and made available a set of \LaTeX{} macros and a Microsoft Word template for use in formatting your paper. If you are using some other word processing software, please follow the format instructions given below and ensure that your final paper looks as much like this sample as possible. \section{Style and Format} \LaTeX{} and Word style files that implement these instructions can be retrieved electronically. (See Appendix~\ref{stylefiles} for instructions on how to obtain these files.) \subsection{Layout} Print manuscripts two columns to a page, in the manner in which these instructions are printed. The exact dimensions for pages are: \begin{itemize} \item left and right margins: .75$''$ \item column width: 3.375$''$ \item gap between columns: .25$''$ \item top margin---first page: 1.375$''$ \item top margin---other pages: .75$''$ \item bottom margin: 1.25$''$ \item column height---first page: 6.625$''$ \item column height---other pages: 9$''$ \end{itemize} All measurements assume an 8-1/2$''$ $\times$ 11$''$ page size. For A4-size paper, use the given top and left margins, column width, height, and gap, and modify the bottom and right margins as necessary. \subsection{Format of Electronic Manuscript} For the production of the electronic manuscript, you must use Adobe's {\em Portable Document Format} (PDF). A PDF file can be generated, for instance, on Unix systems using {\tt ps2pdf} or on Windows systems using Adobe's Distiller. There is also a website with free software and conversion services: \url{http://www.ps2pdf.com}. For reasons of uniformity, use of Adobe's {\em Times Roman} font is strongly suggested. In \LaTeX2e{} this is accomplished by writing \begin{quote} \mbox{\tt $\backslash$usepackage\{times\}} \end{quote} in the preamble.\footnote{You may want also to use the package {\tt latexsym}, which defines all symbols known from the old \LaTeX{} version.} Additionally, it is of utmost importance to specify the {\bf letter} format (corresponding to 8-1/2$''$ $\times$ 11$''$) when formatting the paper. When working with {\tt dvips}, for instance, one should specify {\tt -t letter}. \subsection{Title and Author Information} Center the title on the entire width of the page in a 14-point bold font. The title must be capitalized using Title Case. Below it, center author name(s) in 12-point bold font. On the following line(s) place the affiliations, each affiliation on its own line using 12-point regular font. Matching between authors and affiliations can be done using numeric superindices. Optionally, a comma-separated list of email addresses follows the affiliation(s) line(s), using 12-point regular font. \subsubsection{Blind Review} In order to make blind reviewing possible, authors must omit their names and affiliations when submitting the paper for review. In place of names and affiliations, provide a list of content areas. When referring to one's own work, use the third person rather than the first person. For example, say, ``Previously, Gottlob~\shortcite{gottlob:nonmon} has shown that\ldots'', rather than, ``In our previous work~\cite{gottlob:nonmon}, we have shown that\ldots'' Try to avoid including any information in the body of the paper or references that would identify the authors or their institutions. Such information can be added to the final camera-ready version for publication. \subsection{Abstract} Place the abstract at the beginning of the first column 3$''$ from the top of the page, unless that does not leave enough room for the title and author information. Use a slightly smaller width than in the body of the paper. Head the abstract with ``Abstract'' centered above the body of the abstract in a 12-point bold font. The body of the abstract should be in the same font as the body of the paper. The abstract should be a concise, one-paragraph summary describing the general thesis and conclusion of your paper. A reader should be able to learn the purpose of the paper and the reason for its importance from the abstract. The abstract should be no more than 200 words long. \subsection{Text} The main body of the text immediately follows the abstract. Use 10-point type in a clear, readable font with 1-point leading (10 on 11). Indent when starting a new paragraph, except after major headings. \subsection{Headings and Sections} When necessary, headings should be used to separate major sections of your paper. (These instructions use many headings to demonstrate their appearance; your paper should have fewer headings.). All headings should be capitalized using Title Case. \subsubsection{Section Headings} Print section headings in 12-point bold type in the style shown in these instructions. Leave a blank space of approximately 10 points above and 4 points below section headings. Number sections with arabic numerals. \subsubsection{Subsection Headings} Print subsection headings in 11-point bold type. Leave a blank space of approximately 8 points above and 3 points below subsection headings. Number subsections with the section number and the subsection number (in arabic numerals) separated by a period. \subsubsection{Subsubsection Headings} Print subsubsection headings in 10-point bold type. Leave a blank space of approximately 6 points above subsubsection headings. Do not number subsubsections. \paragraph{Titled paragraphs.} You should use titled paragraphs if and only if the title covers exactly one paragraph. Such paragraphs should be separated from the preceding content by at least 3pt, and no more than 6pt. The title should be in 10pt bold font and ended with a period. After that, a 1em horizontal space should follow the title before the paragraph's text. In \LaTeX{} titled paragraphs should be typeset using \begin{quote} {\tt \textbackslash{}paragraph\{Title.\} text} . \end{quote} \subsubsection{Acknowledgements} You may include an unnumbered acknowledgments section, including acknowledgments of help from colleagues, financial support, and permission to publish. If present, acknowledgements must be in a dedicated, unnumbered section appearing after all regular sections but before any appendices or references. Use \begin{quote} {\tt \textbackslash{}section*\{Acknowledgements\}}) \end{quote} to typeset the acknowledgements section in \LaTeX{}. \subsubsection{Appendices} Any appendices directly follow the text and look like sections, except that they are numbered with capital letters instead of arabic numerals. See this document for an example. \subsubsection{References} The references section is headed ``References'', printed in the same style as a section heading but without a number. A sample list of references is given at the end of these instructions. Use a consistent format for references. The reference list should not include publicly unavailable work. \subsection{Citations} Citations within the text should include the author's last name and the year of publication, for example~\cite{gottlob:nonmon}. Append lowercase letters to the year in cases of ambiguity. Treat multiple authors as in the following examples:~\cite{abelson-et-al:scheme} or~\cite{bgf:Lixto} (for more than two authors) and \cite{brachman-schmolze:kl-one} (for two authors). If the author portion of a citation is obvious, omit it, e.g., Nebel~\shortcite{nebel:jair-2000}. Collapse multiple citations as follows:~\cite{gls:hypertrees,levesque:functional-foundations}. \nocite{abelson-et-al:scheme} \nocite{bgf:Lixto} \nocite{brachman-schmolze:kl-one} \nocite{gottlob:nonmon} \nocite{gls:hypertrees} \nocite{levesque:functional-foundations} \nocite{levesque:belief} \nocite{nebel:jair-2000} \subsection{Footnotes} Place footnotes at the bottom of the page in a 9-point font. Refer to them with superscript numbers.\footnote{This is how your footnotes should appear.} Separate them from the text by a short line.\footnote{Note the line separating these footnotes from the text.} Avoid footnotes as much as possible; they interrupt the flow of the text. \section{Illustrations} Place all illustrations (figures, drawings, tables, and photographs) throughout the paper at the places where they are first discussed, rather than at the end of the paper. They should be floated to the top (preferred) or bottom of the page, unless they are an integral part of your narrative flow. When placed at the bottom or top of a page, illustrations may run across both columns, but not when they appear inline. Illustrations must be rendered electronically or scanned and placed directly in your document. They should be cropped outside \LaTeX{}, otherwise portions of the image could reappear during the post-processing of your paper. When possible, generate your illustrations in a vector format. When using bitmaps, please use 300dpi resolution at least. All illustrations should be understandable when printed in black and white, albeit you can use colors to enhance them. Line weights should be 1/2-point or thicker. Avoid screens and superimposing type on patterns, as these effects may not reproduce well. Number illustrations sequentially. Use references of the following form: Figure 1, Table 2, etc. Place illustration numbers and captions under illustrations. Leave a margin of 1/4-inch around the area covered by the illustration and caption. Use 9-point type for captions, labels, and other text in illustrations. Captions should always appear below the illustration. \section{Tables} Tables are considered illustrations containing data. Therefore, they should also appear floated to the top (preferably) or bottom of the page, and with the captions below them. \begin{table} \centering \begin{tabular}{lll} \hline Scenario & $\delta$ & Runtime \\ \hline Paris & 0.1s & 13.65ms \\ Paris & 0.2s & 0.01ms \\ New York & 0.1s & 92.50ms \\ Singapore & 0.1s & 33.33ms \\ Singapore & 0.2s & 23.01ms \\ \hline \end{tabular} \caption{Latex default table} \label{tab:plain} \end{table} \begin{table} \centering \begin{tabular}{lrr} \toprule Scenario & $\delta$ (s) & Runtime (ms) \\ \midrule Paris & 0.1 & 13.65 \\ & 0.2 & 0.01 \\ New York & 0.1 & 92.50 \\ Singapore & 0.1 & 33.33 \\ & 0.2 & 23.01 \\ \bottomrule \end{tabular} \caption{Booktabs table} \label{tab:booktabs} \end{table} If you are using \LaTeX, you should use the {\tt booktabs} package, because it produces better tables than the standard ones. Compare Tables \ref{tab:plain} and~\ref{tab:booktabs}. The latter is clearly more readable for three reasons: \begin{enumerate} \item The styling is better thanks to using the {\tt booktabs} rulers instead of the default ones. \item Numeric columns are right-aligned, making it easier to compare the numbers. Make sure to also right-align the corresponding headers, and to use the same precision for all numbers. \item We avoid unnecessary repetition, both between lines (no need to repeat the scenario name in this case) as well as in the content (units can be shown in the column header). \end{enumerate} \section{Formulas} IJCAI's two-column format makes it difficult to typeset long formulas. A usual temptation is to reduce the size of the formula by using the {\tt small} or {\tt tiny} sizes. This doesn't work correctly with the current \LaTeX{} versions, breaking the line spacing of the preceding paragraphs and title, as well as the equation number sizes. The following equation demonstrates the effects (notice that this entire paragraph looks badly formatted): \begin{tiny} \begin{equation} x = \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i \end{equation} \end{tiny}% Reducing formula sizes this way is strictly forbidden. We {\bf strongly} recommend authors to split formulas in multiple lines when they don't fit in a single line. This is the easiest approach to typeset those formulas and provides the most readable output% \begin{align} x =& \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \nonumber\\ + & \prod_{i=1}^n \sum_{j=1}^n j_i \end{align}% If a line is just slightly longer than the column width, you may use the {\tt resizebox} environment on that equation. The result looks better and doesn't interfere with the paragraph's line spacing: % \begin{equation} \resizebox{.91\linewidth}{!}{$ \displaystyle x = \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i $} \end{equation}% This last solution may have to be adapted if you use different equation environments, but it can generally be made to work. Please notice that in any case: \begin{itemize} \item Equation numbers must be in the same font and size as the main text (10pt). \item Your formula's main symbols should not be smaller than {\small small} text (9pt). \end{itemize} For instance, the formula \begin{equation} \resizebox{.91\linewidth}{!}{$ \displaystyle x = \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j + \prod_{i=1}^n \sum_{j=1}^n j_i + \prod_{i=1}^n \sum_{j=1}^n i_j $} \end{equation} would not be acceptable because the text is too small. \section{Examples, Definitions, Theorems and Similar} Examples, definitions, theorems, corollaries and similar must be written in their own paragraph. The paragraph must be separated by at least 2pt and no more than 5pt from the preceding and succeeding paragraphs. They must begin with the kind of item written in 10pt bold font followed by their number (e.g.: Theorem 1), optionally followed by a title/summary between parentheses in non-bold font and ended with a period. After that the main body of the item follows, written in 10 pt italics font (see below for examples). In \LaTeX{} We strongly recommend you to define environments for your examples, definitions, propositions, lemmas, corollaries and similar. This can be done in your \LaTeX{} preamble using \texttt{\textbackslash{newtheorem}} -- see the source of this document for examples. Numbering for these items must be global, not per-section (e.g.: Theorem 1 instead of Theorem 6.1). \begin{example}[How to write an example] Examples should be written using the example environment defined in this template. \end{example} \begin{theorem} This is an example of an untitled theorem. \end{theorem} You may also include a title or description using these environments as shown in the following theorem. \begin{theorem}[A titled theorem] This is an example of a titled theorem. \end{theorem} \section{Proofs} Proofs must be written in their own paragraph separated by at least 2pt and no more than 5pt from the preceding and succeeding paragraphs. Proof paragraphs should start with the keyword ``Proof." in 10pt italics font. After that the proof follows in regular 10pt font. At the end of the proof, an unfilled square symbol (qed) marks the end of the proof. In \LaTeX{} proofs should be typeset using the \texttt{\textbackslash{proof}} environment. \begin{proof} This paragraph is an example of how a proof looks like using the \texttt{\textbackslash{proof}} environment. \end{proof} \section{Algorithms and Listings} Algorithms and listings are a special kind of figures. Like all illustrations, they should appear floated to the top (preferably) or bottom of the page. However, their caption should appear in the header, left-justified and enclosed between horizontal lines, as shown in Algorithm~\ref{alg:algorithm}. The algorithm body should be terminated with another horizontal line. It is up to the authors to decide whether to show line numbers or not, how to format comments, etc. In \LaTeX{} algorithms may be typeset using the {\tt algorithm} and {\tt algorithmic} packages, but you can also use one of the many other packages for the task. \begin{algorithm}[tb] \caption{Example algorithm} \label{alg:algorithm} \textbf{Input}: Your algorithm's input\\ \textbf{Parameter}: Optional list of parameters\\ \textbf{Output}: Your algorithm's output \begin{algorithmic}[1] \STATE Let $t=0$. \WHILE{condition} \STATE Do some action. \IF {conditional} \STATE Perform task A. \ELSE \STATE Perform task B. \ENDIF \ENDWHILE \STATE \textbf{return} solution \end{algorithmic} \end{algorithm} \section*{Acknowledgments} The preparation of these instructions and the \LaTeX{} and Bib\TeX{} files that implement them was supported by Schlumberger Palo Alto Research, AT\&T Bell Laboratories, and Morgan Kaufmann Publishers. Preparation of the Microsoft Word file was supported by IJCAI. An early version of this document was created by Shirley Jowell and Peter F. Patel-Schneider. It was subsequently modified by Jennifer Ballentine and Thomas Dean, Bernhard Nebel, Daniel Pagenstecher, Kurt Steinkraus, Toby Walsh and Carles Sierra. The current version has been prepared by Marc Pujol-Gonzalez and Francisco Cruz-Mencia. \section{Introduction} Data preprocessing is to make input data most appropriate for model training. Generally, two well-known preprocessing techniques are feature selection \cite{liu2012feature} and instance selection \cite{brighton2002advances}. Feature selection is to select most important features to increase predictive performance (e.g., accuracy) and reduce feature size. Instance selection shares the similar objective to simultaneously improve modeling accuracy and decrease instance size. In prior literature, feature selection and instance selection are usually regarded as two separate problems. Limited algorithms have been proposed for their joint selection. The joint feature and instance selection was initially addressed using genetic algorithms \cite{kuncheva1999nearest}. Then some studies solve this problem with principal component analysis \cite{suganthi2019instance} or application of pairwise similarity \cite{benabdeslem2020scos}. Others try to apply heuristic search and adopt simulated annealing algorithms \cite{de2008novel} or sequential forward search \cite{garcia2021si}. In fact, the selection of each feature and each instance are mutually influenced and jointly decide the final selection results. However, most previous work of joint selection conducts feature/instance selection coarsely and neglects the fine-grained interaction of feature space and instance space, which largely hinders the predictive performances on the selected data. Reinforcement Learning (RL), as an effective tool, has great potential to learn the optimal results for search problems like such selections \cite{liu2019automating}. In particular, different agents (i) individually take actions step by step that is appropriate to model each fine-grained selection choice; (ii) mutually interact with each other that can capture the interaction between feature space and instance space; (iii) jointly targets for optimal decisions that can be regarded as the selected data of joint selection task. To this end, we make a first attempt to leverage reinforcement learning for the joint feature instance selection problem. For this goal, several challenges arise. First, how to formulate the joint feature instance selection task with reinforcement learning? Feature/Instance selection usually repeats two steps: select a subset and test the performance. If viewed from the RL perspective, this exploratory process is an agent first selects features/instances and then observe the selected data to get reward. Considering the two selections, we naturally reformulate the joint selection with a dual-agent reinforcement learning paradigm. Specifically, we create two RL agents: 1) a feature agent aims to select the optimal feature subset; 2) an instance agent aims to select the optimal instance subset. The two agents perceive selected features and instances as the state of environment, collect data characteristics as reward, and interact with each other to search for optimum selection results. Second, how can we enable the two agents to simultaneously and collaboratively conduct joint selection? On one hand, if the feature or instance agent selects a subset each time, the agent needs to make $n$ binary selections on $n$ features/instances. This results into action space is exponentially-increasing ($2^n$) with the number of features/instances, leading to practical implementation difficulties. Thus, we propose a {\textit{sequential-scanning}} mechanism for action design of agents. Specifically, we organize the selection decisions of features as a sequence and let the feature agent iteratively scan over this sequence to (de)select one feature each time. The instance agent adopts the same scanning strategy. This mechanism significantly reduces action space from exponential ($2^n$) to binary choice and transforms selection as a sequential decision-making process, which is appropriate for RL. On the other hand, the performance of a downstream model highly depends on the joint quality of both features and instances. To achieve the global optimal of joint selection, the two agents need to collaborate to learn the mutual influence of features and instances. We thus develop a {\textit{collaborative-changing}} environment for agents. We regard the environment as the selected data sub-matrix, where the columns (features) and rows (instances) are simultaneously changed by the actions of dual agents. This shared environment captures actions of the two agents and jointly sense the data quality in two dimensions. Third, how can the two agents learn prior knowledge to improve learning efficiency? Interactive RL \cite{amir2016interactive} has shown its superiority on speeding up agent exploration by learning from human experts or prior knowledge. In this regard, we utilize two external trainers to teach the two agents respectively via interactive RL: we introduce 1) a random forest based trainer with knowledge of feature importance to teach feature agent to pick features. 2) an isolation forest based trainer to recognize instance anomaly to teach instance agent how to filter out instances. With the advice of the two trainers, the two agents can learn the patterns of spotting and selecting quality features and instances more efficiently. In summary, we propose a dual-agent interactive reinforcement learning framework to model the interaction of the joint feature and instance selection. Our contributions are: (i) we formulate the joint selection task with dual-agent reinforcement learning; (ii) we propose a sequential-scanning mechanism and a collaborative-changing environment to achieve the simultaneous and interactive selection; (iii) we leverage interactive reinforcement learning to improve the learning efficiency; (iv) we conduct extensive experiments to demonstrate our improved performances. \section{Method} We address aforementioned challenges and propose a framework which called Dual-Agent Interactive Reinforced Selection (DAIRS), to model joint feature and instance selection task and introduce prior selection knowledge to agents for interactive reinforcement learning. \subsection{DAIRS} As a reinforcement learning based framework, the DAIRS framework consists of dual agents, actions, states, reward and trainers. Specifically, \subsubsection{Dual Agents.} The two agents are: the \textit{ Feature Agent} which models feature-feature correlation to select an optimized feature subset; the \textit{ Instance Agent} which models instance-instance correlation to select an optimized instance subset. However, the local optimal in feature or instance selection can't guarantee the global optimal of joint feature-instance selection. As a result, the two agents need to strategically collaborate and transfer knowledge between feature and instance selections. \subsubsection{Actions.} The dual agent action design is critical, because we need to consider: (i) the action space that determines the computational complexity and the learning efficiency of agents; (ii) the fine-grained interaction between feature space and instance space. The two considerations make it impossible to directly apply classic multi-agent reinforced selection~\cite{liu2019automating} to joint features and instance selection. To tackle this challenge, we develop a {\textit{sequential-scanning }} with restart mechanism ({Figure \ref{method1}}). Specifically, \noindent \underline{\textit{Actions of the feature agent}}: are to sequentially scan all the $m$ features and then restart scanning of the features over steps, where each step will select or deselect one feature. Let us denote a feature action record by $\mathbf{a_{F}} = \{a_i\}_{i=1}^{m}$, where the $i$-th action $a_i = 1$ or $a_i = 0$ means to select or deselect the $i$-th feature. Since the feature agent will restart the sequential scanning of $m$ features, at Step $t$, the feature agent decides to select or deselect $\mathbf{f}_{t\,(mod\, m)}$. \noindent \underline{\textit{Actions of the instance agent}}: are to sequentially scan all the $n$ instances, and then restart scanning of the instances over steps, where each step will select or deselect one instance. Let us denote an instance action record as $\mathbf{a_{I}} = \{a_i\}_{i=1}^{n}$, where the $i$-th action $a_i = 1$ or $a_i = 0$ means to select or deselect the instance $\mathbf{c}_i$. At Step $t$, the instance agent decides to select or deselect instance $\mathbf{c}_{t\,(mod\, n)}$. The sequential scanning strategy allows features and instances to be simultaneously selected or deselected. The dual interaction will coordinate the scanning actions of the two agents to generate a globally optimized data subspace of instances and features. \begin{figure}[h] \centering \includegraphics[width=8.35cm]{figure/scanning.pdf} \vspace{-0mm} \caption{Actions of dual agents with sequential scanning. Agents iteratively scan over each feature or each instance to make the select/deselect decisions.} \label{method1} \vspace{-2mm} \end{figure} \subsubsection{State of the Environment.} Instead of separately creating two environments for feature agent and instance agent, we develop a sharing environment to support simultaneous interaction between agents. The state is to quantitatively represent the situation of the {\textit{collaboratively-changing}} environment. However, this is a non-trivial task: at the $t$-th step, the action records of the feature and instance agents, denoted by $\mathbf{a_F}^t$ and $ \mathbf{a_I}^t$, can respectively derive a feature subset ${F'}$ and an instance subset ${C'}$. The two subsets jointly form a sub-matrix of the input data ${X}$. The challenge is that the selected sub-matrix ${X'}$ cannot directly be regarded as the state, because its dimensions change dynamically over time, while learning the policy networks of the dual agents require a fixed-length state representation. To address this challenge, we develop a dynamic state representation method inspired by the image processing technique \cite{lu2007survey}. Specifically, by regarding the selected data sub-matrix as a 2-dimentional image, we first fix the state dimensions by padding the deselected positions with the padding token (zero). Formally, for the input data $ {X} \in {\mathbb R}^{n*m}$, at the $t$-th step, $\mathbf{h}^t$ is measured by: \begin{equation} \mathbf{h}^t = \underbrace{ \begin{bmatrix} {\mathbf{a_I}^t}^T || \cdots || { \mathbf{{a_I}}^t}^T \\ \end{bmatrix}}_{m} \otimes {X} \otimes {\underbrace{\begin{bmatrix} {\mathbf{a_F}^t}^T || \cdots || {\mathbf{a_F}^t}^T \\ \end{bmatrix}}_{n}}^T \end{equation} where $\otimes$ is element-wise product, $^T$ is the transpose of a given matrix, $\mathbf{a_I}^t$ and $\mathbf{a_F}^t$ are the action records of feature agent and instance agent at the step $t$; $m$ is the number of features; $n$ is the number of instances. We then utilize a single convolutional layer to output the final representation. Formally, the state representation at Step $t$ is computed by: \begin{equation} \vspace{-1mm} \mathbf{s}^t = Conv(\mathbf{w_s} \mathbf{h}^t + \mathbf{b_s}) \end{equation} where $\mathbf{w_s, b_s}$ is tuning weight parameters and bias, and $Conv$ is the convolution operation. Figure \ref{method2} shows the state representation process of our proposed collaborative-changing environment for dual agents. \begin{figure}[h] \centering \includegraphics[width=8.6cm]{figure/state_represent5.pdf} \vspace{-3mm} \caption{State of collaborative-changing environment, coordinating with actions of the feature agent and the instance agent.} \label{method2} \vspace{-1mm} \end{figure} \begin{figure*}[h] \centering \includegraphics[width=14cm]{figure/overview4.pdf} \vspace{-1mm} \caption{Framework Overview. Two agents collaboratively act and learn. Two trainers come to advise to help training.} \label{overview} \vspace{-2mm} \end{figure*} \subsubsection{Reward.} The reward $r$ is to inspire the exploration of the feature agent and instance agent. Since the actions of dual agents are sequential scanning, we measure the reward based on the characteristic difference between last state and current state, in order to temporally train reinforcement learning decision-making process \cite{sutton2018reinforcement}. Specifically, supposing there are metrics set $\mathcal{K}$ we are caring about, we measure the performance difference $\Delta_{i}$ at Step $t$: \begin{equation} \Delta_{i}^t = k_i^t - k_i^{t-1} \end{equation} where $k_i^t$ means the $i$-th metric of the selected data subset at Step $t$. Then, the overall reward $r$ at Step $t$ is measured by: \begin{equation} r^t = \frac{1}{|\mathcal{K}|} \sum_{k_i\in\mathcal{K}}\Delta_{i}^t. \end{equation} The actions of feature agent and instance agent collaboratively change the state, which directly determine the reward measurement. Then the reward is shared between the two agents to inspire exploration. \iffalse \beftext{ Specifically, the accuracy difference $\Delta_{acc}$ at step $t$ is measured by: \begin{equation} \Delta_{acc}^t = acc^t - acc^{t-1} \end{equation} where $acc^t$ means the accuracy in the downstream task at step $t$. The f1-score difference $\Delta_{fscore}$ at step $t$ is measured: \begin{equation} \Delta_{fscore}^t = fscore^t - fscore^{t-1} \end{equation} where $fscore^t$ means the f1-score in the downstream task at step $t$. The collaborative reward $r$ for both feature agent and instance agent at step $t$ is measured by: \begin{equation} r^t = 0.5 (\Delta_{acc}^t + \Delta_{fscore}^t ) \end{equation} } \fi \subsubsection{Trainers.} We introduce the concept of teacher-like trainers from interactive reinforcement learning into our framework. We develop a random forest trainer for the feature agent and an isolation forest trainer for the instance agent. The two trainers can guide agents to explore better selection policies. More details are in the following sections. \subsection{Model Training} Figure \ref{overview} shows an overview of our framework. Dual agents have their own Deep Q-Networks (DQNs) \cite{mnih2013playing,zhang2021intelligent} as action policies. Two external trainers respectively guide the feature agent and the instance agent for more efficient exploration. The actions of the dual agents are to sequentially scan features and instances, which collaboratively decide the selected data sub-matrix $X'$. Then the state of the environment is derived from the sub-matrix and the reward is collected to inspire both feature agent and instance agent to select data. To evaluate the policy, we use feed-forward neural network to approximate the Q value. The deep Q-learning iteratively optimizes the following loss function: \begin{equation} {\mathbb E} (r+\gamma \max_{a'}Q_{\theta'}(s',a')- Q_{\theta}(s,a) )^2 \end{equation} where $r$ is the reward of action $a$ in state $s$; $a'$ is the next action in next state $s'$; $\gamma$ is a discount factor; $Q_{\theta'}$ is the target network. {For the function approximation, the Q function is with parameter $\theta$.} The gradient descent is: \begin{equation} \theta_{t+1} \gets \theta_{t} + \alpha(r+\gamma \max_{a'}Q_{\theta'}(s',a')- Q_{\theta^t}(s,a)) \end{equation} where $\alpha$ is the learning rate and $t$ is the training step. By optimizing $\theta$, the action policies of agents are constructed in order to maximize the long-term reward. \iffalse at step $t$, for both feature agent and instance agent, we select mini-batches from memory unit to train policy networks, in order to maximize the long-term reward based on Bellman Equation \cite{sutton2011reinforcement}: \begin{equation} Q(s^t,a^t| \theta^t) = r^t + \gamma ~ {\rm max}~ Q(s^{t+1},a^{t+1}|\theta_{t+1}) \end{equation} where $s$ is the state, $a$ is the action, $r$ is the reward, $\theta$ is the parameter set of $Q$ network and $\gamma$ is the discount. \fi \subsection{Guiding Dual Agents via Interactive Reinforcement with External Trainers} Figure \ref{overview} shows how we leverage the prior knowledge of external trainers (i.e., classical feature selection and instance filtering methods) to guide feature agent and instance agent to improve their learning efficiency. \subsubsection{Guiding Feature Agent with Random Forest Trainer.\label{section:2}} Random forest classifier \cite{pal2005random} can learn a set of decision trees to measure feature importance. We propose a trainer, namely random forest trainer, for the feature agent. The intuition is that feature importance can provide decision making support to the feature agent: if the trainer found a feature important, it would be suggested to select the feature; if not important, it would be suggested to deselect the feature. These advice can make the feature agent more aware of characteristics of feature space. We develop a three-step algorithm as follows: \textbf{\textit{Step 1:}} We train a random forest classifier on the given $m$ features $\{\mathbf{f}_1, \mathbf{f}_2, ..., \mathbf{f}_m \}$, to obtain the importance of each feature, denoted by $ \{imp_1, imp_2, ..., imp_m\}$. \textbf{\textit{Step 2:}} Based on the feature importance, we design a selection probability distribution $\mathbf{p_{RF}} \{ p_1, p_2, ..., p_m \}$ for the $m$ features, where the probability for $i$-th feature is given by: \begin{equation} p_{i}=\left\{ \begin{array}{rcl} 1 & & { imp_i > \frac{\beta}{m}}\\ m\,*\,imp_i & & {imp_i \leq \frac{\beta}{m}} \end{array} \right. \end{equation} \noindent where $\beta$ is a parameter to control suggested features. \textbf{\textit{Step 3:}} Based on the probability, we sample an advised action list each step, denoted by $\mathbf{a_{RF}}$. The feature agent follows $\mathbf{a_{RF}}$ to take actions at the beginning steps of exploration. \iffalse \begin{algorithm}[tb] \caption{Interactive Reinforcement Learning for Feature Agent with Random Forest Trainer \LinesNumbered \KwIn{number of features $N$, set of features $F \{f_1, f_2, ..., f_N \}$} \KwOut{output advised action for feature agent $A_{RF}$ based on Random Forest} $T = RandomForest(F)$\; $\{imp_1, ..., imp_N\} \gets T.feature\_importance$\; initialize advised selection probability $ \{p_1, ..., p_N \}$ \; initialize action list $A_{RF} \{a_1, a_2, ..., a_N\}$\ with 0; \For{$i=1$ to $N$} { \eIf{$imp_i > 1/N$}{$p_i = 1$}{ $p_i = N * imp_i $} \If{$random\_num(0,1) < p_i$}{$a_i=1$} } \textbf{return} $A_{RF}$ \end{algorithm} \fi \subsubsection{Guiding Instance Agent with Isolation Forest Trainer. \label{section:3}} We aim to leverage the ability of external trainers for recognizing noisy or perturbing data samples to provide advice to instance agent for instance selection. Our underlying intuition is that bad instances differ from normal instances in the feature space~\cite{aggarwal2001outlier}, and an agent can follow how classic instance filtering methods identify them. We propose to identify bad-performed instances via an outlier detection algorithm and let instance agent try to rule out these points. Based on isolation forest \cite{liu2008isolation}, an outlier detector, we propose another trainer called isolation forest trainer. We show how this trainer gives advice to the instance agent step by step: \textbf{\textit{Step 1:}} We first group instances $\{\mathbf{c}_1, \mathbf{c}_2, ..., \mathbf{c}_n \}$ based on their labels $\mathbf{Y} \{y_1, y_2, ..., y_n \}$ in classification tasks. We denote these instance groups by $G = \{ \mathcal{G}_{l_1}, \mathcal{G}_{l_2}, ..., \mathcal{G}_{l_p} \}$, where distinct labels $\{l_1, l_2, ..., l_p \} = set(\mathbf{Y}) $ and the group towards $k$-th distinct label $l_k$ is by $\mathcal{G}_{l_k} = \{ \mathbf{c}_i\;|\;y_i=l_k \;\&\; y_i \in \mathbf{Y} \} $. \textbf{\textit{Step 2:}} For each group in $G$, we utilize the isolation forest algorithm to detect and filter outlier points. The filtered results are by $G_{IF} = \{ IF(\mathcal{G}_{l_1}), IF(\mathcal{G}_{l_2}), ..., IF(\mathcal{G}_{l_p}) \}$, where $IF$ is the filtering operation with isolation forest. \textbf{\textit{Step 3:}} We derive the advised action list $\mathbf{A_{IF}}$ from filtered results $G_{IF}$. Specifically, for $ \mathbf{a_{IF}}$ $\{a_1, a_2, ..., a_n \}$ , the $i$-th advised action $a_i = 1$ if $\mathbf{c}_i \in G_{IF}$ and $a_i = 0$ if $\mathbf{c}_i \notin G_{IF} $. \textbf{\textit{Step 4:}} At several beginning steps of the exploration in reinforcement learning, the instance agent follows the advice and take the advised actions for better training. \iffalse \begin{algorithm} \caption{Interactive Reinforcement Learning for Instance Agent with Isolation Forest Trainer} \LinesNumbered \KwIn{poisoned data $X_{pois} \{x_1, x_2, ..., x_{M} \}$, data labels $Y_{pois} \{y_1, y_2, ..., y_{M} \}$ } \KwOut{the advised action for instance agent $A_{IF}$ based on Isolation Forest} $labels \gets set(Y_{pois})$, $L \gets len(labels)$\; initialize poisoned data groups $\{ \mathcal{G}_1, \mathcal{G}_2, ..., \mathcal{G}_L \}$\; \For{$i = 1$ to $M$} { \For{$j = 1$ to $L$} { \If { $y_i == labels[j] $} { add instance $x_i$ into group $\mathcal{G}_j$\;} } } initialize isolation forest filter results $G_{IF}$ with $\emptyset$ \; initialize advised actions $A_{IF}\{a_1, ..., a_{M}\}$ with 0\; \For{$i = 1$ to $L$} { $U \gets IsolationForestFilter(\mathcal{G}_i)$ \; add every instance of $U$ into $G_{IF}$\; } \For{$i=1$ to $M$} { \If{$x_i \in G_{IF}$}{$a_i = 1 $ } \textbf{return} $A_{IF}$ \end{algorithm} \fi \section{Backgrounds} \noindent\textit{Concept 2.1} \textbf{Dual-Agent Reinforcement Learning} is a variant of multi-agent reinforcement learning. The dual-agent RL has two agents collaboratively accomplish two different tasks. For example, it has been applied to interactively generate bounding boxes and detect facial landmarks in computer vision~\cite{guo2018dual}. \noindent\textit{Concept 2.2} \textbf{Interactive Reinforcement Learning} is to provide agents with action advice from teacher-like trainers, so that agents learn learn the optimal decisions more efficiently in early exploration~\cite{amir2016interactive}. \noindent\textit{Definition 2.3} \textbf{Feature Selection}. Given an input data matrix $ {X} \in {\mathbb R}^{n*m}$, $n$ and $m$ denote the number of instances and features respectively; $x_{ij}$ is the element in the $i$-th row and $j$-th column. We denote input features $ {F} = \{ \mathbf{f}_j \}_{j=1}^{m}$, where the $j$-th feature is denoted by ${\mathbf{f}_j} = \{x_{1j},x_{2j}, ..., x_{nj} \}$. Feature selection aims to select an optimal subset ${F^*} \subseteq {F}$ making downstream predictive model perform well. \noindent\textit{Definition 2.4} \textbf{Instance Selection}. As we mentioned above, for the data matrix ${X}$, all the instances are denoted as ${C} = \{ \mathbf{c}_i \}_{i=1}^{n}$ where the $i$-th instance $\mathbf{c}_i =\{x_{i1},x_{i2}, ..., x_{im} \}$. Traditionally, instance selection studies aim to remove data noise or outliers, and find an instance subset ${C^*} \subseteq {C}$ that has the same performances as ${C}$ for the downstream predictive task \cite{wilson2000reduction}. \noindent\textit{Definition 2.5} \textbf{The Joint Feature and Instance Selection Task} is to simultaneously find the optimal feature subset ${F^*}$ and the optimal instance subset ${C^*}$, in order to achieve the best performances in a downstream predictive task. \section{Related Work} \textbf{Feature selection} includes three kinds of methods: (1) Filtering methods rank features based on relevance scores and select top-ranking ones (e.g., univariate feature selection). (2) Wrapper methods use predictors, considering the prediction performance as objective function (e.g., branch and bound algorithms). (3) Embedded methods incorporate feature selection into the classifier construction to search for an optimal feature subset (e.g., LASSO \cite{tibshirani1996regression}). \noindent \textbf{Instance selection} mainly includes two kinds of methods: (1) wrapper methods (e.g., $k$-\textit{NN} based selection); (2) filter methods (e.g., $kd-$trees). The criterion is based on the accuracy obtained by a classifier. Most of wrapper methods are based on \textit{k-NN} classifier. Other methods select instances by using SVM or Evolutionary algorithms, or are accomplished by finding border instances \cite{olvera2010review}. \begin{figure} \centering \subfigure[\small FC dataset] { \label{} \includegraphics[width=4.15cm]{exp_fig/points_wild.pdf} } \hspace{-4.1mm} \subfigure[\small Spam dataset] { \label{} \includegraphics[width=4.15cm]{exp_fig/points_spam.pdf} } \vspace{-2mm} \caption{Visualizations of agent exploration process on FC and Spam dataset. Points in red are top 10 best performed steps.} \label{exp5} \vspace{-4mm} \end{figure} \noindent \textbf{Joint selection of Feature and Instance} has also been made some efforts to study; however, limited algorithms were proposed to tackle feature and instance selection simultaneously. The joint selection is firstly studied by genetic algorithms \cite{kuncheva1999nearest}. Then some studies solve this problem with greedy algorithms \cite{zhang2012unified}, principal component analysis \cite{suganthi2019instance} or application of pairwise similarity \cite{benabdeslem2020scos}. Most existing work towards joint selection tries to apply heuristic search; they adopt simulated annealing algorithms \cite{de2008novel}, cooperative coevolutionary algorithms \cite{derrac2012integrating}, or sequential forward search \cite{garcia2021si}. The joint selection is also studied in clinical data setting \cite{olvera2010review} and in social media data setting \cite{tang2013coselect}. \noindent \textbf{Reinforced Feature Selection} has applied reinforcement learning for the feature selection task. Some studies use single agent for feature selection \cite{fard2013using,zhao2020simplifying}; others Multi-agent reinforcement learning have been used to automate feature selection \cite{fan2020autofs,fan2021autogfs,fan2021interactive,liu2019automating}. Inspired by these work, we apply reinforcement learning into the joint selection task.
\section{Introduction} Determining the elementary particle content beyond that of the Standard Model is a central objective of contemporary fundamental physics. A powerful method is to analyse extreme astrophysical environments for signals that could call for new physics. In particular, stars collapsing into supernovae have long been recognised as an ideal probe of light, weakly interacting particles, such as axions \cite{Raffelt:1996wa}. The QCD axion is the most well-motivated proposed solution to the strong CP-problem \cite{Peccei:1977hh,Peccei:1977ur,Weinberg:1977ma,Wilczek:1977pj}, and may comprise the dark matter of the universe \cite{Preskill:1982cy,Abbott:1982af,Dine:1982ah}. Axionlike particles (ALPs) are, similarly to the QCD axion, realised as pseudo-Nambu-Goldstone bosons, and frequently appear as theoretical predictions of high-energy physics models, including string compactifications \cite{Svrcek:2006yi}, some realisations of the seesaw mechanism explaining the small neutrino masses \cite{Gelmini:1980re}, or the breaking of family symmetries \cite{Wilczek:1982rv}. ALPs can couple to all Standard Model particles through interactions that respect the shift symmetry of the theory. This leads to a rich phenomenology, which is often best explored by isolating the physical effects of each coupling in turn. In this paper, we derive new qualitative results and quantitative bounds for ALPs that only couple to Standard Model particles at tree-level through a derivative coupling to electrons, \begin{equation} \Delta {\cal L}_{ae} = \ensuremath{\hat g_{ae}} (\partial_\mu a) \bar \psi_e \gamma^\mu \gamma_5 \psi_e \, . \label{eq:introL} \end{equation} Bounds derived in this way are conservative, as the inclusion of additional couplings (most notably to photons) tend to enhance possible signals. Moreover, results derived from this low-energy effective theory apply to UV-constructions of ``photophobic’’ ALP models that have vanishing ALP-photon couplings at tree level, see e.g.~\cite{Craig:2018kne}. ALPs interacting only with electrons through equation \eqref{eq:introL} still couple to photons at loop level. In this paper, we show that this loop effect is both theoretically subtle and has significant phenomenological consequences. Moreover, loop-induced couplings are interesting as they demonstrate how large hierarchies one can in practice achieve between the parameters in the low-energy effective theory, once quantum effects are taken into account. Indeed, loop-induced two-photon decay of ALPs coupled to electrons is of critical importance for the interpretation of experimental `direct detection' searches for ALP dark matter, as recently emphasised in \cite{Ferreira:2022egk}. In this paper, we derive a new expression for the one-loop interaction of ALPs and photons, and we show that our results have immediate implications for constraints on ALPs produced in supernovae. The main new results of this paper are: \begin{itemize} \item \emph{Correct effective couplings.} At loop level, the effective couplings are often identified from amplitudes by matching onto an effective Lagrangian. For example, the (momentum-space) amplitude for the two-photon decay of an ALP interacting with electrons through equation \eqref{eq:introL} is schematically given by, \begin{equation} \mathcal{M}_{a\gamma\gamma} = \ensuremath{g_{a \gamma}^{\text{(D)}}} \, \varepsilon^{\mu\nu\alpha\beta} q_1^\alpha \, q_2^\beta (\epsilon_1)^*_\mu (\epsilon_2)^*_\nu \, , \label{eq:Mintro} \end{equation} where $q_1,\, q_2$ and $\epsilon_1, \epsilon_2$ respectively denote the external photon momenta and polarisations. The coupling $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ captures the one-loop correction originating from the electron triangle diagram. The amplitude \eqref{eq:Mintro} can be obtained from the tree-level Feynman rule of the (real-space) effective operator, \begin{equation} \Delta {\cal L}_{a\gamma\gamma} = \frac{\ensuremath{g_{a \gamma}^{\text{(D)}}}}{4}\, a\, F_{\mu \nu}\tilde{F}^{\mu\nu} \, , \end{equation} and the prescription should capture the physics to the one loop order. It is tempting to use this effective operator to study other processes involving photons and ALPs, e.g.~the phenomenologically important Primakoff process ($a+\psi\to \gamma+\psi$ for some ion $\psi$) that involves a vertex of an ALP with two photons (cf.~\cite{Ghosh:2020vti}). An important point of this paper is that this procedure is not correct. The effective coupling of equation \eqref{eq:Mintro} applies to the decay process, in which the ALP and the two photons are on-shell, but is not the right coupling to use for off-shell vertices, such as the one appearing in the Primakoff process. In \cref{sec:effectivePhotonCoupling}, we calculate the relevant diagram for off-shell particles, and show that the effective coupling for the Primakoff process, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$, differs qualitatively and quantitatively from the decay coupling: $$ \ensuremath{g_{a\gamma}^{\text{(P)}}} \neq \ensuremath{g_{a \gamma}^{\text{(D)}}} \, . $$ In particular, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ is \emph{momentum dependent} through the Mandelstam $t$ variable, and the couplings are not simply related by a rescaling. Moreover, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ remains non-vanishing in the limit of vanishing ALP mass, contrary to some assertions in the literature. This result has important phenomenological consequences, as we demonstrate for the case of ALP production in supernovae. \item \emph{Leading supernova constraints on ALPs.} We show in \cref{sec:ALPproduction} that even in an ALP model with no tree-level (or large-logarithmic) interactions with photons, the one-loop Primakoff and $ a \leftrightarrow \gamma \gamma $ processes can play an important phenomenological role. In fact, they lead to some of the strongest limits on the ALP-electron interaction for relatively heavy ALPs ($ m_a \gtrsim 30 $~keV). We consider two independent SN constraints in this work. First, relatively strongly coupled ALPs provide an additional cooling channel for the SN core, potentially shortening the neutrino burst of SN1987A contrary to observations \cite{Ellis:1987pk,Raffelt:1987yt}. This `cooling bound' is studied in \cref{sec:cooling}. In this case, the one-loop processes add to the cooling by tree-level ALP-electron interactions that recently have been studied in \cite{Lucente:2021hbp} and that we reassess here. As we will show, neither of the two contributions can be neglected, and a consistent constraint should include both. Second, more weakly coupled ALPs can escape the SN and decay into gamma-ray photons, some of which would have reached the gamma-ray spectrometer on the Solar Maximum Mission satellite that was taking data for 223 seconds after the initial neutrino burst reached earth. The non-observation of an excess over the background gamma-ray rate puts an additional constraint on the number of ALPs produced in SN1987A, which we study in \cref{sec:decay}. This `decay bound' has no tree-level counterpart in an ALP model with $ \ensuremath{g_{a\gamma}} = 0 $ in the classical Lagrangian, since in this case the decay into gamma-rays can only occur at the one-loop level. \item \emph{Technical improvements on the derivation of SN constraints on ALPs.} For the calculation of both production and re-absorption of ALPs, as well as their conversion into gamma-rays, we have made some improvements over the literature: in this work, we consider quantum statistics for all processes that happen in the SN core (especially important for processes involving electrons and positrons, which are highly degenerate), we use energy dependent quantities throughout (e.g.~for the ALP absorption rate), and we do not neglect the ALP mass. Furthermore, we use the state-of-the-art numerical SN models of \cite{Fischer:2021jfm}. \item \emph{New cosmological bounds on the ALP-electron coupling.} ALPs that interact with photons can be produced in the primordial plasma via inverse decays. If they decay back into photons after the start of big bang nucleosynthesis (BBN) there can be photo-dissociation of primordial elements and/or changes in the effective number of degrees of freedom at recombination. In \cref{sec: Comparison with other bounds}, we use previous constraints on the ALP-photon coupling, from BBN and cosmic microwave background (CMB) data \cite{Depta:2020zbh}, to derive new bounds on $\ensuremath{\hat g_{ae}}$ by taking into account that it induces $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ at the one-loop level. \end{itemize} In summary, we clarify the general definition and use of the effective coupling between ALP and photon, and demonstrate how to use it in a phenomenological calculation to derive strong bounds on $ \ensuremath{\hat g_{ae}} $. This procedure can be adapted to take loop effects into account for all ALPs with energies $ \omega \gtrsim m_e $ in other astrophysical, cosmological, or laboratory settings. \section{Effective ALP-photon interactions} \label{sec:effectivePhotonCoupling} In this section we define and discuss the effective ALP-photon coupling generated by the electron triangle diagram shown in \cref{fig:triangleDiagram}. The effective coupling depends on the four-momenta of the ALP and photons, and is sensitive to whether these states are external (on-shell) or internal (off-shell). Consequently, we show that the effective coupling for the Primakoff process differs from that of the decay process, and importantly, does not vanish for massless ALPs. Throughout this paper we consider the effective theory of an ALP coupled only to electrons. For energies smaller than $\Lambda $, an appropriate UV scale, we can write the effective Lagrangian \begin{equation}\label{eq:Lagrangian} \mathcal{L} = -\frac{1}{2} a (\Box + m_a^2) a + \ensuremath{\hat g_{ae}} (\partial_\mu a) \bar \psi_e \gamma^\mu \gamma_5 \psi_e + \mathcal{L}_{\text{SM}} \, , \end{equation} where $ a $ is a real pseudoscalar field describing the ALP of mass $ m_a $, $ \psi_e $ is the electron field, $ \ensuremath{\hat g_{ae}} $ is the ALP-electron coupling, and $ \mathcal{L}_{\text{SM}} $ is the standard model Lagrangian. A few comments on these conventions are in order: we define $ \ensuremath{\hat g_{ae}} $ with dimension $ (\text{energy})^{-1} $, which is related to the often used dimensionless coupling constant as $ \ensuremath{g_{ae}} = 2 m_e \ensuremath{\hat g_{ae}} $,\footnote{Note that $$ \ensuremath{g_{ae}} = 2 m_e \ensuremath{\hat g_{ae}} \simeq \frac{\ensuremath{\hat g_{ae}}}{1 \text{ MeV}^{-1}} $$ is just the value of the dimensionful coupling constant in units of inverse MeV. This coincidence makes numerical comparisons between references using different conventions rather simple. \label{footnote:gaeEquivalence}} where $ m_e $ is the electron mass. In most of the literature on ALPs, $ \ensuremath{g_{ae}} $ is used because the ALP-electron interaction is often written in the non-derivative, pseudoscalar form, $ -i \ensuremath{g_{ae}} a \, \bar \psi_e \gamma_5 \psi_e $, which mostly leads to the same physical matrix elements at tree-level.\footnote{Even at tree-level there are counter examples, though, e.g.~if the fermion interacts with another pseudoscalar like in the case of nucleons interacting with an ALP and a pion \cite{Raffelt:1987yt,Carena:1988kr,Choi:1988xt}.} However, at one loop the two interaction terms are not equivalent, and the pseudoscalar interaction only matches with the derivative interaction \emph{plus} an additional direct coupling of the ALP to photons (see also \cite{Quevillon:2019zrd}). \begin{figure}[t] \centering \includegraphics[width=.4\textwidth]{Figures/triangleDiagram.pdf} \caption{Diagram contributing to the $ a\gamma\gamma $ vertex, with electrons in the loop. This diagram is finite, and therefore gives no contribution to the renormalization group equation of $ g_{\gamma a}(\mu) $.} \label{fig:triangleDiagram} \end{figure} \subsection{Off-shell effective coupling} In the theory of equation \eqref{eq:Lagrangian}, there is no tree-level coupling to photons. However, one can still draw the loop diagram for an off-shell $ a\gamma\gamma $ vertex shown in \cref{fig:triangleDiagram} (plus the version with $ q_1 $ and $ q_2 $ exchanged), yielding the following off-shell three-point function:\footnote{As mentioned, a pseudoscalar ALP-electron coupling would lead to a different result here, even though a very similar looking one. In \cref{eq:effCouplingDefinition}, one would just replace $ 1 + 2 m_e^2 C_0 $ by $ 2 m_e^2 C_0 $, leading to the opposite behaviour of the effective coupling in the limits of infinite and vanishing electron mass.} \begin{equation} \label{eq:effCouplingDefinition} \begin{split} i \mathcal{M}_{a\gamma\gamma}^{\mu\nu} &= i \frac{2 \alpha \ensuremath{\hat g_{ae}}}{\pi} \left[ 1 + 2 m_e^2 \, C_0\left( q_1^2, q_2^2, (q_1 + q_2)^2, m_e^2, m_e^2, m_e^2 \right) \right] q_1^\alpha \, q_2^\beta \varepsilon^{\mu\nu\alpha\beta}\\ &\equiv i \ensuremath{g_{a\gamma}^{\text{eff}}}(q_1^2, q_2^2, (q_1 + q_2)^2) \, q_1^\alpha \, q_2^\beta \varepsilon^{\mu\nu\alpha\beta} \, , \end{split} \end{equation} where $ \varepsilon $ is the Levi-Civita symbol, $ \alpha $ the fine-structure constant, and the momenta are assigned as in \cref{fig:triangleDiagram}. We used the Mathematica package FeynCalc \cite{MERTIG1991345,Shtabovenko:2016sxi,Shtabovenko:2020gxv}\footnote{We also used FeynCalc to calculate all the Feynman diagrams in the following sections, furthermore PackageX \cite{Patel:2015tea} to analytically handle loop integrals, and LoopTools to numerically evaluate them \cite{Hahn:1998yk}.} to calculate the loop diagram. We emphasise that \cref{eq:effCouplingDefinition} holds also when the particles are off-shell, and $ q_1^2, q_2^2 $ and $ q_1 \cdot q_2 $ are not fixed. We define $ \ensuremath{g_{a\gamma}^{\text{eff}}} $ as the effective ALP-photon coupling, and $ C_0 $ is the scalar, three-point Passarino-Veltman function \cite{Passarino:1978jh} for which we use the definition of \cite{Shtabovenko:2016sxi}: \begin{align*} &C_0\left( q_1^2, q_2^2, (q_1 + q_2)^2, m_1^2, m_2^2, m_3^2 \right)\\ &\qquad \equiv \int \frac{\mathrm{d}^4 k}{i \pi^2} \frac{1}{\left(k^2 - m_1^2\right)\left((k - q_1)^2 - m_2^2\right)\left((k-q_1-q_2)^2 - m_3^2\right)} \, . \end{align*} The function $C_0$ can be expressed in terms of Feynman parameter integrals, and (for general arguments) as a combination of 12 dilogarithmic functions \cite{tHooft:1978jhc}. In certain limits discussed in \cref{sec:gdecay,sec:gPri}, we derive simplified analytical representation of the function. In practice, we evaluate $ C_0 $ directly, using the LoopTools program \cite{Hahn:1998yk}, which is sufficiently fast for our purposes. Our expression in \cref{eq:effCouplingDefinition} agrees with similar calculations in the literature. Reference \cite{Quevillon:2019zrd} evaluated the same diagram using Pauli-Villars regularisation, and provides a useful cross-check to our expression which is derived using the Breitenlohner-Maison-Veltman-’t Hooft scheme of dimensional regularisation \cite{Breitenlohner:1977hr,tHooft:1972tcz}, which conceptually decomposes the Dirac matrices into components in $ D $ and $ 4 $ dimensions. Furthermore, a related discussion limited to the case of one on-shell photon with $ q^2 = 0 $ can be found in \cite{Bauer:2021mvw}, and we have explicitly checked that $ \ensuremath{g_{a\gamma}^{\text{eff}}}(0, p^2, k^2) $ agrees with the Feynman parameter integral representation shown in eq.~(2.74) of that reference. The effective ALP-photon coupling of \cref{eq:effCouplingDefinition} is theoretically subtle, for several reasons: \begin{itemize} \item First, $\ensuremath{g_{a\gamma}^{\text{eff}}}$ should not be confused with the usual \emph{running coupling} $ \ensuremath{g_{a\gamma}}(\mu) $ that is governed by the renormalisation group (RG) equations. Running originates purely from the divergent parts of loop diagrams, yielding typically large contributions proportional to $ \log(\mu/\Lambda) $, where $ \mu $ is the renormalisation scale and $ \Lambda $ the UV cut-off of the EFT. The effective coupling includes the running coupling, but also all other loop contributions: \begin{equation} \label{eq:runningAndEffectiveCoupling} \ensuremath{g_{a\gamma}^{\text{eff}}} = \underbrace{\ensuremath{g_{a\gamma}}(\mu)}_{\text{running}} + \underbrace{\frac{2\alpha\ensuremath{\hat g_{ae}}}{\pi}(1 + 2 m_e^2 C_0)}_{\text{no $\log \mu$, but $p$ dependent}} \, , \end{equation} In the case of the ALP-photon coupling, diagram \labelcref{fig:triangleDiagram} is finite, and the running coupling $g_{a\gamma}(\mu)$ is not generated by other couplings: setting $g_{a\gamma}(\Lambda)=0$ in the UV ensures that it stays zero at lower energies \cite{Chala:2020wvs,Bauer:2020jbp}.\footnote{For a non-zero $ \ensuremath{g_{a\gamma}}(\Lambda) $, the dependence on the renormalisation scale $ \mu $ in \cref{eq:runningAndEffectiveCoupling} will drop out in matrix elements of physical processes if the field renormalisation constants of the external photons are included. If the loop diagram inducing $ \ensuremath{g_{a\gamma}} $ were divergent, the $ \mu $-dependence of the running coupling would partly be cancelled by a $ \log(\mu) $ term with the same prefactor as the $ 1/\epsilon $ pole.} However, this does not mean that there is no interaction between ALPs and photons, but only that the `leading log' contribution vanishes, and the full one-loop diagram of \cref{fig:triangleDiagram} determines the effective coupling $\ensuremath{g_{a\gamma}^{\text{eff}}}$. \item Second, in contrast to running couplings, which only depend on the renormalization scale $ \mu $, $\ensuremath{g_{a\gamma}^{\text{eff}}}$ captures the full momentum and mass dependence of the one-loop diagram. Formally, $\ensuremath{g_{a\gamma}^{\text{eff}}}$ appears in the quantum effective action of the effective theory of the ALP in the operator $ \tfrac{1}{4} \, \ensuremath{g_{a\gamma}^{\text{eff}}} \, a F_{\mu\nu} \tilde F^{\mu\nu} $, whose `tree-level' amplitudes reproduce the right one-loop result in \cref{fig:triangleDiagram} (cf.~e.g.~the related discussion of the 1PI effective action in \cite{Schwartz:2014sze}). This motivates the name \emph{effective coupling} for $\ensuremath{g_{a\gamma}^{\text{eff}}}$ (in a particle physics context, $ \ensuremath{g_{a\gamma}^{\text{eff}}} $ could also be called a form factor). The momentum dependence of $\ensuremath{g_{a\gamma}^{\text{eff}}}$ has important practical consequences for phenomenology: while the running coupling is independent of the specific process in which it appears, the effective coupling is not. It is in general a function of the photons' 4-momenta $ q_1 $ and $ q_2 $ -- or more precisely the three Lorentz invariant, real quantities $ q_1^2, \, q_2^2 $ and $ (q_1 + q_2)^2 $ -- and is therefore different for each physical process involving ALPs and photons. \item Third, $ \ensuremath{g_{a\gamma}^{\text{eff}}} $ is not a Wilsonian effective coupling, and its momentum dependence clearly does not originate from the derivative expansion of one-loop effective operators in a Wilsonian effective action. Furthermore, there are no heavy fields to be integrated out in \cref{fig:triangleDiagram} since we do not restrict ourselves to ALP masses or kinetic energies below the electron mass. \item Fourth, $ \ensuremath{g_{a\gamma}^{\text{eff}}} $ is non-vanishing even when the ALP shift symmetry is restored by taking $m_a^2 \to 0$. This should be contrasted with the discussion of \cite{Craig:2018kne}, where it was asserted that the ALP-photon coupling must scale with the order parameter of the explicit symmetry breaking, and so should vanish as the ALP mass goes to zero. We note that the symmetry of the low-energy EFT under a constant ALP shift $ a(x) \to a(x) + \delta a $ is not broken by $\ensuremath{g_{a\gamma}^{\text{eff}}}\neq 0$, and the ALP-photon vertex is not forbidden on symmetry grounds. The contribution proportional to $\delta a$ is analogous to the QED $ \theta $ parameter: it is a total derivative and topologically trivial, and does not contribute to any physical quantity. Moreover, the finite $\ensuremath{g_{a\gamma}^{\text{eff}}}$ is consistent with Adler's soft theorem, which states that the effective ALP-photon interaction must vanish for massless ALPs in the limit of vanishing ALP four-momentum, but does not imply a vanishing coupling at finite kinetic energy (see e.g.~\cite{Weinberg:1996kr}). In \cref{sec:gPri}, we show how the non-vanishing effective coupling $ \ensuremath{g_{a\gamma}^{\text{eff}}} $ in the low ALP-mass limit has important implication for the Primakoff process. \end{itemize} The loop in \cref{fig:triangleDiagram} is the vacuum or zero-temperature one-loop correction to the $ a \gamma \gamma $ three-point function. As we will discuss in \cref{subsec:ALPproduction}, one has to take finite-temperature (or chemical potential) corrections into account when considering quantum field theory in a plasma like that of SN1987A. Those effects do not change the zero-temperature loop corrections that we consider here. Especially, $ m_e $ in \cref{eq:effCouplingDefinition} is always the vacuum electron mass, even though we will discuss in \cref{subsec:bremsstrahlung} that some thermal effects can be accounted for by replacing it with an effective, thermal electron mass in tree-level diagrams. This is analogous to vacuum perturbation theory, where bare and physical mass are not equal, but it would be the bare mass appearing in the calculation of a loop. In the following two sections, we take a closer look at the effective coupling $ \ensuremath{g_{a\gamma}^{\text{eff}}} $ in two specific processes relevant to our later discussion: ALP to photon decay, and the Primakoff process. \subsection{Effective coupling in ALP decays} \label{sec:gdecay} In this section we review the calculation of the effective ALP-photon coupling relevant for the decay of ALPs into two photons. The decay process $ a \to \gamma \gamma $ is described by the diagram in \cref{fig:triangleDiagram} with all external particles on-shell, i.e.~$ q_1^2 = q_2^2 = m_\gamma^2 $ and $ (q_1 + q_2)^2 = m_a^2 $. We include an effective photon mass $ m_\gamma $ here because we will be interested in decays inside a plasma. For these on-shell conditions, we denote the effective coupling by \begin{equation} \ensuremath{g_{a \gamma}^{\text{(D)}}} \equiv \ensuremath{g_{a\gamma}^{\text{eff}}}(m_\gamma^2, m_\gamma^2, m_a^2) \, . \end{equation} This `effective decay coupling' also appears in inverse decays, i.e.~photon-coalescence, where two incoming photons produce one outgoing ALP (see \cref{subfig:photonCoalescenceDiagram}). The effective decay coupling only depends on the masses of the ALP and the photon, and for $ m_\gamma \to 0 $ we recover the expression in \cite{Bauer:2017ris} that is used widely in the recent literature (see e.g.~\cite{Calibbi:2020jvd,Caputo:2021rux,Ghosh:2020vti,Craig:2018kne}): \begin{subequations} \begin{align}\label{eq:decayCoupling} \ensuremath{g_{a \gamma}^{\text{(D)}}} &= \frac{2 \alpha \ensuremath{\hat g_{ae}}}{\pi} \left[ 1 + 2 m_e^2 \, C_0\left( m_\gamma^2, m_\gamma^2, m_a^2, m_e^2, m_e^2, m_e^2 \right) \right]\\ \label{eq:decayCouplingNoPhotonMass} &\xrightarrow{m_\gamma \to 0} \, \, \frac{2 \alpha \ensuremath{\hat g_{ae}}}{\pi} \left(1-\tau f(\tau)^2\right) \simeq \frac{2 \alpha \ensuremath{\hat g_{ae}}}{\pi} \times \begin{cases} -\frac{1}{3} \tau^{-1} \quad &\text{for} \, \tau \gg 1\\ 1 \quad &\text{for} \, \tau \ll 1\\ \end{cases} \, , \end{align} \end{subequations} where $\tau=4m_e^2/m_a^2$, and \begin{equation} \label{eq:fDefinition} f(\tau)= \Theta (\tau -1) \arcsin\left(1 / \sqrt{\tau} \right)+\frac{1}{2} \Theta (1-\tau ) \left[\pi +i \log \left(\frac{1 + \sqrt{1 - \tau}}{1 - \sqrt{1 - \tau}}\right)\right] \, , \end{equation} with the Heaviside function $\Theta$. Some recent works (e.g.~\cite{Caputo:2021rux,Ghosh:2020vti}) have used $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ to calculate other loop-level ALP-photon processes, beyond decay and coalescence. However, when the on-shell conditions are not satisfied, \cref{eq:decayCoupling} does not apply. Indeed, the correct coupling can differ significantly from $\ensuremath{g_{a \gamma}^{\text{(D)}}}$, as we now show for the case of the Primakoff process. \subsection{Effective coupling in the Primakoff process} \label{sec:gPri} In this section, we calculate the relevant loop-induced coupling for the Primakoff process and explain how it differs from that of ALP decay. \begin{figure} \centering \includegraphics[width=.4\textwidth]{Figures/primakoffDiagramWithLoop.pdf} \caption{Primakoff process at one loop.} \label{fig:primakoffDiagramWithLoop} \end{figure} The Primakoff process is shown in \cref{fig:primakoffDiagramWithLoop}: an on-shell photon converts into an ALP by exchanging a virtual, i.e.~off-shell, photon with a proton.\footnote{In general, all charged fermions are possible targets, but we will concentrate on protons here since that is the relevant case for the SN bounds.} The relevant Lorentz invariant parameters are now given by $ q_1^2 = m_\gamma^2, \, q_2^2 = t, \, (q_1 + q_2)^2 = m_a^2 $, where $ t $ is the second Mandelstam variable, and the four-momenta are as in \cref{fig:primakoffDiagramWithLoop}. We define the `effective Primakoff coupling' as \begin{equation} \ensuremath{g_{a\gamma}^{\text{(P)}}} \equiv \ensuremath{g_{a\gamma}^{\text{eff}}}(m_\gamma^2, t, m_a^2) \, . \end{equation} As long as the photon energy is small compared to the proton mass, the nuclear recoil can be neglected and the external ALP and photon energies are equal. Under this assumption, $ t = m_a^2 + m_\gamma^2 - 2\omega^2 (1 - \beta_a \beta_\gamma \cos\theta) $ where $\omega$ is the energy of the incoming photon (equal to the energy of the outgoing ALP), $\theta$ is the angle between the photon and ALP three-momenta, and the relativistic velocities are $ \beta_{a,\gamma}^2 = 1 - m_{a,\gamma}^2 / \omega^2 $. Explicitly, the effective Primakoff coupling in the no-recoil limit is given by, \begin{equation} \label{eq:effPriCoupling} \begin{split} \ensuremath{g_{a\gamma}^{\text{(P)}}}(\omega, \cos\theta) &= \frac{2 \alpha \ensuremath{\hat g_{ae}}}{\pi} \left[ 1 + 2 m_e^2 \, C_0\left( m_\gamma^2, t, m_a^2, m_e^2, m_e^2, m_e^2 \right) \right]\\ &\xrightarrow{m_\gamma \to 0} \frac{2 \alpha \ensuremath{\hat g_{ae}}}{\pi} \left\{1 + \frac{4 m_e^2}{m_a^2 - t} \left[f^2\left(\frac{4m_e^2}{t}\right) - f^2\left(\frac{4m_e^2}{m_a^2}\right)\right]\right\} \, , \end{split} \end{equation} with $ f $ as defined in \cref{eq:fDefinition}, and $ -\infty < t \leq m_a^2 + m_\gamma^2 $. An important difference to $ \ensuremath{g_{a \gamma}^{\text{(D)}}} $ is that $ \ensuremath{g_{a\gamma}^{\text{(P)}}} $ depends on the energy transfer between photon and ALP. Therefore, while $ \ensuremath{g_{a \gamma}^{\text{(D)}}} \sim m_a^2 / m_e^2 $ becomes very small for low-mass ALPs, the effective Primakoff coupling remains substantial as long as the energy of the photon is larger than, or comparable to, the electron mass. \Cref{fig:effPriCoupling} shows the dependence of $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ on $t$, and illustrates its striking difference to $\ensuremath{g_{a \gamma}^{\text{(D)}}}$. \begin{figure} \centering \includegraphics[width=\textwidth]{Figures/effPrimakoffCouplingPlotComparison.pdf} \caption{Effective ALP-photon couplings for $m_\gamma=0$: $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ evaluated as function of the Mandelstam variable $ t $ for $ m_a = 0 $ (solid blue) and $ m_a = 0.1\, \text{MeV}$ (solid orange); and $ \ensuremath{g_{a \gamma}^{\text{(D)}}} $ for $ m_a = 0.1 \, \text{MeV}$ (dashed orange). Note that $ \ensuremath{g_{a \gamma}^{\text{(D)}}} = 0 $ for $ m_a = 0 $, and that $ t $ is negative unless marked differently.} \label{fig:effPriCoupling} \end{figure} For high-energy photons with $ \omega \gg m_e $, the effective Primakoff coupling of \cref{fig:effPriCoupling} approaches a constant value: \begin{equation}\label{eq:effCouplingSmallElectronMassLimit} \ensuremath{g_{a\gamma}^{\text{(P)}}} \xrightarrow{\omega/m_e \to \infty} \frac{2 \alpha}{\pi} \ensuremath{\hat g_{ae}} \, , \end{equation} This limit is relevant e.g.~when $m_a$ or $m_\gamma\gg m_e$, or when the process occurs in a highly relativistic QED plasma.\footnote{Since the evaluation of the loop function is computationally cheap, we use the full effective coupling and do not use the constant coupling approximation for heavy ALPs or highly energetic photons when calculating ALP production rates in supernovae in \cref{sec:ALPproduction}.} Interestingly, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ in the limit of \cref{eq:effCouplingSmallElectronMassLimit} agrees with $ \ensuremath{g_{a \gamma}^{\text{(D)}}} $ in the $ m_e \to 0 $ limit. This is a consequence of the well-known anomaly: if the ALP couples to an (effectively) massless fermion, a chiral redefinition of the fermion field can eliminate the ALP-fermion coupling. However, since the PQ current is anomalous, the path integral measure is not invariant under this rotation and an ALP-photon coupling with precisely the value in \cref{eq:effCouplingSmallElectronMassLimit} is generated. Hence, in the $ m_e \to 0 $ limit, the Lagrangian in \cref{eq:Lagrangian} is equivalent to one where the ALP only couples to photons, and not the electron. Therefore, in this limit it is natural that the effective decay coupling matches with the effective Primakoff coupling. \Cref{eq:effCouplingSmallElectronMassLimit} also has interesting implications for more general ALP theories that include multiple charged fermions with different masses. In such theories, it is possible to assign PQ-charges to cancel the electromagnetic anomaly, in which case the total $ \ensuremath{g_{a\gamma}^{\text{(P)}}} $ goes to zero in the large $ t $ limit. However, even in this case, $ \ensuremath{g_{a\gamma}^{\text{(P)}}} $ does \emph{not} vanish at intermediate energies because the various contributions are sensitive to the ratio of $ t $ to the fermion masses. Due to the $ t $-dependence of $ \ensuremath{g_{a\gamma}^{\text{(P)}}} $, it is non-trivial to reinterpret current bounds on $ \ensuremath{g_{a\gamma}} $ as bounds on $ \ensuremath{\hat g_{ae}} $ through the loop process: most of those constraints involve integrals over a distribution of ALP-energies and the angle $ \theta $, and therefore cannot just be ``translated'' by rescaling into limits on $\ensuremath{\hat g_{ae}}$. Instead, the resulting processes must be re-evaluated with the $t$-dependent effective coupling. In \crefrange{sec:ALPproduction}{sec:decay}, we exemplify how this can be done when calculating ALP bounds from supernovae. We close this section by briefly commenting on how our results relate to the previous literature on this subject. The loop induced coupling has been considered in \cite{Ghosh:2020vti}, where SN bounds on $ \ensuremath{g_{a\gamma}} $ were directly translated to $ \ensuremath{\hat g_{ae}} $ using the \emph{decay} coupling. As we have explained, this yields the wrong results for the Primakoff process: for ALP masses below $ \sim 30 $~MeV, using the decay coupling underestimates the bound by roughly a factor $ \frac{m_a^2}{12 m_e^2} $, which can be as small as $ \sim 10^{-5} $ in the mass range considered in \cite{Ghosh:2020vti}. Moreover, reference \cite{Caputo:2021rux} considered muons coupled to ALPs with either a derivative interaction proportional to $ \hat{g}_{a\mu} $ analogous to this work, or a pseudoscalar coupling $ g_{a\mu} $ as discussed below \cref{eq:Lagrangian}. For both cases the resulting \emph{decay} coupling $ \ensuremath{g_{a \gamma}^{\text{(D)}}} $ was used to evaluate the one-loop Primakoff effect, and to derive constraints on $ g_{a\mu} $ from the energy loss of SNe and horizontal branch stars. While this is strictly not correct, the main focus of \cite{Caputo:2021rux} is the pseudoscalar coupling to muons, and in this case it turns out that the decay coupling approximates the actual Primakoff coupling quite well, for the relevant energies and masses, and corrections are small. For the case of derivatively coupled ALPs, as they are studied here, $ \ensuremath{g_{a\gamma}^{\text{(P)}}} $ is not necessarily negligible, which was assumed in \cite{Caputo:2021rux}, and the inclusion of the muon-loop induced Primakoff effect would be an interesting extension of this work (see also \cref{subsec:outlook}) We have shown that $\ensuremath{g_{a\gamma}^{\text{eff}}}$ depends not only on the mass of the ALP, but more generally on the square of the four-momenta of ALP and photons. The effective coupling of the Primakoff process can be large if the energy of the ingoing photon is large compared to the electron mass. Thus, one should expect this one-loop effect to be particularly important in plasmas with temperatures $ T \gtrsim 1 $~MeV. An astrophysical system with such temperatures are core-collapse supernovae, and we now show how to derive new bounds from SN1987A using the loop-induced coupling. \section{Production of ALPs in SN1987A} \label{sec:ALPproduction} Core-collapse supernovae offer an excellent opportunity to probe physics beyond the standard model because of the high temperatures and densities that are reached during the collapse. This enables exotic particles to be produced in potentially large numbers. ALPs can be produced in SNe through their couplings to any number of standard model particles like photons, electrons, nucleons, pions, or muons \cite{Ellis:1987pk,Raffelt:1987yt,Payez:2014xsa,Lucente:2020whw,Ertas:2020xcc,Lucente:2021hbp,Brinkmann:1988vi,Carenza:2019pxu,Bollig:2020xdr,Caputo:2021rux}. In this section, we first describe the state-of-the-art supernova model of \cite{Fischer:2021jfm} in \cref{subsec:SNmodel}, and provide an overview of the ALP production mechanisms in \cref{subsec:ALPproduction}. We then describe the detailed calculations for production through Bremsstrahlung in \cref{subsec:bremsstrahlung}, electron-positron fusion in \cref{subsec:eeFusionProduction}, Primakoff production in \cref{subsec:PrimakoffProduction} and photon coalescence in \cref{subsec:photonCoalescenceProduction}. The first two processes occur at tree-level, while the latter two respectively depend on the one-loop coupling $ \ensuremath{g_{a\gamma}^{\text{(P)}}} $ and $ \ensuremath{g_{a \gamma}^{\text{(D)}}} $. Our discussion on how to use the resulting spectra to constrain ALPs is deferred to \cref{sec:cooling,sec:decay}. \subsection{Supernova model} \label{subsec:SNmodel} The production rate of ALPs in a SN plasma depends on a number of quantities, such as the temperature $ T $, the mass density $ \rho $, the electron chemical potential $ \mu_e $, the effective number of protons $ n_p^{\text{eff}} $ (a measure of number density as well as degeneracy), and the plasma frequency $ \omega_{\text{pl}} $. All these quantities vary with position and time as the SN explosion is an inhomogeneous and dynamical process. As a numerical model for those profiles, we use the reference run of the SN simulations in \cite{Fischer:2021jfm}, which uses the AGILE-BOLTZTRAN code \cite{Mezzacappa:1993gn,Liebendoerfer:2002xn}, assumes an 18 solar masses progenitor star, and spherical symmetry (i.e.~the simulations are one dimensional). The model involves six-species Boltzman neutrino transport and includes contributions from muons and their weak interactions. As in \cite{Fischer:2021jfm}, we use the relativistic mean-field nuclear equation of state \textit{DD2} as first described in \cite{Fischer:2013eka}\footnote{The equation of state data was obtained from \url{https://astro.physik.unibas.ch/en/people/matthias-hempel/equations-of-state/}, while the data of the AGILE-BOLTZTRAN simulations was kindly shared with us by Tobias Fischer.} to infer the protons' thermodynamical properties, e.g.~$ n_p^{\text{eff}} $. We note that the specific properties of the SN models are not tightly constrained by observations, and hence the ALP production rates can vary by a factor of up to an order of magnitude depending on the model employed, see e.g.~discussions in \cite{Ertas:2020xcc,Lucente:2020whw}. The ALP production rates scale as $ \sim \ensuremath{\hat g_{ae}}^2 $, and hence, the final limits on the ALP-electron coupling will have a square-root sensitivity to the uncertainties in the astrophysical production spectra. \begin{figure}[t] \centering \includegraphics[width=\textwidth]{Figures/SNmodelPlot.pdf} \caption{Some of the SN properties at $ t = 1 $~s, taken from the simulations of \cite{Fischer:2021jfm}. At small radii, the finite resolution of the data is clearly visible.} \label{fig:SNmodelPlot} \end{figure} \Cref{fig:SNmodelPlot} shows some normalised profiles at $ t = 1 $ second after the ``bounce'', i.e. the time at which the central density in the SN core reaches its highest value. While the matter density and electron chemical potential fall monotonically, the temperature has a maximum at $ r \simeq 10 $~km. Therefore, we will find that all ALP production processes are most efficient near this radius (at $ t = 1 $~s). In general, there will be a back-reaction of the additional cooling and energy transfer by the ALPs on the SN evolution, so that a more accurate treatment would include the ALPs and their interactions in the described SN simulations, see \cite{Betranhandy:2022bvr,Fischer:2021jfm,Fischer:2016cyd}. Such an analysis is, however, beyond the scope of this work, which is why we take the data of the reference run of \cite{Fischer:2021jfm}, i.e.~the simulations without any ALPs, as an SN model, and treat the ALPs as small perturbation that will not affect the relevant dynamics. With the numerical model at hand, we can now proceed to determine the flux and energy of the ALPs produced by this supernova model. \subsection{ALP production processes} \label{subsec:ALPproduction} \begin{figure} \centering \begin{subfigure}{.38\textwidth} \includegraphics[width=\textwidth]{Figures/bremsstrahlungDiagram.pdf} \caption{Bremsstrahlung} \label{subfig:bremsstrahlungDiagram} \end{subfigure} \hspace{.15\textwidth} \begin{subfigure}{.28\textwidth} \includegraphics[width=\textwidth]{Figures/electronPositronFusionDiagram.pdf} \caption{Electron-positron fusion} \label{subfig:electronPositronFusionDiagram} \end{subfigure} \begin{subfigure}{.38\textwidth} \includegraphics[width=\textwidth]{Figures/primakoffDiagram.pdf} \caption{Primakoff process} \label{subfig:PrimakoffDiagram} \end{subfigure} \hspace{.15\textwidth} \begin{subfigure}{.28\textwidth} \includegraphics[width=\textwidth]{Figures/photonCoalescenceDiagram.pdf} \caption{Photon coalescence} \label{subfig:photonCoalescenceDiagram} \end{subfigure} \caption{Relevant ALP production processes in SN1987A. The shaded blob in the lower two diagrams represents the one-loop, effective ALP photon interaction defined in \cref{eq:effCouplingDefinition}.} \label{fig:productionDiagrams} \end{figure} In the following, we calculate the ALP production spectra $ \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} $, i.e.~the number density of ALPs produced per time and energy, of the four relevant processes in SN1987A, shown in \cref{fig:productionDiagrams}: the tree-level processes electron-nucleon Bremsstrahlung and electron-positron fusion, and one-loop processes of Primakoff production and photon coalescence. The spectra can be calculated as collision terms in the Boltzmann equation. We assume that all particles but the ALP are in thermal equilibrium, that this thermal bath is not influenced by the ALP production, and that the ALP phase space density is negligible so that no stimulated emission factor has to be included.\footnote{This is a good approximation for small couplings in the so-called free-streaming regime, but might become less suitable for larger couplings (sometimes called the trapping regime). In this part of parameter space, however, we will see in \cref{sec:cooling} that the cooling bound is controlled by the absorption rate of ALPs, and that changes of the production spectrum, e.g.~by Bose enhancement, will not affect the bound significantly.} This yields the following expression (see e.g.~\cite{Raffelt:1990yz}): \begin{equation} \begin{split} \label{eq:spectrumDefinition} \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} = \Bigg[ &\prod_i \int \frac{\mathrm{d}^3 \vec{p}_i}{(2\pi)^3 2 E_i} f_i(E_i) \Bigg] \Bigg[ \prod_{j \neq a} \int \frac{\mathrm{d}^3 \vec{p}'_j}{(2\pi)^3 2 E'_j} \left[ 1 \pm f_j(E'_j) \right] \Bigg]\\ &\times (2\pi)^4 \delta^{(4)} \Bigg( \sum_i p_i - \sum_j p'_j \Bigg) S \,\, \frac{\lvert\vec{p}'_a\rvert}{4\pi^2} \lvert \mathcal{M} \rvert^2 \, , \end{split} \end{equation} where $ \vec{p}_i, \, E_i $ are the incoming particles' momenta and energies, $ \vec{p}'_j, \, E'_j $ those of the outgoing particles including the ALP, $ f_{i,j} $ are the respective phase-space distribution functions, $ |\mathcal{M}|^2 $ is the squared matrix element summed over initial and final state polarisations, and $ S = 1/n! $ is a symmetry factor to avoid overcounting of $ n $ identical particles in the initial or the final state. The quantum statistical factor for a final state particle is $ 1 + f_j $ if $ j $ represents a boson, and $ 1 - f_j $ for a fermion. Note that the product over final state momenta does not include the ALP's phase space as $ \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} $ is a differential with respect to the ALP's energy in the plasma frame; the difference between the differentials of energy and Lorentz-invariant phase space yields the factor $ \frac{\lvert\vec{p}'_a\rvert}{4\pi^2} $. From the production spectra, the ALP emissivity $ Q $, i.e.~the energy-loss rate per unit volume, can be determined as \begin{equation} \label{eq:emissivityDefinition} Q = \int_{m_a}^{\infty} \mathrm{d} \omega \, \omega \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} \, , \end{equation} with the ALP energy $ \omega $. Note that $ Q $ in this form does not take reabsorption effects into account, see \cref{subsec:absorption} for the inclusion of those. We will use the following definitions of the Bose-Einstein and Fermi-Dirac distributions, describing the phase space densities of photons, electrons and positrons, respectively: \begin{equation*} \ensuremath{f_{\text{\scriptsize B}}}(\omega) = \frac{1}{\exp(\omega/T) - 1} \, , \qquad \ensuremath{f_{\text{\scriptsize F}}}^\mp(E) = \frac{1}{\exp[(E \mp \mu_e)/T] + 1} \, , \end{equation*} with temperature $ T $ and electron chemical potential $ \mu_e $. We assume that electrons and positrons are in chemical equilibrium and therefore the positrons have chemical potential $ -\mu_e $. \begin{figure} \centering \begin{subfigure}{\textwidth} \includegraphics[width=\textwidth]{Figures/emissivityComparisonPlot1.pdf} \end{subfigure} \vspace{-.9cm} \begin{subfigure}{\textwidth} \includegraphics[width=\textwidth]{Figures/emissivityComparisonPlot2.pdf} \end{subfigure} \caption{Comparison of ALP emissivity contributions of the four described processes for a low and a high mass, with $ \ensuremath{\hat g_{ae}} = 10^{-9} \text{ MeV}^{-1} $ in both plots. In the upper plot, $ m_a $ is below the threshold for both inverse decays and thus the emissivity of those processes is zero. The same happens in the lower plot for photon coalescence at $ r \leq 9 $~km.} \label{fig:emissivityComparisonPlot} \end{figure} \Cref{fig:emissivityComparisonPlot} anticipates the results of \crefrange{subsec:bremsstrahlung}{subsec:photonCoalescenceProduction}, and shows the emissivities of the four ALP production processes for different masses. One of the main, unexpected results of this paper is that the loop-induced Primakoff process results in the largest ALP emissivity and fluence at small radii (see \cref{subsec:PrimakoffProduction}). Other qualitative properties of the production spectra depend on the mass of the ALP. At low masses ($ m_a \lesssim 20 $~MeV), the Bremsstrahlung and Primakoff contributions dominate at all radii as inverse decays (i.e.~electron-positron fusion and photon coalescence) are suppressed, or even kinematically forbidden. At higher masses and for sufficiently large radii, the tree-level electron-positron fusion process quickly dominates as it becomes kinematically available. We now discuss, in turn, how the production spectra for Bremsstrahlung, electron-positron fusion, the Primakoff process, and photon coalescence are calculated. \subsubsection{Bremsstrahlung} \label{subsec:bremsstrahlung} Electron-ion Bremsstrahlung, shown in \cref{subfig:bremsstrahlungDiagram}, is the leading production process at tree-level for ALPs with masses $ m_{a} \lesssim 30~\text{MeV} $ in hot, degenerate plasmas \cite{Raffelt:1996wa,Lucente:2021hbp}. As the upper panel of \cref{fig:emissivityComparisonPlot} shows, in our model the contribution of the tree-level Bremsstrahlung process to the ALP emissivity is dominant at large radii, i.e.~at low temperatures, but remains non-negligible at all radii. \Cref{eq:spectrumDefinition} yields the following expression for the production spectrum of ALPs created by electron-ion Bremsstrahlung: \begin{equation}\label{eq:BremsstrahlungProduction} \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} = \frac{n_p^{\text{eff}}}{64\pi^6} \int_{-1}^1 \mathrm{d}c_{1a} \, \int_{-1}^1 \mathrm{d}c_{12} \, \int_{0}^{2\pi} \mathrm{d}\delta \, \int_{m_{e}}^{\infty} \mathrm{d}E_2 \left\lvert \mathbf{p}_1 \right\rvert \left\lvert \mathbf{p}_2 \right\rvert\left\lvert \mathbf{p}_a \right\rvert \left\lvert \mathcal{M} \right\rvert^2 \ensuremath{f_{\text{\scriptsize F}}}^-(E_1) \left(1 - \ensuremath{f_{\text{\scriptsize F}}}^-(E_2)\right) \, , \end{equation} where $ E_{1,2} $ are the incoming and outgoing electrons' energies, respectively, while the outgoing ALP has energy $ \omega $, the $ \vec{p}_i $ are the respective momenta, $ c_{1a} \, (c_{12}) $ is the cosine of the angle between the incoming electron and ALP (outgoing electron) momenta, and $ \delta $ the angle between the two planes spanned by these momentum pairs. This expression agrees with \cite{Lucente:2021hbp}. Since the ion has masses in the GeV-range, and hence does essentially not recoil when scattering with thermal electrons in a plasma with $ T \lesssim 40 $ MeV, energy conservation implies $ E_1 = \omega + E_2 $. Furthermore, we consider only free protons as target-ions, since electrons are highly degenerate in the SN core, and ALP production is most efficient at high temperature where no nuclear clustering occurs \cite{Lucente:2020whw}. Therefore, the number density of targets is the \emph{effective} number density of protons, taking their degeneracy into account \cite{Payez:2014xsa} \begin{equation}\label{eq:npEff} n_p^{\text{eff}} = 2 \int \frac{\mathrm{d}^3 p}{(2\pi)^3} f_p (1 - f_p) \, , \end{equation} which can be up to $ 60\% $ smaller than the naive number density, without the factor $ (1 - f_p) $, of free protons in SN1987A \cite{Lucente:2020whw}. The effective density $ n_p^{\text{eff}} $ factors out of the expression for the spectrum in \cref{eq:BremsstrahlungProduction} because we assume no proton recoil. The matrix element for this process, $ \left\lvert \mathcal{M} \right\rvert^2 $, averaged over the incoming and outgoing electrons' spin, can be found in the appendix of \cite{Carenza:2021osu}, where the authors use $ k_{S}^2 T = e^2 n_p^{\text{eff}} $ and include $ n_p^{\text{eff}} $ in the definition of $ \lvert \mathcal{M} \rvert^2 $, which we do not. We used FeynCalc to reproduce and check the expression, and find agreement with \cite{Carenza:2021osu}. It should be noted that references \cite{Carenza:2021osu} and \cite{Lucente:2021hbp} used the pseudoscalar interaction between ALPs and electrons and that results are stated in terms of the dimensionless coupling $ \ensuremath{g_{ae}} $. We checked that using the derivative coupling as included in \cref{eq:Lagrangian} leads to the same matrix element after the replacement $ \ensuremath{\hat g_{ae}} \to \ensuremath{g_{ae}} / (2 m_e) $. The propagation of electrons and positrons in a relativistic QED plasma is significantly different from vacuum propagation. In \cite{Lucente:2021hbp} the authors argue that for ALP production in SN1987A, it is sufficient to replace the vacuum electron mass $ m_e \simeq 511 \text{ keV} $ by an effective mass depending on temperature and chemical potential: \begin{equation} \label{eq:meEff} m_e^{\text{eff}} = \frac{m_e}{\sqrt{2}} + \sqrt{\frac{m_e^2}{2} + \frac{\alpha}{\pi}\left( \mu_e^2 + \pi^2 T^2 \right)} \, , \end{equation} which corresponds to $ \sqrt{2} m_e^\star $ in the notation of \cite{Lucente:2021hbp}. Note that this form of the effective mass is only valid for $ m_e^{\text{eff}} \gg m_e $, i.e.~large $ T $ or $ \mu $ \cite{Braaten:1992abc}, explaining why the $ T,\mu \to 0 $ limit yields $ m_e^{\text{eff}} \to \sqrt{2} m_e > m_e $. We will use this effective mass whenever we calculate the ALP-electron tree-level processes in the SN core (i.e.~Bremsstrahlung, electron-positron fusion and their respective inverses). However, in \cite{Lucente:2021hbp} it was argued that the equivalence between pseudoscalar and derivative ALP-electron couplings also holds unaltered in the plasma, but remarkably, the two different couplings only lead to the same results if the replacement $ \ensuremath{\hat g_{ae}} \to \ensuremath{g_{ae}} / (2 m_e) $ is done with the \emph{vacuum} electron mass $ m_e $. We note that, therefore, by using the derivative coupling and naively following the prescription of \cite{Lucente:2021hbp}, i.e.~replacing $ m_e \to m_e^{\text{eff}} $ everywhere, one would actually underestimate the Bremsstrahlung and electron-positron fusion rates by typically more than two orders of magnitude. We leave a further investigation of this puzzle to future work. The contribution of the Bremsstrahlung process to the ALP emissivity in SN1987A is shown in blue in \cref{fig:emissivityComparisonPlot}. \subsubsection{Electron-positron fusion} \label{subsec:eeFusionProduction} If the ALP mass is larger than twice the effective electron mass, there is a further, and usually more efficient production process at tree-level: the inverse of the ALP-to-electron decay, electron-positron fusion. The diagram is shown in \cref{subfig:electronPositronFusionDiagram}, yielding the matrix element, averaged over initial states, $ \frac{1}{4} \lvert \mathcal{M} \rvert^2 = \ensuremath{g_{ae}}^2 m_a^2 / 2 $. The resulting production spectrum can be calculated by integrating the electron and positron distribution functions over the positron energy $ E_{+} $ \begin{equation}\label{eq:electronPositronFusionSpectrum} \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} = \frac{\ensuremath{g_{ae}}^2 m_a^2}{16 \pi^3} \,\Theta(m_a - 2 m_e^{\text{eff}}) \int_{E_{\text{min}}}^{E_{\text{max}}} \mathrm{d} E_+ \, \ensuremath{f_{\text{\scriptsize F}}}^-(\omega - E_+) \ensuremath{f_{\text{\scriptsize F}}}^+(E_+) \, , \end{equation} with the ALP energy $ \omega $, energy conservation yielding $ \omega - E_{+} $ as the electron energy, and momentum conservation leading to the lower and upper integration limits \begin{equation}\label{eq:eeFusionIntegrationLimits} E_{\text{min,max}} = \frac{\omega}{2} \mp \frac{\sqrt{(\omega^2 - m_a^2)(m_a^2 - 4 (m_e^{\text{eff}})^2)}}{2 m_a} \, . \end{equation} This expression\footnote{The integral in \cref{eq:electronPositronFusionSpectrum} has an analytical solution in terms of logarithms. However, that solution yields worse results numerically due to intricate cancellations in the logarithms' argument, and we chose to evaluate the integral numerically for this work.} again agrees with \cite{Lucente:2021hbp}. Note that, as in \cite{Lucente:2021hbp}, we use the pseudoscalar coupling $ \ensuremath{g_{ae}} $ in \cref{eq:electronPositronFusionSpectrum} following our earlier arguments (see \cref{subsec:bremsstrahlung}) about the thermal modification of the ALP electron interaction in a plasma. As also discussed there, we have to use the effective, thermal electron mass $ m_e^{\text{eff}} $ defined in \cref{eq:meEff} to take the effect of the plasma on electron and positron propagation into account. We remark here that the integrand in \cref{eq:electronPositronFusionSpectrum} peaks for small $ E_{+} $ because the positrons have chemical potential $ -\mu_e $ with $ \mu_e \gg T $ and hence their distribution function is approximately $ \ensuremath{f_{\text{\scriptsize F}}}^{+}(E_{+}) \sim \exp(-E_{+} / T) $. Therefore, in this particular case it is not clear that the modification of the positrons' dispersion relation is captured well by the simple replacement $ m_e \to m_e^{\text{eff}} $, as this approximation is valid only for hard momenta $ p_{+} = \sqrt{E_{+}^2 - \left( m_e^{\text{eff}} \right)^2} \gg m_e^{\text{eff}} $ \cite{Braaten:1992abc}. In the scope of this work, we follow the literature in using the effective mass approximation for electron-positron fusion, and leave the question of how accurate the approximation is for further study. The contribution of electron-positron fusion to the ALP emissivity in SN1987A is shown in orange in \cref{fig:emissivityComparisonPlot}. In the upper plot the ALP mass is too low for electron-positron fusion to be allowed kinematically, so the production spectrum is zero. \subsubsection{Primakoff process}\label{subsec:PrimakoffProduction} One of the main phenomenological result of this paper is the accurate determination of the contribution of the loop-induced Primakoff process to ALP production in hot, dense plasmas. We find that it is in fact the leading production process for $ m_a \lesssim 20 $~MeV. In the Primakoff process, a photon converts into an ALP in the field of a charged fermion, shown in the diagram in \cref{subfig:PrimakoffDiagram}. As for Bremsstrahlung, the main target fermion is a free proton, since electrons are degenerate and almost no nuclei can form in the SN core. With our definition of the effective Primakoff ALP-photon coupling in \cref{eq:effPriCoupling} the differential cross-section of the process can be written compactly as \cite{Raffelt:1985nk} \begin{equation}\label{eq:PrimakoffDifferentialCrossSection} \frac{\mathrm{d} \sigma_{\text{P}}}{\mathrm{d} \Omega} = \left\lvert \ensuremath{g_{a\gamma}^{\text{(P)}}}(\omega, \cos \theta) \right\rvert^2 \frac{\alpha}{8\pi} \frac{p_\gamma p_a^3 (1 - \cos^2\theta)}{(p_\gamma^2 + p_a^2 - 2 p_\gamma p_a \cos\theta)(p_\gamma^2 + p_a^2 - 2 p_\gamma p_a \cos\theta + \kappa_{\text{S}}^2)} \, , \end{equation} where we have used the limit of no ion recoil again, i.e.~$ m_{\text{ion}} \to \infty $, in which case energy conservation implies that both photon and ALP have energy $ \omega = \sqrt{p_a^2 + m_a^2} = \sqrt{p_\gamma^2 + m_\gamma^2} $, with the respective momenta $ p_{a,\gamma} $, and $ \theta $ is the angle between the momentum vectors. For processes with external photons, it is important to note that in the SN plasma on-shell photons acquire an effective mass \cite{Kopf:1997mv}: \begin{equation} \label{eq:mgEff} m_\gamma = \omega_{\text{pl}} \simeq 16.3 \MeV Y_e^{1/3} \left( \frac{\rho}{10^{14} \g \cm^{-3}} \right)^{1/3} \, , \end{equation} where $ \omega_{\text{pl}} $ is the plasma frequency and $ Y_e $ the electron fraction. Furthermore, \cref{eq:PrimakoffDifferentialCrossSection} includes the screening of the Coulomb-like interaction at the Debye-Hückel scale $ \kappa_{\text{S}}^2 = e^2 n_p^{\text{eff}}/T $ \cite{Raffelt:1985nk}. The resulting ALP spectrum is \begin{equation}\label{eq:PrimakoffSpectrum} \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} = \frac{n_p^{\text{eff}}}{\pi^2} \frac{\omega^2 - m_\gamma^2}{\exp(\omega/T) - 1} \sigma_{\text{P}} \, , \end{equation} where $ \sigma_{\text{P}} $ is the total cross section, and the density of target protons factors out because of the no-recoil limit as in the case of Bremsstrahlung. Note that we cannot analytically solve the integral over $ \cos\theta $ in the definition of the total cross section since the effective coupling has a non-trivial dependence on $ \cos\theta $. Therefore, we have to evaluate the implicit integral in \cref{eq:PrimakoffSpectrum} numerically. For energies $ \omega \gg m_a, m_\gamma, m_e $ we can approximate $ \ensuremath{g_{a\gamma}^{\text{(P)}}} \simeq \frac{2\alpha}{\pi} \ensuremath{\hat g_{ae}} $, and in that case give a simple expression for the emissivity \begin{equation} Q \simeq \frac{\alpha^2 \ensuremath{\hat g_{ae}}^2}{\pi^3} \, T^7 F\left(\frac{\kappa_{\text S}^2}{4 T^2}\right) \, , \end{equation} where $ F $ is defined in \cite{Raffelt:1985nk}, slowly varying, and of order $ 10^{-2} $ to $ 10^{-1} $ for typical SN conditions. We see that the Primakoff emissivity depends strongly on the temperature, explaining why it can be the leading production process in the hot SN plasma, even though it is suppressed by a loop factor. In \cref{fig:emissivityComparisonPlot} the Primakoff contribution is shown in green. In the literature, one often finds a production rate $ \Gamma_{\text P} $, see e.g.~\cite{Raffelt:1996wa,Lucente:2020whw}, which is related to the production spectrum and the total cross section as \begin{equation}\label{eq:primakoffProdRate} \Gamma_{\text P} = \pi^2 \frac{\exp(\omega/T) - 1}{\beta_\gamma \omega^2} \, \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} = n_p^{\text{eff}} \beta_\gamma \sigma_{\text P} \, , \end{equation} with $ \beta_\gamma $ as defined in \cref{sec:gPri}. Replacing $ \ensuremath{g_{a\gamma}^{\text{(P)}}}(\omega, \cos \theta) \to \ensuremath{g_{a\gamma}} $ in \cref{eq:primakoffProdRate}, and integrating the cross section yields the same expression for $ \Gamma_{\text P} $ as in \cite{Lucente:2020whw}. \subsubsection{Photon coalescence} \label{subsec:photonCoalescenceProduction} In close analogy to the electron-positron fusion process, there is also an inverse to ALP-to-photon decay called photon coalescence with the diagram shown in \cref{subfig:photonCoalescenceDiagram}. Since in a plasma we have to treat the photons as massive with mass $ m_\gamma $, the kinematics of the process are equivalent to the electron-positron fusion case with the replacement $ m_e \to m_\gamma $. However, the averaged matrix element is slightly different $ \frac{1}{4} \lvert \mathcal{M} \rvert^2 = \frac{1}{8} \left\lvert \ensuremath{g_{a \gamma}^{\text{(D)}}} \right\rvert^2 m_a^4 (1 - 4 m_\gamma^2 / m_a^2) $, and we find the following expression for the production rate: \begin{align} \label{eq:photonCoalescenceSpectrum} \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} &= \left\lvert \ensuremath{g_{a \gamma}^{\text{(D)}}} \right\rvert^2 \frac{m_a^4}{128 \pi^3} \left(1 - \frac{4 m_\gamma^2}{m_a^2}\right) \, \Theta(m_a - 2 m_\gamma) \int_{\omega_{\text{min}}}^{\omega_{\text{max}}} \mathrm{d} \omega_1 \, \ensuremath{f_{\text{\scriptsize B}}}(\omega_1) \ensuremath{f_{\text{\scriptsize B}}}(\omega-\omega_1)\\ &\xrightarrow{\omega \gg T} \left\lvert \ensuremath{g_{a \gamma}^{\text{(D)}}} \right\rvert^2 \frac{m_a^4}{128 \pi^3} \sqrt{\omega^2 - m_a^2} \left(1 - \frac{4 m_\gamma^2}{m_a^2}\right)^{3/2} \exp\left(-\frac{\omega}{T}\right) \Theta(m_a - 2 m_\gamma) \, . \nonumber \end{align} The integration limits $ \omega_{\text{min,max}} $ are given by \cref{eq:eeFusionIntegrationLimits} with $ m_e \to m_\gamma $, and we show that in the limit $ \omega \gg T $, i.e.~if $ \ensuremath{f_{\text{\scriptsize B}}} $ is well approximated by a Boltzmann distribution, the result of \cite{Lucente:2020whw} is recovered. In the $ m_\gamma \to 0 $ limit this result also agrees with the expression found in the supplemental material of \cite{Caputo:2022mah}, which to our knowledge is the first time quantum statistics have been taken into account in the photon coalescence production rate. Therefore, \cref{eq:photonCoalescenceSpectrum} generalises both previous results by including an effective photon mass as well as the quantum distribution function for the photons. The ALP emissivity due to photon coalescence is shown in red in \cref{fig:emissivityComparisonPlot}. As is the case for electron-positron fusion, this inverse decay is kinematically only allowed when the ALP mass is large enough. In fact, in our SN model the effective photon mass is always larger than the effective electron mass (cf.~\cref{eq:meEff,eq:mgEff}), and hence, to be efficient, photon coalescence requires even larger $ m_a $ than electron-positron fusion. This can be seen in the lower plot in \cref{fig:emissivityComparisonPlot} with $ m_a = 25 $~MeV: the ALP emissivity due to photon coalescence goes to zero for radii below 9 km because there $ m_\gamma(r) > m_a / 2 $, while electron-positron fusion is possible for all radii. The production spectra calculated in this section will now be used to constrain the ALP-electron coupling via the so-called \emph{cooling bound} in \cref{sec:cooling}, and the \emph{decay bound} in \cref{sec:decay}. \section{Cooling bound} \label{sec:cooling} \begin{figure} \centering \includegraphics[width=.85\textwidth]{Figures/SNFigure.pdf} \caption{Mechanisms of the two supernova constraints for three different, exemplary ALP models $ a_i $ with couplings $ \ensuremath{\hat g_{ae}}^{(i)} $ and masses $ m_a^{(i)} $. ALPs are predominantly produced in the dark central region, with the number of arrows indicating the respective flux; note that production in the actual model is isotropic and spherically symmetric. The ALPs will subsequently be reabsorbed by the SN plasma ($ a_{2} $ and $ a_{3} $) or decay into photons or electron-positron pairs where kinematically allowed (possible for all three depicted scenarios). The typical time and length scales after which reabsorption and decay happen depend on the coupling strength and, as depicted here, weaker couplings lead to longer mean-free paths. ALP $ a_1 $ will contribute both to the decay and cooling bound, $ a_2 $ only to the cooling bound since it does not escape the SN remnant (the light region), and $ a_3 $ to neither since it is absorbed too quickly. See full text for details.} \label{fig:SNFigure} \end{figure} An illustration of the SN constraints we consider here and in \cref{sec:decay} is shown in \cref{fig:SNFigure}. In this section, we first examine how the SN plasma loses energy by ejecting ALPs, and why too much of this cooling is incompatible with observations. The relevant observation here is that SN1987A was accompanied by a 10s long neutrino burst. As suggested by Raffelt in \cite{Raffelt:1996wa}, a simple analytical estimate shows that the duration of this burst would roughly be cut in half if there was an additional energy loss channel at $t=1\, $s after the initial bounce with a luminosity as large as the one of neutrinos $ L_\nu \simeq 3 \cdot 10^{52} \frac{\erg}{\text{s}} $. As should be clear from the discussion in \cref{sec:ALPproduction}, weakly coupled ALPs provide such an additional energy loss mechanism if they can escape the SN. Therefore, we can derive a constraint on their interactions with the plasma, which we assume to be just due to $ \ensuremath{\hat g_{ae}} $, by demanding that \begin{equation} \label{eq:RaffeltCriterion} L_a < L_\nu \simeq 3 \cdot 10^{52} \frac{\erg}{\text{s}} \, . \end{equation} Before deriving the ALP luminosity in \cref{subsec:modifiedLuminosity}, we first consider in \cref{subsec:absorption} that they can also be reabsorbed by the plasma. \subsection{ALP reabsorption and opacity} \label{subsec:absorption} Due to the high temperature and large density in the supernova core, ALPs can be produced but also quickly absorbed if the coupling to electrons or photons is large enough. If this happens in the core of the SN, they do not contribute to the energy loss that is relevant for the shortening of the neutrino burst. The relevant quantity characterising the ALP absorption is the mean free path, defined as product of the (relativistic) velocity of the ALP $ \beta_a = \sqrt{1 - \left(\frac{m_a}{\omega}\right)^2} $ and its lifetime $ \tau_{\text{abs}} $, i.e.~the average time before a reabsorption event: \begin{equation}\label{eq:mfpDefinition} \lambda = \beta_a \, \tau_{\text{abs}} = \beta_a \, \Gamma_{\text{abs}}^{-1} \, , \end{equation} with the total absorption rate $ \Gamma_{\text{abs}} $. To calculate the total absorption rate, we include the inverses of all production processes mentioned above: Primakoff, Bremsstrahlung, Photon coalescence, and electron-positron fusion, where the latter two are just decays. The rates of the respective inverse processes can be calculated from the collision term, similar to \cref{eq:spectrumDefinition}, and are therefore related to the production spectra of \cref{subsec:ALPproduction} as \begin{equation}\label{eq:absorptionRateDefinition} \Gamma_{\text{abs}} = \frac{2\pi^2 \exp(\omega / T)}{\beta_a \omega^2} \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega} \, , \end{equation} where we used the following relations to convert initial and final state distribution factors into another: \begin{equation*} 1 - \ensuremath{f_{\text{\scriptsize F}}}^\mp(E) = \exp\left(\frac{E \mp \mu}{T}\right) \ensuremath{f_{\text{\scriptsize F}}}^\mp(E) \, , \qquad 1 + \ensuremath{f_{\text{\scriptsize B}}}(E) = \exp\left(\frac{E}{T}\right) \ensuremath{f_{\text{\scriptsize B}}}(E) \, . \end{equation*} These hold because we assume all particles except for the ALP to be in thermal equilibrium. Note that the rate $ \Gamma_{\text{abs}} $ does not depend on the ALPs' phase-space distribution, and therefore does not receive corrections at large couplings where interactions are more efficient and would eventually bring the ALPs into equilibrium with the plasma. In the following, we determine the mean free paths of the four relevant processes and comment on some improvements over the existing calculations in the literature -- apart from the inclusion of one-loop corrections. Using \cref{eq:mfpDefinition,eq:absorptionRateDefinition,eq:BremsstrahlungProduction}, we find that inverse Bremsstrahlung has a mean free path of \begin{equation} \begin{split} \lambda_{\text{B}}^{-1} &= \frac{n_p^{\text{eff}} \exp(\omega/T)}{32 \pi^4}\\ &\quad \times \int_{-1}^1 \mathrm{d}c_{1a} \, \int_{-1}^1 \mathrm{d}c_{12} \, \int_{0}^{2\pi} \mathrm{d}\delta \, \int_{m_{\text{e}}}^{\infty} \mathrm{d}E_2 \frac{\left\lvert \mathbf{p}_1 \right\rvert \left\lvert \mathbf{p}_2 \right\rvert}{\left\lvert \mathbf{p}_a \right\rvert} \left\lvert \mathcal{M} \right\rvert^2 \ensuremath{f_{\text{\scriptsize F}}}^{-}(\omega + E_2) \left[1 - \ensuremath{f_{\text{\scriptsize F}}}^{-}(E_2)\right] \, . \end{split} \end{equation} Note that this expression differs by a factor $ \frac{1}{\beta_a \pi} $ from the expression found in equation (31) of \cite{Lucente:2021hbp}. For the ALP-to-electron decay, we find \begin{equation} \begin{split} \Gamma_{\text{abs}}^{a \to e^+ e^-} &= \frac{\ensuremath{g_{ae}}^2 m_a^2 e^{\omega/T}}{8\pi \, \omega^2 \beta_a} \,\Theta(m_a - 2 m_e^{\text{eff}})\int_{E_{\text{min}}}^{E_{\text{max}}} \mathrm{d} E_+ \, \ensuremath{f_{\text{\scriptsize F}}}^-(\omega - E_+) \ensuremath{f_{\text{\scriptsize F}}}^+(E_+)\\ &= \frac{\ensuremath{g_{ae}}^2 m_a^2}{8\pi \, \omega^2 \beta_a} \,\Theta(m_a - 2 m_e^{\text{eff}})\int_{E_{\text{min}}}^{E_{\text{max}}} \mathrm{d} E_+ \, \left[1 - \ensuremath{f_{\text{\scriptsize F}}}^-(\omega - E_+)\right] \left[1 - \ensuremath{f_{\text{\scriptsize F}}}^+(E_+)\right]\\ &\xrightarrow{T \to 0} \gamma_a^{-1} \, \Gamma_0^{a \to e^+ e^-} \, , \end{split} \end{equation} where $ \Gamma_0^{a \to e^{+}e^{-}} $ is the usual ALP decay rate in its rest frame (see e.g.~\cite{Bauer:2017ris}), and $ \gamma_a = \frac{\omega}{m_a} $ is the Lorentz factor. As explained in \cref{subsec:eeFusionProduction}, we take quantum statistics into account, which for the ALP-to-electron decay means a suppression of the rate by Pauli blocking due to the electrons present in the plasma. In the $ T \to 0 $ limit, i.e.~when using Boltzmann statistics for the electrons, we reproduce the rate used in \cite{Lucente:2021hbp}. However, ignoring Pauli blocking in a highly degenerate plasma overestimates the decay rate severely, by up to three orders of magnitude in the inner core of the SN. In case of the inverse Primakoff effect, we find instead \begin{equation} \lambda_{\text{P}}^{-1} = 2 \, n_p^{\text{eff}} \left(\frac{\beta_\gamma}{\beta_a}\right)^2 \frac{\exp(\omega/T)}{\exp(\omega/T)-1} \, \sigma_{\text{P}} = 2 \, n_p^{\text{eff}} \left(\frac{\beta_\gamma}{\beta_a}\right)^2 \left[ 1 + \ensuremath{f_{\text{\scriptsize B}}}(\omega) \right] \, \sigma_{\text{P}} \, , \end{equation} which is slightly larger than the expression given in \cite{Lucente:2020whw} by the stimulated emission factor $ \left[ 1 + \ensuremath{f_{\text{\scriptsize B}}}(\omega) \right] $ for the final state photon. For the ALP-to-photon decay, \cref{eq:absorptionRateDefinition,eq:photonCoalescenceSpectrum} yield \begin{equation} \begin{split} \Gamma_{\text{abs}}^{a \to \gamma\gamma} &= \frac{\big\lvert \ensuremath{g_{a \gamma}^{\text{(D)}}} \big\rvert^2 m_a^2 (m_a^2 - 4 m_\gamma^2)}{64 \pi \beta_a \, \omega^2} e^{\omega/T} \, \Theta(m_a - 2 m_\gamma) \int_{\omega_{\text{min}}}^{\omega_{\text{max}}} \mathrm{d} \omega_1 \, \ensuremath{f_{\text{\scriptsize B}}}(\omega_1) \ensuremath{f_{\text{\scriptsize B}}}(\omega-\omega_1)\\ &= \frac{\big\lvert \ensuremath{g_{a \gamma}^{\text{(D)}}} \big\rvert^2 m_a^2 (m_a^2 - 4 m_\gamma^2)}{64 \pi \beta_a \, \omega^2} \Theta(m_a - 2 m_\gamma) \int_{\omega_{\text{min}}}^{\omega_{\text{max}}} \mathrm{d} \omega_1 \, \left[1 + \ensuremath{f_{\text{\scriptsize B}}}(\omega_1)\right] \left[1 + \ensuremath{f_{\text{\scriptsize B}}}(\omega-\omega_1) \right]\\ &\xrightarrow{T \to 0} \left\lvert \ensuremath{g_{a \gamma}^{\text{(D)}}} \right\rvert^2 \frac{m_a^4}{64\pi \, \omega} \left( 1 - \frac{4 m_\gamma^2}{m_a^2} \right)^{3/2} = \gamma_a^{-1} \, \Gamma_0^{a \to \gamma\gamma} \, , \end{split} \end{equation} where also here $ \Gamma_0^{a \to \gamma\gamma} $ is the decay rate in the ALP rest frame (see e.g.~\cite{Bauer:2017ris}). As in the case of the electron decay, quantum statistics influence the rate, which in this case is Bose enhanced. Here, the effect is smaller than in the case of decay into electron-positron pairs, but can still enlarge the rate by a factor of 2 for typical SN values. Ignoring bose enhancement, we reproduce the rate given in \cite{Lucente:2020whw}. \subsection{Modified luminosity criterion} \label{subsec:modifiedLuminosity} As mentioned in the beginning of this section, if the ALPs produced in SN1987A carry away enough energy from the region from which the observed neutrino burst originated -- the so-called ``neutrino sphere'' with radius $ R_\nu $ -- the duration of this burst would shorten. Thus, the ALP has to couple either weakly enough so that no relevant abundance is produced in the SN, or so strongly that most of the emitted ALPs are reabsorbed by the plasma before they leave the SN core. To implement this bound, we follow the procedure of \cite{Chang:2016ntp}, which was adopted to ALPs in \cite{Chang:2018rso,Ertas:2020xcc,Lucente:2020whw,Lucente:2021hbp}: we integrate the energy carried away by ALPs from the neutrino sphere with radius $ R_\nu $, which are not reabsorbed before they reach the neutrino gain radius $ R_{\text{far}} $ \cite{Lucente:2020whw} (see \cref{fig:SNFigure} for an illustration of these radii). If an ALP's energy is deposited back into the plasma before it reaches $ R_{\text{far}} $, the energy could be converted into neutrinos since they are still produced efficiently in this region. Hence, the energy deposited into such an ALP does not shorten the neutrino burst and should not be included in \cref{eq:RaffeltCriterion}. The \emph{modified luminosity} $ L_a $ is the relevant quantity in this inequality; it is the cooling power of ALPs that cannot be efficiently reconverted into neutrinos.\footnote{In terms of the models illustrated in \cref{fig:SNFigure}: while scenario $ a_3 $ naively has the largest ALP emissivity as defined in \cref{eq:emissivityDefinition}, those ALPs are mostly reabsorbed in the sphere with radius $ R_{\text{far}} $ and hence do not contribute significantly to the modified luminosity. The ALPs in model $ a_2 $ on the other hand can lead to a shortening of the neutrino burst, while $ a_1 $ does escape even the progenitor star remnant, but could be too weakly coupled to shorten the neutrino burst.} The modified luminosity can be calculated as the following integral over the neutrino sphere and the ALP energy, including the absorption factor $ \exp\left[-\tau(r, \omega)\right] $ where $ \tau $ is the ALP's ``optical depth'' \cite{Chang:2016ntp}: \begin{equation}\label{eq:luminosityDefinition} L_a = \int_0^{R_\nu} \mathrm{d} r \, 4\pi r^2 \int_{m_a}^{\infty} \mathrm{d} \omega \, \omega \, \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega}(r,\omega) \cdot e^{-\tau(r, \omega)} \, , \end{equation} where we fix $ R_\nu = 21 $~km and $ R_{\text{far}} = 24 $~km following \cite{Lucente:2021hbp}. The optical depth is an integral over the total inverse mean free path\footnote{In appendix A of \cite{Chang:2016ntp} and the adaption in \cite{Lucente:2020whw}, a pre-factor $ \left(1 - \frac{r (r-R_{\text{c}})}{2 R_\nu^2}\right) $ was added to account for trajectories of ALPs that are not exactly radially outward directed. However, as remarked in \cite{Caputo:2021rux}, the factor does not increase monotonically -- as one would expect due to the increasingly long inward trajectories an ALP can take, which should of course \emph{increase} the optical depth. Instead, the prefactor increases only up until $ r = R_c / 2 \simeq R_\nu / 4 $, and then decreases even below 1 for $ r \leq R_c \simeq R_\nu / 2 $ leading to an underestimation of the optical depth. Therefore, we neglect this factor in \cref{eq:tau}.} \begin{equation}\label{eq:tau} \tau(r, \omega) = \int_r^{R_{\text{far}}} \frac{\mathrm d \tilde r}{\lambda_{\text{total}}(\tilde r, \omega)} \, . \end{equation} We improve on the treatment of absorption in \cite{Lucente:2020whw} by integrating over the energy dependent optical depth in \cref{eq:luminosityDefinition} instead of approximating $ \tau(r, \omega) \simeq \tau(r, \langle \omega \rangle) $ in the integral, where $ \langle \omega \rangle $ is the average ALP energy (cf.~\cite{Ertas:2020xcc,Lucente:2021hbp}). We get the cooling bound on the ALP-electron coupling by demanding that the modified luminosity in ALPs should not be larger than the luminosity in neutrinos $ L_a < L_\nu \simeq 3 \times 10^{52} \text{erg} \text{ s}^{-1} $ \cite{Chang:2016ntp}. The resulting exclusion region is shown in \cref{fig:coolingAndDecayBound}. The upper boundary of this region lies in the so-called trapping regime: the ALPs are so strongly coupled that most of them are absorbed before they can escape the gain radius $ R_{\text{far}} $, decreasing the modified luminosity exponentially with increasing coupling. For large masses $ m_a \gtrsim 2 $~MeV, the dominating absorption processes are decays, mostly into electron-positron pairs, which become more efficient the heavier the ALP is. Therefore, we see that the upper end of the exclusion region decreases at larger masses. At very large masses $ m_a \gtrsim 250 $~MeV, Boltzmann suppression of the ALP production cuts off the bound as the ALPs become to heavy to be produced in a plasma with $ T \sim 30 $~MeV. Near the lower boundary of the exclusion region, the ALPs can free-stream out of the SN plasma without relevant absorption events. Here, the constraint is determined only by the production spectra of ALPs. As we have seen in \cref{sec:ALPproduction}, the production is dominated by the Primakoff process for masses of $ m_a \lesssim 20 $~MeV, while for heavier ALPs the inverse decays are more efficient. For comparison, we show the cooling bound that would result from only the tree-level ALP-electron interactions as dashed white boundary in \cref{fig:coolingAndDecayBound}. For masses $ m_a < 20 $~MeV there is an improvement of up to a factor of 2.4 in the free-streaming regime, i.e.~at small couplings. In this part of parameter space, the Primakoff process contributes around as much to ALP production as Bremsstrahlung, see also \cref{fig:emissivityComparisonPlot}. In the trapping regime, i.e.~for large couplings, the loop-level processes seem not to contribute significantly to the modified luminosity. We also include the bound of \cite{Lucente:2021hbp} in \cref{fig:coolingAndDecayBound} in black for reference.\footnote{We thank Pierluca Carenza for helpful discussions and for providing some code of \cite{Carenza:2021osu} for easy cross-checks.} This bound is the equivalent of the white tree-level bound calculated here. The discrepancy at large masses is due to Pauli blocking, which as we discussed in \cref{subsec:absorption} strongly suppresses the decay of ALPs to electron-positron pairs, and which was not taken into account in \cite{Lucente:2021hbp}. At small masses, the inverse Bremsstrahlung absorption process was significantly overestimated in that reference. \begin{figure}[t] \centering \includegraphics[width=\textwidth]{Figures/coolingAndDecayBound.pdf} \caption{Bounds on the ALP-electron coupling from anomalous cooling with only tree-level ALP-electron interactions (dashed white line), and including also the loop-induced ALP-photon interactions (red region), see \cref{sec:cooling}. Our bounds can be compared with the existing tree-level cooling bound from \cite{Lucente:2021hbp} (black line). Bounds from the decay into gamma-ray photons (orange region), see \cref{sec:decay}.} \label{fig:coolingAndDecayBound} \end{figure} \section{Decay bound} \label{sec:decay} Apart from the indirect bound on ALPs as extra cooling channel of the SN core, one can also infer a bound directly from the non-observation of gamma-rays in the energy band $ 25 - 100$~MeV after the explosion. Since the ALPs produced in the SN core via the processes studied in \cref{subsec:ALPproduction} typically have energies in this range, and can decay into photons after they leave the plasma, a certain number of gamma-ray photons should have been observed by the gamma-ray spectrometer (GRS) on board of the Solar Maximum Mission (SMM) satellite. Even though the GRS was directed towards the sun when the neutrino burst of SN1987A was observed on earth, gamma-rays from the direction of SN1987A would have hit the satellite on the side, would have penetrated the shielding, and thus still reached the detector \cite{Chupp:1989kx}. The GRS was taking data for 223 seconds after arrival of the initial neutrino burst, but went into calibration mode afterwards. One can put a bound on the number of ALPs produced in the SN since no excess gamma-rays were observed during this time \cite{Chupp:1989kx}. This bound has been considered before, most recently in \cite{Jaeckel:2017tud} where a tree-level coupling of ALPs and photons was assumed, and in \cite{Caputo:2021rux} where couplings to muons were considered at tree-level. As opposed to the cooling bound, there is no tree-level analog here for ALPs only coupled to electrons: while they can be produced in significant amounts as we have seen, at tree-level they can only decay into electrons and positrons after leaving the SN plasma. Although charged particles are not expected to reach earth, their interaction with e.g.~CMB photons or the extragalactic background light, could potentially still lead to the production of photons with $25-100$~MeV energies. These secondary processes would require a dedicated analysis. Here we will only consider the photons that result from the the decay of the ALP outside the SN via the loop process. \begin{figure}[t] \centering \includegraphics[width=.77\textwidth]{Figures/decayGeometry.pdf} \caption{Geometry of the ALP decay into a gamma-ray photon reaching earth. The ALP travels a distance $ L $ before it decays into a photon under an angle $ \alpha $. The photon travels a distance $ L_\gamma $ before it reaches the detector under an angle $ \theta $. The number of ALPs reaching the detector on the side opposite to the SN is negligible (see text) so that $ \cos \theta > 0 $, while the angles are only part of a triangle as shown if $ \cos \theta > \cos \alpha $.} \label{fig:decayGeometry} \end{figure} The quantity we can ultimately compare to observations is $ F_\gamma $, the fluence\footnote{The fluence is the total number of photons arriving at the detector per unit of surface area.} of gamma-ray photons with energies between 25 and 100 MeV arriving at SMM in a time-window of $ \Delta t_{\text{max}} = 223s $ after the initial neutrino burst was detected. The source of $ F_\gamma $ is the ALP fluence outside of the supernova plasma. However, considering only the fluence of the source is not a good estimate for $ F_\gamma $, not even for its order of magnitude. We have to take into account several factors yielding the probability of a given ALP to decay into a photon \emph{and} for this photon to be observed by the detector. This probability distribution depends on three variables: the energy of the ALP $ \omega $, the cosine of the angle under which the ALP decays into photons $ c_\alpha \equiv \cos \alpha $, and the distance the ALP travels before it decays $ L $. Following a very similar discussion for neutrinos in \cite{Jaffe:1995sw}, we can write the differential fluence of gamma-ray photons as \begin{equation}\label{eq:fluenceDefinition} \mathrm{d} F_\gamma = 2 \cdot \mathrm{BR}_{a \to \gamma\gamma} \cdot \frac{\mathrm{d}N/\mathrm{d}\omega}{4\pi \, d_{\text{SN}}^2} \mathrm{d} \omega \cdot f_{c_\alpha}(\omega, c_\alpha) \, \mathrm{d}c_\alpha \cdot \frac{\exp[-L/l_a(\omega)]}{l_a(\omega)} \mathrm{d}L \cdot \Theta_{\text{cons.}}(\omega, c_\alpha, L) \, , \end{equation} where the factors, in order, are \begin{enumerate} \item The number of photons produced per decay. \item The probability to decay into a pair of photons (instead of electrons), i.e.~the branching ratio. This is a constant for a given ALP mass and electron coupling. \item The spectral fluence of ALPs resulting from an isotropic production spectrum at a radius $ d_{\text{SN}} $ away from the supernova, where $ d_{\text{SN}} = 51.4 \text{ kpc} $ is the distance between supernova and earth. We can calculate this factor using the production spectra in \cref{subsec:ALPproduction}: \begin{equation} \frac{\mathrm{d} N}{\mathrm{d}\omega}(\omega) = \int_0^{R_{\text{max}}} \mathrm{d} r \, 4\pi \, r^2 \int_{t_{\text{min}}}^{t_{\text{max}}} \mathrm{d}t \, \frac{\mathrm{d}^2 n}{\mathrm{d}t \, \mathrm{d}\omega}(r,t,\omega) \, . \end{equation} For practicality, we cut the radial integral off at $ R_{\text{max}} = 50\km $ since the contribution from high radii and therefore small temperatures and densities is negligible, and we cut the time integral off at $ t_{\text{min}} = 0.5\s $ since our SN profiles are not smooth before that time. Furthermore, we follow \cite{Jaeckel:2017tud} and approximate the production of ALPs as instantaneous by integrating the production spectrum from $ t_{\text{min}} $ to $ t_{\text{max}} = 13.3 $ s and thus neglecting the dependence of $ \mathrm{d}N/\mathrm{d}\omega $ on the delay time $ \Delta t $. Note that absorption does not play a role for the decay bound because the relevant couplings are smaller than in the cooling bound, i.e. the optical depth is negligible. \item The distribution of the angle $ \alpha $ between the ALP and photon momentum in the decay process (see \cref{fig:decayGeometry}): \begin{equation} f_{c_\alpha}(\omega,c_\alpha) = \frac{m_a^2}{2\omega^2 \left( 1 - c_\alpha \beta_a \right)^2} \, . \end{equation} Note that this is a flat distribution in the ALP's rest frame, Lorentz transformed into the frame where the ALP has energy $ \omega $. \item The probability for the ALP to decay at a distance $ L $ to $ L + \mathrm{d} L $ from the SN, where according to \cref{eq:mfpDefinition} the decay length of the ALP is \begin{equation} l_a(\omega) = \frac{\beta_a \gamma_a}{\Gamma_0^{a\to\gamma\gamma} + \Gamma_0^{a\to e^+e^-}} \, , \end{equation} with the rest-frame decay rates $ \Gamma_0 $ (see e.g.~\cite{Bauer:2017ris}). We do not have to take into account any statistical effects like Pauli blocking or stimulated emission here, since we are interested in the case where the ALP decays after it has left the SN plasma in order for the photons to reach earth. \item The constraints we have to put on $ \omega, \, c_\alpha, \, L $, since the produced photons are detected only if a) the photon energy is in the range of the detector, b) the photon arrives on the side of the detector facing the SN,\footnote{We follow \cite{Jaeckel:2017tud} and assume that no gamma-rays arrive at the side of the detector pointing away from the SN. For low masses, this is justified for the same reason as in \cite{Jaeckel:2017tud,Oberauer:1993yr} because the decay angle distribution $ f_{c_\alpha} $ is highly peaked in the forward direction, and hence $ \theta $ in \cref{fig:decayGeometry} is small. For heavy ALPs with $ m_a > 2 m_e $ coupled to electrons, the decay channel $ a \to e^{+} e^{-} $ opens up strongly suppressing the decay length of the ALP, which for $ m_a > 1 $~MeV is always below $ d_{\text{SN}} $ in the parameter range of interest. With a short $ L $, \cref{fig:decayGeometry} again shows that $ \theta $ has to be small.} c) the photon arrives no later than 223 s after the initial neutrino burst, d) it is geometrically possible for the photon to reach earth given the values of $ m_a, \, \omega, \, c_\alpha, \, L $ (see \cref{fig:decayGeometry}), e) the ALP decays beyond the plasma surrounding the SN (so that the photons are not reabsorbed) which extends up to $ R_\star \simeq 3 \cdot 10^{7} $~km \cite{Payez:2014xsa}. This can be expressed as \begin{equation} \begin{split} \Theta_{\text{cons.}}(\omega, c_\alpha, L) &= \Theta(100 \MeV - \omega_\gamma(\omega, c_\alpha)) \Theta(\omega_\gamma(\omega, c_\alpha) - 25 \MeV)\\ &\quad \times \Theta(c_\theta(c_\alpha, L)) \Theta(223\s - \Delta t(\omega, c_\alpha, L))\\ &\quad \times \Theta(c_\theta(c_\alpha, L) - c_\alpha) \Theta(L - R_\star) \, , \end{split} \end{equation} where $ \Theta $ is the Heaviside function. From the decay kinematics we get, for a given $ c_\alpha $, the photon energy \begin{equation} \omega_\gamma(\omega, c_\alpha) = \frac{m_a^2}{2\omega \left( 1 - c_\alpha \beta_a \right)^2} \, , \end{equation} while from the laws of sine and cosine applied to the triangle in \cref{fig:decayGeometry} we have \begin{equation} \label{eq:decayGeometry} c_\theta(c_\alpha, L) = \frac{L_\gamma^2 + d_{\text{SN}}^2 - L^2}{2 L_\gamma d_{\text{SN}}}, \quad \text{with } \, L_\gamma = L \left( \sqrt{\frac{d_{\text{SN}}^2}{L^2} - 1 + c_\alpha^2} - c_\alpha \right) \, . \end{equation} And finally, the time delay of the decay photon is \begin{equation} \Delta t (\omega, c_\alpha, L) = \frac{L}{\beta_a} + L_\gamma - d_{\text{SN}} \, , \end{equation} taking into account that the ALP travels at a finite speed $ \beta_a < 1 $. \end{enumerate} For a tree-level ALP-photon coupling and including ALP masses larger than the SN temperature, the most up-to-date calculation of $ F_\gamma $ was done in \cite{Jaeckel:2017tud}. The authors used the fit of the ALP spectrum $ \frac{\mathrm{d} N}{\mathrm{d} \omega} $ of \cite{Payez:2014xsa}, which considered ultra-light ALPs, and hence the fit does not include the $ m_a $-suppression of the Primakoff effect, nor the additional production channel of photon coalescence. In \cite{Jaeckel:2017tud} the mass suppression is approximated as the ratio of the cross-sections $ \sigma(m_a) / \sigma(0) $. Here, we can improve on this by using the results of \cref{sec:ALPproduction}, i.e.~we calculate the full ALP spectrum including all relevant processes and mass dependent rates. Furthermore, the escape of ALPs from the SN and their conversion to gamma-rays is treated in \cite{Jaeckel:2017tud} by a Monte Carlo simulation, while we evaluate the analytical expression in \cref{eq:fluenceDefinition} directly. We have checked that using the ALP spectrum of \cite{Payez:2014xsa}, we can reproduce the bound of \cite{Jaeckel:2017tud} on a tree-level $ \ensuremath{g_{a\gamma}} $ to an accuracy of $ \mathcal{O}(10\%) $ at $ m_a \lesssim 125 $~MeV; however, at larger masses their bound seems to stop rather abruptly, while with \cref{eq:fluenceDefinition} we can extend the bound to $ m_a \lesssim 220 $~MeV. In the limit $ L \ll d_{\text{SN}} $, i.e.~when almost all decays happen close to the SN, and when additionally the ALPs are relativistic, the geometrical relations in \cref{eq:decayGeometry} simplify, the integral over $ c_\alpha $ in \cref{eq:fluenceDefinition} can be performed, and we reproduce the result of \cite{Oberauer:1993yr}, which is also used in \cite{Caputo:2021rux}. For low masses ($ m_a \ll 1 $~MeV) and a tree-level ALP-photon coupling,\footnote{The pseudoscalar ALP-muon interaction considered primarily in \cite{Caputo:2021rux} yields an essentially constant effective ALP-photon coupling for $ m_a \ll m_\mu $ at one-loop, which can therefore be treated as a tree-level coupling.} the ALPs are relativistic and $ L \ll d_{\text{SN}} $ is indeed a good approximation. In our case, however, $ \ensuremath{g_{a \gamma}^{\text{(D)}}} \sim m_a^2 / m_e^2 $ at low masses and thus the decay length is usually longer than the distance between SN and earth. Therefore, we cannot follow the simplifications done in \cite{Oberauer:1993yr,Caputo:2021rux}, even for low ALP masses. For $ m_a > 2 m_e $, the $ a \to e^{-} e^{+} $ decay channel opens up, and the decay length suddenly decreases below $ d_{\text{SN}} $, as long as $ \ensuremath{\hat g_{ae}} \gtrsim 10^{-15} $~MeV. Note that above the decay threshold the branching ratio for decays into photons suddenly decreases; the combined effects counteract each other and the resulting gamma-ray fluence is relatively continuous around $ m_a \simeq 1 $~MeV. Following \cite{Jaeckel:2017tud}, we use the statistical 3-$\sigma$ limit on background fluctuations of the gamma-ray fluence, $ F_\gamma < 1.78 \, \cm^{-2} $, as an upper bound on the ALP-induced fluence. Evaluating \cref{eq:fluenceDefinition} numerically, we obtain the `decay bound' on $ \ensuremath{\hat g_{ae}} $ shown in orange in \cref{fig:coolingAndDecayBound}. \section{Comparison with other bounds on \texorpdfstring{$\ensuremath{\hat g_{ae}}$}{g\_ae}} \label{sec: Comparison with other bounds} Cosmological data (from the CMB and BBN) and laboratory experiments can probe $ \ensuremath{\hat g_{ae}} $ in the mass range $m_a \gtrsim 0.01$~MeV, and provide constraints that are complementary to those from SN1987A. In \cite{Ferreira:2022egk}, we showed that the loop-induced ALP-photon coupling $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ has significant impact on the viability of direct detection searches for ALP dark matter coupled to electrons. In this section, we conservatively assume a vanishing initial, cosmic abundance of ALPs at temperatures around 10 GeV \cite{Depta:2020zbh}. We derive new limits and summarise existing bounds on ALPs that couple to electrons. We first give an overview of the most competitive laboratory and cosmological bounds on $\ensuremath{\hat g_{ae}}$. Then, from the current bounds on $\ensuremath{g_{a \gamma}^{\text{(D)}}}$, we derive new constraints on $ \ensuremath{\hat g_{ae}} $ using the relation between the two couplings in \cref{eq:decayCoupling}. A summary plot with all the constraints is given in \cref{fig:Constraints on gae}. New constraints on the $\ensuremath{\hat g_{ae}}-m_a$ parameter space derived in this work are shown in the orange and red for the supernovae constraints, and in shades of green for our cosmological constraints. Limits already present in the literature are shown in blue shades. We finish this section with a comparison between the different bounds and a discussion of their model independence. \begin{figure} \centering \includegraphics[width=\linewidth]{combplwoDM.pdf} \caption{Compilation of laboratory, astrophysical and cosmological bounds on $\ensuremath{\hat g_{ae}}$. The bounds derived in this work are the SN bounds in orange and red, and the cosmological bounds in green. The remaining bounds (blue) were taken from \cite{Ghosh:2020vti,VanTilburg:2020jvl,Aguilar-Arevalo:2021wjq,Darme:2020sjf,NA64:2020qwq,Essig:2010gu,Depta:2020zbh} (see main text for more details). Note that $ \ensuremath{\hat g_{ae}} $ in units of $ \MeV^{-1} $ is approximately equal to $ \ensuremath{g_{ae}} $, see \cref{footnote:gaeEquivalence} on \cpageref{footnote:gaeEquivalence}.} \label{fig:Constraints on gae} \end{figure} \subsection*{Laboratory bounds} The most competitive laboratory bounds on $\ensuremath{\hat g_{ae}}$ for ALP masses between $0.01-300$~MeV are: \begin{itemize} \item \textit{Xenon 1T:} The underground Xenon1T detector is sensitive to the local density of weakly interacting particles coupled to electrons \cite{XENON:2019gfn,XENON:2020rca}. Massive ALPs produced in the sun via the $\ensuremath{\hat g_{ae}}$ coupling can accumulate in gravitationally bound orbits around the sun and yield a density that can be constrained with Xenon 1T \cite{VanTilburg:2020jvl}. \item \textit{Tantalum target:} The authors of \cite{Bechis:1979kp} reported the data analysis of a $45$ MeV electron beam hitting a tantalum target. ALPs produced by electron Bremsstrahlung could decay into electrons and positrons and be detected by the Sodium crystals. We report the bound on $\ensuremath{\hat g_{ae}}$ obtained in \cite{Aguilar-Arevalo:2021wjq}. \item \textit{Beam Dumps}: Searches for neutral particles produced by electron/proton beams that decayed into electron-positron pairs or led to missing energy: \begin{itemize}[noitemsep,topsep=0pt,leftmargin=15pt] \item{\textit{Babar}:} Data collected from the Babar experiment ($e^+e^-$ collider) at the PEP-II B-factory \cite{BaBar:2017tiz}. We report the constraint on $\ensuremath{\hat g_{ae}}$ from the analysis in \cite{Darme:2020sjf}. \item{\textit{NA64}:} 100 GeV electron beam at CERN SPS H4 \cite{NA64:2020qwq}. The analysis was extended to ALP-electron couplings in \cite{Darme:2020sjf}. \item{\textit{E137}: 20 GeV electron beam at SLAC \cite{Bjorken:1988as,Essig:2010gu}}. \end{itemize} \end{itemize} \subsection*{Cosmological bounds} We now turn to bounds on $\ensuremath{\hat g_{ae}}$ obtained from cosmological data. ALPs will inevitably be produced in the primordial plasma via their coupling to electrons or the (loop-induced) coupling to photons. Therefore, even if their initial abundance, here considered to be at temperatures around $10$~GeV \cite{Depta:2020zbh}, is negligible, they can affect cosmological observables in several ways. We will separate the discussion in two parts depending on whether the ALPs are produced in the primordial plasma mostly via scatterings with electrons or via inverse decays of electron-positron pairs or photons. \vspace{0.2cm} \textit{Production via scatterings:} ALPs described by \cref{eq:Lagrangian} can be produced in the primordial plasma via electron-positron ($e^-e^+\to a\, \gamma$) and Compton ($e^\pm \gamma\to a\,e^\pm$) scatterings at a rate proportional to $\ensuremath{\hat g_{ae}}^2$. At the time of big bang nucleosynthesis (BBN), the resulting ALP abundance will contribute to the effective number of relativistic degrees of freedom, $N_{\text{eff}}$, that is well constrained during that epoch to be $N_{\text{eff}}^\text{BBN}<3.43$ at 95\% C.L. \cite{Fields:2019pfx}. In order to derive a constraint on $\ensuremath{\hat g_{ae}}$ from the bound on $N_{\text{eff}}$, we computed the scattering cross-sections for massive ALPs (see \cref{app: Cross-sections}). We then performed the thermal average and solved the Boltzmann equation for the ALP abundance following the steps described in \cite{Ferreira:2018vjj,DEramo:2018vss}. We stopped the Boltzmann equation at neutrino decoupling ($T \simeq 2$ MeV) and translated the ALP abundance into $N_{\text{eff}}^{\text{BBN}}$ (see \cite{Ferreira:2018vjj,DEramo:2018vss} for more details). Imposing the observational bound on $N_{\text{eff}}^{\text{BBN}}$ yields the blue region labelled BBN $(N_{\text{eff}})$ in \cref{fig:Constraints on gae}. Our results are in good agreement with those obtained in \cite{Ghosh:2020vti}. Note that we restricted ourselves to the range $m_a<2m_e$: for heavier ALPs the production via inverse decays is more efficient and the discussion in the next paragraph holds. \vspace{0.2cm} \textit{Production via inverse decays:} ALPs that decay to Standard Model particles after BBN can: \emph{i)} photodisintegrate light nuclei and affect their primordial abundances \cite{Kawasaki:2017bqm,Depta:2020zbh}; \emph{ii)} heat the plasma after neutrinos have decoupled thus effectively decreasing $N_{\text{eff}}$ at the time of CMB formation \cite{Depta:2020zbh}. A recent analysis constrained the decay rate of ALPs to electron-positron pairs, using the Planck constraint on $N_{\text{eff}}$, and to photons, using the Planck constraint on $N_{\text{eff}}$ and the measurements of primordial abundances \cite{Depta:2020zbh}. The former can be directly translated into constraints on $\ensuremath{\hat g_{ae}}$ (dark green region labelled CMB $(N_{\text{eff}})$ in \cref{fig:Constraints on gae}). For the latter, even if the ALPs do not couple at tree-level to photons, they can decay via an electron-loop with the effective coupling $ \ensuremath{g_{a \gamma}^{\text{(D)}}} \sim \ensuremath{\hat g_{ae}} $ as in \cref{eq:decayCoupling}. Therefore, the Planck constraints on ALP-to-photon decays derived in \cite{Depta:2020zbh} also put new bounds on $ \ensuremath{\hat g_{ae}} $.\footnote{Note that we have only considered the loop-induced processes: ALP production via photon coalescence and ALP decay to two photons. For $m_a>2m_e$, the ALP production via electron-positron fusion will further increase the ALP abundance at BBN, but the possibility for the ALPs to decay into electron-positron pairs will also suppress the branching ratio for ALP decays into photons after BBN. A dedicated analysis of the combined effect is however beyond the scope of this work.}. The excluded regions are shown in \cref{fig:Constraints on gae} in light and dark green, labelled BBN and CMB $(N_{\text{eff}})$ depending, respectively, on whether the constraints on $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ come from measurements of the primordial abundances of light nuclei or from the Planck constraint on $N_{\text{eff}}$. For larger masses and smaller couplings, the production of ALPs is less efficient so there is a smaller ALP abundance after BBN. Nevertheless, for ALP masses above twice the threshold to disintegrate deuterium ($m_a>4.4$~MeV) and Helium-4 ($m_a>39.6$~MeV), the photons resulting from ALP decays can still significantly affect the abundance of deuterium thus giving rise to the two green exclusion islands in \cref{fig:Constraints on gae}. Note that if an initial ALP abundance is assumed stronger bounds can be derived \cite{Cadamuro:2011fd,Depta:2020zbh}. \subsection*{Discussion of the bounds obtained} \Cref{fig:Constraints on gae} summarises the three different types of constraints on $\ensuremath{\hat g_{ae}}$ that we have discussed in this paper: the SN bounds derived in \cref{sec:cooling,sec:decay} (in red and orange); the cosmological bounds derived in this work and described in the previous paragraphs (in the two shades of green); and the laboratory and cosmological bounds that were already present in the literature and also listed in the beginning of this section (in blue shades). We will now compare the different bounds, and then discuss the model dependence of the SN bounds. The analysis in \cite{VanTilburg:2020jvl}, that used the data collected by the Xenon 1T collaboration \cite{XENON:2019gfn,XENON:2020rca}, provides the strongest constraint on $\ensuremath{\hat g_{ae}}$ for ALP masses not far from the solar temperature ($m_a<30$~keV). The remaining laboratory bounds \cite{Aguilar-Arevalo:2021wjq,Darme:2020sjf,Essig:2010gu} provide competitive constraints on $\ensuremath{\hat g_{ae}}$ for $m_a>2m_e$ and exclude, in some regions, couplings larger than $\ensuremath{\hat g_{ae}} \gtrsim 4 \times 10^{-8}$. The region constrained by ALP production from electron scatterings (region labelled BBN ($N_{\text{eff}}$), see also \cite{Ghosh:2020vti}) is competitive with the SN cooling bound for $m_a<2m_e$, however, it extends to much larger couplings. At those masses, larger couplings are further excluded by the possibility of decay to photons via \cref{eq:decayCoupling} (regions labelled CMB ($N_{\text{eff}}$) and BBN). The region excluded by BBN also includes two islands at masses around $m_a \simeq 4-25$ and $m_a \simeq 40-110$ MeV and smaller values of the couplings, down to $\ensuremath{\hat g_{ae}}\simeq 10^{-14}$. Finally, the SN cooling and decay bounds derived in \cref{sec:cooling,sec:decay} constrain unique regions of parameter space, $m_a \simeq 2-250$ MeV and $m_a \simeq 0.03-300$ MeV, respectively, that span roughly four (two) orders of magnitude in the coupling in the case of the cooling (decay) bound. \vspace{0.2cm} In our analysis, we isolated the physical effects originating from the ALP-electron coupling and so neglected other possible signals that do not depend on $\ensuremath{\hat g_{ae}}$. However, in many ALP models the presence of couplings to other standard model fields or to a dark sector is expected. Therefore, it is instructive to discuss the model dependence of the SN bounds on $\ensuremath{\hat g_{ae}}$ derived in \cref{sec:cooling,sec:decay} (c.f.~\cref{fig:coolingAndDecayBound}). Additional couplings of the ALP to particles in the core of the SN (e.g.~tree-level couplings to photons or nucleons) can have two different effects. First, they will make the production of ALPs more efficient. Therefore, the lower limit of the cooling bound derived in this work is conservative and generically model independent. Second, they will also make it harder for the ALPs that are produced to escape the SN. This will tend to decrease the upper limit of the cooling bound, the so-called trapping region. Conversely, the upper limit of the cooling bound will tend to increase if there are couplings that allow the luminosity stored in the ALPs to be converted into a dark sector before the ALP gets re-absorbed in the SN core. For the decay bound, additional couplings to particles heavier than the ALP (e.g.~nucleons) will only improve the constraint since more ALPs can be produced, but the decay length and the $ a \to \gamma \gamma $ branching ratio in \cref{sec:decay} will not change. If, on the other hand, these particles are so light that the decay length of the ALP or the branching ratio of photon-decays will decrease, the upper end of the decay bound will be moved down to smaller couplings. \section{Conclusion} In this section, we conclude by summarising the main results obtained in this work, and by indicating a few directions for future research. \subsection{Summary of results} The most important result of this work is that the effective ALP-photon coupling at one loop, $\ensuremath{g_{a\gamma}^{\text{eff}}}$, is process-dependent (cf.~\cref{eq:effCouplingDefinition}). In the previous literature, the on-shell limit of this effective coupling, $\ensuremath{g_{a \gamma}^{\text{(D)}}}$, has been broadly used. While $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ is appropriate for e.g.~the radiative decay of ALPs into photons, it is not the correct coupling for processes involving one or more off-shell particles. For example, the Primakoff process involves one internal, off-shell photon and leads to an effective coupling, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$, that differs qualitatively and quantitatively from $\ensuremath{g_{a \gamma}^{\text{(D)}}}$. While $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ goes to zero as $m_a\to 0$, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ remains finite. While $\ensuremath{g_{a \gamma}^{\text{(D)}}}$ is momentum independent, $\ensuremath{g_{a\gamma}^{\text{(P)}}}$ depends on the Mandelstam $t$ variable. The difference between the couplings becomes particularly pronounced in hot and dense environments, such as that of a supernova. Using a state-of-the-art supernova model \cite{Fischer:2021jfm}, we have shown that quantum loops have strong implications for the predictions of ALP theories. There are new channels for ALP production at one loop (Primakoff and photon coalescence), and we showed that, due to the large temperature in the supernova core, these channels can be as efficient as the previously studied tree-level channels for ALP production. In a region of the parameter space, the ALPs can escape the supernova and carry substantial amounts of energy away from it. This excess cooling can be constrained using the duration of the neutrino burst from SN1987A \cite{Raffelt:1996wa}. We use this method to place a `cooling bound' on $\ensuremath{\hat g_{ae}}$, that incorporates both tree-level and loop-level interactions. Finally, we derive a `decay bound' on $\ensuremath{\hat g_{ae}}$ by including the one-loop decay into photons, which can be constrained by the absence of a gamma-ray burst associated with SN1987A \cite{Jaeckel:2017tud}. Moreover, we have shown that one-loop processes lead to strong limits on $\ensuremath{\hat g_{ae}}$ by considering cosmological limits from the CMB and BBN, in particular on the primordial abundance of light elements. In sum, the constraints derived in this work are the leading constraints on the ALP-electron coupling in most of the mass range $ 0.03 \text{ MeV} < m_a < 310 \text{ MeV} $. Finally, we have also corrected and improved some technical aspects in the literature, such as including quantum statistics in the absorption processes in \cref{subsec:absorption}, which is important in the hot and degenerate supernova core, or improving the analysis of the probability of photon detection from ALP decays in \cref{sec:decay}. \subsection{Outlook} \label{subsec:outlook} There are several possible interesting extensions of this work. With the formulas for the differential fluence of gamma-rays in \cref{eq:fluenceDefinition}, and the calculations of the ALP production spectra for photon coalescence and the Primakoff effect (with $ m_a >0 $) we can derive the `decay bound' of \cref{sec:decay} for an ALP with tree-level couplings to photons. This would amount to an update of \cite{Jaeckel:2017tud} (and an extension of section 5C in \cite{Caputo:2021rux} to larger masses). Recently, it has been pointed out that when the ALP decays quickly, the energy deposition in the progenitor star of low-energy core collapse supernovae can be large enough to affect their explosion kinematics \cite{Sung:2019xie,Caputo:2022mah}. A natural extension of our work would be to study how this additional effect can be used to constraint the ALP-electron coupling once the effective coupling to photons is taken into account. Furthermore, more distant supernovae than SN1987A are expected to contribute to a diffuse background of ALPs \cite{Calore:2020tjw}. Such ALPs can convert into photons in astrophysical magnetic fields, which leads to an expected gamma-ray signal that can be searched for in data by e.g.~\textit{Fermi}-LAT \cite{Calore:2021hhn}. In an extension of the `decay bound' discussed in \cref{sec:decay} and the analysis in \cite{Calore:2020tjw}, it would be interesting to constrain the diffuse background of heavy ALPs through their loop-induced decays into photons. Moreover, we have restricted our analysis to the case of supernovae. This was justified by the fact that the effective coupling of ALPs to photons takes the largest values in hot environments where the temperature can overcome the electron mass. However, it would be interesting to understand if the effective coupling to photons can still play a role in other hot environments such as the core of red giants \cite{Carenza:2021osu} where temperatures can be as large as $10$ keV, or in the vicinity of low-luminosity black holes where the temperatures can also reach very large values \cite{Sadowski:2016fdh}. In a broader context, the interplay between tree-level ALP-fermion couplings and loop-induced couplings to gauge fields is naturally not specific to electrons and photons. The case of light spin-0 particles coupled only to muons at tree-level was recently studied in \cite{Caputo:2021rux}. It was assumed that the effective ALP-photon coupling induced by a derivative coupling to muons vanishes for $ m_a \ll m_\mu \simeq 100 $~MeV, but as we have shown in \cref{sec:effectivePhotonCoupling} and discussed throughout this paper, this is not generally true and it would be interesting to re-consider the decay bound for large ALP masses in the light of our results. We anticipate that the formalism developed and applied in this work will prove useful for future studies of astrophysical ALPs. Our work emphasises the important point that the effective couplings of ALPs are not arbitrary, but abide by quantum relations that make large hierarchies difficult to realise. \acknowledgments{ The authors would like to thank Tobias Fischer for sharing the simulation data with us, and in particular Pierluca Carenza for useful discussions about ALP physics and the supernovae bounds. RZF would also like to thank Cristina Manuel for insightful discussions on the use of the thermal masses. The work of RZF was supported by Spanish Ministry of Science and Innovation (PID2020-115845GB-I00/AEI/10.13039/501100011033), the Direcció General de Recerca del Departament d'Empresa i Coneixement (DGR) and by the EC through the program Marie Sklodowska-Curie COFUND (GA 801370)-Beatriu de Pinós. DM and EM are supported by the European Research Council under Grant No. 742104 and by the Swedish Research Council (VR) under grants 2018-03641 and 2019-02337. }
\section{Introduction} \indent Active galactic nuclei (AGNs) are extragalactic sources that emit across the whole electromagnetic spectrum. Such systems are composite and each sub-structure has its own role in shaping the emerging spectrum \cite[see][for a comprehensive review]{Padovani2017}. It is ubiquitously accepted that the X-ray emission originates in the very inner regions of AGNs, near the central supermassive black hole (SMBH). Accretion of matter infalling onto the SMBH is responsible for the enormous amount of optical-UV photons, a fraction of which can be further energised via inverse-Compton \cite[][]{Sunyaev1980} off thermal electrons \cite[the so-called hot corona:][]{haar91,haar93,Zdziarski1995,Madejski1995} up to the X-rays. The maximum energy gain for these seed photons is mainly set by the hot plasma's temperature, and, to a lower extent, by its opacity \cite[e.g.][]{Rybi79,Belo99,Middei2019}. In fact, the X-ray continuum in AGNs is well modelled by a power law with a high energy roll-over \cite[e.g.][]{Perola2002,Dadina07,Molina09,Molina13,Mali14,Ricci18,Fabi15,Fabi17,Tortosa2018}. AGN X-ray spectra may show additional features due to reprocessing of the primary X-ray emission by the circumnuclear material. A fluorescence emission line from the Fe K-shell is commonly observed as the most prominent feature \cite[e.g.][]{Bian09} and its analysis carries a wealth of information on the physics of the reflecting material. This emission line has an intrinsically narrow profile that can undergo distortions, such as broadening, due to special and general relativistic effects. In particular, the closer to the SMBH the reflectors, the more distorted (i.e. the broader) the neutral or ionised Fe line profile \cite[e.g.][]{Fabian1995}. On the contrary, at larger distance, these effects are negligible, thus the Fe K$\alpha$ shape is consistent with a narrow profile. Additionally, in the case of Compton-thick reflectors (i.e. N$_{\rm H}\gtrsim1.5\times10^{24}$ cm$^{-2}$) the X-ray spectra show a typical emission excess around 30 keV, the so-called Compton-hump \cite[e.g.][]{Matt93}. The effect of any absorbing matter crossing our line of sight can significantly attenuate the observed number of photons, especially in the soft X-rays \cite[e.g.][]{Cappi1999,Awaki2000,Matt2002,Bian09,Middei2021}.\\ \indent The X-ray emission of AGNs is also well-known to be variable in spectral shape and amplitude. Nearby Seyfert galaxies as well as distant quasars show a typical softer-when brighter behaviour \cite[e.g.][]{Sobolewska2009,Serafinelli2017}, where softer spectral states, characterised by a photon index $\Gamma>2$, generally correspond to higher flux states. Variability is also commonly witnessed in terms of flux changes that occur on different time intervals. Changes from months to decades are common \cite[e.g.][]{Papadakis2008,Vagnetti2011,Vagnetti2016,Falocco2017,Paolillo2017} and, in the X-rays, variations are also observed down to kiloseconds timescales \cite[e.g][]{Uttley2002,Ponti12}. The origin of such a rapid variability cannot be solely ascribed to the X-ray band merely mimicking the variations of the disc optical-UV photons \cite[][]{Nandra2001}. Moreover, a tight relation between short timescales variations and SMBH mass \cite[e.g.][]{Papadakis2004,O'Neill2005,McHardy2006,Ponti12} is well established. \\ \indent Multi-epoch high S/N spectral and timing data provide compelling pieces of information to shed light onto the physics behind X-ray variability and its tight link with the emerging X-ray spectrum. In this context, we report on the X-ray spectral properties of NGC 2992, a nearby highly inclined spiral galaxy \cite[z=0.00771,][]{Keel1996} classified as a Seyfert 1.5-1.9 galaxy \cite[][]{Trippe2008}. This source was the target of two consecutive XMM-Newton orbits in 2019, the second of which had a simultaneous but shorter \textit{NuSTAR} exposure. Multiple transient Fe K emission lines between 5-7 keV were found, originating from several flaring sectors of the accretion disk \cite[][]{Marinucci2020}. Moreover, variable absorption structures above 9 keV were also detected, associated to an intermittent disk wind (Luminari et al, submitted). The general trend of the source \cite[already reported in][]{Yaqoob2007,Shu2010,Marinucci2018}, where relativistic emission lines are observed at high flux levels, was therefore confirmed. In this paper, we report on the analysis of all the Neil Gehrels Swift Observatory (hereafter Swift) data, most of which were taken in the context of two monitoring campaigns. Then, we present a detailed timing and spectral analysis of the {\it XMM-Newton} and {\it NuSTAR} 2019 observations. \section{Data reduction and science products extraction} \begin{table} \centering \setlength{\tabcolsep}{1.pt} \caption{\small{The observation log for the \textit{XMM-Newton} and \textit{NuSTAR} data is presented. The \textit{NuSTAR} exposure was simultaneously taken during the second orbit of \textit{XMM-Newton}.}\label{obslog}} \begin{tabular}{c c c c c} \hline \\ Satellite& Detector Obs.& ID Obs.& Net exposure& Start-date\\ \textit{XMM-Newton}&pn&0840920201&92.6 ks&2019-05-07\\ \textit{XMM-Newton}&pn&0840920301&92.8 ks&2019-05-09\\ \textit{NuSTAR}&FPMA/B&90501623002&57.4 ks&2019-05-10\\ \end{tabular} \end{table} \begin{table} \centering \setlength{\tabcolsep}{1.5pt} \caption{\small{Extraction regions properties as a function of the \textit{XRT} observed rate.}\label{pileup1}} \begin{tabular}{c c c} \hline \\ Region's shape&Radius(Inner Radius)&Rate\\ &pixel&cts/s\\ circle&20&<0.6\\ annulus&(2)&>0.6\\ annulus&(3)&>1.4\\ annulus&(4)&>1.7\\ annulus&(5)&>2.8\\ annulus&(6)&>3.2\\ \end{tabular} \end{table} The present paper focuses on NGC 2992 observations (longer than 100 seconds) taken in the context of \textit{Swift} monitoring campaigns. In the first one, \textit{Swift-XRT} monitored NGC 2992 throughout 2019 (from March 26 to December 14), with the aim of triggering a deep, high flux observation of the source. On May 6, 2019, the triggering flux threshold was met (F$_{\rm 2-10}$=7.0$\times$10$^{-11}$ erg cm$^{-2}$ s$^{-1}$) and \textit{XMM-Newton} started observing the source on 2019 May 7 for two consecutive orbits (ObsIDs: 0840920201, 0840920301). \textit{NuSTAR} \cite[][]{Harr13} observed NGC 2992 on May 10, 2019 for $\sim$120 ks, simultaneously with the second \textit{XMM-Newton} orbit. In this paper, we consider the same data set presented in \cite{Marinucci2020} and Luminari et al., sub, (see also Table \ref{obslog}) and we address the reader to these papers for details on the data reduction. Then, we also consider exposures obtained during a novel 2021 \textit{Swift} monitoring aimed at keeping track of the extreme variability of NGC 2992.\\ \indent The extraction of the high level science products of each \textit{Swift-XRT} exposure resulted from an automatic process that downloads and reduces raw data taken via photon counting acquisition mode. The procedure is based on the standard pipelines \textit{xrtpipeline} and \textit{xrtproducts} described in Capalbi et al.,~(2005)\footnote{\url{https://swift.gsfc.nasa.gov/analysis/xrt\_swguide\_v1\_2.pdf}}. The regions used to extract the source and background spectra and light curves are selected taking into account any pile-up affecting that specific observation. In particular, after computing the source net count rate with \textit{ximage}, the procedure selected a circular region or an annulus in the case of a rate $<$0.6 cts/s or $>$0.6 cts/s, respectively. Then, the inner radius of the annulus is determined on the basis of the observed count rate. In Table ~\ref{pileup1} we list the rates limits for each inner radius of the extracting annulus. The region used to extract the source always has an outer radius of 50 arcsec, regardless of its circular or annular shape. On the other hand, the background is always extracted using an annular region centered on the source. A difference of 25 pixels ($\sim$60 arcsec) is set between the inner and outer radii of such a region. The outer radii of the source and background regions are always $\sim$60 arcsec apart. Spectra were then binned requiring a minimum of 5 counts per bin and were fitted adopting the Cash statistic \citep[][]{Cash1979}. \\ \indent Finally, we relied on a similar automatic procedure to extract science products for each UVOT exposure. In particular, we checked that two regions, one circular and centered on the source (radius=6 arcsec) and a concentric annulus ($\Delta$radius=7 arcsec) were free of any other sources or spurious detection. The returned count rates for the UVOT filters are not corrected for Galactic nor intrinsic reddening. We notice that correcting for such effects would not modify our results, instead it would lead to a shift of the rates. Our computations showed that considering a reddening of E(B-V)=0.0519 \cite[][]{Schlafly2011} would decrease the rates by $\sim$13\% or $\sim$30\% for the V and the UVW2 filters, respectively. \section{Timing properties} The \textit{Swift}, \textit{XMM-Newton} and \textit{NuSTAR} observations provide a compelling dataset to shed light onto the temporal properties of NGC 2992 at different timescales.\\ \begin{figure*} \centering \includegraphics[width=0.99\textwidth]{finale_multicurve2.pdf} \caption{\small{Swift-XRT and -UVOT light curves from the 123 observations. Remarkable variability from short to long timescales can be observed in the X-rays, while the optical-UV light curves (not corrected for the extinction) are characterised by a more constant behaviour. UVOT filters are labelled in the plot while Xs and Xh account for X-rays in the 0.3-2 and 2-10 keV energy ranges. We notice that for visual purposes, each segment of the x-axis has a different length.}} \label{swift_lc} \end{figure*} \begin{figure} \centering \includegraphics[width=\columnwidth]{sffinale.pdf} \vspace{-0.5cm} \caption{\small{Structure functions for the soft and hard X-rays computed for the two monitoring campaigns. Dashed lines account for the weighted linear regression describing the SF. Light curves in 2021 were more variable than in 2019 and both the hard and soft X-rays varied of the same amount within each monitoring.}} \label{SF} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{hardnessratio_special.pdf} \vspace{-0.5cm} \caption{\small{NGC 2992 hardness ratios as a function of the total collected counts in the 0.3-10 keV band. Different colours identify data from the 2019 (blue), 2021 (red) and those already in the archive (green).}} \label{swift_ratio} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{correlationRates.pdf} \caption{\small{Correlation between soft and hard count rates (0.3-2 and 2-10 keV, respectively). This suggests that the power-law component dominates the $\sim$1-10 keV spectrum of NGC 2992}} \label{correlation} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{nocorrelation.pdf} \vspace{-0.5cm} \caption{\small{Lack of correlation between the X-rays and ultraviolet UVW2 filter. Cyan triangles account for the soft X-rays while blue circles are used for the hard band. Pearson cross-correlation coefficients of P$_{\rm cc}$=-0.21 P(<r)=2\% and P$_{\rm cc}$=-0.19 P(<r)=3\% are found for the Xs vs UVW2 and Xh vs UVW2, respectively.}.} \label{nocorrelation} \end{figure} \begin{figure} \centering \includegraphics[width=\columnwidth]{fvar_swift.pdf} \vspace{-0.5cm} \caption{\small{Fractional variability spectra derived for the five Swift's subsamples described in Sect. 3. Excess variance spectra clearly have different normalisations suggesting that the source varied by different amounts over monthly timescales. Error bars only account for the Poissonian noise.}} \label{fvar} \end{figure} \subsection{Daily to yearly variations} \indent \textit{Swift} extensively observed NGC 2992. From 2006 to present days more than one hundred observations are available, and the bulk of the exposures belong to two distinct monitoring campaigns, one held during 2019 from which 60 $\sim$2 ks exposures were derived, and a novel one covering 2021.\\ \indent Multi-epoch and multi-wavelength light curves are showed in Fig. \ref{swift_lc}, where remarkable variations are observed from daily to yearly timescales. The lowest X-ray state corresponded to the archival observations from 2006 and a maximal variation larger than a factor of 10 is found. To the fast X-ray variations correspond fairly flat optical and UV time series. Such a constant behaviour, is clearly observed in the optical filters U (with both V and B showing the same trend) and UVW2, although in this ultraviolet band we can see a marginal long term increase. The flat shape of the optical-UV light curves for NGC 2992 can be straightforwardly accounted for by the obscured nature of this source, implying that even if the AGN may contribute, it does not dominate the emission in these bands.\\ \indent The well sampled X-ray light curves obtained from the monitoring campaigns allow us to compute the corresponding structure functions (SFs). The SF has been widely adopted in different bands of the electromagnetic spectrum \cite[][]{Trevese1994,DeVries2005,Bauer2009} and quantifies the amount of variability giving a measure of the mean change between two observations separated by a time lag $\tau$. It has been used for ensemble studies \cite[see][for details]{Vagnetti2011,Vagnetti2016} as well as for single AGN \cite[e.g.][]{Gallo2018,Laurenti2020}. Different mathematical formulations for such an estimator have been proposed \cite[e.g.][]{Simonetti1985,diClemente1996}, and we here use the one described in Sect. 3 of \cite{Middei2017}. In Fig.~\ref{SF} we show the soft (0.3-2 keV) and hard (2-10 keV) SFs for the two \textit{Swift-XRT} campaigns. Flux changes in both bands increase with the rest-frame time lags, SF$_{\rm hard}\sim\tau^{0.12\pm0.02}$ and SF$_{\rm soft}\sim\tau^{0.10\pm0.02}$, with these slopes being compatible with the one found from ensemble studies focusing on the average variability of AGNs \cite[SF$_{\rm ensemble}\sim\tau^{0.121\pm0.004}$,][]{Vagnetti2016}. The normalisations of the SFs account for two different variability levels, the larger the variability, the higher the SF. Interestingly, larger variability is measured during 2021 corresponding to a lower flux state of the source.\\ \indent We then searched for correlations possibly connected with variations in the column density of the obscurer. For this reason we computed the ratio between the hard and soft X-rays and we studied it as a function of the total counts. In accordance with the plot in Fig.~\ref{swift_ratio} no correlation holds between the hard/soft X-ray ratio and full band rate, and a marginal trend can be only observed for a full band rate below 0.5 cts/s. The lack of a noticeable trend is consistent with a fairly constant column density of the obscurer. On the other hand, the soft and hard X-rays are strongly correlated (P$_{\rm cc}$=0.99, P(<r)<0.01\%), see Fig.~\ref{correlation}, suggesting that both the soft and hard X-rays are produced by the very same spectral component. Finally, we further stress that neither the soft nor the hard X-ray bands are correlated with the ultraviolet emission, see Fig.~\ref{nocorrelation}. Such a correlation has been commonly observed in samples of unobscured AGN \cite[e.g.][]{Edelson2002,Lusso2010,Edelson2015,Lusso2017} and the lack of correlation has been associated either to an incumbent changing look process \citep[e.g.][]{Ricci2020,Ricci2021,Laha2022arXiv} or to intervening absorbing matter. Due to the Seyfert 2 nature of NGC 2992, the lack of a correlation between the disc and coronal emissions can be ascribed to the predominantly non-nuclear nature of the UV emission observed with \textit{Swift-UVOT}.\\ \indent We further quantified the variability properties of NGC 2992 computing the so-called fractional variability (F$_{\rm var}$). This estimator \cite[e.g.][]{Edelson2002,Vaughan2003,Ponti2004,Ponti2006} provides a direct measure of a light curve variability and is defined as the square root of the normalised excess variance. \cite[e.g.][]{Vaughan2004,Ponti2006,Matzeu2016mnras,Matzeu2017,Alston2019,Parker2020,DeMarco2020,Igo2020}. To derive compatible excess variance spectra, we only considered data taken during the 2019 and 2021 monitoring campaigns. In particular, for a meaningful comparison, we need to compute the F$_{\rm var}$ spectra using light curves of similar length. The 2019 campaign spans a time interval of about 6 months although not performed continuously due to visibility issues. We thus divided each set of observations into subsets roughly covering an about 3 months long time interval. We thus ended up with five different subsamples: sample \textit{a} (March-June 2019), sample \textit{b} (October-December 2019), sample \textit{c} (January-March 2021) and sample \textit{d} (April-July 2001) and sample \textit{e} (October-December 2021. We then computed the light curves for the samples in different energy intervals and derived the corresponding fractional variability. In Fig.~\ref{fvar} we show the resulting F$_{\rm var}$ spectra. Aside from some fluctuations above $\sim$7 keV, likely due to background issues and/or low S/N, and the first energy bin that is mostly due to distant scattering, all the spectra have a fairly constant behaviour. This suggests that the variability is driven by a single variable component, which in our case is the primary continuum emission. Concerning the normalisation of the spectra, we notice that the higher the F$_{\rm var}$ spectrum the lower the flux, which is in agreement with what is commonly observed in other AGNs \cite[e.g.][]{Barr1986,Green1993,Lawrence1993}. \subsection{Hourly to daily changes} \begin{figure*} \centering \includegraphics[width=0.9999\textwidth]{ngc2992lc_finale.pdf} \caption{\small{Background subtracted light curves in units of counts/sec are shown for \textit{XMM-Newton} and \textit{NuSTAR} data. Aside from the 0.3-1 keV energy band, light curves below 10 keV show remarkable changes in the first orbit and moderate flux variability in the second one. The \textit{NuSTAR} light curve (10-79 keV) is not completely simultaneous with the second \textit{XMM-Newton} orbit. The 3-10 keV \textit{XMM-Newton} (orbit 2) and the 10-79 keV \textit{NuSTAR} light curves are characterised by a similar amount of variations above 1, which suggests the primary continuum to dominate also the \textit{NuSTAR} energy band}.} \label{2992lc} \end{figure*} \begin{figure} \centering \includegraphics[width=0.99\columnwidth]{fitfvar_xmm.pdf} \caption{\small{Fractional variability spectra of Orbit 1 and 2 derived from the background subtracted light curves. The adopted temporal binning is set to 1000 seconds. Interestingly, these spectra are characterised by two different amounts of variability. In particular, the higher the flux the larger the amount of variability. We notice that the second orbit spectrum lacks the 0.3-0.5 keV energy bin as it was found consistent with zero. Fitted F$_{\rm var}$ spectra are showed. In both orbits, substantial residuals can be observed around 5 keV.}}\label{fvarx} \end{figure} The two consecutive \textit{XMM-Newton} orbits, one of which also has a simultaneous \textit{NuSTAR} exposure, are extremely suitable for quantifying NGC 2992 variations on very short term. We started deriving the NGC 2992 light curves, see Fig.~\ref{2992lc}. The different panels, from top to bottom, account for the 0.3-1, 1-3 and 3-10, 10-79 keV bands, while the last row shows on the ratios between the soft and hard X-rays (1-3 keV/3-10 keV). The constancy of the 0.3-1 light curves is consistent with extra-nuclear, ionised emission. In orbit 1, \textit{XMM-Newton} caught the source in a higher flux state than in orbit 2, for which data up to 79 keV are also showed. Variations during the first orbit are about a factor of 60\% in both the 1-3 and 3-10 keV energy bands. Such fast flux changes occur on a timescale of $\sim$40 ks. On the other hand, the amount of variability in orbit 2 is reduced to a few percent for both the soft and the hard X-ray bands. \textit{NuSTAR}'s light curve is consistent with the 3-10 keV XMM-Newton time series and shows a similar amount of variability suggesting for the presence of a weak reflected component and a primary continuum still dominating this high energy band. The hardness ratios reported in the last row of Fig.~\ref{2992lc} are suggestive of a smooth spectral softening over the observed temporal window. In fact, ratios between the 1-3 and 3-10 keV bands increases from 0.65 at the beginning of the first orbit to $\sim$0.75 at the end of the second \textit{XMM-Newton} exposure.\\ \indent Thanks to the high S/N of this dataset, we derived the F$_{\rm var}$ spectra of the two \textit{XMM-Newton} exposures. We used the background subtracted light curves binned every 1000 seconds. The resulting variability spectra are shown in Fig.~\ref{fvarx}. The spectrum of orbit 1 has a larger normalisation than orbit 2, in agreement with the light curves in Fig. \ref{2992lc}. During orbit 1, the 1-3 keV X-rays are more variable than the hard X-rays. A moderate drop in the variability spectrum is observed around 6.4 keV, as expected for a constant Fe K$\alpha$ emission. A similar drop is also observed in orbit 2, despite the $\sim$3 times less variable spectrum. Both spectra show a drop below $\sim$1 keV, as this energy range is dominated by a constant component. Finally, both spectra show an interesting variable feature around 5 keV that can possibly be associated to the transient emission line component discussed in \cite{Marinucci2020}. In a recent work by \cite{Parker2020}, the authors computed different tables to model \textit{F$_{\rm var}$} spectra with standard spectral fitting packages, such as \textit{Xspec} \cite[][]{Arnaud1996}. Following \cite{Parker2020} and the prescriptions in the web page\footnote{\url{https://www.michaelparker.space/variance-models}}, we tried to model our excess variance spectra. In particular, we used the following model: \begin{equation*} \rm Fvar\_pidamp\_1.fits \times Fvar\_pow.fits \times Fvar\_xildamp.fits . \end{equation*} \noindent The first table is based on the \textit{Spex} photoionisation model Pion \cite[][]{Miller2015,Mehdipour2016} and accounts for the drop in variance due to a constant photoionised emission. The model's parameters are \textit{frac} and \textit{$\xi$}, the ratio of the 0.5-10 keV flux of the reflection to the average log primary flux and the disc's ionisation in erg cm s$^{-1}$. The second table reproduces the variance of a powerlaw-like continuum changing in log(flux). Its parameters, \textit{var} and \textit{corr} define the variance of the logarithmic flux for the primary continuum in the 0.5-10 keV energy range and the correlation between the photon index of the power law and the variable flux. Finally, the last table is needed to account for the reduction of F$_{\rm var}$ due to unblurred reflection. In this case, the \textit{frac$_{xill}$} is the ratio of the 0.5-10 keV flux of the reflection to the average power law flux whose flux is computed in logarithm. We fitted this very same model to the two spectra finding that the first high flux orbit is well described by the model with $\chi^2$=15 for 13 d.o.f. and that the model works fairly well for the continuum variability of orbit 2, despite the $\chi^2$/d.o.f.=38/12. This poor statistics is indeed mainly due to the unaccounted excess around 5 keV and, more marginally, by scattered data above 7 keV. \begin{table} \centering \setlength{\tabcolsep}{1.5pt} \caption{\small{Best-fir parameters for the two excess variance spectra derived from the \textit{XMM-Newton} orbits 1 and 2. The fit statistics are $\chi^2$/d.o.f.=15/13 and $\chi^2$/d.o.f=38/12 for the two spectra, respectively.}\label{pileup}} \begin{tabular}{c c c c} \hline \\ model&parameer&obs1&obs2\\ \hline Fvar\_pidamp&frac&0.26$^{+0.21}_{-0.09}$&1.0$^{+1.9}_{-0.4}$\\ &xi& 0.85$^{+0.61}_{-0.40}$&1.6$\pm$0.3\\ Fvar\_pow&var&$0.059^{+0.002}_{-0.004}$&0.022$^{+0.005}_{-0.003}$\\ &corr&<0.24&<0.63\\ Fvar\_xildamp&frac&0.26$^{+0.03}_{-0.12}$&<0.34\\ \end{tabular} \end{table} \section{Spectral properties} As for Sect. 3, the multi-epoch broadband data presented in this paper provide a compelling collection of observations suitable to perform both time -average and -resolved spectral analyses. \subsection{Mid-to-long term spectral properties} \indent The high flux of NGC 2992 allows us to extract \textit{XRT} spectra for each of the 123 observations presented in this paper. We thus adopted a simple model to determine the basic properties of the primary continuum and the neutral absorbing column of NGC 2992 across the years, by fitting within \textit{Xspec} the following model: \begin{equation*} \rm tbabs\times ztbabs \times powerlaw. \end{equation*} \noindent The power law models the nuclear X-ray emission and both the local and Galactic absorptions are accounted for. For each observation, we fitted the column density of the local absorber, as well as the continuum photon index and its normalisation. Via this procedure we determined the best-fit parameters shown in Fig.~\ref{swift_bestfit} and quoted in Table~\ref{swifttable}. Although the adopted model does not include the soft scattered component, all the spectra are well accounted for, as they all have a Cstat/d.o.f. ratio close to unity. Hard and soft X-ray fluxes show remarkable variations also down to daily timescales, see Fig.~\ref{swift_bestfit}. It is hard to assess whether there are spectral changes or not. As expected, in fact, the power-law photon index and the obscurer column density are strongly correlated, diluting any intrinsic spectral variability. We thus refitted all the observations keeping N$_{\rm H}$ fixed to its average value of N$_{\rm H}$=7.8$\times$10$^{21}$ cm$^{-2}$ (determined from the 123 \textit{Swift} observations). This new attempt led to steeper values of $\Gamma$, found to have an average value of $\Gamma$=1.59$\pm$0.04 and covering the range 1.37-1.97, see blue points in Fig.~\ref{deltagamma}. Interestingly, no correlation holds between these photon indices and the total flux, so that the source does not obviously show the typical softer when brighter behaviour commonly observed in AGNs \cite[e.g.][see example in the inset of Fig.~\ref{deltagamma}]{Sobolewska2009}. \begin{figure*} \centering \includegraphics[width=.99\textwidth]{swift_bestfitlarger_than2019.pdf} \caption{\small{Best-fit parameters derived from the analyses of the XRT exposures. The column density is in units of $\rm \times10^{22}~cm^{-2}$ and fluxes are in units of erg ~cm$^{-2}$ ~s$^{-1}$. The same results are reported in Table~\ref{swifttable}}.} \label{swift_bestfit} \end{figure*} \begin{figure} \centering \includegraphics[width=\columnwidth]{deltagammainset.pdf} \caption{\small{\textit{XRT} photon indices as a function of the 2-10 keV flux (in units of $\times$10$^{-11}$ erg cm$^{-2}$ s$^{-1}$). Blue dots accounts for $\Gamma$ values derived using a fixed absorbing column density N$_{\rm H}$=7.8 $\times$10$^{21}$ cm$^{-2}$. Gray crosses, instead, represent flatter $\Gamma$ values that had been derived with a free to vary N$_{\rm H}$. The inset \citep[taken from][]{Sobolewska2009} shows MCG-6-30-15, which in contrast, does show a softer when brighter behavior more typical of other AGN.}}\label{deltagamma} \end{figure} \subsection{Short term spectral properties: the Fe K$\alpha$ complex} We started focusing on the Fe complex of NGC 2992 testing a simple power law to the \textit{XMM-Newton} spectra. We worked on the 3-8 keV energy range and we fitted the photon index and the normalisation of the continuum for both orbit 1 and 2. In Fig.~\ref{line}, we show zoomed spectra where modelling the sole continuum leaves prominent residuals between 6 and 7 keV. Then we added two Gaussian components with zero width to model the Fe K$\alpha$ and its accompanying Fe K$\beta$. We assumed the lines not to change between the two orbits so that we fitted the Gaussian energy centroid and normalisation for the Fe K$\alpha$. The Fe K$\beta$, had its energy fixed to 7.06 keV and its normalisation was free to vary up to 14\% of the Fe K$\alpha$ flux \cite[][]{Molendi2003}. Although this leads to a significant reduction in the fit statistic ($\chi^2$/$\Delta$d.o.f.=264/160), the data are far from being well reproduced. First of all, data between 6.4-7.1 keV are not yet accounted for, suggesting that the Fe K$\alpha$ profile might be the superposition of different components. We then allowed the Fe K$\alpha$ width to vary finding a better fit ($\Delta\chi^2$=-19). The residuals around 6.4 keV are now accounted for. Then, we added two additional Gaussian components for the additional residuals at $\sim$6.7 and $\sim$7 keV. As for the 6.4 keV Fe K$\alpha$ line, we fitted the central energy and normalisation of these two Gaussians (with null width) tying the values between the orbits. In particular, one line models the Fe Ly$\alpha$ emission at 6.96 keV ($\Delta\chi^2$/$\Delta$d.o.f.=-42/-2) while the second accounts for the Fe He$\alpha$ at 6.7 keV ($\Delta\chi^2$/$\Delta$d.o.f.=-47/-2).\\ \indent These steps led us to a best-fit of $\chi^2$=156 for 155 d.o.f. and the inferred parameters are quoted in Table ~\ref{xmmlines}. These tests are consistent with a weakly broad Fe K$\alpha$ that may be the superposition of two different components.\\ \begin{figure} \centering \includegraphics[width=\columnwidth]{linesngc2992.pdf} \vspace{-0.5cm} \caption{\small{Zoom in the 5-7.5 keV energy band of the data to model ratios. The spectrum in black refers to orbit 1 data while the red spectrum accounts for data taken during orbit 2.}} \label{line} \end{figure} \begin{table} \centering \setlength{\tabcolsep}{1.5pt} \caption{\small{Best-fit quantities derived from the \textit{XMM-Newton} exposures fitted in the 3-10 keV energy range. The dagger indicates that the energy centroid of the Fe K$\beta$ was fixed.}\label{xmmlines}} \begin{tabular}{c c c c c} Component&Parameter &Orbit 1& Orbit 2&Units \\ \hline Tbabs&N$_{\rm H}$&1.0$\pm$0.2&0.9$\pm$0.2&$\times$10$^{22}$ cm$^{-2}$\\ Pow&$\Gamma$&1.62$\pm$0.03 &1.66$\pm$0.02& \\ &N$_{\rm pow}$&1.7$\pm$0.1 &2.1$\pm$0.1& $\times$10$^{-2}$ ph.\,keV$^{-1}$\,$\rm cm^{2}$\,s$^{-1}$\\ zGauss$_{\rm Fe K\alpha}$&E&6.38$\pm$0.05&&keV\\ &$\sigma$&46$\pm$10&& eV\\ &EW&90$\pm$5&&eV\\ &Norm&8.6$\pm$0.3&&$\times$10$^{-5}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ zGauss$_{\rm Fe K\beta}\dagger$&E&7.06&&keV\\ &EW&<20&&eV\\ &Norm&<5.9&&$\times$10$^{-6}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ zGauss$_{\rm Fe Ly\alpha}$&E&6.96$\pm$0.01&&keV\\ &EW&25$\pm$4&&eV\\ &Norm&2.0$\pm$0.3&&$\times$10$^{-5}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ zGauss$_{\rm Fe He\alpha}$&E&6.71$\pm$0.04&&keV\\ &EW&12$\pm$3&&eV\\ &Norm&1.2$\pm$0.3&&$\times$10$^{-5}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ \end{tabular} \end{table} \subsection{The \textit{XMM-Newton/NuSTAR} 2019 observations: Time averaged spectral properties} We here derive the NGC 2992 time-average properties in the 0.5-79 keV energy range by fitting the \textit{XMM-Newton} and the \textit{NuSTAR} spectra. Relying on our findings in previous Sect. 4.2 and the phenomenological model by \cite{Marinucci2018}, we built the following model in \textit{Xspec}: \begin{multline} \rm tbabs \times(apec + Cloudy + (ztbabs \times po)+ \\ \rm+~zGauss + MyTorusL+ MyTorusS+zGauss+zGauss). \end{multline} \noindent \textbf{Soft X-rays}: The neutral Galactic and intrinsic absorption is taken into account using the $tbabs$ model. The soft X-rays of type 2 AGNs are generally dominated by emission lines whose origin is a photonionised gas consistent with the narrow line region \cite[NLR; e.g.][]{Awaki1991,Turner1997a,Turner1997b,Bianchi2006,Guainazzi2007,Laha2020}, thus we accounted for this emission component using a grid model for \textit{Xspec} computed with \textit{CLOUDY} 17 \cite[][]{Ferland2017}. This table, already presented in past studies \cite[][]{Bianchi2010,Marinucci2011,Marinucci2017}, has two parameters: the ionising flux $\log$ U = [-2.00 : 4.00], with step of 0.25, and cloud column density $\rm\log N_H$ = [19.0 : 23.5], with step of 0.1. Then, the \textit{apec} model was used to reproduce thermal emission from extra-nuclear material observed with \textit{Chandra} \cite[][]{Colbert2005}. We fitted the temperature and the normalisation for the \textit{apec} component and the column density, the ionisation and the normalisation of the \textit{Cloudy} one. However, these parameters were tied between the spectra as no variations are expected for this larger scale gas down to the investigated timescales.\\ \textbf{Hard X-rays}: A power law reproduces the nuclear continuum while \textit{MyTorusS} and \textit{MyTorusL}, both additive components, model the reflected emission plus its accompanying Fe\,K$\alpha$, Fe\,K$\beta$ fluorescent emission lines. \textit{MyTorus} \cite[][]{Murphy2009,Yaqoob2012} includes the Compton down-scattering effect and the self-consistent reflected components assuming a fixed geometry of the toroidal X-ray reprocessor, for which the covering factor of the torus corresponds to a fixed half-opening angle of 60$^{\circ}$. Here we assumed: the medium absorbing the primary continuum and the one reflecting it to have different column densities. To set this scenario up we fitted independently the column density of ztbabs\footnote{The NGC 2992 obscurer has a column density N$_{\rm H }$<10$^{22}$ cm$^{-2}$, too low to adopt the multiplicative table \textit{MyTorusZ} commonly used to account for absorption in the line of sight.} and \textit{MyTorus} tables independently i.e. using the so-called decoupled mode to allow the reflector and absorber to have different column densities. Then, we fixed the viewing angle of \textit{MyTorusL} and \textit{MyTorusS} to 0$^{\circ}$, thus implementing the back scattering scenario. In the fits, the photon index of the power law was tied with those of the two \textit{MyTorus} tables and computed for both the orbits . The normalisation of the nuclear emission was computed for both orbits, similar to the one of the \textit{MyTorus} model, which we assumed to be the same between \textit{MyTorusL} and \textit{MyTorusS}.\\ \textbf{Emission lines}: the 5-7 keV energy range hosts prominent features in emission and we used Gaussian lines to account for all of them except for the Fe K$\alpha$ and the Fe K${\beta}$ lines, which are already included in \textit{MyTorus}. However, in Sect. 4.2 we found evidence for a weakly broad Fe K$\alpha$ line, thus we added a Gaussian component whose energy centroid was computed tying its value between the spectra and fitting its normalisation in both orbits. Moreover, we fixed the centroid energy of two additional ionised Gaussians to E=6.7 keV, E=6.96 keV, respectively, and assumed a narrow profile ($\sigma$=0 eV) for both of them.\\ \indent These steps led to a fit statistic of $\chi^2$/d.o.f.= 1074/731. Residuals between 3 and 5 keV suggest the photon index may not be the same for \textit{XMM-Newton} orbit 2 and \textit{NuSTAR} ($\Delta \Gamma\sim 0.06$). This may be either due to the non-simultaneity of the spectra or due to inter-calibration issues among the detectors as also reported for other observations \cite[e.g.][]{Porquet2018,Laha2021b}. Allowing for different $\Gamma$ values for \textit{XMM-Newton} and \textit{NuSTAR} in orbit 2 yields a better fit statistic of $\chi^2$/d.o.f.=980/730 (see Fig.~\ref{timeaverage}), and we report in Table~\ref{xmmaverage} the corresponding best-fit parameters. \begin{table} \centering \setlength{\tabcolsep}{.1pt} \caption{\small{Best-fit values for the fit with statistic $\chi^2$=980 for 730 d.o.f. as derived in accordance with Sect. 4.2. The $\dagger$ is used to identify those parameters that have been computed tying the values among the orbits.}\label{xmmaverage}} \begin{tabular}{c c c c c} Component&Parameter &Orbit 1& Orbit 2+NuSTAR&Units \\ \hline Cloudy$\dagger$&$\log$U&2.66$\pm$0.01&&\\ &$\log N_{\rm H}$&20.4$\pm$0.1&&\\ &N&6.1$\pm$0.2&&$\times$10$^{-16}$\\ Apec$\dagger$&kT&0.68$\pm$0.02&&\\ &Norm&1.0$\pm$0.4&&$\times$10$^{-4}$\\ ztbabs&N$_{\rm H}$&0.79$\pm$0.01&0.78$\pm$0.01&$\times$10$^{22}$ cm$^{-2}$\\ Pow&$\Gamma$&1.70$\pm$0.01 &1.68$\pm$0.01& \\ &N$_{\rm pow}$&2.1$\pm$0.2 &1.6$\pm$0.1& $\times$10$^{-2}$ ph.\,keV$^{-1}$\,$\rm cm^{2}$\,s$^{-1}$\\ zGauss$\dagger$&E&6.33$\pm$0.05&& keV\\ &EW&25$^{+31}_{-10}$&15$^{+16}_{-9}$& eV\\ &N&1.9$^{+2.2}_{-0.7}$&1.6$^{+1.1}_{-0.6}$& $\times$10$^{-5}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ MyTorusS&N$_{\rm H}$&9.2$\pm$3.1&10$\pm$2.4& $\times$10$^{22} \rm cm^{-2}$\\ &N&6.4$\pm$2.0&5.2$\pm$0.9& $\times$10$^{-2}$ ph.\,keV$^{-1}$\,$\rm cm^{2}$\,s$^{-1}$\\ zGauss&N$_{\rm6.96~keV}$&1.15$\pm$0.04&0.9$\pm$0.3 &$\times$10$^{-5}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ zGauss&N$_{\rm6.70~keV}$&1.40$\pm$0.04&1.0$\pm$0.3 &$\times$10$^{-5}$ ph.\,cm$^{-2}$\,s$^{-1}$\\ \hline &F$_{\rm 0.5-2~keV}$&1.3$\pm$0.2 &1.1$\pm$0.3&$\times$10$^{-11}$ erg cm$^{-2}$ s$^{-1}$ \\ &F$_{\rm 2-10~keV}$&8.6$\pm$0.1 &7.5$\pm$0.01&$\times$10$^{-11}$ erg cm$^{-2}$ s$^{-1}$ \\ \end{tabular} \end{table} \begin{figure} \centering \includegraphics[width=\columnwidth]{finale_ngc2992.pdf} \caption{\small{Best-fit for the two \textit{XMM-Newton} orbits and the accompanying \textit{NuSTAR} data. The inferred parameters are reported in Table~\ref{xmmaverage}. The model components shown and labelled in the bottom panel are those derived for the simultaneous \textit{XMM-Newton}-\textit{NuSTAR} data only.}} \label{timeaverage} \end{figure} In accordance with the light curves, the first orbit NGC 2992 showed a higher flux than in orbit 2, accompanied by a spectral shape characterised by a similar photon index of $\Gamma$=1.68$\pm$0.01 and absorbing column density of N$_{\rm H}$=7.8$\pm$0.2 $\times$10$^{21}$ cm$^{-2}$. In a similar fashion, the reflected emission has a compatible flux between the two observations and a rather constant column density N$_{\rm H}\sim$9.6$\times$10$^{22}$ cm$^{-2}$ for the scattered component out of the line of sight. The presence of Compton-thin matter both along the line of sight and out of the line of sight implies the overall emission spectrum of NGC 2992 being globally Compton-thin. Only upper limits were found for the variable Fe K$\alpha$ red tail while the Fe XXV He-$\alpha$ and Fe XXVI Ly-$\alpha$ are well constrained in both orbits. Despite the fairly acceptable statistics, the model well reproduces the \textit{XMM-Newton} and \textit{NuSTAR} spectra as the high $\chi^2$ is mainly due to residuals between 1 and 2 keV likely resulting from calibration issues. \subsection{High energy cut-off} \indent The broadband coverage provided by a simultaneous \textit{XMM-Newton-NuSTAR} exposure is extremely suitable to investigate for the high energy roll-over of the nuclear continuum emission, which provides direct clues on the physical properties of the hot corona. For this reason, here we focus on data belonging to \textit{XMM-Newton} orbit 2 and those from its accompanying \textit{NuSTAR} observation.\\ \indent In Section 4.3, we found the overall emission spectrum of NGC 2992 to be globally Compton thin. We thus further investigate the properties of the X-ray emission in NGC 2992 replacing \textit{MyTorus} with the \textit{Borus} model \cite[][]{2Balokovic18,Balokovic2019,Balokovic2021}. In this model, in fact, the high energy cut-off of the primary continuum is set as a free parameter and is not fixed to 300 keV. In this model, a homogeneous spherical scattering medium is considered to surround the central X-ray source. Except for Fe, whose relative abundance (A$_{\rm Fe}$) can be derived, a solar abundance is considered. We therefore modelled the simultaneous \textit{XMM-Newton/NuSTAR} orbit 2 replacing the \textit{MyTorus} tables with the \textit{Borus} one (borus02\_v170323a.fits) ending up with the model: \begin{multline} \rm tbabs_G \times(apec + Cloudy + (tbabs_z \times cutoffpl) +\\ \rm +Borus+zGauss+zGauss+zGauss). \end{multline} \noindent We fit XMM-Newton orbit 2 and NuSTAR data computing the \textit{Borus} normalisation and column density. We assumed the cut-off power law and \textit{Borus} to have the same primary photon index, high energy cut-off and normalisation, hence we tied these parameters between the two models. The iron abundance was set to 1.\\ \indent These simple steps led to a best-fit of $\chi^2$/d.o.f.=687/563. Based on this model, the primary continuum emission of NGC 2992 has a slope of $\Gamma$=1.67$\pm$0.01 and is absorbed by a column of N$_{\rm H}$=(7.8$\pm$0.1)$\times10^{21}$ cm$^{-2}$. A lower limit for the high energy cut-off is found, E$_{\rm c}$>390 keV, and the reflected emission is due to matter with N$_{\rm H}$=(8.7$\pm$0.4) $\times$ 10$^{22}$ cm$^{-2}$. \textit{Borus} also allows for a Comptonised continuum via the table \textit{borus11\_v190815a.fits}. We thus refitted the spectra adopting this novel table, substituting the cut-off power-law by \textit{nthcomp} \cite[][]{Zdziarski1996,Zycki1999} and tying the equivalent parameters between the two models. The model yielded a best-fit of $\chi^2$=686 for 563 d.o.f, fully compatible with the previous one. Aside from a slightly steeper photon index ($\Gamma$=1.71$\pm$0.01), a very high temperature of kT>115 keV is implied and, under the assumption of a spherical corona, we derived an optical depth of $\tau$<1.2. All the other parameters are consistent with the previous fit.\\ \indent It is worth noticing that irrespectively from the model adopted, matter on/out of the line of sight has a column density smaller than the threshold for Compton-thick regime, this further confirming the emission spectrum of NGC 2992 to be globally Compton-thin. \section{Very short term spectral properties} \cite{Marinucci2020} presented a time resolved spectral analysis on 50 \textit{EPIC-pn} slices (each $\sim$5 ks long). We here perform a further step re-analysing the same spectral chunks adding \textit{NuSTAR} when available and replacing the phenomenological model presented in that paper with the best-fit model discussed in Sect. 4.3. In particular, we seek for short variations of the continuum shape and normalisation and its associated reflected component \textit{MyTorusS}.\\ \begin{figure*} \centering \includegraphics[width=\textwidth]{time_resolved_paperbis.pdf} \caption{\small{Best-fit for the two \textit{XMM-Newton} orbits and the accompanying \textit{NuSTAR} data. Xs and Xh account for the soft (0.5-2 keV) and hard (2-10 keV) fluxes, respectively. Units and multiplicative factors for the parameters are given in Table~\ref{xmmtimeresolved}.}} \label{xmmtime_resolved} \end{figure*} \indent For each spectral chunk, we computed the photon index and the normalisation of the continuum and, for the reflected component \textit{MyTorus}, the column density and its normalisation. In \cite{Marinucci2020} the presence of the Fe He$\alpha$ and Fe Ly$\alpha$ plus a variable red component has already been presented. To account for these features, we relied on the best-fit model presented in that paper, but we recalculated the line normalisations as we have adopted a different continuum. Finally, for the \textit{apec} and \textit{CLOUDY} components considered the best-fit values from Table~\ref{xmmaverage}, but allowed to vary their normalisations.\\ \indent This fitting strategy provided a good representation for all the spectral slices, see Fig.~\ref{slices1} and Fig.~\ref{slices2}, and allowed us to infer the best fit parameters in Table~\ref{xmmtimeresolved}. The same quantities are also shown in Fig.~\ref{xmmtime_resolved}. From this figure, we notice that prominent flux variability of the soft and hard X-ray bands does not correlate with the absorbing column density, nor the source spectral shape, suggesting that the variability in NGC 2992 is intrinsic, or in other words, it is not driven by absorption changes. We also notice that both $\Gamma$ and N$_{\rm H}$ had a fairly constant value during the observation and, besides a few exceptions, they are consistent with the average values of $\Gamma$=1.68$\pm$0.03 and N$_{\rm H}$=(7.7$\pm$0.2)$\times$10$^{21}$ cm$^{-2}$, respectively. In a similar fashion, the reflected component does not vary significantly between the exposures and is consistent with originating from Compton-thin material, where N$_{\rm H}$=(6.3$\pm$2.4)$\times$10$^{22}$ cm$^{-2}$. \section{Discussion and conclusions} NGC 2992 is a X-ray bright AGN that has been repeatedly observed by all the major X-ray facilities. The hallmark of its emission is the significant variability of the primary continuum that has now a $\sim$40 year long light curve, see Fig. \ref{history}. \begin{figure*} \centering \includegraphics[width=\textwidth]{history.pdf} \caption{\small{The historical 2-10 keV light curve of NGC 2992 as observed with various X-ray satellites. We address the reader to the paper by \citet{Yaqoob2007} and references therein, for details on data taken before 2008. Data collected after 2008 were presented in \citet[][]{Marinucci2018,Marinucci2020} and this paper. The 2-10 keV flux derived using \textit{NuSTAR} data taken in 2019 is consistent with the one derived from \textit{XMM-Newton} orbit 2, thus we did not included it in this plot.}} \label{history} \end{figure*} In this paper we focused on data taken after 2019 analysing a rich collection of X-ray observations of NGC 2992. In particular, by exploiting \textit{Swift}, \textit{XMM-Newton} and \textit{NuSTAR} data, we derived both temporal and spectral properties for this source over different timescales, from hours to years. In the following, we summarise and discuss our main findings. \\ \noindent \textbf{Timing properties}: \\ The light curves show the source to vary at significant levels. Daily to yearly variations can be observed in Fig.~\ref{swift_lc}, where the 2-10 keV flux varied by up to a factor of $\sim$5 increasing up to a factor of $\sim$10 when extending the observing time interval to $\sim$1 year. This factor further increases comparing archival observations taken during 2006 with those of 2019. Remarkable flux changes of about $\sim$60\% were observed down to kilo second timescales in the 1-3 keV and 3-10 keV bands, see Fig.~\ref{2992lc}. Interestingly, the larger variations were only observed in the first \textit{XMM-Newton} orbit as, in the second one, smaller amplitude changes were observed. Aside from counts below 1 keV dominated by a constant ionised component likely emerging from the Narrow Line Region, the variations in the soft and hard X-rays are of a similar amount. Further evidence of this comes from the consistent shapes of soft and hard SFs in Fig.~\ref{SF}. The lack of a correlation between the hardness ratios and the total flux in Fig.~\ref{swift_ratio} allows us to rule out fast obscuration events to cause the variability which is, instead, intrinsic to the continuum emission dominating the 1-10 keV energy range, see Fig.~\ref{correlation}.\\ \indent The two \textit{Swift} monitoring periods also revealed that the source underwent two different variability levels, see Figs.~\ref{SF} and ~\ref{fvar}, where the lower flux state correspond to larger variations. On the other hand, when comparing the excess variance spectra derived from \textit{XMM-Newton}, the opposite trend is observed. In fact, the exposure with larger flux is also the more variable, see Fig.\ref{fvarx}. The former trend has been explained invoking the presence of N randomly flaring sub-units \citep[e.g.][]{Nandra1997,Almaini2000}, and, although it matches the flux changes for the NGC 2992 SFs and in the Fvar spectra (see Fig.~\ref{SF} and Fig.~\ref{fvar}), we notice that log normal flux distribution commonly observed in AGN strongly limits the possible number of uncorrelated active regions \citep[][]{Uttley2005}.\\ \indent Finally, the high S/N allowed us to fit the excess variance spectra following the prescriptions by \cite{Parker2020}. We successfully tested on our spectra a simple variability model due to the primary continuum with a damping in the Fe K$\alpha$ and in the soft X-ray regions due to the constancy of the reflected and scattered emission. The spectra of both orbits are accounted fairly well by the model. Interestingly, a strong excess around 5 keV is observed in both observations and it is stronger in orbit 2, in agreement with the variable red flaring emission component reported in \cite{Marinucci2020}. From the fit, we found the variance of power-law flux in logarithmic scale to be $\sim$3 times larger in orbit 1 with respect to orbit 2. Moreover, this fit agrees with the nuclear X-rays to dominate the X-ray emission of NGC 2992.\\ \noindent \textbf{Spectral properties}:\\ \noindent The main component shaping the X-ray emission of NGC 2992 is the absorbed primary continuum. The time-average analysis of the two \textit{XMM-Newton} orbits and the \textit{NuSTAR} exposure were consistent with a fairly hard power-law ($\Gamma\sim$1.7) and a line of sight absorbing column density of N$_{\rm H}\sim$8 $\times10^{21}$ cm$^{-2}$, see Table~\ref{xmmaverage} and Fig.\ref{timeaverage}. Our findings are consistent with those based on \textit{XMM-Newton} and \textit{Suzaku} data presented in \cite[][]{Laha2020}. Moreover, these parameters are fully consistent with those derived on the same data, but via a time resolved analysis, (see Table~\ref{xmmtimeresolved} and Fig.~\ref{xmmtime_resolved}) and also with the values inferred from each of the 123 \textit{Swift} snapshots, Table~\ref{swifttable} and Fig.~\ref{swift_bestfit}. Seeking for the presence of a high energy cut-off we found E$_{\rm cut}$>390 keV. This value is significantly high, especially when compared with the median values for the high energy cut-off of 240 keV and 340 keV as found for a sample of obscured AGN by \cite{Balokovic2021}. The peculiar properties of the NGC 2992 hot corona are further confirmed when testing a Comptonisation continuum where we derive an electron temperature kT>115 keV and an opacity $\tau$<1.2. The comparison with the coronal properties measured by \cite{Middei2019} reveals the corona in NGC 2992 to be rather extreme, as its properties are compatible only with those of NGC 5506 \cite[][]{Matt2015}. On theoretical grounds, the electron temperature and opacity of the hot corona are responsible for the observed photon index and high energy cut-off, however, despite the large changes in the X-ray flux the spectral properties of the source remain rather constant. The high temperature of the hot plasma in NGC 2992 can possibly explain such a decoupled variability. In accordance with Fig. 6 in \cite{Middei2019} (where iso-$\Gamma$ and iso-E$_{\rm cut-off}$ curves are drawn on the opacity-electron temperature parameter space), to observe a $\Delta\Gamma=0.2$ we need to increase the temperature assuming the coronal opacity not to vary. This increase depends on the actual coronal temperature: if we consider kT=115 keV, consistent with what found in NGC 2992, and kT=50 keV \cite[in agreement with the average temperature of the hot coronae studied in][]{Middei2019}, from $\Gamma=1.7$ to $\Gamma=1.5$ (1.9) we need to increase(decrease) the temperature by a factor of 35\% (25\%) or 20\% (10\%), respectively. Another possible explanation for the decoupled amplitude-spectral variations is discussed in a recent paper \cite[][]{Fernandez2022} where the authors suggest a bulk variation of the Comptonising plasma. For instance, magnetic reconnection events occurring in the close surroundings of the disc may alter the hot plasma \cite[e.g.][]{Poutanen1999,deGouveia2010}. A flare of the hot corona would then boost the number of disc photons affecting the X-ray luminosity but not the spectral shape of the X-ray emission.\\ \indent Distant reflection off an obscuring torus (N$_{\rm H}$=9.6$\pm$2.7) $\times10^{22}$ cm$^{-2}$) accounts for the small spectral curvature in the hard X-rays and its associated narrow Fe K$\alpha$ emission line at 6.4 keV. The reflected spectrum and the Fe K$\alpha$ have a constant behaviour both on hourly and yearly timescales. In fact, no correlation between the \textit{MyTorus} tables and the primary continuum was found and can be ascribed to reflection from cold, distant material, likely the obscuring torus itself. However, the modest broadening of the Fe K$\alpha$ fluorescence line supports the presence of an additional weak (EW$\sim$20 eV) component contributing to the whole flux of this emission feature. This second Fe K$\alpha$ emission component is likely emerging from matter closer with respect to the molecular torus, e.g. the BLR \cite[e.g.][]{Marinucci2018} and may explain the variable emission signature found by \cite{Guolo2021}. We also notice that the K$\alpha$ flux varied by about a factor of 4 compared to the low flux observation in \cite{Marinucci2018}. Moreover it would agree with the findings by \cite{Ghosh2021} that showed the flux of the Fe K$\alpha$ emission line to follow the changes of the primary continuum on yearly timescales. Finally, the 2019 does not require a Fe K$\alpha$ emission line as broad as the one found in the 2003 \textit{XMM-Newton} observation \cite[e.g.][]{Nandra1997,Brenneman2009,Shu2010}. In the time resolved analysis, the adoption of a single narrow component accounting for this variable fraction of the Fe K$\alpha$ flux is not required by the data, as \textit{MyTorus} already provides a good representation of the Fe K$\alpha$ on 5ks timescales. Finally, transient emission lines have recurrently been observed during the two \textit{XMM-Newton} orbits, see Fig.~\ref{xmmtime_resolved}, and we address the reader to \cite{Marinucci2020} for details.\\ \indent NGC 2992 has been observed at different flux levels (e.g. Fig.~\ref{history}) and in \cite{Marinucci2018} a detailed analysis of XMM-Newton exposures of this object is presented. In order to provide an holistic view of the spectral properties of the central engine in NGC 2992, we tested our 2019 best-fitting model (model 1 presented in Sect. 4.3) on the exposures where the source was found in its lowest and highest states. In particular, we considered the \textit{XMM-Newton} archival observations taken on 2003-05-19 and 2010-11-28 (Obs.IDs. 0147920301\footnote{This exposure, taken in full frame observing mode, is severely affected by pile-up. To mitigate this issue, we used an annular region to extract the source spectrum with r$_{\rm in}$ and r$_{\rm out}$ being 10'' and 40'', respectively.} and 0654910901, respectively). We thus reproduced them directly adopting the best-fit model found for orbit 2 and show it in Fig.~\ref{timeaverage}. We accounted for the different flux states computing the normalisation of the primary emission, its associated reflected component, and the one of the \textit{apec} and \textit{Cloudy} tables. All the other parameters have been kept fixed to their corresponding best-fit values already quoted in Table~\ref{xmmaverage}. Moreover, to account for the broad emission line found required by the 2003 data, we added a Gaussian component whose width was kept fixed to $\sigma$=400 eV, in accordance with what literature papers \cite[e.g.][]{Nandra1997,Shu2010}. This basic procedure led us to the fits shown in Fig.~\ref{low}, with statistics of $\chi^2$/d.o.f.=218/170 and $\chi^2$/d.o.f.=181/140. In the high flux level, (F$_{\rm 2-10~keV}$=(9.5$\pm$0.1) $\times$10$^{-11}$ erg cm$^{-2}$ s$^{-1}$), the normalisation of the power-law is Norm$_{\rm po}$=(3.00$\pm$0.01)$\times10^{-2}$ ph.\,keV$^{-1}$\, cm$^{2}$ s$^{-1}$, about twice of what found in 2019 while the amount of reflected flux is fully consistent with what found in 2019 as we obtained Norm$_{\rm MyTorus}$=(9.7$\pm$3.7)$\times10^{-2}$ ph.\,keV$^{-1}$\, cm$^{2}$ s$^{-1}$. On the other hand, in the 2010 low flux level exposure (F$_{\rm 2-10~keV}$=(2.9$\pm$0.2) $\times$10$^{-12}$ erg cm$^{-2}$ s$^{-1}$), we found the power-law normalisation to be Norm$_{\rm po}$=(4.7$\pm$0.2)$\times10^{-4}$ ph.\,keV$^{-1}$\, cm$^{2}$ s$^{-1}$ about 20-30 times lower than in 2019. The normalisation of the reflected component modelled using \textit{MyTorus} is Norm$_{\rm MyTorus}$=(9.5$\pm$1.2)$\times10^{-3}$ ph.\,keV$^{-1}$\,$\rm cm^{2}$\,s$^{-1}$, a factor of $\sim$10 less than in 2019. Therefore, on very long timescales and during a prolonged low state of the source in 2010, the strength of the reflector appears to respond to the continuum. However, the smaller value of the reflected component found in 2010 can be explained by the torus reflecting the primary continuum of NGC 2992 during a low flux state. Observing the light curves in Fig. \ref{swift_lc}, before 2010 NGC 2992 was observed in a very low flux state, even lower than the one in 2021. Such a long term adjustment suggests that reflected spectrum emerges far from the central engine. Finally, in accordance with previous studies, the Fe K$\alpha$ emission line of NGC 2992 has an unresolved component correlating with the primary flux and emerging from the Broad Line Region. However, the current \textit{MyTorus}-based model accounts for whole Fe K$\alpha$ flux (see residuals in Fig.~\ref{low}) and data do not require any additional Gaussian component. Below 1 keV, the non-variable behaviour of the distant scattering off the NLR can be witnessed in the top panels of Fig.~\ref{2992lc} or in the first bin of the excess variance spectra in both Fig.s~\ref{fvar} and ~\ref{fvarx}.\\ \indent In conclusion, the X-ray emission of NGC 2992 is due to a remarkably variable power-law-like continuum, possibly associated with a very hot corona, that is absorbed and reflected by gas whose N$_{\rm H}$<1.5$\times$10$^{24}$ cm$^{-2}$ (globally Compton-thin). The strong amplitude variations coupled with the very weak spectral changes are somehow suggesting the hot corona in NGC 2992 to be rather peculiar, and additional efforts must be made to clarify the physical properties of this medium. \begin{figure} \centering \includegraphics[width=\columnwidth]{finale_comparison.pdf} \caption{\small{Fit to the high (purple) and low (dodgerblue) flux states data using model 1 presented in Sect. 4.3 and based on the 2019 \textit{XMM-Newton/NuSTAR} exposures.}} \label{low} \end{figure} \section{Acknowledgements} We thank the referee for her/his useful comments. Part of this work is based on archival data, software or online services provided by the Space Science Data Center - ASI. “This work has been partially supported by the ASI-INAF program I/004/11/4. RM acknowledges financial contribution from the agreement ASI-INAF n.2017-14-H.0. SB acknowledges financial support from ASI under grants ASI-INAF I/037/12/0 and n. 2017-14-H.O. BDM acknowledges support via Ram\'on y Cajal Fellowship RYC2018-025950-I. AL acknowledges support from the HORIZON-2020 grant “Integrated Activities for the High Energy Astrophysics Domain" (AHEAD-2020), G.A. 871158). This work is based on observations obtained with: the NuSTAR mission, a project led by the California Institute of Technology, managed by the Jet Propulsion Laboratory and funded by NASA; XMM-Newton, an ESA science mission with instruments and contributions directly funded by ESA Member States and the USA (NASA). \section{Data availability} The \textit{XMM-Newton} data can be downloaded directly from the mission archive at the web page \url{https://www.cosmos.esa.int/web/xmm-newton/xsa}, while \textit{NuSTAR} and \textit{Swift} exposures can be easily downloaded using the \textit{BROWSE} tool at the web pages \url{https://heasarc.gsfc.nasa.gov/cgi-bin/W3Browse/w3browse.pl} or from the official mirror archives hosted by the Space Science Data Center of the Italian Space Agency \url{https://www.ssdc.asi.it/mma.html}. \bibliographystyle{mnras} \input{NGC2992REVISEDBIS.bbl} \clearpage \onecolumn
\section{Conclusions}\label{chap:conc} We created spatially-resolved stellar mass maps of over 400 cluster and field galaxies in the Hubble Frontier Fields through SED-fitting the integrated flux of spatially binned images to investigate the underlying stellar mass. S\'ersic profiles were fit directly to these stellar mass maps in order to quantify their morphology in terms of two parameters: the S\'ersic index ($n_{mass}$), and the effective radius, also called the half-mass radius ($R_{mass}$). This was done to explore the relative roles of self-quenching and environmental quenching under the assumption that environmental processes do not cause significant changes in the underlying stellar mass distribution of galaxies. \vspace{-2mm} \begin{itemize} \item{The S\'ersic indices obtained from modeling stellar mass profile of galaxies are consistent with those measured from the 2-D $H$-band light profile. The effective radius of stellar mass profiles however are on average smaller by 7.6$\pm1.6$\% for cluster galaxies and 4.9$\pm1.5$\% for field galaxies. There is still an outshining bias in infrared filters, but it is only a small bias. This is more pronounced for higher mass galaxies, which can have up to $22\%$ difference in effective radius between F160W flux and stellar mass.} \item Assuming that the quiescent galaxies in the clusters that are morphologically similar to star-forming galaxies in the field are their descendants, we can conclude that at $0.25 < z < 0.6$ there is a mass dichotomy in galaxy quenching, where less massive galaxies are more likely to be environmentally quenched while also retaining a disk-like morphology. \vspace{-2mm} \item If we take the disk quenching efficiency to be the environmental quenching efficiency, it decreases with increasing stellar mass. Environmental quenching is also dominant at $M_\star < 10^{9.5} M_\odot$, accounting for $\sim75.8\%$ of quenching below that mass limit (see right panel of Figure \ref{fig:qfrac}). \vspace{-2mm} \item Mass and environmental effects are not separable at $0.25 < z < 0.55$ when it comes to how they correlate with quenching efficiency. In addition, \S \ref{chap:disc} discussed other forms of environmental quenching that can change a disk-like profile into a more bulge-like profile, such as tidal heating. Tidal effects, which are related to the environmental density can also induce self quenching for more massive galaxies, such as AGN feedback. \vspace{-2mm} \end{itemize} This leads to the conclusion that the effects of stellar mass and environment on quenching are not separable at $0.25 < z < 0.6$. Our results confirm that for environmental quenching, there is indeed a mass dependence, which agrees with the results in \cite{B2016,D2016,Li2017,P2019}. In addition, we also find that there is a morphological dichotomy between low mass and high mass quenched satellites in clusters, which means different methods of quenching dominate at different stellar masses for the regions of the universe with the highest densities. There has been evidence that at redshifts greater than $z \sim 1$, quenching mechanisms are not easily separated into environmental or mass quenching. This work shows that at intermediate redshifts between 0 and 1, these quenching efficiencies are different from the local universe. \section{Data Sample\label{chap:data}} \subsection{HFF DeepSpace catalog\label{sec:data1}} We utilized the Hubble Frontier Fields Deep Space catalog (HFF, release paper \citealt{L2017,S2018}) for this analysis. The galaxy catalog contains six lensing clusters at redshifts of $0.3 < z < 0.6$ and six flanking fields imaged with UV, optical, and NIR with the Advanced Camera for Surveys (ACS) and Wide Field Camera 3 (WFC3) on the Hubble Space Telescope (HST). For this study, we create stellar mass maps using the deep, high-resolution HST imaging. The native pixel resolution for WFC3/UVIS is 0.04"~pixel$^{-1}$, for ACS is 0.049"~pixel$^{-1}$, and for WFC3/IR is 0.128"~pixel$^{-1}$. The reddest filter used for HST imaging is F160W on WFC3, which has a PSF FWHM of $\sim0.177"$. The FWHM of the PSF for F814W, the reddest filter on HST's ACS is $\sim 0.099"$. The angular diameter distance at the redshift of the clusters (0.25 $< z <$ 0.6) implies a physical scale of 5.41 -- 9.24 kpc arcsec$^{-1}$. Based on the WFC3 and ACS PSF size, this implies an angular resolution of 0.96 -- 1.64 kpc per PSF FWHM. In addition to the HST data, imaging and photometry is available from both VLT/HAWK-I and Keck/MOSFIRE in the K-band, and Spitzer/IRAC in the 3.6 -- 4.5 $\mu m$ bands. The average PSF FWHM for the Frontier Fields in the K-band is $\sim 0.4$" \citep{Br2016} and the IRAC PSF FWHM is $\sim1-2$". These data provide angular resolutions 3 - 10 times worse than the HST imaging and therefore were excluded from the stellar mass map construction. We note that the derived values of the integrated stellar masses in the Deep Space catalog include this poorer angular resolution photometry. As we show in $\S$\ref{chap:method}, our total stellar masses derived from just the HST imaging are consistent with the stellar masses determined including the K-band and IRAC data in the DeepSpace catalogs, and therefore the exclusion of those bands does not affect our results. Although the HFF catalogs contain up to 17 filters across all three cameras, not every cluster was imaged with all the available filters. The number of available filters ranges from 9 for Abell 2744 to 17 for MACS0416 and MACS1149. For the flanking fields, each of the pointings have 7 filters except for the parallel field of MACS0416, which was imaged with 11 filters. Each cluster and parallel field catalog has roughly 5000-8000 objects. Table \ref{data:catalogtable} lists the filters used to image each pointing, and the exact number of objects. We refer the reader to \cite{S2018} (shortened to S18) for complete details on the photometric catalog construction process. \input{Table1} \normalsize \subsection{Sample Selection}\label{sec:data2} The HFF Deep Space catalog has a 90\% completeness at an AB magnitude for the F160W filter ranging from 28.1 to 28.7 for the deepest region (denoted ``reg1"), and 27.0 to 26.1 for the shallowest region (denoted ``reg3", see S18 for details on how completeness was calculated). In order to determine the limiting stellar mass for our sample, we compare the AB magnitude versus integrated stellar mass. For objects that have a magnitude of 26 in the F160W band, the average integrated stellar mass in the catalogs is $\sim 10^{8.5} \hbox{${ M}_{\odot}$}$ at our redshift limit of $z\sim 0.6$. In order to retain a highly complete sample, we chose a stellar mass limit of $10^{8.5} \hbox{${ M}_{\odot}$}$ for the entire sample. This low mass limit allows us to study the environmental effects of low-mass galaxies in the cluster. Some of the brightest galaxies in the cluster have significant extended light due to the depth of the imaging. This extended light interferes with photometry of fainter galaxies, especially in the NIR. These galaxies have been modeled out by S18 and are referred to as ``bCGs" or bright cluster galaxies. This means objects that are not the brightest cluster galaxy (BCG, with $\hbox{${M}_{\star}$} \geq 10^{12} \hbox{${ M}_{\odot}$}$), such as galaxies with masses of $10^{10.5} \hbox{${ M}_{\odot}$} - 10^{11.5} \hbox{${ M}_{\odot}$}$, are considered ``bCGs". The bCGs were modeled out based on the method outlined in \cite{F2006} (See \S3.1 of \cite{S2018} for more details on bCG modelling for the Frontier Fields' clusters). Fortunately the bCG photometry is preserved in the original images and can still be used for analysis after PSF-matching to F160W resolution. Including the ``bCGs" allows us to model a mass-complete population from $10^{8.5} \hbox{${ M}_{\odot}$} - 10^{12.0} \hbox{${ M}_{\odot}$}$ \begin{figure*} \centerline{\includegraphics[width=0.8\textwidth]{selected_galaxies_all_clu.pdf}} \caption[Stellar mass and redshift distribution of the cluster sample.]{Plots showing redshift vs. stellar mass, demonstrating how the cluster sample of galaxies was selected. Black dot-dashed line shows where cluster redshift is, and blue dashed lines show $z_{cluster} \pm0.05$ redshift range where the cluster sample galaxies will be selected from. Only objects with spectroscopic redshifts are plotted, which is 3-5\% of the entire catalog. ``Flagged" objects are ones where their aperture is overlapping a masked region, or they have any bad flux/error/weight value (i.e. negative, NaN/Inf) for pixels associated with a source in the segmentation map. }\label{fig:clu-sample} \end{figure*} \begin{figure*} \centerline{\includegraphics[width=0.8\textwidth]{selected_galaxies_all_par.pdf}} \caption[Stellar mass and redshift distribution of the flanking fields sample.]{Plots showing redshift vs. stellar mass demonstrating how the field sample of galaxies was selected. The vast majority of the objects in the parallel fields do not have spectroscopically confirmed redshift so the exclusion range around the cluster is $z_{cluster} \pm0.1$ instead. $z_{phot}$ values are plotted when the object has no $z_{spec}$ value. Selected galaxies are indicated by the light blue circles. Flagged objects follow the same rules as applied to the cluster sample. Blue dashed lines indicate the redshift boundaries for the field sample ($0.25 < z < 0.6$). }\label{fig:par-sample} \end{figure*} \subsubsection{Cluster sample}\label{sec:data-clu} It is important to have a pure cluster sample for determining the environmental effects of quenching. For the cluster sample, only objects with spectroscopically-confirmed redshifts are included. Spectroscopic selection is essential because for objects that have both a $z_{phot}$ and a $z_{spec}$, 17\% of them have a difference of $>20\%$ between the two redshifts. In addition, 44\% of these objects have $z_{phot}$ measurements that are more than 0.05 off from their $z_{spec}$ measurements. Given that the typical velocity dispersion of the HFF clusters implies a redshift range of $\pm$ 0.05 - 0.08 for members, this means photometric redshifts are not precise enough to definitively determine which objects are cluster members. In order to minimize the interloper fraction we make a redshift cut for each cluster to only include galaxies that are within $ \pm 0.05$ of the cluster's redshift to make sure that only objects within the cluster's virial radius are selected. The six clusters each have a virial mass from $\sim 1 \times 10^{15} \hbox{${ M}_{\odot}$}$ to $\sim 3\times10^{15}\hbox{${ M}_{\odot}$}$. The $R_{200}$ of the clusters are between 1.89 -- 2.57 Mpc (See Table \ref{table:R200} and \citealt{L2017} for more details.) For the clusters, we also include the bCGs in our sample to add more objects with higher stellar mass, in the range of $10^{10} - 10^{11.5} \hbox{${ M}_{\odot}$}$. Since these galaxies were subtracted from the original images before the detection image was created, their total flux was not determined using the segmentation map created by \textsc{SExtractor}, but through the process of modelling with isophotes as described in \S \ref{sec:data1}. Their total integrated flux is listed in the HFF Deep Space catalogs along with the non-bCG galaxies' fluxes. Figure \ref{fig:clu-sample} displays all of the galaxies that were selected to be in the cluster sample as light blue circles. Any objects flagged according to the catalog are removed, and displayed in Figure \ref{fig:clu-sample} as other symbols. Redshift limits are marked with dashed blue lines that represent $z_{cluster}\pm 0.05$. After applying our selection criteria, the number of cluster galaxies in our sample is 400. \subsubsection{Field sample}\label{sec:data-par} For the field sample, precise redshifts are not a necessary requirement for selection of galaxies like in the cluster sample. Therefore, selecting a sample based on photometric redshifts is sufficient. The flanking/parallel fields also do not have many objects with spectroscopically confirmed redshifts. If we excluded all objects without a confirmed $z_{spec}$, the sample size would be too small for proper statistical analysis (our parallel field sample would comprise of only around 40 galaxies in total). Due to the small number of spectroscopically confirmed redshifts, we substituted the photometric redshift ($z_{phot}$) for any objects that do not have a $z_{spec}$ measurement. The photometric redshifts for the Frontier Fields objects were obtained via the code \textsc{EAzY} \citep{B2008}. The redshift range chosen for selecting the field sample is $0.25 \leq z \leq 0.6$. However, the galaxies with redshifts within $\pm$ 0.10 of the cluster's redshift are excluded. We omit a wider redshift range around the clusters in the parallel fields to be conservative because $z_{phot}$ measurements are less precise. Nevertheless, the parallel fields will likely still contain some cluster members if we include galaxies with $z_{phot}$ measurements close to the clusters' redshifts, because the distance from the cluster center to the center of their respective parallel fields is approximately the $R_{200}$ of the clusters. Using a wider redshift cut around the clusters ensures the low-density field sample does not have any contamination from cluster members, giving a ``true" field sample. Figure \ref{fig:par-sample} is a redshift vs. stellar mass plot similar to Figure \ref{fig:clu-sample}, but it does not show all of the unselected objects due to size of the catalog. 10\% of the full catalog's unselected objects are plotted in the Figure. The selected objects are however, displayed in their entirety. As mentioned in \ref{sec:data1}, certain galaxies in the parallel field images were also flagged as bCGs according to their sizes or because their light profiles are affected by a number of nearby galaxies. Our field sample contains 96 galaxies after applying all selection criteria. \begin{figure*} \centerline{\includegraphics[width=0.7\textwidth]{UVJ_diagram_new_BCGs.pdf}} \caption[UVJ diagram to separate star-forming and quiescent galaxies]{ The UVJ diagram for cluster galaxies (left) and field galaxies (right). The contours show U-V vs. V-J for the entire catalog, while the coloured points are the galaxies that made it into our final sample. Red and orange points are the quiescent galaxies, and the blue and cyan points are the star-forming galaxies for cluster and field, respectively. The boundaries for the UVJ diagram are from \cite{S2018}. \label{fig:uvj1}} \end{figure*} \fontsize{9}{9}\selectfont \input{R200table} \normalsize \subsubsection{Dividing the Cluster and Field samples by Star-formation activity}\label{sec:data-uvj} The cluster and field samples are further divided into quiescent and star-forming based on their position on the UVJ diagram \citep{Wi2009} in Figure \ref{fig:uvj1}. The boundaries between star-forming and quiescent for the UVJ diagram are the same as from S18, which are defined by the equations \begin{linenomath*} \begin{align} U-V< 1.3 \text{ for } V-J< 0.75 \label{eqn:uvjbound1} \;\;,\\ U-V< 0.8(V - J) + 0.7 \text{ for }(V-J) \geq 0.75 \label{eqn:uvjbound2} \;\;. \end{align} \end{linenomath*} The reason for dividing the sample into different types defined by both their environment and their star-formation rate is for two purposes. Firstly, it shows how environment on its own affects the percentage of galaxies that are quiescent. Secondly, we quantify similarity in morphology through similarity in 2D profile fitting parameters. This is to link progenitors in the field with descendants in the cluster in a statistical way, which is based on the assumption that the distribution of stellar mass is conserved as galaxies undergo environmental quenching. \begin{figure*} \centerline{\includegraphics[width=0.8\textwidth]{processimg_1.pdf}} \caption{The summary of the steps for constructing the resolved stellar mass maps for one cluster galaxy.}\label{fig:process} \end{figure*} Panels in Figure \ref{fig:uvj1} show the UVJ colour diagram where the star-forming and quiescent galaxy samples are defined for both clusters (left panel) and field (right panel). The coloured points correspond to the colour distributions of the galaxies in our selected cluster member and field samples. There are significantly more quiescent galaxies in the clusters (red points) than in the field (orange points), and likewise, more star-forming galaxies in the field (cyan points) than in the cluster (blue points). We will be focusing on how the star-formation activity and the environment both affect the morphology of our galaxy sample in the analysis in \S\ref{chap:results}. \section{Discussion}\label{chap:disc} \subsection{Dichotomy of quenching in cluster environments}\label{sec:disc-cluquench} We have shown that a sizable portion (around 42\%) of our sample are quiescent cluster galaxies that have stellar mass distributions that fall within 1$\sigma$ of the star-forming field galaxies within their respective mass bins. These disk-like quiescent galaxies dominate the number of galaxies at $M_\star \lesssim 10^{9.5} M_\odot$. However, the majority (around 58\%) of the quiescent galaxies are still morphologically quite different from star-forming galaxies, and they are predominantly at a higher stellar mass. This morphological difference, which is measured with the S\'ersic index and effective radius, is present in both the infrared light as well as the stellar mass distribution. For massive galaxies, it is possible that secular processes or feedback are more common, and they change the distribution of stellar mass as they quench the galaxy. Otherwise, the trends presented in Figures \ref{fig:qfrac} and \ref{fig:qeff} between the bulge-like population's quenched fraction and quenching efficiency would not have the observed relation with $\hbox{${M}_{\star}$}$. It has been shown that AGN feedback increases with total $\hbox{${M}_{\star}$}$, as well as increasing bulge-to-total ratio (i.e. \citealt{Pfenniger:1990,Rafferty:2006,L2014,Bruce:2016}) As stellar mass increases, the disk-like quenched fraction becomes the minority in clusters. Assuming that stellar mass remains conserved, this implies that self-quenching will come to dominate over environmental quenching. This is supported by the quiescent cluster galaxies' $M-n_{mass}$ relation becoming constant when $M_\star \gtrsim 10^{9.5}M_\odot$. In addition, the mass-size relation of quiescent cluster galaxies (bottom left panel of \ref{fig:allparams}), has a relatively consistent slope in the same mass range, confirming that the constant $n_{mass}$ observed is not a quirk of the distribution, but quiescent cluster galaxies in this mass range seem to be preferentially self-quenched. There is significantly less, but still a non-zero amount of bulge-like quiescent objects with stellar masses from $10^{8.5}M_\odot < M_\star< 10^{9.5}M_\odot$. Quenching processes that increase the bulge-to-disk ratio of galaxies can stem from tidal effects. Tidal stripping, as opposed to ram pressure stripping, does act on the stars of an infalling satellite galaxy in a way that would disrupt the star-forming disk \citep{M1984, CZ2004}. Tidal heating is a process where tidal forces increase the random motion of stars in a satellite (also called kinematic heat), making its shape more bulge-like. There is also the possibility of several quenching methods occurring at the same time for these galaxies, which results in the variety of S\'ersic indices and spread in half-mass radii seen in the cluster quiescent sample. In simulations, tidal effects were shown to produce S0s from galaxies with AGN (Seyfert galaxies), while ram pressure stripping primarily affects the outer regions \citep{BV1990}. If tidal effects trigger AGN, and that leads to AGN feedback, then this is a viable quenching pathway for the quiescent galaxies on the more massive end of our sample \citep{B2010, M2010}. Some of the low mass but high S\'ersic index objects may also be red nuggets (low mass compact quiescent galaxies) that formed and quenched at an earlier time and fell into the cluster \citep{Z2015}. \subsection{Framework of environmental quenching}\label{sec:mass-and-quenching} Environmental quenching, mostly through ram-pressure stripping is dominant at low stellar mass, and mass/self-quenching is dominant at high stellar mass. The reason that lower mass galaxies are more likely to be environmentally quenched can be explained by how ram-pressure stripping operates. As \citeauthor{GG1972} explains, the ram pressure ($P_{ram}$) comes from the gas density of the intracluster medium, or ICM ($\rho_{ICM}$), and the velocity of the infalling galaxy (equation 61 in \citeauthor{GG1972}). \begin{linenomath*} \begin{equation} P_{ram} \approx \rho_{icm} v^2, \label{eqn:ram-pressure} \end{equation} \end{linenomath*} There is a restoring force from the galaxy's disk that counteracts $P_{ram}$ (equation 62 in \citeauthor{GG1972}), which depends on the surface mass density of both the stars ($\sigma_s$) and the gas ($\sigma_g$). \begin{linenomath*} \begin{equation} F_{restore} = 2\pi G \sigma_s\sigma_g, \label{eqn:restore-force} \end{equation} \end{linenomath*} The stellar mass maps show that the surface densities of lower-mass galaxies are lower than high-mass galaxies. This seems to explain why the $n_{mass} - \log(\hbox{${M}_{\star}$})$ relation (top left panel in Figure \ref{fig:allparams}) for the quiescent cluster population is not just linear, but has two plateaus, with the ``cliff" between the plateaus at $\hbox{${M}_{\star}$} {\sim} 10^{9.5} \hbox{${ M}_{\odot}$}$. Since the $R_{mass}-\log(M_\star)$ relationship only has a shallow upward slope, that implies the surface density of quiescent cluster galaxies that have $M_\star \gtrsim 10^{9.5} M_\odot$ is greater, and thus they are less prone to being ram pressure stripped. But the quiescent cluster population is already quenched, so their S\'ersic parameters do not reveal what their precursor properties would have been before quenching occurred. Examining the star-forming galaxies both in the field and in the clusters, the star-forming field sample's $n_{mass}$ does not depend on stellar mass while the star-forming field sample's $R_{mass}$ is proportional to $\log{M_\star}$. The star-forming galaxies in the cluster seem to have similar relationships with stellar mass, except the more massive star-forming cluster sample have a slightly higher S\'ersic index ($n_{mass} \sim 2$ instead of $n_{mass} \sim 1.5$). If we assume the precursors to the quiescent cluster sample were morphologically similar to both the star-forming populations in the cluster and the field, then their surface mass density would only have a weak dependence on stellar mass. This implies the possibility that RPS operates equally among all masses of galaxies but other quenching methods dominate over RPS over a certain stellar mass limit. \subsection{Ram pressure stripping and morphology}\label{sec:disc-RPS} \subsubsection{Velocity, stellar mass density, and gravity} As a galaxy falls through the ICM, the stars remain in place while the gas is stripped away by interactions of the gas in the galaxy's halo with the gas in the ICM. There is some geometry involved to determine how much of the gas is stripped off the galaxy; edge-on infalling disks would lose $\sim50\%$ less gas than face on disks, according to \cite{A1999}, who applied the model of ram pressure stripping (RPS) described in \citeauthor{GG1972} to N-body simulations of disk galaxies. They find that at a certain radius, if the ram pressure exceeds the restoring force per area, then the gas at that radius will be stripped off. At first glance it does not appear that ram pressure stripping should preferentially quench lower mass galaxies since none of the terms in equation \ref{eqn:ram-pressure} or \ref{eqn:restore-force} necessarily depend on mass, only mass densities. However, as demonstrated in \cite{A1999}, the existence of this ``stripping radius" means that lower mass galaxies will be quenched by ram pressure much more easily than higher mass galaxies because the former are smaller, have lower surface mass density, or both. This connects to the results that the disk-like quiescents are mostly lower mass, and being ram pressure stripped would maintain their disk-like morphology. Galaxies of any mass falling into a cluster will have similar velocities, but a less massive galaxy will have a smaller potential well, and the gas can escape it more easily at the same $v$ than from a more massive galaxy with a larger gravitational potential well. Escaping gas would not alter the physical distribution of the stellar mass content within the galaxy, so it keeps the same distribution as it had before it was ram-pressure stripped. The galaxy eventually exhausts any remaining gas left in a short amount of time ( $\lesssim 10^9$ years, i.e. \citealt{We2013,Muzzin:2014,Owers:2019}), and the galaxy is now quiescent. Since $\sigma_s$ remains intact, the stellar mass distribution retains $n_{mass}$ close to 1. Again, the finding that disk-like quiescent galaxies are mostly low mass is supported by the ram pressure stripping model. \subsubsection{Self-quenching at higher stellar mass} Our sample of quenched galaxies are dominated by bulge-like morphologies as stellar mass increases. Satellite galaxies of a higher mass would be more likely to self-quench, as ram-pressure stripping would not have much of an effect on getting rid of their cold gas. Feedback from AGN is a likely candidate for mass quenching and star-forming massive galaxies of $M_\star \gtrsim 10^{11} M_\odot$ have been shown to have larger bulge-to-total ratios. This trend holds even for stellar mass surface density distributions \citep{L2014}. It could be that most massive galaxies are already quenching or quiescent before they fall into a larger halo (e.g. \citealt{V2008}), but these galaxies should have a mass of $M_\star \gtrsim 10^{11} M_\odot$, which is beyond the upper limit of our maximum stellar mass. Merger rates may not fully explain this, as studies at $z \gtrsim 1$ are unclear whether mergers rates are higher or lower in clusters versus the field \citep{Mc2008,Ma2012,D2017,W2019}. These studies also have different methods of classifying merging pairs. \cite{T2008} finds more potential mergers in group environments than cluster environments, but the study is of relatively recent eras at a redshift of $z\sim 0.37$. \cite{Ma2012} concludes major mergers are not enough to explain the evolution of massive compact quiescent galaxies since $z\sim 2$, although that work only focuses on field galaxies. \cite{Lo2013} finds more minor mergers in cluster environments at $z\sim1.62$ compared to the field, and also argue for galaxy mass assembly in clusters via minor mergers. More research is needed to determine whether higher mass quiescent galaxies in clusters have bulge-like morphologies because of minor mergers. \cite{We2012} show current quenched fractions do not correlate to current density because the quiescent galaxies would have quenched at an earlier time when the density is different. An important note is that quenched fractions are highly dependent on redshift, as more galaxies become quiescent over time. It is generally accepted that in the local universe, mass and environmental quenching are completely separable, but in the $z\sim1$ universe, these quenching methods are less separable for $M_\star \lesssim 10^{11}M_\odot$ \citep{P2010,M2012,K2017, vanderBurg:2020}. Perhaps the separability of mass and environment on quenching affects lower stellar masses as we approach $z\sim0$. Studying this would require applying our methods to a much larger survey of intermediate and high redshift galaxies. \subsubsection{Could RPS cause morphological transformation?}\label{subsubsec:RPS-morph} Given the findings outlined in \S\ref{chap:results}, and the very high overall quenching efficiency, the possibility that there may be morphological transformation at $\hbox{${M}_{\star}$} > 10^{9.5} \hbox{${ M}_{\odot}$}$ should be considered. Recent papers have shown there is a link between ram-pressure stripping and increased AGN activity \citep{F2012,Poggianti:2017b}. The GASP survey of local jellyfish galaxies reveal that many of their galaxies host an AGN from studying the emission line ratios and the energy required to ionize the gas in the central regions \citep{Poggianti:2017a, Poggianti:2017b}. However, while they can draw a link between ram pressure and AGN, with evidence that ram pressure can increase black hole accretion rates, there is not much direct evidence that ram pressure causes or induces AGN feedback, which is the mechanism that can lead to bulge-growth and morphological transformation \citep{Rafferty:2006}. \cite{George:2019} found evidence of a central cavity which had been absent of star-formation for the last $10^8$ years. This could be an effect of ram pressure inducing AGN feedback. So far this has been the most direct evidence of AGN feedback related to RPS. But this is not conclusive evidence that RPS leads to morphological transformation. There is still work to be done in how gas outflows are characterized in galaxies undergoing RPS. Nonetheless, RPS plays a possible role in increasing AGN activity \citep{Marshall:2018, Radovich:2019}. \cite{Ramos-Martinez:2018} utilized a magnetohydrodynamical simulation which modeled how RPS can produce oblique shocks on a flared disk, causing the ISM of the simulated galaxy to flow towards the central regions. They report this mechanism can lead to bulge growth. Other simulation results include \cite{Ricarte:2020}, where the authors found using RomulusC, a high resolution hydrodynamical simulation, that RPS can trigger black hole accretion in galaxies with $\hbox{${M}_{\star}$} \gtrsim 10^{9.5} \hbox{${ M}_{\odot}$}$, and increase the rate of gas accretion as well. But RPS suppresses star formation and black hole accretion before it reaches pericenter (i.e. before the galaxy has reached the center of the potential well). This could lead to AGN feedback, or speed up morphological transformation. However, they note that AGN feedback is not fully understood, and there are various models on how this could work. In their simulation of galaxy clusters, they also mention that most galaxies go through pre-processing in smaller groups before falling into the cluster, which complicates the analysis on quenching and morphological transformation. From both observations and simulations, a link can be drawn between ram pressure and AGN activity. But due to the puzzling nature of AGN-feedback mechanisms as well as pre-processing, more observations are necessary to confirm whether ram pressure can be said to induce morphological transformation for higher mass galaxies. \section{Introduction}\label{chap:intro} Galaxy clusters are the largest collapsed structures in the universe, and the high density of galaxies inside them means they are host to a diversity of physical processes that affect galaxy evolution. These physical processes result in clusters containing higher numbers of red-sequence or ``quenched" galaxies, which are galaxies that typically have a red colour and low star-formation rates \citep{K2004, B2004a,B2006,S2006,V2008,P2010}. Indeed, environmental density and its connection to quenching is one of the most well-studied relationships in galaxy evolution over the last several decades (\citealt{GG1972, D1980, PG1984, BV1990}, see \citealt{BG2006,BM2009} for a review). In a key paper, \cite{P2010} proposed that there are two channels to quenching galaxies, one related to their stellar mass (``mass quenching") and one related to their environment (``environmental quenching"). \cite{P2010} analyzed data from the Sloan Digital Sky Survey (SDSS) and the two main results of their formalism showed that: 1) mass quenching operates at the same efficiency across all environmental densities, and 2) environmental quenching only increases in proportion to the environmental number density, and is independent of stellar mass. \cite{P2010} also uses the zCOSMOS survey to show their model holds at redshifts up to $z\sim 0.7$, and other early studies confirmed their results to $z\sim 1$ (\citealt{M2012, Q2012, K2014}). Interestingly, more recent studies that focus on redshifts in the range of $z \sim0.5 $ to $z\sim 1$ and beyond, find increasing evidence that environmental quenching {\it does not} solely depend on environmental density, but also on the stellar mass of the galaxy \citep{B2016,D2016,K2017,Li2017,P2019, vanderBurg:2020,Cutler:2022}. These somewhat contradictory results raise difficult questions, and determining whether a galaxy has quenched because of internal processes, or because of the influences of its environment remains one of the most important outstanding questions in galaxy evolution. Thus far there have been many empirical measurements of quenched fractions from observations as a function of environment, stellar mass, and redshift. However, there is much less work on directly connecting the {\it physical processes} of quenching to the empirical measurements of quenching relations. In terms of physical processes, clusters contain hot diffuse gas called the intracluster medium (ICM), which can strip cold gas from galaxies when they fall into the gravitational potential of the cluster, in a process known as ram pressure stripping \citep{GG1972}. Quenching can also happen due to interactions with other galaxies, such as tidal interactions \citep{M1984, M1996} or starvation/strangulation \citep{L1980}. Ram pressure stripping, starvation/strangulation, and tidal stripping are all interactions that mostly affect the gas content of a galaxy and not its stellar content, the latter of which makes up over 50\% of a galaxy’s total baryonic mass at low redshift \citep{Geach:2011,Carilli:2013}. Given that dark matter and stars dominate the gravitational potential of galaxies, this means environmental quenching processes should leave the stellar mass distribution of a galaxy relatively unaffected while altering its gas content and star-formation rate. This hypothesis is borne out in recent hydrodynamical simulations such as by \cite{Ayromlou:2019}, which model both gas and stellar mass in ram-pressure stripping events. It is also seen in recent resolved studies of galaxies being ram-pressure stripped (e.g. \citealt{Koopmann:2004, Fumagalli:2014, Poggianti:2017a, Fossati:2018, Cortese:2019, Cramer:2019}), where the underlying mass distribution of the galaxy remains largely normal even though spectacular stripping of the gas is observed. Why then is there so much difficulty connecting quenched fractions to physical quenching mechanisms? One of the major issues in all studies of galaxy evolution is the connection of progenitors and descendants, and this issue is no less difficult for cluster studies. However, if environmental quenching does not alter the underlying stellar mass distribution of galaxies at low redshifts, then we should expect the environmentally-quenched descendants of star-forming galaxies to have the same stellar morphologies as their progenitors. This may also be connected to the observation that red-sequence galaxies have a diversity in morphologies (see review by \citealt{BM2009}), which could be due to the diversity of quenching mechanisms. Here we posit, that based on the above arguments, the morphology of a quiescent galaxy can be used to trace its progenitors and quenching history if properly measured. While studying the morphology of galaxies is usually done using integrated light profiles, usually in redder filters, this may not be the ideal representation of the underlying mass distributions. \cite{S2013}, who compared the sizes of light and mass profiles of galaxies, found that the average half-mass radii were ${\sim}15\%$ smaller than their half-light radii. \cite{W2012} and \cite{S2019} uses mass-to-light ratios to study sizes of high redshift galaxies, also noting a difference between the half-mass and half-light sizes. Indeed, not only does the half-mass radius of galaxies typically differ from their half-light radius, the total stellar mass can be incorrectly estimated if not measured using resolved data as well. For example, \cite{SS2015} fit SEDs to individual pixels of SDSS galaxies in order to compare resolved stellar masses to unresolved stellar mass obtained and found that the stellar masses of star-forming galaxies can be underestimated by up to 25\%. In this paper we describe a novel method to connect environmentally-quenched quiescent cluster galaxies (descendants) to star-forming field galaxies (progenitors) by quantifying their morphology with resolved stellar mass maps. We do this by making the assumption that the stellar mass morphology of a galaxy is conserved when a galaxy quenches inside a cluster from environmental processes. We posit that the majority of physical processes involved in environmental quenching should only affect the gas, and not the underlying distribution of the stellar mass throughout the galaxy. Therefore quiescent galaxies with the same total stellar mass and 2D stellar mass profile as field star-forming galaxies are likely to be their environmentally-quenched descendants. In order to perform this analysis we need a dataset that is multi-wavelength, high spatial resolution, and deep enough to model galaxy SEDs on the pixel level. The Hubble Frontier Fields \citep{L2017} is ideal for our analysis as it meets all the above criteria and contains observations of six massive clusters at 0.3 $< z <$ 0.6, as well as six complementary flanking fields. We use the PSF-matched images from the Deep Space collaboration \citep{S2018} as well as their catalogs that contain deep multiband photometry of both cluster and field environments. The combination of the two allows us to measure both the resolved and unresolved SED of each galaxy as well as the morphology in stellar mass, not just in a single filter. This paper is structured as follows: the details of the Frontier Fields Deep Space dataset are described in \S \ref{chap:data}, and the process by which the resolved stellar mass distributions are constructed is outlined in \S \ref{chap:method}. The analysis of the mass distributions' Sersic parameters in relation to star-formation, stellar mass, and morphology is in \S \ref{chap:results}, and discussion of the implications of mass dependence in environmental quenching is presented in \S \ref{chap:disc}. Throughout this paper, we adopt a $\Lambda$CDM cosmology with $H_0 = 70$km s$^{-1}$, $\Omega_m = 0.3$, and $\Omega_\Lambda = 0.7$. \section{Resolved stellar mass maps}\label{chap:method} Constructing a stellar mass map is the most direct way to probe how stars are distributed within a galaxy. This makes them useful for comparing star-forming to quiescent galaxies of similar stellar mass. Figure \ref{fig:process} shows the steps taken to construct a resolved stellar mass map in order to quantify the stellar mass morphology of our galaxy sample. When galaxies evolve off the star-forming main sequence and become quiescent, stellar mass is likely to be conserved, in the assumption that quenching is not due to a merger. This is because quenching can potentially mean no more gas is available to be turned into stars, so the mass of stars is effectively ``frozen". Morphology for galaxies can be arbitrary and subjective, but for this study, since stellar mass distributions can also be modelled by S\'ersic profiles \citep{S1963}, the parameters of the S\'ersic models of stellar mass maps can serve as a way of quantifying morphology. We present our methods for producing resolved stellar mass maps of the selected galaxy sample, and the single-component 2D S\'ersic profiles derived from the stellar mass. Cutout images of each galaxy were taken in each available band for the cluster with the dimensions of the postage stamp being around 15 to 20 times the half-light radius listed in the HFF Deepspace catalog (which was obtained via SExtractor). Similar sized cutouts of the segmentation map were made as well for the purposes of distinguishing object and background pixels. \subsection{Resolved SED-fitting}\label{sec:method-SEDfit} The spectral energy distribution (SED) of a galaxy informs its mass-to-light ratio ($M/L$), which changes as the galaxy evolves, since older stellar populations are less luminous and output more in the IR than in the UV. This means the total stellar mass of a galaxy can be determined from its SED. High-quality spectra are not always available, especially for higher redshifts as is the case for our sample of galaxies, so stellar mass can also be obtained by fitting SEDs of various stellar populations to photometry in the absence of spectra. Most of the work on SED-fitting of distant galaxies is from ground-based observations, which means the galaxies do not have enough resolution for detailed spatial analysis of the stellar mass, and only the total unresolved stellar mass of the entire galaxy can be inferred. With the HFF HST data, we have enough angular resolution to map the stellar mass distribution in two spatial dimensions with multiband data. The fit becomes more accurate with more photometric bands, and as stated in \S \ref{sec:data1}, there are 7-14 HST bands utilized for photometry. The brighter parts of the galaxy have high signal to noise (S/N). However, the outer regions begin to approach the sky noise, and hence our modeling of the galaxy needs to account for the large range in S/N for pixels in the galaxy. If SED-fitting was performed pixel by pixel, the SED and measured stellar mass would be highly uncertain, especially for the outskirts of galaxies, or galaxies that have lower surface brightness. Pixel binning can fix this problem by creating bins with similar signal-to-noise ratios. The papers by \cite{W2012}, \cite{L2014}, and \cite{C2016} all describe various methods of stellar mass map construction by SED-fitting to photometry. Here we employ our own methodology similar to the ones described in the above works but with modifications specific to our dataset. \subsubsection{Pixel binning for maximizing signal-to-noise in galaxy subregions}\label{subsec:method-binning} This work uses the Voronoi binning technique created by \cite{CC2003}, which was also utilized in \cite{W2012}. Voronoi tessellation is most effective when modelling galaxies that have a large range in S/N per pixel. This binning method creates spatial bins of equal S/N in order to best homogenize the wide range in S/N. \cite{CC2003} designed two algorithms, weighted Voronoi tessellation (WVT) and centroid Voronoi tessellation (CVT), which work in tandem to create bins that are as circular as possible by minimizing the distances between each centroid. However, the WVT was not designed to work well with images that contain a large background with low S/N. It compensates for the low flux bins' lack of signal by adding unconnected high S/N pixels from inside the galaxy, which would result in rings of pixels from inner regions of galaxies getting added onto background bins. Only using CVT alone fixes this issue, although this results in sharper bins. This change in bin shape does not result in a loss of detail as bins in regions with high S/N remain small (see Figure \ref{fig:binning-example}, right column). Since only one filter can be used to determine bin placement, we chose the F160W photometry as the basis for the algorithm to construct the spatial bins, since IR flux correlates well to stellar mass distributions. \begin{figure} \centering \begin{tabular}{cc} F160W band image \hspace{1.3cm} Voronoi tessellated bins\\ \includegraphics[width=4cm]{f160w_example2.png} \includegraphics[width=4cm]{pixel_binning_example2.pdf}\\ \includegraphics[width=4cm]{f160w_example11.png} \includegraphics[width=4cm]{pixel_binning_example11.pdf}\\ \includegraphics[width=4cm]{f160w_example40.png} \includegraphics[width=4cm]{pixel_binning_example40.pdf} \\ \end{tabular} \caption{ Examples of pixel binning using the weighted Voronoi tessellation algorithm from \cite{CC2003}. F160W flux is the basis for the binning since IR flux correlates well to stellar mass distributions. The red circle denotes 3 times the F160W effective radius of each galaxy.\label{fig:binning-example}} \end{figure} For most galaxies, the minimum S/N for a single bin depends on the flux of the background pixels in relation to the target object's pixels. Galaxies with less flux also tend to have a smaller angular size. The number of bins are checked against the size of the image to ensure that they have a minimum of 100 spatial bins for adequate spatial resolution before SED-fitting. If the minimum is not satisfied, the target S/N for each spatial bin is decreased. If the flux in the target galaxy's pixels is high, the S/N for each bin will increase accordingly, but we limit the S/N for each bin to not exceed a value of 30. The lower limit for most galaxies with low flux in the F160W filter is a S/N of 10, although for certain low surface brightness galaxies, the binning would fail unless the S/N for each bin was set to 5. What particular S/N is selected for a certain image also depends on the size of the image in relation to the number of bins. In Figure \ref{fig:binning-example} we show three examples of how the pixel binning algorithm generates a bin map. Pixel binning will result in edges of bins leaving a residual on the resolution, and the effects of those edges means there must be a lower limit for the number of bins in an image. Once pixel binning has finished and every galaxy has the total flux of each of its bins in every band catalogued in a data table, this catalog becomes the input for the resolved. SED-fitting. \subsubsection{Constructing the stellar mass map}\label{subsec:method-FAST2} To create stellar mass maps we fit the 7-14 band photometry in each Voronoi bin to stellar population synthesis models. To do this we utilized \textsc{FAST} (Fitting and Assessment of Synthetic Templates, \citealt{K2009}). For SED-fitting, we use the stellar population synthesis (SPS) code from \cite{BC2003} (hereafter BC03), a Chabrier (\citeyear{C2003}) IMF, and a Calzetti dust law \citep{C2000}. Every bin in a galaxy's Voronoi spatial bin will use the same spectroscopic or photometric redshift as the galaxy itself, depending on whether $z_{spec}$ is available for that particular galaxy. The error in the goodness of fit of the SEDs are negligible between using $z_{spec}$ or $z_{phot}$ with FAST at this redshift range \citep{M2009}. A delayed tau model for the star formation history (SFH) is adopted, which is a parameterization where star formation rate is a function of time given by the equation \begin{linenomath*} \begin{equation} \text{SFR}(t) \propto t e^{-t/\tau} \;\;, \end{equation} \end{linenomath*} where $\tau$ is a free parameter. This results in $\log(\text{SFR})$ initially increasing but then exponentially declining over time, with $\tau$ describing how fast it declines, and when the peak of the SFH is (the given range of possible values for $\tau$ is $6.5 \log(\text{yr}) < \log(\tau) < 11\log(\text{yr})$). The limits of integration for $t$ (age), and any other parameters were all set to their maximum limits (which is from $log(t) = 6\log(\text{yr})$ to $log(t) = 11\log(\text{yr})$) so that hitting the bounds of integration does not affect the computation of the stellar mass in the final output. FAST creates an output file that contains the stellar mass of each entry in units of $\log(\hbox{${ M}_{\odot}$})$. \begin{figure*} \centering \begin{tabular}{ccc} F160W flux & Stellar Mass Distribution &Stellar Mass weighted \\ & &by F160W flux\\ \includegraphics[width=5cm]{f160w_example4.png}& \includegraphics[width=5cm]{massmap_example4_unscaled.pdf}& \includegraphics[width=5cm]{massmap_example4.pdf} \\ \includegraphics[width=5cm]{f160w_example40.png}& \includegraphics[width=5cm]{massmap_example40_unscaled.pdf}& \includegraphics[width=5cm]{massmap_example40.pdf} \\ \includegraphics[width=5cm]{f160w_example39.png}& \includegraphics[width=5cm]{massmap_example39_unscaled.pdf}& \includegraphics[width=5cm]{massmap_example39.pdf} \end{tabular} \caption{Scaling the pixels in each bin helps recover some resolution. The red circle is 3$\times$ the effective radius of each galaxy as defined by SExtractor. Note the differences between the raw stellar mass outputs from FAST in the middle column and the pixel flux-weighted stellar mass maps in the right column are more pronounced for galaxies with less surface brightness (such as the galaxies in the middle and bottom row, where the flux-weighted stellar mass maps show a decrease in pixel-binning artefacts). The weighting is described in equation \ref{eqn:flux-weight}. The quoted values on the bottom left of panels reflect the effective radius for each object.} \label{fig:massmap-comp} \end{figure*} A stellar mass map at the resolution of the spatial bins can be generated by assigning the bins in the image the stellar mass calculated by FAST divided by the number of pixels in the bin. However, each spatial bin is of a different size as they were generated by the Voronoi tessellation algorithm, such that high S/N areas have many bins of few or one pixel, while low S/N areas have few large spatial bins with many pixels. In order to recover some of the original resolution of the HST images, an extra step to this process is applied, where the percent flux contribution of each pixel to the overall flux of the bin is accounted for. This scaling can also be described in an equation as \begin{linenomath*} \begin{equation} M_{\text{pix,}i} = \left( \frac{1}{ M_{bin} }\right) \frac{F_{160}^{\text{pix},j}} {\sum_{\text{bin}}^{\text{pix},j} F_{160}^{\text{pix} } } \;\;, \label{eqn:flux-weight} \end{equation} \end{linenomath*} where $M_{bin}$ is the mass FAST derived for the bin, $M_{\text{pix,}i} $ is the mass assigned to an individual pixel belonging to that bin, $F_{160}^{\text{pix},j}$ is the flux in the F160W band of that individual pixel, and the sum in the denominator is the total flux of the the entire bin. Figure \ref{fig:massmap-comp} demonstrates the difference that scaling by contributed flux makes to the bin map. The middle column shows the stellar mass distribution without scaling by percent flux contribution, and the right column is after the scaling. The stellar mass listed in the middle column refers to the total stellar mass of the galaxy summed from each pixel of the galaxy. There is significantly more information recovered for the latter maps that is lost when only using tessellated bins. The central regions of galaxies gain more angular resolution, and there is better distinction between which bins have more galaxy or background pixels, especially in more crowded images such as the second row of Figure \ref{fig:massmap-comp}. The F160W flux is closely correlated to stellar mass at these redshifts, so this percent scaling is reasonable, and the mass map becomes more representative of the actual distribution of stellar mass, with angular resolution consistent with the unbinned F160W HST images (Figure \ref{fig:massmap-comp}, left column). \begin{figure*} \begin{subfigure} \centering \includegraphics[width=\columnwidth]{mass_comparison_clu_errbar.pdf} \end{subfigure} \begin{subfigure} \centering \includegraphics[width=\columnwidth]{mass_comparison_par_errbar.pdf} \end{subfigure} \caption{The plots compare the galaxies' total stellar mass calculated from resolved SED-fitting (orange triangles) against their integrated stellar mass from the HFF Deepspace catalogs (blue line). The x-axis is their integrated stellar mass from the catalog, and the y-axis is their resolved stellar mass. On the whole, the resolved stellar mass is lower by an average of 0.03 dex than the corresponding galaxy's stellar mass in the catalog.} \label{fig:massplot} \end{figure*} An interesting byproduct of creating these resolved stellar mass maps is that in principle, the accuracy of the total stellar mass for each galaxy should be improved by resolved fitting (at the Voronoi bin level), as opposed to integrated fitting over the entire galaxy. In Figure \ref{fig:massplot}, the catalog's total stellar mass of each object is compared with the resolved total stellar mass obtained with our methods. The stellar mass from the HFF catalog was also derived with FAST, but over the entire flux of the galaxy instead of on individual pixel bins, hence it is the ``unresolved" mass. Note that although the two masses almost have a one-to-one relation, the resolved total mass is on average 0.03 dex lower, which is much less than the dispersion around the one-to-one in Figure \ref{fig:massplot}. \cite{SS2015} found similar results in their work on stellar mass from SED-fitting for the local universe with SDSS data. \begin{figure*} \centering \begin{subfigure} \centering \includegraphics[width=0.75\textwidth]{abell2744par_id_2844_models_sigma_default.pdf} \end{subfigure} \begin{subfigure} \centering \includegraphics[width=0.75\textwidth]{macs1149clu_id_3281_models_sigma_default.pdf} \end{subfigure} \caption{Top: An example fit from a field galaxy. Bottom: Example fit from a cluster galaxy. The circle denotes 3$\times$ the effective radius as defined by SExtractor. Note that structures such as spiral arms are not part of the S\'ersic fit and end up in the residual if functions specifically made for describing spiral arms are not fit. Bin residuals of stellar mass maps also end up in the residual image.} \label{fig:galfit_fig} \end{figure*} \input{Table2_CEMILESsuggestion} \subsection{A S\'ersic model of a mass profile}\label{sec:method-GALFIT} The S\'ersic index and effective radius for each galaxy's F160W flux density and stellar mass distribution is obtained using GALFIT \citep{P2002,Peng:2010}. GALFIT provides parametric fits to galaxy light profiles provided that background estimation is done carefully. The postage stamp cutouts of the selected sample in every HST band were made with the dimensions of the cutout being \textit{20 times} the half-light radius of the galaxy as defined by SExtractor, so as much of the galaxy's light, or in this case, stellar mass, can be captured and compared to the background ``flux". For each object's F160W cutout image and its stellar mass distribution, a single S\'ersic profile with varying $n$ is fitted. The central object in each cutout in Figure \ref{fig:galfit_fig} is a galaxy that is part of our sample. Since GALFIT was created for fitting surface brightness profiles, many of the parameters it fits are related to light profiles, such as magnitude zeropoint. This makes it relatively simple to fit a single component S\'ersic profile to each F160W cutout, the only point of failure for the surface brightness case being from not including the right amount of ``secondary" objects in each cutout. If too many secondary objects are fit, the solution will not converge, and conversely, if not enough background objects are fit, the model computed by GALFIT is less accurate due to contamination from those sources. For the stellar mass distributions, scaling is performed to make the image more compatible with GALFIT, even though it is a program designed primarily for light profiles, which will be explained in the following sections. \subsubsection{Optimizing stellar mass maps for GALFIT}\label{subsec:galfit2} A magnitude limit was set for the fainter background objects that are not our primary sample to be either $<30$, or $<m_{obj} + 5$, whichever is the brighter limit, where $m_{obj}$ is the magnitude of the central object in the $H$-band (F160W). GALFIT also requires a sigma image to determine the ``brightness" of the background and the extent of the S\'ersic profile for each object. GALFIT is capable of generating a sigma image by taking the sigma at each pixel from both the source and from a uniform sky background, which is then summed in quadrature. The background pixels are defined by the segmentation map created by SExtractor using the detection filters of the Frontier Fields. The actual stellar masses in each pixel of the mass maps are large numbers ($10^3 - 10^7$), typically not used with GALFIT. Therefore, a scaling of ($\Sigma_i$ F160W flux)/($\Sigma_i$ Mass), summed over every pixel in the postage stamp, was applied to the stellar masses before GALFIT was run. This re-normalization does not affect any of the GALFIT output parameters except ``total magnitude". The constant scales the mass maps in such a way that the ``zeropoint" parameter can be used from the F160W flux zeropoint. Gaussian noise of similar levels to the F160W band's background noise was also added to the stellar mass maps with the mean and standard deviation scaled relative to the overall stellar mass. The added noise does not affect the total stellar mass of the object, as can be seen in Figure \ref{fig:galfit_fig}, but it is a necessary aid for GALFIT to properly find objects to fit in the mass maps. Without the inclusion of the noise, the GALFIT algorithm overestimates the galaxies' intensity; even small spikes in the mass map are highly significant and can cause GALFIT to be unstable. This streamlines the galaxy modelling process, because the same parameter file for the F160W cutouts can be used on the mass map of the same object. The factor by which the stellar mass is scaled would also mean the secondary objects will have very similar mass ``magnitudes" to their F160W fluxes, so the secondary objects being fit can have the same initial magnitude. The bins for these fainter objects do not make them as well defined as the central object, however they do not need to have accurate S\'ersic profiles since GALFIT is robust enough to compensate for less accurate initial conditions while keeping the primary object as the most optimal fit. Thus, reusing the F160W parameters for secondary objects is sufficient. We place constraints on the S\'ersic index for every single component fit, whether light profile or mass profile. The limits for $n$ are in the range $0 < n < 10$ for non-bCGs, and $0<n<12$ for bCGs. Other parameters are left free, but their initial guesses are the values of the parameters from the HFF catalog. As mentioned in \S \ref{sec:method-GALFIT}, the cutout sizes need to be 20 times the SExtractor defined half-light radius for background level estimation. For the majority of cases, the cutout does not contain more than 110 objects, which is the maximum number of objects that GALFIT can fit \citep{vanderWel:2012}. However, not every source needs to be fit with a S\'ersic profile for proper background estimation and convergence, only objects with a magnitude brighter than 30 need to be fit due to the noise levels of the background. The resulting S\'ersic models for both the brightness fit and the mass fit are shown in Figure \ref{fig:galfit_fig}. From the original 400 cluster galaxies, 18 bCG galaxies from Abell 1063 were removed from the sample because they could not be recovered from the original images after their removal from the science images. Out of the remaining 382 cluster galaxies, 368 have successful stellar mass S\'ersic profile fits, and 92 out of the 96 field galaxies have successful stellar mass S\'ersic profile fits. The failures had no output from GALFIT and their parameters failed to converge on a proper fit. The objects that fail are not biased towards any stellar mass, since the percentage of failed fits for $\hbox{${M}_{\star}$} < 10^{9.5} \hbox{${ M}_{\odot}$}$ is roughly 9.5\%, and the percentage of failed fits for $\hbox{${M}_{\star}$} > 10^{9.5} \hbox{${ M}_{\odot}$}$ is roughly 9.1\%. \subsection{Surface Brightness versus Stellar Mass Profiles}\label{sec:res1} \begin{figure*}[t] \centerline{\includegraphics[width=0.8\textwidth]{F160W_SM_difference_massbins_QvsSF.pdf}} \caption{S\'ersic index vs Stellar mass and Effective radius vs stellar mass is plotted to show how S\'ersic index and size is affected by outshining bias in the infrared. Each point is the average parameter for 0.5dex mass bin. Error bars represent standard error for the points in each mass bin. Star-forming and quiescent sample is defined according to UVJ colours outlined in \S\ref{sec:data-uvj}. S\'ersic indices are generally larger for mass profiles and effective radii are generally larger for F160W light profiles.}\label{fig:IRvsSM2} \end{figure*} Infrared bands such as F160W are sometimes used as a proxy for stellar mass. There is a steep outshining bias for more massive stars in the UV, but the outshining is much less in the IR for stars of any mass, making IR photometry a better overall estimate of stellar mass. However, F160W and stellar mass are not necessarily identical, and the full SED of a galaxy is still the most accurate way to obtain its integrated stellar mass (i.e. see \citealt{W2012} for another demonstration of this difference). Figure \ref{fig:IRvsSM2} compares average S\'ersic index and effective radius between the light profile and the stellar mass profile. Each bin is 0.5dex of stellar mass, with error bars representing standard error. $n_{F160W}$ denotes the average S\'ersic indices derived from F160W brightness profile and $n_{mass}$ for the stellar mass density ($\Sigma_\star$) profile. This is also displayed in Table \ref{table:IRvsSM2side} which displays the numerical values of the average parameters in Figure \ref{fig:IRvsSM2} and their errors. This means the differences in S\'ersic index between mass profiles and F160W brightness profiles are on the whole not statistically significant. For percentage differences, the overall trend for quiescent galaxies is a 2.4$\pm0.8$\% increase in S\'ersic index and a 1.2$\pm1.7$\% increase in S\'ersic index for star-forming galaxies. This means the F160W profile's S\'ersic indices ($n_{F160W}$) can be said to reasonably represent the underlying stellar mass distribution's S\'ersic indices ($n_{mass}$), although they are not analogous. In terms of percentage differences between half-light and half-mass radii, the average effective radius for quiescent galaxies is 7.6$\pm1.6$\% lower for the stellar mass maps compared to F160W flux, and 4.9$\pm1.5$\% lower for star-forming galaxies, where the errors are standard errors of the mean. For quiescent galaxies, the average difference between half-mass radii ($R_{mass}$) and half-light radii($R_{F160W}$) is more constant as a function of stellar mass. Whereas for star-forming galaxies, the difference is not as pronounced except for the highest stellar mass bin, with a 22.1\% difference between $R_{F160W}$ and $R_{mass}$ at $10.5<\log(\hbox{${M}_{\star}$}/\hbox{${ M}_{\odot}$}) <11$. This seems to indicate the outshining bias for F160W IR light affects the effective radius more than the S\'ersic index. \cite{S2013} found an overall 25\% decrease between the half-light radius and half-mass radius, which is much greater than our overall percentage decrease, but their redshift range is $0.5 < z < 2.5$. Their sample includes galaxies of a much higher redshift than this work. Galaxies at high redshift, especially around $z \sim 2$ are undergoing much higher rates of star formation than at later times, which would mean higher flux but less stellar mass. For galaxies at $0.25< z < 0.6$, less star formation should be taking place overall. This is consistent with the framework where there are lower merger rates at late cosmic times, which leads to both a lower SFR, and also the smaller decrease from $R_{F160W}$ to $R_{mass}$. \section{Analysis of mass profile parameters}\label{chap:results} \begin{figure*} \centerline{\includegraphics[width=0.8\textwidth]{Sersic_Re_perSM_plusBCGs_box_kernels_v2.pdf}} \caption{Log Stellar mass vs Log S\'ersic index (top) and stellar mass vs size (bottom) plots for star-forming and quiescent galaxies in both the cluster and field. The trend lines with square points represent the \textit{median} of groups of five data points for star-forming field (light blue), star-forming cluster (dark blue), and quiescent cluster galaxies (red), and groups of three for quiescent field galaxies (orange). The shaded regions represent one standard deviation from the trend line in each mass bin. The dashed lines are linear lines of best fit to each sample's trend line. \label{fig:allparams}} \end {figure*} In this section, we present the analysis of the stellar mass density profile's parameters to classify the morphology of star-forming and quiescent galaxies in the cluster member sample. Through using parameters that describe the stellar mass distribution (which will be denoted $\Sigma_\star$ as it is a surface density), we aim to draw links between certain galaxies that have different star-formation rates, and live in different environments, but have similar morphologies. We use two S\'ersic parameters of mass profiles fits, specifically S\'ersic index ($n_{mass}$) and half-mass radius ($R_{mass}$), to quantify the morphological differences in galaxies. The galaxy sample of 368 cluster members and 92 field galaxies is divided into four groups based on their star-formation activity, and whether they live in a cluster (dense) or field (less dense) environment. \subsection{Mass profile differences in quiescent cluster galaxies}\label{sec:res2} \input{Table3.tex} \normalsize In Figure \ref{fig:allparams}, the S\'ersic index $n_{mass}$ and half-mass radius $R_{mass}$ of each galaxy are plotted against their stellar mass and assigned an environment-star-formation classification. The plots in Figure \ref{fig:allparams} demonstrate how the S\'ersic parameters depend on stellar mass, environment, and star-formation activity. The distribution of points for quiescent galaxies overlap with the distribution of star-forming galaxies, for both the cluster and the field. The shaded regions are $1\sigma$ from the box-kernel generated trend line average, and there are star-forming and quiescent data points which lie in both shaded regions. The panels in Figure \ref{fig:allparams} also have lines of best fit for each mass-S\'ersic index and mass-size relation shown. For star-forming galaxies in the field (right panel), the S\'ersic index $n_{mass}$ line of best fit has a slope close to zero. This shows the SF Field $n_{mass}$ is independent of stellar mass. The same is not true for cluster star-forming galaxies (left panel), for which line of best fit's slope has a value of 0.485$\pm0.131$ and shows a slightly increasing relation with stellar mass. Both quiescent galaxies in the cluster and the field have $n_{mass}$ increasing with stellar mass, but the slope for quiescent cluster galaxies is 1.13$\pm0.41$ (see Table \ref{res:slopetable} for the slope of all the lines of best fits in Figure \ref{fig:allparams}). Although the median points and their error bars (the shaded regions in the top left panel of Figure \ref{fig:allparams}) indicate that there shouldn't be a statistically significant difference between the two slopes. The dispersion of $n_{mass}$ for the quiescent cluster sample is much larger than the quiescent field sample, with the distribution becoming wider with increasing stellar mass, which could explain the larger slope in the line of best fit. The large distribution of S\'ersic indices for quiescent cluster galaxies compared to all other populations may indicate that these galaxies have undergone diverse pathways of quenching. While there are plenty of quiescent cluster S\'ersic indices greater than 4, meaning they are likely to be elliptical galaxies, there is \textit{also} a sizable number of these galaxies which have $n_{mass} \lesssim 2$. Since a higher S\'ersic index indicates a more bulge-dominated morphology, this has implications for how stellar mass affects morphology in dense cluster environments. \S\ref{subsec:sef-groups-2} explores the morphology of quiescent cluster galaxies further. Half-mass radius ($R_{mass}$) versus stellar mass is also shown in the bottom row of Fig.~\ref{fig:allparams}. The $R_{mass}$ values are the GALFIT derived $R_{\text{eff}}$ for the stellar mass maps, which is the half-mass radius along the semimajor axis. Unsurprisingly, for each classification, $R_{mass}$ increases with stellar mass, but at different rates. The trend lines show that on average, star-forming galaxies are larger than quiescent galaxies. This is consistent with previous results which used half-light radii \citep{V2014,Mowla:2019,Nedkova:2021} However, looking at the individual points, there is also considerable overlap between star-forming and quiescent galaxies just as with the S\'ersic index distributions. This is shown in the shaded regions, indicating 1$\sigma$ from the trend line. One of the most interesting features of the mass-size relations is that the cluster star-forming and quiescent sizes have a large overlap in distribution. Looking for quiescent cluster galaxies which have small $n_{mass}$ but a large $R_{mass}$ could point to a population of environmentally quenched galaxies that retained a disk morphology. \subsection{S\'ersic parameters that change with both mass and environment}\label{subsec:sef-groups-2} \begin{figure*} \centerline{\includegraphics[width=0.8\textwidth]{disk_bulge_populations_sersics_sizes_BCGs.pdf}} \caption{\textit{Mass-S\'ersic index} and \textit{Mass-Size} relation plots for quiescent cluster galaxies. The small red triangles are the quiescent cluster galaxies with ``disk-like" S\'ersic indices. They are within one standard deviation of the star-forming field population's line of best fit, shown as the dashed black line, with the shaded blue region around it indicating the 1$\sigma$ region. The large red triangles are quiescent cluster galaxies that are \textit{morphologically consistent} with star-forming disk galaxies in the field -- they have ``disk-like" S\'ersic indices \textit{and} ``disk-like" half-mass radii. The half-mass radii selection was also defined as within one standard deviation (1$\sigma$) of the average half-mass radius line of best fit for the star-forming field population (dashed black line on the Mass-Size relation plot). Galaxies that are not disk-like in S\'ersic index are represented by purple points and are designated ``bulge-like".} \label{fig:focusgalaxies} \end {figure*} \begin{figure*} \centerline{\includegraphics[width=0.8\textwidth]{histogram_breakdown_qfrac.pdf}} \caption{Histogram breakdowns according to star-formation rate for cluster (left panel) and field (right panel) populations. The cluster population's quiescent fraction is also separated by morphology into bulge-like, disk-like, and morphological analogues of SF field galaxies. This is based on the same selection criteria as Figure \ref{fig:focusgalaxies}.} \label{fig:selectedhist} \end{figure*} The intent of this study is to use statistical tools to look for a population of quiescent cluster galaxies that may be descendants of SF field galaxies that fell into the cluster. Therefore, the next step is to break down the distribution by stellar mass bins and then examine each bin's S\'ersic parameters. This would be evidence that we can use to draw a direct evolutionary link between populations of galaxies in the field to populations of galaxies in the cluster. The main purpose of generating the mass profiles is to separate the quenched cluster galaxies into distinct populations based on morphology. Figure \ref{fig:allparams} demonstrated that the spread in the distribution of S\'ersic parameters can overlap between quiescent cluster galaxies and star-forming field galaxies. The vast majority of bulge-like quiescents appear to be massive and smaller in size, although a number of disk-like galaxies are also smaller than the field average as well. If quiescent cluster galaxies that are disk-like skew towards a certain mass limit, it would indicate that environmental quenching still depends on stellar mass. \subsubsection{Quiescent galaxies with disk-like morphology}\label{subsec:params} If our assumption that environmental quenching does not alter the stellar mass distribution of a galaxy holds, then there must be a subset of quiescent cluster galaxies with \textit{both} their $n_{mass}$ and $R_{mass}$ similar to those observed in star-forming galaxies, the so-called ``disk-like" quiescent galaxies. As we can see in Figure \ref{fig:allparams}, quiescent cluster galaxies have a wide range of S\'ersic index values from 0.5 to 12, and their range of half-mass radii is wider than star-forming cluster galaxies. We choose quiescent cluster galaxies which are within 1$\sigma$ of the star-forming field sample's line of best fit to be the sample of ``disk-like" quiescent galaxies. This is shown in Figure \ref{fig:focusgalaxies}. Since the best fit line is almost constant, the 1$\sigma$ can be taken to be the standard deviation of the field galaxies' $n_{mass}$ distribution, as it does not depend on stellar mass. Within that disk-like quiescent sample, there are a subset of galaxies which are within 1$\sigma$ of the best fit line for the star-forming field's mass-size relation as well. The 1$\sigma$ value is the standard deviations of the star-forming field galaxies' S\'ersic parameters. These galaxies, as shown by the dark red triangles in Figure \ref{fig:focusgalaxies}, fit within the statistics of the SF Field's morphological parameters. This means they are best candidates for having undergone environmental quenching because they can reliably be traced as having originated in the field (sharing morphological features with the field star-forming population) but they show up in the cluster with quenched colours. These galaxies will be referred to as ``\textit{Morphological Analogues of Star-forming Galaxies}". Figure \ref{fig:selectedhist} more clearly shows the mass dichotomy between the disk-like and bulge-like quiescent galaxies by plotting a stacked histogram of the fractions that both types occupy in their stellar mass bin. Disk-like quiescents make up the majority of the quenched fraction from $10^{8.5} \hbox{${ M}_{\odot}$}$ to $10^{9.5} \hbox{${ M}_{\odot}$}$, while bulge-like quiescents dominate at higher masses, from $10^{9.5} \hbox{${ M}_{\odot}$}$ to $10^{11} \hbox{${ M}_{\odot}$}$. In Figure \ref{fig:selectedhist}, the disk-like quiescent galaxies when plotted against the entire quiescent cluster distribution appear in much greater numbers at the low mass end. Altogether the disk-like quiescent galaxies make up roughly 42\% of the quiescent cluster sample, with $\sim 16\%$ being selected as the quiescent morphological analogues to star-forming galaxies. The majority of the morphological analogues to star-forming galaxies occur on the very low mass end of the quiescent cluster population, below $10^9 \hbox{${ M}_{\odot}$}$. The smallest and largest mass bins notably only contain quiescent galaxies that fall into one classification, with the smallest bin having almost no quiescent galaxies of bulge-like morphology, and likewise the largest bin having no quiescent galaxies of disk-like morphology. \begin{figure*}[t] \centerline{\includegraphics[width=0.8\textwidth]{qfrac1.pdf}} \caption{Left panel: Quiescent fractions for cluster and field. Right panel: Quiescent fraction for cluster galaxies decomposed according to their morphology into disk-like quenched fraction and bulge-like quenched fraction. Notice the bulge-like quenched fraction for the cluster, and the disk-like quenched fraction for the cluster have opposite trends with stellar mass. Bulge-like $f_{red}$ increases as stellar mass increases while disk-like $f_{red}$ decreases with stellar mass, indicating morphology of quenched galaxies are dependent on $\hbox{${M}_{\star}$}$. The errors are Poisson errors.}\label{fig:qfrac} \end{figure*} \begin{figure*}[t] \centerline{\includegraphics[width=\textwidth]{qefficiency1.pdf}} \caption{Environmental quenching efficiency vs. stellar mass plots for three quiescent populations in the cluster: bulge-like, disk-like, and star-forming morphological analogues. The quenching efficiencies($\epsilon_\rho$) are calculated relative to the quenching efficiency of the field. Therefore, the orange dashed line denotes the ``baseline" field quenching efficiency against which the various cluster populations' $\epsilon_\rho$ are plotted. The bulge-like and disk-like quenching efficiencies have similar trends as in Figure \ref{fig:qfrac}. Bulge-like galaxies are more efficiently quenched in clusters at higher masses, while disk-like galaxies are more efficiently quenched in clusters at lower masses. The population of morphological analogues to star-forming galaxies in the rightmost panel follow a similar relationship to disk-like galaxies, being more efficiently quenched at lower stellar masses.}\label{fig:qeff} \end{figure*} \subsubsection{Disk-like vs bulge-like quenching efficiencies}\label{subsec:disk-bulge-qeff} While Figure \ref{fig:selectedhist} shows the numerical breakdown of types of galaxies in each mass bin, the left panel of Figure \ref{fig:qfrac} displays the quenched fraction (denoted $f_{red}$) as a function of stellar mass for the cluster and field samples (black and orange trends respectively). We will refer to quenched fractions as only the points and not the range of their error bars. For the cluster, the total quenched fraction, as well as the quenched fractions for galaxies with bulge-like (magenta symbols) and disk-like (red symbols) morphologies are shown in the right panel of Figure \ref{fig:qfrac}. For the field, only the total quenched fraction is plotted. The total cluster quenched fraction increases with stellar mass until $\hbox{${M}_{\star}$} \sim 10^{11} \hbox{${ M}_{\odot}$}$ where the quenched fraction reaches 100\%. The only exception is the last mass bin as there was one massive star-forming galaxy with a mass $> 10^{11.5} \hbox{${ M}_{\odot}$}$. The field $f_{red}$ stays below 30\% until its largest mass bin of $10^{10.5} \hbox{${ M}_{\odot}$}$, unlike the cluster $f_{red}$, which is above 80\% save for the smallest mass bin ($<10^{8.5} \hbox{${ M}_{\odot}$}$). However, at $10^{10.5} \hbox{${ M}_{\odot}$}$, the field $f_{red}$ reaches 100\%, which is one mass bin lower than the cluster $f_{red}$. When looking at the quenched fraction for cluster galaxies, there are unexpected results. If environmental quenching were not mass-dependent, then we would expect both bulge-like and disk-like quenched fractions to have the same relation with stellar mass and \textit{not} opposing trends. This result can be compared with the star-forming fractions in \cite{Varma:2022}, where they examine the morphologies of galaxies from redshift 3 to 0.5, using an observational sample of galaxies from CANDELS, and a simulated sample from TNG50 \citep{Nelson:2019,Pillepich:2019}. They find that at a redshift of $0.3 < z < 0.7$ for observations, and $z=0.5$ for simulations, that for disks and disks with spheroids, the star-forming fraction increases with increasing stellar mass for both simulations and observations. For pure bulges, it stays roughly constant with stellar mass. \citeauthor{Varma:2022}'s sample of galaxies mostly reside in lower environmental densities, and yet our quenched fractions for the high-density cluster sample seem to also follow similar trends with respect to morphology and stellar mass. While the fraction of quenched galaxies increases with stellar mass for cluster members with bulge-like morphologies, the opposite trend is observed when considering those with disk-like morphologies (Figure \ref{fig:qfrac}, right panel). The median trend line for quiescent cluster S\'ersic indices in Fig. \ref{fig:allparams} is increasing with stellar mass, and the best fit slope is also positive so this result makes sense. Higher S\'ersic indices become more common at higher stellar masses. \subsubsection{Environmental quenching and mass dependence}\label{subsec:env-quenching-mass-dep} From the results presented in the previous section, it is evident that there is a morphological dichotomy between low mass cluster quiescents, which are more disk-like, and high-mass cluster quiescents, which are bulge-like. To find the underlying cause of this difference, a useful measurement is how efficient the two main avenues of quenching are at transforming galaxies from star-forming to quiescent. \cite{P2010} utilized relative quenching efficiencies to compare mass and environmental quenching for galaxies in zCOSMOS up to $z \sim 1$. They showed that mass and environment have completely independent, or ``separable" effects on quenching populations of galaxies. They arrived at this result by showing that the mass-quenching efficiency (denoted by $\epsilon_{m}$) remains constant regardless of local environmental density, and that environmental-quenching efficiency (denoted by $\epsilon_{\rho}$) also remains constant with stellar mass. The \textit{environmental} quenching efficiency is defined in \cite{P2010} in their Equation 3, as a measure of the difference in the number of quiescent galaxies between two regions of space with different overdensities. We write the equation for environmental-quenching efficiency as \begin{linenomath*} \begin{equation} \epsilon_{\rho}(\rho, \rho_0, m) = \frac{f_q(\rho, m) - f_{red}(\rho_0, m)}{f_{blue}(\rho_0, m)} \label{eqn:qenv_eff} \;\;, \end{equation} \end{linenomath*} where $\rho_0$ is the reference density (which is the field density), $f_{red}(\rho_0, m)$ is the red sequence/quiescent fraction at the reference density at a certain stellar mass $m$, $f_{blue}(\rho_0, m)$ is the blue cloud/star-forming fraction at the reference density, $f_q(\rho,m)$ is the quiescent fraction at environmental density $\rho$. Environmental-quenching efficiency ($\epsilon_{\rho}$) as defined in Equation \ref{eqn:qenv_eff} is plotted as a function of stellar mass $\hbox{${M}_{\star}$}$ in Figure \ref{fig:qeff}, to show how for fixed environments the fraction and the efficiencies of quenching vary with stellar mass. If $\epsilon_{\rho}(\hbox{${M}_{\star}$})$ stays constant, then environmental quenching for those galaxies does not depend on stellar mass. That would mean mass quenching and environmental quenching are two effects that are completely independent and separable. For the cluster, the quenching efficiency is calculated both for the disk-like and bulge-like quiescent cluster populations. Since this sample has only two environments, $\epsilon_{\rho_0}$ is chosen to be the field environment, which is why $\epsilon_{env,field}$ is zero for all $\hbox{${M}_{\star}$}$. Although \cite{P2010} probed a similar range of redshifts to this work, the stellar mass range that \citeauthor{P2010}'s sample had at that redshift was only from $10^{10.2} \hbox{${ M}_{\odot}$}$ to $10^{11} \hbox{${ M}_{\odot}$}$, while there is a much larger range in this work. In the range of $10^{9.5} \hbox{${ M}_{\odot}$}$ to $10^{10.5} \hbox{${ M}_{\odot}$}$, the $\epsilon_{\rho}$ and $f_{q}$ are more or less constant (see also \citealt{Nedkova:2021,Cutler:2022}), while for the range $10^{10.5} \hbox{${ M}_{\odot}$}$ to $10^{11.5} \hbox{${ M}_{\odot}$}$, the efficiency $\epsilon_\rho$ is actually quite similar to the relation found in \citeauthor{P2010}'s work. Looking at the $\epsilon_{\rho}$ plots in Figure \ref{fig:qeff}, the quenching efficiency of the entire cluster sample does appear to be relatively constant in the range $10^{10} \hbox{${ M}_{\odot}$} < \hbox{${M}_{\star}$} < 10^{11} \hbox{${ M}_{\odot}$}$. However, this is solely based on one point so the trend is not clear. But the rest of the $\epsilon_{\rho}$ for the total cluster sample contradicts the idea that effects of mass and environment on quenching are entirely separable because the quenching efficiency is decreasing for the entire sample disk-like sample, and the non-zero slope of the quenching efficiencies for the disk-like and bulge-like quiescent cluster galaxies. Recently, papers such as \cite{B2016}, \cite{Li2017}, and \cite{P2019} all seem to suggest that there is a mass-dependent component to environmental quenching, especially as redshift increases. This could indicate that disk-like quiescent galaxies that retain the morphology of star-forming galaxies were environmentally quenched through ram pressure stripping (see \S \ref{sec:disc-RPS}). Another interesting feature in Figure \ref{fig:qeff} of the $\epsilon_{\rho}-\hbox{${M}_{\star}$}$ plot is the stellar masses at which quenching efficiencies match the field $\epsilon_{\rho}$ for the two types of bulge-like and disk-like quiescents. For bulge-like quiescent galaxies, $\epsilon_{\rho}$ is lowest when it is at the field efficiency level, and likewise for the disk-like $\epsilon_{\rho}$. The quenching efficiency is either greater than the baseline field $\epsilon_{\rho}$ or they are roughly the same as the field efficiency. If the disk morphology quiescent galaxies were quenched environmentally, and the bulge-like quiescents are quenched by mass, i.e. self quenching, then this means existing in a cluster environment enhances self-quenching as well as environmental quenching. This confirms that the two processes operate at different stellar masses. In Figure \ref{fig:qeff}, the bulge-like quiescents increase in efficiency in the leftmost panel around $\hbox{${M}_{\star}$} {\sim} 10^{9.5}\hbox{${ M}_{\odot}$}$. In the middle and right panels, the disk-like, and morphological disks quenching efficiency is enhanced at $\hbox{${M}_{\star}$} < 10^{9.5}\hbox{${ M}_{\odot}$}$ while it is at the field level for higher masses.
\section{Introduction} Quantum computing is a technology that exploits the laws of quantum mechanics to solve complicated problems much faster than classical computers. It has been applied in areas such as breaking cryptographic systems ~\cite{Shor1997}, searching databases~\cite{Grover1996}, and quantum simulation~\cite{Lloyd1996, Childs2018a}, in which it gives a quantum speedup over the best known classical algorithms. With the fast development of quantum hardware, recent results~\cite{arute2019quantum, Wu2021a, Zhong2020} have shown quantum advantages in specific tasks. An emerging direction is to investigate if quantum computing can offer quantum advantages in artificial intelligence, giving rise to an interdisciplinary area called \emph{quantum machine learning}~\cite{Biamonte2017b}. A leading strategy to quantum machine learning uses \emph{quantum neural networks} (QNNs), which are quantum analogs of artificial neural networks (NNs). Much progress has been made in applications of QNN in various topics~\cite{Cerezo2020, Bharti2021, Endo2020}, including quantum autoencoder~\cite{Romero2017, Cao2020}, supervised learning~\cite{Cong2018, Li2021-classifier, Schuld2021, Li2021}, dynamic learning~\cite{Khatri2018, Yu2022, Caro2022}, quantum chemistry~\cite{McArdle2018a}, and quantum metrology~\cite{Koczor2020, Beckey2022, Meyer2021}. Similar to the field of machine learning, a crucial challenge of quantum machine learning is to design powerful and efficient QNN models for quantum learning tasks, which requires a theoretical understanding of how structural properties of QNN may affect its expressive power. The expressive power of a QNN model can be characterized by the function classes that it can approximate. In recent times, the universal approximation property (UAP) of QNN models has been investigated, which is similar to the universal approximation theorem~\cite{cybenko1989approximation, hornik1991approximation} in machine learning theory. The authors of \cite{schuld2021effect} suggested that a QNN model can be written as a partial Fourier series in the data and proved the existence of a multi-qubit QNN model that can realize a universal function approximator. Another work~\cite{goto2021universal} considered multi-qubit QNN models as polynomials and obtained the UAP by using the Stone-Weierstrass theorem. The authors also proved UAP for single-qubit QNNs, while the input data is restricted to a finite set. Ref.~\cite{perez2021one} proved that even a single-qubit QNN can approximate any bounded function. The above results of UAP show that the expressivity of QNNs is strong, but it does not reveal the relationship between the structural properties of a QNN and its expressive ability. Therefore the UAP may not be a good guide for constructing QNN models with practical interests. In particular, it is worth noting that the existence proof in Ref.~\cite{schuld2021effect} is under the assumption of exponential circuit depth and arbitrary observables, which does not explicitly give the structure of QNNs. Meanwhile, Refs.~\cite{goto2021universal, perez2021one} demonstrated the construction of QNNs in detail, but trainable weights are introduced in the data pre-processing or post-processing, making the models hybrid classical-quantum neural networks (hybrid QNNs) rather than native QNN models. It is unclear whether the powerful expressivity comes from the classical part or the quantum part of hybrid models. On the other hand, a systematic analysis of how parameters in the QNN affect the classes of functions that it can approximate is missing. The absence of these theoretical foundations hinders the understanding on the expressive power and limitation of QNNs, which makes it highly necessary but challenging to design effective and efficient QNNs. In this paper, we formulate an analytical framework that correlates the structural properties of a single-qubit native QNN and its expressive power. We consider standard data re-uploading models that consist of interleaved data encoding circuit blocks and trainable circuit blocks. First, we prove that there exists a single-qubit native QNN that can express any Fourier series, which is a universal approximator for any square-integrable univariate function. It solves an open problem on the UAP of single-qubit QNNs in Ref.~\cite{schuld2021effect}. Second, we systematically analyze how parameters in trainable circuit blocks affect the Fourier coefficients. The main results on the expressivity of QNNs are summarized as in Fig.~\ref{fig:qnn_main}. We also provide numerical evidence on the approximation capabilities of QNN models. Third, we discuss potential difficulties for single-qubit native QNNs to approximate multivariate functions. Additionally, we compare native QNNs with the hybrid version and show the fundamental difference in their expressive power. We demonstrate the limitations of single-qubit native QNNs on approximating multivariate functions via numerical experiments. At last, we propose a possible strategy that extends single-qubit QNNs to multiple qubits, which could potentially overcome the limitations and handle practical classification tasks. Our analysis, beyond the UAP of QNNs, improves the understanding of the relationship between the expressive power and the structure of QNNs. This fundamental framework provides a theoretical foundation for data re-uploading QNN models, which is helpful to construct effective and efficient QNNs for quantum machine learning tasks. \begin{figure}[H] \centering \includegraphics[width=\textwidth]{./paper_images/main.png} \caption{\textbf{A schematic diagram of the main results.} A single-qubit data re-uploading QNN model consisting of interleaved trainable blocks (in blue) and encoding blocks (in orange) corresponds to a partial Fourier series. The encoding blocks decide the frequency spectrum of the Fourier series and the trainable blocks control the Fourier coefficients. By summability and convergence of the Fourier series, the QNN model can approximate any square-integrable target function.} \label{fig:qnn_main} \end{figure} We will start by giving some background and defining the native QNN models in the next section, and then analyze the expressivity of single-qubit native QNNs. In Section~\ref{sec:limitation}, we discuss the limitation of single-qubit native QNNs and compare native QNNs with hybrid QNNs, which shows the fundamental difference between their expressive power. The numerical experiments on the expressivity and limitations of single-qubit native QNNs are described in Section~\ref{sec:experiments}. An extension strategy to multi-qubit QNNs and their applications on classification tasks are presented in Section~\ref{sec:extension_scheme}. \section{Expressivity of single-qubit native QNN}\label{sec:expressivity} We consider the data re-uploading QNN model~\cite{perez-salinas2020Data}, which is a generalized framework of quantum machine learning models based on parameterized quantum circuits~\cite{jerbi2022quantum}. A data re-uploading QNN is a quantum circuit that consists of interleaved data encoding circuit blocks $S(\cdot)$ and trainable circuit blocks $V(\cdot)$, \begin{align}\label{def:data reuploading QNN} U_{\bm\theta,L}(\bm{x}) = V(\bm{\theta_0}) \prod_{j = 1}^L S(\bm{x}) V(\bm{\theta_j}), \end{align} where $\bm x$ is the input data, $\bm \theta = (\bm{\theta_0}, \ldots, \bm{\theta_L})$ is a set of trainable parameters, and $L$ denotes the number of layers of this model. We define the output of this model as the expectation value of measuring some observable $M$, \begin{equation} f_{\bm\theta, L}(\bm x) = \bra{0} U^\dagger_{\bm\theta,L}(\bm{x}) M U_{\bm\theta,L}(\bm{x}) \ket{0}. \end{equation} Then the expressive power of $U_{\bm\theta,L}(\bm{x})$ can be characterized by the classes of function that could be approximated by $f_{\bm\theta, L}(\bm x)$. Note that some data re-uploading QNNs introduce trainable weights in data pre-processing or post-processing, which are considered as hybrid QNNs. For example, the data encoding block defined as $S(\bm w \cdot \bm x)$ is essentially equivalent to feeding data $\bm x$ into a neuron with weight $\bm w$ and then uploading the output to an encoding block $S(\cdot)$. Such a mixing structure makes it hard to tell whether the expressive power comes from the classical or quantum part. To solely study the expressive power of QNNs, we define the concept of \emph{native QNN}, where all trainable weights are introduced by parameters of tunable quantum gates so that they can be distinguished from a hybrid QNN. Throughout this paper, we simply refer to the native QNN as QNN for short unless specified otherwise. To better understand the expressive power of QNNs, we start our analysis from the simplest single-qubit QNNs. We consider the case of one-dimensional input data, i.e.\ $x\in \RR$, which corresponds to the class of univariate functions. Ref.~\cite{schuld2021effect} investigated the expressive power of QNNs using the Fourier series formalism. The authors suggested that an $L$-layer QNN model can be expressed as truncated Fourier series of degree $L$ and characterized the limits of the QNN model's expressivity by the richness of the frequency spectrum. However, the flexibility in the Fourier coefficient, which is a lot more difficult to analyze, remains less known. Thus the expressivity of single-qubit QNNs is still an open problem. In this section, we systematically investigate the correspondence between the single-qubit QNN and the partial Fourier sum in terms of both the frequency spectrum and Fourier coefficients, which solves this open problem. A Fourier series is an expansion of a periodic function $f(x)$ in infinite terms of a sum of sines and cosines, \begin{equation} f(x) = \frac{a_0}{2} + \sum_{n=1}^\infty \biggl(a_n \cos(\frac{\pi}{T}nx) + b_n \sin(\frac{\pi}{T}nx)\biggr), \end{equation} where Fourier coefficients are \begin{align} a_0 &= \frac{1}{T} \int_{-T}^T f(x) d x,\\ a_n &= \frac{1}{T} \int_{-T}^T f(x)\cos(\frac{\pi}{T}nx) d x,\\ b_n &= \frac{1}{T} \int_{-T}^T f(x)\sin(\frac{\pi}{T}nx) d x, \end{align} and $T$ is half of the period of function $f(x)$. The quantities $n\frac{\pi}{T}$ are called the \emph{frequencies}, which are multiples of the base frequency $\frac{\pi}{T}$. The set of frequency $\{n\frac{\pi}{T}\}_n$ is called the \emph{frequency spectrum} of Fourier series. Applying Euler's formula, a Fourier series can be rewritten in the exponential form, \begin{equation}\label{eq:Fourier_exp} f(x) = \sum_{n=-\infty}^\infty c_n e^{i\frac{\pi}{T}nx}, \end{equation} where $c_0 = \frac{1}{2}a_0$, $c_n = \frac{1}{2}(a_n+ib_n)$ for $n > 0$, and $c_n = \frac{1}{2}(a_n-ib_n)$ for $n < 0$. In approximation theory, a partial Fourier sum (or truncated Fourier series) \begin{equation}\label{eq:partial_Fourier_sum} s_N(x) = \sum_{n = -N}^N c_n e^{i\frac{\pi}{T}nx} \end{equation} is commonly used to approximate the function $f(x)$. A partial Fourier sum can be transformed to a Laurent polynomial $P \in \CC[z, z^{-1}]$ by the substitution $z = e^{i\frac{\pi}{T}x}$, i.e., \begin{equation} P(z) = \sum_{n = -N}^N c_n z^n. \end{equation} A Laurent polynomial $P \in \FF[z, z^{-1}]$ is a linear combination of positive and negative powers of the variable $z$ with coefficients in $\FF$. The \emph{degree} of a Laurent polynomial $P$ is the maximum absolute value of any exponent of $z$ with non-zero coefficients, denoted by $\deg(P)$. We say that a Laurent polynomial $P$ has parity $0$ if all coefficients corresponding to odd powers of $z$ are $0$, and similarly $P$ has parity $1$ if all coefficients corresponding to even powers of $z$ are $0$. Considering the data re-uploading QNNs defined in Eq.~\eqref{def:data reuploading QNN}, it is natural to select the data encoding gate and trainable gate from the most prevalent parameterized quantum operators $\{R_X, R_Y, R_Z\}$. Following the pattern of Fourier series, we use $R_Z(x) = e^{-ixZ/2}$ to encode the input $x$ and let $R_Y(\cdot)$ be the trainable gates. Then we can write the QNN as \begin{equation}\label{eq:QNNyzydecompose} U_{\bm\theta,L}^{\YZY}(x) = R_Y(\theta_0) \prod_{j = 1}^L R_Z(x) R_Y(\theta_j), \end{equation} and the quantum circuit is as follows: \begin{figure}[H] \centerline{ \Qcircuit @C=0.5em @R=0.5em{ \lstick{\ket{0}}&\gate{R_Y(\theta_L)}&\gate{R_Z(x)}&\qw&&\cdots&&&\qw&\gate{R_Y(\theta_0)}&\qw&\meter \gategroup{1}{2}{1}{3}{.7em}{--} } } \caption{The QNN model of $L$ layers. Each layer consists of a trainable block and an encoding block, as shown in the dashed box. Here the trainable block is composed of Pauli rotation gates $R_Y(\cdot)$, while the encoding block is composed of Pauli rotation gate $R_Z(\cdot)$.} \label{fig:qnn_circuit_yzy} \end{figure} We show that the QNN $U_{\bm\theta,L}^{\YZY}(x)$ can be represented in the form of a partial Fourier sum with real coefficients. \begin{lemma}\label{lem:qnn_yzy} There exists $\bm\theta = (\theta_0, \theta_1, \ldots, \theta_L)\in \RR^{L+1}$ such that \begin{equation}\label{eq:poly form QNNyzy_} U_{\bm\theta,L}^{\YZY}(x) = \begin{bmatrix} P & -Q\\ Q^* & P^* \end{bmatrix} \end{equation} if and only if real Laurent polynomials $P, Q \in \RR[e^{ix/2}, e^{-ix/2}]$ satisfy \begin{enumerate} \item $\deg(P) = \deg(Q) \leq L$, \item $P$ and $Q$ have parity $L \pmod 2$, \item $\forall x\in \RR$, $\abs{P}^2 + \abs{Q}^2 = 1$. \end{enumerate} \end{lemma} Lemma~\ref{lem:qnn_yzy} decomposes the unitary matrix of the QNN $U_{\bm\theta,L}^{\YZY}(x)$ into Laurent polynomials with real coefficients, which can be used to represent a partial Fourier sum with real coefficients. Note that the Fourier coefficients have a constraint $\sum_n \abs{c_n}\leq 1$ by the condition 3 in Lemma~\ref{lem:qnn_yzy}. The proof of Lemma~\ref{lem:qnn_yzy} uses a method of mathematical induction that is in the similar spirit of the proof of quantum signal processing~\cite{low2017optimal, haah2019product, gilyen2019quantum}, which is a powerful subroutine in Hamiltonian simulation~\cite{Childs2018a} and quantum singular value transformation~\cite{gilyen2019quantum}. The forward direction is straightforward by the definition of $U_{\bm\theta,L}^{\YZY}(x)$ in Eq.~\eqref{eq:QNNyzydecompose}. The proof of the backward direction is by induction in $L$ where the base case $L=0$ holds trivially. For $L>0$, we prove that for any $U_{\bm\theta,L}^{\YZY}(x)$ where $P,Q$ satisfy the three conditions, there exists a unique block $R_Y^\dagger(\theta_k)R_Z^\dagger(x)$ such that polynomials $\hat{P}$ and $\hat{Q}$ in $U_{\bm\theta,L}^{\YZY}(x)R_Y^\dagger(\theta_k)R_Z^\dagger(x)$ satisfy the three conditions for $L-1$. Lemma~\ref{lem:qnn_yzy} explicitly correlates the frequency spectrum of the Fourier series and the number of layers $L$ of the QNN. Note that the proof of Lemma~\ref{lem:qnn_yzy} also illustrates the exact correspondence between the Fourier coefficients and parameters of trainable gates. A detailed proof can be found in Appendix~\ref{appendix:lemma qnn_yzy}. By Lemma~\ref{lem:qnn_yzy}, the partial Fourier sum corresponding to the QNN $U_{\bm\theta,L}^{\YZY}(x)$ only has real coefficients. With the exponential form of Eq.~\eqref{eq:Fourier_exp}, a Fourier series with real coefficients only has $\cos(nx)$ terms, which means $U_{\bm\theta,L}^{\YZY}(x)$ can be used to approximate any even function on the interval $[-\pi, \pi]$. Thus we establish the following proposition, whose proof is deferred to Appendix~\ref{appendix:QNN_yzy_function_ket0}. \begin{proposition}\label{prop:QNN_yzy_function_ket0} Let $\ket{\psi(x)} = U_{\bm{\theta},L}^{\YZY}(x)\ket{0}$ and the observable be the Pauli $Z$ operator. For any even square-integrable function $f:[-\pi, \pi] \to [-1, 1]$ and for all $\epsilon > 0$, there exist $L \in \NN^+$ and $\bm{\theta}\in\mathbb{R}^{L+1}$ such that \begin{equation}\label{eq:yzy_even_function_} \norm{\expval{Z}{\psi(x)}-f(x)}\leq \epsilon. \end{equation} \end{proposition} Although the above result states that the QNN $U_{\bm{\theta},L}^{\YZY}(x)\ket{0}$ is able to approximate a class of even functions within arbitrary precision, we can see that the main limitation of the expressive power of QNN $U_{\bm{\theta},L}^{\YZY}(x)$ is the real Fourier coefficients, which may restrict its universal approximation capability. To tackle this issue, our idea is to introduce complex coefficients to the corresponding Laurent polynomials, which can be implemented by adding a trainable Pauli $Z$ rotation operator in each layer. Specifically, we consider the QNN \begin{equation}\label{eq:QNNyzzyzdecompose} U_{\bm\theta, \bm\phi, L}^{\WZW}(x) = W(\theta_0, \phi_0) \prod_{j = 1}^L R_Z(x) W(\theta_j, \phi_j), \end{equation} where each trainable block is $W(\theta_j, \phi_j) \coloneqq R_Y(\theta_j)R_Z(\phi_j)$. The quantum circuit of $U_{\bm\theta, \bm\phi, L}^{\WZW}(x)$ is as follows: \begin{figure}[H] \centerline{ \Qcircuit @C=0.5em @R=0.5em{ \lstick{\ket{0}}&\gate{R_Z(\phi_L)}&\gate{R_Y(\theta_L)}&\gate{R_Z(x)}&\qw&&\cdots&&&\qw&\gate{R_Z(\phi_0)}&\gate{R_Y(\theta_0)}&\qw&\meter \gategroup{1}{2}{1}{4}{.7em}{--} } } \caption{The QNN model of $L$ layers. Each layer consists of a trainable block and an encoding block, as shown in the dashed box. Here the trainable block is composed of Pauli rotation gates $R_Y(\cdot)$ and $R_Z(\cdot)$, while the encoding block is composed of Pauli rotation gate $R_Z(\cdot)$.} \label{fig:qnn_circuit_yzzyz} \end{figure} To characterize the capability of this QNN, we establish the following Lemma which implies $U_{\bm\theta, \bm\phi, L}^{\WZW}(x)$ can express any Fourier partial sum with complex Fourier coefficients. \begin{lemma}\label{lem:qnn_yzzyz} There exists $\bm\theta = (\theta_0, \theta_1, \ldots, \theta_L)\in \RR^{L+1}$ and $\bm\phi = (\phi_0, \phi_1, \ldots, \phi_L)\in \RR^{L+1}$ such that \begin{equation}\label{eq:poly form QNNwzw_} U_{\bm\theta,\bm\phi,L}^{\WZW}(x) = \begin{bmatrix} P & -Q\\ Q^* & P^* \end{bmatrix} \end{equation} if and only if Laurent polynomials $P, Q \in \CC[e^{ix/2}, e^{-ix/2}]$ satisfy \begin{enumerate} \item $\deg(P) = \deg(Q) \leq L$, \item $P$ and $Q$ have degree parity $L \pmod 2$, \item $\forall x\in \RR$, $\abs{P}^2 + \abs{Q}^2 = 1$. \end{enumerate} \end{lemma} Lemma~\ref{lem:qnn_yzzyz} demonstrates a decomposition of the QNN $U_{\bm\theta,\bm\phi,L}^{\WZW}(x)$ into Laurent polynomials with complex coefficients, which can be used to represent a partial Fourier sum with complex coefficients in form of Eq.~\eqref{eq:partial_Fourier_sum}. The proof of Lemma~\ref{lem:qnn_yzzyz} is also similar to the proof of Lemma~\ref{lem:qnn_yzy} and its details are provided in Appendix~\ref{appendix:qnn_yzzyz}. Again, the proof demonstrates the effect of parameterized gates on the control of Fourier coefficients. We then prove in the following Theorem~\ref{thm:QNN_yzzyz_function_Z_measurement} that $U_{\bm\theta,\bm\phi,L}^{\WZW}(x)$ is able to approximate any square-integrable function within arbitrary precision, using the well-established result in Fourier analysis. The detailed proof is deferred to Appendix~\ref{appendix:QNN_yzzyz_function_Z_measurement}. \begin{theorem}\label{thm:QNN_yzzyz_function_Z_measurement} Let $\ket{\psi(x)} = U_{\bm{\theta},\bm\phi,L}^{\WZW}(x)\ket{0}$ and the observable be the Pauli $Z$ operator. For any square-integrable function $f:[-\pi, \pi] \to [-1, 1]$ and for all $\epsilon > 0$, there exist $L\in \NN^+$ and $\bm{\theta}\in\mathbb{R}^{L+1},\bm{\phi}\in\mathbb{R}^{L+1}$ such that \begin{equation}\label{eq:yzzyz_function_} \norm{\expval{Z}{\psi(x)} - f(x)} \leq \epsilon. \end{equation} \end{theorem} Up till now we only let the encoding gate be the $R_Z$ gate, what if we use other rotation operator gates to encode the data? It actually does not matter which one we choose as the encoding gate if the trainable gates are universal. Note that Pauli rotation operators $R_X(x), R_Y(x), R_Z(x)$ have two eigenvalues $\cos(x/2) \pm i \sin(x/2)$, and they can be diagonalized as $Q^\dagger R_Z(x) Q$. Merging unitaries $Q^\dagger$ and $Q$ to universal trainable gates gives the QNN that uses $R_Z(x)$ as the encoding gate. We hereby define the generic single-qubit QNNs as \begin{equation}\label{eq:QNNvzvdecompose} U_{\bm\theta, \bm\phi, \bm\lambda, L}^{\UZU}(x) = U_3(\theta_0, \phi_0, \lambda_0) \prod_{j = 1}^L R_Z(x) U_3(\theta_j, \phi_j, \lambda_j), \end{equation} where each trainable block is the generic rotation gate \begin{equation}\label{eq:universal_gate} U_3(\theta, \phi, \lambda)= \begin{bmatrix} \cos\frac\theta2&-e^{i\lambda}\sin\frac\theta2\\ e^{i\phi}\sin\frac\theta2&e^{i(\phi+\lambda)}\cos\frac\theta2 \end{bmatrix}. \end{equation} By definition, any $L$-layer single-qubit QNN, including $U_{\bm{\theta},\bm\phi,L}^{\WZW}$, can be expressed as $U_{\bm\theta, \bm\phi, \bm\lambda, L}^{\UZU}$. Thus $U_{\bm\theta, \bm\phi, \bm\lambda, L}^{\UZU}$ is surely a universal approximator. \section{Limitations of single-qubit native QNN}\label{sec:limitation} We have proved that a single-qubit QNN is a universal approximator for univariate functions, it is natural to consider its limitations. Is there a single-qubit QNN that can approximate arbitrary multivariate functions? We try to answer this question from the perspective of multivariate Fourier series. Specifically, we consider the generic form of single-qubit QNNs defined in Eq.~\eqref{eq:QNNvzvdecompose}. For a $d$-dimensional data $\bm x \coloneqq (x^{(1)},x^{(2)},\cdots,x^{(d)}) \in\RR^d$, let \begin{align}\label{eq:single_qnn_multivariate_function_unitary} U_{\bm\theta,L}(\bm{x}) = U_3(\theta_0, \phi_0, \lambda_0) \prod_{j = 1}^L R_Z(x_j) U_3(\theta_j, \phi_j, \lambda_j), \end{align} where each $x_j \in \bm x$ and $L\in\NN^+$. Further, let the output of the QNN be \begin{align}\label{eq:single_qnn_multivariate_function} f_{\bm\theta, L}(\bm x)=\bra{0}U^\dagger_{\bm\theta,L}(\bm{x}) M U_{\bm\theta,L}(\bm{x})\ket{0} \end{align} for an observable $M$. We write $V_j \coloneqq U_3(\theta_j, \phi_j, \lambda_j)$ for short, that is \begin{align} U_{\bm\theta,L}(\bm x)=V_0\prod_{j=1}^{L}\begin{bmatrix} e^{-ix_j\lambda_0} & 0\\ 0 & e^{-ix_j\lambda_1} \end{bmatrix}V_j, \end{align} where $\lambda_0=\frac{1}{2}$ and $\lambda_1=-\frac{1}{2}$. For the initial state $\ket{0}$, we have \begin{align} U_{\bm\theta,L}(\bm x)\ket{0} = \sum_{j_1,\cdots,j_L=0}^1 e^{-i(\lambda_{j_1}x_1+\cdots+\lambda_{j_L}x_L)}\, V_0\ketbra{j_1}V_{1}\cdots\ketbra{j_L}V_L\ket{0}. \end{align} We denote $I_i$ as the index set of encoding block $S(x^{(i)})$ and $I^{\prime}_i=\{\lambda_{j_k}|k \in I_i\}$ for $i=1,\cdots,d$, \begin{align} U_{\bm\theta,L}(\bm x)\ket{0} = \sum_{\bm{j}\in\{0,1\}^L} e^{-i(\Lambda_{\bm{j}}^{(1)}x^{(1)}+\cdots+\Lambda_{\bm{j}}^{(d)}x^{(d)})}\,V_0\ketbra{j_1}V_{1}\cdots\ketbra{j_L}V_L\ket{0}, \end{align} where $\bm j$ is bit-strings composed of $j_l$, $l=1,\cdots,L$, and $\Lambda_{\bm j}^{(i)}=\sum \lambda$, $\lambda \in I^\prime_i$. Further, \begin{align}\label{eq:qnn_fourier_series_form} f_{\bm \theta,L}(\bm x)=\sum_{\bm{j,k}\in\{0,1\}^L}C_{\bm{j,k}}e^{ih_{\bm{j,k}}\cdot\bm{x}}, \end{align} where \begin{align} C_{\bm{j,k}}=\bra{0}V^{\dagger}_L\ketbra{k_L}V^{\dagger}_{L-1}\cdots\ketbra{k_1}V^{\dagger}_1MV_1\ketbra{j_1}\cdots V_{L-1}\ketbra{j_L}V_{L}\ket{0}, \end{align} and $h_{\bm{j,k}}=(\Lambda_{\bm k}^{(1)}-\Lambda_{\bm j}^{(1)},\cdots,\Lambda_{\bm k}^{(d)}-\Lambda_{\bm j}^{(d)})$. We consider the case of the i-th dimension, \begin{align} \Lambda_{\bm k}^{(i)}-\Lambda_{\bm j}^{(i)} = \{(\lambda_{k_1}+\cdots+\lambda_{k_N})-(\lambda_{j_1}+\cdots+\lambda_{j_N})|\lambda_{k_1}\cdots\lambda_{k_N},\lambda_{j_1}\cdots\lambda_{j_N}\in I^\prime_i\} \end{align} with $N=|I_i^{\prime}|$. Since $\lambda_0=\frac{1}{2}$ and $\lambda_1=-\frac{1}{2}$, we can derive \begin{align} \{\Lambda_{\bm k}^{(i)}-\Lambda_{\bm j}^{(i)}|\bm{j,k}\in\{0,1\}^L\}=\{-N,\cdots,0,\cdots,N\}. \end{align} Without loss of generality, we assume $|I_i^{\prime}|=N$ for all $i=1,\cdots,d$. Then, \begin{align}\label{eq:multivatiate_fourier_frequency} \{h_{\bm{j,k}}|\bm{j,k}\in\{0,1\}^L\}=\{-N,\cdots,0,\cdots,N\}^d. \end{align} It can be inferred that a single-qubit QNN contains Fourier frequencies as rich as in Eq.~\eqref{eq:multivatiate_fourier_frequency}. However, by the curse of dimensionality, it requires exponentially many terms in $d$ to approximate a function in $d$ dimensions. Thus a single-qubit QNN cannot match the flexibility of Fourier coefficients due to the constraint on degrees of freedom. Further, it implies that single-qubit QNNs may lack the capability to universally approximate arbitrary multivariate functions from the perspective of the Fourier series. It has been proved that a single-qubit hybrid QNN can approximate arbitrary multivariate functions~\cite{goto2021universal, perez2021one}. However, the UAP of hybrid QNNs is fundamentally different from the native model that we investigated. Those hybrid models involve trainable weights either in data pre-processing or post-processing. Specifically, introducing trainable weights in data pre-processing is equivalent to multiplying each frequency of the Fourier series by an arbitrary real coefficient, i.e.\ \begin{equation} S(wx) = R_Z(wx) = e^{-iw\frac{x}{2}Z}. \end{equation} Therefore it enriches the frequency spectrum of native QNNs, which only contain integer multiples of the fundamental frequency. It can also be readily extended to the encoding of multi-dimensional data $\bm x \coloneqq (x^{(1)},x^{(2)},\cdots,x^{(d)})$ as \begin{align} S(w_1 x^{(1)})S(w_2 x^{(2)})\cdots S(w_d x^{(d)}) &= R_Z(w_1 x^{(1)})R_Z(w_2 x^{(2)})\cdots R_Z(w_d x^{(d)})\\ &= R_Z(\bm w \cdot \bm x)\\ &= e^{-\frac{1}{2} i \bm w \cdot \bm x Z} \end{align} where $\bm w = (w_1, \ldots, w_d)$ is a vector of trainable weights. Using such an encoding method enables a single-qubit QNN to approximate any continuous multivariate function~\cite{perez2021one}. We notice that, although the trainable weights enrich the frequency spectrum of the Fourier series, the capability of hybrid QNNs to approximate arbitrary multivariate functions is not obtained from the multivariate Fourier series, but from the universal approximation theorem~\cite{cybenko1989approximation, hornik1991approximation}. In another word, the expressivity of a hybrid QNN mostly comes from the classical structure, and the QNN serves as an activation function $\sigma(x) = e^{-ix}$ in the universal approximation theorem. This fact might be able to shed some light on the reason why a hybrid QNN does not provide quantum advantages over the classical NN. \section{Numerical experiments on single-qubit QNN}\label{sec:experiments} In order to better illustrate the expressive power of single-qubit native QNNs, we supplement the theoretical results with numerical experiments. Specifically, we demonstrate the flexibility and approximation capability of single-qubit native QNNs in subsection~\ref{subsec:univariate_function_approximation}. The limitations of single-qubit QNNs are illustrated in subsection~\ref{subsec:multivariate_function_approximation} through the numerical experiments on approximating multivariate functions. All simulations are carried out with the Paddle Quantum toolkit on the PaddlePaddle Deep Learning Platform~\cite{ma2019paddlepaddle}. \subsection{Univariate function approximation}\label{subsec:univariate_function_approximation} A damping function $f(x)=\frac{\sin{(5x)}}{5x}$ is used to demonstrate the approximation performance of single-qubit native QNN models of various number of layers. The dataset consists of 1000 data points uniformly sampled from the interval $[0, \pi]$, from which 200 are selected at random for the training set and 100 for the test set. Since the function $f(x)=\frac{\sin{(5x)}}{5x}$ is obviously an even function, we select the QNN model as defined in Eq.~\ref{eq:QNNyzydecompose}. The parameters of trainable gates are initialized from the uniform distribution on $[0, 2\pi]$. We adopt a variational quantum algorithm, where a gradient-based optimizer is used to search and update parameters in the QNN. Here the Adam optimizer is used with a learning rate of 0.1. We set the training iterations to be 100, with a batch size of 20 for all experiments. While approximating a function $f(x)$ by a series expansion (e.g., Fourier series and Taylor series), the approximation error decreases gradually as the number of expansion terms increases. As shown in Lemma~\ref{lem:qnn_yzzyz}, the frequency spectrum and Fourier coefficients will be extended by consecutive repetitions of the encoding gate and trainable gate. The numerical results in Fig.~\ref{fig:depth_compare} illustrate that the approximation error decreases as the number of layers increases, which is consistent with our theoretical analysis. Specifically, the QNN model fails to fit the target function for $L=2$ and $L=4$. When $L$ increases from $2$ to $10$, the predictions on test data become more accurate, i.e., the expressivity of the QNN model is decided by the number of layers $L$. \begin{figure}[htbp] \centering \includegraphics[width=\textwidth]{paper_images/one-qubit-depth-compare.png} \caption{Fitting the function $f(x)=\frac{\sin{(5x)}}{5x},\ x\in[0,\pi]$ in $U^{\YZY}_{\bm\theta, L}$ QNN with different number of layers. For the approximation, blue squares, green dots and red triangles indicate the simulation results of QNN with $L=2$, $L=4$ and $L=10$, respectively. The theoretical truncation error is calculated using the uniform norm $\norm{f_N(x)-f(x)}_\infty$, where $f_N(x)$ is the truncated Fourier series of $f(x)$ with $N$ terms.} \label{fig:depth_compare} \end{figure} The Fourier series has a natural advantage in dealing with periodic functions. As stated previously, universal approximation theorems mainly focus on a bounded region, and the majority of models have satisfactory performances for learning the underlying function given proper data. In some cases, we may not only pay attention to interpolation but also explore the extrapolation behavior of the model. More explicitly, a class of functions with periodic nature will have the same pattern in an unbounded region. To further show the flexibility and capability of QNN, a fancy function, square wave, is selected to be the objective function. \begin{figure}[htbp!] \centering \subfloat[Approximation curves for square wave]{\label{fig:mdleft}{\includegraphics[width=0.5\textwidth]{./paper_images/square-wave-fig.png}}} \subfloat[Training Loss ]{\label{fig:mdright}{\includegraphics[width=0.5\textwidth]{./paper_images/square-wave-loss-fig.png}}} \caption{Panel (a) shows the result of approximating square wave by a $45$-layer QNN $U_{\bm\theta, \bm\phi, L}^{\WZW}(x)$. Panel (b) is the loss during the training process. For showing periodic extrapolation, 400 data points are sampled uniformly from $[0,20]$, and the test region is extend to $[0,30]$.} \label{fig:periodic-extra-comparison} \end{figure} The numerical results shown in Fig.~\ref{fig:periodic-extra-comparison} fully demonstrate the strength of the QNN model in dealing with periodic functions. By simply repeating 45 layers, the single-qubit QNN $U_{\bm\theta, \bm\phi, L}^{\WZW}(x)$ learns the function hidden beneath the training data. More significantly, the approximation works well not only for input variables located between the training data but also outside of the region. \subsection{Multivariate function approximation}\label{subsec:multivariate_function_approximation} In this subsection, we numerically demonstrate the limitations of single-bit native QNNs in approximate multivariate functions. We examine the convergence of the loss as the number of layers of the circuit increases and compare the outcome with the target function. Specifically, we consider the bivariate function Himmelblau used in Ref.~\cite{perez2021one}. The 3D plot of the Himmelblau function is as shown in Fig.~\ref{fig:Himmelblau}. Similarly, we first obtain data from the target function. The training set consists of 900 data points sampled from interval $[-\pi,\pi]^2$. We use the single-qubit QNN of various layers defined as Eq.~\eqref{eq:single_qnn_multivariate_function_unitary} to learn the target function. The mean squared error (MSE) serves as the loss function. The experimental setting is the same as in the univariate function approximation, where a variational quantum algorithm is adopted. The numerical results are shown in Fig.~\ref{fig:multivariate_function} imply that the single-qubit native QNN has difficulty in approximating bivariate functions. The approximation result of QNN as shown in Fig.~\ref{fig:Himmelblau_approx} is quite different from the target Himmelblau function, even for a very deep circuit of $40$ layers. Also, the training loss in Fig.~\ref{fig:Himmelblau_loss} does not decrease as the number of layers increases. Note that the target function is only bivariate here, the limitations of single-qubit native QNNs will be more obvious in the case of higher dimensions. \begin{figure}[htbp!] \centering \subfloat[Himmelblau function. ]{\label{fig:Himmelblau}{\includegraphics[width=0.33\textwidth]{./paper_images/Himmelblau_function.png}}} \subfloat[Approximation results for $L=40$.]{\label{fig:Himmelblau_approx}{\includegraphics[width=0.33\textwidth]{./paper_images/Himmelblau_predict_function.png}}} \subfloat[Training loss for various layers.]{\label{fig:Himmelblau_loss}{\includegraphics[width=0.33\textwidth]{./paper_images/Himmelblau_loss.png}}} \caption{Panel (a) is the target Himmelblau function $f(x,y) = (x^2+y-11)^2 + (x+y^2-7)^2$. Here $x,y\in[-\pi,\pi]$ and $f(x,y)$ is normalized, i.e., $-1<f(x,y)<1$. Panel (b) shows the approximation result of a $40$-layer QNN. Panel (c) is the plot of training loss (MSE) during the optimization for different number of layers.} \label{fig:multivariate_function} \end{figure} \section{Extension to multi-qubit QNNs}\label{sec:extension_scheme} We have already shown that the single-qubit native QNNs are able to approximate any univariate function but possibly could not approximate arbitrary multivariate functions by Fourier series. To address this limitation, research into the extension approach of single-qubit native QNNs is crucial. Analogous to classical NNs, they have significantly improved their capabilities from shallow to deep structures. We conjecture that QNNs have similar characteristics. We hereby provide an extension strategies as shown in Fig.~\ref{fig:parallelentanglement}, called \emph{Parallel-Entanglement}. We introduce quantum entanglement by CNOT gates. Similar to classical NNs in which different neurons are connected by trainable parameters to form deep NNs, QNNs can establish the connection between different qubits through quantum entanglement. \begin{figure}[htbp] \centerline{ \Qcircuit @C=0.5em @R=0.5em{ \lstick{\ket{0}}&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\ctrl{1}&\qw&\targ&\qw&&\cdots&&&\gate{R_Z(x_1)}&\qw&&\cdots&&&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\meter\\ \lstick{\ket{0}}&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\targ&\ctrl{1}&\qw&\qw&&\cdots&&&\gate{R_Z(x_2)}&\qw&&\cdots&&&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\meter\\ \lstick{\ket{0}}&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}& \qw&\targ&\qw&\qw&&\cdots&&&\gate{R_Z(x_3)}&\qw&&\cdots&&&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\meter\\ \lstick{\vdots}&&&&&&&&\vdots&&&&&&\vdots\\ \lstick{\ket{0}}&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\qw&\qw&\ctrl{-4}&\qw&&\cdots&&&\gate{R_Z(x_d)}&\qw&&\cdots&&&\gate{R_Z(\cdot)}&\gate{R_Y(\cdot)}&\meter \gategroup{1}{2}{5}{7}{.4em}{.} \gategroup{1}{2}{5}{12}{.8em}{--} } } \caption{The Parallel-Entanglement model with $d$ qubits and $L$ layers. Each layer consists of a trainable block and an encoding block, as shown in the dashed box. Here each trainable block is composed of repeated sub-blocks of Pauli rotation gates and CNOT gates, as shown in the dotted box. The number of sub-blocks in each trainable block is referred to as the \emph{depth}. The encoding block is a tensor of Pauli rotation gate $R_Z(\cdot)$.} \label{fig:parallelentanglement} \end{figure} Through experiments on the classification task, we illustrate its potential to address practical problems. The public benchmark data sets are used to demonstrate the capabilities of Parallel-Entanglement models to tackle classification tasks. \begin{table}[htbp] \centering \begin{tabular}{c|c|c|c|c|c} \textbf{Dataset}&\textbf{Qubit}&\textbf{Layer}&\textbf{Depth}&\textbf{Parameter}&\textbf{Average Accuracy}\\ \hline Iris & 4 & 1 & 1 & 16 & $0.990\pm 0.01$\\ \hline HTRU2 & 8 & 1 & 1 & 32 & $0.910\pm 0.09$\\ & & 3 & 1 & 64 & $0.970\pm 0.03$\\ & & 3 & 2 & 128 & $0.980\pm 0.02$\\ \hline Breast Cancer & 4 & 1 & 1 & 16 & $0.780\pm 0.06$\\ & & 3 & 1 & 32 & $0.840\pm 0.02$\\ & & 3 & 2 & 64 & $0.845\pm 0.04$\\ \hline \end{tabular} \caption{The performance of the Parallel-Entanglement model on Iris~\cite{fisher1936use}, Breast Cancer~\cite{michalski1986multi}, and HTRU2~\cite{lyon2016fifty} data sets. Specifically, 100 pieces of data are sampled from the dataset, with $80\%$ of them serving as the training set and $20\%$ serving as the test set. With a learning rate of 0.1 and a batch size of 40, the Adam optimizer is still used to achieve the best results. To avoid the effects of initialization, we randomly ran the model 10 times, recording the average classification accuracy.} \label{tab:comparison_label} \end{table} The results for classification tasks are summarized in Table~\ref{tab:comparison_label}. The Iris data set contains 3 different classes, each class only has four attributes. Obviously, the 4-qubits model easily obtains an average accuracy of over $99\%$ with only 1 layer on Iris data. The HTRU2 data set only has two categories, and each example has 8 attributes. As a result, an 8-qubit QNN is required to complete this task. The average accuracy for binary classification with 1 layer achieves above $91\%$. We can see that adding the number of layers to 3 and the depth of each layer to 2 increases the average accuracy to $98\%$. Since the Breast Cancer data contains 30 features for binary classification, the principal component analysis (PCA) is used to reduce feature dimension. Here the numerical results of a 4-qubit model are given to illustrate the power of the QNN. Compared to the model using complete information, the QNN model does not perform perfectly. But increasing the number of layers and the depth may improve the test accuracy. Based on the finding of the preceding experiments, it is clear that the Parallel-Entanglement model is capable of handling practical classification problems. \section{Conclusion and outlook} In this work, we presented a systematic investigation of the expressive power of single-qubit native QNNs, which are capable to approximate any square-integrable univariate function with arbitrary precision. We not only give an existence proof but also analytically show an exact mapping between native QNNs and partial Fourier sums from perspectives of both frequency spectrum and Fourier coefficients, which solves an open problem on the UAP of single-qubit QNNs in Ref.~\cite{schuld2021effect}. Our proof, inspired by quantum signal processing, explicitly illustrates the correlation between parameters of trainable gates and the Fourier coefficients. Other than the expressivity, we also discuss the limitation of single-qubit QNNs from the perspective of multi-dimensional Fourier series. Both the expressivity and limitation of single-qubit QNNs are validated by numerical simulations. Other than the analysis of single-qubit QNNs, we also show the possibility of extending the QNNs to multiple qubits, which could potentially overcome the limitations of single-qubit QNNs and thus handle practical classification tasks. We expect our results provide a fundamental framework to the class of data re-uploading QNNs, which serves as insightful guidance on the design of such QNN models. Although the expressive power and limitations of single-qubit QNNs have been well investigated, single-qubit models can be efficiently simulated by classical computers and hence cannot bring any quantum advantage. Therefore one future step is to generalize the framework of single-qubit QNNs to multivariate function approximators. The existence of multi-qubit QNNs that can approximate any multivariate functions has been proved in Ref.~\cite{schuld2021effect} under the assumption of exponential circuit depth and arbitrary observable, which are impractical to implement and also do not imply quantum advantage. A recent paper presents a method that extends quantum signal processing to multivariable~\cite{rossi2022multivariable}, which might also be applicable to single-qubit QNNs. It is of great interest to study the optimal implementation of multi-qubit QNNs with multivariate universal approximation properties, which may potentially offer computational advantages over classical techniques. \textbf{\textit{Acknowledgements.}} We would like to thank Runyao Duan for helpful suggestions on quantum signal processing. We also thank Guangxi Li, Geng Liu, Youle Wang, Haokai Zhang, Lei Zhang, and Chengkai Zhu for useful comments. Z. Y., H. Y., and M. L. contributed equally to this work. Part of this work was done when Z. Y., H. Y., and M. L. were research interns at Baidu Research. \bibliographystyle{unsrt}
\section{Introduction} Climate Change affects the Earth on a global scale, but its impact exhibits inhomogeneities over many spatial scales. Both large scale features of climate change \cite{Screen2014,Kornhuber2019,temperature_data} and the evolution of local fluctuations in weather and climate \cite{Sutton2015,Vincze2017} have been extensively studied. However, the multi-scale nature of climate-change emphasises the need for a unified diagnostic examining correlations on all spatial scales \cite{Donges2009,Donges2015,Cecco2018,ZHANG2015}. Historically, Fourier decomposition of temperature-fluctuations has been utilised to determine the relative importance of different spatial scales \cite{Nastrom1985,Straus1999}. Such spectral domain analyses has revealed atmospheric fields (such as absolute temperature, wind velocity, pressure, etc.) are commonly scale-free over a wide dynamical range \cite{Lovejoy2008,Lovejoy2010,Chen2016,Cavanaugh2017}. However, the evolution of spectral coefficients remain unexplored across the time-scales of climate change. Therefore, this article introduces temperature anomalies to the spatial spectral domain and uniquely constrains the temporal evolution of this spectral regime. The analysis extends across a wide range of spatial scales from planetary to 50 km resolution with a monthly temporal resolution from 1850 to 2022. This is achieved by presenting the climate and its evolution on a range spatial scales through a collection of spherical harmonics. This basis is chosen across many fields of physics, because the visual nature of the different modes of spherical harmonics allows an interpretable decomposition of any scalar field, such as temperature fluctuations, on a sphere. The significance of different spatial scales is described by the power spectrum of spherical harmonics. Therefore, we determine the spectrum's shape (see \S \ \ref{sec:power}), where large spatial scales confirm previous results within climatology and small scale features follow the analytical predictions of turbulence confined to two dimensions. Furthermore, we show that temperature anomalies on these different scales are causally connected because variations cascade from large to small spatial scales. We extend the analysis with a temporal evolution, where the contribution of each mode is detailed across time. Thus, in \S \ \ref{sec:lowest} we explore the evolution of the lowest modes with key results conforming to established observational trends within climatology. Furthermore, the time-evolution of the spectrum (see \S \ \ref{sec:time_evol}) quantifies how climate change results in an increased magnitude and frequency of local temperature fluctuations. This increase in volatility is not isotropic, but predominantly due to increased fluctuations along longitudes not latitudes (see \S \ \ref{sec:anisotropy}). Ultimately, spherical harmonics prove an intuitive framework in decomposing the local effects of global warming. \begin{figure*} \centering \includegraphics[width=0.95\linewidth]{Fig1.PNG} \caption{Projected visualisation of first three degrees ($l={0,1,2}$) of spherical harmonics with order $m=0$. \underline{Left:} The 0th spherical harmonics is an average value around the sphere. \underline{Center:} illustrates the different behaviour of the Northern and Southern hemisphere. \underline{Right:} emphasises the difference between the poles and the equator.} \label{fig:sph_vis} \end{figure*} \section{Methods}\label{sec:Theory} \subsection{An Introduction to Spherical Harmonics} Spherical harmonics are ortho-normal base functions on the surface of a sphere. They are in this analysis used to decompose the temperature anomalies across the planet, $T(\theta, \varphi,t)$ at any given time, $t$: \begin{equation}\label{eq:decomp} T(\theta, \varphi,t) = \sum_{l=1}^\infty \sum_{m=-l}^l a_{l,m}(t) Y_l^m(\theta, \varphi) \end{equation} where $a_{l,m}$ is the coefficient of the spherical harmonic $Y_l^m(\theta, \varphi)$, which is given by the Legendre-polynomial $P_l^m(\cos\theta)$: \begin{equation} Y_l^m(\theta, \varphi) = (-1)^m \bigg[\frac{2l+1}{4\pi} \frac{(l-m)!}{(l+m)!} \bigg]^{1/2} P_l^m(\cos\theta) e^{im\varphi} \end{equation} The shape of $Y_l^m$ is described by the degree, $l$, which determines the number of oscillations around the sphere. In this context, the l'th harmonic is a description of fluctuations on angular scales $\theta \approx \frac{180}{l}$, which correspond to spatial scales of $\frac{20.000 km}{l}$. For instance, the monopole, $l=0$, gives the average value around the sphere; The dipole, $l=1$, shows the behaviour of the opposing hemispheres with different signs; The quadruple, $l=2$, describes the behaviour of the opposing hemispheres with the same sign (see Fig. \ref{fig:sph_vis}). Furthermore, the order, $m$ (ranging from $-l$ to $l$), determines whether the waves are oriented along longitudes ($m=0$) or latitudes ($m = \pm l$). $a_{l,m}$ is the coefficient of the $Y_l^m$'th harmonic and are determined from the temperature field $T(\theta, \varphi,t)$: \begin{equation}\label{eq:a_lim} a_{l,m}(t) = \int_{-1}^1\int_0^{2\pi} [Y_l^m(\theta, \phi)]^*\, T(\theta, \phi,t)\, d\phi \; d(\cos \theta) \end{equation} Here, $|a_{l,m}|^2$ represents the contribution of any spherical harmonic to the decomposed function, so the significance of a degree is given by the power, $C_l$: \begin{equation}\label{eq:pow} C_l(t) = \frac{1}{2l + 1} \sum_{m=-l}^l|a_{l,m}(t)|^2 % \end{equation} Thus, investigating the power spectrum is a simple diagnostic tool for characterizing the magnitude of temperature fluctuations as a function of angular scale. \begin{figure*} \centering \includegraphics[width=\linewidth]{Fig2.png} \caption{\underline{Left:} Observed temperature anomalies, \underline{Center:} Spherical Harmonical Reconstruction using all degrees $l<90$, \underline{Right:} Residual between observed and reconstructed for May 2021. Note, we emphasise discrepancies by increasing the contrast on residuals. The magnitude of residuals is typically small with 50\% of the surface being within 0.05 degrees.} \label{fig:l_comb_mol_1} \end{figure*} \subsection{Data-sets and Potential Bias} \label{sec: Part2} The data was collected from The Berkeley Earth Land/Ocean Temperature Record \cite{temperature_data}. The data set is a combination of the Berkeley Earth land-surface temperature field \cite{land_temp} and a reinterpolated version of the HadSST ocean temperature field \cite{Kennedy2019}. It provides the monthly temperature anomalies along with their uncertainties across the globe in a 360$\times$180 grid (longitude vs. latitude), spanning a period of 171 years between Jan 1850 and Dec 2021. The anomalies are reported relative to the locally inferred average temperature for that month over the period Jan 1951-Dec 1980 [for further details see \cite{temperature_data}]. Note, that both absolute temperature and temperature anomalies can be decomposed in spherical harmonics, but the former is affected by systematic shifts [for instance the dependence of temperatures with elevation]. For completeness the power spectrum of absolute temperature is computed in Appendix \ref{app:avg_temp}. However, subtracting the underlying mean, we decouple these systematic shifts and thereby examine only the structure of dynamical temperature fluctuations caused by kinematics of the atmosphere. Thus, we follow the convention of utilizing anomalies, which has been shown to more accurately describe climate variability over larger areas \cite{temperature_data}. Importantly, the coverage of the grid is a dynamic quantity ranging from 57 \% in 1850 to 99 \% coverage in 2015. Limited coverage can induce a bias in the estimated spherical harmonical decomposition \cite{Ahlers2016,Wieczorek2018}. However, the decomposition in this analysis is robust within this range in coverage, as the overall trends remain unchanged when limiting the analysis to the coverage used in 1850 (see Appendix \ref{app:robustness_check}). Additionally, the significant increase of active recording stations could bias any temporal trend of large modes as more stations may resolves features on finer scales. From 1850 to 1960 the number of active land-temperature stations and sea-temperature observations increased 60-fold and 20-fold respectively (see Appendix \ref{app:num_sta}); Over the same period only a slight evolution of the power-spectrum is observed. In contrast, from 1960 to 2020 the number of active land-temperature stations and sea-temperature observations stayed relatively consistent, with an increase of 15\% and 20\% respectively (see Appendix \ref{app:num_sta}). However, in this period a drastic growth is observed within the power-spectrum. We emphasise, that increasing the number of observations by orders of magnitude still yields consistent power-spectra, so the slightly increased statistics of the last 60 years does explain the recent and drastic evolution of the power-spectrum. For completeness the paper presents the decomposition over all 171 years, but the emphasis remains on the recent evolution from 1960 to 2021, where the coverage remains above 95 \% at all times. Furthermore, this limited period mitigates the potential historical biases in SST from the early 20th century \cite{Chan2019}. The uniform gridding of the Berkeley Earth Land/Ocean Temperature Record is achieved through an interpolated field with a kriging-based approach [for detail on implementation see \cite{temperature_data}]. Such interpolation will potentially introduce a bias by smoothing structures on the spatial scales of interpolation. However, the coverage grows drastically and in extension interpolation-lengths diminish from 1850-1960. If this bias was significant within this data-set the power of intermediate and high modes should increase from 1850 to 1960 as the suppression of large interpolation-lengths diminishes. Nevertheless, intermediate and large modes [eg. $C_{20}(t)$, $C_{50}(t)$ or $C_{80}(t)$] show no consistent growth throughout this period. From 1960-2020 the sampling over land is dense containing approximately 20.000 active measurement sites with typically around 100 km between stations. A bias from smoothing on scales below 100 km will not significantly affect the planetary or mesoalpha scales analysed below (see Appendix \ref{app:interp}). In contrast, the sampling over sea is relatively sparse with up to 500 km between grid-cells in HadSST; These interpolation-scales could theoretically suppress modes of degree $l>40$. However, note this suppression is not observationally suggested from the power-spectrum itself with modes $l=90$ following the temporal trends and spatial structure of degrees well-outside the potentially suppressed regime (eg. $l=20$). This article provides all spherical harmonics to spatial scales of 200 km, but we caution against any interpretation of structures (especially over sea) below 500 km. In addition to the data-resolution differences between land and sea, there exist well established kinematic and dynamical differences between land and sea \cite{land_temp,Kennedy2019}. Therefore, we also present the relative contribution of sea and land temperatures (see Appendix \ref{app:div}). Here we show that land-temperatures (despite the smaller surface area) are the dominant contributor to the shape of the power-spectrum. Lastly, it is emphasised that the recorded findings presented remain robust across any coarser grid and any temporal resolution from the scale of decades to days. The monthly time-resolution was chosen due to its global coverage (including both land and ocean temperatures). Furthermore, the presented results are insensitive to the specific choice of analysing The Berkeley Earth Land/Ocean Temperature Record with other coincident catalogues yielding a similar functional form of the power spectrum with a similar evolution across seasons and decades. In Appendix \ref{app:ERA5}, we present a similar power-spectral decomposition of the ERA5 data-set. \subsection{Decomposition Accuracy} The spherical harmonical decomposition is computed with the well-documented and readily accessible pyshtools-software \cite{Wieczorek2018}. With increasingly detailed coverage the estimated Spherical Harmonics decomposition is ensured to converge towards the observed temperature-landscape. However, for any limited spatial resolution the spherical harmonics decomposition remains an approximation of the underlying landscape. In Fig. \ref{fig:l_comb_mol_1} we show an example of a decomposition of temperature anomalies to illustrate the high accuracy of the approach. Utilizing all spherical harmonics up to degree $l=90$, does provide an excellent estimation of the underlying temperature-field. Typical deviations between observations and the spherical harmonic reconstructions (using up to degree $l=90$) are 0.05 K. Furthermore, the observed and reconstructed temperature anomalies are not dominated by systematic trends with altitude or latitude. Such effects are decoupled from the investigated signal because we utilise the temperature anomalies and not the absolute temperature. \section{Results} \label{sec:results} \subsection{The Lowest Modes} \label{sec:lowest} With spatially resolved temperatures, we can determine the weights, $a_{l,m}(t)$, of the spherical harmonic functions for the scalar temperature field. To exemplify the information available in the time-series of spectral weights, we show the lowest degree coefficients from 1850 to 2021 in Fig. \ref{fig:temp_low_l}. Each of these time-series contain unique perspectives on the spatial distribution of temperature anomalies, which will now be shortly summarized. \newline \begin{figure}[ht] \centering \includegraphics[width=\linewidth]{a_00_10_20.pdf} \caption{ $a_{0,0}, a_{1,0}, a_{2,0}$ coefficients of the spherical harmonics derived from global temperature anomalies resolved from Jan 1850 - Jan 2021.} \label{fig:temp_low_l} \end{figure} \begin{figure*} \centering \includegraphics[width=\linewidth]{Alt_Fig3_3.PNG} \caption{ Right: Power of select modes from 1950-2020 with linear fit overlayed. No systematic temporal evolution of power is seen for the mode l=5, but the power on smaller spatial scales is increasing towards the present. Left: Power spectrum of temperature distribution from 1850s (in black) to 2010s (in red). Dashed-dotted purple line indicates a generic powerlaw with powerlaw index $\alpha=-3$. The power of modes $l \geq 10$ (ie. on spatial scales smaller than 2000 km) is increasing with time especially from 1960 to 2020. The identical power-spectrum of the ERA5-catalogue (which has finer spatial resolution but less temporal range) is shown in Appendix \ref{app:ERA5}.} \label{fig:power_temp} \end{figure*} \textbf{Global Temperature $(a_{0,0})$}: First, the lowest degree (i.e. the spherically symmetric mode) increases towards the present. This mode's evolution demonstrates the increase of the global average temperature \cite{temperature_data}. \newline \textbf{The North-South Inequality $(a_{1,0})$}: The $Y_1^0(\theta, \varphi)$ spherical harmonic describes variations between northern and southern regions of the sphere. Here $a_{1,0}<0$ implies that the increase in temperature is larger for the Northern Hemisphere than for the Southern Hemisphere. Therefore, the evolution of $a_{1,0}(t)$ reaffirms the well-known interhemispheric temperature asymmetry \cite{Friedman2013}. In the new millennium the Northern Hemisphere has experienced a majority of the temperature increase with the annual interhemispheric temperature asymmetry being approximately 0.4 \degree C in 2010 \cite{temperature_data}. \newline \textbf{ Increased Heating of Polar Regions $(a_{2,0})$}: The $Y_2^0(\theta, \varphi)$ spherical harmonic describes variations between polar and equatorial regions of the sphere. Thus, the growth of $a_{2,0}$ in recent decades validates the well-known polar amplification \cite{Budyko1969,Goosse2018}. Note, the north-south symmetry of $Y_2^0(\theta, \varphi)$ means that $a_{2,0}$ does not constrain the asymmetry of polar amplification \cite{Salzmann2017}. \subsection{The Power Spectrum} \label{sec:power} While the lowest degrees of spherical harmonics remain easily interpretable, the entire power spectrum is required for a comprehensive understanding of the spatial structure. In Fig. \ref{fig:power_temp} the power-spectrum is shown for each decade from 1850 to 2020. The overall shape of the power-spectrum is unchanged across decades; the power is constant on the largest of scales, but at a turnover length-scale transitions to a powerlaw-like decline. These two different regimes are dominated by different processes. First, the observed power is approximately flat for $2\leq l \leq 7$ corresponding to a spatial wavelength from $10.000$ to $3.000$ km. These largest scales contain dynamics on the size of global Rossby waves, large scale tropical waves and the Madden-Julian Oscillation \cite{Zhang2013}. Thus, white noise is observed for temperature anomalies on these planetary scales. Second, after the turnover higher degree spherical harmonics become progressively less important following a powerlaw like decline, where the power $C_l \propto l^{\alpha}$. For $l>10$ the power of each harmonic $Y_l^m$ decreases with a powerlaw index which is consistent with $\alpha = -3$ for all parts of the time-series. The powerlaw is observed from spatial scales of 2000 km to the spatial resolution of the data-set (ie. order 50 km - see Fig. \ref{fig:ERA5}). Notable, several atmospheric fields including humidity, temperature, zonal-, meridional- and vertical winds at varying altitudes of the ECMWF interim analysis have empirically shown a similar scale-free spectra with varying powerlaw slopes \cite{Lovejoy2011}. However, the specific slope $\alpha=-3$ is remarkable in accordance with the analytical prediction of turbulent flows constrained to 2 dimensions. Under such conditions, the expectation is that the energy spectrum scales as $E(k) \propto k^{-3}$, where the wave-number, $k$, is the 2D-spatial analog of the angular scales of $l$ \cite{Kraichnan1967}. Note, this characteristic scaling of $k=-3$ has been observed previously for potential temperature near the tropopause across planetary and synoptic scales \cite{Nastrom1985}. An important test of the classical models of 2D/3D turbulence is to examine the spectral energy transfer. For 2D the energy cascades from small to larger scales, while enstrophy is characterised by a downscale transfer. Previous empirical determinations have yielded little conclusive constraints, although 3rd order velocity structure corroborate the downscale nature of atmospheric cascades \cite{Lindborg1999,Cho2001}. Another analytical perspective on the cause of powerlaw-tails in power spectra is discussed in Ahlers2014 \cite{Ahlers2014}. Here Boltzmann's equation is used to derive a coupled set of differential equations relating the power of each mode to the power of neighbour modes, assuming a simple non-linear coupling associated to turbulence. These coupled equations are solved assuming hierarchical generation, where large spatial fluctuations generate fluctuations on smaller scales. This formalism, suggests that a downward cascade of fluctuations on a sphere would produce a power-spectrum of the form $C_l \propto l^{-3}$. Regardless of the causal direction of the cascade a generic prediction of cascades is that an increasing amplitude on large scale variations must have a corresponding increase on all smaller spatial scales. Given the observed growth in the power of the lowest modes (eg. $a_{1,0}, a_{2,0}$) we must therefore expect an increasing power across the spectrum with time. Furthermore, in \S \ \ref{sec:Seasonal}, \S \ \ref{sec:anisotropy} and in Appendix \ref{app:cas} we present evidence of a downward cascade with large scale features being driven externally (such as by differential solar heating and variations over latitudes) which turbulence feeds into a range of fluctuations on all smaller spatial scales. Importantly, this downward cascade predicts that the increasing amplitude of fluctuations on large spatial scales due to climate change, also feeds more volatility for weather on more local scales. \begin{figure} \centering \includegraphics[width=\linewidth]{Fig5.png} \caption{Power spectrum marginalized over month on northern hemisphere. The amplitude of temperature fluctuations on all spatial scales are larger in winter than in summer. Naturally, for the southern hemisphere the order is inverted with most power in June and July. } \label{fig:season} \end{figure} \subsection{Yearly Evolution of The Power Spectrum } \label{sec:time_evol} From 1850 to 1960 the power spectrum shows variability but no systematic coherent growth, but a few noteworthy features emerge after 1960 (see Fig. \ref{fig:power_temp}). First, the power of the lowest degrees is increasing towards the present as discussed in \S \ \ref{sec:lowest}. Second, the flat part of the power-spectrum (degrees $2 \leq l \leq 8$) remains unchanged up to statistical fluctuations. Third, the turnover length-scale increases, ie. the powerlaw cascade begins at lower modes (for elaboration see appendix Fig. \ref{fig:Turnover}). An analogous shift of the energy spectrum to larger spatial scales is often correlated with increased eddy activity and weather volatility \cite{Straus1999}. Lastly, the power of higher degrees ($10 \leq l$) are increasing on all scales from 2000 km to the resolution of the data-set (ie. order 50 km for ERA5) from 1960 to the present. Local temperature fluctuations are growing in magnitude and the growth is accelerating over the past century. \subsection{Seasonal Evolution of The Power Spectrum} \label{sec:Seasonal} It is observationally well-established that the kinetic energy in the atmosphere is larger in winter than in summer \cite{Straus1999}. In summer the meridional temperature gradient is both weaker and shifted poleward, resulting in a lower eddy activity and a shift to smaller spatial scales. These seasonal features are also seen in the power-spectrum of temperature fluctuations (see Fig. \ref{fig:season}). Summer-months shows decreased fluctuations on all scales (ie. smaller eddy activity), while the transition to the powerlaw decline is shifted to higher wave-numbers (for further elaboration see Appendix \ref{app:turnover}). Importantly, this indicates that variations on small spatial scales follow the growth and decay of fluctuations on the largest scale (ie. that we are observing a \textit{downward} cascade). \begin{figure*} \centering \includegraphics[width=0.95\linewidth]{Fig6.PNG} \caption{Color indicates power of the $Y_l^m$'th spherical harmonic for the period 1960-1970 [left] and 2010-2020 [middle]. For both periods the power is calculated each month and then averaged over a decade. Right shows residual, suggesting that the increasing power of higher order modes is not symmetric across $m$, but dominated by the increasing power of modes from north-to-south [ie. $m = - l/2$ to $m = l/2$, indicated with dashed lines].} \label{fig:power_m} \end{figure*} Beyond the yearly fluctuation no other periodicity is detected across the power-spectrum. Therefore, the power of modes on smaller spatial scales only oscillate seasonally (combined with the previously mentioned growth over decades). While the mean global temperature is a complex convolution of anthropogenic climate change and non-anthropogenic oscillations \cite{Wang2019}, the fluctuations from the mean (described by smaller modes) suggests a singular temporal trend. Thus, the power-spectrum yields a diagnostic with a simple and predictive evolution across time. \subsection{The Horizontal Anisotropy of Climate Change} \label{sec:anisotropy} The expectation from atmospheric reanalysis fields is that horizontal anisotropies are common, with fluxes elongated more zonally than meriodionally \cite{Lovejoy2011}. The easily interpretable decomposition of spherical harmonics does provide a straightforward framework for examining horizontal anisotropies, but by summing over $m$ we have yet to discuss the spatial orientation of these fluctuations. In spherical harmonics, spherical symmetry implies every $m$ should contribute equally to the power of the $l$'th mode. This is elaborated through simulated temperature fields in Appendix \ref{app:sim_ani}. Here it is shown that when generating temperature fluctuations with isotropic variances along latitudes and longitudes the power is uniform across $m$. However, if the length-scale of temperature fluctuations is smaller along longitudes than latitudes the modes from $m \approx -\frac{l}{2}$ to $m \approx \frac{l}{2}$ are shown to be the dominant contribution to the power. Indeed, anisotropy is observed throughout the timeseries as seen in Fig. \ref{fig:power_m} [left and middle panel]. Evidently, the climate generically has a larger magnitude of temperature fluctuations meridionally than zonally, as expected for a rotating sphere \cite{Lovejoy2011}. However, in contrast to previous analyses the detailed timeseries of global temperatures allows computing the change in power across decades [right panel]. We see that on all spatial scales resolvable it is mainly fluctuations oriented north-to-south which are increasing in amplitude. This coherence is a prediction of downward cascades, where the observed growing fluctuation on large scales (eg. $a_{1,0}, a_{2,0}$, etc.) feed increasing amplitudes on all subsequent scales. Because the large scale fluctuations are oriented north-to-south the cascade displays a similar anisotropy. In contrast, an inverse cascade should not display any horizontal anisotropy on small scales, as there are no local differences between latitude and longitude. Climate change therefore results in rapid weather transitions which are growing in frequency and magnitude, but crucially the increase is primarily driven by increased volatility along longitudes. \section{Conclusion} Spherical harmonics provide a succinct description of the Earth's climate. Within this paper we prove that the lowest 90 modes can reconstruct global temperature anomalies with a typically accuracy of 0.05 K. This highly accurate decomposition is the result of a simple combination of oscillations on different spatial scales, which is succinctly summarized by the shape of the power-spectrum. The largest power is coming from modes $l \leq 8$, with progressively smaller scales contributing less and less. Importantly, the decline in power on spatial scales from $2.000$ to $50$ km follows a powerlaw with exponent $\alpha=-3$, which is characteristic of 2 dimensional turbulence and other theoretical models of cascading fluctuations. Furthermore, mapping the seasonal fluctuations and anisotropies between longitudes and latitudes we show that large scale temperature variations cascades into fluctuations on all smaller spatial scales. As previously observed large scale fluctuations (which are oriented from north-to-south) are growing in magnitude. Therefore, the observed cascade dictates that on any scale the amplitude of fluctuations along longitudes has to increase. From the planetary scale to that of weather fronts, temperature oscillations are becoming more volatile due to climate change. Ultimately, the methodology provides an illuminating perspective on our evolving climate by bridging the gap between known large scale structures of the climate and small scale volatility. Furthermore, the methodology introduced within the paper can be extended with significant theoretical and observational benefits. First, larger spatial resolution will allow improvements on the accuracy of reconstructions by decomposing the structure at even smaller spatial scales. The power structure of higher modes could reveal the extent and the small-scale limit of the observed cascade; a more detailed grid could even examine the regime of 3-dimensional turbulence. Second, larger temporal resolution allows a closer examination of the flow of fluctuations, i.e. how the spatial scales are causally connected. Thereby, probing the underlying physics connecting the cascade (discussed in Appendix \ref{app:cas}). Lastly, we emphasise that the observed power-spectrum is remarkable simple. Three parameters, a normalisation, a turnover-length and a powerlaw-slope, characterize the entire power spectrum of temperature anomalies for over 170 years of observations from the planetary scale through the mesoalpha. This remarkable universality should be examined, reproduced and predicted by future climate models in order to further constrain the spatial scales of climate change. \newline \section*{Acknowledgements} The author would like to thank Mogens Høgh Jensen, Peter Ditlevsen, Markus Ahlers and Rune Thinggard Hansen for useful discussions on drafts and insightful feedback. Furthermore, Kevin Kumar, Gergely Friss, Gustav Ernst Madsen, Rasmus Damgaard Nielsen and Jason Koskinen all deserve praise for kind encouragement with the conceptual formulation. Lastly, Julie Kiel Holm provided the audacity required for publication. The Cosmic Dawn Center (DAWN) is funded by the Danish National Research Foundation under grant No. 140. \newline \section*{Data Availability Statement} The data was collected from The Berkeley Earth Land/Ocean Temperature Record, which can be accessed at \url{http://berkeleyearth.org/data/}.
\section*{Abstract} {\bf We study the slightly broken higher-spin currents in various CFTs with $\mathrm{U}(1)$ gauge field, including the tricritical QED, scalar QED, fermionic QED and QED-Gross-Neveu-Yukawa theory. We calculate their anomalous dimension by making use of the classical non-conservation equation and the equations of motion. We find a logarithmic asymptotic behaviour ($\gamma_s$ $\sim 16/(N\pi^2) \log s $) of the anomalous dimension at large spin $s$, which is different from other interacting CFTs without gauge fields and may indicate certain unique features of gauge theories. We also study slightly broken higher-spin currents of the $\mathrm{SU}(N)_1$ WZW model at $d=2+\epsilon$ dimensions by formulating them as the QED theory, and we again find its anomalous dimension has a logarithmic asymptotic behaviour with respect to spin. This result resolves the mystery regarding the mechanism of breaking higher spin currents of Virasoro symmetry at $d=2+\epsilon$ dimensions, and may be applicable to other interesting problems such as the $2+\epsilon$ expansion of Ising CFT. } \vspace{10pt} \noindent\rule{\textwidth}{1pt} \tableofcontents\thispagestyle{fancy} \noindent\rule{\textwidth}{1pt} \vspace{10pt} \section{Introduction} Conformal field theories (CFT) are a family of quantum field theories with fundamental importance and wide applications in physics, which include quantum gravity as well as critical phenomena in condensed matter physics. One interesting class of CFTs is critical gauge theories in $3d$, it describes various exotic critical phases~\cite{Affleck1988large,sl_1,sl_2} and phase transitions~\cite{dqcp_1,dqcp_2,Jain1990,Chen1993, Kivelson1992, Lee2018} in quantum matter systems. Theoretically, these critical gauge theories are not well understood and pose challenges for modern CFT techniques such as the conformal bootstrap~\cite{bootstrap_0}. A wealth of physical properties of a CFT are determined by its operator spectrum labelled by $(\Delta, s)$: $\Delta$ is the scaling dimension, and $s$ is the Lorentz spin characterising how the operator is transforming under the Lorentz rotation symmetry $\mathrm{SO}(d)$. The spin-$s$ ($s\geq 1$) operators $J^{\lambda_1\cdots\lambda_s}$ of a unitary CFT are known to satisfy the unitarity bound $\Delta_s\geq d-2+s$, and the saturation of the unitary bound implies the conservation of such operator $\partial\cdot J_s=\partial_{\lambda_1}J^{\lambda_1\cdots\lambda_s}=0$. For $s=1$ and $s=2$ the conserved currents generally exist, corresponding to the conservation of the global symmetry and stress tensor. In contrast, for $s>2$ there are generically no conserved currents except for special cases, namely free theories and $2d$ CFTs. The presence of conserved higher-spin currents in these special cases is a consequence of integrability~\cite{zamolodchikov1978relativistic,zamolodchikov1979factorized, parke1980absence, maldacena_cons_hs}. Once the integrability is broken by an interaction, these higher-spin currents will acquire an anomalous dimension \begin{equation} \Delta_s=d-2+s+\gamma_s, \end{equation} and subsequently a non-zero divergence, \begin{equation} \partial\cdot J_s=K_{s-1}. \label{eq:1_div} \end{equation} These operators are called slightly broken higher-spin currents. There are several motivations to study slightly broken higher-spin currents of interacting CFTs. Firstly, their anomalous dimensions $\gamma_s$ can serve as a measure of how interacting the theory is. Analysis based on the analytical bootstrap of four-point correlator predicted $\gamma_s$ to take a general form~\cite{analytic_bootstrap_3,spin_exp_1,spin_exp_3,spin_exp_4,spin_exp_5,spin_exp_2}, \begin{equation} \gamma_s=c_1\log s+c_2+\mathscr{O}(1/s), \end{equation} with $c_{1,2}$ to be theory dependent numerical constants. Specifically, for theories with a perturbation parameter $\lambda$ (e.g. $\lambda\sim 1/N$ or $\lambda\sim \epsilon$ in the large-$N$ or $4-\epsilon$ expansion) one has $c_{1,2}\sim \mathscr{O}(\lambda)$. Perturbatively, by evaluating the loop diagrams, $\gamma_s$ for $\mathrm{O}(N)$ vector model~\cite{loop_o_n} and Gross-Neveu-Yukawa theory~\cite{loop_gn} has been evaluated in the large-$N$ limit up to the order of $1/N^2$. Recently, a method utilising the classical equation of motion has been developed~\cite{kirilin_boson,kirilin_cs,kirilin_fermion,rychkov_2015,nii_2016,Charan2018} and been applied to a variety of theories, such as Wilson-Fisher theory, cubic model, non-linear sigma models~\cite{kirilin_boson}, Gross-Neveu-Yukawa model~\cite{kirilin_fermion} and non-Abelian Chern-Simons matter theories~\cite{kirilin_cs,Charan2018}. It was found that $\gamma_s$ of the theories without gauge fields (i.e. Wilson-Fisher and Gross-Neveu-Yukawa) converges to a finite large-$s$ limit ($c_1=0$), while non-Abelian gauge theories have the logarithmic growing piece and was interpreted geometrically from the AdS/CFT correspondence~\cite{Alday2007Comments}. Slightly broken higher-spin currents could also be useful for the conformal bootstrap using a recently proposed algorithm called hybrid bootstrap~\cite{Su2022Hybrid}. It has been observed that the performance of numerical bootstrap is largely improved if combined with the information of slightly broken higher-spin currents from analytical light-cone bootstrap. This also motivates us to study the slightly broken higher-spin currents of $3d$ critical $\mathrm{U}(1)$ gauge theories, as it may help to bootstrap these CFTs. These slightly broken higher-spin currents are also of theoretical importance as they impose strong constraints on interacting CFTs. For example, the divergence operator $K_{s-1}$~\eqref{eq:1_div} has to be a spin $s-1$ primary operator with scaling dimension $\Delta=d-1+s$ in the free theory limit~\cite{maldacena_brok_hs}, and it becomes a descendent of $J_s$ in the interacting CFT. So the two different conformal multiplets of $J_s$ and $K_{s-1}$ in the free theories recombine into one when the interaction is turned on, \begin{equation} [J_s]_\textrm{int.}=[J_s]_\textrm{free}\cup[K_{s-1}]_\textrm{free}. \end{equation} In other words, the shorthening condition $\partial\cdot J_s=0$ of the multiplet $[J_s]$ no longer hold in the interacting theory, and $[J_s]$ become a long multiplet by absorbing the multiplet $[K_{s-1}]$ in the free theory. This phenomenon is called conformal multiplet recombination~\cite{Girardello2003interacting,Leigh2003Holography,rychkov_2015}, and it happens in all the interacting CFTs that can be accessed perturbatively via traditional renormalisation group. More interestingly, it was explicitly shown that one can define and calculate $d=4-\epsilon$ $\mathrm{O}(N)$ Wilson-Fisher CFTs in a purely algebraic fashion using the conformal multiplet recombination~\cite{rychkov_2015}. An intriguing question one may raise is, is it possible to use the idea of conformal multiplet recombination to perform perturbative calculations that the renormalisation group is not applicable? One ideal target is $2d$ CFTs\footnote{See a recent attempt on the $2+\epsilon$ Ising CFT~\cite{Li2021epsilon}.}, which have conserved higher-spin currents due to the Virasoro symmetry. One would expect slightly broken higher-spin currents once $2d$ CFTs are perturbed, for example, to $d=2+\epsilon$ dimensions. However, in $2d$ CFTs' spectrum the divergence operators $K_{s-1}$ are absent\footnote{The statement is simply that in $2d$ CFTs' spectrum, there is no global conformal primary (also called quasiprimary) with spin $s-1$ and scaling dimension $s+1$.}, making it elusive if the idea of conformal multiplet recombination would work at all. In this paper, we resolve this mystery for $2d$ Wess-Zumino-Witten (WZW) CFTs by reformulating them as gauge theories~\cite{bootstrap_qed_4,Delmastro2021Infrared}. The solution, as we will explain in the main text, is that $K_{s-1}$ is proportional to the gauge field strength, which happens to decouple from the IR spectrum in $2d$. We then manage to calculate the leading order anomalous dimension of slightly broken higher-spin currents of $\mathrm{SU}(N)_1$ WZW CFTs at $2+\epsilon$ dimensions. In this paper, we apply the method based on the equation of motion to various $\mathrm{U}(1)$ gauge theories, including tricritical QED, scalar QED, fermionic QED, etc, and we find that the anomalous dimension $\gamma_s$ of the slightly broken higher-spin currents has similar logarithmic behaviour to the non-Abelian gauge theories studied before. This paper is organised as the following. In Section~\ref{sec:2}, we review the properties of the higher-spin currents in free theories, and the method to calculate their anomalous dimensions by making use of the equations of motion. The main result is also summarised in this section, and the details of the calculation are presented in the remaining sections. Specifically, in Section~\ref{sec:3} we study bosonic QEDs in 3d, including the scalar QED and the tricritical QED, and in Section~\ref{sec:4}, we look at the fermionic QED and the QED-Gross-Neveu-Yukawa theory. In Section~\ref{sec:5}, we study the QED (i.e. $\mathrm{SU}(N)_1$ WZW) in $(2+\epsilon)$-dimensions. \section{Method and models} \label{sec:2} In this section we will introduce the slightly broken higher-spin currents in interacting theories and discuss the method to calculate their anomalous dimensions by making use of the classical equation of motion without calculating loop diagrams. This method was introduced in Ref.~\cite{kirilin_boson,kirilin_fermion,kirilin_cs}, and to be self-contained we also present its technical details. We will also review the models we study and present our main results. \subsection{The higher-spin currents in free field theory} To facilitate the description of higher-spin currents, we first introduce the index-free treatment of symmetric tensors \cite{costa_2011,kirilin_boson}. For a rank-$l$ symmetric traceless tensor $T^{\lambda_1\cdots\lambda_l}$, we can contract it with an auxiliary polarisation vector $z_\lambda$, \begin{equation} \hat{T}_l\equiv T^{\lambda_1\cdots\lambda_s}z_{\lambda_1}\cdots z_{\lambda_s}. \end{equation} By setting $z^\lambda$ to be null $z^2=0$, $\hat{T}_l$ only selects out the symmetric traceless part of the tensor. One can also go back to the full tensor by acting stripping operator on $\hat{T}_l$, which is a differential operator in $z$-space \begin{equation} D_z^\lambda\equiv\left(\frac{d}{2}-1\right)\partial_{z_\lambda}+z_\mu\partial_{z_\mu}\partial_{z_\lambda}-\frac{1}{2}z^\lambda\partial_{z_\mu}\partial_{z^\mu}. \end{equation} Acting this operator once restores an index. By acting $D_z^\lambda$ repeatedly one can restore the uncontracted tensor \begin{equation} T^{\lambda_1\cdots\lambda_l}\propto D_z^{\lambda_1}\cdots D_z^{\lambda_l}\hat{T}_l. \end{equation} In this description, the conservation of a spin-$s$ current $J_s^{\mu_1\cdots\mu_s}$ can be expressed concisely as \begin{equation} \partial\cdot\hat{J}_s=\partial_\mu D_z^\mu\hat{J}_s=0. \label{eq:2_1_conserv} \end{equation} By solving this equation, one can construct explicitly the conserved currents in free theories. For the free theory of $N$-flavour complex scalar field $\phi^i$, $\phi^i$ transforms in the fundamental representation of the $\mathrm{SU}(N)$ global symmetry. This theory is described by the Klein-Gordan Lagrangian \begin{equation} \mathscr{L}_0=\partial_\mu\bph_i \partial^\mu\phi^i \label{eq:2_1_bos_lag} \end{equation} and the scalar field satisfies the classical equation of motion \begin{equation} \partial^2\phi^i=0,\quad\partial^2\bar{\phi}_i=0, \label{eq:2_1_bos_eom} \end{equation} where $i=1,\dots,N$ and summation over repeated indices is implied. This free theory admits an infinite series of conserved higher-spin currents in the form of $s$ derivatives acting on the scalar bilinear $\bph_j\phi^i-\textrm{(trace)}$ in the adjoint sector or $\bar{\phi}_k\phi^k$ in the singlet sector~\cite{kirilin_boson}, i.e. \begin{align} (\hJ^\textrm{(B)}_s)^i{}_j(x)&=\left.P^\textrm{(B)}_s(\hpd_1,\hpd_2)\bph_j(x_1)\phi^i(x_2)\right|_{x_{1,2}\to x}-\textrm{(trace)},\nonumber\\ \hJ^\textrm{(B)}_s(x)&=\left.P^\textrm{(B)}_s(\hpd_1,\hpd_2)\bph_k(x_1)\phi^k(x_2)\right|_{x_{1,2}\to x}, \label{eq:2_1_bos_hs} \end{align} where $\hpd=z^\lambda\partial_\lambda$. The trace substracted is $\frac{1}{d}\delta^i_j\hJ^\textrm{(B)}_s$, and \begin{equation} P^\textrm{(B)}(\xi,\eta)=\sum_{m=0}^sC_{sm}\xi ^m\eta ^{s-m}, \end{equation} is a homogeneous polynomial of degree $s$. By making use of the eqatuion of motion Eq.~\eqref{eq:2_1_bos_eom}, the conservation equation Eq.~\eqref{eq:2_1_conserv} reduces to a differential equation of the polynomial $P^\textrm{(B)}_s(\xi,\eta)$ \begin{equation} \left(\frac{d}{2}-1\right)\left[(P^\textrm{(B)}_s)'_\xi (\xi ,\eta )+(P^\textrm{(B)}_s)'_\eta (\xi ,\eta )\right]+\xi (P^\textrm{(B)}_s)''_{\xi\xi} (\xi ,\eta )+\eta (P^\textrm{(B)}_s)''_{\eta\eta} (\xi ,\eta )=0. \end{equation} Its solution can be expressed in terms of the order-$s$ Gegenbauer polynomial $C_s^{\alpha}$, \begin{align} P^\textrm{(B)}_s(\xi ,\eta )&=(\xi +\eta )^sC_s^{(d-3)/2}\left(\frac{\xi -\eta }{\xi +\eta }\right)\nonumber\\ &=\frac{\sqrt{\pi}\Gamma(\frac{d}{2}+s-1)\Gamma\left(d+s-3\right)}{2^{d-4}\Gamma\left(\frac{d-3}{2}\right)}\sum_{m=0}^s\frac{(-1)^m\xi ^m\eta ^{s-m}}{m!(s-m)!\Gamma(m+\frac{d}{2}-1)\Gamma(s-m+\frac{d}{2}-1)} \label{eq:2_1_pb1} \end{align} Note that this expression only holds for $d\neq 3$. For $d=3$, it vanishes due to the improperly chosen renormalisation factor, and one can use instead (it only differs from Eq.~\eqref{eq:2_1_pb1} by a factor) \begin{equation} P^\textrm{(B)}_s(\xi ,\eta )=\frac{(\sqrt{\xi }+i\sqrt{\eta })^{2s}+(\sqrt{\xi }-i\sqrt{\eta })^{2s}}{2\cdot s!} \label{eq:2_1_pb2} \end{equation} For the free theory of $N$-flavour fermionic field $\psi^i$, $\psi^i$ transforms in the fundamental representation of a $\mathrm{SU}(N)$ global symmetry. This theory is described by the Dirac Lagrangian \begin{equation} \mathscr{L}_0=-\bps_i\ds{\partial}\psi^i, \label{eq:2_1_fer_lag} \end{equation} and the scalar field satisfies the classical equation of motion \begin{equation} \ds{\partial}\psi^i=0,\quad\partial_\mu\bps_i\gamma^\mu=0. \label{eq:2_1_fer_eom} \end{equation} This free theory admits an infinite series of conserved higher-spin currents in the form of $(s-1)$ derivatives acting on the fermion bilinear $\bar{\psi}_j\hat{\gamma}\psi^i-\textrm{(trace)}$ in the adjoint sector or $\bar{\psi}_k\hat{\gamma}\psi^k$ in the singlet sector~\cite{kirilin_cs}, i.e. \begin{align} (\hJ^\textrm{(F)}_s(x))^i{}_j&=\left.P^\textrm{(F)}_s(\hpd_1,\hpd_2)\bps_j(x_1)\hat{\gamma}\psi^i(x_2)\right|_{x_{1,2}\to x}-\textrm{(trace)},\nonumber\\ \hJ^\textrm{(F)}_s(x)&=\left.P^\textrm{(F)}_s(\hpd_1,\hpd_2)\bps_j(x_1)\hat{\gamma}\psi^i(x_2)\right|_{x_{1,2}\to x}, \end{align} where \begin{align} P^\textrm{(F)}(u,v)&=\sum_{m=0}^{s-1}C_{sk}\xi ^k\eta ^{s-k}. \end{align} The conservation asserts that $P^\textrm{(F)}_s$ should satisfy \begin{equation} \frac{d}{2}\left[(P^\textrm{(F)}_s)'_\xi (\xi ,\eta )+(P^\textrm{(F)}_s)'_\eta (\xi ,\eta )\right]+\xi (P^\textrm{(F)}_s)''_{\xi\xi} (\xi ,\eta )+\eta (P^\textrm{(F)}_s)''_{\eta\eta} (\xi ,\eta )=0. \end{equation} Its solution can be expressed in terms of the order-$(s-1)$ Gegenbauer polynomial, \begin{align} P^\textrm{(F)}_s(\xi ,\eta )&=(\xi +\eta )^{s-1}C_{s-1}^{(d-1)/2}\left(\frac{\xi -\eta }{\xi +\eta }\right)\nonumber\\ &=\frac{\sqrt{\pi}\Gamma(\frac{d}{2}+s-1)\Gamma(d+s-2)}{2^{d-1}\Gamma(\frac{d-1}{2})}\sum_{m=0}^{s-1}\frac{(-1)^m\xi ^m\eta ^{s-1-m}}{m!(s-1-m)!\Gamma(m+\frac{d}{2})\Gamma(s-m+\frac{d}{2})} \label{eq:2_1_pf} \end{align} \subsection{Anomalous dimensions of the slightly broken higher-spin currents} Now let us turn on adiabatically an interaction characterised by some small expansion parameter $\lambda$. For example, in the large-$N$ limit, one can take $\lambda=1/N$. The previously conserved currents will evolve into some higher-spin operators which are no longer conserved for general $\lambda$ which we call `slightly broken higher-spin currents' with scaling dimension \begin{equation} \Delta_s=d-2+s+\gamma_s, \end{equation} where the anomalous dimension $\gamma_s$ is at least of order $\mathscr{O}(\lambda)$. Correspondingly, the divergence of the operators \begin{equation} \partial\cdot\hJ_s=\hK_{s-1} \label{eq:2_2_div} \end{equation} are generally non-zero and of order $\mathscr{O}(\lambda)$. We reiterate that this equation describes the physics of conformal multiplet recombination, namely the short multiplet of $J_s$ and the long multiplet of $K_{s-1}$ in the free limit recombines into a long multiplet of $J_s$ in the interacting theory. For this equation to hold, a necessary condition is that $K_{s-1}$ is a primary operator with spin $s-1$ and scaling dimension $\Delta=d-1+s$. The divergence operator $K_{s-1}$ can generally be fixed by making use of the equation of motion. For example, for a scalar field, the equation of motion usually takes the form $\partial^2\phi=\lambda V$, where $V$ is some spin-$0$ and engineering dimension-$(\frac{d}{2}+1)$ operator. The expression for $\hK_{s-1}$ can be obtained by substituting $\partial^2\phi$ by $\lambda V$ repeatedly in $\partial\cdot\hJ_s$. As we will see later explicitly, for $s=1$ adjoint and $s=2$ singlet sector, we have $\partial\cdot(J_1)^i{}_j=0$ and $\partial\cdot J_2=0$, corresponding to the conservation of the symmetry current and stress tensor. Eq.~\eqref{eq:2_2_div} can be used to calculate the anomalous dimension. We write down the generic form of the two-point correlator of the spin-$s$ current \begin{align} \langle\hJ_s(x)\hJ_s(x')\rangle&=C^\mathrm{(sg)}\frac{\left(z\cdot z'-2\frac{(z\cdot X)(z'\cdot X)}{X^2}\right)^s}{X^{2\Delta^\mathrm{(sg)}_s}},\nonumber\\ \langle(\hJ_s)^i{}_j(x)(\hJ_s)^k{}_l(x')\rangle&=C^\mathrm{(ad)}\frac{\left(z\cdot z'-2\frac{(z\cdot X)(z'\cdot X)}{X^2}\right)^s}{X^{2\Delta_s^\mathrm{(ad)}}}\left(\delta^i_l\delta^k_j-\frac{1}{N}\delta^i_j\delta^k_l\right), \end{align} where $X=x-x'$. For simplicity, we will discuss only the singlet sector in the following, and the adjoint sector follows similarly. We take the divergence with respect to both $x$ and $x'$ and then set $z=z'$ ~\cite{kirilin_boson} \begin{align} \langle\hK_{s-1}(x)\hK_{s-1}(x')\rangle|_{z'=z}&=\left.\partial_{\mu}D^\mu_z\partial'_{\nu}D^\nu_{z'}\langle\hJ_s(x)\hJ_s(x')\rangle\right|_{z'=z}\nonumber\\ &=-\frac{1}{\hat{X}^2}s\left(s+\frac{d}{2}-2\right)\left[\gamma_s\left(s+\frac{d}{2}-1\right)(s+d-3)\right.\nonumber\\ &\qquad\qquad\left.+\gamma_s^2\left(s^2+\left(\frac{d}{2}-2\right)s+\frac{d}{2}-1\right)\right]\langle\hJ_s(x)\hJ_s(x')\rangle. \end{align} Note that the second line is proportional to $\gamma_s$. This results from the higher-spin current conservation at zero coupling. By evaluating both side to the leading order, we can obtain the expression for the anomalous dimension \begin{equation} \gamma_s=-\frac{1}{s\left(s+\frac{d}{2}-2\right)\left(s+\frac{d}{2}-1\right)(s+d-3)}\frac{\hat{X}^2\langle\hK_{s-1}(x)\hK_{s-1}(x')\rangle_\textrm{(leading order)}}{\langle\hJ_s(x)\hJ_s(x')\rangle_\textrm{(leading order)}}+\mathscr{O}(\lambda^2). \label{eq:2_2_anom} \end{equation} \subsection{Models and summary of results} In this paper, we apply Eq.~\eqref{eq:2_2_anom} to various gauge theories to calculate the anomalous dimension of the slightly broken higher-spin currents. We first discuss the tricritical QED and scalar QED in the large-$N$ limit~\cite{RibhulargeN,Benvenuti2019}. For scalar fields, one can couple the free theory to a gauge field by replacing the derivatives in the free Lagrangian \eqref{eq:2_1_bos_lag} with covariant derivatives \begin{equation} \mathscr{L}_e=D_\mu\bph_i D^\mu\phi^i+\frac{1}{4e^2}F_{\mu\nu}F^{\mu\nu}, \label{eq:2_3_bos_qed_lag} \end{equation} where $D_\mu\phi^i=(\partial_\mu-iA_\mu)\phi^i$ and $D_\mu\bph_i=(\partial_\mu+iA_\mu)\bph_i$. This theory admits another relevant operator, namely the quartic coupling $\frac{\lambda}{4N}(\bph_i\phi^i)^2$. This term can be written equivalently in terms of a Hubbard-Stratonovich field $\sigma$, \begin{equation} \mathscr{L}_\sigma=\sigma\bph_i\phi^i-\frac{N}{4\lambda}\sigma^2. \label{eq:2_3_bos_hs_lag} \end{equation} This theory flows a fixed point in the infrared corresponding to an interacting CFT called the scalar QED. In the large-$N$ limit, one can also tune $\lambda=0$ to get a different CFT called the tricritical QED in the infrared. As will be discussed in Section~\ref{sec:3}, the anomalous dimensions of slightly broken higher-spin currents of these two theories in $3d$ are, \begin{align} \gamma_s^\mathrm{tricr.QED,ad}&=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\frac{2(11s^2-2)}{3(4s^2-1)}\right],\nonumber\\ \gamma_s^\mathrm{tricr.QED,sg}&=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\left\{\begin{aligned} &\frac{2(11s^4+3s^3-13s^2+15s+2)}{3(s^2-1)(4s^2-1)},&&s\textrm{ even}\\ &\frac{2(11s^2-2)}{3(4s^2-1)},&&s\textrm{ odd}\\ \end{aligned}\right\}\right],\nonumber\\ \gamma_s^\mathrm{scal.QED,ad}&=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\frac{7s^2-1}{4s^2-1}\right],\nonumber\\ \gamma_s^\mathrm{scal.QED,sg}&=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\left\{\begin{aligned} &\frac{14s^4+5s^3-16s^2+19s+2}{2(s^2-1)(4s^2-1)},&&s\textrm{ even}\\ &\frac{7s^3+2s^2-s-2}{s(4s^2-1)},&&s\textrm{ odd}\\ \end{aligned}\right\}\right]. \end{align} where `ad' and `sg' denote the currents in the adjoint and singlet sector. In the limit of $1\ll\log s\ll N$, the asymptotic behaviour is \begin{align} \gamma_s\sim\frac{16}{N\pi^2}\left[\log s-\gamma-2\log 2-\left\{\begin{array}{cl} \frac{11}{6}&\mathrm{tricr.QED} \\ \frac{7}{4}&\mathrm{scal.QED} \end{array}\right\}+\mathscr{O}\left(\frac{1}{s}\right)\right], \end{align} where $\gamma$ is the Euler Gamma constant. Note that the asymptotic behaviours are the same for singlet and adjoint sector. We have also discussed the bosonic QEDs with Chern-Simons terms. The results are included in Appendix~\ref{sec_app_cs}. Note $\gamma_{s=1}^{\textrm{ad}}=0$ and $\gamma_{s=2}^{\textrm{sg}}=0$, corresponding to the conservation of $\mathrm{SU}(N)$ symmetry current and energy momentum tensor. We can similarly define the QED$_3$ and QED$_3$-Gross-Neveu-Yukawa theories for fermion fields\footnote{The fermion flavor number is counted in the unit of $2$-component fermions.} in the large-$N$ limit~\cite{RibhulargeN,pufu_2016, Benvenuti2019,gracey_1993,Boyack2019}. One can couple the free fermionic theory to a gauge field by replacing the derivatives in the free Lagrangian \eqref{eq:2_1_fer_lag} with covariant derivatives \begin{equation} \mathscr{L}_e=-\bps_i\ds{D}\psi^i, \label{eq:2_3_fer_qed_lag} \end{equation} where $D_\mu\psi=(\partial_\mu-iA_\mu)\psi$, and the irrelevant Maxwell term is omitted. We find the anomalous dimensions of the slightly broken higher-spin currents of fermionic QED are exactly the same as in tricritical QED, its bosonic counterpart.\footnote{Similar coincidence has also been found between $3d$ $O(N)$ Wilson-Fisher and Gross-Neveu-Yukawa theory~\cite{loop_o_n,loop_gn}. This coincidence is not an indication of any type of duality, and will no longer hold at the $1/N^2$ order.} The detailed calculation is enclosed in Section~\ref{sec:4}. One can also couple the fermions mass to a critical bosonic field through a Gross-Neveu-Yukawa interaction \begin{equation} \mathscr{L}_\sigma=\sigma\bps_i\psi^i, \label{eq:2_3_fer_hs_lag} \end{equation} Again, we find the anomalous dimensions of the slightly broken higher-spin currents of fermionic QED with GNY interaction are exactly the same as in scalar QED. The detailed calculation is enclosed in Section~\ref{sec:4}. Another particularly interesting limit is the QED (i.e. $\mathrm{SU}(N)_1$ WZW CFT) in $(2+\epsilon)$-dimension, which is discussed in Section~\ref{sec:5}, and the anomalous dimensions in the adjoint sector are calculated to be \begin{equation} \gamma_s^\mathrm{QED,ad}=\frac{\epsilon}{N}\sum_{i=1}^{s-1}\frac{1}{i}+\mathscr{O}\left(\frac{\epsilon^2}{N}\right)=\frac{\epsilon}{N} H_{s-1}+\mathscr{O}\left(\frac{\epsilon^2}{N}\right), \end{equation} where $H_{s-1}$ is the Harmonic number. \section{Bosonic QEDs in \texorpdfstring{$3d$ large-$N$}{3d large-N} limit} \label{sec:3} In this section, we calculate the anomalous dimension of the tricritical QED and scalar QED in the large-$N$ limit, with Lagrangian defined in Eqs.~\eqref{eq:2_3_bos_qed_lag} and \eqref{eq:2_3_bos_hs_lag}. In the large-$N$ limit, the scalar field bubble diagrams can be resummed to be an effective photon propagator. In $d<4$, the Maxwell term is irrelevant and can be omitted. In other words, we take the $e^2\to\infty$ limit to do the calculation from the beginning. A non-local gauge fixing described in Ref.~\cite{pufu_2016, Benvenuti2019} is adopted. Similarly, in the scalar QED, the effective propagator of $\sigma$ is obtained by resumming the bubble diagrams~\cite{zinn_justin_2003}, and its mass term can be omitted. The scalar field propagator in the large-$N$ limit is the same as in free field theory. The Feynman rules altogether are listed below: \begin{align} \label{eq:Feynmantri} G^i{}_j(x)&=\langle\phi^i(x)\phi_j(0)\rangle_\infty=\delta^i_j\frac{\Gamma\left(\frac{d}{2}-1\right)}{4\pi^{d/2}}\frac{1}{x^{d-2}},\nonumber\\ D^{\mu\nu}(x)&=\langle A^\mu(x)A^\nu(0)\rangle_\infty=\frac{1}{N}\frac{-\Gamma(d)\sin\frac{\pi d}{2}}{\pi(d-2)\Gamma\left(\frac{d}{2}\right)^2}\frac{(d-2-\zeta)\delta^{\mu\nu}+2\zeta\frac{x^\mu x^\nu}{x^2}}{x^2},\nonumber\\ D_\sigma(x)&=\langle\sigma(x)\sigma(0)\rangle_\infty=\frac{1}{N}\frac{8(d-4)\Gamma(d-2)\sin\frac{\pi d}{2}}{\Gamma(\frac{d}{2}-1)^2}\frac{1}{x^4}. \end{align} \subsection{Tricritical QED currents} The equations of motion for $\phi$, $\bph$ and $A$ that we will make use of are \begin{subequations} \begin{align} \partial^2\phi^i&=i(\partial_\mu A^\mu)\phi^i+2iA^\mu(\partial_\mu\phi^i)+\mathscr{O}(A^2),\label{eq:3_1_eom_phi}\\ \partial^2\bph_j&=-i\bph_j(\partial_\mu A^\mu)-2i(\partial_\mu\bph_j)A^\mu+\mathscr{O}(A^2),\label{eq:3_1_eom_bph}\\ 0&=\left.i(\partial_{1\mu}-\partial_{2\mu})\bph_k(x_1)\phi^k(x_2)\right|_{x_{1,2}\to x}+\mathscr{O}(A)\label{eq:3_1_eom_a}. \end{align} \end{subequations} We keep these equations to the leading order in $A$, as the correlation function of $A$ is a small quantity of order $1/N$. When the coupling to the gauge field is turned on, the slightly broken higher-spin currents should be modified to be gauge invariant by replacing the partial derivative in Eq.~\eqref{eq:2_1_bos_hs} with covariant derivative~\cite{kirilin_cs}. \begin{equation} \hJ^\textrm{(B)}_s(x)=\left.P^\textrm{(B)}_s(\hD_1,\hD_2)\bph(x_1)\phi(x_2)\right|_{x_{1,2}\to x}, \end{equation} where the polynomial $P^\mathrm{(B)}_s(\xi ,\eta )$ is given in Eq.~\eqref{eq:2_1_pb1} and \eqref{eq:2_1_pb2}. Here we omit the flavour index. This expression applies both to singlet and adjoint sector. To the leading order in $1/N$, we need only to expand the expression to the linear order in the gauge field. When acting a power of $\hD$ on $\phi$, one get \begin{align} \hD^n\phi(x)&=(\hpd-i\hA)^n\phi(x)=\hpd^n(x)-i\sum_{m=0}^{n-1}\hpd^m\hA\hpd^{n-1-m}\phi+\mathscr{O}(A^2)\nonumber\\ &=\hpd^n\phi(x)-\left.i\frac{(\hpd+\hpd')^n-\hpd^n}{\hpd'}\hA(x')\phi(x)\right|_{x'\to x}+\mathscr{O}(A^2). \end{align} Generalise this expression to a polynomial of $\hD$, one obtains $\hJ_s(x)$ to the linear order of $\hA$ \begin{equation} \hJ_s(x)=\left.P(\hpd_1,\hpd_2)\bph(x_1)\phi(x_2)+iQ(\hpd_1,\hpd_2,\hpd_3)\bph(x_1)\hA(x_3)\phi(x_2)\right|_{x_{1,2,3}\to x}=\hJ^{(P)}_s(x)+\hJ^{(Q)}_s(x), \end{equation} where \begin{equation} Q(\xi ,\eta ,\chi )=\frac{P(\xi +\chi ,\eta )-P(\xi ,\eta +\chi )}{\chi }. \end{equation} We then calculate its divergence \begin{align} \hK_{s-1}=\partial_\mu D_z^\mu\hJ_s. \end{align} The divergence of the $A$-independent part $\hJ^{(P)}_s$ is \begin{align} \hK_{s-1}^{(P)}&=\left[M_1(\hpd_1,\hpd_2)\partial_1^2+M_2(\hpd_1,\hpd_2)\partial_2^2\right]\bph(x_1)\phi(x_2), \end{align} where \begin{align} M_1(\xi ,\eta )&=\frac{d-2}{2}P'_\xi (\xi ,\eta )+\frac{\xi -\eta }{2}P''_{\xi\xi} (\xi ,\eta )+\eta P''_{\xi\eta} (\xi ,\eta )\nonumber\\ M_2(\xi ,\eta )&=\frac{d-2}{2}P'_\eta (\xi ,\eta )-\frac{\xi -\eta }{2}P''_{\eta\eta} (\xi ,\eta )+\xi P''_{\xi\eta} (\xi ,\eta ) \label{eq:3_1_dj} \end{align} We then substitute in the equations of motion Eq.~\eqref{eq:3_1_eom_phi} and \eqref{eq:3_1_eom_bph}. The divergence of the $A$-dependent part $\hJ^{(Q)}_s$ can be calculated similarly. For this part, one can simply use the free equation of motion $\partial^2\phi=0$. Combined together, the final result is gauge invariant, dependent only on the field strength $F_{\mu\nu}=\partial_\mu A_\nu-\partial_\nu A_\mu$. \begin{equation} \hK_{s-1}=\left.\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)i\bph(x_1)\phi(x_2)F_{\mu\nu}(x_3)\right|_{x_{1,2,3}\to x}, \end{equation} where the differential operator \begin{align} \mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)&=R_1(\hpd_1,\hpd_2,\hpd_3)\partial_1^\mu z^\nu+R_2(\hpd_1,\hpd_2,\hpd_3)\partial_2^\mu z^\nu+R_3(\hpd_1,\hpd_2,\hpd_3)\partial_3^\mu z^\nu\label{eq:3_1_k} \end{align} and the polynomials \begin{align} R_1(\xi ,\eta ,\chi )&=\frac{2}{\chi }M_1(\xi +\chi ,\eta )-\frac{1}{\chi }\left[\frac{d-2}{2}Q-(\eta +\chi )Q'_\xi +\eta Q'_\eta +\chi Q'_\chi \right],\nonumber\\ R_2(\xi ,\eta ,\chi )&=-\frac{2}{\chi }M_2(\xi ,\eta +\chi )-\frac{1}{\chi }\left[\frac{d-2}{2}Q-(\eta +\chi )Q'_\xi +\eta Q'_\eta +\chi Q'_\chi \right],\nonumber\\ R_3(\xi ,\eta ,\chi )&=\frac{1}{\chi }\left[M_1(\xi +\chi ,\eta )-M_2(\xi ,\eta +\chi )\right]\nonumber\\ &\qquad\qquad-\frac{1}{\chi }\left[\frac{d-2}{2}Q+\xi Q'_\xi +\eta Q'_\eta -(\xi +\eta )Q'_\chi \right]. \end{align} Especially, in $3d$, for $s=1$ adjoint, $(\hK_0)^i{}_j=0$, and for $s=2$ singlet, due to the equation of motion~\eqref{eq:3_1_eom_a} for $A$, $\hK_1=6i(\partial_1^\mu-\partial_2^\mu)\bph_{k,1}\phi^k_2F_{\mu\nu,3}z^\nu=0$, which corresponds to the conservation of symmetry current and stress tensor. \subsubsection{Adjoint sector} We first calculate the anomalous dimension in the adjoint sector. To do this, we restore the flavour index for the slightly broken higher-spin currents \begin{equation} (\hJ_s)^i{}_j=P(\hpd_1,\hpd_2)\bph_{j,1}\phi^i_2+iQ(\hpd_1,\hpd_2,\hpd_3)i\bph_{j,1}\phi^i_2\hA_3-\textrm{(trace)} \end{equation} and its divergence \begin{equation} (\hK_{s-1})^i{}_j=\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)i\bph_{j,1}\phi^i_2F_{\mu\nu,3}-\textrm{(trace)} \end{equation} and then calculate their correlation function in the large-$N$ limit and plug it into Eq.~\eqref{eq:2_2_anom}. For the correlation of $\hJ_s$, the contribution of $\hA$-dependent piece is of higher order and thus can be omitted, leaving only the $\hA$-independent part. In the adjoint sector, the only contribution to the bilinear correlator is the direct contraction, thus \begin{align} \langle (\hJ_s)^i{}_j(x)(\hJ_s)^k{}_l(0)\rangle&=\left.P(\hpd_1,\hpd_2)P(\hpd_{1'},\hpd_{2'})\langle\wick{(\c2\bph_{1,j}\c1\phi^i_2)(\c1\bph'_{1,k}\c2\phi'^l_2)}\rangle\right|_{x_{1,2}\to x,x'_{1,2}\to 0}-\textrm{(trace)}\nonumber\\ &=\left.P(\hpd_1,\hpd_2)P(-\hpd_2,-\hpd_1)G^k{}_j(x_1)G^i{}_l(x_2)\right|_{x_{1,2}\to x}-\textrm{(trace)}. \label{eq:3_1_1_jj} \end{align} This expression can be evaluated by using the Schwinger parametrisation of the propagator~\cite{kirilin_boson} \begin{align} G^i{}_j(x)&=\delta^i_j\int_0^\infty\frac{d\alpha}{4\pi^{d/2}}\alpha^{d/2-2}e^{-\alpha x^2}. \end{align} When acting on the integrand, the hatted differential operators $\hpd$ can be replaced by $-2\alpha\hx$, due to the null condition $z^2=0$ and subsequently $\hpd\hx=0$. Hence, \begin{multline} \langle (\hJ_s)^i{}_j(x)(\hJ_s)^k{}_l(0)\rangle=\left(\delta^i_l\delta^k_j-\textstyle{\frac{1}{N}}\delta^i_j\delta^k_l\right)\\\times\int_0^\infty\int_0^\infty\frac{d\alpha_1}{4\pi^{d/2}}\frac{d\alpha_2}{4\pi^{d/2}}P(-2\alpha_1\hx,-2\alpha_2\hx)P(2\alpha_2\hx,2\alpha_1\hx)\alpha_1^{d/2-2}\alpha_2^{d/2-2}e^{-(\alpha_1+\alpha_2)x^2} \end{multline} Similar techniques can be used to evaluate the correlation function of $\hK_{s-1}$ \begin{multline} \langle (\hK_{s-1})^i{}_j(x)(\hK_{s-1})^k{}_l(0)\rangle=-\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)\mathscr{K}_{(A)}^{\mu\nu}(-\partial_2,-\partial_1,\partial_3)\\\times\left.G^k{}_j(x_1)G^i{}_l(x_2)D_P^{\mu\nu,\rho\sigma}(x_3)\right|_{x_{1,2,3}\to x}-\textrm{(trace)}, \label{eq:3_1_1_kk} \end{multline} where $D_P^{\mu\nu,\rho\sigma}(x)=\langle F^{\mu\nu}(x)F^{\rho\sigma}(0)\rangle_\infty$. It is difficult to evaluate the Schwinger integral for Eqs.~\eqref{eq:3_1_1_jj} and \eqref{eq:3_1_1_kk} for general $s$, so instead, we evaluate the expression for finite $s$ in $3d$ up to $s=50$ and then match it with an analytic expression. Our final result is \begin{equation} \gamma_s^\mathrm{tricr.QED,ad}=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\frac{2(11s^2-2)}{3(4s^2-1)}\right]. \end{equation} \subsubsection{Singlet sector} In the singlet sector, the higher-spin operator $\hJ_s$ and its divergence $\hK_{s-1}$ are \begin{align} \hJ_s&=P(\hpd_1,\hpd_2)\bph_{j,1}\phi^i_2+iQ(\hpd_1,\hpd_2,\hpd_3)i\bph_{k,1}\phi^k_2\hA_3,\nonumber\\ \hK_{s-1}&=\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)i\bph_{k,1}\phi^k_2F_{\mu\nu,3}. \end{align} Note that the correlators of $\hJ_s$ and $\hK_{s-1}$ are no longer only contractions. To the leading order of $1/N$, we have to consider other possible contributions. Here we outline the process of calculation and enclose the details in Appendix~\ref{sec:app_sg}. For the correlation of $\hJ_s$, It can be shown that the $s=1$ current drops out from the spectrum, and for $s\geq 2$, the only contribution to its correlation function is still direct contraction. For the correlation of $\hK_s$, adding extra contribution is equivalent to making use of the equation of motion~\eqref{eq:3_1_eom_a} for $A_\mu$ which effectively remove the pieces proportional to $\hJ_1$. More specifically, we rewrite the divergence in terms of the slightly broken higher-spin currents, the field strength and their descendants. \begin{equation} \hK_{s-1}=\sum_{l=0}^{s-2}[J_l][F], \end{equation} where $[\dots]$ denotes the conformal family of the operator, and in $J_l$ we need only to keep the $\hA$-independent piece. The correlation of $\hK_{s-1}$ in large-$N$ limit can be written effectively as the contraction of $\hat{\tilde{K}}_{s-1}$ in which the terms proportional to $J_1$ are removed from $\hK_{s-1}$. \begin{equation} \langle\hK_{s-1}(x)\hK_{s-1}(0)\rangle_\infty=\langle\hat{\tilde{K}}_{s-1}(x)\hat{\tilde{K}}_{s-1}(0)\rangle_\mathrm{ct.},\qquad \hat{\tilde{K}}_{s-1}=\hK_{s-1}-[J_1][F]. \end{equation} Taking this extra contribution into account, we evaluate the anomalous dimension for finite $s$ and extrapolate an analytic expression in $3d$. Our final result is \begin{equation} \gamma_s^\mathrm{tricr.QED, sg}=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\left\{\begin{aligned} &\frac{2(11s^4+3s^3-13s^2+15s+2)}{3(s^2-1)(4s^2-1)},&&s\textrm{ even}\\ &\frac{2(11s^2-2)}{3(4s^2-1)},&&s\textrm{ odd}\\ \end{aligned}\right\}\right]. \end{equation} \subsection{Scalar QED} In this section we consider the scalar QED, with Lagrangian defined in Eqs.~\eqref{eq:2_3_bos_qed_lag} and \eqref{eq:2_3_bos_hs_lag}. The modified equation of motion for $\phi$ are, to linear order of $A$ and $\sigma$ \begin{align} \partial^2\phi^i&=i(\partial_\mu A^\mu)\phi^i+2iA^\mu(\partial_\mu\phi^i)+\phi^i\sigma,\nonumber\\ \partial^2\bph_j&=-i\bph_j(\partial_\mu A^\mu)-2i(\partial_\mu\bph_j)A^\mu+\bph_j\sigma. \label{eq:3_2_eom_phi} \end{align} and there is an additional equation of motion for $\sigma$ \begin{align} 0&=\bph_k\phi^k, \label{eq:3_2_eom_sigma} \end{align} Substitute the equation of motion \eqref{eq:3_2_eom_phi} into the divergence Eq.~\eqref{eq:3_1_dj}, we get an extra piece in the divergence $\hK_{s-1}$. \begin{align} \hK_{s-1}&=\left.\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)i\bph(x_1)\phi(x_2)F_{\mu\nu}(x_3)+\mathscr{K}_{(\sigma)}(\partial_1,\partial_2,\partial_3)i\bph(x_1)\phi(x_2)\sigma(x_3)\right|_{x_{1,2,3}\to x}, \end{align} where \begin{equation} \mathscr{K}_{(\sigma)}=M_1(\hpd_1+\hpd_3,\hpd_2)+M_2(\hpd_1,\hpd_2+\hpd_3). \end{equation} In the adjoint sector, the correlation of the higher-spin operator $\hJ_s$ remains the same as the tricritical QED, and the correlation of the divergence $\hK_{s-1}$ can be evaluated by direct contraction, \begin{multline} \langle (\hK_{s-1})^i{}_j(x)(\hK_{s-1})^k{}_l(0)\rangle=-\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)\mathscr{K}_{(A)}^{\mu\nu}(-\partial_2,-\partial_1,\partial_3)G^k{}_j(x_1)G^i{}_l(x_2)D_P^{\mu\nu,\rho\sigma}(x_3)\\ \left.+\mathscr{K}_{(\sigma)}(\partial_1,\partial_2,\partial_3)\mathscr{K}_{(\sigma)}(-\partial_2,-\partial_1,\partial_3)G^k{}_j(x_1)G^i{}_l(x_2)D_{\sigma}(x_3)\right|_{x_{1,2,3}\to x}-\textrm{(trace)}, \end{multline} Substitute this into Eq.~\eqref{eq:2_2_anom}, we get the result for the anomalous dimension in $3d$ \begin{equation} \gamma_s^\mathrm{scal.QED, ad}=\frac{16}{N\pi^2}\left(\sum_{i=1}^s\frac{1}{i-1/2}-\frac{7s^2-1}{4s^2-1}\right). \end{equation} In the singlet sector, for the correlation of the divergence $\hK_{s-1}$, we need to take into account the equation of motion \eqref{eq:3_1_eom_a} for $A$ and \eqref{eq:3_2_eom_sigma} for $\sigma$. We write $\hK_{s-1}$ in terms of $J_l$, $F$, $\sigma$ and their descendents \begin{equation} \hK_{s-1}=\sum_{l=0}^{s-2}[J_l][F]+\sum_{l=0}^{s-1}[J_l][\sigma], \end{equation} remove the pieces proportional to $J_1$ and $J_0$, \begin{equation} \hat{\tilde{K}}_{s-1}=\hK_{s-1}-[J_1][F]-[J_0][F]-[J_1][\sigma]-[J_0][\sigma] \end{equation} and calculate its correlator through direct contraction \begin{equation} \langle\hK_{s-1}(x)\hK_{s-1}(0)\rangle_\infty=\langle\hat{\tilde{K}}_{s-1}(x)\hat{\tilde{K}}_{s-1}(0)\rangle_\mathrm{ct.} \end{equation} The result for the anomalous dimension in $3d$ is \begin{equation} \gamma_s^\mathrm{scal.QED,sg}=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\left\{\begin{aligned} &\frac{14s^4+5s^3-16s^2+19s+2}{2(s^2-1)(4s^2-1)},&&s\textrm{ even}\\ &\frac{7s^3+2s^2-s-2}{s(4s^2-1)},&&s\textrm{ odd}\\ \end{aligned}\right\}\right]. \end{equation} \section{Fermionic QEDs in \texorpdfstring{$3d$ large-$N$}{3d large-N} limit} \label{sec:4} In this section we calculate the anomalous dimension of the QED$_3$ and QED$_3$-Gross-Neveu-Yukawa theory in the large-$N$ limit, with Lagrangian defined in Eqs.~\eqref{eq:2_3_fer_qed_lag} and \eqref{eq:2_3_fer_hs_lag}. The effective photon propagator in the large-$N$ limit comes from the resummation of the fermion bubble diagrams. The large-$N$ fermion propagator is the same as in free field theory. The Feynman rules of QED$_3$ are listed below: \begin{align} G^i{}_j(x)&=\langle\psi^i(x)\bps_j(0)\rangle_\infty=\delta^i_j\frac{\Gamma\left(\frac{d}{2}\right)}{2\pi^{d/2}}\frac{\ds{x}}{x^d},\nonumber\\ D^{\mu\nu}(x)&=\langle A^\mu(x)A^\nu(0)\rangle_\infty=\frac{1}{N}\frac{-\Gamma(d)\sin\frac{\pi d}{2}}{\pi(d-2)\Gamma\left(\frac{d}{2}\right)^2}\frac{(d-2-\zeta)\delta^{\mu\nu}+2\zeta\frac{x^\mu x^\nu}{x^2}}{x^2}. \end{align} For QED$_3$-Gross-Neveu-Yukawa theory there is one extra Feynman rule for the effective propagator of $\sigma$ obtained by resumming the fermion bubble diagrams, \begin{equation} D_\sigma(x)=\langle\sigma(x)\sigma(0)\rangle_\infty=\frac{1}{N}\frac{2^{d-1}\Gamma(\frac{d-1}{2})\sin\frac{\pi d}{2}}{\pi^{3/2}\Gamma(\frac{d}{2}-1)^2}\frac{1}{x^2}. \end{equation} \subsection{\texorpdfstring{QED$_3$}{QED3}} The equations of motion for $\psi$ and $\bps$ to the linear order in $A$ are \begin{align} \ds{\partial}\psi&=i\ds{A}\psi,\nonumber\\ \partial_\mu\bps\gamma^\mu&=-i\bps\ds{A},\nonumber\\ \partial^2\psi&=\frac{i}{2}\gamma_\lambda\epsilon^{\mu\nu\lambda}F_{\mu\nu}\psi+i(\partial_\mu A^\mu)\psi+2iA^\mu(\partial_\mu\psi),\nonumber\\ \partial^2\bps&=\frac{i}{2}\bps F_{\mu\nu}\gamma_\lambda\epsilon^{\mu\nu\lambda}-i\bps(\partial_\mu A^\mu)-2i(\partial_\mu\bps)A^\mu, \label{eq:4_eom} \end{align} where we have made use of the $\gamma$-matrix identity \begin{equation} \gamma^\mu\gamma^\nu=\delta^{\mu\nu}+i\epsilon^{\mu\nu\lambda}\gamma_\lambda. \label{eq:4_gamma} \end{equation} The gauge invariant slightly broken higher-spin currents are \begin{equation} \hJ^\textrm{(F)}_s(x)=\left.P^\textrm{(F)}_s(\hD_1,\hD_2)\bps(x_1)\hg\psi(x_2)\right|_{x_{1,2}\to x}, \label{eq:4_j} \end{equation} where the polynomial $P^\mathrm{(F)}_s(\xi ,\eta )$ is given is Eq.~\eqref{eq:2_1_pf}. Similar to the bosonic case, we truncate the expression to the linear order in the gauge field \begin{align} \hJ_s(x)&=\left.P(\hpd_1,\hpd_2)\bps(x_1)\hg\psi(x_2)\phi(x_2)+iQ(\hpd_1,\hpd_2,\hpd_3)\bps(x_1)\hg\psi(x_2)\hA(x_3)\right|_{x_{1,2,3}\to x}\nonumber\\ &=\hJ^{(P)}_s(x)+\hJ^{(Q)}_s(x), \end{align} where \begin{equation} Q(\xi ,\eta ,\chi )=\frac{P(\xi +\chi ,\eta )-P(\xi ,\eta +\chi )}{\chi }. \end{equation} We then calculate its divergence \begin{align} \hK_{s-1}=\partial_\mu D_z^\mu\hJ_s. \end{align} The divergence of the $A$-independent part $\hJ^{(P)}_s$ is \begin{multline} \hK_{s-1}^{(P)}=\left[M_1(\hpd_1,\hpd_2)\partial_1^2+M_2(\hpd_1,\hpd_2)\partial_2^2\right]\bar{\psi}(x_1)\hg\psi(x_2)\\+\left[N_1(\hpd_1,\hpd_2)\partial_1^\lambda+N_2(\hpd_1,\hpd_2)\partial_2^\lambda\right]\bps(x_1)\gamma_\lambda(x_2) \end{multline} where the polynomials \begin{align} M_1(\xi,\eta)&=\frac{d}{2}P'_\xi+\frac{1}{2}(\xi-\eta)P'_{\xi\xi}+\eta P'_{\xi\eta},\nonumber\\ M_2(\xi,\eta)&=\frac{d}{2}P'_\eta-\frac{1}{2}(\xi-\eta)P'_{\eta\eta}+\xi P'_{\xi\eta},\nonumber\\ N_1(\xi,\eta)&=\frac{d-2}{2}P+\xi(P'_\eta-P'_\xi),\nonumber\\ N_2(\xi,\eta)&=\frac{d-2}{2}P+\eta(P'_\xi-P'_\eta). \end{align} We then substitute in the equations of motion of \eqref{eq:4_eom}. The divergence of the $A$-dependent part $\hJ^{(Q)}_s$ can be calculated similarly. For this part, one can simply use the free equation of motion $\ds{\partial}\psi=0$. Combined together, the final result is gauge invariant, dependent only on the field strength $F_{\mu\nu}=\partial_\mu A_\nu-\partial_\nu A_\mu$. \begin{multline} \hK_{s-1}=\left[R_1(\hpd_1,\hpd_2,\hpd_3)\partial_1^\mu+R_2(\hpd_1,\hpd_2,\hpd_3)\partial_2^\mu+R_3(\hpd_1,\hpd_2,\hpd_3)\partial_3^\mu\right]i\bps_1\hat{\gamma}F_{3\mu\nu}z^\nu\psi_2\\ \left.\qquad\qquad+R_4(\hpd_1,\hpd_2,\hpd_3)\bps_1F_{3\mu\nu}z_\lambda\epsilon^{\mu\nu\lambda}\psi_2+R_5(\hpd_1,\hpd_2,\hpd_3)i\bps_1F_{3\mu\nu}\gamma^\mu z^\nu\psi_2\right|_{x_{1,2,3}\to x} \label{eq:4_k} \end{multline} where the polynomials \begin{align} R_1(\xi ,\eta ,\chi )&=\frac{2}{\chi }M_1(\xi +\chi ,\eta )-\frac{1}{\chi }\left(\frac{d}{2}Q-(\eta +\chi )Q'_\xi +\eta Q'_\eta +\chi Q'_\chi \right),\nonumber\\ R_2(\xi ,\eta ,\chi )&=-\frac{2}{\chi }M_2(\xi ,\eta +\chi )-\frac{1}{\chi }\left(\frac{d}{2}Q+\xi Q'_\xi -(\xi +\chi )Q'_\eta +\chi Q'_\chi \right),\nonumber\\ R_3(\xi ,\eta ,\chi )&=\frac{1}{\chi }\left(M_1(\xi +\chi ,\eta )-M_2(\xi ,\eta +\chi )\right)-\frac{1}{\chi }\left(\frac{d}{2}Q+\xi Q'_\xi +\eta Q'_\eta -(\xi +\eta )Q'_\chi \right),\nonumber\\ R_4(\xi ,\eta ,\chi )&=-\frac{1}{2}\left(M_1(\xi +\chi ,\eta )+M_2(\xi ,\eta +\chi )\right),\nonumber\\ R_5(\xi ,\eta ,\chi )&=\left(M_1(\xi +\chi ,\eta )-M_2(\xi ,\eta +\chi )\right)+\frac{1}{\chi }\left(N_1(\xi +\chi ,\eta )-N_2(\xi ,\eta +\chi )\right)+\frac{\xi +\eta +\chi }{\chi }Q. \end{align} Especially,, for $s=1$ adjoint, $(\hK_0)^i{}_j=0$, and for $s=2$ singlet, $\hK_1=6i\bps_{k,1}\gamma^\mu\psi^k_2F_{\mu\nu,3}z^\nu=0$ due to the equation of motion for $A_\mu$ in $3d$, which corresponds to the conservation of symmetry current and stress tensor. In the adjoint sector, the correlation of the higher-spin operator $\hJ_s$ and the divergence $\hK_{s-1}$ can be evaluated by direct contraction. Substitute the correlation functions into Eq.~\eqref{eq:2_2_anom}, we get the result for the anomalous dimension in $3d$ \begin{equation} \gamma^\textrm{QED, ad}_s=\frac{16}{N\pi^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\frac{2}{3}\frac{11s^2-2}{4s^2-1}\right]. \end{equation} Note that this result is exactly the same as tricritical QED. Based on this, we conjecture that the anomalous dimension of the tricritical QED and fermionic QED$_3$ in the singlet sector should also be the same. We verify this coincidence up to $s=5$ by calculating leading order diagrams of the $\hK_{s-1}$ correlators \begin{equation} \langle\hK_{s-1}(x)\hK_{s-1}(0)\rangle= \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex[ringdot] (b) at (2,0) {}; \propag[pho,out=60,in=120] (a) to (b); \propag[fer,out=0,in=180] (a) to (b); \propag[antfer,out=300,in=240] (a) to (b); \end{feynhand} \end{tikzpicture} + \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex[ringdot] (b) at (2.5,0) {}; \vertex (c) at (1,-0.5); \vertex (d) at (1.5,-0.5); \propag[pho,out=45,in=135] (a) to (b); \propag[fer,out=0,in=120] (a) to (c); \propag[antfer,out=300,in=180] (a) to (c); \propag[pho,out=0,in=180] (c) to (d); \propag[fer,out=60,in=180] (d) to (b); \propag[antfer,out=0,in=240] (d) to (b); \end{feynhand}. \end{tikzpicture}. \end{equation} \subsection{\texorpdfstring{QED$_3$}{QED3}-Gross-Neveu-Yukawa theory} In this section we further couple the fermions in QED to an auxiliary bosonic field through a Gross-Neveu-Yukawa interaction. The modified equation of motion for $\psi$ and $\bps$ are, to linear order of $A$ and $\sigma$ \begin{align} \ds{\partial}\psi&=i\ds{A}\psi-\sigma\psi,\nonumber\\ \partial_\mu\bps\gamma^\mu&=-i\bps\ds{A}+\bps\sigma,\nonumber\\ \partial^2\psi&=\frac{i}{2}\gamma_\lambda\epsilon^{\mu\nu\lambda}F_{\mu\nu}\psi+i(\partial_\mu A^\mu)\psi+2iA^\mu(\partial_\mu\psi)-(\ds{\partial}\sigma)\psi,\nonumber\\ \partial^2\bps&=\frac{i}{2}\bps F_{\mu\nu}\gamma_\lambda\epsilon^{\mu\nu\lambda}-i\bps(\partial_\mu A^\mu)-2i(\partial_\mu\bps)A^\mu+\bps(\ds{\partial}\sigma). \end{align} This modification results in an extra piece in the divergence \begin{equation} \hK_{s-1}=\hK_{s-1}^\mathrm{(QED)}+\hK_{s-1}^\mathrm{(GNY)}, \end{equation} where $\hK_{s-1}^\mathrm{(QED)}$ is the divergence in QED given in the Eq.~\eqref{eq:4_k}, and \begin{equation} \hK_{s-1}^\mathrm{(GNY)}=R_6(\hpd_1,\hpd_2,\hpd_3)\psi_1\sigma_3\psi_2+R_7(\hpd_1,\hpd_2,\hpd_3)\psi_1(\partial_3^\mu\sigma_3)z^\nu\gamma^\lambda\epsilon_{\mu\nu\lambda}\psi_2, \end{equation} the polynomials are \begin{align} R_6(\xi,\eta,\chi)&=\chi\left[M_1(\xi+\chi,\eta)-M_2(\xi,\eta+\chi)\right]+N_1(\xi+\chi,\eta)-N_2(\xi,\eta+\chi),\nonumber\\ R_7(\xi,\eta,\chi)&=M_1(\xi+\chi,\eta)+M_2(\xi,\eta+\chi). \end{align} In the adjoint sector, the correlation of the higher-spin operator $\hJ_s$ is the same as in QED, and the correlation of the divergence $\hK_{s-1}$ can be evaluated by direct contraction. Substitute the correlation functions into Eq.~\eqref{eq:2_2_anom}, we get the result for the anomalous dimension in $3d$ \begin{equation} \gamma^{\mathrm{(QED-GNY,ad)}}_s=\frac{16}{N\pi^2}\left(\sum_{i=1}^s\frac{1}{i-1/2}-\frac{7s^2-2}{4s^2-1}\right). \end{equation} We note that this result is the same as scalar QED. We also expect $\gamma_s$ in the singlet sector is the same as that of scalar QED. \section{\texorpdfstring{$\mathrm{SU}(N)_1$}{SU(N)1} WZW CFT in \texorpdfstring{$(2+\epsilon)$}{2+e}-dimensions} \label{sec:5} It is well known that starting from a Gaussian theory at the upper or lower critical dimensions, one can perform dimensional continuation to obtain and to calculate interacting CFTs perturbatively, which include: (1) $d=4-\epsilon$ dimensional Wilson-Fisher~\cite{exp_wf_4e,Kompaniets2017sixloop}, Gross-Neveu-Yukawa~\cite{Gross1974,exp_gny_4e}, critical gauge theories with bosonic and/or fermionic matter~\cite{Halperin1974, Braun2014,Lorenzo2016,Giombi2015,Zerf2018}; (2) $d=2+\epsilon$ dimensional non-linear sigma models with no topoloigcal terms\footnote{These non-linear sigma models are believed to describe the same fixed point as Wilson-Fisher bosons with/without gauge fields.}~\cite{exp_nlsm_2e}; (3) $d=2+\epsilon$ dimensional Gross-Neveu-Yukawa theory~\cite{exp_gny_2e}. Conformal data such as scaling dimensions of operators can be written as a series expansion of $\epsilon$, and the series is known to be a divergent asymptotic series. One physical reason for the series expansion being divergent is that $d=2,4$ dimensions are the branch cut of the theory at which the Gaussian fixed point merges with the interacting fixed point. This naturally brings a question: can we perturbatively define and calculate an interacting CFT starting from a non-Gaussian (but solvable) theory? An ideal starting point is the $2d$ CFT, in particular, the Ising CFT is believed to exist in $2\le d \le 4$ dimensions~\cite{El-Showk2014,Cappelli2019}. Similar to free theories, $2d$ CFTs also have conserved higher-spin currents as a consequence of the Virasoro symmetry. However, it remains a mystery about how these conserved higher-spin currents are broken if the theory is continued to $d=2+\epsilon$ dimensions. The idea of conformal multiplet recombination does not naively apply here. Specifically, the divergence equation $\partial \cdot J_s = K_{s-1}$ requires a spin $s-1$ operator $K_{s-1}$ with $\Delta=s+1$. Such an operator, however, does not exist in a generic $2d$ CFT's spectrum (viz. minimal models, WZW models) even if null operators are taken into account. On the other hand, there is no known way to get around the conformal multiplet recombination, as one can rigorously show that $\partial \cdot J_s$ has to be a primary operator of the global conformal symmetry~\cite{maldacena_brok_hs}. In this section, we will provide a solution to this mystery for the $\mathrm{SU}(N)_1$ WZW models, and it can be straightforwardly generalised to other WZW models. The idea is to consider a dual description of the $\mathrm{SU}(N)_1$ WZW CFT, namely a fermionic QED with $N$ Dirac fermions coupled to a $\mathrm{U}(1)$ gauge field. This QED$_2$ theory is also called the Schwinger model. It can be exactly solved using the bosonisation technique. One important feature of the exact solution is that the gauge field strength $F_{\mu\nu}$ as well as any operator proportional to it will decouple from the IR spectrum. As we have explicitly shown in previous sections, in gauge theories higher-spin currents get broken by `eating' the divergence operator $K_{s-1}$ which is proportional to $F_{\mu\nu}$. So the decoupling of $F_{\mu\nu}$ and its composite operators will make higher-spin currents conserved, and also explains why the divergence operators are absent in the spectrum of $\mathrm{SU}(N)_1$ WZW models. More importantly, these operators only decouple at $2d$, they will re-enter the spectrum at $d=2+\epsilon$ dimensions making higher-spin currents slightly broken. We can have a more quantitative understanding in the large-$N$ limit. The correlator of $F_{\mu\nu}$ at arbitrary $2\le d\le 4$ and up to the order of $1/N^2$ is, \begin{equation} \langle F_{\mu\nu}(x)F_{\rho\sigma}(0)\rangle=\frac{C_0}{N}\left(1+\frac{C_1}{N}+\mathscr{O}\left(\frac{1}{N^2}\right)\right)\frac{I_{\mu\rho}I_{\nu\sigma}-I_{\mu\sigma}I_{\nu\rho}}{x^4}, \end{equation} where \begin{align} I_{\mu\nu}(x)&=\delta_{\mu\nu}-2\frac{x_\mu x_\nu}{x^2},\\ C_0&=\frac{-\Gamma(d)\sin\frac{\pi d}{2}}{\pi\Gamma(\frac{d}{2})^2},\\ C_1&=\frac{\Gamma(d)\sin\frac{\pi d}{2}}{\pi\Gamma(\frac{d}{2})^2}\left[3\psi'\left(\frac{d}{2}\right)-\frac{\pi^2}{6}+\frac{8(d-1)}{d^2}\right], \end{align} where $\psi(x)$ is the digamma function. The $\mathscr{O}(1/N^2)$ correction is given by Ref.~\cite{Giombi2016CJ}. It is consistent with the fact that they will decouple at $2d$, namely $ \langle F_{\mu\nu}(x)F_{\rho\sigma}(0)\rangle=0+\mathscr{O}(1/N^3)$. One interesting feature worth remarking is that, the $\mathscr{O}(1/N)$ correlator is of order $\mathscr{O}(\epsilon)$, while $\mathscr{O}(1/N^2)$ correlator is of order $\mathscr{O}(\epsilon^2)$. It is possible that higher order $\mathscr{O}(1/N^k)$ ($k>2$) correlator is also of order $\mathscr{O}(\epsilon^2)$ (or higher). If so, the correlator of $F_{\mu\nu}$ at $d=2+\epsilon$ is, \begin{equation}\label{eq:QED2e} \langle F_{\mu\nu}(x)F_{\rho\sigma}(0)\rangle=\frac{2\epsilon}{N}\frac{I_{\mu\rho}I_{\nu\sigma}-I_{\mu\sigma}I_{\nu\rho}}{x^4} + \mathscr{O}(\epsilon^2). \end{equation} We then repeat the calculation in Section~\ref{sec:4} while taking $d=2+\epsilon$ and and keep only the leading order in $\epsilon$ using Eq.~\eqref{eq:QED2e}. For the slightly broken higher-spin currents of fermionic QED in the adjoint sector, we get \begin{equation} \gamma_s^\mathrm{QED,ad}=\frac{\epsilon}{N}\sum_{i=1}^{s-1}\frac{1}{i}+ \mathscr{O}(\epsilon^2)=\frac{\epsilon}{N} H_{s-1}+ \mathscr{O}(\epsilon^2), \end{equation} where $H_{s-1}$ is the Harmonic number. \section{Conclusion and discussion} In the previous sections, we have calculated the anomalous dimensions of various bosonic and fermionic QEDs. We find these results have similar logarithmic asymptotic behaviours in the large-$s$ limit \begin{equation} \gamma_s=\frac{\mathrm{const.}}{N}\log s+\dots\qquad(s\to\infty), \end{equation} which is different from non-gauge interacting CFTs (i.e. Wilson-Fisher, Gross-Neveu-Yukawa), $\gamma_s = \mathrm{const.}/N+\cdots$. Results from light-cone bootstrap~\cite{analytic_bootstrap_3,spin_exp_1} provide an explanation for this difference. For any primary (scalar) operator $O$ in a unitary CFT, its twist family with scaling dimensions, $\Delta = 2 \Delta_O + 2n + s + \mathscr{O}(1/s)$, will always exist in the CFT's operator spectrum.\footnote{Schematically, we can write these operators as $O\partial^s \square^n O$.} The slightly broken higher-spin currents of the Wilson-Fisher (Gross-Neveu-Yukawa) theory is just a twist family of $\phi$ ($\psi$), hence their $\gamma_s = 2\Delta_\phi - 1+\mathscr{O}(1/s)=\mathrm{const.}/N+\cdots$. In contrast, a gauge theory does not have $\phi$ ($\psi$) in its spectrum (since they are not gauge invariant), so its $\gamma_s$ does not have to follow the behavior $\gamma_s = \mathrm{const.}/N+\cdots$. However, we would like to emphasise that our results do not apply to the real large-$s$ limit. It is because we perform the large-$N$ expansion in the first place, the results apply only to the case where $\gamma_s$ of the slightly broken higher-spin currents are small, namely $\gamma_s\ll 1$, or $N\gg\log s$. On the other hand, we do not exactly know the asymptotic behaviour in the region $\log s\gtrsim N$. One possibility is the logarithmic divergence continues; the other possibility is that $\gamma_s$ converges to a finite limit, for example, \begin{equation} \gamma_s\sim \gamma_\infty(1-s^{-a/N}), \end{equation} where $\gamma_\infty$ is an $\mathscr{O}(1/N^0)$ constant. One question to ask is whether the slightly broken spin-$s$ current is still the spin-$s$ operator with the minimal twist in gauge theories\footnote{The twist is defined as $\tau_s=\Delta-s-1$.}. One candidate for the minimal twist is the twist family of the $\mathrm{SU}(N)$ conserved current, which has $\lim_{s\to\infty}\tau'_s=1$. We can compare this with $\gamma_s$ of the slightly broken higher-spin currents. There are several possible scenarios: (1) Either $\gamma_s$ diverges logarithmically, or converges to a limit $\gamma_\infty>1$, then the minimal twist is $\tau'_s$; (2) $\gamma_s$ converges to a limit $\gamma_\infty<1$, hence the slightly broken higher-spin currents are the minimal twist. In either scenario, the minimal twist in the large-$s$ limit $\tau_{\infty,\mathrm{min}}=\lim_{s\to\infty}\tau_{s,\mathrm{min}}$ converges slower than $1/N$ in the large $N$ limit, namely \begin{equation} \lim_{N\to\infty}\tau_{\infty,\mathrm{min}}N=\infty. \end{equation} This is a crutial difference between gauge theories and interacting theories without gauge theories, as the latter has $\lim_{N\to\infty}\tau_{\infty,\mathrm{min}}N=\mathscr{O}(1/N^0)$. We have also discussed $\mathrm{SU}(N)_1$ WZW CFT at $2+\epsilon$ dimensions using its dual QED description. Specifically, we argue that the conservation of higher-spin currents of $\mathrm{SU}(N)_1$ WZW CFT at $2d$ can be understood as a consequence of the gauge field strength being decoupled in the IR. At $d=2+\epsilon$ dimensions the gauge field strength re-enters the operator spectrum, and breaks higher-spin currents through conformal multiplet recombination. It is worth emphasising that different from the conformal multiplet recombination in other previously known cases, here the divergence operators (i.e. the operators being eaten) are not in the original operator spectrum of the $2d$ theory. This new type of conformal multiplet recombination may be present in the dimensional continuation of many other $2d$ CFTs, in particular the Ising CFT. We will leave this to the future study. At last, we would like to comment on the possible physical or experimental correspondence of the anomalous dimensions of slightly broken higher-spin currents. An intriguing possibility is that they may be related to the non-equilibrium properties of CFTs. The intuition behind this is that in the presence of higher-spin symmetry, the system is known to be integrable. The breaking of their conservation will spoil integrability, hence yielding non-equilibrium phenomena like thermalisation or scrambling. \section*{Acknowledgements} We would like to thank Jaume Gomis, Ning Su and Liujun Zou for discussions. Z. Z. acknowledges supports from the Natural Sciences and Engineering Research Council of Canada (NSERC) through Discovery Grants. Research at Perimeter Institute is supported in part by the Government of Canada through the Department of Innovation, Science and Industry Canada and by the Province of Ontario through the Ministry of Colleges and Universities. \begin{appendix} \section{Calculation details for the singlet sector} \label{sec:app_sg} In this appendix, we use tricritical QED as an example to demonstrate how we calculate the singlet sector anomalous dimensions. In tricritical QED, the singlet sector higher-spin operator $\hJ_s$ and its divergence $\hK_{s-1}$ are \begin{align} \hJ_s&=P(\hpd_1,\hpd_2)\bph_{j,1}\phi^i_2+iQ(\hpd_1,\hpd_2,\hpd_3)i\bph_{k,1}\phi^k_2\hA_3,\nonumber\\ \hK_{s-1}&=\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)i\bph_{k,1}\phi^k_2F_{\mu\nu,3}. \end{align} Note that the correlators of $\hJ_s$ and $\hK_{s-1}$ are no longer only contractions. To the leading order of $1/N$, we have to consider other possible Feynman diagrams. For the correlation of $\hJ_s$, we can still omit the $\hA$-dependent piece, and \begin{align} \langle\hJ_s(x)\hJ_s(0)\rangle&=\left.P(\hpd_1,\hpd_2)P(\hpd_{1'},\hpd_{2'})\langle(\bph_{1,k}\phi^k_2)(\bph'_{1,l}\phi'^l_2)\rangle_\infty\right|_{x_{1,2}\to x,x'_{1,2}\to 0}\nonumber\\ &= \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex[ringdot] (b) at (1.5,0) {}; \propag[fer,out=45,in=135] (a) to (b); \propag[antfer,out=315,in=225] (a) to (b); \node at (.75,-.75) {(a)}; \end{feynhand} \end{tikzpicture}+ \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex (b) at (1,0); \vertex (c) at (1.5,0); \vertex[ringdot] (d) at (2.5,0) {}; \propag[fer,out=60,in=120] (a) to (b); \propag[antfer,out=300,in=240] (a) to (b); \propag[pho,,out=0,in=180] (b) to (c); \propag[fer,out=60,in=120] (c) to (d); \propag[antfer,out=300,in=240] (c) to (d); \node at (1.25,-.75) {(b)}; \end{feynhand} \end{tikzpicture}, \end{align} where a ring dot denotes that differential operators are acted on this point. The diagram (b) vanishes identically for $s\ge 2$ due to the orthogonality between different spin currents $\langle \hJ_s(x)\hJ_1(0)\rangle=0$. For $s=1$, the spin-$1$ singlet current is the gauge current that is removed from the operator spectrum. For the correlation of $\hK_s$, \begin{align} \langle\hK_{s-1}(x)\hK_{s-1}(0)\rangle&=\left.\mathscr{K}_{(A)}^{\mu\nu}(\partial_1,\partial_2,\partial_3)\mathscr{K}^{\rho\sigma}_{(A)}(\partial_{1'},\partial_{2'},\partial_{3'})\langle(\bph_{1,k}\phi_2^k F^{\mu\nu}_3)(\bph_{1',l}\phi_{2'}^l F^{\rho\sigma}_{3'})\rangle\right|_{x_\alpha\to x,x'_\alpha\to 0}\nonumber\\ &= \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex[ringdot] (b) at (2,0) {}; \propag[pho,out=60,in=120] (a) to (b); \propag[fer,out=0,in=180] (a) to (b); \propag[antfer,out=300,in=240] (a) to (b); \node at (1,-1) {(a)}; \end{feynhand} \end{tikzpicture} + \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex[ringdot] (b) at (2.5,0) {}; \vertex (c) at (1,-0.5); \vertex (d) at (1.5,-0.5); \propag[pho,out=45,in=135] (a) to (b); \propag[fer,out=0,in=120] (a) to (c); \propag[antfer,out=300,in=180] (a) to (c); \propag[pho,out=0,in=180] (c) to (d); \propag[fer,out=60,in=180] (d) to (b); \propag[antfer,out=0,in=240] (d) to (b); \node at (1.25,-1) {(b)}; \end{feynhand} \end{tikzpicture} + \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex[ringdot] (b) at (2.5,0) {}; \vertex (c) at (1.25,0.5); \vertex (d) at (1.25,-0.5); \propag[pho,out=60,in=180] (a) to (c); \propag[pho,out=0,in=240] (d) to (b); \propag[fer,out=0,in=120] (a) to (d); \propag[antfer,out=300,in=180] (a) to (d); \propag[fer,out=0,in=120] (c) to (b); \propag[antfer,out=300,in=180] (c) to (b); \node at (1.25,-1) {(c)}; \end{feynhand} \end{tikzpicture}. \label{eq:3_1_2_diag} \end{align} Here diagram (a) corresponds to direct contraction. Diagram (c) vanishes identically due to the orthogonality between slightly broken higher-spin currents and the field strength, namely $\langle\hJ_s(x)F^{\mu\nu}(0)\rangle=0$. Taking into account diagram (b) is equivalent to making use of the equation of motion for $A_\mu$ to the zeroth order of $A$ \begin{equation} 0=\left.i(\partial_{1\mu}-\partial_{2\mu})\bph^k(x_1)\phi_k(x_2)\right|_{x_{1,2}\to x}+\mathscr{O}(A), \end{equation} which effectively remove the pieces proportional to $\hJ_1$. To show this, we rewrite the divergence in terms of the slightly broken higher-spin currents, the field strength and their descendents. \begin{equation} \hK_{s-1}=\sum_{l=0}^{s-2}[J_l][F], \end{equation} where $[\dots]$ denotes the conformal family of the operator, and in $J_l$ we need only to keep the $\hA$-independent piece. More explicitly, one can write the descendents in the form \begin{multline} [J_l][F]=\sum_{m=0}^{s-1-l}\left(a_{slm}\hpd^{s-l-m-1}D_z^\mu\hJ_l\hpd^mF_{\mu\nu}z^\nu\right.\\\left.+b_{slm}\hpd^{s-l-m-2}\partial^\mu\hJ_l\hpd^mF_{\mu\nu}z^\nu+c_{slm}\hpd^{s-l-m-2}\hJ_l\hpd^m\partial^\mu F_{\mu\nu}\right). \end{multline} The coefficeents $a_{slm},b_{slm},c_{slm}$ can be determined by writing out $\hJ_l$ explicitly and compare the coeffecients with Eq.~\eqref{eq:3_1_k}. In particular, due to the differential equation of $P(\xi,\eta)$, the coeffecient with $l=1$ can be determined explicitly. \begin{align} a_{m1}&=\frac{2}{m!(s-2-m)!(s-m)!}\partial_\chi^mD_p^{s-2-m}(R_1-R_2)|_{\chi=0}\nonumber\\ \frac{d-2}{2}a_{m1}+b_{m1}&=\frac{1}{m!(s-2-m)!(s-m)!}\partial_\chi^mD_P^{s-2-m}(\xi R_1+\eta R_2)|_{\xi=1,\eta=-1,\chi=0}\nonumber\\ c_{m1}&=\frac{1}{m!(s-3-m)!(s-1-m)!}\partial_\chi^mD_P^{s-3-m}k_3|_{\xi=1,\eta=-1,\chi=0} \end{align} where the differential operator \begin{equation} D_P=\frac{d-2}{2}(\partial_\xi+\partial_\eta)+\xi\partial_\xi^2+\eta\partial_\eta^2 \end{equation} We then evaluate the diagrams in Eq.~\eqref{eq:3_1_2_diag} using this form of $\hK_{s-1}$. \begin{equation} \mathrm{(a)}=\left\langle\left(\sum_{l=0}^{s-2}[J_l][F]\right)(x)\left(\sum_{l'=0}^{s-2}[J_{l'}][F]\right)(0)\right\rangle_{\mathrm{ct.}}=\sum_{l=0}^{s-2}\left\langle\left([J_l][F]\right)(x)\left([J_l][F]\right)(0)\right\rangle_{\mathrm{ct.}} \end{equation} where `ct.' means direct contraction. For diagram (b), we note that the bubbles are non-zero only when $l=1$ due to the orthogonality between slightly broken higher-spin currents with different spin \begin{equation} \begin{tikzpicture}[baseline=(o.base)] \begin{feynhand} \vertex (o) at (0,-.1); \vertex[ringdot] (a) at (0,0) {}; \vertex (b) at (1,0); \vertex (c) at (1.5,0); \propag[fer,out=60,in=120] (a) to (b); \propag[antfer,out=300,in=240] (a) to (b); \propag[pho] (b) to (c); \end{feynhand} \end{tikzpicture} =\left\langle\left(\sum_{l=0}^{s-2}[J_l]\right)J^\mu_1\right\rangle_{\mathrm{ct.}}=\sum_{l=0}^{s-2}\left\langle[J_l]J^\mu_1\right\rangle_{\mathrm{ct.}}\delta_{l,1}=\langle[J_1]J^\mu_1\rangle_{\mathrm{ct.}} \end{equation} With this result, the chain integral~\cite{zinn_justin} in diagram (b) is evaluated to be \begin{equation} \mathrm{(b)}=-\left\langle\left([J_1][F]\right)(x)\left([J_1][F]\right)(0)\right\rangle_{\mathrm{ct.}} \end{equation} Therefore, the correlation of $\hK_{s-1}$ in large-$N$ limit can be written effectively as the contraction of $\hat{\tilde{K}}_{s-1}$ in which the terms proportional to $J_1$ removed from $\hK_s$. \begin{equation} \langle\hK_{s-1}(x)\hK_{s-1}(0)\rangle_\infty=\langle\hat{\tilde{K}}_{s-1}(x)\hat{\tilde{K}}_{s-1}(0)\rangle_\mathrm{ct.},\qquad \hat{\tilde{K}}_{s-1}=\hK_{s-1}-[J_1][F]. \end{equation} \section{Bosonic QEDs with Chern-Simons term} \label{sec_app_cs} In this section we add an additional Chern-Simons term to the bosonic theories, \begin{equation} \mathscr{L}_\mathrm{CS}=\frac{ik}{4\pi}\epsilon^{\mu\nu\lambda}A_\mu\partial_\nu A_\lambda. \end{equation} We consider the limit of large CS-level $k$ and finite $\lambda=k/N$. This results in an extra factor in front of the photon propagator~\cite{kirilin_cs} \begin{align} \langle A^\mu(x)A^\nu(0)\rangle_\mathrm{CS}&=\frac{1}{1+\lambda^2}\langle A^\mu(x)A^\nu(0)\rangle_\infty\nonumber\\ &=\frac{1}{1+\lambda^2}\frac{1}{8\pi^2N}\frac{(d-2-\zeta)\delta^{\mu\nu}+2\zeta\frac{x^\mu x^\nu}{x^2}}{x^2} \label{eq:3_3_cs_corr} \end{align} where $\langle\dots\rangle_\infty$ are correlators evaluated with the Feynman rules without Chern-Simons term. and the equation of motion for the gauge field $A$ is modified to \begin{equation} \epsilon^{\lambda\mu\nu}F_{\mu\nu}=\frac{4\pi i}{k}(\partial_1^\lambda-\partial_2^\lambda)\bph_k(x_1)\phi^k(x_2)|_{x_{1,2}\to x}=\frac{4\pi}{k}J_1^\lambda. \label{eq:3_3_eom_cs} \end{equation} In the adjoint sector, we need only take the $1/(1+\lambda^2)$ factor in Eq.~\eqref{eq:3_3_cs_corr} into account when calculating the correlation of the piece proportional to $F_{\mu\nu}$ in $\hK_{s-1}$, and the result is modified to \begin{equation} \gamma_s^\mathrm{tr.QED+CS,ad}=\frac{16}{N\pi^2}\frac{1}{1+\lambda^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}-\frac{2(11s^2-2)}{3(4s^2-1)}\right] \end{equation} in tricritical QED, and \begin{align} \gamma_s^\mathrm{sc.QED+CS,ad}&=\frac{16}{N\pi^2}\left[\frac{1}{1+\lambda^2}\sum_{i=1}^s\frac{1}{i-1/2}+\frac{s^2-1}{3(4s^2-1)}-\frac{1}{1+\lambda^2}\frac{2(11s^2-2)}{3(4s^2-1)}\right] \end{align} in scalar QED. In the singlet sector, we also need to take into account the equation of motion for the gauge field $A$~\eqref{eq:3_3_eom_cs} which relates the field strength to the gauge current. Substituting $F$ with $J_1$, we get \begin{equation} \hK_{s-1}=\sum_{l=0}^{s-2}[J_l][J_1]. \end{equation} Its correlation function is \begin{multline} \langle \hK_{s-1}\hK_{s-1}\rangle_\mathrm{CS}=\frac{1}{1+\lambda^2}\sum_{l\neq 1}\left\langle\wick{([\c1 J_l][\c2 J_1])(x)([\c1 J_l][\c2 J_1])}(0)\right\rangle_\infty\\ +\frac{1}{(1+\lambda^2)^2}\left[\left\langle\wick{([\c1 J_1][\c2 J_1])(x)([\c1 J_1][\c2 J_1])}(0)\right\rangle_\infty+\left\langle\wick{([\c2 J_1][\c1 J_1])(x)([\c1 J_1][\c2 J_1])}(0)\right\rangle_\infty\right], \end{multline} where the contraction $\wick{\c J_m\c J_n}$ is a shorthand notation for $\wick{(P_m(\hpd_1,\hpd_2)\c2\bph_1\c1\phi_2)(P_n(\hpd_{1'},\hpd_{2'})\c1\bph_{1'}\c2\phi_{2'})}$. Plugging it into Eq.~\eqref{eq:2_2_anom}, we get the result for the anomalous dimension \begin{multline} \gamma_s^\mathrm{tr.QED+CS,sg}=\frac{16}{N\pi^2}\frac{1}{1+\lambda^2}\left[\sum_{i=1}^s\frac{1}{i-1/2}\right.\\\left.-\left\{\begin{aligned} &\frac{2(11s^2-2)}{3(4s^2-1)},&&s\textrm{ odd}\\ &\frac{2(11s^4-s^2+8)}{3(4s^4-5s^2+1)}+\frac{1}{1+\lambda^2}\frac{2(s-2)(s-1)}{(s+1)(4s^2-1)},&&s\textrm{ even}\\ \end{aligned}\right\}\right] \end{multline} in tricritical QED, and \begin{multline} \gamma_s^\mathrm{sc.QED+CS,sg}=\frac{16}{N\pi^2}\left[\frac{1}{1+\lambda^2}\sum_{i=1}^s\frac{1}{i-1/2}\right.\\\left.+\left\{\begin{aligned} &\frac{s^2-1}{3(4s^2-1)}-\frac{1}{1+\lambda^2}\frac{2(11s^3+3s^2-2s-3)}{3s(4s^2-1)},&&s\textrm{ odd}\\ &\frac{s-2}{6(2s-1)}-\frac{1}{1+\lambda^2}\frac{2(11s^4-s^2+8)}{3(4s^4-5s^2+1)}-\frac{1}{(1+\lambda^2)^2}\frac{2(s-2)(s-1)}{(s+1)(4s^2-1)},&&s\textrm{ even}\\ \end{aligned}\right\}\right] \end{multline} in scalar QED. \end{appendix}
\section{Introduction} Driving behavior analysis is a growing field of research due to increasing safety concerns in roads and the advent of semi-autonomous vehicles. According to World Health Organization (WHO), traffic accidents are responsible for approximately 1.3 million deaths in a year and incurs almost 3\% cost of most countries GDP \cite{who}. Majority of these accidents occurs due to inattentive/distracted and aggressive/rash driving behavior. Therefore, identifying category of driving patterns correctly helps to avoid unwanted accidents and can become a key player to restore road safety. One of the main challenges for behavior analysis, is the existence of diversity in individuals, depending on individual’s inherent characteristics and, also based on demographic factors such as age, gender etc. Hence, building a model which would be addressing this diversity in the training data, as well as, for inferencing is an important requirement. We address this requirement, by proposing a method for classification of driving behavior using representation learning \cite{bengio2013} and group-based training. A consistent group formation technique is formulated using Hierarchical Clustering (HC) using Auto-encoded Compact Sequence, a prior work on HC \cite{bandyopadhyay2021,luczak2016,friedman2017}, to identify the variations of driving patterns in diverse individuals. This method is performed iteratively, until we observe a consistent set of groups which cannot be further divided into subgroups. Separate instances of a classification model are trained for each consistent group formed in the training set. In the hidden test data, similar group formation is performed, and the groups are mapped for inferencing to the train model exploiting the best distance measure. There exist few prior works on clustering-based ensemble of classifiers \cite{rahman2013,jurek2014,chakraborty2017} to learn the patterns of each cluster separately using multiple models. But these techniques are not robust, as it is very difficult to inherently assume the number of groups to be formed for a specific dataset. Our method deals with this challenge by automatically finding the number of consistent groups in a dataset without any prior assumptions. Also, none of these prior works have applied representation learning to retain the informative part of the data, as well as, achieve the group distribution using learned representation with a choice of best clustering and distance measure. Our prime contributions are as follows:\\ 1. \textbf{Consistent group formation using representation learning and choice of best distance measure (CGRL)}: Iterative grouping of data is performed until no further separation is possible i.e., they become consistent. Hierarchical Clustering using Auto-encoded Compact Sequence have been used for grouping the data to capture the subtle variations of driving pattens and divide into different clusters. A compact representation of the time-series is learnt using multi-layer seq-2-seq auto-encoder and subsequently, hierarchical clustering is performed on the learned representation using the selected choice of best distance measure among Chebyshev, Manhattan and Mahalanobis distance. Consistent groups are formed for both the train and test data. \\ 2. \textbf{Learning using consistent groups}: Separate instances of a base classification model are trained for each of the consistent train groups. \\ 3. \textbf{Mapping best pair of train - test group combinations}: The test groups are inferred using the classification model using two different techniques. One uses the consistent group representative (CR) distance between the train and test groups, and another exploits the average instance-wise distance between the groups. The distances are computed in the representation space using the recommended best distance measure. \\ 4. \textbf{Extensive analysis on publicly available driving behavior analysis dataset}: We evaluated our method on publicly available UAH-Driveset data \cite{romera2016}, which consists of three driving behaviors- Normal, Aggressive and Drowsy. Data from six drivers with varying age-groups, gender and vehicle type have been collected using a smartphone. IMU signals i.e acceleration and angular velocity have been considered for experimentation. Proposed method outperforms benchmark classification models like MLSTM-FCN and Stacked-LSTM (trained using a single model) by 5\% and 2\% respectively, with a significant improvement in aggressive driving behavior prediction. \\ \section{Related Works} In recent years, there have been significant research related to driving behavior analysis. Primarily, data collected from sensors inbuilt in vehicles or via smartphones are used for performing such analysis. Broadly, time-series data from vehicles are collected from two types of sensors: (1) Location sensors like GPS etc. and (2) Inertial Measurement sensors (IMU) sensors like accelerometer, gyroscope etc. \cite{wang2018} used GPS-trajectory data to develop a framework for driving behavior analysis. Firstly, sequence of transition graphs with driving states are computed using GPS data. Subsequently, an autoencoder-based model is used to learn the latent representations of driving behavior from the transition graphs. \cite{khodairy2021} proposed an optimized Stacked-LSTM model on signals collected from a smartphone for driving behavior analysis to classify normal. aggressive and drowsy behavior. \cite{zhang2019} proposed a deep learning-based framework that automatically learns rich feature representations of driving behaviors and captures salient features from high-dimensional sensor data by fusing convolutional neural networks and recurrent neural networks along with an attention mechanism for in-vehicle CAN-BUS sensor data. \cite{guo2018} developed a hybrid unsupervised deep learning model (AESOM) combining autoencoder to extract latent features and self-organized maps for classifying driving behavior applied to data collected from GPS sensors. \cite{fugiglando2018} focused on signals from CAN Bus Data that are directly or indirectly related to interaction between the driver and the vehicle, and, grouped driver's behavior using K-means clustering and cross validation. The analysis showed that specific combinations of a signal and feature provide the most discriminating signatures between driving behaviors. \cite{moosavi2021} presented a deep-neural-network architecture, termed D-CRNN, for capturing representations for driving style, using CNN and RNN. CNN captures the semantic patterns of driving behavior and temporal dependencies between them are learnt using RNN. \section{Proposed Method} \subsection{Consistent group formation using representation learning and choice of best distance measure} \subsubsection{Hierarchical Clustering using Auto-Encoded Compact Sequence (HC-AECS):} It uses representation learning for robust and efficient time-series clustering to obtain a choice of best clustering and associated distance measure. In this method, first a compact representation (AECS) of time-series is learned using a seq-2-seq LSTM undercomplete auto-encoder \cite{hochreiter1997}. Figure \ref{aecs_archi} depicts the auto-encoder architecture where M, t and d are the number of instances, time-steps and dimensions of input data respectively. Here $h_{l1}$ and $h_{l1}$ indicates the number of nodes in the hidden layers $l1$ and $l2$ respectively. \begin{figure}[htbp] \centering \includegraphics[width=0.8\columnwidth]{archi.png} \caption{Schematic block diagram of multi-layer seq-2-seq autoencoder for computing AECS} \label{aecs_archi} \end{figure} \begin{figure*}[htbp] \centering \includegraphics[width=0.8\textwidth]{block.png} \caption{Functional block diagram of proposed method} \label{block} \end{figure*} After AECS is learnt, agglomerative hierarchical clustering is performed on this compact representation using a method to find the best choice of distance measure and associated best clustering. Three distance measures have been used to evaluate the distance between two time-series for hierarchical clustering. The distance measures used are Chebyshev Distance, Manhattan Distance \cite{wang2013} and Mahalanobis Distance \cite{de2000}. Suppose $T_i$= \{$t_i^1,t_i^2,..t_i^k,..,t_i^n$\} and $T_j$= \{$t_j^1,t_j^2,..t_j^k,..,t_j^n$\} be two time-series of length n. The distance measures can be defined as: \\ (1) Chebyshev distance: $max_k (|t_i^k-t_j^k |)$ \\ (2) Manhattan distance: $\sum_{k=1}^n |t_i^k-t_j^k |$ \\ (3) Mahalanobis distance: $\sqrt{(T_i-T_j)^T.C^{-1}.(T_i-T_j)^T}$ \\ where $C$ is the co-variance matrix between $T_i$ and $T_j$. The clustering obtained by the 3 different distance measures are compared using Modified Hubert Statistic ($\rho$) \cite{hubert1985}, an internal clustering measure, for identification of the best distance measure. $\rho$ measures the separation between the clusters, exploiting pairwise instances distance weighted by the distance between their centroids. The distance measure using which the clustering produces maximum value of Modified Hubert Statistic is selected as best distance measure. \subsubsection{Consistent Group Formation (CGF):} Here, we devise a method to discover the inherent groups in a dataset without using any annotations or prior knowledge. We have formed a concept of consistent grouping where the generated groups cannot be broken further into subgroups (comprising of significant number of instances). The groups are formed using HC-AECS, exploiting agglomerative hierarchical clustering on the learnt compact representation by using multi-layer undercomplete auto-encoder. It iteratively performs clustering on the learned representation, increasing the number of clusters to be formed by one in each successive iteration (starting from 2 clusters). At any iteration, if the maximum number of instances / data points are retained in the same groups as in previous iteration, the process is stopped, and the previous set of groups are termed as consistent. We define a threshold $\tau$ as the stopping criterion, to track if the new cluster formed at an iteration has lower than $\tau$ fraction of the instances of the dataset. It infers the new group formed is very small in size, and the set of previous groups are returned. We form the consistent groups for both training and testing data. Algorithm \ref{cgf} describes the method for consistent group formation. \begin{algorithm}[h] \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{$D$: Time-series, \\ $\tau$: Threshold (stopping criterion)} \Output{$CG$: Consistent groups} \SetAlgoLined \caption{Consistent Group Formation (CGF)} \label{cgf} \SetKwProg{generate}{Function \emph{CGF}}{}{end} \generate{($D$, $\tau$)}{ $k$ $\gets$ 2 ; $\triangleright$ Initializing number of clusters \\ $N$ $\gets$ Number of time-series in $D$\; $Stopping\_cond$ $\gets$ False \; $C_{k-1} \gets $ [] \; \While{$Stopping\_cond = False$}{ $C_k , d_k \gets HC-AECS(D, k)$ \; \If{Difference $(C_k , C_{k-1} ) < \tau * N$}{ $Stopping\_cond \gets True$ \; $CG \gets C_{k-1}$ ; $\triangleright$ Consistent clusters \\ \textbf{return} $CG$ \; } $C_{k-1} \gets C_k$ \; $k \gets k + 1$ ; $\triangleright$ Increment no. of clusters by 1 } } \end{algorithm} \subsection{Learning using consistent clusters} After the consistent clusters are formed for the training data, separate instances of a classification model are trained on each of the consistent clusters formed. As each consistent group have different dominant demographic characteristics of the drivers, training a model on each of the groups separately is expected to improve the efficacy of the learner. Suppose $K$ consistent groups are formed for the training set and $C$ be the baseline classifier used. Here, $i^{th}$ instance of classifier $C$ is trained using the data in consistent group i, ($X_i$) and its corresponding labels $y_i$ as shown in equation 4. \begin{equation} C_i \; = \; Train (C,(X_i,y_i)),\; where \; 1 \leq i \leq K \end{equation} \subsection{Inferencing using the consistent test groups exploiting the best distance measure} We perform consistent grouping on the test data and subsequently, consistent test groups are mapped w.r.t best training model without using any annotation. We propose two different methods for mapping the test groups to the optimal trained classifier for inferencing. \\ 1. Using Consistent group representative distance (CR-CR distance) \\ 2. Using average instance-wise distance (Avg distance) (1) \textbf{Using CR to CR distance:} We compute the consistent group representatives (CR) for each of the groups in the latent representation space i.e. using AECS. The CRs are computed as the mean of the elements present in the group as depicted in Figure \ref{cen_to_cen}. Similarly, we also find the CRs of the groups formed in train set using AECS. We map each test group, to the model trained using the group, whose distance of the group representative i.e. CR, is lowest to the CR of the test group computed using the best distance measure. Let $CR_i$ be the representative of training group $i$ , $CR_j$ the representative for test group $j$ in the representation space and $d$ be the best distance measure. Then model trained with training group $k$ i.e. $C_k$ is selected for test group $j$ where, \begin{equation} k=ArgMin_i \; d(CR_i ,CR_j ), \; 1 \leq i \leq K \label{cen_dis_eq} \end{equation} \begin{figure}[htbp] \centering \includegraphics[width=0.7\columnwidth]{Cen_to_cen.png} \caption{Depiction of consistent group representative (CR) distance between a test group and 2 train groups} \label{cen_to_cen} \end{figure} (2) \textbf{Using average instance-wise distance:} In this method, we compute the distance between each instance in a test group to each instance to a train group in the representation space and find their average. The distances are computed using the best distance measure. For each test group, the model is chosen trained using the group which has minimum average instance-wise distance from the test group. Suppose $i$ = \{$a_1,a_2…,a_n$\} be a training group and $j$ = \{$b_1,b_2…,b_m$\} be a test group. The average instance-wise distance between the two groups as shown in Figure \ref{avg_dis} can be defined as: \begin{equation} Avg\_dist(i,j)=\frac{1}{nm} \sum_{i=1,j=1}^{i \leq n,j \leq m} d(a_i,b_j) , \end{equation} where $d$ is the best distance measure chosen. For any test group $j$, the model is used for inferencing whose training group ($k$) has minimum $Avg\_dist$ w.r.t $j$. \begin{equation} k=ArgMin_i \; Avg\_dist(i,j), \; 1 \leq i \leq K \label{avg_dis_eq} \end{equation} \begin{algorithm}[h] \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{$\{X_{train},y_{train}\}$: Training set, \\ $X_{test}$: Test set, \\ $C$: Base classifier} \Output{$y_{test}$: Annotations of test data} \SetAlgoLined \caption{Learning and Inferencing using Consistent Groups} \label{proposed} \SetKwProg{generate}{Function \emph{Training\_using\_CG}}{}{end} \generate{($X_{train}$, $y_{train}$)}{ $\triangleright$ Find consistent groups in train set \\ $CG_{train} \gets CGF (X_{train})$ ; $\triangleright$ From Algorithm 1 \\ $K_{train} \gets$ Number of groups in $CG_{train}$ \; $\triangleright$ Train a model for each consistent cluster $i$ \\ \ForAll{$i \in 1,2,.. ,K_{train}$}{ $ind_i \gets$ Instances where $CG_{train} = i$ \; $C_i \gets Train(C(X_{train}[ind_i], y_{train}[ind_i]))$\; } \textbf{return} trained classifiers $\{C_1, C_2, … , C_{K_{train}}\}$\; } \SetKwProg{generate}{Function \emph{Inferencing\_using\_CG}}{}{end} \generate{($X_{test}$)}{ $\triangleright$ Find consistent groups in test set \\ $CG_{test} \gets CGF (X_{test})$ ; $\triangleright$ From Algorithm 1 \\ $K_{test} \gets$ Number of groups in $CG_{test}$ \; $\triangleright$ Perform inference on each consistent cluster $i$ \\ \ForAll{$i \in 1,2,.. ,K_{test}$}{ $ind_i \gets$ Instances where $CG_{test} = i$ \; $b \gets$ Mapping test group $i$ to best train group using equations \ref{cen_dis_eq} or \ref{avg_dis_eq} \; $\triangleright$ Infer test group using $b^{th}$ classifier $C_b$ \\ $y_{test}[ind_i] \gets Infer(C_b (X_{test}[ind_i]))$ \; } \textbf{return} $y_{test}$\; } \end{algorithm} \begin{figure}[!h] \centering \includegraphics[width=0.75\columnwidth]{Avg_dis.png} \caption{Depiction of average instance-wise distance between a test group and train group} \label{avg_dis} \end{figure} The functional block diagram of proposed approach is described in Figure \ref{block}. Firstly, $M$ consistent clusters (Clus $1$,...,Clus $M$) are formed on the training data using the CGF method as described in Algorithm 1. Then, separate instances of classification models ($C_1$, ...,$C_M$) are trained for each $M$ consistent clusters ($Training\_using\_CG$ function of Algorithm 2). For inferencing, $N$ consistent clusters (Clus $1$,...,Clus $N$) are formed on the test data and the best train-test group combinations are selected for each of $N$ clusters using any of the two proposed mapping techniques, CR-CR distance and Avg dist ($Inferencing\_using\_CG$ function of Algorithm 2). \section{Experimental Analysis} \subsection{Dataset Description} We evaluate our methodology on a publicly available driving behavior analysis dataset - UAH Driveset data \cite{romera2016}. Time-series recordings of more than 500 minutes are captured by driving monitoring app DriveSafe \cite{bergasa2014} using smartphone-embedded sensors (e.g., inertial measurement, GPS, and cameras). Independent driving sessions were conducted on 6 different drivers with different ages and vehicles. The description of the demographic information of the drivers and their vehicle’s fuel type is depicted in Table \ref{driver}. Every driver performed a series of different behaviors: normal, aggressive and, drowsy and driving on two types of roads (motorway and secondary). The dataset provides a variety of sensor signals, however, in this work, we are interested in raw inertial measurements signals. This is because, the raw inertial signals like acceleration etc. are most representative of the driver’s behavior patterns than other signals like GPS etc. \begin{table} \centering \begin{tabular}{c c c c} \hline \textbf{Driver} & \textbf{Age range} & \textbf{Gender} & \textbf{Fuel type} \\ \hline D1 & 40-50 & Male & Diesel \\ D2 & 20-30 & Male & Diesel \\ D3 & 20-30 & Male & Diesel \\ D4 & 30-40 & Female & Gasoline\\ D5 & 30-40 & Male & Gasoline\\ D6 & 40-50 & Male & Electric\\ \hline \end{tabular} \caption{Demographic and vehicle information of drivers in UAH Drive-set data} \label{driver} \end{table} \subsection{Data Preprocessing} The UAH-DriveSet dataset consists of signals collected from smartphone embedded sensors: inertial measurements, GPS, and cameras that are sampled at different frequencies (10 Hz, 1 Hz, 10 Hz, respectively). As mentioned earlier, we only use the inertial measurements i.e. acceleration, roll, pitch and yaw for motorway road. For experimentation, Kalman filtered acceleration signal is used to reduce the impact of external noise from the sensors already provided in the given data. Driving sessions were performed with a specific driving behavior (normal, aggressive, or drowsy) for the six drivers. Each session is segmented into fixed sliding windows (segments) of 64 timesteps with a 50\% overlap and then labeled according to the associated driving behavior. Subsequently, all the constructed time-series windows are combined in a single dataset. Finally, we use random splitting technique to split the combined dataset into training and testing sets with ratios of 80\% and 20\%, respectively. The split is performed in a stratified way, based on the combination of driver information, and driving behavior. The description of the pre-processed UAH-Driveset data is provided in Table \ref{prep}. \begin{table}[htp] \centering \begin{tabular}{c c} \hline \textbf{Parameter} & \textbf{Value} \\ \hline Train set size & 4184 \\ Test set size & 1046 \\ Timesteps & 64\\ Classes & 3 (Normal, Drowsy, Aggressive)\\ Features & 6 (AccX, AccY, AccZ, Roll, Pitch, Yaw)\\ \hline \end{tabular} \caption{Description of pre-processed UAH-Driveset Data} \label{prep} \end{table} \subsection{Representation learning with consistent groups formation} In this section, we elaborate the mechanism for forming consistent groups on the UAH-Driveset data along with learned representation. \subsubsection{Representation Learning:} Suppose $X_{train}$ be the training set, where $X_{train} \in \mathcal{R}^ {4184 \times 64 \times 6}$. In the seq-2-seq autoencoder, for learning the latent representation, a 2-layer LSTM network is used, where number of units of the two hidden layers are 16 and 12 respectively. Here, for $X_{train}$, a compact representation $AECS_{train} \in \mathcal{R}^ {4184 \times 12}$ is learnt. Performance of afore-mentioned model configuration has been analyzed, tested and validated across diverse uni-variate and multi-variate time-series \cite{bandyopadhyay2021}. \begin{figure*}[htp] \label{tsne} \centering \begin{subfigure}{.35\textwidth} \centering \includegraphics[width=\textwidth]{hubert.png} \caption*{Figure 5(a): Modified Hubert Statistic ($\rho$) value for clustering on train data using the 3 distance measures} \captionlistentry{} \label{hubert} \end{subfigure} \begin{subfigure}{.60\textwidth} \centering \includegraphics[width=0.45\textwidth]{train_tsne.png} \includegraphics[width=0.45\textwidth]{test_tsne.png} \caption*{Figure 5(b):Visualization of consistent train (left) and test groups (right) of UAH-Driveset data using t-SNE in representation space} \captionlistentry{} \label{train} \end{subfigure}% \end{figure*} \subsubsection{Consistent group formation:} Next, we perform Hierarchical clustering on the AECS using 3 distance measures Chebyshev (CH), Manhattan (MA) and Mahalanobis (ML) distance to form consistent groups. We observe Chebyshev distance forms the best clustering, as it produces maximum value of Modified hubert statistic ($\rho$) as depicted in Figure \ref{hubert}. Three consistent groups are formed for the training data, which includes two majority groups and another small outlier group. Similarly, using the proposed method for the test data, a total of seven consistent groups are formed. \subsection{Training on the consistent groups} On formation of the consistent groups for the training set, we train each of them individually using a benchmark classification model. Raw time-series data is used for training without the need of any hand-crafted features. We have considered two benchmark deep learning models – (1) MLSTM-FCN \cite{karim2019} and (2) Stacked-LSTM model \cite{khodairy2021} for separate experimentations. MLSTM-FCN is an established model for multi-variate time-series classification. We have used for analysis the Stacked-LSTM model, as it is one of the prior works on driving behavior classification, where the authors have experimented with the UAH-Driveset data. Default parameters are used for the models to depict the generalizability of our approach to work on any type of classifier. \subsection{Inferencing on the test set} For each test group, the best train model is selected based on the closeness of the consistent test and train groups formed. Closeness between the groups is measured using the two proposed methods: (1) Consistent group representative (CR) distance, and (2) Average instance-wise distance between test and train groups. The distance used here is the best distance measure obtained while forming the consistent train groups, which is Chebyshev (CH) distance in this case. Here, the 7 test groups formed are mapped to the closest among the 3 train groups. Subsequently, the instances present in that test group are inferred using the model trained on that train group. Table \ref{mapping} depicts the mapping of the 7 test groups to the optimal training model (denoted by 1,2 and 3). Mapping method indicates the technique used for finding the closeness of the test groups with the training groups (CR-CR: using consistent group representative distance method; Avg: using average instance-wise distance). \begin{table}[htp] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline \textbf{Mapping} & \multicolumn{7}{|c|}{\textbf{Test Group}} \\ \cline{2-8} \textbf{Method} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} \\ \hline CR-CR & 3 & 3 & 1 & 3 & 1 & 1 & 2 \\ Avg & 1 & 1 & 1 & 3 & 1 & 1 & 2 \\ \hline \end{tabular} \caption{Test group mapping to the optimal training models using two techniques (CR-CR and Avg)} \label{mapping} \end{table} Interestingly, we observe the largest consistent test group (group 3) is mapped to the model trained using the largest training group (group 1) for both the methods. Similarly, the second largest test group (group 7) is mapped to the second largest train group (group 2). \subsection{Results} We compare proposed model with the benchmark model trained on the complete training set. We compute the performance of our method using both techniques for mapping the test groups with the optimal training model. Performance metrics like accuracy and F1-score are used to compare our method with benchmark results for classification of normal, drowsy and aggressive behavior. Table \ref{results} depicts the detailed performance of proposed method and comparison with the benchmark model. We observe for both base classifier models Stacked-LSTM and MLSTM-FCN, proposed method outperforms the single benchmark model. A notable improvement in accuracy (5\%) and F1-score (4\%) is observed when MLSTM-FCN is used as the base classifier. \begin{table}[htp] \centering \begin{tabular}{|c|c|c|c|c|} \hline \multirow{2}{*}{\textbf{Classifier}} & \multirow{2}{*}{\textbf{Method}} & \textbf{Mapping} & \multirow{2}{*}{\textbf{Acc}} & \textbf{F1-}\\ & & \textbf{Method} & & \textbf{Score} \\ \hline Stacked LSTM & Benchmark & \multirow{2}{*}{-} & \multirow{2}{*}{0.78} & \multirow{2}{*}{0.78} \\ (Khodiary & -Original & & & \\ \cline{2-5} and Abosamra & Proposed & CR-CR & \textbf{0.80} & \textbf{0.80} \\ \cline{3-5} 2021)& method & Avg & \textbf{0.80} & \textbf{0.80} \\ \hline MLSTM & Benchmark & \multirow{2}{*}{-} & \multirow{2}{*}{0.82} & \multirow{2}{*}{0.82} \\ -FCN & -Original & & & \\ \cline{2-5} (Karim et al. & Proposed & CR-CR & \textbf{0.87} & \textbf{0.86} \\ \cline{3-5} 2019) & method & Avg & \textbf{0.87} & \textbf{0.86} \\ \hline \end{tabular} \caption{Performance of proposed method and comparison with benchmark model for both base classifiers (Stacked-LSTM and MLSTM-FCN)} \label{results} \end{table} \begin{figure}[ht] \centering \begin{subfigure}{.5\columnwidth} \centering \includegraphics[width=\textwidth]{single_cf.png} \caption{Single model} \label{single} \end{subfigure}% \begin{subfigure}{.5\columnwidth} \centering \includegraphics[width=\textwidth]{prop_cf.png} \caption{Proposed method} \label{prop} \end{subfigure} \caption{Confusion matrices of predictions (in acc) on test data using benchmark method and proposed method} \label{CF} \end{figure} Figure \ref{CF} shows the confusion matrices on test data for single model (benchmark) and proposed method (mapping method: avg distance) using MLSTM-FCN as base classifier. We can observe approximately 11\% improvement in prediction of aggressive behavior which is an important aspect for road safety. We further observe, both the methods for mapping the test groups to the train models produces the same results and are equally robust. We have used t-SNE \cite{van2008} for visualization of the consistent groups formed on the train and test data in latent representation space. Figure \ref{train} depicts the plots showing the separation between the consistent groups for the training and testing data. \begin{figure*}[htbp] \centering \includegraphics[width=\textwidth]{dominant1.png} \caption{Visualization of the 3 consistent training groups and the dominant demographic and driving behavior patterns that characterizes the groups} \label{dom} \end{figure*} \subsection{Analysis of the consistent training groups with driver’s driving behavior} In this section, we perform analysis on the consistent groups formed in training set using demographic and driving behavior information of the drivers provided in the UAH Driveset data described in Table 1 and 3. \subsubsection{Analysis on smallest training group:} On mapping the instances in the smallest group (group 3 consisting of 253 instances) of the training data, we observe some notable patterns. In Table \ref{outlier}, we depict the window-wise composition of the group 3 w.r.t each of the 6 drivers and their types of driving behavior. We observe, drivers D3 and D5 mainly contribute to this outlier group with 28.86\% and 55.34\% respectively. Furthermore, all instances of driver D3 present in this group are of aggressive class, while majority of the instances (124 of 140) of D5 are drowsy. \begin{table}[htp] \centering \begin{tabular}{c| c c c |c} \hline \multirow{2}{*}{\textbf{Driver}} & \multicolumn{3}{|c|}{\textbf{Driving Behavior (Group 3)}} & \multirow{2}{*}{\textbf{Total}}\\ \cline{2-4} & Normal & Agg & Drowsy & \\ \hline D1 & 8 & 5 & 3 & 16 \\ D2 & 2 & 8 & 1 & 11 \\ \textbf{D3} & 0 & 73 & 0 & \textbf{73} \\ D4 & 1 & 8 & 1 & 10 \\ \textbf{D5} & 5 & 11 & 124 & \textbf{140} \\ D6 & 0 & 2 & 1 & 3 \\ \hline \end{tabular} \caption{Composition of outlier training group (group 3) by driver information and their driving behaviors} \label{outlier} \end{table} During training, we have also experimented by discarding this group to see if the performance varied. We have observed a significant dip in performance (of approximately 4\%), indicating though this group is a kind of outlier group, being the smallest group, however this is informative and contributes immensely to the training process \cite{bandyopadhyay2016}. \subsubsection{Analysis on majority training groups:} On performing metadata mapping of the drivers for the largest consistent training group (group 1), we observe driver D4, the only female driver is the highest contributor i.e. has maximum instances in the group. Table \ref{grp1} depicts the composition of group 1 by the driver information in number of windows. We observe for D4, almost all its normal (99\%) and drowsy (96\%) instances are present in this group (from Table 3 and 7). Similarly, normal and aggressive behavior of D5 and aggressive and drowsy behavior of D1 and D6 have dominant contribution to the group. \begin{table}[htp] \centering \begin{tabular}{c| c c c |c} \hline \multirow{2}{*}{\textbf{Driver}} & \multicolumn{3}{|c|}{\textbf{Driving Behavior (Group 1)}} & \multirow{2}{*}{\textbf{Total}}\\ \cline{2-4} & Normal & Agg & Drowsy & \\ \hline D1 & 98 & 168 & 195 & 461 \\ D2 & 116 & 104 & 125 & 345 \\ D3 & 115 & 35 & 132 & 282 \\ \textbf{D4} & 252 & 188 & 249 & \textbf{689} \\ D5 & 224 & 188 & 9 & 421 \\ D6 & 140 & 165 & 255 & 550 \\ \hline \end{tabular} \caption{Composition of largest training group (group 1) by driver information and their driving behaviors} \label{grp1} \end{table} Similarly, performing the same analysis on training group 2, depicted in table \ref{grp2}, we observe drivers D2 and D3 contributes maximum in forming this group. Together, they contribute to approximately 56\% of the entire group. Incidentally, from the metadata information, we observe both the drivers are of same age group (20-30) and have same fuel type of vehicle (Diesel) which may contribute to the similarity of their driving patterns. \begin{table}[htp] \centering \begin{tabular}{c| c c c |c} \hline \multirow{2}{*}{\textbf{Driver}} & \multicolumn{3}{|c|}{\textbf{Driving Behavior (Group 2)}} & \multirow{2}{*}{\textbf{Total}}\\ \cline{2-4} & Normal & Agg & Drowsy & \\ \hline D1 & 102 & 2 & 34 & 138 \\ \textbf{D2} & 106 & 106 & 108 & \textbf{320} \\ \textbf{D3} & 115 & 94 & 122 & \textbf{331} \\ D4 & 1 & 41 & 9 & 51 \\ D5 & 6 & 4 & 131 & 141 \\ D6 & 118 & 58 & 16 & 192 \\ \hline \end{tabular} \caption{Composition of training group 2 by driver information and their driving behaviors} \label{grp2} \end{table} Figure \ref{dom} depicts the consistent training groups in the representation space and the dominant demographic traits and driving patterns characterized in each of the groups. In summary, we observe each of the groups has contributions from the three driving behaviors (else the training of the groups would be biased), but the individual driver’s behavior patterns are characterized uniquely in the consistent groups. This enables training driving behavior-pattern specific model which captures the diversity existing in individuals based on either their demographic features or their pattern of driving. \section{Conclusion} In this work, we propose a novel approach of driving behavior analysis, exploiting representation learning to encode the compact information of multivariate IMU timeseries and subsequently, forming consistent groups to capture subtle variations of driving patterns of different drivers. We have applied consistent grouping method using the learned representation, exploiting the choice of best clustering along with a selection of best distance measure. Consistent groups are used to train different instances of a classifier to learn driving pattern specific model. Similarly, test data is divided into consistent groups and the recommended best distance measure is used to map the best train-test groups. In case of UAH driveset data, Chebyshev distance is selected as the best distance measure and is used for mapping the test groups to the optimal training model for inferencing. Here optimal indicates most suited train-test consistent group pairs. We further perform in-depth analysis and validate that, the consistent groups on learned representation, indeed captures the driving behavior patterns. Proposed method outperforms benchmark classification methods like MLSTM-FCN and Stacked-LSTM which are trained using the complete training data. In future, we plan to pursue further analysis of driving patterns causally related with various in-body and external factors.
\section{Introduction} \label{sec:intro} Conditionally-solvable quantum-mechanical problems have been of great interest during the last decades (see, for example, Turbiner's remarkable review\cite{T16} and the references therein). However, the solutions to the eigenvalue equations stemming from such models have been misinterpreted in a wide variety of physical applications\cite{AF20,AF21,F21}. In a recent paper, Mustafa\cite{M22a} derived apparently exact solutions to an eigenvalue equation that is known to be conditionally solvable\cite {AF20,AF21,F21}. For this reason, we deem it necessary to discuss Mustafa's results in some detail. In section~\ref{sec:Phys_models} we outline Mustafa's models. In section~\ref{sec:HO} we solve one of them, which is actually exactly solvable, by means of the Frobenius (power-series) method. In section~\ref{sec:CLH} we apply the Frobenius method to a conditionally-solvable radial eigenvalue equation that contains Mustafa's ones as particular cases. Finally, in section~\ref{sec:conclusions} we summarize the main results and draw conclusions. \section{Physical models} \label{sec:Phys_models} In this section we outline the eigenvalue equations for three models discussed by Mustafa\cite{M22a}. The physical meaning of the parameters is not relevant for present discussion and the interested reader is referred to that paper. For the ``KG-oscillator in cosmic string spacetime within KKT'' Mustafa\cite {M22a} derived the radial equation \begin{equation} U^{\prime \prime }(r)+\left[ \tilde{\lambda}+\frac{1/4-\tilde{\gamma}^{2}} r^{2}}-\tilde{\omega}^{2}r^{2}\right] U(r)=0, \label{eq:HO_Mus} \end{equation} and obtained the eigenvalues \begin{equation} \tilde{\lambda}^{M}=2\tilde{\omega}\left( 2n_{r}+|\tilde{\gamma}|+1\right) , \label{eq:HO_lambda^M} \end{equation} where $n_{r}=0,1,\ldots $ is the radial quantum number. By means of the change of variables $\rho =\tilde{\omega}^{1/2}r$ we obtain \begin{equation} F^{\prime \prime }(\rho )+\left[ \frac{\tilde{\lambda}}{\tilde{\omega}} \frac{1/4-\tilde{\gamma}^{2}}{\rho ^{2}}-\rho ^{2}\right] F(\rho )=0. \label{eq:HO} \end{equation} For the ``pseudo-confined PDM KG-oscillator in cosmic string spacetime within KKT'' Mustafa\cite{M22a} derived the radial equation \begin{equation} U^{\prime \prime }(r)+\left[ \mathcal{E}+\frac{1/4-\tilde{\beta}^{2}}{r^{2}} \tilde{\omega}^{2}r^{2}-\eta \tilde{a}r-\frac{\tilde{b}}{r}\right] U(r)=0, \label{eq:CLH1_Mus} \end{equation} and obtained the eigenvalues \begin{equation} \mathcal{E}^{M}=2\tilde{\omega}\left( 2n_{r}+|\tilde{\beta}|+1\right) -\frac \tilde{a}^{2}\eta ^{2}}{4\tilde{\omega}^{2}}. \label{eq:CLH1_E^M} \end{equation} Curiously, these eigenvalues do not depend on $\tilde{b}$ in spite of the fact that the eigenvalue equation already depends on this model parameter. Well-known general theorems are useful for testing results; here, we can resort to the celebrated Hellmann-Feynman theorem (HFT)\cite{G32,F39} that in the present case states that \begin{equation} \frac{\partial \mathcal{E}}{\partial \tilde{b}}=\left\langle \frac{1}{r \right\rangle >0,\;\frac{\partial \mathcal{E}}{\partial \eta }=\tilde{a \left\langle r\right\rangle . \label{eq:CLH1_HFT} \end{equation} Clearly, Mustafa's result cannot be correct because \begin{equation} \frac{\partial \mathcal{E}^{M}}{\partial \tilde{b}}=0,\;\frac{\partial \mathcal{E}^{M}}{\partial \eta }=-\frac{\tilde{a}^{2}\eta }{2\tilde{\omega ^{2}}. \label{eq:CLH1_HFT_M} \end{equation} Another unmistakable indication that equation (\ref{eq:CLH1_E^M}) is not correct is that $\mathcal{E}^{M}$ does not yield the eigenvalues of the Coulomb problem when $\tilde{\omega}=0$ and $\tilde{a}=0$. The same change of variables indicated above yields \begin{equation} F^{\prime \prime }(\rho )+\left[ \frac{\mathcal{E}}{\tilde{\omega}}+\frac 1/4-\tilde{\beta}^{2}}{\rho ^{2}}-\rho ^{2}-\frac{\eta \tilde{a}}{\tilde \omega}^{3/2}}\rho -\frac{\tilde{b}}{\tilde{\omega}^{1/2}\rho }\right] F(\rho )=0. \label{eq:CLH1} \end{equation} For the ``confined PDM KG-oscillator-III in cosmic string spacetime within KKT'' Mustafa\cite{M22a} derived the radial eigenvalue equation \begin{equation} U^{\prime \prime }(r)+\left[ \tilde{\lambda}_{1}+\frac{1/4-\tilde{\gamma _{1}^{2}}{r^{2}}-\tilde{\omega}_{1}^{2}r^{2}-2mAr-\frac{2B}{r}\right] U(r)=0, \label{eq:CLH2_Mus} \end{equation} and obtained the eigenvalues \begin{equation} \tilde{\lambda}_{1}^{M}=2\tilde{\omega}_{1}\left( 2n_{r}+|\tilde{\gamma _{1}|+1\right) -\frac{m^{2}A^{2}}{\tilde{\omega}_{1}^{2}}. \label{eq:CLH2_lambda_1^M} \end{equation} In this case, the HFT states that \begin{equation} \frac{\partial \tilde{\lambda}_{1}}{\partial B}=2\left\langle \frac{1}{r \right\rangle >0,\;\frac{\partial \tilde{\lambda}_{1}}{\partial A =2m\left\langle r\right\rangle , \label{eq:CLH2_HFT} \end{equation} which are not satisfied by Mustafa's $\tilde{\lambda}_{1}^{M}$. Besides, \tilde{\lambda}_{1}^{M}$ does not yield the eigenvalues of the Coulomb problem when $\tilde{\omega}_{1}=0$ and $A=0$. The change of variables $\rho =\tilde{\omega}_{1}^{1/2}r$ yields \begin{equation} F^{\prime \prime }(\rho )+\left[ \frac{\tilde{\lambda}_{1}}{\tilde{\omega _{1}}+\frac{1/4-\tilde{\gamma}_{1}^{2}}{\rho ^{2}}-\rho ^{2}-\frac{2mA} \tilde{\omega}_{1}^{3/2}}\rho -\frac{2B}{\tilde{\omega}_{1}^{1/2}\rho \right] F(\rho )=0. \label{eq:CLH2} \end{equation} It is clear from the analysis above that Mustafa's analytical expressions for the energy in his equations (33) and (38) cannot be correct. Consequently, all the physical conclusions derived from such equations, and shown in Mustafa's figures 3 and 4, are based on wrong analytical expressions for the eigenvalues $\mathcal{E}^{M}$ and $\tilde{\lambda _{1}^{M}$. The three radial eigenvalue equations outlined above are particular cases of \begin{equation} F^{\prime \prime }(\rho )+\left[ W+\frac{1/4-\gamma ^{2}}{\rho ^{2}}-\rho ^{2}-\frac{a}{\rho }-b\rho \right] F(\rho )=0, \label{eq:CLH} \end{equation} where $a$ and $b$ are arbitrary real parameters. We are interested in square-integrable solutions $F(\rho )$ that vanish at origin. Such solutions only take place for particular values of the eigenvalue $W$ that we may label as $W_{\nu ,\gamma }(a,b)$, $\nu =0,1,\ldots $, in such a way that W_{\nu ,\gamma }<W_{\nu +1,\gamma }$. From the HFT we conclude that \begin{equation} \frac{\partial W}{\partial a}=\left\langle \frac{1}{\rho }\right\rangle >0,\ \frac{\partial W}{\partial b}=\left\langle \rho \right\rangle >0. \label{eq:HFT} \end{equation} \section{The exactly-solvable case} \label{sec:HO} The eigenvalue equation (\ref{eq:CLH}) is exactly solvable \textit{only} when $a=b=0$. In order to obtain exact solutions for this particularly simple case we resort to the well known Frobenius (power-series) method. If we insert the ansatz \begin{equation} F(\rho )=\rho ^{s}\exp \left( -\frac{\rho ^{2}}{2}\right) \sum_{j=0}^{\infty }c_{j}\rho ^{2j},\;s=\left| \gamma \right| +\frac{1}{2}, \label{eq:HO_ansatz} \end{equation} into the eigenvalue equation we find that the expansion coefficients $c_{j}$ satisfy the two-term recurrence relation \begin{equation} c_{j+1}=\frac{4j+2s-W+1}{2\left( j+1\right) \left( 2j+2s+1\right) c_{j},\;j=0,1,\ldots . \label{eq:HO_TTRR} \end{equation} For arbitrary values of $W$ the solution (\ref{eq:HO_ansatz}) is not square integrable\cite{F21b}; however if we choose \begin{equation} W=W_{\nu ,\gamma }=2\left( 2\nu +|\gamma |+1\right) ,\;\nu =0,1,\ldots , \label{eq:HO_W} \end{equation} the series reduces to a polynomial and the resulting eigenfunctions are square integrable. Note that Mustafa's result (\ref{eq:HO_lambda^M}) is correct because $W=$ $\tilde{\lambda}^{M}/\tilde{\omega}$ when $\nu =n_{r}$. The two-term recurrence relation thus takes the following simpler form \begin{equation} c_{j+1,\nu ,\gamma }=\frac{2\left( j-\nu \right) }{\left( j+1\right) \left( 2j+2s+1\right) }c_{j,\nu ,\gamma }, \label{eq:HO_TTRR_2} \end{equation} and the eigenfunctions become \begin{equation} F_{\nu ,\gamma }(\rho )=\rho ^{s}\exp \left( -\frac{\rho ^{2}}{2}\right) \sum_{j=0}^{\nu }c_{j,\nu ,\gamma }\rho ^{2j}. \label{eq:HO_eigenf} \end{equation} \section{Conditionally-solvable models} \label{sec:CLH} When one of the model parameters $a$ or $b$ is nonzero the eigenvalue equation (\ref{eq:CLH}) is not exactly solvable. It is an example of conditionally-solvable quantum-mechanical problems\cite{T16}. Mustafa\cite {M22a} obtained the results outlined above from a dubious analysis of the biconfluent Heun function. In this section we resort to the Frobenius method because it is not only simpler and clearer but leaves no room for doubts. In the general case we resort to the ansatz \begin{equation} F(\rho )=\rho ^{s}\exp \left( -\frac{b}{2}\rho -\frac{\rho ^{2}}{2}\right) \sum_{j=0}^{\infty }c_{j}\rho ^{j},\;s=\left| \gamma \right| +\frac{1}{2}, \label{eq:CLH_ansatz} \end{equation} that leads to the three-term recurrence relation \begin{eqnarray} c_{j+2} &=&A_{j}c_{j+1}+B_{j}c_{j}=0,\;j=-1,0,1,\ldots ,\;c_{-1}=0,\;c_{0}=1, \nonumber \\ A_{j} &=&\frac{a+b\left( j+s+1\right) }{\left( j+2\right) \left( j+2s+1\right) },\;B_{j}=\frac{4\left( 2j+2s-W+1\right) -b^{2}}{4\left( j+2\right) \left( j+2s+1\right) }. \label{eq:CLH_TTRR} \end{eqnarray} In order to have a polynomial of degree $n$ we require that $c_{n}\neq 0$, c_{n+1}=0$ and $c_{n+2}=0$, $n=0,1,\ldots $, that clearly leads to $c_{j}=0$ for all $j>n$. It follows from this condition that $B_{n}=0$ that yields \begin{equation} W=W_{\gamma }^{(n)}=2n+2s+1-\frac{b^{2}}{4}=2\left( n+|\gamma |+1\right) \frac{b^{2}}{4}. \label{eq:CHL_W^n} \end{equation} When $W=W_{\gamma }^{(n)}$ $B_{j}$ takes the simpler form \begin{equation} B_{j}=\frac{2\left( j-n\right) }{\left( j+2\right) \left( j+2s+1\right) }. \label{eq:CLH_B_j} \end{equation} Present expression for $W$ is not consistent with Mustafa's results (\ref {eq:CLH1_E^M}) and (\ref{eq:CLH2_lambda_1^M}) unless $n=2n_{r}$. However, this discrepancy is irrelevant because neither $\mathcal{E}^{M}$, $\tilde \gamma}_{1}^{M}$ or $W^{(n)}_{\gamma}$ are the eigenvalues of the corresponding radial equations\cite{AF20,AF21,F21}. Note that $W_{\gamma }^{(n)}$ also fails to satisfy the HFT (\ref{eq:HFT}). The most important point is that, in order to obtain such particular polynomial solutions, we need a second condition $c_{n+1}(a,b)=0$ already omitted by Mustafa\cite{M22a}. Since $c_{j}(a,b)$ is a polynomial function of degree $j$ in each model parameter we conclude that we have $n+1$ roots a^{(n,i)}(b)$, $i=1,2,\ldots ,n+1$, for a given value of $b$, or b^{(n,i)}(a)$ for each value of $a$. It can be proved that all the roots are real\cite{AF20,CDW00}. The exact polynomial solutions for a given value of $b $ are \begin{equation} F_{\gamma }^{(n,i)}(\rho )=\rho ^{s}\exp \left( -\frac{b}{2}\rho -\frac{\rho ^{2}}{2}\right) \sum_{j=0}^{n}c_{j}^{(n,i)}\rho ^{j}. \label{eq:CLH_eigenf} \end{equation} The meaning of this kind of solutions has been discussed extensively in recent papers\cite{AF20,AF21,F21}. However, in order to make present one sufficiently self contained and convince the reader that our results are correct we show some examples in what follows. When $n=0$ we obtain \begin{equation} c_{1}(a,b)=\frac{a+bs}{2s}=0, \label{eq:c_1(a,b)=0} \end{equation} and the exact solution \begin{equation} F_{\gamma }^{(0)}(\rho )=\rho ^{s}\exp \left( -\frac{b}{2}\rho -\frac{\rho ^{2}}{2}\right) , \label{eq:F^(0)} \end{equation} of equation (\ref{eq:CLH}) with $W=W_{\gamma }^{(0)}$ and $a=a_{\gamma }^{(0)}(b)=-bs$. Note that $F_{\gamma }^{(0)}(\rho )$ is the ground state of a model given by $a=a_{\gamma }^{(0)}(b)$. When $n=1$ the second condition reads \begin{equation} c_{2}(a,b)=\frac{a^{2}+ab\left( 2s+1\right) +b^{2}s\left( s+1\right) -4s} 4s\left( 2s+1\right) }=0, \label{eq:c_2(a,b)=0} \end{equation} with roots \begin{equation} a_{\gamma }^{(1,1)}(b)=\frac{\sqrt{b^{2}+16s}-b\left( 2s+1\right) }{2 ,\;a_{\gamma }^{(1,2)}(b)=-\frac{\sqrt{b^{2}+16s}+b\left( 2s+1\right) }{2}, \label{eq:a^(1,i)} \end{equation} from which we obtain \begin{eqnarray} F_{\gamma }^{(1,1)}(\rho ) &=&\rho ^{s}\exp \left( -\frac{b}{2}\rho -\frac \rho ^{2}}{2}\right) \left( 1+\frac{\sqrt{b^{2}+16s}-b}{4s}\rho \right) , \nonumber \\ F_{\gamma }^{(1,2)}(\rho ) &=&\rho ^{s}\exp \left( -\frac{b}{2}\rho -\frac \rho ^{2}}{2}\right) \left( 1-\frac{\sqrt{b^{2}+16s}+b}{4s}\rho \right) . \label{eq:F^(1,i)} \end{eqnarray} Note that $F_{\gamma }^{(1,1)}(\rho )$ is the ground state of a model with a=a_{\gamma }^{(1,1)}(b)$ while $F_{\gamma }^{(1,2)}(\rho )$ is the first excited state for a model given by $a=a_{\gamma }^{(1,2)}(b)$, both for W=W_{\gamma }^{(1)}$. Anybody can easily verify that the functions in equations (\ref{eq:F^(0)}) and (\ref{eq:F^(1,i)}) are solutions of equation \ref{eq:CLH}) under the conditions just indicated. As already stated above, this kind of solutions has been extensively discussed in recent papers\cite{AF20,AF21,F21}. We just want to point out that the occurrence of the exact polynomial solutions (\ref{eq:CLH_eigenf}) requires a second condition (overlooked by Mustafa\cite{M22a}) that restricts the values of the model parameters and that such solutions are not the only ones\cite{AF20,AF21,F21}. Therefore, any physical conclusion derived from eigenvalues like (\ref{eq:CLH1_E^M}) and (\ref {eq:CLH2_lambda_1^M}) are meaningless. In particular, Mustafa's expressions for the energy in his equations (33) and (38) cannot be correct. Consequently, all the physical conclusions derived from such equations, and shown in Mustafa's figures 3 and 4, are based on wrong analytical expressions for the eigenvalues $\mathcal{E}^{M}$ and $\tilde{\lambda _{1}^{M}$. \section{Conclusions} \label{sec:conclusions} We have already shown that the exact results obtained by Mustafa\cite{M22a} for the eigenvalue equations (\ref{eq:CLH1_Mus}) and (\ref{eq:CLH2_Mus}) are not correct because they are not exactly solvable. Those equations are conditionally solvable and one obtains some particular polynomial solutions for particular values of the model parameters determined by a second condition overlooked by Mustafa. This conclusion also applies to another paper by the same author where he apparently derived exact results for a similar conditionally-solvable problem\cite{M22b}. Most physical conclusions commonly derived from the polynomial solutions to conditionally-solvable eigenvalue equations are meaningless\cite{AF20,AF21,F21}.
\section{Introduction} Since 2005, the discovery of a new ultra-faint (UF) dwarf population in data from the Sloan digital sky survey \citep{ Willmanetal05AJ, Willmanetal05ApJ, Zuckeretal06a, Zuckeretal06b, Belokurovetal06a, Belokurovetal07, Irwinetal07, Walshetal07} and a survey of M31 \citep{Martinetal06, Ibataetal07, Majewskietal07} has more than doubled the number of known dwarf satellites of the Milky Way and Andromeda. More recently, searches using data from the Dark Energy Survey \citep[DES;][]{Bechtoletal:2015, KoposovB:15, KimJerjen:2015b,DrlicaWetal:2015,Luqueetal:2016, Nadleretal:2020, DrlicaWetal:2020}, other DECam surveys such as MagLiteS, SMASH, and DELVE \citep{Martinetal:2015, Drlica-Wagneretal:2016, Torrealbaetal:2018, Koposovetal:2018, Mauetal:2020}, Subaru Hyper Suprime-Cam Survey \citep{Hommaeta:2016,Hommaetal:2018,Hommaetal:2019}, ATLAS \citep{Torrealbaetal:2016a, Torrealbaetal:2016b}, Pan-STARRS1 \citep{Laevensetal:2015a,Laevensetal:2015b}, and Gaia \citep{Torrealbaetal:2019b} have further increased the sample of confirmed and candidate satellites to $\sim 50$. The existence of a population of true fossils of the first galaxies in the Local Group, with properties similar to UF dwarf galaxies, was first postulated in \cite{RicottiG:05}, just before their observational discovery. The proposal was based on results of cosmological simulations \citep{RicottiGS2002a,RicottiGS2002b} in which positive feedback effects from UV radiation produced a population of faint, but numerous, dwarf galaxies forming in haloes below the Lyman cooling limit ({\it i.e.}, $M_{\rm halo}<10^8$ M$_\odot$) at $z \sim 6-15$. Later theoretical work confirmed that the newly discovered UF dwarfs have properties in good agreement with predictions of cosmological simulations of the first galaxies \citep{BovillR2009,BovillR2011a,BovillR2011b,RicottiPG2016}. More recently, zoom simulations of dwarf galaxies and the satellites of the Milky Way have arrived at similar conclusions \citep{Wheeleretal:2015, Wetzeletal:2016, Munshi:2017, Wheeleretal:2019, Munshietal:2019, Garrison-Kimmeletal:2019,Agertzetal:2020, Samueletal:2020}. The identification of UF dwarfs as "fossil" galaxies is confirmed by data on their star formation histories \citep{Grebel:04, Brown:12, Brown:14}. If the identification of UF dwarf galaxies as fossils is correct, we expect a large population to be still undetected but accessible to future deep surveys such as the Rubin Observatory Large Synoptic Survey Telescope (LSST). Another notable consequence is the existence of faint stellar haloes around isolated dwarf galaxies (which have not been tidally stripped by the Milky Way or Andromeda). Stellar haloes are extended and faint stellar structures formed by debris of tidally disrupted dwarf galaxies accreted over time by the host galaxy. Around dwarf galaxies, these stellar haloes may not exist if all the accreted satellites are dark haloes without stars. However, if a stellar halo is found in sufficiently small mass dwarfs, the whole stellar halo can be composed of tidal debris of UF fossil galaxies. Such hypothesised stellar haloes have been referred to as "ghostly stellar haloes" \citep{BovillR2011a} and their properties can be directly related to the properties of the UF dwarf population. Stellar haloes have been observed in the outskirts of Local Group dwarfs and beyond \citep[{\it e.g.},][]{Higgsetal:2016, Kado-Fongetal:2020,Higgsetal:2021}. \citet{KangR:2019} collected data in the literature for six Local Group dwarf galaxies showing evidence of an extended stellar component: Leo~T \citep{LeoT}, Leo~A \citep{LeoA, LeoADwarf}, WLM \citep{WLMFringe, WLMKeck, Minniti}, IC~1613 \citep{IC1613, IC1613AGB,Puchaetal:2019}, IC~10 \citep{IC10}, and NGC~6822 \citep{NGC6822}. \citet{KangR:2019} interpreted the extended stellar component as ghostly stellar haloes and using a simple semi-analytic model, showed that dark matter haloes in the mass range $10^6-10^8$~M$_\odot$ at $z\sim 6-7$ have a mean star formation efficiency in the range $f_* \equiv M_*/M_{dm} \sim 0.1\%-0.2\%$, only mildly increasing as a function of the dark matter halo mass. This result extends to lower halo masses previous published works on the star formation efficiency in galaxy haloes with $M_{\rm dm}>10^{10}$~M$_\odot$ \citep{Behroozi2013}. The main limitation in the early work by \cite{KangR:2019} is the analytic derivation of the stellar halo model that relies on a few assumptions, namely the homology of the stellar profiles and other simplifications. In this paper we improve on the work of \citet{KangR:2019} by formulating a more accurate ghostly stellar halo model based on a set of N-body simulations. The model aims at characterizing the sizes and stellar masses of ghostly stellar haloes in dwarf galaxies as a function of their dark matter halo mass and the efficiency of star formation in the first galaxies. Using this more accurate model we provide updated predictions on the star formation efficiency in small mass dark matter haloes before the epoch of reionization ($M_{dm}<10^8$~M$_\odot$ at $z\sim 6-7$), using the same observational data collected in \cite{KangR:2019}. This paper is organized as follows. In \S~\ref{sec:sim} we present the numerical methods and details about the N-body simulations. The results of this work are presented in \S~\ref{sec:results}, including the formulation of a physically motivated model of stellar haloes, calibrated to reproduce the result of a grid of N-body simulations. In \S~\ref{sec:constraints} we apply the empirical model to observations of extended stellar haloes in six isolated dwarfs in the Local Group and derive constraints on $f_*$ at the epoch of reionization. In \S~\ref{sec:disc} we discuss present and future applications of this method and compare it to previous results from the literature. Summary and conclusions are in \S~\ref{sec:conc}. \section{Methodology and Simulations}\label{sec:sim} We use the `zoom-in' technique of nested refinement volumes inside a larger cosmological environment sampled at lower resolution to simulate formation histories of individual dwarf-scale haloes with masses $\sim 10^{9}$~\wisk{{\rm M_\odot}}\ at high resolution. We adopt cosmological parameters that closely match several large cosmological simulations, including Bolshoi \citep{bolshoi} and the Juropa Hubble Volume simulation \citep{jub2014}: $(\Omega_m, \Omega_\Lambda, \Omega_b, h, \sigma_8, n_s)$ = $(0.27, 0.73, 0.044, 0.7, 0.8, 0.96)$. Initial conditions are generated with {\sevensize MUSIC} \citep{music} using second-order Lagrangian perturbation theory with power spectrum and transfer functions calculated by {\sevensize CAMB} \citep{camb}. The $N$-body cosmological simulation code {\sevensize GADGET} \citep{spr2005} is used to evolve the simulations and {\sevensize AHF} \citep{ahf} for finding haloes composed of more than 20 gravitationally bound particles. We use an overdensity criterion of 178 times the critical density for defining the halo virial radius and mass at all redshifts. The {\sevensize MergerTree} tool is used for determining halo progenitors and constructing merger trees. The starting redshift of all simulations is set to when the rms variance of matter distribution is 0.13. Dark matter force softening lengths are set to 1.5\% the grid cell side length and held constant in comoving units for $z>9$ and constant in physical units subsequently. \subsection{Dark Matter Simulations} We adopt a fiducial comoving cubic simulation volume 49.3 Mpc on a side containing up to seven refinement volumes. We refer to the coarsest mass resolution covering the entire cube as ``level 0'' and sequentially label the nested, increasing resolution zoom levels. Dark matter simulation particle mass varies a factor of eight between levels reaching a minimum of $m_{dm} = 1000$~\wisk{{\rm M_\odot}}\ in level 7. In Fig.~\ref{fig:zoom} we show a slice through the simulation volume at $z=9$ to illustrate the multilayered setup. \begin{figure*} \centering \includegraphics[width=1.0\textwidth]{figs/ghost7A_z9_lowres.png} \caption{Large scale structure of the dark matter and nested zoom layers at different resolution for Halo~A at $z=9$. We use seven levels of refinement to evolve the haloes in Table~\ref{tab:sims} to redshift $z=0$ and achieve a dark matter mass resolution of 100~$\wisk{{\rm M_\odot}}$ in haloes with mass $< 10^9$~$\wisk{{\rm M_\odot}}$ and 1000~$\wisk{{\rm M_\odot}}$ in haloes more massive than $10^9$~$\wisk{{\rm M_\odot}}$. The mass resolution of the stars is 100 times smaller than the dark matter particle mass ({\it i.e.}, 1~$\wisk{{\rm M_\odot}}$ and 10~$\wisk{{\rm M_\odot}}$).\label{fig:zoom}} \end{figure*} We begin by generating unigrid initial conditions where the level 3 volume covers the entire simulation cube: $1024^3$ particles with mass resolution $4.096 \times 10^6$~\wisk{{\rm M_\odot}}. The initial redshift is $z_i=65$ and the force softening length is 722~pc. Fig.~\ref{fig:mf} shows the simulation halo mass function at several redshifts. Model mass functions are calculated with {\sevensize HMF}\footnote{Predecessor to {\sevensize TheHaloMod} \citep{thm2021}} \citep{hmf2013}. At all redshifts our simulation shows good agreement with fitting functions derived from the Bolshoi simulation \citep{Behroozi2013}, as expected for our adopted cosmological parameters. \begin{figure} \centering \includegraphics[width=0.4\textwidth,angle=270]{figs/massfunc-ghost3.pdf}\\ \caption{Mass functions of level 3 unigrid simulation at several redshifts. Solid lines are the analytic functions of \citet{Behroozi2013}.\label{fig:mf}} \end{figure} We examined the growth histories of haloes with mass $10^9-10^{10}$~\wisk{{\rm M_\odot}}\ at $z=0$ and inspected their locations in the simulation volume at all redshifts. We selected seven that appeared isolated, had identifiable progenitors for at least $z<6$, had not fallen into larger structures or merged with a halo $> 50\%$ its mass for $z < 6$. Our selected haloes, lettered A-G, have masses ranging $2.5 - 8.8 \times 10^9$~\wisk{{\rm M_\odot}}\ and maximum circular velocities $v_c = 26-36$ km/s at $z=0$, where $v_c^2 = GM(r)/r$ and $M(r)$ is the mass enclosed within radius $r$. Fig.~\ref{fig:dm_portraits} shows dark matter portraits at $z=0$ and gives the virial mass and maximum circular velocity for each halo. \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{figs/portraits_z0_lv7_100kpc_CUBE_3x3_lowres.png} \caption{Highest resolution dark matter portraits at $z=0$ of our isolated dwarf galaxies. Simulation particles within a (100 kpc)$^3$ volume centered on each halo are rendered. Virial mass and maximum circular velocity for each halo are labeled.}\label{fig:dm_portraits} \end{figure*} Each halo was simulated at each higher resolution from level 4-7. Refinement volume placement and extent were determined by tracing $z=0$ halo particles to the initial conditions. Level 7 volumes are approximately 1.5~Mpc on a side. The density field in the coarser resolution levels (0-2) was created by averaging down the level 3 initial conditions with {\sevensize MUSIC}. For the highest resolution simulations with all seven refinement levels, $z_i = 110$ and the softening length is 45~pc. Fig.~\ref{fig:den} compares density profiles of our largest halo at several redshifts across the three highest mass resolution. Differences in the inner profile due to the resolution dependent softening length are apparent but otherwise our simulations show good agreement at all times and across mass resolutions, validating our methodology. \begin{figure} \centering \includegraphics[width=0.35\textwidth,angle=270]{figs/Figure_denD.pdf}\\ \caption{Density profiles of Halo D at several redshifts (z = 10, 6, 3, 1, 0) in the three highest mass resolution simulations. Profiles are normalized by the critical density at the time of each redshift.\label{fig:den}} \end{figure} To sample dwarf haloes $<10^9$~\wisk{{\rm M_\odot}}, the simulation box for Haloes A and B was shrunk to 22.9 Mpc on a side, reducing the halo masses an order of magnitude and the simulation mass resolution to 100~\wisk{{\rm M_\odot}}. Seven levels of refinement were used and the starting redshift and force softening length scaled appropriately ($z_i = 127$, softening length 21~pc). To indicate their smaller size we label these haloes As and Bs where their $z=0$ masses are $\sim 2 \times 10^8$~\wisk{{\rm M_\odot}}\ and maximum circular velocities $13$~km/s. \subsection{Simulations with Dark Matter and Stars} With the seven level, dark matter only simulations in hand we add star particles representing the fossil stellar populations and evolve the simulations from the end of the epoch of reionization to $z=0$. We take $z=7$ as the time when star formation in fossil galaxies is quenched by the heating of the IGM. Progenitor haloes at $z=7$ that contribute mass to the halo at $z=0$ are populated with star particles using a model for the amount and distribution of stellar mass. Motivated by semi-analytic models of star formation during the epoch of reionization \citep{hart2016}, the halo stellar masses are modeled assuming the following simple power law relationship for the mean star formation efficiency: \begin{equation} f_*(M) \equiv \begin{cases} \epsilon_0(M/M_0)^\beta, & M>M_{cut},\\ 0, & M<M_{cut}. \end{cases} \label{eq:fstar} \end{equation} where $\epsilon_0$, $\beta$ and $M_{cut}$ are free parameters. The sky-projected two dimensional surface brightness profiles of dwarf galaxies are well described by a S\'ersic law: \begin{equation} \Sigma(R) = \Sigma_0 \exp \left(-(R/R_0)^{1/n}\right) \end{equation} where $R$ is the two dimensional radial coordinate on the sky and $R_0$ is a scale length. \citet{neto99} give an analytic approximation for the deprojected, three dimensional enclosed stellar mass profile: \begin{equation} \frac{M(r)}{M_*} = \frac{\gamma(n(3-p),(r/R_0)^{1/n})}{\Gamma(n(3-p))} \label{eq:massratio} \end{equation} where $\Gamma(b)$ is the complete gamma function and $\gamma(b,x)$ is the lower incomplete gamma function. \citet{marq00} give an updated value of the fitting parameter, $p = 1.0 - 0.6097/n + 0.05563/n^2$. In this study we only consider exponential disk profiles where $n=1$ and the ratio of the scale length to the three-dimensional half-mass radius is: $R_0/r_{eff} = 0.4483$. We define a free parameter for the ratio of half-mass to virial radius, $\eta \equiv r_{eff}/r_{vir}$, to relate the scale length to the halo virial radius determined from the dark matter simulations. Star particle velocities are modeled assuming they are in virial equilibrium within the potential well of the dark matter halo. The stellar velocity dispersion in each dimension is \begin{equation} \sigma^2 = GM_{eff}/3r_{eff} \label{eq:sigma} \end{equation} where $M_{eff}$ is the total mass within $r_{eff}$. $M_{eff}$ is calculated from the dark matter particles using the value of $r_{eff}$ scaled from the virial radius by the adopted value of $\eta$. Equations~(\ref{eq:fstar}), ~(\ref{eq:massratio}) and~(\ref{eq:sigma}) define our model for the fossil stellar populations. For each dark matter halo, we determine the number of star particles from the model total stellar mass [equation~(\ref{eq:fstar})] and adopted star particle mass resolution, $m_*$. We keep the ratio of simulation dark matter to star particle mass resolution constant and adopt $m_* = 10$~\wisk{{\rm M_\odot}}\ for Haloes A-G and $m_* = 1$~\wisk{{\rm M_\odot}}\ for Haloes As and Bs. We use an inverse transform technique to randomly generate radial coordinates for star particles following the mass distribution. A sample from a random variable uniformly distributed between 0 and 1 is generated. The three dimensional radius originating at the halo center of mass is calculated by numerically solving for where the enclosed stellar mass ratio [equation~(\ref{eq:massratio})] equals the random number to within a small tolerance ($10^{-8}$). Two more uniform random variates, $u_1, u_2$, are used to calculate the spherical angles: $\theta = 2\pi u_1$, $\phi = \arccos(2u_2 -1)$. Star particle coordinates are converted from spherical to Cartesian and the halo center of mass coordinates added. Particle velocities in each dimension are assigned by multiplying $\sigma$ [equation~(\ref{eq:sigma})] with a normally distributed random variable of zero mean and unit standard deviation. The halo center of mass velocity is calculated from dark matter particles within $3r_{eff}$ and added to the star particle velocities. Our model of the fossil stellar populations has 4 independent parameters: $M_{cut}$, $\beta$ and $\epsilon_0$ that determine the total stellar mass; and $\eta$ that determines the scale length of the stellar distribution. We set the pivot point $M_0 = 10^8$~\wisk{{\rm M_\odot}}\ in equation~(\ref{eq:fstar}) and hold it constant for all simulations. \citet{krav2013} finds $\eta \approx 0.015$ for galaxies over eight orders of stellar mass and all morphological types at the present time. We adopt $\eta=0.15$ for haloes during the epoch of reionization assuming the dependence on scale factor is dominated by the linear scaling of the virial radius. However, we also tested the sensitivity of the results to other choices of $\eta$ (see \S~\ref{ssec:reff}). The properties of the stellar halo are trivially dependent on the choice of $\epsilon_0$, as the surface brightness of the halo profile depends linearly on $\epsilon_0$. We therefore set $\epsilon_0 = 0.003$ and do not explore further the dependence of the simulation results on this parameter. We instead run a grid of simulations with different values of $\beta$ (typically $\beta=-0.5, 0, 0.5, 1$) for $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\ and for $M_{cut}=10^7$~\wisk{{\rm M_\odot}}. We decided to use only a subset of our haloes to explore the dependence of the stellar halo profile covering the widest range of mass while allowing more trials of the model free parameters. We simulated four main haloes with the following $z=0$ total mass: Halo~As ($2.0\times 10^8$~\wisk{{\rm M_\odot}}), Halo~Bs ($2.6 \times 10^8$~\wisk{{\rm M_\odot}}), Halo~B ($2.7 \times 10^9$~\wisk{{\rm M_\odot}}), and Halo~D ($8.8 \times 10^9$~\wisk{{\rm M_\odot}}). We also partially explore the mass variance by running a trial with Halo~G ($7.0 \times 10^9$~\wisk{{\rm M_\odot}}), which has a similar mass to Halo D (see \S~\ref{ssec:reff}). Table~\ref{tab:sims} presents the complete set of 28 simulations with dark matter and star particles we evolved to $z=0$. We adopt star particle softening lengths of 8~pc for haloes A-G and 1.72~pc for As and Bs. In a similar manner we also reduced the level 7 dark matter particle softening length to 21.6~pc and 10~pc for these simulations. \begin{table*} \centering \caption{Table of the set of 28 simulations with dark matter and star particles.} \label{tab:sims} \begin{threeparttable} \begin{tabular}{l|cccccccc} \hline Halo ID & $M_{vir}$ [$\wisk{{\rm M_\odot}}$] & $\eta$ & $\log{(M_{cut}/\wisk{{\rm M_\odot}})}$ & $\beta$ values & $m_{dm}$ [$\wisk{{\rm M_\odot}}$] & $m_*$ [$\wisk{{\rm M_\odot}}$] &\multicolumn{2}{c}{Max softening length [pc]\tnote{a}} \\ & & & & & & & darm matter & stars\\ \hline Halo As & $2.0 \times 10^8$ & 0.15 & 6 & -0.5, 0, 0.5, 1 & 100 & 1 & 10 & 1.72\\ Halo Bs & $2.6\times 10^8$ & 0.15 & 6 & -0.5, 0, 0.5, 1 & 100 & 1 & 10 & 1.72\\ Halo B6 & $2.7\times 10^9$ & 0.15 & 6 & -0.5, 0, 0.5, 1 & 1000 & 10 & 21.6 & 8\\ Halo B7 & $2.7\times 10^9$ & 0.15 & 7 & -0.5, 0, 0.5, 1 & 1000 & 10 & 21.6 & 8\\ Halo D6 & $8.8\times 10^9$ & 0.15 & 6 & -0.5, 0, 0.3, 1 & 1000 & 10 & 21.6 & 8\\ Halo D7 & $8.8\times 10^9$ & 0.15 & 7 & -0.5, 0, 0.7, 1 & 1000& 10 & 21.6 & 8\\ Halo D7r & $8.8\times 10^9$ & \makecell{0.025, 0.08, 0.3} & 7 & 0 & 1000 & 10 & 21.6 & 8\\ Halo G & $7.0\times 10^9$ & 0.15 & 6 & 0 & 1000 & 10 & 21.6 & 8\\ \hline \end{tabular} \begin{tablenotes} \item[] (a) The softening length is given in physical units at $z=9$. Dark matter force softening lengths are set to 1.5\% the grid cell side length and held constant in comoving units for $z>9$ and constant in physical units subsequently. Similar scaling applies to the force softening of the stars. \end{tablenotes} \end{threeparttable} \end{table*} \section{Simulation Results and Modelling of Stellar Halo Profiles}\label{sec:results} In this section we present the analysis of the simulations results, starting with the evolution of the dark matter halo profiles and the merger histories of our isolated dwarf galaxies (\S~\ref{ssec:merger}). Next we study the spherically averaged density profiles of the stars in each halo (\S~\ref{ssec:profiles}), and based on the simulation results we propose an empirical, but physically-motivated, model reproducing the profiles of the stellar haloes extracted from the simulations (\S~\ref{ssec:model}). \subsection{Evolution of the Dark Matter Profile and Merger History} \label{ssec:merger} We start by analyzing the evolution of the dark matter properties of the isolated haloes in our sample from the time of formation to $z=0$. All the simulations share a similar qualitative evolution illustrated in Fig.~\ref{fig:mergerhist}, showing the mass growth histories of all sub-haloes in Halo~B (left) and Halo~D (right). The thick solid black line shows the mass of the main central halo as a function of the scale parameter $a=(1+z)^{-1}$. The colored solid lines shown the evolution of the mass of the satellites. The colors refer to the circular velocity of the satellites as shown in the colorbar. The dotted blue line shows the evolution of the Jeans mass of the IGM assuming $T_{IGM}=10^4$~K after reionization, to emphasize that in these two haloes the satellites have masses that remain always below the Jeans mass in the IGM. Hence, gas accretion and star formation in the haloes merging with the central host is sterilized after reionization \citep{Efstathiou:92b,Gnedin00b} (but see \citet[][]{Ricotti2009, Jeonetal:2017, Reyetal:2019, Reyetal:2020} for models and numerical studies in which late-time -- after reionization -- gas accretion can take place even in UF dwarf galaxies). \begin{figure*} \centering \includegraphics[width=0.49\textwidth]{figs/Figure_halohistoryB.png} \includegraphics[width=0.49\textwidth]{figs/Figure_halohistoryD.png} \caption{Growth and merger histories of Halo~B (left) and Halo~D (right). The thick solid black lines show the mass of the main (central) halo as a function of the scale parameter $a=1/(1+z)$. The colored lines show the halo mass of the satellites of the main halo (haloes that are or have been within the virial radius of the halo), colored according to their maximum circular velocity, as shown by the colorbar. The dotted blue line shows the halo mass, $M_{Jeans,IGM}$, corresponding to virial temperature $T_{vir}=10^4$~K, which is roughly considered the critical mass for atomic cooling haloes and/or haloes in which star formation can be suppressed after reionization of the IGM at $z_{rei} \sim 6-7$. The main Halo~B and Halo~D have masses $>M_{Jeans,IGM}$, hence they are expected to continue forming stars after reionization and the central galaxy will grow mostly after the epoch of reionization. On the contrary, the satellites of all the haloes considered in this study (with $M_{halo}< 10^{10}$~M$_\odot$), have maximum masses that never exceed $M_{jeans,IGM}$, hence these satellite haloes form all their stars before the epoch of reionization in haloes that are below the atomic cooling critical mass. We typically refer to these dwarf galaxies as pre-reionization fossil galaxies, which have been identified with the UF dwarfs in the Local Group.} \label{fig:mergerhist} \end{figure*} The merger histories shown in Fig.~\ref{fig:mergerhist} motivate our assumption that star formation in sub-haloes merging and contributing to the stellar haloes of the dwarf galaxies in the mass range simulated in this study, can only take place before the epoch of reionization. Therefore the stellar haloes in these dwarfs are dominated by stars forming at redshifts $z>6-7$ (unless the stellar halo is contaminated by stars belonging to the central galaxy that instead can continue to form stars after reionization). Fig.~\ref{fig:mergerhist} also shows that in these small mass haloes evolving in relative isolation after the epoch of reionization, the stellar haloes and the dark matter haloes grow over time due to minor mergers ({\it i.e}, satellite to host mass ratios of $1:10$ or smaller). Fig.~\ref{fig:halogrowth} shows the evolution of the dark matter density profile of Halo~A in units of the critical density at $z=0$. The shape of the inner density profile is set at high-redshift, while the outer density profile is assembled later as the halo radius increases with time due to the expansion of the universe ({\it i.e.}, the decreasing mean density of the universe). Hence, the scale radius $r_s$ of the halo remains constant, while the virial radius $r_{vir}$ and the concentration of the halo $c \equiv r_{vir}/r_s$ both increase with time. This evolution of the density profile can be understood qualitatively in terms of "cosmological secondary infall", and has been explored in detail in several previous studies \citep{Bertschinger:85,Bullock00,Ricotti:03,Ricotti2009,DiemerK2013,DiemerK2014}. \begin{figure} \centering \includegraphics[width=0.35\textwidth,angle=270]{figs/Figure_denA.pdf} \caption{Evolution as a function of redshift (at $z=10, 6, 3, 1, 0$) of the density profile of Halo~A at level 7 resolution (dark matter particle mass 1000~M$_\odot$). Profiles are normalized by the critical density at $z=0$. This halo is representative of the typical evolution of the density profile of an isolated small mass halo: the shape of the inner parts of the density profile is set at high-redshift, while the outer parts of the halo profile are assembled at later time when the total mass and virial radius increase as a result of the expansion of the universe and the decreasing mean density of the IGM.} \label{fig:halogrowth} \end{figure} \subsection{Ghostly Stellar Haloes and their Density Profiles} \label{ssec:profiles} Snapshots showing the evolution of the surface density of stars in Halo~D is shown in Fig.~\ref{fig:images}. The images highlight the presence of satellites, their destruction by tidal effects, as well as the growth and triaxiality of the underlying smoother stellar halo produced by the debris of stripped satellite galaxies. The six snapshots shown in the figure refer to run Halo D6 in Table~\ref{tab:sims}, with total mass at $z=0$ $M_{halo}=8.8 \times 10^{9}$~\wisk{{\rm M_\odot}}, $\beta=-0.5$, $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\ and mass of dark matter particles and stars of $1000$~\wisk{{\rm M_\odot}}\ and $10$~\wisk{{\rm M_\odot}}, respectively. The negative value of $\beta$ for this simulation is such that small mass haloes with masses $>10^6$~\wisk{{\rm M_\odot}}\ are quite rich in stars, showing therefore a tumultuous stellar accretion history including tidal features such as streams, arcs, and rings superposed on a smoother halo profile. The full movie showing more clearly these features is available in the supplementary material. \begin{figure*} \centering \includegraphics[width=0.33\textwidth]{figs/frame_z7.png} \includegraphics[width=0.33\textwidth]{figs/frame_z2.8.png} \includegraphics[width=0.33\textwidth]{figs/frame_z1.8.png}\\ \includegraphics[width=0.33\textwidth]{figs/frame_z0.9.png} \includegraphics[width=0.33\textwidth]{figs/frame_z0.4.png} \includegraphics[width=0.33\textwidth]{figs/frame_z0.png} \caption{Snapshots from a movie of Halo~D with $\beta=-0.5$ and $M_{cut}=10^6$~M$_\odot$, rendering stars (with masses of 10~M$_\odot$) in a (100 kpc)$^3$ comoving volume. Each panel from left to right refers to redshifts $z=7, 2.8, 1.8, 0.9, 0.4, 0$. The first snapshot, at $z=7$, shows the initial conditions in which each dark matter halo is populated with a stellar spheroid with an exponential profile and scale radius $r_{eff}=0.15r_{vir}$. The other snapshots show the accretion and tidal stripping of satellites including some that survive to $z=0$ and others that contribute to the growth of the smoother stellar halo component.} \label{fig:images} \end{figure*} Fig.~\ref{fig:profiles} shows the projected surface density profiles of stars [$\wisk{{\rm M_\odot}}$ kpc$^{-2}$] at $z=0$ as a function of distance from the galaxy center for the main set of simulated stellar haloes in Table~\ref{tab:sims}. The solid lines in each panel show the spherically averaged surface density profiles of the stars for a fixed halo mass and $M_{cut}$, changing the values of $\beta$, as shown in the legend. The different panels refer to a different halo mass and cutoff mass as follows: the top panels refer to the most massive halo in our sample (Halo~D) with $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\ (top left) and $M_{cut}=10^7$~\wisk{{\rm M_\odot}}\ (top right); the middle panels refer to the medium mass halo (Halo~B) with $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\ (middle left) and $M_{cut}=10^7$~\wisk{{\rm M_\odot}}\ (middle right); the bottom panels refer to the smallest mass haloes (Halo~Bs, bottom left and Halo~As, bottom right), both with $M_{cut}=10^6$~\wisk{{\rm M_\odot}}. We show the average of the projected surface densities in the x-, y- and z- directions and we do not remove the surviving satellites from the profile (producing the peaks in the smoother profile especially at large galactocentric distances). The thick solid lines show the profiles excluding the stars in the main progenitor halo\footnote{For Halo~D, in which the central halo merges at high-z with a comparable mass halo, we exclude the the two most massive haloes from the profile.}, while the thin solid lines show the profiles including all the stars. The thin dotted lines show fits to each halo profile (excluding the central most massive halo profile) using the fitting function: \begin{equation} \Sigma(R)=\Sigma_0 \left(1+ \frac{1}{\alpha}\frac{R}{R_0} \right)^{-\alpha}. \label{eq:fits} \end{equation} This form of the fitting function is convenient because it converges to an exponential profile [{\it i.e.}, $\Sigma(R)=\Sigma_0 \exp{(-R/R_0)}$] in the limit $\alpha \rightarrow \infty$. \begin{figure*} \centering \includegraphics[width=0.49\textwidth]{figs/Figure_profD6n.png} \includegraphics[width=0.49\textwidth]{figs/Figure_profD7n.png}\\ \includegraphics[width=0.49\textwidth]{figs/Figure_profB6n.png} \includegraphics[width=0.49\textwidth]{figs/Figure_profB7n.png}\\ \includegraphics[width=0.49\textwidth]{figs/Figure_profBs6n.png} \includegraphics[width=0.49\textwidth]{figs/Figure_profAs6n.png} \caption{Each panel shows the surface density profile of the stars at redshift $z=0$, $\Sigma_M(R)$, as a function of projected radius for different values of $\beta$ (see the legend). The thin solid lines show the azimuthally averaged surface density profiles for the simulated haloes including all stars. The thick solid lines show the same quantity but for the stellar halo stars only ({\it i.e.}, after removing the stars belonging to central galaxy formed at $z \ge 7$). The thin dotted lines show a fit to the simulation profiles with a generalized exponential function (see text). Each panel, as indicated in its title, refers to haloes with different dark matter masses or assuming different cutoff mass ($M_{cut}$) for the luminous galaxies at $z=7$. Halo As does not have a detectable ghostly stellar halo as the stars from the central galaxy dominate the surface density at all radii.} \label{fig:profiles} \end{figure*} The surface density profile of the most massive progenitor retains the exponential profile set in the initial conditions. Since the main haloes we are considering in this study are sufficiently massive to continue accreting gas and forming stars after reionization, we expect that the galaxy in the most massive halo progenitor ({\it i.e.}, the central galaxy) will grow its stellar mass over time, producing an exponential profile with total mass and scale radius that is larger than its initial value at $z=7$. For this reason we decompose the simulated stellar profiles into two components: the exponential central galaxy profile and the extended stellar halo formed by the debris of all the other satellites. When fitting the observed stellar profiles in isolated dwarfs using our models, we fit simultaneously the exponential profile of the central galaxy and the stellar halo using the model described in \S~\ref{ssec:model}, which excludes the central galaxy contribution. Table~\ref{tab:fits} shows the fitting parameters $\Sigma_0$, $R_0$ and $\alpha$ in equation~(\ref{eq:fits}) for the simulations in Fig.~\ref{fig:profiles}. The large values of $\alpha$ in the smallest mass haloes (Halo~Bs and Halo~A), indicate that their stellar haloes have surface density profiles that are very well described by an exponential profile, similarly to the profiles of the central galaxies but with larger scale radii. We will show later that the stellar halo profiles in more massive haloes (Halo~D and Halo~B) deviate from single exponential profiles, but can be understood as the sum of several exponential profiles with different scale radii. The dependence of the profile shape on $\beta$ and $M_{cut}$ observed in Fig.~\ref{fig:profiles}, suggests that stars stripped from small mass haloes are preferentially deposited in the outer parts of the profile, and vice versa. \begin{table} \caption{Table of fitting parameters. If the best fit parameter for $\alpha$ is $>500$ we adopt $\alpha=500$.} \label{tab:fits} \begin{tabular}{lcc|ccc} \hline Halo ID & $\log{\left(\frac{M_{cut}}{M_{\odot}}\right)}$ & $\beta$ & $\log{\left(\frac{\Sigma_0}{\rm M_\odot kpc^{-2}}\right)}$ & $\frac{R_0}{\rm {kpc}}$ & $\alpha$\\ & & & & & \\ \hline & & -0.5& 5.07 & 0.27 & 500\\ Halo As & 6 & 0.0 & 4.51 & 0.26 & 500\\ & & 0.5 & 3.77 & 0.28 & 500\\ & & 1.0 & 3.12 & 0.27 & 500\\ \hline & & -0.5& 4.90 & 0.58 & 500\\ Halo Bs & 6 & 0.0 & 4.01 & 0.61 & 500\\ & & 0.5 & 3.15 & 0.61 & 500\\ & & 1.0 & 2.23 & 0.65 & 500\\ \hline & & -0.5& 5.37 & 0.77 & 2.88 \\ Halo B & 6 & 0.0 & 4.70 & 0.81 & 3.35 \\ & & 0.5 & 3.99 & 1.07 & 4.63 \\ & & 1.0 & 3.56 & 0.95 & 5.02 \\ \hline & & -0.5& 5.88 & 0.74 & 2.58 \\ Halo D & 6 & 0.0 & 5.33 & 0.83 & 3.14 \\ & & 0.3 & 5.04 & 0.95 & 3.62 \\ & & 1.0 & 4.71 & 0.93 & 4.48 \\ \hline & & -0.5& 4.65 & 0.93 & 4.74 \\ Halo B & 7 & 0.0 & 4.19 & 1.01 & 5.34 \\ & & 0.5 & 3.73 & 1.12 & 6.56 \\ & & 1.0 & 3.28 & 1.20 & 7.89 \\ \hline & & -0.5 & 5.29 & 1.23 & 6.06 \\ Halo D & 7 & 0.0 & 5.00 & 1.23 & 6.06 \\ & & 0.7 & 4.70 & 1.12 & 5.46 \\ & & 1.0 & 4.54 & 1.27 & 7.38 \\ \hline \end{tabular} \end{table} This is more clearly demonstrated in Fig.~\ref{fig:bins} (left), showing the stellar surface density profile of Halo~D (with $\beta=0$ and $M_{cut}=10^6$~\wisk{{\rm M_\odot}}), for a subset of stars coming from satellite haloes in the mass range $\log M$ to $\log M + \Delta \log M$, for different values of $\log M$ as shown in the legend. The black solid line shows the profile of stars in the central galaxy (the two most massive haloes) and the dotted line shows the stellar halo. The profiles of stars accreted from satellites with dark matter masses $3 \times 10^7$~\wisk{{\rm M_\odot}}\ $< M <10^8$~\wisk{{\rm M_\odot}}\ are shown with a blue solid line, $10^7$~\wisk{{\rm M_\odot}}\ $< M < 3 \times 10^7$~\wisk{{\rm M_\odot}}\ with a red solid line, $3 \times 10^6$~\wisk{{\rm M_\odot}}\ $< M < 10^7$~\wisk{{\rm M_\odot}}\ with a purple solid line, and $10^6$~\wisk{{\rm M_\odot}}\ $< M < 3 \times 10^6$~\wisk{{\rm M_\odot}}\ with a green solid line. The figure clearly shows that the outer parts of the stellar halo are contributed from stars stripped from smallest mass satellites: each mass bin produces a profile that can be approximated by an exponential with scale radius $R_0$ that is larger for smaller dark matter halo masses of the accreting satellites. The right panel in Fig.~\ref{fig:bins} shows the scale radius $R_0$ as a function of the dark matter mass log bin of the accreted satellites. The symbols show $R_0 \times (8.8\times 10^9~M_\odot/M_{host})^{0.2}$ as a function of $M_{sat}/M_{host}$ for Halo~D (triangles) and Halo B (squares) for simulations with $\beta=0$ and $M_{cut}=10^6$~\wisk{{\rm M_\odot}}. The lines show the power law fit to the points for Halo D and the color of the symbols and lines refer to $R_0$ obtained fitting the profiles with an exponential profile (blue) and with a generalized power-law profile [equation~(\ref{eq:fits})] with $\alpha=5$ (orange). Comparing the points for Halo D and Halo B we observe that the scale radius $R_0$ depends on the host halo dark matter mass as a power-law with slope slightly shallower than the expected $1/3$ slope: $R_0 \propto M_{host}^{0.2}$. \begin{figure*} \centering \includegraphics[width=0.49\textwidth]{figs/Figure_binsD6.png} \includegraphics[width=0.49\textwidth]{figs/Figure_scale_radius.png} \caption{{\it (Left)}. Decomposition of the surface density profile of the stars in Halo~D (for $\beta=0$ and $M_{cut}=10^6$~\wisk{{\rm M_\odot}}), according to the $z=7$ dark matter mass of the satellites they initially belonged to. The black solid line shows the profile of stars in the central galaxy (the two most massive accreted haloes) and the dotted line shows the stellar halo. The stellar halo is made of several components, each described by a nearly exponential profile with different scale radii $R_0$ shown by the colored solid lines (see legend). The profiles of stars accreted from satellites with dark matter masses $3 \times 10^7<M<10^8$~\wisk{{\rm M_\odot}}\ are shown with a blue solid line, $10^7<M<3 \times 10^7$~\wisk{{\rm M_\odot}}\ with a red line, $3 \times 10^6<M<10^7$~\wisk{{\rm M_\odot}}\ with a purple line, and $10^6<M<3 \times 10^6$~\wisk{{\rm M_\odot}}\ with a green line. {\it (Right).} The scale radius $R_0$ of the profile for each of the halo components (as in the left panel) is shown as a function of the dark matter mass log bin of the accreted satellite (normalized to the host halo mass). The triangles refer to Halo D and the squares to Halo B, while the color coding refer to fits of the fundamental profile with an exponential (blue) and with a generalized power-law profile with $\alpha=5$ (orange). The lines show power law fits to the points for Halo~D. }\label{fig:bins} \end{figure*} Fitting the fundamental bin profiles with an exponential function we found the following power-law fits to the scale radius $R_0$ as a function of the satellite mass $M_{sat}$ and the host halo mass $M_{host}$: \begin{equation} R_0^{\rm (exp)}=0.07~{\rm kpc}\left(\frac{M_{host}}{8.8\times 10^9~M_\odot}\right)^{0.2}\left(\frac{M_{sat}}{M_{host}}\right)^{-0.62}. \end{equation} Fitting the fundamental bin profiles with a generalized power-law profile with $\alpha=5$ we find: \begin{equation} R_0^{\rm (pow)}=0.137~{\rm kpc}\left(\frac{M_{host}}{8.8\times 10^9~M_\odot}\right)^{0.2}\left(\frac{M_{sat}}{M_{host}}\right)^{-0.4}. \end{equation} This quantitative fitting of $R_0$ as a function of the mass of the satellites, $M_{sat}$, will be the foundation to build our halo model in \S~\ref{ssec:model}. We speculate that the physical reason for the dependence of the scale radius on the ratio of the satellite to host halo mass is due to the interplay of dynamical friction and tidal destruction. Mergers with mass ratios closer to unity are rapidly spiraling in (in few crossing times), depositing most of the dark matter and stars in the inner parts of the haloes. Vice versa, small mass satellites (smaller mass ratio mergers) orbit the galaxies for several crossing times before being completely tidally stripped, depositing the stars further out. Finally, the dependence of the profiles on $\epsilon_0$ in equation~(\ref{eq:fstar}) is not shown in the panels because it is trivial: the whole surface density profile is simply proportional to $\epsilon_0$. \subsubsection{Dependence on the compactness of satellites and Cosmic Variance}\label{ssec:reff} The left panel in Fig.~\ref{fig:profiles1} shows the surface density profile of stars in Halo~D for simulations with $\beta=0$, $M_{cut}=10^7$~M$_\odot$, and different values of the effective radius of the stars in the initial conditions at $z=7$. As explained in \S~\ref{sec:sim}, the stars in each dark matter halo at $z=7$ have an exponential profile with scale radius $r_{eff}$ proportional to the virial radius $r_{vir}$ as determined by the parameter $\eta$. We adopted a fiducial value $\eta=0.15$ at $z=7$. The different lines in the left panel of Fig.~\ref{fig:profiles1} refer to $\eta=0.3, 0.15, 0.08, 0.025$, as shown in the legend. This comparison shows that the compactness of merging galaxies does not have a strong effect on the surface density profile at small to intermediate radii ({\it i.e.}, at radii at which observations are either available or feasible in the near future using stellar counts). Instead, the outer parts of the stellar halo at $R>20$~kpc, where the surface brightness is much lower than what is testable with observations, differ depending on $r_{eff}$ in the expected direction according to our qualitative model: if the stars in the accreting satellites are more concentrated ({\it e.g.}, accreted globular clusters) then less stars are deposited by tidal stripping in the outer stellar halo. Vice versa, if the stars are more diffuse in the accreted dwarf galaxy ({\it e.g.}, accreted UF dwarf galaxies), more stars are stripped in the outer regions of the stellar halo and the outer profile has higher surface density. We also note that the number of surviving satellites depends on the compactness of the stellar component in the satellites, as expected. \begin{figure*} \centering \includegraphics[width=0.48\textwidth]{figs/Figure_profD7radn.png} \includegraphics[width=0.48\textwidth]{figs/Figure_profG7n.png} \caption{{\it (Left)}. Same as Fig.~\ref{fig:profiles} but for Halo~D with $\beta=0$ and $M_{cut}=10^7$~\wisk{{\rm M_\odot}}\ and different values of r$_{eff}$ as in the legend. This comparison shows that at small to intermediate radii ({\it i.e.}, at radii with available observations) the assumed compactness of merging galaxies does not have a strong effect on the surface density profile. The outer parts of the halo ($R>20$~kpc), however, with surface brightness much lower than what accessible to observations, differ depending on $r_{eff}$. {\it (Right)}. Comparison between Halo~D (mass $8.8 \times 10^9$~\wisk{{\rm M_\odot}}) and Halo~G (mass $7.0 \times 10^9$~\wisk{{\rm M_\odot}}) with $\beta=0$ and $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\ shows that for haloes of this mass the effect of cosmic variance is negligible.} \label{fig:profiles1} \end{figure*} The right panel in Fig.~\ref{fig:profiles1} shows the comparison between two haloes with similar mass at $z=0$ to test cosmic variance and variations of the merger history: Halo~D (mass $8.8 \times 10^9$~\wisk{{\rm M_\odot}}) and Halo~G (mass $7.0 \times 10^9$~\wisk{{\rm M_\odot}}) assuming $\beta=0$ and $M_{cut}=10^7$~\wisk{{\rm M_\odot}}. This result suggests that the stellar halo profiles are nearly indistinguishable in dark matter haloes with masses $>10^9-10^{10}$~\wisk{{\rm M_\odot}}. Clearly a larger sample is necessary to conclude that the effect of cosmic variance is negligible in this mass range, but this result already gives an indication of the possible small amplitude of the scatter. However, in our simulations we assumed a monotonic mass to light ratio of galaxies at $z=7$ with no scatter and 100\% occupancy (no dark haloes). This assumption is clearly simplistic, hence we expect the variance of properties in our test to be underestimated. For Halo~As and Halo~Bs that have a mass $\sim 2 \times 10^8$~\wisk{{\rm M_\odot}}\ and $<10$ luminous satellites the variance is very large (see bottom panels in Fig.~\ref{fig:profiles}). Halo~As has 2 satellites and does not have a significant stellar halo, while Halo~Bs has 6 satellites and the stellar halo can be detected if $f_* > 10^{-3}$ in equation~(\ref{eq:fstar}). \subsection{Modelling the Halo Profile}\label{ssec:model} In this section we present a model of the surface density profiles of stellar haloes in the simulations following the findings, discussed in \S~\ref{ssec:profiles}, that the profile can be understood as the sum of nearly exponential profiles (or generalized power-law profiles) with scale radii determined by the mass of the satellite building it. Namely, with small mass haloes depositing most of their stars further out in the stellar halo, and vice versa. We therefore write the surface density profile in the model as sum (or an integral in the continuum limit) of the surface density profiles contributed by each log mass bin of satellites building the halo: \begin{equation} \Sigma_M(R,M_{host}) = \int_{M_{cut}}^{M_{max}} \Sigma_{bins}(R,M_{host},M_{sat}) d \ln M_{sat}, \label{eq:model} \end{equation} where the limits of integration are $M_{cut}$ for the lower limit and the maximum mass of the accreted satellite excluding the host halo, $M_{max}$, for the upper limit. For the fundamental shape of the surface density profiles in each mass bin, we can use an exponential profile: \begin{equation} \Sigma^{\rm (exp)}_{bins}(R,R_0)=\frac{dM_*}{d\ln M_{sat}}\frac{1}{2\pi R_0^2}\exp{\left(-\frac{R}{R_0}\right)} \label{eq:exprof} \end{equation} or a generalized power-law profile with exponent $\alpha$: \begin{equation} \Sigma^{\rm (pow)}_{bins}(R,R_0)=\frac{dM_*}{d \ln M_{sat}}\frac{{\cal A}}{2\pi(\alpha R_0)^2}\left(1+\frac{1}{\alpha}\frac{R}{R_0}\right)^{-\alpha}, \end{equation} that in the limit $\alpha \rightarrow \infty$ converges to equation~(\ref{eq:exprof}). The normalization constant is ${\cal A} \equiv [(\alpha-2)^{-1}-(\alpha-1)^{-1}]^{-1}$. Here, $dM_*/d \log M_{sat}$ is the mass in stars contributed by satellites with masses between $\log M_{sat}$ and $\log M_{sat} + d \log M_{sat}$: \begin{equation} \frac{dM_*}{d \ln M_{sat}} (M_{host},M_{sat})=f_* M_{sat} \frac{dN_{sat}}{d\ln M_{sat}}, \end{equation} where $dN_{sat}/d\log M_{sat}$ is the halo mass function of the merging satellites. Fig.~\ref{fig:massfunc} shows cumulative dark matter mass function of progenitors masses at $z=7$ merging to form the $z=0$ Halo~D, Halo~B, Halo~Bs and Halo~As (see legend). The solid lines show power-law fits to the mass function for the two most massive haloes: Halo~D, $N_{sat}(>M)=309 (M/10^6~M_{\odot})^{-1.05}$, and Halo~B $N_{sat}(>M)=91 (M/10^6~M_{\odot})^{-1.29}$. The number of satellites for Halo~Bs and Halo~As are 6 and 2, respectively. In the analytic model we adopt a single power law form for all the halo masses that is a good fit to Halo~D and Halo~B: $N_{sat}(>M)=N_{tot}(M/10^6~M_{\odot})^{-\alpha}$, with $\alpha=1.2$ and $N_{tot}=76 (M_{host}/2.7\times 10^9 M_\odot)$, reproducing the total number of satellites in Halo~D. The relationship, \begin{equation} \frac{dN_{sat}}{d \ln M_{sat}}=\alpha N_{sat}(>M) \approx 1.2 N_{tot}\left(\frac{M_{sat}}{10^6~M_\odot}\right)^{-1.2}, \end{equation} closes the system of equations in our model. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{figs/Figure_MassFunc.png} \caption{The points show the cumulative dark matter mass function ($N(>M)$) of progenitor masses at $z=7$, merging to form the $z=0$ Halo~D, Halo~B, Halo~Bs and Halo~As (see the legend). The solid lines show power-law fits to the mass functions for the two most massive haloes. Halo~Bs has only 6 satellites with $z=7$ masses $>10^6$~M$_\odot$, while Halo~As has two.}\label{fig:massfunc} \end{figure} Next, we test whether the model in equation~(\ref{eq:model}), constructed dissecting the simulation results, actually reproduces the stellar haloes in all the simulations in Table~\ref{tab:sims}. In Fig.~\ref{fig:model}, we show the ghostly halo model (dotted lines) compared to fits (see equation~[\ref{eq:fits}] and Table~\ref{tab:fits}) to the simulation results (solid lines) for different values of $\beta$ as shown in the legend. From left to right, each column refer to haloes with increasing mass at $z=0$: Halo~Bs of mass $2.6\times 10^8$~\wisk{{\rm M_\odot}}\ (top left panel), Halo~As of mass $2.0 \times 10^8$~\wisk{{\rm M_\odot}}\ (bottom left panel), Halo~B of mass $2.7 \times 10^9$~\wisk{{\rm M_\odot}}\ (center panels), Halo~D of mass $8.8 \times 10^9$~\wisk{{\rm M_\odot}}\ (right panels). The center and right panels in the top and bottom rows refer to haloes with $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\ and $M_{cut}=10^7$~\wisk{{\rm M_\odot}}, respectively, while the model/simulations in left panels have $M_{cut}=10^6$~\wisk{{\rm M_\odot}}. Here we used the generalized profile with $\alpha=5$ for the fundamental surface density profiles for each mass bin in equation~(\ref{eq:model}), but assuming exponential profiles produces only slightly worse agreement at small radii between the model and the fits to the simulated halo profiles. This model is empirical but physically motivated and, as illustrated in Fig.~\ref{fig:model}, it reproduces the simulation results accurately. \begin{figure*} \centering \includegraphics[trim=0 0 0 0, clip, width=2.0\columnwidth]{figs/Figure_model_new.png} \caption{Ghostly stellar halo model (dotted lines) compared to fits to the simulation results (solid lines) for different values of $\beta$ as shown by the legend. In the top row, models and fits to the simulations assume $M_{cut}=10^6$~M$_\odot$ and from left to right, each column shows haloes of increasing mass at $z=0$: Halo~Bs of mass $2.6\times 10^8$~\wisk{{\rm M_\odot}}\ (top-left), Halo~B of mass $2.7 \times 10^9$~\wisk{{\rm M_\odot}}\ (top-center), and Halo~D of mass $8.8 \times 10^9$~\wisk{{\rm M_\odot}}\ (top-right). The panels in the bottom row refer to Halo~As ($2.0\times 10^8$~\wisk{{\rm M_\odot}}, bottom-left) with $M_{cut}=10^6$~\wisk{{\rm M_\odot}}\, Halo~B (bottom-middle) and Halo~D (bottom-right) both assuming $M_{cut}=10^7$~\wisk{{\rm M_\odot}}. Note that for the smallest mass halo (Halo~As) an extended stellar halo does not exist, and it exists only for $M_{cut}=10^6$~M$_\odot$ in Halo~Bs.} \label{fig:model} \end{figure*} In the next section, armed with this model for the surface density profile of stellar haloes in dwarf galaxies, we apply it to fit observed data on the stellar surface density profiles of six Local Group galaxies, and consequently derive the model's free parameters. Finally, for the sake of comparing our results to published studies based on halo-matching methods, we are interested in the relationship between the dark matter halo masses at $z=7$ of progenitor satellites and the maximum mass such satellites can reach before starting to lose mass while merging with the main host halo. Since the satellites in our simulations form all their stars before the epoch of reionization (see Fig.~\ref{fig:mergerhist}), their stellar masses remain constant but their dark matter masses generally increase from the value at $z=7$. Hence, $f_*(z)\equiv M_*(z=7)/M_{dm}(z)$ can decrease with respect to the initial value at $z=7$. The left panels in Fig.~\ref{fig:mass_mass} shows the cumulative number of satellites in Halo~D (orange lines) and Halo~B (red lines) at $z=0$ as a function of their dark matter mass at $z=7$ (solid lines) and as a function of their maximum dark matter mass, $M_{dm}(max)$ (triangles). The curves illustrate how the masses of dark matter haloes increase from $z=7$ to the time when they merge and start to lose mass. The right panel in Fig.~\ref{fig:mass_mass} shows the maximum dark matter mass of satellites, $M_{dm}(max)$ as a function of $M_{dm}(z=7)$ for the same haloes as in the left panel, illustrated in two different ways: i) The circles show $M_{dm}(max)$ as a function of $M_{dm}(z=7)$ for each subhalo in Halo~D and Halo~B. The color coding of the circles refers to the redshift at which the halo mass reaches its maximum value, as shown by the colorbar. ii) The orange and red triangles show the relationship between $M_{dm}(max)$ and $M_{dm}(z=7)$ by matching the two cumulative distributions in the left panel with the same $N(>M_{dm})$, for Halo~D and Halo~B, respectively. The solid lines show power-law fits to the triangle data points for the two haloes. For comparison, the dotted line shows $M_{dm}(max)=M_{dm}(z=7)$. Since the power law fits to both haloes are the same within the statistical error, we can therefore use the power law fit, \begin{equation} M_{dm}(max)=3.55\times 10^7~M_\odot \left(\frac{M_{dm}(z=7)}{10^7~M_\odot}\right)^{1.4},\label{eq:Mmax} \end{equation} to convert (statistically) $M_{dm}(z=7)$ into $M_{dm}(max)$. \begin{figure*} \centering \includegraphics[width=\textwidth]{figs/Figure_max_mass.png} \caption{{\it (Left).} Cumulative number of satellites in Halo~D (orange lines) and Halo~B (red lines) at $z-0$ as a function of their dark matter mass at $z=7$, $M_{dm}(z=7)$ (solid lines) and their maximum dark matter mass, $M_{dm}(max)$ (triangles). {\it (Right).} The circles show the maximum dark matter mass of satellites, $M_{dm}(max)$ as a function of $M_{dm}(z=7)$ for each subhalo in Halo~D and Halo~B. The triangles show the relationship between $M_{dm}(max)$ and $M_{dm}(z=7)$ by matching the two cumulative distribution values with the same $N(>M_{dm})$, shown in the left panel. The solid lines show the power-law fits to the data points for the two haloes. The dotted line show $M_{dm}(max)=M_{dm}(z=7)$ for comparison. The color bar on the right refer to the redshift at which $M_{dm}$ reaches its maximum value.} \label{fig:mass_mass} \end{figure*} In summary, since all the satellites haloes have maximum dark matter mass below the threshold for gas accretion and star formation due to reionization of the IGM, we can assume that in this halo mass range $M_*(max)= M_*(z=7)$: all the stars in these dwarfs galaxies have formed before reionization, consistently with them being UF dwarfs, fossils of the first galaxies \citep{BovillR2009}. The relationship between $M_*$ and the maximum dark matter halo mass of satellite haloes will be useful to compare our results in the next section to published works based on sophisticated halo-matching methods \citep[{\it e.g.},][]{Behroozi2013, Nadleretal:2020}. \section{Constraints on the Star Formation Efficiency in the First Galaxies}\label{sec:constraints} \citet{KangR:2019} have compiled a list of six dwarf galaxies (Leo~T, Leo~A, WLM, IC~1613, IC~10, and NGC~6822) located in the Local Group, but outside the virial radii of the Milky Way and Andromeda, showing robust or tentative evidence of the existence of an extended stellar halo. In the collected observational data sets, radial density profiles of stars are provided out to several half-light radii from the central galaxy. The stellar haloes are found by star counts, and usually only the red giants (RGs) are sufficiently bright to be detected in deep colour–magnitude diagrams (CMD). Since the data are in terms of number of RG stars selected around the tip of the RG branch, this observed number needs to be converted into a stellar mass at zero-age main sequence (at the time of the galaxy formation) that in our case coincides with redshift $z \sim 7$. We refer to \cite{KangR:2019} for details on the conversion using synthetic CMDs, assuming stellar evolutionary tracks appropriate for dwarf galaxies that formed all their stars before reionization. Here we use the data points for each galaxy profile from \citet{KangR:2019}, including the conversion between number of RG stars and stellar mass at formation (see their Table~3 for stellar halo parameters). Estimates of the total dark matter halo masses of the six observed dwarfs are also derived in \citet{KangR:2019} (see their Table~4). For each dwarf galaxy, estimates of the total dark matter halo mass was derived taking the average of the masses obtained using three different independent approaches: i) Estimates found in the literature, when available. But the discrepancy between different authors can be up to one order of magnitude; ii) A method based on the knowledge of the stellar mass of the dwarf galaxy at $z = 0$; iii) A method based on the knowledge of the half-light radius. We refer to the original paper for details. \begin{figure*} \centering \includegraphics[width=\textwidth]{figs/ngc6822_fit3.png} \caption{Fit of the ghostly halo model presented in this work to the surface density profile data for NGC~6822. {\it (Top left.)} Surface density profile of NGC~6822 (points), best fit exponential profile of the galaxy (solid blue line), best fit ghostly halo model (dotted line), and total galaxy plus halo best fit model of surface density profile (solid orange line). {\it (Top right.)} Confidence contour plots of the fitting parameters $\beta$ and $\epsilon_0$ (red 68\%, and blue 95\% confidence). {\it (Bottom left.)} Confidence contour plots for the fitting parameters $M_{halo}$ and $\beta$. {\it (Bottom right.)} Confidence contour plots for the fitting parameters $M_{halo}$ and $\epsilon_0$.} \label{fig:ngc6822} \end{figure*} The free parameters in our ghostly halo model are four. Three of them: $\beta$, $\epsilon_0$ and $M_{cut}$, describe the star formation efficiency [see equation~(\ref{eq:fstar})] in primordial galaxies before the epoch of reionization at $z\sim 7$. The other free parameter is the host halo dark matter mass, $M_{halo}$, at $z=0$. In addition to the four free parameters describing the ghostly stellar haloes, we need to separate the halo stars from the stars belonging to the central galaxy. To do this we fit the central galaxy surface brightness with an exponential profile: $\Sigma^{gal}=\Sigma_0^{gal}\exp{(-R/R_{exp}^{gal})}$. Hence, we have two more free parameters: $\Sigma_0^{gal}$ and $R_{exp}^{gal}$. Unless otherwise stated, we fit the data points to the halo model and the exponential galaxy profile at the same time, using a maximum likelihood estimator with $4+2=6$ free parameters. \begin{figure*} \centering \includegraphics[width=\textwidth]{figs/Figure_result_fit.png} \caption{{\it (Top left).} Observed surface density profiles of the stars in six isolated dwarf galaxies in the Local group (data points, see legend) and fits to the exponential galaxy profile (blue solid lines) and the ghostly halo model in this work (colored solid lines). {\it (Top right).} $1\sigma$ and $2\sigma$ confidence contour plots for the fitting parameters $\beta$ and $\epsilon_0$, where $f_*=\epsilon_0 (M_{halo}/10^7~\wisk{{\rm M_\odot}})^\beta$. {\it (Bottom left).} Stellar mass as a function of the $z=7$ dark matter halo mass. Each solid line refer to the results of this work for a different isolated dwarf galaxy considered in this study (see legend). The symbols show the stellar mass and $z=7$ halo mass of Leo~T and Leo~A. {\it (Bottom right).} Stellar mass as a function of the maximum value of the dark matter mass of halos. The solid lines refer to the results of this work, the dotted line refer to results from \protect{\citet{Behroozi2013}}, and the shaded area refer to the DES results \protect{\citep{Nadleretal:2020}}. The symbols show the stellar masses and maximum halo masses of Leo~T and Leo~A (see text for more details).} \label{fig:results} \end{figure*} Fig.~\ref{fig:ngc6822} shows, for purely illustrative purposes, the fit of our ghostly halo model presented in this work, to the observed surface density profile data for NGC~6822, with the following caveat: we added 3 data points to the profile data to extend the profile to galactocentric radii $R<10$~kpc, hence reducing significantly the uncertainties on the fitting parameters. Available observational data for NGC~6822 extends to radii $<6.5$~kpc, and the central galaxy exponential profile dominates the halo surface brightness at radii $<4$~kpc. Hence, usable data points to fit the stellar halo are only at radii between $4$~kpc and $6.5$~kpc. Such a short span in radii is insufficient to determine the model parameters with reasonable uncertainties. Fig.~\ref{fig:ngc6822} illustrates how well we could measure the model free parameters using stellar halo data not yet available but within reach of current telescopes and observational techniques. The top-left panel shows the surface density profile of NGC~6822 (points), the best fit exponential profile of the galaxy (solid blue line), the best fit ghostly halo model (dotted line), and the best fit model of the total (galaxy plus halo) surface density profile (solid orange line). The other panels show the 68\% (red line), and 95.4\% (blue line) confidence contour plots of the fitting parameters $\beta$, $\epsilon_0$ and $M_{halo}$. Each panel shows the marginalized 2-dimensional projections of the 3-dimensional parameter space, to highlight the uncertainties and the degeneracy of the parameters. Here we have kept the values of the fitting parameters of the exponential galaxy profile ($\Sigma_0^{gal}$ and $R_{exp}^{gal}$) fixed at the maximum likelihood value, and assumed $M_{cut}=10^6$~\wisk{{\rm M_\odot}}. It is clear from Fig.~\ref{fig:ngc6822} that, even assuming the prior $M_{cut}=10^6$~\wisk{{\rm M_\odot}}, neglecting the uncertainties related to the subtraction from the data of the exponential profile of the central galaxy, and observing the profile to approximately double the radius where the central galaxy exponential profile dominates the surface brightness ($\sim 10$~kpc), the remaining three free parameters in the ghostly halo model ($\beta$, $\epsilon_0$, and $M_{halo}$) are highly degenerate with each other. If also the halo mass is assumed as a prior, both $\beta$ and $\epsilon_0$ can be determined accurately for the (artificially improved) data for NGC~6822. Hence, assuming a reasonable range for the dark matter halo mass $M_{host}$ of the dwarf galaxy, good data on the extended surface density profile of the stars can be used to constrain the star formation efficiency, $f_*$, in primordial galaxies at $z=7$. The converse is also possible: if we have a reliable estimate of either $\beta$ or $\epsilon_0$, the mass of the dark matter halo can be inferred from the model. As illustrated above, the data currently available for the six dwarf galaxies does not extend to sufficiently large radii beyond the central galaxy half-light radius to infer $\epsilon_0$ and $\beta$ (hence, $f_*$) with sufficient confidence using only one dwarf galaxy. There are too many free parameters for the too few data points to fit the extended stellar haloes, hence the results using a single dwarf galaxy show large uncertainties and degeneracy. However, combining the data for the six dwarf galaxies in our data set produces meaningful results for a simple reason: Each dwarf galaxy has a different halo mass, $M_{halo}$ and different $\Sigma_{0}^{gal}$, $R_{exp}^{gal}$. However the other free parameters describing the star formation efficiency before reionization ($\beta$, $\epsilon_0$ and $M_{cut}$) have the same values for all the six dwarf galaxies, increasing the constraints on these parameters of interest and also constraining the halo masses of the dwarfs relative to each other. Fig.~\ref{fig:results} shows that combining the data for the six dwarf galaxies in our sample allows us to constrain $f_*$ before reionization with current data, if we make some assumptions on the halo masses of the six dwarf galaxies. The top left panel shows the observed surface density profiles of the stars in six isolated dwarf galaxies in the Local Group (see the legend; data points from KR19) and fits to the exponential galaxy profile (blue solid lines) and the ghostly halo model in this work (colored solid lines). The top right panel shows 68\% and 95\% confidence contour plots for the fitting parameters $\beta$ and $\epsilon_0$, assumed to be the same for all the dwarf galaxies. The bottom left panel shows the stellar mass $M_*$ of pre-reionization dwarfs (or UF dwarfs) as a function of their dark matter halo masses at $z=7$. Each solid line refers to a different isolated dwarf galaxy considered in this study (see legend). The symbols show the stellar masses and the halo masses at $z=7$ of Leo~T and Leo~A. For simplicity we have assumed that the maximum dark matter masses, $M_{dm}(max)$, for Leo~T and Leo~A are equal to their fiducial values at $z=0$ (see Table~\ref{tab:fits2}) and we used equation~(\ref{eq:Mmax}) for an estimate of their $z=7$ dark matter masses. Finally, the bottom right panel shows the stellar mass as a function of the maximum dark matter halo mass of the satellites, obtained from the $z=7$ dark matter masses using equation~(\ref{eq:Mmax}). For comparison, the dotted line shows published results on $M_*$ using complementary methods based on halo-matching \citet{Behroozi2013}, and the dash dotted line (with shaded area for $1\sigma$ and $2\sigma$ uncertainties) refer to a similar but more recent study from the DES team \citep{Nadleretal:2020}. \begin{table} \caption{Table of fiducial halo masses at $z=0$ adopted in this work.} \label{tab:fits2} \begin{tabular}{lccc} \hline Dwarf Name & \multicolumn{3}{c}{Halo mass: $M_{halo}[M_{\odot}]$} \\ & Fiducial & Range & KR19 \\ \hline Leo~T & $3.0 \times 10^8$ & $(1.5-6) \times 10^8$ & $2.4\times 10^8$ \\ Leo~A & $3.0 \times 10^9$ & $(1.5-6) \times 10^9$ & $1.6\times 10^9$ \\ WLM & $1.0 \times 10^{10}$ & $(0.5-2) \times 10^{10}$ & $0.9\times 10^{10}$ \\ IC~1613 & $1.2 \times 10^{10}$ & $(0.6-2.4) \times 10^{10}$ & $0.7\times 10^{10}$ \\ IC~10 & $1.3 \times 10^{10}$ & $(0.65-2.6) \times 10^{10}$ & $1.4\times 10^{10}$ \\ NGC~6822& $1.5 \times 10^{10}$ & $(0.75-3) \times 10^{10}$ & $1.5\times 10^{10}$ \\ \hline \end{tabular} \end{table} The results shown in Fig.~\ref{fig:results} are obtained with the following assumptions: \begin{enumerate} \item We adopted the following priors to reduce the degeneracy of the results: a) dark matter halo masses at $z=0$ for the six dwarfs as in Table~\ref{tab:fits2}; b) $M_{cut}=10^6$~M$_\odot$. \item We choose the pivot mass $M_{0}$ in the equation for $f_*$ (equation~\ref{eq:fstar}) such that $\epsilon_0$ is independent of $\beta$ (this can only be done with a prior on $M_{halo}$). We therefore constrain $\epsilon_0$ at a given mass for each of the observed dwarf data. When improved observed stellar halo profiles become available our method will also be able to constrain the parameters that are either too uncertain (like $\beta$) or set here as prior (like the mass of the dark matter halo). \item Here the prior on the halo masses are similar to fiducial values obtained by KR19, but slightly adjusted with respect to each other to obtain the same $\epsilon_0$ and $\beta$. However, the final result depends systematically on the overall mass scale assumed for the dark matter haloes of the six dwarf galaxies. \end{enumerate} In Fig.~\ref{fig:results1} we assess the uncertainty on the fitting parameter as a result of the assumed priors on the dark matter halo masses and the uncertainty on $\beta$. The left panel shows the $1\sigma$ and $2\sigma$ confidence contours on the $\beta-\epsilon_0$ plane for different priors on the halo masses. The fiducial prior on the dark matter halo masses (see Table~\ref{tab:fits2}) is shown by the middle (orange) contour ellipses; the effect of doubling the halo masses is shown by the lower (red) ellipses and reducing the halo masses by a factor of 2 is shown by the upper (blue) ellipses. The figure shows that for a fixed prior on the halo masses the value of $f_*$ at $M=10^7$~M$_\odot$ ($\epsilon_0$) is well constrained. On the other hand, the slope $\beta$ is poorly constrained and can vary between $0.3$ and $0.8$ within the 68\% confidence contour plot. Changing the prior on the halo masses has a direct effect on $\epsilon_0$ and produces larger values for lower halo masses. The right panel is the same as the bottom right panel in Fig.~\ref{fig:results}, but shows the uncertainty in $M_*$ due to the prior on dark matter halo masses (see the legend) and the $1\sigma$ uncertainty on the slope $\beta$. \begin{figure*} \centering \includegraphics[width=0.49\textwidth]{figs/Figure_final_a.png} \includegraphics[width=0.49\textwidth]{figs/Figure_final_b.png} \caption{{\it (Left).} The orange contours show the 68\% ($1\sigma$, thick lines) and 95\% ($2\sigma$, thin lines) confidence regions for the parameters $\epsilon_0$ and $\beta$ for the fiducial priors on the dark matter halo masses of the 6 dwarf galaxies in this study. The contours in blue show the same confidence region assuming a prior on the halo masses 50\% smaller than the fiducial case, and the red contour double the masses of the fiducial case. {\it (Right).} Same as the bottom right panel in Fig.~\ref{fig:results}, but showing the uncertainty in $M_*$ due to the prior on dark matter halo masses (see the legend) and the $1\sigma$ uncertainty on the slope $\beta$.} \label{fig:results1} \end{figure*} \section{Discussion}\label{sec:disc} The statistical uncertainty on our result can be greatly improved by increasing the accuracy and the outer radii over which the surface brightness is measured for the six dwarf galaxies in our sample. In addition, it is possible to add more dwarf galaxies to our sample as discussed in \cite{KangR:2019}. Obtaining data further from the central galaxy exponential profile is important to rule out contamination of the halo profile by stars ejected from the central galaxy by dynamical processes internal to the galaxy ({\it e.g.}, feedback) or external to the galaxy ({\it e.g.}, major galaxy mergers), and hence reduce the possibility of systematic errors. Our method to constrain $f_*$ relies on some assumptions that may produce physically-motivated discrepancies with respect to methods based on halo-matching between the halo mass and the luminosity of dwarf galaxies \citep[{\it e.g.},][]{Behroozi2013, Nadleretal:2020}. Discovering such a discrepancy would be interesting on its own merit. For instance, in our study we have not considered the contribution of globular clusters to the build up of the stellar halo. More precisely, although we have explored the case in which the stellar spheroid at the center of each halo is rather compact, we did not consider the case of multiple compact stellar system in each merging halo ({\it i.e.}, a system of GCs). Perhaps more interesting is the possibility that our method captures the full stellar content of haloes at the time of formation while methods based on halo matching of UF dwarfs capture only the stars presently bound by the dark matter halo. Today's stellar mass in UF dwarf galaxies may be significantly smaller than at formation not only because of tidal stripping, but also because stars with high velocity dispersion may evaporate out of small mass haloes and disperse in the IGM or ICM. A mechanism in which this process is likely to happen in UF dwarf galaxies was proposed in \cite{RicottiPG2016}. In that work, the origin of UF dwarfs was linked to the evaporation or destruction in them of compact star clusters with initial velocity dispersion typical of proto-GCs (half-light radii of few pcs and $\sigma_* \sim 30 -40$ km/s), much greater than the circular velocity of the minihaloes in which they formed ($\sim 5-15$ km/s). As these proto-GCs expand and disperse, most of the stars remain bound by the gravitational potential dark matter minihalo in which they form, producing an UF dwarf (the velocity dispersion of the star cluster decreases as it expands). But it is also possible that a significant fraction of the stars escape the haloes (depending on the initial size and velocity dispersion of the star cluster with respect to $r_{max}$ and $v_{max}$ of the minihalo). These stars would escape the minihaloes in which they form but likely they will still contribute to the stellar halo of the host galaxy they eventually merge with. Therefore, our method would systematically predict higher stellar masses for a given halo mass than methods based on halo-matching. Both in this work and in KR19 we made an assumption of one-to-one relationship between halo mass and stellar mass in the pre-reionization fossil galaxies at $z=7$. However, simulations of galaxy formation show that in the mass range $10^6-10^8$~M$_\odot$, the scatter around a mean star formation efficiency is very large \citep[{\it e.g.},][]{RicottiGS2002b, Fitts:2017, Munshi:2017}. The effects of this stochasticity in the mass-to-light ratio in the first galaxies needs to be included in future models to check whether it has an effect on the scale radius of ghostly haloes. \section{Summary and Conclusions}\label{sec:conc} We have used N-body simulations to understand and model the formation of stellar haloes in dwarf galaxies. When applied to observations of dwarf galaxies with today's masses $< 10^{10}$~\wisk{{\rm M_\odot}}, the model can be used to infer the star formation efficiency of fossil dwarf galaxies (UF dwarfs) forming the bulk of their stars before the epoch of reionization at $z \sim 7$. The reason is easy to understand: if a stellar halo is found in sufficiently small mass dwarfs, the whole stellar halo is composed of tidal debris of fossil galaxies, {\it i.e.,} galaxies that formed most of their stars before the epoch of reionization. These stellar haloes made of only old stars have been referred to as "ghostly" stellar haloes \citep{BovillR2011b}. Therefore the detection and characterization of ghostly stellar haloes around isolated dwarf galaxies is a sensitive test of the efficiency of star formation in fossil galaxies. Clearly the properties of ghostly haloes are tightly connected to the properties of the population of UF dwarf galaxies found around the Milky Way and M31. This elusive galaxy population still needs to be fully uncovered and understood and is one of the most powerful probes of the physics of galaxy formation in the early universe and the epoch of reionization. We have derived an empirical model of ghostly stellar haloes using a set of cosmological N-body simulations including dark matter haloes and stars. The basic idea of the model is physically motivated: the profile of the stellar halo can be understood as the sum of exponential profiles with scale radii determined by the typical masses of the accreting subhaloes building up the galaxy. Smaller mass subhaloes deposit most of their stars in the outer parts of the halo profile and vice versa. We apply the model to interpret observational data for six isolated dwarf galaxies in the local group (Leo~T, Leo~A, WLM, IC~10, IC~1613, NGC~6822) with masses ranging from $\sim 10^8$~\wisk{{\rm M_\odot}}\ to $\sim 10^{10}$~\wisk{{\rm M_\odot}}\ and infer the star formation efficiency, $f_*$, at $z \sim 7$ in dark matter minihaloes with masses between $10^6$~\wisk{{\rm M_\odot}}\ to $10^8$~\wisk{{\rm M_\odot}}. The following is a summary of our findings: \begin{enumerate} \item Current data on each single dwarf galaxy is not good enough for constraining all the model parameters and infer $f_*(M)$ at $z=7$ with reasonably small errorbars. This is due to the difficulty of separating the exponential galaxy profile from the halo profile due to the paucity of data at large distance from the galaxy and the large errorbars of the existing distant data points. \item If we use the data of only one dwarf galaxy, the value $\epsilon_0$ is highly degenerate with $M_{halo}$(z=0) ($\epsilon_0$ is roughly inversely proportional to $M_{halo}$(z=0)). Hence, even if we acquire exquisite data extending beyond what is currently available in published observations, a prior on the halo mass of the dwarf galaxy is necessary to derive $f_*(M)$ in pre-reionization dwarf galaxies. \item Although each galaxy has its own exponential profile parameters, $f_*(M)$ for the accreted satellites ({\it i.e.}, $\epsilon_0$ and $\beta$) are the same for all six galaxies. We therefore can combine the likelihood ellipses of each galaxy to find the values that maximize the combined likelihood. This allows us to constrain $f_*(M)$ with current data using a prior on the halo masses. Better data that extends to larger galactocentric distance will allow us to constrain both $f_*(M)$ at $z=7$ and the dark matter halo masses of the Local Group dwarfs. \item For all galaxies but the smallest ones (Leo~A and Leo~T), it is not possible to constrain the cutoff mass for $f_*$ as small mass satellites in the range $10^6-10^7$~\wisk{{\rm M_\odot}}\ affect the outer parts of the stellar haloes for which data is not currently available. However, if the existence of extended stellar haloes around Leo~T and Leo~A are confirmed, a cutoff of the luminosity function at $M_{cut} \ge 10^7$~\wisk{{\rm M_\odot}}\ would be incompatible with the data, as the stellar halo would not exist with a cutoff at this mass. This is the main reason for our assumption of $M_{cut}=10^6$~\wisk{{\rm M_\odot}}. \end{enumerate} Our results show that $f_*$ is in agreement with previous works \citep{Behroozi2013, KangR:2019, Nadleretal:2020} but the statistical uncertainty on the result is still large because the data on the observed dwarf galaxies does not extend sufficiently far from the scale radius of the central galaxy exponential profile. We conclude that this new method to constrain the star formation efficiency in the first galaxies before reionization, which was first introduced in \cite{KangR:2019} and refined in the present work, provides a new powerful tool to test the consistency of models of galaxy formation. It also offers a compelling theoretical motivation to collect more and better observational data on the extended stellar haloes around dwarf galaxies. The stellar haloes in small mass dwarf galaxies and the outer parts of more massive dwarf galaxies contain stars from the smallest satellite building blocks and therefore are most sensitive to determining the star formation efficiency in the first galaxies. \section*{Acknowledgements} We thank Dr. Volker Springel for sharing the {\sevensize GADGET~3} code with us. Visualisations in Fig.~\ref{fig:dm_portraits} and Fig.~\ref{fig:images} were created with {\sevensize SPLASH} \citep{splash} using particle smoothing lengths calculated by {\sevensize HOP} \citep{hop}. All the simulations were performed with the Deepthought2 cluster operated by the University of Maryland (http://hpcc.umd.edu). MR acknowledges the support by NASA grant 80NSSC18K0527. Basic research in astronomy at the Naval Research Laboratory is funded by 6.1 Base funding. \section*{Data Availability} The data underlying this article will be shared on reasonable request to the corresponding author. \bibliographystyle{mnras}
\section{Introduction}\label{sec:introduction} Strange matter, the possibility that the fundamental state of matter at high densities is a system of quarks in equilibrium against weak interactions, has been the subject of research in a wide variety of scenarios \citep{Chakrabarty:1989sqm, Saito:1990its, Madsen:1999hid, Weber:2005sqm, Felipe:2008msq, Han:2009sfs, Paulucci:2014sqm}. Probably one of the most favorable situations for the appearance of this type of matter, even without being absolutely stable, occurs during the last stages of the evolution of massive stars, associated with the explosion of type II supernovae, and during the formation of neutron stars (NSs) \citep{Dai:1995tco, Benvenuto:1999tpt, Sagert:2009sot, Bombaci:2011eoq, Malfatti:2019hqm}. The latter are the densest objects in the universe, with radii of just over a dozen kilometers and masses of around $1.4 M_{\odot}$. NSs, in addition to having high densities, have magnetic fields (MFs) from $10^{8}$ up to $10^{15}$~Gauss at their surface; in particular, the objects with the greatest MF values, $\sim 10^{14-15}$~Gauss, are the so-called \emph{magnetars}. Under these extreme conditions, QCD predicts that hadronic matter may undergo a transition to a strange matter phase or a \emph{color superconducting} phase \citep{Alford:2008csi}. This prediction, together with the \emph{stability of the strange matter hypothesis}, opens up the possibility of the formation of compact objects composed entirely of quark matter: \emph{quark stars} (QSs). The theoretical existence of such compact objects raises questions about what the true composition of NSs is, how astrophysical objects containing strange matter can be detected, and what are the main observational characteristics that differentiate them from objects made of non-strange matter. During the last decade, some NSs of $2 M_{\odot}$ were detected, establishing new restrictions to the \emph{equation of state} (EoS) of the matter that composes these objects and that is still unknown. The J1614-2230 pulsar is, among the most massive pulsars observed, the one with the least uncertainty in the determination of its mass, being $M = 1.906 \pm 0.016 M_{\odot}$~\mbox{\citep{Demorest:2010bx, Fonseca:2016tux, Arzoumanian:2018tny}}. Two other pulsars with a mass greater than two solar masses are J0348+0432, with a mass $M = 2.01 \pm 0.04 M_{\odot}$ \citep{Antoniadis:2013pzd}, and J0740+6620, with a mass $M = 2.08 \pm 0.07 M_{\odot}$ \citep{Fonseca:2021rfa}. Added to these data are those of the NICER telescope, from which not only the radius of the pulsar J0740+6620 was established, but also the mass and radius of the isolated pulsar J0030+0451 \citep{Riley:2019anv, Miller:2019pjm}. On the other hand, the event called GW170817 corresponds to the detection of the first merger of two NSs, carried out by the LIGO/Virgo collaboration \citep{Abbott:2017oog}, which promoted the era of multi-messenger astronomy with \emph{gravitational waves} (GWs). This is one of the most promising scenarios to understand the behavior of the dense matter EoS. The analysis of the data from this event allowed for constraints on the mass, radius, and tidal deformability of the merging NSs. On 25 April 2019, a new merger of two NSs, GW190425, was detected, in which more massive NSs participated \citep{Abbott:2020goo}. The most recent event reported by the LIGO/Virgo collaboration, GW190814, was detected from a binary merger of a black hole and a $2.50$--$2.67 M_{\odot}$ compact object, which could be the most massive NS or the least massive black hole ever observed \citep{abbott2020gw190814}. It is expected that future GW detectors, such as the Einstein Telescope, could detect not only NSs mergers but the emission from the \emph{non-radial pulsation modes} of isolated NSs; in this context, it is also expected that the fundamental $f$ mode channels most of the GW emission energy \citep{Morozova:2018tgw}. Due the uncertainty of the EoS of matter under extreme conditions of pressure and density and the constraints on NSs from multi-messenger astronomy, we propose that theoretical magnetized color superconducting QSs may shed some light on these questions. At this point, we must emphasize that we study magnetized color superconducting QSs under the assumption of the strange matter hypothesis. This is important because for the first time, a functional dependent magnetic field and the possibility of di-quark formation are both taken into account to study oscillating self-bound stars. Previous works used a uniform and constant MF to study magnetized strange quark matter within a confining model \citep{Sinha:2013sqm} and to study magnetized CFL stars in the framework of the MIT bag and NJL models \citep{2011IJMPE..20...84P, paulucci2011equation}. In particular, the NJL model does not satisfy the strange matter hypothesis \cite{BUBALLA_2005}. In fact, \citet{paulucci2011equation} relies on the MIT model analysis by adopting an effective bag by hand in the NJL to construct self-bound stars. Thinking that quark stars are possible, one of the problems with more realistic models to describe quark matter (see for example~\cite{G_mez_Dumm_2021} and the references therein) is the lack of free parameters to adjust them to astrophysical observations. In general, the parameters in this type of model are fixed, relying on vacuum fits, which might not be applicable at the large densities found in compact objects. An alternative model to study self-bound stars that has recently been revisited is the density-dependent quark mass model \cite{Backes_2021}. For simplicity, we adopted the traditional MIT bag model \citep{Chodos:1974nem} in our study. This allows us to fit the chosen free parameters not only to the latest astrophysical constraints for compact objects, but also to be consistent when modeling \emph{bare} self-bound QSs (without a surface crust layer \cite{Weber:2013soq}). Details of the construction of such objects and the results for the QSs' EoS, structure, and oscillation $f$ mode will be given in the next sections. The paper is organized as follows. In Section~\ref{sec:mag}, we explain the incorporation of the MF within the MIT bag model. Section~\ref{sec:supercond} is devoted to a brief description of the color superconducting phase considered and to show the stability window of stable magnetized color superconducting matter, given the complete modeled EoS. Different families of compact objects, as well as the fundamental $f$ non-radial oscillation frequency and the corresponding damping times obtained are presented in Section~\ref{sec:tovf}. In Section~\ref{sec:conclus}, we present a summary and discussion of our work. \section{Superconducting Magnetized Strange Quark Matter Equation of State}\label{sec:quarkeos} \subsection{Magnetized Strange Quark Matter within the MIT Bag Model}\label{sec:mag} In the presence of an MF, the transverse component of the momentum of a charged particle is quantized into \emph{Landau levels}. Assuming a local $z$-direction of the MF, this momentum reads \citep{Landau:1981qmn}: \begin{equation} k_\perp^2(\nu) = 2 \nu |q| B \, , \end{equation} where $q$ is the electric charge of the particle, $B$ the strength of the MF, and $\nu$ a quantum number given by: \begin{equation} \label{landaunu} \nu = n + \frac{1}{2} - \text{sgn}(q) \frac{g}{2} \frac{s}{2} \, , \end{equation} where $n$ is the Landau quantum number, $\text{sgn}(x)$ is the sign function, $g$ is the $g$-factor, and $s$ is the spin projection of the particle. We consider $g=2$ for spin $1/2$ particles. The Landau quantization produces a energy spectrum that is \begin{equation} E = \sqrt{k_z^2 + \bar{m}^2(\nu)} \, , \end{equation} with \begin{equation} \bar{m}^2(\nu) = m^2 + k_\perp(\nu)^2 \, . \end{equation} In order to keep $k_{z}$ real-valued, \begin{equation} k_{z}(\nu) = \sqrt{E^2 - \bar{m}^2(\nu)} \, , \end{equation} we have to impose the constraint $\nu \le \nu_{max}$ where, \begin{equation} \nu_{\rm max} = \left\lfloor \frac{E^2 - m^2}{2|q|B} \right\rfloor , \label{numax} \end{equation} and $\lfloor x \rfloor$ is the largest integer less than or equal to $x$. The anisotropy of the MF and, consequently, of the momentum components induces an energy--momentum tensor for the matter component given by: \begin{equation} T_{\mu \nu}^{\textrm{matter}}= \textrm{diag}(\varepsilon, P_\perp,P_\perp,P_\parallel) \, , \end{equation} where $\varepsilon$ is the energy density, and the pressure components read \begin{eqnarray} P_\parallel&=&-\Omega \, , \nonumber \\ P_\perp&=& -\Omega- \mathcal{M} B \nonumber \, , \end{eqnarray} $\mathcal{M}$ being the matter magnetization \citep{Blanford:1982mso,Felipe:2008msq}: \begin{equation} \mathcal{M}= - \partial \Omega / \partial B \rvert_{\mu_B}\, . \label{magmatter} \end{equation} Besides, the pure contribution from the MF generates another anisotropy in the system: \begin{equation} T_{\mu \nu}^{\textrm{MF}} = \textrm{diag}(B^2/2, B^2/2, B^2/2, -B^2/2) \, . \end{equation} In addition, in the \emph{MIT bag model}, there appears a constant contribution to the energy density and the pressure, which mimics the confinement property of QCD \citep{Chodos:1974nem,Chodos:1974bsi}. This contribution is treated as a free parameter of the model, $Bag$, and is given by \begin{equation} T_{\mu \nu}^{Bag}= \textrm{diag}(Bag, -Bag,-Bag,-Bag) \, . \end{equation} Hence, the total energy--momentum tensor of the system turns out to be \begin{equation} T_{\mu \nu}= T_{\mu \nu}^{\textrm{matter}}+T_{\mu \nu}^{Bag}+T_{\mu \nu}^{\textrm{MF}} \, . \end{equation} As we already have stated in previous works \citep{Mariani:2019mhs, Mariani:2022omh} and following the work by \citet{strickland:2012bpo}, in a quark matter system under a locally constant MF in the $z$-direction, the integrals of thermodynamic quantities are substituted by sums over the transverse momentum due to the quantization. Thus, the particle number density, energy density, and pressures of each i-particle of the system are given by \begin{eqnarray} n^i&=&\frac{\gamma_{c}\left|q\right| B}{2 \pi^{2}} \sum_{-s}^{+s} \sum_{n=0}^{\nu\leq \nu_{\max }} k_{z, F} \, , \label{eq:termomag} \nonumber\\ \varepsilon^i&=&\frac{\gamma_{c}\left|q\right| B}{4 \pi^{2}} \sum_{-s}^{+s} \sum_{n=0}^{\nu\leq \nu_{\max }}\left[E_{\mathrm{F}} k_{z, F}+\bar{m}^{2} \ln \left(\frac{E_{\mathrm{F}}+k_{z, F}}{\bar{m}}\right)\right] \, , \nonumber \\ P^i_{\|}&=&\frac{\gamma_{c}\left|q\right| B}{4 \pi^{2}} \sum_{-s}^{+s} \sum_{n=0}^{\nu\leq \nu_{\max }}\left[E_{\mathrm{F}} k_{z, F}-\bar{m}^{2} \ln \left(\frac{E_{\mathrm{F}}+k_{z, F}}{\bar{m}}\right)\right] \, , \nonumber \\ P^i_{\perp}&=&\frac{\gamma_{c}\left|q\right|^{2} B^{2}}{2 \pi^{2}} \sum_{-s}^{+s} \sum_{n=0}^{\nu\leq \nu_{\max }} \nu\ln \left(\frac{E_{\mathrm{F}}+k_{z, F}}{\bar{m}}\right) \, , \label{Eqs:magnetic} \end{eqnarray} with $E_F=\mu_i$ ($\mu_i$ being the chemical potential of the particle) and $k_{z, F}$ being the Fermi energy and $z$-momentum, respectively. The factor $\gamma_{c}=3$ indicates the degeneracy color number of the~quarks. The determination of the MF direction and strength inside NSs is a very complex problem, which implies the resolution of the non-linear general relativistic magneto-hydrodynamic equations \citep{Pili:2014aem}. Magneto-hydrodynamics models have shown that, during the proto-NS stage, the differential rotation would develop high toroidal MF components inside the star~\citep{Bonano:2003mfd,Naso:2008mfa,Frieben:2012emo}, so both the poloidal and toroidal MF components are necessary to preserve the star stability \citep{Ciolfi:2012pfi}. Thus, realistic stable models of magnetized NSs require the simultaneous presence of poloidal and toroidal MF components \citep{braithwaite2006evolution,Ciolfi:2013ttc,Sur:2020mfc}. Besides, purely toroidal MFs make the NS prolate, while purely poloidal MFs tend to make it oblate; if both toroidal and poloidal components are of the same order, we may expect that oblateness and prolateness cancel out approximately, leading to stars close to spherical symmetry. In this scenario, known as the \emph{chaotic MF} approximation \citep{zel2014stars,Flores:2020gws}, a spatial average can be performed and the spherical symmetry of the total system remains unchanged. Consequently, we can define an effective isotropic pressure given by \citep{Bednarek:2003tio,Flores:2016pos, Mariani:2019mhs}: \begin{equation} P=\frac{T_{1 1}+T_{2 2}+T_{3 3}}{3}= \sum_{i=u,d,s} \frac{2 P^i_\perp+P^i_\parallel}{3} - Bag + \frac{B^2}{6} \, . \label{pressure_prescription} \end{equation} Furthermore, when aiming to study the structure and composition of magnetized compact objects, it is usual to avoid the complex MF dynamics and distribution using a functional form to model the MF strength profile in a given direction. \mbox{\citet{Dexheimer:2017wis}} used a polynomial MF profile in the star's polar direction, satisfying Maxwell's equations. A polynomial poloidal MF profile in magnetars has also been suggested by \mbox{\citet{Chatterjee:2019mfd}}. These MF parametrizations are constructed consistently since they satisfy the Maxwell equations, and so, they provide a suitable physics insight into the MF profile inside NSs. However, the accuracy of these profiles in a direction other than polar and their compatibility with the presence of a non-negligible toroidal component have not yet been studied. Furthermore, these profiles are almost flat, and considering a surface value of $B \sim 10^{15}$~Gauss---corresponding to the observed MF surface values for magnetars---they do not allow reaching internal MF strength values much beyond this order of magnitude. This feature prevents reaching MFs of $\sim 10^{17}$--$10^{18}$~Gauss in the center of magnetars, values that emerge from magneto-hydrodynamics simulations \citep{Igoshev:2021eon,Pili:2014aem, Frieben:2012emo,Naso:2008mfa}; in particular, some works even suggest that the central MF in hybrid stars with quark matter in their cores could be as large as $10^{19}$~Gauss \citep{Sotani:2015mhq} and in QSs could be as large as $10^{20}$~Gauss \citep{Ferrer:2010eos, Chu:2018qma, Chu:2021qsm}. In this work, we adopted a hypothetical functional form of the MF parametrization depending on the baryonic chemical potential, $\mu_B$, given by \begin{equation} B(\mu_B) = B_{min} + B_{max} \left(1 - e^{(\beta(({\mu_B}-m_{n})^{\alpha})/m_{n})}\right) \, , \label{Eqs:B_profile} \end{equation} with $\alpha=2.5$ and $\beta = -4.08 \times 10^{-4}$ and $m_n$ is the nucleon mass \citep{Dexheimer:2012hsi}. The parameters $B_{\text{min}}$ and $B_{\text{max}}$ correspond to the order of magnitude of the MF at the surface and the center of the star, respectively. We define two sets for these parameters to analyze two paradigmatic NS scenarios: the \emph{low MF} pulsar and the \emph{magnetar} (see the details in Table~\ref{table:bcases}). As can be seen in that table, in order to study a wide range of MF values, we selected the value of $B_{max} \lesssim 3 \times 10^{18}$~Gauss according to the constraint imposed by \citet{Lai:1991ces}, who found that greater MF values could destabilize the star. The exponential profile of Equation~(\ref{Eqs:B_profile}), although not physically consistent, is a suitable choice to study bulk properties such as the structure and composition of these compact objects since it allows covering a wide range of MF values. Although hypothetical, this exponential parametrization has been used in several works and is an acceptable approximation to model the complex and still unknown profile of the MF \citep{Bandyopadhyay:1997qmf,Mao:2003aso,Rabhi:2009qhp,Dexheimer:2012hsi,Flores:2020gws,Thapa:2020eos, Mariani:2022omh}. \begin{table} [H] \caption{MF parametrization values for the two selected astrophysical scenarios: \emph{low-MF} pulsar and~\emph{magnetar}.} \label{table:bcases} \centering \setlength{\tabcolsep}{13.6mm} \begin{tabular}{cccc} \toprule Scenario & $B_{\text{min}}$~(Gauss) & $B_{\text{max}}$~(Gauss) \\ \midrule Low-MF & $1 \times 10^{13}$ & $1 \times 10^{15}$ \\ Magnetar & $1 \times 10^{15}$ & $3 \times 10^{18}$ \\ \bottomrule \end{tabular} \end{table} \subsection{Color Superconductivity and Stability Window}\label{sec:supercond} According to the QCD phase diagram, it is likely that, at high densities and low temperatures, strange matter becomes a color superconductor (see for example \citep{Rajagopal:1999mtq, Fukushima:2010tpd, Guenther:2021oot}). Any attractive quark--quark interaction in this type of regime would lead to the appearance of condensates called di-quarks, similar to electron condensates in ordinary superconductivity~\citep{Bardeen:1957mto}. Thus, conventionally, di-quarks are zero momentum spineless Cooper~pairs. In electromagnetic superconductivity, if the MF applied to the system is greater than a critical value, $B_c$, Cooper pairs could break and the system is reverted to a normally conducting state. This happens because the electrons in the Cooper pair have equal charges and opposite spins; thus, they have anti-parallel magnetic moments to the MF. The MF will tend to align the two parallel magnetic moments closest to each other, destroying the superconducting state. This transition from the superconducting to the normal state depends on whether the superconductor is of first or second order. In the first-order superconductor, the superconducting state has an abrupt transition to the normal state when $B > B_c$. This type of superconductor is characterized by completely expelling the magnetic field, which is known as the Meissner effect. Second-order superconductors have two critical fields, $B_{c1}$ and $B_{c2}$; for $B < B_{c1}$, the superconducting state holds, and for $B > B_{c2}$, there exists the normal state. Between $B_{c1}$ and $B_{c2}$, there is a mixed state in which the flux tubes of the MF may penetrate the superconductor \cite{glampedakis2011magnetohydrodynamics}. In the case of color superconductivity, quarks forming di-quarks have opposite charges and spins. Thus, the magnetic moments are parallel to the MF, and therefore, its presence reinforces the color superconductivity \cite{Ferrer_2006}. In NSs, superconductivity may be accompanied by the baryon superfluidity and/or the electromagnetic Meissner effect \cite{Shovkovy_2005}, and the MF can be expelled during a long time period \cite{baym1969spin} or may exist in vortices \cite{Haskell_2018}. In the case of pairing in P-wave states, the superfluidity/superconductivity may remain for $B > B_{c2}$, as in ferromagnetic superconductors and in some color superconducting phases \cite{PhysRevD.101.056011}. The analysis of the pairing properties for strange matter as a color superconductor is not trivial due to the variety of flavors, colors, and quark masses involved. In addition, the formation of a color superconducting phase breaks the SU(3)$_c$ color symmetry, so di-quarks are not colorless. Therefore, in the framework of QSs, it will not only be necessary to guarantee the electric charge neutrality, but also the color charge neutrality. One of the most-studied color superconducting phases is~\emph{color flavor locked} (CFL)~\citep{Alford:2008csi}, and it has also been studied considering the presence of an MF \citep{Noronha:2007cfl,Fukushima:2008csm}. This state is a symmetric phase of matter in which all the light quarks, each with three colors, are involved in the pairing process. A schematic representation of the pairing patterns in this phase is shown in Figure~\ref{fig:pattern}. The formation of di-quarks lowers the energy of the system by an amount related to the so-called color superconducting gap, $\Delta$. This quantity is a function of the chemical potential, but can be treated as a free parameter of the model. To include the effect of color superconductivity in a phenomenological way, we considered a fictional condition of unpaired quark matter that is in a superconducting state once the quarks involved in the pairing reach a common Fermi momentum (see, for example, \citet{Curin:2021dse} and the references therein). The energy of the system is affected by the term \begin{equation} \varepsilon_{\Delta}=-3\left(\frac{\Delta \bar{\mu} }{ \pi}\right)^2, \end{equation} where \begin{equation} \overline{\mu} = \frac{1}{N} \sum_{i} {\mu}_{i}, \end{equation} is the mean chemical potential related to the $N$ quarks forming di-quarks. The quark chemical potentials considering electric and color charges are given by \begin{equation} \mu_i=\mu_B-Q\mu_e+T_3\mu_3+T_8\mu_8 \, , \end{equation} where \begin{eqnarray} Q &=& \textrm{diag}(2/3,-1/3,-1/3) \, , \nonumber \\ T_3 &=& \textrm{diag}(1/2,-1/2,0) \, , \nonumber \\ T_8 &=& \textrm{diag}(1/3,1/3,-2/3) \, \nonumber. \end{eqnarray} $Q$ is the diagonal matrix corresponding to the electric charge. The color potentials $\mu_3$ and $\mu_8$ are associated with the two color charges of the group SU(3)$_c$ that commute with each other, and $T_3$ and $T8$ are the color charge diagonal matrices, the generators of SU(3)$_c$. \begin{figure}[H] \centering \includegraphics[width=0.5\linewidth]{./Figures/cfl_pairing.pdf} \caption{Schematic illustration of the different pairing combinations in the CFL phase. Quarks forming Cooper pairs have opposite charges and spins, and the presence of an MF reinforces the pairing (see text).} \label{fig:pattern} \end{figure} Using the Euler relation, the complete EoS of magnetized color superconducting quark matter is given by \begin{equation} \varepsilon = - (P-\varepsilon_{\Delta}) + \sum_{i=u,d,s,e,\mu}\mu_i n^i, \end{equation} where $P$ is given by Equation~\eqref{pressure_prescription}, and the number densities $n^i$ of Equation~\eqref{Eqs:magnetic} are modified by the di-quark formation fulfilling the following relationship: \begin{equation} n^u=n^d=n^s=n_B \, . \label{Eq:densi_rel} \end{equation} where, now, $n^i = \partial(P-\varepsilon_{\Delta})/\partial \mu_i$ and $n_B$ is the baryonic number density of the system. Equation~\eqref{Eq:densi_rel} is a consequence of imposing both color and electric charge neutrality, the latter given by \begin{equation} 2n^u-n^d-n^s=3 (n^e+n^{\mu}) \, . \label{neut_electrica} \end{equation} It is important to mention that the CFL phase can undergo stresses due to the mass of the strange quark and the conditions of charge neutrality and beta equilibrium. Furthermore, for this superconducting phase to exist, the pairing between the quarks must be strong enough, {{i.e}}, $\Delta > m_{s}^2/2 \mu$, becoming unstable in the limit where $\Delta \sim m_{s}^2/2 \mu$. In particular, \emph{gapless} CFL (gCFL) replaces the CFL phase at $m_s^2/2 \mu > \Delta$ \citep{alford2005hybrid, Alford:2008csi, Alford_2005}. We obtained that for the two extreme values of the superconducting gap considered, $\Delta$ = 10, 90 MeV, the transition from CFL to gCFL should occur for chemical potentials lower than $\mu$ = 460.8, 51.2 MeV, respectively, well below the chemical potential values from which the EoSs of Table \ref{tabla:tablaedes} are physical, that is when the pressure increases monotonically with the energy density. In more realistic quark models, such as NJL, the gCFL phase may have astrophysical implications, controlling the cooling of a neutron star if quark matter in this phase is present~\cite{Alford_2005_cooling}. For QSs to exist, strange quark matter composing them must fulfill the absolute stability hypothesis. Therefore, to obtain the corresponding stability window, we calculated the energy per baryon of superconducting magnetized quark matter, $\varepsilon/n_B$, at pressure $P=0$, which corresponds to the conditions on the QSs surface. Due to the observational constraints imposed for NSs with low MFs, we used a constant MF, $B=10^{12}$~Gauss, for the stability analysis. Hence, once we have built the superconducting magnetized quark EoS, firstly, we will study the stability of quark strange matter within our model. In Figure~\ref{fig:estab}, we present the energy density per baryon as a function of the free parameters of the model: the \textit{Bag} constant and the superconducting gap $\Delta$. Through this analysis, we can find the stability window of our model, which in the figure corresponds to the region below the white curve (the $^{56}$Fe mass). As can be seen, we obtain stable strange quark matter for any value of $\Delta$ as long as we keep the value of $Bag$ low enough. \vspace{-12pt} \begin{figure}[H] \centering \includegraphics[width=0.75\linewidth]{./Figures/Estab_b1e14.png} \caption{Energy per baryon, $\varepsilon/n_B$, as a color map in the $Bag$--$\Delta$ plane considering a low and constant MF, $B=10^{12}$~Gauss. The white curve indicates the constraint corresponding to the mass of $^{56}$Fe. Only $Bag$--$\Delta$ pairs below the white curves lead to stable configurations.} \label{fig:estab} \end{figure}{} \begin{table}[H] \centering \caption{Parameters for the four chosen EoSs. All the sets satisfy the strange matter stability hypothesis and the mass constraint $M_{\textrm{max}}\geq2.01 M_\odot$. We also show the surface baryonic density, $n_B^{sur}$, and the central MF strength, $B_{cen}$, for each set.} \label{tabla:tablaedes} { \setlength{\tabcolsep}{3.4mm} \begin{tabular}{ccccccc} \toprule EoS \# & \begin{tabular}[c]{@{}c@{}}$\Delta$\\ {(}MeV{)}\end{tabular} & \begin{tabular}[c]{@{}c@{}} $Bag$ \\ $($MeV/fm$^3)$\end{tabular} & \begin{tabular}[c]{@{}c@{}} $\varepsilon/n_B\rvert_{P=0}$ \\ {(}MeV{)}\end{tabular} & \begin{tabular}[c]{@{}c@{}} $M_{max}$ \\ $(M_\odot)$ \end{tabular} & \begin{tabular}[c]{@{}c@{}} $n_B^{sur}$ \\ $($1/fm$^3)$ \end{tabular} & \begin{tabular}[c]{@{}c@{}} $B_{cen}$ \\ $(10^{18}$~Gauss$)$ \end{tabular} \\ \midrule 1 & 10 & 45 & 801.9 & 2.17 & 0.23 & 1.4\\ 2 & 50 & 50 & 794.8 & 2.18 & 0.24 & 1.4\\ 3 & 90 & 45 & 712.0 & 2.60 & 0.21 & 0.6\\ 4 & 90 & 70 & 809.9 & 2.03 & 0.30 & 1.7\\ \bottomrule \end{tabular} } \end{table} \newpage \section{Solutions of the Structure Equations and $f$ Oscillation Mode}\label{sec:tovf} To calculate the structure of color superconducting magnetized QSs, we assumed that these objects have spherical symmetry and do not rotate. Under this hypothesis, it is valid to integrate the well-known relativistic hydrostatic equilibrium equations of Tolman, Oppenheimer, and Volkov (TOV) and obtain several stellar properties for different equations of state. Furthermore, since isolated compact objects can oscillate, we calculated the oscillation frequencies and the associated damping times of their non-radial oscillation modes, because these types of modes emit GWs. We only focused on the fundamental \textit{f} mode, since it concentrates the largest amount of potentially detectable energy. In addition to satisfying the stability hypothesis, the QS families obtained with the superconducting magnetized quark EoSs must fulfill the $2.01 M_\odot$ constraint imposed by the observation of the pulsar J0740+6620 \citep{Arzoumanian:2018tny, Fonseca:2021rfa}. In Figure~\ref{fig:masamax}, we present the QS maximum mass (for a low-MF parametrization; see Table~\ref{table:bcases}) as a function of the $Bag$ and $\Delta$ parameters, and the white curve represents the $M_{max} = 2.01 M_\odot$ restriction. Any combination ($Bag$, $\Delta$) below this curve satisfies such a constraint. \begin{figure}[H] \centering \includegraphics[width=0.75\linewidth]{./Figures/masa_ventana.png} \caption{Maximum mass for each QS family, $M_{max}$, in the $Bag$--$\Delta$ plane considering the low MF parametrization. The white curve indicates the constraint of massive pulsars, $M_{max} = 2.01 M_\odot$.} \label{fig:masamax} \end{figure}{} In Figure~\ref{fig:eleccioneos}, we show the combination of both the stability window of magnetized superconducting quark matter and the constraint of massive pulsars, Figures~\ref{fig:estab} and \ref{fig:masamax}, respectively. We selected four sets of parameters, indicated with black numbered dots (see Table~\ref{tabla:tablaedes} for details), from the overlapped region. The choice of sets also allow us to study the effects of $Bag$ and $\Delta$ parameters in a decoupled way: Sets~$1$ and $3$ (Sets~$3$ and $4$) share the same value of $Bag$ ($\Delta$). \begin{figure}[H] \centering \includegraphics[width=0.6\linewidth]{./Figures/ventana_curvas_b.png} \caption{$Bag$--$\Delta$ plane showing the stability window and the $M_{max} \ge 2.01 M_\odot$ allowed regions. We selected four qualitatively representative sets (Table~\ref{tabla:tablaedes}) of the general behavior of our model from the overlapping region where both conditions are satisfied.} \label{fig:eleccioneos} \end{figure} Through the selected sets of Table~\ref{tabla:tablaedes}, we studied the structure and oscillation $f$ mode of the QSs considering the two MF parametrizations presented in Table~\ref{table:bcases}: low-MF QSs and magnetars. In all results presented hereafter, the continuous (dashed) curves represent stable solutions for low-MF QSs (magnetars). In Figure~\ref{fig:mr_sets}, we present the mass--radius relationship obtained by integrating TOV equations and the constraints in mass and radius imposed by recent observations: the $\sim 2 M_\odot$ \citep{Arzoumanian:2018tny, Fonseca:2021rfa} pulsars, GW170817 \citep{Abbott:2017oog} and GW190425~\citep{Abbott:2020goo}, and NICER observations \citep{Miller:2019pjm,Riley:2019anv,Riley:2021anv, Miller:2021tro}. It is important to mention that Set~$4$ does not satisfy the restriction imposed by the pulsar J0030+0451. However, we kept Set~$4$ in order to perform a comparative analysis with the other chosen parameter sets. It can be seen in Figure~\ref{fig:mr_sets} that the Set~$3$ curve reaches a maximum mass of $M_{max}\approx2.6$~M$_\odot$, while the other three EoSs have maximum mass values $M_{max} < 2.2 M_\odot$ (see Table~\ref{tabla:tablaedes}); this result can be explained since, given a fixed $Bag$, an increase in $\Delta$ produces a \emph{stiffer} EoS (and a higher maximum mass); inversely, given a fixed $\Delta$, an increase in $Bag$ produces a \emph{softer} EoS (and a lower maximum mass). This combined effect for Set $3$ (corresponding to the highest $\Delta$ and lowest $Bag$) leads to the highest maximum mass. Furthermore, the effect of the MF is negligible, and this becomes noticeable in the enlarged Figure~\ref{fig:mr-zoom}. This figure shows the detail of continuous and dashed curves around the $M_{max}$ region in the mass--radius plane. We only show the results for Sets~$1$ and $4$, since for Sets~$2$ and $3$, the differences are smaller; in all cases, the differences are less than $1\%$ in the mass at fixed radius. Furthermore, comparing both Sets~$1$ and $4$, it can be seen that a higher MF does not necessarily imply a higher maximum mass. \begin{figure}[H] \centering \includegraphics[width=0.6\linewidth]{./Figures/mraio1.pdf} \caption{Mass--radius relationships for the sets of Table~\ref{tabla:tablaedes}. Continuous curves represent low-MF QSs, and dotted curves represent magnetars. Due to the insignificant effects of the MF on the QS structure, the two scenarios are indistinguishable (see the enlarged details in Figure~\ref{fig:mr-zoom}). We also present astrophysical constraints from the \mbox{$\sim 2~M_\odot$} pulsars \citep{Arzoumanian:2018tny, Fonseca:2021rfa}, the GW170817 \citep{Abbott:2017oog} and GW190425 \citep{Abbott:2020goo} events, and NICER observations \citep{Miller:2019pjm,Riley:2019anv,Riley:2021anv, Miller:2021tro}.} \label{fig:mr_sets} \end{figure} \vspace{-6pt} \begin{figure}[H] \includegraphics[width=0.49\linewidth]{Figures/mr_zoom_1.pdf} \includegraphics[width=0.49\linewidth]{Figures/mr_zoom_4.pdf} \caption{Enlarged zoomed-in view of the mass--radius relationships for the sets of Table~\ref{tabla:tablaedes}. Continuous (dotted) curves represent low-MF (magnetars) QSs. It can be seen that the effect of the MF is negligible. Besides, a higher MF does not imply necessarily a higher value for M$_{max}$. QS families constructed using EoSs~$1$ and $4$ are more sensitive to the variation of the MF strength.} \label{fig:mr-zoom} \end{figure} \newpage On the other hand, to study the oscillation modes of a spherically symmetric body, we must consider not only the oscillations of the star's fluid, but also those that are transferred to space--time through the equations proposed by \citet{Detweiler1985}. The Schwarzschild metric \citep{weber:2017paa} being \begin{equation} d s^{2}=-e^{2 \phi(r)} d t^{2}+e^{2 \lambda(r)} d r^{2}+r^{2} d \theta^{2}+r^{2} \operatorname{sen}^{2} \theta d \phi^{2} \, , \label{eq:shcw} \end{equation} the perturbation functions coupled to the TOV equations are given by \citep{Thorne1967} \begin{eqnarray} H_{1}^{\prime}=&-r^{-1}\left[l+1+2 M e^{\lambda} r^{-1}+4 \pi r^{2} e^{\lambda}(P-\epsilon)\right] H_{1}+r^{-1} e^{\lambda}\left[H_{0}+K\right.\nonumber\\ &-16 \pi(\epsilon+P) V(r)] \, , \nonumber \\ K^{\prime}=& r^{-1} H_{0}+\frac{1}{2} l(l+1) r^{-1} H_{1}-\left[(l+1) r^{-1}-\frac{1}{2} \phi^{\prime}\right] K-8 \pi(\epsilon+P) e^{\lambda / 2} r^{-1} W(r) \,, \nonumber \\ W^{\prime}=&-(l+1) r^{-1} W(r)+r e^{\lambda / 2}\left[\gamma^{-1} P^{-1} e^{-\phi / 2} X-l(l+1) r^{-2} V(r)+\frac{1}{2} H_{0}+K\right] \, , \nonumber \\ X^{\prime}=&-l r^{-1} X+(\epsilon+p) e^{\phi / 2}\left\{\frac{1}{2}\left(r^{-1}-\frac{1}{2} \phi^{\prime}\right) H_{0}+\frac{1}{2}\left[r \omega^{2} e^{-\phi}+\frac{1}{2} l(l+1) r^{-1}\right] H_{1}\right. \nonumber \\ &+\frac{1}{2}\left(2 \phi^{\prime}-r^{-1}\right) K-\frac{1}{2} l(l+1) \phi^{\prime} r^{-2} V-r^{-1}\left[4 \pi(\epsilon+P) e^{\lambda / 2}+\omega^{2} e^{\lambda / 2-\phi}\right.\nonumber \\ &\left.-\frac{1}{2 r^{2}}\left(r^{-2} e^{-\lambda / 2} \phi^{\prime}\right)\right] W \, , \label{eq:pertur} \end{eqnarray} where $H_0$, $H1$, $H2$, and $K$ are time-dependent perturbation functions, $\gamma$ is the adiabatic factor, and $W(r)$ and $V(r)$ are functions characterizing the fluid perturbation \citep{Detweiler1985}. The numerical resolution of Equation~\eqref{eq:pertur} allows us to obtain the oscillation modes of the studied stellar configurations. These modes are known as \emph{quasi-normal modes} (QNMs), since the resulting frequencies are complex, $\omega = 2\pi \nu + i/\tau$, where $\nu$ is the real oscillation frequency and $\tau$ is the oscillation damping time of the corresponding mode. As we already stated, we are interested particularly in the solution of the fundamental $f$ mode. As we are only interested in the pressure $f$ mode, the presence of the magnetic restoration force that induces the magnetic Alfvén modes, or any other magnetic contribution, is not relevant in the perturbation equations. Thus, for the pressure modes, only the MF effects on the pressure are relevant, and we introduce them trough the magnetized EoS. In Figure~\ref{fig:fmode}, we present the results for the $f$ mode in the $\nu$-mass (left panel) and $\tau$-mass (right panel) planes. In the $\nu$-mass plane, it can be seen that oscillation frequencies are not only increasing with the mass of the stellar configurations, but also that families of QSs with higher maximum masses have lower oscillation frequencies; e.g., for a QS of $2 M_\odot$, $\nu$~$\sim 2100$~Hz for Set~$4$, $M_{max}\approx2.03 M_\odot$ and $M_{max}\approx2.17M_\odot$ correspond to $\nu$ $\sim 1780$~Hz for Sets~$1$ and $2$, and $M_{max}\approx2.6 M_\odot$ corresponds to $\nu$ $\sim 1450$~Hz for Set~$3$. Comparing Sets~$1$ and $3$, it follows that an increase in $\Delta$ generates lower frequencies; comparing Sets~$3$ and $4$, we observe that an increase in the $Bag$ produces an increase in the frequency values. In particular, we also calculated the $f$ mode for the non-superconducting magnetized strange quark matter ($\Delta=\mu_3=\mu_8=0$) with $Bag = 45$~MeV/fm$^3$. This particular choice allows us to compare the non-superconducting case with Sets~$1$ and $3$. As we have already shown, an increase in $\Delta$ implies lower $f$ mode frequencies, and this behavior is also valid in the limit of $\Delta = 0$. For a given $Bag$ value, the non-superconducting case has the highest frequency, and the appearance of the superconducting phase implies a decrease in the frequency. To quantify this comparison, we calculated the percentage change for the $M_{max}$ QS as an indicator of the whole family's results; if we compare the non-superconducting case with those of the $\Delta=10$~MeV and $\Delta=90$~MeV results, $\nu$ has a shift of $\sim 1\%$ and $\sim 15\%$, respectively. On the other hand, analogous to what happens in the mass--radius plane, the effect of an intense MF is practically negligible over the values of the $f$ mode oscillation frequencies (see the enlarged Figure~\ref{fig:frec-zoom} for details of Sets $1$ and $4$). Considering all the sets, for masses $1.0$--$2.6 M_{\odot}$, we obtained frequencies in the range $1200$--$2200$~Hz. Previous works obtained qualitatively similar results for purely hadronic, hybrid, or quark stars \citep{Sotani:2003noo,Benhar:2007qmi,Flores:2017ccf,Tonetto:2020dgm,Rodriguez:2021hsw,Flores:2020gws}; thus, it is not possible to distinguish among hadronic, hybrid, or quark EoSs through the eventual detection of the $f$ mode frequency. In particular, \citet{Flores:2017ccf} studied color superconducting QSs at zero M,F and their results are in agreement with those obtained in this work for the frequencies associated with the $f$ mode. \begin{figure}[H] \includegraphics[width=0.49\linewidth]{Figures/mfrec_sets.pdf} \includegraphics[width=0.49\linewidth]{Figures/mtau_sets.pdf} \caption{$\nu$--mass (left panel) and $\tau$--mass (right panel) relationships for the sets of Table~\ref{tabla:tablaedes}. Continuous curves represent low-MF QSs, and dotted curves represent magnetars. Due to the negligible effects of the MF on the QS structure, both astrophysical scenarios are indistinguishable (see enlarged Figure~\ref{fig:frec-zoom} for details). It can be seen that the EoS producing the highest maximum mass results in the lowest frequency values and longest damping times.} \label{fig:fmode} \end{figure} \vspace{-6pt} \begin{figure}[H] \includegraphics[width=0.49\textwidth]{Figures/mfrec_zoom_1.pdf} \includegraphics[width=0.49\textwidth]{Figures/mfrec_zoom_4.pdf} \label{fig:frec-cuarta} \caption{Enlarged zoomed-in view of the frequency--mass relationships for the sets of Table~\ref{tabla:tablaedes}. Continuous (dotted) curves represent low-MF (magnetars) QSs. The effect of the MF is negligible; as we already pointed out in the mass--radius relationship, the QS families constructed using EoSs~$1$ and $4$ are more sensitive to the variation of the MF strength.} \label{fig:frec-zoom} \end{figure} For the $\tau$--mass relationship, presented in the right panel of Figure~\ref{fig:fmode}, our results are in the range of $0.1$-$0.6$~seconds, also in agreement with the previously mentioned works \citep{Sotani:2003noo, Benhar:2007qmi,Flores:2017ccf,Tonetto:2020dgm,Flores:2020gws}. Contrary to the $\nu$ behavior, $\tau$ decreases with the mass, and the curves of the QS families with a higher maximum mass correspond to higher $\tau$. Besides, an increase in $\Delta$ produces increase $\tau$, while an increase in $Bag$ causes a reduction in $\tau$. In the non-superconducting case, $\tau$ has the lowest value, and it increases when we consider color superconductivity; comparing the non-superconducting result with Sets~$1$ and $3$ for $M_{max}$, $\tau$ has a less than $1\%$ shift between the $\Delta = 0$ and $\Delta = 10$~MeV cases and a $\sim 17\%$ shift between the $\Delta = 0$ and $\Delta = 90$~MeV cases. The effect of the MF strength is negligible. On the other hand, there exist \emph{universal relationships} associated with the oscillation frequencies and damping times for the $f$ mode \citep{Andersson:1998tgw}. In particular, there are empirical relations relating the frequency and damping time to the mass and radius of a stellar object given by \begin{equation}\label{eq:relf} \nu = a_1 + b_1\sqrt{\frac{\textrm{M}}{\textrm{R}^3}} \, , \end{equation} \begin{equation}\label{eq:reltau} \frac{\textrm{R}^4}{\textrm{M}^3\tau} = a_2 + b_2\sqrt{\frac{\textrm{M}}{\textrm{R}}} + c_2 \frac{\textrm{M}}{\textrm{R}} \, . \end{equation} In order to analyze how the magnetized color superconducting EoS fits the universal relationships, we used two fits in Equations~\eqref{eq:relf} and \eqref{eq:reltau}: BFG fit for hadronic matter \citep{Benhar2004} and CFL fit for quark matter \citep{Flores:2017ccf} (see Table~\ref{tabla:fits} for details). If the universality of these relationships holds, the detection of both the frequency and damping time of the fundamental mode of a given compact object allows us to infer the properties of the star such as mass and radius, independently of the EoS used to describe its composition. In Figure~\ref{fig:univ}, we present our results and the mentioned fits for the $\nu$ (left panel) and $\tau$ (right panel) universal relationships. As can be seen, the results for all the sets are grouped in very narrow regions along the CFL fit. The main difference between the EoSs used in this work and the EoSs of \cite{Flores:2017ccf} is the strange quark mass, $m_s$. We added a new fit (detailed in the last column of Table~\ref{tabla:fits}) corresponding to $m_s$ = 96 MeV, used in Equation~\eqref{eq:relf}, which matches very well with all the EoSs of the present work. \citet{Flores:2017ccf} used \mbox{$m_s$ = 150 MeV}. Moreover, they considered zero magnetic field and massless $u$ and $d$ quarks, and they did not take into account the color chemical potentials, $\mu_3$ and $\mu_8$. The difference in the coefficient values between both fits are not significant, indicating the usual dispersion from the universal relationships for different EoS models. Therefore, within our model, the universal relations developed by \citet{Andersson:1998tgw} are valid and the results obtained are in agreement with the fit for QSs presented by \citet{Flores:2017ccf}. \begin{figure}[H] \includegraphics[width=0.49\linewidth]{Figures/univer_f.pdf} \includegraphics[width=0.49\linewidth]{Figures/univer_tau.pdf} \caption{Universal relationships proposed by \citet{Andersson:1998tgw} for the $f$ mode, for $\nu$ as a function of the mean density (left panel) and for $\tau$ as a function of the compactness (right panel). In both panels, we also show the BFG \citep{Benhar2004} and two CFL fits; CFL fit (a) corresponds to the fit calculated in this paper and CFL fit (b) to Flores and Lugones' fit \citep{Flores:2017ccf}. Our fit lies, predictably, close to the CFL fit (b).} \label{fig:univ} \end{figure} \begin{table}[H] \centering \caption{Parameters for the BFG \citep{Benhar2004} and CFL \citep{Flores:2017ccf} fits related to the $f$ mode in Equations~\eqref{eq:relf} and~\eqref{eq:reltau}. In the third column, we show the parameters fitting our magnetized CFL results.} \label{tabla:fits} { \begin{tabular}{cccccc} \toprule fit & \begin{tabular}[c]{@{}c@{}} $a_1$ {(}Hz{)}\end{tabular} & \begin{tabular}[c]{@{}c@{}} $b_1$ $($km Hz$)$ \end{tabular} & \begin{tabular}[c]{@{}c@{}} $a_2$ \\ \end{tabular} & \begin{tabular}[c]{@{}c@{}} $b_2$ \\ \end{tabular} & \begin{tabular}[c]{@{}c@{}} $c_2$ \\ \end{tabular}\\ \midrule BFG & $790$ & $33 \times 10^3$ & $8.7 \times 10^{-2}$ & 0 & $-0.271$ \\ CFL \citep{Flores:2017ccf} & $-23$ & $44.11 \times 10^3$ & $0.0553$ & $-0.0466$ & $-0.0725$ \\ CFL (this paper) & $-103$ & $47.07 \times 10^3$ & $0.0534$ & $-0.0302$ & $-0.0897$ \\ \bottomrule \end{tabular} } \end{table} \section{Summary and Discussion}\label{sec:conclus} Using the MIT bag model, including MF and CFL color superconductivity effects, we modeled magnetized color superconducting quark stars and calculated their oscillation $f$ mode and associated frequencies and damping times. For the treatment of the MF, we adopted the chaotic approximation and a functional profile with realistic surface and central MF values for the two astrophysical scenarios considered: low-MF and magnetar QS. We constructed the stability window for magnetized superconducting quark matter and took into account the constraint of massive pulsars to select four sets of parameters that represent the qualitative behavior of the model used. For these four EoSs, we analyzed the mass--radius diagram considering the last constraints on neutron stars given by the GW events $170817$ and $190425$ and NICER observations. In addition, we verified the universal relations for the frequencies and damping times associated with the oscillation $f$ mode for the chosen EoSs. The results show that the inclusion of a superconducting color term related to di-quark formation in the EoS produces significant effects, not only on the stability window of strange quark matter, but also on astrophysical quantities, such as the maximum mass, radii, or oscillation $f$ mode of QSs. On the other hand, the differences of the EoSs in the cases of low and intense MFs are practically negligible. This leads to the fact that the results of mass, radius, and oscillation frequencies obtained do not present differences when comparing both astrophysical scenarios. In particular, for the $f$ mode, our results are in agreement with the work by \citet{Lander:2010oor}, where, under a Newtonian approach for NSs, they predicted a small shift, proportional to the influence of the pure magnetic pressure, $\propto B^2$, on the total pressure. It is worth mentioning that, if we had used a realistic MF internal distribution, such as the polynomial profiles by \citet{Dexheimer:2017wis, Chatterjee:2019mfd} or the ones arising from MHD simulations \citep{Pili:2014aem}, together with the magnetar observed surface value $B \sim 10^{15}$~Gauss, these results would not have changed qualitatively. The fact that the considered quark EoSs only show significant shifts for $B \gtrsim 10^{19}$~Gauss results in that all the discussed parametrizations would have shown negligible MF effects. Except in the case of EoS~$4$, the families of stars built with EoSs~$1$, $2$, and $3$ satisfy the observational restrictions imposed by GWs, NICER, and massive pulsars. However, EoS~$4$ is useful to identify the behavior of the \textit{Bag} and $\Delta$ parameters compared to the other considered EoSs. The frequencies and damping times of the QNM $f$ mode are in agreement with the results of purely hadronic, hybrid, and quark stars from previous works \citep{Sotani:2003noo, Benhar:2007qmi,Flores:2017ccf,Tonetto:2020dgm,Flores:2020gws}. This implies that if the emission of the $f$ mode could be detected, it would be impossible to distinguish whether these signals come from a purely hadronic, hybrid, or quark star by simply determining the frequency or damping time. We also observed that \textit{stiffened} EoSs, those that provide mass--radius curves with higher maximum masses, give rise to lower oscillation frequencies and higher damping times when compared with \textit{softened} EoSs. The QNMs obtained fit very well with the universal relationships corresponding to QSs' EoSs. The analysis of these empirical relations would allow not only obtaining structural parameters of the detected object independent of the EoS, such as mass or radius, but also classifying such a compact object and finding possible observational evidence of quark matter in its composition. It is expected that the third-generation GW observatories, such as the Einstein Telescope, could detect $f$ mode emissions of isolated NSs; we hope that our results can be tested once these detectors start operating in the next few years. \vspace{6pt} \newpage \section*{Acknowledgements} The authors contributed equally to the theoretical and numerical aspects of the work presented in this paper. All authors have read and agreed to the published version of the~manuscript. This research was supported by CONICET and UNLP, Grant Numbers PIP 0714 and G 157. The authors thank the anonymous Referees for their corrections and suggestions, which helped improve the quality of the manuscript. M.O.C. and M.M. are fellows of Consejo Nacional de Investigaciones Cient{\'i}ficas y T{\'e}cnicas (CONICET). M.M. and M.G.O. thank CONICET and the Universidad Nacional de La Plata (UNLP) for financial support. L.T. thanks the Italian Istituto Nazionale di Fisica Nucleare (INFN) under Grant TEONGRAV The authors declare no conflict of interest \renewcommand{\bibname}{References} \bibliographystyle{apalike}
\section{Introduction} Quantum spin liquids (QSLs) are states of matter in which no symmetry is broken. QSLs are interesting in general because they exhibit a remarkable set of collective phenomena including topological ground-state degeneracy, long-range entanglement, and fractionalized excitations \cite{Lee2008,Balents2010,Savary2016, Zhou2017,KnolleMoessner2019,Broholm2020,Motome2019}. In recent years, much work has been done to understand the nature of QSLs. However, this is not generically an easy task since QSLs in realistic models are usually ensured by frustration, either from a particular geometry of the lattice structure or from competing spin interactions, even identifying the models which host such states is challenging. In this sense, the exactly solvable Kitaev model on the honeycomb lattice with QSL ground state \cite{Kitaev2006} and its possible realization in strongly spin-orbit couple materials \cite{Jackeli2009,Chaloupka2010} helped us both with getting a deeper insight in the nature of QSL state and developing new approaches for detection of this exotic phase of matter in experiment. A promising route for searching for QSL physics in real materials is to look for signatures of spin fractionalizations in various types of dynamical probes, such as inelastic neutron scattering, Raman scattering, resonant inelastic x-ray scattering, ultrafast spectroscopy and terahertz non-linear coherent spectroscopy \cite{KnolleMoessner2019,Takagi2019,Broholm2020,Motome2019}. A possibility to compute the corresponding response functions analytically in the Kitaev model provides a unique opportunity to explore the characteristic fingerprints of the QSL physics in these dynamical probes on a more quantitative level \cite{Knolle2014a,Knolle2014b,Knolle2015,Brent2015,Brent2016-long,Smith2016,Gabor2016,Halasz2017,Gabor2019,Eschmann2020}. This is highly significant, because it gives us an opportunity to learn about generic behavior of other QSLs, which are much more difficult to describe. It was recently shown that a lot of information can be obtained by studying the phonon dynamics in the QSL candidate materials \cite{Plee2011,Plee2013,Metavitsiadis2020,Ye2020,Feng2021,Metavitsiadis2021}, since the spin-lattice coupling is inevitable and often rather strong in real materials \cite{Hentrich2018,Kasahara2018,Pal2020,Miao2020}. The characteristic modifications of the phonon dynamics from QSL compared with their non-magnetic or magnetically ordered analogs can be probed in various observables, including the renormalization of the spectrum of acoustic phonons \cite{Miao2020}, particular temperature dependence of the sound attenuation pattern and the phonon Hall viscosity\cite{Metavitsiadis2020,Ye2020,Feng2021}, the Fano lineshapes in the optical phonon Raman spectrum caused by the overlapping of the optical phonon peaks with the continuum of the fractionalized excitations \cite{Sandilands2015,Glamazda2017,Mai2019,Dirk2020,Lin2020,Metavitsiadis2021,Kexin2021}, thermal conductivity and thermal Hall effect \cite{Kasahara2018}. Again, the presence of the exact solution of the Kitaev model helps to quantitatively understand the dynamics of the phonons coupled to the underlying QSL. The Kitaev model can be generalized and defined for various three-coordinated three-dimensional lattices \cite{Mandal2009, Hermanns2014,Hermanns2015,Hermanns2016, Brent2015, Brent2016-long,Halasz2017,Trebst2017,Eschmann2020}, including the hyperhoneycomb, stripyhoneycomb, hyperhexagon, and hyperoctagon lattices. As a two-dimensional counterpart, these models are exactly solvable and have QSL ground state with fractionalized excitations that are gapless Majorana fermions and gapped $Z_2$ gauge fluxes for the isotropic coupling parameters. Importantly, the Majorana fermions exhibit a rich variety of nodal structures due to the different (projective) ways symmetries can act on them \cite{Hermanns2014,Hermanns2015}. These nodal structures include nodal lines for the hyperhoneycomb and the stripyhoneycomb models \cite{Mandal2009}, Fermi surfaces for the hyperoctagon model \cite{Hermanns2014}, and the Weyl points for the hyperhexagon model \cite{Hermanns2015}. In this work we performed a study of the phonon dynamics in the Kitaev model on the hyperhoneycomb lattice, which is particularly important among three-dimensional Kitaev models because of the existence of the Kitaev candidate material $\beta$-Li$_2$IrO$_3$ \cite{Biffin2014a,Takayama2015,Ruiz2017,Ruiz2021,Yang2022,Halloran2022}, which is realized on the hyperhoneycomb lattice. While we know that other interactions are present in this compound in addition to the dominant Kitaev interaction, here we assume that some good intuition can be obtained by studying the limiting case of the pure Kitaev model. To this end, we derived the Majorana fermion-phonon coupling vertices using the symmetry considerations and used them for computation of the phonon attenuation. The rest of the paper is organized as follows. In Sec.~\ref{ModelSec}, we present the derivation of the spin-phonon Kitaev Hamiltonian on the hyperhoneycomb lattice. We start by reviewing the Kitaev spin model on the hyperhoneycomb lattice in Sec.~\ref{Kitaevmodel}. We obtain its fermionic band structure and show that the fermions are gapless along the nodal line within the $\Gamma$-$X$-$Y$ plane, for which we obtain an analytical equation. In Sec.~\ref{Sec:phonons}, we introduce the lattice Hamiltonian for acoustic phonons on the hyperhoneycomb lattice. We obtain the acoustic phonon spectrum for the $D_{2h}$ point group symmetry in the long wavelength approximation. In Sec.~\ref{Sec:MFPhcoupling}, we present the explicit microscopic derivation of the Majorana fermion-phonon (MFPh) coupling vertices and show that there are four symmetry channels which contribute into them. The knowledge of the MFPh couplings allows us to compute the phonon dynamics, so we use the diagrammatic techniques and in Sec.~\ref{sec:polarizationbubble} compute the phonon polarization bubble. In Sec.~\ref{Sec:atten}, we present our numerical results for the attenuation coefficient for acoustic phonon modes. To this end, we first discuss the kinematic constraints in Sec.~\ref{Sec:kinematic} and then in Sec.~\ref{Sec:numerical} analyze the angular dependence of the sound attenuation coefficient for acoustic phonons with different polarizations. In Sec.\ref{sec:discussion}, we present a short summary and discuss the possibility for the spin fractionalization in the Kitaev hyperhoneycomb model to be seen in the sound attenuation measurements by the ultrasound experiments. \begin{figure} \centering \includegraphics[width=1\linewidth]{fig1.pdf} \caption{The sketch of the hyperhoneycomb lattice. The conventional orthorhombic unit cell is set by the crystallographic axes $\hat{{\bf a}}, \hat{{\bf b}}$ and $\hat{{\bf c}}$. The three lattice vectors of the primitive face-centered orthorhombic lattice are given by $ \mathbf{a}_1 = \left( 0, \sqrt{2}, 3 \right)$, $ \mathbf{a}_2 =\left( 1, 0, 3 \right)$, $ \mathbf{a}_3 = \left( 1, \sqrt{2}, 0 \right)$ which is written in the crystallographic basis. The four sublattices $A,\, B,\, C$ and $D$ are shown, and we set $\mathbf{r}_A = \left( 0, 0, 0 \right)$. Different bond types $x$, $y$, and $z$ are marked by red, green, and blue, respectively. The Cartesian axes $\{\hat{{\bf x}}, \hat{{\bf y}}, \hat{{\bf z}}\}$ used to write the the spin Hamiltonian Eq.~(\ref{eq-H}) is related to the crystallographic orthorhombic axes by $ \hat{{\bf x}}=(\hat{{\bf a}}+\hat{{\bf c}})/\sqrt{2}$, $\hat{{\bf y}}=(\hat{{\bf c}}-\hat{{\bf a}})/\sqrt{2}$ and $ \hat{{\bf z}}=-\hat{{\bf b}}$. The shaded region denotes a loop on the hyperhoneycomb lattice containing 10 sites. } \label{fig:HClattice} \end{figure} \section{The spin-phonon model} \label{ModelSec} In this section, we introduce the spin-phonon coupled Kitaev model on the hyperhoneycomb lattice and discuss its phonon dynamics. It is described by the following Hamiltonian: \begin{align} \mathcal{H}=\mathcal{H}^{ s}+\mathcal{H}^{\mathrm{ph}}+\mathcal{H}^{\text c}. \label{eq:model} \end{align} The {\it first term} in Eq. (\ref{eq:model}) is the spin Hamiltonian. The {\it second term} is the bare Hamiltonian for the acoustic phonons. The {\it third term} is the magnetoelastic coupling. \subsection{ The Kitaev model on the hyperhoneycomb lattice}\label{Kitaevmodel} \begin{figure*} \centering \includegraphics[width =0.95\textwidth]{fig2.pdf} \caption{ (a) The dispersion of the lowest branch of the fermionic excitations in the hyperhoneycomb Kitaev model through the plane of the nodal line ${\bf K}_0=(k_a,k_b,0)$, whose position in the Brillouin zone is explicitly shown in panel (b).(c) One-fermion density of states (DOS) of the isotropic Kitaev models on the honeycomb (red line) and the hyperhoneycomb (black line) lattices. In each case, the density of states is normalized to unity.} \label{fig:spectrum} \end{figure*} We start by revisiting the main features of the Kitaev QSL realized on the hyperhoneycomb lattice previously discussed in Refs.\cite{Hermanns2015,Halasz2017}. The hyperhoneycomb lattice is a face-centered orthorhombic lattice with four sites per primitive unit cell. Apart from translational symmetry, the crystal structure is invariant under the $D_{2h}$ point group symmetry. The conventional orthorhombic unit cell is set by the crystallographic axes $\{\hat{{\bf a}}, \hat{{\bf b}},\hat{{\bf c}}\}$, as shown in \reffg{fig:HClattice}. The Cartesian axes $\{\hat{{\bf x}}, \hat{{\bf y}}, \hat{{\bf z}}\}$ used to write the spin vector field is expressed as $ \hat{{\bf x}}=(\hat{{\bf a}}+\hat{{\bf c}})/\sqrt{2}$, $\hat{{\bf y}}=(\hat{{\bf c}}-\hat{{\bf a}})/\sqrt{2}$ and $ \hat{{\bf z}}=-\hat{{\bf b}}$. Different bond types $x$, $y$, and $z$ are marked by red, green, and blue, respectively. Note, however, that there are two non-equivalent types of $x$ and $y$ bonds, and the hyperhoneycomb structure can be viewed as a stacking of two types of zigzag chains formed by $x, y$ bonds and $x', y'$ bonds, each pair running along ${\bf a}\!+\!{\bf b}$ and ${\bf a}\!-\!{\bf b}$ directions, respectively. The two types of chains are interconnected with vertical $z$-bonds. Thus, in total, there are five types of nearest neighboring bonds: $x, x', y, y',$ and $z$. The Kitaev spin model on the hyperhoneycomb lattice reads \begin{equation} {\mathcal H}^s \!=\! -J\!\left( \! \sum_{\left\langle \mathbf{r}\vrr'\right\rangle \in \{x,x'\}} \!\!\!\!\! \sigma_{\mathbf{r}}^x \sigma_{\mathbf{r}'}^x + \!\!\!\!\! \sum_{ \left\langle \mathbf{r}\vrr'\right\rangle \in \{y,y'\}} \!\!\!\!\! \sigma_{\mathbf{r}}^y \sigma_{\mathbf{r}'}^y + \!\!\!\!\! \sum_{\left\langle \mathbf{r}\vrr'\right\rangle \in \{ z\} } \!\!\!\!\! \sigma_{\mathbf{r}}^z \sigma_{\mathbf{r}'}^z\right), \label{eq-H} \end{equation} where $\mathbf{r}$ and $\mathbf{r}'$ are sites on the three-dimensional hyperhoneycomb lattice, which we sketch in Fig.\ref{fig:HClattice} and the summation is done over five types of bonds. We also assumed the isotropic case with $J_{x}\!\!=\!\!J_{y}\!\!=\!\!J_{z}\!\!=\!\!J$. The symmetry of the Hamiltonian (\ref{eq-H}) involves a combined lattice and spin transformations \cite{you2012doping} [for detailed mathematical description, see Ref.~\cite{feng2022phonon, Kexin2021}]. The results of the three $\pi$-rotations around the crystallographic axes ${\bf a}$, ${\bf b}$, and ${\bf c}$ are the following. Under $C_{2\bf a}$ rotation spins transform as $[\sigma^x,\sigma^y,\sigma^z]\rightarrow[-\sigma^y,-\sigma^x,-\sigma^z]$, under $C_{2\bf b}$ rotation $[\sigma^x,\sigma^y,\sigma^z]\rightarrow[-\sigma^x,-\sigma^y,\sigma^z]$, and under $C_{2\bf c}$ rotation $[\sigma^x,\sigma^y,\sigma^z]\rightarrow[\sigma^y,\sigma^x,-\sigma^z]$. Additionally, $D_{2h}$ group also contains the space inversion $I$ at the middle of $x,x',y,y'$ bonds, which together with spin transformation leads to $[\sigma^x,\sigma^y,\sigma^z]\rightarrow[\sigma^y,\sigma^x,\sigma^z]$. The transformation $C_{2\bf c}$, $C_{2\bf b}$ and $I$ constitute the canonical generators that generate the whole $D_{2h}$ group. The exact solution of model (\ref{eq-H}) is based on the macroscopic number of local symmetries in the products of particular components of the spin operators around every plaquette $P$, which on the hyperhoneycomb lattice consists of ten sites (see shaded region in Fig.\ref{fig:HClattice}) and is defined by the following plaquette operator $\hat{W}_p=\prod_{\mathbf{r} \in P} \sigma_\mathbf{r}^{\alpha (\mathbf{r})}$, where the spin component $\alpha(\mathbf{r})$ is given by the label of the outgoing bond direction. Since all plaquette operators $\hat{W}_p$ commute with the Hamiltonian, $[\hat{W}_p, \mathcal{H}_{ s}]=0$, and take eigenvalues of $\pm 1$, the Hilbert space of the spin Hamiltonian $\mathcal{H}_{ s}$ can be divided into eigenspaces of $\hat{W}_p$. The ground state of the Kitaev model on the hyperhoneycomb lattice is the zero-flux state with all $\hat{W}_p=1$ \cite{Mandal2009, Hermanns2015}. This, however, can not be derived exactly from the Lieb's theorem \cite{Lieb1994} but is only based on the numerical calculations \cite{Hermanns2015,Eschmann2020}. Thus, strictly speaking, the Kitaev model on hyperhoneycomb lattice is not exactly solvable. Another striking difference between the hyperhoneycomb Kitaev spin liquid and its two-dimensional counterpart regards the effect of the thermal fluctuations on the stability of the ground-state zero-flux state. While in two-dimensional honeycomb lattice thermal fluctuations immediately destroy the zero-flux order of the $Z_2$ gauge field \cite{Nasu2014,Feng2020}, in three spatial dimensions there is a finite-temperature transition separating it from a high-temperature disordered flux state \cite{Nasu2014b,Yoshitake2017,Eschmann2020}. Using the Kitaev's representation of spins in terms of Majorana fermions \cite{Kitaev2006}, $\sigma_{\mathbf{r}}^{\gamma} = i b_{\mathbf{r}}^{\gamma} c_{\mathbf{r}}^{\phantom{\gamma}}$ with $\gamma = x,y,z$ \cite{Kitaev2006}, the spin Hamiltonian Eq.(\ref{eq-H}) can be rewritten as \begin{equation} \mathcal{H}^s= \sum_{\gamma} \sum_{\langle \mathbf{r}, \mathbf{r}' \rangle_{\gamma}} i J_{\gamma}^{\phantom{\gamma}} \eta_{\mathbf{r}, \mathbf{r}'}^{\gamma} c_{\mathbf{r}}^{\phantom{\gamma}} c_{\mathbf{r}'}^{\phantom{\gamma}} = \frac{1}{2} \sum_{\mathbf{r}, \mathbf{r}'} \mathcal{H}_{\mathbf{r}, \mathbf{r}'} c_{\mathbf{r}} c_{\mathbf{r}'}, \label{eq-H-2} \end{equation} where $\eta_{\mathbf{r}, \mathbf{r}'}^{\gamma} \equiv i b_{\mathbf{r}}^{\gamma} b_{\mathbf{r}'}^{\gamma} = \pm 1$, $\mathcal{H}_{\mathbf{r}, \mathbf{r}'} = i J_{\gamma}^{\phantom{\gamma}} \eta_{\mathbf{r}, \mathbf{r}'}^{\gamma}$ if $\mathbf{r}$ and $\mathbf{r}'$ are neighboring sites connected by a $\gamma$ bond and $\mathcal{H}_{\mathbf{r}, \mathbf{r}'} = 0$ otherwise. In the ground-state flux sector, we choose the gauge sector with all $\eta_{\mathbf{r}, \mathbf{r}'}^{\gamma}=1$, which corresponds to all $\hat{W}_p=1$. The quadratic fermionic Hamiltonian in Eq.~(\ref{eq-H-2}) can be diagonalized via a standard procedure \cite{Kitaev2006}. Since the hyperhoneycomb lattice has four sites per unit cell, the resulting band structure has four fermion bands, $\xi=1\sim4$ ($\xi = 1, 2$ are the two positive bands). The diagonal form of the Hamiltonian \cite{Halasz2017} \begin{equation}\label{Hs-diag} {\mathcal H}^s= \sum_{\mathbf{k}} \sum_{\xi = 1}^{4} \varepsilon_{\mathbf{k}, \xi}^{\phantom{\dag}} [\psi_{\mathbf{k}, \xi}^{\dag} \psi_{\mathbf{k}, \xi}^{\phantom{\dag}} - 1/2] \end{equation} is then obtained by the unitary transformation $\tilde{\mathcal{H}}_{\mathbf{k}}^{\phantom{\dag}} = \mathcal{W}_{\mathbf{k}}^{\phantom{\dag}} \cdot \mathcal{E}_{\mathbf{k}}^{\phantom{\dag}} \cdot \mathcal{W}_{\mathbf{k}}^{\dag}$ of the Hermitian matrix $\tilde{\mathcal{H}}_{\mathbf{k}}^{\phantom{\dag}}$ with elements $ (\tilde{\mathcal{H}}_{\mathbf{k}})_{\nu \nu'} = \frac{1} {N} \sum_{\mathbf{r} \in \nu} \sum_{\mathbf{r}' \in \nu'} \mathcal{H}_{\mathbf{r}, \mathbf{r}'} \, e^{i \mathbf{k} \cdot (\mathbf{r}' - \mathbf{r})}$, where $\nu$ and $\nu'$ denote sublattices $a,b,c,d$ shown in Fig. \ref{fig:HClattice}, and $\varepsilon_{\mathbf{k}, \xi} = (\mathcal{E}_{\mathbf{k}})_{\xi \xi}$ are the fermionic energies. The fermionic eigenmodes are given by \begin{equation} \psi_{\mathbf{k}, \xi}^{\phantom{\dag}} = \frac{1} {\sqrt{2N}} \sum_{\nu = 1}^{n} \left( \mathcal{W}_{\mathbf{k}}^{\dag} \right)_{\xi \nu} \sum_{\mathbf{r} \in \nu} c_{\mathbf{r}}^{\phantom{\dag}} \, e^{-i \mathbf{k} \cdot \mathbf{r}}. \label{eq-psi} \end{equation} Note that only the fermions $\psi_{\mathbf{k}, \xi}$ with energies $\varepsilon_{\mathbf{k}, \xi} > 0$ are physical due to the particle-hole redundancy $\tilde{\mathcal{H}}_{-\mathbf{k}}^{\phantom{\dag}} = -\tilde{\mathcal{H}}_{\mathbf{k}}^{*}$, which implies $\psi_{-\mathbf{k}, \xi}^{\phantom{\dag}} = \psi_{\mathbf{k}, \xi}^{\dag}$ and $\varepsilon_{-\mathbf{k}, \xi}^{\phantom{\dag}} = \varepsilon_{\mathbf{k}, \xi}$. Thus, only two branches have positive spectrum. The lowest branch $\varepsilon_{\mathbf{k}, 1}$ [shown in Fig.~\ref{fig:spectrum} (a)] exhibits the nodal line on the $(k_a,k_b)$ plane [Fig.~\ref{fig:spectrum} (b)], which is protected by projective time-reversal symmetry \cite{Hermanns2015}. By solving the equation $\varepsilon_{{\mathbf k},1}=0$, we obtained the functional form of the nodal line, ${\bf K}_0=(k_a,k_b,0)$, with \begin{align}\label{eq:nodalline} k_b &= \frac{1}{\sqrt{2}} \arg \left(1 - 2 \cos k_a \pm i \sqrt{1 + 4 \cos k_a - 2 \cos 2 k_a}\right). \end{align} \noindent The energy dispersion is linear if expanded around the nodal line, i.e. each point of the nodal line represents a Dirac cone. Importantly, the Fermi velocity varies along the nodal line and depends on the direction of the deviation from it, i.e. $v_F=v_F({\bf K}_0, \delta{\bf k})$, where $\delta{\bf k}=(\delta k_a, \delta k_b,\delta k_c)$. As we will see later, the spacial dependence of the Fermi velocity of the low-energy Majorana fermions will lead to the qualitative difference in the temperature dependence of the sound attenuation coefficient between the hyperhoneycomb model and the honeycomb Kitaev model \cite{Ye2020,Feng2021}. To further characterized the spectrum of Majorana fermions, in Fig.~\ref{fig:spectrum}(c) we plot the density of states $\text {DOS}(E) =\sum_{\xi=1,2} \int_{BZ} \delta(E-\varepsilon_{{\bf k},\xi}) d^3{\bf k}$ for the hyperhoneycomb Kitaev model (shown by the black line) where the contributions from both branches of Majorana fermions are summed up. The low-energy DOS is linear in energy, which follows directly from the linear low-energy dispersion and the dimension of the Fermi surface \cite{Brent2015}. For comparison, in Fig.~\ref{fig:spectrum}(c) we also plot the DOS for the honeycomb model (shown by the red line). The differences between the DOS for these two lattices can be understood in terms of the number of fermionic bands, one for the honeycomb lattice and two for the hyperhoneycomb lattices, and their nodal structure - two Dirac points for the honeycomb lattice and the closed line of Dirac points for the hyperhoneycomb lattice. The former leads to the absence of the Van-Hove singularities and overall more flatten DOS for the hyperhoneycomb lattice. The latter is responsible for a faster growth of the hyperhoneycomb DOS at low energies, which is consistent with higher dimensionality of the nodal line and enlarged number of low-energy states.\\ \subsection{Acoustic phonons on the hyperhoneycomb lattice}\label{Sec:phonons} Next we find the spectrum of the acoustic phonons on the hyperhoneycomb lattice. The bare Hamiltonian for the acoustic phonons contains the kinetic and elastic energy, $ \mathcal{H}^{\mathrm{ph}}=\mathcal{H}_{kinetic}^{\mathrm{ph}}+\mathcal{H}_{elastic}^{\mathrm{ph}} $, where $\mathcal{H}_{kinetic}^{\mathrm{ph}}=\sum_{{\bf q},\mu}\frac{\bf {P}_{-\bf q,\mu}\cdot \bf {P}_{\bf q,\mu}}{2\rho\delta_V}$ with $\bf {P}_{{\bf q},\mu}$ denoting the momentum of the phonon with polarization $\mu$, $\delta_V$ is the area enclosed in one unit cell and $\rho$ is the mass density of the lattice ions. The elastic contribution $\mathcal{H}_{elastic}^{\mathrm{ph}}$ can be expressed in terms of the strain tensor $\epsilon_{ij}=\frac{1}{2}\left( \partial_i u_j+\partial_j u_i\right)$, where ${\bf u}=\{u_a,u_b,u_c\}$ describes the displacement of an atom from its original location. In order to describe the dynamics of the low-energy acoustic phonons, it is convenient to move away from the Hamiltonian formulation and employ instead the long-wavelength effective action $\mathcal{S}$ approach. To lowest order, it reads \cite{LandauElasticity} \begin{align} \mathcal{S}_{\mathrm{ph}}^{(s)}&=\int\mathrm{d}^2 x\mathrm{d} \tau \, [\rho\, (\partial_{\tau} {\bf u})^2+F],\,\, F=\frac{1}{2}\mathcal{C}_{ijlk}\epsilon_{ij}\epsilon_{lk}, \end{align} where $F$ is the elastic free energy and $C_{ijlk}$ denote the elements of the elastic modulus tensor. The number of independent non-zero $\mathcal{C}_{ijlk}$ is dictated by symmetry. The hyperhoneycomb lattice has Fddd space group, which is generated by three glide planes, which are passing through the bond center of either of $x,x',y,y'$ bonds and are orthogonal to the ${\bf a},\,{\bf b},\,{\bf c}$ axes, respectively. The hyperhoneycomb lattice also has inversion symmetry with respect to the bond center of $x,x',y,y'$ bonds. The inversion thus can be generated by the product of glide mirrors, e.g., the inversion on the $x$ bond can be generated by $d_1^{-1}d_2d_3^{-1}$, where each $d_i$ glide is accompanied by a half of lattice translation along the primitive lattice vector ${\bf a}_i$ \cite{Choi2019}. Thus the point group is isomorphic to the $D_{2h}$, for which there are nine independent non-zero components of the elastic modulus tensor $C_{iiii}, C_{ijij},C_{iijj}$, where $i$ and $j$ denote $a,b,c$. Performing the Fourier transform, ${\bf u} ({\bf r})=\frac{1}{\sqrt{N}}\sum_{\bf q} e^{i{\bf q}\cdot{\bf r}}{\bf u}_{\bf q}$, the elastic free energy can be explicitly written as \begin{widetext} \begin{equation}\label{eq:24} F= \frac{1}{2} \begin{pmatrix} C_{aaaa} q_a^2 + C_{acac} q_c^2 + C_{abab} q_b^2 & q_b q_a \, (C_{aabb} + C_{abab}) & q_a q_c \, (C_{aacc} + C_{acac}) \\ q_b q_a (C_{aabb}+C_{abab}) & C_{abab} q_a^2 + C_{bcbc} q_c^2 + C_{bbbb} q_b^2 & q_b q_c \, (C_{bbcc} + C_{bcbc}) \\ q_a q_c \, (C_{aacc} + C_{acac})& q_b q_c \, (C_{bbcc}+ C_{bcbc}) & C_{acac} q_a^2 + C_{cccc} q_c^2 + C_{bcbc} q_b^2 \end{pmatrix}, \end{equation} \end{widetext} where $q_a = q \sin \theta_\mathbf{q} \cos \phi_\mathbf{q}$, $q_b = q \sin \theta_\mathbf{q} \sin \phi_\mathbf{q}$ and $q_c = q \cos \theta_\mathbf{q}$ are the components of the acoustic vector ${\bf q}$ in the orthorhombic reference frame. By diagonalizing the matrix (\ref{eq:24}), we compute eigenmodes, one longitudinal and two transverse acoustic modes, and the corresponding eigenenergies: the longitudinal and transverse acoustic phonons are then given by \begin{equation}\label{transfo-phonon} \begin{aligned} \left(\begin{array}{c} u_{{\bf q},a}\\ u_{{\bf q},b}\\ u_{{\bf q},c} \end{array}\right) = \begin{pmatrix} R_{11} & R_{12} & R_{13} \\ R_{21} & R_{22} & R_{23} \\ R_{31} & R_{32} & R_{33} \end{pmatrix} \left(\begin{array}{c} {\tilde u}_{{\bf q}}^{\parallel}\\ {\tilde u}_{{\bf q}}^{\perp_1}\\ {\tilde u}_{{\bf q}}^{\perp_2} \end{array}\right), \end{aligned} \end{equation} where $\hat{R}\equiv \hat{R} (\theta_\mathbf{q}, \phi_\mathbf{q})$ is the transformation matrix, ${\tilde u}_{{\bf q}}^{\parallel}$, $ {\tilde u}_{{\bf q}}^{\perp_1}$ and ${\tilde u}_{{\bf q}}^{\perp_2} $ are the longitudinal and transverse acoustic eigenmodes, respectively. The energies of the longitudinal and transverse acoustic phonons are \begin{align}\label{appeq:PhSpectrum} \Omega^{\nu}_{\bf q}=v_s^{\nu}(\theta_\mathbf{q},\phi_\mathbf{q})q, \end{align} where the sound velocities $v_s^{\nu}$ for the longitudinal acoustic mode, $v_s^{\parallel}(\theta_\mathbf{q}, \phi_\mathbf{q})$, and two transverse modes, $v_s^{\perp_1} (\theta_\mathbf{q}, \phi_\mathbf{q})$ and $v_s^{\perp_2} (\theta_\mathbf{q}, \phi_\mathbf{q})$ are anisotropic in space. \begin{figure*} \includegraphics[width=0.8\textwidth]{fig3.pdf} \caption{ Angular dependence of the sound velocities [in the unit of $10^4$ m/s] for (a) longitudinal mode ($v_s^\parallel(\theta, \phi)$) and (b) in-plane transverse mode ($v_s^{\perp_1}(\theta, \phi)$) and (c) out-of-plane transverse mode ($v_s^{\perp_2}(\theta, \phi)$) computed, for the elastic modulus coefficients close to those computed for $\beta$-Li$_2$IrO$_3$ \cite{Tsirlin}.} \label{fig:velocities} \end{figure*} In Fig.~\ref{fig:velocities}, we plot the angular dependence of these velocities computed for the elastic modulus tensor coefficients close to those computed for $\beta$-Li$_2$IrO$_3$: we set $C_{iiii}=2800$ kbar, $i=a,b,c$, $C_{aacc}=C_{bbcc}=1300$ kbar, $C_{aabb}=C_{abab}=C_{acac}=C_{bcbc}=900$ kbar \cite{Tsirlin}. We see that the angular dependence of the sound velocities is not that strong. In the plot, the maximum sound velocity is estimated to be $2\times 10^4$m/s, which is in the middle of the sound velocities reported for different directions in $\alpha$-RuCl$_3$ \cite{Lebert2022}. For the elastic modulus tensor given above, and restricting phonon modes to $ab$, $bc$ and $ac$ crystallographic planes, we numerically checked that the first column of the rotation matrix $\hat{R}$ corresponding to the longitudinal mode indeed gives the vector parallel to $\mathbf{q}$, i.e.~$\left(R_{11}, R_{21}, R_{31}\right)^{\mkern-1.5mu\mathsf{T}} = \left(\sin\theta_\mathbf{q}\cos\phi_\mathbf{q}, \sin\theta_\mathbf{q}\sin\phi_\mathbf{q}, \cos\theta_\mathbf{q}\right)^{\mkern-1.5mu\mathsf{T}}$, while the second and the third columns are perpendicular to $\mathbf{q}$ (the second column with label $\perp_1$ corresponds to the in-plane transverse mode, and the third column with label $\perp_2$ corresponds to the out-of-plane transverse mode). Knowing the acoustic phonon dispersion relations (\ref{appeq:PhSpectrum}), we can now determine the free phonon propagator in terms of lattice displacement field $\tilde{u}_{{\bf q}}^{\nu}$ as \begin{align} D_{{\bf q}}^{(0)\,\nu\nu'}(t)=-i\langle {\mathcal T} \tilde{u}_{-{\bf q}}^{\nu}(t)\tilde{u}_{{\bf q}}^{\nu'}(0)\rangle^{(0)}, \end{align} where ${\mathcal T}$ is time ordering operator, the superscript $(0)$ denotes the bare propagator, $\nu=\parallel,\perp_1, \perp_2$ labels the polarization, and $ \tilde{u}_{{\bf q}}^{\nu}$ are phonon eigenmodes in the corresponding polarization, which in the second quantized form can be written as \begin{align} \tilde{u}_{{\bf q}}^{\nu}(t)=i\left(\frac{\hbar}{2\rho\,\delta_V \Omega^\nu_{\bf q}}\right)^{1/2} ({\tilde a}_{\bf q} e^{-i\Omega^\nu_{\bf q} t}+{\tilde a}^{\dagger}_{-{\bf q}}e^{i\Omega^\nu_{\bf q} t}), \end{align} where $\delta_V$ is the area enclosed in one unit cell and $\rho$ is the mass density of the lattice ions. In the momentum and frequency space, the bare phonon propagator is then given by \begin{align} D^{(0)\nu\nu }({\bf q},\Omega)= -\frac{\hbar}{\rho\,\delta_V}\frac{1}{\Omega^2- (\Omega^\nu_{\bf q})^2+i0^{+}}. \end{align} The dynamics of phonons will be thus described by the decay and scattering of these eigenmodes on low-energy fractionalized excitations of the Kitaev model, which can be accounted for by the phonon self-energy $\Pi_{\mathrm{ph}}({\bf q},\Omega)$ \cite{Ye2020}, which for this case we will discuss later in Sec.~\ref{sec:polarizationbubble}. The renormalized phonon propagator is then given by the Dyson equation $D({\bf q},\Omega)=\left[ \left(D^{(0)}({\bf q},\Omega)\right)^{-1}-\Pi_{\mathrm{ph}}({\bf q},\Omega) \right]^{-1}$. \subsection{The Majorana fermion-phonon coupling vertices}\label{Sec:MFPhcoupling} In order to study the phonon dynamics in the Kitaev spin liquid, it remains to compute the Majorana fermion-phonon (MFPh) coupling vertices, which we will do in this section. We recall that the magneto-elastic coupling $\mathcal{H}^{\text c}$ arises from the change in the Kitaev coupling due to the lattice vibrations. In the long wavelength limit for acoustic phonons, the coupling Hamiltonian on the bond can be written in a differential form as \begin{align} \label{Cmodel1} \mathcal{H}^{\text c}_{{\bf r}, {\bf r}+{\bf M}_\alpha} = \lambda {\bf M}_\alpha\cdot \left[ \left( {\bf M}_\alpha \cdot{\bf \nabla} \right) {\bf u}({\bf r})\right] \sigma_{\bf r}^{\alpha} \sigma_{ {\bf r}+{\bf M}_\alpha }^{\alpha}, \end{align} where $\lambda \sim\left(\frac{\mathrm{d} J}{\mathrm{d} {r}}\right)_\tx{e q} \ell_{a}$ is the strength of the spin-phonon interaction and $\ell_{a}$ is the lattice constant, and ${\bf M}_\alpha={\bf M}_1,... {\bf M}_5$ are five nearest neighboring vectors corresponding, respectively, to $y,y',x,x',z$ bonds shown in Fig.\ref{fig:latticebonds}. Using these vectors, we can write the spin-phonon coupling Hamiltonian explicitly: \begin{widetext} \begin{align} \label{eq:3dm} \mathcal{H}^{\text c} =&\frac{1}{4}\lambda \sum_{{\bf r}_A} \bigg( 4\sigma_{{\bf r}_A}^z \sigma_{{\bf r}_A+ {\bf M}_5}^z \epsilon_{cc} + \sigma_{{\bf r}_A}^y \sigma_{{\bf r}_A + {\bf M}_2}^y (\epsilon_{aa}+2\epsilon_{bb}+ \epsilon_{cc} - 2\sqrt{2}(\epsilon_{ab}-\epsilon_{bc})-2\epsilon_{ac}) \nonumber\\&+ \sigma_{{\bf r}_A}^x\sigma_{{\bf r}_a + {\bf M}_4}^x (\epsilon_{aa}+2\epsilon_{bb}+ \epsilon_{cc} - 2\sqrt{2}(\epsilon_{ab}+\epsilon_{bc})+2\epsilon_{ac})\bigg) \\& +\sum_{{\bf r}_B} \bigg( \sigma_{{\bf r}_B}^y \sigma_{{\bf r}_B+ {\bf M}_1}^y (\epsilon_{aa}+2\epsilon_{bb}+ \epsilon_{cc} +2 \sqrt{2} (\epsilon_{ab}-\epsilon_{bc})-2\epsilon_{ac}) + \sigma_{{\bf r}_B}^x \sigma_{{\bf r}_B + {\bf M}_3}^x (\epsilon_{aa}+2\epsilon_{bb}+ \epsilon_{cc} + 2\sqrt{2}( \epsilon_{ab}+\epsilon_{bc})+2\epsilon_{ac})\bigg),\nonumber \end{align} \end{widetext} where we use a short notation $\epsilon_{ij}\equiv \epsilon_{ij} ({\bf r})$ with ${\bf r}={\bf r}_A$ or ${\bf r}_B$ depending on the bond and $i,j$ one of the orthorhombic directions $a,b,c$. Under the D$_{2h}$ point group symmetry, the spin-phonon Hamiltonian has four independent symmetry channels, $A_{g}$, $B_{1g}$, $B_{2g}$, and $B_{3g}$, which are inversion-symmetric irreducible representations (IRRs) of this group. The linear combinations of the strain tensors that transform as the D$_{2h}$ are $\epsilon_{aa}$, $\epsilon_{bb}$, and $\epsilon_{cc}$, in the $A_{g}$ channel, and $\epsilon_{ab}$, $\epsilon_{ac}$ and $\epsilon_{bc}$ in $B_{1g}$, $B_{2g}$, and $B_{3g}$, respectively. By writing the linear combinations of the Kitaev interactions that transform according to these IRRs, we express the spin-phonon coupling Hamiltonian \refeq{eq:3dm} as a sum of four independent contributions, ${\mathcal H}^c = \mathcal{H}^c_{A_{g}} + \mathcal{H}^c_{B_{1g}} + \mathcal{H}^c_{B_{2g}} + \mathcal{H}^c_{B_{3g}}$ with \begin{widetext} \begin{align}\label{eq:symm3D} \mathcal{H}^c_{A_{g}} &= \lambda_{A_{g}} \sum_{{\bf r}_A,{\bf r}_B} \left[ 4\epsilon_{cc} \sigma_{{\bf r}_A}^z \sigma_{{\bf r}_A + {\bf M}_{5}}^z +(\epsilon_{aa} + 2 \epsilon_{bb} + \epsilon_{cc}) (\sigma_{{\bf r}_B}^y \sigma_{{\bf r}_B + {\bf M}_{1}}^y + \sigma_{{\bf r}_A}^y \sigma_{{\bf r}_A + {\bf M}_{2}}^y+ \sigma_{{\bf r}_B}^x \sigma_{{\bf r}_B +{\bf M}_{3}}^x + \sigma_{{\bf r}_A}^x\sigma_{{\bf r}_A + {\bf M}_{4}}^x ) \right ], \nonumber\\ \mathcal{H}^c_{B_{1g}} &= \lambda_{B_{1g}} \sum_{{\bf r}_A,{\bf r}_B} \epsilon_{ab} (\sigma_{{\bf r}_B}^y \sigma_{{\bf r}_B + {\bf M}_{1}}^y - \sigma_{{\bf r}_A}^y \sigma_{{\bf r}_A + {\bf M}_{2}}^y+ \sigma_{{\bf r}_B}^x \sigma_{{\bf r}_B + {\bf M}_{3}}^x - \sigma_{{\bf r}_A}^x\sigma_{{\bf r}_A + {\bf M}_{4}}^x),\nonumber \\ \mathcal{H}^c_{B_{2g}} &= \lambda_{B_{2g}} \sum_{{\bf r}_A,{\bf r}_B} \epsilon_{ac} (- \sigma_{{\bf r}_B}^y \sigma_{{\bf r}_B + {\bf M}_{1}}^y - \sigma_{{\bf r}_A}^y \sigma_{{\bf r}_A + {\bf M}_{2}}^y +\sigma_{{\bf r}_B}^x \sigma_{{\bf r}_B + {\bf M}_{3}}^x + \sigma_{{\bf r}_A}^x\sigma_{{\bf r}_A + {\bf M}_{4}}^x), \\\nonumber \mathcal{H}^c_{B_{3g}} &= \lambda_{B_{3g}} \sum_{{\bf r}_A,{\bf r}_B} \epsilon_{bc} (- \sigma_{{\bf r}_B}^y \sigma_{{\bf r}_B + {\bf M}_{1}}^y + \sigma_{{\bf r}_A}^y \sigma_{{\bf r}_A + {\bf M}_{2}}^y +\sigma_{{\bf r}_B}^x \sigma_{{\bf r}_B + {\bf M}_{3}}^x - \sigma_{{\bf r}_A}^x\sigma_{{\bf r}_A + {\bf M}_{4}}^x ), \end{align} \end{widetext} where we absorbed numerical prefactors into the definitions of the coupling constants $ \lambda_{A_{g}} , \lambda_{B_{1g}}, \lambda_{B_{2g}}$ and $\lambda_{B_{3g}}$. \begin{figure} \includegraphics[width=.99\linewidth]{fig4.pdf} \caption{ $A,B,C,D$ denote four sublattices of the hyperhoneycomb lattice. ${\bf M}_1= \frac{1}{2} (1, \sqrt{2}, -1)$, ${\bf M}_2= \frac{1}{2} (1, -\sqrt{2}, -1)$, $ {\bf M}_3= \frac{1}{2} (-1, -\sqrt{2}, -1)$, $ {\bf M}_4= \frac{1}{2} (-1, \sqrt{2}, -1)$ and ${\bf M}_5= (0,0,1)$ are five nearest neighboring vectors, corresponding to $y,y',x,x',z$ bonds, respectively (all the vectors are given in the crystallographic axes $\hat{{\bf a}}, \hat{{\bf b}}$ and $\hat{{\bf c}}$). We use the following convention: an arrow pointing from site $\mathbf{r}$ to $\mathbf{r}'$ means $ u_{\mathbf{r}, \mathbf{r}'}$ on the corresponding bond is positive. } \label{fig:latticebonds} \end{figure} Next we express the spin operators in terms of the Majorana fermions and assume the ground state flux sector. Then we perform the Fourier transformation on both the strain tensor, $ \epsilon_{ij}({\bf r})=\frac{1}{\sqrt{N}} \sum_{\bf q}\frac{i}{2}\left(q_{i} u_{{\bf q},j}+q_{j} u_{{\bf q},i}\right) e^{i\mathbf{q} \cdot \mathbf{r}}$, and the Majorana fermions, $c_{{\bf r},\alpha}=\sqrt{\frac{2}{N}}\sum_{\bf k} c_{{\bf k},\alpha}e^{i \bf{k}\cdot \bf{r}_\alpha}$, where $\alpha=A,\,B,\, C,\,D$ is the sublattice label [see \reffg{fig:latticebonds}]. Now the products of the spin variables on all non-equivalent bonds can be written as (with the long wavelength approximation $\mathbf{q}\to 0$ applied): {\small\begin{equation}\label{matrices}\nonumber \begin{aligned} &\sigma_{\bf{r}}^y \sigma_{\bf{r + M_{1}}}^y \to {\bf A}^{\mkern-1.5mu\mathsf{T}}_{\bf{-q-k}}S_{\bf{k}}^{\dagger} \begin{pmatrix} 0 & -i e^{i \bf{k \cdot a_3}} & 0 & 0\\ i e^{-i \bf{k \cdot a_3}} & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{pmatrix} S_{\bf{k}} \bf{A_{\bf{k}}} , \\ & \sigma_{\bf{r}}^y \sigma_{\bf{r + M_{2}}}^y \to {\bf A}^{\mkern-1.5mu\mathsf{T}}_{\bf{-q-k}} S_{\bf{k}}^{\dagger} \begin{pmatrix} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & i e^{i \bf{k \cdot a_1}}\\ 0 & 0 & -i e^{-i \bf{k \cdot a_1}} & 0 \end{pmatrix} S_{\bf{k}}\bf{A_{\bf{k}}}, \\ &\sigma_{\bf{r}}^x \sigma_{\bf{r + M_{3}}}^x \to {\bf A}^{\mkern-1.5mu\mathsf{T}}_{\bf{-q-k}} S_{\bf{k}}^{\dagger} \begin{pmatrix} 0 & -i & 0 & 0\\ i & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \end{pmatrix} S_{\bf{k}}\bf{A_{\bf{k}}},\\ & \sigma_{\bf{r}}^x \sigma_{\bf{r + M_{4}}}^x \to {\bf A}^{\mkern-1.5mu\mathsf{T}}_{\bf{-q-k}}S_{\bf{k}}^{\dagger} \begin{pmatrix} 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & i e^{i \bf{k \cdot a_2}}\\ 0 & 0 & -i e^{-i \bf{k \cdot a_2}} & 0 \end{pmatrix} S_{\bf{k}} \bf{A_{\bf{k}}}, \\ &\sigma_{\bf{r}}^z \sigma_{\bf{r + M_{5}}}^z \to {\bf A}^{\mkern-1.5mu\mathsf{T}}_{\bf{-q-k}}S_{\bf{k}}^{\dagger} \begin{pmatrix} 0 & 0 & -i & 0\\ 0 & 0 & 0 & i\\ i & 0 & 0 & 0\\ 0 & -i & 0 & 0 \end{pmatrix}S_{\bf{k}} \bf{A_{\bf{k}}}, \end{aligned} \end{equation}} where ${\bf a}_i$ are the primitive unit vectors, $S_{\bf{k}} = {\rm diag}\{ e^{i \bf{k} \cdot {\bf r}_\alpha}\}_{\alpha = C,B,D,A}$ is the diagonal matrix in the sublattice basis, and the vector ${\bf A}_{\bf{k}} = \left( c_{{\bf k},C} , c_{{\bf k},B} , c_{{\bf k},D} , c_{{\bf k},A}\right)^{\mkern-1.5mu\mathsf{T}}$. The Majorana-phonon coupling Hamiltonian in the momentum space is now can be written as $ { \mathcal H}^c = \sqrt{\frac{2}{N}} \sum_{{\bf q}, {\bf k}} { \mathcal H}_{{\bf q}, {\bf k}}$, where each contribution ${ \mathcal H}_{{\bf q}, {\bf k}}$ can be decomposed into the irreducible representations $ A_{g} ,B_{1g}, B_{2g}$ and $B_{3g}$ [see \refapp{app: coupling-details} for explicit expressions]. Note also that ${\bf A}_{\bf{k}}$ is written in this particular permuted basis of the Majorana fermions in order to use the convenience of the auxiliary Pauli matrices in the representation of the coupling Hamiltonians as shown in \refeq{Hqk}. Next we express the phonon modes in terms of the transverse and longitudinal eigenmodes defined in \refeq{transfo-phonon}. Then ${ \mathcal H}_{{\bf q}, {\bf k}}$ terms in the corresponding polarizations are given by \begin{align}\label{Hcpolarizations} { \mathcal H}^{\parallel}_{{\bf q},\bf{k}}& = \tilde{u}_{{\bf q}}^{ \parallel} \, {\bf A}_{\bf{-q-k}}^{\mkern-1.5mu\mathsf{T}} \, S_{\bf{k}}^{\dagger} \, \hat{\lambda}_{{\bf q},{\bf k}}^{\parallel} \, S_{\bf{k}} \, {\bf A}_{\bf{k}} \nonumber\\ { \mathcal H}^{\perp_1}_{{\bf q},\bf{k}} &= \tilde{u}_{{\bf q}}^{\perp_1} \, {\bf A}_{\bf{-q-k}}^{\mkern-1.5mu\mathsf{T}} \, S_{\bf{k}}^{\dagger} \, \hat{\lambda}_{{\bf q},{\bf k}}^{\perp_1} \, S_{\bf{k}} \, {\bf A}_{\bf{k}} \\\nonumber {\mathcal H}^{\perp_2}_{{\bf q},\bf{k}} &=\tilde{u}_{{\bf q}}^{\perp_1} \, {\bf A}_{\bf{-q-k}}^{\mkern-1.5mu\mathsf{T}} \, S_{\bf{k}}^{\dagger} \, \hat{\lambda}_{{\bf q},{\bf k}}^{\perp_2} \, S_{\bf k} \, {\bf A}_{\bf k}. \end{align} The explicit expressions for the MFPh coupling vertices for longitudinal and transverse phonon modes are given in \refapp{app: coupling-details}. Note also that since we are using the long wavelength limit for the phonons, we only kept the leading in $q$ terms in all $\hat{\lambda}_{{\bf q},{\bf k}}^{\nu}$. \section{Phonon polarization bubble}\label{sec:polarizationbubble} At the lowest order, the phonon self-energy is given by the polarization bubble \cite{Ye2020} \begin{align} \Pi_{\mathrm{ph}}^{\mu\nu}({\bf q},\Omega) =i\tr{[\hat\lambda^{\mu}_{{\bf q}, {\bf k}}\mathcal{G}({\bf k},\omega)\hat\lambda^{\nu}_{ {\bf q}, {\bf k}}\mathcal{G}({\bf k}-{\bf q},\omega+\Omega)]}, \label{phononbubble} \end{align} where $\hat\lambda^{{\mu}(\nu)}_{{\bf q}, {\bf k}}$ are the MFPh coupling vertices for $\mu (\nu)=\parallel,\perp_1,\perp_2$, and $\mathcal{G}({\bf k},\omega)$ denotes the Majorana fermions Green's function for the lowest fermionic branch given by $ \hat{\mathcal{G}}({\bf k},\omega)=-i\int_{-\infty}^{+\infty}\mathrm{d} t\langle {\mathcal T} \psi_{{\bf k},1}(t) \psi_{-{\bf k},1}^{\mkern-1.5mu\mathsf{T}}(0)\rangle e^{i\omega t}$ (in the following, we omit the branch index and simply write $\psi_{{\bf k}}\equiv\psi_{{\bf k},1}$). Since we are interested in the phonon decay and scattering at finite temperature, it is convenient to use the Matsubara representation for the Majorana Green's functions: \begin{widetext} \begin{align} &\Pi_{\mathrm{ph}}^{\mu \nu}\left(\mathbf{q}, i \Omega_{n}\right)= \int_{\mathrm{BZ}} \mathrm{d} \mathbf{k} \operatorname{Tr}\left[ \hat{\lambda}_{\mathbf{q}, \mathbf{k}}^{\mu} \hat{\mathcal{G}}\left(\mathbf{k}, i \omega_{m}+i\Omega_{n}\right) \hat{\lambda}_{\mathbf{q}, \mathbf{k}}^{\nu} \hat{\mathcal{G}}\left(\mathbf{k}+\mathbf{q}, i\omega_{m}\right) \right] \nonumber \\ = & \int_{\mathrm{BZ}} \mathrm{d} \mathbf{k} \operatorname{Tr}\left[ \hat{\lambda}_{\mathbf{q}, \mathbf{k}}^{\mu} \hat{\mathcal{W}}_{\mathbf{k}}^{\dagger} \hat{G}\left(\mathbf{k}, i\omega_m + i\Omega_n\right) \hat{\mathcal{W}}_{\mathbf{k}} \hat{\lambda}_{\mathbf{q}, \mathbf{k}}^{\nu} \hat{\mathcal{W}}_{\mathbf{k}+\mathbf{q}}^{\dagger} \hat{G}\left(\mathbf{k}+\mathbf{q}, i\omega_m\right) \hat{\mathcal{W}}_{\mathbf{k}+\mathbf{q}} \right] \\\nonumber =& \int_{\mathrm{BZ}} \mathrm{d} \mathbf{k} \sum_{ij} \sum_{l}\left[ \left(\hat{\mathcal{W}}_{\mathbf{k}+\mathbf{q}}\hat{\lambda}_{\mathbf{q}, \mathbf{k}}^{\mu} \hat{\mathcal{W}}_{\mathbf{k}}^{\dagger}\right) \hat{E}_{i} \left(\hat{\mathcal{W}}_{\mathbf{k}} \hat{\lambda}_{\mathbf{q}, \mathbf{k}}^{\nu} \hat{\mathcal{W}}_{\mathbf{k}+\mathbf{q}}^{\dagger}\right) \hat{E}_{j} \right]_{ll} P_{\mathbf{k}, ij} \label{eq: bubble} \end{align} \end{widetext} where $\operatorname{Tr}[\ldots]$ in the first two lines sums over the Matsubara frequencies $i \omega_{m}$. $\hat{G}(\mathbf{k}, \omega) = \left( \begin{array}{cc} g(\mathbf{k}, \omega) & 0 \\ 0 & \bar{g}(\mathbf{k}, \omega) \end{array} \right)$ is the quasiparticle Green's function, and \begin{align} g(\mathbf{k}, \omega) = -i\int\mathrm{d} t \left\langle {\mathcal T} \psi_{\mathbf{k}}(t) \psi_{\mathbf{k}}^{\dagger}(0)\right\rangle e^{i\omega t}=\frac{1}{\omega-\varepsilon_{\mathbf{k}}+i 0^{+}} \nonumber \\ \bar{g}(\mathbf{k}, \omega) = -i\int\mathrm{d} t \left\langle {\mathcal T} \psi_{\mathbf{k}}^{\dagger}(t) \psi_{\mathbf{k}}(0)\right\rangle e^{i\omega t}=\frac{1}{\omega+\varepsilon_{\mathbf{k}} -i 0^{+}}. \end{align} $\mathcal{W}_\mathbf{k}$ is the unitary matrix that diagonalizes the Majorana fermion Hamiltonian \cite{Halasz2017}. $\hat{E}_{i} = \left( \begin{array}{cc} \delta_{i1} & 0 \\ 0 & \delta_{i2} \end{array} \right) $ serves to pick up a specific entry of a matrix. The summation over the Matsubara frequencies gives the dynamic part of the matrix entries \begin{align} P_{\mathbf{k},ij} = T \sum_{i\omega_{m}}\left[\hat{G}\left(\mathbf{k}, i\omega_m + i\Omega_n\right)_{ii} \hat{G}\left(\mathbf{k}+\mathbf{q}, i\omega_m\right)_{jj} \right]. \end{align} Their explicit expressions are given in \refapp{app:dynamicalfactor}. \section{Angular dependence of the attenuation coefficient}\label{Sec:atten} In this section, we will compute the attenuation coefficient for the lossy acoustic wave function which decays with distance away from the driving source as \begin{align} \label{eq:WaveFunc} \ve u(\ve x,t)=\ve u_0 e^{-\alpha_s (\ve q) x}e^{i(\Omega_\mathbf{q} t- \ve q\cdot \ve x)}. \end{align} where ${\ve u}(\ve x,t)$ is the lattice displacement vector, $\ve u_0 = {\ve u}(\ve x ={\ve 0},t=0)$, $\Omega_\mathbf{q}$ is the acoustic wave frequency and ${\bf q}= q (\sin \theta_\mathbf{q} \cos \phi_\mathbf{q}, \sin \theta_\mathbf{q} \sin \phi_\mathbf{q},\cos \theta_\mathbf{q})$ is the propagation vector. The attenuation coefficient $\alpha_s^\mu (\ve q)$ for a given phonon polarization $\mu=\parallel,\perp_1,\perp_2$, defined as the inverse of the phonon mean free path, can be calculated from the diagonal component of the imaginary part of the phonon self-energy as \cite{Ye2020} \begin{align} \alpha_s^\mu ({\bf q}) = -\frac{1}{2 \rho \delta_V \left[v_s^{\mu}(\theta_\mathbf{q},\phi_\mathbf{q})\right]^2 q} {\rm Im} \left. \Pi^{\mu\mu}_{\mathrm{ph}}({\bf q},\Omega)\right|_{\Omega=v_s^\mu(\theta_\mathbf{q}, \phi_\mathbf{q}) q}. \label{eq:Attenuation} \end{align} \begin{figure*}[!t] \centering \includegraphics[width=0.3\textwidth]{Fig5a.pdf} \includegraphics[width=0.31\textwidth]{Fig5b.pdf} \includegraphics[width=0.3\textwidth] {Fig5c.pdf} \includegraphics[width=0.3\textwidth]{Fig5d.pdf} \includegraphics[width=0.3\textwidth]{Fig5e.pdf} \caption{The angular dependence of sound attenuation coefficient $\alpha_s^\mu(\theta_\mathbf{q}\!=\!90^{\circ}, \phi_\mathbf{q})$ in the $ab$-plane. The pp-processes contribute to the attenuation of the out-of-plane transverse phonon mode ($\alpha_s^{\perp_2}$) in (a) $B_{2g}$ channel, (b) $B_{3g}$ channel, and (c) combined $B_{2g}$ and $B_{3g}$ channels. The ph-processes contribute to (d) the attenuation of the longitudinal phonon ($\alpha_s^{\|}$) and to (e) the attenuation of the in-plane transverse phonon mode ($\alpha_s^{\perp_1}$) in the $A_g$ channel. The radius represents the magnitude of $\alpha_s^\mu$ in the units of $10^{-5} \rho\delta_V$. The calculation is performed at $T=0.02\, J$. } \label{fig: ab_pp_ph} \end{figure*} \subsection{Kinematic constraints and the estimates for the sound and Fermi velocities in $\beta$-Li$_2$IrO$_3$}\label{Sec:kinematic} Before analyzing the angular dependence of the sound attenuation coefficient, we need first discuss the kinematic constraints determining type of the processes involved in sound attenuation. In the zero-flux low temperature phase, both momentum and energy are conserved and kinematic constrains are primarily determined by the relative strength of acoustic phonon velocity $v_s(\theta_\mathbf{q}, \phi_\mathbf{q})$ and Fermi velocity $v_F({\bf K_0}, \theta_{\delta \mathbf{k}},\phi_{\delta_\mathbf{k}})$ (the slope of the Dirac cone at each point of the nodal line), which in the most general case are both angular dependent. These constraints determine whether the decay of the acoustic phonon happens in the particle- hole (ph-) or in the particle-particle (pp-) channel. Here, by particle and hole, we mean if the state of the Majorana fermion at $\varepsilon_{\mathbf{k}}$ ($\varepsilon_{\mathbf{k}}=\varepsilon_{\mathbf{k},1}$) is occupied or empty. In other words, the particle number refers to that of the complex fermion $\psi_{\mathbf{k}}$ ($\psi_{\mathbf{k}}=\psi_{\mathbf{k},1}$) in Eq.(\ref{Hs-diag}). Here we assume that the angular dependence of $v_s(\theta_\mathbf{q}, \phi_\mathbf{q})$ in $\beta$-Li$_2$IrO$_3$ is weak [see the magnitude scale bars in Fig.~\ref{fig:velocities}] and consider it to be equal to $v_s$. However, the Fermi velocity $v_F({\bf K_0}, \theta_{\delta \mathbf{k}},\phi_{\delta \mathbf{k}})$ varies strongly between $v_F=0$ along the nodal line and $\max(v_F)$, which can be estimated from the magnitude of the Kitaev coupling, which in $\beta$-Li$_2$IrO$_3$ is $J\simeq 20\,meV$ \cite{Ruiz2021,Yang2022,Halloran2022}. Taking the lattice constant to be equal to $\ell = 0.23\, nm$ \cite{Villars2016:sm_isp_sd_1146563}, we estimate $\max(v_F) = 3\, J \ell = 2.1 \times 10^4\, m/s$. According to the estimation of the sound velocity in Sec.~\ref{Sec:phonons}, $v_s^{\|} \simeq 2.0 \times10^4 m/s \lessapprox \max(v_F)$, and $v_s^{\perp_{1,2}} \simeq 1.1 \times 10^4 m/s < \max(v_F)$. When $v_s < \max(v_F)$, the ph-processes are allowed but since they require finite occupation number, they scale with $T$ at low temperatures. However, due to the existence of the nodal line along which the Fermi velocity $v_F=0$, the pp-processes are always allowed \cite{Feng2021}. Since they do not require finite occupation number, they are nonzero even at zero temperature. Therefore, both the pp-processes and ph-processes should be included into consideration. \begin{figure*}[!t] \centering \includegraphics[width=0.3\textwidth]{Fig6a.pdf} \includegraphics[width=0.31\textwidth]{Fig6b.pdf} \includegraphics[width=0.3\textwidth] {Fig6c.pdf} \includegraphics[width=0.3\textwidth]{Fig6d.pdf} \includegraphics[width=0.3\textwidth]{Fig6e.pdf} \caption{The angular dependence of sound attenuation coefficient $\alpha_s^\mu(\theta_\mathbf{q}, \phi_\mathbf{q}\!=\!0^{\circ})$ in the $ac$-plane. The pp-processes contribute to (a) the attenuation of the longitudinal phonon ($\alpha_s^{\|}$) in $B_{2g}$ channel, (b) the attenuation of the in-plane transverse phonon ($\alpha_s^{\perp_1}$) in the $B_{2g}$ channel, (c) the attenuation of the out-of-plane transverse phonon ($\alpha_s^{\perp_2}$) in the $B_{3g}$ channel. The ph-processes contribute to (d) the attenuation of the longitudinal phonon ($\alpha_s^{\|}$) and (e) of the in-plane transverse phonon ($\alpha_s^{\perp_1}$) in the $A_g$ channel. The radius represents the magnitude of $\alpha_s^\mu$ in the units of $10^{-5} \rho\delta_V$. The calculation is performed at $T=0.02\, J$. } \label{fig: ac_pp_ph} \end{figure*} \subsection{Numerical results} \label{Sec:numerical} Considering the estimations above, we set $v_s^{\|}=3 \,J\ell$ and $v_s^{\perp_{1,2}}\approx 1.6 \,J\ell$. We also take $T=0.02\, J$, which is below the flux energy gap. In the long wavelength limit, the angular dependence of the sound attenuation coefficient is scale invariant and is more experimentally relevant than the dependence on the magnitude of the momentum $q$. Thus, we fix $q=0.005 \, \ell^{-1}$ and show the polar plots of the angular dependence of the sound attenuation (where the radius represents the magnitude of the sound attenuation coefficient). This angular dependence is a direct reflection of the Majorana-phonon couplings (\ref{eq:symm3D}) constructed based on symmetry. We compute the sound attenuation coefficient in the four symmetry channels, $A_g, B_{1g}, B_{2g}, B_{3g}$, considering separately the contributions from the pp- and ph-scattering processes. In Figs.~\ref{fig: ab_pp_ph}, \ref{fig: ac_pp_ph} and \ref{fig: bc_pp_ph}, we present our results for the sound attenuation's angular dependence patterns for the phonon modes in the three crystallographic planes, correspondingly, $ab$, $ac$ and $bc$, for three phonon's polarizations, $\|, \perp_1, \perp_2$. The explicit expressions for the Majoarana-phonon coupling vertices in these special geometries are presented in \refapp{app: coupling-polarizations}. These expressions show that for each of the phonon polarizations, the coupling vertex has contributions from only two symmetry channels and another two symmetry channels give exactly zero contribution. Furthermore, we find that some symmetry channels have higher order (dominant) contributions in the long wavelength limit $q\to 0$. So, below we will only show the results from the leading order contributions into sound attenuation for each crystallographic plane. \begin{figure*}[!t] \centering\includegraphics[width=0.3\textwidth]{Fig7a.pdf} \includegraphics[width=0.31\textwidth]{Fig7b.pdf} \includegraphics[width=0.3\textwidth] {Fig7c.pdf} \includegraphics[width=0.3\textwidth]{Fig7d.pdf} \includegraphics[width=0.3\textwidth]{Fig7e.pdf} \caption{The angular dependence of sound attenuation coefficient $\alpha_s^\mu(\theta_\mathbf{q}, \phi_\mathbf{q}\!=\!90^{\circ})$ in the $bc$-plane. The pp-processes contribute to (a) the attenuation of the longitudinal phonon ($\alpha_s^{\|}$) in $B_{3g}$ channel, (b) the attenuation of the in-plane transverse phonon ($\alpha_s^{\perp_1}$) in the $B_{3g}$ channel, (c) the attenuation of the out-of-plane transverse phonon ($\alpha_s^{\perp_2}$) in the $B_{2g}$ channel. The ph-processes contribute to (d) the attenuation of the longitudinal phonon $(\alpha_s^{\|}$) and (e) of the in-plane transverse phonon ($\alpha_s^{\perp_1}$) in the $A_g$ channel. The radius represents the magnitude of $\alpha_s^\mu$ in the units of $10^{-5} \rho\delta_V$. The calculation is performed at $T=0.02\, J$. } \label{fig: bc_pp_ph} \end{figure*} {\it Phonon within the $ab$ plane}.-- The contributions from the pp- and ph-scattering processes for the attenuation coefficient for the phonon propagating in the $ab$ plane are shown in \reffg{fig: ab_pp_ph} (a)-(c) and (d), (e), respectively. This plane is special compared with $bc$ and $ac$ planes, because of the presence of the nodal line in the fermionic spectrum [see \reffg {fig:spectrum} (a)] as well as the crystallographic structure shown in \reffg{fig:HClattice}. As such, there always exist zero Fermi velocities along the nodal line and small Fermi velocities in the vicinity of the nodal line. Therefore, the sound velocities along these directions are larger than the Fermi velocities, which gives rise to the non-zero pp-processes. In this scattering geometry, the pp-processes contribute only in the attenuation of the out-of-plane transverse phonon mode in the $\perp_2$ polarization, $\alpha^{\perp_2}_s(\mathbf{q})$. As follows from \refeq{abtr2}, $\alpha^{\perp_2}_s(\mathbf{q})$ has two contributions, one from the $B_{2g}$ channel [\reffg{fig: ab_pp_ph} (a)], describing the attenuation of lattice vibrations in the $ac$-plane, and from the $B_{3g}$ channel [\reffg{fig: ab_pp_ph} (b)], describing the attenuation of lattice vibrations in the $bc$-plane, with the former being a bit stronger. The total sound attenuation of the out-of-plane transverse phonon mode $\alpha^{\perp_2}_s(\mathbf{q})$ shown in \reffg{fig: ab_pp_ph} (c) is the sum of these two contributions, and its angular dependence looks like two-fold symmetric four-petal pattern. Since $v_s^{\|}\lesssim \max(v_F)$ and $v_s^{\perp_{1,2}} < \max(v_F) $, the ph-processes are also allowed. They contribute to the attenuation of the longitudinal phonon mode, $\alpha^{\|}_s(\mathbf{q})$, shown in \reffg{fig: ab_pp_ph} (d) and of the in-plane transverse mode, $\alpha^{\perp_1}_s(\mathbf{q})$ shown in \reffg{fig: ab_pp_ph} (e). According to the form of Majoarana-phonon coupling vertices in this geometry given by \refeq{ablong} and \refeq{abtr1}, the attenuation of both the longitudinal and the in-plane transverse phonons comes from the dominant $A_{g}$ and subdominant $B_{1g}$ channels. However, at $T=0.02\, J$ both contributions are very small compared with the one from the pp-proecesses. Thus in \reffg{fig: ab_pp_ph} (d) and (e) we only show the angular dependence of the attenuation computed from the $A_{g}$ contribution, which displays a vertical dumbbell pattern for $\alpha^{\|}_s(\mathbf{q})$, and the diagonal four-petal pattern for $\alpha^{\perp_1}_s(\mathbf{q})$. Note, however, that the comparison of the magnitude of the sound attenuation coefficients between ph- and pp- processes needs to take into consideration the temperature effect \cite{Feng2021}. Since the pp-processes do not require finite particle number, the low-temperature scaling behaviour of its contribution to the sound attenuation coefficient doesn't depend on temperature, i.e.\ $\alpha^{\text{pp}}_s\sim T^0$. The ph-processes require finite particle occupation, and its low-temperature scaling behaviour is $\alpha^{\text{ph}}_s \sim T^1$ same as in the 2D Kitaev model \cite{Ye2020}. This is a direct result of the fact that the low-energy $\tx{DOS}(E)\sim E^1$ as shown in \reffg{fig:spectrum}(c). This low-energy scaling behaviour of $\tx{DOS}$ can also be analytically obtained by evaluating $\tx{DOS}(E) = \int_\tx{BZ} \mathrm{d}^3\mathbf{k} \, \delta(E - \varepsilon_{\mathbf{k}})$. Then at low energy, if we expand the fermionic spectrum around the nodal line, then \begin{align} \tx{DOS}(E) = \int_\tx{BZ} \mathrm{d}^3 \mathbf{k} \, \delta(E - v_F(k_\phi, \delta k_\theta) \, \delta k_r), \label{eq: DOS} \end{align} where $k_\phi$ uniquely specifies a point on the nodal line by its orientation $\phi$. Around this nodal point, on a neighboring disk locally perpendicular to the nodal line, $(\delta k_\theta, \delta k_r)$ uniquely specifies the $\mathbf{k}$ point that contributes to the DOS. Then the integration \refeq{eq: DOS} is equivalent to stringing the local disks together along the nodal line. So it is easy to see that the low-energy scaling behaviour of $\tx{DOS}(E)$ is decided by the co-dimension, i.e.~ the dimension of the BZ space minus the nodal dimension. Thus, the low-energy behaviour of $\text{DOS}(E)\sim E^1$ is the same for both 2D plane model and 3D hyperhoneycomb model, so is the low-temperature behaviour of the sound attenuation coefficient. The low-temperature behaviours of both pp- and ph-processes distinguish themselves from the attenuation of other interaction channels, such as the channel due to phonon-phonon interactions which scales as as $\sim T^3$ in 2D and $\sim T^5$ in 3D, so they are promising for experimental detection at low enough temperature. Our numerical calculation shows that, even though the temperature dependence of attenuation from ph-process has larger power than that from pp-process, pp-process still dominates at high temperatures. The main reason is that Fermi velocities range from $0$ to $\max(v_F) = 3 J\ell$, so the sound velocities $v_s^{\|}=3 \,J\ell$ and $v_s^{\perp_{1,2}}\approx 1.6 \,J\ell$, which we use to describe the phonons in $\beta$-Li$_2$IrO$_3$ compound, are still larger than a significant portion of Fermi velocities, which is consistent with an existence of the nearly-zero Fermi velocities along the nodal line. If we use fictitious smaller sound velocities, the contribution from the ph-processes will become larger \cite{Feng2021}. {\it Phonon within the $ac$ or $bc$ planes}.-- As shown in \reffg{fig: ac_pp_ph} and \reffg{fig: bc_pp_ph}, the attenuation of the phonons propagating in the $ac$ and $bc$ planes are similar, which is consistent with the crystallographic structure displayed in \reffg{fig:HClattice}. Because the Fermi velocities for small deviations ${\bf k}$ from the nodal line ${\bf K}_0=(k_a,k_b,0)$ either into the $ac$ or into the $bc$ planes are small, at low temperatures the pp-processes dominate over the ph-processes and thus define the angular dependence of the sound attenuation. In both geometries, the pp-processes contribute to the attenuation of the phonons with all three different polarizations angular, with similar angular patters. However, while for the phonon in the $ac$ plane, the strongest attenuation is for the in-plane transverse phonon ($\alpha_s^{\perp_1}$), for the phonon in the $bc$ plane, the strongest attenuation is for out-of-plane transverse polarization ($\alpha_s^{\perp_2}$). In both geometries, attenuation of phonons with out-of-plane transverse polarization only happen through pp-processes and displays the vertical dumbbell pattern. The four-petal angular patterns of attenuation of the longitudinal and the in-plane transverse phonons are rotated by 45$^\circ$ with respect to each other. As mentioned before, these distinct patterns directly reflect the spin-phonon couplings from different symmetry channels, probed by different phonon polarization modes. The temperature dependence of the sound attenuation of the phonons propagating in $ac$ or $bc$ planes is similar to that in $ab$ plane. \section{Summary}\label{sec:discussion} In this paper, we studied the three-dimensional Kitaev spin-phonon model on the hyperhoneycomb lattice. In this model, the sound attenuation is determined by the decay of a phonon into a pair of Majorana fermions and can be calculated from the imaginary part of the phonon self-energy, which at the lowest order is given by the polarization bubble. Thus, we argued that the phonon attenuation, measurable by the ultrasound experiments, can serve as an effective indirect probe of the spin fractionalization. In our work we considered only low temperatures below the flux disordering transition \cite{Nasu2014b}, in which only Majorana fermions contribute to the phonon self-energy. We showed that Majorana semimetal with nodal line band structure leaves distinct characteristic fingerprints in the temperature dependence of the phonon attenuation coefficient as a function of incident phonon momentum. First, it allows the presence of the pp-processes of the phonon decay in all three considered scattering geometries with the phonon propagating in one of the three crystallographic planes. Second, since the pp-processes of the phonon decay is allowed at all temperatures, the sound attenuation is non zero even at zero temperature and is almost temperature independent ($\sim T^0$) at lowest temperatures. Combining both pp-processes and ph-processes that are allowed by symmetry constraints for each scattering geometry and phonon polarization, the temperature dependence of attenuation coefficient can be schematically described by $a_T T^0 + b_T T^1$ with $a_T> b_T$. Thus, the sound attenuation contributed from the decay into fractionalized excitations will be the dominant one at low enough temperatures, distinguishing itself from the contribution due to the phonon-phonon interactions, which scales as $\varpropto T^5$ in the three-dimensional system. We anticipate that the $Z_2$ fluxes will play an important role on the phonon dynamics at temperatures above the flux ordering transition temperature. We also obtained that the sound attenuation shows a strong angular dependence at the leading order in phonon momentum $q$. It is determined by the anisotropic form of the MFPh coupling and the nodal structure of the low-energy fermionic excitations. Finally, we note that our study was performed for the pure Kitaev model. Of course, real Kitaev materials feature additional weak time-reversal-invariant non-Kitaev interactions, which give rise to other magnetic phases competing with the Kitaev spin liquid. In particular, the minimal spin Hamiltonian for the $\beta$-Li$_2$IrO$_3$ compound in addition to the Kitaev coupling has contains antiferromagnetic Heisenberg interaction and off-diagonal $\Gamma$ exchange term~\cite{Ducatman2018}. Nevertheless, we believe that the temperature evolution of the sound attenuation will remain similar to the one in the pure Kitaev model as long as these perturbations do not break time reversal symmetry protecting the nodal line \cite{Hermanns2016} and are small enough that the material is in the proximity to the spin liquid phase. \vspace*{0.3cm} \noindent{\it Acknowledgments:} We thank Rafael Fernandes, Gabor Halasz and Mengxing Ye for earlier collaborations related to the topic of this study. The work of K.F. and N.B.P. was supported by the U.S. Department of Energy, Office of Science, Basic Energy Sciences under Award No. DE-SC0018056. \begin{widetext}
\section{Introduction} \subsection{Diophantine approximation with truncated counting functions} In \cite{VojtaABC}, Vojta proposed a far-reaching generalization of the $abc$ conjecture. Although his conjecture was originally formulated for rational and algebraic points, it also admits analogues in the setting of holomorphic maps (Nevanlinna theory) and function fields, see \cite{VojtaCIME}. In the arithmetic case, Vojta's conjecture is a Diophantine approximation statement in varieties of any dimension and involving truncated counting functions; the latter are a generalization of (the logarithm of) the radical of an integer. While there are several unconditional results towards Vojta's conjecture in the setting of Nevanlinna theory as well as for function fields, at this point the case of rational points remains largely mysterious. The only unconditional results towards the arithmetic case of Vojta's conjecture with truncated counting functions are proved in dimension one, namely, exponential bounds towards the $abc$ conjecture \cite{ABC1,ABC2, ABC3, MurtyPasten}. In this work we provide the first unconditional result towards Vojta's conjecture with truncated counting functions in varieties of arbitrary dimension. Our main result is Theorem \ref{ThmMain2} (with the companion Theorem \ref{ThmRat}) which bounds from below the truncated counting function relative to a divisor with sufficiently many components, in terms of the proximity function to an algebraic point. For the sake of comparison, we will also formulate Corollary \ref{CoroMain} which is more reminiscent of Vojta's conjecture, although it should be remarked that Theorems \ref{ThmMain2} and \ref{ThmRat} give a stronger result. In general terms, Corollary \ref{CoroMain} asserts that given a smooth projective variety $X$ over $\mathbb{Q}$, a reduced effective divisor $D$ on $X$ with sufficiently many components over $\mathbb{Q}$, a place $v$, an algebraic point $P$ in $X-\mathrm{supp}(D)$, and $\epsilon>0$, we have $$ \lambda_{X,v}(P,x) < \exp\left(\epsilon\cdot N_X^{(1)}(D,x) \right) +(\log^* h_X(\mathscr{O}(D),x))^{1+\epsilon} + O(1) $$ for all rational points $x\in X(\mathbb{Q})$ outside certain proper Zariski closed subset of $X$. Here, $\lambda_{X,v}(P,x)$ denotes the $v$-adic proximity of $x$ to $P$, $N_X^{(1)}(D,x)$ is the truncated counting function relative to $D$, $h_X(\mathscr{O}(D),x)$ is the height relative to the sheaf $\mathscr{O}(D)$, and $\log^*t=\log \max\{e, t\}$ ---a more detailed description of the notation appears later in this introduction. We begin our discussion with Theorem \ref{ThmMain1} which is an effective Diophantine approximation result for algebraic numbers, involving the radical of an integer. Theorem \ref{ThmMain1} is relevant in our study since it is a key input to prove our main results in higher dimensional varieties. After discussing an application of Theorem \ref{ThmMain1} in the context of the $abc$ conjecture providing a bound which in several cases is subexponential (see Corollary \ref{CoroSubExpABC}), we present the necessary background to formulate Vojta's conjecture. With these preliminaries we will be able to introduce our main results, namely, Theorems \ref{ThmMain2} and \ref{ThmRat} along with Corollary \ref{CoroMain}. Finally, we will include a discussion on a conjectural improvement: We will show that the Lang-Waldschmidt conjecture from transcendence theory implies a special case of Vojta's conjecture with truncated counting functions in arbitrary dimension. See Theorem \ref{ThmLW}. It should be noted that although Theorem \ref{ThmMain1} is used as a tool to prove our main results, it can be of independent interest due to the fact that it is effective and because of its Corollary \ref{CoroSubExpABC}. \subsection{Diophantine approximation of algebraic numbers} Recall that $\log^* t = \log \max\{e, t\}$ and let us write $\log^*_r(t)$ for the $r$-th iteration of $\log^*$. For $x=b/c\in \mathbb{Q}$ with $b,c$ coprime integers, the (logarithmic) height is $h(x)=\log \max\{|b|,|c|\}$. For a non-zero integer $m$ we let $\mathrm{rad}(m)$ be the radical of $m$, that is, the product of the different positive primes dividing $m$ without repetition. We write $M_\mathbb{Q}=\{\infty,2,3,5,...\}$ for the set of places of $\mathbb{Q}$ and for each $v\in M_\mathbb{Q}$ we fix an absolute value $|-|_v$ on $\overline{\mathbb{Q}_v}$ extending the usual $v$-adic one in $\mathbb{Q}$. We also fix an embedding $\overline{\mathbb{Q}}\subseteq \overline{\mathbb{Q}_v}$. The following (effective) Diophantine approximation estimate for algebraic numbers will be a crucial tool in our main results. \begin{theorem} \label{ThmMain1} Let $v\in M_\mathbb{Q}$, let $\alpha\in \overline{\mathbb{Q}}^\times$ and let $\epsilon>0$. There is a number $\kappa(v,\alpha, \epsilon)$ depending effectively on $v$, $\alpha$, and $\epsilon$ such that for all $x=b/c\in \mathbb{Q}^\times -\{\alpha\}$ with $b,c$ coprime integers, we have $$ - \log |\alpha-x|_v < (\log^* h(x))\exp\left(\frac{(1+\epsilon)\log^* \mathrm{rad}(bc)}{\log^*_2 \mathrm{rad}(bc)}\log^*_3 \mathrm{rad}(bc) + \kappa(v,\alpha,\epsilon)\right). $$ \end{theorem} This result is deduced from the theory of linear forms in logarithms. In the archimedian case one can use a celebrated result of Matveev \cite{Matveev} while in the $p$-adic case one can use the non-archimedian counterpart due to Yu \cite{Yu}. Actually, rather than directly applying the results of Matveev and Yu (which is a possible approach) we will use a theorem due to Evertse and Gy\"ory (Theorem 4.2.1 in \cite{EGbook}) concerning effective approximations of algebraic numbers by finitely generated subgroups of the multiplicative group of a number field; this result simplifies the argument in the non-archimedian case. The Evertse-Gy\"ory theorem is proved using the aforementioned results of Matveev and Yu, along with some new results from geometry of numbers. \subsection{Application: Subexponential $abc$} Let us recall the $abc$ conjecture of Masser and Oesterl\'e. \begin{conjecture}[$abc$ conjecture] Let $\epsilon>0$. There is a constant $K_\epsilon>0$ such that the following holds: Let $a$, $b$, $c$ be coprime positive integers with $a+b=c$. Then $c< K_\epsilon \cdot \mathrm{rad}(abc)^{1+\epsilon}$. \end{conjecture} Consequences of this conjecture are well-known and discussed elsewhere. Instead, here we will focus on unconditional partial progress on the problem. Under the assumptions of the $abc$ conjecture, let us write $R=\mathrm{rad}(abc)$. Currently, the best unconditional bound in the direction of this conjecture is of exponential nature, proved by Stewart and Yu \cite{ABC3}: \begin{equation}\label{EqnABC3} c< \exp\left( \kappa R^{1/3}(\log R)^3\right) \end{equation} where $\kappa$ is an effective constant. See also \cite{ABC1,ABC2,MurtyPasten} for other (effective) bounds, all of which are exponential on a power of $R$, and see \cite{Gyory} for the currently best bounds in the number field setting. Theorem \ref{ThmMain1} in the archimedian case (thus, only requiring results of Matveev \cite{Matveev}) implies the following effective bound for the $abc$ conjecture which, in several cases, is subexponential. \begin{corollary}[Subexponential $abc$ bounds]\label{CoroSubExpABC} Let $\epsilon>0$. There is a number $\kappa_\epsilon>0$ effectively depending on $\epsilon$ such that the following holds: Let $a$, $b$, $c$ be coprime positive integers with $a+b=c$ and $a<b$. Then $$ c< a\cdot \exp\left(\kappa_\epsilon\cdot R^{(1+\epsilon)(\log^*_3 R )/(\log^*_2 R)}\right) $$ where $R=\mathrm{rad}(abc)$. In particular, if $a< c^{1-\eta}$ for some $\eta>0$, then $$ c <\exp\left(\eta^{-1}\cdot \kappa_\epsilon\cdot R^{(1+\epsilon)(\log^*_3 R )/(\log^*_2 R)}\right). $$ \end{corollary} \subsection{Comparison with other subexponential bounds} For a positive integer $m$ let $\mathscr{P}(m)$ be the largest prime factor of $m$, with $\mathscr{P}(1)=1$. Under some strong conditions on $\mathscr{P}(a)$, $\mathscr{P}(b)$, $\mathscr{P}(c)$ there are other subexponential bounds for the $abc$ conjecture in the literature. In \cite{ABC3}, Stewart and Yu also prove \begin{equation}\label{EqnP} c< \exp( p' R^{\kappa\log^*_3 (R)/\log^*_2(R)} ) \end{equation} where $R=\mathrm{rad}(abc)$, $p'=\min\{\mathscr{P}(a),\mathscr{P}(b), \mathscr{P}(c)\}$ and $\kappa$ is an effective constant. The bound \eqref{EqnP} becomes subexponential on $R$ only when $p'$ is considerably smaller than $R$, namely, when $p'< R^{o(1)}$ with $o(1)$ a function converging to $0$. This last condition is rather restrictive and it depends on the prime factorization of $a$, $b$, and $c$. Over number fields, similar results are given in Theorem 1 of \cite{Gyory08}, proof of Theorem 1 in \cite{Gyory}, and Corollary 7 in \cite{Scoones}. Corollary \ref{CoroSubExpABC} is substantially different in this aspect; it gives a subexponential estimate in a range directly defined by the size of $a$, $b$ and $c$ rather than by their prime factorization. This is relevant since the $abc$ conjecture is precisely an assertion about the prime factorization of $abc$. After this discussion on the $abc$ conjecture, let us now focus on the topic of Vojta's conjecture with truncated counting functions and our main results. \subsection{Diophantine approximation functions} All varieties in this article will be assumed to be geometrically irreducible. This is not restrictive: A smooth irreducible variety over $\mathbb{Q}$ having a $\mathbb{Q}$-rational point is necessarily geometrically irreducible. Let $X$ be a smooth projective variety over $\mathbb{Q}$. We will need some standard functions on rational points of $X$ which play a central role in the study of Diophantine approximation. See \cite{VojtaCIME} for details. A bounded function will be denoted by $O(1)$ and, if necessary, dependence on parameters will be indicated as a subscript. For an invertible sheaf $\mathscr{L}$ on $X$ one has the associated \emph{height} function $h_X(\mathscr{L},-)$ defined on $X(\mathbb{Q})$ up adding to a bounded error term. Given a divisor $D$ on $X$ defined over $\mathbb{Q}$ one can choose a family of \emph{Weil functions} $\lambda_{X,v}(D,-)$ for $v\in M_\mathbb{Q}$, defined on the rational points of $X$ not in $\mathrm{supp}(D)$. The Weil functions are compatible with the height in the following sense: For $x\in X(\mathbb{Q})$ not in $\mathrm{supp}(D)$ one has $$ h_X(\mathscr{O}(D), x) = \sum_{v\in M_\mathbb{Q}} \lambda_{X,v}(D,x) + O(1). $$ If $D$ is an effective divisor, the \emph{truncated counting function} relative to $D$ is $$ N^{(1)}_X(D,x)=\sum_{p} \min\{\lambda_{X,p}(D,x), \log p\} $$ for $x\in X(\mathbb{Q})$ not in $\mathrm{supp}(D)$, where the sum is over primes $p$. For instance, if $x=b/c\in \mathbb{P}^1(\mathbb{Q})$ with $b,c$ coprime integers, then one has $N^{(1)}_{\mathbb{P}^1}(0,x)=\log \mathrm{rad}(b)$ and $N^{(1)}_{\mathbb{P}^1}(\infty,x)=\log\mathrm{rad}(c)$ up to a bounded error. Furthermore, if $1-x=a/c$ then $N^{(1)}_{\mathbb{P}^1}(1,x)=\log \mathrm{rad}(a)$. Thus, the $abc$ conjecture can be equivalently formulated as the following conjectural bound for $x\in \mathbb{P}^1(\mathbb{Q})-\{0,1,\infty\}$: \begin{equation}\label{EqnLogABC} h_{\mathbb{P}^1}(\mathscr{O}(1), x) < (1+\epsilon) N^{(1)}_{\mathbb{P}^1}([0]+[1]+[\infty], x) + O_\epsilon(1). \end{equation} \subsection{Vojta's conjecture with truncated counting functions} The canonical sheaf of a variety $X$ will be denoted by $\mathscr{K}_X$. In \cite{VojtaABC}, Vojta formulated a general Diophantine approximation conjecture involving truncated counting functions. For rational points over $\mathbb{Q}$ it is the following: \begin{conjecture}[Vojta's conjecture] \label{ConjVojta} Let $X$ be a smooth projective variety defined over $\mathbb{Q}$. Let $D$ be a reduced effective normal crossings divisor on $X$ defined over $\mathbb{Q}$. Let $\mathscr{A}$ be an ample line sheaf on $X$ and let $\epsilon>0$. There is a proper Zariski closed set $Z\subseteq X$ depending on the previous data such that for all $x\in X(\mathbb{Q})$ not in $Z$ we have $$ h_X(\mathscr{K}_X\otimes \mathscr{O}(D),x) < N^{(1)}_X(D,x) + \epsilon \cdot h(\mathscr{A},x)+ O(1). $$ The implicit constant in the error term $O(1)$ can depend on all the data except $x$. \end{conjecture} It should be noted that in the special case $X=\mathbb{P}^1$ and $D=[0]+[1]+[\infty]$ one recovers the $abc$ conjecture in its formulation \eqref{EqnLogABC}. For varieties $X$ with $X(\mathbb{Q})$ Zariski dense, the only unconditional results available at this point are for $\mathbb{P}^1$; namely, exponential bounds for the $abc$ conjecture from \cite{ABC1,ABC2,ABC3,MurtyPasten}. Our Corollary \ref{CoroSubExpABC} provides a further result in dimension $1$ and, as we will see, Theorem \ref{ThmMain2} gives an unconditional result for higher dimensional varieties. \subsection{A special case of Vojta's conjecture} Given a smooth projective variety $X$ over $\mathbb{Q}$, an algebraic point $P\in X(\overline{\mathbb{Q}})$, and a place $v\in M_\mathbb{Q}$, we write $\lambda_{X,v}(P,x)$ for the $v$-adic proximity function to $P$; this is $$ \lambda_{X,v}(P,x)=\log^+ (d_{X,v}(P,x)^{-1}) $$ where $\log^+(t)=\log\max\{1,t\}$ and $d_{X,v}(-,-)$ is a $v$-adic distance function on $X(\overline{\mathbb{Q}_v})$, e.g. inherited from a projective embedding. The choice of $d_{X,v}$ only changes $\lambda_{X,v}(P,x)$ by adding a bounded function. Given an ample line sheaf $\mathscr{A}$ on $X$, it is easy to see that there is a constant $M(\mathscr{A},P)>0$ such that for all $x\in X(\mathbb{Q})-\{P\}$ we have $$ \lambda_{X,v}(P,x) < M(\mathscr{A},P)\cdot h(\mathscr{A},x) + O(1). $$ The optimal value of $M(\mathscr{A},P)$ has been the subject of considerable attention in recent years since the work of McKinnon and Roth \cite{MR} linking it to Seshadri constants. Thus we arrive at the following consequence of Vojta's Conjecture \ref{ConjVojta}. \begin{conjecture} \label{ConjMain} Let $X$ be a smooth projective variety defined over $\mathbb{Q}$. Let $D$ be a reduced effective normal crossings divisor on $X$ defined over $\mathbb{Q}$. Let $\mathscr{A}=\mathscr{K}_X\otimes \mathscr{O}(D)$ and suppose that $\mathscr{A}$ is ample. Let let $P\in X(\overline{\mathbb{Q}})$ be an algebraic point. There is a constant $M$ such that for each $v\in M_\mathbb{Q}$ and every $\epsilon>0$ there is a proper Zariski closed set $Z\subseteq X$ with the following property: For all $x\in X(\mathbb{Q})$ not in $Z$ we have $$ \lambda_{X,v}(P,x) < M\cdot N^{(1)}_X(D,x) + \epsilon \cdot h(\mathscr{A},x)+ O(1) $$ where the bounded error term $O(1)$ does not depend on $x$. \end{conjecture} One can discuss what should be the optimal value of $M$ in the previous conjecture, but we will not pursue that direction here. \subsection{Diophantine approximation in higher dimensions} Our main result is: \begin{theorem} \label{ThmMain2} Let $X$ be a smooth projective variety over $\mathbb{Q}$ and let $D_1,...,D_m$ be different prime divisors on $X$ defined over $\mathbb{Q}$. Suppose that $D_1,...,D_m$ are linearly dependent modulo linear equivalence over $\mathbb{Q}$. Let $P\in X(\overline{\mathbb{Q}})$ be an algebraic point not in the support of $D=D_1+...+D_m$. There is a proper Zariski closed subset $Z\subseteq X$ such that for every given $\epsilon>0$ and each place $v\in M_\mathbb{Q}$, the following inequality holds for all $x\in X(\mathbb{Q})$ not in $Z$: \begin{equation}\label{EqnMain2} \lambda_{X,v}(P,x) < (\log^* h_X(\mathscr{O}(D),x))\exp\left(\frac{(1+\epsilon)N^{(1)}_X}{\log^* N^{(1)}_X}\log^*_2 N^{(1)}_X + O(1)\right) \end{equation} where the bounded error term $O(1)$ does not depend on $x$, and $N^{(1)}_X= N_X^{(1)}(D,x)$. \end{theorem} We remark that by Hilbert's theorem 90, a divisor defined over $\mathbb{Q}$ is linearly equivalent to $0$ over $\mathbb{Q}$ if and only if it is linearly equivalent to $0$ over $\mathbb{C}$. \subsection{The linear dependence hypothesis} Naturally, one wants to know when is the linear dependence condition on $D_1,...,D_m$ satisfied in order to be able to apply Theorem \ref{ThmMain2}. It turns out that it is always satisfied provided that $m$ is larger than a constant that only depends on $X$ over $\mathbb{Q}$. To state the result, let us write $\rho(D_1,...,D_m)$ for the rank of the group generated by $D_1,...,D_m$ modulo numerical equivalence and let $\rho_X$ be the Picard rank of $X$. We write $\mathrm{Pic}^0(X/\mathbb{Q})$ for the group of linear equivalence classes of divisors over $\mathbb{Q}$ which are algebraically equivalent to $0$; this is a finitely generated abelian group (see Paragraph \ref{SecDiv} for details). \begin{theorem}\label{ThmRat} Let $X$ be a smooth projective variety over $\mathbb{Q}$ and let $D_1,...,D_m$ be distinct prime divisors on $X$ defined over $\mathbb{Q}$. If $$ m> \mathrm{rank}\, \mathrm{Pic}^0(X/\mathbb{Q}) + \rho(D_1,...,D_m) $$ then the divisors $D_1,...,D_m$ are linearly dependent modulo linear equivalence over $\mathbb{Q}$. In particular, this is the case if $m> \mathrm{rank}\, \mathrm{Pic}^0(X/\mathbb{Q})+\rho_X$. \end{theorem} Regarding Theorem \ref{ThmRat}, in applications it might be useful to note that if the irregularity $q(X)=\dim H^0(X,\Omega^1_X)$ vanishes, then $\mathrm{Pic}^0(X/\mathbb{Q})=(0)$, in which case $m>\rho_X$ suffices. \subsection{Comparison with Conjecture \ref{ConjMain}} In order to clarify the comparison between our results and Conjecture \ref{ConjMain}, from Theorems \ref{ThmMain2} and \ref{ThmRat} we will deduce: \begin{corollary}\label{CoroMain} Let $X$ be a smooth projective variety over $\mathbb{Q}$ and let $D_1,...,D_m$ be different prime divisors on $X$ defined over $\mathbb{Q}$. Suppose that $D_1,...,D_m$ are linearly dependent modulo linear equivalence (which is the case, for instance, if $m> \mathrm{rank}\, \mathrm{Pic}^0(X/\mathbb{Q}) + \rho_X$). Let $P\in X(\overline{\mathbb{Q}})$ be an algebraic point not in the support of $D=D_1+...+D_m$. There is a proper Zariski closed subset $Z\subseteq X$ such that for every given $\epsilon>0$ and every $v\in M_\mathbb{Q}$, the following inequality holds for all $x\in X(\mathbb{Q})$ not in $Z$: \begin{equation}\label{EqnCoroMain} \lambda_{X,v}(P,x) < \exp\left(\epsilon\cdot N_X^{(1)}(D,x) \right) +(\log^* h_X(\mathscr{O}(D),x))^{1+\epsilon} + O(1) \end{equation} where the bounded error term $O(1)$ does not depend on $x$. \end{corollary} We note that $$ (\log^* h_X(\mathscr{O}(D),x))^{1+\epsilon}< \epsilon \cdot h_X(\mathscr{O}(D),x) + O_\epsilon(1) $$ in agreement with Conjecture \ref{ConjMain}. \subsection{A conjectural improvement} Lang and Waldschmidt \cite{Lang, Waldschmidt} have proposed a conjectural improvement on the existing lower bounds for non-vanishing linear forms in logarithms, see Conjecture \ref{ConjLW} for the precise statement. We will show that the Lang-Waldschmidt conjecture implies a version of Conjecture \ref{ConjMain}. \begin{theorem}\label{ThmLW} Assume the Lang-Waldschmidt conjecture (cf. Conjecture \ref{ConjLW}). Let $X$ be a smooth projective variety over $\mathbb{Q}$ and let $D_1,...,D_m$ be different prime divisors on $X$ defined over $\mathbb{Q}$. Suppose that $D_1,...,D_m$ are linearly dependent modulo linear equivalence (which is the case, for instance, if $m> \mathrm{rank}\, \mathrm{Pic}^0(X/\mathbb{Q}) + \rho_X$). Let $P\in X(\mathbb{Q})$ be a rational point not in the support of $D=D_1+...+D_m$. There is a proper Zariski closed subset $Z\subseteq X$ such that for every given $\epsilon>0$ the following inequality holds for all $x\in X(\mathbb{Q})$ not in $Z$: \begin{equation}\label{EqnCoroMain} \lambda_{X,\infty}(P,x) < (1+\epsilon) N_X^{(1)}(D,x) +\epsilon\cdot h_X(\mathscr{O}(D),x) + O(1) \end{equation} where the bounded error term $O(1)$ does not depend on $x$. \end{theorem} \subsection{About the proofs} As mentioned before, the main Diophantine approximation input in our arguments comes from the theory of linear forms in logarithms, more precisely, results of Matveev \cite{Matveev} and Yu \cite{Yu}. From these results we need a consequence due to Evertse and Gy\"ory, namely, Theorem 4.2.1 in \cite{EGbook} (which also needs some new results from geometry of numbers). This will allow us to prove Theorem \ref{ThmMain1} in Section \ref{SecMain1}. An earlier version of this manuscript directly used Matveev's theorem in the archimedian case, and similarly one can use results of Yu in the non-archimedian case, but the theorem of Evertse and Gy\"ory makes the argument go in a smoother way. Theorem \ref{ThmMain2} is proved in Section \ref{SecMain2}. It is deduced from Theorem \ref{ThmMain1} via a geometric construction. Theorem \ref{ThmRat} is also proved in Section \ref{SecMain2}. The numerical condition $m>\mathrm{rank}\, \mathrm{Pic}^0(X/\mathbb{Q})+\rho(D_1,...,D_m)$ in Theorem \ref{ThmRat} appears from a variation of a method of Vojta for producing suitable rational maps, see Chapter 2 in \cite{VojtaThesis}. Finally, the discussion on the Lang-Waldschmidt conjecture is included in Section \ref{SecLW}. \section{Preliminaries} \subsection{More on Diophantine approximation functions} A reference for this paragraph is \cite{VojtaCIME}. A first fact that we will need is functoriality of heights, Weil functions, and truncated counting functions. \begin{lemma} \label{LemmaFunctoriality} Let $f:X\to Y$ be a morphism of smooth projective varieties over $\mathbb{Q}$. \begin{itemize} \item[(i)] Let $\mathscr{L}$ be a line sheaf on $Y$. For all $x\in X(\mathbb{Q})$ we have $$ h_X(f^*\mathscr{L},x)=h_Y(\mathscr{L}, f(x)) + O(1). $$ \item[(ii)] Let $D$ be a divisor on $Y$ defined over $\mathbb{Q}$ and let $v\in M_\mathbb{Q}$. Suppose that $f(X)$ is not contained in $\mathrm{supp}(D)$. Then, for all $x\in X(\mathbb{Q})$ not in $\mathrm{supp}(f^*D)$ we have $$ \lambda_{X,v}(f^*D,x)=\lambda_{Y,v}(D,f(x)) + O(1). $$ \item[(iii)] Let $D$ be an effective divisor on $Y$ defined over $\mathbb{Q}$. Suppose that $f(X)$ is not contained in $\mathrm{supp}(D)$. Then, for all $x\in X(\mathbb{Q})$ not in $\mathrm{supp}(f^*D)$ we have $$ N^{(1)}_X(f^*D,x)=N^{(1)}_X(D,f(x)) + O(1). $$ \end{itemize} \end{lemma} We will also need a comparison between the proximity to an algebraic point and the archimedian Weil function relative to a divisor. \begin{lemma} \label{LemmaProximity} Let $X$ be a smooth projective variety defined over $\mathbb{Q}$, let $D$ be an effective divisor on $X$ defined over $\mathbb{Q}$, and let $P\in X(\overline{\mathbb{Q}})$ be an algebraic point in $\mathrm{supp}(D)$ and let $v\in M_\mathbb{Q}$. Then, for all $x\in X(\mathbb{Q})$ not in $\mathrm{supp}(D)$ we have $$ \lambda_{X,v} (P,x)\le \lambda_{X,v}(D,x)+O(1). $$ \end{lemma} \begin{proof} The $v$-adic distance from $x$ to $\mathrm{supp}(D)$ is at most the $v$-adic distance from $x$ to $P$, and since $D$ is effective, the $v$-adic Weil function relative to $D$ is at least $-\log d_{X,v}(\mathrm{supp} (D),x) + O(1)$ for $x$ near $\mathrm{supp}(D)$. \end{proof} \subsection{Divisors} \label{SecDiv} For the convenience of the reader, in this section we recall several standard facts about divisors on a smooth projective variety. Let $Y$ be a smooth projective variety over $\mathbb{C}$. We write $\mathrm{NS}(Y)$ for the group of divisors modulo algebraic equivalence and $\mathrm{Num}(Y)$ for the group of divisors modulo numerical equivalence. We have a surjection $\mathrm{NS}(Y)\to \mathrm{Num}(Y)$. Severi's basis theorem asserts that $\mathrm{NS}(Y)$ is finitely generated, and the kernel of the surjection $\mathrm{NS}(Y)\to \mathrm{Num}(Y)$ is $\mathrm{NS}(Y)_{tor}$, the torsion part of $\mathrm{NS}(Y)$. The Picard rank of $Y$ is $\rho_Y=\mathrm{rank}\, \mathrm{NS}(Y)=\mathrm{rank}\, \mathrm{Num}(Y)$. The group $\mathrm{Pic}(Y/\mathbb{C})=H^1(Y,\mathscr{O}_Y^\times)$ classifies line sheaves modulo isomorphism, or equivalently, divisors modulo linear equivalence. The group $\mathrm{Pic}^0(Y/\mathbb{C})$ is defined by the exact sequence $$ 0\to \mathrm{Pic}^0(Y/\mathbb{C})\to \mathrm{Pic}(Y/\mathbb{C})\to \mathrm{NS}(Y)\to 0. $$ That is, $\mathrm{Pic}^0(Y/\mathbb{C})$ classifies linear equivalence classes of divisors which are algebraically equivalent to $0$. The group $\mathrm{Pic}^0(Y/\mathbb{C})$ has a natural structure of abelian variety over $\mathbb{C}$ of dimension equal to the irregularity $q(Y)=\dim H^0(Y,\Omega^1_Y)$. Let $X$ be a smooth projective variety defined over $\mathbb{Q}$. Let us write $\mathrm{Pic}^0(X/\mathbb{Q})$ for the group of divisors defined over $\mathbb{Q}$ modulo linear equivalence over $\mathbb{Q}$ or over $\mathbb{C}$, which is the same by Hilbert's theorem 90. Let us write $\mathrm{Pic}^0(X/\mathbb{Q})$ for the subgroup of $\mathrm{Pic}(X/\mathbb{Q})$ of classes which are algebraically equivalent to $0$. Let $Y=X_\mathbb{C}$. There is an abelian variety $P^0_{X/\mathbb{Q}}$ defined over $\mathbb{Q}$, the connected component of the identity of the Picard variety of $X$, satisfying that $\mathrm{Pic}^0(X/\mathbb{Q})$ is a subgroup of $P^0_{X/\mathbb{Q}}(\mathbb{Q})$, and $P^0_{X/\mathbb{Q}}(\mathbb{C})=\mathrm{Pic}^0(Y/\mathbb{C})$. In particular, the group $\mathrm{Pic}^0(X/\mathbb{Q})$ is finitely generated by the Mordell-Weil theorem applied to $P^0_{X/\mathbb{Q}}(\mathbb{Q})$. When $X(\mathbb{Q})\ne \emptyset$ (or more generally, when $X$ is everywhere locally soluble) we have $P^0_{X/\mathbb{Q}}(\mathbb{Q})=\mathrm{Pic}^0(X/\mathbb{Q})$. \subsection{Linear forms in logarithms and approximation} Let $h:\overline{\mathbb{Q}}\to \mathbb{R}$ be the absolute logarithmic height, cf. \cite{VojtaCIME}. In the case of $x=b/c\in \mathbb{Q}$ it agrees with the more elementary height $h(x)=\log\max\{|b|,|c|\}$ for $b,c$ coprime integers. The following result follows from Theorem 4.2.1 in \cite{EGbook}, due to Evertse and Gy\"ory. It follows from bounds for non-vanishing linear forms in logarithms due to Matveev \cite{Matveev} in the archimedian case and Yu \cite{Yu} in the $p$-adic case, combined with some additional results from geometry of numbers. We simply state it in a special case, which is all we need. \begin{lemma}\label{LemmaEG} Let $\Gamma\subseteq \mathbb{Q}^\times$ be a finitely generated multiplicative group with $q_1,...,q_n\in \Gamma$ generators of $\Gamma/\Gamma_{tor}$. Let $\alpha\in \overline{\mathbb{Q}}^\times$ be an algebraic number and let $d$ be its degree. Let $v\in M_\mathbb{Q}$. There is a number $\kappa_0(\alpha,v)>0$ effectively depending on $\alpha$ and $v$ such that for all $x\in \Gamma$ with $x\ne \alpha$ we have $$ -\log |\alpha- x|_v < \kappa_0(\alpha,v)\cdot n(\log^*n)(16ed)^{3n} (\log^*h(x))\prod_{j=1}^n h(q_j). $$ \end{lemma} Theorem 4.2.1 in \cite{EGbook} actually has a term of the form $|1-\beta x|_v$, but choosing $\beta=1/\alpha$ we have $-\log |\alpha- x|_v =-\log|1-\beta x|_v - \log |\alpha|_v$, and $\kappa_0(\alpha,v)$ can absorbe the term $\log |\alpha|_v$. A precise (and not so complicated) value of $\kappa_0(\alpha,v)$ can be deduced from Theorem 4.2.1 in \cite{EGbook}. \section{The case of the projective line}\label{SecMain1} \subsection{Approximations and the radical} \begin{proof}[Proof of Theorem \ref{ThmMain1}] Let $d$ be the degree of $\alpha$. Let $p_1,...,p_n$ be the prime numbers in the support of $x=b/c$, i.e. primes $p$ with $v_p(x)\ne 0$ where $v_p$ is the $p$-adic valuation. In other words, $p_1,...,p_n$ are the primes dividing $bc$. We may assume $n\ge 1$. Let $\Gamma$ be the multiplicative group generated by $p_1,...,p_n$ and $-1$. Then Lemma \ref{LemmaEG} gives $$ -\log |\alpha- x|_v < \kappa_0(\alpha,v)\cdot n(\log^*n)(16ed)^{3n} (\log^*h(x))\prod_{j=1}^n\log p_j. $$ Using the arithmetic-geometric mean inequality on $\prod_j\log p_j$ and the elementary bound $$n(\log^*n)(16e)^{3n}<e^{12n},$$ we see that $$ -\log |\alpha- x|_v < \kappa_1(\alpha,v) \cdot \log^*(h(x)) \cdot \exp\left((12+3\log d)n + n\cdot \log\frac{\log \mathrm{rad}(bc)}{n}\right) $$ where $\kappa_1(\alpha,v)$ is a number that only depends on $\alpha$ and $v$, in an effective way. Let $\epsilon>0$. From analytic number theory (cf. \cite{Robin} for instance) we have that there is an effective $\kappa_2(\epsilon)>0$ depending only on $\epsilon$ such that for all integers $m>\kappa_2(\epsilon)$ we have $$ \omega(m) < \frac{(1+\epsilon)\log m}{\log\log m} $$ where $\omega(m)$ is the number of different prime divisors of $m$. Also, note that the function $t\mapsto t\log(A/t)$ is increasing for $t<A/e$. Therefore, applying these observations with $m=\mathrm{rad}(bc)$ and $\omega(m)=n$, we see that there is an effective $\kappa_3(d,\epsilon)$ depending only on $d$ and $\epsilon$ such that $$ (12+3\log d)n + n\cdot \log\frac{\log \mathrm{rad}(bc)}{n} < \frac{(1+\epsilon)\log \mathrm{rad}(bc)}{\log^*_2 \mathrm{rad}(bc)}\log^*_3\mathrm{rad}(bc) + \kappa_3(d,\epsilon). $$ We deduce $$ -\log |\alpha- x|_v < (\log^*h(x)) \cdot \exp\left(\frac{(1+\epsilon)\log \mathrm{rad}(bc)}{\log^*_2 \mathrm{rad}(bc)}\log^*_3\mathrm{rad}(bc) + \kappa_4(v,\alpha,\epsilon)\right) $$ where $\kappa_4(v,\alpha,\epsilon)$ only depends on $v$, $\alpha$ and $\epsilon$, in an effective way. \end{proof} \subsection{Reformulation on $\mathbb{P}^1$} It will be convenient to reformulate Theorem \ref{ThmMain1} as an approximation statement on $\mathbb{P}^1$ relative to the divisor $D=[0]+[\infty]$. \begin{theorem}[Reformulation of Theorem \ref{ThmMain1}] \label{ThmMain1bis} Let $\alpha\in \mathbb{P}^1(\overline{\mathbb{Q}})-\{0,\infty\}$, let $v\in M_\mathbb{Q}$ and let $\epsilon>0$. There is a number $\kappa(v,\alpha,\epsilon)>0$ depending effectively on $v$, $\alpha$ and $\epsilon$ such that for all $x\in\mathbb{P}^1(\mathbb{Q})-\{0,\alpha,\infty\}$ we have $$ \lambda_{\mathbb{P}^1,v}(\alpha,x)< (\log^* h(x)) \exp\left(\frac{(1+\epsilon)N^{(1)}_{\mathbb{P}^1}}{\log^*N^{(1)}_{\mathbb{P}^1}}\log^*_2 N^{(1)}_{\mathbb{P}^1} + \kappa(v,\alpha,\epsilon)\right) $$ where $N^{(1)}_{\mathbb{P}^1}=N^{(1)}_{\mathbb{P}^1}([0]+[\infty],x)$. \end{theorem} \subsection{Consequences for $abc$} \begin{proof}[Proof of Corollary \ref{CoroSubExpABC}] We apply Theorem \ref{ThmMain1} with $v=\infty$ the archimedian place, $\alpha=1$ and $x=b/c$. One observes that $-\log |1-x|=\log(c/a)$ and then we use \eqref{EqnABC3} (or any of \cite{ABC1,ABC2,ABC3,MurtyPasten}) to get bound $$ \log^*_2h(x) = \log^*_3 c +O(1) < \log^*_2 R + O(1) $$ with an effective error term. In this way we get $$ \log c -\log a < \exp\left(\log^*_2 R + \frac{(1+\epsilon)\log \mathrm{rad}(bc)}{\log^*_2 \mathrm{rad}(bc)}\log^*_3 \mathrm{rad}(bc) +O_\epsilon(1)\right) $$ where the implicit constant effectively depends on $\epsilon$. The result follows. \end{proof} \section{The main result in arbitrary dimension}\label{SecMain2} \subsection{The Main Theorem} \begin{proof}[Proof of Theorem \ref{ThmMain2}] \label{SecMainProof} Since $D_1,...,D_m$ are linearly dependent modulo linear equivalence over $\mathbb{Q}$, there is a non-constant rational function $f:X\dasharrow \mathbb{P}^1$ defined over $\mathbb{Q}$ such that the effective divisor $f^*([0]+[\infty])$ is supported on $D$. Let $E$ be the locus where $f$ is not defined; it has codimension at least $2$ in $X$. We claim that $E$ is contained in $\mathrm{supp}(D)$. Indeed, let $H_0=f^*[0]$ and $H_\infty = f^*[\infty]$; these are linearly equivalent divisors on $X$ supported on $D$. Then $E$ is the base locus of the linear system determined by $f$, which is contained in $\mathrm{supp}(H_0)\cap\mathrm{supp}(H_\infty)\subseteq \mathrm{supp}(D)$. There is a smooth projective variety $\widetilde{X}$ over $\mathbb{Q}$ with morphisms $\pi:\widetilde{X}\to X$ and $\widetilde{f}:\widetilde{X}\to \mathbb{P}^1$ defined over $\mathbb{Q}$ such that the following holds: \begin{itemize} \item[(i)] $\pi$ is an isomorphism above $X-E$, and \item[(ii)] $f\circ \pi= \widetilde{f}$ as rational functions on $\widetilde{X}$. \end{itemize} That is, the triple $(\widetilde{X},\pi,\widetilde{f})$ is a resolution of the rational map $f$. Let $F_0=\widetilde{f}^*[0]$ and $F_\infty=\widetilde{f}^*[\infty]$; these are effective non-zero divisors on $\widetilde{X}$. Notice that $\widetilde{f}^*\mathscr{O}(2)\simeq \mathscr{O}(F_0+F_\infty)$, hence, Lemma \ref{LemmaFunctoriality} shows that for all $x'\in \widetilde{X}(\mathbb{Q})$ \begin{equation}\label{Eqn1} 2h(\widetilde{f}(x')) = h_{\widetilde{X}}(\mathscr{O}(F_0+F_\infty),x')+O(1). \end{equation} Choose $M$ a large enough positive integer such that $M\cdot \pi^*D\ge F_0+F_\infty$, which is possible since $f^*([0]+[\infty])=H_0+H_\infty$ is supported on $D$ and $E\subseteq \mathrm{supp}(D)$. Let $P\in X(\overline{\mathbb{Q}})$ be an algebraic point not in $ \mathrm{supp}(D)$ (hence, not in $E$) and let $P'\in \widetilde{X}(\overline{\mathbb{Q}})$ be its only preimage by $\pi$. Let $\alpha=f(P)=\widetilde{f}(P')\in \mathbb{P}^1(\overline{\mathbb{Q}})$ and notice that $\alpha\ne 0,\infty$ since $f^*([0]+[\infty])$ is supported on $D$ and $E\subseteq \mathrm{supp}(D)$. Let $A$ be the divisor on $\mathbb{P}^1$ constructed from the Galois orbit of $\alpha$; it is defined over $\mathbb{Q}$ and it has $\alpha$ in its support. Let $G=\widetilde{f}^*A$, which is a divisor on $\widetilde{X}$ defined over $\mathbb{Q}$ with $P'$ in its support, and define $$ Z=\mathrm{supp}(D)\cup \pi(\mathrm{supp}(G)) $$ which is a proper Zariski closed subset of $X$. Fix $v\in M_\mathbb{Q}$. For every $x\in (X-Z)(\mathbb{Q})$ there is a unique point $x'\in \widetilde{X}(\mathbb{Q})$ with $\pi(x')=x$, and for such points the following holds (for simplicity, expressions are written up to adding a bounded error term $O(1)$ independent of $x$ and $x'$, and (ii) and Lemma \ref{LemmaFunctoriality} are used several times without mentioning them): \begin{itemize} \item[(a)] By \eqref{Eqn1} and $F_0+F_\infty\le M\cdot \pi^*D$ we have $$ \begin{aligned} 2h(f(x))&=2h(\widetilde{f}(x')) = h_{\widetilde{X}}(\mathscr{O}(F_0+F_\infty),x')\\ &\le h_{\widetilde{X}}(\mathscr{O}(M\cdot \pi^*D), x')= M\cdot h_X(\mathscr{O}(D),x). \end{aligned} $$ \item[(b)] By Lemma \ref{LemmaProximity} and (i) we have $$ \lambda_{X,v}(P,x) = \lambda_{\widetilde{X},v}(P',x') \le \lambda_{\widetilde{X},v}(G,x') = \lambda_{\mathbb{P}^1,v}(A, f(x)). $$ \item[(c)] Let $\alpha_1,...,\alpha_h\in \mathbb{P}^1(\overline{\mathbb{Q}})$ be the Galois conjugates of $\alpha$. Since $f(x)$ can be close to at most one of them in the $v$-adic metric, we have $$ \lambda_{\mathbb{P}^1,v}(A, f(x))=\max_{1\le j\le h}\lambda_{\mathbb{P}^1,v}(\alpha_j, f(x)). $$ \item[(d)] Since $F_0+F_\infty\le M\cdot \pi^*D$ and the truncated counting function only depends on the support of an effective divisor, we find $$ \begin{aligned} N^{(1)}_{\mathbb{P}^1}([0]+[\infty],f(x))&=N^{(1)}_{\widetilde{X}}(F_0+F_\infty,x')\\ &\le N^{(1)}_{\widetilde{X}}(\pi^*D,x') =N^{(1)}_{X}(D,x). \end{aligned} $$ \end{itemize} Let $\epsilon>0$ and, in the notation of Theorem \ref{ThmMain1bis}, let $\kappa'(v,\alpha,\epsilon)=\max_{1\le j\le h} \kappa(v,\alpha_j,\epsilon)$. Define $$ \xi_\epsilon(t)=\exp\left(\frac{(1+\epsilon)t}{\log^*t}\log^*_2 t + \kappa'(v,\alpha,\epsilon)\right). $$ Then, for $x\in (X-Z)(\mathbb{Q})$ we have $$ \begin{aligned} \lambda_{X,v}(P,x) & < \max_{1\le j\le h}\lambda_{\mathbb{P}^1,v}(\alpha_j, f(x)) + O(1) &\mbox{ by (b) and (c)} \\ & < (\log^* h(f(x)))\xi_\epsilon\left(N^{(1)}_{\mathbb{P}^1}([0]+[\infty],f(x))\right) +O(1)& \mbox{ by Theorem \ref{ThmMain1bis}}\\ & < \left(\log^* \left(\frac{M}{2}\cdot h(\mathscr{O}(D),x)+O(1)\right)\right)\xi_\epsilon\left(N^{(1)}_{X}(D,x)+O(1)\right) +O(1)& \mbox{ by (a) and (d).} \end{aligned} $$ We conclude by adjusting the number $\kappa'(v,\alpha,\epsilon)$. \end{proof} \subsection{Linear dependence} \begin{proof}[Proof of Theorem \ref{ThmRat}] Let $r=\mathrm{rank}\, \mathrm{Pic}^0(X/\mathbb{Q})$ and $n=\rho(D_1,...,D_m)$, so that $m>r+n$. Let $\Gamma$ be the group generated by the linear equivalence classes of $D_1,...,D_m$ over $\mathbb{Q}$ or, equivalently, over $\mathbb{C}$. Then $\mathrm{rank}\, \Gamma \le r+n$ by $\ker(\mathrm{NS}(X_\mathbb{C})\to \mathrm{Num}(X_\mathbb{C}))=\mathrm{NS}(X_\mathbb{C})_{tor}$, by the exact sequence $$ 0\to \mathrm{Pic}^0(X_\mathbb{C}/\mathbb{C})\to \mathrm{Pic}(X_\mathbb{C}/\mathbb{C})\to \mathrm{NS}(X_\mathbb{C})\to 0, $$ and by the fact that $\Gamma\le \mathrm{Pic}(X/\mathbb{Q})$. See Paragraph \ref{SecDiv} for details. Since $m>r+n$, the divisors $D_1,...,D_m$ cannot be linearly independent modulo linear equivalence over $\mathbb{Q}$. \end{proof} \subsection{Combining Theorems \ref{ThmMain2} and \ref{ThmRat}} \begin{proof}[Proof of Corollary \ref{CoroMain}] Notice that for any $\epsilon>0$ and positive real numbers $A,B$, we have $AB < A^{1+\epsilon} + B^{1+1/\epsilon}$. Using this inequality twice, we see that \eqref{EqnMain2} implies \eqref{EqnCoroMain}. By Theorem \ref{ThmRat}, the necessary linear dependence condition follows from the given numerical hypothesis on $m$. \end{proof} \section{Remarks on the Lang-Waldschmidt Conjecture}\label{SecLW} \subsection{The Lang-Waldschmidt Conjecture} Let us recall the following conjecture proposed by Lang and Waldschmidt, which predicts a strong archimedian lower bound for non-vanishing linear forms in logarithms. We state it in its multiplicative form. See p.212-217 in \cite{Lang} and Conjecture 2.5 in \cite{Waldschmidt}: \begin{conjecture}[Lang-Waldschmidt 1978] \label{ConjLW} Let $\epsilon>0$. There is a number $C(\epsilon)$ depending only on $\epsilon$ such that for all positive integers $a_1,...,a_n$ and non-zero integers $b_1,...,b_n$ with $a_1^{b_1}\cdots a_n^{b_n}\ne 1$ we have $$ \left|a_1^{b_1}\cdots a_n^{b_n} - 1\right| \ge \frac{C(\epsilon)\max_j |b_j|}{\left|b_1\cdots b_na_1\cdots a_n\right|^{1+\epsilon}}. $$ \end{conjecture} A heuristic for this conjecture is provided in p.212-217 of \cite{Lang}. \subsection{A consequence} \begin{lemma}\label{LemmaLW} Suppose that the Lang-Waldschmidt conjecture holds. Let $\epsilon>0$. For all $x\in \mathbb{P}^1-\{0,1,\infty\}$ we have $$ \lambda_{\mathbb{P}^1,\infty}(1,x) < (1+\epsilon)N^{(1)}([0]+[\infty],x) + \epsilon h(x) + O_\epsilon(1). $$ \end{lemma} \begin{proof} We let $p_1,...,p_n$ be the primes in the support of $x$; we may assume $n\ge 1$ and $x>0$. Let us write $x=p_1^{b_1}\cdots p_n^{b_n}$ with integer non-zero exponents $b_j$. The Lang-Waldschmidt conjecture with the bound $\max_j |b_j|\ge 1$ gives $$ \lambda_{\mathbb{P}^1,\infty}(1,x) < n\cdot c(\epsilon) + (1+\epsilon)\log \prod_{j=1}^n|b_j| + (1+\epsilon)\log Q $$ with $c(\epsilon)=-\log C(\epsilon)$ and $Q=\prod_{j=1}^np_j$. By elementary number theory (e.g. using a bound for the number of divisors of an integer) for each $\delta>0$ we have $$ \log \prod_{j=1}^n|b_j| < \delta \log (p_1^{|b_1|}\cdots p_n^{|b_n|}) + O_\delta(1) \le 2\delta h(x) + O_\delta(1). $$ We notice that for every $\eta>0$ we have $$ n=\omega(Q)< \eta \log Q + O_\eta(1), $$ and $$ \log Q = N^{(1)} ([0]+[\infty],x)+ O(1). $$ Putting these bounds together and adjusting $\epsilon, \delta, \eta$ we get the result. \end{proof} \subsection{The conjectures of Lang-Waldschmidt and Vojta} \begin{proof}[Proof of Theorem \ref{ThmLW}] There is a rational function $f:X\dasharrow \mathbb{P}^1$ with $f^*([0]+[\infty])$ supported on $D$. The indeterminacy locus of $f$ is contained in $\mathrm{supp}(D)$ and we may multiply $f$ by a suitable rational number to achieve $f(P)=1$. After this point, the proof goes in exactly the same way as the proof of Theorem \ref{ThmMain2} (cf. Section \ref{SecMainProof}), using Lemma \ref{LemmaLW} instead of Theorem \ref{ThmMain1}. \end{proof} \section{Acknowledgments} This research was supported by ANID (ex CONICYT) FONDECYT Regular grant 1190442 from Chile. I heartily thank K\'alm\'an Gy\"ory for valuable feedback on a first version of this manuscript and for suggesting to use Theorem 4.2.1 \cite{EGbook} instead of \cite{Matveev, Yu}, which led to a more streamlined presentation.
\section{Introduction}\label{sec1} Fast Radio Bursts (FRBs) are energetic radio transients with duration time of the order of millisecond and typical radiation frequency of $\sim$ GHz \citep{Lorimer2007, Thornton2013, Petroff2015, Petroff2016}. Although some models have been proposed to explain the physics of the pulse and some of these events are associated with magnetars \citep{Bochenek2020}, the origin of the FRBs emission remains unknown~\citep{Petroff2021}. Since the value of the dispersion measure observed (DM) is greater than the one expected from the Milky Way contribution, FRBs are thought to be extragalactic events or even of cosmological origin \citep{Dolag2015}. The origin of the pulse is confirmed when it is possible to identify its host galaxy and, consequently, its redshift. The first FRB was discovered by the Parkes Telescope in 2007 and was named FRB 010724 \citep{Lorimer2007}. After that, more than one hundred FRBs have been discovered \citep{Petroff2016, CHIME}. These events can be divided in two groups according to if they are repeating or nonrepeating. Apparently, most of the bursts found are nonrepeating \citep{Amiri, Rajwade}. If one can identify the host galaxy of the bursts, we can use the dispersion measure ($DM$) versus redshift ($DM-z$) relation of these events as a tool to study the underlying cosmology. In fact, FRBs have been used to constrain cosmological parameters \citep{Walters2018, Wei2018}, such as the Hubble parameter $H(z)$ \citep{Wu2020} and Hubble constant $H_{0}$ \citep{Hagstotz, Wu2021}, to probe the anisotropic distribution of baryon matter in Universe \citep{Lin2021}, as well as to constrain the fraction of baryon mass in the intergalactic medium (IGM) \citep{Li2019, Wei2019, Li2020}. One issue that restricts the application of FRBs in cosmology is the uncertainties on the evolution of the fraction of baryon mass in the IGM ($f_{IGM}$) and its degeneracy with the cosmological parameters. In this concern, some studies have been performed to discuss the baryon distribution in the IGM using both numerical simulations \citep{Cen1999, Cen2006, Meiksin2009} and observations \citep{Fukugita2004, Shull2012, Hill2016}. For instance, in ref.~\citep{Meiksin2009} the authors performed numerical simulations and found that about $90 \%$ of the baryons produced by the Big Bang are contained within the IGM at $z \geq 1.5 $ (i.e., $f_{IGM} \approx 0.9$) whereas in ref. \citep{Shull2012}, the baryons existent in the collapsed phase at $z \geq 0.4 $ represent $18 \pm 4 \%$ or, equivalently, $f_{IGM} \approx 0.82$. From these results one may infer that the $f_{IGM}$ grows with redshift. Other recent analyses have pointed out that if a sample of FRBs can be localized, so their luminosity distance $d_{L}$ can be determined \citep{Gao2014, Wei2018, Li2019}. In this paper, we propose a new model-independent method to constrain a possible evolution of $f_{IGM}(z)$ directly from observations of FRBs dispersion measure $DM(z)$ and $d_{L}$ from type Ia supernovae (SNe) data. In our analysis, we use a subsample of 17 FRBs with known redshifts \citep{FRB180916, FRB201124, FRB190608, FRB190523_2, FRB121102, FRB20191228, FRB190102, FRB180924, FRB181112, FRB190614, FRB190523_1} along with the Pantheon SNe catalogue~\citep{Scolnic}. We consider both constant and time-dependent parameterizations for $f_{IGM}$ and discuss the observational viability of them through a Bayesian model selection analysis. We organized this paper as follows. In Section \ref{sec2} we introduce our method to study the evolution of $f_{IGM}$ with redshift. The data sets used in the analysis and their application are presented and discussed in Section \ref{sec3}. We present our main results in Sec. \ref{sec4}. We end the paper in Sec. \ref{sec5} by discussing our main conclusions. \section{A new method to determine the baryon fraction} \label{sec2} \subsection{Dispersion Measure} The observed $DM$ of a FRB is a combination of several components \citep{Deng2014, Gao2014}: \begin{equation} \label{DMobs} DM_{obs} (z) = DM_{MW} + DM_{IGM}(z) + DM_{host}(z), \end{equation} where the subscripts MW, IGM and host denote contributions from the Milky Way, IGM, and the FRB host galaxy, respectively. The observed $DM$ of a FRB is directly measured from the corresponding event while the $DM$ of the Milky Way has a contribution from the Milky Way interstellar medium (ISM) and from the Milky Way halo, estimated by the relation $DM_{MW} = DM_{MW, ISM} + DM_{MW, halo}$ \citep{Macquart2020}. $DM_{MW, ISM}$ can be well constrained using models of the ISM galactic electron distribution in the Milky Way from pulsar observations \citep{Taylor1993, Cordes2002, Yao2017} whereas the Milky Way halo contribution is not well constrained yet. In our analysis, we follow \citep{Macquart2020} and assume $DM_{MW,halo} = 50$ pc/cm$^{3}$ . Subtracting the Galaxy contribution from the observation of $DM$ we define the observed extragalactic $DM$ as \begin{equation} \label{DMext_obs} DM_{ext}(z) \equiv DM_{obs}(z) - DM_{MW}\;, \end{equation} so that, using Eq. \ref{DMobs}, the theoretical extragalactic $DM$ can be calculated as \begin{equation}\label{DMext_th} DM_{ext}^{th}(z) \equiv DM_{IGM}(z) + DM_{host}(z)\;, \end{equation} where both terms on the right hand side are described as follows. The redshift evolution of $DM_{host}(z)$ is given by \cite{Deng2014, Ioka2003}: \begin{equation}\label{DMhost} DM_{host}(z) = \frac{DM_{host,0}}{(1+z)}\;, \end{equation} where the $(1+z)$ factor accounts for the cosmic dilation. The host galaxy contribution, $DM_{host,0}$, is a poorly known parameter, as it depends on the type of the galaxy, the relative orientations of the FRBs spurce with respect to the host and source, and the near-source plasma \citep{Xu2015}. Therefore, the host galaxy contribution $DM_{host,0}$ will be considered a free parameter in our analysis. On the other hand, the average dispersion measure from IGM can be written as function of the redshift as \citep{Deng2014} \begin{equation}\label{DMigm} DM_{IGM}(z)=\frac{3c\Omega_{b}H_{0}^{2}}{8\pi Gm_{p}} \int_{0}^{z} \frac{(1+z')f_{IGM}(z')\chi(z')}{H(z')}dz'\;, \end{equation} where $c$ is the speed of light, $\Omega_{b}$ is the present-day baryon density parameter, $H_0$ is the Hubble constant, $G$ is the gravitational constant, $m_{p}$ is the proton mass, $f_{IGM}(z)$ is the baryon fraction in the IGM, $H(z)$ is the Hubble parameter at redshift $z$ and the free electron number fraction per baryon is given by \begin{equation} \chi(z) = Y_{H}\chi_{e,H}(z) + Y_{He}\chi_{e,He}(z)\;. \end{equation} The terms $Y_{H} = 3/4$ and $Y_{He} = 1/4$ are the mass fractions of hydrogen and helium, respectively, while $\chi_{e,H}(z)$ and $\chi_{e,He}(z)$ are the ionization fractions of hydrogen and helium, respectively. At $z < 3$ hydrogen and helium are fully ionized ($\chi_{e,H}(z) = \chi_{e,He}(z) = 1$) \citep{Meiksin2009, Becker2011}, so that we have $\chi(z) = 7/8$. From the above equations, one can constrain a possible evolution of the baryon fraction by modelling both $DM_{host,0}$ and $DM_{IGM}$ and comparing the theoretical predictions with the observed values of $DM_{ext}$. \subsection{$f_{IGM}(z)$ from FRB and SNe observations} As mentioned earlier, one of the aspects that restricts the application of FRBs in cosmology is the uncertainties on the evolution $f_{IGM}$ with redshift. In order to investigate this matter further, we assume in our analysis two parameterizations for this quantity: \begin{subequations}\label{par} \begin{equation} \label{const} f_{IGM}=f_{IGM,0}\;, \end{equation} \begin{equation} \label{variable} f_{IGM}= f_{IGM,0} + \alpha \frac{z}{1+z}\;. \end{equation} \end{subequations} The parameter $f_{IGM,0}$ is the present value of $f_{IGM}$ whereas $\alpha$ quantifies a possible evolution of $f_{IGM}$. In our analysis both are free parameters and since $f_{IGM}$ is understood to be an increasing function of the redshift, $\alpha$ assumes only positive values ($\alpha \geq 0$). Hereafter, we explicit the $DM_{IGM}$ expression for both cases. Considering the general case in which $f_{IGM}(z)$ is a function of redshift, one can calculate Eq.~(\ref{DMigm}) by parts: \begin{equation}\label{general} DM_{IGM}(z)= A \left[ f_{IGM}(z) \frac{d_{L}(z)}{c} - \int_{0}^{z} \frac{d_{L}(z')}{(1+z')c}f_{IGM}(z') dz' - \int_{0}^{z} \frac{d_{L}(z')}{c}f'_{IGM}(z') dz' \right]\;, \end{equation} where $A= \frac{21c\Omega_{b}H_{0}^{2}}{64\pi Gm_{p}}$, $f'_{IGM}(z) = {df_{IGM}(z) \over dz}$ and \begin{equation}\label{dl} d_{L}(z)=c(1+z) \int_{0}^{z} \frac{dz'}{H(z')} \end{equation} is the luminosity distance. Now replacing parameterization (\ref{variable}) in the above expression we obtain \begin{align}\label{IGM_model3} DM_{IGM}(z)= A &\left[\left( f_{IGM,0} + \alpha \frac{z}{1+z} \right) \frac{d_{L}(z)}{c} - \left(f_{IGM,0} + \alpha \right)\int_{0}^{z} \frac{d_{L}(z')}{c(1+z')} dz' \right]\;. \end{align} For the constant case (\ref{const}), we follow the same steps above and find \begin{equation}\label{constant} DM_{IGM}(z) = A f_{IGM,0} \left[\frac{d_{L}(z)}{c} - \int_{0}^{z} \frac{d_{L}(z')}{(1+z')c} dz' \right]\;. \end{equation} Note that the last term of Eqs.~(\ref{IGM_model3}) and (\ref{constant}) are equal and can be numerically solved as (see \cite{Holanda2013}): \begin{equation}\label{soma} \int_{0}^{z} \frac{d_{L}(z')}{(1+z')c} dz' = \frac{1}{2c}\sum_{i=1}^{N} \left( z_{i+1}-z_{i}\right) \left[\frac{d_{L}(z_{i+1})}{(1+z_{i+1})} + \frac{d_{L}(z_{i})}{(1+z_{i})} \right]\;. \end{equation} Therefore, using estimates of $d_L(z)$ from SNe observations, it is possible to constrain the evolution of $f_{IGM}(z)$ with redshift from the above expressions. \begin{table*} \centering \caption{Properties of FRB with known host galaxies} \begin{tabular}{ c c c c c c} \hline Name & Redshift $z$ & $DM_{MW, ISM}$ & $DM_{obs}$ & $\sigma_{obs}$ & Reference\\ & & [pc/cm$^{3}$] & [pc/cm$^{3}$] & [pc/cm$^{3}$] & \\ \hline FRB 180916B & 0.0337 & 200.0 & 348.8 & 0.2 &\cite{FRB180916}\\ FRB 201124A & 0.098 & 123.2 & 413.52 & 0.5 &\cite{FRB201124}\\ FRB 190608B & 0.1178 & 37.2 & 338.7 & 0.5 &\cite{FRB190608}\\ FRB 200430A & 0.16 & 27.0 & 380.25 & 0.4 &\cite{FRB190523_2}\\ FRB 121102A & 0.19273 & 188.0 & 557.0 & 2.0 &\cite{FRB121102}\\ FRB 191001A & 0.234 & 44.7 & 506.92 & 0.04 &\cite{FRB190523_2}\\ FRB 190714A & 0.2365 & 38.0 & 504.13 & 2.0 &\cite{FRB190523_2}\\ FRB 20191228A & 0.2432 & 33.0 & 297.5 & 0.05 & \cite{FRB20191228}\\ FRB 190102C & 0.291 & 57.3 & 363.6 & 0.3 &\cite{FRB190102}\\ FRB 180924B & 0.3214 & 40.5 & 361.42 & 0.06 &\cite{FRB180924}\\ FRB 20180301A & 0.3305 &152.0 & 536.0 & 8.0 & \cite{FRB20191228}\\ FRB 20200906A & 0.3688 & 36.0 & 577.8 & 0.02 & \cite{FRB20191228}\\ FRB 190611B & 0.378 & 57.83 & 321.4 & 0.2 &\cite{FRB190523_2}\\ FRB 181112A & 0.4755 & 102.0 & 589.27 & 0.03 &\cite{FRB181112}\\ FRB 190711A & 0.522 & 56.4 & 593.1 & 0.4 &\cite{FRB190523_2}\\ FRB 190614D & 0.6 & 83.5 & 959.2 & 5.0 &\cite{FRB190614}\\ FRB 190523A & 0.66 & 37.0 & 760.8 & 0.6 &\cite{FRB190523_1, FRB190523_2}\\ \hline \end{tabular} \label{tab:FRB} \end{table*} \section{Data and Methodology}\label{sec3} \indent In order to discuss the evolution of the baryon fraction, we use observational data for the dispersion measures and luminosity distance. The former is obtained directly from FRBs measurements whereas the latter comes from SNe observations. Currently, there are 19 FRBs events with localised host galaxy and redshifts (for details of FRBs caralogue \footnote{http://www.frbcat.org} see \citep{Petroff2016} and for host database \footnote{https://frbhosts.org/} see \citep{FRB190523_2}). In our analysis, we use a sample of 17 FRBs within the redshift interval $0.0337 \leq z \leq 0.66$, which constitutes the most up-to-date FRB data set currently available~\citep{FRB180916, FRB201124, FRB190608, FRB190523_2, FRB121102, FRB20191228, FRB190102, FRB180924, FRB181112, FRB190614, FRB190523_1}. Our subsample excludes the repeating burst FRB 20200120E \citep{Bhardwaj2021} at $z = -0.0001$, observed in the direction of M81 and the FRB 20181030A \citep{Bhardwaj2021_2} since there is no SNe in the Pantheon catalogue near its redshift ($z = 0.0039$). The main properties of these 17 FRB events are shown in Table \ref{tab:FRB}, namely: redshift, $DM_{MW, ISM}$, $DM_{obs}$ and observed $DM$ error of all localised FRBs. The values of $DM_{MW, ISM}$ are estimated from the NE2001 model \citep{Cordes2002}. From Table \ref{tab:FRB}, we can calculate our observational quantity, $DM_{ext}$, using Eq.~(\ref{DMext_obs}), whose uncertainty is given by \begin{equation} \sigma_{ext}^{2} = \sigma_{obs}^{2} + \sigma_{MW}^{2}\;, \end{equation} where the average galactic uncertainty $\sigma_{MW}$ is assumed to be 10 pc/cm$^{3}$ \citep{Manchester2005}. In order to obtain measurements of $d_L(z)$, we use the distance moduli ($\mu(z)$) data obtained from current SNe Ia observations. This quantity is related to $d_L(z)$ by \begin{equation} \label{mz} \mu(z) = m_{B} - M_{B} = 5\log_{10}\left[ \frac{d_{L}(z)}{1\mbox{Mpc}}\right] + 25, \end{equation} where $m_{B}$ is the apparent magnitude of SNe, and, in our analysis, we fix the absolute peak magnitude at $M_{B} = -19.214 \pm 0.037$ mag, as given by \citep{Riess2019}. The data set used for SNe is the Pantheon catalogue \citep{Scolnic}, which comprises 1048 SNe within the redshift range $0.01 < z < 2.3$. In order to work with the equations derived in the previous section, we perform a Gaussian Process (GP) reconstruction of the Pantheon data to obtain estimates of $d_{L}(z)$ at the same redshifts of the FRBs (for details of GP reconstructions we refer the reader to \citep{2012JCAP...06..036S,javier} and references therein)\footnote{An alternative approach is to define a redshift interval centered at the redshifts of each FRB and calculate the average values of $d_{L}(z)$ from the SNe data within the interval. We verified this approach and obtained results (not shown here) very similar to the ones derived through the GP reconstruction.}. Summarizing, the steps of our analysis are the following: first, we calculate $DM_{ext} (z_{i})$ observed and $\sigma_{ext} (z_{i})$ using the FRBs dataset. Second, the luminosity distance is calculated at the same $DM_{ext}$ redshift, using the GP reconstruction of Pantheon catalogue. The integral given by Eq.~(\ref{soma}) is then calculated with the SNe data, considering that the redshift limit of the sum ($z_{L}$) must be equal to the redshift of the FRB ($z_{L} = z_{i}$). Finally, we use the Monte Carlo Markov Chain (MCMC) method to fit the free parameters of our analysis, i.e., $f_{IGM}$ and $DM_{host,0}$ in the constant case of Eq. (\ref{const}) and $f_{IGM,0}$, $\alpha$ and $DM_{host,0}$ for parameterization (\ref{variable}). The MCMC analysis is performed with the emcee sample \citep{Foreman-Mackey2013}, and to be consistent with our choice of $M_B$ in Eq. (\ref{mz}) -- since we are also interested in model-independent approach -- we adopt the value of the Hubble constant from the SH0ES collaboration, $H_{0} = 74.03 \pm 1.4$ kms$^{-1}$Mpc$^{-1}$ \citep{Riess2019}. We also assume $\Omega_{b}h^{2} = 0.02235 \pm 0.00037$, as reported by \citep{Cooke2018} \section{Results}\label{sec4} \indent In Fig. \ref{mcmc_constant}, we show the posterior probability density function and $1-2 \sigma$ constraint contours of the free parameters ($f_{IGM,0}$, $\alpha$, $DM_{host,0}$) for the constant case (left Panel) and the time-dependent parameterization (right Panel). We also present in Table \ref{results} the results for the baryon fraction for both cases. For the constant case, we obtain $f_{IGM,0} = 0.881 \pm 0.012$ and the estimate for the host galaxy contribution $DM_{host,0} = 131.0 \pm 5.2$ pc/cm$^{3}$, both at $1\sigma$ level. The result for the baryon fraction is in good agreement with previous results obtained from observations \citep{Fukugita1998, Fukugita2004, Shull2012, Hill2016} and numerical simulations \citep{Cen1999, Cen2006, Hagstotz}. For the time-dependent case, we obtain $f_{IGM,0} = 0.221 \pm 0.065$ ($1\sigma$) for the present value of the baryon fraction and $\alpha = 2.77 \pm 0.27$ ($1\sigma$). We also estimate the host galaxy contribution at $DM_{host,0} = 208.2 \pm 9.1$ pc/cm$^{3}$ ($1\sigma$). We note that the values of $f_{IGM,0}$ and $\alpha$ do not show agreement with other recent studies that used the same parameterization (\ref{variable}) -- see e.g. \citep{Wei2019, Dai2021}. We believe that such discrepancy may be primarily related to the fact that these works do not consider the contribution of the host galaxy $DM_{host}$ as a free parameter in their analyses, as well as to the more up-to-date FRB data used in our analysis. \begin{figure*} \begin{center} \includegraphics[width=0.49\textwidth]{constant_case.pdf} \includegraphics[width=0.49\textwidth]{variable_case.pdf} \caption{{\it{Left:}} Constraints on the baryon fraction $f_{IGM}$ and the mean host galaxy contribution of dispersion measure $DM_{host,0}$ considering the constant case (\ref{const}). {\it{Right:}} Constraints on the present-day baryon fraction $f_{IGM,0}$, $\alpha$ and the mean host galaxy contribution of dispersion measure $DM_{host,0}$ for the time-dependent parameterization (\ref{variable}).} \label{mcmc_constant} \end{center} \end{figure*} \begin{table*}[] \centering \caption{Estimates of the parameters $f_{IGM,0}$, $\alpha$ and $DM_{host,0}$ for the two parameterizations considered in the analysis.} \begin{tabular}{ c c c c } \hline & $f_{IGM,0}$ & $\alpha$ & $DM_{host,0}$ [pc/cm$^{3}$]\\ \hline Constant & 0.881 $\pm$ 0.012 & - & 131.0 $\pm$ 5.2 \\ Time-dependent & 0.221 $\pm$ 0.065 & 2.77 $\pm$ 0.27 & 208.2 $\pm$ 9.1\\ \hline \end{tabular} \label{results} \end{table*} Another important aspect of the above results concerns the observational evidence for a evolution of the baryon fraction $f_{IGM}$ with redshift. In order to evaluate the two cases studied and quantify such evidence, we perform a Bayesian model comparison. This kind of analysis offers a way to assess if the extra complexity of a given model or parameterization (here represented by the parameter $\alpha$) is required by the data, preferring the model that describes the data well over a large fraction of their prior volume (see e.g.~\cite{Trotta2008, Trotta2017} for a detailed discussion). By defining the evidence as the marginal likelihood of the models, we calculate the Bayes’ factor $B_{ij}$: \begin{equation} B_{ij} = \frac{\mathcal{E}_{i}}{\mathcal{E}_{j}}, \end{equation} where $\mathcal{E}_{i}$ and $\mathcal{E}_{j}$ correspond to the evidence of parameterizations $\mathcal{P}_{i}$ and $\mathcal{P}_{j}$, respectively. We adopted the Jeffreys’ scale \cite{Jeffreys} to interpret the values of $\ln{B_{ij}}$ for the reference parameterization $\mathcal{P}_{j}$: $\ln{B_{ij}} = 0 - 1$ , $\ln{B_{ij}} = 1 - 2.5$, $\ln{B_{ij}} = 2.5 - 5$, and $\ln{B_{ij}} > 5$ indicate, respectively, an inconclusive, weak, moderate and strong preference of the parameterization $\mathcal{P}_{i}$ with respect to $\mathcal{P}_{j}$. Negative values of $\ln{B_{ij}}$ mean preference in favour of $\mathcal{P}_{j}$. We use the MultiNest algorithm \cite{MultiNest1, MultiNest2, MultiNest3} to compute the Bayesian evidence ($\ln \mathcal{E}$) and then calculate the Bayes' factor. Adopting the constant case (\ref{const}) as reference, we obtain $\ln \mathcal{E}_{j} = -797.713 \pm 0.007 $ and $\ln \mathcal{E}_{i} = -744.983 \pm 0.007$ for the reference and time-dependent cases, respectively, which results in $\ln B_{ij} = 52.73 \pm 0.01 $. Therefore, our analysis clearly shows a strong evidence in favor of the time-dependent parameterizarion (\ref{variable}) with respect to the constant case (\ref{const}), with the interval of values of the parameters $f_{IGM,0}$, $\alpha$ and $DM_{host,0}$ given by Table \ref{results}. \section{Conclusions}\label{sec5} \indent A proper understanding of the evolution of the baryon fraction in the intergalactic medium ($f_{IGM}$) is one of the main issues concerning the use of FRB observations as a cosmological test. In this paper, following previous studies (see e.g. \citep{Li2019} ) but proposing a completely different approach, we presented a cosmological model-independent method for estimating the evolution of $f_{IGM}$ and the local value of the host-galaxy DM using current measurements of luminosity distance from SNe observations and dispersion measures for FRBs. Following the semi-analytical method described in Sec. 2, in which $DM_{IGM}(z)$ is written in terms of $d_{L}(z)$, we investigated the current constraints on the baryon fraction considering two different behaviours for this quantity, which are expressed by the constant and time-dependent parameterizations given by Eqs.~(\ref{par}). We used 17 FRB observations, the most up-to-date data currently available, and a GP reconstruction of 1048 SNe from the Pantheon catalogue to perform a MCMC analysis considering the host galaxy contribution for the dispersion measure $DM_{host,0}$ as a free parameter. For the constant case, we found $f_{IGM,0} = 0.881 \pm 0.012$ and $DM_{host,0} = 131.0 \pm 5.2$ pc/cm$^{3}$ ($1\sigma$) whereas for the time-dependent case we obtained $f_{IGM,0} = 0.221 \pm 0.065$, $\alpha = 2.77 \pm 0.27$, and $DM_{host,0} = 208.2 \pm 9.1$ pc/cm$^{3}$ at $1\sigma$ level. In order to evaluate the observational viability of the two cases considered in the analysis we also performed a Bayesian model comparison. Our results showed a clear and strong evidence ($\ln B_{ij} = 52.73 \pm 0.01$ at 1$\sigma$) in favor of a increasing evolution of $f_{IGM}$ with redshift. Finally, it is worth mentioning that current and planned observational programs, such as the Canadian Hydrogen Intensity Mapping Experiment (CHIME)~\citep{CHIME} are expected to detect several thousands of FRBs in the next years. These observations will improve significantly the constraints on $f_{IGM}$ from the method proposed here, bringing important information about the matter distribution in the universe as well as demonstrating the potential of FRBs observations for precision measurements of cosmological parameters. \section*{Acknowledgements} TL acknowledges financial support from the Coordena\c{c}\~ao de Aperfei\c{c}oamento de Pessoal de N\'{\i}vel Superior (CAPES). JSA is supported by Conselho Nacional de Desenvolvimento Cient\'{\i}fico e Tecnol\'ogico (CNPq 310790/2014-0) and Funda\c{c}\~ao de Amparo \`a Pesquisa do Estado do Rio de Janeiro (FAPERJ) grant 259610 (2021).
\section{Introduction} During CT-guided medical interventions, surgeons and patients are exposed to harmful X-radiation. Keeping the dose low is essential but also results in high noise or streaking artifacts in the reconstructions. \citet{ernst2022} proposed the Primal-Dual UNet, based on Primal-Dual Network~\cite{adler2018}, for sparse view parallel and fan beam CT reconstruction. In medical interventions, however, surgeons make use of cone beam CT for imaging. Therefore, the main contributions of this work are: (i) modifying the network to process cone beam projections and (ii) reconstruct entire volumes instead of axial slices. \section{Methods} The network architecture used in this work is a modified Primal-Dual UNet~\cite{ernst2022}. The two-dimensional convolutions of the dual space blocks were replaced with their three-dimensional counterparts. The two-dimensional UNet in the primal space was replaced with a three-dimensional UNet by replacing convolutions, batch normalizations, average poolings and linear upsamplings with their three-dimensional counterparts. Instead of the parallel or fan beam projection layer, a cone beam geometry (detector: $310\times240$px, $1.232$mm pixel size; SID=$160$mm; SDD=$400$mm) on a circular trajectory was used. The FBP reconstruction layer was replaced with its FDK counterpart. For comparability, the data normalization, the $L_1$ loss function, the Adam optimizer (lr=1e-3, $\beta_1$=0.9, $\beta_2$=0.999) and the number of epochs (151) were kept the same. The effective batch size was set to 16. Training data was simulated by downsampling LungCT-Diagnosis~\cite{lungct-diagnosis} volumes (42/9/10 for training/validation/test) to cubes with side lengths of $128\mathrm{px}=128\mathrm{mm}$ due to memory limitations. Random flips, rotations and scalings of the volumes were used as augmentation during training. Sparse views were simulated by retaining every 8th or 16th of 360 equiangular projections (called \textit{Sparse 8} or \textit{Sparse 16}, respectively). \section{Results} \begin{table}[htbp] \floatconts {tab:metrics}% {\caption{Mean and standard deviation over all axial test slices for \textit{Sparse 16}.}}% {\begin{tabular}{lccc} \bfseries Model/Method & \bfseries SSIM [\%] & \bfseries PSNR [dB] & \bfseries RMSE [HU]\\ FDK & 43.54\textpm 8.27 & 17.92\textpm 2.64 & 388.57\textpm 108.15\\ FDKConvNet & 67.37\textpm 8.99 & 24.72\textpm 1.93 & 177.30\textpm 60.94\\ Primal-Dual Network & 69.87\textpm7.66 & 25.19\textpm 2.08 & 169.22\textpm 64.35\\ Primal-Dual UNet & 78.76\textpm 7.50 & 27.93\textpm 2.33 & 128.89\textpm 57.78\\ \end{tabular}} \end{table} \noindent\tableref{tab:metrics} shows the results of the different models evaluated on the test set. All models outperform the direct sparse view FDK reconstruction by a large margin, while the Primal-Dual models further increase the quality compared to FDKConvNet~\cite{jin2017}. The proposed Primal-Dual UNet results in the lowest errors. Wilcoxon signed-rank tests reveal that the proposed model significantly outperforms any other model/method pair-wise (p-value $<0.5\%$). \begin{figure}[htbp] \floatconts {fig:example} {\caption{Exemplary axial slice from different models/methods.}} { \includegraphics[width=\linewidth]{figure.eps} } \end{figure} \figureref{fig:example} shows an exemplary axial slice from the different models for \textit{Sparse 8} (top row) and \textit{Sparse 16} (bottom row). FDKConvNet does not seem to have learned anatomical structures and merely attempts to suppress streaking artifacts. Primal-Dual Network produces results that look blurrier with more low frequency noise than FDKConvNet's outputs but anatomical structures, e.g. costal cartilage, are preserved better. The reconstructions of Primal-Dual UNet are superior compared to Primal-Dual Network. Tissues with high attenuation coefficients are clearly distinguishable from soft tissues and edges are well preserved, e.g. vertebrae, even for the higher sparsity factor \textit{Sparse 16}. \section{Discussion and Conclusion} The proposed Primal-Dual UNet for cone beam reconstruction not only outperforms other methods -- Primal-Dual Network in particular -- in quality but also in memory requirements and is more than twice as fast during both training and inference while retaining data consistency wrt. the cone beam projections, as opposed to FDKConvNet. Moreover, the training of the proposed network is much more stable compared to Primal-Dual Network. However, the main limitation is still the memory consumption: with enabled mixed precision, the inference takes $\sim$9GB of GPU RAM for even these unrealistically low resolution volumes and projections and a batch size of 1. Training consumes even more space: a \textit{Sparse 4} version of Primal-Dual Network did not even fit into the 48GB of an Nvidia RTX A6000. Since usually, not the entire volume needs to be reconstructed during an intervention, future work will focus on reducing the memory requirements by only reconstructing volumes of interest. Moreover, this preliminary work is based on simulations and has to be evaluated for real cone beam CT data. The Pytorch implementation is available on Github\footnote{\url{https://github.com/phernst/pd-unet-conebeam}}. \midlacknowledgments{This work was supported by the ESF (project no. ZS/2016/08/80646).}
\section{Introduction} Local probes constitute a powerful toolkit for experimental solid state physics. Non-invasive local probes of electronic properties range from the well-known Scanning Tunneling Microscopy (STM) \cite{Tersoff1985Jan,Chen-STM-book} to Microwave Impedance Microscopy (MIM) \cite{Rosner2002, Lai2008}. Non-invasive local probes of thermal properties have now emerged, such as scanning thermal microscopy~\cite{Gomes2015}, providing a new window into dissipative processes in quantum transport~\cite{Halbertal2016}. Invasive local probes include scanning gate microscopy (SGM), which probes the spatial structure of inhomogeneous 2D electron gases by measuring changes in global transport properties induced by a local electrostatic perturbation (a charged tip)~\cite{Sellier2011}. Unfortunately, it cannot probe systems with high electron density (metals or superconductors) because they screen out its electrostatic potential very efficiently. Our idea is to circumvent this difficulty by applying a local thermal perturbation. Here we propose a novel local probe: the main idea is to create a local hot spot by applying a microwave drive to a small metallic tip placed near the sample, and to subsequently measure the global transport properties of the sample. Such a probe would be complementary to the SGM which produces an electrostatic perturbation, and to the MIM which does not modify the sample's properties. The local heating probe might prove especially suitable for probing thin films of strongly disordered superconductors, where local heating can create a small normal region. Indeed, while single-electron STM probes the local superconducting gap~\cite{Sacepe2011} and Andreev state microscopy probes the global superconducting phase coherence~\cite{Dubouchet2019}, a local suppression of superconductivity allows one to map out where the supercurrent is flowing in the sample. One can do this by observing if suppressing the superconductivity at a given point affects the global super-current or not. This is especially important in view of the potential application of strongly disordered superconductors as superinductance, a key element of superconducting circuit-based quantum technology \cite{Hazard2019,Peruzzo2021}. \begin{figure} \includegraphics[width=0.45\textwidth]{figure1.pdf} \caption{Proposed experiment: the ac driven scanning tip creates a hot spot on the surface, where the superconductivity is locally suppressed. When the tip passes over places where the supercurrent is flowing, it suppresses this current, thereby providing a map of the supercurrent flow.} \label{fig_setup} \end{figure} The probe's spatial resolution is improved by a fundamental physics effect that we find; a local overheating bistability for subgap microwave frequencies. It occurs because only quasiparticles get heated by the microwaves, but not the condensate. Hence, while quasiparticles are rare, the superconductor remains cold, and they remain rare. However, once the number of quasiparticles exceeds a threshold, the gap shrinks and the microwave can break the Cooper pairs, generating more quasiparticles, allowing more heating. This heating is opposed by heat dissipation to phonons, and heat conduction away from the hot spot. This leads to two different (hot and cold) stable steady states in the hot spot, similarly to a global bistability previously known for spatially uniform microwave fields~\cite{Zharov1992, deVisser2010, Thompson2013}. However, we show a {\it spatially local} bistability can exist so long as the thermal conductivity is not too big. The bistability means there is a sudden domain-wall-like switch from the hotter to the colder steady state at a certain distance from the center of the irradiated region, giving the hot spot a sharp boundary. Thus the spatial resolution of the microwave tip is determined by the temperature relaxation length of the sample (the domain wall width), which can be significantly smaller ($\sim20\:\mbox{nm}$) than the hot spot radius, of the order of the tip size ($\sim100\:\mbox{nm}$). \section{Model} We consider a tip at a distance $z_0$ above a strongly disordered superconductor (such as InO$_x$ or NbN) with short coherence length~$\xi$. We assume $\xi$ to be smaller than other length scales of the problem (the tip-plane distance~$z_0$ and the thermal relaxation length~$\Lambda$ defined later), and adopt a model where the superconducting gap~$\Delta$ and the quasiparticle distribution function at each point~$\vec{r}$ correspond to a local equilibrium with a position-dependent electron temperature $T_{\rm e}(\vec{r})$. This implies fast electron-electron collisions and leaves out microwave-induced non-equilibrium effects~\cite{Eliashberg1972, Chang1977, deVisser2014, Semenov2016, Tikhonov2018}. The phonon temperature $T_\mathrm{ph}$ in the layer is assumed to be fixed by the cryostat, due to a good contact with the substrate. This simple model, with its standard ingredients, contains only three material parameters: the normal state conductivity~$\sigma_N$, the superconductor critical temperature~$T_c$, and the electron-phonon cooling strength. They all are assumed to be the same as in the bulk material, so the role of the layer thickness~${d}$ is only to relate bulk and surface quantities. Taking $T_{\rm e}(\vec{r})$ as constant across the layer's thickness, gives a two-dimensional heat transport equation; \begin{align} c(T_{\rm e})d\,\frac{\partialT_{\rm e}}{\partial{t}}={}&\boldsymbol{\nabla}\cdot[\mathcal{K}(T_{\rm e}){d}\,\boldsymbol{\nabla}T_{\rm e}]-Q(T_{\rm e},T_\mathrm{ph}){d}+ {}\nonumber\\ {}&{}+ \mathcal{H}(r)\,\frac{I_0^2}{8\pi^2}\Re\frac{1}{\sigma(\omega,T_{\rm e}){d}}. \label{eq:HeatTransport} \end{align} We only consider the stationary state ($\partialT_{\rm e}/\partial t=0$), so the specific heat $c(T_{\rm e})$ drops out. The bulk electronic thermal conductivity $\mathcal{K}(T_{\rm e})$ is the textbook expression~\cite{Landau1981,Abrikosov} (see Appendix~\ref{sec:MattisBardeen}); it is $T_{\rm e}\sigma_N/e^2$ multiplied by a function of only $T_{\rm e}/T_c$, and it reduces to the Wiedemann-Franz law for $T_{\rm e}>T_c$. $Q(T_{\rm e},T_\mathrm{ph})$ is the power per unit volume, transferred from electrons to phonons. We adopt the standard model of electrons coupled to acoustic phonons~\cite{Chang1977} in which the effective electron-phonon coupling is $\alpha^2(\Omega)\,F(\Omega)\propto\Omega^{n-3}$ for phonon energy~$\Omega$. In particular, $n=5$ when the electron mean free path is much larger than the typical phonon wavelength, and $n=6$ in the opposite limit~\cite{Tsuneto1961,Schmid1973,Reizer1986,Sergeev2000, Catelani2010,Shtyk2013,Savich2017,Vodolazov2017,Nikolic2020}. In the normal state this model yields $Q(T_{\rm e},T_\mathrm{ph})=\Sigma(T_{\rm e}^n-T_\mathrm{ph}^n)$ with a material-dependent coefficient~$\Sigma$. The expression for $Q(T_{\rm e},T_\mathrm{ph})$ in the superconductor is rather bulky and given in Appendix~\ref{sec:MattisBardeen}; for each~$n$, $Q(T_{\rm e},T_\mathrm{ph})$ is given by $\Sigma{T}_c^n$ multiplied by a universal function of $T_{\rm e}/T_c$ and $T_\mathrm{ph}/T_c$. Our results for $n=5$ and $n=6$ are qualitatively similar, as expected~\cite{Catelani2019}; the parameter important for our problem is the differential electron-phonon heat conductance at $T_{\rm e}=T_\mathrm{ph}=T_c$, $\partial{Q}(T_{\rm e},T_\mathrm{ph})/\partialT_{\rm e}|_{T_{\rm e}=T_\mathrm{ph}=T_c}=n\Sigma{T}_c^{n-1}$, which also defines a crucial length scale in our analysis; the thermal relaxation length $\Lambda\equiv[\mathcal{K}(T_c)/(n\Sigma{T}_c^{n-1})]^{1/2}$. \begin{table}[] \centering \begin{tabular}{|c|c|c|c|c|c|} \hline & ~$T_c$, K~ & ~$1/\sigma_N$, $\Omega\,\mbox{m}$~ & ~$n$~ & ~$\Sigma$, $\mbox{W}\,\mbox{K}^{-n}\,\mbox{m}^{-3}$~ & ~$\Lambda$, nm~ \\ \hline InO$_x$ & 3.5 & $5\times10^{-5}$ & 6 & $2 \times 10^9$ & 17 \\ \hline NbN & 10.0 & $4\times 10^{-6}$ & 5 & $5 \times 10^9$ & 16 \\ \hline \end{tabular} \caption{Material parameters used for the numerical calculations, typical for InO$x$ and NbN \cite{Ovadia2009, Baeva2021}. } \label{tab:parameters} \end{table} The last term of Eq.~(\ref{eq:HeatTransport}) represents Joule heating of the electrons in the layer by the near-field microwaves at frequency~$\omega$. We parametrize its strength by~$I_0$, the amplitude of the total ac displacement current, flowing through the effective capacitor formed by the tip and the layer, due to the applied microwave voltage. The function $\mathcal{H}(r)$ is determined by the spatial distribution of the induced surface currents in the layer; its exact form depends on the tip shape. Still, for any axially symmetric tip whose radius $R_\mathrm{tip}$ does not strongly exceed the tip-sample distance~$z_0$, $\mathcal{H}(r)$ has the same qualitative form: $\mathcal{H}(r=0)=0$, it reaches a maximum value $\sim1/z_0^2$ at $r\sim{z}_0$, and decays at $r\gg{z}_0$. In the calculations we use the expression corresponding to a spherical tip of radius $R_\mathrm{tip}\ll{z}_0$ (see Appendix~\ref{sec:microwave}) \begin{equation} \mathcal{H}(r)=\frac{r^2}{(z_0^2+r^2)(\sqrt{z_0^2+r^2}+z_0)^2}. \end{equation} The 2D conductivity $\sigma(\omega,T_{\rm e}){d}$ of the layer also appears in Eq.~(\ref{eq:HeatTransport}), with the bulk conductivity $\sigma(\omega,T_{\rm e})$ given by the standard Mattis-Bardeen expression~\cite{Mattis1958} (see Appendix~\ref{sec:MattisBardeen}). Typical material parameters for two commonly used disordered superconductors, NbN and InO$_x$, are given in Table~\ref{tab:parameters}. \section{Bistability in absence of heat conduction} It is instructive to start with the local version of Eq.~(\ref{eq:HeatTransport}), setting $\mathcal{K}=0$. Then, at each point $\vec{r}$, the electron temperature $T_{\rm e}$ is found from the algebraic equation \begin{equation}\label{eq:HeatBalance} j^2\Re\frac1{\sigma(\omega,T_{\rm e})} = Q(T_{\rm e},T_\mathrm{ph}), \end{equation} with $j^2=I_0^2\mathcal{H}(r)/(8\pi^2d^2)$. Equation~(\ref{eq:HeatBalance}) contains only bulk quantities, and is analogous to the heat balance equation for a superconductor in a spatially uniform microwave field. For that problem, the heat balance equation may have two stable solutions for $T_{\rm e}$ \cite{Zharov1992, deVisser2010, Thompson2013}. The peculiar $T_{\rm e}$ dependence of the heating term on the left-hand side of Eq.~(\ref{eq:HeatBalance}), sketched in Fig.~\ref{fig_illustrate_bistability}, is a rather common origin for bistabilities related to electron overheating. In our case, it is due to the physics of quasiparticle heating, summarized in the Introduction. As a result, Eq.~(\ref{eq:HeatBalance}) has three solutions for $T_{\rm e}$, as sketched in Fig.~\ref{fig_illustrate_bistability}; only the high- and the low-temperature solutions are stable, the middle one is unstable. Fig.~\ref{fig_illustrate_bistability} shows that $j^2$ controls the vertical scale of the heating curve, so the bistability disappears if $j^2$ is too large or too small. \begin{figure} \includegraphics[width=0.45\textwidth]{figure2.pdf} \caption{A sketch of the $T_{\rm e}$ dependence of the heating and cooling power, the two sides of Eq.~(\ref{eq:HeatBalance}) (red solid and blue dashed curves, respectively). The crossings between the two curves represent the multiple solutions of Eq.~(\ref{eq:HeatBalance}) for~$T_{\rm e}$. Solutions in the yellow region correspond to the normal state. } \label{fig_illustrate_bistability} \end{figure} When $\hbar\omega$ and the solutions for $T_{\rm e}$ are all of the order of $T_c$, the typical scale of $j$ which governs the bistability, is ${j}_*=\sqrt{\sigma_N\Sigma{T}_c^n}$. It is the current density needed to maintain the electrons at $T_{\rm e}=T_c$ when the phonons are at $T_\mathrm{ph}=0$. It is important that $j_*\ll{j}_c$, the critical current density; this condition is necessary to justify the calculation of the dissipated power using the linear response conductivity. The condition $j_*\ll{j}_c$ is naturally satisfied when electron-phonon coupling is weak. Indeed, we obtain $j_*/j_c\sim\sqrt{\hbar/(T_c\tau_\mathrm{ph})}$, using (i) the expression $j_c\approx1.5\,\sigma_N[\Delta_0/(2e)](\hbar{D}/\Delta_0)^{-1/2}$ \cite{Annunziata2010} with $2\Delta_0\approx3.53\,T_c$ being the zero-temperature gap and $D$~the electron diffusion coefficient, (ii) the Einstein relation $\sigma_N=2N_0e^2D$ with $N_0$ being the density of states per spin at the Fermi level, and (iii) that $\Sigma{T}_c^n\sim{N}_0T_c^2/\tau_\mathrm{ph}$ where $\tau_\mathrm{ph}$ is the time the electron with energy $\sim{T}_c$ spends before emitting a phonon. The ratio $j_*/j_c$ must necessarily be small in any material well-described as a gas of electronic quasiparticles. \begin{figure} \includegraphics[width=0.48\textwidth]{figure3.pdf} \caption{Bistability under a spatially uniform microwave drive. (a)~$T_{\rm e}$~as a function of the driving current $j$ for different microwave frequencies $\omega$ and $T_\mathrm{ph}/T_c=0.3$. The curves can have three branches (indicated for the red solid curve) corresponding to three solutions, $T_\mathrm{l}(j)<T_\mathrm{u}(j)<T_\mathrm{h}(j)$, the middle one being unstabkle. Solutions in the yellow region correspond to the superconductor going normal. Solid and dashed curves correspond to electron-phonon cooling exponents $n=5$ and $n=6$, respectively. (b)~The phase diagram in the $(\omega,j)$ plane for $n=5$ and $T_\mathrm{ph}/T_c=0.8$. The white regions have one stable state, superconducting (SC) or normal, as indicated. The pink/green regions have two stable states of the types indicated (there is no region where both states are normal). Inset: the same plot for $T_\mathrm{ph}/T_c=0.3,\,0.6,\,0.8$ (solid, dashed, and dotted curves, respectively). } \label{figure_uniform_bist} \end{figure} Fig.~\ref{figure_uniform_bist} shows the results of numerical solutions of Eq.~(\ref{eq:HeatBalance}). The curves are universal when plotted in the appropriate units ($T_c$ and $j_*$), i.e., valid for any material with the electron-phonon cooling exponent $n=5$ or $n=6$. We see that they are very weakly sensitive to whether $n=5$ or $n=6$. The bistable region exists only for frequencies below $2\Delta(T_\mathrm{ph})$, the gap at~$T_\mathrm{ph}$. At low frequencies, (i)~it is bounded from below by the current $j_*\sqrt{1-(T_\mathrm{ph}/T_c)^n}$, (ii)~it extends to high currents $\propto1/\omega^2$ since $\Re[1/\sigma(\omega,T_{\rm e})]\propto\omega^2$ is small. Of course, at high currents the validity of the theory is limited by the condition $j\ll{j}_c$, which is not included in the model. The high-temperature solution lies below $T_c$ only in a small part of the bistable region with $j<j_*\sqrt{1-(T_\mathrm{ph}/T_c)^n}$; at higher~$j$, the high-temperature solution is normal. \section{Bistability in the full problem} Returning to the steady state of the full Eq.~(\ref{eq:HeatTransport}), we consider $j=j(r)=I_0\sqrt{\mathcal{H}(r)/(8\pi^2d^2)}$ which vanishes at $r\to0,\infty$, and reaches a maximum $j_\mathrm{max}\approx0.120\,I_0/(z_0d)$ at $r_\mathrm{max}\approx1.27\,z_0$. Then, for given $\hbar\omega/T_c$ and $T_\mathrm{ph}/T_c$, the solutions are determined by two dimensionless parameters, $j_\mathrm{max}/j_*$ and $\Lambda/z_0$. Dividing Eq.~(\ref{eq:HeatTransport}) by $nd\Sigma{T}_c^n$ and measuring $r$ in the units of $z_0$, we cast the last two terms of Eq.~(\ref{eq:HeatTransport}) [those entering Eq.~(\ref{eq:HeatBalance})] in the dimensionless parameters ($T_{\rm e}/T_c$ and $j/j_*$) at each~$r$, while the gradient term is proportional to $(\Lambda/z_0)^2$. From the values in Table~\ref{tab:parameters} we see that $\Lambda\sim20\:\mbox{nm}$ can be significantly smaller than $z_0\sim100\:\mbox{nm}$. The total power, needed to maintain $j_\mathrm{max}=j_*$, is given by the spatial integral of the last term in Eq.~(\ref{eq:HeatTransport}), $5.5\,\Sigma{T}_c^nz_0^2d\,\ln[(4\pi\sigma_N/\omega)(d/z_0)]$ (see Appendix~\ref{sec:microwave}). This gives a few nanowatts for InO$_x$ and a few microwatts for NbN of thickness $d=10\:\mbox{nm}$ and $z_0=100\:\mbox{nm}$. For $\Lambda/z_0\to0$, the stationary profile $T_{\rm e}(r)$ is determined by the simple mapping of $j(r)/j_*$ to the $j/j_*$ axes on Fig.~\ref{figure_uniform_bist}. Let $\hbar\omega/T_c$ and $T_\mathrm{ph}/T_c$ be such that the uniform system is bistable in the interval $j_1<j<j_2$ with some $j_1,j_2$; that is, Eq.~(\ref{eq:HeatBalance}) has three solutions $T_\mathrm{l}(j)<T_\mathrm{u}(j)<T_\mathrm{h}(j)$ (see Fig.~\ref{figure_uniform_bist}a) for $j_1<j<j_2$, only $T_\mathrm{l}(j)$ for $j<j_1$, and only $T_\mathrm{h}(j)$ for $j>j_2$. Thus, for $j_\mathrm{max}<j_1$, only the solution $T_\mathrm{l}(j(r))$ is possible for any~$r$. For $j_1<j_\mathrm{max}<j_2$, there are three local solutions $T_\mathrm{l}\big(j(r)\big)<T_\mathrm{u}\big(j(r)\big)<T_\mathrm{h}\big(j(r)\big)$ in an interval of $r$ around $r_\mathrm{max}$ where $j(r)>j_1$, so the dependence $T_{\rm e}(r)$ consists of a low-temperature branch and a disconnected closed contour [dotted curve curve in Fig.~\ref{fig_solutions}(a)]. For $j_\mathrm{max}>j_2$, only the $T_\mathrm{h}(j(r))$ solution is possible around $r_\mathrm{max}$, where $j(r)>j_2$, but there are two regions with three solutions on both sides [dotted curve in Fig.~\ref{fig_solutions}(b)]. Thus the system must switch between the stable low- and high-temperature local solutions creating a ``domain wall'' (whose width is vanishing in the limit $\Lambda/{z}_0\to0$) at some position~$r$ on each side of $r_\mathrm{max}$. This position can be found by noting that any global stable stationary solution of Eq.~(\ref{eq:HeatTransport}) represents a minimum of a certain functional $\mathcal{F}[T_{\rm e}(\vec{r})]$, explicitly given in Appendix~\ref{sec:functional}. Minimizing the functional with respect to the domain wall position~$R$, we identify it as the point where $j(R)$ satisfies the condition \begin{align} &\int_{T_\mathrm{l}(j(R))}^{T_\mathrm{u}(j(R))}\left[Q(T,T_\mathrm{ph})-\Re\frac{j^2(R)}{\sigma(\omega,T)}\right]\mathcal{K}(T)\,dT={}\nonumber\\ &{}=\int_{T_\mathrm{u}(j(R))}^{T_\mathrm{h}(j(R))}\left[\Re\frac{j^2(R)}{\sigma(\omega,T)} -Q(T,T_\mathrm{ph})\right]\mathcal{K}(T)\,dT, \label{eq:domain_wall} \end{align} which resembles the Maxwell construction (equal-area rule) for the Van der Waals isotherms. This construction is valid for $\Lambda/z_0\to 0$, but it remains qualitatively correct for realistic values of $\Lambda/z_0$, as we will see below. Then for $j_\mathrm{max}>j_2$, the system has only one global solution for $T_\mathrm{e}(r)$. However, it is the underlying local bistability that causes the domain walls in that solution, whose width $\Lambda$ can be significantly smaller than the size of the hot spot (solid black curve in Fig.~\ref{fig_solutions}b). This rapid spatial variation of $T_{\rm e}(\vec{r})$ will be useful for creating a local thermal perturbation of the system with sub-micron resolution. Intriguingly, $T_{\rm e}$ exceeds $T_c$ in a ring, leaving a small superconducting core precisely below the tip. In contrast, for $j_1<j_\mathrm{max}<j_2$ the disconnected low-temperature branch $T_\mathrm{l}(r)$ represents a stable global solution of Eq.~(\ref{eq:HeatTransport}) in the limit $\Lambda/z_0\to0$. In addition, there is another stable solution with two domain walls. Then, the system exhibits a global bistability [multiple solutions of Eq.~(\ref{eq:HeatTransport}) for the whole profile~$T_{\rm e}(r)$], inherited from the local bistability (multiple solutions of Eq.~(\ref{eq:HeatBalance}) for $T_{\rm e}$ at a given point~$r$). The global bistability is accompanied by a hysteretic behaviour of $T_{\rm e}(r)$ as one changes the microwave strength, $j_\mathrm{max}/j_*$. \begin{figure} \includegraphics[width=0.48\textwidth]{figure4.pdf} \caption{Solid curves are numerical solutions of Eq.~(\ref{eq:HeatTransport}) for $\Lambda/z_0=0.16$, $n=5$, $T_\mathrm{ph}/T_c=0.3$, $\hbar\omega/T_c=2$. $j_\mathrm{max}/j_*=1.2$ (a) or 1.8 (b). The superconductor goes normal whenever these curves are in the yellow region. In (a) there are three solutions; high $T_\mathrm{e}$ (red), unstable (green), and low $T_\mathrm{e}$ (blue), in (b) there is only one solution (black). Dotted curves are the $\Lambda/z_0=0$ solutions of Eq.~(\ref{eq:HeatBalance}) at each $r$. Domain walls between the low- and the high-$T_\mathrm{e}$ solutions for $\Lambda/z_0\to 0$ (vertical lines ) are given by Eq.~(\ref{eq:domain_wall}), but are broadened for $\Lambda/z_0=0.16$. } \label{fig_solutions} \end{figure} Finite $\Lambda/z_0$ causes a broadening of the domain walls; the solid curves in Fig.~\ref{fig_solutions} show this for realistic parameters. Fig.~\ref{fig_solutions_z0} shows that increasing $\Lambda/z_0$ causes the high-temperature and unstable solutions to approach each other, and annihilate at a certain $\Lambda/z_0$ (e.g., $\Lambda/z_0\approx0.6$ for the parameters in Fig.~\ref{fig_solutions_z0}). The low-temperature solution survives at larger $\Lambda/z_0$. because it is favoured by the faster heat evacuation from the below the tip. \begin{figure} \includegraphics[width=0.48\textwidth]{figure5.pdf} \caption{Solid curves the same as in Fig.~\ref{fig_solutions}a, and dotted curves have larger $\Lambda/z_0$. The high $T_\mathrm{e}$ (red) and unstable (green) solutions approach each other as $\Lambda/z_0$ increases, so they meet and annihilate at a given $\Lambda/z_0$ (here $\Lambda/z_0\approx0.6$), leaving only the low $T_\mathrm{e}$ (blue) solution at higher $\Lambda/z_0$.} \label{fig_solutions_z0} \end{figure} \section{Local heating with a hot tip} Finally, we briefly discuss another possible setup, when the sample is heated not by the external microwave drive, but by thermal radiation from the tip, held at high temperature~$T_\mathrm{tip}$. The corresponding microwave field can be modelled by that of a thermally fluctuating magnetic dipole, as discussed in detail in Appendix~\ref{sec:thermal}. The heating power is then given by an integral over all frequencies. Crucially, both the typical frequency and the strength of the microwave field are controlled by the same parameter $T_\mathrm{tip}$, while in the previous setting the microwave strength $I_0$ and frequency~$\omega$ could be controlled independently. For typical material parameters, to produce a noticeable change in~$T_{\rm e}$, one needs $T_\mathrm{tip}\gg{T}_c$. Then the heating is due to absorption of photons with $\omega\gg{T}_c/\hbar$, so it is not sensitive to the superconductivity. This results in a single solution, a smooth profile $T_{\rm e}(r)$ exceeding $T_\mathrm{ph}$ in a region whose size is a few~$z_0$ at least. Moreover, for realistic parameters, its effect is too weak to locally destroy the superconductivity (unless $T_\mathrm{ph}\to{T}_c$), so it would be a much worse local probe than a tip with microwave driving. \section{Conclusions} We propose a local thermal probe based on a submicron-sized hot spot created in a thin superconducting layer by microwave radiation produced by a small metallic tip. Our simple model shows how the electron temperature is locally driven away from the substrate (phonon) temperature, assuming the electrons remain in local thermal equilibrium among themselves. We have shown that the hot spot can have two possible stable states, similarly to a bulk bistability, discussed earlier for spatially uniform microwave fields. We have identified the superconductor's thermal relaxation length $\Lambda$, and shown that global bistability requires $\Lambda\lesssim{z}_0$, the tip-sample distance (or the tip size, if larger). This is the case for strongly disordered superconductors such as NbN or InO$_x$. Then the hot spot has a sharp boundary corresponding to a domain wall between two local stable solutions. The hot spot temperature can be tuned to locally destroy the superconductivity. We thus propose it as a scanning probe with sub-micron resolution, ideal for mapping out where the supercurrent flows in such disordered superconductors. \acknowledgments We thank B. Sac\'ep\'e, H. Sellier, and K. Tanigaki for illuminating discussions. This work is supported by the project TQT (ANR-20-CE30-0028) of the French National Research Agency (ANR).
\section{Introduction} There has been a widespread adoption of cloud-based machine learning platforms recently, such as Amazon Sagemaker \cite{joshi2020amazon}, Google AutoML \cite{bisong2019google}, and Microsoft Azure \cite{team2016azureml}. They allow companies and application developers to easily build and deploy their AI applications as a Service (AIaaS).However, the users of AIaaS services may encounter two major challenges. 1) \textbf{Large Data Requirement}: Deep Learning models usually require large amounts of training data. This training data needs to be uploaded to the cloud services for the developers to build their models, which may be inconvenient and infeasible at times. 2) \textbf{Data Privacy Concerns}: Sharing data with untrusted servers may pose threats to end-user privacy. For instance, a biometric authentication application deployed in the cloud will expose user photos to a third-party cloud service. To address the \textit{large data requirement} problem, there has been increasing research on the approaches that require less amount of training data, popularly known as Few-Shot Learning \cite{Wang2019FewshotLA}. Specifically, metric-based few-shot classification methods \cite{snell_prototypical_2017, vinyals_matching_2016, oreshkin_tadam:_2018, sung_learning_2017, yoon_tapnet:_2019} learn to map images of unseen classes into distinct embeddings that preserve the distance relation among them and then perform classification of the input query image by the distance to the class embeddings. Recent works have been able to achieve up to $\sim$90\% accuracy on the challenging task of 5-way 5-shot classification on the MiniImageNet dataset \cite{leaderboard}. Despite the success and promises of few-shot learning, it is imperative to address the \textit{data privacy concerns} to protect user-supplied sensitive data, e.g., when a metric-based few-shot model is deployed in a cloud server (Fig.~\ref{fig:thread_model}). \begin{figure} \centering \includegraphics[width=0.9\linewidth]{figures/threat_model.png} \caption{Threats in a cloud-based few-shot model. 1) attacks on training data~\cite{fredrikson2015model, shokri2017membership} and 2) exposure of sensitive dataset to untrusted cloud server for inference.} \label{fig:thread_model} \vspace{-0.75cm} \end{figure} \begin{figure*}[ht!] \centering \includegraphics[width=0.9\textwidth]{figures/cloud_server_updated.png} \caption{\textbf{Few-Shot Private Image Classification in the Cloud:} A denoising network is first trained with non-user data and deployed in the cloud. Using a privacy preserving method (2), a user can obfuscate clean training images (1) to obtain noisy training images (3). These images are then sent to the cloud server where they are first denoised and then encoded (4) to be stored as privacy-preserved embeddings on the server (5). A user can obfuscate the clean test image (6) and query the server using a noisy test image (8) to obtain a prediction (12). } \label{fig: cloud} \vspace{-0.5cm} \end{figure*} Several privacy-preserving approaches may be adopted in machine learning applications, including cryptography, differential privacy, and data obfuscation. Recent works~\cite{cabrero2021sok} adopted cryptographic techniques to protect the confidentiality of data. {For example, remote machine learning services can provide results on encrypted queries~\cite{cabrero2021sok}; a range of primitives, such as Homomorphic Encryption, may be adopted to manage the encrypted data. Despite promising results, crypto-based methods inflict high computational overheads, creating challenges for practical deployment. Furthermore, such solutions may breach privacy by disclosing the exact computation results, and an adversary may utilize the model's output to launch inference attacks on training data~\cite{fredrikson2015model,shokri2017membership}. } {Differential privacy~\cite{dwork2014privacybook} has been adopted to train machine learning models while providing indistinguishability guarantees for individual records in the training set~\cite{abadi_deep_2016}. However, the strong privacy guarantees tend to reduce the model performance and have shown disparate impacts on the underrepresented classes~\cite{disparateML}. In contrast, data obfuscation methods achieve privacy protection without inflicting high computational costs, e.g., image blurring and pixelization. Obfuscation can be applied to protecting both training and testing data, and can provide differential privacy guarantees at individual-level data~\cite{fan_image_2018}. } This paper focuses on the privacy of testing data (support+query) specifically for few-shot learning. A few-shot model built for clean images exhibits poor performance when tested with noisy/private image data. This is because meta-learning based few-shot models do not work well with out-of-distribution tasks \cite{finn_model-agnostic_2017, snell_prototypical_2017, parnami2022learning}. Therefore, applying the obfuscation methods to the image data and simply using an off-the-shelf pre-trained few-shot model leads to degradation in performance, as observed in our experiments (Fig. \ref{fig:results} Baseline Model). Hence, it is imperative to study privacy specifically in context of few-shot learning. To this end, we suggest a private few-shot learning approach trained on noisy data samples as illustrated in Fig.~\ref{fig: cloud}. Adopting an obfuscation mechanism on the local input data samples, a user transfers privacy-encoded data to the cloud. The proposed jointly-trained, denoised embedding network, the \textit{Denoising Network}, constructs privacy-preserved latent space for robust few-shot classification. To validate the proposed approach, we examine four privacy methods including traditional obfuscation methods such as Pixelization and Blurring, which do not provide quantifiable privacy guarantees~\cite{McPherson2016DefeatingIO}, and also Differentially Private Pixelization (DP-Pix) \cite{fan_image_2018} which provides differential privacy guarantees. This study examines practical implications for a holistic private few-shot learning framework on an untrusted service platform, which has not been studied previously. Thus, our main contributions are 1) first proposing a unified framework for deploying few-shot learning models in the cloud while protecting the privacy of user-supplied sensitive data and 2) thoroughly examining privacy methods on three different datasets of varying difficulty, therefore 3) discovering and observing the existence of the effective privacy-preserved latent space for few-shot learning. \section{Few-Shot Learning} Few-shot learning is a subfield of machine learning that focuses on the ability of machine learning models to generalize from few-training examples. The recent progress in the field has largely come from a machine learning technique called meta-learning \cite{finn_model-agnostic_2017}. The idea is to train a model on numerous different but similar kinds of tasks such that the model can generalize on a new test task (as long as the test task is from the same distribution of the tasks the model was initially trained on). There are three kinds of Few-shot learning: Metric-based, optimization-based, and model-based \cite{vinyals}. Here we only discuss metric-based techniques and refer the reader to our survey paper \cite{parnami2022learning} for further reading. The early nominal works in metric-based few-shot learning methods are: Prototypical Networks \cite{snell_prototypical_2017}, Matching Networks \cite{vinyals_matching_2016}, Relation Networks \cite{sung_learning_2017} etc. In all these methods, the network learns to encode embeddings of input images such that images that belong to same class are closer to each other and those from different class are farther apart, where the idea of closeness is defined in terms of a metric such as euclidean. \subsection{Few-Shot Classification} \label{FSC} We base our framework (Fig.~\ref{fig: cloud}) on Prototypical Networks \cite{snell_prototypical_2017} for building our \textbf{Few-Shot Private Image Classification (FS-PIC)} model. The model is trained on a labeled dataset $D_{train}$ and tested on $D_{test}$. The set of classes present in $D_{train}$ and $D_{test}$ are disjoint. The test set has only a few labeled samples per class. We follow an episodic training paradigm in which each episode the model is trained to solve an $N$-way $K$-Shot private image classification task. Each episode $e$ is created by first sampling $N$ classes from the training set and then sampling two sets of examples from these classes: (1) the support set $S_{e} = \{(s_{i},y_{i})\}_{i=1}^{N \times K}$ containing $K$ examples for each of the $N$ classes and (2) the query set $Q_{e} = \{(q_{j} , y_{j} )\}_{j =1}^{N \times H}$ containing $H$ different examples from the same $N$ classes. The episodic training for the FS-PIC task minimizes, for each episode, the loss on the prediction of samples in the query set, given the support set. The model is a parameterized function, and the loss is the negative log-likelihood of the true class of each query sample: \begin{equation}\label{eq:loss} \mathcal{L}(\theta) = -\sum_{t=1}^{\vert Q_{e} \vert} \log P_{\theta} (y_{t} \mid q_{t}, S_{e}), \end{equation} where $(q_{t}, y_{t}) \in Q_{e}$ is the sampled query, $S_{e}$ is the support set at episode $e$, and $\theta$ is the model parameter. Prototypical Networks make use of the support set to compute a centroid (prototype) for each class (in the sampled episode) and query samples are classified based on the distance to each prototype. For instance, a CNN $f : \mathbb{R}^{n_{v}} \to \mathbb{R}^{n_{p}}$, parameterized by $\theta_{f}$, learns a $n_{p}$-dimensional space where $n_v$-dimensional input samples of the same class are close and those of different classes are far apart. For every episode $e$, each embedding prototype $p_{c}$ (of class $c$) is computed by averaging the embeddings of all support samples of class $c$ as \begin{equation} p_{c} = \frac{1}{K} \sum_{(s_{i}, y_{i}) \in S_{e}^c} f(s_{i}), \end{equation} where $S_{e}^c \subset S_{e}$ is the subset of support examples belonging to class c. Given a distance function $d$, the distance of the query $q_{t}$ to each of the class prototypes $p_{c}$ is calculated. By taking a softmax \cite{bridle1990probabilistic} of the measured (negative) distances, the model produces a distribution over the $N$ classes in each episode: \begin{equation} P(y = c \mid q_{t}, S_{e}, \theta) = \frac{exp(-d(f(q_{t}),p_{c}))}{\sum_{n} exp(-d(f(q_{t}),p_{n}))}, \end{equation} where metric $d$ is a Euclidean distance and the parameters $\theta$ of the model are updated with stochastic gradient descent by minimizing Equation~(\ref{eq:loss}). Once the training finishes, the parameters $\theta$ of the network are frozen. Then, given any new FS-PIC task, the class corresponding to the maximum $P$ is the predicted class for the input query $q_{t}$. \section{Privacy Methods} \label{privacy_methods} We study following methods to introduce privacy in images (depicted in Fig. \ref{fig:privacy_methods} of Appendix). \subsection{Independent Gaussian Noise} Introducing some noise in an image is one way to distort information \cite{Mivule2013UtilizingNA}. Kim \cite{Kim2002AMF}, first publicized the work on additive noise by the general expression $ Z = X + \epsilon $, where $X$ is the original data point, $\epsilon$ is the random variable (noise) with a distribution $\epsilon \sim \mathcal{N}(0,\sigma^2)$ and $Z$ is the transformed data point, obtained by the addition of noise $\epsilon$ to the input $X$. Therefore, for an image with dimensions $(H, W, C)$, we sample $H \times W \times C$ values from a Gaussian (normal) distribution with mean ($\mu$) zero and standard deviation $\sigma$ of the probability density function $p(x) = \frac{1}{\sqrt{2\pi\sigma^2}}\exp{-\frac{(x-\mu)^2}{2\sigma^2}}$. We use the implementation from \cite{harris2020array}. \subsection{Common Image Obfuscation} Two widely used image obfuscation techniques are \textit{Pixelization} and \textit{Blurring}. \paragraph{Pixelization~\cite{Hill2016OnT}} (also referred to as mosaicing) can be achieved by superposing a rectangular grid of size $b \times b$ over the original image and averaging the color values of the pixels within each grid cell. \paragraph{Blurring} i.e., Gaussian blur, removes details from an image by convolving a 2D Gaussian kernel with the image. Let the radius of blur be $r$, then the size of the 2D kernel is given by $ (2r+1) \times (2r+1)$. Then, the values in this 2D kernel are sampled from the distribution: \begin{equation} G(x,y) = \frac{1}{\sqrt{2\pi\sigma^2}}\exp{-\frac{(x^2 + y^2)}{2\sigma^2}}, \end{equation} where $(x,y)$ are the coordinates inside the 2D kernel with origin at the center and the standard deviation $\sigma$ is approximated from the radius $r$ \cite{Gwosdek2011TheoreticalFO}. We use Pillow Image Library \cite{clark2015pillow} for the implementation. \subsection{Differentially Private Image Pixelization} Differential privacy (DP) is the state-of-the-art privacy paradigm for statistical databases~\cite{dwork2014privacybook}. Differentially Private Pixelization (DP-Pix) \cite{fan_image_2018} extends the DP notion to image data publication. It introduces a concept of $m$-Neighborhood, where two images ($I_1$ and $I_2$) are neighboring images if they differ by at most $m$ pixels. By differential privacy, content represented by up to $m$ pixels can be protected. A popular mechanism to achieve DP is the Laplace mechanism. However, the global sensitivity of direct image perturbation would be very high i.e., $\Delta I = 255m$, leading to high perturbation error. The DP-Pix method first performs pixelization $P_b$ (with grid cells of $b \times b $ pixels) on the input image $I$, and then applies Laplace perturbation to the pixelized image $P_b(I)$, effectively reducing the sensitivity $\frac{255m}{b^2}$. The following equation summarizes the algorithm ($\tilde{P_b}$) to achieve $\epsilon$-differential privacy: \begin{equation} \tilde{P_b}(I) = P_b(I) + {L}_{p}, \end{equation} where each value in $L_{p}$ is randomly drawn from a Laplace distribution with mean 0 and scale $\frac{255m}{b^2\epsilon}$. The parameter $\epsilon >0$ specifies the level of DP guarantee, where smaller values indicate stronger privacy. As DP is resistant to post-processing~\cite{dwork2014privacybook}, any computation performed on the output of DP-Pix, i.e., the perturbed pixelized images, would not affect the $\epsilon$-DP guarantees. Our approach proposes a denoising module for the obfuscated images by DP-Pix, improving the latent representation without sacrificing DP guarantees. \section{Privacy Enhanced Few-shot Image Classification} To build a few-shot model that can preserve the privacy of the input images, we can utilize any of the privacy methods discussed in the previous section. However, doing so may degrade the few-shot classification performance tremendously. To avoid this, we introduce a denoiser and train it jointly for few-shot classification using meta-learning on noisy images (Fig. \ref{fig: cloud}). Together, the denoiser and the embedding network forms our \textit{Denoising Network}. Combined with the properly chosen privacy method, the Denoising Network aims to discover a privacy-preserved latent embedding space (not denosing to recover the original image), where \textbf{the privacy of input data is be preserved} and \textbf{robustness and generality for few-shot classification are maintained}. \noindent \textbf{Denoiser: } Zhang et al. \cite{zhang_beyond_2017} proposed a denoising convolutional neural network (DnCNN) which uses residual learning to output Gaussian noise. Specifically, the input of the network is a noisy observation such that $y = x + v$ where $y$ is the input image, $x$ be the clean image, and $v$ be the actual noise. The network learns the residual mapping function $\mathcal{R}(y) \approx v$ and predicts the clean image using $x = y - \mathcal{R}(y)$. The averaged mean squared error between the predicted residue and actual noise is used as the loss function to train this denoiser with parameters $\phi$ as \begin{equation} \mathcal{L}(\phi) = \frac{1}{2N}\sum_{i=1}^N || \mathcal{R}(y_i; \phi) - (y_i - x_i) ||^2. \end{equation} We plug the DnCNN denoiser into our FS-PIC pipeline (Fig. \ref{fig: cloud}) to estimate the clean image before pixelization, blurring, Gaussian noise, and DP-Pix. The architecture for the denoiser can be found in Fig. \ref{fig:denoiser} of Appendix. \noindent \textbf{Embedding Network: } Partially denoised images from the denoiser $D(\phi)$ are fed to embedding network $E(\theta)$ to obtain denoised embeddings, which then form the class prototypes. The classification loss is measured using Eq. ~\ref{eq:loss}. \noindent The total loss for training the \textit{Denoising Network} (Denoiser + Embedding Network) is formulated as the sum of denoising loss and classification loss: \begin{equation} \label{eq:total_loss} \mathcal{L} = \mathcal{L}(\phi) + \mathcal{L}(\theta). \end{equation} The joint loss enforces the reduction of noise in input images while learning the distinctive representations that maximize the few-shot classification accuracy. This simple loss guides the embedding space towards privacy-preserved latent space without losing its generality. For Prototypical Networks, the prototypes are expected to be the centers of the privacy-preserved embeddings for each class. Although the sum of losses can be weighted, our experiments observed that weighting did not significantly impact the final accuracy of the few-shot image classification model as long as the weighting coefficients are non-zero. We outline the episodic training process used for building a FS-PIC model in Algorithm \ref{alg:episodic} and describe the notations used in Table \ref{symbols}. \input{tables/symbols} \input{algorithm} \section{Experiments} \noindent \textbf{Datasets:} \textbf{1)} \textit{Omniglot} \cite{lake_one_2011} is a dataset of 1623 handwritten characters collected from 50 alphabets. Each character has 20 examples drawn by a different human subject. We follow the same procedure as in \cite{vinyals_matching_2016} by resizing the gray-scale images to $28 \times 28 $ and augmenting the character classes with rotations in multiples of 90 degrees. Our training, validation, and testing split is of sizes 1028, 172, and 423 characters, respectively (or $4\times$ with augmentation). \textbf{2)} \textit{CelebFaces Attributes Dataset (CelebA)} \cite{liu2015faceattributes} is a large-scale face attributes dataset with more than 10K celebrity (classes) images. For the purpose of our experiments, we select classes that have at least 30 samples. This gives us 2360 classes in total, out of which 1510 are used for training, 378 for validation, and 427 for testing. We use aligned and cropped version of the dataset in which images are of dimension $218 (h) \times 178 (w)$. We center crop each image to $176 \times 176$ and then resize to $84 \times 84$. \textbf{3)} \textit{MiniImageNet} \cite{vinyals_matching_2016} dataset contains 100 general object classes where each class has 600 color images. The images are resized to $84 \times 84$, and the dataset is split into 64 training, 16 validation, and 20 testing classes following \cite{snell_prototypical_2017}. \noindent \textbf{Settings for Privacy Methods:} We explore the following parameters for each privacy method. Gaussian Blur with radius $r = \{1,2,3,4,5\}$ is used for blurring images. A filter window of size $b \times b$ where $b = \{2,4,6,8,10\}$ is used for pixelization. The pixelated image is then resized to match the model input dimensions. We perform experiments with Gaussian noise $\epsilon \sim \mathcal{N}(\mu, \sigma)$ with mean $\mu$ = 0 and standard deviation $\sigma = \{40,80,120,160,200\}$. For DP-Pix, we fix $\epsilon = 3$, $m = 1$ and vary pixelization parameter $b$ with values $\{2,4,6,8,10\}$. \noindent \textbf{Denoising Network:} We use a lighter version of the DnCNN \cite{zhang_beyond_2017} model i.e., with 8 CNN layers instead of 17, for first denoising the image and subsequently feeding the denoised image into one of the following embedding networks. \textbf{Conv-4} is a 4-layered convolutional neural network with 64 filters in each layer originally proposed in \cite{snell_prototypical_2017} for few-shot classification. \textbf{ResNet-12} is a 12-layer CNN with 4 residual blocks. It has been shown to have better classification accuracy on few-shot image classification tasks. The architecture of the two embedding networks are detailed in Fig. \ref{fig:encoders} of Appendix. \noindent \textbf{Training and Evaluation:} We train using N-way K-shot PIC tasks (Algorithm. \ref{alg:episodic}) and use Adam optimizer with learning rate $\alpha_\theta = \alpha_\phi = 0.001$ with a decay of 0.5 every 20 epochs. Table \ref{table:training_parameters} lists the hyperparameters for the three datasets. The network is trained to minimize total loss of denoiser and classifier (Eq. \ref{eq:total_loss}). We evaluate the performance by sampling 5-way 5-shot PIC tasks (with same privacy settings) from the test sets and measure the classification accuracy. The final results report the performance averaged over 1000 test episodes for the Omniglot dataset, and 600 test episodes for both MiniImageNet and CelebA datasets. To measure the effectiveness of the proposed denoising embedding space, we both train and evaluate each model's performance in two settings: 1) \textbf{without using the denoiser} and 2) \textbf{jointly training the denoiser with the classifier} i.e., the proposed \textit{ Denoising Network}. \input{tables/hyperparameters} \noindent \textbf{Privacy Risk Evaluation:}\label{sec:priv_desc} Privacy attacks on trained models such as model inversion\cite{fredrikson2015model} and membership inference\cite{shokri2017membership} are not applicable in our setting because the denoising and embedding models are trained with publicly available classes (data) using meta-learning. The user-supplied test data (support and query set) are obfuscated for privacy protection. A practical privacy attack on obfuscated images is to infer the identities using existing facial recognition systems and public APIs, e.g., Rekognition. In this study, our goal is to investigate (1) the efficacy of the studied image obfuscation methods for privacy protection and (2) whether the proposed denoising approach has effects on privacy. To simulate a powerful adversary, we apply the state-of-the-art face recognition techniques, e.g., FaceNet with the Inception ResNet V1 network\cite{facenet}, on the CelebA dataset; MTCNN \cite{MTCNN} is applied to detect and resize the facial region in each input image. Specifically, 1000 entities were randomly selected from the CelebA dataset. For each entity, we randomly sampled 30 images, which were then partitioned between training and testing (20 : 10). Different versions of the test set were generated by applying image obfuscation methods with various parameter values (denoted as \texttt{Noisy}) and by applying the proposed Denoising Network (denoted as \texttt{Denoised}). We fine-tuned the Inception network and trained an SVC classifier on the clean training data. In Fig. \ref{fig:reidentificationresults}, we report the accuracy on the noisy and denoised test sets, i.e., success of re-identification, with higher values indicating higher privacy risks. \begin{figure*}[ht] \centering \includegraphics[width=0.95\textwidth]{figures/Results_uniform_rows_with_baseline_conv.png} \caption{Test accuracy (y-axis) of 5-way 5-shot private image classification tasks sampled from Omniglot (top), CelebA (center) and MiniImageNet (bottom) datasets, presented with different privacy settings (x-axis) when using Conv-4 as encoder.} \label{fig:results} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=0.95\textwidth]{figures/gain_vs_ssim_conv.png} \caption{\% Gain vs SSIM for Conv-4 } \label{fig:gain_vs_ssim} \end{figure*} \section{Results and Discussions} \input{tables/baselines} \subsection{Task Difficulty} The average 5-way 5-shot classification accuracy of our baseline few-shot model \cite{snell_prototypical_2017} trained on clean images and tested on clean images is 99\% on Omniglot dataset, 91\% on CelebA dataset, and 61\% on MiniImageNet dataset using Conv-4 encoder (Table \ref{Tab:Baseline}). This shows the approximate level of difficulty of few-shot tasks for each dataset i.e., Omniglot tasks are easy, tasks from CelebA have medium difficulty, and MiniImageNet tasks are hard. \subsection{Generalization} We compare results for few-shot private image classification using three models in Fig.~\ref{fig:results}: \begin{enumerate} \item \textbf{Baseline Few-Shot Model:} When the few-shot model is trained on clean images and is tested on noisy images. \item \textbf{Noisy Few-Shot Model Without Denoiser: } When the baseline few-shot model is trained on noisy images and is tested on noisy images with same privacy settings. \item \textbf{Noisy Few-Shot Model With Denoiser: } When the baseline few-shot model is \textit{jointly trained with the denoiser} on noisy images and is tested on noisy images with same privacy settings (Algorithm \ref{alg:episodic}). \end{enumerate} In all cases, we observe that noisy few-shot models outperforms the baseline few-shot model with wide gap. Also, in most cases, we note that adding a denoiser improves the accuracy. To better observe the effectiveness of denoiser, in Fig.~\ref{fig:gain_vs_ssim}, we quantify the improvement by calculating $\text{\% Gain} = \frac{\text{accuracy with denoiser} - \text{accuracy without denoiser}}{\text{accuracy without denoiser}} \times 100$. We also quantify the change to the original image caused by the privacy method (post denoising) by calculating Structural Similarity Index (SSIM) \cite{SSIM} between denoised image and original clean image, averaged over 100 test images for each dataset and privacy parameter. \textbf{Blurring, Pixelization and Gaussian Noise:} As we increase the value of privacy parameters, the SSIM decreases, suggesting the higher dissimilarity between the denoised images and the original image (Fig \ref{fig:gain_vs_ssim}). Despite the degradation caused by the privacy method to the original image, we observe positive \% Gains for all three datasets. Specifically, on hard tasks (MiniImageNet), a gain of upto 15\% in accuracy ($r=5$) with the proposed \textit{Denoising Network}, reaffirming the generality of the few-shot learning. For easy (Omniglot) and medium (CelebA) tasks, where the baseline accuracy is already high, a relatively small positive gain of up to 5\% ($\sigma=200$) is reported. \textbf{DP-Pix:} As we increase the size of pixelization window ($b$), the amount of Laplace noise that we add to the image decreases (as defined by $\frac{255m}{b^2\epsilon}$); however, the image quality decreases because of increasing pixelization. Therefore, we observe a trade-off point where the accuracy first increases and then decreases as we increase $b$ (Fig \ref{fig:results}). This trade-off is particularly observed for CelebA and MiniImageNet datasets. For Omniglot dataset, the performance just decreases with increasing $b$ because of the low resolution images in the dataset. From Fig. \ref{fig:gain_vs_ssim}, we observe that DP-Pix has the lowest SSIM values when compared with other privacy methods causing the most notable changes on the original image. Interestingly, we note that even with low SSIM values, we find instances that exhibit moderate \% gain i.e., at $b={2,4,6}$ indicating the presence of privacy preserving denoising embeddings. Results using ResNet-12 encoder are presented in Fig. \ref{fig:results_resnet} and \ref{fig:gain_resnet} of Appendix. \subsection{Empirical Privacy Risks} As described earlier, this experiment showcases the efficacy of image obfuscation methods against a practical adversary who utilizes state-of-the-art face recognition models trained on clean images. Furthermore, this experiment investigates whether the proposed denoising network has effects on privacy protection empirically. To this end, we vary the algorithmic parameters of the privacy methods and report the face re-identification rates on both obfuscated and denoised images in Fig.~\ref{fig:reidentificationresults}. For the clean test set sampled from CelebA, the re-identification accuracy is 68.12$\%$. \begin{figure}[h!] \centering \begin{subfigure}[b]{0.95\columnwidth} \centering \includegraphics[width=\textwidth]{figures/reidentification/legends.png} \caption*{} \vspace{-0.5cm} \end{subfigure} \begin{subfigure}[b]{0.45\columnwidth} \centering \includegraphics[width=\textwidth]{figures/reidentification/blur_reidentification.jpg} \caption[]% {{\scriptsize Blurring}}\label{fig:reid:blur} \end{subfigure} \begin{subfigure}[b]{0.45\columnwidth} \centering \includegraphics[width=\textwidth]{figures/reidentification/pix_reidentification.jpg} \caption[]% {{\scriptsize Pixelization}}\label{fig:reid:pix} \end{subfigure} \begin{subfigure}[b]{0.45\columnwidth} \centering \includegraphics[width=\textwidth]{figures/reidentification/np_reidentification.jpg} \caption[]% {{\scriptsize Additive Gaussian}}\label{fig:reid:gauss} \end{subfigure} \begin{subfigure}[b]{0.45\columnwidth} \centering \includegraphics[width=\textwidth]{figures/reidentification/dp_reidentification.jpg} \caption[]% {{\scriptsize DP-Pix ($\epsilon=3$)}}\label{fig:reid:dp_pix} \end{subfigure} \caption{\small Privacy Risk Evaluation with CelebA} \label{fig:reidentificationresults} \vspace{-0.5cm} \end{figure} \textbf{Blurring:} In Fig.~\ref{fig:reid:blur}, the privacy risks are quite high with Gaussian kernel size $r=1$ for both blurred and denoised images. As we increase the radius $r$, the chance of re-identifying the image decreases rapidly. We also observe that after denoising, the blurred images are more likely to be re-identified. For instance, at $r=2$, the re-identification rate is 7.34\% for blurred images but 54.01\% for denoised images. \begin{figure*}[h!] \centering \includegraphics[width=\textwidth]{figures/reidentification/mergedface.png} \caption{\textbf{Qualitative Evaluation of Privacy Methods:} The figure depicts the obfuscated images (\texttt{Noisy}) by the studied privacy methods at various parameters, as well as the denoised output, with a sample input from CelebA.} \label{fig:visual_results_param} \end{figure*} \textbf{Pixelization:} As shown in Fig.~\ref{fig:reid:pix}, small cell size in pixelization, e.g., $b=2$, leads to high face re-identification rates for both pixelized and denoised images. Increasing $b$ helps reduce the rate of face re-identification rapidly, e.g., from 53.73\% to 4.82\% for pixelized images by increasing $b$ from 2 to 6. Denoising slightly increases the privacy risk, but the additional risk diminishes with larger $b$ values and is much lower than observed in blurring. \textbf{Additive Gaussian:} Over the range of $\sigma$ values studied in our experiments, Additive Gaussian inflicts lower privacy risks with a small noise ($\sigma=40$), compared to Blurring and Pixelization. As shown in Fig.~\ref{fig:reid:gauss}, increasing $\sigma$ leads to a moderate reduction in the privacy risk. For example, face re-identification rate is 5.11\% at mid noise level ($\sigma=120$), reduced from 8.54\% at low noise level ($\sigma=40$). Denoising the obfuscated images leads to a significant increase in the privacy risk at low $\sigma$ values, e.g., 33.55\% higher in face re-identification rate when $\sigma=40$. \textbf{DP-Pix} Fig.~\ref{fig:reid:dp_pix} presents the re-identification results for images obfuscated with DP-Pix as well as those denoised by our proposed approach. We observe low privacy risks across all $b$ values. Furthermore, performing denoising on DP-Pix obfuscated images does not lead to significant higher privacy risks with any $b$ value, as opposed to other image obfuscation methods. While face re-identification rates are consistently low, higher rates occur when $b=4$ and $6$. Recall that higher utility was observed when $b=4$ and $6$ in Fig.~\ref{fig:results}. It has been reported in~\cite{fan_image_2018} that the quality of obfuscated images may be optimized by tuning $b$ value given the privacy requirement $\epsilon$, by balancing the approximation error by pixelization and the Laplace noise with scale $\frac{255m}{b^2\epsilon}$. \begin{figure*}[h] \centering \includegraphics[width=\textwidth]{figures/tSNE_all.png} \caption{t-SNE Visualization} \label{fig:tSNE} \end{figure*} \subsection{Qualitative Evaluation of Privacy Methods} Fig.~\ref{fig:visual_results_param} provides a qualitative evaluation on the obfuscated and denoised images generated for a range of parameter values. MTCNN \cite{MTCNN} was applied to a sample input image of CelebA, to detect the facial region. Perceptually, the proposed denoiser may improve the image quality upon the obfuscated images to various extents. However, image quality does not always correlate with empirical privacy risks, i.e., face re-identification with public models. In combination with Fig.~\ref{fig:reidentificationresults}, we observe that the proposed denoising leads to various levels of privacy risk increment, while producing higher quality images. For example, the results show higher privacy risk increment for Blurring with $r=3$ (23.33\%), moderate increment for Pixelization $b=4$ (10.14\%) and Additive Gaussian $\sigma=80$ (7.96\%), and little increment for DP-Pix $b=2$. Fig.~\ref{fig:visual_results_param} confirms that the denoiser performance may vary depending on the image obfuscation method, and that DP-Pix provides consistent privacy protection even with denoising. Additional qualitative results are presented in Fig. \ref{fig:visual_results} of Appendix. \subsection{Observation of the Privacy-Preserved Embedding Space} Fig. \ref{fig:tSNE} shows the evolution of the embeddings in the process of privacy encoding and privacy-preserved representation learning by presenting the t-SNE \cite{van2008visualizing} visualization of the clean, noisy, and denoised embeddings of randomly sampled 100 test images from a total of 5 classes from the CelebA dataset. The embeddings are obtained from the ResNet-12 encoder trained under different noise settings for 5-way 5-shot classification. We say the embeddings are clean when the input images have no noise and the encoder is trained for few-shot classification of clean images. The noisy embeddings are obtained by using the encoder trained for few-shot classification of noisy images and without using the denoiser. The denoised embeddings are obtained by the proposed \textit{Denoising Network} (Fig. \ref{fig: cloud}) i.e., the encoder trained in conjunction with denoiser for few-shot classification on noisy images. We report the results for a case when a few-shot method such as Prototypical Networks can generate good clusters for the clean images (Fig. \ref{fig:tSNE}a), and observe the impact on clustering with noisy images and subsequently when those images are denoised. We notice that when the initial clusters are good, pixelization (Fig. \ref{fig:tSNE}c) and blurring (Fig. \ref{fig:tSNE}e) will have little impact on the quality of the clusters even with the high amount of noise. Therefore, pixelization and blurring maintain generality (robust to noise) and are also vulnerable to re-identification. Gaussian noise (Fig. \ref{fig:tSNE}b) distorts the initial clusters more significantly, which can lead to lower few-shot classification performance. Applying denoising to Gaussian noise improves the clustering results, however still poses moderate privacy threat as seen in re-identification experiments (Fig. \ref{fig:reid:gauss}). Similarly, with DP-Pix (Fig. \ref{fig:tSNE}d), the original clusters are also distorted upon obfuscation. But, when denoised with proposed Denoising Network, we can observe better clustering performance. Because of DP-Pix’s privacy guarantee and lowest re-identification rates, we can say that the obtained denoised embeddings are privacy-protected i.e., the network finds the privacy-preserved embedding space which maintains generality (robust to noise) and also preserves privacy. \section{Related Works} Xie et al. \cite{Xie2020SecureCF} incorporate differential privacy into few-shot learning through adding Gaussian noise into the model training process \cite{abadi_deep_2016} to protect the privacy of training data. \cite{Xue2021DifferentiallyPP, Huai2020PairwiseLW} have also provided a strong privacy protection guarantee in pairwise learning for training data. On the other hand, \cite{Gelbhart2020DiscreteFL} propose to use hashing to store the embedding of the input images. Similar to cryptographic approaches~\cite{cabrero2021sok}, the work \cite{Gelbhart2020DiscreteFL} incurs high computational complexity to achieve accuracy. Differently, our approach addresses the privacy of user data at source (i.e., the images are already privatized before the server sees them) with strong privacy protection. To the best of our knowledge, ours is the only approach that addresses privacy in the context of few-shot metric learning for user-supplied training and testing data. \section{Conclusion \& Future Work} In this paper, we present a novel framework for training a few-shot private image classification model, which aims to preserve the privacy of user-supplied training and testing data. The framework makes it possible to deploy few-shot models in the cloud without compromising users' data privacy. We discuss and confirm that there exists a privacy-preserved embedding space which has both stronger privacy and generalization performance on few-shot classification. The proposed method provides privacy guarantees while preventing severe degradation of the accuracy as confirmed by results on three different datasets of varying difficulty with several privacy methods. Evaluation with re-identification attacks verifies the low empirical privacy risk of our proposed method, especially with DP-Pix. While our study focuses on well-known image obfuscation methods, future research may explore scenarios where users could apply novel image obfuscation methods locally, i.e., different from those applied to training data. Furthermore, our results motivate the future direction of searching for a more effective privacy-preserved space for few-shot learning in other domains such as speech \cite{parnami2020few}. Examination of other evaluation metrics for privacy-preserved embedding space will promote the relevant future study. We release the code for our experiments at \url{https://github.com/ArchitParnami/Few-Shot-Privacy}.
\section{Introduction} Magnetic flux ropes (FRs) are thought to be the central structures of solar eruptions, including prominence/filament eruptions, flares, and coronal mass ejections (CMEs). The physical process connecting these phenomena is the eruption of the magnetic flux rope system \citep{Zhang2001,vanDriel2015,Green2018,Jiang2018,Yang2018,Filippov2019}. Knowing whether the FR will erupt or not is, naturally, fundamental to predicting a CME event. \citet{Gronk2016IAUS..320.} pointed out several mechanisms that can decelerate and confine eruptions in the corona. The first one is the action of gravity, which prevents the eruption when the energy of the FR is not enough to escape the gravitational potential of the Sun \citep{Filippov2021}. Even if the FR has the energy to escape gravity, the eruption would be confined if the overlying arcade field, whose lines form a magnetic cage, is too strong or do not quickly decay with height \citep{Torok2005,WangyZhang2007,Chen2013ApJ...778...70C,Amari2018,Baumgartner2018,Jing2018}. Recently, \citet{Li2020ApJ...900..128L,Li2021ApJ...917L..29L,Li2022ApJ...926L..14L} proved that there exists a negative correlation between the flare eruptivity (i.e. if it has an associated CME) and the total unsigned magnetic flux of the active region producing the flare, which describes the strength of the background field confinement. Once the eruption occurs, it is essential to understand the path that a CME will follow in order to predict its geoeffectiveness. This requires knowledge of any non-radial propagation of the CME, for which deflections in the trajectory must be studied. It is widely known that the magnetic structures in the vicinity of FRs are capable of deflecting them both in latitude and longitude. While coronal holes \citep[e.g.,][]{2006AdSpR..38..461C,2009JGRA..114.0A22G,Sahade2020,Sahade2021} and active regions \citep[e.g.,][]{2015ApJ...805..168K,Mostl2015,Wang2015} deflect FRs against their location, heliospheric current sheets \citep[e.g.,][]{2015SoPh..290.3343L,Wang2020JGRA}, helmet-streamers \citep[e.g.,][]{Zuccarello2012,Yang2018} and pseudostreamers (PSs) \citep[e.g.,][]{Bi2013,Wang2015PS,cecere2020,Wang2020JGRA} attract FRs to their low magnetic energy regions. Combined effects of the several structures at different heights can be seen in, for example, \citet{Sieyra2020}. In previous studies \citep{Sahade2020,Sahade2021}, we found that the presence of a coronal hole nearby the eruptive region forms a magnetic null point that attracts the FR. The null point can be located between the FR and CH (case of anti-aligned polarities) or at the other side of the FR (case of aligned polarities). The first scenario produces an initial deflection towards the CH and a second deflection against its position. On the other hand, the aligned polarities cases lead to a single deflection in which the FR moves away from the CH. All the final paths are opposite to the location of the coronal hole by the ``channelling'' of the magnetic field lines, i.e., the FR is guided to follow the least resistance path. \citet{Mostl2015} and \citet{Wang2015} studied an event on 2014 January 7 whose deflection seems to be caused by the magnetic pressure gradient from a nearby active region and whose final path is also channelled by the configuration of the magnetic field lines to the least resistance direction. \citet{shen2011} concluded that the trajectory in the early stages is influenced by the background magnetic energy gradients, inducing the CME to propagate towards the region with the lowest magnetic energy density. Similar results were found by \citet{Sieyra2020} where most of the analysed CMEs eruptions were aligned with the direction of the magnetic energy decrease. It also showed that most of the deflection occurs at heights lower than 2.4\,$R_{\odot}$, suggesting that it is of utmost importance to study the trajectory in the early stage. Streamers are characterised by containing a region of null magnetic energy, therefore they can act as a potential well attracting CMEs towards them \citep{Kay2013}. In particular, the PS contains a single magnetic null point above the closed field lines. These closed field lines that overlie two (or an even number of) polarity inversion lines, are covered by open field lines of the same polarity, without a current sheet, forming the spine of the pseudostreamer \citep{2014ApJ...787L...3R}. Observational studies have suggested that there is a null point hierarchy: the rolling motions and deflections of prominences are caused by the nearest local null point and the CMEs move in a non-radial direction towards the global null point located at higher altitudes associated to helmet streamers or pseudostreamers \citep{2013SoPh..287..391P}. In order to explain the physical processes involved in the deflection of the eruptive phenomenon there are some numerical studies that analyse the CME deflections in presence of PS structures. For example, \citet{Zuccarello2012} found, in a scenario where the heliospheric current sheet and PS are both present, a CME that erupts from one of the PS lobes and is firstly deflected towards the null point of the PS and then continues moving towards the heliospheric current sheet. A similar behaviour is found in the simulation performed by \citet{wyper2021}, in which the PS is embedded in a helmet streamer. Recently, \citet{Karna2021} modelled the eruptive filament observed on 2015 April 19, which was embedded in a lobe of the pseudostreamer and was directed towards the PS null point. Although it is well established, both numerically and observationally, that FRs inside PS deflect towards the PS spine \citep[e.g.,][]{Torok2011,Zuccarello2012,Yang2015ApJ,Karna2021}, to date there are no studies that analyse how the trajectory of a FR is affected by variations in the FR-PS configuration. In this paper, we model cases where only one FR interacts with the PS structure, and we analyse its influence on the FR trajectory at low coronal heights by 2.5 MHD numerical simulations. In Section 2, we describe the numerical model details and parameters for the presented cases. In Section 3, we present results arising from the several simulations performed. We observed that the FR-PS interactions can be distinguished into three separate classes that exhibit differences in the dynamic behaviour of the FR. On one hand, differences in the magnetic field topology lead to different hierarchies of the null points and consequently changes in the dynamical behaviour. On the other hand, we found that the eruption or confinement of the FR strongly depends on the unsigned magnetic flux of the magnetic cage. Discussion and final remarks are presented in Section 4. \section{Numerical simulations} To study the interaction between a FR and a PS, we present a scenario where both structures interact in isolation. In this way, we avoid the possible effects of other magnetic structures that could affect the FR behaviour, allowing a comprehensive analysis of the PS influence in the FR evolution. We consider the ideal MHD equations in presence of a gravitational field to solve the 2.5 dimensional model. In CGS units in the Cartesian conservative form we have: \begin{align} &\frac{\partial\rho}{\partial t}+\nabla\cdot(\rho\vec{v})=0 &(continuity)& \label{e:cont} \\ &\frac{\partial (\rho \vec{v})}{\partial t} + \nabla \cdot \left(\rho \vec{v} \vec{v} - \frac{1}{4\pi} \vec{B}\vec{B} \right) + \nabla p + \nabla\left( \frac{B^2}{8\pi}\right) = \rho \vec{g} &(momentum) \label{e:euler} \\ &\frac{\partial E}{\partial t} + \nabla \cdot \left[\left(E + p + \frac{B^2}{8\pi}\right)\vec{v} -\frac{1}{4\pi} \left(\vec{v\cdot B}\right)\vec{B}\right] = \rho \vec{g v} &(energy) \label{e:consE} \\ &\frac{\partial \vec{B}}{\partial t} + \vec{\nabla \cdot} \left(\vec{v} \vec{B} - \vec{B} \vec{v} \right) = \vec{0} &(induction) \label{e:induccion} \end{align} \noindent where $\rho$ represents the plasma density, $p$ the thermal pressure, $\vec{v}$ the velocity, $\vec{B}$ the magnetic field, and $\vec{g}$ the gravity acceleration. $E$ is the total energy (per unit volume), given by \begin{equation*} E = \rho \epsilon + \frac{1}{2} \rho v^2 + \frac{B^2}{8\pi}, \end{equation*} where $\epsilon$ is the internal energy and \begin{equation*} {\vec{j}=\frac{c}{4\pi}{\nabla\times}\vec{B}, } \, \end{equation*} is the current density, with $c$ being the speed of light. In addition to the MHD equations, the divergence-free condition of the magnetic field must be fulfilled, i.e. \begin{equation}\label{e:divB} \vec{\nabla\cdot} \vec{B} = 0\, . \end{equation} We assume that the medium is a fully ionised hydrogen plasma, for which is valid the perfect gas law $p = 2\rho k_B T/m_i = (\gamma - 1) \rho \epsilon$. $k_B$ is the Boltzmann constant, $T$ the plasma temperature, $m_i$ the proton mass, and $\gamma = 5/3$ the specific heat relation. Simulations were performed using the FLASH Code \citep{2000ApJS..131..273F} in its fourth version, operated under an adaptive refinement mesh with the USM (Unsplit Staggered Mesh) solver, which uses a second-order directionally unsplit scheme with a MUSCL-type (Monotonic Upstream-centered Scheme for Conservation Laws) reconstruction. We use the local Lax-Friedrichs Riemann solver, which is a diffusive solver providing the necessary dissipation to emulate the magnetic resistivity and use the ideal MHD equations \citep{Sahade2020}. Outflow conditions (zero-gradient) are used at lateral and upper boundaries, while the line-tied condition is used at the lower boundary, which imposes the condition of null velocity and constant magnetic field for the ghost cells \citep{1987SoPh..114..311R}. In the guard-cells of the boundary the magnetic field is linearly extrapolated to preserve the divergence-free configuration. The highest resolution corresponds to $\sim[0.1 \times 0.1]~\mathrm{Mm}^2$ cells, in a $[-700,700]~\mathrm{Mm}\times [0,700]~\mathrm{Mm}$ physical domain, where pressure and temperature gradients satisfy the refinement criterion. \subsection{FR and PS magnetic model}\label{ss:magneticmodel} The modelling of the FR magnetic structure is based on the catastrophe model by \citet{1990JGR....9511919F} consisting of an out-of equilibrium magnetic configuration that triggers the FR ejection. The model of the PS is based on the magnetic configuration proposed by \citet{Edmondson10}. However, to better reproduce the decay of the magnetic field with altitude in the solar corona, we replace the constant background magnetic field in the $y$-direction by an exponentially decaying field. The $x$-direction is oriented along the horizontal coordinate, the $y$-direction corresponds to the vertical coordinate and the $z$-direction is the direction of symmetry. Combining both models, the total magnetic field is given by: \begin{align*} B_x&=B_{x,\mathrm{FR}}+B_{x,\mathrm{PS}} \, ,\nonumber \\ B_y&=B_{y,\mathrm{FR}}+B_{y,\mathrm{PS}} \, , \nonumber \\ B_z&=B_{z,\mathrm{FR}}\, . \end{align*} The magnetic field components of the FR are given by the sum of a current wire, an image current wire and a line dipole: \begin{align}\label{e:BFR} B_{x,\mathrm{FR}}=-&B_\phi(R_-)\tfrac{(y-h_0)}{R_-} + B_\phi(R_+)\tfrac{(y+h_0)}{R_+} - \nonumber \\ &MdB_\phi{\scriptstyle\left(r+\tfrac{\Delta}{2}\right)}\left(r+\tfrac{\Delta}{2}\right)\tfrac{x^2-(y+d)^2}{R_d^4} \, ,\nonumber \\ B_{y,\mathrm{FR}}=\quad &B_\phi(R_-)\tfrac{x}{R_-} - B_\phi(R_+)\tfrac{x}{R_+}-\nonumber \\ & MdB_\phi{\scriptstyle\left(r+\tfrac{\Delta}{2}\right)}\left(r+\tfrac{\Delta}{2}\right)\tfrac{2x(y+d)}{R_d^4} \, , \nonumber \\ B_{z,\mathrm{FR}}=\quad &B_{\text{z}}(R_-)\, . \end{align} \noindent In these expressions, $h_0$ is the initial height of the FR, $M$ is the intensity of the line dipole at depth $d$, $r$ is the current wire radius, $\Delta$ is the thickness of the transition layer between the current wire and the exterior, and $R_\pm = \sqrt{x^2+(y\pm h_0)^2}$ and $R_d = \sqrt{x^2+(y+d)^2}$ are the distances taken from different origins (image and current wire, and dipole, respectively). Also, \begin{equation} \label{e:Bphi} B_\phi{(R)}\!=\! \left\{ \begin{array}{rl} \begin{alignedat}{2} &\tfrac{2\pi}{c}j_0R && 0\leq R < r-\frac{\Delta}{2}\\ &\tfrac{2\pi j_0}{cR}\left\{\tfrac{1}{2}\left(r-\tfrac{\Delta}{2}\right)^2-\left(\tfrac{\Delta}{2}\right)^2 +\right. \\ &\tfrac{R^2}{2}+\tfrac{\Delta R}{\pi}\text{sin}\left[\tfrac{\pi}{\Delta}\left(R-r+\tfrac{\Delta}{2}\right)\right]+ \qquad && r-\frac{\Delta}{2}\!\leq \!R\! <r+\frac{\Delta}{2} \\ &\left.\!\!\!\left(\tfrac{\Delta }{\pi}\right)^2\cos\left[\tfrac{\pi}{\Delta}\left(R-r+\tfrac{\Delta}{2}\right)\right]\right\} \\ &\tfrac{2\pi j_0}{cR}\left[r^2+\left(\tfrac{\Delta}{2}\right)^2-2\left(\tfrac{\Delta}{\pi}\right)^2\right] && r+\frac{\Delta}{2} \leq R \end{alignedat} \end{array} \right. \end{equation} \begin{equation} \label{e:jz} j_z{(R)}\!=\! \left\{ \begin{array}{rl} \begin{alignedat}{2} &\!j_0 &&0\leq R < r-\frac{\Delta}{2}\\ &\!\tfrac{j_0}{2}\left\{\cos\left[\tfrac{\pi}{\Delta}\left(R-r+\tfrac{\Delta}{2}\right)\right]+1\right\} \quad && r-\frac{\Delta}{2}\!\leq \!R\! <r+\frac{\Delta}{2}\\ &\! 0 && r+\frac{\Delta}{2} \leq R \end{alignedat} \end{array} \right. \end{equation} \noindent where $j_0$ is a current density. The component $B_\mathrm{z}$ of the magnetic field and the current distribution $j_{\phi}$, are described by: \begin{equation}\label{e:Bfieldz} B_\mathrm{z}(R) = \tfrac{4\pi j_1}{c}\sqrt{\left(r-\tfrac{\Delta}{2}\right)^2-R^2}\, , \end{equation} \begin{equation}\label{e:jphi} j_\phi(R) = j_1R\left[\sqrt{\left(r-\tfrac{\Delta}{2}\right)^2-R^2}\right]^{-1}\,, \end{equation} where $j_1$ is a current density. These expressions are valid in $0\leq R < r-\frac{\Delta}{2}$ and are null in the rest of the domain. The magnetic field components of the PS are composed by a line dipole and a potential field: \begin{subequations} \label{eq:optim} \begin{align}\label{e:BfieldPSx} B_{x,\mathrm{PS}}(x,y)=&\frac{2 \sigma B_\text{PS} (x - x_\text{PS}) (y - y_\text{PS})}{((x - x_\text{PS})^2 + (y - y_\text{PS})^2)^2} + \\ \nonumber & B_0\ \sin\left(\frac{x-x_\text{PS}}{H}\right)\, \exp[-y/H]\, , \\ \nonumber \end{align} \begin{align} \label{e:BfieldPSy} B_{y,\mathrm{PS}}(x,y)= & - \frac{2\sigma B_\text{PS} (x - x_\text{PS})^2}{((x - x_\text{PS})^2 + (y - y_\text{PS})^2)^2} + \\ \nonumber & \frac{\sigma B_\text{PS}}{(x - x_\text{PS})^2 + (y - y_\text{PS})^2} + \\ \nonumber & B_0\ \cos\left(\frac{x-x_\text{PS}}{H}\right)\,\exp[-y/H] \, , \end{align} \end{subequations} where $\sigma B_\mathrm{PS}$ is the strength of the magnetic field due to a single line dipole ($\sigma =2\times10^{21}$ is a dimensionless scale factor) positioned at $(x, y) = (x_\mathrm{PS}, y_\mathrm{PS})$, $B_0$ is the strength of the background field at $(x, y) = (x_\mathrm{PS}, 0)$, and $H=600$ Mm is the height decaying factor. Figure \ref{f:scheme}(a) shows a scheme with the distribution of the magnetic structures and \ref{f:scheme}(b) the internal structure of the FR. In the left panel, the green frame (top) represents the simulated domain and the grey shaded area (bottom) contains the magnetic components that are out of the simulation box. The PS model produces a four-flux system, the separation between these regions (red lines) is characterised by a magnetic null point (red circle). Two of the fluxes have a closed topology (red shaded area) and form the PS lobes that are divided by the spine (vertical red line). Outside this region , delimited by the semicircular red line, two open fluxes of equal polarity converge towards the spine and surround the PS structure. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figure1.png} \caption{(a) Flux rope (orange circle) and pseudostreamer (red structure) scheme, not to scale. The green frame indicates the simulated region. $h_0$ is the FR height and $x_\mathrm{PS}$ is the distance from the FR to the PS spine (red vertical line), whose height is parametrised by $y_\mathrm{PS}$. The line dipole and the image current are located at depth $d$ and $h_0$, respectively. (b) Internal structure of the FR: $r$ is the radius, $\Delta$ is the thickness of the transition layer, $R_{-}$ is the radial coordinate from the FR centre, and $\phi$ the poloidal coordinate.} \label{f:scheme} \end{figure} \subsection{Thermodynamic variables} We simulate the solar atmosphere by adopting a multi-layer structure \citep{Mei2012}. The chromosphere lies between the heights $0 \leq y \leq h_\mathrm{ch}=10\,$Mm with constant temperature $T_\mathrm{ch}=10\,000\,\text{K}$. The base of the corona is at a height $h_\mathrm{c}=15\,\text{Mm}$ and has constant temperature $T_\mathrm{c}=10^6\,\text{K}$. These layers are connected by the transition region, which has a linearly increasing temperature. Thereby, the initial temperature distribution is given by \begin{equation} {\textstyle T(y)=} \left\{ \begin{array}{rl} \begin{alignedat}{2} &{\textstyle T_\mathrm{ch}} && 0\leq y < h_\mathrm{ch}\\ &{\textstyle (T_\mathrm{c}-T_\mathrm{ch})\left[\frac{y-h_\mathrm{ch}}{h_\mathrm{c}-h_\mathrm{ch}}\right]+T_\mathrm{ch}} \quad && h_\mathrm{ch}\leq y < h_\mathrm{c}\\ & {\textstyle T_\mathrm{c}} && h_\mathrm{c} \leq y. \end{alignedat} \end{array} \right. \end{equation} The temperature inside the FR ($T_{\text{\tiny{FR}}}$) varies according to the following temperature distribution: \begin{equation} \!T(R_-)\!=\! \left\{ \begin{array}{rl} \begin{alignedat}{2} &\!T_{\text{\tiny{FR}}} && 0\leq R < r-\frac{\Delta}{2}\\ &\!\!(T_\mathrm{c}\!-\!T_{\text{\tiny{FR}}})\!\left[\tfrac{R_--(r+\Delta/2)}{\Delta}\right]\!+\!T_{\text{\tiny{FR}}} \quad && r-\frac{\Delta}{2}\!\leq \!R\! <r+\frac{\Delta}{2}\\ &\! T_\mathrm{c} && r+\frac{\Delta}{2} \leq R. \end{alignedat} \end{array} \right. \end{equation} We consider a current-free atmosphere in hydrostatic equilibrium. Hence, the background pressure $p(y)$ is only a function of height considering a system having the $y$-axis aligned to the gravity acceleration (i.e., $\vec{g} =\frac{-G M_\sun}{(y + R_\sun)^2}\vec{e}_y$, where $G$ is the gravitational constant, $M_\sun$ is the solar mass, $R_\sun$ is the solar radius, and $y = 0$ corresponds to the solar surface). Therefore, the atmospheric pressure is: \begin{equation}\label{pres} {\textstyle p(y)=\!} \left\{ \begin{array}{rl} \begin{alignedat}{2} &{\textstyle \!\!p_\mathrm{ch}\exp{\! \left[\frac{\alpha}{T_\mathrm{ch}}\left(\frac{1}{h_\mathrm{ch}+R_{\sun}}-\frac{1}{y+R_{\sun}}\right)\right]}} && 0\leq y < h_\mathrm{ch} \\ &{\textstyle\! \!p_\mathrm{ch}\exp{\!\left[-\int_{h_\mathrm{ch}}^{y}\frac{\alpha}{T{\scriptstyle(y')}}(R_{\sun}+y')^{-2} dy'\right]}} \quad && h_\mathrm{ch}\leq y < h_\mathrm{c}\\ &{\textstyle \! \!\frac{k_B}{N_Am_i}T_\mathrm{c}n_\mathrm{c}\exp{\!\left[-\frac{\alpha}{T_\mathrm{c}}\left(\frac{1}{h_\mathrm{c}+R_{\sun}}-\frac{1}{y+R_{\sun}}\right)\right]}} && h_\mathrm{c} \leq y , \end{alignedat} \end{array} \right. \end{equation} where \begin{equation*} {\textstyle p_\mathrm{ch}(y)=\frac{k_B}{N_Am_i}T_\mathrm{c}n_\mathrm{c}\exp{\left[\int_{h_\mathrm{ch}}^{h_\mathrm{c}}\frac{\alpha}{T(y')}(R_{\sun}+y')^{-2} dy'\right]}} \, , \end{equation*} The number density at height $y = h_\mathrm{c}$ in the corona is $n_\mathrm{c}=3\times10^8$, $\alpha= \frac{m_i G M_\sun}{2k_B}$, and $N_A$ is the Avogadro number. The internal pressure of the FR is obtained by proposing a solution close to the equilibrium: \begin{align} \label{e:presion} p_\text{\tiny{FR}}(x,y) = p(y)& +\tfrac{1}{c}\int_{R}^{r+\frac{\Delta}{2}}B_\phi{\scriptstyle(R')}j_z{\scriptstyle(R')}dR'\nonumber\\ &-\tfrac{1}{c}\int_{R}^{r+\frac{\Delta}{2}}B_{\text{z}}{\scriptstyle(R')}j_\phi{\scriptstyle(R')}dR'. \end{align} \noindent The associated plasma densities are obtained from the adopted equation of state, i.e.: \begin{equation} {\textstyle \rho=\frac{m_i p(y)}{2k_BT(y)}}. \end{equation} \subsection{Setup} \label{setup} \begin{table}[] \centering \caption{PSs parameters and class of interaction between the FR and PSs.} \begin{tabular}{r| r | r | r | l | l } &$B_0$[G] & $B_\text{PS}$[G] & $x_\text{PS} $[Mm]&$y_\text{PS} $[Mm] & Class \\ \hline PS1-L & $1$ & $-1.284$ &$210$ &$-360$& I$_\mathrm{e}$ \\ PS1-C & $1$ & $-1.284$ &$140$ &$-360$& I$_\mathrm{e}$ \\ PS1-R & $1$ & $-1.284$ &$70$ &$-360$& I$_\mathrm{e}$ \\ \hline PS2-L & $2 $ & $-2.569$ &$210$ &$-360$& I$_\mathrm{ne}$ \\ PS2-C & $2 $ & $-2.569$ &$140$ &$-360$& I$_\mathrm{ne}$ \\ PS2-R & $2 $ & $-2.569$ &$70$ &$-360$& I$_\mathrm{e}$ \\ \hline PS3-L & $0.5$ & $-0.203$ &$210$ &$-180$& O \\ PS3-C & $0.5$ & $-0.203$ &$140$ &$-180$& O \\ PS3-R & $0.5$ & $-0.203$ &$70$ &$-180$& O \\ \end{tabular} \tablefoot{Parameter $B_0$ determines the magnetic field strength that surrounds the PS. $B_\text{PS}$ modulates the magnetic field strength inside the PS lobes. The parameters $x_\text{PS}$ and $y_\text{PS}$ indicate the position of the dipole that produces the PS lobes. The Class column indicates the initial scenario (I=inner, O=outer) and if the FR erupts or not (subscripts `e' and `ne', respectively).} \label{t:PSparameters} \end{table} \begin{figure*} \centering \includegraphics[width=\linewidth]{Figure2.png} \caption{Initial scenarios for simulations listed in Table 1. The case name and the class of interaction are indicated in boxes to the left and right of each panel, respectively. The colour represents the magnetic energy density, null points can be noticed in dark violet. The magnetic field lines are drawn in white. } \label{f:scenarios} \end{figure*} We perform several simulations to analyse the evolution of a FR interacting with different PS configurations. For all cases, we establish a single FR configuration and model the different cases by varying the parameters describing the magnetic structure of the PS. The simulated FR is warm, its temperature equals the coronal one ($T_{\mathrm{FR}}=1~\mathrm{MK}$), it has an initial height of $h_0=30~\mathrm{Mm}$, a radius of $r=2.5~\mathrm{Mm}$ and a transition layer thickness of $\Delta=0.25~\mathrm{Mm}$. Its magnetic parameters are $j_0=435~\textrm{statA cm}^{-2}, j_1=322~\textrm{statA cm}^{-2}$, $M=1$ and $d=-3.125~\textrm{Mm}$. We list in Table~\ref{t:PSparameters} the parameters of the selected PSs and, in the last column, the resulting interaction class with the FR. To fix the height of the null point ($y_n$) we determine the parameter $B_{\textrm{PS}}$ by making zero equation \eqref{e:BfieldPSy} ($B_{y,\mathrm{PS}}(x_\mathrm{PS},y_n)=0$). PS1 and PS2 cases correspond to PSs with the null point at a height of $\sim 280$ Mm and lobes of $\sim 400$ Mm wide. PS3 cases have the null point at height $\sim 140$ Mm and their lobes width is $\sim 200$ Mm. Figure~\ref{f:scenarios} shows the magnetic energy density and field lines for each case listed in Table~\ref{t:PSparameters}. The FR is located to the left of the PS spine. The nomenclature L (left), C (centred) and R (right) indicates the alignment of the FR respect to the left PS lobe.These cases are representative of a larger sample of performed simulations. They cover the following combination of parameters: background magnetic field $B_0=\{0.5,1,2\}$ G; null point height $y_n=\{140,280\}$ Mm; lobe width $w\sim\{y_n,1.5 y_n\}$ and FR alignment $\{$R, C, L$\}$. The coupling of the PS and FR magnetic fields alters the PS shape, resulting in a displacement of the PS null point and the appearance of a new null point for all cases. We refer to the PS null point, which is located at a certain height along the spine, as global null point (GNP). Likewise, we name the new null point, produced by the addition of the FR, local null point (LNP). Two initial scenarios are possible when the PS and FR magnetic field are combined. In one scenario, the LNP is closer to the FR and it forms inside the PS structure. The magnetic field lines of the PS lobe that overlay the FR form a confining cage. In the other scenario, the FR field is strong enough to change the PS topology, bending the left lobe field, and the LNP is associated with a new spine-like structure outside the PS. Therefore, there is no arcade over the FR forming a magnetic cage. We refer to the interaction resulting from the first scenario as class I (inner; top and middle rows of Fig.~\ref{f:scenarios}), and the second scenario results in a class O (outer) interaction (bottom row of Fig.~\ref{f:scenarios}). Class I cases can also be divided according to whether they are eruptive or non-eruptive events (see subscripts $e$, for eruptive, and $ne$, for non-eruptive, in Table~\ref{t:PSparameters} and Fig.~\ref{f:scenarios}). As we show below, the O class has only eruptive events, possibly because the rearrangement of the topology favours the ejection. We focus this work in the description and analysis of the FR dynamic behaviour and evolution according to the interaction class. \section{Results} We present two different analyses: a dynamical and a quantitative one. In the first one, we analyse and compare how the FR trajectories are influenced by the presence of the LNP and the GNP. For the second one, we study the forces that are involved in the dynamics, the unsigned magnetic flux of the magnetic cage, and how the FRs are affected by these factors. \subsection{ Dynamic behaviour analysis} In this section we analyse the similarities and differences in the FR deflection depending on the class (I or O) and on whether the event is eruptive or non-eruptive. To facilitate the interpretation of the trajectories we use a new reference frame defined as $x'=x-x_\mathrm{GNP}$ centred in the GNP of each PS, therefore all the spines are centred at 0 $x'$-coordinate. All simulations are analysed until the flux rope reaches a height of $y=600\,\mathrm{Mm}$ or $t=4000\,\mathrm{s}$, whichever comes first. \subsubsection{Class I} \noindent {\bf Eruptive cases} \vspace{0.25cm} \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure3.png} \caption{FR trajectories for the class I$_\mathrm{e}$ cases. Dashed lines represent the path followed by the FR, stars the LNP location, and circles the GNP position for each case. } \label{fig:trajectory-ein} \end{figure} Cases PS1-L, PS1-C, PS1-R and PS2-R belong to class I eruptive cases (see top row panels and middle-row right panel in Fig.~\ref{f:scenarios}). All their LNPs are inside the PS. For the cases PS1-L, PS1-C and PS1-R we consider the same magnetic configuration of the PS but different horizontal distances between the PS spine and the FR (see $x_\text{PS}$ in Table~\ref{t:PSparameters}). These relative distances determine different $(x,y)$ positions of the null points. Figure~\ref{fig:trajectory-ein} shows the trajectory of the FR for the different eruptive cases. The dashed-line of a given colour represents the FR trajectory, the stars of the same colour indicate the location of its LNP, and the circles indicate the position of its GNP. There is a common behaviour for class I eruptions. Initially, the FR moves towards the LNP, therefore the location of the LNP determines the direction of the initial deflection. After that, the LNP is deformed by the displacement of the FR, and the latter continues to rise towards the new direction of low magnetic energy. The FR is guided towards the PS spine, located above the GNP. The final directions of all class I$_\mathrm{e}$ trajectories eventually converge to a path parallel to the PS spine (which is not always radial). The arrival time and speed at this path will depend on the previous trajectory induced by the LNP. For example, FRs whose initial trajectory is more aligned with the direction of the GNP will eject faster (e.g. PS1-C) than those that are deviated by the LNP in an opposite direction to that of the GNP (e.g. PS1-R). \vspace{0.25cm} \noindent {\bf Non-eruptive cases} \vspace{0.25cm} \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure4.png} \caption{FR trajectories for the cases PS1-C (class I$_\mathrm{e}$) and PS2-C (class I$_\mathrm{ne}$). Dashed lines represent the path, stars the LNP location, and circles the GNP position for each case. } \label{fig:trajectory-nein} \end{figure} Cases PS2-L and PS2-C are non-eruptive cases of class I (see left and centre panels in the middle row of Fig.~\ref{f:scenarios}). PS2 cases have an almost identical morphology to PS1 cases (see top and middle rows of Fig.~\ref{f:scenarios}). The difference is that PS2 magnetic fields are twice stronger than PS1 cases. We compare here PS2-C (non-eruptive) with respect to PS1-C (eruptive); the description is analogous for PS2-L and PS1-L. Figure~\ref{fig:trajectory-nein} shows the trajectory of PS1-C and PS2-C cases for comparison. The initial trajectories are remarkably similar, however at some point PS2-C case starts a decaying phase and consequently no eruption occurs. The FR continues its descendent motion towards the initial position of the GNP. To understand this behaviour we display in Figure~\ref{fig:mag_cases} both cases at time $t=1400$ s. The dark region highlights the FR location and the colour scale indicates the strength of the magnetic field lines. It can be seen that the volume of the FR for PS1-C case is larger than for PS2-C. Studying the environment of the FR, we note that the magnetic cage, formed by the set of magnetic field lines from the PS lobe that overlay the FR and confine it, is wider and stronger for PS2-C. The differences between the two cages are most evident in the upper section of the cage, where the higher number of lines constituting the PS2-C cage is clear and their strengths can be compared by the colour levels. In addition, we observe a marked difference in the response of both cages to the FRs rise. In case PS1-C, we observe that the cage adapts and follows the shape of the FR, adopting a lock-like shape. In contrast, the PS2-C cage is not sufficiently prone to deformation, and this produces a noticeable imbalance between the fields supporting the FR below and those confining it above. Then, it is reasonable to infer that this produces a strong magnetic pressure gradient pushing the FR towards the base of the corona, which could trigger the decaying phase. The rigidity of the PS2-C cage may also be the reason for the reduced expansion of the FR, as can be noticed in the animation of the right panel of Fig.~\ref{fig:mag_cases} available in the HTML version. The animation shows the FR rising (until $t=2000\,$s) and its subsequent descent. At this last stage, the FR suffers a draining that results in the formation of detached magnetic islands around the FR boundaries. A similar behaviour is observed when comparing PS1-L and PS2-L cases, which share the same path until PS2-L slows its upward motion and finally starts the decaying phase. PS2-L also barely expands and suffers from mass draining. Summarising, the general behaviour of Class I non-eruptive events is characterised by a rising and a decaying phase. During the rising phase, the FR trajectories present the same behaviour than the Class I eruptive events described above. The magnetic cages of non-eruptive cases withstand the upward motion and slow down the FR until the decaying phase begins. During the decaying phase, the FR no longer resists the action of gravity and is guided by the ambient magnetic field lines towards the chromosphere. In addition, non-eruptive FRs expand weakly under the pressure of the ambient magnetic field and they become smaller as their outer parts split into detached magnetic islands, sometimes completely destroying the identity of the FR. \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure5.png} \caption{FR position (dark region) and magnetic field lines strength of PS1-C (eruptive; left panel) and PS2-C (non-eruptive; right panel) cases for $t=1400$ s. The animated evolution of the right panel is available in the HTML version. } \label{fig:mag_cases} \end{figure} \subsubsection{Class O} The triad PS3-L, PS3-C and PS3-R belongs to the class O events. They have a common PS structure, but the FR horizontal position is different for each of them. Because these cases are topologically different from the class I cases (see bottom row of Fig.~\ref{f:scenarios}), the FR trajectories are not affected in the same way by the null points. This triad has their own spine-like structure whose base is located at the LNP. Figure~\ref{fig:trajectory-eout} shows the trajectories for the PS3 cases. It can be seen that PS3-L and PS3-C are barely affected by the GNP, heading initially towards their LNP and then continuing upwards into their own spine zone, guided by the open magnetic field lines of this spine. However, PS3-R case, whose initial position is almost equidistant from both null points, travels between them before reaching the spine of the LNP. Summarising, the FR trajectories for class O are initially headed towards their LNP and then continue upwards toward their own spine-like zone. The events are not influenced by the GNP except when the FR is relatively close to it. Moreover, simulations in this scenario always erupt, seemingly because the LNP is directly connected to the open field lines and there is no magnetic cage above the FR. \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure6.png} \caption{FR trajectories for the class O cases: PS3-R, PS3-C and PS3-L. Dashed lines represent the path, stars the LNP location, and circles the GNP position for each case.} \label{fig:trajectory-eout} \end{figure} \subsection{Quantitative analysis} \label{ss:quantitative} \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure7.png} \caption{Magnetic field lines for events PS1-C (left) and PS2-C (right). The shaded light blue areas represent the magnetic cage above the FR, magenta and indigo dots indicate the initial position for PS1-C and PS2-C, respectively. The solid line represents the internal trajectory of the FR through which the flux of the magnetic cage is quantified.} \label{fig:mag_cagePS1-2} \end{figure} \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure8.png} \caption{Total unsigned magnetic flux per unit length of the magnetic cage for PS1 and PS2 cases.} \label{fig:mag_flux} \end{figure} In this section we will focus on the magnetic cage and its effect on FR evolution. To be precise, we define a magnetic cage as the structure formed by all the field lines enclosing the FR and whose both ends are attached to the base of the corona (height $y=0$). As suggested previously by Fig.~\ref{fig:mag_cases}, the magnetic cage of the non-eruptive events is larger and more intense than that of the eruptive cases. Figure~\ref{fig:mag_cagePS1-2} shows the magnetic cages for the PS1-C and PS2-C cases shaded in light blue. Inspired by the results of \citet{Li2020ApJ...900..128L,Li2021ApJ...917L..29L,Li2022ApJ...926L..14L}, we also determine the total unsigned magnetic flux to quantify the strength of the magnetic cages. Taking advantage of the symmetry considered in the $z$-direction, we calculate the initial magnetic flux per unit length $\phi_B$ through a path outlined by the FR trajectory as follows: \begin{equation} \phi_B =\tfrac{1}{L_z} \int_A |\vec{B}\cdot\vec{dA}| = \int_\gamma |B_\perp|\, dS, \end{equation} where $B_\perp$ is the magnetic field transverse to a curve $\gamma$ defined by the FR path (denoted by the solid coloured lines in Fig.~\ref{fig:mag_cagePS1-2}). Figure~\ref{fig:mag_flux} shows the total unsigned magnetic flux of each magnetic cage for all PS1 and PS2 cases (PS3 cases do not produce magnetic cages). Note that the magnetic flux values for the non-eruptive cases (PS2-L and PS2-C) are remarkably large in comparison to the eruptive cases. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figure9.png} \caption{Parameter map for the simulation set. The colour bar represents the magnetic cage flux strength. $B_0$ parameter is the background magnetic field related to the PS, $w_1$ and $w_2$ refer to the PS lobe widths, R-C-L are the FR alignments, and $y_n$ is the PS null point height. For each box the dynamical behaviour is indicated.} \label{fig:fluxmap} \end{figure} To understand how the dynamical behaviour is affected by the simulation parameters, we include in Figure~\ref{fig:fluxmap} the magnetic cage flux (represented by the colours of the colour bar) for the whole simulation set, as a function of $B_0$ ($y$-axis) and width-alignment ($x$-axis). The widths ($w$) are $w_1\sim y_n$ and $w_2\sim1.5 y_n$, being $y_n$ the height of the null point, and the alignment R-C-L as described in Section 2.3. We also separate the cases according to $y_n$ (top and bottom parts of the plot) with the values denoted on the right. For each case we indicate its classification as we defined in previous section. We notice again the correlation between larger magnetic cage fluxes and non-eruptive cases. In addition, these cases are more related with stronger $B_0$ magnetic fields and narrower pseudostreamers ($w_1$). This is expected as these parameters influence the magnetic flux of the pseudostreamer lobe. However, the magnetic cage flux will also depend on the position and parameters of the FR, i.e. on how many lobe lines actually belong to the cage. \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure10.png} \caption{Vertical velocity $v_y$ as a function of time for PS1 and PS2 cases.} \label{fig:velocidad} \end{figure} We also analyse the evolution of the FR variables for PS1 and PS2 cases to understand how they are affected by the magnetic cage. PS3 cases are not included since they do not present a magnetic cage and, moreover, they follow the trends of the class I$_\mathrm{e}$. First, we analyse the evolution of FR velocity and total force in the $y$-direction. Figure~\ref{fig:velocidad} shows the vertical velocity curves ($v_y$) up to $t=1000~$s. The initial force for non-eruptive cases (PS2-L and PS2-C) is stronger and heads the FRs towards the LNP with notably higher speeds, likely due to the closer proximity to the LNP. However, after reaching the maximum value, $v_y$ of I$_\mathrm{ne}$ events decreases more and steeper than $v_y$ of I$_\mathrm{e}$ events. Eventually $v_y$ becomes negative and the decaying phase of the FR starts. From the separate analysis of the force components (magnetic pressure and tension, gas pressure and gravity, not shown here), we find that the magnetic pressure gradient is the main responsible for the abrupt deceleration and the descent of the FR, after which gravity is the dominant decelerating force. This result is in agreement with the qualitative analysis presented in the previous section, in which we note that the concentration of field lines over the FR (see Fig.~\ref{fig:mag_cases}) seems to be responsible for exerting this magnetic pressure force. Gravity becomes the leading force once the FR is ``channelled'' by the lobe magnetic field lines (decaying phase). \begin{figure} \centering \includegraphics[width=1\linewidth]{Figure11.png} \caption{Average plasma density of the FR as a function of height. The dashed grey line represents the plasma density of the corona. The lower panel shows the corresponding ratio between the plasma density for each case and the coronal plasma density $\rho_\mathrm{c}$. } \label{fig:dens} \end{figure} From the analysis of the FR variables, we note the major differences (between I$_\mathrm{e}$ and I$_\mathrm{ne}$ cases) in the evolution of the hydrodynamic ones. As we also mentioned in the previous section, the volume of the non-eruptive FRs remains small, contained by the strong magnetic cage surrounding them. Thus, the plasma density and gas pressure for non-eruptive FRs is higher than for the eruptive FRs, which manage to expand. Figure~\ref{fig:dens} shows the evolution of the FR average plasma density as a function of height, together with the coronal plasma density $\rho_\mathrm{c}$ (dashed grey line). Initially, all FRs are overdense and they quickly decrease their average density since they are out of external equilibrium. Afterwards, the density continues to decrease as the FRs expand, following the drop in ambient pressure with altitude. However, since the non-eruptive FRs (PS2-L and PS2-C) practically stop expanding, their densities tend asymptotically to a certain value. In the bottom panel of Fig.~\ref{fig:dens} we present the ratio between the FR and coronal density, which highlights the balance between the weight and the buoyant force. We note an important difference between eruptive and non-eruptive cases, while the former manage to reach densities similar to that of the corona, the non-eruptive ones remain at more than twice the coronal density due to the lack of expansion. Consequently, the buoyant force of these last cases is not strong enough to overcome the gravitational field and the action of the magnetic cage to produce the eruption. \section{Discussion and Conclusions} In this work we analyse the dynamic behaviour of a FR located near an isolated PS. The magnetic configuration produces the emergence of two magnetic null points associated with both structures: a LNP (local null point) formed by the cancellation of the FR and PS magnetic fields, and a GNP (global null point) related to the PS itself. We note that the LNP is determinant for the early evolution of the FR. All simulated cases show an initial deflection due to the attraction towards this point of low magnetic energy. The subsequent evolution depends on whether the FR is enclosed by the PS lobes (class I events) or not (class O), showing that the hierarchy of the null points depends on the topology. In class O, the LNP is associated to an intrinsic spine-like configuration and the FR is guided by its open magnetic field lines instead of travelling towards the PS spine. For class I events, a second deflection can take place by the influence of the GNP, directing the FR to the PS spine. In this scenario, it is possible that the eruption fails. We determine that the magnetic cage, formed by the magnetic field lines from the PS lobe that encloses the FR, plays a crucial role in curbing the eruption. The non-eruptive cases, which initially reach higher velocities, are quickly decelerated by the magnetic cage. The cage field lines are compressed instead of adjusting to the rise of the FR, producing high magnetic pressure gradients that impulse the FR back to the surface. Also, we note for these cases that the expansion of the FR is inhibited by the magnetic cage, keeping it overdense and less buoyant, which helps to prevent the eruption. Thus, we quantified the total unsigned magnetic fluxes of the cages, obtaining that in the non-eruptive cases the average value is almost six times higher than in the eruptive cases. This magnitude can be interpreted as a measure of the magnetic cage resistance. We also showed that cases with stronger magnetic field $B_0$ and narrower PS lobes are prone to be non-eruptive. We show that the combination of a FR with a PS magnetic structure is topologically complex. Although the relative position between the FR and PS centre plays an essential role in predicting the non-radial motions of the FR trajectory, the magnetic flux contained in the magnetic cage seems to be the key parameter in determining whether an eruption can occur or not, in agreement with previous studies. Hence, we consider of utmost importance to attain improved magnetic field measurements such as those to be provided by missions like Solar Orbiter, PUNCH (Polarimeter to UNify the Corona and Heliosphere), and Aditya, among others, in order to analyse more observational events that can be compared with our results and to refine numerical models that contribute to space weather forecasts. \begin{acknowledgements} AS is doctoral fellow of CONICET. MC, GK, HC and AC are members of the Carrera del Investigador Cient\'ifico (CONICET). AS and MC acknowledge support from ANPCyT under grant number PICT No. 2016-2480. AS, MC, MVS and AC also acknowledge support by SECYT-UNC grant number PC No. 33620180101147CB. AS, MC, MVS and AC acknowledge support from PIP under grant number No. 11220200103150CO. MVS acknowledges support from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 724326). HC appreciates support from grants MSTCAME8181TC (UTN) and PIP 11220200102710CO (CONICET). Also, we thank the Centro de C\'omputo de Alto Desempe\~no (UNC), where the simulations were carried out. \end{acknowledgements} \bibliographystyle{apalike}
\section{Introduction} \begin{table*}[] \caption{A total of 19 features extracted and their descriptions.} \begin{tabular}{lll} \hline \textbf{Data type} & \textbf{Extracted feature} & \multicolumn{1}{l}{\textbf{Description}} \\ \hline {} & {total calling frequency} & the number of times that a participant answers and makes phone calls during a day. \\ \cline{2-3} {} & {total calling duration} & \makecell[l]{the total time in minutes that a participant spends each day answering and \\ making phone calls.} \\ \cline{2-3} {} & {non-working time calling frequency} &\makecell[l]{the number of times that a participant answers and makes phone calls at times other\\ than 8 am to 6 pm during a day.} \\ \cline{2-3} {} & {non-working time calling duration} & \makecell[l]{the total time that a participant answers and makes phone calls at times other than\\ 8am to 6pm during the day.} \\ \cline{2-3} {} & {number of missed calls} & the number of calls that are marked as missed during the day. \\ \cline{2-3} {} & {number of contacts} & the number of contact a participant answers and makes phone calls during the day. \\ \cline{2-3} {} & {calling entropy} & the variability of calling durations a participant spends in contacts during the day. \\ \cline{2-3} \multirow{-8}{*}{{\textbf{Phone call data}}} & {normalised calling entropy} & calling entropy divided by the logarithm of the number of contacts during the day. \\ \hline {} & {phone usage frequency~\citep{moshe2021predicting}} & the number of times that a participant interacts with their phone during a day. \\ \cline{2-3} \multirow{-2}{*}{{\textbf{Phone usage data}}} & {phone usage duration~\citep{moshe2021predicting}} & \makecell[l]{the total time in seconds that participants spend each day interacting with their mobile\\ phones.} \\ \hline {} & {lock screen duration} & the total time in seconds that participants lock their mobile phones during the day. \\ \cline{2-3} {} & {number of used apps} & the number of applications that a participant uses during the day. \\ \cline{2-3} {} & {number of midnight used apps} & the number of applications that a participant uses between 0am to 5am during the day. \\ \cline{2-3} \multirow{-4}{*}{{\textbf{User activity data}}} & {sleep time} & \makecell[l]{sleep time is considered to be between the last time an app was used in the previous\\ day (or in the same day before 2\,am if available) and the first time an app was used\\ after 5\,am} \\ \hline {} & {location variance~\citep{moshe2021predicting}} & \makecell[l]{the logarithm of the sum of the statistical variances in the latitude and the longitude of\\ all GPS coordinates in the day.} \\ \cline{2-3} {} & {location entropy~\citep{moshe2021predicting}} & the variability of the time that participants spend in significant places in the day. \\ \cline{2-3} {} & {normalised location entropy~\citep{moshe2021predicting}} & the location entropy divided by the logarithm of the number of significant places. \\ \cline{2-3} {} & {time at home~\citep{moshe2021predicting}} & \begin{tabular}[c]{@{}l@{}} \makecell[l]{Home is defined as the most frequent significant place where a participant spent\\ the most time between 0\,am to 6\,am.}\\ \makecell[l]{Time at home is defined as the percentage of time a participant spent at home\\ relative to other significant places.}\end{tabular} \\ \cline{2-3} \multirow{-5}{*}{{\textbf{GPS data}}} & {total distance~\citep{moshe2021predicting}} & the total distance covered by a participant during the day. \\ \hline \end{tabular} \label{Extracted_features} \end{table*} Depression, as a common mental health disorder, is typically characterised by low mood, overthinking, feelings of hopelessness, and decreased motivation. In extreme cases, people experiencing severe depression may have suicidal thoughts. Depression affects not only individual patients and their families, but also their social circle and overall economic development~\citep{auerbach2016mental}. In Germany, depression is the leading cause of the inability to work or early retirement and is the trigger for about half of all suicides each year. While most people with depression are treated in primary care settings, more than 50\,\% of people are not identified or effectively treated~\citep{moshe2021predicting}. The long-lasting primary method of clinical depression diagnosis relies on the self-assessment questionnaires, such as the Patient Health Questionnaire (PHQ)-2 and PHQ-9. These questionnaires have shown a strong correlation with actual human health. However, collecting them is usually time-consuming and has fixed time intervals, which can hardly detect the moment-by-moment psychological changes and achieve timely interventions. Recently, the rise of wearable devices and mobile phones has made sensor data more readily available. Previous studies have explored the possibility of using sensor data to diagnose human mental health states and have shown the effectiveness~\cite{han2021deep, qian2021artificial}. \citet{rohani2018correlations} provided a systematic survey for the correlations between sensor data and depressive mood symptoms. Compared to the self-assessment questionnaires, the passive data collection does not require an interaction with the device and can be collected at a more flexible time interval, which means that it can reflect immediate changes in psychological state, potentially enabling early diagnosis, prediction of disease progression, and timely adjustment of treatment plans. However, previous studies mainly focused on \emph{depression diagnosis} based on mobile phone data, i.\,e. , the prediction of depression state and/or severity for a given time-period (e.\,g. , on a daily, weekly, or bi-weekly basis) given concurrent features. In contrast, the forecasting of depression progression, i.\,e. , the prediction of state/severity on a given time-period given features further in its past, has not received sufficient attention. \citet{saeb2015mobile} has shown the effectiveness of using features extracted from mobile phone GPS and usage of sensors to diagnose if participants have depressive symptoms (PHQ-9$\geq$5). \citet{masud2020unobtrusive} extracted 12 features from GPS and acceleration data and classified participants' weekly PHQ-9 into three groups based on that week's features. \citet{lu2018joint} used the GPS, activity, sleep, and heart rate data collected from mobile phones and wearable devices to distinguish the participants with depression and diagnosed their clinical severity. They also only used the features from the same week to make the weekly diagnosis. Different from previous work, we design two tasks for both diagnosis and forecasting: the first task is to diagnose the current week's PHQ-9 score according to data from the same week, while the second task is to forecast the PHQ-9 score at the end of next week based on data from the current week. We treat the diagnosis and forecasting of PHQ-9 as a regression problem and implement an LSTM model combined with a subject-independent 10-fold cross-validation. We use a portion of passive data from a newly collected dataset called MAIKI, which includes phone call, phone usage, user activity, and GPS data. We choose root-mean-square error (RMSE) as the evaluation metric and use two methods categorising PHQ-9 scores into different subgroups. We distinguish the participants with major depression (PHQ-9$\geq$10) from those without. Additionally, we report a 5-class depression severity. Results show that the forecasting task achieves comparable results with the diagnostic task, which indicates the possibility of forecasting depression from mobile phone data. In order to compare different algorithm options and parameter settings, we also compare three different clustering methods to identify significant places (GPS coordinates that need to be considered the same place and meet certain conditions) from the GPS data. The rest of the paper is organised as follows. \cref{sec:maikidataset} introduces the newly collected MAIKI dataset and our feature extraction methods. \cref{sec:experimentalsetup} describes our task design, experimental setting, and evaluation approaches. \cref{sec:results} outlines the obtained results for diagnostic and forecasting tasks. \cref{sec:conclusion} concludes the paper with a brief discussion. \section{Dataset and feature extraction} \label{sec:maikidataset} \subsection{MAIKI dataset} The MAIKI dataset is collected from the ``Mobile daily living therapy assistant with interaction-focused artificial intelligence for depression'' (MAIKI) project. A total of 48 people participated in this project and carried mobile phones with a sensor data acquisition app for 8 weeks. The study procedures were approved by the ethics committee of the Friedrich-Alexander-University Erlangen-Nuremberg (385\_20B). The dataset has both active data from self-assessment questionnaires and passive data from mobile phone sensors. The active questionnaire data includes the weekly PHQ-9 and other questionnaires data such as Generalised Anxiety Disorder (GAD-7) and Perceived Stress Scale (PSS-4). The passive data includes phone call, phone usage, user activity, GPS, battery, phone text, ringtone setting, and step count data, which were collected during each day. In this work, we focus only on using (parts of) the passive data, namely phone call, phone usage, user activity, and GPS data to diagnose and forecast the weekly PHQ-9 scores. \cref{Extracted_features} shows an overview over all features per data type. In \cref{subsec:features}, we outline the procedure followed to extract the features of each data type, placing an emphasis on GPS features which follow a more involved process. \subsection{Feature extraction} \label{subsec:features} \subsubsection{Phone call, phone usage, and user activity features} We extract a total of 8, 2, and 4 features from phone call, phone usage, and user activity data, respectively. The descriptions of these features can be seen in \cref{Extracted_features}. These features are all extracted at a daily level for each participant. \subsubsection{GPS features} The extraction of GPS features is composed of three steps. The first step is to preprocess the raw GPS data. We remove GPS coordinates with positioning accuracy $\textgreater$80th percentile of all participants' GPS accuracy and additionally remove GPS measurements taken at a speed less than 0. Since only the GPS coordinates in the stationary state should be used in the following clustering step to identify significant places, we remove the GPS coordinates in the transition state with a speed of more than 1.4\,m/s. The second step aims to aggregate the GPS coordinates of the same location into a cluster. The cluster that meet certain conditions is considered a significant place. To compare different algorithm options and parameter settings, we implement three clustering algorithms described below. \textbf{Time-based clustering.} The basic idea of this algorithm is to cluster the GPS coordinates along the time axis and remove the intermediate coordinates between significant places~\cite{kang2005extracting}. This algorithm computes the place clusters incrementally as the next GPS coordinates come in. The algorithm has two parameters: the distance threshold $D_{time}$ is the maximum distance at which the next coordinate is considered to belong to the current place cluster; the time threshold $T_{time}$ is the minimum time duration for which the current cluster is considered as a significant place. When a cluster is a significant place, the algorithm checks whether the cluster should be merged into one of the existing clusters according to the distance between their centroids (the merged distance threshold equals $D_{time}$/3). \textbf{K-Means clustering.} The typical K-Means clustering algorithm requires a predetermined number of clusters $k$. But in our cases, the number of clusters can vary widely among different participants. Following \citet{saeb2015mobile}, we first set $k$ to 1 and increase the cluster number until the distance of the farthest point in each cluster to its cluster centre is less than a threshold $D_{kmeans}$. This threshold determines the maximum radius of a cluster. \textbf{DBSCAN clustering.} The Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm has two parameters: the $eps$ is the maximum distance between two coordinates for one to be considered as belonging to the same cluster of the other; the $minSamples$ is the minimum number of data points to form a cluster. This algorithm is generally regarded as particularly suitable for GPS data, as it allows to identify clusters of varying shapes and is robust to outliers~\cite{muller2021depression}. The third step is extracting the GPS features. The description of these features can be found in \cref{Extracted_features}. We perform clustering algorithms on all days of data for each participant, then extract GPS features for each participant on each day. \section{Experimental setup} \label{sec:experimentalsetup} We design two tasks for diagnosis and forecasting. The first task is to diagnose the current week's PHQ-9 score according to data from the same week. The second task is to forecast the PHQ-9 score at the end of next week based on data from the current week. For example, the diagnostic task is to predict the PHQ-9 score on day 7 based on the data from day 1 to day 7. In contrast, the forecasting task is to predict the PHQ-9 score on day 14 based on the data from day 1 to day 7. In order to maximise the utilisation of day-level features, we do not use the average of features in a week but give the same weekly PHQ-9 score as the label to the daily data in that week. We treat these two tasks as a regression problem and implement an LSTM model combined with a subject-independent 10-fold cross-validation to complete these tasks. The model has one LSTM layer, one fully connected layer, and a ReLU activation function. The learning rate and the hidden size of LSTM are set to 0.001 and 4, respectively. We choose the mean squared error as the loss function. The model is trained by gradient descent and using the Adam optimiser with $\beta$1 and $\beta$2 set to 0.9 and 0.999. As for the time-based clustering algorithm for GPS features, since the GPS data from our dataset is recorded every 5 minutes, we set $T_{time}$ to 15\,minutes and $D_{time}$ to 40\,metres~\cite{kang2005extracting}. For k-means clustering, we set $D_{kmeans}$ to 500\,metres~\cite{saeb2015mobile}. For DBSCAN, we set $eps$ to 30\,metres and $minSamples$ to 3~\cite{muller2021depression}. We use Haversine distance as the distance function. We choose the RMSE as the evaluation metric for regression and utilise two methods categorising PHQ-9 scores into subgroups. We set the cutoff value to 10 to distinguish the participants with major depression (PHQ-9$\geq$10)~\cite{kroenke2001phq} from those without and report the 2-class classification accuracy. We evaluate the predicted severity of depression according to \cref{severity} and report the 5-class classification accuracy. \begin{table}[t] \begin{center} \caption{Scale and 5-class scheme of depression severity.} \begin{tabular}{cl} \hline \textbf{PHQ-9 Score} & \textbf{Depression Severity} \\ \hline 0--4 & Minimal depression \\ 5--9 & Mild depression \\ 10--14 & Moderate depression \\ 15--19 & Moderately severe depression \\ 20--27 & Severe depression \\ \hline \end{tabular} \label{severity} \end{center} \end{table} \section{Results} \label{sec:results} \begin{figure}[t] \centering \includegraphics[width=.49\textwidth]{figures/feature_comparison.pdf} \caption{ Performance comparison for PHQ-9 (range from 0 to 27) diagnosis (left) vs forecasting (right) using different feature sets. } \label{fig:features} \end{figure} \begin{table*}[t] \centering \caption{ Results of diagnosing/forecasting the PHQ-9 (range from 0 to 27) at the end of the current/next week based on the data of this week. Accuracy [\%] reported for major depression (binary) and depression severity (5-class) tasks whereas RMSE is reported for PHQ-9 prediction. Baseline computed using mean PHQ-9 score of the training set. Mean performance and the standard deviations (in brackets) are reported over all 10 folds. } \label{results} \begin{tabular}{l|rr|rr|rr} \toprule & \multicolumn{2}{c}{\thead{Major Depression (\%\,Acc.)}} & \multicolumn{2}{c}{\thead{Depression Severity (\%\,Acc.)}} & \multicolumn{2}{c}{\thead{PHQ-9 (RMSE)}} \\ \thead{Model} & \thead{Diagnosis} & \thead{Forecasting} & \thead{Diagnosis} & \thead{Forecasting} & \thead{Diagnosis} & \thead{Forecasting}\\ \midrule Baseline & 60.6 & 56.7 & 49.7 & 43.0 & 4.858 & 4.915\\ K-means & {78.4 (3.5)} & \textbf{77.0 (6.7)} & \textbf{54.5 (7.1)} & \textbf{53.7 (6.4)} & \textbf{4.184 (0.569)} & \textbf{4.094 (0.619)}\\ DBSCAN & {74.4 (7.2)} & {71.9 (6.6)} & {52.5 (5.3)} & {47.4 (7.8)} & {4.443 (0.431)} & {4.401 (0.349)}\\ Time-based & \textbf{78.9 (4.6)} & {75.7 (5.3)} & {54.5 (4.7)} & {48.5 (7.3)} & {4.203 (0.621)} & {4.556 (0.445)}\\ \bottomrule \end{tabular} \end{table*} \subsection{Results of diagnostic task} \cref{results} shows the results of diagnosis the current week's PHQ-9 based on data from the same week. We calculate the baseline using the mean value of PHQ-9. Specifically, we assume that all the predictions from the baseline model are the mean value and then use this assumed mean prediction to calculate the RMSE with the actual labels. The results of all three methods are better than the baseline model. The optimal result is obtained from K-Means, which achieves an accuracy of 78.4\,\% for major depression diagnosis, $54.5\,\%$ for depression severity diagnosis, and a best RMSE score of 4.184. The time-based clustering algorithm obtains suboptimal results. It is worth mentioning that, contrary to previous findings that the DBSCAN clustering algorithm may be more suitable for GPS data~\cite{muller2021depression}; DBSCAN obtained the worst results in our setting. \subsection{Results of forecasting task} \cref{results} additionally shows the results of forecasting the PHQ-9 score at the end of next week based on data from the current week. The K-Means algorithm still obtains optimal results, which achieves an accuracy of 77.0\,\% for major depression forecasting and 53.7\,\% for depression severity forecasting. The best RMSE score of 4.094 is marginally lower than that of the diagnostic task, which means that the forecasting task achieves comparable results with the diagnostic task. The results indicate that it is possible to forecast depression based on mobile phone data. \subsection{Feature comparison} Finally, in \cref{fig:features} we show a performance comparison for PHQ-9 diagnosis and forecasting using different features. We observe that the user activity features obtain the best individual performance for both tasks. The performance of the phone call features is worse, potentially because this data is more sparse as subjects accept and conduct calls less frequently than using the phone for other purposes. Combining all information in the all feature sets results in a slight performance boost. \section{Conclusion} \label{sec:conclusion} In this work, we investigated the potential of using passively collected mobile phone data for depression diagnosis and forecasting. We have shown that forecasting (predicting PHQ-9 scores, major depression, and depression severity) 1-week ahead of the collected data is possible, with performance close to that of predicting the current week (diagnosis). These results showcase the potential of such features of timely diagnosis and change-of-state prediction; both valuable targets for future digital health applications. These tasks are best modelled using a combination of features, of which user activity are the most important. In addition, our experiments show that K-Means clustering for generating GPS features fares better than DBSCAN and time-based clustering; a finding which contrasts previous work showing the latter to be better. This indicates that the performance of such algorithms might be dataset-dependent, and thus a cross-study comparison would be necessary to identify the strengths and weaknesses of each for depression detection. \section*{Acknowledgments} \noindent Data analysed in this publication were collected as part of the MAIKI project, which was funded by the German Federal Ministry of Education and Research (grant No.\ 13GW0254). The responsibility for the content of this publication lies with the authors. \section{\refname} \printbibliography[heading=none] \end{document}
\section{Introduction} Stellar mergers and common envelope phases are transformational episodes in multiple star lifetimes. These phases modify the mass, luminosity, and spectral distributions of stellar populations \citep{2017PASA...34....1D}. They are crucial in shaping the evolutionary history of many massive stars, which are especially likely to have close companions \citep{2012Sci...337..444S,2013ARA&A..51..269D,2014ApJ...782....7D}. And finally, stellar mergers and common envelope phases are thought to be crucial in producing exotic stellar outcomes, like rapidly rotating and highly magnetized stars \citep[e.g.][]{2007MNRAS.375..909S,2013ApJ...764..166D,2016MNRAS.457.2355S}, or compact binaries that go on to merge under the influence of gravitational radiation \citep[e.g.][]{2012ApJ...759...52D,2013A&ARv..21...59I,2014LRR....17....3P,2020PASA...37...38V,2021A&A...650A.107M}. The growing number of transient surveys across the electromagnetic and gravitational wave spectra are offering a new channel for insight into these events. Much of traditional astronomical inference about these objects has come from comparing populations of binary and multiple stars before and after presumed interactions \citep[e.g.][]{1976IAUS...73...75P,1976IAUS...73...35V}. With time-domain surveys, the possibility of observing these events as galactic or extragalactic transients has become feasible. Catching these events in action is poised to allow us to make direct connections between stellar binaries (and multiples), the transients they produce as they coalesce, and the outcomes of their interactions. This paper attempts a step toward those inferences on the basis of the population of Luminous Red Novae (LRNe). LRNe have been associated with stellar mergers, largely through comparison to the particularly clear case of V1309 Sco -- an eclipsing binary system with a decaying orbit that went into outburst and emerged as a single, thermally expanded star \citep{2010A&A...516A.108M,2011A&A...528A.114T,2014AJ....147...11M,2015A&A...580A..34K,2016A&A...592A.134T,2019MNRAS.486.1220F}. There is now a small sample of LRNe ($\sim 10$ systems) with known progenitor properties along with detailed observations of the outbursts themselves \citep[for a recent tabulation, see][and Section \ref{sec:lrn}]{2022arXiv220210478M}. As the ejecta of LRNe expands, it cools, producing progressively redder emission. As a natural consequence of this cooling, these ejecta eventually form molecules and dust \citep[see][for detailed analysis of the galactic sources V4332 Sgr, V1309 Sco, and V838 Mon]{2018A&A...617A.129K,2021A&A...655A..32K}. Dust formation episodes mark each of the LRNe, and these sources become highly infrared luminous in their immediate aftermath as dusty shells enshroud their ongoing evolution \citep[e.g.][]{2013MNRAS.431L..33N,2014AJ....147...11M,2014A&A...569L...3C,2016A&A...592A.134T,2020MNRAS.496.5503B,2020RNAAS...4..238M}. Further, the contribution of dust formed in common envelope ejecta is thought to be similar to that formed by single evolved stars \citep{2013ApJ...768..193L,2013ApJ...777...23Z,2015RAA....15...55W}. While dust formation appears to be ubiquitous, the shocks that heat LRNe ejecta depend on the particular system's properties. The characteristic condensation temperature ($\sim 10^3$~K) for dust grains largely does not. We therefore expect differences to emerge in the efficiency of dust formation and the degree of optical obscuration that results. In this paper, we draw on scalings from the observed LRNe to constrain the uncertain thermodynamics of LRNe ejecta (Section \ref{sec:lrn}). We model the phases of pre-outburst mass loss into the circumbinary environment \citep{2014ApJ...788...22P,2016MNRAS.455.4351P,2016MNRAS.461.2527P,2017ApJ...850...59P,2018ApJ...863....5M,2018ApJ...868..136M,2020ApJ...893..106M,2020ApJ...895...29M}, that are believed to precede outburst from stellar coalescence (Section \ref{sec:model}). Our models predict the circumbinary mass and temperature distribution, and allow us to convert this to order-of-magnitude estimates for the degree of dust obscuration, which varies widely depending on the merging system's properties (Section \ref{sec:results}). The qualitative picture that emerges is one of a bifurcation of transients between the optical and infrared, depending on the properties of progenitor. In Section \ref{sec:conclusions}, we conclude. \section{Dust Formation in Merger Ejecta}\label{sec:lrn} First, we draw on constraints from the subset of the population of LRNe with progenitor detections to understand the cooling of ejecta and dust condensation in these events. \subsection{Luminous Red Nova Sample}\label{sec:sample} A growing number of progenitor systems of LRNe have been discovered. This allows us to compare the binary systems (or at least the primary stars in these binary systems) to the transients that they produce. We make use of the modeled progenitor masses, radii, luminosities, and effective temperatures reported in the literature for eight transients: V4332 Sgr \citep{1999AJ....118.1034M}, V838 Mon \citep{2002A&A...389L..51M,2003Natur.422..405B,2005A&A...436.1009T,2005A&A...441.1099T}, V1309 Sco \citep{2010A&A...516A.108M,2011A&A...528A.114T}, NGC4490-OT2011 \citep{2016MNRAS.458..950S}, M31 LRN 2015 \citep{2015ApJ...805L..18W,2015A&A...578L..10K,2017ApJ...835..282M,2020MNRAS.496.5503B}, M101 LRN 2015 \citep{2017ApJ...834..107B}, SN Hunt 248 \citep{2015MNRAS.447.1922M}, and AT2018 bwo \citep{2021A&A...653A.134B}. The extragalactic transients AT 2018hso \citep{2019A&A...632L...6C}, AT 2019zhd \citep{2021A&A...646A.119P}, AT 2020hat and AT 2020kog \citep{2021A&A...647A..93P} also have pre-outburst absolute magnitudes and colors, but no comparisons to stellar model tracks have been made. The galactic transients OGLE-2002-BLG360 \citep{2013A&A...555A..16T} and CK Vul (1670) \citep{1985ApJ...294..271S}, are both possibly associated with a stellar merger origin despite having light curves that are somewhat distinct from the other LRNe \citep[e.g. as discussed by][]{2013A&A...555A..16T}. Unfortunately, the physical properties of the progenitors of these outbursts remain uncertain. OGLE-2002-BLG360 has a number of interesting properties in the context of dusty transients, which we discuss in Section \ref{sec:blg360}. It is important to highlight that each of these progenitor identifications suffers from the uncertainty of model dependence. In particular, mass transfer could potentially induce significant departures in stellar appearance relative to an isolated-star model \citep{2021A&A...653A.134B}. For our analysis, we adopt the tabulated properties of systems in \citet{2022arXiv220210478M}. \subsection{Molecule and Dust Condensation in LRNe} The light curves of LRNe exhibit a progressive reddening which traces the cooling emission of their ejecta. This evolution was first traced in exquisite detail during in the 2002 outburst of V838 Mon \citep{2002A&A...389L..51M,2002MNRAS.336L..43K,2003Natur.422..405B,2005A&A...436.1009T}. The source was quickly attributed to a possible stellar coalescence origin \citep{2003ApJ...582L.105S,2006A&A...451..223T,2006MNRAS.373..733S}. Early spectroscopy of V838 Mon showed H$\alpha$ emission that was soon accompanied by broadened P-Cygni absorption lines tracing the ejecta velocity \citep{2002A&A...389L..51M}. This is particularly evident in the high-resolution spectra \citet{2009ApJS..182...33K}, tracing molecular absorption outside the remnant's photosphere in 2005. Early near-infrared spectra traced the emergence of CO and other molecules \citep{2002A&A...395..161B}, and an infrared excess in the object's spectral energy distribution was also noted \citep[e.g.][]{2005A&A...436.1009T}. Molecular CO emission in the sub-millimeter bands has since been a valuable tracer of the ejecta \citep{2007A&A...475..569K}, spatially resolved approximately 5 years after the outburst \citep{2008A&A...482..803K}. It has now been observed with Atacama Large Millimeter Array (ALMA), where the interaction of the ejecta with a tertiary component in the system is seen in continuum dust emission and a variety of carbon and sulfur oxide lines \citep{2021A&A...655A..32K}. Further recent constraints on the long-term composition and properties of the dusty ejecta have been derived from Spitzer space telescope and SOFIA observations \citep{2021AJ....162..183W}. Subsequent transients have also been observed to undergo epochs of significant dust formation, simultaneous with the dimming of the optical light curve. For example, \citet{2013MNRAS.431L..33N} and \citet{2016A&A...592A.134T} showed the significance of an evolving spectral energy distribution in V1309 Sco, with a significant shift toward infrared dominance as the optical light faded \citep[see, for example, Figure 7 of][]{2016A&A...592A.134T}. Meanwhile V1309 Sco's optical and sub-millimeter spectra traced similar evolution of molecular formation and absorption seen in V838 Mon and V4332 Sgr, strengthening the connection between these transients \citep{2015A&A...580A..34K,2018A&A...617A.129K}. V1309 Sco shows evidence for warm dust ($\sim 10^3$~K) even prior to the outburst, indicating that dust formation was ongoing, but at a lower level than in the aftermath of the merger \citep{2016A&A...592A.134T}. As a decade-older twin of V838 Mon and V1309 Sco, V4332 Sgr's remnant has proved valuable in understanding the temporal evolution of these sources \citep[e.g.][]{2003ApJ...598L..31B,2004ApJ...604L..57B,2005A&A...439..651T,2010A&A...522A..75K,2011A&A...527A..75K,2013A&A...558A..82K,2015A&A...578A..75T,2018A&A...617A.129K}. The more recently-discovered extragalactic LRNe all share similar cooling and molecule and dust-forming properties, which are described in detail in the references in Section \ref{sec:sample} as central evidence for their association with a stellar-coalescence origin. Theoretically, there have been some efforts to model dust formation in merger or common envelope ejecta. Models of dust formation, usually adapted from the asymptotic giant branch (AGB) star context, have been applied to ejecta kinematics and thermodynamics thought to mimic those of merger and common envelope ejecta \citep{2013ApJ...768..193L,2013ApJ...777...23Z}. These models estimate dust masses as a function of radius under different model parameters, and also predict the population contribution of common envelope ejecta to the total dust content of the interstellar medium \citep{2013ApJ...768..193L,2015RAA....15...55W}. \citet{2018MNRAS.478L..12G} have pointed out that the adiabatic cooling of common envelope ejecta makes dust formation inevitable, and that the increase in opacity associated with this transition may allow radiation pressure to play an important role in driving mass ejection, as in dust driven winds from pulsating AGB stars. \citet{2019MNRAS.489.3334I,2020MNRAS.497.3166I} perform a related, but more detailed analysis of the thermodynamic trajectories of simulated common envelope phases, and the implications for dust condensation in a dynamic model. As hinted by the V1309 Sco data \citep{2016A&A...592A.134T}, they find that warm dust condenses both in early, slow outflow from the phase of Roche lobe overflow preceding the merger, and in the later common envelope ejecta, with slightly different properties of grain size distribution \citep{2020MNRAS.497.3166I}. Dust formation appears to be a ubiquitous and inevitable consequence of the cooling of expanding merger and common envelope ejecta. The composition and quantity of this dust are remain areas of active observational study, and are sensitive to different parameterizations of the uncertain ejecta thermodynamics \citep[e.g.][]{2013ApJ...768..193L}. In the next section we focus on the condensation of warm dust at a characteristic temperature of $\sim 10^{3}$~K as a means of tracing the constraining the uncertain thermodynamics of LRNe ejecta. \subsection{Constraints on Ejecta Thermodynamics} The thermodynamics of cooling LRNe ejecta is uncertain. It is dictated by the equation of state and ionization state transitions of hydrogen and helium in the relevant temperature range, as well as by internal shock heating and radiative cooling. Thus, it is not clear that the ejecta temperatures should follow tracks of adiabatic cooling as they expand. By comparing the LRNe population to general power-law temperature profiles, $T(r) \propto r^{-\beta}$, we can constrain the normalization and slope of the temperature structure of these ejecta. The model power-law temperature as a function of radius is \begin{equation} T(r) = T_0 \left(\frac{r}{R_0}\right)^{-\beta} \end{equation} where $R_0$ is the base of the outflow. We parameterize the temperature at the base of the outflow as \begin{equation} T_0 = f_{\rm vir} T_{\rm vir} \end{equation} where $f_{\rm vir} = T_0 /T_{\rm vir}$ is the fraction of the Virial temperature, $T_{\rm vir}$, of the primary star at radius $R_0$, \begin{equation} T_{\rm vir}(R_0) = \frac{\mu m_{\rm p}}{k_B} \frac{G M_0}{R_0}, \end{equation} where we will adopt $M_0 \rightarrow M_\ast$ and $R_0 \rightarrow R_\ast$. Thus, \begin{equation} T_0 \sim 3\times10^4 \left( \frac{f_{\rm vir}}{0.02} \right) \left( \frac{ M_0 }{M_\odot} \right) \left( \frac{R_0}{16R_\odot} \right)^{-1}~{\rm K}, \end{equation} taking example values of the parameters. Here we note that $f_{\rm vir}$ is thought to be related to the temperature to which material is shock-heated before it is expelled, but it could equivalently represent the original temperature of unshocked ejecta. This temperature profile implies that material will condense to form dust grains at a radius of the order of \begin{equation}\label{rdust} r_{\rm dust} = \left( \frac{T_{\rm dust}}{T_0} \right)^{-1/\beta} R_0, \end{equation} where $T_{\rm dust}\sim 10^3$~K is the temperature at which significant quantities of dust form. This transition induces a major opacity increase, that changes the spectral energy distribution of the LRN from optical to infrared dominated. During the outburst phase of a merger or common envelope episode, the luminosity and temperature of of the coalescing binary increase dramatically. The source of this increased output is the dissipation of orbital energy into the surrounding gaseous envelope. One possible effect of increasing the central object's luminosity is modifying the thermodynamic properties of the circumbinary material. In thermodynamic equilibrium, the dust formation will occur at \begin{equation} r_{\rm dust,eq}= \left( \frac{L}{4\pi \sigma T_{\rm dust}^4} \right)^{1/2}. \end{equation} Comparing $r_{\rm dust}$ as determined by the internal shock temperature to $r_{\rm dust,eq}$ determined by the equilibrium thermodynamics allows us to determine the relative importance of the increased outburst luminosity in inhibiting dust formation. \begin{figure}[tbp] \begin{center} \includegraphics[width=0.49\textwidth]{r90.pdf} \caption{The characteristic radius of dust formation in LRNe as measured by $r_{90}$ and as predicted by various models. The thermal equilibrium dust formation radii are much larger than $r_{90}$ for all of the observed systems, which are better modeled by Virialized ejecta with $f_{\rm vir} \sim 10^{-2}$ and $\beta \sim 1$. The constant Virial fraction implied by $\beta \sim 1$ is highly suggestive of internal shocks shaping the ejecta thermodynamics. } \label{fig:r90} \end{center} \end{figure} We apply these considerations to the observed LRNe in Figure \ref{fig:r90}. Here we compute \begin{equation} r_{90} = t_{90} v_{\rm obs}, \end{equation} for each transient, where $t_{90}$ is the timescale encompassing 90\% of the optical emission and $v_{\rm obs}$ is the velocity inferred from doppler-broadened emission lines \citep[$L_{90}$ is the mean luminosity over $t_{90}$,][]{2022arXiv220210478M}. This radius is approximately the radial location where dust formation truncates the optical light curve and shifts the spectral energy distribution of the LRNe to become infrared luminous \citep{2022arXiv220210478M}. We see that for each LRN transient, $r_{90} \ll r_{\rm dust,eq}$, adopting $L=L_{90}$. This indicates that the thermal equilibrium temperature is not established in the ejecta, and does not inhibit dust formation at radii smaller than $r_{\rm dust,eq}$. Next, we compare models of $r_{\rm dust}$ based on the temperature resulting from internal shocks. We find that $\beta \sim 1$ and $f_{\rm vir}\sim 10^{-2}$ provide a good description of the data with $M_0=M_\ast$ and $R_0= R_\ast$. This indicates that ejecta are only weakly thermalized at the ejection radius, but that their temperature profile decays more gradually than the equation of state alone would indicate, most likely due to internal shock heating \citep[e.g.][]{2016MNRAS.455.4351P,2017MNRAS.471.3200M}. A temperature profile of $\beta =1$ corresponds to gas specific energy proportional to the gravitational potential, in which case the Virial fraction is constant with radius, as would be expected for an internal-shock origin for the temperature profile when the ejection velocity is similar to the local escape velocity. Compared to models of merger and pre-common envelope dust formation, this result is in tension with previous assumptions. \citet{2013ApJ...768..193L} assume shallower temperature profiles of $\beta = 0.2$--0.4, along with a shallower density profile $\rho \propto r^{-3/2}$, noting that different assumptions about the temperature profile in that range could induce seven orders of magnitude difference in the total modeled dust mass (this is likely, in part, due to the divergent density profile that is chosen -- if most of the dust is at large radii, the temperatures at those radii become very important). \citet{2019MNRAS.489.3334I} and \citet{2020MNRAS.497.3166I} adopt a very different kinematic and thermodynamic structure motivated by late-stage adiabatic expansion of unbound ejecta in their common envelope simulation. They find an expanding shell of ejecta decreases in density as $\rho \propto r^{-3}$, and at sufficiently late times, cools adiabatically, such that $T\propto r^{-2}$. However, their models also show evidence of the specific entropy increases at earlier times that trace shock heating. Taken together, these results could suggest that internal shocks are important over some temporal and radial regime as the ejecta expand and cool toward the dust condensation temperature but that they asymptotically approach homologous, adiabatic expansion at larger radii. \section{Pre-Outburst Mass Loss Model}\label{sec:model} In this section, we describe a simplified model for the mass loss that precedes binary coalescence that is motivated by constraints from LRNe outbursts and by modeling of these phases. \subsection{Coupled Mass Loss and Orbital Decay} We define a model binary system consisting of an evolving primary star of mass $M_\ast$ and radius $R_\ast$, which is interacting with a more compact companion of mass $M_{\rm a}=qM_\ast$, where $q$ is the binary mass ratio. To model the runaway orbital decay associated with dynamically unstable mass transfer, we use the {\tt RLOF} python package \citep{RLOF1.1}. {\tt RLOF} adopts numerical coefficients based on hydrodynamic simulations of runaway binary coalescence \citep{2020ApJ...893..106M,2020ApJ...895...29M} and solves the ordinary differential equations of binary orbital evolution in the point-mass binary limit. We initialize our model system when the primary star is slightly overflowing its Roche lobe, $a=0.999a_{\rm RL}$, where $a$ is the orbital semi-major axis and $a_{\rm RL}$ is the semi-major axis of Roche lobe overflow as estimated by the \citet{1983ApJ...268..368E} approximation. We integrate the coupled equations of non-conservative mass loss from a binary system and orbital angular momentum conservation, which reduce to \begin{align} \dot a &= -2 a \frac{\dot M_\ast}{M_\ast} \left[ 1 - \left( \gamma_{\rm loss} + {1\over 2}\right) {M_\ast \over M} \right], \label{adot} \\ \dot M_\ast & = - \alpha {M_\ast \over P_{\rm orb} } \left( {R_\ast - R_L \over R_\ast} \right)^{n+{3\over 2}}, \label{mdot} \end{align} where $M=M_\ast + M_{\rm a}$, and \begin{equation} \gamma_{\rm loss} = {l_{\rm loss} \over l_{\rm bin}}, \end{equation} is a dimensionless specific angular momentum of material leaving the binary. It is the ratio of the specific angular momentum, $l_{\rm loss}$, of lost material to the specific angular momentum of the binary, $l_{\rm bin} = M_\ast M_{\rm a} / M^2 \sqrt{GMa}$. In the expression for $\dot M_\ast$, $\alpha$ is a coefficient of order unity, the orbital period is \begin{equation} P_{\rm orb} = 2\pi \left( \frac{a^3}{GM} \right)^{1/2}, \end{equation} $R_L$ is the the Roche lobe radius \citep{1983ApJ...268..368E}, and $n=1+1/\Gamma$ is the polytropic index of the primary star. Equation \eqref{mdot} is from \citet{1972AcA....22...73P}, and has been numerically verified in hydrodynamic simulations by \citep{2018ApJ...863....5M,2020ApJ...893..106M}, and represents adiabatic mass loss from a polytropic donor star. We caution that in cases where the thermal adjustment of the mass-shedding layers of the donor star are important, the approximation of equation \eqref{mdot} will be inaccurate. In what follows, to provide context for the qualitative trends across many binaries, we make some uniform assumptions for all of the binary systems we model. We assume all primary stars have $n=3/2$ polytropic index that enters into equation \eqref{mdot}, and we further assume that the adiabatic response of the donor star is to maintain constant radius upon mass loss. More tailored parameters can be easily specified with {\tt RLOF}, or similar models that account for the thermal and nuclear evolution of the primary star could be completed with the binary module of MESA \citep{2011ApJS..192....3P,2013ApJS..208....4P,2015ApJS..220...15P,2018ApJS..234...34P,2019ApJS..243...10P}, for example as recently computed in a similar context by \citet{2021A&A...653A.134B}. \subsection{Circumbinary Material} The kinematics and thermodynamics of material in the circumbinary environment are complex and multidimensional. The continuous orbital motion launches spiral shocks through outflowing material, which provide heat and redistribute angular momentum. Early, slower mass loss trails away from the binary concentrated toward the system's orbital plane and may be either bound \citep{2016MNRAS.461.2527P,2018ApJ...868..136M,2020ApJ...895...29M}, or weakly unbound \citep{2016MNRAS.455.4351P,2017ApJ...850...59P,2019MNRAS.489..891H}. Later, faster ejecta encounter this torus, and are reshaped into bipolar outflows \citep{2018ApJ...868..136M}. \subsubsection{Torus Model}\label{sec:torus} If the pre-coalescence mass loss is bound to the binary system, as found in the hydrodynamic simulations of \citet{2018ApJ...868..136M,2020ApJ...895...29M}, it forms a thick torus surrounding the binary. Within this torus, gas is shock heated by the continual spiral outflow from the binary. \citet{2020ApJ...895...29M} found that these shocks also redistribute angular momentum, such that the torus has nearly constant specific angular momentum determined by the total mass loss and total angular momentum change of the decaying orbit. An analytic solution for a hydrostatic toroidal configuration with constant specific angular momentum can be derived if we assume a polytropic equation of state $P=K\rho^\gamma$. Then, \begin{equation} \rho(R,z) = \left[ \frac{\gamma-1}{K\gamma} \left( \frac{GM}{r} - \frac{l^2}{2R^2} - \frac{GM}{R_0} + \frac{l^2}{2R_0^2} \right) \right]^{\frac{1}{\gamma-1}}, \end{equation} where $R$ and $z$ are cylindrical coordinates relative to the central binary mass, $M$. In this parameterization, $l$ is the torus specific angular momentum and $R_{\rm t}$ is the outer radius of the torus (see appendix B of \citet{2020ApJ...895...29M} for the derivation of this expression). On the basis of hydrodynamic simulation results, \citet{2020ApJ...895...29M} provide fiducial torus parameters for this torus model as it is implemented in {\tt RLOF}. We set $l=\Delta L/\delta m$ where $\Delta L$ is the cumulative binary angular momentum change, and $\delta m$ is the mass change. This implies that all mass and angular momentum lost from the binary go to forming the torus. We set \begin{equation} R_{\rm t} = 200 q_0^{0.64} R_*, \end{equation} where $q_0$ is the initial binary mass ratio. This implies that the extent of the circumbinary material scales with the primary star radius. Finally, the specification of the torus polytropic constant, $K$, and index, $\gamma$, closes the model. These are linked to the temperature structure via an ideal gas equation of state $T=(P/\rho)(\mu m_{\rm p}/k_B)$, where we adopt $\mu \approx 1$. We choose $\gamma=4/3$, then the polytropic constant $K$ is calculated for self-consistency between $R_{\rm t}$ and the integral torus mass. The choice of $\gamma=4/3$ is motivated by two factors. First, this is the best fit to \citet{2020ApJ...895...29M}'s hydrodynamic simulation models, where internal shocks (rather than the gas' adiabatic index) are the critical factor in establishing this entropy profile. Second, this implies $T(R,0) \propto R^{-1}$ in the bulk of the torus, just as noted in Section \ref{sec:lrn} for the Virialized ejecta from LRNe. We note that this temperature probably represents the post-shock temperature in the wake of passing internal shocks, $T_{\rm sh}$, and can be modified by radiative cooling and diffusion in the intervals between the passage of shocks \citep[e.g.][]{2016MNRAS.455.4351P}. The Virial fraction to which circumbinary material is shock-heated is proportional to the square of the ratio of the velocity dispersion of internal shocks over to the characteristic velocity at a given radius, $f_{\rm vir}\sim \Delta v^2 / (G M_\ast/r)$ \citep[e.g.][]{2016MNRAS.455.4351P,2020ApJ...895...29M}. The normalization of our models shows that $f_{\rm vir}$ is a function of binary mass ratio, with $f_{\rm vir}\sim 0.25$ for $q=1/3$, and $f_{\rm vir}\sim 0.15$ for $q=0.01$ \citep{2020ApJ...895...29M}. We note that this is significantly higher $f_{\rm vir}$ than found for the outburst phase in Section \ref{sec:lrn}; this is likely because the slow, early outflow self-intersects much more dramatically as it decelerates in the gravitation potential than does the faster, more homologous late ejecta which are being modeled in Figure \ref{fig:r90}. \subsubsection{Wind Model}\label{sec:wind} If, rather than being bound to the binary, the circumbinary material is unbound and expands outward with an asymptotic velocity $v_{\rm w}$, we can adopt a different model to describe the circumbinary distribution. We imagine that the most likely scenario is a relatively slow, equatorially-concentrated outflow, in which internal shocks again play a central role in the thermodynamic structure \citep{2016MNRAS.455.4351P}. In this model, we specify the wind velocity to be a fraction of the stellar escape velocity, \begin{equation} v_w = f_v \left( 2G M_\ast \over R_\ast\right)^{1/2}, \end{equation} where, motivated by \citet{2016MNRAS.455.4351P}, we choose $f_v = 0.25$ to represent a slow outflow solution. We use the time-evolving mass loss rate $\dot M_\ast(t)$ from the {\tt RLOF} solution, along with the substitution \begin{equation} \label{rwind} r= R_\ast + v_{\rm w} \Delta t, \end{equation} where $\Delta t = t_{\rm merge}-t$ is the time before binary merger, in our case, when $a=R_\ast$. Each shell of the circumbinary distribution therefore corresponds to a certain time of emission from the binary. Then \begin{equation} \rho (r) \approx - \frac{\dot M_\ast(r)}{4\pi r^2 v_{\rm w}}, \end{equation} where $\dot M_\ast(r)$ is related to $\dot M_\ast(t)$ by equation \eqref{rwind} and the sign comes from the fact that $\dot M_\ast < 0$. We note that the time dependence of $\dot M(t)$ implies a density slope steeper than $r^{-2}$ surrounding the binary. Under our fiducial assumptions, we find scaling similar to $\rho \propto r^{-3.5}$. We use the Viral factor to set the post-shock temperature structure of the outflow, \begin{equation} T_{\rm sh}(r) = f_{\rm vir} T_{\rm vir} \left( \frac{r}{R_\ast} \right)^{-1} \end{equation} and adopt the same $r^{-1}$ slope, which is motivated by internal shock heating and is equivalent to the $\gamma = 4/3$ index of the torus model. As a fiducial normalization, we adopt $f_{\rm vir}=0.25$ for $q=1/3$ \citep{2020ApJ...895...29M}. \subsubsection{Dust Properties and Extinction} We adopt a highly simplified dust model, with the goal of estimating the order of magnitude significance of dust extinction in circumbinary material. We assume that dust forms when the post-shock temperatures are below a condensation temperature, $T_{\rm sh} \lesssim T_{\rm c}=10^3$~K. Below $T_{\rm c}$, we assume a constant mass fraction of material forms grains, $X_{\rm d}=5\times10^{-3}$. We adopt a fiducial V-band opacity for these grains of $\kappa_{\rm d} = 10^3$~cm$^2$~g$^{-1}$. In reality, the creation and destruction of grains takes time, and a time-dependent dust condensation, growth, and sputtering model could be used to develop much more sophisticated models of the ejecta--dust interaction \citep[e.g.][]{2016A&A...594A.108H,2022A&A...657A.109H}. For now, we note that the dust-to-gas fraction and the grain size distribution will be affected by the density and temperature of the outflow \citep[e.g.][]{2013ApJ...768..193L,2018MNRAS.478L..12G}, and that revisiting these schematic properties in the future will offer significant insight into the dust forming properties of these coalescing binary systems. Such an exercise has been recently undertaken in the limit of asymptotic expansion of simulated ejecta by \citet{2020MNRAS.497.3166I}. In either of our models, we integrate the total optical depth due to dust extinction along a line of sight (in the equatorial plane for the torus model), \begin{equation} \tau_{\rm d} = \int_{R_\ast}^{\infty}\rho X_{\rm d} \kappa_{\rm d} dr, \end{equation} where $\rho$ is a function of $r$ in the wind model, and $r$ and $z$ in the torus model and $X_{\rm d}$ is a function of the local temperature. We then specify $A_V = 1.086 \tau_{\rm d}$. \section{Pre-Outburst Obscuration}\label{sec:results} In this section, we explore the dependence of dust formation and obscuration on binary system parameters. \subsection{Time evolution} \begin{figure}[tbp] \begin{center} \includegraphics[width=0.49\textwidth]{ts.pdf} \caption{Time evolution of orbital period, circumbinary mass loss rate, and optical obscuration, in an example merging binary system. This system consists of an $M_\ast=M_\odot$, $R_\ast=30R_\odot$ primary star unstably transferring mass to a $M_\odot/3$ companion. We integrate this example until the separation equals $R_\ast$ and the pair merges. In both the wind and torus models of pre-outburst obscuration, the degree of obscuration increases as the mass loss intensifies and the system's merger approaches. } \label{fig:ts} \end{center} \end{figure} We begin, in Figure \ref{fig:ts}, by showing the temporal evolution of an example system from unstable Roche lobe overflow until the orbit shrinks to the primary star's radius, $a=R_\ast$. We imagine this as a point of transition from the ``lead-in" to the engulfment of the secondary object that initiates the merger or common envelope phase itself. The system in Figure \ref{fig:ts} consists of an $M_\ast=M_\odot$, $R_\ast =30R_\odot$ primary star transferring mass toward a $M_{\rm a} = 0.33M_\odot$ companion ($q=1/3$). The system is otherwise modeled by our fiducial parameters described in Section \ref{sec:model}. As the binary orbital period decreases, the degree of Roche lobe overflow of the primary star increases, driving the rate of mass loss from the system to increase also, as described by equation \eqref{mdot} and shown in the middle panel of Figure \ref{fig:ts}. This increasing mass loss rate accelerates the rate of orbital decay, as described by equation \eqref{adot}. The coupled mass loss and orbital decay lead to the eventual deposition of $\Delta m \sim 0.25 M_{\rm a}$ into the circumbinary environment \citep{2020ApJ...895...29M}. The lower panel of Figure \ref{fig:ts} shows the time-dependent obscuration of the merging binary due to this circumbinary material. We show results from both the torus and wind models for the circumbinary distribution, which are described in Sections \ref{sec:torus} and \ref{sec:wind}, respectively. In the torus model, we adopt a viewing angle through the torus midplane (which is equivalent to the equatorial plane of the binary system). In both models, the dust obscuration, $A_V$, increases from very low values long before merger to higher values at later times, reflecting the increasingly mass-rich circumbinary environment of the binary. The wind model exhibits higher obscuration than the torus model, especially at early times. This difference represents the greater radial extent of the unbound wind relative to the bound torus. Within the final $10^2$~d before the binary merges, the wind model levels out as newly-lost material does not have time to propagate outward to the dust condensation radius. Within the hydrostatic torus model, the circumbinary material is assumed to instantaneously assume its hydrostatic configuration. As a result, this temporal effect is not modeled and we see a late increase of obscuration that might not be realistic. Despite these differences, it is interesting to note that both models reach a similar estimate of several magnitudes of dust extinction at the time of merger. Viewed over time under this increasing obscuration, we might an optical precursor of the outburst to fade while its infrared counterpart brightens. This evolution points to the leverage that detailed pre-outburst observations of stellar-coalescence transients can provide on these sorts of models of circumbinary mass loss \citep{2011A&A...528A.114T,2017ApJ...834..107B,2020MNRAS.496.5503B,2021A&A...653A.134B,2021A&A...646A.119P}. \subsection{Dependence on binary properties} \begin{figure}[tbp] \begin{center} \includegraphics[width=0.49\textwidth]{Avw_MR.pdf} \includegraphics[width=0.49\textwidth]{Avt_MR.pdf} \caption{Predicted obscuration just prior to merger in the wind and torus (equatorial line of sight) models given primary star mass and radius. Each model assumes $q=1/3$. The progenitor properties of known LRNe are marked with diamonds. In both models, low mass, extended radius primary stars should lead to highly dust-obscured transients, in some cases reaching $A_V \gg 10$. By contrast, more compact or massive primary stars should lead to low levels of pre-outburst obscuration. The observed population of optical LRNe traces predicted $A_V \lesssim 1$ in either model. } \label{fig:mr} \end{center} \end{figure} In Figure \ref{fig:mr}, we map the maximal $A_V$ measured at the time of merger ($a=R_\ast$) in our wind and torus models. Our results show that this maximal absorption depends on both stellar mass and radius. At the simplest level this result can be traced to the characteristic temperatures of circumbinary outflows. As material is shock-heated and expelled, the post-shock temperatures depend on the compactness of the primary star. More massive, smaller radius primary stars represent deeper gravitational wells and will have hotter, faster moving circumbinary material, that is, by consequence, less dust-forming. The cool circumbinary surroundings of low mass, extended radius stars become dramatically obscuring, perhaps providing tens of magnitudes of extinction in the most extreme cases. The qualitative trends and normalization of the wind and torus model predictions are similar. However, Figure \ref{fig:mr} does highlight that these models exhibit somewhat different parameter dependence. We empirically derive the following relations based on models in which we randomly varied model parameters. For the wind model, \begin{align}\label{approxwind} A_{V, {\rm wind}} \approx 0.97 &\left(q \over 0.1 \right)^{1.04} \left( M_\ast \over M_\odot \right)^{-1.5} \left(R_\ast \over 10\right)^{0.5} \nonumber \\ \times &\left( X_{\rm d} \kappa_{\rm d} \over 5~{\rm cm}^2~{\rm g}^{-1}\right) \left(f_{\rm vir} \over 0.25 \right)^{-2.5} \left(f_v \over 0.25 \right)^{0.5}, \end{align} while for the torus model with an equatorial line of sight, \begin{align}\label{approxtorus} A_{V,{\rm torus}} \approx 0.18 &\left(q \over 0.1 \right)^{1.6} \left( M_\ast \over M_\odot \right)^{-2.8} \left(R_\ast \over 10\right)^{1.8} \nonumber \\ \times &\left( X_{\rm d} \kappa_{\rm d} \over 5~{\rm cm}^2~{\rm g}^{-1}\right). \end{align} In this context, it is worth highlighting that our simple assumption of unchanging dust physics across the entire parameter space neglects the likely dependence of dust formation on the density and velocity of ejecta. In cases of very high predicted extinction, e.g. $A_V\sim 10^2$, larger grains might instead form, impacting the opacity as a function of wavelength and the infrared appearance of obscured transients. Further, because the torus model has viewing angle dependence, equation \eqref{approxtorus} only parameterizes the maximal obscuration along the equatorial line of sight. \begin{figure}[tbp] \begin{center} \includegraphics[width=0.49\textwidth]{HRD_Avw.pdf} \includegraphics[width=0.49\textwidth]{HRD_Avt.pdf} \caption{Predicted obscuration in the context of the HRD. This figure adopts wind and torus models with $q=1/3$. The primary star properties are realized from MIST stellar tracks of solar metalicity. The lower-mass extended radii primary stars that lead to the highest predicted $A_V$ occur on the giant branch of primary stars with $M_\ast \lesssim 4M_\odot$. These systems have low $T_{\rm eff}\lesssim 4000$~K, and relatively high luminosities $L\gtrsim 10^2 L_\odot$. By contrast, the progenitors of optical LRNe have a wide range in mass, but a narrow range in effective temperature, primarily being mildly evolved yellow giants crossing the Hertzsprung gap, properties that correspond to low levels of pre-outburst obscuration. } \label{fig:hr} \end{center} \end{figure} Primary star mass and radius thus clearly affect the degree of obscuration due to circumbinary mass loss. These primary star properties also correlate with different stellar evolutionary states and appearances. Figure \ref{fig:hr} traces circumbinary obscuration in the wind and torus models in the Hertzsprung-Russell Diagram (HRD). We show evolutionary tracks of 1, 2, 4, 8, and 16$M_\odot$ stars at solar metallicity from MIST \citep{2016ApJ...823..102C}. Here, we can immediately observe that merger events on the main sequence will be largely unobscured, with $A_V\ll1$~mag. Similarly, mergers of Hertzsprung gap objects, with $T_{\rm eff} \gtrsim 5500$~K, also experience low degrees of obscuration. This can be contrasted to the late evolutionary phases of low-mass stars. In the tracks of the 1, 2, and $4M_\odot$ stars, very high degrees of dust formation and obscuration $A_V \gg 5$~mag are observed near the tips of their respective giant branches. This location in the HRD corresponds with low effective temperatures, $T_{\rm eff}\lesssim 4000$~K, and high luminosities $L\gtrsim10^2L_\odot$. Thus, before dust obscures these merging systems, they are preferentially old, luminous, and cool giants. \begin{figure}[tbp] \begin{center} \includegraphics[width=0.49\textwidth]{HRD_Ebind_Avw.pdf} \includegraphics[width=0.49\textwidth]{HRD_Ebind_Avt.pdf} \caption{Predicted obscuration in the context of primary star binding energy and luminosity; otherwise identical to Figure \ref{fig:hr}. Low-binding-energy primary stars are those that are more likely to lead to successful common envelope ejection in interactions with a companion object. We find that low binding energy correlates with predictions of highly obscured mergers, while higher binding energies have low predicted $A_V$. The population of optical LRNe traces the low-obscuration, high binding energy phase space of merger outcomes. } \label{fig:hrE} \end{center} \end{figure} Figure \ref{fig:hrE} shows these same stellar tracks in the context of a common-envelope HRD, where we show the binding energy of primary stars along with their luminosity. Common envelope ejection is believed to be related to the overall system energy balance, in which to unbind a common envelope $\Delta E \sim E_{\rm bind}$, where $E_{\rm bind}\sim GM_\ast^2 / R_\ast$ is the binding energy of the primary star's envelope before the coalescence \citep[e.g.][]{1984ApJ...277..355W}. The energy source, $\Delta E$, is largely the gravitational energy of the decaying companion star orbit, $\Delta E \sim E_{\rm final}\sim G M_\ast^2 q / a_{\rm final}$. At the crudest level, therefore, envelope ejection requires $a_{\rm final} / R_\ast \lesssim q$. In more detailed analysis, coefficients can change these scalings by an order of magnitude \citep[e.g.][]{1984ApJ...277..355W,1993PASP..105.1373I,2011MNRAS.411.2277D,2013A&ARv..21...59I}. In Figure \ref{fig:hrE}, we see that systems with lower binding energies that will tend to lead to common envelope ejection outcomes are predicted to be highly obscured. Higher binding energy systems -- those closer to their main sequence radii -- tend to lead to low predicted obscuration. \subsection{The progenitors of Luminous Red Novae} We compare the population of optical transient progenitors (Section \ref{sec:lrn}) to our model predictions for degree of obscuration. In Figure \ref{fig:mr}, we plot the LRNe progenitors on the primary-star mass--radius plane, and in Figure \ref{fig:hr}, we plot these progenitors on the HRD. Both the mass--radius and HRD views show that LRNe progenitors lie in phase space where we expect relatively low degrees of pre-outburst dust extinction. In the torus model, systems typically exhibit $A_V \lesssim 0.1$~mag, while in the wind model $A_V \lesssim 1$~mag. In either case, these predictions are consistent with a largely unobscured transient. We note that an unobscured transient is always possible for a pole-on line of sight in the torus model, but this being a viewing-angle effect is unlikely given that V1309 Sco is known to be viewed in the equatorial plane. In Figure \ref{fig:hrE}, we see that the lower binding energy primary stars are systematically not observed in the present LRNe sample. This is highly suggestive that the unobscured, optical LRNe sample traces merger outcomes, while dusty, obscured transients will characterize common envelope episodes. There is some evidence in precursor lightcurves of LRNe for some degree of time-variable extinction. V1309 Sco and M31 LRN 2015 each exhibit a slow rise of precursor brightening followed by a optical fade ($\sim 1$~mag) just before the optical outburst \citep{2011A&A...528A.114T,2020MNRAS.496.5503B}. If these dips were due to time-dependent dust reddening rather than a bolometric fade that would be consistent with the pre-outburst mass loss model. Indeed, the presence of infrared excess in the pre-outburst phase of V1309 Sco is suggestive that this is the case \citep{2016A&A...592A.134T}. For V1309 Sco ($M_\ast\sim 1.5 M_\odot, \ R_\ast\sim3.5R_\odot$), the predicted $A_V$ is 1~mag in the wind model and 0.1~mag in the torus model. For M31 LRN 2015 ($M_\ast\sim 4 M_\odot, \ R_\ast\sim30R_\odot$), the model predictions are very similar, suggesting that the mild fade observed pre-outburst is entirely consistent with dust reddening. \subsection{Dusty transients in the binary population} \begin{figure}[tbp] \begin{center} \includegraphics[width=0.49\textwidth]{fIRw.pdf} \includegraphics[width=0.49\textwidth]{fIRt.pdf} \caption{Relative population of merger transients as a function of primary star mass. In this model, we assume all mergers have $q=1/3$. We compute the predicted $A_V$ along MIST solar metalicity tracks, and show the fractions of merging systems with low, intermediate, and high $A_V$, assuming a logarithmic merging separation distribution. Among approximately solar mass stars, on the order of half of transients will be highly dust-obscured, primarily-infrared transients. As we consider higher mass systems, a greater fraction will be primarily-optical transients. } \label{fig:frac} \end{center} \end{figure} We have argued that LRNe originate from the relatively unobscured population of binary merger events. Their more obscured counterparts will be dusty and optically faint, while perhaps being infrared luminous. We imagine that these sources could have extremely red colors of the SPRITEs class of exclusively-infrared transients reported by \citet{2019ApJ...886...40J} from the Spitzer Infrared Intensive Transients Survey \citep[SPIRITS,][]{2017ApJ...839...88K}. To understand the imprint of dusty transients on the population of binary merger and common-envelope transients, we make a simple estimate of their fractional contribution to the overall merging population. To do so, we assume that binaries are distributed with a broad separation distribution with equal number of binary systems per logarithmic bin in separation \citep{1924PTarO..25f...1O}. That implies that as stellar radii grow, the probability of merging with a companion per log radius is constant. In Figure \ref{fig:frac}, we trace MIST evolutionary tracks from the main sequence out the giant branch, assuming an equal number of mergers per log radius of the star. We apply equations \eqref{approxwind} and \eqref{approxtorus} to estimate $A_V$ in these events (we note that this implicitly assumes that $A_V$ is similar to the equatorial $A_V$ in the torus model, where more realistically, there might be special cases of low obscuration for pole-on orientations). Finally, We divide these events into groups of low, intermediate, and high levels of obscuration. The most obscured systems will be those where the optical signature is nearly completely extinguished, and will manifest as infrared transients. The intermediate levels of reddening will lead to highly reddened optical and infrared transients, while the low extinction case will lead to primarily-optical transients. Figure \ref{fig:frac} shows that at $1M_\odot$, about 50\% of mergers lead to infrared transients. This fraction decreases to nearly zero above $8M_\odot$. We can understand this high fraction of infrared transients from low-mass systems in context of the observed events in two ways. First, we consider a volume-limited sample of stellar mergers and common envelope phases, such as all the events occurring within the galaxy. These galactic events will be greatly dominated (by number) by low-mass events, with masses similar to $1M_\odot$, because of the steeply-decreasing stellar initial mass function (IMF) $dN/dM_\ast \propto M_\ast^{-2.3}$. We note that this is true despite the increasing fraction of massive stars in interacting binaries, which partially counteracts the IMF. The fraction of interacting systems is about 15\% for solar-mass primary stars, but increases to nearly 100\% for O-type stars, with the interacting binary fraction scaling roughly as $f_{\rm interact}\proptoM_\ast^{0.7}$ \citep[See Figure 42 of][]{2017ApJS..230...15M}, thus $f_{\rm interact} dN/dM_\ast \propto M_\ast^{-1.6}$. Within such a volume limited population (weighted by $M_\ast^{-1.6}$), in the wind model, 25\% of events have $A_V<1$, 48\% have $1<A_V<5$, and 26\% have $A_V>5$. For the same weighting in the torus model, 49\% of events have $A_V<1$, 15\% have $1<A_V<5$, and 36\% have $A_V>5$. Given the nature of these sources as astronomical transients, we might also consider a luminosity limited sample. \citet{2014MNRAS.443.1319K} has shown that empirically, $L_{\rm LRN}\propto M_\ast^3$. This scaling more than cancels the slope of the IMF and interacting binary fraction, implying a similar number of detected LRNe across all masses, with a possible weighting toward more massive stars. While the number of sources remains small, this is at least partially born out by the broad mass distribution of the observed sample. In this luminosity-weighted sample, optical events will dominate because of their higher luminosities and the greater contribution from massive stars. Finally, it is important to consider that dust-enshrouded, infrared transients are associated with different primary stars than optical counterparts. These progenitor stars tend to be cool, luminous, extended companions with lower binding energies (e.g. equations \eqref{approxwind} and \eqref{approxtorus} and Figures \ref{fig:hr}, and \ref{fig:hrE}). The correlation of these properties with possible common envelope ejection outcomes suggests that common envelope episode transients will systematically be among the obscured, infrared population. The higher binding energy envelopes associated with merger outcomes will lead to less obscuration and optical transients. \subsection{OGLE-2002-BLG360: A Prototype Dusty Merger Transient?}\label{sec:blg360} The transient OGLE-2002-BLG360, originally thought to be a lensing event, has been interpreted as a possible LRN transient \citep{2013A&A...555A..16T}. The system gradually brightened into a nearly thousand-day outburst in 2002. The progenitor was a $T_{\rm eff}\sim 4300$~K giant. The distance was uncertain, but adopting a distance of $8.2$~kpc, \citet{2013A&A...555A..16T} derive $R_\ast \sim 30 R_\odot$ and $L \sim 300L_\odot$. The old galactic bulge stellar population implies a low progenitor mass, perhaps $M_\ast \sim M_\odot$. Intriguingly, \citet{2013A&A...555A..16T} find that the pre-outburst spectral energy distribution requires an extinction of $A_V \sim 3$ by warm $\sim 800$~K dust, which they note is only consistent with ongoing dust formation in a continuous outflow. As the source evolved, it eventually faded in the optical as it became so dust-obscured that $A_V \gtrsim 20$ is required to accommodate the constraints. Our models predict $A_V \sim $3--10 for a 1--2$M_\odot$, approximately 30$R_\odot$ primary star. The long duration of the transient is likely related to the long orbital period about the extended primary, \begin{equation} P_{\rm orb}(a) \sim 19~{\rm d} \left( \frac{M_\ast}{M_\odot} \right)^{-1/2} \left( \frac{a}{30 R_\odot} \right)^{3/2}. \end{equation} For comparison, the expansion time of material to the dust condensation radius is, \begin{equation} t_{\rm dust} \sim 33~{\rm d} \left( \frac{f_{\rm vir}}{0.02} \right) \left( \frac{M_\ast}{M_\odot} \right)^{1/2} \left( \frac{R_\ast}{30 R_\odot} \right)^{1/2} \end{equation} if we assume that $r_{\rm dust}$ is given by equation \eqref{rdust} and $v_{\rm ej} \sim (2GM_\ast/R_\ast)^{1/2}$. The similarity of these timescales is indicative that the ejecta expansion and cooling is ongoing even during the outburst phase of the event. Thus, the entire transient episode is similar to the wind-like pre-outburst behavior where the temporal evolution is dictated by the changing mass outflow. This is different from the other LRNe, in which the duration of the event is dictated by the expansion time of the ejecta, because $t_{\rm dust} \gg P_{\rm orb}$. This is indicative that dusty transients tend to be more wind-like as opposed to impulsive, and that the duration of the events will be set by the duration of mass ejection rather than material expansion. We conclude that OGLE-2002-BLG360 is very likely a prototype event for an intermediate level of dust obscuration, positioned in the phase space of reddened transients in Figure \ref{fig:frac}. We anticipate that more detailed modeling of the abundant data for this source will be very informative. \section{Summary and Conclusions}\label{sec:conclusions} In this paper, we have analyzed the thermodynamic evolution of the ejecta of stellar mergers and common envelope phases, and of the mass lost leading up to these episodes. When dust condenses in this circumstellar material, it dramatically increases the opacity obscures optical light from the merging system while redistributing emission toward the infrared. We find that the degree of this obscuration depends on the properties of the merging system. Some key results of our study are: \begin{enumerate} \item After being shock-heated to a few percent the Virial temperature, the ejecta in LRNe appear to decline linearly with radius, proportional to the gravitational potential. This implies continuous heat injection by internal shocks are crucial in regulating the ejecta thermodynamics (Figure \ref{fig:r90}). \item Pre-outburst mass loss accompanies orbital decay in merging binary systems. The resulting circumstellar material can lead to time-dependent obscuration or even the optical vanishing of coalescing systems due to dust formation (Figure \ref{fig:ts}). \item The most obscured systems are those with lower primary-star masses and extended radii high on the giant branch, while more compact or massive systems tend to be comparatively unobscured (Figures \ref{fig:mr} and \ref{fig:hr}). \item Because lower envelope binding energy is correlated with higher $A_V$, the systems most likely to lead to common envelope ejection will tend to systematically produce dusty, infrared transients (Figure \ref{fig:hrE}). \item The population of optical LRNe are all associated with model predictions of low obscuration (Figures \ref{fig:mr}, \ref{fig:hr}, and \ref{fig:hrE}). A corresponding population of dusty, optically-obscured, infrared-luminous transients arise from the $\sim$25--35\% of stellar mergers and common envelope phases involving lower-mass extended donor stars (Figure \ref{fig:frac}). \item OGLE-2002-BLG360, with properties slightly distinct from many of the optical LRNe, may be a prototype of a partially dust obscured transient intermediate between the optical and fully infrared events. \end{enumerate} The fact that dusty, infrared transients should exist, and that their properties are correlated with the properties of the donor star in the binary system, indicates the breadth of the population of transients related to stellar coalescence. The optically-luminous LRNe appear to be just one subset of this full class of events, with properties that suggest they tend to be associated with stellar merger (rather than common envelope ejection) outcomes. More broadly exploring this parameter space, both in modeling and observationally, is a promising path toward a deeper understanding of these transformative events in binary stellar evolution. With time-domain capabilities expanding in both the optical and, more recently, infrared \citep[e.g.][]{2020PASP..132b5001D}, we are well positioned to begin mapping the range of possible events. To this end, the anticipated near-infrared follow-up capabilities of the {\it James Webb Space Telescope} will likely be pivotal in revealing the properties of these dusty systems. \section*{Reproduction Software and Data} Software and data to reproduce the results of this work are available via github at: \url{https://github.com/morganemacleod/dustytransients_materials} \citep{morgan_macleod_2022_6554801}. \acknowledgements We thank Nadia Blagorodnova, Tomasz Kami\'nski, and Jonathan Grindlay for helpful conversations that led to and informed this work. This work was supported by the National Science Foundation under Grant No. 1909203. Support for this work was provided by NASA through the NASA Hubble Fellowship grant \#HST-HF2-51477.001 awarded by the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., for NASA, under contract NAS5-26555. \software{IPython \citep{PER-GRA:2007}; SciPy \citep{2020SciPy-NMeth}; NumPy \citep{van2011numpy}; matplotlib \citep{Hunter:2007}; Astropy \citep{2013A&A...558A..33A}; RLOF \citep{RLOF1.1}; reproduction materials for this work \citep{morgan_macleod_2022_6554801}.}
\section{Introduction} Over the last few decades, the black hole information loss paradox \cite{Hawking:1975vcx,Hawking:1976ra} has been one of the most engaging and fascinating issues in the quest for a quantum theory of gravity. The central element of this puzzle involves the monotonic increase in the entanglement entropy of the Hawking radiation from an evaporating black hole resulting in the fine grained entropy to dominate the coarse grained entropy at late times which leads to a violation of unitarity. It could be shown that the unitarity of the black hole evaporation process required the corresponding entanglement entropy of the Hawking radiation to follow a Page curve \cite{Page:1993wv}. Very recently this issue has been addressed through the fascinating development of the island proposal which has led to the exciting possibility of a resolution of this long standing paradox \cite{Engelhardt:2014gca,Almheiri:2019psf,Penington:2019npb,Almheiri:2019hni,Almheiri:2020cfm,Almheiri:2019yqk,Penington:2019kki,Almheiri:2019qdq}. The island or the quantum extremal surface (QES) formula for entanglement entropy was motivated from the quantum corrected Ryu-Takayanagi (RT) proposal \cite{Ryu:2006bv,Ryu:2006ef,Hubeny:2007xt,Faulkner:2013ana} and this may be obtained by extremizing the generalized fine-grained entanglement entropy of the Hawking radiation. In this context it could be shown that at late times the entanglement entropy of a bath subsystem in the radiation flux of the black hole receives contributions from a region in the black hole geometry termed the entanglement island\footnote{Recently, there has been a rich development in these directions which can be found in \cite{Almheiri:2019psy,Anderson:2020vwi,Chen:2019iro,Balasubramanian:2020hfs,Chen:2020wiq,Gautason:2020tmk,Bhattacharya:2020ymw,Anegawa:2020ezn,Hashimoto:2020cas,Hartman:2020swn,Krishnan:2020oun,Alishahiha:2020qza,Geng:2020qvw,Li:2020ceg,Chandrasekaran:2020qtn,Bak:2020enw,Krishnan:2020fer,Karlsson:2020uga,Hartman:2020khs,Balasubramanian:2020coy,Balasubramanian:2020xqf,Sybesma:2020fxg,Chen:2020hmv,Ling:2020laa,Hernandez:2020nem,Marolf:2020rpm,Matsuo:2020ypv,Akal:2020twv,Caceres:2020jcn,Raju:2020smc,Deng:2020ent,Anous:2022wqh,Bousso:2022gth,Hu:2022ymx,Grimaldi:2022suv,Akers:2022max,Yu:2021rfg,Geng:2021mic,Chou:2021boq,Hollowood:2021lsw,He:2021mst,Arefeva:2021kfx,Ling:2021vxe,Bhattacharya:2021dnd,Azarnia:2021uch,Saha:2021ohr,Hollowood:2021wkw,Sun:2021dfl,Li:2021dmf,Aguilar-Gutierrez:2021bns,Ahn:2021chg,Yu:2021cgi,Lu:2021gmv,Caceres:2021fuw,Akal:2021foz,Arefeva:2022cam,Arefeva:2022guf,Bousso:2022ntt,Krishnan:2021ffb,Zeng:2021kyb,Teresi:2021qff,Okuyama:2021bqg,Chen:2021jzx,Pedraza:2021ssc,Guo:2021blh,Kibe:2021gtw,Renner:2021qbe,Dong:2021oad,Raju:2021lwh,Nam:2021bml,Kames-King:2021etp,Chen:2021lnq,Sato:2021ftf,Kudler-Flam:2021alo,Wang:2021afl,Ageev:2021ipd,Buoninfante:2021ijy,Cadoni:2021ypx,Marolf:2021ghr,Chu:2021gdb,Urbach:2021zil,Li:2021lfo,Neuenfeld:2021bsb,Aalsma:2021bit,Ghosh:2021axl,Bhattacharya:2021jrn,Geng:2021wcq,Krishnan:2021faa,Verheijden:2021yrb,Bousso:2021sji,Karananas:2020fwx,Goto:2020wnk,Bhattacharya:2020uun,Chen:2020jvn,Agon:2020fqs,Laddha:2020kvp,Akers:2019nfi,Chen:2019uhq,Basu} and the references therein.}. Specifically the bath subsystem and the island regions were shown to be a part of the same entanglement wedge in higher dimension as described in \cite{Almheiri:2019hni}. The corresponding island formula for the generalized fine-grained entropy of a subsystem $\mathcal{R}$ in the radiation bath is given as, \begin{align}\label{IsformEE} S[\mathcal{R}]=\min \left\{\operatorname{ext}_{Is(\mathcal{R})}\left[\frac{\operatorname{Area}[\partial Is(\mathcal{R})]}{4 G_{N}}+S_{eff}[\operatorname{\mathcal{R}} \cup Is(\mathcal{R})]\right]\right\}, \end{align} where $Is(\mathcal{R})$ is the island region in the black hole geometry corresponding to the subsystem $\mathcal{R}$ in the radiation bath \footnote{Higher dimensional generalization of the island construction for the entanglement entropy has been studied in some recent papers \cite{Almheiri:2019psy,Chen:2020uac,Chen:2020hmv,Ling:2020laa,Krishnan:2020fer}.}. In a different context, the holographic $AdS/CFT$ correspondence has been extended for dual conformal field theories on a manifold with a boundary $( BCFT)$ \cite{Cardy:2004hm}, through the $AdS/BCFT$ framework described in \cite{Fujita:2011fp,Takayanagi:2011zk}. The bulk dual geometry in this case is described by an $AdS$ space time truncated by an End-of-the-World (EOW) brane in what is termed a braneworld construction. An alternative braneworld configuration is also described in \cite{Geng:2021hlu} involving \textit{Karch-Randall} (KR) branes \cite{Karch:2000ct,Karch:2000gx} connected to radiation baths which are defined by $BCFT_2$s with single boundary each. In the earlier models of black hole evaporation involving the island formulation \cite{Almheiri:2019hni,Almheiri:2019psf,Almheiri:2019yqk}, the radiation baths were considered to be non-gravitating. However recent developments have incorporated the idea of gravitating baths discussed in \cite{Geng:2020fxl} in the framework of KR braneworlds. The corresponding effective theories at a finite temperature on the KR branes involve black holes which communicate with each other through the shared radiation baths described by the $BCFT_2$s \cite{Geng:2021iyq,Geng:2021mic}. At late times the entanglement entropy for a region in the bath $BCFT_2$s, obtained through the recently proposed wedge holography \cite{Akal:2020wfl,Miao:2020oey}, receives contributions from the island regions located on the KR branes. These braneworld constructions have led to novel insights into the phenomena of such communicating black holes characterized by the information transfer between them. One such model has been described extensively in \cite{Geng:2021iyq} where the authors have considered a $BCFT_2$ on a manifold with two boundaries in the context of the $AdS_3/BCFT_2$ scenario. The holographic dual of this configuration is described by a wedge enclosed within the two KR branes in the bulk $AdS_3$ braneworld geometry. The KR branes involve $CFT_2$ matter fields with a constant Lagrangian which is connected to the $CFT_2$ on the asymptotic boundary of the dual $AdS_3$ geometry through transparent boundary conditions \cite{Almheiri:2019yqk,Almheiri:2019hni}. Note that from the perspective of each brane, the bath together with the other KR brane appears as a gravitating configuration \cite{Geng:2021iyq}. At a finite temperature, black holes may be induced on these two KR branes from the higher dimensional eternal $AdS_3$ BTZ black hole. In this framework, the authors of \cite{Geng:2021iyq} have computed the entanglement entropy of a subsystem using the replica technique in the bath $BCFT_2$s. Subsequently, they have substantiated these field theory results from the corresponding computations using wedge holography. The entanglement entropy for this configuration characterizes the communication between the two induced black holes on the KR branes through the transfer of information. From the perspective described above, another extremely interesting and elegant model has been proposed in \cite{Balasubramanian:2021xcm} similar to the one described in \cite{Almheiri:2020cfm}. However the authors of \cite{Balasubramanian:2021xcm} considered two copies of finite sized reservoirs described by $CFT_2$s each with two quantum dots located at their boundaries at a finite temperature. The holographic dual of these quantum dots are described by Planck branes in the bulk $AdS_3$ space time which supports $AdS_2$ geometries with Jackiw-Teitelboim (JT) gravity \cite{Teitelboim:1983ux,Jackiw:1984je}. Hence the two Planck branes may involve eternal JT black holes which communicate with each other through the common radiation reservoirs. For this configuration, the authors of \cite{Balasubramanian:2021xcm} have computed the generalized entanglement entropy for a finite subsystem in the radiation reservoirs which once again characterizes the communication between the two eternal JT black holes on the Planck branes. In a separate context, it is well known in quantum information theory that the entanglement entropy is an appropriate measure for the characterization of pure state entanglement, however for mixed states it receives contributions from irrelevant classical and quantum correlations. A consistent and computable measure for the characterization of mixed state entanglement which serves as an upper bound to the distillable entanglement is described by the entanglement negativity introduced in \cite{Vidal:2002zz,PhysRevLett.95.090503}. In \cite{Calabrese:2014yza,Calabrese:2012nk,Calabrese:2012ew} the authors established a replica technique to compute the entanglement negativity for bipartite pure and mixed states in $CFT_2$. The first holographic computation for the entanglement negativity for the pure vacuum state in $CFT$s was described in \cite{Rangamani:2014ywa}. Subsequently general holographic proposals\footnote{Motivated by the developments in \cite{Dong:2021clv}, a heuristic proof of these proposals has been presented in \cite{KumarBasak:2020ams}.} for the entanglement negativity of bipartite pure and mixed states in $CFT_2$s involving specific algebraic sums of the lengths of geodesics homologous to various combinations of subsystems were introduced in \cite{Chaturvedi:2016rcn,Jain:2017aqk,Malvimat:2018txq}\footnote{For further developments see also \cite{Chaturvedi:2017znc,Jain:2017uhe,Malvimat:2018ood,Chaturvedi:2016rft,Jain:2017xsu,KumarBasak:2020viv,Afrasiar:2021hld,Basu:2021awn,Basu:2021axf,Basu:2022nds}.}. A generalization of these proposals for the entanglement negativity in $CFT_2$s coupled to semiclassical gravity was advanced in \cite{KumarBasak:2020ams} with a possible derivation using the replica wormhole contributions to the gravitational path integral involving replica symmetry breaking saddles as discussed in \cite{Dong:2021clv}. In the present article, we focus on the computation of the holographic entanglement negativity for various bipartite mixed states in the two distinct models \cite{Geng:2021iyq,Balasubramanian:2021xcm} mentioned earlier. We consider different scenarios involving the subsystem sizes and the time for two adjacent and disjoint subsystems located in the bath regions at a finite temperature. Furthermore, we discuss the behaviours of the entanglement negativity profiles obtained in these scenarios in terms of the Hawking radiation. We observe interesting similarities between our results with those described in \cite{KumarBasak:2021rrx,Shapourian:2020mkc}. This article is organized as follows. In \cref{review1}, we review the relevant works discussed in both the models \cite{Geng:2021iyq,Balasubramanian:2021xcm}. In \cref{model1}, we first compute the entanglement entropy for a generic subsystem in the context of the first model \cite{Geng:2021iyq}. We apply these results to further compute the holographic entanglement negativity for various bipartite mixed states using the holographic proposals described in \cite{Jain:2017aqk,Malvimat:2018txq}. Next in \cref{model2}, the detailed computations for the generalized entanglement entropy of a finite subsystem is reported in the context of the second model \cite{Balasubramanian:2021xcm}. Furthermore, we apply these results for different cases of adjacent and disjoint subsystems and obtain the corresponding holographic entanglement negativity. Finally in the \cref{discussion}, we summarize and discuss our results and future open issues. \section{Review of earlier results}\label{review1} We begin with a brief review of the model described in \cite{Geng:2021iyq} in the context of the $AdS_3/BCFT_2$ scenario. In this article the authors have considered two $BCFT_2$s at a finite temperature with two boundaries each and developed a replica technique to compute the entanglement entropy of a bipartite state described by a single subsystem with one end point located on the boundary. Subsequently they utilized a construction for the corresponding wedge holography \cite {Akal:2020wfl,Miao:2020oey} to obtain the entanglement entropy for the above configuration from the bulk dual geometry which reproduced the field theory replica technique results in the large central charge limit. Following this we progress to a brief review of another model detailed in \cite{Balasubramanian:2021xcm} which involved eternal JT black holes in an $AdS_2$ geometry coupled to non-gravitating reservoirs at the asymptotic boundaries. In this context the authors in \cite{Balasubramanian:2021xcm} computed the holographic entanglement entropy for a finite region in the radiation reservoirs utilizing the island formula \cref{IsformEE} in the framework of \cite{Almheiri:2019qdq,Almheiri:2019yqk}. \subsection{Model-I}\label{model-1} In the first construction \cite{Geng:2021iyq}, the authors considered a $BCFT_2$ with two boundaries and distinct conformal boundary conditions on these. Its holographic dual was defined by a wedge enclosed by two Karch-Randall (KR) branes in a bulk asymptotically $AdS_3$ geometry. The KR branes in this configuration carry a matter $CFT_2$ described by a constant Lagrangian and is connected to the bath $BCFT_2$ by transparent boundary conditions \cite{Almheiri:2019yqk,Almheiri:2019hni}. From the two-dimensional perspective the two gravitational regions involving the KR branes are connected to each other through a non-gravitating bath described by the $BCFT_2$. Note however that the bath region along with a single KR brane appears to be gravitating from the perspective of the other KR brane and vice versa. At finite temperature this construction involves two copies of such $BCFT_2$s whose holographic dual geometry is described by a eternal $AdS_3$ BTZ black hole which induces two dimensional black holes on the KR branes. Note that following \cite{Rozali:2019day}, the induced black holes on the KR branes are at distinct temperatures due to the different boundary conditions on the two boundaries of the $BCFT_2$. The entanglement entropy of a subsystem at a finite temperature in the bath $BCFT_2$ is then computed through wedge holography \cref{wedge} which characterizes a communication between the induced two dimensional black holes on the KR branes. \subsubsection{BCFT with two boundaries at a finite temperature}\label{finitetemperaturewithboundary} We start by reviewing the two dimensional Euclidean $BCFT$ \cite{Cardy:2004hm} in a vacuum state and focus on the computation of the entanglement entropy using a replica trick. In this connection as described in \cite{Cardy:2004hm} the manifold with a boundary preserving half of the conformal symmetry was considered to be the upper half plane (UHP). A subsystem $A$ of length $l_A$ may now be considered at a constant time slice with the two end points located on the boundary and in the bulk of the $BCFT_2$ \cite{Geng:2021iyq} respectively. The corresponding entanglement entropy is computed by using the definition of the $n$-th R\'enyi entropy in the replica limit $n\to1$ as follows \begin{equation}\label{renyientropy} S^n=-\frac{1}{n-1}\text{Tr}(\rho^n_A)\,, \end{equation} where $\rho_A$ is the reduced density matrix of the subsystem under consideration. In the above equation, $\text{Tr}(\rho^n_A)$ may be obtained following the usual replica technique \cite{Calabrese:2009qy}. Using the Euclidean path integral, $\text{Tr}(\rho^n_A)$ is equivalent to the one point function of a twist operator\footnote{The conformal dimension of the twist operator in the $BCFT_2$ is defined as $\bar{h}_n=h_n=\frac{c}{24}(n-\frac{1}{n})$. } $\Phi_n(z,\bar{z})$ on the UHP. In particular, the twist operator is located at a point in the bulk of the UHP, which separates the subsystem $A$ and its complement $\bar{A}$. This correlator may be computed using the standard doubling trick which implies the replacement of the one point twist correlator on the UHP with a two point twist correlator defined on the entire complex plane \cite{Cardy:2004hm,Sully:2020pza}. Hence, the entanglement entropy for the subsystem $A$ is expressed as\cite{Sully:2020pza,Geng:2021iyq} \begin{equation}\label{entropy2} S_A=\frac{c}{6}\ln\frac{2 L_A}{\epsilon}+\ln\left(g_b\right)\,, \end{equation} where $\epsilon$ is a UV cutoff in the $BCFT_2$ and the term $\ln\left(g_b\right)$ corresponds to the boundary degrees of freedom called the {\it boundary entropy} ($S_{bdy}$). We now describe the configuration considered in \cite{Geng:2021iyq} for the computation of the entanglement entropy of a subsystem in a $BCFT_{2}$ with two boundaries. In this context, the authors have constructed a thermofield double state with two $BCFT_2$s using a Euclidean path integral. This corresponds to a $CFT_2$ defined on an annular region with its two circular boundaries generated by the periodic time evolution of the two $BCFT_2$s. The above configuration is considered in the complex $w$-plane where the boundary conditions on the two boundaries are denoted as $a$ and $b$ with a separation $L$ between the inner and the outer radii as depicted in \cref{singlefinite2}. The entanglement entropy of the subsystem $A=A_L\cup A_R$ can now be computed using a mapping of the $w$-plane to the UHP following the transformation \footnote{Note that this mapping is only possible in a specific limit where the inner radius of the annulus is close to zero.} \begin{equation}\label{mapping} w=r_I\left( \frac{1}{z-\frac{i}{2}}-i\right)\,, \end{equation} with $r_I$ being the inner radius of the annulus. Note that the corresponding transformation maps the inner and the outer radii to the real axis and to a point $z=\frac{i}{2}$ respectively on the UHP. Similarly, the twist operators located at the end points of the intervals $A_L$ and $A_R$ are mapped on the UHP at two distinct points. This reduces the computation of the two point twist correlator on the annulus to that on the UHP. Hence the entanglement entropy may now be expressed as \begin{equation} S_A=\lim_{n\rightarrow1}\frac{1}{1-n}\log(\left<\Phi_n\left(z_R,\bar{z}_R\right)\bar{\Phi}_n\left(z_L,\bar{z}_L\right) \right>^b _{\text{UHP},a})\,, \end{equation} where the superscript $b$ denotes the boundary condition along the real axis and the subscript $a$ refers to the operator insertion $\Phi_a$ at $z=\frac{i}{2}$. In this case, there are three different channels corresponding to the two boundaries of the $BCFT_2$s which contribute to the entanglement entropy of the subsystem $A$ for different regimes. \begin{figure}[H] \centering \includegraphics[width=8cm]{singlefinite2.pdf} \caption{Thermofield double state prepared from two $BCFT_2$s ($BCFT_L$ and $BCFT_R$). A subsystem ($A$=$A_L$$\cup$$A_R$) indicated by the blue lines with one endpoint in the each $BCFT_2$s situated on the boundary $b$. The time evolution shown as clockwise and counterclockwise for the $BCFT_L$ and $BCFT_R$ respectively. (Figure modified from \cite{Geng:2021iyq})}\label{singlefinite2} \end{figure} The first contribution is termed the boundary channel which may be obtained by considering the boundary operator expansion (BOE) of the twist operators with the boundary being the real axis on the UHP. In this channel, the entanglement entropy on the $w$-plane is computed by implementing the inverse mapping back to the annulus region as \begin{equation} S_A=\frac{c}{3}\ln\left(\frac{r^2-r_I ^2}{r_I \epsilon}\right)+2\ln(g_b)\,. \end{equation} Similarly the contribution corresponding to the disconnected bulk channel may be determined using the BOE of the twist operators with the boundary being located at the point $z=i/2$. The entanglement entropy in this case is obtained as follows \begin{equation} S_A=\frac{c}{3}\ln\left(\frac{r_O ^2-r^2}{r_O \epsilon}\right)+2\ln(g_a)\,. \end{equation} This contribution may also be reinterpreted as the boundary channel by a conformal transformation which maps the outer and the inner radii to the real axis and to the point $z=i/2$ respectively on the UHP \cite{Geng:2021iyq}. The last channel corresponds to a connected one which is termed as the bulk channel. It may be obtained by considering the operator product expansion (OPE) of the twist operators and the dominant contribution from the vacuum block to the two point function mentioned above. Hence the entanglement entropy in this channel is given as \begin{equation}\label{HMsingle} S_A=\frac{c}{3}\ln\left(\frac{2r}{\epsilon}\cosh \frac{2 \pi t}{\beta}\right)\,. \end{equation} In \cref{HMsingle}, the coordinate transformations $w_L=r \exp(i\theta)$, $w_R=r \exp(i\pi-i\theta)$ are implemented followed by an analytic continuation to the Euclidean time, $t=\frac{i \theta \beta}{2 \pi}$ \cite{Geng:2021iyq}. Finally the entanglement entropy of the subsystem $A$ may now be obtained from the minimum of these three contributions, \begin{equation}\label{EE_single_int} S_A=\text{min}\left[\frac{c}{3}\ln\left(\frac{r^2-r_I ^2}{r_I \epsilon}\right)+2\ln(g_b),\frac{c}{3}\ln\left(\frac{r_O ^2-r^2}{r_O \epsilon}\right)+2\ln(g_a),\frac{c}{3}\ln\left(\frac{2r}{\epsilon}\cosh \frac{2 \pi t}{\beta}\right)\right]\,. \end{equation} \subsubsection{Wedge holography}\label{wedgeholography} In this subsection we provide a brief review of wedge holography which describes a suitable technique to reproduce the above field theory results for the entanglement entropy from the dual bulk geometry \cite{Akal:2020wfl,Miao:2020oey} in the context of Karch-Randall braneworlds \cite{Karch:2000ct,Karch:2000gx}. It was proposed by the authors of \cite{Akal:2020wfl} that classical gravity in the bulk $AdS_{d+1}$ spacetime is equivalent to quantum gravity on the two $AdS_{d}$ branes, which is further dual to a $CFT_{d-1}$ on the asymptotic boundary. Interestingly in the article \cite{Akal:2020wfl}, the wedge holography is derived by considering an appropriate limit of the $AdS_{d+1}/BCFT_{d}$ correspondence. The authors of \cite{Geng:2021iyq} have utilized this idea in the context of the Karch-Randall branes \cite{Karch:2000ct,Karch:2000gx} to obtain the entanglement entropy of a sub-region $R$ on the asymptotic boundary. A double holographic understanding for the same with three possible descriptions from the bulk, brane and the boundary perspectives is communicated in \cite{Geng:2021iyq,Geng:2020fxl}. In this connection the authors of \cite{Geng:2021iyq} have also discussed the QES prescription for a single KR brane coupled to a non-gravitating bath. These descriptions have been used to obtain a holographic derivation of the island formula \cite{Engelhardt:2014gca,Almheiri:2019psf,Penington:2019npb,Almheiri:2019hni,Almheiri:2020cfm,Almheiri:2019yqk,Penington:2019kki,Almheiri:2019qdq}. Subsequently, an extension to a configuration involving two KR branes is addressed in \cite{Geng:2021iyq,Geng:2020fxl}\footnote{This extension was first described in \cite{Geng:2020fxl} where two KR branes with a common asymptotic boundary was considered. However a finite separation between the two KR branes at their asymptotic boundaries is demonstrated in \cite{Geng:2021iyq}.}. We will now review the interpretations of the three descriptions described above following \cite{Geng:2021iyq}. We first consider a manifold $\mathcal{M'}_{d+1}$ describing a part of the $AdS_{d+1}$ spacetime containing the two KR branes, $\mathcal{M}_d ^a$ and $\mathcal{M}_d ^b$. The asymptotic boundaries of these two KR branes are labeled as $\bar{\partial}\mathcal{M}_d ^a$ and $\bar{\partial}\mathcal{M}_d ^b$. The doubly holographic picture may now be explained as follows:\\\\ \textbf{Bulk description:} The two KR branes $\mathcal{M}_d ^a\;\;\text{and}\;\;\mathcal{M}_d ^b$ construct a wedge region $\mathcal{M'}_{d+1}$ in the asymptotically $AdS_{d+1}$ space time, on which a $(d+1)$-dimensional gravitational theory is defined. \\\\ \textbf{Brane description:} Two $d$-dimensional $CFT$s with UV cutoffs are coupled to gravity on the KR branes and a $CFT_d$ is living on the asymptotic boundary of $AdS_{d+1}$ space. These $CFT_d$s are connected by transparent boundary conditions on $\bar{\partial}\mathcal{M}_d ^a\cup\bar{\partial}\mathcal{M}_d ^b=\mathcal{M}^{(0)} _{d-1}$ which is the union of asymptotic boundaries of the KR branes. \\\\ \textbf{Boundary description:} In this case a $BCFT_d$ with two boundaries $\bar{\partial}\mathcal{M}_d^a\;\;\text{and}\;\;\bar{\partial}\mathcal{M}_d^b$ is considered on the asymptotic boundary of the wedge region $\bar{\partial}\mathcal{M'}_{d+1}$.\\ The entanglement entropy of a sub-region $R$ in the $BCFT_d$ may be computed using the QES formula \cite{Faulkner:2013ana,Lewkowycz:2013nqa,Engelhardt:2014gca} in the brane perspective. This requires the location of a sub-region $I$ described as the entanglement island within the gravity sector $\mathcal{M}_d ^a\;\,\text{and}\;\,\mathcal{M}_d ^b$ through an extremization of the generalized entanglement entropy of the region $(R\cup I)$. For multiple such regions, the one that minimizes the generalized entropy provides the correct expression for the corresponding entanglement entropy \begin{equation}\label{EE} S(R)=\text{min}_{I}\,\text{ext } S_{\text{gen}}\left(R\cup I\right)\,. \end{equation} In \cref{EE}, the generalized entanglement entropy is defined as \begin{equation}\label{gen} S_{\text{gen}}\left(R\cup I\right)=\frac{A(\partial I)}{4 G_d}+S_{\text{mat}}\left(R\cup I\right), \end{equation} In the above equation, $A(\partial I)$ corresponds to the area of $\partial I$ and $G_d$ is the Newton's constant in $d$-dimension on the manifold $\mathcal{M}_d ^a\;\,\text{and}\;\,\mathcal{M}_d ^b$. The second term denotes the entanglement entropy of the matter fields in the region $R\cup I$. This generalized entropy may also be interpreted in terms of a co-dimension two static minimal surface in the bulk description as \begin{equation}\label{gen2} S_{\text{gen}}\left(R\cup I\right)= \frac{A(\gamma)}{4G_{d+1}}\,, \end{equation} where the RT surface $\gamma$ connects $\partial R$ on the asymptotic boundary to the $\partial I$ on the KR brane. Using the \cref{EE,gen2}, we can rewrite the entanglement entropy of the sub-region $R$ as \begin{equation}\label{wedge} S(R)=\text{min}_{I}\,\text{ext }\frac{A(\gamma)}{4G_{d+1}}\,. \end{equation} The entanglement entropy for the subsystem $A$ with one end point located on the boundary of the dual $BCFT_2$s may now be obtained utilizing the above \cref{wedge}. Here the two KR branes are labeled as the $a$-brane and the $b$-brane corresponding to the two different boundary conditions $a$ and $b$ respectively in the dual $BCFT_2$s. In this regard, the authors of \cite{Geng:2021iyq} have considered a single side of the two-sided bulk geometry while computing the area of the RT surfaces that are ending on either of the two KR branes at a constant time slice. The corresponding area of the RT surface that is ending on the $b$-brane may be expressed as \begin{equation}\label{areab} A_b= \ln\left(\frac{r^2-r_I ^2}{r_I \epsilon}\right)+\frac{6}{c}\ln\left(g_b\right)\,. \end{equation} Similarly the area contribution to the other RT surface ending on the $a$-brane is given as \begin{equation}\label{areaa} A_a= \ln\left(\frac{r_O ^2-r^2}{r_O \epsilon}\right)+\frac{6}{c}\ln\left(g_a\right)\,. \end{equation} Here $r$, $r_I$ and $r_O$ represent the bipartition point and the locations of the KR branes in Poincare coordinates on the conformal boundary respectively. Interestingly, there is also another possible entangling surface that may contribute to the entanglement entropy for the subsystem $A$, termed as the Hartman-Maldacena (HM) surface \cite{Hartman:2013qma} which connects the bipartition points on the two asymptotic boundaries. The authors of \cite{Geng:2021iyq} have computed the area of this HM surface as \begin{equation}\label{HMsurf} A_{HM}=2\ln\left(\frac{2 r}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)\,, \end{equation} where $\beta$ is the inverse temperature of the bulk BTZ black hole. Finally the contributions to the entanglement entropy of the subsystem $A$ may now be obtained by utilizing \cref{wedge} \begin{equation}\label{EE_single_int2} \begin{aligned} S_A=&\text{min}\left[\frac{2A_b}{4G_N},\frac{ 2A_a}{4G_N},\frac{A_{HM}}{4G_N}\right]\\ =&\text{min}\left[\frac{c}{3}\ln\left(\frac{r^2-r_I ^2}{r_I \epsilon}\right)+2\ln(g_b),\frac{c}{3}\ln\left(\frac{r_O ^2-r^2}{r_O \epsilon}\right)+2\ln(g_a),\frac{c}{3}\ln\left(\frac{2r}{\epsilon}\cosh \frac{2 \pi t}{\beta}\right)\right]\,. \end{aligned} \end{equation} \subsection{Model-II} In this subsection we will be reviewing another intriguing model of finite sized non-gravitating reservoirs, coupled with two quantum dots at its two boundaries \cite{Balasubramanian:2021xcm}. The holographic dual of these quantum dots are Plank branes described by $AdS_2$ geometries. The maximal extension of the Penrose diagram in this context consists of two eternal JT black holes in the $AdS_2$ space time located on the Planck branes. In this case the usual reflecting boundaries are coupled to two non-gravitating reservoirs through transparent boundary conditions \cite{Almheiri:2019yqk,Almheiri:2019qdq} such that the two black holes are connected to each other through the shared reservoirs. This construction involves identical matter $CFT_2$s on both the reservoirs and the gravity regions. As we have mentioned in \cref{model-1}, a single brane together with a reservoir appears to be a gravitating one from the perspective of each brane. In this framework, the authors of \cite{Balasubramanian:2021xcm} have considered the two black holes at different temperatures and obtained the generalized entanglement entropy of a finite region in the two reservoirs by utilizing \cref{IsformEE}. The first term corresponds to the value of the dilaton field in the JT gravity with a constant $\phi_0$ added to it whereas the second term follows from the usual computation of the entanglement entropy \cite{Ryu:2006bv} of a segment $\mathcal{R} \cup Is(\mathcal{R})$. Once again the entropy characterizes the communication between the two JT black holes on the Planck branes similar to the first model. In what follows we review the computation of the generalized entanglement entropy for a subsystem in the radiation reservoirs coupled to an eternal black hole in the second model. \subsubsection{An eternal black hole coupled to reservoirs}\label{Shaghoulian} We consider the scenario of an $AdS_2$ eternal JT black hole coupled to the non-gravitating reservoirs at its asymptotic boundaries \cite{Balasubramanian:2021xcm,Almheiri:2019yqk,Almheiri:2019qdq}. The exterior regions of the eternal black hole are described by the metric \begin{equation}\label{BHextsol} {ds}^2_{\text{grav}} = \frac{4\pi^2}{\beta^2}\frac{-dt^2 + d\sigma^2}{\sinh^2 \frac{2\pi \sigma}{\beta}}\,, \qquad t \in \mathbb{R}\,,\quad \sigma \in (-\infty, -\epsilon]\,, \end{equation} with $\beta$ being the inverse temperature of the JT black hole. The corresponding radiation reservoirs are attached to both the exterior regions of the JT black hole at the surface $\sigma=-\epsilon$ with the following metric \begin{equation}\label{bathsol} ds^2_{\text{bath}} = \frac{-dt^2 + d\sigma^2}{\epsilon^2}\,,\qquad t \in \mathbb{R}\,,\quad \sigma \in [-\epsilon, +\infty)\,. \end{equation} The dilaton profile in the JT gravity is given by \cite{Almheiri:2019yqk,Almheiri:2019qdq} \begin{equation}\label{dilaton} \phi(\sigma) = \frac{2\pi \phi_r}{\beta} \coth \frac{2\pi \sigma}{\beta}, \end{equation} where $\phi_r$ is the boundary value of the dilaton field. \begin{figure}[H] \centering \includegraphics[scale=.5]{EternalBH.pdf} \caption{Penrose diagram of an eternal black hole attached to the radiation reservoirs. (Figure modified from \cite{Balasubramanian:2021xcm})} \label{penrose1} \end{figure} \subsubsection{Entanglement entropy for a finite subsystem in the reservoirs}\label{1boundary} For the above configuration, the authors of \cite{Balasubramanian:2021xcm} have considered a finite subsystem as a union of two identical segments $A$=$[p_1,p_2]$$\cup$$[p_3,p_4]$ in the non-gravitating reservoirs and obtained the corresponding generalized fine-grained entropy following the \cref{IsformEE}. The Penrose diagram for the same is depicted in \cref{penrose1} and the end points of the subsystem $A$ are specified as follows \begin{equation} p_1 = \left(v, -t+i\frac{\beta}{2}\right); \quad p_2 = \left(u, -t+i\frac{\beta}{2}\right); \quad p_3 = (u, t); \quad p_4 = (v, t)\,. \end{equation} In this context, the entanglement entropy for the subsystem $A$ receives contribution from four distinct configurations, the corresponding RT surfaces for which may be described as follows $\bold{(a)}$ For the first configuration the RT surfaces for the subsystem $A$ are described by two geodesics stretched between the end points of the segments in the two reservoirs. The entanglement entropy for this case may be expressed as \cite{Balasubramanian:2021xcm} \begin{equation}\label{S-noisland} \mathcal{S}_{A}^{\text{no-island}} = 2\,\frac{c}{3}\log\left[\frac{\pi}{\beta} \cosh\frac{2 \pi t}{\beta }\right]\,. \end{equation} Note that there is no island contribution to the EE computed above in this case. $\bold{(b)}$ In the second case, the corresponding RT surfaces admit an island region $[q_1,q_2]$ in the gravity sector for the subsystem $A$ in the reservoirs. The generalized entropy for this connected configuration is obtained by extremizing the \cref{IsformEE} with respect to the points $q_{1,2}$ as \cite{Balasubramanian:2021xcm} \begin{eqnarray}\label{Sisland2} \mathcal{S}_{A}^{\text{island}} &=& 2\phi_0 + \frac{4\pi \phi_r}{\beta} \coth \left(\frac{2\pi}{\beta}u +\log \frac{24\pi\phi_r}{c\beta}\right)\nonumber\\ &+& \frac{c}{3} \log \left[\frac{\beta}{\pi}\frac{ \cosh \left(\frac{4\pi}{\beta}u + \log \frac{24\pi \phi_r}{c\beta} \right)-1}{\sinh\left(\frac{2\pi}{\beta}u + \log \frac{24\pi\phi_r}{c\beta}\right)}\right] +\frac{c}{3}\log\left[\frac{\pi}{\beta} \cosh\frac{2 \pi t}{\beta }\right]. \end{eqnarray} $\bold{(c)}$ This is a disconnected configuration, contributing to the EE of the subsystem $A$ where the bulk static minimal surfaces are homologous to each of the segments $[p_1,p_2]$ and $[p_3,p_4]$ separately in the two reservoirs. The EE for the subsystem $A$ is given by, \begin{equation}\label{Sdome} \mathcal{S}_{A}^{\text{no-island}} = 2\frac{c}{3} \log\left( \frac{\beta }{\pi} \sinh \frac{\pi |u - v|}{\beta}\right) \,. \end{equation} $\bold{(d)}$ In the last case, each segment in the radiation reservoirs admits two island regions located in the black hole exteriors. This configuration is irrelevant as its contribution is always sub-dominant in the final entropy expression. The corresponding EE in this configuration may be expressed as \begin{align}\label{Sisland2} \mathcal{S}_{A}^{\text{island}} =&\, 4\phi_0 + \frac{4\pi \phi_r}{\beta} \coth \left(\frac{2\pi}{\beta}u +\log \frac{24\pi\phi_r}{c\beta}\right) + \frac{c}{3} \log \left[\frac{\beta}{\pi}\frac{ \cosh \left(\frac{4\pi}{\beta}u + \log \frac{24\pi \phi_r}{c\beta} \right)-1}{\sinh\left(\frac{2\pi}{\beta}u + \log \frac{24\pi\phi_r}{c\beta}\right)}\right]\nonumber\\ +&\frac{4\pi \phi_r}{\beta} \coth \left(\frac{2\pi}{\beta}(L-v) +\log \frac{24\pi\phi_r}{c\beta}\right) + \frac{c}{3} \log \left[\frac{\beta}{\pi}\frac{ \cosh \left(\frac{4\pi}{\beta}(L-v) + \log \frac{24\pi \phi_r}{c\beta} \right)-1}{\sinh\left(\frac{2\pi}{\beta}(L-v) + \log \frac{24\pi\phi_r}{c\beta}\right)}\right].\nonumber\\ & \end{align} Finally, the entanglement entropy of the subsystem $A$ is obtained from the minimum of the above four contributions. \subsection{Holographic entanglement negativity} In this subsection we briefly recapitulate the holographic entanglement negativity proposals described in \cite{Chaturvedi:2016rcn,Jain:2017aqk,Malvimat:2018txq} for bipartite mixed states in $CFT_{2}$s in the $AdS_3/CFT_2$ scenario. The corresponding field theory replica technique results were described in \cite{Calabrese:2012nk,Calabrese:2014yza,Malvimat:2017yaj,Kulaxizi:2014nma}. The above holographic proposal for the entanglement negativity involved an algebraic sum of bulk geodesic lengths homologous to the subsystems for the mixed state configurations in question. For example in the case of two adjacent subsystems $A$ and $B$ the corresponding holographic entanglement negativity (HEN) is given as \cite{Jain:2017aqk} \begin{equation}\label{NegAdj0} \mathcal{E}(A:B)=\frac{3}{16\pi G_N^{(3)}}\left(\mathcal{L}_A+\mathcal{L}_B-\mathcal{L}_{A\cup B}\right), \end{equation} where $\mathcal{L}_X$ is the bulk static minimal surface homologous to the subsystem $X$. The above equation may be expressed in terms of the entanglement entropies of the subsystems utilizing the RT formula \cite{Ryu:2006bv,Ryu:2006ef} as follows, \begin{equation}\label{NegAdj1} \mathcal{E}(A:B)=\frac{3}{4}\left[S(A)+S(B)-S(A \cup B)\right]\,, \end{equation} where $S(X)$ is the corresponding EE for the subsystem $X$. In this connection the holographic R\'enyi entropy for the same in the dual $CFT_d$ is defined by \cite{Dong:2016fnf} \begin{equation}\label{Renyi} S^{(n)}(X)=\frac{\mathcal{A}_X^{(n)}}{4 G_{N}^{(d+1)}}\,. \end{equation} In the above equation, $\mathcal{A}_X^{(n)}$ is related to the area of a back-reacting cosmic brane homologous to the subsystem $X$ in the bulk dual $AdS_{d+1}$ \cite{Dong:2016fnf}. In two dimensions, the \cref{Renyi} reads as \begin{equation}\label{Renyi-half} S^{(1/2)}(X)=\frac{\mathcal{L}_X^{(1/2)}}{4 G_{N}^{(3)}}\,, \end{equation} which is referred to as the R\'enyi entropy of order half and $\mathcal{L}_X^{(1/2)}$ corresponds to the length of a back-reacting cosmic brane in $AdS_3$ geometry. For the case of spherically entangling surfaces, the effect of the back-reaction in $AdS_3/CFT_2$ scenario may be characterized as \cite{Rangamani:2014ywa,Kudler-Flam:2018qjo,Hung:2011nu} \begin{equation}\label{Backrreaction} \mathcal{L}^{(1/2)}_X=\frac{3}{2} \mathcal{L}_X. \end{equation} Subsequently, we may reframe the HEN proposal in \cref{NegAdj1} as a specific algebraic sum of R\'enyi entropies of order half for the corresponding subsystems utilizing the \cref{Renyi-half,Backrreaction} \begin{equation}\label{NegAdj2} \mathcal{E}(A:B)=\frac{1}{2}\left[S^{(1 / 2)}(A)+S^{(1 / 2)}(B)-S^{(1 / 2)}(A \cup B)\right]\,. \end{equation} Following the same approach the above HEN proposal may be extended to the disjoint subsystems as \cite{Malvimat:2018txq} \begin{equation}\label{NegDis0} \begin{aligned} \mathcal{E}(A:B)=&\frac{3}{4}\left[S(A \cup C) + S(B\cup C) - S(C) - S(A \cup B \cup C)\right]\\ =&\frac{1}{2}\left[S^{(1 / 2)}(A\cup C)+S^{(1 / 2)}(B\cup C)-S^{(1 / 2)}(C)-S^{(1 / 2)}(A\cup B\cup C)\right]\,. \end{aligned} \end{equation} where the subsystem $C$ is sandwiched between the subsystems $A$ and $B$. In the following sections, we will use these proposals to compute the holographic entanglement negativity for various bipartite mixed state configurations. \begin{comment} \textbf{Single subsystem:} Similarly for single interval, the corresponding HEN conjecture is \cite{Chaturvedi:2016rcn} \begin{eqnarray} \mathcal{E}(A:B) &=& \lim_{B_1\cup B_2 \to A^c}~\frac{3}{16G_{N}^{(3)}}\bigg[2 {\cal L}_{A}+{\cal L}_{B_1}+{\cal L}_{B_2}-{\cal L}_{A\cup B_1}-{ \cal L}_{A\cup B_2}\bigg]\\ &=& \lim_{B_1\cup B_2 \to A^c}\frac{3}{4}\bigg[2 S_{A}+S_{B_1}+S_{B_2}-S_{A\cup B_1}-S_{A\cup B_2}\bigg]\\ &=& \lim_{B_1\cup B_2\to A^c}\frac{1}{2}\bigg[ 2S^{(1/2)}(A)+ S^{(1/2)}(B_1)+S^{(1/2)}(B_2)\nonumber\\ &&\qquad \qquad \qquad \qquad-S^{(1/2)}(A\cup B_1)-S^{(1/2)}(A\cup B_2)\bigg] \end{eqnarray} \end{comment} \section{Entanglement measures in model-I}\label{model1} In this section we first compute the entanglement entropy for a generic subsystem in the $BCFT_2$s \cite{Geng:2021iyq} for the configuration discussed in the sub\cref{finitetemperaturewithboundary}. Note that here we consider both the end points of the subsystem to be situated deep into the annular region of the $BCFT_2$s\footnote{This is in contrast to the article \cite{Geng:2021iyq} where the authors have examined the entanglement entropy for a subsystem with one end point located on the boundary.}. Subsequently, we analyze the holographic entanglement negativity for various bipartite mixed states in the $BCFT_2$s at a finite temperature. The dual bulk space time for this construction is very complicated but in the high temperature limit this reduces to an eternal $AdS_3$ BTZ black hole \cite{Maldacena:2001kr,Banados:1992wn} as demonstrated in \cite{Geng:2021iyq}. The bulk configuration involves two dimensional black holes on both the KR branes induced from the higher dimensional BTZ black hole \cite{Geng:2021iyq} but with different temperatures due to the distinct boundary conditions at the two boundaries of the two dual $BCFT_2$s. Interestingly, these entanglement measures characterize the communication between the two induced black holes on the KR branes \cite{Geng:2021iyq}. \subsection{Entanglement entropy and Page curve} We begin with the computations of the different contributions to the entanglement entropy for a generic subsystem at a finite temperature as mentioned above. In this connection, we first describe the field theory analysis for the entanglement entropy in the dual $BCFT_2$s\footnote{These two $BCFT_2$s are termed as the $BCFT_L$ and the $BCFT_R$ referring to \cref{singlefinite}.} following the method discussed in \cite{Geng:2021iyq}. Furthermore we substantiate these field theory results from holographic computations of the entanglement entropy in the dual bulk geometry utilizing wedge holography. \subsubsection{Field theory computations}\label{finiteTgenericA} In this subsection, we consider a subsystem $A=A_L\cup A_R$ in the $BCFT_L$ and $BCFT_R$ with its end points located in the bulk of the annular region as shown in figure \ref{singlefinite}. Note that, these two $BCFT_2$s at a finite temperature constitute a thermofield double state as discussed in \ref{finitetemperaturewithboundary}. The twist operators $\bar{\Phi}_n\left(w_{L_1},\bar{w}_{L_1}\right)$, $\Phi_n\left(w_{L_2},\bar{w}_{L_2}\right)$, $\Phi_n\left(w_{R_1},\bar{w}_{R_1}\right)$, and $\bar{\Phi}_n\left(w_{R_2},\bar{w}_{R_2}\right)$ in this context are situated at the end points of the subsystem $A$. We then utilize the transformation described in \cref{mapping} to map the annulus to the UHP and obtain the contributions to the entanglement entropy from the four point function as follows \begin{equation}\label{FieldTheoryEE} S_A=\lim_{n\rightarrow1}\frac{1}{1-n}\log(\left<\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right) \right>^b _{\text{UHP},a})\,, \end{equation} where the lower and the upper indices $a,b$ represent the boundary conditions corresponding to the two boundaries of the $BCFT_2$s. It is possible to identify seven distinct contributions to the corresponding entanglement entropy from the connected and disconnected channels for the four point function. $\bm{(a)}$ We first discuss one of the connected channels which may be obtained by considering the OPEs of the twist operators located on the $BCFT_L$ and $BCFT_R$. Therefore, the entanglement entropy in this channel is expressed as \begin{equation}\label{bulk-type} \begin{aligned} S^\text{bulk}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log(\left<\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right) \right>^b _{\text{UHP},a})\,\\ =&\lim_{n\rightarrow1}\frac{1}{1-n}\log\Big(\left<\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\right>_{\text{UHP}}\left<\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right) \right> _{\text{UHP}}\Big)\,\\ =&\frac{c}{3}\ln\left(\frac{2 r_1}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)+\frac{c}{3}\ln\left(\frac{2 r_2}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)\,, \end{aligned} \end{equation} where in the second line, we have utilized a large $c$ factorization of the four point function into two 2-point functions on the UHP as discussed in the articles \cite{Coser:2014gsa,Malvimat:2018cfe,Malvimat}. The last line of the above equation is obtained through the transformations $w_L=r \exp(i\theta)\,,\,w_R=r \exp(i\pi-i\theta)$ followed by an analytic continuation of the Euclidean time $t=\frac{i \theta \beta}{2 \pi}$ on the $w$-plane \cite{Geng:2021iyq}. $\bm{(b)}$ Next we compute the contribution to the entanglement entropy from a disconnected channel which may be obtained through the BOEs of all the twist operators in \cref{FieldTheoryEE} with respect to one of the two boundaries on the UHP, \begin{equation}\label{boundarychannel} \begin{aligned} S^{bb}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log(\left<\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\right>^b )\,\\ =&\frac{c}{3}\ln\left(\frac{r_1 ^2-r_I ^2}{r_I \epsilon}\right)+\frac{c}{3}\ln\left(\frac{r_2 ^2-r_I ^2}{r_I \epsilon}\right)+4\ln\left(g_b\right)\,. \end{aligned} \end{equation} In the above equation, the superscript refers to the BOEs of the twist operators corresponding to the boundary $b$. \begin{figure}[H] \centering \includegraphics[scale=.85]{singlefinite.pdf} \caption{This schematic depicts a generic subsystem ($A=A_L\cup A_R$) with both the end points in the bulk of $BCFT_L$ and $BCFT_R$ at a constant time slice. (Figure modified from \cite{Geng:2021iyq})}\label{singlefinite} \end{figure} $\bm{(c)}$ A similar computation of the entanglement entropy may be performed by considering the BOEs of all the twist operators with respect to the other boundary located at the operator insertion point $z=\frac{i}{2}$ on the UHP. Hence the corresponding entanglement entropy in this disconnected channel may be obtained on the $w$-plane as, \begin{equation} \begin{aligned} S^{aa}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log\Big(\left<\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{R_2},\bar{z}_{R_2}\right)\bar{\Phi}_n\left(z_{L_2},\bar{z}_{L_2}\right) \Phi_a\left(z_a,\bar{z}_a\right)\right>_a\Big)\,\\ =&\frac{c}{3}\ln\left(\frac{r_O ^2-r_1 ^2}{r_O \epsilon}\right)+\frac{c}{3}\ln\left(\frac{r_O ^2-r_2 ^2}{r_O \epsilon}\right)+4\ln\left(g_a\right)\,. \end{aligned} \end{equation} $\bm{(d)}$ Now we discuss the case where both the OPE and the BOE of the twist operators may be considered simultaneously. The entanglement entropy in this connected channel may be written as \begin{equation} \begin{aligned}\label{boundarybulk1} S^{b\text{-bulk}}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log(\left<\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\right>^b\left<\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\right>_\text{UHP} )\,\\ =&\frac{c}{3}\ln\left(\frac{2 r_2}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)+\frac{c}{3}\ln\left(\frac{r_1 ^2-r_I ^2}{r_I \epsilon}\right)+2\ln\left(g_b\right)\,, \end{aligned} \end{equation} where we have performed BOEs for the twist operators $\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\,,\,\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)$ and considered the OPE of the rest $\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\,,\,\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)$ on the UHP. Once again, in the last line we have utilized the transformations $w_L=r \exp(i\theta)\,,\,w_R=r \exp(i\pi-i\theta)$ followed by an analytic continuation of the Euclidean time $t=\frac{i \theta \beta}{2 \pi}$ on the $w$-plane. $\bm{(e)}$ Conversely we may employ the OPE of the twist operators $\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\,,\,\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)$ and BOEs to the remaining twist operators, resulting into an another possibility of the entanglement entropy in the connected channel as follows \begin{align}\label{boundarybulk2} S^{a\text{-bulk}}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log\Big(\left<\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\right>_\text{UHP}\\ &\qquad\qquad\qquad\left<\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\Phi_a\left(z_a,\bar{z}_a\right)\right>_a\Big) \nonumber\\ =&\frac{c}{3}\ln\left(\frac{2 r_1}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)+\frac{c}{3}\ln\left(\frac{r_O ^2-r_2 ^2}{r_I \epsilon}\right)+2\ln\left(g_a\right)\,. \end{align} Note that, we have performed the corresponding BOEs in the above equation with respect to the boundary $a$. $\bm{(f)}$ An another case may also be analyzed by considering the BOEs of the twist operators involving both the boundaries on the UHP simultaneously. Hence, the entanglement entropy corresponding to this connected channel may be reduced to \begin{equation} \begin{aligned} S^{ab}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log(\left<\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\right>^b\left<\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\Phi_a\left(z_a,\bar{z}_a\right)\right>_a )\,\\ =&\frac{c}{3}\ln\left(\frac{r_1 ^2-r_I ^2}{r_I \epsilon}\right)+\frac{c}{3}\ln\left(\frac{r_O ^2-r_2 ^2}{r_I \epsilon}\right)+2\ln\left(g_a\right)+2\ln\left(g_b\right)\,. \end{aligned} \end{equation} $\bm{(g)}$ We now discuss a special case of the disconnected channels where the contribution to the entanglement entropy may be computed from the OPE of the twist operators $\bar{\Phi}_n\left(w_{L_1},\bar{w}_{L_1}\right)$, $\Phi_n\left(w_{L_2},\bar{w}_{L_2}\right)$ in the $BCFT_L$ and similarly for $\bar{\Phi}_n\left(w_{R_1},\bar{w}_{R_1}\right)$, $\Phi_n\left(w_{R_2},\bar{w}_{R_2}\right)$ in the $BCFT_R$ \footnote{The authors of \cite{Geng:2021iyq} did not encounter this type of contribution to the entanglement entropy due to the choice of the subsystem.}. The expression for the entanglement entropy in this channel is then given as \begin{equation} \begin{aligned} S^{\text{dome}}_{A}=&\lim_{n\rightarrow1}\frac{1}{1-n}\log\Big(\left<\bar{\Phi}_n\left(z_{L_1},\bar{z}_{L_1}\right)\Phi_n\left(z_{L_2},\bar{z}_{L_2}\right)\right>_\text{UHP}\left<\Phi_n\left(z_{R_1},\bar{z}_{R_1}\right)\bar{\Phi}_n\left(z_{R_2},\bar{z}_{R_2}\right)\right>_\text{UHP}\Big)\,\\ =&\frac{c}{3}\ln \left(\frac{\beta }{\pi \epsilon } \sinh \frac{\pi(r_2 - r_1) } {\beta }\right)\,. \end{aligned} \end{equation} Finally, the entanglement entropy of a generic subsystem $A$ may be obtained by considering the minimum of the above contributions. \begin{equation} \begin{aligned} S_A=\text{min}\left(S^\text{bulk}_{A},S^{bb}_{A},S^{aa}_{A},S^{b\text{-bulk}}_{A},S^{a\text{-bulk}}_{A},S^{ab}_{A},S^\text{dome}_{A}\right)\,. \end{aligned} \end{equation} In the following subsection, we will compute the corresponding entanglement entropy from the dual bulk geometry through wedge holography which will substantiate the above field theory results. \subsubsection{Holographic computations}\label{holographicEEs} We now compute the holographic entanglement entropy for a generic subsystem $A$ at a finite temperature using the areas of the RT surfaces described in \cref{areab,areaa,HMsurf} for the bulk dual geometry involving an eternal $AdS_3$ BTZ black hole with two dimensional KR branes \cite{Geng:2021iyq}. Once more it is possible to identify seven contributions to the entanglement entropy of the subsystem $A$ arising from distinct bulk RT surfaces. In what follows we describe the areas of these various RT surfaces for the subsystem $A$ as mentioned above. In this context we have considered both the asymptotic regions of the bulk BTZ geometry for computing the areas of the corresponding RT surfaces in contrast to \cite{Geng:2021iyq} where only a single asymptotic region was considered and finally the authors doubled the results to obtain the areas of the RT surfaces. $\bm{(a)}$ We start with the RT surfaces for the subsystem $A$ which consists of two HM surfaces connecting its end points in the two asymptotic boundaries as illustrated in the \cref{holographicsingle1}. We call this RT surface as bulk-type with an area contribution as follows \begin{equation}\label{HM} A_{\text{bulk}}=2\ln\left(\frac{2 r_1}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)+2\ln\left(\frac{2 r_2}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)\,. \end{equation} $\bm{(b)}$ Next we consider the $bb$-type RT surfaces where both the geodesics start from $\partial A$ and end on the $b$-brane as shown in the \cref{holographicsingle2}. The corresponding area contribution may be obtained as \begin{equation}\label{bbtype} A_{bb}= 2\ln\left(\frac{r_1 ^2-r_I ^2}{r_I \epsilon}\right)+2\ln\left(\frac{r_2 ^2-r_I ^2}{r_I \epsilon}\right)+4\frac{6}{c}\ln\left(g_b\right)\,. \end{equation} $\bm{(c)}$ Similar to above case, if both the geodesics start from $\partial A$ and end on the $a$-brane, they are termed as the $aa$-type RT surfaces as described in \cref{holographicsingle3}. The area for these RT surfaces is given by \begin{equation}\label{aatype} A_{aa}= 2\ln\left(\frac{r_O ^2-r_1 ^2}{r_O \epsilon}\right)+2\ln\left(\frac{r_O ^2-r_2 ^2}{r_O \epsilon}\right)+4\frac{6}{c}\ln\left(g_a\right)\,. \end{equation} $\bm{(d)}$ Next we describe the contribution to the EE of the subsystem $A$ from $b$-bulk type RT surfaces (\cref{holographicsingle4}) where both the geodesics start from $\partial A$, however two of them end on the $b$-brane while the other geodesic stretches between the two asymptotic boundaries as a HM surface. The area for this contribution is expressed as \begin{equation}\label{bbulk} A_{\text{$b$-bulk}}= 2\ln\left(\frac{2 r_2}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)+2\ln\left(\frac{r_1 ^2-r_I ^2}{r_I \epsilon}\right)+2\frac{6}{c}\ln\left(g_b\right)\,. \end{equation} $\bm{(e)}$ These RT surfaces are similar to the previous one but with the geodesics now ending on the $a$-brane instead of the $b$-brane (\cref{holographicsingle5}). We term these RT surfaces as $a$-bulk type with an area \begin{equation}\label{abulk} A_{\text{$a$-bulk}}= 2\ln\left(\frac{2 r_1}{\epsilon}\cosh\frac{2 \pi t}{\beta}\right)+2\ln\left(\frac{r_O ^2-r_2 ^2}{r_I \epsilon}\right)+2\frac{6}{c}\ln\left(g_a\right)\,. \end{equation} $\bm{(f)}$ We now consider the $ab$-type RT surfaces where the geodesics start from $\partial A$ and end on the two KR branes as depicted in the \cref{holographicsingle6} with an area contribution as follows \begin{equation}\label{abtype} A_{ab}= 2\ln\left(\frac{r_1 ^2-r_I ^2}{r_I \epsilon}\right)+2\ln\left(\frac{r_O ^2-r_2 ^2}{r_I \epsilon}\right)+2\frac{6}{c}\ln\left(g_a\right)+2\frac{6}{c}\ln\left(g_b\right)\,. \end{equation} $\bm{(g)}$ Finally, we have the dome-type RT surfaces described by the geodesics homologous to the subsystem $A$ on both the asymptotic boundaries (\cref{holographicsingle7}). At finite temperature this configuration describes an area contribution to the EE given by \begin{equation}\label{dome} A_{\text{dome}}=4\ln \left(\frac{\beta }{\pi \epsilon } \sinh \frac{\pi (r_2 - r_1)}{\beta }\right)\,. \end{equation} \begin{figure} \centering \begin{subfigure}{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle1.pdf} \caption{} \label{holographicsingle1} \end{subfigure} \hspace{1.5cm} \vspace{.2cm} \begin{subfigure}{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle2.pdf} \caption{} \label{holographicsingle2} \end{subfigure} \hspace{1.5cm} \vspace{.2cm} \begin{subfigure}[b]{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle3.pdf} \caption{} \label{holographicsingle3} \end{subfigure} \hspace{1.5cm} \begin{subfigure}[b]{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle4.pdf} \caption{} \label{holographicsingle4} \end{subfigure} \hspace{1.5cm} \vspace{.2cm} \begin{subfigure}[b]{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle5.pdf} \caption{} \label{holographicsingle5} \end{subfigure} \hspace{1.5cm} \begin{subfigure}[b]{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle6.pdf} \caption{} \label{holographicsingle6} \end{subfigure} \hspace{1.5cm} \begin{subfigure}[b]{0.38\textwidth} \centering \includegraphics[width=\textwidth]{holographicsingle7.pdf} \caption{} \label{holographicsingle7} \end{subfigure} \caption{Diagram depicts all the possible RT surfaces corresponding to the subsystem $A$. Here the two asymptotic boundaries and the horizons of the bulk eternal BTZ black hole are denoted by the black solid lines and the grey shaded region respectively whereas the two KR branes are shown by the blue lines labeled as $a$ and $b$ corresponding to the different boundary conditions of the dual $BCFT_2$s. (Figure modified from \cite{Geng:2021hlu,Geng:2021iyq})} \label{holographic} \end{figure} Now we may compute the holographic entanglement entropy for the subsystem $A$ in the dual $BCFT_2$s by utilizing \cref{wedge,aatype,bbtype,abtype,HM,abulk,bbulk,dome} \footnote{In the entropy expressions, we have identified the boundary entropies as $S_{bdya}=\ln (g_a)$ and $S_{bdyb}=\ln (g_b)$.} \begin{equation} \begin{aligned}\label{holographicentropy} S_A=&\text{min}\left(\frac{A_{\text{bulk}}}{4 G_N ^{(3)}},\frac{A_{bb}}{4 G_N ^{(3)}},\frac{A_{aa}}{4 G_N ^{(3)}},\frac{A_{b\text{-bulk}}}{4 G_N ^{(3)}},\frac{A_{a\text{-bulk}}}{4 G_N ^{(3)}},\frac{A_{ab}}{4 G_N ^{(3)}},\frac{A_{dome}}{4 G_N ^{(3)}}\right)\,\\ =&\text{min}\left(S^\text{bulk}_{A},S^{bb}_{A},S^{aa}_{A},S^{b\text{-bulk}}_{A},S^{a\text{-bulk}}_{A},S^{ab}_{A},S^\text{dome}_{A}\right)\,. \end{aligned} \end{equation} In the following, we plot the entanglement entropies corresponding to the RT surfaces detailed above with respect to the size of the subsystem $A$ and time $t$. \begin{figure}[H] \centering \includegraphics[width=12cm]{Entropy_t_geng.pdf} \caption{Entanglement entropies corresponding to the different RT surfaces w.r.t time. Here we have chosen $\beta=.1$, $c=500$, $\epsilon=.001$, $r_I=1$, $r_O=2$, $S_{bdyb}=875$, $S_{bdya}=850$, $A=[1.01,1.5]$ and time $t$ is varied from [0,\;.3]. }\label{entropy t geng} \end{figure} In \cref{entropy t geng}, we plot the entanglement entropy for a generic subsystem $A$ (cf. \cref{singlefinite}) as a function of time and observe three phases accordingly. At early times, the rising part of the corresponding EE arises from bulk-type RT surfaces. However in the second phase, we again observe a rising behaviour of the EE with a rate lesser than the previous one which arises from $b$-bulk type RT surfaces. At late times, \cref{entropy t geng} depicts a saturation in the EE due to the dominant contribution from the $ab$-type RT surfaces for the subsystem $A$. The corresponding profile of the EE is in contrast to \cite{Geng:2021iyq} where the intermediate second phase was not observed due to the choice of the subsystem $A$ with one end point located at the boundary of the dual $BCFT_2$s. As depicted in \cref{entropy t geng}, the entanglement entropy $S_\text{Min}$ follows the characteristics of a Page curve. This exhibits a unitary time evolution of the corresponding EE for the subsystem $A$ which provides a restriction to its monotonically increasing behaviour. \begin{figure}[H] \centering \includegraphics[width=12cm]{Entropy_r_geng.pdf} \caption{Entanglement entropies corresponding to the different RT surfaces w.r.t the size of the subsystem $A$. Here we have chosen $\beta=.1$, $c=500$, $\epsilon=.001$, $r_I=1$, $r_O=2$, $S_{bdyb}=875$, $S_{bdya}=850$, $t=.15$ and the size of $A$ is varied from $[1.01+\epsilon,r_O-\epsilon]$. }\label{entropy r geng} \end{figure} In \cref{entropy r geng}, we analyze another interesting behaviour of the entanglement entropy with respect to the size of the generic subsystem $A$ (cf. \cref{singlefinite}). In this context, we observe three phases for the corresponding entropy $S_\text{Min}$ which reproduces the profile of the EE similar to the one described in \cite{Geng:2021iyq}. Fig. \ref{entropy r geng} depicts an increasing behaviour in the first phase which arises from the dome-type RT surfaces. Subsequently, the intermediate phase with a very small increasing rate is described by the dominant contribution to the $S_\text{Min}$ from $b$-bulk type RT surfaces. Finally, the last phase corresponds to a decreasing profile of the EE which arises from $ab$ type RT surfaces for the subsystem $A$. \subsection{Holographic entanglement negativity and Page curve} In this subsection we compute the holographic entanglement negativity for various bipartite mixed states in the context of the first model from the proposals described in \cref{NegAdj1,NegDis0} and the expression for the holographic entanglement entropy in \cref{holographicentropy}. Subsequently we study the characteristics of the holographic entanglement negativity obtained for different scenarios involving the subsystem sizes and the time for this configuration. Some of these profiles describe the corresponding Page curves for the holographic entanglement negativity. It is important to note here that the first Page curve was obtained in the context of a bipartite quantum system in \cite{Page:1993df} using the Harr random average of the entanglement entropy for one of the subsystem as a function of the size of its Hilbert space. This Page curve was later interpreted in the context of black hole systems as the evolution of the EE for the Hawking radiation with respect to the time \cite{Page:1993wv,Page:2013dx}. Recently, the Page curves for the entanglement negativity of bipartite mixed states were obtained through the random matrix techniques in \cite{Shapourian:2020mkc}. Interestingly the corresponding Page curves for the entanglement negativity obtained through our holographic constructions for the configuration of two communicating black holes \cite{Geng:2021iyq} considered here are similar in nature. We should mention here that the corresponding field theory replica technique computations for the entanglement negativity in this configuration and subsystem choices involve six and eight point correlation functions of the twist fields on the UHP which are technically complicated to evaluate explicitly. Note that this is in contrast to the field theory replica technique computation for the entanglement entropy described in \cite{Geng:2021iyq} and in \cref{FieldTheoryEE} which involved two point and four point twist correlators on the UHP for specific choices of the subsystem respectively. Interestingly however as discussed in \cite{Geng:2021iyq}, the $BCFT_2$s with two boundaries in an appropriate limit may be mapped to a $BCFT_2$ with one boundary on the UHP through the transformations described in \cref{mapping}\footnote{Note that the other boundary is mapped to a point on the UHP as discussed in sub\cref{finitetemperaturewithboundary}.}. In this context it should be noted that the authors in \cite{Malvimat:2018cfe,Malvimat} have computed the entanglement negativity for various mixed state configurations using field theory replica techniques for such $BCFT$s with a single boundary which matches with the corresponding holographic results for the same. This indicates that the proposals for the holographic entanglement negativity utilized by us are consistent for the $BCFT_2$s with two boundaries considered here. However as mentioned above, an explicit matching from both the field theory and bulk side for the configuration considered here remains a non-trivial and technically involved open issue. \subsubsection{Adjacent subsystems} In this subsection, we compute the holographic entanglement negativity for two generic adjacent subsystems $A$ and $B$ in the dual $BCFT_2$s by utilizing the \cref{NegAdj1,holographicentropy}. In particular, we investigate the qualitative nature of the entanglement negativity and discuss its profiles for three distinct scenarios involving the subsystem sizes and the time in the first model. In this context, we use the diagrams similar to those depicted in \cref{holographic} to study the various RT surfaces for the two adjacent subsystems under consideration. \subsubsection*{$\bm{(i)}$ Full system ($\bm{A\cup B}$) fixed, common point varied} In the first case, we obtain the profile for the entanglement negativity between two adjacent subsystems $A=[r_I+\epsilon,r]$ and $B=[r,r_O-\epsilon]$ at a constant time slice while varying the common point $r$ as shown in \cref{fig1}. We compute the holographic entanglement negativity between $A$ and $B$ using the \cref{holographicentropy,NegAdj1} as follows\\ \begin{equation}\label{adjacentcase1} \mathcal{E}(A:B) = \begin{cases} \frac{c}{4} \log\left[\frac{\beta ^2 (r-r_I) (r+r_I) \sinh ^2\left(\frac{\pi (r-r_I-\epsilon )}{\beta }\right)}{\pi ^2 \epsilon ^3 (2 r_I+\epsilon )}\right]\,,& \text{Phase-1} \vspace{2mm}\\ \frac{c}{4}\log\left[\frac{2 \beta ^2 r r_I \cosh \left(\frac{2 \pi t}{\beta }\right) \sinh ^2\left(\frac{\pi (r-r_I-\epsilon )}{\beta }\right)}{\pi ^2 \epsilon ^3 (2 r_I+\epsilon )}\right]-2 S_{\text{bdyb}}\,, & \text{Phase-2}\vspace{2mm} \\ \frac{c}{4}\log\left[\frac{4 r^2 \cosh ^2\left(\frac{2 \pi t}{\beta }\right)}{\epsilon ^2}\right]\,,& \text{Phase-3} \vspace{2mm}\\ \frac{c}{4}\log\left[\frac{(r_O-r)^2 (r+r_O)^2}{r_O^2 \epsilon ^2}\right]+ 4 S_{\text{bdya}}\,,& \text{Phase-4}\vspace{2mm} \\ \frac{c}{4}\log\left[\frac{\beta ^2 (r_O-r) (r+r_O) \sinh ^2\left(\frac{\pi (r-r_O+\epsilon )}{\beta }\right)}{\pi ^2 \epsilon ^3 (2 r_O-\epsilon )}\right]\,,& \text{Phase-5} \end{cases} \end{equation} where the boundary entropies corresponding to the two KR branes are denoted as $S_{\text{bdya}}$ and $S_{\text{bdyb}}$. It is interesting to note that the behaviour of the Page curve for the entanglement negativity in this context is analogous to the one obtained in \cite{KumarBasak:2021rrx,Shapourian:2020mkc}. In the present scenario, we identify all the possible contributions to the entanglement entropies of the subsystems $A$ and $B$ by using \cref{holographicentropy} to elucidate the phase transitions observed in \cref{fig1}. In this context it is possible to identify five distinct phases for the holographic entanglement negativity between the two adjacent subsystems which is described as follows. \begin{figure}[H] \centering \includegraphics[width=12cm]{adjacentpleatue.pdf} \caption{Page curve for the entanglement negativity with respect to the size of the subsystem $A$. Here $r_I=1$, $r_O=2$, $\epsilon=.001$, $\beta=.1$, $c=500$, $t=.15$, $S_{bdyb}=875$ and $S_{bdya}=850$. }\label{fig1} \end{figure} \noindent \textbf{Phase-1 and 2:} In the first phase, the size of the subsystem $A$ is smaller than the size of $B$ with dome-type RT surfaces as a dominant contribution to the entanglement entropy of $A$. However the subsystems $B$ and $A\cup B$ admit $ab$-type RT surfaces each. In this case the entanglement negativity is governed by the degrees of freedom of the subsystem $A$. Consequently, when the size of the subsystem $A$ is increased, the entanglement negativity between $A$ and $B$ rises linearly due to the increasing number of Hawking modes captured by the subsystem $A$. Subsequently in the second phase, the RT surfaces of $B$ make a transition to $a$-bulk type RT surfaces which produces a small change in the growth rate of the corresponding entanglement negativity.\\\\ \textbf{Phase-3:} In this phase, the subsystems $A\,,\,B$ and $A\cup B$ admit $b$-bulk, $a$-bulk and $ab$-type RT surfaces respectively. The dominant contribution to the entanglement negativity in \cref{adjacentcase1} arises from the HM surface as a function of the common point between the two adjacent subsystems. Consequently, we observe that the corresponding entanglement negativity displays a very small rate of increase as depicted in \cref{fig1}. On a separate note, in this case the size of the subsystem $A$ is comparable to the size of $B$ such that they are maximally entangled. This is a characteristic of the tripartite entanglement where the tripartition is defined by the subsystems $A$, $B$ and $(A\cup B)^c$. Hence the entanglement negativity between the two adjacent subsystems in this phase does not increase significantly as they are already maximally entangled. \\\\ \textbf{Phase-4 and 5:} We now proceed to the next phase where the RT surfaces for the subsystems $A$ and $A\cup B$ are $ab$-type each while $B$ admits $aa$-type RT surfaces. Here the entanglement negativity is governed by the degrees of freedom of $B$ which decrease accordingly with the increasing size of $A$. This corresponds to a small decreasing behaviour in the entanglement negativity profile as depicted in \cref{fig1}. Subsequently in the last phase, the RT surfaces of $A$ and $B$ are interchanged. Therefore, the corresponding entanglement negativity may be delineated in a similar fashion as for the first phase with the roles of the subsystems $A$ and $B$ vis-\'a-vis their RT surfaces are exchanged. \subsubsection*{$\bm{(ii)}$ Subsystem $\bm{A}$ fixed, $\bm{B}$ varied}\label{adjcaseii} Next we analyze the behaviour of the entanglement negativity between the two adjacent subsystems at a constant time slice where we consider the subsystem $A=[r_I+\epsilon, r_1]$ with a fixed size and vary the size of the subsystem $B=[r_1+\epsilon, r]$ by shifting the point $r$. This is obtained by using the \cref{holographicentropy,NegAdj1} as follows \begin{equation} \mathcal{E}(A:B) = \begin{cases} \frac{c}{2} \log\left[\frac{\beta \sinh \left(\frac{\pi \left(r_1-r\right)}{\beta }\right) \sinh \left(\frac{\pi \left(-r_1+r_I+\epsilon \right)}{\beta }\right) \text{csch}\left(\frac{\pi (r-r_I-\epsilon )}{\beta }\right)}{\pi \epsilon }\right]\,,& \text{Phase-1} \vspace{2mm} \\ \frac{c}{4}\log\left[\frac{\beta ^4 r_I \text{sech}\left(\frac{2 \pi t}{\beta }\right) \sinh ^2\left(\frac{\pi \left(r-r_1\right)}{\beta }\right) \sinh ^2\left(\frac{\pi \left(-r_1+r_I+\epsilon \right)}{\beta }\right)}{2 \pi ^4 r \epsilon ^3 (2 r_I+\epsilon )}\right]+2 S_{\text{bdyb}} \,,& \text{Phase-2} \vspace{2mm}\\ \frac{c}{4}\log\left[\frac{\beta ^2 \left(r_1^2-r_I ^2\right) \sinh ^2\left(\frac{\pi \left(-r_1+r_I+\epsilon \right)}{\beta }\right)}{\pi ^2 \epsilon ^3 (2 r_I+\epsilon )}\right]\,,& \text{Phase-3} \end{cases} \end{equation} which corresponds to three possible phases for the entanglement negativity between $A$ and $B$ as depicted in \cref{fig2}. In what follows we analyze these phases in detail. \begin{figure}[H] \centering \includegraphics[width=12cm]{adjacentAdomeL2.pdf} \caption{The entanglement negativity between the adjacent subsystems as a function of the size of $B$. Here $r_I=1$, $r_O=2$, $\epsilon=.001$, $\beta=.1$, $c=500$, $t=.15$, $r_1=1.15$, $S_{bdyb}=875$ and $S_{bdya}=850$.}\label{fig2} \end{figure} \noindent \textbf{Phase-1:} In the first phase, the dominant contributions to the entanglement entropies of $A\,,\,B$ and $A\cup B$ arise from dome-type RT surfaces. Here the sizes of the subsystems $A$ and $B$ are very small and hence $A\cup B$ is far smaller than its complement $(A\cup B)^c$ which implies a vanishingly small entanglement negativity between the adjacent subsystems in question \cite{KumarBasak:2021rrx}.\\\\ \textbf{Phase-2:} We proceed to the second phase where the subsystem size of $A\cup B$ is comparable to its complement and the RT surfaces corresponding to it are now $b$-bulk type in contrast to the earlier phase where they were dome type. The entanglement negativity in this phase rises linearly due to the larger number of Hawking modes captured by the increasing size of the subsystem $B$.\\\\ \textbf{Phase-3:} Here the RT surfaces for $B$ and $A\cup B$ are identified as $ab$-type each, whereas $A$ still supports dome-type RT surfaces. We observe from \cref{fig2} that the holographic entanglement negativity between $A$ and $B$ appears to be constant in this phase. \subsubsection*{$\bm{(iii)}$ Subsystems $\bm{A}$ and $\bm{B}$ fixed, time varied} \label{Adjtime} Finally we investigate the holographic entanglement negativity between the adjacent subsystems $A$ and $B$ with fixed lengths $l_1$ and $l_2$ respectively while varying the time. In particular, we will study two sub cases of equal and unequal lengths of the two subsystems in question and obtain the corresponding entanglement negativities as depicted in the \cref{fig3}. \begin{figure}[H] \centering \includegraphics[width=12cm]{time.pdf} \caption{Page curves for the entanglement negativity between two adjacent subsystems $A$ and $B$ as a function of time. Here $r_I=1$, $r_O=2$, $\epsilon=.001$, $\beta=.1$, $c=500$, $S_{bdyb}=875$, $S_{bdya}=850$ and $A=[r_I+\epsilon ,r_1]$, $B=[r_1 ,r_O-\epsilon]$ with $r_1=1.5$ (for $l_1 = l_2$) and $A=[r_I+\epsilon ,r_1]$, $B=[r_1 ,r_O-\epsilon]$ with $r_1=1.3$ (for $l_1\neq l_2$).}\label{fig3} \end{figure} \noindent \textbf{(a) For $\bm{l_1=l_2}$}\\ For the case of two equal length subsystems $A$ and $B$, we observe two phases in the entanglement negativity profile as depicted in \cref{fig3}. The expressions for these may be obtained by utilizing the \cref{holographicentropy,NegAdj1} as follows \begin{equation}\label{adjacentcase3} \mathcal{E}(A:B) = \begin{cases} \frac{c}{4} \log\left[\frac{4 r_1^2 \cosh ^2\left(\frac{2 \pi t}{\beta }\right)}{\epsilon ^2}\right]\,,& \text{Phase-1} \vspace{3mm}\\ \frac{c}{4} \log\left[\frac{ \left(r_O^2-r_1^2\right)^2 }{r_O^2 \epsilon ^2 }\right]+4 S_{\text{bdya}}\,.& \text{Phase-2} \end{cases} \end{equation} \textbf{Phase-1:} This phase consists of three intermediate sub phases due to the different structures of the RT surfaces supported by the subsystems as time increases. At initial times, we have bulk-type RT surfaces as the leading contributions to the entanglement entropies for all the subsystems. In the second sub phase, the RT surfaces for $B$ and $A\cup B$ are $a$-bulk type each whereas $A$ still supports bulk-type RT surfaces. Subsequently in the third sub phase, we observe $b$-bulk type RT surfaces for the subsystem $A$ and $a$-bulk type RT surfaces for both the subsystems $B$ and $A\cup B$. Interestingly, these three different sub phases do not correspond to any phase transition in the entanglement negativity and its profile rises linearly with increasing time. This behaviour of the entanglement negativity may be explained by the increasing number of Hawking modes captured by the subsystems $A$ and $B$ with time.\\\\ \textbf{Phase-2:} In this phase, the entanglement entropy for the subsystems $A$, $B$ and $A\cup B$ arise from $ab$, $aa$ and $ab$-type RT surfaces respectively which indicate the saturation of entanglement entropy for $A$ and $B$. As a result, the entanglement negativity between $A$ and $B$ demonstrates a constant behaviour as shown in \cref{fig3}.\\\\ \textbf{(b) For $\bm{l_1\neq l_2}$}\\ Here we consider two unequal lengths of the subsystems $A$ and $B$ and compute the holographic entanglement negativity between them utilizing the \cref{holographicentropy,NegAdj1}. We observe three consecutive phases in the entanglement negativity profile as depicted in \cref{fig3}. The expressions for the corresponding entanglement negativity in these phases are given as follows \begin{equation}\label{adjacentcase4} \mathcal{E}(A:B) = \begin{cases} \frac{c}{4} \log\left[\frac{4 r_1^2 \cosh ^2\left(\frac{2 \pi t}{\beta }\right)}{\epsilon ^2}\right]\,, & \text{Phase-1} \vspace{2mm}\\ \frac{c}{4} \log\left[\frac{2 \beta ^2 r_1 r_I \cosh \left(\frac{2 \pi t}{\beta }\right) \sinh ^2\left(\frac{\pi \left(-r_1+r_I+\epsilon \right)}{\beta }\right)}{\pi ^2 \epsilon ^3 (2 r_I+\epsilon )}\right]-2 S_{\text{bdyb}}\,\,, & \text{Phase-2} \vspace{2mm}\\ \frac{c}{4} \log\left[\frac{\beta ^2 \left(r_1^2-r_I^2\right) \sinh ^2\left(\frac{\pi \left(-r_1+r_I+\epsilon \right)}{\beta }\right)}{\pi ^2 \epsilon ^3 (2 r_I+\epsilon )}\right]\,. & \text{Phase-3} \end{cases} \end{equation} \textbf{Phase-1:} In this phase, the RT surfaces for the subsystems $A$, $B$ and $A\cup B$ are identical to those discussed in the first phase of the previous sub case where two equal length subsystems were considered. This indicates a similar rising behaviour of the corresponding entanglement negativity.\\\\ \textbf{Phase-2:} Here, the dominant contributions to the entanglement entropies of $A$, $B$ and $A\cup B$ are determined from dome, $a$-bulk and $ab$-type RT surfaces respectively. The entanglement negativity between $A$ and $B$ exhibits an increasing behaviour with a growth rate smaller than the previous phase.\\\\ \textbf{Phase-3:} Finally in the last phase, we observe $ab$-type RT surfaces for both the subsystem $B$ and $A\cup B$ whereas the subsystem $A$ supports dome type RT surfaces. Here the entanglement negativity is governed by the characteristics of the entanglement entropy of $A$ which corresponds to a constant nature in the entanglement negativity profile. On a different note, the number of Hawking modes accumulating in the subsystems saturate at late times which provides an alternative interpretation for this phase. \subsubsection{Disjoint subsystems} Now we consider two generic disjoint subsystems $A$ and $B$ with a subsystem $C$ enclosed between them in the dual $BCFT_2$s and compute the holographic entanglement negativity between $A$ and $B$ using the \cref{NegDis0,holographicentropy}. In particular, we will investigate the qualitative feature of the entanglement negativity profile for three different scenarios of the disjoint subsystems involving the subsystem sizes and the time in the context of the first model. Once again we utilize diagrams similar to those depicted in \cref{holographic} to study the various RT surfaces for the subsystems in question. \subsubsection*{$\bm{(i)}$ Subsystem $\bm{A}$ fixed, $\bm{C}$ varied} In the first case, we fix the size of the subsystem $A=[r_I+\epsilon, r_1]$ at a constant time slice and vary the size of $C=[r_1,r]$ by shifting the point $r$ from $r_1+\epsilon$ to $r_O-\epsilon$ to examine the holographic entanglement negativity between the subsystems $A$ and $B$. To this end, we may compute the entanglement negativity by utilizing the \cref{NegDis0,holographicentropy} as follows \begin{equation} \mathcal{E}(A:B) = \begin{cases} \frac{c}{4} \log\left[\frac{\left(-r_I^2+r_1^2\right) \sinh ^2\left(\frac{\pi \left(r-r_I-\epsilon \right)}{\beta}\right) }{\epsilon (2 r_I+\epsilon ) \sinh^2\left(\frac{\pi \left(r-r_1\right)}{\beta }\right) }\right] \;,&\text{Phase-1} \vspace{3mm}\\ \frac{c}{4} \log\left[\frac{2 \pi ^2 \, r \, \left(-r_I^2+r_1^2\right) \cosh \left(\frac{2 \pi t}{\beta }\right)}{\beta ^2 r_I \epsilon \sinh^2\left(\frac{\pi \left(r-r_1\right)}{\beta }\right)}\right] +2 S_{\text{bdyb}}\;\;,& \text{Phase-2} \vspace{3mm}\\ 0\;.&\text{Phase-3} \end{cases} \end{equation} Here we observe three phases from the corresponding entanglement negativity profile as depicted in \cref{fig6} which we now analyze in details.\\\\ \textbf{Phase-1:} In the first phase, the RT surfaces for all the subsystems and the corresponding entanglement negativity profile are identical to the phase-3 of the previous case as discussed in \cref{discasei}.\\\\ \textbf{Phase-2:} The leading contributions to the entanglement entropies for the subsystems $A\cup C$ and $C$ arise from $b$-bulk and dome-type RT surfaces respectively. However the subsystems $B\cup C$ and $A\cup B\cup C$ support $ab$-type RT surfaces each. Note that the increasing size of the subsystem $C$ leads accordingly to a larger separation between the $A$ and $B$. This indicates that the Hawking modes present in $B$ which are entangled with those in $A$, eventually transfer to the subsystem $C$ as its size increases. This explains the decreasing profile of the entanglement negativity between the subsystems $A$ and $B$ as exhibited in \cref{fig6}. \\\\ \textbf{Phase-3:} In the last phase, the RT surfaces for the subsystems $A\cup C$ and $C$ are identified as $ab$-type each. The entanglement wedges of the subsystems $A$ and $B$ are observed to be disconnected here which indicates a vanishing entanglement negativity between them. \begin{figure}[H] \centering \includegraphics[width=12cm]{disjointAdomeLs.pdf} \caption{Entanglement negativity between two disjoint subsystems with the variation of size $C$. Here, $r_I=1$, $r_O=2$, $\epsilon=.001$, $\beta=.1$, $c=500$, $t=.15$, $S_{bdyb}=875$, $S_{bdya}=850$ and $r_1=1.15$.}\label{fig6} \end{figure} \subsubsection*{$\bm{(ii)}$ Subsystems $\bm{A}$ and $\bm{C}$ fixed, $\bm{B}$ varied}\label{discasei} In this case, we consider the subsystem sizes of $A=[r_I+\epsilon ,r_1]$ and $C=[r_1,r_2]$ to be fixed and vary the size of $B=[r_2+\epsilon,r]$ by shifting the point $r$. The entanglement negativity between the two disjoint subsystems $A$ and $B$ corresponds to three consecutive phases as shown in \cref{fig5}. In this context, the size of $C$ is considered to be very small such that the dominant contribution to its entanglement entropy arises from dome-type RT surfaces throughout this case. Finally, the expressions for the entanglement negativity in this scenario may be given as \\ \begin{equation}\label{disjointcase1} \mathcal{E}(A:B) = \begin{cases} \frac{c}{2} \log \left[\frac{\sinh \left(\frac{\pi \left(-r_1+r\right)}{\beta }\right) \sinh \left(\frac{\pi \left(-r_2+r_I+\epsilon \right)}{\beta }\right)}{\sinh\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)\sinh\left(\frac{\pi \left(r-r_I-\epsilon \right)}{\beta }\right)}\right]\;, & \text{Phase-1} \vspace{2mm} \\ \frac{c}{4} \log\left[\frac{\beta ^2 r_I \text{sech}\left(\frac{2 \pi t}{\beta }\right) \sinh ^2\left(\frac{\pi \left(-r_1+r\right)}{\beta }\right) \sinh ^2\left(\frac{\pi \left(-r_2+r_I+\epsilon \right)}{\beta }\right)}{2 \pi ^2 \epsilon \, r \, (2 r_I+\epsilon )\sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]-2 S_{\text{bdyb}}\;\;, & \text{Phase-2} \vspace{2mm}\\ \frac{c}{4} \log\left[\frac{\left(r_1^2-r_I^2\right) \sinh ^2\left(\frac{\pi \left(-r_2+r_I+\epsilon \right)}{\beta }\right)}{\epsilon (2 r_I+\epsilon ) \sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]\;. & \text{Phase-3} \end{cases} \end{equation} \noindent \textbf{Phase-1:} In the first phase, we observe that the dominant contributions to the entanglement entropies for the subsystems $A\cup C$, $B\cup C$, $C$ and $A\cup B\cup C$ arise from dome-type RT surfaces. Here the size of the subsystem $C$ is greater than the size of $B$. This corresponds to a vanishingly small entanglement negativity between the subsystems $A$ and $B$ in phase-1 as obtained in \cref{disjointcase1}. \begin{figure}[H] \centering \includegraphics[width=12cm]{disjointAdomeL2.pdf} \caption{The entanglement negativity between two disjoint subsystems $A\,\text{and}\, B$ with a variation in the size of $B$. In this case, we have fixed $r_I=1$, $r_O=2$, $\epsilon=.001$, $\beta=.1$, $c=500$, $t=.15$, $S_{bdyb}=875$, $S_{bdya}=850$, $r_1=1.15$ and $r_2=1.25$.}\label{fig5} \end{figure} \noindent \textbf{Phase-2:} We proceed to the second phase with $b$-bulk type RT surfaces for the subsystem $A\cup B\cup C$ in contrast to the first phase where they were dome-type. However all the other subsystems still support the dome-type RT surfaces. In this phase we observe an increasing behaviour of the entanglement negativity as depicted in \cref{fig5}.\\\\ \textbf{Phase-3:} Finally, we obtain the dominant contributions to the entanglement entropies for the subsystems $B\cup C$ and $A\cup B\cup C$ from $ab$-type RT surfaces. The corresponding entanglement negativity exhibits a constant behaviour in this phase.\\ Note that in the present scenario, we increase only the size of the subsystem $B$ at a constant time slice while fixing the size of $A$ and $C$. This is similar to the adjacent case discussed in sub\cref{adjcaseii} where we have fixed the size of the subsystem $A$ and increased the size of $B$. Hence all the above phases may be described in terms of the Hawking modes using the explanations analogous to the adjacent case. \subsubsection*{$\bm{(iii)}$ Subsystems $\bm{A}$, $\bm{B}$ and $\bm{C}$ fixed, time varied} We end our analysis with the final case where we investigate the nature of the entanglement negativity between the two disjoint subsystems $A$ and $B$ with lengths $l_1$ and $l_2$ respectively while varying the time. Here we consider the size of the subsystem $C$ to be very small such that the dominant contribution to the entanglement entropy arises from dome-type RT surfaces. Note that, the entanglement wedges of the subsystems $A$ and $B$ are connected in this scenario which corresponds to a non-zero entanglement negativity between them. In what follows, we explore two sub cases of equal and unequal lengths of the subsystems $A$ and $B$ while varying the time. \begin{figure}[H]\label{disjointtime1} \centering \includegraphics[width=12cm]{disjointtime1.pdf} \caption{The Page curves for the entanglement negativity for two disjoint subsystems as a function of time. In this case we have chosen $r_I=1$, $r_O=2$, $\epsilon=.001$, $\beta=.1$, $c=500$, $S_{bdyb}=875$, $S_{bdya}=850$ and $A=[r_I+\epsilon ,r_1]$, $B=[r_2 ,r_O-\epsilon]$ with $r_1=1.45$, $r_2=1.55$ (for $l_1 = l_2$) and $A=[r_I+\epsilon ,r_1]$, $B=[r_2 ,r_O-\epsilon]$ with $r_1=1.15$, $r_2=1.25$ (for $l_1\neq l_2$).}\label{fig7} \end{figure} \subsubsection*{(a) For $\bm{l_1=l_2}$}\label{peq1} For the case of two equal length subsystems $A$ and $B$, we examine the qualitative profile of the entanglement negativity between them which corresponds to three different phases as depicted in \cref{fig7}. In this context, we may compute the entanglement negativity by utilizing \cref{NegDis0,holographicentropy} as follows \begin{equation}\label{disjointtime3} \mathcal{E}(A:B) = \begin{cases} \frac{c}{4} \log\left[\frac{4 \pi ^2 r_1 \, r_2 \, \cosh ^2\left(\frac{2 \pi t}{\beta }\right)}{\beta ^2 \sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]\,, & \text{Phase-1}\vspace{2mm}\\ \frac{c}{4} \log\left[\frac{2 \pi ^2 r_2 \left(r_1^2-r_I^2\right)\cosh \left(\frac{2 \pi t}{\beta }\right)}{\beta ^2 r_I \sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right) }\right]+2 S_{\text{bdyb}} \,\,,& \text{Phase-2}\vspace{2mm} \\ \frac{c}{4} \log\left[\frac{\pi ^2 \left(r_1^2-r_I^2\right) \left(r_O^2-r_2^2\right) }{\beta ^2 r_I\,\,r_O\sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]+2 S_{\text{bdyb}}+2 S_{\text{bdya}}\,\,.&\text{Phase-3} \\ \end{cases} \end{equation} \textbf{Phase-1:} In the first phase, we observe three sub phases due to distinct structures of the RT surfaces for the subsystems with increasing time. At initial times, the dominant contributions to the entanglement entropies of $A\cup C$, $B\cup C$ and $A\cup B\cup C$ arise from bulk-type RT surfaces each, whereas the subsystem $C$ admits dome-type RT surfaces. In the second sub phase the RT surfaces supported by the subsystems $B\cup C$ and $A\cup B\cup C$ are $a$-bulk type each, however $A\cup C$ and $C$ still admit bulk and dome-type RT surfaces respectively. Finally in the third sub phase, we observe $b$-bulk, $a$-bulk, dome and $ab$-type RT surfaces for the subsystems $A\cup C$, $B\cup C$, $C$ and $A\cup B\cup C$ respectively. Interestingly, these different sub phases do not correspond to any overall phase transition in the entanglement negativity profile which rises linearly as time increases. This rising character of the entanglement negativity may be explained by the increasing number of Hawking modes captured by the subsystems in question.\\\\ \textbf{Phase-2:} This corresponds to a small phase of the entanglement negativity profile with a growth rate lesser than the first phase. Here the dominant contributions to the entanglement entropies of the subsystems $B\cup C$ and $A\cup B\cup C$ arise from $ab$-type RT surfaces each whereas $A\cup C$ and $C$ support $b$-bulk and dome-type RT surfaces respectively.\\\\ \textbf{Phase-3:} Finally in the third phase the RT surfaces for $A\cup C$, $B\cup C$ and $A\cup B\cup C$ are $ab$-type each while the subsystem $C$ supports dome-type RT surfaces. The corresponding entanglement negativity profile in this phase exhibits a constant behaviour. This behaviour of the entanglement negativity profile may be explained by the saturation of the Hawking modes in the subsystems $A$ and $B$ as time increases. \subsubsection*{(b) For $\bm{l_1\neq l_2}$}\label{pneq1} Finally we consider two disjoint subsystems $A$ and $B$ with unequal lengths while increasing the time and compute the entanglement negativity between them utilizing \cref{NegDis0,holographicentropy}. In this context, we obtain four consecutive phases of the corresponding entanglement negativity profile which may be expressed as follows \begin{equation}\label{disjointtime} \mathcal{E}(A:B) = \begin{cases} \frac{c}{4} \log\left[\frac{4 \pi ^2 r_1 \, r_2 \, \cosh ^2\left(\frac{2 \pi t}{\beta }\right)}{\beta ^2 \sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]\,, & \text{Phase-1}\vspace{2mm}\\ \frac{c}{4}\log\left[\frac{r_O (r_O-\epsilon)\left(-r_I^2+r_1^2\right) \sinh ^2\left(\frac{\pi \left(-r_2+r_I+\epsilon \right)}{\beta }\right)}{r_I \epsilon (r_I+\epsilon ) (2 r_O-\epsilon) \sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]-2 S_{\text{bdya}}+2 S_{\text{bdyb}}\,,&\text{Phase-2} \vspace{2mm}\\ \frac{c}{4}\log\left[\frac{2 r_O (r_O-\epsilon)\left(-r_I^2+r_1^2\right) \sinh ^2\left(\frac{\pi \left(-r_2+r_I+\epsilon \right)}{\beta }\right)\cosh \left(\frac{2 \pi t}{\beta }\right)}{r_I \epsilon^2 (2 r_I+\epsilon ) (2 r_O-\epsilon) \sinh^2\left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]-2 S_{\text{bdya}}\,\,,& \text{Phase-3} \vspace{2mm}\\ \frac{c}{4} \log\left[\frac{\left(r_1^2-r_I^2\right) \sinh ^2\left(\frac{\pi \left(-r_2+r_I+\epsilon \right)}{\beta }\right)}{\epsilon (2 r_I+\epsilon )\sinh^2 \left(\frac{\pi \left(r_1-r_2\right)}{\beta }\right)}\right]\,\,.&\text{Phase-4} \end{cases} \end{equation} \textbf{Phase-1:} In the first phase, the characteristics of the entanglement negativity and the structures of the RT surfaces supported by the subsystems are identical to the first phase of the earlier sub case where the lengths of $A$ and $B$ were considered to be equal.\\\\ \textbf{Phase-2:} In this phase, the dominant contributions to the entanglement entropies for the subsystems $A\cup C$ and $C$ arise from dome-type RT surfaces each, whereas $B\cup C$ and $A\cup B\cup C$ support $b$-bulk and $a$-bulk type RT surfaces respectively. Here the corresponding entanglement negativity between $A$ and $B$ exhibits a constant behaviour which may be observed from \cref{fig7}.\\\\ \textbf{Phase-3:} We proceed to the next phase with a transition in the RT surface of $A\cup B\cup C$ from $a$-bulk to $ab$-type. We observe from \cref{fig7} that the corresponding entanglement negativity rises linearly with a rate smaller than the first phase as time increases. \\\\ \textbf{Phase-4:} Finally in the last phase, the RT surfaces for the subsystem $B\cup C$ are $ab$-type in contrast to the earlier phase where they were $b$-bulk type. However, all the other subsystems still support the RT surfaces similar to the previous phase. We observe the corresponding entanglement negativity to exhibit a constant behaviour which may be explained by the saturation in the corresponding entanglement entropies for all the subsystems. \section{Entanglement measures in model-II}\label{model2} In this section, we consider the second model of two finite sized non-gravitating reservoirs where each of the reservoirs are coupled to two quantum dots at its boundaries \cite{Balasubramanian:2021xcm}. These quantum dots constitute two copies of thermofield double states which are interacting through the common reservoirs. The holographic dual of these quantum dots are Planck branes described by $AdS_2$ geometries. The maximal extension of the Penrose diagram describes two eternal JT black holes\footnote{In this article, we label the two eternal JT black holes together with the two Planck branes as $a$ and $b$.} located on the Planck branes which are coupled to each other through the two copies of the shared reservoirs as depicted in \cref{penrose2}. This configuration also involves identical matter $CFT_2$s with transparent boundary conditions in both the black hole and the reservoir regions \cite{Almheiri:2019yqk,Almheiri:2019hni}. For the above configuration, we investigate the entanglement entropy and the entanglement negativity of various bipartite mixed states in the radiation reservoirs which characterize information transfer between the two eternal JT black holes on the Planck branes. \subsection{Entanglement entropy in the two black hole configuration} In this subsection, we consider two eternal JT black holes at the same temperature and describe the explicit computation for the generalized entanglement entropy for a subsystem $A$ consisting of the union of two identical line segments in the two copies of the reservoirs. Note that in this context the authors of \cite{Balasubramanian:2021xcm} have computed the generalized entanglement entropy for the same configuration with the eternal JT black holes at different temperatures. However the corresponding profiles of the generalized entanglement entropy with respect to the time for the configuration in question was provided for the case where the two black holes were at the same temperature. Here we complement their generalized entanglement entropy profiles for the two black holes at the same temperature with explicit holographic computations. For this configuration, the metrics referring to the exterior regions of the two eternal JT black holes may be written as \begin{eqnarray} ds_1^2 &=& \frac{4\pi^2}{\beta^2} \frac{-dt^2+d\xi^2}{\sinh^2 \frac{2\pi \xi}{\beta}} , \quad \xi \in \left(-\infty, - \epsilon\right]\,, \label{MetricPhysL1b1}\\ ds_2^2 &=& \frac{4\pi^2}{\beta^2} \frac{-dt^2+d\xi^2}{\sinh^2 \frac{2\pi }{\beta}(\xi - L)},\quad \xi \in \left[L + \epsilon, +\infty\right) \label{MetricPhysL2b2}\,, \end{eqnarray} where $L$ is the length of each radiation reservoir with a metric defined by \begin{equation}\label{MetricBath} ds_{R}^2 = \frac{-d t^2 + d\xi^2}{\epsilon^2}\,, \quad \xi \in \left[- \epsilon, L+\epsilon\right]\, \end{equation} where the reservoir is glued continuously to the surfaces $\xi=-\epsilon$ and $L+\epsilon$. The dilaton profiles for the two eternal JT black holes on the Planck branes are then given as follows \begin{eqnarray}\label{dilaton2BH} \phi_{a}(\xi) &=& \frac{2\pi\phi_r}{\beta} \coth \frac{2\pi \xi}{\beta}\,, \label{dilaton-BH-1-b1r}\\ \phi_{b}(\xi) &=& \frac{2\pi\phi_r}{\beta} \coth \frac{2\pi}{\beta}\left(\xi-L\right). \end{eqnarray} We now compute the generalized entanglement entropy for the subsystem described by the union of two identical segments $A=[p_1,p_2]\cup[p_3,p_4]$ in the radiation regions of the two TFD copies. The end points of the two corresponding segments in the ($\xi, t$) coordinates are specified as follows \cite{Balasubramanian:2021xcm} \begin{equation} p_1 = (v, -t+i\frac{\beta}{2}), \quad p_2 = (u, -t+i\frac{\beta}{2}), \quad p_3 = (u, t), \quad p_4 = (v, t)\,. \end{equation} In this case there are seven possible contributions to the corresponding entanglement entropy due to the different structures of the RT surfaces supported by the subsystems mentioned above. In what follows, we describe these distinct contributions in detail. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{penrose2bh.pdf} \caption{} \label{a} \end{subfigure} \hspace{.5cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{penrose_eq.pdf} \caption{} \label{b} \end{subfigure} \caption{(a) The maximal extension of the Penrose diagram for two $AdS_2$ eternal black holes. A subsystem given by the union of two segments is considered in the radiation reservoirs (shaded regions) with end points $p_1$, $p_2$, $p_3$, $p_4$. Note that the left and the right most black lines are identified in this diagram. (b) A constant time slice of the $AdS_2$ eternal black holes where the Planck branes are denoted by the wigly lines and the black hole intereiors are shown by the dotted lines. (Figures modified from \cite{Balasubramanian:2021xcm,Geng:2021hlu})}\label{penrose2} \end{figure} $\bm{(a)}$ We first discuss the configuration which is completely connected and does not include any island region in the gravity sector. The end points of the two segments of the subsystem $A$ are connected to each other $p_1 \leftrightarrow p_4$ and $p_2 \leftrightarrow p_3$ by two geodesics in the 3-dimensional bulk as depicted in \cref{RTa}. We term these geodesics as bulk-type RT surfaces. The expression for the corresponding generalized entanglement entropy may be obtained utilizing \cref{IsformEE} as follows \begin{eqnarray}\label{Sbulk} \mathcal{S}_{A}^{\text{bulk}} = 2\frac{c}{3} \log \left[\frac{\beta }{\pi } \cosh\frac{2\pi t}{\beta }\right]. \end{eqnarray} $\bm{(b)}$ The second configuration also corresponds to a fully connected one which includes island regions from both the JT black holes. We may obtain the generalized entanglement entropy for the subsystem $A$ following a procedure analogous to the single black hole case as discussed in sub\cref{1boundary}. However for this configuration, the computation involves an extremization of \cref{IsformEE} over two island regions located on the $a$ and the $b$-black holes. The subsystem $A$ in this context admits RT surfaces which start from $\partial A$ and intersect the exterior regions of both the black holes. We call these RT surfaces $ab$-type which are depicted in \cref{RTb}. The corresponding generalized entanglement entropy for the subsystem $A$ may then be expressed as \begin{eqnarray}\label{S-ab} \mathcal{S}_{A}^{ab} &=& 4 \phi_0 + \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right) + \frac{c}{3} \log \left[ \frac{\beta}{\pi} \; \frac{\cosh \left(\frac{4 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right)} \right]\nonumber\\ &+& \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi}{\beta } (L-v) + \log \frac{24 \pi \phi }{c \beta }\right) + \frac{c}{3} \log \left[ \frac{\beta}{\pi}\; \frac{\cosh \left(\frac{4 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)-1}{ \sinh \left( \frac{2 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)} \right].\nonumber\\ && \end{eqnarray} $\bm{(c)}$ We now discuss a disconnected configuration which does not include any island region as shown in \cref{RTc}. Here the entanglement entropy for the subsystem $A$ may be obtained from the geodesics which are homologous to each of the segments in the two TFD copies separately. We term these geodesics as dome-type RT surfaces. The corresponding generalized entanglement entropy for this configuration is given by the following expression \begin{eqnarray}\label{S-dome} \mathcal{S}_{A}^{\text{dome}} = 2 \frac{c}{3} \log \left( \frac{\beta }{\pi } \sinh \frac{\pi }{\beta } |u-v| \right). \end{eqnarray} $\bm{(d)}$ This configuration includes an island region in the $a$-black hole corresponding to two geodesics which start from the end points $p_2$, $p_3$ of each of the segments and intersect the two exterior regions of the $a$-black hole. However, the other end points of the subsystem $A$ are connected to each other $ p_4 \leftrightarrow p_1 $ by another geodesic. In this connected configuration, we term the corresponding geodesics as $a$-bulk type RT surfaces which are depicted in \cref{RTd}. The expression for the generalized entanglement entropy for the subsystem $A$ may be computed using \cref{IsformEE} as follows \begin{eqnarray}\label{S-abulk} \mathcal{S}_{A}^{a\text{-bulk}} &=& 4 \phi_0 + \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right)\nonumber\\ &+& \frac{c}{3} \log \left[ \frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta }\right) -1}{ \sinh \left(\frac{2 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right)} \right] + \frac{c}{3} \log \left[\frac{\beta }{\pi } \cosh\frac{2\pi t}{\beta }\right]. \end{eqnarray} $\bm{(e)}$ Similar to the previous case, we now discuss another connected configuration which admits an island region in the $b$-black hole geometry only. The geodesics in this case start from the end points $p_1$, $p_4$ of the two segments and intersect the two exterior regions of the $b$-black hole. However another geodesic connects the other end points $p_2$, $p_3$ of the subsystem $A$. In contrast to the previous case, these geodesics are termed as $b$-bulk type RT surfaces (\cref{RTe}). The corresponding generalized entanglement entropy for the subsystem $A$ in this case may be obtained utilizing \cref{IsformEE} as follows \begin{eqnarray}\label{S-bbulk} \mathcal{S}_{A}^{b\text{-bulk}} &=& 4 \phi_0 + \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi}{\beta } (L-v) + \log \frac{24 \pi \phi }{c \beta }\right)\nonumber\\ &+& \frac{c}{3} \log \left[ \frac{\beta}{\pi}\; \frac{\cosh \left(\frac{4 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)-1}{ \sinh \left( \frac{2 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)} \right] + \frac{c}{3} \log\left[ \frac{\beta }{\pi } \cosh\frac{2\pi t}{\beta }\right]. \end{eqnarray} $\bm{(f)}$ Another disconnected configuration includes two island regions in the gravity sector where the corresponding geodesics, which are termed as $aa$-type RT surfaces, start from $\partial A$ and intersect the two exterior regions of the $a$-black hole (\cref{RTf}). The generalized entanglement entropy for this disconnected configuration is computed by extremizing \cref{IsformEE} over the two island regions and is given as \begin{eqnarray}\label{S-aa} \mathcal{S}_{A}^{aa} &=& 4 \phi_0 + \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right) + \frac{c}{3} \log \left[\frac{\beta}{\pi}\; \frac{\cosh \left(\frac{4 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta }-1\right)}{ \sinh \left(\frac{2 \pi }{\beta } u + \log \frac{24 \pi \phi }{c \beta } \right)} \right]\nonumber\\ &+& \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi }{\beta } v + \log \frac{24 \pi \phi }{c \beta } \right) +\frac{c}{3} \log \left[ \frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi }{\beta } v + \log \frac{24 \pi \phi }{c \beta }-1\right)}{ \sinh \left(\frac{2 \pi }{\beta } v + \log \frac{24 \pi \phi }{c \beta } \right)} \right]. \end{eqnarray} $\bm{(g)}$ Finally we consider the last configuration which is similar to the preceding one but with the island regions in the $b$-black hole geometry as shown in \cref{RTg}. In this disconnected configuration, the RT surfaces supported by the subsystem $A$ are termed $bb$-type. Once again, the corresponding generalized entanglement entropy may be obtained utilizing \cref{IsformEE} as follows \begin{align}\label{S-bb} \mathcal{S}_{A}^{bb} =& \,4 \phi_0 + \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi}{\beta } (L-v) + \log \frac{24 \pi \phi }{c \beta }\right)\nonumber\\ +&\frac{c}{3} \log \left[\frac{\beta}{\pi}\; \frac{\cosh \left(\frac{4 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)-1}{ \sinh \left( \frac{2 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)} \right]\nonumber\\ +& \frac{4 \pi \phi_r }{\beta } \coth \left(\frac{2 \pi}{\beta } (L-u) + \log \frac{24 \pi \phi }{c \beta }\right) + \frac{c}{3} \log \left[ \frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta } (L-u)+ \log \frac{24 \pi \phi }{c \beta }\right)-1}{ \sinh \left( \frac{2 \pi}{\beta } (L-v)+ \log \frac{24 \pi \phi }{c \beta }\right)} \right].\nonumber\\ & \end{align} The generalized entanglement entropy for the subsystem $A$ in the radiation reservoirs may now be determined from the minimum of all the above possible contributions as follows \begin{equation}\label{HEE-Shaghoulian} S_A=\text{min}\left(\mathcal{S}_{A}^{\text{bulk}},\mathcal{S}_{A}^{ab},\mathcal{S}_{A}^{\text{dome}},\mathcal{S}_{A}^{a\text{-bulk}},\mathcal{S}_{A}^{b\text{-bulk}},\mathcal{S}_{A}^{aa},\mathcal{S}_{A}^{bb}\right)\,. \end{equation} \begin{figure}[H] \centering \vspace{1.2cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTa.pdf} \caption{} \label{RTa} \end{subfigure} \hspace{.1cm} \vspace{.6cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTb.pdf} \caption{} \label{RTb} \end{subfigure} \hspace{.1cm} \vspace{1.5cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTc.pdf} \caption{} \label{RTc} \end{subfigure} \hspace{.1cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTd.pdf} \caption{} \label{RTd} \end{subfigure} \hspace{.1cm} \vspace{1.8cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTe.pdf} \caption{} \label{RTe} \end{subfigure} \hspace{.1cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTf.pdf} \caption{} \label{RTf} \end{subfigure} \hspace{.1cm} \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{RTg.pdf} \caption{} \label{RTg} \end{subfigure} \caption{The schematic depicts the possibile contributions to the entanglement entropy arising from different RT surfaces (green curves) supported by the subsystem $A$ in the radiation reservoirs. The subsystem $A$ is shown as a union of two segments (blue lines) in the two radiation reservoirs (shaded grey regions) and island regions are indicated by the red segments. (Figure modified from \cite{Balasubramanian:2021xcm})} \label{2BHshag} \end{figure} In what follows we plot the generalized entanglement entropies for the subsystem $A$ with respect to the time and its size for all the above possible configurations obtained from the respective structures of the corresponding RT surfaces. \begin{figure}[H] \centering \includegraphics[width=12cm]{Entropy_t.pdf} \caption{Entanglement entropies corresponding to the different RT surfaces w.r.t time. Here we have chosen $\beta=1$, $c=500$, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.02L,.78L]$ and time $t$ is varied from [0,\,30].}\label{Entropy_t} \end{figure} In \cref{Entropy_t}, we plot the generalized entanglement entropy for the finite sized subsystem $A$ in the radiation reservoirs as a function of time which reproduces the results obtained in the article \cite{Balasubramanian:2021xcm}. Here we observe three consecutive phase in the corresponding entanglement entropy profile $S_A$. At initial times, the dominant contribution to the entanglement entropy for the subsystem $A$ arises from bulk-type RT surfaces. In the second phase, we observe an increasing behaviour in the corresponding entanglement entropy profile with a growth rate smaller than the previous phase and the subsystem $A$ supports $a$-bulk type RT surfaces. At late times, the entanglement entropy for the subsystem $A$ exhibits a saturation due to the dominant contribution from $ab$-type RT surfaces. The profile of the entanglement entropy as depicted in \cref{Entropy_t} demonstrates a unitary time evolution where the monotonically increasing behaviour is restricted at the Page time. \begin{figure}[H] \centering \includegraphics[width=12cm]{Entropy_r.pdf} \caption{Entanglement entropies corresponding to different RT surfaces w.r.t the size of the subsystem $A$. Here we have chosen $\beta=1$, $c=500$, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $t=17$ and the size of $A$ is varied from $[.1L,.99L]$}\label{Entropy_r} \end{figure} We then study another interesting behaviour of the generalized entanglement entropy for the subsystem $A$ with respect to its size as exhibited in \cref{Entropy_r}. This is in contrast to the article \cite{Balasubramanian:2021xcm} where the authors analyzed the generalized entanglement entropy for a finite sized subsystem with respect to the time only. Once again we observe three consecutive phases for the corresponding generalized entanglement entropy $S_A$. The first phase corresponds to dome-type RT surfaces as a dominant contribution to the entanglement entropy which increases linearly. However in the second phase, the corresponding entanglement entropy saturates due to the dominant contribution from $a$-bulk type RT surfaces. In the last phase, we observe a decreasing behaviour in the entanglement entropy profile where the subsystem $A$ supports $ab$-type RT surfaces. \subsection{Holographic entanglement negativity and Page curve} In the following subsections, we compute the holographic entanglement negativity for various bipartite mixed states in the non-gravitating radiation reservoirs in the context of the second model utilizing the equations described in the \cref{NegAdj1,NegDis0,HEE-Shaghoulian}. Furthermore we analyze the behaviour of the entanglement negativity profiles with respect to the subsystem sizes and the time. Note that in these subsections the behaviour of the various entanglement negativity profiles may be interpreted in terms of the entanglement negativity islands for the subsystems under consideration as described in \cite{KumarBasak:2020ams,KumarBasak:2021rrx}. The corresponding entanglement negativity including the island contribution for the mixed state configuration of two generic adjacent subsystems $A$ and $B$ is obtained as follows\footnote{In the present model, we do not utilize \cref{Ryu-FlamIslandgen} to compute the entanglement negativity between the subsystem $A$ and $B$.} \begin{align} &{\cal E}^{gen}(A:B)=\frac{{\cal A}^{(1/2)}\left(Q^{\prime \prime}=\partial I_{\varepsilon}(A) \cap \partial I_{\varepsilon}(B)\right)}{4 G_{N}}+{\cal E}^{\mathrm{ eff}}\left(A\cup I_{\varepsilon}(A) :B\cup I_{\varepsilon}(B) \right)\notag\\ &{\cal E}(A:B) =\mathrm{min}(\mathrm{ext}_{Q^{\prime \prime}}\{ {\cal E}^{gen}(A:B)\}), \label{Ryu-FlamIslandgen} \end{align} \noindent where, $Q^{\prime \prime}$ is the quantum extremal surface (QES) which is given by the intersection of the individual negativity islands $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ for the subsystems $A$ and $B$ as described in \cref{QES}, \begin{equation} Q^{\prime \prime}=\partial I_{\varepsilon}(A) \cap \partial I_{\varepsilon}(B). \end{equation} The second term ${\cal E}^{\mathrm{ eff}}$ in the above \cref{Ryu-FlamIslandgen} corresponds to the effective entanglement negativity between the quantum matter fields located in the regions $A\cup I_{\varepsilon}(A)$ and $B\cup I_{\varepsilon}(B)$. The entanglement negativity islands $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ obey the condition $I_{\varepsilon}(A)\cup I_{\varepsilon}(B)= Is(A\cup B)$, where $Is(A\cup B)$ is the entanglement entropy island for the subsystem $A\cup B$. In general, the islands for the entanglement negativity $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ do not correspond to the entanglement entropy islands $Is(A)$ and $Is(B)$ for the subsystems $A$ and $B$ respectively. \begin{figure}[H] \centering \includegraphics[scale=.7]{QES.pdf} \caption{Schematic describes the appearance of the entanglement negativity island on the Planck brane for the case of two adjacent subsystems.} \label{QES} \end{figure} \subsubsection{Adjacent subsystems}\label{Adj} We start with two adjacent subsystems $A$ and $B$ of finite lengths $l_1$ and $l_2$ respectively in the radiation reservoirs and compute the holographic entanglement negativity between them using the \cref{NegAdj1,HEE-Shaghoulian}. In particular, we investigate the qualitative nature of the entanglement negativity profiles for three distinct scenarios involving the subsystem sizes and the time. In this context we utilize the structures of the various RT surfaces supported by the subsystems in question described earlier in the diagrams \cref{2BHshag}. \subsubsection*{$\bm{(i)}$ Full system ($A\cup B$) fixed, common point varied}\label{adjcase1} We first consider the case where the common point between the adjacent subsystems $A$ and $B$ is varied at a constant time slice while keeping the subsystem $A\cup B$ fixed which covers the entire reservoirs. In this scenario, we compute the holographic entanglement negativity between the subsystems $A$ and $B$ utilizing the \cref{NegAdj1,HEE-Shaghoulian}. We observe that our results in this context reproduces the analogue of the Page curve for the entanglement negativity as depicted in \cref{fig:Adjcase1}. In this scenario, the entanglement negativity profile consists of five phases due to the various structures of the RT surfaces supported by the subsystems under consideration. The expressions for the corresponding entanglement negativity in these phases are listed in the appendix \ref{Appendix1}. In what follows, we discuss these distinct phases of the entanglement negativity profile in details. \begin{figure}[H] \centering \includegraphics[scale=.5]{Adj_case1.pdf} \caption{Page curve for the entanglement negativity. Here $\beta=1$, $t=15$, $c=500$, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A\cup B=[.01L,.99L]$} \label{fig:Adjcase1} \end{figure} \noindent \textbf{Phase 1:} In the first phase, the dominating contribution to the entanglement entropy for the subsystem $A$ arises from dome-type RT surfaces, whereas the subsystems $B$ and $A\cup B$ support $ab$-type RT surfaces each as depicted in \cref{Adjcase1}. Interestingly, here the size of the subsystem $A$ is very small compared to the size of $B$ such that this phase does not admit any island region corresponding to the subsystem $A$. However, this phase involves entanglement entropy islands corresponding to the subsystem $B$ and $A\cup B$ which are located on both the Planck branes. In this case the entanglement negativity between the subsystems $A$ and $B$ is governed by the degrees of freedom of the subsystem $A$. Note that as we shift the common point, the number of Hawking modes captured by the subsystem $A$ and its $CFT_2$-degrees of freedom increase accordingly. Hence we observe a linearly rising behaviour in the corresponding entanglement negativity profile with the increasing size of the subsystem $A$ as exhibited in \cref{fig:Adjcase1}.\\\\ \textbf{Phase 2:} Next we proceed to the second phase where the subsystems $A$ and $A\cup B$ still support dome and $ab$-type RT surfaces respectively, whereas the subsystem $B$ now admits $b$-bulk type RT surfaces as shown in \cref{Adjcase1}. Consequently, this phase includes an entanglement negativity island $I_{\varepsilon}(A)$ corresponding to the subsystem $A$ which is located on the $a$-brane. This negativity island contains the entire interior region of the $a$-black hole. Note that in this phase, the entanglement negativity between the subsystems $A$ and $B$ is governed by the degrees of freedom present in the region $A\cup I_{\varepsilon}(A)$. This is determined by the number of interior Hawking modes captured by the negativity island $I_{\varepsilon}(A)$ whose corresponding pairs are located in $(A\cup I_{\varepsilon}(A))^c$ and by the $CFT_2$-degrees of freedom present in $A\cup I_{\varepsilon}(A)$. In this case, as we increase the size of the subsystem $A$, the number of interior Hawking modes of $A\cup I_{\varepsilon}(A)$ decreases due to a purification by their corresponding pairs from the exterior region which are now transferred to the region $A\cup I_{\varepsilon}(A)$. However, the number of Hawking modes coming from the $b$-black hole simultaneously increases in the region $A\cup I_{\varepsilon}(A)$ with its increasing size which tends to cancel the preceding decreasing effect. Consequently, the degrees of freedom of the region $A\cup I_{\varepsilon}(A)$ are now determined only by the $CFT_2$-degrees of freedom which increases linearly with the shift of the common point between the adjacent subsystems. As a result, we observe a linearly rising behaviour in the corresponding entanglement negativity profile with a growth rate smaller than the previous phase. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case1a.pdf} \caption{Phase-1} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case1b.pdf} \caption{Phase-2} \label{} \end{subfigure} \vspace{.4cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case1c.pdf} \caption{Phase-3} \label{} \end{subfigure} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case1d.pdf} \caption{Phase-4} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case1e.pdf} \caption{Phase-5} \label{} \end{subfigure} \caption{Schematic depicts all the phases of the entanglement negativity for two adjacent subsystems where the common point between them is varied. The RT surfaces supported by the adjacent subsystems are denoted by the green geodesics. Note that these geodesics corresponding to the subsystems indicate the locations of the island regions on the Planck branes.} \label{Adjcase1} \end{figure} \noindent \textbf{Phase 3:} In the third phase (\cref{Adjcase1}), the RT surfaces supported by the subsystems $A$, $B$ and $A\cup B$ are $a$-$bulk$, $b$-$bulk$ and $ab$-type respectively. Here the size of the subsystem $A$ is comparable to the size of $B$ such that they are maximally entangled. This is a characteristic of tripartite entanglement where the tripartition is defined by the subsystems $A$, $B$ and $(A\cup B)^c$. Hence in this phase, the degrees of freedom present in the subsystems $A$ and $B$ are entangled with the degrees of freedom of the subsystem $(A\cup B)^c$ as the common point is shifted. Therefore this corresponds to a constant behaviour of the entanglement negativity profile as depicted in \cref{fig:Adjcase1}.\\\\ \textbf{Phase 4 and Phase 5:} As depicted in \cref{Adjcase1}, the RT surfaces for the subsystems $A$ and $B$ in these two phases are interchanged with each other as compared to the first two phases. Hence, the corresponding entanglement negativity profile may be interpreted in a similar fashion as for the first two phases with the roles of the subsystems $A$ and $B$ exchanged.\\ We may further extend our analysis of the tripartite entanglement by considering different times and various sizes of the subsystem $(A\cup B)^c$. At a fixed time, we observe that the height of the plateau region of the corresponding entanglement negativity profile decreases with the increase in the size of the subsystem $(A\cup B)^c$ as exhibited in \cref{fig:Adjcase1plateau}. This behavior is consistent since the available degrees of freedom in the subsystems $A$ and $B$ entangled between themselves, decreases with the increasing size of $(A\cup B)^c$. On the other hand for a fixed size of the subsystem $(A\cup B)^c$ the height of the plateau region rises with increasing time. Once again this is consistent since the number of Hawking modes in all the subsystems rise with increasing time which corresponds to a larger entanglement between the subsystems. In addition, with smaller size of the subsystem $(A\cup B)^c$, the height of the plateau region changes rapidly with a small change in time. However for larger size of $(A\cup B)^c$, we need to increase the time sufficiently such that it changes the height of the plateau region. This character of the entanglement negativity profile is again consistent since the subsystem $(A\cup B)^c$ can accommodate a fewer number of Hawking modes when its size is very small whereas a large number of Hawking modes can be accumulated in the subsystems $A$ and $B$ due to their larger sizes. Consequently as time increases, most of the newly created Hawking modes are collected by the subsystems $A$ and $B$ and thus increase the height of the Plateau region rapidly. However, for a larger size of the subsystem $(A\cup B)^c$, the accommodation for the Hawking modes is larger such that it may now capture more newly created Hawking modes with increasing time and as a result the height of the plateau region changes very slowly as time increases (\cref{fig:Adjcase1plateau}). \begin{figure}[H] \centering \includegraphics[scale=.7]{adj_case_1_plateau.pdf} \caption{Page curves for entanglement negativity for different sizes of $(A\cup B)^c$ and different times.} \label{fig:Adjcase1plateau} \end{figure} \subsubsection*{$\bm{(ii)}$ Subsystem $\bm{A}$ fixed, $\bm{B}$ varied}\label{adjcase2} In this scenario, we consider the length $l_1$ of the subsystem $A$ to be fixed at a constant time slice and investigate the behaviour of the holographic entanglement negativity while increasing the length $l_2$ of the subsystem $B$. The corresponding entanglement negativity profile is depicted in \cref{fig:Adjcase2} which consists of four distinct phases due to the various structures of the RT surfaces supported by the subsystems in question. The expressions for the holographic entanglement negativity between $A$ and $B$ in these phases, obtained through the \cref{NegAdj1,HEE-Shaghoulian}, are listed in the appendix \ref{Appendix2}. In what follows we now analyze these phases in detail. \begin{figure}[H] \centering \includegraphics[scale=.5]{Adj_case2.pdf} \caption{Profile of the entanglement negativity with respect to the size of $B$. Here $\beta=1$, $t=20$, $c=500$, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.01L,.15L]$. } \label{fig:Adjcase2} \end{figure} \noindent \textbf{Phase 1:} We begin with the first phase where the RT surfaces for the subsystems $A$, $B$ and $A\cup B$ are $dome$-type each (\cref{Adjcase2}). Here the size of the subsystems $A$ and $B$ are very small and hence $A\cup B$ is far smaller than its complement $(A \cup B)^c$ which implies a vanishingly small entanglement negativity between the adjacent subsystems in question.\\\\ \textbf{Phase 2:} In the second phase, the subsystems $A$ and $B$ still support dome-type RT surfaces whereas the subsystem $A\cup B$ admits $a$-bulk type RT surfaces. Consequently, this phase includes entanglement negativity islands $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ on the $a$-brane corresponding to the subsystems $A$ and $B$ respectively. The exterior regions of the $a$-black hole constitutes the island $I_{\varepsilon}(A)$ on the $a$-brane, whereas $I_{\varepsilon}(B)$ involves the entire interior region of the $a$-black hole. In this context, the ratio of $l_1$ to $l_2$ decreases with increasing length $l_2$ of the subsystem $B$ and consequently the ratio of the size of $I_{\varepsilon}(A)$ to the size of $I_{\varepsilon}(B)$ decreases accordingly. Note that in this phase the entanglement negativity between the subsystems $A$ and $B$ is governed by the degrees of freedom of $B \cup I_{\varepsilon}(B)$. Now as we increase $l_2$, the number of interior Hawking modes captured by the negativity island $I_{\varepsilon}(B)$ decreases due to a purification by their exterior partners which are located in the region $(B\cup I_{\varepsilon}(B))^c$. This purification arises since the exterior partners are transferred to the region $B\cup I_{\varepsilon}(B)$ as the length $l_2$ of the subsystem $B$ increases. However, an equal number of Hawking modes from the $b$-black hole are transferred to the region $B\cup I_{\varepsilon}(B)$ simultaneously. Consequently, the degrees of freedom in the region $B\cup I_{\varepsilon}(B)$ are determined only by the $CFT_2$-degrees of freedom which increase with the increasing size of the subsystem $B$. Accordingly, the corresponding entanglement negativity profile rises linearly as depicted in \cref{fig:Adjcase2}.\\\\ \textbf{Phase 3:} In this phase, the dominant contributions to the entanglement entropies of the subsystems $A$ and $B$ still arise from $dome$-type RT surfaces, whereas the subsystem $A\cup B$ now supports $ab$-type RT surfaces. Hence this phase admits an entanglement negativity island $I_{\varepsilon}(B)$ located on both the branes corresponding to the subsystem $B$ as shown in \cref{Adjcase2}. This negativity island $I_{\varepsilon}(B)$ contains the entire interior regions of both the black holes. Furthermore this phase also includes an entanglement negativity island $I_{\varepsilon}(A)$ corresponding to the subsystem $A$ (\cref{Adjcase2}), which involves only the exterior regions of the $a$-black hole. In this scenario, the entanglement negativity between the subsystems $A$ and $B$ is governed by the degrees of freedom of the region $A\cup I_{\varepsilon}(A)$. Interestingly, with increasing length $l_2$ of the subsystem $B$, the island region $I_{\varepsilon}(A)$ increases in size. Consequently, the number of Hawking modes and the $CFT_2$-degrees of freedom present in $A\cup I_{\varepsilon}(A)$ increase with the increasing length $l_2$ of the subsystem $B$. Hence we observe the corresponding entanglement negativity profile to rise linearly with a growth rate higher than the previous phase. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case2a.pdf} \caption{Phase-1} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case2b.pdf} \caption{Phase-2} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case2c.pdf} \caption{Phase-3} \label{} \end{subfigure} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case2d.pdf} \caption{Phase-4} \label{} \end{subfigure} \caption{The diagram shows the possible phases of the entanglement negativity profile for the case of two adjacent subsystems where the size of the subsystem $B$ is varied.} \label{Adjcase2} \end{figure} \noindent \textbf{Phase 4:} Finally in the last phase, the RT surfaces for the subsystems $B$ and $A\cup B$ are identified as $ab$-type each, however the subsystem $A$ still supports $dome$-type RT surfaces as depicted in \cref{Adjcase2}. Hence, this phase includes entanglement entropy islands for the subsystems $B$ and $A\cup B$, located on both of the Planck branes. Consequently, we have an entanglement negativity island $I_{\varepsilon}(A)$ corresponding to the subsystem $A$, which involves the exterior regions of the $a$-black hole. Once again the entanglement negativity in this phase is governed by the degrees of freedom of the region $A\cup I_{\varepsilon}(A)$. As we increase the length $l_2$, the size of the negativity island $I_{\varepsilon}(A)$ remains fixed which indicates that the number of the degrees of freedom in the region $A\cup I_{\varepsilon}(A)$is constant. Consequently, the corresponding entanglement negativity between the subsystems $A$ and $B$ exhibits a constant behaviour as shown in \cref{fig:Adjcase2}. \subsubsection*{$\bm{(iii)}$ Subsystems $\bm{A}$ and $\bm{B}$ fixed, time varied}\label{adjcase3} We conclude our analysis with the case where the lengths $l_1$ and $l_2$ of the two adjacent subsystems $A$ and $B$ respectively are fixed and the time $t$ is varied. In this context, we consider two sub cases with equal and unequal lengths of the subsystems $A$ and $B$ and obtain the corresponding holographic entanglement negativity between them utilizing the \cref{NegAdj1,HEE-Shaghoulian}. Since the subsystem sizes are fixed in this scenario, the $CFT_2$-degrees of freedom for the subsystems are also fixed and hence irrelevant for the description of the various phases of the entanglement negativity profiles. The only effect on the profiles arise from the Hawking modes arriving from both the black holes to the subsystems and this is utilized to analyze the corresponding entanglement negativity profiles depicted in \cref{fig:Adjcase3}. \begin{figure}[H] \centering \includegraphics[scale=.5]{Adj_case3.pdf} \caption{Page curves for entanglement negativity with respect to time $t$. Here $\beta=1$, $c=500$, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.01L,.5L]$ and $B=[.5L,.99L]$ (for $l_1=l_2$), $A=[.01L,.35L]$ and $B=[.35L,.99L]$ (for $l_1\neq l_2$).} \label{fig:Adjcase3} \end{figure} \subsubsection*{(a) For $\bm{l_1=l_2}$}\label{p=1} For the case of two equal lengths subsystems $A$ and $B$, we observe that the Page curve for the entanglement negativity consists of two phases as depicted in \cref{fig:Adjcase3}. The expressions for the holographic entanglement negativity in the corresponding phases are listed in the appendix \ref{Appendix3a}. In what follows, we comprehensively analyze these phases. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Peq1a.pdf} \caption{Phase-1(a)} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Peq1b.pdf} \caption{Phase-1(b)} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Peq1c.pdf} \caption{Phase-2} \label{} \end{subfigure} \caption{Schematic depicts all the possible phases of the entanglement negativity between two adjacent subsystems with equal sizes as time increases.} \label{Adjcase3} \end{figure} \noindent \textbf{Phase 1:} This phase contains two intermediate sub phases due to the various structures of the RT surfaces supported by the subsystems in question. At early times, the subsystems $A$, $B$ and $A\cup B$ support bulk-type RT surfaces each (\cref{Adjcase3}). This sub phase does not include any island regions corresponding to the subsystems mentioned above. The number of Hawking modes from both the black holes accumulating in the two subsystems increases linearly with increasing time. Hence, the corresponding entanglement negativity profile rises linearly as time increases. We proceed to the second sub phase where the dominant contributions to the entanglement entropies of the subsystems $A$, $B$ and $A\cup B$ arise from $a$-$bulk$, $b$-$bulk$ and $ab$-type RT surfaces respectively. Hence this sub phase includes entanglement negativity islands $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ corresponding to the subsystems $A$ and $B$ respectively as shown in \cref{Adjcase3}. Here the island $I_{\varepsilon}(A)$ contains the entire interior region of the $a$-black hole whereas the other island $I_{\varepsilon}(B)$ includes the entire interior region of the $b$-black hole. In this case, the entanglement negativity between the subsystems is governed by the degrees of freedom in the region $A\cup I_{\varepsilon}(A)$ or $B\cup I_{\varepsilon}(B)$. Note that the degrees of freedom in the region $A\cup I_{\varepsilon}(A)$ are determined by the interior Hawking modes captured by the negativity island $I_{\varepsilon}(A)$ whose exterior partners are located in $(A\cup I_{\varepsilon}(A))^c$ and by the Hawking modes arriving from the $b$-black hole. These degrees of freedom increase with time which confirms the linear rise of the corresponding Page curve as depicted in \cref{fig:Adjcase3}. The description for the second sub phase from the perspective of the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$ is analogous to the arguments mentioned above which again justifies the linear rising behaviour of the corresponding Page curve.\\\\ \textbf{Phase 2:} In the second phase, the subsystems $A$ and $B$ support $dome$-type RT surfaces each whereas the subsystem $A\cup B$ still admits $ab$-type RT surfaces (\cref{Adjcase3}). This phase includes an entanglement entropy island for the subsystem $A\cup B$ and hence we have entanglement negativity islands $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ corresponding to the subsystems $A$ and $B$ respectively. Here each of the negativity islands $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ contains the entire interior regions of both the black holes. Hence this phase corresponds to an overlap between the negativity island regions $I_{\varepsilon}(A)$ and $I_{\varepsilon}(B)$ as shown in \cref{Adjcase3}. This is an extremely interesting and novel scenario which has not been reported in earlier literatures on the island constructions\footnote{Although the island regions are overlapping, it does not correspond to common degrees of freedom of the regions $A\cup I_{\varepsilon}(A)$ and $B\cup I_{\varepsilon}(B)$ thus implying the consistency of the monogamy property of quantum entanglement. This can be understood since the exterior partners of the interior Hawking modes of both the regions $A\cup I_{\varepsilon}(A)$ and $B\cup I_{\varepsilon}(B)$ are distinct and located in the regions $(A\cup I_{\varepsilon}(A))^c$ and $(B\cup I_{\varepsilon}(B))^c$ respectively.}. Once again in this phase, the entanglement negativity between the subsystems is governed by the degrees of freedom of the region $A\cup I_{\varepsilon}(A)$ or $B\cup I_{\varepsilon}(B)$. Note that the degrees of freedom of the region $A\cup I_{\varepsilon}(A)$ are determined by the interior Hawking modes captured by the negativity island $I_{\varepsilon}(A)$ whose exterior partners are located in $(A\cup I_{\varepsilon}(A))^c$. At late times, the number of ingoing and outgoing Hawking modes in the region $A\cup I_{\varepsilon}(A)$ become equal such that its degrees of freedom remains constant throughout this phase. Consequently, the Page curve for the entanglement negativity exhibits a constant behaviour as depicted in \cref{fig:Adjcase3}. Once again, the description for this phase from the perspective of the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$ is analogous to the arguments mentioned above which again justifies the constant behaviour of the corresponding Page curve. Note that in this phase, other candidates for the entanglement negativity islands corresponding to the subsystems $A$ and $B$ may be considered analogous to those observed in the phase-1(b). However, with those negativity islands, the corresponding entanglement negativity profile continues to rise linearly and thus do not provide a consistent interpretation for the phase-2. \subsubsection*{(b) For $\bm{l_1\neq l_2}$}\label{p!=1} Next we consider two unequal lengths of the subsystems $A$ and $B$ and observe that the corresponding Page curve for the entanglement negativity consists of three consecutive phases. Again we refer to the appendix \ref{Appendix3b} for the entanglement negativity expressions obtained in these distinct phases. In the following, we now explore these phases in detail.\\\\ \textbf{Phase 1:} In this phase (\cref{Adjcase4}), the various structures of the RT surfaces supported by the subsystems and the corresponding interpretation in terms of the Hawking radiation are identical to the first phase of the previous sub case.\\\\ \textbf{Phase 2:} We proceed to the second phase where the dominant contributions to the entanglement entropy of the subsystems $A$, $B$ and $A\cup B$ arise from dome, $b$-bulk and $ab$-type RT surfaces respectively. Hence, this phase includes an entanglement negativity island $I_{\varepsilon}(B)$ corresponding to the subsystem $B$ as depicted in \cref{Adjcase4}. Here the negativity island $I_{\varepsilon}(B)$ contains the entire interior region of both the black holes. Note that the entanglement negativity between the subsystems $A$ and $B$ in this phase is governed by the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$. These degrees of freedom are determined by the interior Hawking modes captured by the island $I_{\varepsilon}(B)$ whose exterior partners are located in $(B\cup I_{\varepsilon}(B))^c$. Now the number of outgoing Hawking modes is larger than the number of ingoing Hawking modes in the region $B\cup I_{\varepsilon}(B)$. Hence the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$ increase with time at a smaller rate than the previous phase which corresponds to the increasing behaviour of the Page curve as depicted in \cref{fig:Adjcase3}. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Pneq1a.pdf} \caption{Phase-1(a)} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Pneq1b.pdf} \caption{Phase-1(b)} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Pneq1c.pdf} \caption{Phase-2} \label{} \end{subfigure} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Adj_case3Pneq1d.pdf} \caption{Phase-3} \label{} \end{subfigure} \caption{Different phases of the entanglement negativity between two adjacent subsystems with unequal sizes as time increases.} \label{Adjcase4} \end{figure} \noindent \textbf{Phase 3:} Finally in the last phase, the RT surfaces supported by the subsystem $B$ are $ab$-type whereas the subsystems $A$ and $A\cup B$ still admit dome and $ab$-type RT surfaces respectively (\cref{Adjcase4}). Once again this phase includes an entanglement negativity island $I_{\varepsilon}(B)$ for the subsystem $B$ with a description similar to the previous phase. In this scenario, the entanglement negativity between the subsystems is again governed by the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$ which are determined similarly as in the previous phase. At late times, the number of ingoing and outgoing Hawking modes in the region $B\cup I_{\varepsilon}(B)$ are equal such that its degrees of freedom remain constant throughout this phase. Consequently, the Page curve for the entanglement negativity exhibits a constant behaviour as depicted in \cref{fig:Adjcase3}. \subsubsection{Disjoint subsystems}\label{disj} Next we consider a mixed state configuration of two disjoint subsystems $A$ and $B$ with finite lengths $l_1$ and $l_2$ respectively where a subsystem $C$ with length $l_c$ is sandwiched between them. In this context, we utilize the \cref{NegDis0,HEE-Shaghoulian} to obtain the holographic entanglement negativity between the subsystems $A$ and $B$ for three distinct scenarios involving the subsystem sizes and the time. Furthermore, we describe the qualitative nature of the corresponding entanglement negativity profiles in these scenarios. \subsubsection*{$\bm{(i)}$ Subsystem $\bm{A}$ fixed, $\bm{C}$ varied}\label{discase1} We begin with the case where the length $l_1$ of the subsystem $A$ is fixed at a constant time slice and compute the holographic entanglement negativity between the subsystems $A$ and $B$ with an increasing length ${l_c}$ of the subsystem $C$. We observe four consecutive phases of the entanglement negativity profile as depicted in \cref{fig:Discase1} due to the various structures of the RT surfaces supported by the subsystems in question. Utilizing the \cref{NegDis0,HEE-Shaghoulian}, we obtain the expressions for the corresponding entanglement negativity in these phases which are listed in the appendix \ref{Appendix4}. In what follows, we describe these phases of the entanglement negativity profile in detail. \begin{figure}[H] \centering \includegraphics[scale=.5]{Dis_case1.pdf} \caption{Entanglement negativity with respect to the size of $C$. Here $\beta=1$, $c=500$, t=20, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.01L,.15L]$, $B\cup C=[.15L,.99L]$ and $A\cup B\cup C=[.01L,.99L]$.} \label{fig:Discase1} \end{figure} \noindent \textbf{Phase 1:} In the first phase, the RT surfaces for the subsystems $A\cup C$ and $C$ are dome-type each whereas the subsystems $B\cup C$ and $A\cup B\cup C$ support $ab$-type RT surfaces. Here the size of the subsystem $A\cup C$ is very small compared to the size of $B$ such that this phase does not correspond to any island region for the subsystem $A\cup C$. In this phase, the entanglement negativity between the subsystems $A$ and $B$ is governed by the degrees of freedom of the subsystem $A$. Note that the corresponding degrees of freedom of the subsystem $A$ remain constant since the number of Hawking modes arriving from both the black holes together with the $CFT$ degrees of freedom do not change with the increasing length $l_c$. Consequently the entanglement negativity profile in this phase remains constant as depicted in \cref{fig:Discase1}.\\\\ \textbf{Phase 2:} Next we proceed to second phase where the subsystems $A\cup C$ and $C$ admit $a$-bulk and dome-type RT surfaces respectively whereas the subsystems $B\cup C$ and $A\cup B\cup C$ still support $ab$-type RT surfaces. Consequently, this phase involves an entanglement negativity island $I_{\varepsilon}(B)$ on the $b$-brane corresponding to the subsystem $B$. This island $I_{\varepsilon}(B)$ involves the entire interior region of the $b$-black hole. The entanglement negativity between the subsystems $A$ and $B$ in this phase is governed by the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$. As we increase $l_c$, the number of Hawking modes arriving from the $a$-black hole leave the region $B\cup I_{\varepsilon}(B)$. However an equal number of interior Hawking modes captured by the negativity island $I_{\varepsilon}(B)$ whose partners are located in $(B\cup I_{\varepsilon}(B))^c$ increase simultaneously. Consequently, the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$ is determined only by the $CFT_2$-degrees of freedom which decrease with the increasing length $l_c$ as the size of the subsystem $B$ decreases. Accordingly, the corresponding entanglement negativity profile decreases linearly as depicted in \cref{fig:Discase1}. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case1a.pdf} \caption{Phase-1} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case1b.pdf} \caption{Phase-2} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case1c.pdf} \caption{Phase-3} \label{} \end{subfigure} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case1d.pdf} \caption{Phase-4} \label{} \end{subfigure} \caption{The possible phases of the entanglement negativity between two disjoint subsystems $A$ and $B$ while increasing the size of the subsystem $C$ sandwiched between them.} \label{Disjcase1} \end{figure} \noindent \textbf{Phase 3:} In this phase the dominant contributions to the entanglement entropies of the subsystems $A\cup C$, $B\cup C$ and $A\cup B \cup C$ arise from $ab$-type RT surfaces each whereas the subsystem $C$ still supports dome-type RT surfaces. This phase includes an entanglement negativity island $I_{\varepsilon}(B)$ for the subsystem $B$ located on the exterior region of the $b$-black hole. Once again the entanglement negativity between the subsystems in this phase is governed by the degrees of freedom of the region $B\cup I_{\varepsilon}(B)$. Hence the number of Hawking modes arriving from both the black holes and the $CFT_2$-degrees of freedom present in the region $B\cup I_{\varepsilon}(B)$ decrease with increasing length $l_c$ of the subsystem $C$ as the size of the subsystem $B$ decreases. Consequently, we observe a linear decreasing profile of the corresponding entanglement negativity with a rate higher than the previous phase as depicted in \cref{fig:Discase1}.\\\\ \textbf{Phase 4:} In the last phase, the RT surfaces for the subsystems $A\cup C$, $B\cup C$, $A\cup B \cup C$ and $C$ are identified as $ab$-type each. Consequently, the corresponding entanglement wedges of the subsystems $A$ and $B$ are disconnected from each other in this phase which indicates a zero entanglement negativity between them. On a separate note, here the subsystems $A$ and $B$ are very small and located far away from each other such that they do not develop any entanglement between themselves.\\ We now discuss an interesting issue by comparing the above results with those discussed in sub\cref{adjcase2} where the entanglement negativity between two adjacent subsystems $A$ and $C$ was analyzed. This comparison is depicted in figure-\ref{fig:Disjcase1}. \begin{figure}[H] \centering \includegraphics[scale=.7]{disj_vs_adj.pdf} \caption{Entanglement negativity between different subsystems. Here $\beta=1$, $c=500$, t=20, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.01L,.15L]$, $B\cup C=[.15L,.99L]$ and $A\cup B\cup C=[.01L,.99L]$.} \label{fig:Disjcase1} \end{figure} We find that the entanglement negativity between the subsystems $A$ and $C$ follows identical behaviour as discussed in sub\cref{adjcase2}. Note that the negativity between the subsystems $A$ and $B\cup C$ is constant throughout our analysis since we have fixed their sizes $l_1$, $l_c+l_2$ respectively and the time $t$. Now, with the increasing length $l_c$, the size of the subsystem $B$ decreases accordingly. Hence the degrees of freedom of $B$ are eventually transferred to the subsystem $C$ as $l_c$ increases. As a result the entanglement negativity between the subsystems $A$ and $B$ decreases while the entanglement negativity between the subsystems $A$ and $C$ is increasing as depicted in \cref{fig:Disjcase1}. \subsubsection*{$\bm{(ii)}$ Subsystems $\bm{A}$ and $\bm{C}$ fixed, $\bm{B}$ varied}\label{discase2} In this scenario, the lengths $l_1$ and $l_c$ of the subsystems $A$ and $C$ are fixed at a constant time slice. We then compute the holographic entanglement negativity between the two disjoint subsystems $A$ and $B$ with an increase in the length $l_2$ of the subsystem $B$ utilizing the \cref{NegDis0,HEE-Shaghoulian}. In this case, we observe four consecutive phases of the entanglement negativity profile as exhibited in \cref{fig:Discase2}. Once again the expressions for the corresponding entanglement negativity in these distinct phases are listed in the appendix \ref{Appendix5}. It is interesting to note that in this scenario, the profile of the entanglement negativity follows the behaviour similar to the adjacent case discussed in the sub\cref{adjcase2} where we fixed the size of the subsystem $A$ and varied the size of $B$. Consequently in the present case, the corresponding phases may be explained analogously in terms of the Hawking radiations. \begin{figure}[H] \centering \includegraphics[scale=.5]{Dis_case2.pdf} \caption{Entanglement negativity with respect to the size of $B$. Here $\beta=1$, $c=500$, t=20, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.01L,.15L]$ and $C=[.15L,.2L]$.} \label{fig:Discase2} \end{figure} \subsubsection*{$\bm{(iii)}$ Subsystems $\bm{A}$, $\bm{B}$ and $\bm{C}$ fixed, time varied}\label{discase3} We conclude our analysis with the following case where the sizes of all the subsystems are fixed. For this scenario we compute the holographic entanglement negativity between the disjoint subsystems $A$ and $B$ with increasing time utilizing the \cref{NegDis0,HEE-Shaghoulian}. In particular, we obtain two Page curves for the corresponding entanglement negativity for two sub cases with equal and unequal lengths of the subsystems $A$ and $B$ as depicted in \cref{fig:Discase3}. In these scenarios, the $CFT_2$-degrees of freedom are irrelevant for the description of the entanglement negativity profiles since all the subsystem sizes are fixed. Hence the only effect on these profiles arise from the Hawking modes arriving from both the black holes. \subsubsection*{(a) For $\bm{l_1=l_2}$}\label{dis_p=1} For the case of two equal lengths subsystems, the Page curve for the entanglement negativity between the subsystems $A$ and $B$ consists of three consecutive phases and the expressions for the same in these phases are listed in the appendix \ref{Appendix6a}. In the following, we analyze these phases in detail.\\\\ \textbf{Phase 1:} In the first phase (\cref{Disjcase3(Peq1)}), the dominant contributions to the entanglement entropies of all the subsystems arise from bulk-type RT surfaces each. Hence the entanglement wedges of the subsystems $A$ and $B$ are disconnected in this phase. Consequently the entanglement negativity between the subsystems in this case is zero as depicted in \cref{fig:Discase3}. On a separate note, at initial times the number of Hawking modes present in the subsystems $A$ and $B$ are very small such that they do not lead to a significant entanglement between the subsystems.\\\\ \textbf{Phase 2:} This phase consists of two sub phases due to the various structures of the RT surfaces supported by the subsystems as depicted in \cref{Disjcase3(Peq1)}. In the first sub phase, the RT surfaces for the subsystems $A\cup C$, $B\cup C$ and $A\cup B\cup C$ are still identified as bulk-type whereas the subsystem $C$ now supports dome-type RT surfaces. In the second sub phase the dominant contributions to the entanglement entropies of the subsystems $A\cup C$, $B\cup C$, $A\cup B\cup C$ and $C$ arise from $a$-bulk, $b$-bulk, $ab$ and dome-type RT surfaces respectively. The increasing behaviour of the corresponding entanglement negativity profile in these two sub phases follows the interpretations which are analogous to the first phase of the adjacent case described in sub\cref{p=1}. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3Peq1a.pdf} \caption{Phase-1} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3Peq1b.pdf} \caption{Phase-2a} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3Peq1c.pdf} \caption{Phase-2b} \label{} \end{subfigure} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3Peq1d.pdf} \caption{Phase-3} \label{} \end{subfigure} \caption{The diagram shows the possible phases of the entanglement negativity between two disjoint subsystems with equal sizes as time increases.} \label{Disjcase3(Peq1)} \end{figure} \noindent \textbf{Phase 3:} In the last phase, the Page curve for the entanglement negativity between the two disjoint subsystems $A$ and $B$ depicts a constant behaviour as exhibited in \cref{fig:Discase3}. Here the RT surfaces supported by the subsystems $A\cup C$, $B\cup C$ and $C$ are dome type each whereas the subsystem $A\cup B\cup C$ admits $ab$ type RT surfaces (\cref{Disjcase3(Peq1)}). Once again, we refer to the second phase of the adjacent case described in sub\cref{p=1} to explain the constant behaviour of the corresponding entanglement negativity profile. \subsubsection*{(b) For $\bm{l_1 \neq l_2}$}\label{dis_p!=1} For the case of two unequal lengths subsystems $A$ and $B$, we observe that the Page curve for the entanglement negativity between them consists of four different phases as depicted in \cref{fig:Discase3}. Once again the corresponding entanglement negativity expressions are listed in the appendix \ref{Appendix6b}. In what follows, we describe these phases in detail. \begin{figure}[H] \centering \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3PNeq1a.pdf} \caption{Phase-1} \label{} \end{subfigure} \vspace{.4cm} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3PNeq1b.pdf} \caption{Phase-2a} \label{} \end{subfigure} \hspace{.12cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3PNeq1c.pdf} \caption{Phase-2b} \label{} \end{subfigure} \hspace{.1cm} \vspace{.4cm} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3PNeq1d.pdf} \caption{Phase-3} \label{} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \centering \includegraphics[width=\textwidth]{Disj_case3PNeq1e.pdf} \caption{Phase-4} \label{} \end{subfigure} \caption{The possible phases of the entanglement negativity between two disjoint subsystems with unequal sizes as time increases.} \label{Disjcase3(PNeq1)} \end{figure} \noindent \textbf{Phase 1 and Phase 2:} In these phases (\cref{Disjcase3(PNeq1)}), the RT surfaces supported by the subsystems and the description for the corresponding entanglement negativity profile are identical to the first two phases of the previous sub case.\\\\ \textbf{Phase 3:} In the third phase, the dominant contributions to the entanglement entropies of the subsystems $A \cup C$ and $C$ arise from dome-type RT surfaces each whereas the subsystems $B\cup C$ and $A\cup B\cup C$ admit $b$-bulk and $ab$ type RT surfaces respectively as shown in \cref{Disjcase3(PNeq1)}. This phase includes entanglement negativity island $I_{\varepsilon}(A)$ corresponding to the subsystem $A$ located in the exterior regions of the $a$-black hole. However, the entanglement negativity island $I_{\varepsilon}(B)$ corresponding to the subsystem $B$ involve the entire interior regions of both the black holes. The explanation for the increasing behaviour of the corresponding entanglement negativity profile in this phase is similar to the second phase of the adjacent case discussed in sub\cref{p!=1}.\\ \textbf{Phase 4:} Finally in the last phase (\cref{Disjcase3(PNeq1)}), the entanglement negativity between the subsystems $A$ and $B$ exhibits a constant behaviour which again may be explained similarly to that of the third phase of the adjacent case as discussed in sub\cref{p!=1}. \begin{figure}[H] \centering \includegraphics[width=11.93cm]{Dis_case3.pdf} \caption{Page curves for entanglement negativity with respect to time $t$. Here $\beta=1$, $c=500$, $\phi_0= \frac{30c}{6}$, $\phi_r= \frac{30}{\pi}$, $L=\frac{16\pi}{\beta}$, $\epsilon=.001$, $A=[.01L,.45L]$ and $B=[.55L,.99L]$ (for $l_1=l_2$), $A=[.01L,.35L]$ and $B=[.4L,.99L]$ (for $l_1\neq l_2$).} \label{fig:Discase3} \end{figure} \section{Summary and Discussion}\label{discussion} To summarize, we have investigated the entanglement entropy and the entanglement negativity for various bipartite states at a finite temperature in two distinct models. The first model describes a brane world geometry involving a bulk eternal $AdS_3$ BTZ black hole truncated by two \textit{Karch-Randall} (KR) branes with two dimensional black holes induced from the higher dimension. These induced two dimensional black holes are in communication through shared baths which are described by thermal $BCFT_2$s on a strip with different boundary conditions at either end constituting a thermofield double state \cite{Geng:2021iyq}. In this connection each of the bath $BCFT_2$s together with one of the two KR branes appear to be gravitating from the perspective of the other KR brane. We have computed the entanglement entropy for a generic subsystem with both of its end points located in the bulk of the $BCFT_2$s for this configuration. This involves seven possible contributions to the entanglement entropy arising from the four-point correlation function for the subsystem under consideration. Furthermore these results were substantiated through the bulk computations using wedge holography. Subsequently, we have obtained the holographic entanglement negativity for two generic adjacent subsystems $A$ and $B$ in the bath $BCFT_2$s using the holographic proposals described in \cite{Jain:2017aqk} for three different scenarios involving the subsystem sizes and the time. In the first case, the common endpoint between the two subsystems was varied over a constant time slice while keeping the size of $A\cup B$ fixed to the entire bath regions. In the second scenario, the size of the subsystem $A$ was fixed over a constant time slice and the size of $B$ was varied. In the last case, we analyzed the entanglement negativity for two sub cases involving equal and unequal sizes of the subsystems $A$ and $B$ with increasing time $t$. The behaviour of the corresponding entanglement negativity profiles observed for the above scenarios were similar to that described in \cite{KumarBasak:2021rrx} where the authors considered evaporating black holes in JT gravity through a geometrized island construction. Subsequently we have considered two disjoint subsystems $A$ and $B$ separated by the subsystem $C$ in the bath $BCFT_2$s and obtained the profiles for the entanglement negativity between them for three different scenarios involving the subsystem sizes and the time. In the first case, the sizes of the subsystems $A$ and $B\cup C$ were fixed over a constant time slice while the size of $C$ was increased. In the second case, the sizes of the subsystems $A$ and $C$ were fixed while varying the size of the subsystem $B$. Finally in the last scenario, all the subsystem sizes were fixed with the time $t$ increasing. We have computed the entanglement negativity between the subsystems $A$ and $B$ for these three scenarios and observed that the behaviour of the entanglement negativity profiles were once again similar to those described in \cite{KumarBasak:2021rrx}. It is interesting to note that these entanglement measures characterize the information transfer between the two black holes induced on the KR branes. Following this we focused on the second model involving two finite sized non-gravitating reservoirs coupled to two quantum dots at their boundaries. These quantum dots constitute two copies of thermofield double states which are interacting through the common reservoirs. The holographic dual of these quantum dots are described by JT gravity on two Plank branes with $AdS_2$ geometries. Interestingly, each non-gravitating reservoir together with a Planck brane appears to be gravitating from the perspective of the other brane. These Planck branes involve two eternal JT black holes which are in communication with each other through the shared reservoirs. In this configuration, the black hole and the reservoir regions contain identical matter $CFT_2$s with transparent boundary conditions. The authors in \cite{Balasubramanian:2021xcm} computed the generalized entanglement entropy for a generic subsystem $A$ in the reservoirs with the JT black holes at different temperatures on the Planck branes. However they have described the profiles for the corresponding generalized entanglement entropy for the scenario where the two JT black holes were at the same temperatures. In this article, we have described a detailed holographic computation for the same with the JT black holes at the same temperatures to complement and complete the results described in \cite{Balasubramanian:2021xcm}. Subsequently we obtained the holographic entanglement negativity for various bipartite mixed states in the radiation reservoirs for the above configuration. In this connection, once again we have analyzed the profiles of the corresponding entanglement negativity for different scenarios involving the subsystem sizes and the time. For the case of two adjacent subsystems, first the size of $A\cup B$ was fixed to the entire radiation reservoirs and the common point between them was varied. In this scenario, we have obtained a Page curve for the entanglement negativity analogous to the previous model I. Note that in the present model, an exact plateau region for the entanglement negativity profile was observed since the dominant contribution to the entanglement entropy in this phase was independent of the position of the subsystems. This is in contrast to the earlier model where we observed the phase of the entanglement negativity profile with a slightly increasing rate due to the position dependence of the corresponding entanglement entropy. In addition, an interesting feature of tripartite entanglement was observed within this framework when the subsystem sizes were comparable. In the second scenario, the size of the subsystem $A$ was fixed over a constant time slice while varying the size of $B$ and an analogous behaviour for the entanglement negativity profile was observed as in the previous model I. The last scenario involved constant sizes of the subsystems $A$ and $B$ with increasing time $t$. Once again we noticed that the corresponding Page curves for the entanglement negativity exhibited similar behaviour as observed in the earlier model I. Subsequently, we have considered two disjoint subsystems $A$ and $B$ with a subsystem $C$ sandwiched between them and analyzed the profile of the entanglement negativity for the subsystems $A$ and $B$. In the first scenario, we have fixed the sizes of the subsystems $A$ and $B\cup C$ while varying the size of $C$, however in the second case we have fixed the sizes of $A$ and $C$ with increasing size of the subsystem $B$. Finally we have concluded our analysis with the scenario involving two sub cases of equal and unequal lengths of the subsystems $A$ and $B$ while increasing the time $t$. Once again the corresponding entanglement negativity in all of the above cases exhibited behaviours analogous to the previous model I. As earlier these entanglement measures characterize the information transfer between the two black holes located on the Planck branes. There are several interesting future directions to explore in relation to the results described in this article. A significant open issue is to generalize these braneworld constructions to higher dimensional scenarios which may reveal deeper insights into the structure of the mixed state entanglement in such communicating black hole/bath systems. The analysis should also extend to models with defect $CFT$s on the end-of-the-world branes. Furthermore the overlapping configurations for entanglement negativity islands indicate some hidden characteristics of the structure of mixed state entanglement which needs more careful investigation using various toy models of black hole evaporation. We hope to return to these exciting issues in the near future. \section{Acknowledgement} We are grateful to Vinay Malvimat and Vinayak Raj for useful discussions. The work of GS is partially supported by the Jag Mohan Chair Professor position at the Indian Institute of Technology, Kanpur. \begin{appendices} \section{Expressions for holographic entanglement negativity} In this appendix, we show the expressions for the holographic entanglement negativity between two adjacent and disjoint subsystems obtained through the \cref{NegAdj1,NegDis0,HEE-Shaghoulian} in the second model. \subsection*{Adjacent subsystems} Here we list the expressions of the holographic entanglement negativity between two adjacent subsystems utilizing the \cref{NegAdj1,HEE-Shaghoulian} in three distinct scenarios involving the subsystem sizes and the time as discussed in \cref{Adj}. \subsubsection*{$\bm{(i)}$ Full system ($\bm{A\cup B}$) fixed, common point varied}\label{Appendix1} In the first scenario, the size of the subsystem $A\cup B$ is fixed which covers the whole radiation reservoirs and the common point between them is varied at a constant time slice. The corresponding expressions for the entanglement negativity between $A$ and $B$ in the different phases is given as follows\\ \textbf{Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right]+\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &+&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} r+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right] - \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right] , \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right] - \frac{3}{2}\phi_0 - \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]+\frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right] , \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right] , \end{eqnarray} \textbf{Phase 4} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right]- \frac{3}{2}\phi_0 - \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)\nonumber\\ &-& \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]+\frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right] , \end{eqnarray} \textbf{Phase 5} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right] + \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-r)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-r)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]. \end{eqnarray} \subsubsection*{$\bm{(ii)}$ Subsystem $\bm{A}$ fixed, $\bm{B}$ varied}\label{Appendix2} In the second scenario, the size of the subsystem $A$ is fixed at a constant time slice while the size of the subsystem $B$ is varied. In what follows, the corresponding expressions for the entanglement negativity between the subsystems $A$ and $B$ in the different phases are given by\\ \textbf{Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right]\nonumber\\ &-&\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-b| \right], \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right]-\frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right]-\frac{3}{2}\phi_0\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right) - \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right],\nonumber\\ && \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right]-3\phi_0\nonumber\\ &-& \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right) - \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-& \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 4} \begin{eqnarray} \mathcal{E}(A:B) &=&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r+ \log \frac{24 \pi \phi_r }{c \beta }\right) + \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} r+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right) - \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &+& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right]. \end{eqnarray} \subsubsection*{$\bm{(iii)}$ Subsystems $\bm{A}$, $\bm{B}$ and $\bm{C}$ fixed, time varied}\label{Appendix3} The third scenario involves two sub cases of equal and unequal lengths of the subsystems $A$ and $B$ with increasing time where the lengths $l_1$ and $l_2$ of the two adjacent subsystems are fixed. The expression for the corresponding entanglement negativity between the subsystems $A$ and $B$ for these two sub cases in different phases are given as \subsubsection*{(a) For $\bm{l_1=l_2}$}\label{Appendix3a} \textbf{\;\,\,\,\, Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right], \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& -3\phi_0 - \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right) - \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-& \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &+&\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right]. \end{eqnarray} \subsubsection*{(b) For $\bm{l_1\neq l_2}$}\label{Appendix3b} \textbf{\;\,\,\,\, Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right], \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right] - \frac{3}{2}\phi_0\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-& \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-r)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-r)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r-b| \right]\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]. \end{eqnarray} \subsection*{Disjoint subsystems} We now list the expressions of the holographic entanglement negativity between the two disjoint subsystems $A$ and $B$ in three different scenarios involving subsystem sizes and the time by utilizing the \cref{NegDis0,HEE-Shaghoulian} as described in sub\cref{disj}. \subsubsection*{$\bm{(i)}$ Subsystem $\bm{A}$ fixed, $\bm{C}$ varied}\label{Appendix4} In the first scenario, the size of the subsystem $A$ is fixed at a constant time slice while the size of the subsystem $C$ is varied. The expressions of the holographic entanglement negativity between the subsystems $A$ and $B$ in the different phases are given as follows \textbf{\;\,\,\,\, Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]\nonumber\\ &+&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta }\right)+\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)-\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]+\frac{3}{2}\phi_0\nonumber\\ &+&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta }\right)+\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &+&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)+\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-r_2)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &+&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{2 \pi}{\beta} (L-r_2)+ \log \frac{24 \pi \phi_r }{c \beta }\right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-r_2)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]+3\phi_0+ \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &+&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 4} \begin{eqnarray} \mathcal{E}(A:B) &=& 0. \end{eqnarray} \subsubsection*{$\bm{(ii)}$ Subsystems $\bm{A}$ and $\bm{C}$ fixed, $\bm{B}$ varied}\label{Appendix5} In the second scenario, the size of the subsystems $A$ and $C$ are fixed at a constant time slice while the size of the subsystems $B$ is being varied. The expressions of the entanglement negativity between the subsystems $A$ and $B$ in the different phases are indicated as \textbf{Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1 - b| \right]\nonumber\\ &-& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]- \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a - b| \right], \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1 - b| \right] - \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]\nonumber\\ &-&\frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right] - \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-& \frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1 - b| \right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right] - 3\phi_0\nonumber\\ &-& \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)-\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 4} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]\nonumber\\ &+&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta }\right)+\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)-\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]. \end{eqnarray} \subsubsection*{$\bm{(iii)}$ Subsystems $\bm{A}$, $\bm{B}$ and $\bm{C}$ fixed, time varied}\label{Appendix6} In the third scenario, the lengths $l_1$, $l_2$ and $l_c$ of the subsystems $A$, $B$ and $C$ are fixed respectively with increasing time. Here we consider two sub cases of equal and unequal lengths of the subsystems $A$ and $B$. The expressions of the corresponding entanglement negativity between the subsystems $A$ and $B$ in distinct phases are given as \subsubsection*{(a) For $\bm{l_1=l_2}$}\label{Appendix6a} \textbf{\;\,\,\,\, Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& 0, \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right], \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]+\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1 - b| \right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta}(L-b)+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{\sinh \left(\frac{2 \pi}{\beta} (L-b)+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right] - 3\phi_0\nonumber\\ &-& \frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)-\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]. \end{eqnarray} \subsubsection*{(b) For $\bm{l_1\neq l_2}$}\label{Appendix6b} \textbf{\;\,\,\,\, Phase 1} \begin{eqnarray} \mathcal{E}(A:B) &=& 0, \end{eqnarray} \textbf{Phase 2} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right], \end{eqnarray} \textbf{Phase 3} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]+\frac{c}{4} \log \left[\frac{\beta}{\pi } \cosh \frac{2\pi }{\beta }t\right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]-\frac{3}{2}\phi_0\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)-\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right], \end{eqnarray} \textbf{Phase 4} \begin{eqnarray} \mathcal{E}(A:B) &=& \frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |a-r_2| \right]-\frac{c}{2} \log \left[\frac{\beta}{\pi } \sinh \frac{\pi}{\beta } |r_1-r_2| \right]\nonumber\\ &+&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta }\right)+\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} r_1+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]\nonumber\\ &-&\frac{3\pi\phi_r}{\beta } \coth \left(\frac{2\pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta }\right)\nonumber\\ &-&\frac{c}{4}\log \left[\frac{\beta}{\pi}\;\frac{\cosh \left(\frac{4 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)-1}{ \sinh \left(\frac{2 \pi}{\beta} a+ \log \frac{24 \pi \phi_r }{c \beta } \right)} \right]. \end{eqnarray} \end{appendices} \bibliographystyle{jhep} \section{}
\section{Introduction} \label{sec:Intro} From the past few decades, the study of the black hole information loss paradox has led to several key insights about semi-classical and quantum gravity. Recently, tremendous progress has been made towards a possible resolution of this paradox which involves the appearance of regions termed {\it ``islands"} in the black hole geometry at late times \cite{Almheiri:2019hni, Almheiri:2019psf, Almheiri:2019qdq, Almheiri:2019psy, Almheiri:2019yqk, Almheiri:2020cfm}. This leads to the Page curve \cite{Page:1993wv, Page:1993df, Page:2013dx}, which indicates that the process of black hole formation and evaporation follows a unitary evolution. The appearance of the islands stems from the late time dominance of the \textit{replica wormhole} saddles in the gravitational path integral for the R\'enyi entanglement entropy. The resultant island formula was inspired by the advent of quantum extremal surfaces (QES) introduced earlier, to compute the quantum corrections to the holographic entanglement entropy \cite{Ryu:2006bv, Hubeny:2007xt, Faulkner:2013ana, Engelhardt:2014gca}. In this connection, in \cite{Almheiri:2019hni, Almheiri:2019yqk, Almheiri:2019qdq, Almheiri:2020cfm} a quantum dot (e.g. SYK model) coupled to a CFT$_2$ on a half-line was regarded as the holographic dual to a $2$-dimensional conformal field theory coupled to semi-classical gravity on a hybrid manifold\footnote{In such holographic dual theories, the hybrid manifold on which the CFT is defined consists of a flat bath along with a curved geometry with dynamical gravity.}. For such $2$-dimensional conformal field theories coupled to semi-classical gravity, the island formula involves the fine-grained entropy of the Hawking radiation in a region $R$, obtained through the extremization over the entanglement entropy island region $I(R)$ and is expressed as follows \begin{equation} S [R] = \text{min} ~\underset{I (R)}{\text{ext}} \left[ \frac{\text{Area} [\partial I (R)]}{4 G_N} + S_\text{eff} \big(R \cup I (R)\big) \right] , \end{equation} where $G_N$ is the Newton's constant and $S_\text{eff} (X)$ corresponds to the effective semi-classical entanglement entropy of quantum matter fields located on $X$. For recent related works, see \cite{Anderson:2020vwi, Chen:2019iro, Balasubramanian:2020hfs, Chen:2020wiq, Gautason:2020tmk, Bhattacharya:2020ymw, Anegawa:2020ezn, Hashimoto:2020cas, Hartman:2020swn, Krishnan:2020oun, Alishahiha:2020qza, Geng:2020qvw, Li:2020ceg, Chandrasekaran:2020qtn, Bak:2020enw, Krishnan:2020fer, Karlsson:2020uga, Hartman:2020khs, Balasubramanian:2020coy, Balasubramanian:2020xqf, Sybesma:2020fxg, Chen:2020hmv, Ling:2020laa, Hernandez:2020nem, Marolf:2020rpm, Matsuo:2020ypv, Akal:2020twv, Caceres:2020jcn, Raju:2020smc, Deng:2020ent, Anous:2022wqh, Bousso:2022gth, Hu:2022ymx, Grimaldi:2022suv, Akers:2022max, Yu:2021rfg, Geng:2021mic, Chou:2021boq, Hollowood:2021lsw, He:2021mst, Arefeva:2021kfx, Ling:2021vxe, Bhattacharya:2021dnd, Azarnia:2021uch, Saha:2021ohr, Hollowood:2021wkw, Sun:2021dfl, Li:2021dmf, Aguilar-Gutierrez:2021bns, Ahn:2021chg, Yu:2021cgi, Lu:2021gmv, Caceres:2021fuw, Akal:2021foz, Arefeva:2022cam, Arefeva:2022guf, Bousso:2022ntt, Krishnan:2021ffb, Zeng:2021kyb, Teresi:2021qff, Okuyama:2021bqg, Chen:2021jzx, Pedraza:2021ssc, Guo:2021blh, Kibe:2021gtw, Renner:2021qbe, Dong:2021oad, Raju:2021lwh, Nam:2021bml, Kames-King:2021etp, Chen:2021lnq, Sato:2021ftf, Kudler-Flam:2021alo, Wang:2021afl, Ageev:2021ipd, Buoninfante:2021ijy, Cadoni:2021ypx, Marolf:2021ghr, Chu:2021gdb, Urbach:2021zil, Li:2021lfo, Neuenfeld:2021bsb, Aalsma:2021bit, Ghosh:2021axl, Bhattacharya:2021jrn, Geng:2021wcq, Krishnan:2021faa, Verheijden:2021yrb, Bousso:2021sji, Karananas:2020fwx, Goto:2020wnk, Bhattacharya:2020uun, Chen:2020jvn, Agon:2020fqs, Laddha:2020kvp, Akers:2019nfi, Chen:2019uhq, Basak:2022acg,Geng:2020fxl,Geng:2021iyq, Afrasiar:2022}. A natural description for the island formulation was provided through a \textit{double holographic} framework \cite{Almheiri:2019hni} where the $d$-dimensional conformal field theory coupled to semi-classical gravity may be interpreted as a lower dimensional effective description of a bulk $(d+1)$-dimensional theory of gravity. In this scenario, the $d$-dimensional conformal field theory is considered to possess a dual bulk $(d+1)$-dimensional gravitational theory in the AdS$_{d+1}$/CFT$_d$ framework. In the double holographic picture the computation of the entanglement entropy through the island formula in the lower dimensional theory reduces to its holographic characterization through the (H)RT formula \cite{Ryu:2006bv, Hubeny:2007xt} in the bulk dual AdS$_{d+1}$ geometry. This may be understood as a realization of the ER=EPR proposal \cite{Maldacena:2013xja} where the island region in the black hole interior is contained within the entanglement wedge of the radiation bath through the double holographic perspective. On a separate note, CFT$_2$s on a manifold with a boundary, termed as boundary conformal field theories (BCFT$_2$s) \cite{Cardy:2004hm} have received considerable attention in the recent past. The holographic dual of such BCFT$_2$s \cite{Takayanagi:2011zk, Fujita:2011fp, Rozali:2019day, Sully:2020pza,Kastikainen:2021ybu} involves an asymptotically AdS$_3$ spacetime truncated by an end-of-the-world (EOW) brane $\mathbb{Q}$ with Neumann boundary condition. An extension of this AdS$_3$/BCFT$_2$ duality studied in \cite{Deng:2020ent}, involved additional \textit{defect} conformal matter on the EOW brane $\mathbb{Q}$ which resulted in the modification of the Neumann boundary condition. The entanglement entropy of an interval in this defect BCFT$_2$ was also computed in \cite{Deng:2020ent, Chu:2021gdb} through a modification of the quantum corrected RT formula. This was termed as the defect extremal surface (DES) formula as it involved contributions from the defect conformal matter fields. Interestingly, this DES formula has been proposed to be the doubly holographic counterpart of the island formula in the context of the defect AdS$_3$/BCFT$_2$ scenario \cite{Deng:2020ent}. The authors in \cite{Deng:2020ent} compared the entanglement entropy computed through the DES formula in the $3d$ bulk geometry with that computed through the island formula in the effective $2d$ description and found an exact agreement. Subsequently, the time dependent AdS$_3$/BCFT$_2$ scenario was studied in \cite{Chu:2021gdb}, where in the effective $2d$ description, an eternal black hole emerges on the EOW brane. The entanglement entropy for the Hawking radiation from the eternal black hole, obtained through the DES formula reproduced the Page curve and was consistent with the island proposal. The fine grained entanglement entropy is a viable measure of entanglement for bipartite pure states. For configurations involving bipartite pure states in black hole geometries, the island proposal in the effective picture or the DES formula in the doubly holographic scenario correctly encode the entanglement structure of the Hawking radiation. However, entanglement entropy fails to characterize the structure of entanglement for bipartite mixed states as it receives contributions from irrelevant classical and quantum correlations. For such cases involving bipartite mixed states, it is required to consider alternative mixed state correlation or entanglement measures. Several of such correlation and entanglement measures like the reflected entropy \cite{Dutta:2019gen, Akers:2021pvd}, the entanglement negativity \cite{Vidal:2002zz, Plenio:2005cwa}, the entanglement of purification \cite{Takayanagi:2017knl, Nguyen:2017yqw} and the balanced partial entanglement entropy \cite{Wen:2021qgx, Camargo:2022mme} have been studied in the literature. In this context, the crucial issue of characterization of the entanglement structure of bipartite mixed states was addressed in \cite{Li:2021dmf} through the computation of the reflected entropy in the time dependent framework involving an eternal black hole in the AdS$_3$/BCFT$_2$ scenario. The authors proposed a $3d$ bulk DES formula for the reflected entropy and compared their results with the $2d$ effective field theory computations involving islands. They obtained the analogues of the Page curves for the reflected entropy and demonstrated the appearance of islands at late times. The above developments bring into sharp focus the crucial issue of the characterization of the mixed state entanglement structure of the Hawking radiation from black holes. In this context, the non-convex entanglement monotone termed the \textit{entanglement negativity} \cite{Vidal:2002zz, Plenio:2005cwa} serves as a natural candidate to investigate the entanglement structure of such mixed states. The entanglement negativity has been explored in conformal field theories \cite{Calabrese:2012ew, Calabrese:2012nk, Calabrese:2014yza} through appropriate replica techniques\footnote{For an extension of this replica technique in the Galilean conformal field theories, see \cite{Malvimat:2018izs}.}. Subsequently several holographic constructions for computing the entanglement negativity in the context of the AdS/CFT correspondence was advanced in a series of interesting works\footnote{For analogues of these proposals in the context of flat holography, see \cite{Basu:2021axf, Setare:2021ryi}.} in \cite{Rangamani:2014ywa, Chaturvedi:2016rft, Chaturvedi:2016rcn, Jain:2017aqk, Jain:2017xsu, Chaturvedi:2017znc, Jain:2017uhe, Jain:2018bai, Malvimat:2018txq, Malvimat:2018ood, KumarBasak:2020viv, Mondal:2021kzj, Afrasiar:2021hld, Basu:2022nds} which reproduced the field theoretic results in the large central charge limit \cite{Kulaxizi:2014nma,Malvimat:2017yaj, Basu:2021axf}. Interestingly, in \cite{Kudler-Flam:2018qjo, Kusuki:2019zsp, KumarBasak:2020eia, KumarBasak:2021lwm, Basu:2021awn}, an alternative holographic proposal based on the bulk entanglement wedge cross-section (EWCS) was also investigated. In this connection, an island formulation for the entanglement negativity was recently established in \cite{KumarBasak:2020ams} following a similar island construction for the reflected entropy developed in \cite{Chandrasekaran:2020qtn, Li:2020ceg}. Furthermore, a geometric construction based on the double holographic framework was discussed qualitatively in \cite{KumarBasak:2020ams} and subsequently investigated in \cite{KumarBasak:2021rrx} through a partial dimensional reduction \cite{Verheijden:2021yrb} of the $3d$ bulk space time. In this article, we generalize these doubly holographic scenarios to the framework of AdS/BCFT with defect conformal matter on the EOW brane. We propose a DES formula for computing the bulk entanglement negativity in asymptotically AdS$_3$ geometries truncated by an EOW brane. Furthermore, we demonstrate the equivalence of the DES results with the corresponding island computations for the entanglement negativity of bipartite mixed states in both static and time-dependent configurations involving black hole/bath systems in the effective lower dimensional theory. The rest of the article is organized as follows. In \cref{sec:review}, we recollect various aspects of the DES formula for the entanglement entropy and the corresponding effective lower dimensional picture involving the entanglement islands. In \cref{sec:EN-DES}, we provide the island construction for the entanglement negativity \cite{KumarBasak:2020ams}, and propose the DES formulas for computing the bulk entanglement negativity for disjoint and adjacent subsystems on the conformal boundary of asymptotically AdS$_3$ geometries with defect conformal matter on the EOW brane. In \cref{sec:EN-static}, we compute the entanglement negativity for disjoint and adjacent intervals in a static time slice of the conformal boundary. Beginning with a brief review of the eternal black hole configuration in the $2d$ effective semi-classical picture, we describe DES and island computations for the entanglement negativity between interior regions of the black hole, between the black hole and radiation in the bath region, and between radiation segments, and demonstrate the equivalence of the two formulations in \cref{sec:Time-dependent-EN}. Finally, in \cref{sec:summary}, we summarize our results and comment on possible future directions. \section{Review of earlier literature}\label{sec:review} In this section, we will briefly recall the salient features of the holographic model under consideration. We first review the AdS/BCFT scenario \cite{Takayanagi:2011zk} modified through the inclusion of conformal matter on the end-of-the-world (EOW) brane which was proposed in \cite{Deng:2020ent, Chu:2021gdb}. Following this, we describe the defect extremal surface (DES) formula \cite{Deng:2020ent} for computing the entanglement entropy in the bulk AdS geometry truncated by the EOW brane. We will also briefly elucidate the effective $2d$ description of the model and the semi-classical island formula for computing the entanglement entropy of a subsystem in the effective description. \subsection{AdS$_3$/BCFT$_2$} As described in \cite{Takayanagi:2011zk, Fujita:2011fp} the bulk dual of a BCFT$_2$ defined on the half line $x\geq 0$ is given by an AdS$_3$ geometry truncated by an EOW brane $\mathbb{Q}$ with Neumann boundary conditions. The gravitational action of the bulk manifold $\mathcal{N}$ is given by \begin{align} I=\int_{\mathcal{N}}\sqrt{-g}\,(R-2\Lambda)+2\int_{\mathbb{Q}}\sqrt{-h}\,(K-T)\,, \end{align} where $h_{ab}$ is the induced metric, $K$ is the trace of the extrinsic curvature $K_{ab}$ on the EOW brane $\mathbb{Q}$ with a tension $T$. The Neumann boundary condition on the EOW brane is given as $K_{ab}=(K-T)h_{ab}$. The $3d$ bulk geometry may be described by two sets of relevant coordinate charts, $(t,x,z)$ and $(t,\rho,y)$, which are related through \begin{align}\label{x-y-coordinates} x=y \tanh\left(\frac{\rho}{\ell}\right)~~,~~z=-y \sech\left(\frac{\rho}{\ell}\right)\,. \end{align} The bulk metric in these coordinates is given by the standard Poincar\'e slicing, as follows \begin{align} ds^2&=d\rho^2+\cosh^2\left(\frac{\rho}{\ell}\right)\frac{-dt^2+dy^2}{y^2}\notag\\ &=\frac{\ell^2}{z^2}(-dt^2+dx^2+dz^2)\,, \end{align} where $\ell$ is the AdS$_3$ radius. In the Poincar\'e slicing\footnote{A convenient choice for a polar coordinate is $\theta=\text{arccos}\left[\sech\left(\frac{\rho}{\ell}\right)\right]$, which determines the angular position of the brane from the vertical as shown in \cref{fig:DES-EE}.} described by the $(t,\rho,y)$ coordinate chart the EOW brane is situated at a constant $\rho=\rho_0$ slice and the induced metric on the brane is given by that of an AdS$_2$ geometry \cite{Takayanagi:2011zk}. An extension to this usual AdS$_3$/BCFT$_2$ framework was proposed in \cite{Deng:2020ent} where one essentially begins with an orthogonal brane with zero tension and through the addition of conformal matter onto it, turns on a finite tension. The Neumann boundary condition on the EOW brane $\mathbb{Q}$ is modified by the stress tensor of this defect CFT$_2$. The EOW brane $\mathbb{Q}$ is then treated as a defect in the bulk geometry. \subsection{Defect extremal surface} For the modified bulk picture with defect conformal matter on $\mathbb{Q}$, the entanglement entropy of an interval $A$ in the original BCFT$_2$ involves contributions from the defect matter, and the usual RT formula \cite{Ryu:2006bv} is modified to the defect extremal surface (DES) formula \cite{Deng:2020ent, Chu:2021gdb} given as \begin{align} S_{\text{DES}}(A)=\underset{\Gamma_A,X}{\text{min}~\text{ext}}\left[\frac{\mathcal{A}\left(\Gamma_A\right)}{4G_N}+S_{\text{defect}}(D)\right]~~,~~X=\Gamma_A\cap D\, , \end{align} where $\Gamma_A$ is a co-dimension two extremal surface homologous to the subsystem $A$ and $D$ is the defect region along the EOW brane $\mathbb{Q}$ as depicted in \cref{fig:DES-EE}. For an interval $A=[0,L]$ in the BCFT$_2$, the generalized entanglement entropy corresponding to a defect $D=[- a,0]$ on the brane CFT$_2$ may be computed through the DES formula as follows\footnote{Note that we are using the standard geodesic length formula for Poincar\'e AdS$_3$ instead of the AdS/BCFT techniques employed in \cite{Deng:2020ent,Chu:2021gdb} as both the procedures lead to the same answer and are therefore complementary.} \cite{Deng:2020ent} \begin{align} S_{\text{gen}}(a)&=\frac{\mathcal{A}\left(\Gamma_A\right)}{4G_N}+S_{\text{defect}}([-a,0])\notag\\ &=\frac{\ell}{4G_N}\cosh^{-1}\left[\frac{(L+a\sin\theta_0)^2+(a\cos\theta_0)^2}{2 \epsilon \,a \cos\theta_0}\right]+\frac{c}{6}\log\left(\frac{2\ell}{\epsilon_y\cos\theta_0}\right), \end{align} Note that the defect contribution to the generalized entropy is a constant which implies that the defect extremal surface is same as the RT surface for the subsystem $A$. Extremization with respect to the position $a$ of the defect leads to the entanglement entropy of the subsystem $A$ as follows \begin{align} S_{\text{DES}}([0,L])=\frac{c}{6}\left[\log\left(\frac{2L}{\epsilon}\right)+\tanh^{-1}(\sin\theta_0)+\log\left(\frac{2\ell}{\epsilon_y\cos\theta_0}\right)\right]\,.\label{DES_EE-example} \end{align} where both the central charges of the original BCFT and the defect CFT$_2$ are taken to be equal\footnote{Note that, the equality of the two central charges is essential in order to relate the present bulk description to the effective $2d$ island scenario which involves a CFT$_2$ on the complete hybrid manifold.} to $c$. \begin{figure}[h!] \centering \includegraphics[scale=0.6]{DES-EE-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement entropy of a subsystem $A$. Figure modified from \cite{Deng:2020ent}.} \label{fig:DES-EE} \end{figure} \subsection{Effective description and boundary island formula} The lower dimensional effective semi-classical theory for the bulk configuration described above may be obtained through a combination of a partial Randall-Sundrum reduction \cite{Karch:2000ct,Randall:1999vf} and the usual AdS/BCFT duality \cite{Maldacena:1997re}. As described in \cite{Deng:2020ent, Chu:2021gdb, Li:2021dmf}, this is implemented by dividing the AdS$_3$ bulk into two parts through the insertion of an imaginary co-dimension one surface $\mathbb{Q}'$ orthogonal to the asymptotic boundary, with transparent boundary conditions. The portion of the bulk enclosed between $\mathbb{Q}$ and $\mathbb{Q}'$ is dimensionally reduced along the $\rho$ direction using a partial Randall-Sundrum reduction thereby obtaining a effective $2d$ gravitational theory coupled with the matter CFT$_2$ on $\mathbb{Q}$. On the other hand, the rest of the bulk is dual to the original BCFT$_2$ on the half line $x\geq 0$ from the usual AdS/BCFT duality. The transparent boundary conditions along $\mathbb{Q}'$ naturally glues the gravity theory on $\mathbb{Q}$ and the BCFT$_2$ on the half line $x\geq 0$, leading to an effective $2d$ semi-classical theory on a hybrid manifold, similar to that considered in \cite{Almheiri:2019hni, Almheiri:2019qdq}. In the effective semi-classical description described above, one may utilize the island formula \cite{Almheiri:2019hni, Almheiri:2019qdq} to compute the entanglement entropy. For a subsystem $A=[0,L]$ in the flat CFT$_2$ on the asymptotic boundary, an island region $I_A=[-a,0]$ appears in the gravitational sector on the EOW brane $\mathbb{Q}$. The entanglement entropy is obtained by extremizing the generalized entropy functional as \begin{align} S_{\text{bdy}}=\underset{a}{\text{ext}}\,S_{\text{gen}}(a)&=\underset{a}{\text{ext}}\left[\mathcal{A}(y=-a)+S_{\text{matter}}([-a,L])\right]\notag\\ &=\frac{c}{6}\tanh^{-1}(\sin\theta_0)+\frac{c}{6}\log\left(\frac{4L\ell}{\epsilon\,\epsilon_y\cos\theta_0}\right)\,. \end{align} The first term in the above expression is due to the constant area of the quantum extremal surface in the AdS$_3$/BCFT$_2$ framework, given as \cite{Deng:2020ent} \begin{align} \mathcal{A}(\partial I_A)\equiv\frac{\rho_0}{4G_N}=\frac{\ell}{4G_N}\tanh^{-1}(\sin\theta_0)\,,\label{area-term} \end{align} where $\theta_0$ is the angle of the EOW brane with the vertical. It is observed from the above that the island formula leads to the same expression for the entanglement entropy as the DES result in \cref{DES_EE-example}. In other words, the DES formula may be considered as the doubly holographic counterpart of the island formula in the defect AdS/BCFT framework. \subsection{Entanglement negativity} \label{sec:EN-review} In this subsection, we will briefly review the salient features of the mixed state entanglement measure termed the entanglement negativity and its holographic characterization in the context of AdS$_3$/CFT$_2$ scenario. In a seminal work \cite{Vidal:2002zz}, Vidal and Werner introduced the computable mixed state entanglement measure, the entanglement negativity which is defined as the trace norm of the density matrix partially transposed with respect to one of the subsystems. \begin{comment} In this context, consider a tripartite pure state consisting of subsystems $A_1$, $A_2$ and $B$. Subsequently the subsystem $B$ is traced out to obtain the bipartite mixed state described by the density matrix $\rho_A = \text{Tr}_B \rho$ where $A \equiv A_1 \cup A_2$ and $\rho$ describes the original tripartite pure state. The entanglement negativity is then given by \begin{equation}\label{EN-defn} \mathcal{E} = \log \text{Tr} || \rho_A^{T_2} ||, \end{equation} where the trace norm $\text{Tr} || \rho_A^{T_2} ||$ is defined as the sum of the absolute eigenvalues of $\rho_A^{T_2}$. The partial transpose of a density matrix $\rho_A$ is described by \begin{equation}\label{partial-transpose} \mel{e_i^{(1)} e_j^{(2)}}{\rho_A^{T_2}}{e_k^{(1)} e_l^{(2)}} = \mel{e_i^{(1)} e_l^{(2)}}{\rho_A}{e_k^{(1)} e_j^{(2)}}, \end{equation} where $\ket{e_i^{(1)}}$ and $\ket{e_j^{(2)}}$ form the basis vectors of the Hilbert spaces $\mathcal{H}_1$ and $\mathcal{H}_2$ corresponding to subsystems $A_1$ and $A_2$ respectively. \end{comment} In \cite{Calabrese:2012ew, Calabrese:2012nk, Calabrese:2014yza}, replica techniques were developed to obtain the entanglement negativity for subsystems in CFT$_2$s which involved the even parity $n_e$ of the replica index. The entanglement negativity was obtained through the analytic continuation of the replica index $n_e \to 1$ as follows \begin{equation} \mathcal{E} = \lim_{n_e \to 1} \log \text{Tr} (\rho_{AB}^{T_B})^{n_e} , \end{equation} where the superscript $T_B$ denotes partial transposition with respect to the subsystem $B$. The trace $\text{Tr} (\rho_{AB}^{T_B})^{n_e}$ may be expressed as a twist field correlator in the CFT$_2$, corresponding to the bipartite state under consideration. As an example, we consider the generic bipartite mixed state of two disjoint intervals $A = [u_1, v_1]$ and $B = [u_2, v_2]$ in a CFT$_2$. The trace $\text{Tr} (\rho_{AB}^{T_B})^{n_e}$ is then given by the following four-point correlator of \textit{twist fields}, \begin{equation} \text{Tr} (\rho_{AB}^{T_B})^{n_e} = \langle \mathcal{T}_{n_e} (u_1) \bar{\mathcal{T}}_{n_e} (v_1) \bar{\mathcal{T}}_{n_e} (u_2) \mathcal{T}_{n_e} (v_2) \rangle_{\text{CFT}^{\bigotimes n_e}}\,, \end{equation} where the twist fields $\mathcal{T}_{n_e}$ and $\bar{\mathcal{T}}_{n_e}$ are primary fields with conformal dimensions \begin{align} \Delta_{n_e}=\frac{c}{12}\left(n_e-\frac{1}{n_e}\right)\,. \end{align} Subsequently, in a series of works \cite{Chaturvedi:2016rft, Chaturvedi:2016rcn, Jain:2017aqk, Malvimat:2018txq}, several holographic proposals for the entanglement negativity were proposed for specific bipartite mixed states. These proposals involved appropriate algebraic sums of the lengths of codimension two bulk static minimal surfaces homologous to various subsystems describing the mixed state. In particular, for two disjoint intervals $A$ and $B$ sandwiching another interval $C$ in a CFT$_2$, the holographic entanglement negativity may be obtained geometrically in the context of the AdS$_3$/CFT$_2$ correspondence as follows \cite{Malvimat:2018txq} \begin{align} \mathcal{E}(A:B)=\frac{3}{16 G_N}\left(\mathcal{L}_{AC}+\mathcal{L}_{BC}-\mathcal{L}_{C}-\mathcal{L}_{ABC}\right)\,,\label{HEN-disj-basic} \end{align} where $\mathcal{L}_X$ denotes the length of the extremal curve homologous to subsystem $X$. The configuration of two adjacent intervals $A$ and $B$ may be obtained through the limit $C\to\emptyset$ of the above, and the holographic entanglement negativity is given as \cite{Jain:2017aqk} \begin{align} \mathcal{E}(A:B)=\frac{3}{16 G_N}\left(\mathcal{L}_{A}+\mathcal{L}_{B}-\mathcal{L}_{AB}\right)\,.\label{HEN-adj-basic} \end{align} Note that, these proposals have further been extended to various other holographic frameworks including flat holography \cite{Basu:2021axf}, anomalous AdS/CFT \cite{Basu:2022nds} as well as higher dimensional scenarios \cite{Jain:2017xsu, KumarBasak:2020viv, Mondal:2021kzj, Afrasiar:2021hld}. \section{Defect extremal surface for entanglement negativity}\label{sec:EN-DES} In this section, we propose the defect extremal surface (DES) formula for the entanglement negativity in the AdS/BCFT models which include defect conformal matter on the EOW brane \cite{Deng:2020ent, Chu:2021gdb, Li:2021dmf}. To begin with, we recall the semi-classical QES formula for the entanglement negativity involving entanglement islands in the lower dimensional effective picture discussed earlier. As described in \cite{KumarBasak:2020ams, KumarBasak:2021rrx}, the QES proposal for the entanglement negativity between two disjoint intervals in the effective boundary description\footnote{Note that, in this article, we use the nomenclature \textit{boundary description} and \textit{lower dimensional effective description} interchangeably.} is given by \begin{align} \mathcal{E}^{\text{bdy}}(A:B)=\text{min}~\underset{\Gamma=\partial I_A\cap \partial I_B}{\text{ext}}\left[\frac{3}{16 G_N}\Big(\mathcal{A}(\partial I_A)+\mathcal{A}(\partial I_B)-\mathcal{A}(\partial I_{AB})\Big)+\mathcal{E}^{\text{eff}}\left(A\cup I_A:B\cup I_B\right)\right],\label{QES-island} \end{align} where $I_A$ and $I_B$ are the entanglement negativity islands corresponding to subsystems $A$ and $B$, respectively. The entanglement negativity islands obeys the condition $I_A\cup I_B = I(A\cup B)$, where $I(A\cup B)$ denotes the entanglement entropy island for $A\cup B$, as illustrated in \cref{fig:EN-QES}. Furthermore, the extremization in the QES formula is performed over the location of the \textit{island cross-section} $\Gamma\equiv\partial I_A\cap \partial I_B$. \begin{figure}[h!] \centering \includegraphics[scale=0.65]{EN-QES-eps-converted-to.pdf} \caption{Schematics of the quantum extremal surface for the entanglement negativity between two disjoint intervals $A$ and $B$, where $I_A$ and $I_B$ are the entanglement negativity islands satisfying the constraint $I_A\cup I_B = I(A\cup B)$. The island cross-section is given by $\Gamma\equiv\partial I_A\cap \partial I_B$. In the double holographic picture described in \cite{KumarBasak:2020ams}, the $3d$ bulk entanglement wedge cross section ending at the point $\Gamma$ on the EOW brane $\mathbb{Q}$ splits the entanglement wedge corresponding to $A\cup B$ into two parts $\mathcal{A}$ and $\mathcal{B}$. Figure modified from \cite{Li:2021dmf}.} \label{fig:EN-QES} \end{figure} In this context, utilizing the constraint $I_A\cup I_B = I(A\cup B)$, the algebraic sum of the area contributions in \cref{QES-island} may be reduced to that corresponding to the island cross-section $\Gamma$. Hence, the QES formula may be expressed as \cite{KumarBasak:2020ams} \begin{align} \mathcal{E}^{\text{bdy}}(A:B)=\text{min}~\underset{\Gamma}{\text{Ext}}\left[\frac{3}{8 G_N}\,\mathcal{A}\left(\Gamma=\partial I_A\cap \partial I_B\right)+\mathcal{E}^{\text{eff}}\left(A\cup I_A:B\cup I_B\right)\right]\,.\label{EN_QES} \end{align} Inspired by the holographic characterizations for the entanglement negativity described earlier, we now propose DES formulae to obtain the entanglement negativity in the doubly holographic framework of the defect AdS$_3$/BCFT$_2$ scenario. In the presence of the bulk defect theory, the entanglement negativity for a bipartite mixed state $\rho_{AB}$ in the dual BCFT$_2$ involves corrections from the bulk matter fields. Following \cite{Faulkner:2013ana, Engelhardt:2014gca}, the effective matter contribution is given by the bulk entanglement negativity between the regions $\mathcal{A}$ and $\mathcal{B}$ which are obtained by splitting the codimension one region dual to $\rho_{AB}$ via the entanglement wedge cross section\footnote{Note that a defect extremal surface formula for the reflected entropy was developed in \cite{Li:2021dmf} utilizing a similar construction. Furthermore, the authors in \cite{Li:2021dmf} demonstrated the equivalence of the DES and QES formulae for the reflected entropy in the framework of defect AdS$_3$/BCFT$_2$.}. For the bipartite mixed state configuration described by two disjoint intervals $A$ and $B$ in the dual CFT$_2$, the $3d$ bulk dual DES formula for the entanglement negativity is therefore given by \begin{align} \mathcal{E}^{\text{bulk}}(\mathcal{A}:\mathcal{B})=\text{min}~\underset{\Gamma}{\text{Ext}}\left[\frac{3}{16 G_N}\Big(\mathcal{L}(\gamma_{AC})+\mathcal{L}(\gamma_{BC})-\mathcal{L}(\gamma_{C})-\mathcal{L}(\gamma_{ABC})\Big)+\mathcal{E}^{\text{eff}}\left(\mathcal{A}:\mathcal{B}\right)\right],\label{DES-disj} \end{align} \begin{comment} ***************************** Inspired by the above QES formula for entanglement negativity, we now propose DES formula for the entanglement negativity of two disjoint intervals $A$ and $B$ (in proximity) in the bulk description as follows \begin{align} \mathcal{E}^{\text{bulk}}(\mathcal{A}:\mathcal{B})=\text{min}~\underset{\Gamma}{\text{Ext}}\left[\frac{3}{16 G_N}\Big(\mathcal{L}(\gamma_{AC})+\mathcal{L}(\gamma_{BC})-\mathcal{L}(\gamma_{C})-\mathcal{L}(\gamma_{ABC})\Big)+\mathcal{E}^{\text{eff}}\left(\mathcal{A}:\mathcal{B}\right)\right],\label{DES-disj} \end{align} \end{comment} where $\mathcal{L}(\gamma_X)$ is the length of the bulk extremal curve homologous to the interval $X$ on the boundary CFT$_2$ and $\mathcal{E}^{\text{eff}}\left(\mathcal{A}:\mathcal{B}\right)$ denotes the effective entanglement negativity between the quantum matter fields inside the bulk regions $\mathcal{A}$ and $\mathcal{B}$. The bulk effective term in \cref{DES-disj} reduces to the effective entanglement negativity between the entanglement negativity islands $I_A$ and $I_B$ on the EOW brane as the conformal matter is present only on the EOW brane. Note that if the intervals are far away such that their entanglement wedges are disconnected, the contributions coming from the combination of bulk extremal curves vanishes identically due to phase transitions to other entropy saddles \cite{Malvimat:2018ood}. \begin{figure}[h!] \centering \includegraphics[scale=0.65]{EN-DES-eps-converted-to.pdf} \caption{Schematics of the defect extremal surfaces for the entanglement negativity between two disjoint intervals $A$ and $B$. $I_A$ and $I_B$ denote the entanglement negativity islands corresponding to $A$ and $B$, respectively. The interval $C$ sandwiched between $A$ and $B$ does not have an island.} \label{fig:EN-DES} \end{figure} The DES formula for two adjacent intervals $A$ and $B$ in the bulk description may be obtained from \cref{DES-disj} through the limit $C\to\emptyset$ as follows \begin{align} \mathcal{E}^{\text{bulk}}(\mathcal{A}:\mathcal{B})=\text{min}~\underset{\Gamma}{\text{Ext}}\left[\frac{3}{16 G_N}\Big(\mathcal{L}(\gamma_{A})+\mathcal{L}(\gamma_{B})-\mathcal{L}(\gamma_{AB})\Big)+\mathcal{E}^{\text{eff}}\left(\mathcal{A}:\mathcal{B}\right)\right].\label{DES-adj} \end{align} In the following we will compute the entanglement negativity for various bipartite mixed states in a defect BCFT$_2$ through the island and the DES formulae and find exact agreement between the bulk and the boundary results. \section{Entanglement negativity on a fixed time slice}\label{sec:EN-static} \subsection{Two disjoint intervals}\label{sec:disj} In this subsection we focus on the computation of the entanglement negativity for the bipartite mixed state of two disjoint intervals $A=[b_1,b_2]$ and $B=[b_3,\infty]$ on a static time-slice in the defect AdS$_3$/BCFT$_2$ framework. There are three possible phases for the entanglement negativity for this mixed state configuration based on the subsystem sizes, which we investigate below. \subsubsection{Phase-I}\label{sec:disj-1} \subsubsection*{Boundary description} In this phase, the interval $C$ separating the two disjoint intervals $A$ and $B$ is large\footnote{Note that, in this phase the interval $C$ has an entanglement island. In the bulk description, this corresponds to a disconnected entanglement wedge for $A\cup B$.\label{footnote-Cisland}} and the interval $A$ is small enough such that it does not possess an entanglement entropy island. Consequently, there is no non-trivial island cross-section on the EOW brane as shown in \cref{fig:Disj-phase1}. Hence $\Gamma=\emptyset$, and the area term in the QES formula \cref{EN_QES} vanishes, namely $\mathcal{A}(\Gamma)=0$. \begin{figure}[H] \centering \begin{subfigure}[b]{0.51\textwidth} \centering \includegraphics[width=\textwidth]{Disj-phase1-qes-eps-converted-to.pdf} \caption{QES} \label{fig:Disj-phase1-qes} \end{subfigure} \hfill \begin{subfigure}[b]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{Disj-phase1-des-eps-converted-to.pdf} \caption{DES} \label{fig:Disj-phase1-des} \end{subfigure} \caption{Schematics of the defect extremal surface for the entanglement negativity between two disjoint intervals $A$ and $B$ in phase-I.} \label{fig:Disj-phase1} \end{figure} The effective semi-classical entanglement negativity in this phase may be obtained through a correlation function of twist operators located at the endpoints of the intervals as follows \begin{align} \mathcal{E}^{\text{eff}}\left(A:B\cup I_B\right)&=\lim_{n_e\to 1}\log\Big[\left(\epsilon_y \,\Omega(-b_3)\right)^{\Delta_{n_e}}\left<\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(b_2)\bar{\mathcal{T}}_{n_e}(b_3)\mathcal{T}_{n_e}(-b_3) \right>_{\mathrm{CFT}^{\bigotimes n_e}}\Big]\notag\\ &\approx \lim_{n_e\to 1}\log \left[\left(\epsilon_y \,\Omega(-b_3)\right)^{\Delta_{n_e}}\left<\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(b_2)\right>_{n_e}\left<\bar{\mathcal{T}}_{n_e}(b_3)\mathcal{T}_{n_e}(-b_3)\right>_{n_e}\right]\notag\\ &=0\,,\label{Disj-1-bdy} \end{align} where $\epsilon_y$ is the UV cut-off on the EOW brane $\mathbb{Q}$ and the warp factor $\Omega$ is given by \cite{Deng:2020ent} \begin{align} ds^2_{\text{brane}}=\Omega^{-2}(y)ds^2_{\text{flat}}~~,~~\Omega(-b_3)=\left|\frac{b_3\cos\theta_0}{\ell}\right|\,.\label{warp-factor} \end{align} In the second equality of \cref{Disj-1-bdy}, we have factorized the given four-point function utilizing the corresponding OPE channels. Consequently, in this phase the total entanglement negativity for the two disjoint intervals in the boundary description is vanishing. \subsubsection*{Bulk description} The dual bulk description for this phase has a disconnected entanglement wedge and hence we have $\Gamma=\emptyset$ similar to the boundary description. Furthermore, as the bulk matter fields are only localized on the EOW brane $\mathbb{Q}$ and $A$ has no corresponding island, the effective entanglement negativity between bulk quantum matter fields also vanishes as follows \begin{align} \mathcal{E}^{\text{eff}}\left(\mathcal{A}:\mathcal{B}\right)= \mathcal{E}^{\text{eff}}\left(\emptyset:I_{B}\right)\equiv 0\,.\label{eff-vanish} \end{align} Hence, in the bulk description the holographic entanglement negativity is entirely given by the contribution from the areas of the defect extremal surfaces. The lengths of the bulk DES homologous to various subsystems are given by \begin{align} &\mathcal{L}_{AC}=\mathcal{L}_1+\mathcal{L}_3~~~~,~~~~\mathcal{L}_{BC}=\mathcal{L}_2+\mathcal{L}_4\notag\\ &\mathcal{L}_{C}=\mathcal{L}_2+\mathcal{L}_3~~~~~\,\,,~~~~\mathcal{L}_{ABC}=\mathcal{L}_1+\mathcal{L}_4\,. \end{align} Now utilizing the bulk DES formula for the entanglement negativity for two disjoint intervals in \cref{DES-disj}, we obtain \begin{align} \mathcal{E}^{\text{bulk}}(\mathcal{A}:\mathcal{B})&=\frac{3}{16G_N}\left(\mathcal{L}_{AC}+\mathcal{L}_{BC}-\mathcal{L}_{C}-\mathcal{L}_{ABC}\right)=0\,. \end{align} Therefore, the boundary and bulk description match trivially, leading to a vanishing entanglement negativity in this phase. \subsubsection{Phase-II}\label{sec:disj-2} \subsubsection*{Boundary description} Next we turn our attention towards the phase where the interval $A$ still does not possess an island, but the interval $C$ sandwiched between $A$ and $B$ is small and is therefore does not lead to an entanglement entropy island as well (cf. \cref{footnote-Cisland}). In this phase, there is no non-trivial island cross-section as depicted in \cref{fig:Disj-phase2} and hence the area term in \cref{EN_QES} vanishes identically. On the other hand, the effective semi-classical entanglement negativity is given by \begin{align} \mathcal{E}^{\text{eff}}\left(A:B\cup I_B\right)&=\lim_{n_e\to 1}\log\Big[\left(\epsilon_y \,\Omega(-b_1)\right)^{\Delta_{n_e}}\left<\mathcal{T}_{n_e}(-b_1)\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(b_2)\bar{\mathcal{T}}_{n_e}(b_3) \right>_{\mathrm{CFT}^{\bigotimes n_e}} \Big].\label{en-qes-phase2} \end{align} As described in \cite{Kulaxizi:2014nma, Malvimat:2018txq, Malvimat:2018ood}, in the large-central charge limit the above four-point correlation function of the twist operators has the following form \begin{align} \left<\mathcal{T}_{n_e}(-b_1)\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(b_2)\bar{\mathcal{T}}_{n_e}(b_3) \right>_{\mathrm{CFT}^{\bigotimes n_e}}=(1-x)^{\hat{\Delta}}\label{large-c} \end{align} where the conformal dimension $\hat{\Delta}$ corresponding to the dominant Virasoro conformal block, and the cross-ratio $x$ are given as \begin{align} \hat{\Delta}=\frac{c}{6}\left(\frac{n_e}{2}-\frac{2}{n_e}\right)~~,~~x=\frac{(b_2-b_1)(b_3+b_1)}{(b_2+b_1)(b_3-b_1)}.\label{h-x} \end{align} We may now obtain the the entanglement negativity for this phase in the boundary description by substituting \cref{large-c,h-x} in \cref{en-qes-phase2} to be \begin{align} \mathcal{E}^{\text{bdy}}(A:B)=\frac{c}{4}\log\left[\frac{(b_1+b_2)(b_3-b_1)}{2b_1 (b_3-b_2)}\right]\,.\label{disj2-QES-fin} \end{align} \subsubsection*{Bulk description} From the bulk perspective, in this phase the entanglement wedge corresponding to $A\cup B$ is connected. However, as the interval $A$ does not have an island, the minimal entanglement wedge cross-section does not meet the EOW brane $\mathbb{Q}$ resulting in a trivial island cross section $\Gamma=\emptyset$. Hence, the effective entanglement negativity between the bulk quantum matter fields vanishes similar to \cref{eff-vanish}. \begin{figure}[H] \centering \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{Disj-phase2-qes-eps-converted-to.pdf} \caption{QES} \label{fig:Disj-phase2-qes} \end{subfigure} \hfill \begin{subfigure}[b]{0.49\textwidth} \centering \includegraphics[width=\textwidth]{Disj-phase2-des-eps-converted-to.pdf} \caption{DES} \label{fig:Disj-phase2-des} \end{subfigure} \caption{Schematics of the defect extremal surface for the entanglement negativity between two disjoint intervals $A$ and $B$ in phase II.} \label{fig:Disj-phase2} \end{figure} The bulk entanglement negativity consists of the contributions from the combination of the defect extremal surfaces as depicted in \cref{fig:Disj-phase2-des}. Now utilizing \cref{DES-disj}, we may obtain the entanglement negativity between $A$ and $B$ in this phase as follows \begin{align} \mathcal{E}^{\text{bulk}}(\mathcal{A}:\mathcal{B})&=\frac{3}{16G_N}\left[\mathcal{L}_3+(\mathcal{L}_2+\mathcal{L}_5)-\mathcal{L}_4-(\mathcal{L}_1+\mathcal{L}_5)\right]\notag\\ &=\frac{3}{16G_N}\left(\mathcal{L}_2+\mathcal{L}_3-\mathcal{L}_1-\mathcal{L}_4\right)\label{disj-ph2-bulk} \end{align} In the framework of defect AdS$_3$/BCFT$_2$ \cite{Deng:2020ent, Chu:2021gdb, Li:2021dmf}, it was observed that the defect extremal surfaces have the same structure as the corresponding RT surfaces since the contribution from the defect matter fields turned out to be constant. The lengths of the defect extremal surfaces $\mathcal{L}_3$ and $\mathcal{L}_4$ in \cref{disj-ph2-bulk} are given by \cite{Ryu:2006bv,Takayanagi:2011zk} \begin{align} \mathcal{L}_3=2 \ell\,\log\left(\frac{b_3-b_1}{\epsilon}\right)~~,~~\mathcal{L}_4=2\ell\,\log\left(\frac{b_3-b_2}{\epsilon}\right)\,,\label{L3-L4} \end{align} where $\epsilon$ is a UV cut-off in the dual BCFT$_2$. As described in \cite{Deng:2020ent, Chu:2021gdb}, the length of the defect extremal surface $\mathcal{L}_1$ ending on the brane $\mathbb{Q}$ is given by \begin{align} \mathcal{L}_1=\ell\,\log\left(\frac{2b_1}{\epsilon}\right)+\ell\,\tanh^{-1}(\sin\theta_0)\,.\label{L1-disj2} \end{align} Furthermore, the length of the defect extremal surface $\mathcal{L}_2$ may be obtained as follows \cite{Ryu:2006bv} \begin{align} \mathcal{L}_2=\ell\,\cosh^{-1}\left[\frac{(b_2+b_1\sin\theta_0)^2+(b_1\cos\theta_0)^2}{2 \epsilon (b_1\cos\theta_0)}\right]\,. \end{align} Note that, in this phase the interval $A$ is very small and therefore we may approximate the above length in the following way \begin{align} \mathcal{L}_2=\ell\,\cosh^{-1}\left(\frac{b_2^2+b_1^2+2b_1b_2\sin\theta_0}{b_2^2-b_1^2}\right)+\ell\,\log\left(\frac{b_2^2-b_1^2}{\epsilon b_1}\right)\,. \end{align} Now utilizing the identity $\cosh^{-1}\,x+\cosh^{-1}\,y=\cosh^{-1}\left(xy+\sqrt{(x^2-1)(y^2-1)}\right)$ we finally obtain \begin{align} \mathcal{L}_2&=\ell\left[\cosh^{-1}\left(\frac{b_2^2-b_1^2}{b_2^2-b_1^2}\right)+\log\left(\frac{b_2^2-b_1^2}{\epsilon b_1}\right)+\cosh^{-1}\left(\frac{1}{\cos\theta_0}\right)\right]\notag\\ &=\ell\,\log\left(\frac{(b_1+b_2)^2}{\epsilon b_1}\right)+\ell\,\tanh^{-1}(\sin\theta_0)\,.\label{L2-final-ph2} \end{align} Substituting \cref{L2-final-ph2,L2-final-ph2,L3-L4} in \cref{disj-ph2-bulk} we may now obtain the entanglement negativity between $A$ and $B$ in the bulk description as follows \begin{align} \mathcal{E}^{\text{bulk}}(\mathcal{A}:\mathcal{B})=\frac{3\ell}{4G_N}\log\left[\frac{(b_1+b_2)(b_3-b_1)}{2b_1 (b_3-b_2)}\right]\,. \end{align} Upon employing the Brown-Henneaux formula \cite{Brown:1986nw}, we observe an exact matching with the island result in \cref{disj2-QES-fin}. \subsubsection{Phase-III}\label{sec:disj-3} \subsubsection*{Boundary description} In the final phase both the intervals $A$ and $B$ are large enough to posses entanglement islands $I_A\equiv[-a,-a']$ and $I_B\equiv[-a',-\infty]$ respectively. They are also considered to be in proximity such that they have a connected entanglement wedge as shown in \cref{fig:Disj-phase3-QES}. The area term in \cref{EN_QES} for the island cross-section $\Gamma \equiv \partial I_A \cap \partial I_B$ is then given as \cite{Deng:2020ent, Chu:2021gdb, Li:2021dmf} \begin{align}\label{area-disj3} \mathcal{A}(\Gamma)=\frac{\ell}{4G_N}\tanh^{-1}(\sin\theta_0)\,, \end{align} The semi-classical effective entanglement negativity may be obtained in terms of the following five-point twist correlator \begin{align} \mathcal{E}^{\text{eff}}\left(A\cup I_A:B\cup I_B\right)=\lim_{n_e\to 1}\log\Big[&\left(\epsilon_y\Omega(-a)\right)^{\Delta_{n_e}}\left(\epsilon_y\Omega(-a')\right)^{\Delta_{n_e}^{(2)}}\notag\\ &\times\left<\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(-a)\bar{\mathcal{T}}_{n_e}(b_2)\mathcal{T}_{n_e}^2(-a')\bar{\mathcal{T}}_{n_e}(b_3)\right>_{\mathrm{CFT}^{\bigotimes n_e}}\Big],\label{eff-neg-disj3} \end{align} where $\epsilon_y$ is a UV regulator on the AdS$_2$ brane $\mathbb{Q}$ and the warp factor $\Omega(-a')$ is given in \cref{warp-factor}. The five-point twist correlator in \cref{eff-neg-disj3} have the following factorization \cite{KumarBasak:2020ams} in the corresponding OPE channel \begin{align} &\left<\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(-a)\bar{\mathcal{T}}_{n_e}(b_2)\mathcal{T}_{n_e}^2(-a')\bar{\mathcal{T}}_{n_e}(b_3)\right> \approx \left<\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}_{n_e}(-a)\right>\left<\bar{\mathcal{T}}_{n_e}(b_2)\mathcal{T}_{n_e}^2(-a')\bar{\mathcal{T}}_{n_e}(b_3)\right>\notag\\ &\qquad \qquad \qquad \qquad \qquad \qquad \qquad =\frac{1}{(a+b_1)^{2\Delta_{n_e}}}\frac{C_{\bar{\mathcal{T}}_{n_e}\mathcal{T}^2_{n_e}\bar{\mathcal{T}}_{n_e}}}{(b_3+a')^{\Delta_{n_e}^{(2)}}(b_2+a')^{\Delta_{n_e}^{(2)}}(b_3-b_2)^{2\Delta_{n_e}-\Delta_{n_e}^{(2)}}},\label{factorization} \end{align} \begin{figure}[ht] \centering \includegraphics[scale=0.6]{Disj-phase3-QES-eps-converted-to.pdf} \caption{Schematics of the quantum extremal surface for the entanglement negativity between two disjoint intervals $A$ and $B$ in phase-III. In this phase, we have a non-trivial island cross-section on the brane at coordinate $a'$.} \label{fig:Disj-phase3-QES} \end{figure} where $\Delta_{n_e}$ and $\Delta_{n_e}^{(2)}$ are the conformal dimensions of the twist operators $\mathcal{T}_{n_e}$ and $\mathcal{T}_{n_e}^2$ respectively and are given as \cite{Calabrese:2012ew, Calabrese:2012nk} \begin{align} \Delta_{n_e}=\frac{c}{12}\left(1-\frac{1}{n_e}\right)~~,~~\Delta_{n_e}^{(2)}=\frac{c}{6}\left(\frac{n_e}{2}-\frac{2}{n_e}\right)\,.\label{Conformal-dim} \end{align} Note that the point $a$ on the brane is determined by the DES for the subsystem $A$ to be $a=b_1$ \cite{Deng:2020ent}. Therefore, by utilizing the contractions in \eqref{factorization} along with the areas term in \cref{area-disj3}, we may obtain the generalized negativity in the boundary description from \cref{QES-island} to be \begin{align} \mathcal{E}^{\text{bdy}}_{\text{gen}}(A:B)=\frac{c}{4}\left[\tanh^{-1}(\sin\theta_0)+\log\frac{\ell(b_2+a')(b_3+a')}{a'(b_3-b_2)\epsilon_y\cos\theta_0}\right].\label{disj3-QES-N-ext} \end{align} The extremization with respect to the island cross-section $\Gamma$ with the coordinate $a'$ on the brane leads to \begin{align} \partial_{a'}\,\mathcal{E}^{\text{bdy}}_{\text{gen}}=0~~\implies~~ a'=\sqrt{b_2b_3} \, ~. \end{align} Substituting this into \cref{disj3-QES-N-ext}, we may obtain the total entanglement negativity between $A$ and $B$ in phase-III from the boundary description to be \begin{align} \mathcal{E}^{\text{bdy}}(A:B)=\frac{c}{4}\left[\tanh^{-1}(\sin\theta_0)+\log\left(\frac{\sqrt{b_3}+\sqrt{b_2}}{\sqrt{b_3}-\sqrt{b_2}}\right)+\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)\right].\label{disj3-QES-fin} \end{align} \subsubsection*{Bulk description} The bulk description in phase-III consists of a connected entanglement wedge and the minimal cross-section ends on the EOW brane. The configuration is sketched in \cref{fig:Disj-phase3-DES}. Since the bulk quantum matter is entirely situated on the EOW brane, the effective entanglement negativity between the bulk quantum matter fields in the bulk regions $\mathcal{A}$ and $\mathcal{B}$ reduces to the effective matter negativity between the corresponding island regions $I_A$ and $I_B$, \begin{align} \mathcal{E}^{\text{eff}}\left(\mathcal{A}:\mathcal{B}\right)&\equiv\mathcal{E}^{\text{eff}}(I_A:I_B)=\lim_{n_e\to 1}\log\left[\left(\epsilon_y\Omega(-a')\right)^{\Delta_{n_e}^{(2)}}\left<\mathcal{T}_{n_e}(-b_1)\bar{\mathcal{T}}^2_{n_e}(-a')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\right], \end{align} where $\epsilon_y$ is the UV cut-off on the EOW brane and $\Omega$ is the conformal factor as given in \cref{warp-factor}. Utilizing the doubling trick \cite{Cardy:2004hm, Sully:2020pza} the above two-point function in the defect BCFT$_2$ may be reduced to a four-point correlator of chiral twist fields in a CFT$_2$ defined on the whole complex plane. As described in \cite{Sully:2020pza}, the four-point correlator in the chiral CFT$_2$ has two dominant channels depending on the cross-ratio as follows. \paragraph{I. BOE channel:} In this channel the two point correlator factorizes into two one-point functions in the BCFT$_2$ as follows \begin{align} \left<\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}^2_{n_e}(-a')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}&=\left<\mathcal{T}_{n_e}(-b_1)\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\left<\bar{\mathcal{T}}^2_{n_e}(-a')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\notag\\ &=\frac{\epsilon_y^{\Delta_{n_e}+\Delta_{n_e}^{(2)}}}{(2b_1)^{\Delta_{n_e}}(2a')^{\Delta_{n_e}^{(2)}}} \end{align} Therefore, the effective bulk entanglement negativity in this phase is given by \begin{align} \mathcal{E}^{\text{eff}}(I_A:I_B)=\frac{c}{4}\log\frac{2\ell}{\epsilon_y\cos\theta_0}\,.\label{BOE-neg} \end{align} Note that this effective entanglement negativity is equal to the R\'enyi entropy of order half for the interval $I_A$ (or $I_B$) which is consistent with the expectations from quantum information theory. \paragraph{II. OPE channel:} In this channel, the two-point correlator of twist fields on the BCFT$_2$ reduces to a three-point correlator of chiral twist fields on the full complex plane as follows \cite{Cardy:2004hm, Sully:2020pza, Li:2021dmf} \begin{align} \left<\mathcal{T}_{n_e}(-b_1)\bar{\mathcal{T}}^2_{n_e}(-a')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}&= \left<\bar{\mathcal{T}}_{n_e}(-b_1)\mathcal{T}_{n_e}(b_1)\bar{\mathcal{T}}^2_{n_e}(-a')\right>_{\mathrm{CFT}^{\bigotimes n_e}}\notag\\ &=\frac{C_{\bar{\mathcal{T}}_{n_e}\mathcal{T}^2_{n_e}\bar{\mathcal{T}}_{n_e}}}{(a'^2-b_1^2)^{\Delta_{n_e}^{(2)}}(2b_1)^{\Delta_{n_e}^{(2)}-2\Delta_{n_e}}}\,. \end{align} Therefore, the effective bulk entanglement negativity in this channel is given by \begin{align} \mathcal{E}^{\text{eff}}(I_A:I_B)=\frac{c}{4}\log\left[\frac{\ell (a'^2-b_1^2)}{a' b_1\epsilon_y\cos\theta_0}\right]\,. \end{align} \begin{figure}[ht] \centering \includegraphics[scale=0.65]{Disj-phase3-DES-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between two disjoint intervals $A$ and $B$ in phase-III. In this phase, the EWCS ends on the island cross-section $\Gamma$ on the EOW brane.} \label{fig:Disj-phase3-DES} \end{figure} As shown in \cref{fig:Disj-phase3-DES}, the contribution to the bulk entanglement negativity from the defect extremal surfaces homologous to different combinations of subsystems is given by \begin{align} &\frac{3}{16G_N}\left(\mathcal{L}_2+\mathcal{L}_4-\mathcal{L}_3\right)\notag\\ &=\frac{3\ell}{16G_N}\Bigg[\cosh^{-1}\left\{\frac{(b_2+a'\sin\theta_0)^2+(a'\cos\theta_0)^2}{2\epsilon (a'\cos\theta_0)}\right\}+\cosh^{-1}\left\{\frac{(b_3+a'\sin\theta_0)^2+(a'\cos\theta_0)^2}{2\epsilon (a'\cos\theta_0)}\right\}\notag\\&\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad-2\log\left(\frac{b_3-b_2}{\epsilon}\right)\Bigg] \end{align} The entanglement negativity between the disjoint intervals $A$ and $B$ is obtained by extremizing the generalized negativity over the position of the island cross-section $\Gamma$. For the OPE channel of the effective bulk entanglement negativity there is no extremal solution while for the BOE channel we obtain \begin{align} \partial_{a'}\,\mathcal{E}^{\text{bulk}}_{\text{gen}}=0~~\implies~~ a'=\sqrt{b_2b_3} \end{align} Substituting this and utilizing the proximity limit $b_3\to b_2$ in the intermediate step, we obtain the entanglement negativity between $A$ and $B$ in the bulk description as follows \begin{align} \mathcal{E}^{\text{bulk}}&=\frac{3\ell}{16G_N}\left[\cosh^{-1}\left(\frac{b_2+b_3+2\sqrt{b_2b_3}\sin\theta_0}{(b_3-b_2)\cos\theta_0}\right)\right]+\frac{c}{4}\log \left( \frac{2\ell}{\epsilon_y \cos \theta_0} \right)\notag\\ &=\frac{3\ell}{16G_N}\left[\log\left(\frac{\sqrt{b_3}+\sqrt{b_2}}{\sqrt{b_3}-\sqrt{b_2}}\right)+\cosh^{-1}\left(\frac{1}{\cos\theta_0}\right)\right]+\frac{c}{4}\log \left( \frac{2\ell}{\epsilon_y \cos \theta_0} \right) \end{align} The above expression for the holographic entanglement negativity matches exactly with the QES result in \cref{disj3-QES-fin} obtained through the island formula \cref{QES-island}. This provides yet another consistency check of our holographic construction for the entanglement negativity in the defect AdS$_3$/BCFT$_2$ scenario. \subsection{Two adjacent intervals} \label{sec:adj} Having computed the entanglement negativity for configurations involving two disjoint intervals, we now turn our attention to the mixed state of two adjacent intervals $A = [0,b_1]$ and $B = [b_1,b_2]$ on a fixed time-slice in the AdS$_3$/BCFT$_2$ model. The interval $A$ in this case always possess an entanglement island as it starts from the interface between the EOW brane and the asymptotic boundary. We however, have two possible phases for this case based on the size of the interval $B$ which are described below. \subsubsection{Phase-I}\label{sec:adj-1} \subsubsection*{Boundary description} For this phase, we consider that the interval $B$ is large enough to posses an entanglement island described as $I_B$ in \cref{fig:Adj-phase-1}. The area term in \cref{EN_QES} for the point $\Gamma = \partial I_A \cap \partial I_B$ is as given in \cref{area-term}. The effective semi-classical entanglement negativity is given by the following two point twist correlator \begin{equation}\label{qes-eff-adj-1} \begin{aligned} \mathcal{E}^\text{eff}(A \cup I_A : B \cup I_B)& = \lim_{n_e \to 1} \log \left[\left(\epsilon_y \, \Omega(-a)\right)^{\Delta_{n_e}^{(2)}}\left<\mathcal{T}^2_{n_e}(b_1)\bar{\mathcal{T}}^2_{n_e}(-a)\right>_{\mathrm{CFT}^{\bigotimes n_e}}\right] \\ & = \frac{c}{4} \log \left[ \frac{\ell (b_1 + a)^2}{\epsilon \, \epsilon_y \, a \cos \theta_0}\right], \end{aligned} \end{equation} where $\epsilon$ and $\epsilon_y$ are the UV cut-offs on the asymptotic boundary and the EOW brane $\mathbb{Q}$ respectively, and the warp factor $\Omega(a)$ is as given in \cref{warp-factor}. The point $a = b_1$ on the brane is determined through the entanglement entropy computation of the interval $A$. Using this in \cref{qes-eff-adj-1} along with the area term, we may obtain the total entanglement negativity in the boundary description to be \begin{equation} \label{qes-adj-1} \mathcal{E}^\text{bdy}(A:B) = \frac{c}{4} \left[\log \left( \frac{2 b_1}{\epsilon} \right) + \log \left( \frac{2\ell}{\epsilon_y \cos \theta_0} \right) + \tanh^{-1}(\sin \theta_0) \right], \end{equation} where we have used the Brown-Henneaux formula in the area term \cite{Brown:1986nw}. \begin{figure}[ht] \centering \includegraphics[scale=0.65]{Adj-phase-1-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between two adjacent intervals $A$ and $B$ in phase-I. $I_A$ and $I_B$ on the EOW brane describe the entanglement island corresponding to intervals $A$ and $B$ respectively.} \label{fig:Adj-phase-1} \end{figure} \subsubsection*{Bulk description} In the double holographic description, the entanglement wedge corresponding to the subsystem $A \cup B$ is connected in the bulk. The contribution to the effective entanglement negativity between the bulk matter fields in regions $\mathcal{A}$ and $\mathcal{B}$ arises solely from the quantum matter fields situated on the EOW brane as follows \begin{equation}\label{des-eff-adj-1} \begin{aligned} \mathcal{E}^\text{eff} (\mathcal{A} : \mathcal{B}) = \mathcal{E}^\text{eff} (I_A : I_B) &= \lim_{n_e \to 1} \log \left[\left(\epsilon_y \, \Omega(-a)\right)^{\Delta_{n_e}^{(2)}}\left<\mathcal{T}_{n_e}(-a')\bar{\mathcal{T}}^2_{n_e}(-a)\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\right]\\ & = \frac{c}{4} \log \left( \frac{2\ell}{\epsilon_y \cos \theta_0} \right) \, . \end{aligned} \end{equation} Utilizing \cref{DES-adj}, the total entanglement negativity for this case including the contribution from the combinations of the bulk extremal curves is obtained to be \begin{equation} \label{des-adj-1} \begin{aligned} \mathcal{E}^\text{bulk}(A : B) & = \mathcal{E}^\text{eff} (\mathcal{A} : \mathcal{B}) + \frac{3}{16 G_N} 2 \mathcal{L}_1\\ & = \frac{c}{4} \log \left( \frac{2\ell}{\epsilon_y \cos \theta_0} \right) + \frac{3\ell}{8 G_N} \left[\log \left( \frac{2 b_1}{\epsilon} \right) + \tanh^{-1}(\sin \theta_0) \right], \end{aligned} \end{equation} where we have used the fact that the entanglement entropy computation for the interval $A$ fixes $a = b_1$. On utilization of the Brown-Henneaux formula \cite{Brown:1986nw}, the above expression matches exactly with the result obtained from the boundary perspective in \cref{qes-adj-1}. \subsubsection{Phase-II}\label{sec:adj-2} \subsubsection*{Boundary description} For this phase, we now consider the case where the interval $B$ is small such that it lacks an entanglement entropy island as shown in \cref{fig:Adj-phase-2}. This implies that the island cross-section $\Gamma$ is a null set. The remaining effective semi-classical entanglement negativity is obtained through the following three point twist correlator \begin{equation} \label{qes-eff-adj-2} \begin{aligned} \mathcal{E}^\text{eff}(A \cup I_A : B \cup I_B)& = \lim_{n_e \to 1} \log \left[\left(\epsilon_y \, \Omega(-a)\right)^{\Delta_{n_e}}\left<\mathcal{T}_{n_e}(-a) \bar{\mathcal{T}}^2_{n_e}(b_1) \mathcal{T}_{n_e}(b_2)\right>_{\mathrm{CFT}^{\bigotimes n_e}}\right] \\ & = \frac{c}{4} \log \left[ \frac{(b_1 + a) (b_2 - b_1)}{(b_2 + a) \epsilon} \right]. \end{aligned} \end{equation} Again, the point on the AdS$_2$ brane $\mathbb{Q}$ is fixed to be $a = b_1$ through the entanglement entropy computation of the interval $A$. Utilizing this value of $a$, we may obtain the total entanglement negativity for this phase in the boundary description to be \begin{equation} \label{qes-adj-2} \mathcal{E}^\text{bdy}(A : B) = \frac{c}{4} \log \left[ \frac{2 b_1 (b_2 - b_1)}{(b_2 + b_1) \epsilon} \right]. \end{equation} \begin{figure}[ht] \centering \includegraphics[scale=0.65]{Adj-phase-2-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between two adjacent intervals $A$ and $B$ in phase-II. In this phase, the island of the interval $B$ is an empty set.} \label{fig:Adj-phase-2} \end{figure} \subsubsection*{Bulk description} For the bulk description of this phase, we observe in \cref{fig:Adj-phase-2} that the entanglement wedge for the subsystem $A \cup B$ is connected. However, since the interval $B$ does not have an entanglement island, the effective entanglement negativity term in \cref{DES-adj} vanishes. The only contribution to the total entanglement negativity comes from the lengths of the extremal curves labelled as $\mathcal{L}_i$ ($i=1,2,3$) in \cref{fig:Adj-phase-2}. To this end, we note that the lengths of the extremal curves $\mathcal{L}_1$ and $\mathcal{L}_2$ have the same form as given in \cref{L1-disj2,L3-L4} respectively. Using similar approximations as were employed for the bulk description in subsection \ref{sec:disj-2}, the length of the extremal curve $\mathcal{L}_3$ may be computed to be \begin{equation} \begin{aligned} \mathcal{L}_3 = \ell\,\log \left( \frac{(b_1+b_2)^2}{\epsilon b_1} \right) + \ell\,\tanh^{-1}(\sin \theta_0)\,, \end{aligned} \end{equation} where we have used $a = b_1$. We may now obtain the total entanglement negativity for this phase using \cref{DES-adj} to be \begin{equation} \label{des-adj-2} \mathcal{E}^\text{bdy}(A : B) = \frac{3\ell}{8 G_N} \log \left[ \frac{2 b_1 (b_2 - b_1)}{(b_2 + b_1) \epsilon} \right], \end{equation} which on utilization of the usual Brown-Henneaux formula \cite{Brown:1986nw} matches exactly with the result obtained through the boundary description in \cref{qes-adj-2}. \section{Time dependent entanglement negativity in black holes}\label{sec:Time-dependent-EN} In this section we investigate the nature of mixed state entanglement through the entanglement negativity in a time-dependent defect AdS$_3$/BCFT$_2$ scenario involving an eternal black hole in the effective two-dimensional description \cite{Li:2021dmf, Chu:2021gdb}. The lower dimensional effective model involves the appearance of entanglement islands during the emission of the Hawking radiation from the eternal black hole. \subsection{Review of the eternal black hole in AdS/BCFT} \label{sec:review-BH} As described in \cite{Li:2021dmf,Chu:2021gdb}, we consider a BCFT$_2$ defined on the half-plane $(x,\tau \geq 0)$. The corresponding bulk dual is described by the Poincar\'e AdS$_3$ geometry truncated by an end-of-the-world (EOW) brane located at the hypersurface $\tau=-z \tan\theta_0$. Here $\theta_0$ is the angle made by the EOW brane with the vertical, and $\tau$ and $z$ are the timelike\footnote{Note that in the Euclidean signature, there is no essential difference between the timelike and spacelike coordinates and the present parametrization is a convenient choice adapted in \cite{Li:2021dmf, Chu:2021gdb}.} and holographic coordinates respectively. Utilizing a global conformal map, the boundary of the BCFT$_2$ is then mapped to a circle \begin{align} x'^2+\tau'^2=1.\label{circle} \end{align} The bulk dual of such a global conformal transformation is given by the following Banados map \cite{Takayanagi:2011zk,Li:2021dmf,Chu:2021gdb} \begin{align} &\tau'=1+\frac{\tau-\frac{1}{2} \left(\tau^2+x^2+z^2\right)}{1-\tau+\frac{1}{4} \left(\tau^2+x^2+z^2\right)},\notag\\ &x'=\frac{x}{1-\tau+\frac{1}{4} \left(\tau^2+x^2+z^2\right)},\label{Banados}\\ &z'=\frac{z}{1-\tau+\frac{1}{4} \left(\tau^2+x^2+z^2\right)}\,.\notag \end{align} The EOW brane is mapped to a portion of a sphere under these bulk transformations, \begin{align} x'^2+\tau'^2+(z'+\tan\theta_0)^2=\sec^2\theta_0. \end{align} Note that, as the above transformation is a global conformal map, the metric in the bulk dual spacetime as well as the metric induced on the EOW brane are preserved under the Banados map \cref{Banados}. The schematics of this time-dependent AdS/BCFT scenario is depicted in \cref{fig:BH-model1}. Finally employing the partial Randall-Sundrum reduction combined with the AdS$_3$/BCFT$_2$ correspondence discussed in \cite{Li:2021dmf, Chu:2021gdb, Deng:2020ent}, one obtains a two-sided $(1+1)$-dimensional eternal black hole on the EOW brane which is coupled to the BCFT$_2$ outside the circle \cref{circle} in the $2d$ effective description. The schematics of the configuration is depicted in \cref{fig:BH-model-Lorentzian}. The hybrid manifold consisting of a $2d$ eternal black hole with a fluctuating geometry coupled to the flat BCFT$_2$ may conveniently be described in terms of the Rindler coordinates $(X,T)$ defined through \begin{align} x'=e^X \cosh T~~,~~t'\equiv-i\tau'=e^X \sinh T. \label{Rindler} \end{align} These Rindler coordinates naturally capture the near-horizon geometry of the $2d$ black hole \cite{Chu:2021gdb}. \begin{figure}[H] \centering \begin{subfigure}[b]{0.58\textwidth} \centering \includegraphics[width=\textwidth]{BH-model1-eps-converted-to.pdf} \caption{Euclidean AdS/BCFT with the BCFT defined outside the circle.} \label{fig:BH-model1} \end{subfigure} \hfill \begin{subfigure}[b]{0.41\textwidth} \centering \includegraphics[width=\textwidth]{BH-model2-eps-converted-to.pdf} \caption{2d eternal black hole in Lorentzian signature.} \label{fig:BH-model-Lorentzian} \end{subfigure} \caption{ } \label{fig:BH-model2} \end{figure} In the following, we will compute the entanglement negativity for various bipartite states involving two disjoint and two adjacent intervals in the time-dependent defect AdS/BCFT scenario discussed above. In this regard, we will employ the semi-classical island formula \cref{EN_QES} in the lower dimensional effective description as well as the doubly holographic defect extremal surface proposals in \cref{DES-disj,DES-adj} and find exact agreement between the two. \subsection{Entanglement negativity between black hole interiors} In this subsection, we compute the time-dependent entanglement negativity between different regions of the black hole interior. As described in \cite{Li:2021dmf,Chu:2021gdb} the black hole region $B$ is defined as the space-like interval from $Q \equiv (t'_0,-x'_0)$ to $P \equiv (t'_0,x'_0)$ as shown in \cref{fig:BH-BH-conn}. We perform the computations in the Euclidean signature with $\tau'_0=it'_0$ and subsequently obtain the final result in Lorentzian signature through an analytic continuation. Depending on the configuration of the extremal surface for the entanglement entropy of $B$, there are two possible phases for the extremal surfaces corresponding to the entanglement negativity between the black hole subsystems $B_L$ and $B_R$. \subsubsection{Connected phase} The connected phase corresponds to the scenario where there is no entanglement island for the radiation bath in the effective boundary description as shown in \cref{fig:BH-BH-conn}. From the bulk perspective, this corresponds to a connected extremal surface for $B_L \cup B_R$. In this phase, it is required to compute the entanglement negativity between the two adjacent intervals $B_L\equiv|O'Q|$ and $B_R\equiv |O'P|$, where the point $O'$ is dynamical as it resides on the EOW brane with a gravitational theory. \begin{figure}[ht] \centering \includegraphics[scale=.7]{BH-BH-conn-qes-eps-converted-to.pdf} \caption{Schematics of the quantum extremal surface for the entanglement negativity between black hole interiors in the connected phase at a constant time slice.} \label{fig:BH-BH-conn} \end{figure} \subsubsection*{Boundary description} In the $2d$ boundary description, the effective semi-classical entanglement negativity between $B_L$ and $B_R$ may be computed through the three-point correlation function of twist operators as follows \begin{align} \mathcal{E}^{\text{eff}}\left(B_L:B_R\right)=\lim_{n_e\to 1}\log \left[\left(\epsilon_y\Omega_{O'}\right)^{\Delta_{n_e}^{(2)}}\left<\mathcal{T}_{n_e}(Q)\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(P)\right>\right]\label{BH_BH_1}. \end{align} It is convenient to perform the computations in the un-primed coordinates $(y,x)$ given in \cref{x-y-coordinates}, where $y$ measures the distance along the EOW brane and $x$ is the spatial coordinate describing the BCFT$_2$. In these coordinates, the conformal factor associated with the dynamical point $O'$ on the EOW brane $\mathbb{Q}$ is given by \cite{Deng:2020ent,Chu:2021gdb,Li:2021dmf} \begin{align} \Omega_{O'}(y)=\left|\frac{y\cos\theta_0}{\ell}\right|\,.\label{warp-factor-BH} \end{align} where $\ell$ is the AdS$_3$ radius inherited from the bulk geometry. The form of the CFT$_2$ three-point function in \cref{BH_BH_1} is given by \begin{align} \left<\mathcal{T}_{n_e}(Q)\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(P)\right>=C_{\mathcal{T}^{}_{n_e}\mathcal{T}_{n_e}^2\mathcal{T}^{}_{n_e}}|O'P|^{-\Delta_{n_e}^{(2)}}|O'Q|^{-\Delta_{n_e}^{(2)}}|PQ|^{-2\Delta^{}_{n_e}+\Delta_{n_e}^{(2)}}\,.\label{3-point} \end{align} where $C_{\mathcal{T}^{}_{n_e}\mathcal{T}_{n_e}^2\mathcal{T}_{n_e}^{}}$ is the constant OPE coefficient which is neglected henceforth. Substituting \cref{warp-factor-BH,3-point} in \cref{BH_BH_1}, we may obtain the following expression for the generalized entanglement negativity between $B_L$ and $B_R$ in the boundary description \begin{align} \mathcal{E}^{\text{bdy}}_{\text{gen}}\left(B_L:B_R\right)=\frac{c}{4}\log\left[\frac{(\tau_0+y)^2+x_0^2}{2x_0}\right]+\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y\,y\cos\theta_0}\right)+\frac{c}{4}\tanh^{-1}(\sin\theta_0)\,,\label{BH-BH-gen} \end{align} where we have added the area term \cref{area-term} corresponding to the point $O'$ on the EOW brane in the QES formula. The above expression is extremized over the position $y$ of the dynamical point $O'$ to obtain \begin{align} y_0=\sqrt{\tau_0^2+x_0^2}\,. \end{align} Substituting the above expression in \cref{BH-BH-gen}, the semi-classical entanglement negativity in the $2d$ effective boundary description is obtained as follows \begin{align} \mathcal{E}^{\text{bdy}}\left(B_L:B_R\right)=\frac{c}{4}\log\left[\frac{\tau_0+\sqrt{\tau_0^2+x_0^2}}{x_0}\right]+\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)+\frac{c}{4}\tanh^{-1}(\sin\theta_0)\,. \end{align} Now transforming back to the primed coordinates using \cref{Banados} and analytically continuing to the Lorentzian signature, the above expression reduces to \begin{align} \mathcal{E}^{\text{bdy}}\left(B_L:B_R\right)=\frac{c}{4}\log\left[\frac{x^{\prime \,2}_0-t^{\prime \,2}_0-1+\sqrt{4x^{\prime \,2}_0+\left(x^{\prime \,2}_0-t^{\prime \,2}_0-1\right)^2}}{2x'_0}\right]&+\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)\notag\\ &+\frac{c}{4}\tanh^{-1}(\sin\theta_0)\,. \end{align} In terms of the Rindler coordinates $(X,T)$, the final result for the entanglement negativity between the black hole interiors becomes \begin{align} \mathcal{E}^{\text{bdy}}\left(B_L:B_R\right)=\frac{c}{4}\log\left[\frac{e^{2X_0}-1+\sqrt{4 e^{2X_0}\cosh^2 T+\left(e^{2X_0}-1\right)^2}}{2 e^{X_0}\cosh T}\right]&+\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)\notag\\ &+\frac{c}{4}\log\left(\frac{\cos\theta_0}{1-\sin\theta_0}\right)\,,\label{BH-BH-bdy-fin} \end{align} where $X_0$ describes the boundary of the black hole region at a fixed Rindler time $T$. Note that the above expression for the entanglement negativity between $B_L$ and $B_R$ is a decreasing function of the Rindler time $T$ in this phase. \subsubsection*{Bulk description} Next we focus on the three-dimensional bulk description for the connected phase of the entanglement negativity between the black hole interiors. To compute the holographic entanglement negativity, we note that the mixed state configuration described by $B_L$ and $B_R$ corresponds to the case of two adjacent intervals $|O'P|$ and $|O'Q|$. The configuration of the bulk extremal curves homologous to various subsystems under consideration is depicted in \cref{fig:BH-BH-conn-DES}. Now employing the DES formula given in \cref{DES-adj}, we may obtain \begin{align} \mathcal{E}^{\text{bulk}}_{\text{gen}}\left(\mathcal{B}_L:\mathcal{B}_R\right)=\frac{3}{16G_N}\left(\mathcal{L}_1+\mathcal{L}_2-\mathcal{L}_3\right)+\mathcal{E}^{\text{eff}}\left(\mathcal{B}_L:\mathcal{B}_R\right)\,,\label{DES-BH-BH} \end{align} where $\mathcal{L}_1$, $\mathcal{L}_2$ and $\mathcal{L}_3$ are the lengths of the bulk extremal curves homologous to $|O'P|$, $|O'Q|$ and $|PQ|$ respectively and $\mathcal{E}^{\text{eff}}\left(\mathcal{B}_L:\mathcal{B}_R\right)$ denotes the effective entanglement negativity between bulk quantum matter fields residing on the EOW brane. \begin{figure}[ht] \centering \includegraphics[scale=0.7]{BH-BH-conn-des-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between black hole interiors in the connected phase. The bulk extremal curves homologous to $B_L$, $B_R$ and $B_L\cup B_R$ are given by $\mathcal{L}_1$, $\mathcal{L}_2$ and $\mathcal{L}_3$ respectively.} \label{fig:BH-BH-conn-DES} \end{figure} In the un-primed coordinates, the Cauchy slice on the EOW brane is in a pure state as described in \cite{Li:2021dmf}. Hence, the effective entanglement negativity in \cref{DES-BH-BH} may be obtained through the R\'enyi entropy of order half for a part of matter fields on the EOW brane. Consequently, similar to \cref{BOE-neg}, the effective entanglement negativity is a constant given by \begin{align} \mathcal{E}^{\text{eff}}\left(\mathcal{B}_L:\mathcal{B}_R\right)=\frac{c}{4}\log\frac{2\ell}{\epsilon_y\cos\theta_0}\,.\label{eff-BH-BH} \end{align} As the effective entanglement negativity turns out to be a constant, the entanglement negativity in this phase is determined entirely through the algebraic sum of the lengths of the extremal curves in \cref{DES-BH-BH}. To obtain the lengths of these extremal curve, we employ the un-primed coordinate system with the Poincar\'e AdS$_3$ metric \cite{Li:2021dmf}. Under the bulk map in \cref{Banados}, the coordinates of $P$ and $Q$ may be mapped to $(\tau_0,x_0,0)$ and $(\tau_0,-x_0,0)$ where \begin{align} \tau_0=\frac{2(x^{\prime 2}_0+\tau^{\prime 2}_0-1)}{(\tau^{\prime }_0+1)^2+x^{\prime 2}_0}~~,~~x_0=\frac{4x'_0}{(\tau'_0+1)^2+x^{\prime 2}_0}\,. \end{align} Utilizing the left-right $\mathbb{Z}_2$ symmetry of the configuration, we may set the coordinates of the dynamical point $O'$ on the brane as $O': (-z\tan\theta_0,0,z)$ where $z$ is determined through the extremization of the generalized negativity functional in \cref{DES-BH-BH}. The lengths of the extremal curves may now be obtained in the un-primed coordinates through the standard Poincar\'e AdS$_3$ result as follows \cite{Ryu:2006bv, Hubeny:2007xt} \begin{align} &\mathcal{L}_1=\ell\,\cosh^{-1}\left[\frac{(\tau_0+z\tan\theta_0)^2+x_0^2+z^2}{2\,z}\right]-\ell\,\log\left[\frac{4\epsilon}{(\tau'_0+1)^2+x^{\prime 2}_0}\right]=\mathcal{L}_2\,,\notag\\ &\mathcal{L}_3=2\ell\,\log(2x_0)-2\ell\,\log\left[\frac{4\epsilon}{(\tau'_0+1)^2+x^{\prime 2}_0}\right]\,. \label{L-BH-BH-conn} \end{align} In the above expression, $\epsilon$ is the UV cut-off for the original BCFT$_2$ in the primed coordinates and the second logarithmic term arises due to the cut-off in the un-primed coordinates (cf. the Banados map in \cref{Banados}). Now extremizing the generalized negativity with respect to $z$ we may obtain the position of $O'$ to be \begin{align} \partial_z\mathcal{E}^{\text{bulk}}_{\text{gen}}=0\implies z=\sqrt{x_0^2+\tau_0^2}\cos\theta_0\,. \end{align} Substituting the above value of $z$ in \cref{DES-BH-BH}, we may obtain the bulk entanglement negativity between $\mathcal{B}_L$ and $\mathcal{B}_R$ as follows \begin{align} \mathcal{E}^{\text{bulk}}\left(\mathcal{B}_L:\mathcal{B}_R\right)=\frac{c}{4}\left[\cosh^{-1}\left(\frac{\sqrt{x_0^2+\tau_0^2}+\tau_0\sin\theta_0}{ x_0\cos\theta_0}\right)+\log\frac{\ell}{\epsilon_y\cos\theta_0}\right]\,,\label{DES-BH-BH1} \end{align} where the effective contribution from the quantum matter fields given in \cref{eff-BH-BH} has been included. Now utilizing the hyperbolic identity \begin{align} \cosh^{-1}\left(\frac{\sqrt{x_0^2+\tau_0^2}+\tau_0\sin\theta_0}{ x_0\cos\theta_0}\right)=\log\left(\frac{\tau_0+\sqrt{x_0^2+\tau_0^2}}{x_0}\right)+\cosh^{-1}(\sec\theta_0)\,, \end{align} \cref{DES-BH-BH1} may be expressed as \begin{align} \mathcal{E}^{\text{bulk}}\left(\mathcal{B}_L:\mathcal{B}_R\right)=\frac{c}{4}\left[\log\left(\frac{\tau_0+\sqrt{x_0^2+\tau_0^2}}{ x_0}\right)+\log\frac{\ell}{\epsilon_y\cos\theta_0}+\log\frac{\cos\theta_0}{1-\sin\theta_0}\right] \end{align} Transforming to the primed coordinates using \cref{Banados} and subsequently to the Rindler coordinates \cref{Rindler} via the analytic continuation $\tau' = i t'$, we may obtain the bulk entanglement negativity between $\mathcal{B}_L$ and $\mathcal{B}_R$ to be \begin{align} \mathcal{E}^{\text{bulk}}\left(\mathcal{B}_L:\mathcal{B}_R\right)=\frac{c}{4}\log\left[\frac{e^{2X_0}-1+\sqrt{4 e^{2X_0}\cosh^2 T+\left(e^{2X_0}-1\right)^2}}{2 e^{X_0}\cosh T}\right]&+\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)\notag\\ &+\frac{c}{4}\log\left(\frac{\cos\theta_0}{1-\sin\theta_0}\right)\,. \end{align} The above expression matches identically with the boundary QES result in \cref{BH-BH-bdy-fin} which provides a strong consistency check of our holographic construction. \subsubsection{Disconnected phase} In this subsection, we concentrate on the disconnected phase for the extremal surface for $B_L\cup B_R$, depicted in \cref{fig:BH-BH-disc}. In this case, there are entanglement islands corresponding to the radiation bath on the EOW brane, and a part of the entanglement wedge for the radiation bath is subtended on the brane. This splits the black hole regions into two disjoint subsystems, namely $B_R\equiv|PP'|$ and $B_L\equiv|QQ'|$, where the points $P'$ and $Q'$ are determined by the extremal surface for $B_L\cup B_R$. \begin{figure}[ht] \centering \includegraphics[scale=.7]{BH-BH-disc-qes-eps-converted-to.pdf} \caption{Schematics of the quantum extremal surface for the entanglement negativity between black hole interiors in the disconnected phase} \label{fig:BH-BH-disc} \end{figure} \subsubsection*{Boundary description} In the two-dimensional effective boundary description, the area term for the generalized entanglement negativity vanishes since there is no non-trivial island cross-section, $\partial B_L\cap \partial B_R=\emptyset$. The effective semi-classical entanglement negativity between $B_L$ and $B_R$ may be computed through the following four-point correlator of twist operators placed at the endpoints of the intervals, \begin{align} \mathcal{E}^{\text{eff}}\left(B_L:B_R\right)=\lim_{n_e \to 1}\log \left[\left(\epsilon_y\Omega_{P'}\right)^{\Delta_{n_e}}\left(\epsilon_y\Omega_{Q'}\right)^{\Delta_{n_e}}\left<\mathcal{T}_{n_e}(Q)\bar{\mathcal{T}}_{n_e}(Q')\bar{\mathcal{T}}_{n_e}(P')\mathcal{T}_{n_e}(P)\right>\right] \end{align} As indicated by the disconnected extremal surfaces shown in \cref{fig:BH-BH-disc}, the above four-point correlator factorizes into the product of two 2-point correlators as follows \begin{align} \left<\mathcal{T}_{n_e}(Q)\bar{\mathcal{T}}_{n_e}(Q')\bar{\mathcal{T}}_{n_e}(P')\mathcal{T}_{n_e}(P)\right>\approx \left<\mathcal{T}_{n_e}(Q)\bar{\mathcal{T}}_{n_e}(Q')\right>\, \left<\mathcal{T}_{n_e}(P)\bar{\mathcal{T}}_{n_e}(P')\right>\,. \end{align} Now utilizing \cref{Conformal-dim}, we may observe that, in the replica limit $n_e\to 1$, the above correlation function vanishes identically. Hence, in this phase the total entanglement negativity between the black hole interiors is also vanishing. \subsubsection*{Bulk description} As depicted in \cref{fig:BH-BH-disc}, the entanglement wedges corresponding to the subsystems ${B}_L$ and ${B}_R$ are naturally disconnected and hence, the configuration corresponds to two disjoint intervals on the boundary which are far away from each other. In this case, the area contribution to the bulk entanglement negativity vanishes \cite{Malvimat:2018txq,Malvimat:2018ood}. The effective entanglement negativity between portions of bulk quantum matter on the EOW brane is given by the BCFT correlation function of twist fields inserted at $P'$ and $Q'$ as follows \begin{align} \mathcal{E}^{\text{eff}}=\lim_{n_e \to 1}\log\left<\mathcal{T}_{n_e}(P')\bar{\mathcal{T}}_{n_e}(Q')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\,.\label{effEN-BH-BH-disc} \end{align} The coordinates of $P'$ and $Q'$ are obtained via extremizing the generalized entropy functional for $B_L\cup B_R$ which, in the $(y,x)$ coordinates, are given by $(\tau_0,x_0)$ and $(\tau_0,-x_0)$ respectively \cite{Chu:2021gdb}. Now employing the doubling trick \cite{Cardy:2004hm,Sully:2020pza}, the correlation function in \cref{effEN-BH-BH-disc} may be expressed as a chiral four-point function on the full complex plane as \begin{align} \left<\mathcal{T}_{n_e}(P')\bar{\mathcal{T}}_{n_e}(Q')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}=\left<\mathcal{T}_{n_e}(P')\bar{\mathcal{T}}_{n_e}(Q')\bar{\mathcal{T}}_{n_e}(Q'')\mathcal{T}_{n_e}(P'')\right>_{\mathrm{CFT}^{\bigotimes n_e}} \end{align} where $P'':(-\tau_0,x_0)$ and $Q'': (-\tau_0,-x_0)$ are the image points of $P'$ and $Q'$ upon reflection through the boundary at $\tau=0$. The above four point correlator is again factorized into two two-point functions in the dominant channel and similar to the previous subsection, the effective semi-classical entanglement negativity vanishes. Hence, the boundary QES result is reproduced through the bulk computations. \begin{figure}[H] \centering \includegraphics[scale=.7]{BH-BH-disc-des-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between black hole interiors in the disconnected phase} \label{fig:BH-BH-disc-des} \end{figure} \subsubsection{Page curve} From the results of the last two subsections, we may infer that the time evolution of the entanglement negativity between the black hole interiors is governed by the two phases of the extremal surfaces corresponding to the entanglement entropy of $B_L\cup B_R$. It is well known that the unitary time evolution of the entanglement entropy for a subsystem in the Hawking radiation flux from a black hole is governed by the \textit{Page curve} \cite{Page:1993df,Page:1993wv,Page:2013dx}. Hence the transition between the two different phases of the entanglement negativity between $B_L$ and $B_R$ occurs precisely at the Page time $T_P$, given by \cite{Li:2021dmf,Chu:2021gdb} \begin{align} T_P=\cosh^{-1}\left(\sinh X_0\, e^{\tanh^{-1}(\sin\theta_0)}\,\frac{2\ell}{\epsilon_y \cos\theta_0}\right)\,. \label{Page-time} \end{align} In the first phase the entanglement negativity is a decreasing function of the Rindler time given by \cref{BH-BH-bdy-fin}. At the Page time $T_P$ the extremal surface for the entanglement entropy transits to the disconnected phase and an entanglement entropy island corresponding to the radiation bath appears inside the gravitational regions on the EOW brane $\mathbb{Q}$. At this time, the entanglement negativity also transits to the corresponding disconnected phase and vanishes identically. The variation of the entanglement negativity between black hole interiors with the Rindler time $T$ is plotted in \cref{fig:PageCurve-BH-BH}. \begin{figure}[ht] \centering \includegraphics[scale=0.6]{PageCurve-BH-BH.pdf} \caption{The Page curve for entanglement negativity between black hole interiors for three different values of the EOW brane angle $\theta_0$. Here the variation of the entanglement negativity with respect to the Rindler time $T$ is shown in units of $\frac{c}{4}$ with $X_0 = 1$, $\epsilon_y = 0.1$, $\ell = 1$ and $\theta_0 = \frac{\pi}{3}, \frac{\pi}{4}, \frac{\pi}{6}$.} \label{fig:PageCurve-BH-BH} \end{figure} \subsection{Entanglement negativity between the black hole and the radiation} In this subsection, we now proceed to the computation of the entanglement negativity between the black hole region and the radiation region in the time-dependent defect AdS$_3$/BCFT$_2$ scenario. To this end, we consider the black hole region to be described by a space-like interval $B_L$ on the left-half of the two sided eternal black hole and the radiation region to be described by a semi-infinite interval $R_L$ adjacent to $B_L$ as shown in \cref{fig:BH-rad-connected-qes}. Similar to the previous case, there are two phases possible in this case which are investigated below. \subsubsection{Connected phase} The connected phase corresponds to the case where $R_L$ does not posses an entanglement island and thus $B_L$ covers the complete left black hole region on the EOW brane as shown in \cref{fig:BH-rad-connected-qes}. From the doubly holographic perspective, this corresponds to an extremal surface for $R_L \cup B_L$ extending from the dynamical endpoint $O'$ of $B_L$ on the EOW brane to spatial infinity. We compute the entanglement negativity between the two adjacent intervals $B_L \equiv |O'Q|$ and $R_L \equiv |QA|$ in this phase where we have regularized the semi-infinite interval $R_L$ to end at some point $A : (\tau'_0 , - x'_\infty)$ which is later taken to infinity. \begin{figure}[ht] \centering \includegraphics[scale=.7]{BH-Rad-connected-QES-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between the black hole and the radiation in the connected phase} \label{fig:BH-rad-connected-qes} \end{figure} \subsubsection*{Boundary description} For the connected phase, the absence of the entanglement island for the radiation region $R_L$ implies that the generalized entanglement negativity doesn't receive any area contribution in the $2d$ effective boundary description. The remaining effective semi-classical entanglement negativity between $B_L$ and $R_L$ may be computed through the following three-point twist correlator \begin{equation} \label{BH-rad-twist-con} \mathcal{E}^{\text{eff}} \left( B_L : R_L \right) = \lim_{n_e \to 1} \log \left[ \left( \epsilon_y \Omega_{O'} \right)^{\Delta_{n_e}} \left< \mathcal{T}_{n_e} (O') \bar{\mathcal{T}}^2_{n_e} (Q) \mathcal{T}_{n_e} (A) \right> \right], \end{equation} where $\epsilon_y$ is a UV cut off on the dynamical EOW $\mathbb{Q}$ and $\Omega_{O'}$ is the warp factor as given in \cref{warp-factor-BH}. In the un-primed coordinates, the points $O'$ and $Q$ are located at $(-y, 0)$ and $(\tau_0, - x_0)$ respectively. Using \cref{Banados}, we may locate the spatial infinity $A$ in the un-primed coordinates at $(\tau, x) = (2, 0)$. Now, by utilizing the usual form of a CFT$_2$ three-point twist correlator given in \cref{3-point}, we may obtain the total generalized entanglement negativity in the boundary description for this case to be \begin{equation} \label{E-gen-qes-BH-rad-con} \begin{aligned} \mathcal{E}^\text{bdy}_\text{gen} = \frac{c}{8} \left[ \log \frac{((\tau_0 + y)^2 + x_0^2) (x_0^2 + (2 - \tau_0)^2)}{(y + 2)^2} - 2 \log \frac{4\epsilon}{(\tau'_0 + 1)^2 + x^{\prime 2}_0} \right] \, , \end{aligned} \end{equation} where $\epsilon$ is the UV cut-off in the primed coordinates. The above expression is then extremized over the position $y$ of the dynamical point $O'$ on the EOW brane to obtain \begin{equation} y = \frac{x_0^2}{2 - \tau_0} - \tau_0 \, . \end{equation} It may be checked through \cref{Banados,Rindler} that $\tau < 2$ for the Rindler time $T > 0$ which guarantees the non-negativity of $y$ for large $x_0$. We may now compute the entanglement negativity by substituting the above value of $y$ in \cref{E-gen-qes-BH-rad-con} to be \begin{equation} \label{E-qes-BH-rad-con-unprimed} \begin{aligned} \mathcal{E}^\text{bdy} = \frac{c}{4} \log x_0 - \frac{c}{4} \log \frac{4\epsilon}{(\tau'_0 + 1)^2 + x^{\prime 2}_0}\, . \end{aligned} \end{equation} Transforming this result to the Rindler coordinates $(X, T)$ through \cref{Banados,Rindler}, we may obtain the final expression for the entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ in the boundary description to be \begin{equation} \label{E-qes-BH-rad-con} \begin{aligned} \mathcal{E}^\text{bdy} (B_L : R_L) = \frac{c}{4} \log \frac{\cosh T}{\epsilon} + X_0 , \end{aligned} \end{equation} where $X_0$ corresponds to the endpoint $Q$ of the black hole region $B_L$ at the fixed Rindler time $T$. We note here that the entanglement negativity in the above expression is an increasing function of the Rindler time $T$ in this connected phase. \subsubsection*{Bulk description} In the bulk description for this phase as depicted in \cref{fig:BH-rad-connected-des}, the generalized entanglement negativity between the black hole region $B_L\equiv|O'Q|$ and the radiation region $R_L\equiv|QA|$ is computed by employing the following formula \begin{equation} \label{E-BH-rad-con-des-formula} \begin{aligned} \mathcal{E}^\text{bulk}_\text{gen} (\mathcal{B}_L : \mathcal{R}_L) & = \frac{3}{16 G_N} \big(\mathcal{L}_{R_L} + \mathcal{L}_{B_L} - \mathcal{L}_{B_L \cup R_L} \big) \\ & = \frac{c}{8} \Bigg( \log \frac{ \big[ (\tau_0 + z \tan \theta_0)^2 + x_0^2 +z^2 \big] \big(x_0^2 + (2 - t_0)^2 \big)}{ \big[ (2 + z \tan \theta_0)^2 + z^2 \big]} - 2 \log \frac{4\epsilon}{(\tau'_0 + 1)^2 + x^{\prime 2}_0} \Bigg) , \end{aligned} \end{equation} where $O':(-z\tan \theta_0, 0, z)$ and $Q:(\tau_0, - x_0, 0)$ are the endpoints of $B_L$, and $A:(2, 0, 0)$ is the regularized endpoint of the semi infinite radiation region $R_L$ in the un-primed coordinates. We have also used the Brown-Henneaux formula \cite{Brown:1986nw} in the second equality of the above expression. Note that the semi-classical effective entanglement negativity appearing as the second term in \cref{DES-adj} vanishes in this case as $R_L$ does not posses an entanglement island. We may extremize \cref{E-BH-rad-con-des-formula} over the position of the dynamical point $O'$ to obtain \begin{equation}\label{extremization-bh-rad-con-des} \partial_z \mathcal{E}^\text{bulk}_\text{gen} = 0 ~~~~ \implies ~~~~z = \frac{x_0^2 \cot \theta_0}{2 - \tau_0} \, , \end{equation} where we have used the approximation that $x_0$ is large. The total entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ in the Rindler coordinates $(X,T)$ for this phase may now be obtained by utilizing \cref{extremization-bh-rad-con-des,E-BH-rad-con-des-formula,Banados,Rindler} to be \begin{equation} \label{E-bh-rad-con-des} \mathcal{E}^\text{bulk} (\mathcal{B}_L : \mathcal{R}_L) = \frac{c}{4} \log \frac{\cosh T}{\epsilon} + X_0 \, , \end{equation} where $X_0$ corresponds to the point $Q$ at the fixed Rindler time $T$. Remarkably, the above expression for the entanglement negativity matches exactly with the boundary description result in \cref{E-qes-BH-rad-con}. \begin{figure}[H] \centering \includegraphics[scale=.7]{BH-Rad-connected-DES-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between the black hole and the radiation in the connected phase} \label{fig:BH-rad-connected-des} \end{figure} \subsubsection{Disconnected phase} The disconnected phase is described by the case where the semi-infinite radiation region $R_L$ has an entanglement island labelled as $I_L \equiv |O'Q'|$ as depicted in \cref{fig:BH-rad-disconnected-qes}. From the bulk perspective, this corresponds to an extremal surface for $R_L$ to end on some point $Q'$ on the EOW brane. The entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ for this case will thus receive contribution from the island region $I_L$ on the EOW brane. \begin{figure}[H] \centering \includegraphics[scale=.7]{BH-Rad-disconnected-QES-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between the black hole and the radiation in the disconnected phase} \label{fig:BH-rad-disconnected-qes} \end{figure} \subsubsection*{Boundary description} In the boundary description, the area contribution to the entanglement negativity corresponding to the point $Q' = \partial B_L \cap \partial I_L$ is as given in \cref{area-term}. The remaining effective semi-classical entanglement negativity between $B_L$ and $R_L$ may be computed through the following four-point twist correlator, \begin{equation} \label{BH-rad-twist-discon} \mathcal{E}^{\text{eff}} \left( B_L : R_L \cup I_L\right) = \lim_{n_e \to 1} \log \left[ \left( \epsilon_y \Omega_{Q'} \right)^{\Delta_{n_e}^{(2)}}\left( \epsilon_y \Omega_{O'} \right)^{\Delta_{n_e}} \left< \mathcal{T}_{n_e} (A) \bar{\mathcal{T}}^2_{n_e} (Q) \mathcal{T}^2_{n_e} (Q') \bar{\mathcal{T}}_{n_e} (O') \right> \right], \end{equation} where $\Omega$ are the warp factors as given in \cref{warp-factor-BH}, $A$ is the regularized endpoint of the semi-infinite interval $R_L$ and the point $Q'$ and $Q$ are at position $(-y, - x)$ and $(\tau_0, - x_0)$, respectively in the un-primed coordinates. For the bipartite configuration under consideration, the above four-point twist correlator factorizes into two two-point twist correlators in the following way, \begin{equation}\label{bh-rad-disc-qes-factorization} \left< \mathcal{T}_{n_e} (A) \bar{\mathcal{T}}^2_{n_e} (Q) \mathcal{T}^2_{n_e} (Q') \bar{\mathcal{T}}_{n_e} (O') \right> \approx \left< \mathcal{T}_{n_e} (A) \bar{\mathcal{T}}_{n_e} (O')) \right> \left< \bar{\mathcal{T}}^2_{n_e} (Q) \mathcal{T}^2_{n_e} (Q') \right>. \end{equation} Utilizing the above factorization in \cref{BH-rad-twist-discon} along with the area term in \cref{area-term}, the generalized entanglement negativity for this case may be expressed as \begin{equation} \label{E-qes-gen-BH-rad-disc} \begin{aligned} \mathcal{E}^\text{bdy}_\text{gen} = \frac{c}{4} \left( \tanh^{-1} (\sin \theta_0) + \log \frac{\ell}{\epsilon_y y \cos \theta_0} + \log \left( (y + \tau_0)^2 + (x-x_0)^2 \right) - \log \frac{4\epsilon}{(\tau'_0 + 1)^2 + x^{\prime 2}_0} \right), \end{aligned} \end{equation} where again $\epsilon$ is the UV cut-off in the primed coordinates. Interestingly, the regularized point $A$ does not enter the computation in this case. We may now extremize the above generalized entanglement negativity over the position of the dynamical point $Q'$ {\it i.e.}, $\partial_y \, \mathcal{E}^\text{bdy}_\text{gen} = 0$ and $\partial_{x} \, \mathcal{E}^\text{bdy}_\text{gen} = 0$ to obtain \begin{equation} \label{ext-parameters-bh-rad-qes} y = \tau_0 ~, \qquad x = x_0 \, . \end{equation} Using the above values of the coordinates $y$ and $x$ in \cref{E-qes-gen-BH-rad-disc} and transforming the result to the primed coordinates \cref{Banados} and subsequently to the Rindler coordinates \eqref{Rindler} via the analytic continuation $\tau = i t'$, we may obtain the total entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ to be \begin{equation} \label{E-qes-BH-rad-disc} \mathcal{E}^\text{bdy} (B_L : R_L) = \frac{c}{4} \left( \tanh^{-1} (\sin \theta_0) + \log \frac{\text{e}^{2 X_0} - 1}{\epsilon} + \log \frac{2\ell}{\epsilon_y \cos \theta_0} \right). \end{equation} Here $X_0$ corresponds to the endpoint $Q$ of the black hole region $B_L$. Note that the above expression for the entanglement negativity is independent of the Rindler time $T$ and only depends on the position of the point $Q$. \subsubsection*{Bulk description} In the $3d$ bulk description for the disconnected phase, the entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ is computed by employing the DES formula in \cref{DES-adj} as follows \begin{equation} \label{E-BH-rad-disc-des-formula} \begin{aligned} \mathcal{E}^\text{bulk}_\text{gen} (\mathcal{B}_L : \mathcal{R}_L) & = \frac{3}{16 G_N} \left(\mathcal{L}_{B_L} + \mathcal{L}_{R_L} - \mathcal{L}_{B_L \cup R_L}\right) + \mathcal{E}^\text{eff} (\mathcal{B}_L : \mathcal{R}_L) \\ & = \frac{3}{8 G_N} \mathcal{L}_2 + \mathcal{E}^\text{eff} (B_L : I_L), \end{aligned} \end{equation} where $\mathcal{L}_2$ is the extremal curve between points $Q' : (-z \tan \theta_0, - x_1, z)$ and $Q : (\tau_0, - x_0, 0)$ and $I_L$ is the island region corresponding to the radiation region $R_L$ as depicted in \cref{fig:BH-rad-disconnected-des}. In the second term of the above expression we have also utilized the fact that bulk matter fields are only localized on the EOW brane $\mathbb{Q}$. We note here that, consistent with the boundary description, the regularized point $A$ does not enter the computation in this phase. The length of the extremal curve $\mathcal{L}_2$ in the un-primed coordinates may be expressed as \cite{Ryu:2006bv, Hubeny:2007xt} \begin{equation} \label{L2-bh-rad-disc} \mathcal{L}_2 \equiv \mathcal{L}_{QQ'} = \ell\,\log \left[\frac{(\tau_0 + z \tan \theta_0)^2 + (x_0 - x_1)^2 + z^2}{z}\right] - \ell\,\log \left(\frac{4\epsilon}{(\tau'_0 + 1)^2 + x^{\prime 2}_0}\right). \end{equation} The semi-classical effective entanglement negativity appearing as the last term in \cref{E-BH-rad-disc-des-formula} may be obtained to be \begin{equation} \label{E-eff-des-bh-rad-disc} \begin{aligned} \mathcal{E}^\text{eff} (B_L : I_L) = \frac{c}{4} \log \frac{2\ell}{\epsilon_y \cos \theta_0}, \end{aligned} \end{equation} where $\epsilon_y$ is the UV cut-off on the dynamical EOW brane. Extremizing the generalized entanglement negativity obtained by substituting \cref{L2-bh-rad-disc,E-eff-des-bh-rad-disc} in \cref{E-BH-rad-disc-des-formula}, with respect to the position of $Q'$ {\it i.e.}, $\partial_z \mathcal{E}^\text{bulk}_\text{gen} = 0$ and $\partial_{x_1} \mathcal{E}^\text{bulk}_\text{gen} = 0$, we may obtain \begin{equation} \label{ext-parameters-bh-rad-des} z = \tau_0 \cos \theta_0 ~, \qquad x_1 = x_0 \, . \end{equation} The total entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ in the primed coordinates may then be obtained through \cref{ext-parameters-bh-rad-des,Banados} to be \begin{equation} \label{E-des-BH-rad-disc} \begin{aligned} \mathcal{E}^\text{bulk} (\mathcal{B}_L : \mathcal{R}_L) = \frac{c}{4} \left[\log \left(\frac{x'^2_0 + \tau'^2_0 - 1}{\epsilon}\right) + \tanh^{-1} (\sin \theta_0)+ \log \left(\frac{2\ell}{\epsilon_y \cos \theta_0}\right) \right], \end{aligned} \end{equation} where the Brown-Henneaux formula \cite{Brown:1986nw} has been used. On transformation to the Rindler coordinates \cref{Rindler} via the analytic continuation $\tau' = i t'$, the above expression matches exactly with the boundary perspective result in \cref{E-qes-BH-rad-disc} which serves as a strong consistency check for our proposals. \begin{figure}[H] \centering \includegraphics[scale=.6]{BH-Rad-disconnected-DES-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between the black hole and the radiation in the disconnected phase} \label{fig:BH-rad-disconnected-des} \end{figure} \subsubsection{Page curve} We now analyse the results of the last two subsections where we have computed the entanglement negativity between the black hole region $B_L$ and the radiation region $R_L$ for the two possible phases. In the connected phase, the entanglement negativity computed in \cref{E-qes-BH-rad-con} is an increasing function of the Rindler time $T$. In contrast, for the disconnected phase, the entanglement negativity given in \cref{E-qes-BH-rad-disc} is independent of $T$ and only depends on the size of the black hole region $B_L$. A transition from the connected phase to the disconnected phase is observed at the Page time for the entanglement entropy given in \cref{Page-time}. In \cref{fig:BH-Rad-Page curve}, we show the variation of the time dependent entanglement negativity between the black hole region $B_L$ and the radiation $R_L$ with the Rindler time $T$ for three different values of the EOW brane angle $\theta_0$. \begin{figure}[H] \centering \includegraphics[scale=.7]{PageCurve-BH-Rad.pdf} \caption{The Page curve for the entanglement negativity between the black hole region and the radiation region for three different values of the EOW brane angle $\theta_0$. Here the variation of the entanglement negativity with respect to the Rindler time $T$ is shown in units of $\frac{c}{4}$ with $X_0 = 1$, $\epsilon = 0.01$, $\epsilon_y = 0.1$, $\ell = 1$ and $\theta_0 = \frac{\pi}{3}, \frac{\pi}{4}, \frac{\pi}{6}$.} \label{fig:BH-Rad-Page curve} \end{figure} \subsection{Entanglement negativity between subsystems in the radiation bath} In this subsection, we compute the entanglement negativity between the right subsystem $R_R$ and the left subsystem $R_L$ in the radiation region as shown in \cref{fig:RD-RD-conn-qes}. In the Rindler coordinates $(X,T)$, the right radiation subsystem $R_R$ extends from $(X_0,T)$ to $(X_1,T)$ and the left radiation subsystem $R_L$ extends from $(X_0,-T+i \pi)$ to $(X_1,-T+i \pi)$. In the primed coordinates, the subsystems $R_R \equiv |NQ|$ and $R_L \equiv |PM|$ are mapped to the intervals $[(\tau'_0, x'_0), (\tau'_1, x'_1)]$ and $[(\tau'_1, -x'_1), (\tau'_0, -x'_0)]$ respectively. Similar to the earlier subsections, we perform the computation in the Euclidean signature and subsequently transform the results to Rindler coordinates in the Lorentzian signature. Depending on the phase transition of the extremal surfaces corresponding to $R_L \cup R_R$, the DES corresponding to the entanglement negativity between them crosses from a connected phase to a disconnected phase. In the following, we investigate the time evolution of the entanglement negativity between $R_L$ and $R_R$ from both the bulk and the boundary perspective. \subsubsection{Connected phase} In the connected phase, there are no entanglement entropy islands corresponding to $R_L$ and $R_R$ in the effective boundary description as illustrated in \cref{fig:RD-RD-conn-qes}. In this phase, we compute the entanglement negativity between the disjoint radiation subsystems $R_L$ and $R_R$. \begin{figure}[H] \centering \includegraphics[scale=0.7]{RD-RD-Conn-qes-eps-converted-to.pdf} \caption{Schematics of the quantum extremal surface for the entanglement negativity between intervals in the radiation region in the connected phase.} \label{fig:RD-RD-conn-qes} \end{figure} \subsubsection*{Boundary description} As there are no island contributions in this phase, we observe from \cref{EN_QES} that the entanglement negativity between the radiation subsystems in $2d$ effective boundary description reduces to the effective entanglement negativity between two disjoint intervals as follows \begin{equation \begin{aligned} \mathcal{E}^{\text{bdy}}(R_L:R_R)=\mathcal{E}^{\text{eff}}(R_L:R_R)=\lim_{n_e \to 1} \log \left[\left<\mathcal{T}_{n_e}(P) \bar{\mathcal{T}}_{n_e}(M) \bar{\mathcal{T}}_{n_e}(N)\mathcal{T}_{n_e}(Q)\right>_{\mathrm{CFT}^{\bigotimes n_e}}\right]. \end{aligned} \end{equation} As described in \cref{sec:disj-2}, for the two disjoint subsystems in the $t$-channel, the above four point twist correlator may be computed in the large central charge limit as follows \cite{Malvimat:2018txq} \begin{equation}\label{neg-con-rdrd-bdy} \begin{aligned} \mathcal{E}^{\text{bdy}}(R_L:R_R)&=\frac{c}{4}\log \left( \frac{|PN| |MQ|}{|MN| |PQ|}\right)\\ &=\frac{c}{4}\log \frac{(e^{X_0}+e^{X_1})^2-(e^{X_0}-e^{X_1})^2 \tanh^2 T}{4 e^{X_0+X_1}}. \end{aligned} \end{equation} Note that the entanglement negativity between the radiation subsystems $R_L$ and $R_R$ is a monotonically decreasing function of the Rindler time $T$ in this phase. \subsubsection*{Bulk description} In the $3d$ bulk description, the effective entanglement negativity in \cref{DES-disj} vanishes as the corresponding entanglement wedges contain no quantum matter fields. The entanglement negativity between $R_L$ and $R_R$ is then given entirely by the combination of the lengths of the defect extremal surfaces as follows \begin{equation}\label{neg-con-rdrd-bulk} \begin{aligned} \mathcal{E}^{\text{bulk}}\left(\mathcal{R}_L:\mathcal{R}_R\right)&=\frac{3}{16G_N}\left(\mathcal{L}_{PN}+\mathcal{L}_{MQ}-\mathcal{L}_{MN} -\mathcal{L}_{PQ}\right)\\ &=\frac{3\ell}{8G_N}\left[\log\left(\frac{(x'_1+x'_0)^2+(\tau'_1-\tau'_0)^2}{\epsilon^2}\right)-\log\left(\frac{2x'_0}{\epsilon}\right)-\log\left(\frac{2x'_1}{\epsilon}\right)\right]\,, \end{aligned} \end{equation} where we have used the fact that the length of an extremal curve $\mathcal{L}_{ab}$ connecting two points $(\tau'_a,x'_a)$ and $(\tau'_b, x'_b)$ on the boundary is given by \cite{Hubeny:2007xt} \begin{equation} \mathcal{L}_{ab}=\ell\,\log\left[\frac{{(x'_a - x'_b)^2 + (\tau'_a - \tau'_b)^2}}{\epsilon^2}\right]. \end{equation} Now analytically continuing to the Lorentzian signature and transforming to the Rindler coordinates in \cref{Rindler}, we obtain the entanglement negativity between $R_L$ and $R_R$ in the bulk description to be \begin{align} \mathcal{E}^{\text{bulk}}\left(\mathcal{R}_L:\mathcal{R}_R\right)=\frac{c}{4}\log \frac{(e^{X_0}+e^{X_1})^2-(e^{X_0}-e^{X_1})^2 \tanh^2 T}{4 e^{X_0+X_1}}\,, \end{align} which matches exactly with the result from the boundary description, given in \cref{neg-con-rdrd-bdy}. \begin{figure}[H] \centering \includegraphics[scale=0.7]{RD-RD-Conn-des-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between intervals in the radiation region in the connected phase.} \label{fig:RD-RD-conn} \end{figure} \subsubsection{Disconnected phase} For the disconnected phase, the entanglement entropy corresponding to the radiation subsystems receives island contributions as depicted in \cref{fig:RD-RD-disconn}. The entanglement negativity islands corresponding to the radiation subsystems $R_L$ and $R_R$, located on the EOW brane, are denoted as $I_L\equiv |M'O'|$ and $I_R\equiv |O'N'|$ respectively\footnote{Note that the entanglement negativity islands together constitute the entanglement entropy island for $R_L \cup R_R$.}. We now proceed to compute the entanglement negativity between the radiation subsystems in the boundary and bulk descriptions in this phase. \begin{figure}[H] \centering \includegraphics[scale=0.7]{RD-RD-disc-qes-eps-converted-to.pdf} \caption{Schematics of the quantum extremal surface for the entanglement negativity between intervals in the radiation region in the disconnected phase. $I_L$ and $I_R$ denote the entanglement negativity islands corresponding to $R_L$ and $R_R$ respectively.} \label{fig:RD-RD-disconn} \end{figure} \subsubsection*{Boundary description} In the $2d$ boundary perspective, the area term corresponding to the point $O'= \partial I_L \cap \partial I_R$ is a constant given by \cref{area-term}. The remaining effective semi-classical entanglement negativity in \cref{EN_QES} may be expressed as \begin{align} \mathcal{E}^{\text{eff}}\left(R_L\cup I_L:R_R\cup I_R\right) =&\lim_{n_e\to 1}\log \Bigg[\left(\epsilon_y\Omega_{M'}\right)^{\Delta_{n_e}}\left(\epsilon_y\Omega_{N'}\right)^{\Delta_{n_e}}\left(\epsilon_y\Omega_{O'}\right)^{\Delta_{n_e}^{(2)}} \notag\\ &\quad\quad\quad\times\left<\mathcal{T}_{n_e}(P)\bar{\mathcal{T}}_{n_e}(M)\mathcal{T}_{n_e}(M')\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(N')\bar{\mathcal{T}}_{n_e}(N)\mathcal{T}_{n_e}(Q)\right>_{n_e}\Bigg].\label{Discon-eff-rdrd1} \end{align} In the large central charge limit, the above twist correlator may be factorized in the dominant channel as follows\footnote{The correlators are factorized into their respective contractions as depicted by the choice of the extremal surfaces in \cref{fig:RD-RD-disconn-des}.} \begin{align} \left<\bar{\mathcal{T}}_{n_e}(M)\mathcal{T}_{n_e}(M')\right>\left<\mathcal{T}_{n_e}(P)\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(Q)\right>\left<\mathcal{T}_{n_e}(N')\bar{\mathcal{T}}_{n_e}(N)\right>\label{RD-RD-disc-factorization} \end{align} Now, employing the replica limit $n_e\to 1$, the effective semi-classical entanglement negativity \cref{Discon-eff-rdrd1} in the disconnected phase reduces to \begin{align} \mathcal{E}^{\text{eff}}\left(R_L\cup I_L:R_R\cup I_R\right)&\approx\lim_{n_e\to 1}\log\left[\left(\epsilon_y\Omega_{O'}\right)^{\Delta_{n_e}^{(2)}} \left<\mathcal{T}_{n_e}(P)\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(Q)\right>\right]\notag\\ &=\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y y\cos\theta_0}\right)+\frac{c}{4}\log \left[\frac{(y+\tau_1)^2+x_1^2}{2x_1}\right],\label{Discon-eff-rdrd} \end{align} where the coordinates for $P$, $Q$ and $O'$ are given by $(\tau_1,-x_1)$, $ (\tau_1,x_1)$ and $(-y,0)$ respectively. The generalized entanglement negativity between $R_L$ and $R_R$ in the $2d$ boundary description may now be obtained using \cref{Discon-eff-rdrd,EN_QES} as follows \begin{equation}\label{Discon-qes-rdrd} \mathcal{E}^{\text{bdy}}_{\text{gen}}\left(R_L:R_R\right)=\frac{c}{4}\log\left(\frac{\ell}{\epsilon_y y\cos\theta_0}\right)+\frac{c}{4}\log \left[\frac{(y+\tau_1)^2+x_1^2}{2x_1}\right]+\frac{c}{4}\tanh^{-1}(\sin\theta_0). \end{equation} Extremizing the above generalized entanglement negativity with respect to $y$ we obtain \begin{align} \partial_y\mathcal{E}^{\text{bdy}}_{\text{gen}}\left(R_L:R_R\right)=0\implies y=\sqrt{\tau_1^2+x_1^2}. \end{align} Now, substituting the value of $y$ in eq. (\ref{Discon-qes-rdrd}), the entanglement negativity between the radiation subsystems for the disconnected phase in the boundary description is given by \begin{equation} \mathcal{E}^{\text{bdy}}\left(R_L:R_R\right)=\frac{c}{4}\left[\log \frac{\sqrt{\tau_1^2+x_1^2}+\tau_1}{x_1}+\log\left(\frac{\ell}{\epsilon_y \cos\theta_0}\right)+ \tanh^{-1}(\sin\theta_0)\right]. \end{equation} Finally, transforming to the primed coordinates in \cref{Banados}, performing the Lorentzian continuation and utilizing \cref{Rindler} we obtain the entanglement negativity between the radiation subsystems in terms of the Rindler coordinates $(X,T)$ in the $2d$ effective boundary description as follows \begin{align}\label{neg-bdy-rdrd} \mathcal{E}^{\text{bdy}}\left(R_L:R_R\right)=\frac{c}{4}\Bigg[\log\frac{e^{2X_1}-1+\sqrt{4 e^{2X_1}\cosh^2 T+\left(e^{2X_1}-1\right)^2}}{2 e^{X_1}\cosh T}&+\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)\notag\\ &+\log\left(\frac{\cos\theta_0}{1-\sin\theta_0}\right)\Bigg]. \end{align} \subsubsection*{Bulk description} In the disconnected phase, due to the presence of entanglement islands, a portion of the EOW brane $\mathbb{Q}$ is contained within the entanglement wedge of the radiation in the $3d$ bulk description. As depicted in \cref{fig:RD-RD-disconn-des}, $|M'N'|$ denotes the entanglement entropy island corresponding to $R_L\cup R_R$. The bulk EWCS ends on the EOW brane at the point $O'$ and splits the entanglement wedge corresponding to $R_L\cup R_R$ into two codimension one regions $\mathcal{R}_L$ and $\mathcal{R}_R$ respectively. For this phase, the entanglement negativity between $R_L$ and $R_R$ corresponds to the configuration of disjoint subsystems $|PM|\cup |O'M'|$ and $|NQ|\cup |O'N'|$, sandwiching the region $|MM'|\cup |NN'|$ in between. Therefore, we may employ the DES formula in \cref{DES-disj} to obtain \begin{align} \mathcal{E}^{\text{bulk}}_{\text{gen}}\left(\mathcal{R}_L:\mathcal{R}_R\right)&=\frac{3}{16G_N}\Big[\left(\mathcal{L}_1+\mathcal{L}_4\right)+\left(\mathcal{L}_2+\mathcal{L}_3\right)-\left(\mathcal{L}_3+\mathcal{L}_4\right)-\mathcal{L}_5\Big]+\mathcal{E}^{\text{eff}}\left(\mathcal{R}_L:\mathcal{R}_R\right)\notag\\ &=\frac{3}{16G_N}\Big(\mathcal{L}_1+\mathcal{L}_2-\mathcal{L}_5\Big)+\mathcal{E}^{\text{eff}}\left({I}_L:{I}_R\right)\,,\label{Discon-bulk-gen-rdrd} \end{align} where as earlier, the effective entanglement negativity between bulk matter fields reduces to that between the adjacent intervals $I_L\equiv |O'M'|$ and $I_R\equiv |O'N'|$ on the EOW brane. The lengths of the extremal surfaces in \cref{Discon-bulk-gen-rdrd} are given by \cite{Ryu:2006bv, Hubeny:2007xt,Chu:2021gdb} \begin{equation}\label{geods-rdrd} \begin{aligned} \mathcal{L}_1&=\ell\,\log\left[\frac{(\tau_1+z\tan\theta_0)^2+x_1^2+z^2}{z}\right]-\ell\,\log\left[\frac{4\epsilon}{(\tau'_1+1)^2+x^{\prime 2}_1}\right]=\mathcal{L}_2\,,\\ \mathcal{L}_5&=2\ell\,\log (2x_1)-2\ell\,\log\left[\frac{4\epsilon}{(\tau'_1+1)^2+x^{\prime 2}_1}\right]. \end{aligned} \end{equation} where the second logarithmic term corresponds to the UV cut-off in the unprimed coordinates \cite{Chu:2021gdb, Li:2021dmf}. \begin{figure}[H] \centering \includegraphics[scale=0.7]{RD-RD-disc-des-eps-converted-to.pdf} \caption{Schematics of the defect extremal surface for the entanglement negativity between intervals in the radiation region in the disconnected phase.} \label{fig:RD-RD-disconn-des} \end{figure} \noindent The effective entanglement negativity in \cref{Discon-bulk-gen-rdrd} between the island regions $I_L$ and $I_R$ may be computed through a three-point correlator of twist fields inserted at the endpoints of the intervals as follows \begin{align} \mathcal{E}^\text{eff} (I_L : I_R) = \lim_{n_e \to 1} \log \left[\left(\epsilon_y^2\Omega_{M'}\Omega_{N'}\right)^{\Delta_{n_e}} \left(\epsilon_y \, \Omega_{O'}\right)^{\Delta_{n_e}^{(2)}}\left<\mathcal{T}_{n_e}(M')\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(N')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\right]\,. \end{align} The above three-point twist correlator on the half plane describing the BCFT may be expressed as a six-point correlator of chiral twist fields on the whole complex plane using the doubling trick \cite{Cardy:2004hm, Sully:2020pza} as follows \begin{align} \left<\mathcal{T}_{n_e}(M')\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}_{n_e}(N')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}=\left<\mathcal{T}_{n_e}(M')\bar{\mathcal{T}}_{n_e}(M)\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}^2_{n_e}(O)\mathcal{T}_{n_e}(N')\bar{\mathcal{T}}_{n_e}(N')\right>_{\mathrm{CFT}^{\bigotimes n_e}}\,, \end{align} where $M$, $N$ and $O$ are the image of the points $M'$, $N'$ and $O'$ on the EOW brane respectively. In the large central charge limit, the six-point correlator may be further factorized in the dominant channel similar to \cref{RD-RD-disc-factorization} as follows \begin{align} \left<\bar{\mathcal{T}}_{n_e}(M)\mathcal{T}_{n_e}(M')\right>\left<\bar{\mathcal{T}}^2_{n_e}(O')\mathcal{T}^2_{n_e}(A)\right>\left<\mathcal{T}_{n_e}(N')\bar{\mathcal{T}}_{n_e}(N)\right>\label{RD-RD-disc-factorization1}. \end{align} Now, reversing the doubling trick and subsequently employing the replica limit $n_e\to 1$, we may obtain the effective entanglement negativity between $I_L$ and $I_R$ as \begin{align} \mathcal{E}^\text{eff} (I_L : I_R)=\lim_{n_e \to 1} \log\left[\left(\epsilon_y \, \Omega_{O'}\right)^{\Delta_{n_e}^{(2)}}\left<\bar{\mathcal{T}}^2_{n_e}(O')\right>_{\mathrm{BCFT}^{\bigotimes n_e}}\right]= \frac{c}{4} \log \frac{2\ell}{\epsilon_y \cos \theta_0} ,\label{eff-rdrd-neg} \end{align} We may obtain the generalized entanglement negativity by substituting \cref{geods-rdrd,eff-rdrd-neg} in \cref{Discon-bulk-gen-rdrd} to be \begin{equation}\label{Discon-des-rdrd} \mathcal{E}^{\text{bulk}}_{\text{gen}}\left(\mathcal{R}_L:\mathcal{R}_R\right)=\frac{c}{4}\bigg[\log \left(\frac{(\tau_1+z\tan\theta_0)^2+x_1^2+z^2}{2 x_1 z}\right)+\log\left(\frac{2\ell}{\epsilon_y \cos\theta_0}\right)\bigg], \end{equation} where we have used the Brown-Henneaux formula \cite{Brown:1986nw} in the first term. The location of the dynamical point $O'$ in the above expression is fixed through extremization at \begin{equation} z=\sqrt{\tau_1^2+x_1^2}\cos\theta_0. \end{equation} Substituting the above value of $z$ in \cref{Discon-des-rdrd} and subsequently transforming the result to the Rindler coordinates using \cref{Banados,Rindler}, we may obtain the entanglement negativity between the radiation subsystems $R_L$ and $R_R$ to be \begin{align}\label{neg-bulk-rdrd} \mathcal{E}^{\text{bulk}}\left(\mathcal{R}_L:\mathcal{R}_R\right)=\frac{c}{4}\Bigg[\log\frac{e^{2X_1}-1+\sqrt{4 e^{2X_1}\cosh^2 T+\left(e^{2X_1}-1\right)^2}}{2 e^{X_1}\cosh T}&+\log\left(\frac{\ell}{\epsilon_y\cos\theta_0}\right)\notag\\ &+\log\left(\frac{\cos\theta_0}{1-\sin\theta_0}\right)\Bigg]. \end{align} We again observe that the above result in the bulk description matches exactly with the entanglement negativity from the boundary description in \cref{neg-bdy-rdrd} for the disconnected phase. \subsubsection{Page curve} We now analyse the behaviour of the time dependent entanglement negativity between radiation subsystems as discussed in last two subsections. We observe that the entanglement negativity decreases with the Rindler time $T$ in both phases and eventually plateaus out. In the limit when both the radiation subsystems $R_L$ and $R_R$ extends to spatial infinity, namely $X_1\to\infty$, the asymptotic behaviour of the entanglement negativity is given as \begin{equation} \mathcal{E}^{\text{bulk}}\left(\mathcal{R}_L:\mathcal{R}_R\right)= \begin{cases} \frac{c}{4}\left(X_1-X_0-2\log( 2\cosh T)\right) &~~ T<T_P\\ \frac{c}{4}\left(X_1-\log\cosh T+\log\frac{\cos\theta_0}{1-\sin\theta_0}+\log\frac{\ell}{\epsilon_y\cos\theta_0}\right) & ~~T>T_P\,, \end{cases} \end{equation} where $T_P$ is the Page time for the entanglement entropy as given in \cref{Page-time}. Hence, the entanglement negativity shows a sudden jump at $T_P$, and in the limit $X_1\to\infty$ this jump is given by \begin{align} \Delta\mathcal{E}=\frac{c}{4}\left[2\log\left(\frac{2\ell}{\epsilon_y\cos\theta_0}\right)+2\log\left(\frac{\cos\theta_0}{1-\sin\theta_0}\right)+\log\left(e^{2X_0}-1\right)\right]\,. \end{align} The analogue of the Page curve for the entanglement negativity for this bipartite configuration is shown in \cref{fig:Rad-Rad-Page curve}. \begin{figure}[H] \centering \includegraphics[scale=.6]{PageCurve-Rad-Rad.pdf} \caption{The Page curve for entanglement negativity between the radiation and the radiation with respect to the Rindler time $T$ in units of $\frac{c}{4}$. Here we choose $X_0 = 1$, $X_1 = 30$, $\epsilon_y = 0.1$, $\ell = 1$ and $\theta_0 = \frac{\pi}{3}, \frac{\pi}{6}$.} \label{fig:Rad-Rad-Page curve} \end{figure} \section{Summary}\label{sec:summary} To summarize, in this article, we have proposed a defect extremal surface (DES) prescription for the entanglement negativity of bipartite mixed state configurations in the AdS$_3$/BCFT$_2$ scenarios which include defect conformal matter on the EOW brane. Furthermore, we have extended the island formula for the entanglement negativity to the framework of the defect AdS$_3$/BCFT$_2$, utilizing the lower dimensional effective description involving a CFT$_2$ coupled to semiclassical gravity. Interestingly, the bulk DES formula may be understood as the doubly holographic counterpart of the island formula for the entanglement negativity. To begin with, we computed the entanglement negativity in the time independent scenarios involving adjacent and disjoint intervals on a static time slice of the conformal boundary of the $3d$ braneworld. To this end, we have demonstrated that the entanglement negativity for various bipartite states obtained through the DES formula matches exactly with the results from the corresponding QES prescription involving entanglement negativity islands. Subsequently we obtained the entanglement negativity in various time-dependent scenarios involving an eternal black hole coupled to a radiation bath in the effective lower dimensional picture. In such time-dependent scenarios, we have obtained the entanglement negativity between subsystems in the black hole interior, between subsystems involving black hole and the radiation bath, and between subsystems in the radiation bath utilizing the island as well as the bulk DES formulae. In this connection, we have studied the time evolution of the entanglement negativity for the above configurations and obtained the analogues of the Page curves. Interestingly, the transitions between different phases of the defect extremal surfaces corresponding to the entanglement negativity for the above configurations occur precisely at the Page time for the corresponding entanglement entropy. Remarkably, it was observed that the entanglement negativity from the boundary and bulk proposals are in perfect agreement for the time-dependent cases, thus demonstrating the equivalence of both formulations. This serves as a strong consistency check for our proposals. We would like to emphasize that our results might lead to several insights about the structure of quantum information about the black hole interior encoded in the Hawking radiation. There are several possible future directions to investigate. One such issue would be the extension of our proposals to higher dimensional defect AdS/BCFT scenarios. One may also generalize our doubly holographic formulation for the entanglement negativity with the defect brane at a constant tension to arbitrary embeddings of the brane in the $3d$ bulk geometry. Furthermore, it would also be interesting to derive the bulk DES formula for the entanglement negativity through the gravitational path integral techniques utilizing the replica symmetry breaking wormhole saddles. We leave these open issues for future investigations. \section{Acknowledgement} The work of GS is partially supported by the Jag Mohan Chair Professor position at the Indian Institute of Technology, Kanpur. \bibliographystyle{utphys}
\section*{Supplemental Material} In this Supplemental Material (SM), (i) we present some remarks on the differential geometry of band theory, (ii) we present the theory of dc electrical conductivity for degenerate bands in terms of the underlying quantum geometry, (iii) the discussion on gauge invariance of the relevant quantities in the context of degenerate bands, and (iv) provide two toy models on the collapse of bands including how the quantum geometry changes according to the degeneracy. \section{Some remarks on the differential geometry of band theory} We begin by presenting the derivation of Eq.~\eqref{eq: Berry curvature} in the main text. Let $\ket{u_{\bf{k}}}$ be a section of $\text{Im}(P)\subset\mathcal{E}$. By definition, \begin{align} P(\bf{k})\ket{u_{\bf{k}}}=\ket{u_{\bf{k}}}. \end{align} The Berry curvature is a $2$-form with values in the endomorphisms of $\text{Im}(P)$ and it acts on sections of $\text{Im}(P)$ by \begin{align} \Omega\left(\ket{u_{\bf{k}}}\right)&= P(\bf{k})\nabla\wedge \left(P(\bf{k})\nabla \left(\ket{u_{\bf{k}}}\right)\right), \end{align} where $\nabla$ is the Berry connection on $\mathcal{E}$ which satisfies $\nabla\wedge \nabla=0$, i.e., it is \emph{flat}. We can then expand the right-hand side using the Leibniz rule, \begin{align} P(\bf{k})dP(\bf{k})\wedge\nabla \left(\ket{u_{\bf{k}}}\right) + P(\bf{k})\nabla\wedge \nabla\left(\ket{u_{\bf{k}}}\right)&= P(\bf{k})dP(\bf{k})\wedge\nabla \left(\ket{u_{\bf{k}}}\right) \nonumber \\ &=P(\bf{k})dP(\bf{k})\wedge\nabla \left(P(\bf{k})\ket{u_{\bf{k}}}\right) \nonumber\\ &=P(\bf{k})dP(\bf{k})\wedge dP(\bf{k}) \ket{u_{\bf{k}}}+\left(P(\bf{k})dP(\bf{k})P(\bf{k})\right)\wedge \nabla\ket{u_{\bf{k}}}, \nonumber\\ &=\left(P(\bf{k})dP(\bf{k})\wedge dP(\bf{k})P(\bf{k}) \right)\ket{u_{\bf{k}}}, \end{align} where we have used flatness of $\nabla$, $P(\bf{k})\ket{u_{\bf{k}}}=\ket{u_{\bf{k}}}$, $P(\bf{k})^2=P(\bf{k})$ and $P(\bf{k})dP(\bf{k})P(\bf{k})=0$ [which follows from differentiation of $P(\bf{k})^2=P(\bf{k})$, multiplication on the left and on the right by $P(\bf{k})$ and using $P(\bf{k})^2=P(\bf{k})$]. We then clearly see \begin{align} \Omega=PdP\wedge dPP. \end{align} Note that, unlike the connection, the curvature $\Omega$ is not a differential operator, but rather a vector bundle homomorphism with values in the $2$-forms. Expressions that use $P(\bf{k})$ rather than (local) Bloch wave functions are useful because they express gauge invariance in a rather straightforward way. However, it is also convenient to have expression in terms of local Bloch wave functions. In particular, if one fixes a local orthonormal basis of sections of $\text{Im}(P)$ (i.e. a unitary frame field or a unitary gauge), $\ket{u_{m,\bf{k}}}$, $m=1,\dots,r$, where $r=\textnormal{\text{Tr}} (P)$ is the rank of $\text{Im}(P)\to\textnormal{\text{BZ}}^d$, we can write \begin{align} P\nabla \ket{u_{m,\bf{k}}}=\sum_{n=1}^{r} \bra{u_{n,\bf{k}}} d\ket{u_{m,\bf{k}}}\ket{u_{n,\bf{k}}} \end{align} The $r\times r$ matrix $\theta=[\theta^{n}_{\; m}]_{1\leq n,m\leq r}=[\bra{u_{n,\bf{k}}}d\ket{u_{m,\bf{k}}}]_{1\leq n,m\leq r}$ is the local connection $1$-form, and we may write the previous equation as \begin{align} P\nabla \ket{u_{m,\bf{k}}}=\sum_{n=1}^{r}\theta^{n}_{\; m}\ket{u_{n,\bf{k}}}. \end{align} Observe that if $P(\bf{k})$ is an orthogonal projector describing a degenerate band of a Bloch Hamiltonian $H(\bf{k})$, then $\theta$ is the restriction of the $N\times N$ matrix $A$ in Eq.~\eqref{eqn:BerryConnection} of the main text to the $r\times r$ sub-matrix corresponding to the frame field $\ket{u_{m,\bf{k}}}$, $m=1,\dots,r$, which generates $\text{Im}(P(\bf{k}))\subset \mathcal{E}_{\bf{k}}$ and which corresponds to $r$ columns of the unitary matrix $U(\bf{k})$, locally diagonalizing $H(\bf{k})$. Any section $\ket{u_{\bf{k}}}$ of the bundle $\text{Im}(P)$ may be written locally as \begin{align} \ket{u_{\bf{k}}}=\sum_{m=1}^{r}a^m(\bf{k})\ket{u_{m,\bf{k}}}, \end{align} for locally defined smooth functions $a^1(\bf{k}),\dots, a^{r}(\bf{k})$. Using the Leibniz rule, it follows that the covariant derivative of $\ket{u_{\bf{k}}}$ is determined by \begin{align} P\nabla\left(\ket{u_{\bf{k}}}\right)=\sum_{m=1}^{r}\left(da^m(\bf{k}) +\sum_{n=1}^{r}\theta^{m}_{\; n}a^{n}(\bf{k})\right)\ket{u_{m,\bf{k}}}. \end{align} Applying the operator $P\nabla\wedge $, we find, using the Leibniz rule, \begin{align} \Omega\left(\ket{u_{m,\bf{k}}}\right)&=\left(P\nabla \wedge P\nabla\right)\left(\ket{u_{m,\bf{k}}}\right) \nonumber\\ &=\left(P\nabla\wedge\right)\left(\sum_{n=1}^{r}\theta^{n}_{\; m}\ket{u_{n,\bf{k}}}\right) \nonumber\\ &=\sum_{n=1}^{r}\left(d\theta^{n}_{\; m}+\sum_{p=1}^{r} \theta^{n}_{\; p}\wedge \theta^{p}_{\; m}\right)\ket{u_{n,\bf{k}}}, \end{align} where we used anti-symmetry of the wedge product in the last line. Writing $\Theta=[\Theta^{n}_{\; m}]_{1\leq m,n\leq r}$ for the matrix valued $2$-form whose components are \begin{align} \Theta^{n}_{\; m}=d\theta^{n}_{\; m}+\sum_{p=1}^{r} \theta^{n}_{\; p}\wedge \theta^{p}_{\; m}, \end{align} we see that \begin{align} \Omega\left(\ket{u_{m,\bf{k}}}\right)=\sum_{n=1}^{r}\Theta^{n}_{\; m}\ket{u_{n,\bf{k}}}. \end{align} We conclude that the local forms of the covariant derivative and the associated curvature, in terms of the local unitary frame field $\ket{u_{1,\bf{k}}},\dots,\ket{u_{r,\bf{k}}}$ are, respectively, $d+\theta$ and $\Theta=d\theta+\theta\wedge \theta$. Finally, note that \begin{align} \Theta^{n}_{\; m} &= d\theta^{n}_{\; m} +\sum_{p=1}^{r} \theta^{n}_{\; p}\wedge \theta^{p}_{\; m} \nonumber \\ &=\bra{ du_{n,\bf{k}}}\wedge \ket{ du_{m,\bf{k}}} +\sum_{p=1}^{r}\bra{u_{n,\bf{k}}}d\ket{u_{p,\bf{k}}}\wedge \bra{u_{p,\bf{k}}}d\ket{u_{m,\bf{k}}}\nonumber\\ &=\bra{du_{n,\bf{k}}}\wedge \left(1-\sum_{p=1}^{r}\ket{u_{p,\bf{k}}}\bra{u_{p,\bf{k}}}\right)\ket{du_{m,\bf{k}}}\nonumber\\ &=\bra{du_{n,\bf{k}}}\wedge Q(\bf{k})\ket{du_{m,\bf{k}}}\nonumber\\ &=\sum_{i,j=1}^{d}\bra{\partial_i u_{n,\bf{k}}} Q(\bf{k})\ket{\partial_j u_{m,\bf{k}}}dk_i\wedge dk_j. \end{align} It then follows that \begin{align} F&=\textnormal{\text{Tr}}\left(\Omega\right)=\textnormal{\text{Tr}}\left(PdP\wedge dPP\right)=\textnormal{\text{Tr}}\left(PdP\wedge dP\right)\nonumber\\ &=\sum_{n=1}^{r}\bra{u_{n,\bf{k}}}\Omega\ket{u_{n,\bf{k}}}=\sum_{n=1}^{r}\Theta^{n}_{\; n} \nonumber\\ &=\sum_{i,j=1}^{d}\sum_{m=1}^{r}\bra{\partial_i u_{n,\bf{k}}} Q(\bf{k})\ket{\partial_j u_{n,\bf{k}}}dk_i\wedge dk_j, \end{align} where we used the cyclic property of the trace and $P^2=P$ in the first line. This establishes Eq.~\eqref{eq: Abelian Berry curvature}. \section{DC electrical conductivity of degenerate bands} The dc conductivity tensor $\sigma^{ij}$ decomposes into \cite{Mitscherling2020} \begin{align} \label{eqn:sigma} \sigma^{ij}=\sigma^{ij}_\text{intra}+\sigma^{ij,s}_\text{inter}+\sigma^{ij,a}_\text{inter}\, . \end{align} In the main text, we discuss only the quantum metric contribution $\sigma^{ij,s}_\text{inter}$. Here, we will present the complete discussion including the intraband contribution $\sigma^{ij}_\text{intra}$ and the Berry curvature contribution $\sigma^{ij,a}_\text{inter}$. For the non-interacting $N$-band Hamiltonian given in Eq.~\eqref{eqn:H}, we have \cite{Mitscherling2022} \begin{align} &\sigma^{ij}_\text{intra}=\frac{e^2}{\hbar}\!\!\int\!\!\!\frac{d^d\mathbf{k}}{(2\pi)^d} \sum_{n=1}^N w^{\text{intra}}_{n}(\mathbf{k})\,\, v^{i}_{n,\mathbf{k}} v^{j}_{n,\mathbf{k}} \, , \label{eqn:sigmaIntra}\\ &\sigma^{ij,s}_\text{inter}=\frac{e^2}{\hbar}\!\!\int\!\!\!\frac{d^d\mathbf{k}}{(2\pi)^d} \mathop{\sum_{n=1}^{N}\sum_{m=1}^{N}}_{n\neq m} w^{\text{inter},s}_{nm}(\mathbf{k})\,\, g^{ij}_{nm}(\mathbf{k}) \, , \label{eqn:sigmaS}\\ &\sigma^{ij,a}_\text{inter}=\frac{e^2}{\hbar}\!\!\int\!\!\!\frac{d^d\mathbf{k}}{(2\pi)^d} \mathop{\sum_{n=1}^{N}\sum_{m=1}^{N}}_{n\neq m} w^{\text{inter},a}_{nm}(\mathbf{k})\,\, \Omega^{ij}_{nm}(\mathbf{k}) \, , \label{eqn:sigmaA} \end{align} where $v^i_{n,\mathbf{k}}=\partial_i E_{n,\mathbf{k}}$ are the quasiparticle velocities, $g^{ij}_{nm}=\text{Re}\big[r^i_{nm}r^j_{mn}\big]$, and $\Omega^{ij}_{nm}=-2\text{Im}\big[r^i_{nm}r^j_{mn}\big]$, where $r^i_{nm}$ is the transition dipole matrix element defined in the main text. Each term is weighted by \begin{alignat}{2} &w^{\text{intra}}_{n}(\mathbf{k})&&=-\pi\!\!\int\!\!d\epsilon f'(\epsilon)\, \big[\mathcal{A}_n(\bf{k},\epsilon)\big]^2 \, ,\\ &w^{\text{inter},s}_{nm}(\mathbf{k})&&=-\pi(E_{n,\mathbf{k}}\!-\!E_{m,\mathbf{k}})^2\!\!\int\!\!d\epsilon f'(\epsilon)\mathcal{A}_n(\bf{k},\epsilon)\mathcal{A}_m(\bf{k},\epsilon), \label{eqn:wS}\\ &w^{\text{inter},a}_{nm}(\mathbf{k})&&=-\pi^2(E_{n,\mathbf{k}}-E_{m,\mathbf{k}})^2\!\!\int\!\!d\epsilon f(\epsilon) \Big(\big[\mathcal{A}_n(\bf{k},\epsilon)\big]^2\mathcal{A}_m(\bf{k},\epsilon)-\big[\mathcal{A}_m(\bf{k},\epsilon)\big]^2\mathcal{A}_n(\bf{k},\epsilon)\Big)\,, \label{eqn:wA} \end{alignat} where $\mathcal{A}_n(\mathbf{k},\epsilon)$ is the quasiparticle spectral function of band $n$ defined in the main text. As in the main text, we consider $r$ bands, which are $N_i$-times degenerate. We have $\sum_{i=1}^r N_i=N$. We note that $w^{\text{intra}}_{ns}$, $w^{\text{inter},s}_{(ns)(ml)}$ and $w^{\text{inter},a}_{(ns)(ml)}$ only depend on the eigenenergies and are, thus, equal for all $s=1,...,N_n$ and $m=1,...,N_m$ belonging to the respective degenerate band $n$ and $m$. Using this, we split the summations in the conductivity contributions \eqref{eqn:sigmaIntra}, \eqref{eqn:sigmaS}, and \eqref{eqn:sigmaA}, and obtain \begin{align} &\sigma^{ij}_\text{intra}=\frac{e^2}{\hbar}\!\!\int\!\!\!\frac{d^d\mathbf{k}}{(2\pi)^d} \sum_{n=1}^r N^{}_n w^{\text{intra}}_{n}(\mathbf{k})\,\, v^{i}_{n,\mathbf{k}} v^{j}_{n,\mathbf{k}} \, , \label{eqn:sigmaIntraDeg}\\ &\sigma^{ij,s}_\text{inter}=\frac{e^2}{\hbar}\!\!\int\!\!\!\frac{d^d\mathbf{k}}{(2\pi)^d} \mathop{\sum_{n=1}^{r}\sum_{m=1}^{r}}_{n\neq m} w^{\text{inter},s}_{nm}(\mathbf{k})\,\, \widehat g^{\,ij}_{nm}(\mathbf{k}) \, , \label{eqn:sigmaSDeg}\\ &\sigma^{ij,a}_\text{inter}=\frac{e^2}{\hbar}\!\!\int\!\!\!\frac{d^d\mathbf{k}}{(2\pi)^d} \mathop{\sum_{n=1}^{r}\sum_{m=1}^{r}}_{n\neq m} w^{\text{inter},a}_{nm}(\mathbf{k})\,\, \widehat{\Omega}^{\,ij}_{nm}(\mathbf{k}) \, . \label{eqn:sigmaADeg} \end{align} We see that the intraband contribution $\sigma^{ij}_\text{intra}$ of a degenerate band is trivially enhanced by the factor $N_i>1$. In contrast, the interband contributions involve \begin{align} \label{eqn:gnmAppendix} \widehat g^{\,ij}_{nm}(\bf{k}) &\equiv \sum_{r=1}^{N_n}\sum_{s=1}^{N_m} \Re\!\big[r^i_{(nr)(ms)}r^j_{(ms)(nr)}\big]=\sum_{r=1}^{N_n}\sum_{s=1}^{N_m} \Re\!\Big[i\langle u_{nr,\mathbf{k}}|\partial_i u_{ms,\mathbf{k}}\rangle i\langle u_{ms,\mathbf{k}}|\partial_j u_{nr,\mathbf{k}}\rangle\Big] \\ \label{eqn:Onm} \widehat \Omega^{\,ij}_{nm} (\bf{k})&\equiv-2 \sum_{r=1}^{N_n}\sum_{s=1}^{N_m} \Im\!\big[r^i_{(nr)(ms)}r^j_{(ms)(nr)}\big]= -2\sum_{r=1}^{N_n}\sum_{s=1}^{N_m}\Im\! \Big[i\langle u_{nr,\mathbf{k}}|\partial_i u_{ms,\mathbf{k}}\rangle i\langle u_{ms,\mathbf{k}}|\partial_j u_{nr,\mathbf{k}}\rangle\Big] \, , \end{align} which includes the remaining summations over the degenerate subspaces of the involved degenerate bands $n$ and $m$. In the next section, we will show that $\widehat g^{\, ij}_{nm}$ and $\widehat \Omega^{\, ij}_{nm}$ are $U(N_n)\times U(N_m)$-gauge invariant. We have seen in the main text that \begin{align} \sum_{\underset{m\neq n}{m=1}}^r \widehat g^{\,ij}_{nm}(\mathbf{k})=g^{ij}_{n}(\bf{k}) \, , \label{eqn:relationG} \end{align} which relates the gauge-invariant transition rates $\widehat g^{\, ij}_{nm}$ to the quantum metric of the underlying Grassmannian manifold of band $n$. Analogously, we have \begin{align} \sum_{\underset{m\neq n}{m=1}}^r \widehat \Omega^{\,ij}_{nm}(\mathbf{k})=iF^{\,ij}_n(\mathbf{k}) \, , \end{align} so that we identify the Abelian Berry curvature of the underlying Grassmannian of band $n$. \section{Gauge invariance} We show explicitly that $\widehat{g}^{\,ij}_{nm}$ and $\widehat{\Omega}^{\,ij}_{nm}$, which are defined in Eq.~\eqref{eqn:gnmAppendix} (or Eq.~\eqref{eqn:gnm} in the main text) and Eq.~\eqref{eqn:Onm}, respectively, are invariant under a $\text{U}(N_n)\times\text{U}(N_m)$-gauge transformation of the underlying degenerate bands $n$ and $m$. Let us assume a local unitary gauge transformations $U^p\in \text{U}(N_p)$, with $p=n,m$, where here and below, for the sake of simplicity, we omit the $\bf{k}$ dependence of the involved quanties, i.e., $U^p\equiv U^{p}(\bf{k})$, $\ket{u_{mr}}\equiv \ket{u_{mr,\bf{k}}}$ and $\ket{u_{ns}}\equiv \ket{u_{ns,\bf{k}}}$, with $r=1,\dots,N_{m}$ and $s=1,\dots,N_{n}$. Its components fulfill the identity \begin{align} \sum_{\tilde s=1}^{N_p}(U^p_{\tilde s s})^*\,U^p_{\tilde s s'}=\delta^{}_{s s'}, \label{eqn:unitary} \end{align} where ${}^*$ denotes complex conjugation. We have \begin{align} \ket{u_{ps}}=\sum^{N_p}_{\tilde s=1} U^p_{s\tilde s}\,\ket{u_{n\tilde s}} \, , \hspace{1cm} \bra{u_{ps}}=\sum^{N_p}_{\tilde s=1}(U^p_{s \tilde s})^*\,\bra{u_{n\tilde s}} \,, \end{align} with $p=n,m$. Thus, the transition dipole moment transforms as \begin{align} r^j_{(ns)(mr)}&=i\bra{u_{ns}}\partial_j\ket{u_{mr}}=\sum_{\tilde s=1}^{N_n}\sum_{\tilde r=1}^{N_m} i\, (U^n_{s\tilde s})^*\,\big(\partial_j U^m_{r\tilde r}\big)\,\,\langle u_{n\tilde s}|u_{m\tilde r}\rangle + \sum_{\tilde s=1}^{N_n}\sum_{\tilde r=1}^{N_m} (U^n_{s\tilde s})^*\, U^m_{r\tilde r}\,\, r^j_{(n\tilde s)(m\tilde r)} \label{eqn:rGauge2} \end{align} We see that the first term on the right hand side drops for $n\neq m$, since the subspaces are orthogonal to each other. Finally, we calculate \begin{align} \sum_{s=1}^{N_n}\sum_{r=1}^{N_m}r^i_{(ns)(mr)}r^j_{(mr)(ns)} &=\sum_{s,\tilde s, \tilde s'=1}^{N_n}\sum_{r,\tilde r,\tilde r'=1}^{N_m}(U^n_{s\tilde s})^*\, U^m_{r\tilde r}\,\, (U^m_{r\tilde r'})^*\, U^n_{s\tilde s'} r^i_{(n\tilde s)(m\tilde r)}\,\,r^j_{(m\tilde r')(n\tilde s')}\\&=\sum_{\tilde s, \tilde s'=1}^{N_n}\sum_{\tilde r,\tilde r'=1}^{N_m} \delta_{\tilde s,\tilde s'}\delta_{\tilde r,\tilde r'} r^i_{(n\tilde s)(m\tilde r)}\,\,r^j_{(m\tilde r')(n\tilde s')} \\&=\sum_{\tilde s=1}^{N_n}\sum_{\tilde r=1}^{N_m} r^i_{(n\tilde s)(m\tilde r)}\,\,r^j_{(m\tilde r)(n\tilde s)} \, , \end{align} where we used \eqref{eqn:unitary} in the second step. After taking the real and imaginary part, we see that $\widehat g^{\,ij}_{nm,\mathbf{k}}$ and $\widehat \Omega^{\,ij}_{nm,\mathbf{k}}$ as defined in \eqref{eqn:gnmAppendix} and \eqref{eqn:Onm} are gauge invariant under $\text{U}(N_n)\times\text{U}(N_m)$ of the coupled degenerate subspaces. An alternative proof of this result can be given as follows. One introduces orthogonal projectors $P_m=\sum_{r=1}^{N_{m}}\ket{u_{mr}}\bra{u_{mr}}$ and $P_n=\sum_{s=1}^{N_{n}}\ket{u_{ns}}\bra{u_{ns}}$. The quantity \begin{align} \textnormal{\text{Tr}}\left( P_n \frac{\partial P_m}{\partial k_i} P_m\frac{\partial P_m}{\partial k_j} P_n\right) \end{align} is gauge invariant (it is written solely in terms of the orthogonal projectors which are gauge invariant themselves) and due to $P_n$ and $P_m$ defining at each $\bf{k}$ mutually orthogonal subspaces, it follows that \begin{align} \textnormal{\text{Tr}}\left( P_n \frac{\partial P_m}{\partial k_i} P_m\frac{\partial P_m}{\partial k_j} P_n\right)&=\textnormal{\text{Tr}}\left(\sum_{s,s'=1}^{N_n}\sum_{r=1}^{N_m} \ket{u_{ns}}\bra{u_{ns}}\frac{\partial}{\partial k_i}\ket{u_{mr}}\frac{\partial}{\partial k_j}\left(\bra{u_{mr}}\right)\ket{u_{ns'}}\bra{u_{ns'}}\right) \nonumber \\ &=\sum_{s=1}^{N_n}\sum_{r=1}^{N_m}\bra{u_{ns}}\frac{\partial}{\partial k_i}\ket{u_{mr}}\frac{\partial}{\partial k_j}\left(\bra{u_{mr}}\right)\ket{u_{ns}}\nonumber\\ &=\sum_{s=1}^{N_n}\sum_{r=1}^{N_m}\bra{u_{ns}}i\frac{\partial}{\partial k_i}\ket{u_{mr}}\bra{u_{mr}}i\frac{\partial}{\partial k_j}\ket{u_{ns}}=\sum_{s=1}^{N_n}\sum_{r=1}^{N_m}r^i_{(ns)(mr)}r^j_{(mr)(ns)}. \end{align} As in the last part of the previous proof, taking real and imaginary parts produces the desired result. \section{Toy models for collapsing bands} \subsection{(Trivial) Example of two band collapse and different metrics} Suppose we have the two-band Hamiltonian \begin{align} H(\bf{k})=\varepsilon_{1,\mathbf{k}}\, p(\mathbf{k}) +\varepsilon_{2,\mathbf{k}}\, q(\mathbf{k}), \end{align} where \begin{align} p(\mathbf{k})=\frac{1}{2}\left(1+\vec{n}_{\mathbf{k}}\cdot \vec{\sigma}\right) \text{ and } q(\mathbf{k})=1-p(\mathbf{k}), \end{align} and $\vec{n}:\textnormal{\text{BZ}}^d\to S^2; \mathbf{k}\mapsto \vec{n}_{\mathbf{k}}$ describes a vector in the Bloch sphere. Observe that $p(\mathbf{k})+q(\mathbf{k})=1$. This means that when the two bands collapse, i.e., when $\varepsilon_{1,\mathbf{k}}=\varepsilon_{2,\mathbf{k}}$, we get a trivial projector and the quantum metric is zero. However, each band has a quantum metric \begin{align} g=\frac{1}{2}\textnormal{\text{Tr}}\left( dp dp\right)=\frac{1}{2}\textnormal{\text{Tr}}\left( dq dq\right)=\frac{1}{4}d\vec{n}\cdot d\vec{n}, \end{align} where we used $dq=-dp$. The reason why the quantum metric associated with the collapsed rank $2$ projector is zero can be traced back to the mixed term contribution $\textnormal{\text{Tr}}\left(dp dq\right)=-\textnormal{\text{Tr}}\left(dpdp\right)=2g$ \begin{align} \frac{1}{2}\textnormal{\text{Tr}}\left[ d\left( p+q\right) d\left(p +q\right)\right]=\frac{1}{2}\textnormal{\text{Tr}}\left(dpdp\right) +\frac{1}{2}\textnormal{\text{Tr}}\left(dqdq\right) +\textnormal{\text{Tr}}\left(dp dq\right)=2g-2g=0. \end{align} This construction illustrates how the quantum metric of a degenerate band constructed from two bands which collapse into one is not, in general, simply the sum of the quantum metrics associated to each band. More generally, we can consider a band projector, \begin{align} P(\bf{k})=P_1(\bf{k})+P_2(\bf{k}), \end{align} with $P_1$ and $P_2$ having ranks $r_1$ and $r_2$, respectively, with $r=r_1+r_2$ and $P_iP_j=\delta_{ij}P_j$, $i,j=1,2$. We consider \begin{align} H(\bf{k})=\varepsilon_{1,\mathbf{k}}\, P_1(\mathbf{k}) +\varepsilon_{2,\mathbf{k}}\, P_2(\mathbf{k}), \end{align} and collapse the two bands described by $P_1$ and $P_2$ by setting $\varepsilon_{1,\bf{k}}=\varepsilon_{2,\bf{k}}$. Provided $P_1+P_2$ is a constant projector, i.e., if $\text{Im}(P)$ is a trivial bundle, we have $dP_1=-dP_2$. Then the quantum metric of the composite band vanishes identically, since \begin{align} g=g_1+g_2+\textnormal{\text{Tr}}(dP_1dP_2)\,, \end{align} where $g_i=(1/2)\textnormal{\text{Tr}}(dP_idP_i)$, $i=1,2$ and the mixed term satisfies \begin{align} \textnormal{\text{Tr}}(dP_1dP_2)=-\textnormal{\text{Tr}}(dP_1dP_1)=-\textnormal{\text{Tr}}(dP_2dP_2), \end{align} so that it cancels the contributions from each individual band since $g_1=(1/2)\textnormal{\text{Tr}}(dP_1dP_1)=(1/2)\textnormal{\text{Tr}}(dP_2dP_2)=g_2$. \subsection{Collapsing bands within a $3$-band system} Take the spin-$1$ (unitary) irreducible representation of $\text{SU}(2)$, denoted below by $\rho$, and consider the Hamiltonian \begin{align} H(\vec{n})=\vec{n}\cdot \vec{S}, \label{eq: spin 1 model} \end{align} where $\vec{S}=(S_1,S_2,S_3)$ are the generators of the Lie algebra in this representation and we choose $S_3$ to be diagonal. In particular, we can take \begin{align} S_1=\left[ \begin{array}{ccc} 0 & \frac{1}{\sqrt{2}} & 0 \\ \frac{1}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \\ 0 & \frac{1}{\sqrt{2}} & 0 \\ \end{array} \right], \ S_2=\left[ \begin{array}{ccc} 0 & \frac{i}{\sqrt{2}} & 0 \\ -\frac{i}{\sqrt{2}} & 0 & \frac{i}{\sqrt{2}} \\ 0 & -\frac{i}{\sqrt{2}} & 0 \\ \end{array} \right] \text{ and } S_3=\left[\begin{array}{ccc} -1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \\ \end{array}\right]. \label{eq: spin-1 irrep} \end{align} There exists an element of $U$ of $\text{SU}(2)$ such that $\rho(U)$ rotates $H(\vec{n})$ into diagonal form \begin{align} H(\vec{n})=\rho(U)S_3\rho(U)^{\dagger}. \end{align} In fact, $U$ is only defined up to multiplication on the right by elements of the diagonal $\text{U}(1)$ subgroup and its class, under the quotient $\text{SU}(2)/\text{U}(1)\cong S^2$, determines $\vec{n}\in S^2$ uniquely. Since \begin{align} S_3=\text{diag}(-1,0,1), \end{align} we find three eigenvector bundles over $S^2$, denoted as $E_{-}\to S^2$, $E_{0}\to S^2$, and $E_{+}\to S^2$, whose fibers over $\vec{n}$ are the corresponding eigenspaces of $H(\vec{n})$. \subsubsection{Quantum metric} We wish to calculate the quantum metric of each of the bands. It is clear that for any $R\in\text{SO}(3)$ each of the projectors satisfies \begin{align} P(R\vec{n})=\rho(U)P(\vec{n})\rho(U)^{-1}, \label{eq: rotation covariance} \end{align} where $U$ is any element of $\text{SU}(2)$ with $U\left(\vec{n}\cdot \vec{\sigma}\right)U^{-1}=\left(R\vec{n}\right)\cdot \vec{\sigma}$. There are only two such elements $U$ and $-U$. The map $\text{SU}(2)\to\text{SO}(3)$ described above is just the usual double cover map. Since the Fubini-Study metric is invariant under unitary transformations, it follows that the quantum metric of these three bands has to be $\text{SO}(3)$-invariant. Therefore, up to a scale factor, they have to be of the form $d\vec{n}\cdot d\vec{n}$. To determine the precise scale factors, it is enough to compute the metric at $\vec{n}_0=(0,0,1)$. At that point, the fibers of $E_-$, $E_0$, and $E_{+}$ are spanned, respectively, by \begin{align} \ket{\psi_{-}(\vec{n}_0)}=\left[\begin{array}{c} 1\\ 0\\ 0 \end{array}\right],\ \ket{\psi_{0}(\vec{n}_0)}=\left[\begin{array}{c} 0\\ 1\\ 0 \end{array}\right] \text{ and } \ket{\psi_{+}(\vec{n}_0)}=\left[\begin{array}{c} 0\\ 0\\ 1 \end{array}\right]. \end{align} We also have the associated orthogonal projectors $P_m(\vec{n}_0)=\ket{\psi_m(\vec{n}_0)}\bra{\psi_m(\vec{n}_0)}$, $m=-,0,+$. We will now consider the quantum metric $g_{i}$ associated to each of the $P_i$ and also the quantum metric $g_{(ij)}$ associated to $P_{ij}=P_i+P_j$, $i\neq j$ with $i,j\in \{-,0,+\}$. The one corresponding to the three bands is trivially zero because the corresponding projector is just the identity matrix. Due to the previous argument based on rotation invariance, see Eq.~\eqref{eq: rotation covariance}, it is enough to compute the scale factor at $\vec{n}_0$. To do so, we first recall the identity \begin{align} \bra{\psi_i(\vec{n})}d\ket{\psi_j(\vec{n})}=\frac{\bra{\psi_i(\vec{n})}dH\ket{\psi_j(\vec{n})}}{\varepsilon_j-\varepsilon_i}=\frac{\bra{\psi_i(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_j(\vec{n})}}{\varepsilon_j-\varepsilon_i}, \end{align} where $\varepsilon_j$, $j=-,0,+$, denote the eigenvalues of $H$. Then, we also recall that, using $PdP=dPQ$ for any projector and $Q=I-P$ its orthogonal complement, we can write \begin{align} g_i(\vec{n})=\textnormal{\text{Tr}}\left(P_idP_idP_i\right)=\textnormal{\text{Tr}}\left(dP_iQ_idP_i\right)=\sum_{j\neq i}\frac{|\bra{\psi_i(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_j(\vec{n})}|^2}{\left(\varepsilon_j-\varepsilon_i\right)^2} \end{align} and \begin{align} g_{(ij)}(\vec{n})=\textnormal{\text{Tr}}\left(P_{ij}dP_{ij}dP_{ij}\right)=\textnormal{\text{Tr}}\left(dP_{ij}Q_{ij}dP_{ij}\right)=\sum_{k\notin \{i,j\}}\sum_{l\in \{i,j\}}\frac{|\bra{\psi_l(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_k(\vec{n})}|^2}{\left(\varepsilon_l-\varepsilon_k\right)^2}. \end{align} At this point, we note that any tangent vector to $S^2$ at $\vec{n}_0$ assumes the form $\vec{u}=(u_1,u_2,0)$, and hence, at $\vec{n}_0$, \begin{align} d\vec{n}\cdot \vec{S}=dn_1\,S_1+dn_2\, S_2 =\frac{1}{2}\left(dn\, S_{-}+d\overline{n}\, S_{+}\right), \end{align} where we introduced $dn=dn_1+idn_2$, and the ladder operators $S_{\pm}=S_1\pm iS_2$. We can then explicitly compute, at $\vec{n}=\vec{n}_0$, \begin{align} \frac{\bra{\psi_i(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_j(\vec{n})}}{\varepsilon_j-\varepsilon_i}=\frac{1}{2}\frac{\bra{\psi_i(\vec{n})}\left(dn\, S_{-}+d\overline{n}\, S_{+}\right)\ket{\psi_j(\vec{n})}}{\varepsilon_j-\varepsilon_i}=\frac{1}{2}\left(\delta_{j,i+1}\, dn \bra{\psi_i}S_{-}\ket{\psi_j} -\delta_{j,i-1}\,d\overline{n}\bra{\psi_i}S_{+}\ket{\psi_j}\right), \end{align} where one has to be careful since the states with $j=i+1$ and $j=i-1$ may not exist, in which case we are instructed to give the value zero. From this we can see that \begin{align} \frac{|\bra{\psi_i(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_j(\vec{n})}|^2}{\left(\varepsilon_j-\varepsilon_i\right)^2}&=\frac{1}{4}\left(\delta_{j,i+1} \,dn \bra{\psi_i}S_{-}\ket{\psi_j} -\delta_{j,i-1}\,d\overline{n}\bra{\psi_i}S_{+}\ket{\psi_j}\right)\left(-\delta_{i,j+1} \,dn \bra{\psi_j}S_{-}\ket{\psi_i} +\delta_{i,j-1}\,d\overline{n}\bra{\psi_j}S_{+}\ket{\psi_i}\right)\nonumber\\ &=\frac{|dn|^2}{4}\left(\delta_{j,i+1}|\bra{\psi_i}S_{-}\ket{\psi_{j}}|^2 +\delta_{j,i-1}|\bra{\psi_i}S_{+}\ket{\psi_{j}}|^2\right)\nonumber\\ &=\frac{d\vec{n}\cdot d\vec{n}}{4}\left(\delta_{j,i+1}|\bra{\psi_i}S_{-}\ket{\psi_{j}}|^2 +\delta_{j,i-1}|\bra{\psi_i}S_{+}\ket{\psi_{j}}|^2\right). \end{align} Hence, \begin{align} g_{i}=\frac{d\vec{n}\cdot d\vec{n}}{4}\sum_{j\neq i}\left(\delta_{j,i+1}|\bra{\psi_i}S_{-}\ket{\psi_{j}}|^2 +\delta_{j,i-1}|\bra{\psi_i}S_{+}\ket{\psi_{j}}|^2\right), \end{align} and, similarly, \begin{align} g_{(ij)}=\frac{d\vec{n}\cdot d\vec{n}}{4}\sum_{k\notin \{i,j\}}\sum_{l\in \{i,j\}}\left(\delta_{l,k+1}|\bra{\psi_l}S_{-}\ket{\psi_{k}}|^2 +\delta_{l,k-1}|\bra{\psi_l}S_{+}\ket{\psi_{k}}|^2\right). \end{align} Evaluating the sums explicitly, we get the final result, valid at any $\vec{n}\in S^2$, \begin{align} g_{-}=\frac{d\vec{n}\cdot d\vec{n}}{2},\ g_{0}=d\vec{n}\cdot d\vec{n}, \text{ and } g_{+}=\frac{d\vec{n}\cdot d\vec{n}}{2}, \label{eq: nondegenerate qmetrics} \end{align} and for the rank $2$ projectors \begin{align} g_{(-0)}=\frac{d\vec{n}\cdot d\vec{n}}{2},\ g_{(+-)}=d\vec{n}\cdot d\vec{n}, \text{ and } g_{(+0)}=\frac{d\vec{n}\cdot d\vec{n}}{2}. \label{eq: degenerate qmetrics} \end{align} \subsubsection{Abelian Berry curvature} For the Abelian Berry curvatures given by $\textnormal{\text{Tr}}\left( PdP\wedge dP\right)$, where $P$ is any of the projectors considered, the calculation is similar. We compute at $\vec{n}_0$ \begin{align} \frac{\bra{\psi_i(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_j(\vec{n})}\wedge \bra{\psi_j(\vec{n})}d\vec{n}\cdot \vec{S}\ket{\psi_i(\vec{n})}}{\left(\varepsilon_j-\varepsilon_i\right)^2}&=\frac{dn \wedge d\overline{n}}{4}\left(\delta_{j,i+1}|\bra{\psi_i}S_{-}\ket{\psi_{j}}|^2 -\delta_{j,i-1}|\bra{\psi_i}S_{+}\ket{\psi_{j}}|^2\right). \end{align} We then use $dn\wedge d\overline{n}=-2i dn_1\wedge dn_2=-2i \vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right)$, which holds at $\vec{n}=\vec{n}_0$. Thus, the Abelian Berry curvatures at $\vec{n}_0$ \begin{align} F_{i}=-\frac{i}{2} \vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right)\sum_{j\neq i}\left(\delta_{j,i+1}|\bra{\psi_i}S_{-}\ket{\psi_{j}}|^2 - \delta_{j,i-1}|\bra{\psi_i}S_{+}\ket{\psi_{j}}|^2\right), \end{align} and, similarly, \begin{align} F_{(ij)}=-\frac{i}{2} \vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right)\sum_{k\notin \{i,j\}}\sum_{l\in \{i,j\}}\left(\delta_{l,k+1}|\bra{\psi_l}S_{-}\ket{\psi_{k}}|^2 -\delta_{l,k-1}|\bra{\psi_l}S_{+}\ket{\psi_{k}}|^2\right). \end{align} Note that the Abelian curvatures associated with the orthogonal projector $P_{ij}=P_i+P_j$ are simply the sums of those from $P_i$ and $P_j$---this is different from the case of the quantum metric, where there is a mixed term that does not cancel (here it does due to skew-symmetry of the wedge product). Evaluating the sums, this time, one gets \begin{align} F_{-}=-i \vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right),\ F_{0}=0\text{ and } F_{+}=i \vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right), \label{eq: nondegenerate qmetrics} \end{align} and for the rank $2$ projectors \begin{align} F_{(-0)}=-i\vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right),\ F_{(+-)}=0 \text{ and } F_{(+0)}=i\vec{n}\cdot \left(d\vec{n}\times d\vec{n}\right). \label{eq: degenerate qmetrics} \end{align} By rotation invariance, this is the correct form for general $\vec{n}$. Using $\int_{S^2}\vec{n}\cdot\left(d\vec{n}\times d\vec{n}\right)=4\pi$, one immediately gets that the first Chern numbers of the line bundles $E_{-},E_{0},E_{+}$ are, respectively, \begin{align} \int_{S^2}\frac{iF_{-}}{2\pi}=2,\ \int_{S^2}\frac{iF_{0}}{2\pi}=0 \text{ and} \int_{S^2}\frac{iF_{+}}{2\pi}=-2. \end{align} \subsubsection{Construction of the Hamiltonian used in the main text} With the above construction in mind, together with a map $\vec{n}:\textnormal{\text{BZ}}^2\to S^2$, we can build a Bloch Hamiltonian of the form \begin{align} H(\mathbf{k})=\sum_{m=-,0,+}\varepsilon_{n,\mathbf{k}}\,P_n(\mathbf{k})=\varepsilon_{-,\mathbf{k}}\,P_{-}(\mathbf{k})+\varepsilon_{0,\mathbf{k}}\,P_{0}(\mathbf{k})+\varepsilon_{+,\mathbf{k}}\,P_{+}(\mathbf{k}), \label{eq: Bloch Hamiltonian spin-1 model appendix} \end{align} where the $P_{m}(\bf{k}):=P_{m}(\vec{n}(\mathbf{k}))$ are simply pullbacks, i.e. composition with the map $\mathbf{k}\mapsto \vec{n}(\mathbf{k})$, of the $P_m$ defined for the Hamiltonian of Eq.~\eqref{eq: spin 1 model} and the $\varepsilon_{m,\mathbf{k}}$ are energy parameter functions, which we can tune. In particular, we can take the energy bands to be flat, and collapse bands by manipulating the energy values. We determine the quantum metrics by pullback under the map $\mathbf{k}\mapsto \vec{n}(\mathbf{k})$ of Eq.~\eqref{eq: nondegenerate qmetrics} and Eq.~\eqref{eq: degenerate qmetrics}. Collapsing the three bands yields a vanishing quantum metric. Taking into account that the Berry curvatures are obtained via pullback by the map $\vec{n}:\mathbf{k}\mapsto \vec{n}(\mathbf{k})$, the first Chern numbers of each of the bands are obtained by computing the degree (also known as the winding number) of the map $\vec{n}$, which is given by \begin{align} \deg(\vec{n})=\int_{\textnormal{\text{BZ}}^2}\frac{d^2\mathbf{k}}{4\pi} \vec{n}\cdot\left(\frac{\partial \vec{n}}{\partial k_1}\times\frac{\partial \vec{n}}{\partial k_2}\right) \in\mathbb{Z}. \end{align} In particular we get $2\deg(\vec{n}),0,-2\deg(\vec{n})$ for the bands labelled by $-,0,+$, respectively, and, similarly, $2\deg(\vec{n}),0,-2\deg(\vec{n})$ for the degenerate bands labelled by $-0,+-,+0$, respectively. The sum of all bands has zero 1st Chern number because the resulting vector bundle is trivial. \subsubsection{Expressions for the orthogonal projectors} We have used the following simple expressions for the orthogonal projectors associated to the Hamiltonian in Eq.~\eqref{eq: spin 1 model} \begin{align} P_{-}(\vec{n})=\frac{1}{2}\left[-\left(\vec{n}\cdot\vec{S}\right)+\left(\vec{n}\cdot\vec{S}\right)^2\right],\ P_0(\vec{n})=1-\left(\vec{n}\cdot \vec{S}\right)^2 \text{and } P_{+}(\vec{n})=\frac{1}{2}\left[\left(\vec{n}\cdot\vec{S}\right)+\left(\vec{n}\cdot\vec{S}\right)^2\right]. \end{align} The derivation of this formula can be done as follows. From the Green's function \begin{align} G(z;\vec{n})=\left(z-H(\vec{n})\right)^{-1}=\sum_{i}\frac{1}{z-\varepsilon_i}P_i(\vec{n}), \end{align} it follows that \begin{align} P_i(\vec{n})=\int_{\gamma_{i}}\frac{dz}{2\pi i}G(z;\vec{n}), \end{align} where $\gamma_i$ is a small contour enclosing only the isolated eigenvalue $\varepsilon_i$ counterclockwise. We use the Cayley-Hamilton theorem, which states that evaluating the characteristic polynomial on the matrix yields zero, to show \begin{align} \left(\vec{n}\cdot \vec{S}\right)^{3}=\vec{n}\cdot \vec{S}. \end{align} We write \begin{align} G(z;\vec{n})&=(z-H(\vec{n}))^{-1}=\frac{1}{z}\sum_{k=0}^{\infty}\left(\frac{H(\vec{n})}{z}\right)^k=\frac{1}{z}\left[1+ \left(z^{-1}+z^{-3}+\dots\right)\left(\vec{n}\cdot\vec{S}\right) +(z^{-2}+z^{-4}+\dots)\left(\vec{n}\cdot\vec{S}\right)^2\right]\nonumber\\ &=\frac{1}{z} +\frac{1}{z^2-1}\left(\vec{n}\cdot\vec{S}\right)+\frac{1}{z}\frac{1}{z^2-1}\left(\vec{n}\cdot\vec{S}\right)^2. \end{align} Evaluating the residues at the eigenvalues $-1,0,+1$ yields the desired result. \subsubsection{Vanishing of $\bra{\psi_{+}(\vec{n})}d\ket{\psi_{-}(\vec{n})}$} We give a proof that $\bra{\psi_{+}(\vec{n})}d\ket{\psi_{-}(\vec{n})}=0$ for any choice of local eigenvectors $\ket{\psi_{+}(\vec{n})}$ and $\ket{\psi_{-}(\vec{n})}$, with eigenvalues $+1$ and $-1$, respectively, of the Hamiltonian in Eq.~\eqref{eq: spin 1 model}. The proof is a consequence of the form of the matrices in Eq.~\eqref{eq: spin-1 irrep}, which form an irreducible representation of $\text{SU}(2)$. As stated above, if $U$ is a matrix diagonalizing $\vec{n}\cdot \vec{\sigma}$, then $\widetilde{U}=\rho(U)$ diagonalizes $H(\vec{n})$. As a consequence, $H(\vec{n})$ is diagonalized by elements in the representation of $\text{SU}(2)$ specified by the matrices in Eq.~\eqref{eq: spin-1 irrep}. By finding an $\text{SU}(2)$ matrix $U(\vec{n})$ diagonalizing $\vec{n}\cdot \vec{\sigma}$ locally on $S^2$, we then have a local unitary matrix $\widetilde{U}=\rho(U)$, whose columns are choices for the local eigenstates $\ket{\psi_{-}(\vec{n})},\ket{\psi_{0}(\vec{n})},\ket{\psi_{+}(\vec{n})}$ with eigenvalues $-1,0,+1$, respectively [note that this can only be done locally because the line bundles involved are non-trivial]. It follows that the matrix \begin{align} \widetilde{U}^{-1}d\widetilde{U}=\left[\bra{\psi_{i}(\vec{n})}d\ket{\psi_{j}(\vec{n})}\right]_{i,j\in\{-,0,+\}} \end{align} is a linear combination of the generators of the considered repesentation of $\text{SU}(2)$, i.e., a linear combination of the matrices in Eq.~\eqref{eq: spin-1 irrep}. Looking at Eq.~\eqref{eq: spin-1 irrep}, we see that the matrix elements $\left(S_{i}\right)_{+-}=0$, for all $i\in\{1,2,3\}$, and, since the choice of $\widetilde{U}=\rho(U)$ was arbitrary, the proof is complete. This has as a consequence that, for any Bloch Hamiltonian of the form of Eq.~\eqref{eq: Bloch Hamiltonian spin-1 model appendix}, the transition matrix dipole of $r^{j}_{+-}(\mathbf{k})=i\bra{\psi_{+}(\vec{n}(\mathbf{k}))}\frac{\partial}{\partial k_j}\ket{\psi_{-}(\vec{n}(\mathbf{k}))}$, vanishes for all $j=1,\dots,d$. Note that, for the same reason, the $r^{j}_{-+}(\mathbf{k})$ vanishes, too. \subsubsection{Explicit form of the conductivity} In the following, we explicitly calculate each term of the quantum metric contribution $\sigma^{xx,s}_\text{inter}$ in Eq.~\eqref{eqn:sigmaSdeg} of the main text, in order to identify the particular behavior, which we discussed in Fig.~\ref{fig:fig2} and \ref{fig:fig3}. We define the quantity \begin{align} c^{ij}\equiv\int\!\!\frac{d^2\mathbf{k}}{(2\pi)^2}\frac{\partial \vec{n}_\mathbf{k}}{\partial k_i}\cdot \frac{\partial \vec{n}_\mathbf{k}}{\partial k_j},\ i,j\in\{x,y\}, \end{align} and note that we have $c^{xx}=c^{yy}\equiv c$ and $c^{xy}=c^{yx}=0$ for the model under consideration. In particular, we have \begin{align} c=\int\!\!\frac{d^2\mathbf{k}}{(2\pi)^2}\partial_x \vec{n}_\mathbf{k}\cdot \partial_x \vec{n}_\mathbf{k}=\frac{1}{4\pi}\big[\pi-E(-8)+7K(-8)\big] \approx 0.454\,. \label{eqn:valueC} \end{align} Here, $K(m)=\int_0^{\pi/2} \big(1-m\sin^2\theta\big)^{-1/2}d\theta$ and $E(m)=\int_0^{\pi/2} \big(1-m\sin^2\theta\big)^{1/2}d\theta$ are the complete elliptic integrals of the first and second kind, respectively. We define the transition dipole moment integrated over the Brillouin zone, \begin{align} \overline g^{\,xx}_{nm}\equiv\int\!\!\frac{d^2\mathbf{k}}{(2\pi)^2} g^{xx}_{nm}(\mathbf{k})\,. \end{align} Using Eq.~\eqref{eqn:gnmAppendix} and Eq.~\eqref{eqn:relationG}, the explicit results for the quantum metric in Eq.~\eqref{eq: nondegenerate qmetrics} and Eq.~\eqref{eq: degenerate qmetrics}, and $g^{xx}_{+-}=0$, we can explicitly calculate the quantum metrics integrated over the Brillouin zone $\overline g^{\, xx}_{n}$ and $\overline g^{\,xx}_{(nm)}$ for $n,m=-,0,+$, respectively, and obtain \begin{gather} \overline g^{\,xx}_{-}=\overline g^{\,xx}_{-0} = \frac{c}{2}\,, \hspace{1cm} \overline g_{0}^{\,xx}=\overline g^{\,xx}_{-0}+\overline g^{\,xx}_{+0} = c\,, \hspace{1cm} \overline g_{+}^{\,xx}=\overline g^{\,xx}_{+0} = \frac{c}{2} \label{eqn: explicit QMnondegenerate} \end{gather} and \begin{gather} \overline g_{(+0)}^{\,xx} =\overline g^{\,xx}_{-0}= \frac{c}{2}\,,\hspace{1cm} \overline g_{(-0)}^{\,xx} =\overline g^{xx}_{+0}= \frac{c}{2}\,, \hspace{1cm} \overline g_{(+-)}^{\,xx} =\overline g^{\,xx}_{-0}+\overline g^{\,xx}_{+0}= c \label{eqn: explicit QMdegenerate} \end{gather} These results are used in the discussion of the results shown in Fig.~\ref{fig:fig2} and Fig.~\ref{fig:fig3} in the main text. By Eq.~\eqref{eqn: explicit QMnondegenerate} and Eq.~\eqref{eqn: explicit QMdegenerate}, the transition dipole moments $\overline g^{\,xx}_{nm}$ integrated over the Brillouin zone are fully determined. We read off \begin{gather} \overline g^{\,xx}_{+0}=\overline g^{\,xx}_{0+}= \frac{c}{2}\,,\hspace{1cm} \overline g^{\,xx}_{-0}=\overline g^{\,xx}_{0-}= \frac{c}{2}\,,\hspace{1cm} \overline g^{\,xx}_{+-}=\overline g^{\,xx}_{-+}= 0 \, . \end{gather} Thus, we obtain the explicit analytic formula of the quantum metric contribution, \begin{align} \sigma^{xx,s}_\text{inter}=\frac{e^2}{h}4\pi\Big[\overline g^{xx}_{+0}\,\,w^{\text{inter},s}_{+0}+\overline g^{xx}_{-0}\,\,w^{\text{inter},s}_{-0}+\overline g^{xx}_{+-}\,\,w^{\text{inter},s}_{+-}\Big]=\frac{e^2}{h}2\pi c\Big[w^{\text{inter},s}_{+0}+w^{\text{inter},s}_{-0}\Big] \, , \label{eqn: explicit formula} \end{align} where we used that $\overline g^{\,xx}_{nm}=\overline g^{\,xx}_{mn}$ and $h=2\pi\hbar$. The transitions are weighted by \begin{align} w^{\text{inter},s}_{nm}=-\pi(\varepsilon_{n}\!-\!\varepsilon_{m})^2\mathcal{A}_n\mathcal{A}_m \label{eqn: weights} \end{align} with spectral function \begin{align} \mathcal{A}_n=\frac{1}{\pi}\frac{\Gamma}{\Gamma^2+\big(\varepsilon_n-\mu\big)^2}\,. \end{align} \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{figA1a.pdf} \includegraphics[width=0.45\textwidth]{figA1b.pdf} \includegraphics[width=0.45\textwidth]{figA1c.pdf} \caption{The three $w^{\text{inter}}_{nm}$ for the corresponding settings of Fig.~\ref{fig:fig2} and Fig.~\ref{fig:fig3}. Here, we fixed $\Gamma=0.2$. The dashed line corresponds to $1/\pi$.} \label{fig:figS1} \end{figure*} Note that $w^{\text{inter},s}_{nm}\approx 1/\pi$ if the chemical potential is fixed to one of the flat bands \cite{Mitscherling2022}. In Fig.~\ref{fig:figS1}, we plot the $w^{\text{inter},s}_{nm}$ defined in Eq.~\eqref{eqn: weights}, which completely determine the behavior of the quantum metric contribution according to Eq.~\eqref{eqn: explicit formula}. For instance, we see that the asymmetric behavior of the drop in Fig.~\ref{fig:fig2} b) can be traced back to $w^{\text{inter},s}_{-0}$, in particular, to the prefactor $(\varepsilon_--\varepsilon_0)^2$. In Fig.~\ref{fig:figS1} a) and b), we indicate the energies at which the bands are precisely degenerate by vertical gray lines. In Fig.~\ref{fig:figS1}, the vertical gray lines indicate the crossover regimes given by the band gaps. \subsubsection{Effect of a finite bandwidth} We introduce a momentum dependence of the bands to the model in Eq.~\eqref{eq: Bloch Hamiltonian spin-1 model appendix} (or Eq.~\eqref{eq: Bloch Hamiltonian spin-1 model} in the main text), \begin{align} \varepsilon_{n,\mathbf{k}}=\varepsilon_{n}-W(\cos k_x+\cos k_y)\,. \end{align} Thus, the intraband contribution $\sigma^{xx}_{\text{intra}}$ given in Eq.~\eqref{eqn:sigmaIntra} is no longer zero. As discussed in detail in Ref.~\cite{Mitscherling2022}, the intraband contribution dominates for $\Gamma\lesssim W$ with $\sigma^{xx}_{\text{intra}}\propto 1/\Gamma$, whereas the quantum metric contribution $\sigma^{xx,s}_\text{inter}\propto \Gamma$ (cf., Eq.~\eqref{eqn:sigmaSclean} in the main text). For $\Gamma\gtrsim W$, the intraband contribution is suppressed and the quantum metric contribution dominates, since it is effectively flat with $|\varepsilon_{n,\mathbf{k}}-\mu|\ll \Gamma$ (cf., Eq.~\eqref{eqn:sigmaFlat} in the main text). In Fig.~\ref{fig:figS2}, we show the impact of the intraband contribution onto the total conductivity $\sigma^{xx}=\sigma^{xx}_\text{intra}+\sigma^{xx,s}_\text{inter}$, which confirms these general statements. As long as the bandwidth is smaller than the band gaps, the phenomenology discussed in the main text still holds. Here, we also changed the band gap $\Delta_{13}$ between the highest and lowest band from $10$ to $5$. We see that our conclusions are unaffected, which explicitly shows that the regimes are essentially controlled by the corresponding energy scales only. \begin{figure*} \centering \includegraphics[width=0.45\textwidth]{figA2a.pdf} \includegraphics[width=0.45\textwidth]{figA2b.pdf} \includegraphics[width=0.45\textwidth]{figA2c.pdf} \caption{The same plots as shown in Fig.~\ref{fig:fig3} in the main text, here with dispersive bands of bandwidth $W=0.05$ and $\Delta_{13}=5$. The dashed lines correspond to $2c$ and $4c$ given in Eq.~\eqref{eqn:valueC}. The dotted line is the lower bound due to the finite Chern number $|C_\pm|= 2$ of band $+$ and $-$ \cite{Mitscherling2022}.} \label{fig:figS2} \end{figure*} \end{widetext} \end{document}
\section{Introduction} \label{sec:intro} Autonomous driving technologies has been fast growing and continuously making progress, as a branch topic of autonomous driving, the autonomous delivery robot (ADR) landscape has been evolving rapidly. Domino proposed their ADR “DRU”, which is claimed to be the world’s first autonomous pizza delivery vehicle. Starship Technologies, a company founded in 2014, has announced that it will be rolling out its delivery robot services to corporate and academic campuses in the US and Europe\cite{Starship}. Marble, a startup company founded in April of 2017 and Dispatch, a San Francisco-based company has also been working on their own ADRs\cite{Marble}. Other companies like Nuro and Udelv that working on the on-road delivery are drawing more and more attention from the market \cite{nuro}\cite{udelv}. Meanwhile, the concerns about the safety and potential impact that ADRs bring into human society are presented by some articles\cite{impact1}\cite{impact3}. Some of the concerns are about the difference between Autonomous Vehicles (AVs) and ADRs. AVs drive on the main road with a well-structured map, e.g. a vector map, however, ADRs may need to drive on the sidewalk, closed campus, and residential area\cite{impact2}. To avoid potential risks in the aforementioned environments, e.g. hitting a pedestrian, crashing on a building, and losing its way due to sparse features fed to the sensors, simulations, and simulators are important. Thanks to Robot Operating System (ROS)\cite{ROS}, a framework for robot communication, and Gazebo, a simulation platform compatible with ROS\cite{gazebo}, developers can build simulation models with these tools. For example, Study \cite{sim1} \cite{sim2} both propose a simulation model for indoor race cars, and TurtleBot, a indoor robot created for research\cite{turtle}. Additionally, Gazebo model for vehicle Lincoln MKZ, Ford F-150 and Ford Fusion are also proposed by an drive-by-wire company DataSpeed\cite{dataspeed}. Although the simulation method and simulation model are used in these studies, which focus more on autonomous driving vehicles or indoor robots, a simulator dedicated to ADRs and ADR's applications is rarely mentioned and studied. Since ADR's dimensional parameters and appearance are different from AVs and indoor robots, directly using AV or indoor robot models for ADR's research could cause inaccuracy because the motion planning algorithm could fail in certain ADR working conditions. Additionally, the simulation environment is also important in a simulator, the previous study only provides a model for the robot per se instead of testing the environment of dedicated applications. And as autonomous delivery is getting more interest from the market, there is a need to build a simulator consisting of simulation model and simulation environment for its related research to facilitate progress in the industry. To bridge the gap from the previous research to the simulation needs of the industry, this study proposes an enhanced simulator for the autonomous delivery robot and introduces three related applications we are working on. In this study, ROS and Gazebo are leveraged to build a simulator for the ADR, where the simulator developing procedure from Computer-aided design (CAD) model to Gazebo model is illustrated in detail, which is rarely seen in other papers. Moreover, the simulation environment is also built for robot testing. And the simulator package will be open-source to the public for their own research needs. Besides, this study introduces three applications that can be working on our simulator. One of them is autonomous navigation in the simulated urban environment, where the robot and sensors are simulated in the simulator to sense the environment and plan a path as the real robot do in the real world. The second application is the cooperation between an autonomous vehicle and an ADR, testing the communication and data sharing functionalities. The third one is about Reinforcement Learning (RL),of which algorithms can be tested in the simulator to accelerate the training and promote the popularization of reinforcement learning methods in the real tasks. Based on the aforementioned content, the contribution of this study to the society and researchers can be summarized as follows. \begin{itemize} \item This study proposes a dedicated simulator consisting of robot model and simulation environment for the autonomous delivery robot and its applications, and it is open-source to all other researches to facilitate related studies, which can be considered as an innovation of this paper. \item This study details the procedure of building a robot simulator from CAD model to Gazebo model, which rarely seen in other research. \item Besides simulator itself, we specifically introduce tree applications that we are working on the simulator, in which the practice of reinforcement learning is a quite new topic that is hardly studied by other articles. \end{itemize} The organization of the rest of this paper is arranged as follows. Section 2 provides a background for simulation study in the robotic field and its benefits to the current research. Section 3 illustrates the procedure of modeling ZebraT and simulator development. Then, the applications and feasible practice on the simulator are introduced case by case in Section 4, while conclusion is draw in Section 5. \section{Background and Motivation} \label{sec:motivation} The ADR landscape has been evolving rapidly, thus there is a huge demand for product tests corresponding to different operating domains. For example, an ADV that runs on the sidewalk needs to be tested in an outdoor environment with a sidewalk and potential pedestrians. Also, an ADV that works in a restaurant needs to be tested in an indoor environment with tables and chairs. So, a question comes up, what if you do not have an appropriate site for the environment requirements? What if you do not have enough financial support for the testing tools and hiring testers? What if the robot hits a pedestrian due to an algorithm failure on the sidewalk? The simulation then will be a good solution to the questions above. Simulation can play an important role in the testing of delivery robots in a simulated urban, pedestrian environment, and thus accelerate the product landing and improve the safety of both robots and pedestrians. In the past decades, simulations are broadly used and simulators became an essential part of the autonomous driving and robotics research field. Study\cite{kaur} introduces multiple simulation software and frameworks for testing self-driving cars. Also, the comparisons among the simulation software are shown, which gives other researchers guidance on choosing an appropriate simulator for their own research. Robot Operating System (ROS) is also mentioned in the study, which is a popular open-source framework that has a large number of communities and developers\cite{ROS}. Thanks to plenty of libraries, packages, and interfaces with other software of frameworks, ROS accelerates researchers’ study and provides solutions to the related industries. Meanwhile, Gazebo simulation software is officially adopted to be the simulation platform for ROS\cite{gazebo}, where the developer can build up some physical models while using the communication functions from ROS without worrying about compatibility problems. Study\cite{sim1} simulates a indoor race robot in Gazebo environment, transferring the appearance of the robot into the simulation environment, to secure that model in the simulation environment looks as real as the robot in the physical world. Additionally, study\cite{sim2} introduces how to simulate an Ackermann-steering-based indoor race car with ROS and Gazebo, and illustrates the communication mechanism between ROS nodes and the model in the Gazebo. TurtleBot, a famous indoor robot with its Gazebo model is widely used by researchers and developer to test algorithms in the indoor environments\cite{turtle}. Besides those indoor robot model, vehicles like Ford Fusion, F-150 and Lincoln MKZ are simulated by the campany DataSpeed in Gazebo\cite{dataspeed}. Besides, reinforcement learning method, a method enables AlphaGO to win the best human go player\cite{alpha}, still have not been popularized in other industries like automotive and robotics industry since it requires algorithm iterations to get the optimal policy that are not practical in a real car or robot. Thus, a simulator is particularly useful for algorithm iterations, and significantly cut down the total training time to get a good policy, which can be then transferred to a real car or robot. From the studies mentioned above, we can highlight the benefits of using simulation methods in robotic research as follow. \begin{itemize} \item Simulations allow researchers to test their algorithms and concepts even if the required hardware is not available for them. \item Simulations contribute to the fast detection and correction of fatal errors in the algorithm or program. \item The cost of doing simulations is comparatively lower than the physical experiments in the real world. \item Simulations avoid accidents caused by unknown risks that may be met in the real world and lead to hazards and damage. \end{itemize} However, these studies only model the indoor robots or vehicle, of which size is too small or too big compared to ADR. If researches directly use these models to substitute the ADR model in a simulation task, the different size could impact the accuracy of path planning and motion planning. For example, if the ADR needs to work in a narrow alley, to use vehicle model could cause the path planning failure and to use indoor robot model could cause the different motion planning when encountering an obstacle. Thus, there is a need to build up an ADR simulation model for the ADR related research to enhance the simulation accuracy. Movever, since the simulation environment of ADR is different from AV's and indoor robot's. So the appropriate simulation environments are also important. To bridge the research gap mentioned above, this study builds up a simulator an autonomous delivery robot with the robot model and simulation environments, and aims to share the simulator with the public to accelerate not only our future research but also other researchers’ research, bridging the gap between theoretical innovations and physical practice. \section{Architecture} \label{sec:Architecture} If \weisong{give more details about xxxxx} \begin{equation} \begin{array}{c} S = \binom{N}{n},A_{k} = \binom{M}{k}\cdot \binom{N-M}{n-k} \\ \\ P\left ( A_{k}\right ) = \frac{\binom{M}{k}\cdot \binom{N-M}{n-k}}{\binom{N}{n}} \end{array} \end{equation} Use the following web tool to get the formula in latex format: \href{https://www.latexlive.com/}{https://www.latexlive.com/} \section{Methodology} \label{sec:methodlogy} The methodology of developing a simulator is to extract the mathematical and physical features from the object in the real world, then formulate these features to the model in the simulator. For example, to develop a simulator for the ADR, we need to get the information of its body size, wheelbase, wheel radius, which are the important parameters of its kinematic model. What is more, the steering mechanism of the robot will be taken into the consideration, which determines the motion of the agent. Additionally, besides the mathematical model, the visualization of the agent is also important to give users a sense of reality. In this case, we use our ADR ZebraT as a model to design and implement this simulator, which can be generalized to other delivery robots for other researchers. Thus, in this section, we first introduce our ADR ZebraT about its dimension information and equipped sensors in subsection 3.1. We secondly illustrate how to import the 3D model of ZebraT into the simulator and define the transformation relationship among each link and joints in subsection 3.2. Then we build up the kinematic model for the agent in subsection 3.3, which is based on its Ackermann-steering mechanism. Simulation environments in the Gazebo is introduced in subsection 3.4. \subsection{ZebraT introduction} ZebraT is an electric-drive autonomous delivery robot equipped with a RoboSense 16-line Lidar sensor, an Intel D455 RGB-D camera, a processor with i5 8250U CPU, an Intel UHD Graphics 620 GPU, and an STM32 single-board chip for the communication between the processor and the motor drivers. Besides those key components, sensors like Inertia Measurement Unit (IMU), Global Navigation Satellite System (GNSS), and current measurement sensors are integrated, which are shown in Fig.1. Additionally, there are 2 storage cells on each side of ZebraT for the delivery purpose. Also, the Ackermann steering mechanism driven by a 24V 400W BLDC motor makes ZebraT steer like a real car and have more load capacity. And two more same motors are used to drive the two real wheels to move the robot car. These components are also recorded in Table 1. In terms of software, Linux Ubuntu 16.04 LTS operating system with ROS Kinetic version is installed in the processor. Thanks to the integration of these hardware and software, ZebraT is capable of testing and validating algorithms for autonomous driving in both indoor and outdoor environments. \begin{figure}[H] \centering \includegraphics[width=\columnwidth]{figures/components.png} \caption{ZebraT} \label{Fig.main2} \end{figure} \begin{table}[] \centering \begin{tabular}{c c c} \toprule Component & Model & Quantity\\ \midrule Lidar & RoboSense 16-line & 1 \\ Camera & Intel D455 RGB-D & 1 \\ CPU & i5 8250U & 1 \\ GPU & Intel UHD Graphics 620 & 1 \\ Microcontroller & STM32 & 1\\ IMU & - & 1 \\ GNSS & - & 1\\ Current Sensor & - & 4 \\ Steering Motor & 24V 400W BLDC & 1\\ Driving Motor & 24V 400W BLDC & 2 \\ \bottomrule \end{tabular} \caption{ZebraT Components} \label{tab:table1} \end{table} Besides the hardware and software introduced above, the other important factor of the robot modeling is the dimension information or so-called size. Based on the dimension of the body shell, wheel diameter, robot length, width, and heights, we can calculate the coordinates of the centers of the body shell and wheels that the centers will be used to construct collision geometry for the collision detection in the later simulation, and also to calculate inertias using inertia formulations. Here we list all the dimension information of ZebraT in Table 2, which could be used in the simulator development. Note that body shell height is not equal to robot height since the wheel bottom is lower than the body shell bottom. \begin{table}[] \centering \begin{tabular}{c c} \toprule Dimension & Value(m)\\ \midrule Wheel radius & 0.150\\ body shell length & 0.963 \\ body shell width & 0.672 \\ body shell height & 0.557 \\ total height & 0.640 \\ wheel base & 0.530 \\ \bottomrule \end{tabular} \caption{Dimension Information} \label{tab:dimension} \end{table} \subsection{CAD Model to Simulator Model} Computer-Aided Design (CAD) technology is intensively used in the mechanical, electric, and robotic industries. Most design work nowadays is started from building a CAD model in the CAD software so that the structure validation and physical parameter calculation can be implemented earlier than the real product coming out. Our design also adopted this method, and the designed CAD model of ZebraT is shown in the top left of Fig. 2. While how to leverage the CAD model in the simulator is still a problem. Thanks to the ROS and Gazebo, which make this process easier. As introduced in the previous section, Robot Operating System (ROS) is a popular open-source framework that provides a communication mechanism that applies to all kinds of robots including robot arm, differential-drive robot, Ackermann-steering robot, Unmanned Aerial Vehicle (UAV), and Autonomous Vehicle(AV). Additionally, Gazebo provides an open-source 3D simulator integrated with ROS that can simulate various types of robots mentioned above. Meanwhile, Gazebo provides users an opportunity to build their own robots using some fundamental elements like boxes, cylinders, and balls. More than that, Gazebo is able to simulate sensors like Lidar, camera, and IMU using customized plugins from the manufacturers. Gazebo supports robot models in SDF and URDF formats, in which the robot links and joints are defined with coordinates, parental relationships, and motion types. Gazebo also allows importing meshed in the STL or DAE form to make the object model more realistic. In our study, we firstly mark the geometry centers of the body shell and wheels, and rotation axles of the steering mechanism and four wheels of ZebraT in the CAD model, then export their meshes separately. Also, we use the URDF file in the Gazebo Platform, which is an XML format file that describes the connection and transformation relationship between connected links and joints. All links and joints built up in the URDF model are respectively listed in Table 2 and Table 3. \begin{table}[] \centering \begin{tabular}{c c} \toprule Link Name & Description\\ \midrule \emph{base\_link} & Body shell\\ \emph{lstr\_link} & Left Steering Mechanism\\ \emph{rstr\_link} & Right Steering Mechanism \\ \emph{fl\_wheel} & Front Left Wheel \\ \emph{fr\_wheel}& Front right Wheel \\ \emph{rl\_wheel}& Rear Left Wheel \\ \emph{rr\_wheel}& Rear Right Wheel \\ \bottomrule \end{tabular} \caption{Links Description} \label{tab:links} \end{table} \begin{table}[] \centering \begin{tabular}{c c c} \toprule Joint Name & Connected Links & Joint Types\\ \midrule \emph{base2lstr} & \emph{base\_link \& lstr\_link} & Revolute \\ \emph{base2rstr} & \emph{base\_link \& rstr\_link} & Revolute \\ \emph{fl\_axle} & \emph{lstr\_link \& fl\_wheel} & Continuous\\ \emph{fr\_axle} & \emph{rstr\_link \& fr\_wheel} & Continuous\\ \emph{rl\_axle} & \emph{base\_link \& rl\_wheel} & Continuous\\ \emph{rr\_axle} & \emph{base\_link \& rr\_wheel} & Continuous\\ \bottomrule \end{tabular} \caption{Joints Description} \label{tab:joints} \end{table} Note that there are three main types of joints we used in this study. They are, revolute, continuous, fixed joints, where revolute joint represents that the son link can rotate based on an axle, but has an angle constraint. In our case, the steering link cannot rotate beyond -60 to 60 degrees, so the base2lstr joint and base2rstr joint have a constraint for rotation as -60 to 60 degrees. The continuous joints, however, do not have angle limitations so that they can rotate continuously. Thus, our four wheels are all connected with continuous joints. Sensors like Lidar, camera and IMU are not necessary to rotate or move, so they are connected to the body shell with fixed joints. What is more, for the purpose of simulating the sensors in ZebraT in the Gazebo environment as well, we add the sensor models in the URDF format for the sensor experiments, which are provided by the sensor manufacturers and ROS developers that we can include them in our main URDF model and then plugin them in Gazebo environment. The usage of these sensors is shown in Table 4. \begin{table}[] \centering \begin{tabular}{c c c} \toprule Sensor Type & URDF file & ROS Package\\ \midrule Lidar & VLP-16.urdf &\emph{velodyne\_description}\\ Camera & camera.urdf & \emph{zebrat}\\ IMU & imu.urdf & \emph{zebrat}\\ \bottomrule \end{tabular} \caption{Sensors Description} \label{tab:sensors} \end{table} \begin{figure}[H] \centering \includegraphics[width=\columnwidth]{figures/comparison.png} \caption{Results Comparison} \label{comparison} \end{figure} After the links and joints are well defined, we need to calculate the inertia for each link in the simulation model because inertia is one of the most important physical attributes of an object not only in real world but also in the simulator, it can impact object's dynamic performance and stability in the initialization stage in the Gazebo environment. We found that use the inertia generated in CAD software for each link is not accurate, which caused model drifting and rolling in the Gazebo environment and even failures. To correct the faults, we consider the body shell of ZebraT as a box, the wheels as cylinders to simplify the inertia calculation and make the inertia accurate, so that the model can be stabilized in the initialization stage. To calculate the inertia of a box for the body shell, we use the equation 1 - 3. Where \emph{I}$_{l}$,\emph{I}$_{w}$,and \emph{I}$_{d}$ represent the inertia respectively along the length, width and depth direction, \emph{l}, \emph{w}, \emph{d} represent the length, width and depth of the box, while \emph{m} represents mass. \begin{equation} I_{l} = \left(\frac{m}{12} \right)\left ( w^2 + h^2\right ) {\mathfrak{} \Large } \end{equation} \begin{equation} I_{w} = \left(\frac{m}{12} \right)\left ( l^2 + h^2\right ) {\mathfrak{} \Large } \end{equation} \begin{equation} I_{d} = \left(\frac{m}{12} \right)\left ( l^2 + w^2\right ) {\mathfrak{} \Large } \end{equation} The inertia of wheels which are considered as cylinders, we use the equation 4 - 6. Where the \emph{I}$_{x}$,\emph{I}$_{y}$,and \emph{I}$_{z}$ represent the inertia respectively along the x, y and z direction referred to the world coordinate frame Gazebo environment, while \emph{r} represent the radius of the cylinder, \emph{h} denotes the height, and \emph{m} is the mass of the cylinder. \begin{equation} I_{x} = \frac{m}{12}\ast \left ( 3\ast r^2 + h^2 \right ) \end{equation} \begin{equation} I_{y} = I_{x} \end{equation} \begin{equation} I_{z} = \frac{m \ast r^2}{2} \end{equation} After the inertia calculation, the model can be properly spawn into the Gazebo environment. The generated simulation model in Gazebo environment are shown in the right side of Fig. 2. Meanwhile, the CAD model is shown in the top left, and the real robot is shown in the bottom left. As we can see, the model in the simulation is quite realistic that can meet the normal requirements of most developers and users. \subsection{Kinematic Model} In our study, ZebraT is using the Ackermann-steering mechanism that is used in most cars. The attribute of this kind of steering mechanism is nonholonomic, which means it makes the agent cannot move along the lateral direction unless the agent’s speed on the longitudinal direction is not zero, imagine that your car cannot move to its side direction when it is still parked \cite{carlike}. So, the simulated agent, i.g. ZebraT in the simulator should be subject to the rule of this kind of kinematic constraints. The equation 7-9 formulate nonholonomic constraints for the robot. \begin{equation} \dot{x} = \cos \theta v \end{equation} \begin{equation} \dot{y} = \sin \theta v \end{equation} \begin{equation} \dot{\theta} =\frac{v}{L}\tan \phi \end{equation} In the equations, $x$ and $y$ denote the location of the center of the axle between the two rear wheels with respect to the world coordinate frame in Gazebo environment. $\theta$ denotes the orientation of the car-like mobile robot with respect to the $x$ axis, $\phi$ is the steering angle with respect to the robot body and $\dot{y}$ represents the velocity of the rear wheels while $L$ is the wheelbase, which is shown as Fig. 3. ($v$, $\phi$) are two control inputs to the kinematic model, which corresponds to the throttle and steering wheel input in the real car. \begin{figure}[H] \centering \includegraphics[width=\columnwidth]{figures/bicycle.png} \caption{Kinematic Model} \label{kinematic model} \end{figure} After formulating the kinematic model, we still need to transform the v. phi input into the velocity of six joints in the robot, since there are four wheels and two steer links that finally determine the motion of the robot. This kind of mapping relationship is described in Table. 6, where $joint\_angle$ denotes the rotation angle of the joint with the unit $rad$, $joint\_velocity$ denotes the rotation speed of the joint with the unit $rad/s$, and $r$ represents the radius of the wheel. \begin{table}[] \centering \begin{tabular}{c c} \toprule Joint & Relationship to Input\\ \midrule \emph{base2lstr} & $joint\_angle = \phi$\\ \emph{base2rstr} & $joint\_angle = \phi$\\ \emph{fl\_axle} & $joint\_velocity = v / r$\\ \emph{fr\_axle} & $joint\_velocity = v / r$\\ \emph{rl\_axle} & $joint\_velocity = v / r$\\ \emph{rr\_axle} & $joint\_velocity = v / r$\\ \bottomrule \end{tabular} \caption{Joint Control} \label{tab:joint control} \end{table} \subsection{Simulation Environment} We select two specific simulation environment to test ADR. One is urban scenario, shown in Fig. 4. The other one is narrow alley, shown in Fig.6. The reason we select these two scenarios is that most ADRs need to work in the urban environment which consists of buildings, roads, and obstacles, and the simulated urban scenario is able to test the sensing, planning, capability of the robot in such complex environment. While the narrow alley could test the passability of the ADR in such narrow environment where the traditional path planning methods could fail, and allow us to test new algorithm for this certain scenario. These two simulation environments are also listed in Table 7. \begin{table}[] \centering \begin{tabular}{c c} \toprule Environment & Description\\ \midrule \emph{Urban Scenario} & builds, roads, obstacles\\ \emph{Narrow Alley} & walls to simulate alleys\\ \bottomrule \end{tabular} \caption{Simulation Environments} \label{tab:env} \end{table} From above steps, the ADR simulator is designed and implemented where the robot model can be controlled by ROS node to implement the kinematic model that enables the simulated robot to move like the real one, and sensing and planning algorithms can be tested in the proposed simulation environments. However, specific applications of this simulator could be more important for users to work on their expected tasks. Thus, the applications that could leverage this simulator are introduced in the next section. \section{Applications} To accelerate the development of the product, the testing of algorithms, and the validation of the program, simulation is a good solution. The applications of the simulation method can vary from each industry. For instance, the traditional automotive industry may use simulation to test vehicle dynamics, driving comfort, and fuel economy, which is more related to the vehicle per se. While the autonomous driving industry is interested in sensing the environments with multi-type sensors, behavior planning, and motion planning \cite{kaur}. In our study, our simulator mainly focuses on autonomous driving-related applications like sensing, detection, and navigation. What is more, reinforcement learning, one of the hottest AI topics, can be also tested in our simulator, which is illustrated in detail later. Although this study does not cover all the bases, we pick three representative applications in this section that we are studying now with this simulator, to provide a rough knowledge of autonomous driving and reinforcement learning. \subsection{Autonomous Navigation} In the simulator, users and developers are able to build their customized environment, the so-called “world” in Gazebo platform. As Fig. 4 shows, the urban environment can be built as a “world” with buildings, roads, and some obstacles to test the ADV. Meanwhile, sensing technologies like mapping and localization can be implemented for autonomous navigation. We tested gMapping package in ROS\cite{gmapping} and other mapping algorithms e.g. Lego-LOAM\cite{lego}. \begin{figure}[H] \centering \includegraphics[width=\columnwidth]{figures/nvi.png} \caption{Navigation in the Simulator} \label{nvi} \end{figure} Besides sensing technology, global path planning algorithms like Dijkstra and A star, local path planning algorithms like Dynamic Window Approach(DWA)\cite{dwa}and Timed Elastic Band (TEB)\cite{teb} can be tested in the simulator. \subsection{Multiple Agents Cooperation} Cooperation between Autonomous Vehicles (AVs) and Autonomous Delivery Robots (ADRs) is an interesting topic that AVs could first deliver goods to a community or campus, then ADRs could be responsible for the last mile delivery to the customers. Our simulator could test this process in terms of communication and planning between an ADR and an AV. Fig. 5 shows our AV Hydro and ADR ZebraT, which can share the map and sensing data between each other to implement cooperation tasks. Although this is a new topic and not too much work has been done, the potential impact that it could bring to society still deserves more effort from developers and researchers. \begin{figure}[H] \centering \includegraphics[width=\columnwidth]{figures/co.png} \caption{Cooperation between AV and ADR} \label{nvi} \end{figure} \subsection{Reinforcement Learning} Reinforcement Learning (RL) is a branch technology of machine learning. Unlike supervised learning which requires human supervision on data classification, RL makes agents learn from the practice from itself based on predefined reward functions, which are considered as the real intelligence for machines and robots. However, one important factor of RL has been limiting this technology intensively landed in the real world, that is the requirements for a huge number of iterations to improve the policy. Although RL has gained some achievements in some traditional games e.g. go given that AlphaGo has won the top human player\cite{alpha}, it has not been practiced too much on the agents like cars and robots due to the difficulties of intensive training of them in the real world. Our simulator could be an appropriate solution for RL practice because the agent can be trained iteratively to accelerate the policy improvement, and thanks to the ROS framework, the improved policy can be transferred to the real robot so that the training time could be prominently cut down and the cost of real experiments could be exempted. We have done some experiments of RL task using our simulator and OpenAI\cite{openai}, a python library for RL training, which is shown in Fig. 6, where the robot needs to pass the alley. In this task, the robot could sense the environment via Lidar and then downsample the points data to generate states, based on which the RL algorithm can perform the iteration process. \begin{figure}[H] \centering \includegraphics[width=\columnwidth]{figures/RL3.png} \caption{Reinforcement Learning Practice} \label{rl} \end{figure} \section{Case Study} \label{sec:case} In this section, we give several case studies where edge computing could shine to further illustrate our vision of edge computing. \subsection{Cloud Offloading} \begin{figure}[h] \centering \includegraphics[width=\columnwidth]{figures/Equinox.pdf} \caption{Insert a figure.} \label{system-design} \end{figure} In the traditional content delivery network, only the data is cached at the edge servers. This is based on the fact that the content provider provides the data on the Internet, which is true for the past decades. In the IoT, the data is produced and consumed at the edge. Thus, in the edge computing paradigm, not only data but also operations applied on the data should be cached at the edge. \subsection{Video Analytics} The widespread of mobilephones and network cameras make video analytics an emerging technology. Cloud computing is no longer suitable for applications that requires video analytics due to the long data transmission latency and privacy concerns. Here we give an example of finding a lost child in the city. \section{Comparison} \label{sec:evaluation} This section provides a comparison of different simulators described under Section 4, starting with MATLAB, CarSim and PreScan. Then we compare Gazebo and CARLA, followed by comparison of CARLA and LGSVL. Finally, we conclude with our analysis and key observations. MATLAB/Simulink is designed for the simple scenarios. It is good at computation and has efficient plot functions. The capability of co-simulation with other software like CarSim makes it easier to build various vehicle models. It is common to see users using the vehicle models from CarSim and build their upper control algorithms in MATLAB/Simulink to do a co-simulation project. However, MATLAB/Simulink has limited ability to realistically visualize the traffic scenarios, obstacles and pedestrian models. PreScan has strong capability to simulate the environment of the real world such as the weather conditions that MATLAB/Simulink and CarSim cannot do, it also has interfaces with MATLAB/Simulink that makes modelling more efficient. Further, Gazebo is known for its high flexibility and its seamless integration with ROS. While the high flexibility is advantageous because it gives full control over simulation, it comes at a cost of time and effort. As opposed to CARLA and LGSVL simulators, the creation of a simulation world in Gazebo is a manual process where the user must create 3D models and carefully define their physics and their position in the simulation world within the XML file. Gazebo does include various sensor models and it allows users to create new sensor models via the plugins. Next, we compare CARLA and LGSVL simulators. Both CARLA and LGSVL provide high quality simulation environments that require GPU computing unit in order to run with reasonable performance and frame rate. The user can invoke different facilities in CARLA and LGSVL via using a flexible API. Although, the facilities are different between two simulators. For instance, CARLA provides build-in recorder while LGSVL does not provide. Therefore, in order to record videos in LGSVL, the user can leverage video recording feature in Nvidia drivers. CARLA and LGSVL provide a variety of sensors, some of these sensors are common between them such as Depth camera, Lidar, and IMU. In addition, each simulator provides different sensors with description provided in their official website. Both simulators, CARLA and LGSVL, enhance users to create the custom sensors. The new map generation has different process in CARLA and LGSVL. The backbone of CARLA simulator is Unreal Engine that generates new maps by automatically adding stop signs based on the OpenDRIVE technology. On the other hand, the backbone of LGSVL simulator is Unity game engine and user can generate new map by manually importing different components into the Unity game engine. Additionally, the software architecture in CARLA and LGSVL is quite different. LGSVL mostly connects to AD stacks (Autoware, Apollo, and etc. ) based on different bridges and most of the simulators' facilities publishes or subscribes the data on specified topics in order to enables AD stacks to consume data. On the other hand, most of facilities in CARLA are built in, although it enables users to connects to ROS1,ROS2, and Autoware via using the bridges. While all of the six simulators described in the paper offer their own advantages and disadvantages, we make the following key observations. \begin{itemize} \item \textbf{\emph{Observation 1:}} LGSVL and CARLA are most suited for end to end testing of unique functionalities that self-driving cars offer such as perception, mapping, localization, and vehicle control because of many built-in automated features they support. \item \textbf{\emph{Observation 2:}} Gazebo is a popular robotic simulator but the time and effort needed to create dynamic scenes does not make it the first choice for testing end to end systems for self-driving cars \item \textbf{\emph{Observation 3:}} MATLAB/Simulink is one of the best choices for testing upper level algorithms because of the clearly presented logic blocks in Simulink. Additionally, it has a fast plot function that makes it easier to do the results analysis. \item \textbf{\emph{Observation 4:}} CarSim specializes in vehicle dynamic simulations because of its complete vehicle library and variety of vehicle parameters available to tune. However, it has limited ability to build customized upper-level algorithms in an efficient way. \item \textbf{\emph{Observation 5:}} PreScan has a strong capability of building realistic environments and simulating different weather conditions. \end{itemize} In Table~\ref{tab:comparison}, we provide a comparison summary where all six simulators described in this paper are further compared. \begin{table*}[h!] \caption{Comparison of various simulators.} \label{tab:comparison} \centering \begin{tabular}{|p{0.15\linewidth}||p{0.1\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|} \hline \textbf{Requirements} & \textbf{MATLAB (Simulink)} & \textbf{CarSim} & \textbf{PreScan} & \textbf{CARLA} & \textbf{Gazebo} & \textbf{LGSVL}\\ \hline \hline \textbf{Perception}: Sensor models supported & Y & Y & Y & Y(1) & Y(2) & Y(3) \\ \hline \textbf{Perception}: support for different weather conditions & N & N & Y & Y & N & Y \\ \hline \textbf{Camera Calibration} & Y & N & Y & Y & N & N \\ \hline \textbf{Path Planning} & Y & Y & Y & Y & Y & Y \\ \hline \textbf{Vehicle Control}: Support for proper vehicle dynamics & Y & Y & Y & Y & Y & Y(3) \\ \hline \textbf{3D Virtual Environment} & U & Y & Y & Y, Outdoor (Urban) & Y, Indoor and Outdoor & Y, Outdoor (Urban)\\ \hline \textbf{Traffic Infrastructure} & Y, allows to build lights model & Y & Y & Y, Traffic lights, Intersections, Stop signs, lanes & Y, allows to manually build all kinds of models & Y\\ \hline \textbf{Traffic Scenario simulation}: Support of different types of Dynamic objects & Y & Y & Y & Y & N(2) & Y \\ \hline \textbf{2D/3D Ground Truth} & Y & N & N & Y & U & Y\\ \hline \textbf{Interfaces to other software} & Y, with Carsim, Prescan,ROS & Y, with Matlab(Simulink) & Y, with MATLAB(Simulink) & Y, with ROS, Autoware & Y, with ROS & Y, with Autoware, Apollo, ROS\\ \hline \textbf{Scalability} via a server multi-client architecture & U & U & U & Y & Y & Y \\ \hline \textbf{Open Source} & N & N & N & Y & Y & Y \\ \hline \textbf{Well-maintained/Stable} & Y & Y & Y & Y & Y & Y \\ \hline \textbf{Portability} & Y & Y & Y & Y, Windows, Linux & Y, Windows, Linux & Y, Windows, Linux\\ \hline \textbf{Flexible API} & Y & Y & U & Y (2) & Y & Y\\ \hline \end{tabular} \begin{tablenotes} \item[1] Y=supported, N = not supported, U = unknown \item[2] (1) See section 4.4 for details about Carla. \item[3] (2) See section 4.5 for details about Gazebo \item[4] (3) See section 4.6 for details about LGSVL \end{tablenotes} \end{table*} \section{Challenges} The automotive simulators have come a long way. Although simulation has now become a cornerstone in the development of self-driving cars, common standards to evaluate simulation results is lacking. For example, the Annual Mileage Report submitted to the California Department of Motor Vehicle by the key players such as Waymo, Cruise, and Tesla does not include the sophistication and diversity of the miles collected through simulation \cite{amr}. It would be more beneficial to have simulation standards that could help make a more informative comparison between various research efforts. Further, we are not aware of any simulators that are currently capable of testing the concept of connected vehicles, where vehicles communicate with each other and with the infrastructure. However, there are test beds available such as the ones mentioned in the report \cite{dotintelligent} from the US Department of Transportation. In addition, current simulators, for instance CARLA and LGSVL, are on-going projects and add the most recent technologies. Therefore, the user may encounter with undocumented errors or bugs. Therefore, the community support is quite important which can improve the quality of open source simulators and ADAS tests. \section{Related Work} \label{sec:related} There are many other simulators available that are not explicitly reviewed in this paper. For example, RoadView is a traffic scene modelling simulator built using image sequences and the road Global Information System (GIS) data \cite{zhang2014roadview}. \cite{banerjee2019development} provides an in-depth review of CARLA simulator and how it can be used to test autonomous driving algorithms. Similarly, \cite{fadaie2019state}, \cite{chao2020survey}, and \cite{figueiredo2009approach} provide review of various other automotive and robotic simulators. \cite{tang2017distributed} discusses a distributed simulation platform for testing. \section{Conclusion} \label{sec:conclusion} In summary, this study proposes an open-source simulator of our autonomous delivery robot ZebraT in ROS framework and Gazebo simulation platform. The specific procedure of developing this simulator is explained in section 2, which includes fundamental information about ZebraT, the developing process from CAD model to simulator model, and kinematic modeling of the Ackermann-steering mechanism, thanks to which the generated simulation model in the simulator not only looks realistic as the real one but also move like the real one. Furthermore, three applications we are studying with this simulator are introduced. The delivery robot can implement autonomous navigation in the simulated urban scenario with buildings, roads, and obstacles. Also, the data sharing between our AV Hydro and ADR ZebraT could be practiced in the simulator. Finally, the importance of our simulator to the popularization of reinforcement learning is explained with our own experience on the task training project using this simulator. Of course, there are many other related topics that we have not covered in this paper, but we hope other researchers can make progress on them using our proposed simulator which will be published on Github. And hopefully, we can bring more research to the public about the applications of this simulator and contribute to society. \section{Applications} Cooperation between Autonomous Vehicles (AVs) and Autonomous Delivery Robots (ADRs) is an interesting topic that AVs could first deliver goods to a community or campus, then ADRs could be responsible for the last mile delivery to the customers\cite{co}. Our simulator could test this process in terms of communication and planning between an ADR and an AV. Fig. 5 shows our AV Hydro and ADR ZebraT, which can share the map and sensing data between each other to implement cooperation tasks. Although this is a new topic and not too much work has been done, the potential impact that it could bring to society still deserves more effort from developers and researchers. \section{Introduction} \label{sec:intro} With the push from cloud services and pull from IoT~\cite{shi2016edge}, we envision that the edge of the network is changing from data consumer to data producer as well as data consumer$\footnote{\href{https://www.thecarlab.org/outcomes/software}{https://www.thecarlab.org/outcomes/software}}$. In this paper, we attempt to contribute the concept of edge computing. We start from the analysis of why we need edge computing, then we xxxxxx The remaining parts of this paper are organized as follows. Section II discusses the need for edge computing as well as gives the definition of edge computing. In Section III, we show some edge computing case studies. Section IV presents the possible challenges and opportunities. Finally, this paper concludes in Section V. \section{Motivation} \label{sec:motivation} \noindent \textbf{Pull From IoT: } Raw data produced by them will be enormous, making conventional cloud computing not efficient enough to handle all these data. This means most of the data produced by IoT will never be transmitted to the cloud, instead it will be consumed at the edge of the network. In general, EdgeWare is different from Rocket in terms of six aspects, which is shown in Table~\ref{tab:hardwarecost}. \begin{table}[ht] \centering \caption{Hardware Equipment of Autonomous Vehicles.} \label{tab:hardwarecost} \scalebox{0.77}{ \begin{threeparttable}[b] \begin{tabular}{|c|c|c|c|} \hline \multicolumn{2}{|c|}{Hardware Equipment} & \multicolumn{2}{c|}{Unit Price} \\ \hline \multicolumn{2}{|c|}{\multirow{2}{*}{Communication Device}} & DSRC & \$17,600 \\ \cline{3-4} \multicolumn{2}{|c|}{} & LTE/5G/C-V2X & \$177 \\ \hline \multicolumn{2}{|c|}{Computation Device} & \begin{tabular}[c]{@{}c@{}}Consists of a PC, a hard drive,\\ a graphics card, and other devices\end{tabular} & \$5000 \\ \hline \multicolumn{2}{|c|}{\begin{tabular}[c]{@{}c@{}}Vehicle Electronic\\ Control Unit (ECU)\end{tabular}} & Each vehicle has 50 to 100 ECUs & \$320 each \\ \hline \multicolumn{2}{|c|}{Power Supply} & \multicolumn{2}{c|}{\$24,300} \\ \hline \multirow{4}{*}{\begin{tabular}[c]{@{}c@{}}\\\\\\Sensor\end{tabular}} & Camera & \multicolumn{2}{c|}{\$6000} \\ \cline{2-4} & LiDAR & \multicolumn{2}{c|}{\begin{tabular}[c]{@{}c@{}}\$8,5000 (installed on the top, \\ 360-degree field of view)\\ + \$8,000 * 4 (4 small ones installed \\ in 4 corners)\end{tabular}} \\ \cline{2-4} & Radar & \multicolumn{2}{c|}{\$500 each * 6} \\ \cline{2-4} & Other & \multicolumn{2}{c|}{Eg. inertial measurement unit, \$4,000} \\ \hline \end{tabular} \begin{tablenotes} \item[1] Data listed as of August 2020. \item[2] Use the following web tools to customize a table: \item[] \href{https://www.tablesgenerator.com/latex_tables}{https://www.tablesgenerator.com/latex\_tables} \end{tablenotes} \end{threeparttable} } \vspace{-0.6 cm} \end{table} Reliability is also a key challenge at the edge of the network. We identify the challenges in reliability from the different views of service, system, and data here. \begin{itemize} \item[\ding{118}] From the service point of view, it is sometimes very hard to identify the reason for a service failure accurately at field. For example, if an air conditioner is not working, a potential reason could be that a power cord is cut, compressor failure, or even a temperature controller has run out of battery. A sensor node could have lost connection very easily to the system due to battery outage, bad connection condition, component wear out, etc. At the edge of the network, it is not enough to just maintain a current service when some nodes lose connection, xxxxxx \item[\ding{118}] From the system point of view, it is very important for the edgeOS to maintain the network topology of the whole system, and each component in the system is able to send status/diagnosis information to the edgeOS. With this feature, services such as failure detection, thing replacement, and data quality detection could be easily deployed at the system level. \item[\ding{118}] From the data point of view, reliability challenge rise mostly from the data sensing and communication part. As previously researched and discussed, things at the edge of the network could fail due to various reasons and they could also report low fidelity data under unreliable condition such as low battery level. \end{itemize} \section{Architecture} \label{sec:Architecture} If all the data needs to be sent to the cloud for processing, the response time would be too long. Not to mention that current network bandwidth and reliability would be challenged for its capability of supporting a large number of vehicles in one area. In this case, the data needs to be processed at the edge for shorter response time, more efficient processing and smaller network pressure. \weisong{give more details about xxxxx} \begin{equation} \begin{array}{c} S = \binom{N}{n},A_{k} = \binom{M}{k}\cdot \binom{N-M}{n-k} \\ \\ P\left ( A_{k}\right ) = \frac{\binom{M}{k}\cdot \binom{N-M}{n-k}}{\binom{N}{n}} \end{array} \end{equation} Use the following web tool to get the formula in latex format: \href{https://www.latexlive.com/}{https://www.latexlive.com/} \section{Case Study} \label{sec:case} In this section, we give several case studies where edge computing could shine to further illustrate our vision of edge computing. \subsection{Cloud Offloading} \begin{figure}[h] \centering \includegraphics[width=\columnwidth]{figures/Equinox.pdf} \caption{Insert a figure.} \label{system-design} \end{figure} In the traditional content delivery network, only the data is cached at the edge servers. This is based on the fact that the content provider provides the data on the Internet, which is true for the past decades. In the IoT, the data is produced and consumed at the edge. Thus, in the edge computing paradigm, not only data but also operations applied on the data should be cached at the edge. \subsection{Video Analytics} The widespread of mobilephones and network cameras make video analytics an emerging technology. Cloud computing is no longer suitable for applications that requires video analytics due to the long data transmission latency and privacy concerns. Here we give an example of finding a lost child in the city. \section{Evaluation and Observation} \label{sec:evaluation} From the system point of view, it is very important for the edgeOS to maintain the network topology of the whole system, and each component in the system is able to send status/diagnosis information to the edgeOS. With this feature, services such as failure detection, thing replacement, and data quality detection could be easily deployed at the system level. \section{Related Work} \label{sec:related} In edge computing, we have multiple layers with different computation capability~\cite{Li:2013:Bugu,Bing:eCope}. Workload allocation becomes a big issue. We need to decide which layer to handle the workload or how many tasks to assign at each part. There are multiple allocation strategies to complete a workload, for instances, xxxxxx \section{Conclusion Remarks} \label{sec:conclusion} Nowadays, more and more services are pushed from the cloud to the edge of the network because processing data at the edge can ensure shorter response time and better reliability. Moreover, bandwidth could also be saved if xxxxxx
\section{Introduction} In high energy collisions, partons of large virtuality are produced from hard scatterings, which then radiate and hadronize subsequently, forming collimated sprays of particles called jets. Studying jet production can deepen our understanding of both perturbative and nonperturbative aspects of Quantum Chromodynamics (QCD), which is the theory for strong interaction in the Standard Model. In recent years, jet and jet substructure observables in proton-proton collisions have been intensively investigated in both theory and experiment~\cite{Butterworth:2008iy,Ellis:2009su,Stewart:2010tn,Ellis:2010rwa,Abdesselam:2010pt,Altheimer:2012mn,Larkoski:2013eya,Altheimer:2013yza,Dasgupta:2013ihk,Larkoski:2014wba,Adams:2015hiv,Chien:2015cka,Larkoski:2015kga,Moult:2016cvt,Frye:2016okc,Frye:2016aiz,Kang:2016mcy,Kang:2016ehg,Kolodrubetz:2016dzb,Moult:2016fqy,Chien:2016led,Moult:2017jsg,Moult:2017okx,Larkoski:2017jix,Kang:2018jwa,Ebert:2018lzn,Moult:2018jjd,Chien:2018lmv,Kang:2018vgn,Dasgupta:2018nvj,Asquith:2018igt,Marzani:2019hun,Hoang:2019ceu,Kang:2019prh,Chien:2019gyf,Chien:2019osu,Stewart:2022ari}. In heavy ion collisions, jets serve as useful probes of the quark-gluon plasma (QGP), a strongly coupled fluid produced shortly after the collision. High energy partons with large virtuality are produced even earlier, much before the formation of the QGP close to thermal equilibrium. The initial hard production of partons is followed by subsequent parton showers and when the produced partons traverse the QGP, further radiation induced by the medium can happen. Eventually partons hadronize into particles at the freezeout. By comparing jets produced in proton-proton and heavy ion collisions, we are able to learn how the QGP modifies the parton shower. Jets can be thought of as external to the QGP, since the large energy scale involved in the jet production is much bigger than the typical temperature of the QGP fireball, which falls in the range $\sim[150,600]$ MeV. In this sense, a jet can also be treated as an open quantum system embedded in the QGP fireball~\cite{Vaidya:2020cyi,Vaidya:2020lih}. Nevertheless, the soft ingredients of jets cannot be fully distinguished from the QGP fireball in general. To understand and interpret experimentally measured jet and jet substructure observables in heavy ion collisions, at least three aspects of jet-medium dynamics need theoretical studies: jet energy loss, medium response and selection bias. First, when high energy partons traverse the QGP, they interact with the soft medium and as a result lose energy and momentum. This is the original idea of jet quenching in heavy ion collisions. Furthermore, the lost energy and momentum evolve in the QGP fireball, which may or may not thermalize completely to become part of the QGP, and eventually turn into particles that still have some correlation with the original high energy partons losing energy and momentum. Due to the remaining correlation, some of the particles produced in this way are reconstructed as part of the final jets. Finally, since jets of wider opening angles lose more energy than those with narrower opening angles, when experimentalists reconstruct jets of a given energy or transverse momentum, more narrower jets are selected due to the power-law decrease in jet spectra. Jet energy loss has been studied widely for a long time, while in recent years, more studies focused on understanding medium response~\cite{CasalderreySolana:2004qm,Ruppert:2005uz,Chaudhuri:2005vc,CasalderreySolana:2006sq,Chesler:2007an,Gubser:2007ga,Chesler:2007sv,Chesler:2008wd,Chesler:2008uy,Neufeld:2008fi,Neufeld:2008dx,Qin:2009uh,Neufeld:2009ep,Gubser:2009sn,Chesler:2011nc,Betz:2010qh,Ayala:2012bv,Ayala:2014sua,Floerchinger:2014yqa,Tachibana:2014lja,Yan:2017rku,Chen:2017zte,Tachibana:2020mtb,Casalderrey-Solana:2020rsj} and selection bias~\cite{Brewer:2021hmh}. Jet energy loss has been studied in both the strong coupling~\cite{Chesler:2014jva,Chesler:2015nqz,Casalderrey-Solana:2014bpa,Casalderrey-Solana:2015vaa,Casalderrey-Solana:2016jvj,Hulcher:2017cpt,Casalderrey-Solana:2018wrw,Casalderrey-Solana:2019ubu} and weak coupling limits. In the weak coupling (perturbative) approach, an important quantum interference effect needs consideration is called the Landau-Pomeranchuk-Migdal (LPM) effect. The LPM effect suppresses in-medium radiation because of the destructive quantum interference, caused by soft momentum exchange with the medium that modifies the phase in the time evolution in a random way. Early perturbative studies of the LPM effect focused on the case with a static medium and just one splitting, i.e., with one incoming parton and two outgoing partons for an initial quark state~\cite{Gyulassy:1993hr,Wang:1994fx,Baier:1994bd,Baier:1996kr,Zakharov:1996fv,Baier:1996sk,Gyulassy:1999zd,Gyulassy:2000fs,Wiedemann:2000za,Arnold:2002ja}, and were later generalized for an incoming gluon~\cite{CasalderreySolana:2011rz,MehtarTani:2011tz,Ovanesyan:2011xy,MehtarTani:2011gf,MehtarTani:2012cy,Blaizot:2012fh,Blaizot:2013hx,Blaizot:2013vha,Ghiglieri:2015ala} and expanding media~\cite{Salgado:2003gb,Adhya:2019qse}. The difficulty of analyzing the LPM effect lies in that the soft momentum transfer from the medium and the parton splitting do not commute, which requires one to keep track of both in a time-ordered way. The soft momentum exchange process in the time evolution can be analyzed by studying a time evolution equation for a two-point correlation function, which describes the propagation of a single parton in the medium, undergoing transverse momentum broadening due to diffusion. The soft momentum exchange is encoded in terms of a ``potential'' term in the equation, which can be calculated in the opacity expansion or modeled. The description of the soft momentum exchange can be improved by expanding the ``potential'' term perturbatively at high frequency on top of a harmonic oscillator form~\cite{Mehtar-Tani:2019ygg,Barata:2021wuf}. Recent studies have attempted to investigate cases with two splittings~\cite{Arnold:2020uzm,Arnold:2021pin,Arnold:2022epx}, but the analysis becomes extremely complicated due to multiple interfering diagrams with overlapped formation times of daughter partons. Therefore, it is extremely challenging to analyze the LPM effect for cases with more than two splittings, especially when the medium is time dependent. In this paper, we propose a framework for quantum simulation of jet quenching in hot and/or dense nuclear environments. Quantum simulation of quantum dynamics has been proposed long time ago~\cite{feynman1986quantum} and is developing rapidly in recent years~\cite{Devoret2013,annurev-conmatphys-031119-050605,doi:10.1063/1.5088164,google_supremacy,Lamm:2018siq,Bauer:2019qxa,Mueller:2019qqj,Wei:2019rqy,Smith2019,Barata:2020jtq,Kan:2021nyu,Martyn:2021eaf,Klco:2021lap,Bauer:2021gup,Czajka:2021yll,Ciavarella:2022zhe,Bauer:2022hpo}. For applications in quantum field theory, it has been shown that scalar field theory with the $\phi^4(x)$ interaction can be efficiently simulated on a quantum computer~\cite{Jordan:2011ci,Jordan:2012xnu,Jordan:2017lea,Klco:2018zqz}. Later studies investigated fermionic fields~\cite{Jordan:2014tma} and gauge theories in low dimensions~\cite{hauke2013quantum,kuhn2014quantum,Klco:2018kyo,Zache:2018cqq,Klco:2019evd,Chakraborty:2020uhf,Nguyen:2021hyk,deJong:2021wsd,Ciavarella:2021nmj}. Quantum simulation has been explored to study open quantum systems in heavy ion collisions such as heavy quarks and jets~\cite{DeJong:2020riy,Barata:2021yri}. Furthermore, hadron structure can also be studied on a quantum computer by using basis light-front quantization approach~\cite{Qian:2021jxp}. In the noisy intermediate-scale quantum (NISQ) era~\cite{preskill2018quantum}, error mitigation techniques~\cite{He:2020udd,Pascuzzi:2021mhw} are crucial for useful applications of quantum computers. To simulate jet quenching on a quantum computer, we will apply the light-front Hamiltonian formulation of QCD~\cite{Brodsky:1997de} to describe the in-medium time evolution of high energy partons. The Hamiltonian relevant for jet quenching can be decomposed into three parts: a kinetic term for the phase change in the time evolution, a diffusion term accounting for the transverse momentum broadening due to the soft kicks from the medium, and a splitting term that governs radiation of partons and their recombination. The random transverse momentum exchange between the partons and the medium can be described by an external classical background gauge field that satisfies certain correlations. These correlation functions depend on the medium properties such as its temperature. The classical background field results in a random change of the kinetic energy, which leads to a random phase in the time evolution and is the crucial part for the destructive interference in the LPM effect. The classical background field needs to be sampled classically before constructing quantum circuits and the cost of the sampling scales linearly with the time length of the evolution and the momentum grid volume. We will use $n$-particle states in momentum space as the basis of the Hilbert space and write down matrix elements for the three parts of the Hamiltonian. It will turn out that the kinetic term is diagonal and thus can be efficiently simulated. Furthermore, the matrices of the diffusion and splitting Hamiltonians are sparse, indicating that we are very likely able to efficiently simulate them on a quantum computer. After discretizing momenta and encoding all the basis states in the qubit register, we can construct quantum gates for the Hamiltonian. The initial state of the time evolution for jet quenching is given by one or many partons (quarks and gluons) with definite momenta, colors and spins, properly (anti)symmetrized, which can be easily constructed in the qubit register since it is a linear combination of the basis states with known coefficients. The standard Trotterization method will then be applied to simulate the Hamiltonian evolution. At the end of the time evolution, we perform measurements by projecting the final state onto a state with certain number of partons with specific momenta, colors and spins, that is properly (anti)symmetrized. Radiation spectra can then be estimated from the measurement results by repeating the time evolution and the projective measurement multiple times. Our approach automatically keeps track of quantum interference, since it is based on the quantum evolution of a wavefunction, i.e., it evolves on the amplitude level. Therefore, our framework can be easily used to study the LPM effect for more than two splittings, no matter whether the medium is time independent or time dependent, thin or thick, hot or cold. In the future, with fault-tolerant quantum computers that have a few hundred logical qubits, we will be able to use this framework to study QCD jet quenching in nuclear environments and learn new physical insights into the LPM effect. We will apply the formalism to study a toy model that can be encoded by five qubits. The toy model consists of scalar particles, which means we neglect the spin and color degrees of freedom that are present in QCD. To reduce the size of the Hilbert space, we simply consider a $2+1$ dimensional system with only one transverse direction. Both the longitudinal and transverse momenta have two levels. We include both $1$-particle and $2$-particle states in the Hilbert space, which allows us to study the LPM effect in one splitting. Classical background fields are also used to describe the random transverse momentum exchanges in the toy model, which are sampled classically. By explicitly constructing a quantum circuit for the time evolution of the toy model and running simulations on the IBM Qiskit simulator, we compare the total radiation probabilities in vacuum and in the medium for an initial $1$-particle state. We find that the probability of having two particles in the final state is smaller in the medium, which means the LPM effect that suppresses radiation is observed in the quantum simulation results of the toy model. This paper is organized as follows: in Sect.~\ref{sect:formalism} we will give an overview of the framework, which includes state initialization, Hamiltonian time evolution and final measurements. We will introduce the light-front Hamiltonian of QCD to describe the in-medium dynamics of high energy partons and explain the $n$-particle basis of the Hilbert space. The matrix elements of the three parts of the Hamiltonian: the kinetic, diffusion and splitting terms will be given explicitly in the following Sect.~\ref{sect:matrix}, together with a discussion on the sampling of the classical background field. Furthermore, quantum simulation of the toy model for studying the LPM effect will be discussed in Sect.~\ref{sect:toy}, with an explicit construction of the quantum circuit for the time evolution. Simulation results that are based on the IBM Qiskit quantum simulator will also be shown. Finally, we will conclude and give an outlook in Sect.~\ref{sect:conclusion}. \section{Formalism} \label{sect:formalism} A typical diagram to understand the LPM effect in jet quenching is depicted in Fig.~\ref{fig:lpm}, which describes the time evolution of a quantum state initiated by an incoming parton that undergoes subsequent soft momentum exchanges, splittings and recombination. The diagram is on the amplitude level. To calculate physical observables, one needs to sum over the amplitudes from all diagrams with the same final state. In general, the number of diagrams grow exponentially with the number of splittings and their quantum interference is extremely difficult to account for in an approach based on perturbative theory. \begin{figure}[t] \centering \includegraphics[height=2.5in]{LPM.pdf} \caption{Typical diagram describing the LPM effect in jet quenching on the amplitude level, which includes free propagation, soft momentum exchange (labeled by dashed lines) and splitting/recombination. The solid lines with arrows indicate the propagation of quarks in time, while the curly lines are for the propagation of gluons.} \label{fig:lpm} \end{figure} \begin{figure}[t] \centering \includegraphics[height=2.5in]{LPM_H.pdf} \caption{Three parts of the Hamiltonian for studying the LPM effect in jet quenching: the kinetic, diffusion and splitting/recombination terms. Matrix elements of these Hamiltonians will be explicitly given in Section~\ref{sect:matrix}.} \label{fig:lpm_H} \end{figure} To simulate the time evolution of jets and study the LPM effect on a quantum computer, we need a Hamiltonian description of the evolution, which includes the kinetic term, diffusion caused by soft momentum transfer from the medium and splitting/recombination, as depicted in Fig.~\ref{fig:lpm_H}. In this work, we will use the light-front Hamiltonian of QCD to describe the dynamics of high energy partons and their interactions with the nuclear medium. A brief introduction to the light-front Hamiltonian of QCD can be found in Appendix~\ref{app:lfqcd}. We will first discuss the light-front Hamiltonian dynamics for studying the LPM effect in jet quenching in Section~\ref{sect:h}. Then in Section~\ref{sect:hilbert} we will introduce the computational basis of the Hilbert space for the quantum simulation. \subsection{Light-Front Hamiltonian Dynamics} \label{sect:h} The light-front Hamiltonian dynamics is determined by \begin{eqnarray} 2i\frac{\partial}{\partial x^+} |\Psi\rangle = H |\Psi\rangle \,, \end{eqnarray} where $x^+=x^0+x^3$ is the light-cone time.\footnote{The factor of $2$ on the left-hand side is just a convention. When defining the light-front Hamiltonian, we integrate the Hamiltonian density with the integral measure \begin{eqnarray} \int \diff x^- \diff^2 x_\perp \mathcal{H} \,. \end{eqnarray} On the other hand, we know the Lorentz invariant measure in spacetime is \begin{eqnarray} \int \diff^4 x = \frac{1}{2}\int \diff x^+ \diff x^- \diff^2 x_\perp \,. \end{eqnarray} Therefore, for consistency we need to treat $\frac{1}{2}x^+$ as the ``time'' conjugated to the Hamiltonian. Another way of seeing this factor of $2$ is to note that $\frac{\partial}{\partial x^+}$ is associated with $P_+$ and defining $P_+$ involves \begin{eqnarray} \int \varepsilon_{+12-} \diff x^- \diff x^1 \diff x^2\,, \end{eqnarray} where the Levi-Civita tensor is normalized by \begin{eqnarray} \varepsilon_{+12-} = \frac{1}{2} \,, \end{eqnarray} when one uses the convention $x^+=x^0+x^3$. See e.g., Ref.~\cite{Brodsky:1997de}.} Our convention of the light-cone coordinates and the construction of the light-front Hamiltonian of QCD can be found in Appendix~\ref{app:lfqcd}. The light-front Hamiltonian of QCD can be written as \begin{align} \label{eqn:H} H & = \int \diff x^- \diff^2 x_\perp \bigg( i \psi_+^\dagger \big(- \slashed{D}_\perp +im \big) \frac{1}{\partial^+} \big( \slashed{D}_\perp +im \big) \psi_+ -g \psi^\dagger_+ A^{-a}T^a \psi_+ \\ &\qquad\qquad\qquad\quad +\frac{1}{4}F_\perp^{ija} F_{\perp ij}^a -\frac{1}{8} ( \partial^+ A^{-a} )^2 + \frac{1}{2}( \partial^+ A^{i a}_\perp ) ( -\partial_i A^{-a} + g f^{abc} A^{-b} A_{\perp i}^c ) \bigg) \,, \nonumber \end{align} where $i=1,2$ and $j=1,2$ denote the transverse components and are implicitly summed over. The $-$ component of the gauge field is not dynamical and is related to the dynamical components via \begin{eqnarray} \label{eqn:A-a} A^{-a} = \frac{2}{\partial^+} \partial^i A^{ia}_\perp - \frac{2g}{\partial^{+2}} \Big( f^{abc} ( \partial^+ A^{ib}_\perp ) A^{i c}_\perp - 2\psi_+^\dagger T^a \psi_+ \Big) \,, \end{eqnarray} where $\partial^{+2}=(\partial^+)^2$. The light-front Hamiltonian~\eqref{eqn:H} is time independent. The dynamical fields $\psi_+^i$ and $A_\perp^{ia}$ at zero time $x^+=0$ can be expanded in terms of creation and annihilation operators in momentum space \begin{align} \psi_+^i(x^+=0,x_\perp, x^-) &= \sum_{\sigma=\pm\frac{1}{2}} \int_{k^+>0} \frac{\diff k^+ \diff^2 k_\perp}{2(2\pi)^3 k^+} \Big( b^i(k,\sigma) u_+(k, \sigma) e^{-ik\cdot x} + d^{i\dagger}(k,\sigma) v_+(k,\sigma) e^{ik\cdot x} \Big)\,, \\ A^{ib}_\perp(x^+=0, x_\perp, x^-) &= \sum_{\lambda=\pm} \int_{k^+>0}\frac{\diff k^+ \diff^2 k_\perp}{2(2\pi)^3 k^+} \Big( a^b(k,\lambda) \varepsilon_\perp^i(\lambda) e^{-ik\cdot x} + a^{b\dagger}(k,\lambda) \varepsilon_\perp^{i*}(\lambda) e^{ik\cdot x} \Big) \,, \end{align} where $a,b,d$ ($a^\dagger,b^\dagger,d^\dagger$) are annihilation (creation) operators for gluons, quarks and antiquarks respectively. Here $\sigma$ denotes quark spins, $\lambda$ represents gluon polarizations and $\epsilon_\perp(\lambda)$ is the corresponding polarization tensor in the transverse plane. The Hamiltonian can be quantized by imposing the following (anti-)commutation relations: \begin{align} \big\{ b^i(k,\sigma), b^{j\dagger}(k',\sigma') \big\} = \big\{ d^i(k,\sigma), d^{j\dagger}(k',\sigma') \big\} = 2(2\pi)^3 k^+ \delta^{ij} \delta_{\sigma \sigma'} \delta^3(k-k')\,,\\ \big[ a^b(k, \lambda), a^{c\dagger}(k',\lambda') \big] = 2(2\pi)^3 k^+ \delta_{\lambda\lambda'} \delta^{bc} \delta^3(k-k') \,,\nonumber \end{align} where $\delta^3(k-k') = \delta(k^+ - k'^{+}) \delta^2(k_\perp-k'_\perp)$. In the following, when we describe the soft momentum exchange between the QGP and high energy partons, which results in diffusion of the partons in the transverse plane, we will use a description based on a background gauge field $\bar{A}^{-a}$~\cite{Blaizot:2012fh}. The $\bar{A}^{-a}$ field is classical and will be discussed in detail in Section~\ref{sect:diffuse}. To incorporate the classical background field into the Hamiltonian, we simply apply the replacement \begin{eqnarray} \label{eqn:A+Abar} A^{-a} \to A^{-a}+ \bar{A}^{-a} \,, \end{eqnarray} of which the right hand side is the new $-$ component of the gauge field appearing in the Hamiltonian, with $A^{-a}$ given by Eq.~\eqref{eqn:A-a} and $\bar{A}^{-a}$ the classical background field. In general, the classical background field depends on the light-cone time $x^+$, so under the replacement~\eqref{eqn:A+Abar} the light-front Hamiltonian becomes time dependent through $\bar{A}^{-a}$ \begin{eqnarray} H \to H(x^+) = H[\bar{A}^{-a}(x^+)] \,. \end{eqnarray} The Hamiltonian can be split into three parts for studying the LPM effect in jet quenching: \begin{eqnarray} H(x^+) = H_{\rm kin} + H_{\rm diff}(x^+) + H_{\rm split} \,. \end{eqnarray} Here $H_{\rm kin}$ describes the free theory of quarks and gluons on the light front and induces a phase change for each parton in the time evolution. $H_{\rm diff}$ represents the interaction between the QGP medium and quarks/gluons in the system, which originates from Glauber exchanges induced by the background fields and results in the transverse momentum broadening of partons. $H_{\rm split}$ gives the interaction between quarks and gluons, describing the splitting process of $n$ high energy partons going into $n+1$ partons and the inverse process, i.e., recombination of partons. It is necessary to include recombination of partons in $H_{\rm split}$ for it to be Hermitian and for the time evolution to be unitary. To simulate the in-medium jet evolution on a digital quantum computer from $x^+=0$ to a time $x^+ \equiv 2t$,\footnote{Here $t$ is just a short hand notation for $x^+/2$ and should be distinguished from $x^0$ used in the definition of $x^+ = x^0+x^3$.} we decompose the total time length into $N_t$ small pieces with a step size $\Delta t = t/N_t$ and apply the standard Trotterization method: \begin{align} \Big( e^{ -i( H_{\rm kin} + H_{\rm diff} + H_{\rm split} ) \Delta t } \Big)^{N_t} |\Psi\rangle = \Big( \prod_{j} e^{-i H_j \Delta t} e^{\mathcal{O}((\Delta t)^2)} \Big)^{N_t} |\Psi\rangle \,, \end{align} where each $H_j$ is chosen such that we know how to construct the quantum circuit for it and $\sum_j H_j = H_{\rm kin} + H_{\rm diff} + H_{\rm split}$. The error $\mathcal{O}((\Delta t)^2)$ on the right hand side comes from nonzero commutators $[H_j,H_k]\neq0$ ($j\neq k$). When $N_t$ is large, the correction term $\mathcal{O}((\Delta t)^2)$ can be neglected. Then simulating the in-medium jet evolution can be realized by constructing quantum gates implementing the Hamiltonian dynamics determined by each $H_j$. The convergence rate of the Trotterization can be further improved by including higher-order corrections. To write out matrix elements for each part of the Hamiltonian, we need to choose a basis of the Hilbert space to project the Hamiltonian. In the next subsection, we will explain the basis constructed from $n$-particle states in momentum space. \subsection{Hilbert Space} \label{sect:hilbert} To formulate the Hamiltonian dynamics on a digital quantum computer, we need to first construct a basis of the physical Hilbert space and discretize it so that we can encode quantum states in terms of qubits and represent the Hamiltonian as quantum gates. We use $n$-particle states in the light-front momentum space to construct the basis of the Hilbert space. A $1$-particle state can be labeled as \begin{eqnarray} \label{eqn:1-state} \big| q/g,\, k^+>0,\, k_x,\, k_y,\, {\rm color},\, {\rm spin} \big\rangle : \quad \frac{b^{i\dagger}(k,\sigma)|0\rangle}{\sqrt{2(2\pi)^3k^+}} \,,~ \frac{d^{i\dagger}(k,\sigma)|0\rangle}{\sqrt{2(2\pi)^3k^+}}\,,~ \frac{a^{b\dagger}(k,\lambda)|0\rangle}{\sqrt{2(2\pi)^3k^+}}\,, \end{eqnarray} which is obtained by applying a creation operator ($a^{b\dagger}$, $b^{i\dagger}$ or $d^{i\dagger}$) on the vacuum. The normalization factor $1/\sqrt{2(2\pi)^3k^+}$ is chosen for later convenience. Here $q/g$ indicates whether the state is a quark or a gluon. There is no ghost state since in the light-front Hamiltonian formulation of QCD, the light-cone gauge $A^+=0$ is chosen and ghosts are decoupled from gluons. The momentum of the state is specified by the $+$ and transverse components: $(k^+,k_x,k_y)$. In the light-front approach, the $+$ component is always positive so we have constrained the Hilbert space to only contain states with positive $k^+$. A quark or an antiquark state has three degrees of freedom in color. We will label both states as $q$, i.e., a quark state and then differentiate them by the color degrees of freedom. In other words, a quark state has six degrees of freedom in color in our notation, which requires three qubits to encode. A gluon state has eight degrees of freedom in color, which also requires three qubits to encode. The spin degree of freedom has two possibilities for both quark and gluon states, which needs one qubit to store. (For gluon states, by spin we mean the polarization.) A general $n$-particle basis state can be written as \begin{eqnarray} \label{eqn:n-state} \bigotimes_{i=1}^n \big| q/g,\, k^+>0,\, k_x,\, k_y,\, {\rm color},\, {\rm spin} \big\rangle_i \end{eqnarray} where the $i$-th and $j$-th states ($i\neq j$) generally differ in momenta and/or quantum numbers. A single $n$-particle basis state cannot be physical, since physical states of multiple particles need to be properly (anti)symmetrized. For studying the LPM effect, if we start with a $1$-particle state, the Hamiltonian evolution will guarantee the final state is properly (anti)symmetrized, since the (anti)symmetric properties of the boson (fermion) creation and annihilation operators are already included in the construction of the Hamiltonian. To simulate the time evolution of a more general initial state for jet quenching, the initial state needs proper (anti)symmetrization. Then the Hamiltonian evolution will lead to a properly (anti)symmetrized final state. The basis of the Hilbert space consists of $n$-particle states for all integers $n$. To simulate the LPM effect in processes with $N$ particles in total (which can happen in cases with one initial parton having $N-1$ splittings or two initial partons having $N-2$ splittings, etc), we need to include all the $1$-particle states, $2$-particle states and all the way to $N$-particle states in the basis, in order to describe the system. In principle, states with more than $N$ particles can also affect the time evolution through loop effects, i.e., they only exist as intermediate states and are absent in the final states measured. To reduce the loop effects, one may truncate the states with a much high particle number such as $2N$. Before moving on to the detailed discussion of the Hamiltonian, we give an estimate of the qubit cost. For each $1$-particle state, to distinguish a quark state from a gluon one, two degrees of freedom are required. We also need eight color degrees of freedom (a quark state only has six degrees of freedom in color but the more demanding case in terms of the register resource is given by a gluon state) and two spin degrees of freedom. To encode the basis states on a digital quantum computer, we need to truncate and discretize the momenta. We assume the ranges of the momenta are given by \begin{align} k^+\in (0, K_{\rm max}^+ ]\,,\quad\qquad k_x\in [-K_{\rm max}^\perp , K_{\rm max}^\perp ]\,,\quad\qquad k_y\in [-K_{\rm max}^\perp , K_{\rm max}^\perp ] \,. \end{align} With step sizes set by $\Delta k^+,\Delta k^\perp,\Delta k^\perp$ for the $+,x,y$ components respectively, the number of degrees of freedom in momenta is given by $N^+N_\perp^2$ where \begin{eqnarray} N^+ = \frac{K_{\rm max}^+}{\Delta k^+} \,,\quad\qquad N_\perp = \frac{K_{\rm max}^\perp}{\Delta k^\perp} +1 \,. \end{eqnarray} Therefore, the number of qubits needed to represent all the $1$-particle states is estimated as \begin{eqnarray} \log_2( 2^5N^+N_\perp^2 ) \,. \end{eqnarray} Encoding all the $n$-particle states (fixed $n$) requires a number of qubits given by \begin{eqnarray} \log_2 \Big( \big( 2^5N^+N_\perp^2 \big)^n \Big) \,. \end{eqnarray} If we want to study the LPM effect in processes with $N$ particles in total with loop effects from states of more than $N$ particles neglected, we have to include all the $n$-particle states where $n=1,2,\cdots,N$. The total number of qubits needed in the register then is \begin{eqnarray} \label{eqn:Nqubits} \log_2\Big( \sum_{n=1}^N \big(2^5N^+N_\perp^2\big)^n \Big) \,. \end{eqnarray} One can reduce the qubit cost in the register for special cases. For example, if we study the LPM effect in a process initiated by one parton, the qubit cost is given by \begin{eqnarray} \log_2 \!\Big( \sum_{n=1}^N \frac{1}{n!}\big(2^5N^+N_\perp^2\big)^n \Big) \,, \end{eqnarray} where the $1/{n!}$ factor originates from the constraint that $k^+ > 0$ and the total $+$ component of the momentum is conserved in each splitting. In general, the qubit cost is estimated by Eq.~\eqref{eqn:Nqubits}. If we choose $N^+=N_\perp=100$, the cost of qubit numbers is about $50$ for one initial parton having one splitting and about $75$ for two splittings, according to Eq.~\eqref{eqn:Nqubits}. To go beyond the scope of current studies of the LPM effect, we will simulate the case with one initial parton and three splittings, which needs about $100$ qubits. In the NISQ era, a quantum simulation using $100$ qubits is possible, but error mitigation techniques are necessary for physical applications. Fault-tolerant quantum computers with $100$ qubits may become available in the near future. \subsection{State Initialization and Measurement} For studies of the LPM effect, the initial state contains a number of partons with specific momenta, colors and spins and each of them can be either a quark or a gluon. Therefore the initial state is just a linear combination of $n$-particle basis states, properly (anti)symmetrized, and it can be easily initialized in the qubit register. The initialization is much simpler than cases where the initial states involve hadrons such as protons, which are nontrivial linear superposition of all $n$-particle states, with coefficients that are a priori unknown. Adiabatic state preparation has been proposed to prepare such complicated initial states by starting with free particles and then slowly turning on the interaction~\cite{farhi2000quantum}. Here we only focus on quantum simulation of the LPM effect in medium-induced radiation for one or a number of initial partons. Quantum simulation of the whole heavy ion collision where the initial state consists of two heavy nuclei, which are complicated nuclear bound states, is beyond the scope of our current study. The final state contains multi-particle states due to the splittings in the time evolution. To extract the radiation spectrum from the final state, we project the final state onto a specific $n$-particle state with given momenta, colors and spins, which corresponds to a specific state in the computational basis or a linear combination of the basis states with known coefficients. So the measurement is simply projective. The time evolution and the projective measurement need repeating multiple times since the quantum state collapses after the measurement. After collecting enough statistics, one will be able to calculate the radiation spectrum. Color and spin degrees of freedom may be averaged, depending on the radiation spectrum of interest. \section{Matrix Elements of the Light-Front Hamiltonian of QCD} \label{sect:matrix} In this section, we will write down matrix elements of the light-front Hamiltonian of QCD in the computational basis introduced in the previous section, for the kinetic $H_{\rm kin}$, diffusion $H_{\rm diff}$ and splitting $H_{\rm split}$ terms. \subsection{Kinetic Term} \label{sect:kinetic} The kinetic energy parts of the Hamiltonian are given by \begin{align} H_{f,\,{\rm kin}} &= \sum_i \sum_{\sigma=\pm\frac{1}{2}} \int_{k^+>0} \frac{\diff k^+ \diff^2 k_\perp}{2(2\pi)^3 k^+} \frac{{\boldsymbol k}_\perp^2}{k^+} \Big( b^{i\dagger}(k,\sigma) b^{i}(k,\sigma) +d^{i\dagger}(k,\sigma) d^{i}(k,\sigma) \Big) \,,\\ H_{g,\,{\rm kin}} &= \sum_b \sum_{\lambda=\pm} \int_{k^+>0} \frac{\diff k^+ \diff^2k_\perp }{2(2\pi)^3k^+} \frac{{\boldsymbol k}_\perp^2}{k^+} a^{b\dagger}(k,\lambda) a^b(k,\lambda) \,, \nonumber \end{align} for quarks and gluons respectively. The derivation of these terms can be found in Appendix~\ref{app:lfqcd}. Matrix elements of the kinetic terms in the basis of Eq.~\eqref{eqn:1-state} are given by \begin{align} \big\langle q,\, k_1^+,\, k_{1\perp},\, i_1,\, \sigma_1 \big| H_{q,\,{\rm kin}} \big| q,\, k_2^+,\, k_{2\perp},\, i_2,\, \sigma_2 \big\rangle & = \frac{{\boldsymbol k}_{1\perp}^2}{k_1^+} \delta(k_1^+-k_2^+) \delta^2(k_{1\perp} - k_{2\perp}) \delta_{i_1i_2} \delta_{\sigma_1 \sigma_2} \,, \\ \big\langle g,\, k_1^+,\, k_{1\perp},\, a_1,\, \lambda_1 \big| H_{g,\,{\rm kin}} \big| g,\, k_2^+,\, k_{2\perp},\, a_2,\, \lambda_2 \big\rangle & = \frac{{\boldsymbol k}_{1\perp}^2}{k_1^+} \delta(k_1^+-k_2^+) \delta^2(k_{1\perp} - k_{2\perp}) \delta_{a_1a_2} \delta_{\lambda_1 \lambda_2} \,, \nonumber \end{align} which in the discretized computational basis becomes \begin{align} \label{eqn:Hkin_discrete} \big\langle q,\, k_1^+,\, k_{1\perp},\, i_1,\, \sigma_1 \big| H_{q,\,{\rm kin}} \big| q,\, k_2^+,\, k_{2\perp},\, i_2,\, \sigma_2 \big\rangle & = \frac{{\boldsymbol k}_{1\perp}^2}{k_1^+} \delta_{k_1^+ k_2^+} \delta_{k_{1x} k_{2x}} \delta_{k_{1y} k_{2y}} \delta_{i_1i_2} \delta_{\sigma_1 \sigma_2} \,, \\ \big\langle g,\, k_1^+,\, k_{1\perp},\, a_1,\, \lambda_1 \big| H_{g,\,{\rm kin}} \big| g,\, k_2^+,\, k_{2\perp},\, a_2,\, \lambda_2 \big\rangle & = \frac{{\boldsymbol k}_{1\perp}^2}{k_1^+} \delta_{k_1^+k_2^+} \delta_{k_{1x} k_{2x}} \delta_{k_{1y} k_{2y}} \delta_{a_1a_2} \delta_{\lambda_1 \lambda_2} \,. \nonumber \end{align} These matrix elements can be easily generalized to the case with $n-$particle states that are symbolically represented as $\bigotimes_{i=1}^n |i\rangle \equiv |123\cdots n\rangle $ where $|i\rangle$ labels the $i$-th particle state $ |q/g,\, k^+,\, k_\perp,\, {\rm color},\, {\rm spin}\rangle_i$: \begin{align} &\big\langle 1'2'3'\cdots n' \big| H_{\rm kin} \big| 123\cdots n \big\rangle \\ & \quad = \sum_{i=1}^n \big\langle i' \big| H_{\rm kin} \big| i \big\rangle \big\langle 1'2'3'\cdots (i'-1)(i'+1)\cdots n' \big| 123\cdots (i-1)(i+1)\cdots n \big\rangle \nonumber \\ & \quad = \sum_{i=1}^n \frac{{\boldsymbol k}_{i\perp}^2}{k_i^+} \delta_{1'1} \delta_{2'2} \cdots \delta_{n'n}\,, \nonumber \end{align} where $\langle i'| H_{\rm kin} | i \rangle$ is given by Eq.~\eqref{eqn:Hkin_discrete} and $\delta_{i'i}$ is a short hand notation for the Kronecher delta functions of the discrete momenta, colors and spins for parton $i'$ and parton $i$. No cross terms of the form $\langle i' | H_{\rm kin} | j \rangle$ ($i\neq j$) appear in the matrix elements involving two $n$-particle states. We want to emphasize this is just a result of our choice of the computational basis. Such cross terms $\langle i' | H_{\rm kin} | j \rangle$ ($i\neq j$) are physical and can be accounted for when the quantum state is properly (anti)symmetrized, i.e., such cross terms will show up in the matrix elements of $H_{\rm kin}$ involving two physical states. With our choice of the computational basis, the kinetic term $H_{{\rm kin}}$ is diagonal and the diagonal element is given by the light-cone energy of the corresponding $n$-particle state: \begin{eqnarray} \sum_{i=1}^n \frac{{\boldsymbol k}_{i\perp}^2}{k_i^+} \,, \end{eqnarray} where the summation is over all the constitutes in the $n$-particle state. The time evolution induced by the kinetic Hamiltonian is just a phase, which can be efficiently simulated on a quantum computer by using, e.g., the phase kickback method, which is briefly reviewed in Appendix~\ref{app:phase_kick}. We will also give an explicit construction of the quantum circuit for the kinetic evolution in Section~\ref{sect:toy}, which does not reply on the phase kickback method. \subsection{Diffusion Term} \label{sect:diffuse} To describe the diffusion process in the transverse plane caused by the soft momentum transfer from the medium, we replace the $A^{-a}$ field in Eq.~\eqref{eqn:H} with $A^{-a}+\bar{A}^{-a}$ where $A^{-a}$ is determined by the dynamical field degrees of freedom as shown in Eq.~\eqref{eqn:A-a} and $\bar{A}^{-a}$ denotes a classical background field. We follow Ref.~\cite{Blaizot:2012fh} to describe the medium as a source of the background gauge field $\bar{A}^{-a}$, which can be time dependent. We assume the background field is $x^-$ independent \begin{eqnarray} \bar{A}^{-a}(x^+, x^-, x_\perp) = \bar{A}^{-a}(x^+, x^-=0, x_\perp) \,, \end{eqnarray} since a high energy parton has a large $+$ component of momentum $k^+$, thus only probing the medium at a small $x^- \sim {1}/{k^+}$. From now on, we will omit the dependence of the background gauge field on the $x^-$ coordinate. We further assume the random background field satisfies the two-point correlation \begin{eqnarray} \big\langle \bar{A}^{-a}(x^+, x_\perp) \bar{A}^{-b}(y^+, y_\perp) \big\rangle = \delta^{ab} \delta(x^+ - y^+) \gamma({\boldsymbol x}_\perp - {\boldsymbol y}_\perp) \,. \end{eqnarray} The random background fields at different light-cone times are assumed independent. One can replace the $\delta(x^+ - y^+)$ function with some other functions in $x^+ - y^+$ to describe some correlation between the random background fields at different times. The $\gamma({\boldsymbol x}_\perp - {\boldsymbol y}_\perp)$ function accounts for nontrivial correlation between background fields at the same light-cone time but different transverse positions. The model used in Ref.~\cite{Blaizot:2012fh} is motivated from the hard-thermal-loop calculation of the Landau damping phenomenon \begin{eqnarray} \gamma({\boldsymbol x}_\perp - {\boldsymbol y}_\perp) = g^2 \int\frac{\diff^2 q_\perp}{(2\pi)^2} e^{i{\boldsymbol q}_\perp \cdot ({\boldsymbol x}_\perp - {\boldsymbol y}_\perp)} \frac{\pi T m_D^2}{({\boldsymbol q}_\perp^2+m_D^2)^2} \,, \end{eqnarray} where $T$ denotes the temperature of the plasma and $m_D$ is the Debye mass. Our framework of the quantum simulation for jet quenching is general and the construction does not depend on any specific form of the correlation function. In momentum space, the correlation function of the background gauge field is given by \begin{eqnarray} \big\langle \bar{A}^{-a}(k^-, k_\perp) \bar{A}^{-b}(-k^-, -k_\perp) \big\rangle = \delta^{ab} \gamma({\boldsymbol k}_\perp) \,. \end{eqnarray} It turns out to be easier to use the mixed space representation \begin{eqnarray} \label{eqn:AAmixed} \big\langle \bar{A}^{-a}(x^+, k_\perp) \bar{A}^{-b}(y^+, -k_\perp) \big\rangle = \delta^{ab} \delta(x^+-y^+) \gamma({\boldsymbol k}_\perp) \,. \end{eqnarray} The quark diffusion term in the Hamiltonian can be obtained from terms of the form $\psi_+^\dagger \bar{A}^- \psi_+$. Since the background field $\bar{A}^{-a}$ is $x^-$ independent, we find \begin{eqnarray} \partial^+ \bar{A}^{-a}(x^+,x_\perp) = \frac{\partial}{\partial x_+} \bar{A}^{-a}(x^+,x_\perp) = 2 \frac{\partial}{\partial x^-} \bar{A}^{-a}(x^+,x_\perp) = 0\,. \end{eqnarray} Therefore the term $(\partial^+ A^{-a} + \partial^+ \bar{A}^{-a})^2$ in the Hamiltonian~\eqref{eqn:H} is irrelevant to the quark diffusion process, which is not obvious from the beginning, since $A^{-a}$ contains $\psi_+^\dagger T^a \psi_+$. With this simplification, the quark diffusion Hamiltonian can be written as \begin{align} H_{q,\,{\rm diff}} &= -g\int\diff x^- \diff^2 x_\perp \psi_+^\dagger(x) \bar{A}^{-a}(x)T^a \psi_+(x) \\ &= -g\int\diff x^- \diff^2 x_\perp \sum_{\sigma_1,\sigma_2} \int_{k_1^+>0} \frac{\diff k_1^+ \diff^2k_{1\perp}}{2(2\pi)^3k^+_1} \int_{k_2^+>0} \frac{\diff k_2^+ \diff^2k_{2\perp}}{2(2\pi)^3k^+_2} \nonumber\\ & \qquad\quad \Big( b^{i\dagger}(k_1,\sigma_1) u_+^\dagger(k_1, \sigma_1) e^{ik_1\cdot x} + d^{i}(k_1,\sigma_1) v_+^\dagger(k_1,\sigma_1) e^{-ik_1\cdot x} \Big) \bar{A}^{-a}(x)T^a_{ij} \nonumber\\ & \qquad\quad \Big( b^j(k_2,\sigma_2) u_+(k_2, \sigma_2) e^{-ik_2\cdot x} + d^{j\dagger}(k_2,\sigma_2) v_+(k_2,\sigma_2) e^{ik_2\cdot x} \Big) \,.\nonumber \end{align} Since $\bar{A}^a(x)$ is $x^-$ independent, the integration over $x^-$ can be carried out to give a delta function in the $+$ component of the momenta: \begin{align} \label{eqn:integral_x^-} \int \diff x^- e^{i(k_1^+ x^- \pm k_2^+ x^-)/2} = 2(2\pi) \delta(k_1^+ \pm k_2^+) \,. \end{align} Since both $k_1^+>0$ and $k_2^+>0$, the delta function with the plus sign vanishes. Then we have \begin{align} H_{q,\,{\rm diff}}=& -g \sum_{\sigma_1,\sigma_2} \int_{k_1^+>0} \frac{\diff k^+_1}{2(2\pi)(k_1^+)^2} \int \frac{\diff^2 k_{1\perp}}{(2\pi)^2} \int \frac{\diff^2 k_{2\perp}}{(2\pi)^2} \\ & \qquad\quad \Big( b^{i\dagger}(k_1,\sigma_1) T_{ij}^a b^j(k_2,\sigma_2) u_+^\dagger(k_1,\sigma_1) u_+(k_2,\sigma_2) \bar{A}^{-a}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp})\nonumber\\ & \quad\quad + d^{i}(k_1,\sigma_1) T_{ij}^a d^{j\dagger}(k_2,\sigma_2) v_+^\dagger(k_1,\sigma_1) v_+(k_2,\sigma_2) \bar{A}^{-a}(x^+, -{\boldsymbol k}_{1\perp} + {\boldsymbol k}_{2\perp}) \Big)\bigg|_{k_2^+=k_1^+}\nonumber \,. \end{align} When $k_1^+ \gg k_{1\perp}, k_{2\perp}, m$, we have \begin{align} u_+^\dagger(k_1,\sigma_1) u_+(k_2,\sigma_2) \big|_{k_1^+=k_2^+} &= k_1^+\delta_{\sigma_1\sigma_2} + \mathcal{O}\Big(\frac{k_{1\perp}}{k_1^+}, \frac{k_{2\perp}}{k_1^+}, \frac{m}{k_1^+} \Big) \,,\\ v_+^\dagger(k_1,\sigma_1) v_+(k_2,\sigma_2) \big|_{k_1^+=k_2^+} &= k_1^+\delta_{\sigma_1\sigma_2} + \mathcal{O}\Big(\frac{k_{1\perp}}{k_1^+}, \frac{k_{2\perp}}{k_1^+}, \frac{m}{k_1^+} \Big) \,, \nonumber \end{align} which means in the high energy limit, the spin of a quark does not change under a small transverse perturb. Under the high energy approximation, we take the leading terms and obtain \begin{align} \label{eqn:Hq_diff} &H_{q,\,{\rm diff}}= \\ & -g \sum_{\sigma} \int_{k_1^+>0} \frac{\diff k^+_1}{2(2\pi)k_1^+} \int\frac{\diff^2 k_{1\perp}}{(2\pi)^2} \int\frac{\diff^2 k_{2\perp}}{(2\pi)^2} \Big( b^{i\dagger}(k_1,\sigma) T_{ij}^a b^j(k_2,\sigma) \bar{A}^{-a}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp}) \nonumber\\ & \qquad\qquad\qquad\qquad\qquad\qquad\qquad + d^{i}(k_1,\sigma) T_{ij}^a d^{j\dagger}(k_2,\sigma) \bar{A}^{-a}(x^+, -{\boldsymbol k}_{1\perp} + {\boldsymbol k}_{2\perp}) \Big)\bigg|_{k_2^+=k_1^+}\nonumber \,, \end{align} in which up to a constant, we can switch the order of $d^{i}(k_1,\sigma)$ and $d^{j\dagger}(k_2,\sigma)$ in the second term and obtain a negative sign due to the anticommutation relation. The gluon diffusion Hamiltonian can be similarly worked out, which involves terms of the form $A_\perp \bar{A}^- A_\perp$. First, the $F_\perp^2$ term in the Hamiltonian~\eqref{eqn:H} does not involve any $\bar{A}^-$ field, so it is irrelevant for the gluon diffusion process. Furthermore the term $(\partial^+ A^{-a} + \partial^+ \bar{A}^{-a})^2$ in Eq.~\eqref{eqn:H} is also irrelevant since the background gauge field $\bar{A}^{-a}$ is $x^-$ independent. The remaining part of the gluon Hamiltonian for consideration is \begin{align} \int \diff x^- \diff^2 x_\perp \,\frac{1}{2}( \partial^+ A^{i a}_\perp ) \big( -\partial_i (A^{-a}+\bar{A}^{-a}) + g f^{abc} (A^{-b}+\bar{A}^{-b}) A_{\perp i}^c \big) \,. \end{align} Integration by parts and using $\partial^+ \bar{A}^{-a} = 0$ lead to the following Hamiltonian describing the gluon diffusion process (we omit terms without any $\bar{A}^{-a}$) \begin{align} H_{g,\,{\rm diff}} &= -\frac{g}{2} f^{abc} \int \diff x^- \diff^2 x_\perp \, A^{i a}_\perp(x) \bar{A}^{-b}(x) \partial^+ A_{\perp i}^c(x) \\ & = -\frac{g}{2} f^{abc} \int \diff x^- \diff^2 x_\perp \sum_{\lambda_1,\lambda_2} \int_{k^+_1>0}\frac{\diff k^+_1 \diff^2 k_{1\perp}}{2(2\pi)^3 k^+_1} \int_{k^+_2>0}\frac{\diff k^+_2 \diff^2 k_{2\perp}}{2(2\pi)^3 k^+_2} \nonumber\\ & \qquad\qquad \Big( a^a(k_1,\lambda_1) \varepsilon_\perp^i(\lambda_1) e^{-ik_1\cdot x} + a^{a\dagger}(k_1,\lambda_1) \varepsilon_\perp^{i*}(\lambda_1) e^{ik_1\cdot x} \Big) \bar{A}^{-b}(x) \nonumber\\ & \qquad\qquad \Big( -ik_2^+ a^c(k_2,\lambda_2) \varepsilon_{\perp i}(\lambda_2) e^{-ik_2\cdot x} + ik_2^+ a^{c\dagger}(k_2,\lambda_2) \varepsilon_{\perp i}^{*}(\lambda_2) e^{ik_2\cdot x} \Big) \,.\nonumber \end{align} Since the background gauge field $\bar{A}^{-a}$ is $x^-$ independent, we can use Eq.~\eqref{eqn:integral_x^-} to show \begin{align} H_{g,\,{\rm diff}} &= -\frac{ig}{2} f^{abc} \sum_{\lambda_1,\lambda_2} \int_{k_1^+>0}\frac{\diff k_1^+}{2(2\pi)k_1^+} \int\frac{\diff^2 k_{1\perp}}{(2\pi)^2} \int\frac{\diff^2 k_{2\perp}}{(2\pi)^2} \\ & \qquad\qquad\qquad \Big( a^a(k_1,\lambda_1) \varepsilon_\perp^i(\lambda_1) a^{c\dagger}(k_2,\lambda_2) \varepsilon_{\perp i}^{*}(\lambda_2) \bar{A}^{-b}(x^+, -{\boldsymbol k}_{1\perp} + {\boldsymbol k}_{2\perp}) \nonumber\\ & \qquad\qquad\ \quad - a^{a\dagger}(k_1,\lambda_1) \varepsilon_\perp^{i*}(\lambda_1) a^c(k_2,\lambda_2) \varepsilon_{\perp i}(\lambda_2) \bar{A}^{-b}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp}) \Big) \bigg|_{k_1^+ = k_2^+} \,. \nonumber \end{align} In the high energy limit $k_1^+ \gg k_{1\perp}, k_{2\perp}, m$, the polarizations $\lambda_1$ and $\lambda_2$ are defined with respect to the same axis along which $k_1^+$ is aligned. So we have the simplification \begin{eqnarray} \sum_{i=1,2}\epsilon_\perp^i (\lambda_1) \epsilon_{\perp i}^* (\lambda_2) = - \delta_{\lambda_1 \lambda_2} \,. \end{eqnarray} Then we have \begin{align} \label{app:Hg_diff} & H_{g,\,{\rm diff}} \\ &= \frac{ig}{2} f^{abc} \sum_{\lambda} \int_{k_1^+>0}\frac{\diff k_1^+}{2(2\pi)k_1^+} \int\frac{\diff^2 k_{1\perp}}{(2\pi)^2} \int\frac{\diff^2 k_{2\perp}}{(2\pi)^2} \Big( a^a(k_1,\lambda) a^{c\dagger}(k_2,\lambda) \bar{A}^{-b}(x^+, -{\boldsymbol k}_{1\perp} + {\boldsymbol k}_{2\perp}) \nonumber\\ &\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad - a^{a\dagger}(k_1,\lambda) a^c(k_2,\lambda) \bar{A}^{-b}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp}) \Big)\bigg|_{k_1^+ = k_2^+} \,. \nonumber \end{align} Up to a constant in $H_{g,\,{\rm diff}}$, we are allowed to switch the order of $a^a(k_1,\lambda)$ and $a^{c\dagger}(k_2,\lambda) $ in the first term of $H_{g,\,{\rm diff}}$. With Eqs.~\eqref{eqn:Hq_diff} and~\eqref{app:Hg_diff} describing the transverse diffusion processes for quarks and gluons, we can write out the matrix elements of the diffusion Hamiltonian \begin{align} &\big\langle q,\, k_1^+,\, k_{1\perp},\, i_1,\, \sigma_1 \big| H_{q,\,{\rm diff}}(x^+) \big| q,\, k_2^+,\, k_{2\perp},\, i_2,\, \sigma_2 \big\rangle \\ =& \begin{cases} -\frac{g}{(2\pi)^2}\delta(k_1^+-k_2^+) \delta_{\sigma_1\sigma_2} T^a_{i_1i_2} \bar{A}^{-a}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp}) \quad {\rm for\ quark} \\ +\frac{g}{(2\pi)^2}\delta(k_1^+-k_2^+) \delta_{\sigma_1\sigma_2} T^a_{i_2i_1} \bar{A}^{-a}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp}) \quad {\rm for\ antiquark} \end{cases} \,,\nonumber \\ &\big\langle g,\, k_1^+,\, k_{1\perp},\, a_1,\, \lambda_1 \big| H_{g,\,{\rm diff}}(x^+) \big| g,\, k_2^+,\, k_{2\perp},\, a_2,\, \lambda_2 \big\rangle \nonumber \\ =&\, \frac{ig}{ (2\pi)^2}\delta(k_1^+-k_2^+) \delta_{\lambda_1\lambda_2} f^{a_2ba_1} \bar{A}^{-b}(x^+, {\boldsymbol k}_{1\perp} - {\boldsymbol k}_{2\perp}) \,.\nonumber \end{align} Using $\bar{A}^{-a}({\boldsymbol k}_\perp) = \bar{A}^{-a}(-{\boldsymbol k}_\perp)$, we can also show these matrices are Hermitian. In these matrix elements, nontrivial color rotations occur in addition to the transverse momentum exchange. With discretized momenta, we will replace $\delta(k_1^+-k_2^+)$ with $\delta_{k_1^+k_2^+}$. It is easy to generalize the matrix elements for $n$-particle states $\bigotimes_{i=1}^n |i\rangle \equiv |123\cdots n\rangle $ where $|i\rangle$ labels the $i$-th particle state $ |q/g,\, k^+,\, k_\perp,\, {\rm color},\, {\rm spin}\rangle_i$. Since the diffusion process does not change the number of particles in the state and only changes the transverse momentum and color of the state, a matrix element involving two states with different particle numbers vanishes \begin{eqnarray} \big\langle 1'2'3'\cdots n'\big| H_{\rm diff} \big| 123\cdots m \big\rangle = 0\,,\qquad {\rm if\ } n\neq m\,. \end{eqnarray} When the two states have the same number of particles, we have \begin{align} & \big\langle 1'2'3'\cdots n'\big| H_{\rm diff} \big| 123\cdots n \big\rangle \\ & \quad = \sum_{i=1}^n \big\langle i' \big| H_{\rm diff} \big| i \big\rangle \big\langle 1'2'3'\cdots (i'-1)(i'+1)\cdots n' \big| 123\cdots (i-1)(i+1)\cdots n \big\rangle \nonumber\\ & \quad = \sum_{i=1}^n \big\langle i' \big| H_{\rm diff} \big| i \big\rangle \delta_{1'1}\delta_{2'2}\cdots \delta_{(i'-1)(i-1)}\delta_{(i'+1)(i+1)}\cdots \delta_{n'n} \,. \nonumber \end{align} Cross terms of the form $\langle i' | H_{\rm diff} | j \rangle$ ($i\neq j$) are accounted for by properly (anti)symmetrized quantum states, as in the case of the kinetic term discussed above. The matrix elements between two states with different $k^+_i$s, spins or polarizations also vanish, no matter whether they have the same number of particles or not. Therefore, the matrix representing the diffusion Hamiltonian is sparse and thus we expect that encoding it on a quantum computer does not require an exponential number of gates. The diffusion Hamiltonian that we have constructed is general and valid not only for background fields satisfying Eq.~\eqref{eqn:AAmixed}, but also for other background fields that satisfy certain higher-point correlation functions, which will only affect our sampling method when generating the background fields. Once the classical background fields are sampled at each time step, they can be plugged into the diffusion Hamiltonian constructed above. In Section~\ref{sect:sample}, we will discuss how to sample the background fields according to Eq.~\eqref{eqn:AAmixed}. \subsection{Splitting Term} \label{sect:split} Finally we work out the matrix elements of the Hamiltonian describing the parton splitting process and its inverse. The full Hamiltonian~\eqref{eqn:H} contains both $1\to2$ and $1\to3$ splittings, as well as $2\to1$, $2\to2$ and $3\to1$ processes. For simplicity, we will focus on the $1\to2$ splitting and its inverse process in this paper. The Hamiltonian for the other processes is either one order higher in the coupling strength $g$ or at least one order higher in the inverse of the large longitudinal momentum $\frac{1}{\partial^+}$ than the $1\to2$ splitting. Therefore, these $1\to3$, $2\to2$ and $3\to1$ processes are suppressed in the high energy limit, either by the coupling strength or by the large longitudinal momentum $1/k^+$. For completeness, all the operators in the Hamiltonian~\eqref{eqn:H} describing splitting processes are listed in Appendix~\ref{app:split}, organized by powers of $g$ and $\frac{1}{\partial^+}$. The $1\to2$ splitting and its inverse process that involve quarks happen at the order $\mathcal{O}(\frac{g}{\partial^+})$. The relevant Hamiltonian is \begin{align} H_{q,\,{\rm split}} &= -g \int\diff x^- \diff x^2_\perp \\ & \qquad\qquad \bigg[ \psi_+^\dagger A_{\perp i} \gamma^i \gamma^j \Big(\frac{\partial_{\perp j}}{\partial^+} \psi_+\Big) + \Big( \frac{\partial_{\perp i}}{\partial^+} \psi_+^\dagger \Big) A_{\perp j} \gamma^i \gamma^j \psi_+ +2 \psi_+^\dagger T^a \psi_+ \Big( \frac{\partial^i}{\partial^+} A^{ia}_\perp \Big) \bigg] \,, \nonumber \end{align} where we have neglected the terms proportional to the quark mass $m$. The $1\to2$ splitting and its inverse with three gluons involved start to occur at the order $\mathcal{O}(g)$. In other words, the $1\to2$ splitting with quarks involved is suppressed by one power in $\frac{1}{\partial^+}$ with respect to that with only gluons involved and thus suppressed in the high energy limit. Collecting relevant terms shown in Appendix~\ref{app:split}, we find the splitting Hamiltonian with three gluons involved can be written as \begin{align} H_{g,\,{\rm split}} &= gf^{abc} \int\diff x^- \diff x^2_\perp \bigg[ \big( \partial^+ A_\perp^{ia} \big) \Big( \frac{\partial^j}{\partial^+} A_\perp^{jb} \Big) A_{\perp i}^{c} - \big( \partial^i A_\perp^{ja} \big) A_{\perp i}^b A_{\perp j}^c \bigg] \,. \end{align} The matrix elements of the $1\to2$ splitting for a quark or a gluon are given by \begin{align} &\big\langle q, k_2^+, k_{2\perp}, i_2, \sigma_2 ; g, q^+, q_\perp, a, \lambda \big| H_{q,\,{\rm split}} \big| q, k_1^+, k_{1\perp}, i_1, \sigma_1 \big\rangle \\[4pt] &\quad = -\frac{g}{\sqrt{2(2\pi)^3q^+k_1^+k_2^+}}\delta(k_1^+ - k_2^+ - q^+) \delta^2(k_{1\perp} - k_{2\perp} - q_\perp)\nonumber \\ &\qquad \times \bar{u}(k_2,\sigma_2) \bigg( \epsilon_\perp^i \gamma^i\gamma^j \frac{k_{1\perp}^j}{k_1^+} T^a_{i_2i_1} + \frac{k_{2\perp}^i}{k_2^+}\gamma^i\gamma^j \epsilon_\perp^j T^a_{i_2i_1} + 2T^a_{i_2i_1} \frac{q_\perp^i}{q^+} \epsilon_\perp^i \bigg) u(k_1,\sigma_1) \,, \nonumber\\ &\big\langle g, -k_2^+, -k_{2\perp}, a_2, \lambda_2 ; g, -k_3^+, -k_{3\perp}, a_3, \lambda_3 \big| H_{g,\,{\rm split}} \big| g, k_1^+, k_{1\perp}, a_1, \lambda_1 \big\rangle \nonumber \\[4pt] & \quad = -\frac{ig}{\sqrt{2(2\pi)^3k_1^+k_2^+k_3^+}} f^{abc} \delta(k_1^+ + k_2^+ + k_3^+) \delta^2(k_{1\perp} + k_{2\perp} + k_{3\perp})\nonumber \\ &\qquad \bigg( k_1^+\epsilon_\perp^i(\lambda_1) \Big[ \frac{k_{2\perp}^j }{k_2^+} \epsilon_\perp^j(\lambda_2) \epsilon_{\perp i}(\lambda_3) - \frac{k_{3\perp}^j }{k_3^+} \epsilon_\perp^j(\lambda_3) \epsilon_{\perp i}(\lambda_2) \Big] + k_2^+\epsilon_\perp^i(\lambda_2) \Big[ \frac{k_{3\perp}^j }{k_3^+} \epsilon_\perp^j(\lambda_3) \epsilon_{\perp i}(\lambda_1) \nonumber\\ &\qquad - \frac{k_{1\perp}^j }{k_1^+} \epsilon_\perp^j(\lambda_1) \epsilon_{\perp i}(\lambda_3) \Big] + k_3^+\epsilon_\perp^i(\lambda_3) \Big[ \frac{k_{1\perp}^j }{k_1^+} \epsilon_\perp^j(\lambda_1) \epsilon_{\perp i}(\lambda_2) - \frac{k_{2\perp}^j }{k_2^+} \epsilon_\perp^j(\lambda_2) \epsilon_{\perp i}(\lambda_1) \Big] \nonumber\\ &\qquad - k_{1\perp}^i \epsilon_\perp^j(\lambda_1) \Big[ \epsilon_{\perp i}(\lambda_2) \epsilon_{\perp j}(\lambda_3) - \epsilon_{\perp i}(\lambda_3) \epsilon_{\perp j}(\lambda_2)\Big] - k_{2\perp}^i \epsilon_\perp^j(\lambda_2) \Big[ \epsilon_{\perp i}(\lambda_3) \epsilon_{\perp j}(\lambda_1) \nonumber\\ & \qquad - \epsilon_{\perp i}(\lambda_1) \epsilon_{\perp j}(\lambda_3) \Big] - k_{3\perp}^i \epsilon_\perp^j(\lambda_3) \Big[ \epsilon_{\perp i}(\lambda_1) \epsilon_{\perp j}(\lambda_2) - \epsilon_{\perp i}(\lambda_2) \epsilon_{\perp j}(\lambda_1)\Big] \bigg) \,,\nonumber \end{align} where we used negative momenta to label the outgoing states in the splitting involving three gluons, which allows us to easily keep track of the signs. Physical states should have positive $+$ components of the momenta and the matrix elements of the splitting Hamiltonian for physical outgoing states can be easily obtained by flipping the signs of the momenta for the outgoing particles. The matrix elements of the splitting Hamiltonian can be easily generalized for cases with $n$ initial partons, which describe $n\to n+1$ splitting processes: \begin{align} & \big\langle 1'2'3'\cdots n'(n'+1)\big| H_{\rm split} \big| 123\cdots n \big\rangle \\ & \quad = \sum_{i=1}^n \big\langle i' (n'+1) \big| H_{\rm split} \big| i \big\rangle \big\langle 1'2'3'\cdots (i'-1)(i'+1)\cdots n' \big| 123\cdots (i-1)(i+1)\cdots n \big\rangle \nonumber\\ & \quad = \sum_{i=1}^n \big\langle i'(n'+1) \big| H_{\rm split} \big| i \big\rangle \delta_{1'1}\delta_{2'2}\cdots \delta_{(i'-1)(i-1)}\delta_{(i'+1)(i+1)}\cdots \delta_{n'n} \,, \nonumber \end{align} where terms of the form $\langle i'(n'+1)|H_{\rm split} | j \rangle$ ($i\neq j$) do not contribute. They are properly accounted for by the (anti)symmetric property of a quantum state. As can be seen, the matrix for the splitting Hamiltonian is also sparse. The matrix representing the splitting Hamiltonian is not Hermitian. Its Hermitian conjugate gives the matrix for the inverse process, which describes parton recombination. It is essential to include parton recombination to reproduce the virtual correction diagrams in the usual Feynman diagram approach to study the LPM effect. \subsection{Sampling Classical Background Field} \label{sect:sample} The diffusion part of the Hamiltonian is light-cone time dependent and the dependence is through the random classical background field $\bar{A}^{-a}$, which satisfies the correlation~\eqref{eqn:AAmixed}. To generate the matrix elements of the diffusion Hamiltonian, we need to generate the random classical background fields at each time step in the Trotterization, which can be done by sampling random variables according to the correlation. In the discretized version, the correlation can be written as \begin{eqnarray} \big\langle \bar{A}^{-a}(x^+, k_\perp) \bar{A}^{-b}(y^+, -k_\perp) \big\rangle = \delta^{ab} \delta_{x^+y^+} \gamma({\boldsymbol k}_\perp) \,, \end{eqnarray} where $\delta_{x^+y^+}$ is a Kronecker delta function for the discretized light-cone time. The delta function in time means the classical background fields at different times are independent, and thus can be sampled independently. At a given time $x^+$, the correlation that governs the distribution of the background field is written as \begin{eqnarray} \label{eqn:AA_sametime} \big\langle \bar{A}^{-a}(x^+, k_\perp) \bar{A}^{-a}(x^+, -k_\perp) \big\rangle = \gamma({\boldsymbol k}_\perp) \,, \end{eqnarray} which almost corresponds to the width of a Gaussian distribution for the random variable $\bar{A}^{-a}(x^+, k_\perp)$. The obstacle is in the sign difference between the $k_\perp$ arguments of the two random fields. In other words, $\bar{A}^{-a}(x^+, k_\perp)$ and $\bar{A}^{-a}(x^+, -k_\perp)$ are two different random variables for $k_\perp\neq0$. To overcome this obstacle, we apply the following method: First, when $k_\perp=0$, $\bar{A}^{-a}(x^+, 0_\perp)$ can be generated by sampling a Gaussian random variable with the variance (note that we assume the QGP is overall color neutral $\langle \bar{A}^{-a} \rangle=0$) \begin{eqnarray} \big\langle \bar{A}^{-a}(x^+, 0_\perp) \bar{A}^{-a}(x^+, 0_\perp) \big\rangle = \gamma(0_\perp) \,. \end{eqnarray} Next for $k_\perp\neq0$, by using Eq.~\eqref{eqn:AA_sametime} we can show \begin{align} \Big\langle \big[\bar{A}^{-a}(x^+, k_\perp)+\bar{A}^{-a}(x^+, -k_\perp)\big] \big[\bar{A}^{-a}(x^+, k_\perp)+\bar{A}^{-a}(x^+, -k_\perp) \big] \Big\rangle = 2 \gamma({\boldsymbol k}_\perp) \,,\\ \Big\langle \big[i\bar{A}^{-a}(x^+, k_\perp) -i \bar{A}^{-a}(x^+, -k_\perp)\big] \big[i \bar{A}^{-a}(x^+, k_\perp) -i \bar{A}^{-a}(x^+, -k_\perp) \big] \Big\rangle = 2 \gamma({\boldsymbol k}_\perp) \,, \nonumber \end{align} which means both $\bar{A}^{-a}(x^+, k_\perp)+\bar{A}^{-a}(x^+, -k_\perp)$ and $i\bar{A}^{-a}(x^+, k_\perp) -i \bar{A}^{-a}(x^+, -k_\perp)$ are Gaussian random variables with the variance $2\gamma({\boldsymbol k}_\perp)$. We can then independently sample two Gaussian random variables $X_1$ and $X_2$ from a Gaussian distribution with the variance $2\gamma({\boldsymbol k}_\perp)$ and finally obtain $(X_1-iX_2)/2$ as the sampled classical background field. This method requires $\mathcal{O}(tV_k)$ classical samplings to generate the random background fields for the construction of the quantum circuits describing the diffusion Hamiltonian evolution, where $V_k$ denotes the volume of the momentum space, i.e., the number of lattice grids $V_k = N^+N_\perp^2$. The quantum simulation with a given set of classical background fields corresponds to one particular trajectory for an initial state. In practice, one needs to repeat the classical sampling and the simulation of the diffusion process for multiple trajectories. Physical results are obtained by averaging over multiple trajectories. An interesting question is whether one can simulate the diffusion Hamiltonian evolution more efficiently by using some random quantum circuit~\cite{Alexandru:2019dmv} or modifying the Quantum Signal Processing algorithm~\cite{low2017optimal,martyn2021efficient}. This is left for future studies. \section{Quantum Simulation of Toy Model} \label{sect:toy} In this section we consider a simple toy model and demonstrate how to construct the quantum gates to describe the time evolution driven by the three pieces of the Hamiltonian, in order to study the LPM effect in jet quenching. We will also discuss how to generalize the construction for more complicated cases such as QCD. Then we will show some simulation results of the toy model that are obtained from the IBM Qiskit simulator. \subsection{Toy Model} The toy model we consider here is described by scalar fields in $2+1$ dimension with only $1\to2$ splitting and its inverse. In other words, we neglect the color, spin and $q/g$ degrees of freedom discussed in the previous sections and focus on the case with only one transverse direction. With a limited number of qubits, we discretize the $+$ and $\perp$ components of the momenta as \begin{align} k^+ \in K^+_{\rm max} \{ 0.5, 1\}\,,\qquad k_\perp \in K^\perp_{\rm max} \{ 0, 1\} \,, \end{align} where $k_\perp$ has only one component, rather than $x$ and $y$ components as in the previous sections. With more qubits available, one would add the second transverse component and further divide the momentum components into finer levels and eventually take the continuum limit. We will study the LPM effect in the case with one initial particle and only one splitting, which means the Hilbert space consists of $1$-particle and $2$-particle states. According to our discussion in Section~\ref{sect:hilbert}, totally five qubits are needed to encode all quantum systems in this case. For each particle, we need one qubit to encode the transverse momentum and another for the $+$ component of the momentum. The correspondence between the qubit representation and the momentum state of a particle is given by \begin{align} \label{eqn:qubit_for_k} |00\rangle : & \quad k^+ = 0.5\,,\ k_\perp = 0\,,\\ |01\rangle : & \quad k^+ = 0.5\,,\ k_\perp = 1\,, \nonumber\\ |10\rangle : & \quad k^+ = 1\,,\ k_\perp = 0\,, \nonumber\\ |11\rangle : & \quad k^+ = 1\,,\ k_\perp = 1\,, \nonumber \end{align} where we have labeled the momenta by fractions of the maximum values. To encode both $1$-particle and $2$-particle states, we first need one qubit to distinguish them. Then we need another four qubits to represent the $2$-particle states (representing the $1$-particle states only requires two qubits). We list the values of the five qubits from left to right to describe a quantum state as $|q_1q_2q_3q_4q_5\rangle$. We use the following rules when encoding the states: \begin{align} \label{eqn:state_qbit_repre} | \underbrace{q_1}_\text{separate $1$- and $2$-particle states} \overbrace{q_2 q_3}^\text{describe momenta of the 2nd particle} \underbrace{q_4 q_5}_\text{describe momenta of the 1st particle} \rangle \,, \end{align} where the momentum state of a particle is represented as in Eq.~\eqref{eqn:qubit_for_k}. In this way, the $1$-particle state is represented as \begin{align} \label{eqn:1parton_qubit} |000q_4q_5\rangle \,, \end{align} where the second and the third $0$s from the left have no physical meaning since this is a $1$-particle state. On the other hand, the $2$-particle state is labeled as \begin{align} \label{eqn:2parton_qubit} |1q_2q_3q_4q_5\rangle \,. \end{align} The setup can be easily generalized for multiple particles and cases requiring more qubits to represent $1$-particle states such as those having more levels in the momentum description and degrees of freedom in color and spin: We will assign a certain number of qubits to label the number of particles in the state; Then for each particle, we will use a fixed number of qubits to represent its particle species, discretized momenta, color and spin degrees of freedom, as demonstrated in Eq.~\eqref{eqn:state_qbit_repre}. This setup may not be the most efficient encoding scheme and other schemes should also be explored in the future. \subsection{Construction of Quantum Circuit} In general, when we have a matrix $(H_{ij})$ representing a given Hamiltonian $H$, we can construct the corresponding quantum gates by first projecting the matrix onto the basis made up of tensor products of Pauli matrices: \begin{align} H = \sum_{\mu_1,\mu_2,\cdots \mu_n} a_{\mu_1\mu_2\cdots \mu_n} \sigma_1^{\mu_1} \otimes \sigma_2^{\mu_2} \otimes \cdots \otimes \sigma_n^{\mu_n}\,, \end{align} where we have assumed the matrix can be encoded by $n$ qubits. Here $\sigma_i^{\mu_i}$ indicates the Pauli matrices for the $i$-th qubit and $\sigma^\mu = (\mathbb{1}, \sigma^x, \sigma^y, \sigma^z)$. The linear combination coefficients can be obtained by \begin{align} a_{\mu_1\mu_2\cdots \mu_n} = \frac{1}{2^n}{\rm Tr}\Big[ H \big( \sigma_1^{\mu_1} \otimes \sigma_2^{\mu_2} \otimes \cdots \otimes \sigma_n^{\mu_n} \big) \Big] \,, \end{align} where we have a matrix multiplication between $H$ and $\sigma_1^{\mu_1} \otimes \sigma_2^{\mu_2} \otimes \cdots \otimes \sigma_n^{\mu_n}$ inside the trace. After obtaining the linear combination coefficients $a_{\mu_1\mu_2\cdots \mu_n}$, we can construct the quantum gates for the time evolution $e^{-i\Delta t H}$. Using the Trotterization method, we can write \begin{align} e^{-i\Delta t H} = e^{\mathcal{O}((\Delta t)^2)}\prod_{\mu_1,\mu_2,\cdots \mu_n} e^{ -i \Delta t\, a_{\mu_1\mu_2\cdots \mu_n} \sigma_1^{\mu_1} \otimes \sigma_2^{\mu_2} \otimes \cdots \otimes \sigma_n^{\mu_n} } \,. \end{align} Therefore, once we know how to construct the quantum gates for the time evolution determined by one of the tensor products of Pauli matrices, we can construct the full time evolution determined by $H$. Without loss of generality, we discuss how to construct the quantum gates for \begin{eqnarray} e^{-i\theta\,\sigma_1^{\mu_1} \otimes \sigma_2^{\mu_2} \otimes \cdots \otimes \sigma_n^{\mu_n}} \,. \end{eqnarray} The strategy is to change the basis of each single qubit such that all the Pauli matrices $\sigma_i^{\mu_i}$ become either $\mathbb{1}_i$ or $\sigma_i^z$. If the original Pauli matrix $\sigma_i^{\mu_i}=\mathbb{1}_i$ or $\sigma_i^z$, nothing needs to be done for the $i$-th qubit. If the original Pauli matrix $\sigma_i^{\mu_i}$ is $\sigma_i^x$, then we apply the Hadamard gate \begin{eqnarray} h = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \,, \end{eqnarray} in the beginning and apply its inverse (which turns out to be itself) in the end of the circuit segment such that \begin{eqnarray} h_i\, e^{-i\theta \sigma_i^x} h_i = e^{-i\theta \sigma_i^z} \,, \end{eqnarray} where the subscript $i$ indicates the Hadamard gate acts on the $i$-th qubit. Similarly, if the original Pauli matrix is $\sigma_i^{\mu_i}=\sigma_i^y$, we apply \begin{eqnarray} R_x = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -i \\ -i & 1 \end{pmatrix}\,, \end{eqnarray} and its inverse in the beginning and the end of the circuit segment respectively such that \begin{eqnarray} \label{eqn:ytoz} (R_x)_i\, e^{-i\theta \sigma_i^y} (R_x^\dagger)_i = e^{-i\theta \sigma_i^z} \,, \end{eqnarray} where the subscript $i$ indicates the $R_x$ rotation gate acts on the $i$-th qubit. The $R_x$ rotation gate can be decomposed as \begin{eqnarray} R_x = S^\dagger h\, S^\dagger \,, \qquad S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}\,, \end{eqnarray} which can be useful in the construction of the quantum circuit. In a nutshell, we only need to focus on constructing quantum gates for \begin{eqnarray} e^{-i\theta \sigma_1^z \otimes \cdots \otimes \sigma_m^z} \,, \end{eqnarray} where we have omitted the identity matrices and relabeled the indexes in the subscripts. Standard circuits exist to realize such unitary transformations. For example, the quantum circuit for $e^{-i\theta \sigma_1^z \otimes \sigma_2^z \otimes \sigma_3^z }$ is shown in Fig.~\ref{fig:tensorZ}, which can be easily generalized for more $\sigma^z$s. \begin{figure}[t] \centering \includegraphics[width=0.7\textwidth]{tensorZ.pdf} \caption{Quantum circuit for the unitary evolution $e^{-i\theta \sigma_1^z \otimes \sigma_2^z \otimes \sigma_3^z }$. Every two-qubit gate in the circuit is a CNOT gate with the black dot indicating the control qubit. The argument of the $z$-rotation represents the index of the qubit on which the rotation acts. The $z$-rotation gate is given by $R_z = e^{-i\theta\sigma_z} = {\rm diag}(e^{-i\theta}, e^{+i\theta})$.} \label{fig:tensorZ} \end{figure} Now we are ready to construct the quantum circuit for the time evolution of the toy model. We will show the quantum gates for the kinetic, diffusion and splitting terms in the Hamiltonian. \subsubsection{Kinetic Term} The kinetic term is diagonal in the $n$-particle basis we haven chosen, which means the decomposition of the kinetic Hamiltonian into tensor products of Pauli matrices only involves $\mathbb{1}_i$ and $\sigma_i^z$. We first construct the quantum circuit representing the $1$-particle kinetic term, which only involves two qubits and will serve as a building block for the quantum circuit of the full kinetic term. In the basis given by Eq.~\eqref{eqn:qubit_for_k}, which is listed in the order $|00\rangle,|01\rangle,|10\rangle,|11\rangle$, the kinetic term is given by \begin{eqnarray} H_{\rm kin}^{(1)} = \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+}{\rm diag}\big( 0,\, 2,\, 0,\, 1\big) \,. \end{eqnarray} We decompose it into the format \begin{eqnarray} \label{eqn:Hkin1_qubit} H_{\rm kin}^{(1)} = a_{11}\, \mathbb{1}_1 \otimes \mathbb{1}_2 + a_{1z}\, \mathbb{1}_1 \otimes \sigma_2^z + a_{z1}\, \sigma_1^z \otimes \mathbb{1}_2 + a_{zz} \, \sigma_1^z \otimes \sigma_2^z \,. \end{eqnarray} The linear combination coefficients can be easily found to be \begin{align} a_{11} = \frac{3}{4} \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \,, \quad a_{1z} = -\frac{3}{4} \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \,, \quad a_{z1} = \frac{1}{4} \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \,, \quad a_{zz} = -\frac{1}{4} \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \,. \end{align} Our basis for the toy model consists of five qubits and contains both $1$-particle and $2$-particle states. We now discuss how to embed the decomposition~\eqref{eqn:Hkin1_qubit} into the five qubit system. First, the $1$-particle states in the five-qubit system have the first three qubits set to $0$s, as shown in Eq.~\eqref{eqn:1parton_qubit}. So the $1$-particle part of the kinetic Hamiltonian is represented as \begin{align} H_{\rm kin}^{(1)} = \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \,& \frac{\mathbb{1}_1+\sigma^z_1}{2} \otimes \frac{\mathbb{1}_2+\sigma^z_2}{2} \otimes \frac{\mathbb{1}_3+\sigma^z_3}{2} \\ & \quad \otimes \Big( \frac{3}{4} \mathbb{1}_4 \otimes \mathbb{1}_5 -\frac{3}{4} \mathbb{1}_4 \otimes \sigma_5^z +\frac{1}{4} \sigma_4^z \otimes \mathbb{1}_5 -\frac{1}{4} \sigma_4^z \otimes \sigma_5^z \Big) \,,\nonumber \end{align} where we abused the notation to use $H_{\rm kin}^{(1)}$ again for the $1$-particle states in the five-qubit system, which should be distinguished from that in Eq.~\eqref{eqn:Hkin1_qubit} for the two-qubit system. The first three $\mathbb{1}_i+\sigma^z_i$ terms assure that $H_{\rm kin}^{(1)}$ is nonvanishing only when the first three qubits are all $0$s. In practice, when the first qubit is set to $0$, i.e., the state is a $1$-particle state, the second and third qubits will also be set to $0$s. In other words, there is some redundancy in the five-qubit description of the $1$-particle state. We can remove the redundancy in the qubit representation of the $1$-particle kinetic Hamiltonian by using \begin{align} H_{\rm kin}^{(1)} = \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \, \frac{\mathbb{1}_1+\sigma^z_1}{2} \otimes \Big( \frac{3}{4} \mathbb{1}_4 \otimes \mathbb{1}_5 -\frac{3}{4} \mathbb{1}_4 \otimes \sigma_5^z +\frac{1}{4} \sigma_4^z \otimes \mathbb{1}_5 -\frac{1}{4} \sigma_4^z \otimes \sigma_5^z \Big) \,, \end{align} which leads to a much simpler quantum circuit. Next, we discuss the kinetic term for the $2$-particle states in the five-qubit system. As Eq.~\eqref{eqn:2parton_qubit} shows, the $2$-particle states have the first qubit set to $1$. So its kinetic Hamiltonian can be decomposed as \begin{align} H_{\rm kin}^{(2)} = \frac{(K_{\rm max}^\perp)^2}{K_{\rm max}^+} \, & \frac{\mathbb{1}_1-\sigma^z_1}{2} \otimes \Big( \frac{3}{4} \mathbb{1}_2 \otimes \mathbb{1}_3 -\frac{3}{4} \mathbb{1}_2 \otimes \sigma_3^z +\frac{1}{4} \sigma_2^z \otimes \mathbb{1}_3 -\frac{1}{4} \sigma_2^z \otimes \sigma_3^z \Big) \\ & \quad \otimes \Big( \frac{3}{4} \mathbb{1}_4 \otimes \mathbb{1}_5 -\frac{3}{4} \mathbb{1}_4 \otimes \sigma_5^z +\frac{1}{4} \sigma_4^z \otimes \mathbb{1}_5 -\frac{1}{4} \sigma_4^z \otimes \sigma_5^z \Big) \,,\nonumber \end{align} where the $\mathbb{1}_1-\sigma^z_1$ term guarantees $H_{\rm kin}^{(2)}$ is nonzero only when the first qubit is $1$, i.e., the state is a $2$-particle state. The total kinetic Hamiltonian for the toy model is given by the sum $H_{\rm kin} = H_{\rm kin}^{(1)}+H_{\rm kin}^{(2)}$. The quantum circuit to simulate the time evolution driven by the kinetic term can be constructed by using the method explained above. The identity operator $\mathbb{1}_1\otimes \mathbb{1}_2\otimes \mathbb{1}_3\otimes \mathbb{1}_4\otimes \mathbb{1}_5$ in the Hamiltonian only induces a global phase shift with no physical effect and thus can be neglected. Omitting identity operators and reorganizing lead to \begin{align} \label{eqn:Hkin_5q} H_{\rm kin} & = \frac{(K_{\rm max}^\perp)^2}{32K_{\rm max}^+} \Big( - \sigma_1^z \otimes \sigma_2^z \otimes \sigma_3^z \otimes \sigma_4^z \otimes \sigma_5^z + \sigma_1^z \otimes \sigma_2^z \otimes \sigma_3^z \otimes \sigma_4^z - 3 \sigma_1^z \otimes \sigma_2^z \otimes \sigma_3^z \otimes \sigma_5^z \nonumber\\ & \quad + 3 \sigma_1^z \otimes \sigma_2^z \otimes \sigma_3^z + \sigma_1^z \otimes \sigma_2^z \otimes \sigma_4^z \otimes \sigma_5^z - \sigma_1^z \otimes \sigma_2^z \otimes \sigma_4^z + 3\sigma_1^z \otimes \sigma_2^z \otimes \sigma_5^z - 3 \sigma_1^z \otimes \sigma_2^z \nonumber\\ & \quad - 3 \sigma_1^z \otimes \sigma_3^z \otimes \sigma_4^z \otimes \sigma_5^z + 3 \sigma_1^z \otimes \sigma_3^z \otimes \sigma_4^z - 9 \sigma_1^z \otimes \sigma_3^z \otimes \sigma_5^z + 9 \sigma_1^z \otimes \sigma_3^z - \sigma_1^z \otimes \sigma_4^z \otimes \sigma_5^z \nonumber\\ &\quad + \sigma_1^z \otimes \sigma_4^z - 3 \sigma_1^z \otimes \sigma_5^z + 3 \sigma_1^z + \sigma_2^z \otimes \sigma_3^z \otimes \sigma_4^z \otimes \sigma_5^z - \sigma_2^z \otimes \sigma_3^z \otimes \sigma_4^z + 3 \sigma_2^z \otimes \sigma_3^z \otimes \sigma_5^z \nonumber\\ & \quad - 3 \sigma_2^z \otimes \sigma_3^z - \sigma_2^z \otimes \sigma_4^z \otimes \sigma_5^z + \sigma_2^z \otimes \sigma_4^z - 3\sigma_2^z \otimes \sigma_5^z + 3\sigma_2^z + 3 \sigma_3^z \otimes \sigma_4^z \otimes \sigma_5^z - 3 \sigma_3^z \otimes \sigma_4^z \nonumber\\ & \quad + 9 \sigma_3^z \otimes \sigma_5^z - 9 \sigma_3^z - 7 \sigma_4^z \otimes \sigma_5^z + 7 \sigma_4^z - 21 \sigma_5^z \Big) \,, \end{align} in which every term commutes with each other. The quantum circuit for the time evolution determined by the kinetic term $e^{-i\Delta t H_{\rm kin}}$ is shown in Fig.~\ref{fig:kin}. \begin{figure}[t] \centering \includegraphics[width=1.0\textwidth]{kinetic1.pdf} \includegraphics[width=1.0\textwidth]{kinetic2.pdf} \includegraphics[width=1.0\textwidth]{kinetic3.pdf} \caption{Quantum circuit for the time evolution determined by the kinetic part of the Hamiltonian. Every two-qubit gate in the circuit is a CNOT gate with the black dot indicating the control qubit. The argument of the $z$-rotation represents the index of the qubit on which the rotation acts. The $z$-rotation gate is given by $R_z = e^{-iC\Delta t \, \sigma_z (K_{\rm max}^\perp)^2/(32K_{\rm max}^+)}$ with the constants $C$ given in Eq.~\eqref{eqn:Hkin_5q}.} \label{fig:kin} \end{figure} \subsubsection{Diffusion} The diffusion part of the Hamiltonian depends an external classical background field, which is needed for the construction. Here we just assume the classical background fields at each momentum grid have been generated by using the sampling method described in Section~\ref{sect:sample} for each time step in the time evolution. For notational consistency, we still use $\bar{A}^-$ to label the classical background fields here, even though our toy model has no gauge fields. Since our toy model has only two levels in the transverse momentum, we only need the classical background fields $\bar{A}^-$ at two values of the transverse momenta $0$ and $K_{\rm max}^\perp$. When the state is a $1$-particle state, i.e., the first qubit in the register has a value of $0$, the diffusion Hamiltonian only changes the last qubit in the register. This can be represented as \begin{align} H_{\rm diff}^{(1)} = g_d \frac{\mathbb{1}_1+\sigma^z_1}{2} \otimes \Big( \bar{A}^-(0) \mathbb{1}_5 + \bar{A}^-(K_{\rm max}^\perp) \sigma^x_5 \Big) \,, \end{align} where $g_d$ is the coupling strength. When the state is a $2$-particle state, the diffusion can change both the third and the fifth qubits in the register. So we have \begin{align} H_{\rm diff}^{(2)} = g_d \frac{\mathbb{1}_1-\sigma^z_1}{2} \otimes \Big( \bar{A}^-(0) \mathbb{1}_3 \otimes \mathbb{1}_5+ \bar{A}^-(K_{\rm max}^\perp) \sigma^x_3 \otimes \sigma^x_5 \Big) \,. \end{align} The total Hamiltonian describing the transverse momentum diffusion is given by the sum: \begin{align} H_{\rm diff} = g_d \bar{A}^-(K_{\rm max}^\perp) \Big( \frac{\mathbb{1}_1+\sigma^z_1}{2} \otimes \sigma^x_5 + \frac{\mathbb{1}_1-\sigma^z_1}{2} \otimes \sigma^x_3 \otimes \sigma^x_5 \Big) \,, \end{align} where we have neglected the identity operator $g_d\bar{A}^-(0)\mathbb{1}_1\otimes\mathbb{1}_3\otimes\mathbb{1}_5$ which only leads to a global phase shift in the time evolution and contains no physics. Reorganizing leads to \begin{align} H_{\rm diff} = \frac{g_d}{2} \bar{A}^-(K_{\rm max}^\perp) \Big( -\sigma_1^z \otimes \sigma_3^x \otimes \sigma_5^x + \sigma_1^z \otimes \sigma_5^x + \sigma_3^x \otimes \sigma_5^x + \sigma_5^x \Big) \,. \end{align} We want to emphasize again that the diffusion Hamiltonian $H_{\rm diff}$ is time dependent and the dependence is through the classical background field. The quantum circuit for the diffusion time evolution $e^{-i \Delta t H_{\rm diff}}$ is depicted in Fig.~\ref{fig:diff}. For general cases with more particles and more momenta levels, we will first construct the quantum gates describing the transverse momentum diffusion for $1$-particle states, which corresponds to hoppings between different transverse momentum levels. Then we can use the quantum gates for the $1$-particle transverse momentum diffusion as building blocks to construct the gates for the $n$-particle transverse momentum diffusion, as done above for the kinetic term. \begin{figure}[t] \centering \includegraphics[width=0.95\textwidth]{diffusion.pdf} \caption{Quantum circuit for the time evolution driven by the diffusion part of the Hamiltonian. Every two-qubit gate in the circuit is a CNOT gate with the black dot indicating the control qubit. The argument of the $z$-rotation represents the index of the qubit on which the rotation acts. The $z$-rotation gate is given by $R_z = e^{\pm ig_d \bar{A}^-(K_{\rm max}^\perp)\Delta t \, \sigma_z/2} $ and $\bar{A}^-(K_{\rm max}^\perp)$ is the time dependent classical background field.} \label{fig:diff} \end{figure} \subsubsection{Splitting} Finally we discuss the Pauli matrix representation of the splitting part of the Hamiltonian. Due to the momentum conservation in $k^+$ and $k_\perp$, only the following $1\to2$ splitting process can happen in our toy model: \begin{align} \label{eqn:toy_split} |00010\rangle & \to |10000\rangle \\ |00011\rangle & \to |10001\rangle + |10100\rangle \,. \nonumber \end{align} In the first process, the initial particle with $k^+=K_{\rm max}^+$ and $k_\perp=0$ splits into two particles that both have $k^+=0.5K_{\rm max}^+$ and $k_\perp=0$. In the second process, the initial particle with $k^+=K_{\rm max}^+$ and $k_\perp=K_{\rm max}^\perp$ splits into two particles, one with $k^+=0.5K_{\rm max}^+$ and $k_\perp=0$ and the other with $k^+=0.5K_{\rm max}^+$ and $k_\perp=K_{\rm max}^\perp$. The splitting process described in Eq.~\eqref{eqn:toy_split} symmetrizes the final state, up to a normalization. The Pauli matrix representation for the process described in Eq.~\eqref{eqn:toy_split} can be written as \begin{align} H_{\rm split} & = g_s \Big( \sigma_1^x \otimes \frac{\mathbb{1}_2 + \sigma_2^z}{2} \otimes \frac{\mathbb{1}_3 + \sigma_3^z}{2} \otimes \sigma_4^x \otimes \frac{\mathbb{1}_5 + \sigma_5^z}{2} + \sigma_1^x \otimes \frac{\mathbb{1}_2 + \sigma_2^z}{2} \otimes \frac{\mathbb{1}_3 + \sigma_3^z}{2} \\ & \qquad\quad \otimes \sigma_4^x \otimes \frac{\mathbb{1}_5 - \sigma_5^z}{2} + \sigma_1^x \otimes \frac{\mathbb{1}_2 + \sigma_2^z}{2} \otimes \sigma_3^x \otimes \sigma_4^x \otimes \sigma_5^x \Big) \nonumber\\ & = g_s \Big( \sigma_1^x \otimes \frac{\mathbb{1}_2 + \sigma_2^z}{2} \otimes \frac{\mathbb{1}_3 + \sigma_3^z}{2} \otimes \sigma_4^x \otimes \mathbb{1}_5 + \sigma_1^x \otimes \frac{\mathbb{1}_2 + \sigma_2^z}{2} \otimes \sigma_3^x \otimes \sigma_4^x \otimes \sigma_5^x \Big) \,,\nonumber \end{align} where the coupling strength $g_s$ can in general depend on $k^+$ and $k_\perp$, as in the QCD case discussed in Section~\ref{sect:split}. The matrix of the splitting Hamiltonian is Hermitian, which means parton recombination has been accounted for. The splitting Hamiltonian can be decomposed into two non-commuting Hamiltonians $H_{\rm split} = H_{{\rm split}1} + H_{{\rm split}2}$: \begin{align} H_{{\rm split}1} & = \frac{g_s}{4}\Big( \sigma_1^x \otimes \sigma_2^z \otimes \sigma_3^z \otimes \sigma_4^x + \sigma_1^x \otimes \sigma_2^z \otimes \sigma_4^x + \sigma_1^x \otimes \sigma_3^z \otimes \sigma_4^x + \sigma_1^x \otimes \sigma_4^x \Big) \\[4pt] H_{{\rm split}2} & = \frac{g_s}{2}\Big( \sigma_1^x \otimes \sigma_2^z \otimes \sigma_3^x \otimes \sigma_4^x \otimes \sigma_5^x + \sigma_1^x \otimes \sigma_3^x \otimes \sigma_4^x \otimes \sigma_5^x \Big) \,. \end{align} The quantum circuits for the time evolution determined by the two splitting parts of the Hamiltonian, i.e., $e^{-i\Delta t H_{{\rm split}1}}$ and $e^{-i\Delta t H_{{\rm split}2}}$ are given in Fig.~\ref{fig:split}. \begin{figure}[t] \begin{subfigure}[t]{1.0\textwidth} \includegraphics[width=1.0\textwidth]{split1.pdf} \caption{For $H_{{\rm split}1}$ with $R_z=e^{-ig_s\Delta t\sigma_z/4}$.} \end{subfigure}% \begin{subfigure}[t]{1.0\textwidth} \includegraphics[width=0.9\textwidth]{split2.pdf} \caption{For $H_{{\rm split}2}$ with $R_z=e^{-ig_s\Delta t\sigma_z/2}$.} \end{subfigure}% \caption{Quantum circuits for the time evolution driven by the two splitting parts of the Hamiltonian. Every two-qubit gate in the circuit is a CNOT gate with the black dot indicating the control qubit. The argument of the $z$-rotation represents the index of the qubit on which the rotation acts.} \label{fig:split} \end{figure} This completes our construction of the quantum gates to describe the time evolution of the toy model. \subsection{Simulation Results} Using the quantum circuits constructed above, we can now simulate the LPM effect in the toy model. We will perform the quantum simulation by using the Qiskit simulator package provided by IBM. We will initialize the state as the $1$-particle state with $k^+=K_{\rm max}^+$ and $k_\perp=0$, which is represented as $|00010\rangle$ in the quantum register. Since the quantum circuit constructed by the Qiskit package of IBM always initializes all the qubits to be in the $0$ states, we still need to apply the $\sigma_4^x$ gate to obtain the initial state we want. After the state initialization, we evolve the state in time by using the quantum circuits constructed. In the end of the time evolution, we measure the first qubit. The result ``$0$'' in the measurement corresponds to a $1$-particle state while the result ``$1$'' corresponds to a $2$-particle state. The simulation and the measurement need repeating multiple times. Each repeating is called a shot. The parameters are chosen as follows for the results we are going to show: $K_{\rm max}^+=10$, $K_{\rm max}^\perp=1$, $g_d = 0.3$ and $g_s = 0.1$. The time evolution starts at $t=0$ and ends at $t=9$. We divide the time length to $N_t=10$ steps for the Trotterization method. To study the LPM effect in the medium, we will compare the total radiation probability in vacuum with that in the medium. In the former case, the dynamics is described by the kinetic and splitting terms of the Hamiltonian $H_{\rm kin}+H_{\rm split}$, while in the latter, all three parts of the Hamiltonian $H_{\rm kin}+H_{\rm diff}+H_{\rm split}$ are used in the description of the time evolution. For the in-medium simulation, we also need to average the results over multiple trajectories. For each trajectory, the classical background fields need regenerating. At each time step of a trajectory, we sample the classical background field $\bar{A}^-(K_{\rm max}^+)$ by assuming it is described by a Gaussian distribution. The mean and the standard deviation of the Gaussian distribution are assumed to be $0$ and $3$ respectively. The quantum simulation results of the total radiation probabilities are shown in Fig.~\ref{fig:results} for the vacuum and medium cases, where the result ``$0$'' indicates that no radiation happens and the final state is still a $1$-particle state while ``$1$'' represents that the $1\to2$ splitting occurs and the final state contains two particles. The vacuum result is obtained from $32768$ shots while the medium result is obtained from averaging $500$ trajectories. The result for each trajectory is estimated from $32768$ shots and every shot uses the same set of classical background fields sampled for the trajectory. It can be seen that once we turn on the diffusion Hamiltonian which originates from the transverse momentum exchange between partons and the medium, the radiation probability is suppressed. In other words, the LPM effect in radiation is observed in the quantum simulation of our toy model. \begin{figure}[t] \begin{subfigure}[t!]{0.5\textwidth} \centering \includegraphics[width=1.0\textwidth]{vac_counts.pdf} \caption{Vacuum case.} \end{subfigure}% ~ \begin{subfigure}[t!]{0.5\textwidth} \centering \includegraphics[width=1.0\textwidth]{med_counts.pdf} \caption{Medium case.} \end{subfigure}% \caption{Quantum simulation results of the total radiation probabilities for the vacuum (left) and medium (right) cases. The measurement result ``$0$'' corresponds to no radiation while ``$1$'' indicates the occurrence of $1\to2$ splitting. The total radiation probability is suppressed in the medium case due to the LPM effect.} \label{fig:results} \end{figure} \section{Conclusions} \label{sect:conclusion} In this paper, we developed a framework to perform quantum simulation of jet quenching in nuclear environments. The quantum simulation automatically keeps track of quantum interference that is crucial in the studies of the LPM effect since it simulates the time evolution of a state wavefunction. We used the light-front Hamiltonian of QCD to describe the time evolution of high energy partons in the nuclear medium. The light-front Hamiltonian relevant for jet quenching consists of three pieces: a kinetic term which induces a phase change in the time evolution, a diffusion term caused by transverse momentum (Glauber) exchanges between the high energy partons and the medium, and a splitting term accounting for parton radiation and recombination. We use $n$-particle states in momentum space as the basis of the physical Hilbert space. In this basis, the kinetic Hamiltonian becomes diagonal, which can be efficiently simulated on a quantum computer. Furthermore, the matrices of the diffusion and splitting parts are sparse. Therefore, one may be able to efficiently simulate the LPM effect in jet quenching on a quantum computer. The diffusion term in the Hamiltonian depends on some classical background fields, of which the medium is a source. When constructing a quantum circuit for the Hamiltonian evolution, one needs to sample these classical background fields on a classical computer and then plug their values into the quantum circuit. This classical sampling scales as $\mathcal{O}(t V_k)$ where $t$ is the length of the time evolution and $V_k$ is the volume of the momentum space. Quantum trajectories with different sets of classical background fields in the simulation need to be averaged to give estimates of physical results. Then we applied this framework to study the LPM effect in a toy model, by explicitly constructing a quantum circuit to simulate the time evolution. We observed the LPM effect in the toy model that suppresses the total radiation probability. The framework developed here is general and it can be used to study the LPM effect in jet quenching for various media that are either static or expanding, thin or thick, hot or cold. It can also be applied for cases where the classical background fields satisfy some non-Gaussian correlations. Since the framework automatically keeps track of quantum interference, it can be applied to study the LPM effect with more than two splittings in a dynamically evolving medium, which is beyond the scope of state-of-the-art analyses. This framework of quantum simulation may help to deepen our understanding of jet quenching in nuclear environments in the near future with the advancement of quantum technology that provides more qubits of high fidelity, which is important for studies of jet production in current heavy ion collisions and in the forthcoming Electron-Ion Collider. \acknowledgments XY thanks Krishna Rajagopal and Martin Savage for useful discussions. The work of XY was supported by the U.S. Department of Energy, Office of Science, Office of Nuclear Physics grant DE-SC0011090.
\section{\label{sec:intro}Introduction} Massively multi-channel systems couple numerous incoming states to numerous outgoing ones; for example, disordered media~\cite{Akkermans2007, carminati_schotland_2021} and metasurfaces~\cite{Yu2014_NM, Kamali2018_Nanophotonics} scatter light from one incident angle to a large set of outgoing angles, while photonic circuits~\cite{Bogaerts2020_NATURE, Capmany2020} and multi-mode fibers~\cite{2015_Ploschner_nphoton, Matthes2021_PRX} couple many waveguide modes. These systems exhibit complex properties and form the bedrock of emerging technologies such as non-invasive imaging inside biological tissues~\cite{2009_Arridge_IP, Jin2017_JOptSocAmB,Park2018_NP,Yoon2020_NRP,Badon2020_SA}, ultra-compact lenses~\cite{lalanne2017metalenses, Khorasaninejad2017_Sci} and other optical elements~\cite{Yu2014_NM, Kamali2018_Nanophotonics}, endoscopy~\cite{2012_Choi_PRL, Loterie2015_OE}, high-speed data communication~\cite{2013_Richardson_nphoton, 2013_Bozinovic_Science, 2021_Yang_arXiv}, optical computing~\cite{2017_Shen_nphoton, 2020_Wetzstein_Nature_perspective}, and quantum optics~\cite{2018_Wang_Science,2021_Pelucchi_NRP}. The optical responses of these systems are encapsulated in an $M' \times M$ scattering matrix $\bf{S}$ that relates any source or incident wavefront $v$ (a column vector whose elements are amplitudes of different sources or channels) to the resulting outgoing wavefront $u$ via~\cite{2000_Carminati_PRA,2010_Popoff_PRL,Mosk2012_NP, Rotter2017_RMP,2019_Miller_AOP} \begin{equation} {u_n} = \sum_{m=1}^M {{S_{nm}}{v_m}}. \label{eq:S_eq} \end{equation} The $M$ columns of $\bf{S}$ correspond to $M$ distinct inputs, as illustrated in Fig.~\ref{fig:schematic}a--b. The scattering matrix fully characterizes a multi-channel system, but computing it is hard. Given the possible presence of multiple scattering, strong coupling between elements, and multi-path interference, an accurate description requires full-wave solutions of Maxwell's equations. Furthermore, $M$ such solutions are needed to determine ${\bf S}$, and $M$ often exceeds thousands. Given the computing resources typically available to academic researchers, such computations are often impossible. Therefore, the scattering matrices of disordered media can only be computed for small systems, while metasurfaces and photonic circuits are built from weakly coupled components that are modeled individually. This severely limits what can be explored. Electromagnetic simulations can be solved in frequency domain or time domain. Time-domain simulations~\cite{2005_FDTD_book} are easy to parallelize and low on memory usage but require $M \gg 1$ separate simulations, consuming enormous computing resources. Frequency-domain simulations allow more strategies for handling many inputs. After volume discretization through finite element~\cite{Jin2014} or finite difference~\cite{Shin2013, Rumpf2012_PIER}, Maxwell's equations in frequency domain becomes a system of linear equations ${\bf{A}}x_m=b_m$; matrix ${\bf A}$ is sparse and encodes the system information, the right-hand-side column vector $b_m$ specifies the $m$-th input, and the solution is contained in column vector $x_m$. When solving for $x_m={\bf{A}}^{-1}b_m$ with direct methods, the sparsity can be utilized via graph partitioning, and the resulting LU factors can be reused among different inputs~\cite{Davis2006, Duff2017}. But $M$ forward and backward substitutions are still needed, and the LU factors take up substantial memory. Iterative methods solve for $x_m = {\bf{A}}^{-1}b_m$ by minimizing the residual~\cite{Saad2003}, avoiding the LU factors. One can iterate multiple inputs together~\cite{Puzyrev2015_GJI} or construct preconditioners to be reused among different inputs~\cite{Dolean2015, 2016_Osnabrugge_JCP}, but the iterations still take $\mathcal{O}(M)$ time. \begin{figure*} \includegraphics[width=0.75\textwidth]{fig1.pdf} \caption{\label{fig:schematic} {\bf Scattering matrix and augmented partial factorization (APF).} {{\bf{a}}--{\bf{b}}}, Two scattering problems with inputs from different angles, corresponding to two columns of the scattering matrix ${\bf S}$. {\bf{c}}, Illustration of Eq.~\eqref{eq:S}, which relates {\bf{S}} to the Maxwell operator ${\bf A}$, source profiles ${\bf B}$ that generate the incident waves, projection profiles ${\bf C}$ that extract the outputs of interest, and matrix ${\bf D}$ that subtracts the baseline. {\bf{d}}, The system used for the illustration in {\bf c}, with color coding for different parts of the system. {\bf{e}}, The augmented sparse matrix $\bf{K}$ of Eq.~\eqref{eq:K}, whose partial factorization gives the scattering matrix {\bf{S}}.} \end{figure*} Surface discretization, as in the boundary element method (BEM) commonly discretized through the method of moments (MoM)~\cite{Gibson2021}, reduces the size of matrix ${\bf{A}}$ while losing its sparsity. Doing so is optimal for homogeneous structures with small surface-to-volume ratios, though nanostructured systems typically do not have such properties. Instead of a surface mesh, the superposition $T$-matrix method (STMM)~\cite{Doicu2006} uses vector spherical harmonics as basis functions. The hierarchical structure of the dense matrix ${\bf{A}}$ can be utilized through the fast multipole method~\cite{Engheta1992_TAP, Song1997_TAP, Markkanen2017_JQSRT} within iterative solvers or through methods like the $\mathcal{H}$-matrix~\cite{Hackbusch2015} within direct solvers, but the computing time still scales as $\mathcal{O}(M)$. For geometries with a closed transverse boundary, the recursive Green's function (RGF) method~\cite{Wimmer2009} can obtain the full scattering matrix without looping over the inputs, making it a popular choice for modeling disordered systems~\cite{2015_Hsu_PRL, Yilmax2019_NP}. However, RGF works with dense Green's function matrices, so it scales unfavorably with the system width $W$ as $\mathcal{O}(W^{3(d-1)})$ for computing time and $\mathcal{O}(W^{2(d-1)})$ for memory usage in $d$ dimensions. The rigorous coupled-wave analysis (RCWA)~\cite{1996_Lalanne_JOSAA, 2014_Li_book_chapter} uses eigenmode expansion to utilize the axial translational symmetry within layered structures, which also results in dense matrices and the same scaling. Here we propose a new way to perform multi-source full-wave simulations that is general (applicable to any system with any type of inputs), does not loop over the inputs, does not store large LU factors, and fully utilizes the sparsities of the Maxwell operator, of the input sources, and also of the output projections. These advantages lead to reduced memory usage and many-orders-of-magnitude speed-up compared to existing methods, enabling full-wave simulations of massively multi-channel systems that were impossible in the past. \section{\label{sec:APF}Augmented partial factorization} Regardless of the discretization scheme, a frequency-domain simulation with the $m$-th input reduces to solving for $x_m = {\bf{A}}^{-1}b_m$, so we can write the $M$ simulations collectively as ${\bf X} = {\bf{A}}^{-1}{\bf B}$ where ${\bf{X}} = \left[ {{x_1}, \ldots ,{x_M}} \right]$ and ${\bf{B}} = \left[ {{b_1}, \ldots ,{b_M}} \right]$, with the scattering matrix {\bf{S}} being \begin{equation} {\bf{S}} = {\bf{C}}{{\bf{A}}^{-1}}{\bf{B}} - {\bf{D}}. \label{eq:S} \end{equation} Matrix ${\bf{C}}$ projects the collective solution ${\bf{X}}$ onto the $M'$ outputs of interest ({\it e.g.}, sampling the solution at the locations of interest, a conversion to propagating channels, or a near-to-far-field transformation); it is sparse since only a small part of the solution is used, and it is very fat since the number $M'$ of outputs of interest is generally far less than the number of voxels Maxwell's equations are discretized onto. Matrix ${\bf{D}} = {\bf{C}}{\bf A}_0^{-1}{\bf{B}} - {\bf S}_0$ subtracts the baseline contribution, where ${\bf A}_0$ is the Maxwell operator of a reference system ({\it e.g.}, a homogeneous one) for which the scattering matrix ${\bf S}_0$ is known. Eq.~\eqref{eq:S} has the same mathematical structure as scattering matrices in coupled-mode theory~\cite{2017_Alpeggiani_PRX,2020_Zhang_arXiv}, but it is exact and parameter-free. Time-dependent responses are described by a time-resolved scattering matrix, which is the Fourier transform of the frequency-domain scattering matrix~\cite{2016_Mounaix_PRL,Xiong2019_NC}. \begin{figure*}[t] \includegraphics[width=0.9\textwidth]{fig2.pdf} \caption{\label{fig:disorder} {\bf Benchmarks on a large-scale disordered system.} {\bf{a}}, Permittivity profile of the system considered; $\lambda$ is the wavelength. {\bf{b}}, Computing time versus the number $M$ of input angles using APF and other methods. Open symbols are extrapolated from smaller $M$ or smaller systems. The two ``FDFD direct'' curves correspond to an unmodified version of MaxwellFDFD (blue curve) and one modified to have the LU factors reused for different inputs (black curve). {\bf{c}}, Memory usage of different methods; gray-edged bars are extrapolated from smaller systems. {\bf{d}}, Breakdown of the APF computing time into time used in building matrix ${\bf K}$, analyzing and reordering it, and partially factorizing it. } \end{figure*} Figure~\ref{fig:schematic}c--d illustrates Eq.~\eqref{eq:S} with a concrete example. Consider the transverse-magnetic (TM) waves in 2D for a system periodic in $y$ with relative permittivity $\varepsilon_{\rm r}({\bf r}) = \varepsilon_{\rm r}(x,y)$. The Maxwell operator on the out-of-plane electric field $E_z({\bf r})$ at wavelength $\lambda$ is $ - {\nabla ^2} - \left( 2\pi/\lambda \right)^2{\varepsilon _{\rm{r}}}\left({\bf{r}} \right)$, which becomes matrix ${\bf A}$ when discretized with an outgoing boundary in $x$ direction. Then matrix ${\bf A}^{-1}$ is the retarded Green's function $G({\bf r},{\bf r}')$ of this discretized system $\varepsilon_{\rm r}({\bf r})$. An incident plane wave $e^{i (k_x x+ k_y y)}$ from the left can be generated with a source proportional to $\delta(x)e^{i k_y y}$ on the front surface $x=0$, and incident waves from the right can be similarly generated; the list of sources becomes matrix ${\bf B}$ when discretized. The projection matrix ${\bf{C}}$ is proportional to its conjugate transpose, ${\bf B}^{\dagger}$. In this particular example, matrix ${\bf{D}}$ is diagonal, and Eq.~(\ref{eq:S}) reduces to the discrete form of the Fisher--Lee relation~\cite{1981_Fisher_PRB} (see Supplementary Secs.~1--2 for details). We only show a few pixels and a few angles in Fig.~\ref{fig:schematic}c--d to simplify the schematic; in reality these numbers usually exceed millions and thousands. Instead of looping over the inputs to compute the dense and large solution matrix ${\bf{X}}={\bf{A}}^{-1}{\bf B}$ as is conventionally done, here we directly compute the orders-of-magnitude smaller matrix ${\bf{C}}{{\bf{A}}^{ - 1}}{\bf{B}}$. We evaluate Eq.~\ref{eq:S} by building an augmented sparse matrix {\bf{K}} as illustrated in Fig.~\ref{fig:schematic}e and performing a partial factorization, \begin{equation} {\bf{K}} \equiv \left[ {\begin{array}{*{20}{c}} {\bf{A}}&{\bf{B}}\\ {\bf{C}}&{\bf{D}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\bf{L}}&{\bf{0}}\\ {\bf{E}}&{\bf{I}} \end{array}} \right]\left[ {\begin{array}{*{20}{c}} {\bf{U}}&{\bf{F}}\\ {\bf{0}}&{\bf{H}} \end{array}} \right]. \label{eq:K} \end{equation} The factorization is partial as it stops after factorizing the upper-left block of {\bf K} into ${\bf A}={\bf L}{\bf U}$. Such partial factorization can be computed using established sparse linear-solver packages like MUMPS~\cite{Amestoy2001_SIAM} and PARDISO~\cite{Schenk2004_FGCS}. Notably, we do not use the LU factors, and {\bf L} and {\bf U} here do not even need to be triangular. By equating the middle and the right-hand sides of Eq.~(\ref{eq:K}) for each of the four blocks, we see that matrix {\bf H}, called the Schur complement~\cite{Zhang2005}, satisfies {\bf H} = {\bf D}$-${\bf{C}}{{\bf{A}}$^{ - 1}$}{\bf{B}}. Thus, we obtain the scattering matrix via ${\bf{S}} = -{\bf{H}}$, effectively solving all of the $M$ simulations with a single factorization step. Hereafter, we refer to this approach as ``augmented partial factorization'' (APF). APF is as general as Eq.~(\ref{eq:S}), applicable to any system in the linear regime, in any dimension, under any discretization scheme, with any boundary condition, for any type of inputs generated using any scheme (such as equivalent source for arbitrary incident waves like waveguide modes~\cite{2013_Oskooi_book_chapter}, line sources, and point-dipole sources), and for any type of output projections. As a frequency-domain method, it allows arbitrary material dispersion. It is a full-wave method as precise as the underlying discretization. APF solves the $M$ simulations simultaneously using a single partial factorization, avoiding a slow loop over the inputs or a slow evaluation of the Green's function. The sparsity patterns of ${\bf{A}}$, ${\bf{B}}$, and ${\bf{C}}$ are maintained in ${\bf{K}}$ and can all be utilized during the partial factorization. Matrices {\bf{L}} and {\bf{U}} are not as sparse as ${\bf A}$, so their evaluation is slow, and their storage is the memory bottleneck for typical direct methods. Since APF does not evaluate the unprojected solution ${\bf{X}}$, such LU factors are not needed and can be dropped during the partial factorization. This means that APF is significantly more efficient than conventional direct methods even when only one simulation ($M=1$) is needed. APF is more efficient than computing selected entries of the Green's function ${\bf A}^{-1}$~\cite{2015_Amestoy_JSC}, which does not utilize the structure of Eq.~(\ref{eq:S}). While advanced algorithms have been developed to exploit the sparsity of the input and the output during forward and backward substitutions~\cite{2019_Amestoy_CG} or through domain decomposition~\cite{2012_Hackbusch_CVS}, they still require an $\mathcal{O}(M)$ substitution stage, with a modest speed-up (a factor of 3 when $M$ is several thousands) and no memory usage reduction. APF is simpler yet much more efficient as it obviates the forward and backward substitution steps and the need for LU factors. \begin{figure*}[t] \includegraphics[width=1.0\textwidth]{fig3.pdf} \caption{\label{fig:2p-CBS} {\bf Two-photon coherent backscattering.} {\bf{a}}, Schematic sketch of the system: maximally entangled photon pairs are reflected from a dynamic disordered medium, and the photon-number correlation function ${\Gamma_{ba}} = {\langle \psi|:\hat{n}_{b}\,\hat{n}_{a}:|\psi \rangle}$ is measured for pairs of reflected angles. {\bf{b--c}}, Normalized ${\Gamma_{ba}}$ for a single realization ({\bf b}) and averaged over 4,000 realizations ({\bf c}). } \end{figure*} Typically, matrix ${\bf{A}}$ contains more nonzero elements than matrices ${\bf{B}}$ and ${\bf{C}}$, and we find in such scenarios that the computing time and memory usage of APF scale as $\mathcal{O}(N^{1.3})$ and $\mathcal{O}(N)$ respectively in 2D (Supplementary Fig.~S1), where $N$ is the number of nonzero elements in matrix ${\bf{K}}$ and is almost independent of $M$. When ${\bf{B}}$ and/or ${\bf{C}}$ contain more nonzero elements than ${\bf{A}}$, we can compress matrices {\bf{B}} and {\bf{C}} through a data-sparse representation to reduce the number of their nonzero elements to below that of ${\bf A}$. For example, plane-wave sources span a large area, but their Fourier transforms are spatially localized and can be truncated with negligible error (Supplementary Sec.~5 and Figs.~S2--S3). We implement APF under finite-difference discretization on the Yee grid (Supplementary Secs.~2--3), with outgoing boundaries realized by perfectly matched layer (PML)~\cite{2005_Gedney_book_chapter}. Pseudocodes are shown in Supplementary Sec.~6. Our code supports all common boundary conditions and allows arbitrary permittivity profiles and arbitrary inputs and outputs (user-specified or automatically built); we have made it open-source~\cite{MESTI_GitHub}. Below, we consider two representative classes of massively multi-channel systems: disordered media and metasurfaces. We compare the timing, memory usage, and accuracy of APF to widely-used open-source codes including a finite-difference frequency-domain (FDFD) code MaxwellFDFD using both (1) direct~\cite{MaxwellFDFD} and (2) iterative~\cite{FD3D} solvers, (3) an RGF code~\cite{RGF_Hsu}, and (4) an RCWA code S4~\cite{Liu2012_CPC}; see the Methods section for details. We consider TM waves in 2D and start with systems small enough for these solvers. We then use APF to tackle problems that are too large for these solvers. \section{\label{sec:disordered_media} Large-scale disordered systems} Disordered systems are particularly difficult to simulate given their large size, large number of channels, strong scattering, and lack of symmetry. Here we consider one $W=500\lambda$ wide and $L=100\lambda$ thick, consisting of 30,000 cylindrical scatterers with refractive index of 2.0 in air (Fig.~\ref{fig:disorder}a), discretized into over 11 million pixels with a periodic boundary condition in $y$ to mimic an infinitely-wide system. On each of the $-x$ and $+x$ sides, $2W/\lambda =$ 1,000 channels (plane waves with different angles) are necessary to specify the propagating components of an incident wavefront or outgoing wavefront, which is the minimal requirement at the Nyquist sampling rate (Supplementary Sec.~1A). So, we compute the scattering matrix with $M'=$ 2,000 outputs and up to $M=$ 2,000 inputs (including both sides). It takes APF 3.3 minutes and 10 GiB of memory to compute the full scattering matrix; the other methods take between 3,300 and 110,000,000 minutes using between 7.0 to 1,200 GiB of memory for the same computation (Fig.~\ref{fig:disorder}b--c). The computing times of APF (with breakdown shown in Fig.~\ref{fig:disorder}d), RGF, and RCWA are all independent of $M$, though APF is orders-of-magnitude faster. MaxwellFDFD takes $\mathcal{O}(M)$ time due to its loop over the inputs; reusing the LU factors helps, but the $M$ forward and backward substitutions still dominate the computing time when $M \gtrsim 20$. APF offers significant speed and memory advantage across different systems, and the advantage further grows with the system size (Supplementary Fig.~S4). Some of these solvers require more computing resources than we have access to, so their usage data (open symbols and gray-edged bars in Fig.~\ref{fig:disorder}b--c) are extrapolated based on smaller systems (Fig.~S4). The relative $\ell^2$-norm error of APF due to numerical round-off is $10^{-12}$ here and grows slowly with an $\mathcal{O}(N^{1/2})$ scaling (Supplementary Fig.~S5), while the iterative MaxwellFDFD here has a relative $\ell^2$ error of $10^{-6}$. \begin{figure*} \includegraphics[width=0.85\textwidth]{fig4.pdf} \caption{\label{fig:meta1} {\bf Benchmarks on a large-area metasurface.} {\bf{a}}, Schematic of the system: a mm-wide metasurface consisting of 4,178 titanium dioxide ridges (blue) on a silica substrate (gray), operating at wavelength $\lambda = 532$ nm. {\bf{b}--c}, Computing time and memory usage versus the number $M$ of input angles using different methods. Open symbols are extrapolated from smaller $M$ or smaller systems. APF-c denotes APF with matrices ${\bf B}$ and ${\bf C}$ compressed. } \end{figure*} In Ref.~\cite{Safadi2022_ArXiv}, it is predicted that entangled photon pairs remain partially correlated even after multiple scattering from a dynamic disordered medium. We demonstrate such ``two-photon coherent backscattering'' as an example here. Given a maximally entangled input state, the correlation between two photons reflected into directions $\theta_a$ and $\theta_b$ is \begin{equation} \label{eq:Gamma} \overline{\Gamma_{ba}} = \overline{\langle \psi|:\hat{n}_{b}\,\hat{n}_{a}:|\psi \rangle} \propto \overline{\left|(r^2)_{\theta_b,-\theta_{a}}\right|^2}, \end{equation} where $|\psi\rangle$ is the two-photon wave function, $\hat{n}_{a}$ is the photon number operator in reflected direction $\theta_{a}$, $:(\dots):$ stands for normal ordering, $r^2$ is the square of the medium's reflection matrix ({\it i.e.}, the scattering matrix with inputs and outputs on the same side), and $\overline{\mbox{\dots\rule{0pt}{1.5mm}}}$ indicates ensemble average over disorder realizations. This requires the full reflection matrices for many realizations, and the disordered medium must be wide (for angular resolution) and thick (to reach diffusive transport). Figure~\ref{fig:2p-CBS} shows the two-photon correlation function $\Gamma_{ba}$ computed with APF before and after averaging over 4,000 disorder realizations, for a system $W=700\lambda$ wide and $L=400\lambda$ thick consisting of 56,000 cylindrical scatterers with a transport mean free path of $\ell_{\rm t} = 9.5\lambda$. We find the correlation between photons reflected toward similar directions ($|\theta_b - \theta_a| \lesssim 0.1 \lambda/\ell_t$) to be enhanced by a factor of 2. This finding, described in detail in~\cite{Safadi2022_ArXiv}, is the first evidence of two-photon coherent backscattering in disordered media. These APF simulations use modest resources on a computing cluster but would have taken prohibitively long using any other method. \section{\label{sec:metalens} Large-area metasurfaces} Metasurfaces are typically designed from subwavelength unit cells called ``meta-atoms''~\cite{Yu2014_NM, Kamali2018_Nanophotonics}. The overall response is commonly modeled by ignoring the coupling between meta-atoms~\cite{Yu2014_NM, Kamali2018_Nanophotonics} or with the locally-periodic approximation (LPA) which approximates the local response as that of a periodic array of meta-atoms~\cite{Pestourie2018_OE,Kamali2018_Nanophotonics}. However, LPA is inaccurate whenever the cell-to-cell variation is large~\cite{Hsu2017_OE,2019_Phan_LSA,Lin2019_OE,Torfeh2020_ACSP, 2022_Skarda_CM} and cannot describe nonlocal responses~\cite{2020_Overvig_PRL,Spagele2021_NC} and metasurfaces that are not based on unit cells~\cite{2020_Elsawy_LPR_review, Chung2020_OE, Lin2021_APL}. Coupled-mode theory can model the coupling between meta-atoms~\cite{2021_Zhou_ACSphoton_2} but requires isolated resonances with high quality factors. Full-wave simulation remains the gold standard but currently requires enormous computing resources. Here, we consider metalenses (lenses made with metasurfaces~\cite{lalanne2017metalenses, Khorasaninejad2017_Sci}) with height $L=0.6$ $\mu$m and width $W \approx 1$ mm, consisting of 4,178 unit cells of titanium dioxide ridges on a silica substrate (Fig.~\ref{fig:meta1}a), for hyperbolic~\cite{aieta2012aberration} and quadratic~\cite{Pu2017_OE, Martins2020_ACSP, Lassalle2021_ACSP} phase profiles operating at wavelength $\lambda = 532$ nm; see Supplementary Sec.~9 and Fig.~S6 for design and simulation details. PMLs are placed on all sides, and the system is discretized with grid size $\Delta x = \lambda/40$ into over 11 million pixels. We compute the transmission matrix at the minimal Nyquist sampling rate, with up to $M=2W/\lambda = $ 3,761 plane-wave-like inputs from the left (substrate side) within the width $W$ of the metalens, and sampling the transmitted field across width $W_{\rm out} = W + 40\lambda$ (to ensure all transmitted light is captured) projected onto $M'=2W_{\rm out}/\lambda =$ 3,841 propagating plane waves on the right. Due to the large (1 mm)/(0.6 $\mu$m) aspect ratio, the number of non-zero elements in matrices {\bf{B}} and {\bf{C}} is larger than that of {\bf{A}}, so we compress {\bf{B}} and {\bf{C}} and denote this as APF-c (Supplementary Sec.~5). It takes APF-c 1.3 minute and 6.9 GiB of memory to compute this transmission matrix, while the other methods take 6,300 to 6,000,000 minutes using 22 to 600 GiB (Fig.~\ref{fig:meta1}b--c); some numbers are extrapolated from smaller systems (Supplementary Fig.~S7). It is remarkable that even though RCWA is specialized for layered structures like the metasurface here, the general-purpose APF-c still outperforms RCWA by 10,000 times in speed and 87 times in memory. The second-best solver here is MaxwellFDFD with the LU factors stored and reused, which takes 4,800 times longer while using 18 times more memory compared to APF-c. \begin{figure*} \includegraphics[width=0.95\textwidth]{fig5.pdf} \caption{\label{fig:meta2} {\bf All-angle full-wave characterization of mm-wide metalenses.} {\bf{a--b}}, Saturated intensity profiles of the transmitted light for two incident angles with the hyperbolic metalens ({\bf a}) and quadratic metalens ({\bf b}). Black dashed lines indicate the focal plane. $\theta_{\rm in} = \sin^{-1}(n_{\rm substrate}\sin\theta_{\rm in}^{\rm substrate})$ is the incident angle in air. {\bf{c--d}}, Angle dependence of the Strehl ratio and transmission efficiency. {\bf{e--f}}, Errors of locally-periodic approximation (LPA) and of APF-c. } \end{figure*} The transmission matrix fully characterizes a metasurface's response to any input. Here we use it with angular spectrum propagation (Supplementary Sec.~11) to obtain the angle dependence of the exact transmitted profile (two profiles each shown in Fig.~\ref{fig:meta2}a--b; more shown in Supplementary Movies S1--S2), the Strehl ratio, and the transmission efficiency (Fig.~\ref{fig:meta2}c--d and Supplementary Sec.~12). They rigorously quantify the performance of these metalens designs. To our knowledge, this is the first time full-wave simulations over all angles are carried out for a large-area metasurface. To quantify the accuracy of an approximation, we compute the relative $\ell^2$-norm error ${\left\| I - I_0 \right\|_2}/{\left\| I_0 \right\|_2}$, with $I_0$ being the intensity at the focal plane within $|y|<W/2$ calculated from APF without compression, and $I$ from an approximation. We consider two LPA formalisms, a standard one using the unit cells' propagating fields (LPA I) and one with the unit cells' evanescent fields included (LPA II); see Supplementary Sec.~13. LPA leads to errors ranging between $8\%$ and 366$\%$ depending on the incident angle, with the angle-averaged error between $18\%$ and $37\%$ (Fig.~\ref{fig:meta2}e--f). Meanwhile, the compression errors of APF-c here average below $0.01\%$ (Fig.~\ref{fig:meta2}e--f) and can be made arbitrarily small (Supplementary Fig.~S8). \section{\label{sec:outlook}Outlook} While we use disordered systems and metasurfaces as examples above, one can readily apply APF to other multi-channel systems such as densely-packed photonic circuits where coupling and non-adiabatic effects are strong. Predicting the thermal emission from nanostructures~\cite{2021_Zhou_ACSphoton_1} requires a large number of frequency-domain simulations with different dipole sources, which can also be vastly accelerated using APF. Beyond optics, APF can be used for mapping the angle dependence of radar cross-sections, for microwave imaging~\cite{2014_Haynes_TBE}, for full waveform inversion~\cite{2009_Virieux_Geophysics_review} and controlled-source electromagnetic surveys~\cite{2019_Amestoy_CG} in geophysics, and for quantum transport simulations~\cite{2014_Groth_NJP}. More generally, APF can efficiently evaluate matrices of the form ${\bf C}{\bf A}^{-1}{\bf B}$ for other applications of numerical linear algebra, not limited to wave physics. As the number of channels and the LU factor size are both much larger in 3D, the advantage of APF over existing methods will be even more significant in 3D than in 2D. With the low-rank property of the finite-difference matrix ${\bf A}$ utilized, APF should take $\mathcal{O}(N^{4/3})$ time in 3D following the known factorization cost~\cite{2017_Amestoy_JSC}, which is comparable to the 2D scaling (Supplementary Fig.~S1). APF-c can naturally be used with overlapping-domain distribution strategies~\cite{Lin2019_OE,Torfeh2020_ACSP,2022_Skarda_CM} when modeling large-area systems. Multi-frontal parallelization can be used through existing packages such as MUMPS~\cite{Amestoy2001_SIAM}, and one may further employ hardware accelerations with GPUs~\cite{Egel2017JQSRT, 2022_Skarda_CM, Hughes2021_APL}. For systems with a small surface-to-volume ratio, it is also possible to apply APF to BEM or STMM, using the $\mathcal{H}$-matrix technique~\cite{Hackbusch2015} for fast factorization. We believe APF opens many doors and can be an enabling tool across different disciplines. There are numerous possibilities, and we have started to explore a few~\cite{Safadi2022_ArXiv, Li2022_ArXiv, 2022_Wang_arXiv}. \begin{acknowledgments} We thank Y.~Bromberg, M.~Safadi, A.~Goetschy, C.~Sideris, M.~Povinelli, A.~D.~Stone, S.~Li, M.~Torfeh, and Y.~Zhang for useful discussions. {\bf Funding:} This work is supported by the National Science Foundation CAREER award (ECCS-2146021) and the Sony Research Award Program. Computing resources are provided by the Center for Advanced Research Computing at the University of Southern California. {\bf Author contributions:} H.-C.L.~and C.W.H.~performed the simulations and data analysis; C.W.H., H.-C.L., and Z.W.~wrote the APF codes; C.W.H.~developed the theory and supervised research; all authors contributed to designing the systems, discussing the results, and preparing the manuscript. {\bf Competing interests:} The authors declare no competing interests. {\bf Data and materials availability:} All data needed to evaluate the conclusions in this study are presented in the paper and in the supplementary materials. Source codes are available at~\cite{MESTI_GitHub}. \end{acknowledgments} \bibliographystyle{naturemag} \section{Scattering matrix \label{sec:s_matrix}} In this section, we define the flux-normalized scattering matrix and derive its expression. For concreteness, here we consider the 2D transverse-magnetic fields in a two-sided system, with outgoing boundary condition in the longitudinal direction $x$ and Bloch periodic boundary condition in the transverse direction $y$. Defining the corresponding expressions for other boundary conditions and in 3D is straightforward, and the concepts apply similarly to other geometries. We start with time-harmonic electromagnetic waves at frequency $\omega$ with $e^{-i\omega t}$ dependence on time $t$, with no external sources, governed by the frequency-domain Maxwell's equations, \begin{subequations} \label{eq:Maxwell_3D} \begin{align} \label{eq:faraday} \nabla \times {\bf{E}}({\bf{r}}) - i\omega {\mu _0}{\mu _{\rm{r}}}({\bf{r}}){\bf{H}}( {\bf{r}}) &= 0,\\ \label{eq:ampere} \nabla \times {\bf{H}}({\bf{r}}) + i\omega {\varepsilon _0}{\varepsilon _{\rm{r}}}( {\bf{r}}){\bf{E}}({\bf{r}}) &= 0,\\ \label{eq:gauss} \nabla \cdot \left[ {{\varepsilon _{\rm{r}}}({\bf{r}}){\bf{E}}({\bf{r}})} \right] &= 0, \\ \label{eq:gauss_m} \nabla \cdot \left[ {{\mu _{\rm{r}}}({\bf{r}}){\bf{H}}({\bf{r}})} \right] &= 0, \end{align} \end{subequations} where ${\bf E}({\bf r})=(E_x,E_y,E_z)({\bf r})$ and ${\bf H}({\bf r})=(H_x,H_y,H_z)({\bf r})$ are the electric and magnetic fields at position ${\bf r}=(x,y,z)$, $\varepsilon_{\rm r}({\bf r})$ and $\mu_{\rm r}({\bf r})$ are scalar relative permittivity and permeability profiles that define the structure, and $\varepsilon_0$ and $\mu_0$ are the vacuum permittivity and permeability constants. Consider a nonmagnetic (${\mu _{\rm{r}}} = 1$) system where $\varepsilon_{\rm r}({\bf r})$, ${\bf E}({\bf r})$, and ${\bf H}({\bf r})$ are independent of $z$. Then, the fields can be decoupled into transverse-magnetic (TM) waves (with only $H_x$, $H_y$, and $E_z$ being nonzero) and transverse-electric (TE) waves (with only $E_x$, $E_y$, and $H_z$ being nonzero). From Eqs.~\eqref{eq:faraday}--\eqref{eq:ampere}, the $E_z$ component of TM waves satisfies \begin{equation} \label{eq:A_psi} \left[ -\nabla_{xy}^2 - {\frac{\omega^2 }{c^2}} \varepsilon_{\rm{r}}(x,y)\right] E_z(x,y) = 0, \end{equation} where $\nabla_{xy}^2 = \partial^2/\partial x^2 + \partial^2/\partial y^2$, and $c=1/\sqrt{\varepsilon_0 \mu_0}$ is the vacuum speed of light. The magnetic fields are given by $\left( {{H_x},{H_y}} \right) = \frac{1}{{i\omega {\mu _0}}}\left( {\frac{{\partial {E_z}}}{{\partial y}},-\frac{{\partial {E_z}}}{{\partial x}}} \right)$, and Eqs.~\eqref{eq:gauss}--\eqref{eq:gauss_m} are automatically satisfied. The vacuum wavelength is $\lambda = 2\pi c/\omega$. Consider a structure where ${\varepsilon _{\rm{r}}}(x,y)$ is periodic in $y$ with periodicity $W$, namely ${\varepsilon _{\rm{r}}}(x,y+W) = {\varepsilon _{\rm{r}}}(x,y)$. Given the periodicity, any solution $E_z(x,y)$ of Eq.~\eqref{eq:A_psi} can be written as a superposition of Bloch states with different Bloch wave numbers $k_{\rm B}$, with each Bloch state satisfying $E_z(x,y + W) = E_z(x,y){e^{i{k_{\rm{B}}}W}}$. Bloch states with distinct $k_{\rm B}$ (up to modulo $2\pi/W$) are decoupled from each other. Therefore, we can fix $k_{\rm B}$ and consider only a finite transverse size within $0 \le y \le W$, with boundary condition $E_z(x,W) = E_z(x,0) e^{i k_{\rm B} W}$ at $y=0$ and $y=W$; this is called Bloch periodic boundary condition, which reduces to a periodic boundary when $k_{\rm B}=0$. We further consider the structure to be homogeneous on the left and right sides, \begin{equation} \label{eq:syst} {\varepsilon _{\rm{r}}}(x,y) = \begin{cases} \, \varepsilon_{\rm L}, & x \le 0, \\ \, \varepsilon_{\rm{r}}(x,y), & 0 < x < L, \\ \, \varepsilon_{\rm R}, & x \ge L. \end{cases} \end{equation} Light incident from either side is scattered by the inhomogeneous structure within $0 < x < L$, which we refer to as the scattering region. The scattering matrix fully characterizes such response. To define the scattering matrix, we first define the input and output ``channels'' as follows. \subsection{Channels in homogeneous space\label{sec:chan_homo_sp}} Consider a homogeneous region (either $x\le0$ or $x\ge L$), within which $\varepsilon_{\rm r}({x,y}) = {\varepsilon _{{\rm{bg}}}}$ is a real-valued constant (either $\varepsilon_{\rm L}$ or $\varepsilon_{\rm R}$). Given the translational symmetry in $x$, the field profile within the homogeneous region can be written as a superposition of propagating and evanescent fields of the form \begin{equation} \label{eq:Ez_a} E_{z}^{(a,\pm)}(x,y) = \frac{1}{\sqrt{k_x^{(a)}}} \phi_a(y) e^{ \pm i k_x^{(a)} x }, \quad a \in \mathbb{Z}, \end{equation} which we refer to as ``channels.'' The integer index $a$ labels the channel number, $\pm$ indicates the propagation direction, $k_x^{(a)}$ is the longitudinal wave number, the prefactor $1/\sqrt{k_x^{(a)}}$ normalizes the longitudinal flux (to be discussed in the next paragraph), and $\phi_a(y)$ is the transverse mode profile. The $a$-th transverse profile is \begin{equation} \label{eq:phi_a} \phi_a(y) = \frac{1}{{\sqrt W }}\exp \left[ {ik_y^{\left( a \right)}\left( {y - {y_0}} \right)} \right], \quad 0 \le y \le W, \end{equation} with the transverse wave number $k_y^{\left( a \right)} = {k_{\rm{B}}} + a\frac{{2\pi }}{W}$ chosen to satisfy the Bloch periodic boundary condition; note that neighboring $k_y^{\left( a \right)}$ are separated by $2\pi/W$. Here, $y_0$ is an arbitrary real constant specifying the reference position of the basis. The set $\{ \phi_a(y) \}_a$ of transverse modes makes up a complete and orthonormal basis, with $\int_0^W dy \phi_a^*(y)\phi_b(y) = \delta_{ab}$. Inserting Eqs.~\eqref{eq:Ez_a}--\eqref{eq:phi_a} into Eq.~\eqref{eq:A_psi} yields the dispersion relation $\left( {{\omega }/{c}} \right)^2{\varepsilon _{{\rm{bg}}}} = (k_x^{(a)})^2 + (k_y^{(a)})^2$. We choose the sign of $k_x^{(a)}$ as $k_x^{(a)} = \sqrt{(\omega/c)^2\varepsilon_{\rm bg} - (k_y^{(a)})^2}$. There is an infinite number of evanescent channels where $k_x^{(a)}$ is imaginary [{\it i.e.}, where $|k_y^{\left( a \right)}| > (\omega/c)\sqrt{\varepsilon _{\rm{bg}}}$]. There are approximately $2\sqrt{\varepsilon _{\rm{bg}}}W/\lambda$ propagating channels where $k_x^{(a)}$ is real-valued [{\it i.e.}, where $|k_y^{\left( a \right)}| < (\omega/c)\sqrt{\varepsilon _{\rm{bg}}}$]; these are plane waves propagating at angles $\theta_a = {\rm atan}(k_y^{(a)}/k_x^{(a)})$. Therefore, $2\sqrt{\varepsilon _{\rm{bg}}}W/\lambda$ complex-valued coefficients are necessary to fully specify the propagating components of an arbitrary incident wavefront or outgoing wavefront; this is consistent with the Nyquist--Shannon sampling theorem~\cite{landau1967sampling} that when the highest spatial frequency ({\it i.e.}, wave number $k_y$) in a wavefront is $(\omega/c)\sqrt{\varepsilon _{\rm{bg}}}$, we need at least one spatial sampling point per $\lambda/(2\sqrt{\varepsilon _{\rm{bg}}})$ to uniquely specify such a wavefront. The channels are flux orthogonal: given a superposition of Eq.~\eqref{eq:Ez_a} with different channel indices and propagation directions, the $x$-directional Poynting flux of the total field integrated over $y$ equals the sum of the integrated Poynting flux for components with different transverse profiles. For propagating channels, the $1/\sqrt{k_x^{(a)}}$ prefactor in Eq.~\eqref{eq:Ez_a} ensures that different propagating channels are normalized to carry the same longitudinal flux; furthermore, the integrated flux from the two counter-propagating terms have opposite signs, and the cross term does not contribute. For evanescent channels, neither $E_{z}^{(a,+)}$ nor $E_{z}^{(a,-)}$ itself carries flux, but their cross terms can carry flux. \subsection{Scattering matrix}\label{sec:S-matrix_continuous} We now define the scattering matrix ${\bf S}$. In a scattering problem, the total field $E_z$ satisfies Eq.~\eqref{eq:A_psi} and can be written as $E_z(x,y) = E_z^{\rm in}(x,y) + E_z^{\rm sca}(x,y)$. Here, $E_z^{\rm in}$ is the incident field, and $E_z^{\rm sca}$ is the scattered field that satisfies an outgoing boundary condition at infinity ({\it i.e.}, when $|x| \to \infty$). To be concrete, we consider light incident from the left at angle $\theta_a$, with \begin{equation} \label{eq:Ez_inc} E_z^{\rm in}(x,y) = \frac{E_0}{\sqrt{k_x^{(a, {\rm L})}}} \phi_a^{({\rm L})}(y) e^{ i k_x^{(a, {\rm L})} x } \end{equation} for some constant $E_0$. Outside of the scattering region, the total field $E_z$ can be written as a superposition of the propagating and evanescent channels consistent with the outgoing boundary condition, as \begin{equation} \label{eq:psi_tot_outside_continuous} \frac{E_z(x,y)}{E_0} = \begin{cases} \displaystyle \frac{\phi_a^{({\rm L})}(y) }{\sqrt{k_x^{(a, {\rm L})}}} e^{ i k_x^{(a, {\rm L})} x } + \sum_{b} r_{ba}^{({\rm L})} \frac{\phi_b^{({\rm L})}(y) }{\sqrt{k_x^{(b, {\rm L})}}} e^{ -i k_x^{(b, {\rm L})} x } + \sum_{b}{\vphantom{\sum}}' \tilde{r}_{ba}^{({\rm L})} \frac{\phi_b^{({\rm L})}(y)}{\sqrt{k_x^{(b, {\rm L})}}} e^{ -i k_x^{(b, {\rm L})} x } , & x \le 0, \\ \displaystyle \sum_{b} t_{ba}^{({\rm L})}\frac{\phi_b^{({\rm R})}(y) }{\sqrt{k_x^{(b, {\rm R})}}} e^{ i k_x^{(b, {\rm R})} (x-L) } + \sum_{b}{\vphantom{\sum}}' \tilde{t}_{ba}^{({\rm L})} \frac{\phi_b^{({\rm R})}(y)}{\sqrt{k_x^{(b, {\rm R})}}} e^{ i k_x^{(b, {\rm R})} (x-L) } , & x \ge L. \end{cases} \end{equation} Summations $\sum_b$ sum over the $N_{\rm L} \approx 2\sqrt{\varepsilon_{\rm L}}W/\lambda$ and $N_{\rm R} \approx 2\sqrt{\varepsilon_{\rm R}}W/\lambda$ propagating channels on the left and right, and summations $\sum'_b$ sum over the countably infinite number of evanescent channels. Here, $r_{ba}^{({\rm L})}$ and $t_{ba}^{({\rm L})}$ are the reflection and transmission coefficients with input in channel $a$ from the left and output in channel $b$ on the left or right, normalized by the longitudinal flux, with reference planes on $x=0$ and $x=L$ respectively. In the absence of absorption or gain ({\it i.e.}, when $\varepsilon_{\rm r}(x,y)$ is real-valued everywhere), flux conservation requires that $\sum_{b} |r_{ba}|^2 + \sum_{b} |t_{ba}|^2 = 1$ for any propagating channel $a$. Meanwhile, $\tilde{r}_{ba}$ and $\tilde{t}_{ba}$ characterize the evanescent response in the near field. While it is possible to include the evanescent response in the scattering matrix~\cite{2000_Carminati_PRA}, in most scenarios only the propagating ones are of interest. We define reflection matrix ${\bf{r}_{\rm{L}}}$ and transmission matrix ${\bf{t}_{\rm{L}}}$ with incidence from the left by their matrix elements $r_{ba}^{({\rm L})}$ and $t_{ba}^{({\rm L})}$; together they form the scattering matrix ${\bf{S}}_{\rm L} = [{{\bf{r}}_{\rm{L}}};{{\bf{t}}_{\rm{L}}}]$ to include output to both sides. In general, we can consider incident light from either left or right, with the full scattering matrix being \begin{equation} \label{eq:S_matrix} {\bf{S}} = \left[ {\begin{array}{*{20}{c}} {{{\bf{r}}_{\rm{L}}}}&{{{\bf{t}}_{\rm{R}}}}\\ {{{\bf{t}}_{\rm{L}}}}&{{{\bf{r}}_{\rm{R}}}} \end{array}} \right]. \end{equation} This full scattering matrix has size $(N_{\rm L}+N_{\rm R})$-by-$(N_{\rm L}+N_{\rm R})$ and is unitary in the absence of absorption or gain. \subsection{Fisher--Lee relation \label{sec:Fisher_Lee}} Here we introduce line sources to the right-hand side of Eq.~\eqref{eq:A_psi} to solve the scattering problem. We first define the retarded Green's function $G(x,y; x',y')$ of the scattering medium, which is the solution of Eq.~\eqref{eq:A_psi} with a point source at $(x',y')$, \begin{equation} \label{eq:A_G} \lim_{\eta \to 0^+} \left[ - \nabla_{xy}^2 - \frac{\omega^2}{c^2} \varepsilon_{\rm{r}}(x,y) - i \eta \right] G(x,y; x',y') = \delta(x-x')\delta(y-y'). \end{equation} The infinitesimal absorption $\eta$ imposes an outgoing boundary condition. We can then use the retarded Green's function to express the total field $E_z$ arising from the incident field in Eq.~\eqref{eq:Ez_inc}, as \begin{subequations} \label{eq:psi_tot_continuous} \begin{align} \label{eq:psi_tot_1_continuous} &E_z(x,y) = E_z^{\rm io}(x,y) + E_z^{\rm out}(x,y), \\ \label{eq:psi_io_continuous} &{E_z^{\rm io}(x,y)}/{E_0} = \frac{1}{\sqrt{k_x^{(a, {\rm L})}}} \phi_a^{({\rm L})}(y) \left( e^{ i k_x^{(a, {\rm L})} x } - e^{ -i k_x^{(a, {\rm L})} x } \right) H(-x), \\ \label{eq:psi_out_continuous} &{E_z^{\rm out}(x,y)}/{E_0} = -2i \sqrt{k_x^{(a, {\rm L})}} \int_0^W dy' G(x,y; x'=0,y') \phi_a^{({\rm L})}(y') , \end{align} \end{subequations} where $H(x) = [{\rm sign}(x) + 1 ]/2$ is a Heaviside step function. The $E_z^{\rm out}$ in Eq.~\eqref{eq:psi_out_continuous} is the solution of Eq.~\eqref{eq:A_psi} with a line source $-2i \sqrt{k_x^{(a, {\rm L})}} \delta(x') \phi_a^{({\rm L})}(y') E_0$ at $x'=0$ with an outgoing boundary condition. In the absence of scatterers [{\it i.e.}, when $\varepsilon_{\rm{r}}(x,y) = \varepsilon_{\rm L}$ everywhere], such a line source generates outgoing fields $E_z^{\rm out}(x,y) = \frac{E_0}{\sqrt{k_x^{(a, {\rm L})}}} \phi_a^{({\rm L})}(y) e^{ i k_x^{(a, {\rm L})} |x|}$ that propagate away from $x=0$ toward both sides; the addition of $E_z^{\rm io}$ in Eq.~\eqref{eq:psi_io_continuous} subtracts the outgoing wave on the $x<0$ side and adds the incident wave there, such that $E_z^{\rm io} + E_z^{\rm out}$ equals the incident field $E_z^{\rm in}$ in Eq.~\eqref{eq:Ez_inc}. In the presence of scatterers, $E_z^{\rm out}$ additionally includes the scattered field $E_z^{\rm sca}$ produced by such $E_z^{\rm in}$ interacting with the scatterers. The $E_z^{\rm io}$ in Eq.~\eqref{eq:psi_io_continuous} is a solution of Eq.~\eqref{eq:A_psi} with an opposite line source $2i \sqrt{k_x^{(a, {\rm L})}} \delta(x') \phi_a^{({\rm L})}(y') E_0$, so the sum $E_z^{\rm io} + E_z^{\rm out}$ satisfies the source-less Eq.~\eqref{eq:A_psi} everywhere; it also satisfies the boundary condition of the scattering problem defined by $E_z = E_z^{\rm in} + E_z^{\rm sca}$ with $E_z^{\rm in}$ from Eq.~\eqref{eq:Ez_inc} and an outgoing $E_z^{\rm sca}$. By equating Eq.~\eqref{eq:psi_tot_outside_continuous} and Eq.~\eqref{eq:psi_tot_continuous}, evaluating it at $x=0$ and $x=L$ (note that only $E_z^{\rm out}$ contributes since $E_z^{\rm io}=0$ at $x=0$ and $x=L$), and projecting onto the output channels using the orthonormality of the transverse modes, we obtain the reflection and transmission coefficients as \begin{subequations} \label{eq:Fisher-Lee_continuous} \begin{align} \label{eq:r_continuous} r_{ba}^{({\rm L})} &= -2 i \sqrt{ k_x^{(b, {\rm L})} k_x^{(a, {\rm L})} } \int d y \int d y' \phi_b^{(\rm L)*}(y) G(x=0, y; x'=0, y') \phi_a^{(\rm L)}(y') -\delta_{ba}, \\ \label{eq:t_continuous} t_{ba}^{({\rm L})} &= -2 i \sqrt{ k_x^{(b, {\rm R})} k_x^{(a, {\rm L})} } \int d y \int d y' \phi_b^{(\rm R)*}(y) G(x=L, y; x'=0, y') \phi_a^{(\rm L)}(y'), \end{align} \end{subequations} which is known as the Fisher--Lee relation, initially derived for the single-particle Schr\"odinger equation in the context of quantum transport~\cite{1981_Fisher_PRB, Datta1995, Wimmer2009}. Eq.~\eqref{eq:Fisher-Lee_continuous} can be understood intuitively: for each incident angle $\theta_a$, $-2i \sqrt{k_x^{(a, {\rm L})}} \delta(x') \phi_a^{({\rm L})}(y')$ is the input source, $\sqrt{k_x^{(b, {\rm L})}} \delta(x) \phi_b^{({\rm L})}(y)$ and $\sqrt{k_x^{(b, {\rm R})}} \delta(x-L) \phi_b^{({\rm R})}(y)$ are the output projections for reflection and transmission coefficients into different outgoing angles $\theta_b$, and the $\delta_{ba}$ in Eq.~\eqref{eq:r_continuous} is the projection of the incident field $E_z^{\rm in}$ on the incident side. Eq.~\eqref{eq:Fisher-Lee_continuous} is a special case of Eq.~(2) in the main text, written for the specific geometry considered here prior to discretization. \section{Finite-difference discretization \label{sec:dis_Fisher_Lee}} We need to discretize the system in order to compute its scattering matrix numerically. Here we consider finite-difference discretization on the Yee grid~\cite{Yee1966_TAP}. On the Yee grid, the first derivatives are approximated with center difference with second-order accuracy, and the grid points of different field components are staggered in space. For 2D TM waves, we put the discretized $E_z$ component at \begin{equation} \label{eq:E_z_FD} E_z(x=x_n, y=y_m) \to E_{z (n,m)} \end{equation} where \begin{equation} \label{eq:xy_FD} x_n\equiv\left(n-\frac{1}{2}\right)\Delta x, \quad y_m\equiv\left(m-\frac{1}{2}\right) \Delta x \end{equation} with $(n,m)$ being integer indices and $\Delta x$ the discretization grid size. The $H_x$ component is located at $(x_n, y_{m+1/2})$, and the $H_y$ component is located at $(x_{n+1/2}, y_m)$. This gives the discretized second derivative of $E_z$ in $x$ as \begin{equation} \label{eq:ddx2_FD} \left. \frac{\partial^2 }{\partial x^2} E_z(x,y) \right|_{x=x_n, y=y_m} \to \frac{E_{z (n+1,m)} - 2E_{z(n,m)} + E_{z (n-1,m)}}{\Delta x^2}, \end{equation} and similarly for $\partial^2 E_z/\partial y^2$. We discretize the relative permittivity profile $\varepsilon_{\rm r}(x,y)$ through subpixel smoothing~\cite{2006_Farjadpour_OL}; for TM waves, this corresponds simply to averaging $\varepsilon_{\rm r}(x,y)$ within the $\Delta x^2$ area of each cell centered at $(x_n,y_m)$, as \begin{equation} \varepsilon_{n,m} = \frac{1}{\Delta x^2} \int_{(n-1)\Delta x}^{n\Delta x} dx \int_{(m-1)\Delta x}^{m\Delta x} dy \, \varepsilon_{\rm r}(x,y). \end{equation} Note that different from the notation of Ref.~\cite{Yee1966_TAP}, in Eq.~\eqref{eq:xy_FD} we introduced the half-pixel offset so that the first pixel $(n,m)=(1,1)$ of $E_z$ will have its lower corner at $(x,y)=(0,0)$; this is more convenient when we only deal with $E_z$. Then, the differential operator $- \nabla_{xy}^2 - {\left( {\omega /c} \right)^2} \varepsilon_{\rm r}(x,y)$ of Eq.~\eqref{eq:A_psi} is discretized into $A_{(n,m),(n',m')}/\Delta x^2$ with \begin{equation} \label{eq:A_FD} A_{(n,m),(n',m')} = - (\delta_{n+1,n'} + \delta_{n-1,n'}) \delta_{m,m'} + (4 - \beta^2 \varepsilon_{n,m}) \delta_{n,n'} \delta_{m,m'} - ( \delta_{m+1,m'} + \delta_{m-1,m'} ) \delta_{n,n'} \end{equation} away from the boundaries, with $\beta \equiv (\omega/c)\Delta x$. In practice, the system size is made finite, and a single index is used to go through both indices $(n,m)$. With that single index, $E_{z (n,m)}$ becomes an $N' \times 1$ column vector $E_z$, and $A_{(n,m),(n',m')}$ becomes an $N' \times N'$ square matrix ${\bf A}$. Then, Eq.~\eqref{eq:A_psi} becomes a finite-sized matrix-vector multiplication, \begin{equation} \label{eq:AE_z_FD} {\bf A} E_z = 0. \end{equation} This is the finite-difference frequency-domain (FDFD) formulation. Now we consider the two-sided geometry in Sec.~\ref{sec:s_matrix}. We restrict the integer index $m$ to $1 \le m \le n_y$ with $n_y \equiv W/\Delta x$ being the transverse number of grid points (discretizing the region $0 \le y \le W$); $\Delta x$ can be chosen such that $n_y$ is an integer. The Bloch periodic boundary condition $E_{z, (n,n_y+1)} = E_{z, (n,1)} e^{i k_{\rm B} n_y \Delta x}$ and $E_{z, (n,0)} = E_{z, (n,n_y)} e^{-i k_{\rm B} n_y \Delta x}$ manifests in the boundary elements of matrix ${\bf A}$. The system size in $x$ is infinite, but we must truncate it to a finite size with an effective open boundary with no reflection at the interface of truncation; we do so with the perfectly matched layer (PML)~\cite{2005_Gedney_book_chapter}, which attenuates the outgoing waves with minimal reflection. In this way, the outgoing boundary condition is also built into matrix ${\bf A}$. Also, matrix ${\bf A}$ and vector $E_z$ both have finite sizes. The retarded Green’s function $G(x,y; x',y')$ defined in Eq.~\eqref{eq:A_G} is the inverse of the differential operator. When discretized, it becomes a matrix and is simply given by the matrix inverse \begin{equation} \label{eq:A_inv} {\bf G} = {\bf A}^{-1}. \end{equation} The outgoing boundary condition is automatic since it is already built into matrix ${\bf A}$. Under subpixel smoothing, Eq.~\eqref{eq:syst} becomes \begin{equation} \label{eq:epsilon_slab_FD} \varepsilon_{n,m} = \begin{cases} \, \varepsilon_{\rm L}, & n \le 0, \quad \quad \quad \ 1 \le m \le n_y, \\ \, \varepsilon_{n,m} , & 1 \le n \le n_x,\quad 1 \le m \le n_y, \\ \, \varepsilon_{\rm R}, & n \ge n_x + 1, \quad 1 \le m \le n_y, \end{cases} \end{equation} where $n_x \equiv \lceil L/\Delta x \rceil$ is the number of grid points for the scattering region. The rest follows the same steps as in Sec.~\ref{sec:s_matrix}, which we summarize below. \subsection{Channels in discrete homogeneous space\label{sec:homo_inf}} Given the discrete translational symmetry in $n$ when $n \le 0$ and $n \ge n_x + 1$, Eq.~\eqref{eq:Ez_a} still holds in the form of \begin{equation} \label{eq:phi_a_FD} E^{(a,\pm)}_{z(n,m)} = \frac{1}{{\sqrt {{\mu _a}} }} \phi_{m,a} \exp\left[ \pm i k_x^{(a)} \Delta x \left(n- \frac{1}{2}\right) \right], \end{equation} with the longitudinal-flux normalization factor ${{\mu _a}}$ to be determined. The transverse modes of Eq.~\eqref{eq:phi_a} become \begin{equation} \label{eq:phi_FD} \phi_{m,a} = \frac{1}{{\sqrt {{n_y}} }}\exp \left[ {ik_y^{\left( a \right)}\Delta x\left( {m - {m_0}} \right)} \right], \end{equation} which make up matrix $\phi$, with $y_0 = (m_0 - 1/2)\Delta x$. The transverse wave number is still $k_y^{(a)} = k_{\rm B} + a \frac{2\pi}{n_y \Delta x}$, but channel $a$ is now equivalent to channel $a + n_y$ due to aliasing, so there are only $n_y$ distinct channels in total (propagating ones plus evanescent ones) instead of an infinite number of them. Completeness and orthonormality of the transverse modes means that the $n_y \times n_y$ matrix $\phi$ is unitary when all $n_y$ channels are included. Inserting Eqs.~\eqref{eq:phi_a_FD}--\eqref{eq:phi_FD} into Eq.~\eqref{eq:AE_z_FD} yields the finite-difference dispersion relation \begin{equation} \label{eq:dispersion} {\varepsilon _{{\rm{bg}}}}{\left( {\frac{\omega }{c}} \right)^2}\Delta {x^2} = 4 \, {\sin ^2}\left( {\frac{{k_x^{(a)}\Delta x}}{2}} \right) + 4 \, {\sin ^2}\left( {\frac{{k_y^{(a)}\Delta x}}{2}} \right). \end{equation} Flux orthogonality continues to hold in the discretized system. To preserve flux conservation ({\it i.e.}, Poynting's theorem), the Poynting vector in the discrete system should be defined using the product of an ${\bf E}$ field component and an ${\bf H}$ field component at $\Delta x/2$ away~\cite{1994_Chew_JAP}. For 2D TM felds, this means that the $x$-directional flux is proportional to ${\rm{Im}}\left[ {E_{z\left( {n,m} \right)}^*{E_{z\left( {n + 1,m} \right)}}} \right]$. For each channel in Eq.~\eqref{eq:phi_a_FD}, such flux is proportional to $\frac{\pm1}{{{{\left| { {{\mu _a}} } \right|}}}} \sin \left( {k_x^{\left( a \right)}\Delta x} \right)$ for propagating channels (where $k_x^{(a)}$ is real-valued), zero for evanescent channels (where $k_x^{(a)}$ is imaginary or complex-valued). Therefore, we choose the the flux normalization factor in Eq.~\eqref{eq:phi_a_FD} to be \begin{equation} \label{eq:mu_a} \mu_a = \sin\left(k_x^{(a)} \Delta x \right) \end{equation} so that all propagating channels carry equal longitudinal flux. \subsection{Finite-difference Fisher--Lee relation} The definition of the scattering matrix is the same as the continuous case in Eq.~\eqref{eq:psi_tot_outside_continuous}, simply with $x$ and $y$ replaced through Eq.~\eqref{eq:xy_FD}. The derivation of the scattering matrix in terms of the Green's function (namely, the Fisher--Lee relation) is the same as the continuous case except for one difference: the sources and the projections were placed at $x=0$ and $x=L$ in the continuous case, but the corresponding spatial indices $n = (x/\Delta x) + (1/2)$ would lie on $n=1/2$ and $n = (L/\Delta x) + (1/2)$, which are generally not integer points. Therefore, for the discretized system, we put the sources and the projections at integer indices $n=0$ and $n=n_x + 1$ (recall that $n_x \equiv \lceil L/\Delta x \rceil$). This gives the discrete version of Eq.~\eqref{eq:Fisher-Lee_continuous} as \begin{subequations} \label{eq:Fisher-Lee_FD} \begin{align} \label{eq:r_FD} r_{ba}^{({\rm L})} &= \left[ -2 i \sqrt{ \mu_b^{({\rm L})} \mu_a^{({\rm L})}} \sum_{m} \sum_{m'} \phi_{m,b}^{({\rm L})*} G_{(n=0,m),(n'=0,m')} \phi_{m',a}^{({\rm L})} -\delta_{ba} \right] \delta_b^{({\rm L})} \delta_a^{({\rm L})}, \\ \label{eq:t_FD} t_{ba}^{({\rm L})} &= \left[-2 i \sqrt{ \mu_b^{({\rm R})} \mu_a^{({\rm L})}} \sum_{m} \sum_{m'} \phi_{m,b}^{({\rm R})*} G_{(n=n_x+1,m),(n'=0,m')} \phi_{m',a}^{({\rm L})} \right] \delta_b^{({\rm R})} \delta_a^{({\rm L})}. \end{align} \end{subequations} Here, $\delta_b^{({\rm L/R})} = \exp\left[ - i k_x^{(b, {\rm L/R})} \Delta x \delta n^{({\rm L/R})} \right]$ and $ \delta_a^{({\rm L/R})} = \exp\left[ - i k_x^{(a, {\rm L/R})} \Delta x \delta n^{({\rm L/R})} \right]$ are phase factors that compensate for the shift of the detection plane and the source plane respectively, with $\delta n^{({\rm L})} = 1/2$, $\delta n^{({\rm R})} = 1/2 + \lceil L/\Delta x \rceil - (L/\Delta x)$; these factors can be ignored if the location of the reference plane is not of interest. Based on Eq.~\eqref{eq:A_inv}, Eq.~\eqref{eq:Fisher-Lee_FD}, and considering inputs from both sides as in Eq.~\eqref{eq:S_matrix}, we can write the full scattering matrix ${\bf S}$ as \begin{equation} \label{eq:S_CAB_D} {\bf{S}} = {\bf{C}}{{\bf{A}}^{ - 1}}{\bf{B}} - {\bf{D}}, \end{equation} which is unitary in the absence of absorption or gain if all propagating channels are included. A schematic illustration of Eq.~\eqref{eq:S_CAB_D} is given in Fig.~1c of the main text. Matrix ${\bf A}$ is the discrete version of the differential operator $- \nabla_{xy}^2 - {\left( {\omega /c} \right)^2} \varepsilon_{\rm r}(x,y)$ in Eq.~\eqref{eq:A_psi}, given by Eq.~\eqref{eq:A_FD}, PML, and the boundary conditions. The input matrix ${\bf{B}}$ is \begin{equation} \label{eq:B_matrix} {\bf{B}} = \left[ {\begin{array}{*{20}{c}} {\bf{0}}&{\bf{0}}\\ {{{\bf{B}}_{\rm{L}}}}&{\bf{0}}\\ {\bf{0}}&{\bf{0}}\\ {\bf{0}}&{{{\bf{B}}_{\rm{R}}}}\\ {\bf{0}}&{\bf{0}} \end{array}} \right]. \end{equation} The top (bottom) block row of zeros correspond to indices $n < 0$ ($n > n_x + 1$) with PML and homogeneous space on the left (right); they are shown in green in Fig.~1c--d of the main text. The second (fourth) block row corresponds to index $n=0$ ($n=n_x+1$), which is the left (right) surface where input sources are placed; they are shown in red in Fig.~1c--d. The third block row corresponds to the scattering region with indices $1 \le n \le n_x$, shown in blue in Fig.~1c--d. Matrices ${{\bf{B}}_{\rm{L}}}$ and ${{\bf{B}}_{\rm{R}}}$ have sizes $n_y \times M_{{\rm {L}}}$ and $n_y \times M_{{\rm {R}}}$; they are line sources on the surface, given by \begin{equation} \label{eq:B_L} {{\bf{B}}_{\rm{L}}} = -2i{{\rm{\phi }}_{\rm{L}}}\sqrt {{{\bf{\mu }}_{\rm{L}}}} \delta^{({\rm L})}, \quad {{\bf{B}}_{\rm{R}}} = -2i{{\rm{\phi }}_{\rm{R}}}\sqrt {{{\bf{\mu }}_{\rm{R}}}} \delta^{({\rm R})}, \end{equation} where the $n_y \times M_{{\rm {L}}}$ matrix $\phi_{{\rm{L}}}$ is defined in Eq.~\eqref{eq:phi_FD}, matrices $\sqrt {{\mu _{{\rm{L}}}}} = {\rm{diag}}\left( \left\{ {\sqrt {\mu _a^{\left( {{\rm{L}}} \right)}} } \right\}_a \right)$ and $ \delta^{({\rm L})} = {\rm{diag}}\left( \left\{ \delta_a^{({\rm L})} \right\}_a \right)$ are $M_{{\rm {L}}} \times M_{{\rm {L}}}$ diagonal matrices for flux normalization and phase shift respectively, and similarly with ${\bf B}_{\rm R}$. Similarly, the output matrix ${\bf{C}}$ performs the projection onto the output channels, \begin{equation} \label{eq:C_matrix} {\bf{C}} = \left[ {\begin{array}{*{20}{c}} {\bf{0}}&{{{\bf{C}}_{\rm{L}}}}&{\bf{0}}&{\bf{0}}&{\bf{0}}\\ {\bf{0}}&{\bf{0}}&{\bf{0}}&{{{\bf{C}}_{\rm{R}}}}&{\bf{0}} \end{array}} \right], \end{equation} with \begin{equation} \label{eq:C_L} {{\bf{C}}_{\rm{L}}} = \delta^{({\rm L})} \sqrt {{{\bf{\mu }}_{\rm{L}}}}{\phi _{\rm{L}}^\dagger}, \quad {{\bf{C}}_{\rm{R}}} = \delta^{({\rm R})} \sqrt {{{\bf{\mu }}_{\rm{R}}}}{\phi _{\rm{R}}^\dagger}, \end{equation} where $^\dagger$ stands for conjugate transpose. Note that the list of the $M'=M'_{\rm L} + M'_{\rm R}$ output channels do not have to be the same as the list of the $M=M_{\rm L} + M_{\rm R}$ input channels, but for simplicity we do not introduce a separate notation. Matrix ${\bf{D}}$ here is the $\delta_{ba}$ in the Fisher--Lee relation, with elements that equal $\delta_b^{({\rm L/R})} \delta_a^{({\rm L/R})}$ when the input channel is the same as the output channel, 0 otherwise. For the numerical computations and implementation, it is faster and simpler to take the prefactor $-2i$ in Eq.~\eqref{eq:B_L} and the $\sqrt {{{\bf{\mu }}_{\rm{L/R}}}} \delta^{({\rm L/R})}$ prefactors in Eq.~\eqref{eq:B_L} and Eq.~\eqref{eq:C_L} out of ${\bf{B}}_{{\rm{L}}/{\rm{R}}}$ and ${{\bf{C}}_{{\rm{L}}/{\rm{R}}}}$, and multiply such prefactors after ${\bf C}{\bf A}^{-1}{\bf B}$ is computed. This means we can use \begin{equation} \label{eq:BC_no_prefactor} {{\bf{B}}_{\rm{L}}} = \phi_{\rm{L}}, \quad {{\bf{B}}_{\rm{R}}} = \phi_{\rm{R}}, \quad {{\bf{C}}_{\rm{L}}} = \phi_{\rm{L}}^\dagger, \quad {{\bf{C}}_{\rm{R}}} = \phi_{\rm{R}}^\dagger, \quad \end{equation} instead for the numerical computations. We omit {\bf{D}} from matrix ${\bf K}$ [as in Eq.~\eqref{eq:K_matrix} below] and subtract {\bf{D}} from ${\bf C}{\bf A}^{-1}{\bf B}$ after the prefactors are put back. While the details are system dependent, the concepts above are general, and scattering matrices can always be written in the form of Eq.~\eqref{eq:S_CAB_D} regardless of the discretization scheme, the geometry, the type of sources, and the type of outputs of interest. In general, ${\bf{D}} = {\bf{C}}{\bf A}_0^{-1}{\bf{B}} - {\bf S}_0$, where ${\bf A}_0$ is the Maxwell operator of a reference system ({\it e.g.}, a homogeneous one) for which the scattering matrix ${\bf S}_0$ is known; in the specific case above, ${\bf{C}}{\bf A}_0^{-1}{\bf{B}} = {\bf I} + {\bf S}_0$ where the identity matrix ${\bf I}$ comes from projection of $E_z^{\rm in}$ on the incident side (assuming the full scattering matrix and ignoring the phase-shift factors to simplify notation). \section{Utilizing symmetry in augmented partial factorization (APF)\label{sec:symmetrize}} In APF, a partial factorization is performed on the augmented sparse matrix \begin{equation} \label{eq:K_matrix} {\bf{K}} \equiv \left[ {\begin{array}{*{20}{c}} {\bf{A}}&{\bf{B}}\\ {\bf{C}}&{\bf{0}} \end{array}} \right]. \end{equation} The computing time and memory usage of such partial factorization can be reduced when matrix ${\bf K}$ is symmetric, as is the case in many linear solver packages such as MUMPS~\cite{Amestoy2001_SIAM}. Thanks to reciprocity, the bulk of matrix {\bf{A}} as in Eq.~\eqref{eq:A_FD} is symmetric; periodic boundary condition and the use of uniaxial PML does not break such symmetry. Therefore, matrix ${\bf K}$ will be symmetric if we can make ${\bf{C}} = {\bf{B}}^{\rm{T}}$, or equivalently ${{\bf{C}}_{{\rm{L}}}} = {\bf{B}}_{{\rm{L}}}^{\rm{T}}$ and ${{\bf{C}}_{{\rm{R}}}} = {\bf{B}}_{{\rm{R}}}^{\rm{T}}$. From Eq.~\eqref{eq:BC_no_prefactor}, we see that when the list of input channels equals the list of output channels, we would have the desired ${{\bf{C}}_{{\rm{L}}}} = {\bf{B}}_{{\rm{L}}}^{\rm{T}}$ if the transverse mode profiles were real-valued. The transverse mode profiles in Eq.~\eqref{eq:phi_FD} are not real-valued, but we can see that taking the complex conjugate of the profile is equivalent to flipping the sign of $k_y^{(a)}$; with a periodic boundary condition in $y$ (where $k_{\rm B} = 0$), this corresponds to flipping the sign of the channel index $a$. Therefore, we can achieve ${{\bf{C}}_{{\rm{L}}}} = {\bf{B}}_{{\rm{L}}}^{\rm{T}}$ simply by making the list of output channels having the opposite channel index as the list of input channels. When the full scattering matrix or reflection matrix is computed, all we need to do is to choose a particular ordering of the channels (which can be reversed after ${\bf C}{\bf A}^{-1}{\bf B}$ is computed). When only a subset of the scattering matrix is needed, we can further pad input and/or output channels to achieve ${{\bf{C}}_{{\rm{L}}}} = {\bf{B}}_{{\rm{L}}}^{\rm{T}}$ to make matrix ${\bf K}$ symmetric. \begin{figure*}[t] \includegraphics[width=1.0\textwidth]{figs1.pdf} \caption{\label{fig:scaling_APF} {\bf Computing time and memory usage of APF}. {\bf{a}}, Schematic of the disordered system considered, with thickness $L$ and width $W$. Other parameters are the same as in Fig.~2 of the main text. {\bf{b}--c}, Computing time ({\bf{b}}) and memory usage ({\bf{c}}) versus the number $N$ of nonzero elements in matrix {\bf{K}}. Symbols are from simulations; black lines are fitting curves.} \end{figure*} \section{Computing time and memory scaling of APF \label{sec:APF_nnz}} We implement APF under finite-difference discretization for 2D TM fields as described above, and here we map out its computing time and memory usage scaling as a function of the system size. We consider the same disordered system as in Fig.~2 of the main text but with different system sizes: (1) fixing thickness at $L = 200 \lambda$ while varying width $W$ from 32 $\lambda$ to 1150 $\lambda$, and (2) fixing $W = 200 \lambda$ while varying $L$ from 9 $\lambda$ to 1170 $\lambda$. The computing time and memory usage are obtained with serial computations on Intel Xeon Gold 6130 nodes. For each system size, the full scattering matrix is computed 10 times; the average computing time and the maximal recorded memory usage among the 10 computations is used. A constant 0.57 GiB memory used by MATLAB R2020b is subtracted from the memory usage. The computing time and memory usage are well characterized by the number $N$ of nonzero elements in the sparse matrix {\bf{K}} [denoted by ${\rm{nnz}}({\bf{K}})$], as shown in Fig.~\ref{fig:scaling_APF}b--c. An $\mathcal{O}(N^{1.3})$ curve and an $\mathcal{O}(N)$ curve closely describe the computing time and the memory usage for all of these systems. Here, ${\rm{nnz}}({\bf{K}})$ is dominated by ${\rm{nnz}}({\bf{A}})$, with {\rm{nnz}}({\bf{A}})/{\rm{nnz}}({\bf{B}}) in between 1 and 100 among these systems. Therefore, ${\rm{nnz}}({\bf{K}}) \approx {\rm{nnz}}({\bf{A}})$, which is proportional to the number of pixels in the discretization and independent of the number $M$ of input channels. \section{APF with compressed input/output matrices (APF-c) \label{sec:APF_c}} When ${\rm{nnz}}({\bf{B}})$ and/or ${\rm{nnz}}({\bf{C}})$ exceeds ${\rm{nnz}}({\bf{A}})$, the computing time and memory usage of APF can grow with the number of inputs $M$, which is not desirable. But there is a simple solution: we can ``compress'' matrices ${\bf B}$ and ${\bf C}$ to reduce their number of nonzero elements, perform the partial factorization, and then ``decompress.'' Conceptually, this is similar to other forms of data compression. We call this APF-c with c standing for compression. In this section, we consider a simple compression scheme based on the Fourier transform. This Fourier scheme is more than sufficient for the metasurface examples considered in this paper; note when the accuracy is sufficient and when ${\rm{nnz}}({\bf{B}})$ and ${\rm{nnz}}({\bf{C}})$ goes below ${\rm{nnz}}({\bf{A}})$, further compression is no longer necessary. More advanced compression strategies~\cite{Sayood_2017_book} may be used if there is such need. Figure~\ref{fig:APF_c}a illustrates the expression of the scattering matrix {\bf{S}} in Eq.~\eqref{eq:S_CAB_D}, highlighting the non-zero blocks ${{\bf{B}}_{{\rm{L}}}}$, ${{\bf{B}}_{{\rm{R}}}}$ of the input matrix ${\bf B}$ and the non-zero blocks ${{\bf{C}}_{{\rm{L}}}}$, ${{\bf{C}}_{{\rm{R}}}}$ of the output matrix ${\bf C}$. These non-zero blocks are placed on the front ($x=0$) and back ($x=L$) surfaces of the scattering region, as indicated in red in Fig.~1d of the main text. Even though matrices ${\bf B}$ and ${\bf C}$ are non-zero only on these two surfaces, these non-zero blocks are dense and can still contain many elements when the system is wide. Each column of ${\bf B}_{\rm L}$ is the cross section of a plane wave [given in Eq.~\eqref{eq:phi_FD}], which covers the full range of $y$ as illustrated in Fig.~\ref{fig:APF_c}b. \begin{figure*}[t] \includegraphics[width=1.00\textwidth]{figs2.pdf} \caption{\label{fig:APF_c} {\bf Concept of APF with compression (APF-c)}. {\bf{a}}, Schematic illustration of Eq.~\eqref{eq:S_CAB_D} that highlights the dense blocks ${{\bf{B}}_{{\rm{L}}}}$, ${{\bf{B}}_{{\rm{R}}}}$ and ${{\bf{C}}_{{\rm{L}}}}$, ${{\bf{C}}_{{\rm{R}}}}$ of the input and output matrices. {\bf{b}}, Columns of ${ {{{\bf B}_{\rm{L}}}} }$, which are spatially extended. {\bf{c}}, With APF-c, the input and output matrices are transformed such that ${\bf{\tilde B}}_{\rm{L}}$, ${\bf{\tilde B}}_{\rm{R}}$, ${\bf{\tilde C}}_{\rm{L}}$, ${\bf{\tilde C}}_{\rm{R}}$ are spatially localized and can be truncated with minimal or no loss of accuracy. The transformations are reversed after $\tilde{\bf C} {\bf A}^{-1} \tilde{\bf B}$ is computed. {\bf{d}}, Columns of ${ {{{\tilde {\bf B}}_{\rm{L}}}} }$, which are spatially localized. } \end{figure*} A plane wave is extended in real space but localized in momentum space, so a simple compression strategy is to Fourier transform the dense block ${\bf B}_{\rm L}$. For concreteness, below we consider having $M_{\rm L}$ input channels from the left with consecutive channel indices $a =-\frac{{M_{\rm{L}} - 1}}{2}$, $\cdots$, 0, $\cdots$, $\frac{{M_{\rm{L}} - 1}}{2}$, under periodic boundary condition with $m_0=0$. We define an $M_{\rm{L}}{\times}M_{\rm{L}}$ discrete Fourier transform (DFT) matrix ${{\bf{F}}_{{M_{\rm{L}}}}}$ by its elements, \begin{equation} \label{eq:dft} {\left( {{{\rm F}_{{M_{\rm{L}}}}}} \right)_{ba}} = \frac{1}{{\sqrt {{M_{\rm{L}}}} }}{e^{ - i\frac{{2\pi }}{{{M_{\rm{L}}}}}ba}}. \end{equation} The inverse DFT matrix is then ${\bf{F}}_{{M_{\rm{L}}}}^{-1} = {\bf{F}}_{{M_{\rm{L}}}}^{\dagger}$. Note that the indices $b$ and $a$ here are centered around zero; the DFT matrix is commonly defined with indices starting at zero instead, which is equivalent to the definition here after an index shift. We will show below that it is better to rescale matrix ${\bf B}_{\rm L}$ before Fourier transforming it, so we also introduce a diagonal scaling matrix ${{\bf{Q}}_{{M_{\rm{L}}}}}$, defined as \begin{equation} \label{eq:Q_matrix} {{\bf{Q}}_{{M_{\rm{L}}}}} = {\rm{diag}}\left( {\left\{ {{q_{{M_{\rm{L}}},a}}} \right\}} \right), \end{equation} where $\left\{ {{q_{{M_{\rm{L}}},a}}} \right\}$ are nonzero real numbers (the scale factors). Then, matrix ${\bf B}_{\rm L}$ can be written as \begin{equation} {{\bf{B}}_{\rm{L}}} = \phi_{\rm{L}} = \underbrace{\left( {{{\rm{\phi }}_{\rm{L}}}{{\bf{Q}}_{{M_{\rm{L}}}}}{{\bf{F}}_{{M_{\rm{L}}}}}} \right)}_{\displaystyle\equiv{\bf{\tilde B}}_{\rm{L}}} \underbrace{\left( {{\bf{F}}_{{M_{\rm{L}}}}^{-1} {\bf{Q}}_{{M_{\rm{L}}}}^{ - 1} } \right)}_{\displaystyle\equiv{\bf{E}}_{\rm{L}}}. \end{equation} Similarly, \begin{subequations} \begin{align} \label{eq:B_R_tilda_E_R} {{\bf{B}}_{\rm{R}}} = \phi_{\rm{R}} &= \left( {{{\rm{\phi }}_{\rm{R}}}{{\bf{Q}}_{{M_{\rm{R}}}}}{{\bf{F}}_{{M_{\rm{R}}}}}} \right)\left( {{\bf{F}}_{{M_{\rm{R}}}}^{-1} {\bf{Q}}_{{M_{\rm{R}}}}^{ - 1} } \right) \equiv {{\bf{\tilde B}}_{\rm{R}}}{{\bf{E}}_{\rm{R}}},\\ \label{eq:E_L_prime_C_L_tilda} {{\bf{C}}_{\rm{L}}} = \phi_{\rm{L}}^\dag &= \left( { {\bf{Q}}_{{M_{\rm{L}}}}^{ - 1}{{\bf{F}}_{{M_{\rm{L}}}}}} \right)\left( {{\bf{F}}_{{M_{\rm{L}}}}^{-1} {{\bf{Q}}_{{M_{\rm{L}}}}}{\phi _{\rm{L}}^\dag}} \right) \equiv {{\bf{E'}}_{\rm{L}}}{{\bf{\tilde C}}_{\rm{L}}},\\ \label{eq:E_R_prime_C_R_tilda} {{\bf{C}}_{\rm{R}}} = \phi_{\rm{R}}^\dag &= \left( { {\bf{Q}}_{{M_{\rm{R}}}}^{ - 1}{{\bf{F}}_{{M_{\rm{R}}}}}} \right)\left( {{\bf{F}}_{{M_{\rm{R}}}}^{-1} {{\bf{Q}}_{{M_{\rm{R}}}}}{\phi _{\rm{R}}^\dag}} \right) \equiv {{\bf{E'}}_{\rm{R}}}{{\bf{\tilde C}}_{\rm{R}}}, \end{align} \end{subequations} The transformed input and output matrices $\tilde{\bf B}$ and $\tilde{\bf C}$ can be defined just like Eq.~\eqref{eq:B_matrix} and Eq.~\eqref{eq:C_matrix}. Instead of computing ${\bf C}{\bf A}^{-1}{\bf B}$, we can compute $\tilde{\bf C} {\bf A}^{-1} \tilde{\bf B}$ with APF using the transformed input/output matrices, after which we undo the transformations using ${\bf{E}}_{\rm{L}}$, ${\bf{E}}_{\rm{R}}$, ${{\bf{E'}}_{\rm{L}}}$, ${{\bf{E'}}_{\rm{R}}}$. The procedure is illustrated in Fig.~\ref{fig:APF_c}c. So far, we have not introduced compression yet; the transformed matrices take up the same sizes as the original matrices, and the transformations are fully reversible. While the columns of the original matrix ${\bf B}_{\rm L}$ are spatially extended as illustrated in Fig.~\ref{fig:APF_c}b, those of the transformed matrix ${\bf{\tilde B}}_{\rm{L}}$ can be made spatially localized as illustrated in Fig.~\ref{fig:APF_c}d. Without rescaling ({\it{i.e.}} ${{\bf{Q}}_{{M_{\rm{L}}}}} = {\bf{I}}$), the matrix elements of ${\bf{\tilde B}}_{\rm{L}}$ can be analytically derived as \begin{equation} \label{eq:phi_L_F_L} {\left( {{\phi _{\rm{L}}}{{\bf F}_{{M_{\rm{L}}}}}} \right)_{m,a}} = \sum\nolimits_{b = - \left( {{M_L} - 1} \right)/2}^{\left( {{M_L} - 1} \right)/2} {{{\left( {{\phi _{\rm{L}}}} \right)}_{m,b}}{{\left( {{{\bf F}_{{M_{\rm{L}}}}}} \right)}_{b,a}}} = \begin{cases} \displaystyle \frac{{{{\left( { - 1} \right)}^a}}}{{\sqrt {{n_y}{M_{\rm{L}}}} }}\frac{{\sin \left( {{{\pi m{M_{\rm{L}}}}}/{{{n_y}}}} \right)}}{{\sin \left( {\frac{{\pi m}}{{{n_y}}} - \frac{{\pi a}}{{{M_{\rm{L}}}}}} \right)}}, & \displaystyle \textrm{when } \frac{m}{{{n_y}}} - \frac{a}{{{M_{\rm{L}}}}} \notin \mathbb{Z},\\ \displaystyle \frac{{{M_{\rm{L}}}}}{{\sqrt {{n_y}{M_{\rm{L}}}} }},\ & \textrm{otherwise}, \end{cases} \end{equation} which is the discrete form of the sinc function coming from Fourier transforming a rectangular window ({\it i.e.,} $|k_y| < \omega/c$) in momentum space. Each column of ${{\bf{\tilde B}}_{\rm{L}}}$ in Eq.~\eqref{eq:phi_L_F_L} is peaked around a center point $y_{\rm c} \equiv (m_{\rm c}-0.5) \Delta x$ with $m_{\rm{c}} = {\rm mod}(n_y a / M_{\rm L}, n_y)$, near which its envelope decays as $1/\left| {y - {y_{\rm{c}}}} \right|$ since $\left|\sin \left( {\frac{{\pi m}}{{{n_y}}} - \frac{{\pi a}}{{{M_{\rm{L}}}}}} \right)\right| \approx \frac{\pi}{n_y}|m-m_c|$ in the denominator. Fig.~\ref{fig:phiQL_comp}a-b compare a column of ${\bf B}_{\rm L}$ with a column of the transformed matrix ${\bf{\tilde B}}_{\rm{L}}$ without rescaling. Given the spatial localization of ${\bf{\tilde B}}_{\rm{L}}$, we can specify a truncation window width $w_{\rm t}$ and set the matrix elements of ${\bf{\tilde B}}_{\rm{L}}$ with $|y-y_c| > w_{\rm t}/2$ to zero to make matrix ${\bf{\tilde B}}_{\rm{L}}$ sparse---this is the compression step. Such truncation reduces ${\rm nnz}({\bf{\tilde B}}_{\rm{L}})$ by a factor of $w_{\rm t}/W$, but it does introduce small errors since the elements dropped were not exactly zero before. The truncation error can be adjusted with the window size $w_{\rm t}$. There is no need to build the full matrix $\phi_{\rm L}$; we only need to build the elements of ${\bf{\tilde B}}_{\rm{L}}$ within the truncation window $w_{\rm t}$ using Eq.~\eqref{eq:phi_L_F_L}. There is no need to build the DFT matrix ${{\bf{F}}_{{M_{\rm{L}}}}}$ either, since the transformations can be reversed efficiently with fast Fourier transforms~\cite{2005_Frigo_FFTW3}. \begin{figure*}[t] \includegraphics[width=1\textwidth]{figs3.pdf} \caption{\label{fig:phiQL_comp} {\bf{Column profile of the input matrix before and after transformation.}} {\bf{a}}, A column of the original input matrix ${\bf B}_{\rm L}$. {\bf{b}}, A column of the transformed input matrix ${\bf{\tilde B}}_{\rm{L}}$ without rescaling. {\bf{c}}, A column of the transformed input matrix ${\bf{\tilde B}}_{\rm{L}}$ with Hann window (inset of {\bf{c}}) rescaling. The system considered has width $W = 50\lambda$ discretized with $\Delta x = \lambda/40$. The subscript on the number of channels is dropped to simplify notation. } \end{figure*} We can reduce the compression error by increasing the window size $w_{\rm t}$ and/or by making the columns of ${\bf{\tilde B}}_{\rm{L}}$ more spatially localized. The relatively slow $1/|y-y_{\rm c}|$ decay in real space comes from the sharp edges of $|k_y| < \omega/c$ in momentum space. So, we can make ${\bf{\tilde B}}_{\rm{L}}$ more localized by a rescaling that smoothens the sharp edges. Here, we use the Hann window function~\cite{Smith_1997_book}: \begin{equation} \label{eq:cos_weight} {q_{M,a}} = \frac{1}{2}\left[ {1 + \cos \left( {\frac{{2\pi a}}{M}} \right)} \right]. \end{equation} With this diagonal rescaling, the matrix elements of ${{\bf{\tilde B}}_{\rm{L}}} = {{\rm{\phi }}_{\rm{L}}}{{\bf{Q}}_{{M_{\rm{L}}}}}{{\bf{F}}_{{M_{\rm{L}}}}}$ becomes \begin{equation} \label{eq:phi_L_Q_L_F_L} {\left( {{{\rm{\phi }}_{\rm{L}}}{{\bf Q}_{{M_{\rm{L}}}}}{{\bf F}_{{M_{\rm{L}}}}}} \right)_{m,a}} = \frac{1}{2}{\left( {{{\rm{\phi }}_{\rm{L}}}{{{\bf F}}_{{M_{\rm{L}}}}}} \right)_{m,a}} + \frac{1}{4}{\left( {{{\rm{\phi }}_{\rm{L}}}{{{\bf F}}_{{M_{\rm{L}}}}}} \right)_{m,a - 1}} + \frac{1}{4}{\left( {{{\rm{\phi }}_{\rm{L}}}{{{\bf F}}_{{M_{\rm{L}}}}}} \right)_{m,a + 1}}, \end{equation} where each term is given by Eq.~\eqref{eq:phi_L_F_L}. The columns of ${{\bf{\tilde B}}_{\rm{L}}}$ now decays faster as $1/|y-y_{\rm c}|^3$, as shown in Fig.~\ref{fig:phiQL_comp}c; a trade-off is that the main peak is now slightly wider. In addition to increasing the window size $w_{\rm t}$, we can also reduce the compression error by padding extra channels. The $\sin \left( {{{\pi m{M_{\rm{L}}}}}/{{{n_y}}}} \right)$ term in the numerator of Eq.~\eqref{eq:phi_L_F_L} has a width of $(n_y/M_{\rm L})\Delta x$ in $y$. Therefore, we can pad extra channels to increase $M_{\rm L}$, which reduces the width of the dominant peak, making ${{\bf{\tilde B}}_{\rm{L}}}$ more localized and reducing compression error for the same window size $w_{\rm t}$. Note that the extra channels we pad do not need to be propagating channels; evanescent ones works equally well since only the transverse profile is involved. The padded channels can be removed after computing $\tilde{\bf C} {\bf A}^{-1} \tilde{\bf B}$. In the limit where the padded $M_{\rm L}$ reaches $n_y$, each column of ${{\bf{\tilde B}}_{\rm{L}}}$ will be zero everywhere except at the pixel of $m=m_{\rm c}$, so the compression error completely vanishes even when the truncation window $w_{\rm t}$ is a single-pixel ($\Delta x$) wide. In Sec.~\ref{sec:APF_c_error}, we will give a detailed analysis of the compression error for the mm-wide metasurface examples considered in the main text; by choosing the truncation window size $w_{\rm t}$ and the number of channels to pad, we can make the compression error arbitrarily small. Lastly, we note that ${{\bf{\tilde B}}_{\rm{L}}}$ in Eq.~\eqref{eq:phi_L_F_L} and Eq.~\eqref{eq:phi_L_Q_L_F_L} is already real-valued, so ${{\bf{\tilde C}}_{\rm{L}}}={{\bf{\tilde B}}_{\rm{L}}}^{\rm T}$ whenever $M_{\rm L} = M_{\rm L}'$. The channel-index flipping described in Sec.~\ref{sec:symmetrize} no longer necessary for making matrix ${\bf K}$ symmetric. \section{APF pseudocode \label{sec:pseudocode}} The pseudocodes of APF and APF-c are shown below, which is also the structure of our implementation made open-source at~\cite{MESTI_GitHub}. One can specify an arbitrary system contained in input argument \texttt{syst} (including the permittivity profile, wavelength, discretization grid size, boundary conditions, and PML parameters), arbitrary lists of source profiles given by matrix {\bf B}, and arbitrary output projections given by matrix {\bf C}. The algorithm returns the scattering matrix $\bf{S}$. \smallskip \smallskip \begin{algorithm}[H] \caption{APF} \begin{algorithmic} \Require \texttt{syst}, $\bf{B}$, $\bf{C}$, $\bf{D}$ \Comment{\texttt{syst} specifies the system; ${\bf B}$, ${\bf C}$ specify the inputs and outputs; ${\bf{D}} = {\bf{C}}{\bf A}_0^{-1}{\bf{B}} - {\bf S}_0$.} \Ensure $\bf{S}$ \State $\bf{A} \gets$ \texttt{syst} \Comment{Build the sparse matrix $\bf{A}$ for the Maxwell operator.} \State ${\bf{K}} = \left[ {{\bf{A}},{\bf{B}};{\bf{C}},{\bf{0}}} \right]$ \Comment{Build the augmented matrix $\bf{K}$.} \State ${\bf H} = \bf{K}/\bf{A}$ \Comment{Compute the Schur complement $\bf{K}/\bf{A} = -{\bf C}{\bf A}^{-1}{\bf B}$.} \State $\bf{S} = - {\bf H} - \bf{D}$ \Comment{Scattering matrix $\bf{S} = {\bf C}{\bf A}^{-1}{\bf B} - {\bf D}$.} \State \textbf{return} $\bf{S}$ \end{algorithmic} \end{algorithm} \smallskip \begin{algorithm}[H] \caption{APF-c} \begin{algorithmic} \Require \texttt{syst}, $\bf{B}$, $\bf{C}$, $\bf{D}$ \Comment{\texttt{syst} specifies the system; ${\bf B}$, ${\bf C}$ specify the inputs and outputs; ${\bf{D}} = {\bf{C}}{\bf A}_0^{-1}{\bf{B}} - {\bf S}_0$.} \Ensure $\bf{S}$ \State $\bf{A} \gets$ \texttt{syst} \Comment{Build the sparse matrix $\bf{A}$ for the Maxwell operator.} \State ${{\bf{\tilde B}}}, {{\bf{E}}},{{\bf{\tilde C}}}, {{\bf{E'}}} \gets \bf{B}, \bf{C}$ \Comment{Compress the matrices ${{\bf{B}}}$ and ${{\bf{C}}}$.} \State $\bf{\tilde K} = [\bf{A}, {{\bf{\tilde B}}}; {{\bf{\tilde C}}},{\bf{0}}]$ \Comment{Build the augmented matrix $\bf{\tilde K}$.} \State ${\bf \tilde{H}} = {\bf \tilde{K}}/\bf{A}$ \Comment{Compute the Schur complement ${\bf \tilde{K}}/\bf{A} = -{\bf \tilde{C}}{\bf A}^{-1}{\bf \tilde{B}}$.} \State $\bf{S} = - {\bf E}'{\bf \tilde{H}}{\bf E} - \bf{D}$ \Comment{Decompress with the matrices ${{\bf{E}}}$ and ${{\bf{E'}}}$.} \State \textbf{return} ${\bf S}$ \end{algorithmic} \end{algorithm} \section{System-size scaling for disordered media simulations\label{sec:scaling_fixed_aspect_ratio}} Figure~\ref{fig:scaling_time_mem} shows how the computing time and memory usage scale with the system size using different methods, for the disordered system in Fig.~2 of the main text with the aspect ratio $W/L = 5$ fixed while the overall system size ($W$ and $L$) varies. Some methods require more computing resources than we have access to, so their data points (open symbols) are extrapolated from smaller number of input angles $M$ and/or smaller systems. We note that among all of these methods, APF exhibits the best scaling both in terms of computing time and in terms of memory usage, and is many orders of magnitude faster for large systems. \begin{figure*}[t] \includegraphics[width=0.9\textwidth]{figs4.pdf} \caption{\label{fig:scaling_time_mem} {\bf Scaling of computing time and memory usage using different methods}. Computing time ({\bf{a}}) and memory usage ({\bf{b}}) versus the system size $LW/\lambda^2$. The two ``FDFD direct'' curves correspond to an unmodified version of MaxwellFDFD (blue curve) and one modified to have the LU factors reused for different inputs (black curve). The arrows on top indicate the system considered in Fig.~2 of the main text.} \end{figure*} \begin{figure*}[b] \includegraphics[width=0.85\textwidth]{figs5.pdf} \caption{\label{fig:error_APF} {\bf Round-off error of APF}. Circles show the relative difference between scattering matrices computed using APF and those computed using direct method with iterative refinement that iterates until machine precision is reached. Black line is a fitting curve. The black arrow on top indicates the system considered in Fig.~2 of the main text.} \end{figure*} \section{Round-off error of APF} While APF is in theory exact aside from discretization error (and compression error if APF-c is used), numerical round off is also present, and such round-off errors often grow with the system size. Therefore, it is necessary to check if the round-off error of APF is within the acceptable range. To characterize the round-off error, we compare results from APF to those obtained from a standard direct solver but with additional iterative refinement~\cite{1989_Arioli_SIAM} steps that iterate until the entire solution (with all input channels) reaches machine-precision accuracy. Double precision is used through out. From that, we evaluate the relative $\ell^2$-norm error, ${\left\| S_{\rm{APF}} - S_0 \right\|_2}/{\left\| S_0 \right\|_2}$, for the systems in Sec.~\ref{sec:scaling_fixed_aspect_ratio}, where $S_0$ is the scattering matrix (reshaped into a vector) computed with iterative refinement, and $S_{\rm{APF}}$ is that from APF. The difference between the two is the round-off error of APF. The relative round-off error with respect to $N$ = nnz({\bf{K}}) scales as $\mathcal{O}(N^{0.5})$ (Fig.~\ref{fig:error_APF}); it is only $10^{-12}$ for the system considered in Fig.~2 of the main text where $N \approx 10^{8}$, and is estimated to be only $10^{-10}$ even for an extremely large system with a trillion matrix elements. We therefore conclude that the round-off error of APF is negligible even for the largest system one would possibly simulate. \section{Metalens design and simulation \label{sec:design_meta}} \begin{figure*}[t] \includegraphics[width=1.0\textwidth]{figs6.pdf} \caption{\label{fig:metalens_design} {\bf Unit cells of the metasurface}. {\bf{a}}, Schematic structure of a periodic array of unit cells considered here. One unit cell is simulated with Bloch periodic boundary condition in $y$. {\bf{b-c}}, Phase ({\bf{b}}) and amplitude ({\bf{c}}) maps of the zeroth-order transmission coefficient for different ridge widths and incident angles. The green arrows on top indicate the ridge widths used for the design.} \end{figure*} \begin{table}[b] \begin{tabularx}{0.8\textwidth}{ c *{8}{Y} } \toprule \,\,\,Relative phase shift\,\,\, & 0 & $\pi$/4 & $\pi$/2 & 3$\pi$/4 & $\pi$ & 5$\pi$/4 & 3$\pi$/2 & $7\pi/4$ \\ \midrule Ridge width (nm) & 40.0 & 49.1 & 60.7 & 73.1 & 87.4 & 107.1 & 138.2 & 172.3 \\ \bottomrule \end{tabularx} \caption{\label{tab:metalens_design} {\bf Ridge widths used for the metalens design}. Eight ridge widths and the corresponding relative transmission phase shifts at normal incidence. } \end{table} We start by describing how the hyperbolic and quadratic metalenses in Figs.~4--5 of the main text are designed. The metalens operates at wavelength $\lambda = 532$ nm and consists of 4,178 unit cells. Each unit cell ({\it i.e}, a meta-atom) has a titanium dioxide (TiO$_2$) ridge (refractive index $n = 2.43$) sitting on a silica substrate ($n = 1.46$) in air ($n=1$), as shown in Fig.~\ref{fig:metalens_design}a. The ridge height in $x$ is fixed at $L=$ 600 nm, and the width $\Lambda$ of an unit cell is fixed at 239.4 nm. We consider ridge widths between 45 nm and 200 nm. We use a grid size of $\Delta x = \lambda/40$ for the finite-difference discretization, which ensures that the transmission phase shifts are accurate to within 0.1 radian (see Sec.~\ref{sec:discretization_error}). We then map out the phase and amplitude of the zeroth-order ({\it i.e.}, $a=b=0$) transmission coefficient of the unit cell with Bloch periodic boundary condition in $y$, for different ridge widths and different incident angles, as shown in Fig.~\ref{fig:metalens_design}b--c. From these results, we pick eight ridge widths as indicated by the green arrows in Fig.~\ref{fig:metalens_design}b--c and summarized in Table~\ref{tab:metalens_design}, which provide eight equally-spaced transmission phase shifts covering 0 to 2$\pi$ at normal incidence. For a hyperbolic metalens, the transmission phase shift at normal incidence should be space-dependent with a hyperbolic profile~\cite{aieta2012aberration} \begin{equation} \label{eq:phi_hyperbolic} \Phi_{\rm{hyperbolic}} \left( y \right) = - \frac{{2\pi }}{\lambda }\sqrt {{f^2} + {y^2}}, \end{equation} where $f$ is the focal length. The coordinate $y$ here is zero at the center of the metalens. A hyperbolic metalens can achieve diffraction-limited focusing at normal incidence but comes with off-axis aberrations at oblique incidence~\cite{aieta2013aberrations}. For a quadratic metalens, the transmission phase shift should follow a quadratic profile~\cite{Pu2017_OE} \begin{equation} \Phi_{\rm{quadratic}} \left( y \right) = - \frac{{2\pi }}{\lambda }\frac{{{y^2}}}{{2f}}. \end{equation} We construct the metalenses from the eight unit cells in Table~\ref{tab:metalens_design}, with the ridge width of each unit cell chosen based on the desired normal-incidence transmission phase shift at the center of that unit cell. The metalenses consists of 4,178 unit cells, with an overall width of $W=1000.2$ $\mu$m. For the hyperbolic metalens, we use a focal length of $f= 300$ $\mu$m (corresponding to numerical aperture NA = 0.86). For quadratic metalenses, there is a maximal effective numerical aperture of ${\rm{N}}{{\rm{A}}_{e{\rm{ff}}}} = {n_{\rm{t}}}/\sqrt 2$ where $n_{\rm{t}}$ is the refractive index of the medium on the transmitted side~\cite{Lassalle2021_ACSP}, so we use a larger focal length of $f= 500$ $\mu$m (corresponding to NA = 0.71). Such design, although standard, is quite simplistic as it only considers normal incidence and assumes that the unit-cell simulations (which are carried out for fully periodic systems) are sufficient for capturing the response of the aperiodic metalens. The purpose of this design here is not to realize a high-performance metalens, but simply to provide a test system to benchmark the APF method. After building $\varepsilon_{\rm r}(x,y)$ of the mm-wide metalens, we carry out full-wave simulations with APF-c to compute its transmission matrix. The simulation domain is schematically illustrated in Fig.~4a of the main text, with PML on all four sides to describe a fully open system; also see the Methods section of the main text. The pre-compression inputs are line sources in the silica substrate immediately behind the TiO$_2$ ridges, which generate incident plane waves truncated with a rectangular window over the width $W$ of the metalens; this models the effect of having an aperture that blocks incident light beyond width $W_{\rm in} = W$. We use the set of propagating input channels for a periodic boundary in $y$ with width $W_{\rm in}$, and restrict to the $2W_{\rm in}/\lambda =$ 3,761 incident angles with $|\theta_{\rm in}^{\rm substrate}| \le {\rm asin}(1/n_{\rm substrate}) = 43^\circ$ (namely, $|\theta_{\rm in}| \le 90^\circ$ in air); as described in Sec.~\ref{sec:chan_homo_sp}, this is the minimal number of channels we need to specify wavefronts incident from air prior to entering the substrate. For the output projections, we take the total field $E_z(x=L,y)$ immediately after the TiO$_2$ ridges across a width $W_{\rm out} = W + 40\lambda$ in $y$ that is sufficiently large to contain all of the transmitted light, and project it onto the $2W_{\rm out}/\lambda =$ 3,841 propagating plane waves in air with $|\theta_{\rm out}| \le 90^\circ$; this is the minimal number of output projections we need to specify the propagating components of the transmitted light. The input and output matrices are compressed for the computations, following the steps in Sec.~\ref{sec:APF_c}. \section{System-size scaling for metasurface simulations with RCWA and RGF} \begin{figure*}[t] \includegraphics[width=0.85\textwidth]{figs7.pdf} \caption{\label{fig:extra_RGF_RCWA} {\bf System-size scaling for metasurface simulations with RCWA and RGF}. {\bf{a-b}}, Computing time and memory usage of RCWA to simulate metasurfaces with varying widths $W$. {\bf{c-d}}, Corresponding results with RGF. Blue circles are from simulations, green dashed lines are $\mathcal{O}(W^3)$ and $\mathcal{O}(W^2)$ fitting curves, and red circles are the points we extrapolate to to estimate the computing time and memory usage for simulating a mm-wide metasurface, as shown in Fig.~4 of the main text.} \end{figure*} As RCWA and RGF work with dense matrices, they do not scale well with the system size, and simulating the mm-wide metasurface requires more computing resources than we have access to. Therefore, we extrapolate from smaller systems. We fix the thickness of the metasurface, and run RCWA and RGF simulations with increasing metasurface width $W$; the computing time and memory usage are shown as blue circles in Fig.~\ref{fig:extra_RGF_RCWA}. The computing times scale with the expected scaling of $\mathcal{O}(W^3)$ which is the time scaling to invert and to multiply size-$\mathcal{O}(W)$ dense matrices, so we fit the data with $\mathcal{O}(W^3)$ curves (green dashed lines) and extrapolate to a mm-wide metasurface (red circle). Similarly, the memory usages scale as $\mathcal{O}(W^2)$, which we use to extrapolate to a mm-wide metasurface. \section{Angular spectrum propagation \label{sec:ASP}} We use angular spectrum propagation (ASP) to obtain field profile in the free space after the metalens. We express ${E_z}\left( {x,y} \right)$ in terms of its Fourier components ${\tilde E_z}\left( {x,{k_y}} \right)$ as \begin{equation} \label{eq:ASP_IFT} {E_z}\left( {x,y} \right) = \frac{1}{{\sqrt {2\pi } }} \int_{ - \infty}^{\infty} d k_y \, {\tilde E_z}\left( {x,{k_y}} \right) {e^{ i{k_y}y}}. \end{equation} Plugging Eq.~\eqref{eq:ASP_IFT} into Eq.~\eqref{eq:A_psi} with $x \ge L$ [where $\varepsilon_{\rm{r}}(x,y)=1$] gives $\frac{\partial^2}{\partial x^2} {\tilde E_z}\left( {x,{k_y}} \right) = -k_x^2$ with $k_x = \sqrt{(\omega/c)^2-k_y^2}$. As there is no light incident from the right, light must propagate or decay to the right, so \begin{equation} \label{eq:ASP_propagate} {\tilde E_z}\left( {x\ge L,{k_y}} \right) = {\tilde E_z}\left( {x=L,{k_y}} \right)e^{i k_x (x-L)}. \end{equation} Therefore, given the total field ${E_z}\left( {x = L,y} \right)$ immediately after the metasurface, we can take its Fourier transform to obtain ${\tilde E_z}\left( {x=L,{k_y}} \right)$, propagate it forward with Eq.~\eqref{eq:ASP_propagate}, and obtain the field profile anywhere in the free space after the metalens with Eq.~\eqref{eq:ASP_IFT}. This method is called ``angular spectrum propagation'' (ASP)~\cite{2017_Goodman_book}. The evanescent components (for which $|k_y| > \omega/c$) decay exponentially. Since we are not interested in the near-field close to the metasurface, we can ignore the evanescent components, and replace the $\int_{ - \infty}^{\infty} d k_y$ integration range with $\int_{ -\omega/c}^{\omega/c} d k_y$. Therefore, to perform ASP, we only need the propagating Fourier components of ${E_z}\left( {x = L,y} \right)$, which are precisely what's contained in the transmission matrix we computed with APF-c. There is one subtlety. In practice, the continuous integration over $k_y$ must be approximated with a discrete summation. The transmission matrix elements have the transverse wave number $k_y$ of the transmitted light evenly spaced by $2\pi/W_{\rm out}$ as described below Eq.~\eqref{eq:phi_a}. If we perform ASP and the approximated integration directly with such $2\pi/W_{\rm out}$ momentum spacing, it will introduce an artificial periodic boundary with periodicity $W_{\rm out}$; light that reaches the boundary will wrap around and reenter from the other side instead of leaving the domain of interest. Therefore, we need a transverse momentum spacing finer than $2\pi/W_{\rm out}$. To achieve so, we first evaluate ${E_z}\left( {x = L,y} \right)$ using Eq.~\eqref{eq:psi_tot_outside_continuous}, restricting the summation over $b$ to the propagating components contained in the computed transmission matrix. Then, we evaluate its Fourier components \begin{equation} \label{eq:ASP_FT} {\tilde E_z}\left( {x=L,{k_y}} \right) = \frac{1}{{\sqrt {2\pi } }} \int_{ - \infty}^{\infty} dy\, {{E_z}\left( {x=L,y} \right){e^{ - i{k_y}y}}} \end{equation} on a finer grid of transverse momentum $k_y$ spaced by $2\pi/W_{\rm ASP}$. Here, we use $W_{\rm ASP} \approx 2 W$, which is sufficient for eliminating the periodic wrapping artifacts within the domain of interest ($x \lesssim f$, $|y|<W/2$). The integration range $\int_{ - \infty}^{\infty} dy$ in Eq.~\eqref{eq:ASP_FT} can be truncated to the width $W_{\rm out}$ where we perform the output projections, since the field beyond such window is negligibly small. A high resolution of $\Delta x = \lambda/40$ is not necessary for this spatial integration since the refractive index is lower ($n=1$ in air) and since only the propagating components (which vary slowly in $y$) are of interest, so we use a coarser resolution of $\Delta x' = \lambda/8$ for the integration in Eq.~\eqref{eq:ASP_FT}. The evaluations of Eq.~\eqref{eq:psi_tot_outside_continuous}, Eq.~\eqref{eq:ASP_FT}, and then Eq.~\eqref{eq:ASP_IFT} can all be done efficiently with fast Fourier transforms~\cite{2005_Frigo_FFTW3}. ASP is an exact method; when the continuous integrals are not replaced by discrete summations, ASP is mathematically equivalent to the Rayleigh--Sommerfeld diffraction integral~\cite{2022_Cubillos_ANM} used in Ref.~\cite{Pestourie2018_OE} where it was referred to as the equivalent-current formulation. \section{Metalens transmission efficiency and Strehl ratio} The transmission efficiency and the Strehl ratio are important metrics for assessing the performance of a metalens. Here we evaluate the incident-angle dependence of these quantities using the transmission matrix computed with APF-c. We define the transmission efficiency as the total transmitted flux in $x$ direction divided by the total incident flux in $x$ direction. Since our definition of the transmission matrix [as in Eq.~\eqref{eq:psi_tot_outside_continuous}] is already flux-normalized, the transmission efficiency of a truncated incident plane wave with angle $\theta_{\rm in}^{(a)}$ is simply \begin{equation} \label{eq:trans_eff} T_a = \sum\limits_{b} {{{\left| {{t_{ba}}} \right|}^2}}. \end{equation} The Strehl ratio is defined as the actual intensity at the focal spot $|E_z(x=L+f, y=f_{\rm f}|^2$ divided by the would-be intensity $|E_z^{\rm (ideal)}({\bf r}_{\rm f})|^2$ at the focus if perfect diffraction-limited focusing were achieved with the given transmission efficiency. Since the focus location $y_f$ depends on the incident angle and is not clearly defined at large angles where aberrations are significant, we evaluate $|E_z(x=L+f, y=f_{\rm f}|^2$ as $\max_{y} |E_z(x=L+f, y|^2$. With the transmission efficiency adjusted, the Strehl ratio is therefore \begin{equation} {\rm{SR}}(\theta_{\rm in}^{(a)}) = \frac{{\mathop {\max }\limits_y {{{\left| {E_z^{(a)}( {x = L + f,y})} \right|}^2}} }\big/T_a}{|E_z^{\rm (ideal)}({\bf r}_{\rm f})|^2/T_{\rm ideal}}, \end{equation} where the field profile $E_z^{(a)}( {x = L + f,y})$ with incident angle $\theta_{\rm in}^{(a)}$ is computed with angular spectrum propagation as described in Sec.~\ref{sec:ASP}. To compute $|E_z^{\rm (ideal)}({\bf r}_{\rm f})|^2/T_{\rm ideal}$, we let the ideal field profile immediately after the metalens be $E_z^{\rm (ideal)}(x=L,y) = e^{i\Phi_{\rm{hyperbolic}}(y)}$ as in Eq.~\ref{eq:phi_hyperbolic}; its associated transmission efficiency $T_{\rm ideal}$ and field at the focus $E_z^{\rm (ideal)}({\bf r}_{\rm f}) = E_z^{\rm (ideal)}(x=L+f, y=0)$ are then evaluated with the same procedure as above. \section{Locally-periodic approximations} Here we consider the locally-periodic approximation (LPA), which is commonly used when full-wave simulations of the entire metasurface take too much computing resources. As the field $E_z^{(a)}(x = L,y)$ immediately after the metasurface is the only input for the transmission efficiency and angular spectrum propagation, here we use LPA to approximate $E_z^{(a)}(x = L,y)$. We consider two LPA formalisms, referred to as LPA I and LPA II here. In both formalisms, the approach is to divide the metasurface into individual unit cells and assume that the response of each unit cell can be described by the unit-cell simulations in Sec.~\ref{sec:design_meta} and Fig.~\ref{fig:metalens_design} performed for an individual unit cell under Bloch periodic boundary condition. The unit-cell simulations have incident fields $E_z^{{\rm in},p}(x,y) = \frac{E_0}{\sqrt{\Lambda k_x^{(a, {\rm L})}}} \exp\left[i k_x^{(a, {\rm L})} x + i k_y^{(a, {\rm L})} (y-y_p) \right]$ where $y_p = (p-1)\Lambda$ is the starting position of the $p$-th unit cell, while for the full-metasurface simulation we want the incident field to be $E_z^{{\rm in}}(x,y) = \frac{E_0}{\sqrt{W k_x^{(a, {\rm L})}}} \exp\left[i k_x^{(a, {\rm L})} x + i k_y^{(a, {\rm L})} y \right]$, so a prefactor of $\sqrt{\Lambda/W} \exp\left[i k_y^{(a, {\rm L})} y_p \right]$ needs to be added. Let $E_z^{(a),p}(x,y)$ with $0\le y \le \Lambda$ be the total field from simulation of the $p$-th unit cell with incident angle $\theta_a$. Then, LPA II simply stitches together such unit-cell field profiles to approximate $E_z^{(a)}(x = L,y)$, as \begin{equation} E_z^{\left( a \right){\textrm{LPA-II}}}\left( {x = L,y} \right) = \sqrt{\frac{{ \Lambda }}{{ W }}} \sum\limits_{p = 1}^{{N_p}} { {e^{i k_y^{(a, {\rm L})} y_p }} E_z^{(a),p}(x=L,y-y_p)} \Pi_p(y), \end{equation} where $N_p =$ 4,178 is the unit of unit cells, and $\Pi_p(y)$ is a rectangular function that equals 1 when $y_p \le y \le y_p+\Lambda$, 0 elsewhere. LPA II includes all propagating and evanescent components of the unit-cell simulations, all of which are contained in $E_z^{(a),p}(x,y)$. Oftentimes, only the zeroth-order ({\it i.e.}, $a=b=0$) transmission coefficient of the unit cell is considered. Therefore, LPA I uses \begin{equation} E_z^{\left( a \right){\textrm{LPA-I}}}\left( {x = L,y} \right) = \sqrt{\frac{{ \Lambda }}{{ W }}} \sum\limits_{p = 1}^{{N_p}} { {e^{i k_y^{(a, {\rm L})} y_p }} E_z^{(a),p; {\rm prop}}(x=L,y-y_p)} \Pi_p(y), \end{equation} where \begin{equation} E_z^{(a),p; {\rm prop}}(x=L,y) = t_p \frac{e^{i k_y^{(a, {\rm R})} y }}{\sqrt{\Lambda k_x^{(a, {\rm R})}}}, \quad 0\le y \le \Lambda \end{equation} is the zeroth-order propagating component of the $p$-th unit cell as in Eq.~\eqref{eq:psi_tot_outside_continuous}, with $t_p$ being the corresponding transmission coefficient. Since $\Lambda < \lambda/2$ here, this zeroth-order component is the only propagating component on the transmitted side. Given the approximate $E_z^{(a)}(x = L,y)$, we then use the same angular spectrum propagation procedure to obtain the approximate $E_z^{(a)}(x = L+f,y)$. \begin{figure*}[t] \includegraphics[width=0.85\textwidth]{figs8.pdf} \caption{\label{fig:APF_c_char} {\bf Compression error of APF-c}. {\bf{a--b}}, Angle dependence of the relative compression error for different truncation window widths $w_{\rm{t}}$ for the mm-wide hyperbolic metalens ({\bf a}) and quadratic metalens ({\bf b}), with the number of padded channels fixed at $M_{\rm{pad}} =$ 2,000. {\bf{c--d}}, Compression error for different choices of $M_{\rm{pad}}$ with the truncation window width fixed at $w_{\rm{t}} = 10 \lambda$. The red curves, with $w_{\rm{t}} = 10 \lambda$ and $M_{\rm{pad}} =$ 2,000, correspond to the choice used for Figs.~4--5 in the main text. } \end{figure*} \section{APF-c compression error \label{sec:APF_c_error}} As described in Sec.~\ref{sec:APF_c}, the APF-c compression error can be reduced to arbitrarily small by increasing the truncation window $w_{\rm{t}}$ and/or by padding $M_{\rm{pad}}$ additional channels. Here, we characterize the APF-c compression error of the metalens systems. As described in the main text, we compute the relative $\ell^2$-norm error ${\left\| I - I_0 \right\|_2}/{\left\| I_0 \right\|_2}$, with $I_0$ being a vector containing the intensity $|E_z^{(a)}(x = L+f,y)|^2$ at the focal plane within $|y|<W/2$ calculated from APF without compression, and $I$ from APF-c. Fig.~\ref{fig:APF_c_char} plots the error as a function of the incident angle for varying $w_{\rm{t}}$ and $M_{\rm{pad}}$. The same $w_{\rm{t}}$ and $M_{\rm{pad}}$ is used on both the left (incident) and the right (transmitted) sides. \begin{figure*}[t] \includegraphics[width=0.88\textwidth]{figs9.pdf} \caption{\label{fig:dis_error} {\bf Discretization error}. Discretization error of ({\bf{a}}) FDFD, characterized by $\Phi_{\rm{FDFD}}^{\Delta x = \lambda/40} - {\Phi_{\rm{FDFD}}^{\Delta x = \lambda/240}}$, and ({\bf{b}}) RCWA, characterized by $\Phi_{\rm{RCWA}}^{{\rm numG}=5} - {\Phi_{\rm{RCWA}}^{{\rm numG}=99}}$, for the meta-atom zeroth-order transmission phase shifts. } \end{figure*} \section{Discretization error\label{sec:discretization_error}} The grid size $\Delta x$ in the finite-difference discretization and the number of Fourier components in RCWA are chosen to ensure sufficient accuracy, which we describe here. For metalenses, the most important property is the transmission phase shift. Figure~\ref{fig:dis_error}a shows the discretization error of the zeroth-order transmission phase shift, $\Phi_{\rm{FDFD}}^{\Delta x = \lambda/40} - {\Phi_{\rm{FDFD}}^{\Delta x = \lambda/240}}$, of the unit cells described in Sec.~\ref{sec:design_meta}. We see that the discretization error is negligible away from the resonances, and the error at the resonances arises because the angle at which the resonance exists is highly sensitive on the structure. Here, the wrapped $|\Phi_{\rm{FDFD}}^{\Delta x = \lambda/40} - {\Phi_{\rm{FDFD}}^{\Delta x = \lambda/240}}|$ averaged over angles and ridge widths is 0.11 radian. So, we use $\Delta x = \lambda/40$ for the metasurface simulations using APF and using MaxwellFDFD. Similarly, Figure~\ref{fig:dis_error}b shows the discretization error of the transmission phase shift for RCWA, $\Phi_{\rm{RCWA}}^{{\rm numG}=5} - {\Phi_{\rm{RCWA}}^{{\rm numG}=99}}$, where ${\rm numG}$ is the number of Fourier components used in the unit cell simulations. The error is comparable to Fig.~\ref{fig:dis_error}a, with averaged $|\Phi_{\rm{RCWA}}^{{\rm numG}=5} - {\Phi_{\rm{RCWA}}^{{\rm numG}=99}}|$ being 0.10 radian. So, we use 5 Fourier components per unit cell (11 Fourier components per $\lambda$) for the metasurface benchmarks with RCWA. We checked that FDFD and RCWA give consistent results, with $|{\Phi_{\rm{FDFD}}^{\Delta x = \lambda/240}} - {\Phi_{\rm{RCWA}}^{{\rm numG}=99}}|$ averaging to 0.03 radian. \section{Captions for supplementary movies\label{sec:movies}} \noindent {\bf Movie S1.} Intensity profile of light transmitted through the mm-wide hyperbolic metalens as the incident angle varies. The profiles are normalized such that the incident flux is the same for all incident angles, and the colorbar is saturated near normal incidence in order to show the profiles at oblique incidence. The Strehl ratio and transmission efficiency is also shown. \smallskip \smallskip \smallskip \noindent {\bf Movie S2.} Corresponding intensity profiles for the quadratic metalens. \bibliographystyle{naturemag}
\section{Introduction\label{sec:Introduction}} In many settings\textemdash e.g., education, career choices, and migration decisions\textemdash estimating the causal effects of a series of different treatments is valuable. Identifying treatment effects in settings with multiple treatments using instruments has, however, proven challenging \citep{HeckmanEtal2008_Annales,HeckmanPinto2018,lee2018identifying}. One approach\textemdash valid under homogenous effects\textemdash is to estimate a ``multivariate'' two-stage least squares (2SLS) with indicators for receiving various treatments as multiple endogenous variables and at least as many instruments. But under heterogeneous effects this multivariate 2SLS does not generally identify meaningful local average treatment effects \citep{kirkeboen2016,Mountjoy2019}. To fix ideas about the identification problem, consider a case with three mutually exclusive and collectively exhaustive treatments\textemdash $T\in\left\{ 0,1,2\right\} $\textemdash and a vector of valid instruments $Z$. Let $\beta_{1i}$ and $\beta_{2i}$ be the causal effects of receiving treatments $1$ and $2$, respectively, for agent $i$ on an outcome variable, relative to receiving the excluded treatment $0$. Then, the 2SLS estimate of the causal effect of receiving treatment $1$ is, in general, a weighted sum of $\beta_{1i}$ and $\beta_{2i}$ across agents, where the weights can be negative. Thus, the estimated effect of treatment $1$ can both put \emph{negative }weight on the effect of treatment $1$ for some agents \emph{and} be contaminated by the effect of treatment $2$. In severe cases, the estimated effect of treatment $1$ can be negative even though $\beta_{1i}>0$ for all agents. The existing literature has, however, not clarified the exact conditions under which the 2SLS estimate of the effect of treatment $1$ \emph{assigns proper weights}\textemdash non-negative weight on $\beta_{1i}$ and zero weight on $\beta_{2i}$. In this paper, we present two necessary and sufficient conditions for multivariate 2SLS to assign proper weights\emph{\textemdash average monotonicity }and \emph{no cross effects}. Our results apply in the general case with $n$ treatments and $m\geq n$ instruments, but for expositional ease we continue with the three-treatment example. When does the 2SLS estimate of receiving treatment $1$ put non-negative weight on $\beta_{1i}$ and zero weight on $\beta_{2i}$? To develop intuition about the required conditions, assume we run 2SLS with the following two instruments: the linear projection $P_{1}$ of an indicator for receiving treatment $1$ on the instrument vector $Z$ and the linear projection $P_{2}$ of an indicator for receiving treatment $2$ on the instrument vector $Z$.\footnote{This specification is numerically equivalent to running 2SLS with the full vector of instruments.} The first condition\textemdash average monotonicity\textemdash requires that $P_{1}$ does not, on average, induce agent $i$ out of treatment $1$.\footnote{This condition generalizes \citet{FrandsenEtAl2019}'s average monotonicity condition to multiple treatments and is substantially weaker than the Imbens-Angrist monotonicity condition \citep{imbens1994identification}.} The second condition\textemdash no cross effects\textemdash requires that, conditional on $P_{1}$, $P_{2}$ does not, on average, induce agent $i$ into or out of treatment $1$. The latter condition is necessary to ensure zero weight on $\beta_{2i}$ and is particular to the case with multiple treatments.\footnote{\citet{BehagheletAl2013} show that requiring no cross effects is \emph{sufficient} to ensure that 2SLS assigns proper weights in a setting with three treatments and an instrument that can take on exactly three values. \citet{kline2016evaluating} discuss a similar result in the case of a binary instrument. We show that this condition is not only sufficient but also \emph{necessary}. Moreover, we show how these results generalize to the case of $n$ treatments and $m\geq n$ discrete or continuous instruments, and provide choice-theoretic characterizations.} Notably, both of the conditions outlined above can be tested empirically. For instance, one can regress an indicator for receiving treatment $1$ on the projected instruments $P_{1}$ and $P_{2}$ on subsamples and test for whether the coefficient on $P_{1}$ is non-negative and whether the coefficient on $P_{2}$ is zero. Moreover, we show that these conditions are satisfied under the classical Imbens-Angrist (IA) monotonicity condition \citep{imbens1994identification} and an easily testable linearity condition: the conditional expectation of $P_{1}$ must be a linear function of $P_{2}$, and vice versa. Thus, when IA monotonicity can be defended, and the projections $P_{1}$ and $P_{2}$ are shown to be linearly related, multivariate 2SLS assigns proper weights. Building upon our general identification results, we consider a prominent special case: the just-identified multivariate 2SLS with $n$ mutually exclusive treatments and $n$ mutually exclusive binary instruments. This case is a natural generalization of the canonical setting with a binary treatment and a binary instrument to multiple treatments. A typical application is a randomized controlled trial where each agent is randomly assigned to one of $n$ treatments, but compliance is imperfect. In this scenario, our two conditions require that each instrument affects exactly one treatment indicator. Consider a researcher who seeks to identify treatment effects under \emph{unordered choice}\textemdash the effect of treatment $k$ relative to an excluded treatment\textemdash and specifies a 2SLS model with indicators for all treatments except the excluded treatment. In this case, our conditions require there to be a labelling of the instruments such that instrument $k$ moves agents only from the excluded treatment into treatment $k$. Our conditions thus give rise to a powerful test in just-identified models: If 2SLS assigns proper weights, each instrument must affect exactly one treatment indicator in a first-stage IV regression. This test can be applied both in the whole population and in subsamples. The requirement that each instrument affects exactly one choice margin restricts choice behavior in a particular way. In just-identified models with unordered treatments, 2SLS assigns proper weights only when choice behavior can be described by a selection model where the excluded treatment is always either the preferred alternative or the next-best. It is thus not sufficient that each instrument influences the utility of only one choice alternative. For instance, an instrument that affects only the utility of receiving treatment 1 could still affect take-up of treatment 2 by inducing agents who would otherwise have selected into treatment 2 to select treatment 1. Such cross effects are avoided if the excluded treatment is always at least the next-best alternative. To apply 2SLS in the just-identified unordered case, the researcher thus needs to argue why the excluded treatment is always either the best or the next-best alternative. In the ideal scenario, the researcher has access to data on agents' next-best alternatives. Such data is exploited by \citet{kirkeboen2016} and a literature that followed \citep{heinesen2019returns,dahl2020family,altmejd2021brother,nibbering2022clustered} by running a 2SLS regression on the subsample of agents with treatment $k$ as their next-best alternative to estimate treatment effects relative to treatment $k$. \citet{kirkeboen2016} show that this approach is valid under monotonicity and a relatively weak irrelevance condition. We show that their conditions\textemdash monotonicity, irrelevance, and agents in the estimation sample having treatment $k$ as their next-best alternative\textemdash are equivalent to our conditions, with the only exception that our conditions allow for always-takers. Thus, our results imply that having knowledge about next-best alternatives is, essentially, \emph{necessary} for 2SLS to estimate meaningful treatment effects in just-identified models. In other settings, researchers might not have access to data on next-best alternatives, but instead need to argue why it is likely that agents in the estimation sample all have the excluded treatment as their next-best alternative. A notable setting where such an argument can be made is when there are three treatments and the excluded treatment is ``in the middle''. For example, when estimating the effect of attending two different schools compared to a third ``control'' school on student outcomes one might argue that the control school is never the least preferred option if it is located between the two other schools. Until now we have considered unordered treatment effects\textemdash treatment effects relative to an excluded treatment. Our results, however, also apply to any other relative treatment effects a researcher might seek to estimate through 2SLS. An important case is \emph{ordered treatment effects}\textemdash the effect of treatment $k$ relative to treatment \emph{k-1}. In the ordered case, the just-identified 2SLS assigns proper weights if and only if there exists a labelling of the instruments such that instrument $k$ moves agents only from treatment \emph{k-1} to treatment $k$. As in the unordered case, this condition can be tested both in the full population and in subsamples. The condition also imposes a particular restriction on agents' choice behavior. In particular, we show that 2SLS assigns proper weights in just-identified ordered choice models only when agents' choices can be described by single-peaked preferences over treatments. When treatments have a natural ordering\textemdash such as years of schooling\textemdash the researcher might be able to make a strong theoretical case in favor of such preferences. We finally present another special case of ordered choice where our conditions are satisfied: a classical threshold-crossing model applicable when treatment assignment depends on a single index crossing multiple thresholds. For instance, treatments can be grades and the latent index the quality of the student's work, or treatments might be years of prison and the latent index the severity of the committed crime. If the researcher has access to exogenous shocks to these thresholds, for instance through random assignment to judges or graders that agree on ranking but use different cutoffs, then IA monotonicity is satisfied. Thus, 2SLS assigns proper weights provided that predicted treatments are linearly related\textemdash an easily testable condition. To illustrate the implications of our results, we discuss three applications. First, we consider separately estimating the causal effects of finishing primary education and high school in Norway, using exposure to a compulsory school reform \citep{Black.2005,BhullerEtAl2017} and availability of local high schools as instruments. In this setting, one might argue that each school instrument only affects the utility of obtaining the corresponding level of schooling and that preferences are single-peaked. But we find that, while exposure to the compulsory school reform strongly increases the probability of completing compulsory schooling, this reform also increases the probability of obtaining a high school diploma. According to our identification results, the presence of such cross effects in a just-identified model necessarily implies that a multivariate 2SLS does not estimate meaningful treatment effects. We can thus conclude that 2SLS can not separately identify the effect of completing compulsory schooling and achieving a high school diploma using these instruments. This negative result could be due to one instrument affecting the utility of both levels of schooling or to agents not having single-peaked preferences. In a second application, we consider the feedback effects of a trial judge's criminal sentence being reversed by an appeal court on the judge's future decision-making, as studied in \citet{BhullerSigstad2021}. We are interested in separately identifying the effects of reversals increasing the trial judge's sentence and reversals decreasing the sentence, using as instruments the tendencies of randomly assigned appeal panels of increasing and reducing sentences, respectively. This setting can be analyzed by a threshold-crossing model. According to our theoretical results, if appeal panels agree on how to rank appeals but use different cutoffs for increasing and reducing sentences, 2SLS assigns proper weights. Applying our proposed test on various sub-samples, we consistently find a positive relationship between the appeal panel's tendency of increasing (decreasing) sentences and sentence increases (decreases). We also do not detect any statistically significant relationship between the appeal panel's tendency of increasing (decreasing) sentences and sentence decreases (increases). Thus, in this setting, we can not reject that the multivariate 2SLS identifies a positively weighted sum of of individual treatment effects. The third application considers a generic case where a multivariate 2SLS is specified to assess treatment effect heterogeneity across different pre-determined subpopulations. For instance, in settings with a binary treatment, a binary instrument, and a binary indicator that distinguishes two subpopulations, the researcher might specify a multivariate 2SLS with multiple treatments and multiple instruments, by interacting both the binary treatment and the binary instrument with the binary indicator. In this case, we show that the multivariate 2SLS assigns proper weights under the same conditions necessary to identify a positively weighted sum of individual treatment effects for each subpopulation using univariate 2SLS. Our paper contributes to a growing literature on the use of instruments to identify causal effects in settings with multiple treatments \citep{HeckmanEtal2008_Annales,kline2016evaluating,kirkeboen2016,HeckmanPinto2018,lee2018identifying,Galindo2020Empirical} or multiple instruments \citep{MogstadEtAl2019,Goff2020Vector,mogstad2020policy}. Our main contribution is to provide the exact conditions under which 2SLS with multiple treatments assigns proper weights under arbitrary treatment effect heterogeneity. We allow for any number of treatments, any number of continous or discrete instruments, and any definition of treatment indicators. Moreover, we show how the conditions can be tested. In the case of just-identified models with unordered treatments, we provide several new results. First, we extend the results of \citet{BehagheletAl2013} who show that 2SLS assigns proper weights in a just-identified model with three treatments under an extended monotonicity condition. We show that \citet{BehagheletAl2013}'s condition is not only sufficient but also \emph{necessary} for 2SLS to assign proper weights, after a possible permutation of the instruments. This non-trivial result gives rise to a new powerful test in just-identified models: For 2SLS to assign proper weights each instrument can only affect one treatment. We also contribute to a literature exploiting knowledge of next-best alternatives for identification in just-identified models \citep{kirkeboen2016,heinesen2019returns,dahl2020family,altmejd2021brother,nibbering2022clustered}. We show that the conditions invoked in this literature are not only sufficient for 2SLS to assign proper weights but also close to necessary\textemdash the only possible relaxation is to allow for always-takers. The implication of this result is that knowledge of next-best alternatives is, essentially, necessary for 2SLS to assign proper weights. Such knowledge is implicitly assumed whenever 2SLS is applied to just-identified models with multiple treatments. Another key contribution of our paper is that we provide choice-theoretic characterizations highlighting the implicit assumptions being made about choice behavior in just-identified models. We also provide new identification results for ordered choice models. First, we show when 2SLS with multiple ordered treatments identifies separate treatment effects in a standard threshold-crossing model considered in the ordered choice literature (e.g., \citealt{carneiro2003understanding,cunha2007identification,Heckman2007EconometricII}). While \citet{Heckman2007EconometricII} show that local IV identifies ordered treatment effects in such a model, we show that 2SLS can also identify the effect of each individual treatment transition under an easily testable linearity condition. We also show how the result of \citet{BehagheletAl2013} extends to ordered treatment effects and clarify the implicit behavioral assumptions being invoked when 2SLS is applied in just-identified models with ordered treatments. In contrast to \citet{HeckmanPinto2018}, who provide general identification results in a setting with multiple treatments and discrete instruments, we focus specifically on the properties of 2SLS\textemdash a standard and well-known estimator. Other contributions to the literature on identification in models with multiple treatments \citep{Mountjoy2019,Galindo2020Empirical,lee2018identifying} develop identification results using other methods than 2SLS. As opposed to developing new identification methods, our focus is narrower\textemdash identifying the exact conditions under which multivariate 2SLS is a valid approach\textemdash contributing to a recent body of research assessing the robustness of standard estimators to heterogeneous effects (\emph{e.g.}, \citealt{de2020two,de2020two_several,callaway2020difference,goodman2021difference,sun2020estimating,borusyak2021revisiting,goldsmith2021estimating}). In Section \ref{sec:general}, we develop the exact conditions for the multivariate 2SLS to assign proper weights to agent-specific causal effects and discuss how these conditions can be tested. In Section \ref{sec:special}, we consider two special cases\textemdash the just-identified case and a threshold-crossing model. In Section \ref{sec:applications}, we illustrate the implications of our identification results in three different applications. Section \ref{sec:Conclusion} concludes. Proofs and additional results are in the Appendix. \section{Multivariate 2SLS with Heterogeneous Effects\label{sec:general}} In this section, we develop sufficient and necessary conditions for the multivariate 2SLS to identify a positively weighted sum of individual treatment effects under heterogeneous effects and explain how these conditions can be tested. \subsection{Definitions} Consider a probability space $\left(\Omega,\mathcal{F},\Pr\right)$. An outcome $\omega\in\Omega$ corresponds to an agent $\omega$. In this probability space, define the following random variables: A multi-valued treatment $T\in\mathcal{T}\equiv\left\{ 0,1,\dots,n\right\} $, an outcome $Y\in\mathbb{R}$, and a vector-valued instrument $Z\in\mathcal{Z}\subseteq\mathbb{R}^{m}$ with $m\geq n$.\footnote{We do not consider control variables in this paper. Linear regression models with multiple treatments and control variables exhibit a distinct problem for interpreting estimates under heterogeneous effects \citep{goldsmith2021estimating}. Also, using control variables can cause problems with interpreting IV estimates even when there is only one treatment unless they are controlled for non-parametrically \citep{blandhol2022tsls}.} Define by $\mathcal{S}$ all possible mappings $f:\mathcal{Z}\rightarrow\mathcal{\mathcal{T}}$ from instrument values to treatments\textemdash all possible ways the instrument can affect treatment. Following \citet{HeckmanPinto2018}, we refer to the elements of $\mathcal{S}$ as \emph{response types}. The random variable $S\in\mathcal{S}$ describes agents' \emph{potential treatment choices}: If $S\left(\omega\right)=s$, then $s\left(z\right)$ for $z\in\mathcal{Z}$ indicates the treatment selected by agent $\omega$ if $Z$ is set to $z$. The response type of an agent describes how the agent's choice of treatment reacts to changes in the instrument. For example, in the case with a binary treatment and a binary instrument, the possible response types are \emph{never-takers }($s\left(0\right)=s\left(1\right)=0$),\emph{ always-takers} ($s\left(0\right)=s\left(1\right)=1$),\emph{ compliers }($s\left(0\right)=0$, $s\left(1\right)=1$),\emph{ }and\emph{ defiers }($s\left(0\right)=1$, $s\left(1\right)=1$)\emph{.} Similarly, define $Y\left(t\right)$ for $t\in\mathcal{\mathcal{T}}$ as the agent's \emph{potential outcome} when $T$ is set to $t$. We maintain the following standard IV assumptions throughout: \begin{assumption} \label{assu:iv}(Exogeneity and Exclusion). $\left\{ Y\left(0\right),\dots,Y\left(n\right),S\right\} \perp Z$ \end{assumption} \begin{assumption} \label{assu:rank}(Rank). $\Cov\left(Z,D\right)$ has full rank. \end{assumption} The treatment effect of treatment $k$ relative to treatment $l$ is given by $Y\left(k\right)-Y\left(l\right)$. Using 2SLS, we can seek to estimate $n$ of these treatment effects by defining treatment indicators $D\equiv\left\{ D_{1},\dots,D_{n}\right\} $ where $D_{t}\equiv\mathbf{1}\left[T\in R_{t}\right]$ for subsets $R_{t}\subset\left\{ 0,1,\dots,n\right\} $. Denote by the random vector $\beta\equiv\left(\delta_{1},\delta_{2},\dots,\delta_{n}\right)^{T}$ the treatment effects we seek to estimate. We will consider two important special cases of treatment effects. First, we might aim to estimate the causal effect of each treatment $T>0$ compared to the \emph{excluded treatment $T=0$. }In this case, we let $\delta_{t}=Y\left(t\right)-Y\left(0\right)$ and $D_{t}=\mathbf{1}\left[T=1\right]$. We refer to this case as \emph{unordered choice.}\footnote{The more general case of unordered choice\textemdash where the researcher seeks to estimate \emph{all} relative treatment effects\textemdash could be analyzed by varying which treatment is considered the excluded treatment.}\emph{ }Second, we might seek to estimate the effects $\delta_{t}=Y\left(t\right)-Y\left(t-1\right)$ by using treatment indicators $D_{t}=\mathbf{1}\left[T\geq t\right]$. We refer to the latter case as \emph{ordered choice}. In Figure \ref{treatment_network}, we show the two special cases and a third generic case as directed graphs where an arrow from $T=l$ to $T=k$ represents the treatment effect $Y\left(k\right)-Y\left(l\right)$. By using different treatment indicators one can estimate any subset of $n$ treatment effects that connects the treatments in an acyclic graph.\footnote{Formally, when $\delta_{t}=Y\left(k\right)-Y\left(l\right)$, one can define $D_{t}=\mathbf{1}\left[T\in R_{t}\right]$ where $R_{t}$ is the set of all treatments that are connected to $l$ through $k$ in the graph of treatment effects.} Unless otherwise specified, our results hold for any definition of $\beta$ and $D$. But to ease exposition we focus on the unordered treatment case\textemdash $\delta_{t}=Y\left(t\right)-Y\left(0\right)$ and $D_{t}=\mathbf{1}\left[T=1\right]$\textemdash when interpreting our results. Occasionally, we will thus refer to $D_{t}$ as ``treatment $t$'' instead of ``treatment indicator $t$''. For a response type $s\in\mathcal{S}$, define by $v_{s}$ the induced mapping between instruments and treatment indicators: $v_{s}\left(z\right)\equiv\left(s_{1}\left(z\right),\dots,s_{n}\left(z\right)\right)^{T}$ for all $z\in\mathcal{Z}$ with $s_{t}\left(z\right)\equiv\mathbf{1}\left[s\left(z\right)\in R_{t}\right]$. The function $v_{s}$ is just another way to summarize the choice behavior of response type $s$. Define the 2SLS estimand $\beta^{2SLS}=\left(\beta_{1}^{2SLS},\dots,\beta_{n}^{2SLS}\right)^{T}$by \[ \beta^{2SLS}\equiv\Var\left(P\right)^{-1}\Cov\left(P,Y\right) \] where $P$ is the linear projection of $D$ on $Z$ \[ P=\left(P_{1},\dots,P{}_{n}\right)^{T}\equiv\E\left[D\right]+\Var\left(Z\right)^{-1}\Cov\left(Z,D\right)\left(Z-\E\left[Z\right]\right) \] We refer to $P$ as \emph{predicted treatment}\textemdash the best linear prediction of the treatment indicators given the value of the instruments. Similarly, we refer to $P_{k}$ for $k\in\left\{ 1,\dots,n\right\} $ as \emph{predicted treatment $k$.} Since 2SLS using predicted treatments as instruments is numerically equivalent to using the original instruments, we can think of $P$ as our instruments. In particular, $P$ is a linear transformation of the original instruments $Z$ such that we get one instrument corresponding to each treatment indicator. We will occasionally use language such as ``the effect of $P_{k}$ on treatment $l$''. \begin{figure}[H] \caption{Treatment Effects Corresponding to Different 2SLS Specifications.} \begin{centering} \label{treatment_network}\subfloat[Unordered Choice.\bigskip{} ]{ \centering{}\includegraphics[width=0.2\textwidth]{fig/treatment_network2}} \par\end{centering} \begin{centering} \subfloat[Ordered Choice.\bigskip{} ]{ \centering{}\includegraphics[width=0.45\textwidth]{fig/treatment_network3}} \par\end{centering} \begin{centering} \subfloat[Generic Example.\bigskip{} ]{ \centering{}\includegraphics[width=0.33\textwidth]{fig/treatment_network1}} \par\end{centering} \begin{singlespace} {\scriptsize{}\medskip{} }{\scriptsize\par} \end{singlespace} \emph{\scriptsize{}Note: }{\scriptsize{}Directed acyclic graphs showing the treatment effects estimated for different treatment indicators. An arrow from $T=k$ to $T=l$ represents the treatment effect $Y\left(k\right)-Y\left(l\right)$. In Figure (a), treatment effects $\delta_{t}=Y\left(t\right)-Y\left(0\right)$ and treatment indicators $D_{t}=\mathbf{1}\left[T=t\right]$. In Figure (b), treatment effects $\delta_{t}=Y\left(t\right)-Y\left(t-1\right)$ and treatment indicators $D_{t}=\mathbf{1}\left[T\geq t\right]$. In Figure (c), \[ \beta=\left[\begin{array}{c} Y\left(1\right)-Y\left(2\right)\\ Y\left(0\right)-Y\left(2\right)\\ Y\left(0\right)-Y\left(3\right)\\ Y\left(4\right)-Y\left(0\right) \end{array}\right]\text{ and }D=\left[\begin{array}{c} \mathbf{1}\left[T=1\right]\\ \mathbf{1}\left[T\in\left\{ 0,3,4\right\} \right]\\ \mathbf{1}\left[T\in\left\{ 0,1,2,4\right\} \right]\\ \mathbf{1}\left[T=4\right] \end{array}\right]. \] }{\scriptsize\par} \end{figure} \subsection{Identification Results\label{subsec:Identification}} What does multivariate 2SLS identify under Assumptions \ref{assu:iv} and \ref{assu:rank} when treatment effects are heterogeneous across agents? The following proposition expresses the 2SLS estimand as a weighted sum of average treatment effects across response types in the general case of $n$ treatments and $m$ instruments. \begin{prop} \label{prop:weights}Under Assumptions \ref{assu:iv} and \ref{assu:rank} \[ \beta^{2SLS}=\E\left[w_{S}\beta_{S}\right] \] where for $s\in\mathcal{S}$ \[ w_{s}\equiv\Var\left(P\right)^{-1}\Cov\left(P,v_{s}\left(Z\right)\right) \] \[ \beta_{s}\equiv\left(\beta_{s1},\dots,\beta_{sn}\right)^{T}\equiv\E\left[\beta\mid S=s\right] \] \end{prop} In the case of a binary treatment and a binary instrument, $\beta^{2SLS}$ is a weighted sum of average treatment effects for compliers and defiers. Proposition \ref{prop:weights} is a generalization of this result to the case with $n$ treatments and $m$ instruments. In this general case, $\beta^{2SLS}$ is a weighted sum of the average treatment effects of all response types present in the population. The vector $\beta_{s}$ describes the average treatment effects for agents of response type $s$. The weight matrix $w_{s}$ summarizes how the treatment effects of agents of response type $s$ contribute to the estimated coefficients. The diagonal elements of $w_{s}$ indicate how the average effects of treatment $k$ of agents with response type $s$ contribute to the estimated effect of treatment $k$. Without further restrictions, these weights could be both positive and negative. The off-diagonal elements of $w_{s}$ describe how the average effects of treatment $k$ for response type $s$ contribute to the estimated effect of treatment $l$ for $l\neq k$. In general, thus, all treatment effects for response type $s$ can contribute, either positively or negatively, to all estimated treatment effects. In the canonical case of a binary treatment and a binary instrument, identification is ensured when there are no defiers. The aim of this paper is to generate similar restrictions on the possible response types in the case of multiple treatments. To become familiar with our notation and the implications of Proposition \ref{prop:weights}, consider the following example. \begin{example} Consider the case of three treatments and two mutually exclusive binary instruments: $n=2$ and $\mathcal{Z}=\left\{ \left(0,0\right),\left(1,0\right),\left(0,1\right)\right\} $. Assume we are interested in the treatment effects $\delta_{1}=Y\left(1\right)-Y\left(0\right)$ and $\delta_{2}=Y\left(2\right)-Y\left(0\right)$ with corresponding treatment indicators $D_{1}=\mathbf{1}\left[T=1\right]$ and $D_{2}=\mathbf{1}\left[T=2\right]$. One possible response type in this case is defined by \[ s\left(z\right)=\begin{cases} 1 & \text{if }z=\left(0,0\right)\\ 1 & \text{if }z=\left(1,0\right)\\ 2 & \text{if }z=\left(0,1\right) \end{cases} \] Response type $s$ thus selects $D_{1}$ unless $Z_{2}$ is turned on. When $Z_{2}=1$, $s$ selects $D_{2}$. Assume the best linear predictors of the treatments indicators are $P_{1}=0.4\left(1-Z_{1}-Z_{2}\right)$ and $P_{2}=0.7\times Z_{2}$ and that all instrument values are equally likely. If response type $s$ were present in the population, the weights on the average treatment effects of response type $s$ would be \[ w_{s}=\left[\begin{array}{cc} 0 & 0\\ -\frac{1}{7} & \frac{1}{7} \end{array}\right] \] The average effect of $D_{2}$ for response type $s$ thus contributes positively to the estimated effect of $D_{2}$ ($\beta_{2}^{2SLS}$) and negatively to the estimated effect of $D_{1}$ ($\beta_{1}^{2SLS}$). The presence of this response type in the population would be problematic. The response type \[ s\left(z\right)=\begin{cases} 0 & \text{if }z=\left(0,0\right)\\ 0 & \text{if }z=\left(1,0\right)\\ 2 & \text{if }z=\left(0,1\right) \end{cases} \] on the other hand, has weight matrix \[ w_{s}=\left[\begin{array}{cc} 0 & 0\\ 0 & \frac{10}{7} \end{array}\right] \] The effect of $D_{2}$ for this response type only contributes to the estimated effect of $D_{2}$. Two-stage least squares thus assigns proper weights on this response type's average treatment effects.\hfill{}$\square$ \end{example} \medskip{} Under homogeneous effects, the weight 2SLS assigns the treatment effects of a particular response type is not a cause of concern. By the following corollary of Proposition \ref{prop:weights}, the off-diagonal weights are zero on average and the diagonal weights are, on average, positive: \begin{cor} \label{cor:weights-multiple}The 2SLS estimand $\beta_{k}^{2SLS}$ is a weighted sum of $\beta_{sk}$ and $\beta_{sl}$ with $l\neq k$ where the weights on the first sum to one and the weights on the latter sum to zero. \end{cor} But under heterogeneous effects the contributions of the average effects of treatment $k$ to the estimate of treatment effect $l\neq k$ might not cancel each other out. This makes interpreting 2SLS estimates hard. Ideally, we would like the diagonal elements of $w_{s}$ to be non-negative, and the off-diagonal elements of $w_{s}$ to be zero for all $s$. Only in that case can we interpret the 2SLS estimate of the effect of treatment $k$ as a positively weighted average of the effect of treatment $k$ under heterogeneous effects. Throughout the rest of the paper, we say that 2SLS assigns \emph{proper weights }if and only if the matrix $w_{s}$ is a non-negative diagonal matrix for all $s$: \begin{defn} 2SLS assigns \emph{proper weights }if for each $k$, $l\neq k$, and $s\in\supp\left(S\right)$, the 2SLS estimand $\beta_{k}^{2SLS}$ places non-negative weights on $\beta_{sk}$ and zero weights on $\beta_{sl}$. \end{defn} When is $w_{s}$ a non-negative diagonal matrix? To gain intuition, note that the formula determining $w_{s}$ is the same as the coefficients obtained from hypothetical regressions of the potential treatments $v_{s}\left(Z\right)=\left\{ s_{1}\left(Z\right),\dots,s_{k}\left(Z\right)\right\} $ on the predicted treatment indicators $P$. Thus, the weights on a response type's average treatment effects in the 2SLS estimand have the same sign as the partial correlations between the response type's potential treatments and the predicted treatment across values of the instrument. For $k\in\left\{ 1,\dots.n\right\} $, define $P_{-k}$ as all predicted treatments indicators except $k$: \[ P_{-k}\equiv\left(P_{1},\dots,P_{k-1},P_{k+1},\dots,P_{ni}\right)^{T} \] The following condition ensures that $\beta_{k}^{2SLS}$ assigns non-negative weights on $\beta_{sk}$ for all $s$. \begin{assumption} \label{assumption:non_neg} For all $s$, the partial correlation between $P_{k}$ and $s_{k}\left(Z\right)$ given $P_{-k}$ is non-negative. \end{assumption} \begin{cor} \label{cor:non_neg}The weight on $\beta_{sk}$ in $\beta_{k}^{2SLS}$ is non-negative for all $s$ if and only if Assumption \ref{assumption:non_neg} holds. \end{cor} Intuitively, this condition requires that, controlling for all other predicted treatments, there is a positive correlation between the predicted treatment $k$ and potential treatment $k$ for each agent across values of the instruments. As in the \emph{average monotonicity} condition defined by \citet{FrandsenEtAl2019}, the positive relationship between predicted treatment and potential treatment only needs to hold ``on average'' across realizations of the instruments. Thus, an agent might be a ``defier'' for some pairs of instrument values as long as she is a ``complier'' for sufficiently many other pairs. Informally, we can think of Assumption \ref{assumption:non_neg}, as requiring the partial effect of $P_{k}$ on treatment $k$ to be, on average, non-negative for all agents. In order to make sure that all the weights on $\beta_{sl}$ in $\beta_{k}^{2SLS}$, for $l\neq k$, are zero we need the following much stronger condition. \begin{assumption} \label{assumption:zero} (No Cross Effects). For all $s$ and $l\neq k$, the partial correlation between $P_{k}$ and $s_{l}\left(Z\right)$ given $P_{-k}$ is zero. \end{assumption} \begin{cor} \label{cor:zero}The weight on $\beta_{sl}$ in $\beta_{k}^{2SLS}$ is zero for all $s$ and $l\neq k$ if and only if Assumption \ref{assumption:zero} holds. \end{cor} Intuitively, this condition requires that, controlling for predicted treatment $l$ and all other predicted treatments, there is no correlation between predicted treatment $k$ and potential treatment $l$ for each agent. Informally, we can think of Assumption \ref{assumption:zero} as requiring the partial effect of $P_{k}$ on treatment $l\neq k$ to be, on average, zero for all agents. When Assumption \ref{assumption:zero} holds, the following condition is sufficient to ensure non-negative weights on $\beta_{sk}$. \begin{assumption} (Average Monotonicity.)\label{assu:avg_mono} For all $s$, the correlation between $P_{k}$ and $s_{k}\left(Z\right)$ is non-negative. \end{assumption} This condition generalizes the \citet{FrandsenEtAl2019} average monotonicity condition.\footnote{\citet{FrandsenEtAl2019} consider the random judge IV design with one treatment.} Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} are thus necessary and sufficient conditions to ensure that 2SLS assigns proper weights. This is our main result: \begin{cor} \label{cor:avg_mono}2SLS assigns proper weights if and only if Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} hold for all $k$. \end{cor} Informally, 2SLS assigns proper weights if and only if for all agents and treatments $k$, (i) increasing predicted treatment $k$ does, on average, increase adoption of treatment $k$ and (ii) conditional on predicted treatment $k$, changes in predicted treatment $l\neq k$ does not, on average, push the agent into or out of treatment $k$. As an illustration of Assumptions \ref{assumption:zero} and \ref{assu:avg_mono}, consider the following example. \begin{example} Figure \ref{fig:conditions} shows an example of an agent satisfying Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} for the unordered case $D_{t}=Y\left(t\right)-Y\left(0\right)$ with two treatments. It is assumed that the instruments can take 12 values and that the agent selects $T=0$, $T=1$, and $T=2$ at four instrument values each. The axes show the predicted treatments corresponding to each instrument realization. Assumption \ref{assu:avg_mono} requires that the average predicted treatment 1 is larger for circles with $T=1$ than for circles with $T\neq1$ (and similar for predicted treatment 2). Since predicted treatments are assumed uncorrelated, Assumption \ref{assumption:zero} requires that the average predicted treatment 1 is \emph{equal} for circles with $T=2$ and circles with $T\neq2$ (and similar for predicted treatment 2). These conditions are satisfied in the figure.\hfill{}$\square$ \end{example} \begin{figure} \caption{Example of Agent Satisfying Assumptions \ref{assumption:zero} and \ref{assu:avg_mono}.} \begin{centering} \label{fig:conditions} \par\end{centering} \begin{centering} \includegraphics[width=0.5\textwidth]{fig/conditions} \par\end{centering} {\scriptsize{}\medskip{} }{\scriptsize\par} \emph{\scriptsize{}Note:}{\scriptsize{} Each circle represents one realization of the instruments with $T=k$ indicating that the agent selects treatment $k$ at this value of the instrument. Agent satisfies Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} when $\delta_{t}=Y\left(t\right)-Y\left(0\right)$.}{\scriptsize\par} \end{figure} \subsection{Testing the Identification Conditions\label{subsec:Testing}} Assumptions \ref{assumption:non_neg} and \ref{assumption:zero} can not be directly assessed since we only observe $s\left(z\right)$ for the observed instrument values. But these assumptions do have testable implications. In particular, let $X\in\left\{ 0,1\right\} $ be a random variable such that $Z\perp X\mid S$. Informally, $X$ is a \emph{pre-determined} variable. The instrument is independent of $X$ for each response type. We then have the following testable prediction. \begin{prop} \label{prop:test}Assume $X\in\left\{ 0,1\right\} $ with $Z\perp X\mid S$. If Assumptions \ref{assumption:non_neg} and \ref{assumption:zero} hold then \[ \Var\left(P\right)^{-1}\Cov\left(P,D\mid X=1\right) \] is a diagonal non-negative matrix. \end{prop} This prediction can be tested by running the following regressions \[ D=\gamma+\eta P+\varepsilon \] for the sub-sample $X=1$ and testing whether $\eta$ is a positive diagonal matrix. The predicted treatments $P$ can be estimated from a linear regression of the treatments on the instruments on the whole sample\textemdash a standard first-stage regression. This test thus assesses the relationship between predicted treatments and selected treatments in subsamples.\footnote{The one-treatment version of this test is commonly applied in the literature (e.g., \citealt{dobbie2018effects,BhullerEtAl2020}) and formally justified by \citet{FrandsenEtAl2019}.} If 2SLS assigns proper weights, we should see a positive relationship between treatment $k$ and predicted treatment $k$ and no statistically significant relationship between treatment $k$ and predicted treatment $l\neq k$ in all (pre-determined) subsamples. \subsection{Relationship to Imbens-Angrist Monotonicity\label{sec:IA-monotonicity}} In this section, we show how the conditions in Section \ref{subsec:Identification} relate to the classical \citet{imbens1994identification} monotonicity condition. We focus on the following natural generalization of this monotonicity condition to the case of multiple treatments:\footnote{Informally, IA monotonicity is satisfied when \citet{imbens1994identification} monotonicity holds for each binary treatment indicator.} \begin{assumption} \label{assu:mono}(IA Monotonicity.) \emph{Monotonicity }is satisfied if for each treatment $k$ and instrument values $z$ and $z'$ either $D_{k}\left(z\right)\geq D_{k}\left(z'\right)$ for all $\omega$ or $D_{k}\left(z\right)\leq D_{k}\left(z'\right)$ for all $\omega$. \end{assumption} This assumption, while demanding \citep{MogstadEtAl2019}, is commonly invoked in the IV literature. It turns out that IA monotonicity is neither sufficient nor necessary for 2SLS to assign proper weights under multiple treatments. On the one hand, IA monotonicity is not sufficient to ensure proper weights since it does not rule out cross effects (Assumption \ref{assumption:zero}). On the other hand, IA monotonicity is not \emph{necessary} for 2SLS to assign proper weights since Assumption \ref{assu:avg_mono} only requires potential treatment $k$ to be non-decreasing, \emph{on average}, in predicted treatment $k$.\footnote{IA monotonicity requires potential treatment to be \emph{strictly }non-decreasing in the probability of receiving treatment $k$ conditional on the instruments. In the just-identified case with $n$ treatments and $n$ mututally exclusive binary instruments, however, IA monotonicity must hold under Assumptions \ref{assumption:zero} and \ref{assu:avg_mono}.} Thus, to summarize \begin{prop} \label{prop:IA} \begin{description} \item [{i)}] IA monotonicity implies Assumption \ref{assu:avg_mono}, but not Assumption \ref{assumption:zero}. \item [{\enskip{}\qquad{}\qquad{}\qquad{}ii)}] Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} do not imply IA monotonicity. \end{description} \end{prop} But we can ask under which additional conditions IA monotonicity is sufficient to ensure that Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} hold. To answer this question, consider the ideal case when the first stage equation is correctly specified. \begin{assumption} \label{assu:first-stage-correct}(First Stage Correctly Specified.) Assume that $\E\left[D_{t}\mid Z\right]$ is a linear function of $Z$ for all $t$. \end{assumption} This assumption is always true, for instance, when $Z$ is a set of mutually exclusive binary instruments. Under this assumption, IA monotonicity is equivalent to each agent selecting treatment $k$ if predicted treatment $k$ is above a certain threshold. Thus, for each agent $\omega$ there exists a value $u_{k\omega}\in\left[0,1\right]$ such that $P_{k}\left(\omega\right)\geq u_{k\omega}\Leftrightarrow D_{k}\left(\omega\right)=1.$ It turns out that, even in this ideal case, IA monotonicity is not sufficient to ensure that Assumptions \ref{assumption:zero} and \ref{assu:avg_mono} hold\textemdash an additional linearity assumption is needed. In particular, if all possible thresholds are in use, multivariate 2SLS assigns proper weights under IA monotonicity and Assumption \ref{assu:first-stage-correct} if and only if the predicted treatments are linearly related: \begin{assumption} \label{assu:all-complier-types} (All Thresholds in Use.) For each $k$ and threshold $u_{k\omega}\in\left[0,1\right]$ there exists an agent $\omega$ with $P_{k}\left(\omega\right)\geq u_{k\omega}\Leftrightarrow D_{k}\left(\omega\right)=1$. \end{assumption} \begin{prop} \label{prop:linear-predicted}Under Assumptions \ref{assu:mono}\textendash \ref{assu:all-complier-types}, 2SLS assigns proper weights if and only if for all $k$ and $l$ \[ \E\left[P_{k}\mid P_{l}\right]=\delta_{kl}\left(1-P_{l}\right) \] for constants $\delta_{kl}$. \end{prop} To see why the predicted treatments need to be linearly related, consider the following example. Assume there are three treatments ($n=2$) and that the relationship between $P_{2}$ and $P_{1}$ is given by $\E\left[P_{2}\mid P_{1}\right]=P_{1}-P_{1}^{2}$. The probability of receiving Treatment Two is highest when the probability of receiving treatment one is $50\%$ and equal to zero when the probability of receiving Treatment One is either zero or one. Since we only control linearly for $P_{1}$ in 2SLS, changes in $P_{2}$ will then push agents into or out of Treatment One, violating the no cross effects condition. This linearity condition is easy to test and ensures that 2SLS assigns proper weights also when Assumption \ref{assu:all-complier-types} does not hold: \begin{prop} \label{prop:linear-predicted2}If Assumptions \ref{assu:mono} and \ref{assu:first-stage-correct} hold and $\E\left[P_{k}\mid P_{l}\right]=\delta_{kl}\left(1-P_{l}\right)$ for all $k$ and $l$ and constants $\delta_{kl}$, then 2SLS assigns proper weights. \end{prop} In Section \ref{subsec:threshold-crossing} and in the Appendix Section \ref{subsec:single-peaked-overidentified}, we apply Proposition \ref{prop:linear-predicted2} to identify two cases where 2SLS assigns proper weights: (i) when treatment is characterized by a latent index crossing multiple thresholds and (ii) when preferences over treatments are single-peaked. In the Appendix Section \ref{subsec:choice-IA}, we discuss which restrictions IA monotonicity imposes on choice behavior in our setting with multiple treatments. \section{Special Cases\label{sec:special}} In this section, we first provide general identification results in the just-identified case. We then derive choice-theoretic characterizations for just-identified models with unordered and ordered choices, respectively. Finally, we provide identification results for a standard threshold-crossing model\textemdash an example of an overidentified model with ordered choices. \subsection{The Just-Identified Case\label{sec:binary}} The standard application of 2SLS involves a binary instrument and a binary treatment. In this section, we apply the results in Section \ref{sec:general} to show how this canonical case generalizes to the case with $n$ possible treatments and $n$ possible values of the instrument. This case is the\emph{ just-identified} case with multiple treatments: the number of distinct values of the instruments equals the number of treatments. In particular, assume we have an instrument, $V\in\left\{ 0,1,\dots,n\right\} $, from which we create $n$ binary instruments $Z=\left(Z_{1},Z_{2},...,Z_{n}\right)^{T}$with $Z_{v}\equiv\mathbf{1}\left[V=v\right]$. This setting is a common case in applications. For instance, $Z_{v}$ might be an inducement to take up treatment $k$, as considered by \citet{BehagheletAl2013}. Under which conditions does the multivariate 2SLS assign proper weights in this setting? It turns out that proper identification is\emph{ }achieved only when each instrument affects only one treatment. For simpler exposition, we represent in this section the response types $s$ as functions $s:\left\{ 0,1,\dots,n\right\} \rightarrow\left\{ 0,1,\dots,n\right\} $ where $s\left(v\right)$ is the treatment selected by response type $s$ when $V$ is set to $v$. Thus, $s\left(v\right)$ is the \emph{potential treatment }when $Z_{v}=1$. \begin{prop} \label{prop:binary}2SLS assigns proper weights in the above model if and only if there exists a one-to-one mapping $f:\left\{ 0,1,\dots,n\right\} \rightarrow\left\{ 0,1,\dots,n\right\} $ between instruments and treatments, such that for all $k\neq0$ and $s$ either $s_{k}\left(v\right)=0$ for all $v$, $s_{k}\left(v\right)=1$ for all $v$, or $s_{k}\left(v\right)=1\Leftrightarrow f\left(v\right)=k$. \end{prop} In words, for each agent $\omega$ and treatment $k$, either $\omega$ never takes up treatment $k$, always takes up treatment $k$, or takes up treatment $k$ if and only if $f\left(V\right)=k$. Each instrument $Z_{v}$ is thus associated with exactly one treatment $D_{f\left(v\right)}$. For ease of exposition, we can thus, without loss of generality, assume that the treatments and instruments are ordered in the same way: \begin{assumption} \label{assu:order}Assume instrument values are labeled such that $f\left(k\right)=k$ for all $k$ where $f$ is the unique mapping defined in Proposition \ref{prop:binary}. \end{assumption} Under this assumption, Proposition \ref{prop:binary} can be restated as follows. For each $k$, call response type $s$ an \emph{always-$k$-taker} if $s_{k}\left(v\right)=1$ for all $v$, a \emph{never-$k$-taker} if $s_{k}\left(v\right)=0$ for all $v$, and a \emph{$k$-complier} if $s_{k}\left(v\right)=1\Leftrightarrow v=k$. A $k$-complier thus selects treatment $k$ only when instrument $k$ is turned on. \begin{cor} \label{cor:binary}Under Assumption \ref{assu:order}, 2SLS assigns proper weights if and only if, for all $k\neq0$, all agents are either always-$k$-takers, never-$k$-takers, or $k$-compliers. \end{cor} In words, only instrument $k$ can influence treatment $k$. In the case of unordered treatments, $D_{t}=\mathbf{1}\left[T=t\right]$, treatment $0$ must play a special role: Unless response type $s$ always selects the same treatment, we must have either $s\left(k\right)=k$ or $s\left(k\right)=0$, for all $k$. If instrument $k$ is an inducement to take up treatment $k$, an agent can thus never select any other treatment $l\notin\left\{ 0,k\right\} $ when induced to take up treatment $k$, unless the agent always selects treatment $l$. As an illustration, consider the case when $Z$ can take on only three values, $n=2$. Define the following response types. \begin{center} \begin{tabular}{cc} \hline Response Type & $\left(s\left(0\right),s\left(1\right),s\left(2\right)\right)$\tabularnewline \hline \hline Never-taker & $\left(0,0,0\right)$\tabularnewline Always-1-taker & $\left(1,1,1\right)$\tabularnewline Always-2-taker & $\left(2,2,2\right)$\tabularnewline 1-complier & $\left(0,1,0\right)$\tabularnewline 2-complier & $\left(0,0,2\right)$\tabularnewline Full complier & $\left(0,1,2\right)$\tabularnewline \hline \end{tabular} \par\end{center} \begin{cor} \label{cor:binary_2}2SLS with $D_{t}=\mathbf{1}\left[T=t\right]$ assigns proper weights when $n=2$ if and only if all agents are either never-takers, always-1-takers, always-2-takers, 1-compliers, 2-compliers, or full compliers. \end{cor} \citet{BehagheletAl2013} show that these assumptions are sufficient to ensure that 2SLS assigns proper weights. See also \citet{kline2016evaluating} for similar conditions in the case of multiple treatments and one instrument.\footnote{Equation 1 in \citet{kline2016evaluating}, generalized to two instruments, also describes the same response types: $s\left(1\right)\neq s\left(0\right)\Rightarrow s\left(1\right)=1$ and $s\left(2\right)\neq s\left(0\right)\Rightarrow s\left(2\right)=2$.} Proposition \ref{prop:binary} shows that these conditions are not only sufficient but also \emph{necessary}, after a possible permutation of the instruments. These response types are characterized by instrument $k$ not affecting treatment $l\neq k$\textemdash no cross effects. \subsubsection*{Testing For Proper Weighting in Just-Identified Models} By Proposition \ref{prop:binary}, there must exist a permutation of the instruments such that instrument $k$ affects only treatment $k$. This result gives rise to a powerful test applicable in just-identified models: Testing whether there is a permutation of the instruments such that treatment $k$ is affected only by instrument $k$ in first-stage regressions. This test can be applied both in the full population and in subsamples. Formally \begin{prop} \label{prop:just-identified-test}Assume $X\in\left\{ 0,1\right\} $ with $V\perp X\mid S$. If Assumptions \ref{assumption:non_neg} and \ref{assumption:zero} hold then there is a permutation of the instruments $f:\left\{ 0,1,\dots,n\right\} \rightarrow\left\{ 0,1,\dots,n\right\} $ such that \[ \Var\left(Z^{\ast}\right)^{-1}\Cov\left(Z^{\ast},D\mid X=1\right) \] is a diagonal non-negative matrix where $Z^{\ast}=\left(Z_{1}^{\ast},Z_{2}^{\ast},...,Z_{n}^{\ast}\right)^{T}$with $Z_{v}^{\ast}\equiv\mathbf{1}\left[V=f\left(v\right)\right]$. \end{prop} As in Section \ref{subsec:Testing}, this prediction can be tested by running a first-stage regression \[ D=\gamma+\eta Z^{\ast}+\varepsilon \] on the sub-sample $X=1$ and testing whether $\eta$ is a non-negative diagonal matrix. In other words, for 2SLS to assign proper weights, there must exist a permutation of the instruments such that there is a positive relationship between treatment $k$ and instrument $k$ and no statistically significant relationship between treatment $k$ and instrument $l\neq k$ in all (pre-determined) subsamples. \subsubsection*{Knowledge of Next-Best Alternatives} \citet{kirkeboen2016} and a following literature exploit data where agents' next-best alternative\textemdash their treatment choice when $V=0$\textemdash is plausibly observed. In such settings, 2SLS can identify meaningful treatment effects under much weaker conditions than those of Corollary \ref{cor:binary}. We show how our results relate to the \citet{kirkeboen2016} approach in this section. Their approach is to first identify all agents with treatment $k$ as their next-best alternative and then run 2SLS on this subsample using treatment $k$ as the excluded treatment. By varying $k$ one can obtain causal estimates of \emph{all} relative treatments effects as opposed to only treatment effects relative to \emph{one} excluded treatment. \citet{kirkeboen2016} show that 2SLS assigns proper weights in this setting under two relatively mild conditions: \emph{monotonicity }and \emph{irrelevance}. In our notation, their monotonicity condition is $s_{k}\left(k\right)\geq s_{k}\left(0\right)$ for all $s$ and $k$ and their irrelevance condition is $s_{k}\left(k\right)=s_{k}\left(0\right)\Rightarrow s_{l}\left(k\right)=s_{l}\left(0\right)$ for all $s$, $k$ and $l$. In words, irrelevance requires that if instrument $k$ does not induce an agent into treatment $k$, it can not induce her into treatment $l\neq k$ either. To see how our results relate to the \citet{kirkeboen2016} approach, assume we run 2SLS on the subsample of all agents we believe have treatment $0$ as their next-best alternative using treatment $0$ as the excluded treatment.\footnote{The corresponding result for subsamples of agents selecting treatment $k\neq0$ is analog.} It turns out that the conditions of \citet{kirkeboen2016} are almost equivalent to the conditions in Corollary \ref{cor:binary} holding in the subsample, with the only exception that our conditions allow for the presence of always-takers. Formally \begin{prop} \label{prop:kirkeboen}Maintain Assumption \ref{assu:order} and assume $D_{t}=\mathbf{1}\left[T=t\right]$. The conditions in Corollary \ref{cor:binary} are then equivalent to the following conditions holding for all response types $s$ in the population: 1. $s_{k}\left(k\right)\geq s_{k}\left(0\right)$ for all $k$ (Monotonicity) 2. $s_{k}\left(k\right)=s_{k}\left(0\right)\Rightarrow s_{l}\left(k\right)=s_{l}\left(0\right)$ for all $k$ and $l$ (Irrelevance) 3. Either $s\left(0\right)=0$ or there is a $k$ such that $s\left(v\right)=k$ for all $v$ (Next-best alternative or always-taker). \end{prop} In words, 2SLS applied on a subsample assigns proper weights if and only if monotonicity and irrelevance holds and the subsample is indeed composed only of (i) agents with the excluded treatment as their next-best alternative and (ii) always-takers. The conditions of \citet{kirkeboen2016} are thus not only sufficient for 2SLS to assign proper weights, but also close to \emph{necessary}\textemdash they only way they can be relaxed is by allowing for always-takers. Thus, knowing next-best alternatives is essentially \emph{necessary} for 2SLS to assign proper weights in just-identified models with unordered treatment effects. In other words, when running 2SLS in a just-identified model with multiple treatments one implicitly assumes knowledge about agents' next-best alternatives. In the next subsection, we formalize this insight further through a choice-theoretic characterization. \subsubsection*{Choice-Theoretic Characterization} What does the condition in Proposition \ref{prop:binary} imply about choice behavior? To analyze this, we use a random utility model. Assume that agent $\omega$'s indirect utility from choosing treatment $k$ when $Z=z$ is $I_{k\omega}\left(z\right)$ and that $\omega$ selects treatment $k$ if $I_{k\omega}\left(z\right)>I_{l\omega}\left(z\right)$ for all $l\neq k$.\footnote{Assume $i$ selects treatment $\max\left\{ k,l\right\} $ if indifferent between treatments $k$ and $l$.} The implicit assumptions about choice behavior differ according to which treatment effects we seek to estimate. We here consider the implications in the special cases of $\delta_{t}=Y\left(t\right)-Y\left(0\right)$ and $\delta_{t}=Y\left(t\right)-Y\left(t-1\right)$. \paragraph*{Unordered Choice.} What are the implicit assumptions on choice behavior when $\delta_{t}=Y\left(t\right)-Y\left(0\right)$? In this case, instrument $k$ can affect only treatment $k$. Thus, instrument $k$ can not impact the utility of treatment $l\neq k$ in any way that changes choice behavior. Also, for instrument $k$ to impact treatment $k$ without impacting treatment $l$, it must be that instrument $k$ can change treatment status only from treatment $0$ to treatment $k$ and vice versa. Thus, \emph{essentially}, Proposition \ref{prop:binary} requires that only instrument $k$ affects the indirect utility of treatment $k$, and that the excluded treatment always is at least the next-best alternative: \begin{prop} \label{prop:binary_roy}2SLS with $D_{t}=\mathbf{1}\left[T=t\right]$ assigns proper weights if and only if selection into treatment can be described by the following model \[ I_{0\omega}=0 \] \[ I_{k\omega}\left(z\right)=U_{k\omega}+\mu_{k\omega}z_{k} \] where $\mu_{k\omega}\geq0$ and for all $k$ and $l\neq k$ \[ I_{k\omega}>I_{0\omega}\Rightarrow I_{l\omega}<I_{0\omega} \] \end{prop} The excluded treatment is always ``in between'' the selected treatment and all other treatments in this selection model. Since next-best alternatives are not observed, there are selection models consistent with 2SLS assigning proper weights where other alternatives than the excluded treatment are occasionally next-best alternatives. But when indirect utilities are given by $I_{0\omega}=0$ and $I_{k\omega}=U_{k\omega}+\mu_{k\omega}z_{k}$, this can only happen when $\omega$ always selects the same treatment, in which case the identity of the next-best alternative is irrelevant. To see why, consider the following example. \begin{example} Assume $n=2$, $I_{0\omega}=0$, $I_{1\omega}\left(z\right)=a_{1}+z_{1}$, and $I_{2\omega}\left(z\right)=a_{2}+z_{2}$ for constants $a_{1}$ and $a_{2}$. First, consider the case when $a_{1}=a_{2}>0$. For $z=\left(1,0\right)$, we have $I_{1\omega}\left(z\right)>I_{2\omega}\left(z\right)>0$. Thus, treatment $0$ is neither the best nor the next-best alternative. For $z=\left(0,0\right)$, we then get that treatment $2$ is selected: $I_{2\omega}\left(z\right)>I_{1\omega}\left(z\right)>0$. Thus, a change in instrument $1$ affects treatment $2$. This cross effect is avoided if $a_{1}=a_{2}<0$, when treatment $0$ is always at least the next-best alternative. In this case, we have $I_{1\omega}\left(z\right)>0>I_{2\omega}\left(z\right)$ when $z=\left(1,0\right)$ and $0>I_{1\omega}=I_{2\omega}$ when $z=\left(0,0\right)$. The change in instrument $1$ influences only treatments $1$ and $0$. The only possible cases with no cross effects and treatment $0$ not among the top two alternatives are when treatment $1$ is always selected ($a_{1}>a_{2}+1>0$) and when treatment $2$ is always selected ($a_{2}>a_{1}+1>0$). \hfill{}$\square$ \end{example} \begin{figure} \caption{\label{fig:school}Example with Excluded Treatment Always the Best or the Next-Best Alternative.} \medskip{} \begin{centering} \includegraphics[width=0.7\textwidth]{fig/school_choice} \par\end{centering} {\scriptsize{}\medskip{} }{\scriptsize\par} \emph{\scriptsize{}Note: }{\scriptsize{}Example of setting where the excluded treatment could plausibly be argued to be the best or the next-best alternative for all agents. Here the treatments are schools, with School 0 being the excluded treatment. Agents are students choosing which school to attend. The open dots indicate locations of schools, and the closed dots indicate the location of two example students. If students care sufficiently about travel distance, School 0 will be either the best or the next-best alternative for all students.}{\scriptsize\par} \end{figure} In which settings can a researcher plausibly argue that the excluded treatment is always the best or the next-best alternative? A natural type of setting is when there are three treatments and the excluded treatment is ``in the middle''. For example, consider estimating the causal effect of attending ``School 1'' and ``School 2'' compared to attending ``School 0'' on student outcomes. Here, School 0 is the excluded treatment. Assume students are free to choose their preferred school. If School 0 is geographically located in between School 1 and School 2, as depicted in Figure \ref{fig:school}, and students care sufficiently about travel distance, it is plausible that School 0 is the best or the next-best alternative for all students. For instance, student A in Figure \ref{fig:school}, who lives between School 1 and School 0, is unlikely to prefer School 2 over School 0. Similarly, student B in Figure \ref{fig:school} is unlikely to have School 1 as her preferred school. If we believe no students have School 0 as their least favorite alternative and we have access to random shocks to the utility of attending Schools 1 and 2 multivariate 2SLS can be safely applied.\footnote{Another example where the excluded treatment is always the best or the next-best alternative is when agents are randomly encouraged to take up one treatment and can not select into treatments they are not offered. In that case, one might estimate the causal effects of each treatment in separate IV regressions on the subsamples not receiving each of the treatments. But when control variables are included in the regression, estimating a 2SLS model with multiple treatments can improve precision.} \paragraph*{Ordered Choice.} What are the implicit assumptions on choice behavior when $\delta_{t}=Y\left(t\right)-Y\left(t-1\right)$? In that case, instrument $k$ can influence only treatment indicator $D_{k}$\textemdash whether $T\geq k$. Thus, instrument $k$ can not impact relative utilities other than $I_{s\omega}-I_{l\omega}$ for $s\geq k$ and $l<k$ in a way that changes choice behavior. Thus, without loss of generality, we can assume that instrument $k$ increases the utility of treatments $t\geq k$ by the same amount while keeping the utility of treatments $t<k$ constant. But this assumption is not sufficient to prevent instrument $k$ from influencing treatment indicators other than $D_{k}$. In addition, we need that preferences are \emph{single-peaked}: \begin{defn}[Single-Peaked Preferences.] \label{def:single-peaked}Preferences are \emph{single-peaked} if for all $\omega$, $z$, $k$, $l$, and $s$ \[ k>l>s\text{ and }I_{k\omega}\left(z\right)>I_{l\omega}\left(z\right)\Rightarrow I_{l\omega}\left(z\right)\geq I_{s\omega}\left(z\right) \] \[ k<l<s\text{ and }I_{l\omega}\left(z\right)<I_{s\omega}\left(z\right)\Rightarrow I_{k\omega}\left(z\right)\leq I_{l\omega}\left(z\right) \] \end{defn} \begin{figure} \caption{\label{fig:single-peak}Single-Peaked Preferences and Ordered Treatment Effects} \subfloat[\label{fig:not-single-peaked}Preferences not Single-Peaked.]{ \centering{}\includegraphics[width=0.45\textwidth]{fig/not_single_peaked}}\subfloat[\label{fig:single-peaked}Single-Peaked Preferences.]{ \centering{}\includegraphics[width=0.45\textwidth]{fig/single_peaked}} \emph{\scriptsize{}Note: }{\scriptsize{}Indirect utilities of agent $\omega$ over treatments 0-4 when instrument 2 is turned off (solid dots) and on (open dots). Figure (a) shows how instrument 2 might affect $D_{3}=\mathbf{1}\left[T\geq3\right]$ when preferences are not single-peaked.}{\scriptsize\par} \end{figure} To see this, consider Figure \ref{fig:not-single-peaked}. The solid dots indicate the indirect utilities of agent $\omega$ over treatments 0\textendash 4 when instrument 2 is turned off ($V=0$). In this case, the agent's preferences has two peaks: one at $k=1$ and another at $k=3$. If instrument $2$ increases the utilities of treatments $k\geq2$ by the same amount, the agent might change the selected treatment from $T=1$ to $T=3$ as indicated by the open dots. This change impacts both $D_{2}$ and $D_{3}$. In Figure \ref{fig:single-peaked}, however, where preferences are single-peaked, a homogeneous increase in treatments $k\geq2$ can never impact any other treatment indicator than $D_{2}$. We thus have the following result. \begin{prop} \label{prop:binary_roy2}2SLS with $D_{t}=\mathbf{1}\left[T\geq t\right]$ assigns proper weights if and only if selection into treatment can be described by the following model \[ I_{0\omega}=0 \] \[ I_{k\omega}\left(z\right)=U_{k\omega}+\sum_{l=1}^{k}\mu_{l\omega}z_{l} \] where $\mu_{k\omega}\geq0$ and preferences are single-peaked. \end{prop} In this section, we have considered the just identified case where the number of instrument values equals the number of treatments. But single-peaked preferences can also help identify ordered treatment effects in the general overidentified case. We present such a generalization in the Appendix Section \ref{subsec:single-peaked-overidentified}. \subsection{A Threshold-Crossing Model\label{subsec:threshold-crossing}} In several settings, treatments have a clear ordering, and assignment to treatment could be described by a latent index crossing multiple thresholds. For instance, treatments could be grades and the latent index the quality of the student's work. When estimating returns to education treatments might be different schools, thresholds the admission criteria, and the latent index the quality of the applicant.\footnote{The model below applies if applicants agree on the ranking of schools and schools agree on the ranking of candidates.} In the context of criminal justice, treatments might be years of prison and the latent index the severity of the crime committed, as in \citet{rose2021does}. If the researcher has access to random variation in these thresholds, for instance through random assignment to graders and judges who agree on ranking but use different cutoffs, then the identification of the causal effect of each consecutive treatment by 2SLS could be possible. We here present a simple and easily testable condition under which 2SLS assigns proper weights in such a threshold-crossing model. Our model is a simplified version of the model considered by \citet{Heckman2007EconometricII}, Section 7.2.\footnote{\citet{Heckman2007EconometricII} focus on identifying marginal treatment effects and discuss what 2SLS with a multivalued treatment identifies in this model, but do not consider 2SLS with multiple treatments. \citet{lee2018identifying} consider a similar model with two thresholds where agents are allowed to differ in two latent dimensions.} We assume agents differ by an unobserved latent index $U$ and that treatment depends on whether $U$ crosses certain thresholds.\footnote{This specification is routinely applied to study ordered choices \citep{greene2010modeling}.} In particular, assume there are thresholds $g_{1}\left(Z\right)<g_{2}\left(Z\right)<\dots<g_{n}\left(Z\right)$ such that \[ T=\begin{cases} 0 & \text{if }U<g_{1}\left(Z\right)\\ 1 & \text{if }g_{1}\left(Z\right)\leq U<g_{2}\left(Z\right)\\ 2 & \text{if }g_{2}\left(Z\right)\leq U<g_{3}\left(Z\right)\\ \vdots & \vdots\\ n & \text{if }U\geq g_{n}\left(Z\right) \end{cases} \] We are interested in the ordered treatment effects $\delta_{t}=Y\left(t\right)-Y\left(t-1\right)$, using as treatment indicators $D_{t}=\mathbf{1}\left[U\geq g_{t}\left(Z\right)\right]$ for $t\in\left\{ 1,2,\dots,n\right\} $. Define the propensity of crossing threshold $t$ conditional on the instrument by $P_{t}=\pi\left(Z\right)$ where $\pi\left(z\right)=\Pr\left[U\geq g_{t}\left(z\right)\right]$. Assume the first stage is correctly specified (Assumption \ref{assu:first-stage-correct}). Since IA monotonicity is satisfied in this model, we can invoke Proposition \ref{prop:linear-predicted2} and get the following result: \begin{prop} \label{prop:threshold-crossing}2SLS assigns proper weights in the above model if $E\left[P_{k}\mid P_{l}\right]$ is linear in $P_{l}$ for all $k$ and $l$. \end{prop} Thus, when treatment can be described by a single index crossing multiple thresholds, and we have access to random shocks to these thresholds, multivariate 2SLS estimates of the effect of crossing each threshold will be a positively weighted sum of individual treatment effects. The required linearity condition between predicted treatments can be directly assessed in the data. In Section \ref{subsec:feedback-effects}, we apply this threshold-crossing model in a random judge IV design with three treatments. \section{Applications\label{sec:applications}} To illustrate how our results can be used to assess the validity of multivariate 2SLS in practice, we here discuss three applications. First, we consider a just-identified case with binary instruments\textemdash school reforms\textemdash where we conclude that multivariate 2SLS does not assign proper weights under heterogeneous effects. Second, we consider a case that can be analyzed by the threshold-crossing model presented in Section \ref{subsec:threshold-crossing}\textemdash feedback effects in judicial decision-making\textemdash where we can not reject proper weighting. Finally, we consider a generic case where a multivariate 2SLS is specified to assess treatment effect heterogeneity across different pre-determined subpopulations. Here, we show that the multivariate 2SLS assigns proper weights under the same conditions necessary to identify a positively weighted sum of individual treatment effects from a univariate 2SLS on each subpopulation. \subsection{Returns to Educational Choices} \noindent A prominent example of multiple treatments relates to educational choices. A large economics literature provides a variety of causal ``returns to schooling'' estimates using instruments (see, e.g., reviews by \citet{Heckman.2006a} and \citet{Card.1999}). In our first application, we build upon \citet{Black.2005} and \citet{BhullerEtAl2017}, who used an indicator for exposure to a compulsory schooling reform in 1960s in Norway as an instrument to construct IV estimates of the effects of schooling on different outcomes.\footnote{This reform increased compulsory schooling length from seven to nine years in different municipalities in different years and has been previously used by \citet{Black.2005}, \citet{Monstad.2008}, \citet{Aakvik.2010}, \citet{Machin.2012}, \citet{BhullerEtAl2017,Bhuller2022option} and \citet{Aryal.2021} in different contexts.} For instance, \citet{BhullerEtAl2017} considered the coefficient on a linear years of schooling measure as the parameter of interest with the outcome being either lifetime earnings or earnings measured at different ages.\footnote{Formally, their treatment is multi-valued, and the instrument is binary, so 2SLS gives a weighted average of per-unit treatment effects along the length of a causal response function \citep{AngristImbens1995JASA}.} To consider multiple treatments in this setting, we distinguish between two levels of schooling: (i) an indicator for whether an individual completed the post-reform compulsory schooling requirement of nine years of schooling and (ii) an indicator for whether an individual completed high school. In addition to the staggered compulsory schooling reform, we construct a second instrument based on the local availability of a high school at age 16 in the municipality that each agent grew up in. As more high schools were gradually opened in Norway over this period, we observe within-municipality changes in local high school availability over time. Thus, as in \citet{BhullerEtAl2017}, we include controls for birth cohort and childhood municipality fixed effects in all estimations. Our main sample consists of birth cohorts 1947\textendash 1976, and we perform sub-sample analyses by gender and parental background. \paragraph*{Specification.} Denote by the random variable $E$ the schooling years of agent $\omega$. Assume treatment can take on three values $T\in\left\{ L,C,H\right\} $ where $L$ is a schooling level lower than the new compulsory schooling requirement of nine years, $C$ is the new compulsory schooling requirement, and $H$ is having high school diploma (or above). Thus, we have: \[ T=\begin{cases} L & \textrm{if }E<9\\ C & \textrm{if }9\leq E<12\\ H & \textrm{if }12\leq E \end{cases} \] We use as instruments (i) an indicator for exposure to compulsory schooling $Z_{C}$ and (ii) an indicator for the availability of a local high school $Z_{H}$. As treatment indicators, we use $D_{C}\equiv\mathbf{1}\left[T\in\left\{ C,H\right\} \right]$ and $D_{H}\equiv\mathbf{1}\left[T=H\right]$. In other words, we seek to estimate ordered treatment effects\textemdash the effect of obtaining schooling level $C$ compared to schooling level $L$ and the effect of obtaining schooling level $H$ compared to schooling level $C$. We focus on municipalities that received a local high school after the compulsory schooling reform.\footnote{Around 15\% municipality-cohort cells had access to a local high school ($Z_{H}=1)$ already prior to the compulsory schooling reform ($Z_{C}=0)$. This sample selection does not materially affect the results in Table \ref{tab:test_monotonicity_schoolchoice}, but allows us to apply our identification result in Proposition \ref{prop:binary_roy2} for the just-identified case.} In all regressions, we control for birth cohort and childhood municipality fixed effects. According to Proposition \ref{prop:binary_roy2}, 2SLS will assign proper weights if individuals have single-peaked preferences\textemdash $C$ is never the least preferred option\textemdash and the compulsory schooling reform increases the utility of completing compulsory schooling and of obtaining a high school diploma by an equal amount.\textit{\textcolor{red}{}}\footnote{The latter might happen if the compulsory school reform reduced the cost of completing compulsory schooling while not affecting the cost or benefit of obtaining a high school diploma conditional on completing compulsory schooling.}\textit{\textcolor{red}{{} }}In the following, we use $L$ as the excluded treatment. \paragraph*{Results.} Since the number of instruments equals the number of non-excluded treatments, 2SLS assigns proper weights in this setting if and only if each instrument affects exactly one treatment indicator (Proposition \ref{prop:binary}). We can thus apply the test in Proposition \ref{prop:just-identified-test}: Does $Z_{k}$ affect the probability of the event $\mathbf{1}\left[D=l\right]$, conditional on $Z_{l}$, for $k=\left\{ C,H\right\} $ and $l\neq k$? For 2SLS to assign proper weights, there can be no such effect, neither in the full sample nor in sub-samples. Thus, to test Assumptions \ref{assumption:zero} and \ref{assu:avg_mono}, we regress indicators for completing compulsory schooling and high school diploma, respectively, on the two instruments. If 2SLS assigns proper weights, we would expect local high school availability to affect high school completion only and exposure to the compulsory school reform to affect compulsory school completion only. The results in Table \ref{tab:test_monotonicity_schoolchoice} clearly reject proper weighting under 2SLS. Importantly, we find that exposure to the compulsory school reform increased high school completion both in the full sample and in all sub-samples. While we do not find evidence that high school availability influenced completion of compulsory schooling in the full sample in Panel A, we do find such an effect for those with high parental education in Panel C. \begin{center} \begin{table}[H] \begin{centering} \caption{Testing for Average Monotonicity with Multiple Treatments: Schooling Choices.\label{tab:test_monotonicity_schoolchoice}} \par\end{centering} \begin{singlespace} \noindent \begin{centering} {\scriptsize{}}% \begin{tabular}{l>{\centering}p{2cm}>{\centering}p{2cm}>{\centering}p{0.1cm}>{\centering}p{2cm}>{\centering}p{2cm}} \cline{1-3} \cline{5-6} & \textbf{\scriptsize{}Compulsory School} & \textbf{\scriptsize{}High School Diploma} & & \textbf{\scriptsize{}Compulsory School} & \textbf{\scriptsize{}High School Diploma}\tabularnewline & {\scriptsize{}$\left(D_{C}\right)$} & {\scriptsize{}$(D_{H})$} & & {\scriptsize{}$(D_{C})$} & {\scriptsize{}$(D_{H})$}\tabularnewline & \textbf{\scriptsize{}(1)} & \textbf{\scriptsize{}(2)} & & \textbf{\scriptsize{}(3)} & \textbf{\scriptsize{}(4)}\tabularnewline \hline \hline \multicolumn{6}{l}{\textbf{\scriptsize{}A. Full Sample}}\tabularnewline {\scriptsize{}Compulsory School Reform} & {\scriptsize{}0.166{*}{*}{*}} & {\scriptsize{}0.060{*}{*}{*}} & & {\scriptsize{}0.166{*}{*}{*}} & {\scriptsize{}0.056{*}{*}{*}}\tabularnewline {\scriptsize{}$(Z_{C})$} & {\scriptsize{}(0.007)} & {\scriptsize{}(0.007)} & & {\scriptsize{}(0.007)} & {\scriptsize{}(0.007)}\tabularnewline & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}0.000{]}}\tabularnewline {\scriptsize{}Local High School Availability} & {\scriptsize{}0.002} & {\scriptsize{}0.019{*}{*}{*}} & & {\scriptsize{}0.001} & {\scriptsize{}0.012{*}{*}{*}}\tabularnewline {\scriptsize{}$(Z_{H})$} & {\scriptsize{}(0.003)} & {\scriptsize{}(0.004)} & & {\scriptsize{}(0.003)} & {\scriptsize{}(0.004)}\tabularnewline & {\scriptsize{}{[}0.566{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.651{]}} & {\scriptsize{}{[}0.003{]}}\tabularnewline \cline{2-3} \cline{5-6} {\scriptsize{}Dependent Mean} & {\scriptsize{}0.983} & {\scriptsize{}0.692} & & {\scriptsize{}0.983} & {\scriptsize{}0.692}\tabularnewline {\scriptsize{}Number of Cases} & {\scriptsize{}1,352,383} & {\scriptsize{}1,352,383} & & {\scriptsize{}1,352,383} & {\scriptsize{}1,352,383}\tabularnewline \hline {\scriptsize{}Controls:} & & & & & \tabularnewline {\scriptsize{}Birth Cohort \& Childhood Municipality} & $\checked$ & $\checked$ & & $\checked$ & $\checked$\tabularnewline {\scriptsize{}Additional Covariates} & & & & $\checked$ & $\checked$\tabularnewline \hline \hline \multicolumn{6}{l}{\textbf{\scriptsize{}B. Sub-Samples By Gender}}\tabularnewline & \multicolumn{2}{c}{{\scriptsize{}Male}} & & \multicolumn{2}{c}{{\scriptsize{}Female}}\tabularnewline {\scriptsize{}Compulsory School Reform} & {\scriptsize{}0.167{*}{*}{*}} & {\scriptsize{}0.044{*}{*}{*}} & & {\scriptsize{}0.165{*}{*}{*}} & {\scriptsize{}0.076{*}{*}{*}}\tabularnewline {\scriptsize{}$(Z_{C})$} & {\scriptsize{}(0.007)} & {\scriptsize{}(0.007)} & & {\scriptsize{}(0.007)} & {\scriptsize{}(0.009)}\tabularnewline & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}0.000{]}}\tabularnewline {\scriptsize{}Local High School Availability} & {\scriptsize{}0.001} & {\scriptsize{}0.016{*}{*}{*}} & & {\scriptsize{}0.003} & {\scriptsize{}0.022{*}{*}{*}}\tabularnewline {\scriptsize{}$(Z_{H})$} & {\scriptsize{}(0.003)} & {\scriptsize{}(0.005)} & & {\scriptsize{}(0.003)} & {\scriptsize{}(0.006)}\tabularnewline & {\scriptsize{}{[}0.566{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.566{]}} & {\scriptsize{}{[}0.000{]}}\tabularnewline \cline{2-3} \cline{5-6} {\scriptsize{}Dependent Mean} & {\scriptsize{}0.983} & {\scriptsize{}0.695} & & {\scriptsize{}0.983} & {\scriptsize{}0.688}\tabularnewline {\scriptsize{}Number of Cases} & {\scriptsize{}692,360} & {\scriptsize{}692,360} & & {\scriptsize{}660,023} & {\scriptsize{}660,023}\tabularnewline \hline {\scriptsize{}Controls:} & & & & & \tabularnewline {\scriptsize{}Birth Cohort \& Childhood Municipality} & $\checked$ & $\checked$ & & $\checked$ & $\checked$\tabularnewline \hline \hline \multicolumn{6}{l}{\textbf{\scriptsize{}C. Sub-Samples By Parental Education}}\tabularnewline & \multicolumn{2}{c}{{\scriptsize{}High Parental Education}} & & \multicolumn{2}{c}{{\scriptsize{}Low Parental Education}}\tabularnewline {\scriptsize{}Compulsory School Reform} & {\scriptsize{}0.062{*}{*}{*}} & {\scriptsize{}0.046{*}{*}{*}} & & {\scriptsize{}0.187{*}{*}{*}} & {\scriptsize{}0.058{*}{*}{*}}\tabularnewline {\scriptsize{}$(Z_{C})$} & {\scriptsize{}(0.003)} & {\scriptsize{}(0.007)} & & {\scriptsize{}(0.007)} & {\scriptsize{}(0.008)}\tabularnewline & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}0.000{]}}\tabularnewline {\scriptsize{}Local High School Availability} & {\scriptsize{}0.004{*}{*}{*}} & {\scriptsize{}0.019{*}{*}{*}} & & {\scriptsize{}-0.002} & {\scriptsize{}0.009{*}}\tabularnewline {\scriptsize{}$(Z_{H})$} & {\scriptsize{}(0.001)} & {\scriptsize{}(0.005)} & & {\scriptsize{}(0.005)} & {\scriptsize{}(0.005)}\tabularnewline & {\scriptsize{}{[}0.001{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.692{]}} & {\scriptsize{}{[}0.057{]}}\tabularnewline \cline{2-3} \cline{5-6} {\scriptsize{}Dependent Mean} & {\scriptsize{}0.996} & {\scriptsize{}0.782} & & {\scriptsize{}0.965} & {\scriptsize{}0.563}\tabularnewline {\scriptsize{}Number of Cases} & {\scriptsize{}794,533} & {\scriptsize{}794,533} & & {\scriptsize{}557,850} & {\scriptsize{}557,850}\tabularnewline \hline {\scriptsize{}Controls:} & & & & & \tabularnewline {\scriptsize{}Birth Cohort \& Childhood Municipality} & $\checked$ & $\checked$ & & $\checked$ & $\checked$\tabularnewline \hline \end{tabular}{\scriptsize\par} \par\end{centering} \end{singlespace} \noindent \begin{centering} {\scriptsize{}}{\scriptsize\par} \par\end{centering} \begin{singlespace} \medskip{} \end{singlespace} \textit{\scriptsize{}Note:}\textit{\emph{\scriptsize{} The sample}}{\scriptsize{} consists of Norwegian birth cohorts 1947\textendash 1976. }\textit{\emph{\scriptsize{}All estimations include controls for birth cohort and childhood municipality fixed effects, as in \citet{BhullerEtAl2017}, while Columns (3)\textendash (4) in Panel A further control for gender and parental education. Standard errors are clustered by childhood municipality. {*}p<0.1, {*}{*}p<0.05, {*}{*}{*}p<0.01.}}{\scriptsize\par} \end{table} \par\end{center} The results in Table \ref{tab:test_monotonicity_schoolchoice} indicate that not all individuals have single-peaked preferences. In particular, if some agents preferred not completing compulsory schooling before the reform with finishing high school as their next-best choice, then lowering the cost of completing compulsory schooling (and thus the cost of obtaining a high school diploma) could induce these agents to finish high school. Another reason why the compulsory school instrument could induce students to obtain a high school degree could be that the compulsory school reform increased the utility of obtaining a high school degree by more than it increased the utility of completing compulsory schooling. This could, for instance, be due to an increase in the signaling value of completing high school as discussed by \citet{lang1986human}, or this may reflect the sequential nature of schooling decisions (\citealp{Altonji.1993}; \citealp{Bhuller2022option}). \subsection{Feedback Effects in Judicial Decision-Making\label{subsec:feedback-effects}} An extensive literature in economics relying on random decision-maker IV designs has documented substantial disparities in decision-making across caseworkers and judges.\footnote{Large disparities have been documented in the context of caseworkers \citep[e.g., ][]{bolhaar2020caseworker,schiprowski2020role,schmieder2020disincentive} and judges \citep[e.g., ][and citations therein]{dobbie2018effects,BhullerEtAl2020}.} In a companion paper \citep{BhullerSigstad2021}, we consider whether trial judges respond to reversals of their decisions in terms of their future decision-making. To identify causal feedback effects, \citet{BhullerSigstad2021} rely on the random assignment of appeals in the Norwegian criminal justice system to appeal benches that vary systematically in their tendencies to reverse trial judges' decisions in an IV design. In this setting, there are multiple treatments. Appeal benches can either replace trial decisions with a milder sentence, a harsher sentence, or not alter the trial sentence. It is useful to be able to separately identify the effects of sentence increases and sentence decreases on the behavior of the trial judge.\footnote{The baseline specification in \citet{BhullerSigstad2021} uses a univariate IV model with a multi-valued treatment that transforms reversals along an ordinal scale between -1 and 1.} As appeal benches differ systematically both in their stringencies and their reversal tendencies\textemdash some benches are more lenient than others, and some benches are more likely to reverse sentences than others\textemdash this setting provides an avenue for identifying causal effects with multiple treatments. In the following, we closely follow \citet{BhullerSigstad2021} and consider their model specification with multiple treatments and multiple instruments. The sample consists of 16,495 criminal cases assigned to judges in trial courts between 2005 and 2014 that were later appealed and processed for a hearing in an appeal court by 2019. \paragraph*{A Threshold-Crossing Model.\label{subsec:reversal-model}} This environment is a natural setting for the threshold-crossing model considered in Section \ref{subsec:threshold-crossing}. Let the elements of the sample space $\Omega$ be trial court cases $\omega$. Assume treatment can take on three values $T\in\left\{ M,N,H\right\} $ where $M$ is a sentence decrease (milder sentence), $N$ is no reversal, and $H$ is a sentence increase (harsher sentence). As instrument $Z$ we use a randomly allocated appeal panel.\footnote{Formally, assume $Z$ is a vector of mutually exclusive indicator variables, one for each appeal panel.} Denote by $U\in\left[0,1\right]$ the ``stringency'' of the trial sentence, and assume that panel $Z$ follows the following decision rule \[ T=\begin{cases} M & \textrm{if }U>k_{M}\left(Z\right)\\ N & \textrm{if }k_{H}\left(Z\right)<U<k_{M}\left(Z\right)\\ H & \textrm{if }U<k_{H}\left(Z\right) \end{cases} \] where $k_{M}:\mathcal{Z}\rightarrow\left[0,1\right]$ and $k_{H}:\mathcal{Z}\rightarrow\left[0,1\right]$ with $k_{H}\left(z\right)\leq k_{M}\left(z\right)$ for all appeal panels $z\mathcal{\in\mathcal{Z}}$. Appeal panel $z$ thus increases the sentence if the trial sentence is less stringent than $k_{H}\left(z\right)$, decreases the sentence if the trial sentence is more stringent than $k_{M}\left(z\right)$, and maintains the trial sentence otherwise. As treatment indicators, we use $D_{M}\equiv\mathbf{1}\left[T=M\right]$ and $D_{H}\equiv\mathbf{1}\left[T=H\right]$. We are thus interested in estimating the effects of receiving, respectively, a sentence increase and a sentence decrease compared to receiving no reversal. Predicted treatments in this case are $P_{M}=\mathbf{\Pr}\left[U<k_{H}\left(Z\right)\right]$ and $P_{H}=\Pr\left[U>k_{M}\left(Z\right)\right]$\textemdash the tendencies of the appeal panel to increase and reduce sentences, respectively. Figure \ref{fig:FS_linear} in the Appendix Section \ref{subsec:linearity-predicted treatments} shows that the relationship between these predicted treatments in the data is close to linear, as required by Proposition \ref{prop:linear-predicted2}. We thus maintain the assumption that $\E\left[P_{M}\mid P_{H}\right]$ is a linear function of $P_{H}$ and that $\E\left[P_{H}\mid P_{M}\right]$ is a linear function of $P_{M}$. We can thus directly apply Proposition \ref{prop:threshold-crossing} to obtain the following result:\footnote{Assumption \ref{assu:first-stage-correct} is also satisfied since we use a fully saturated first stage.} \begin{prop} \label{prop:feedback}2SLS assigns proper weights under the above assumptions. \end{prop} Note that the excluded treatment (no reversal) is always at least the next-best alternative for an appeal panel in this model.\footnote{In an extension of Proposition \ref{prop:binary_roy} to continuous instruments, we show in Proposition \ref{prop:continuous_roy} that IA monotonicity requires the excluded treatment to always be at least the next-best alternative in the case of unordered treatments.} This feature is natural in the appeal setting since treatments have a clear ordering with ``no reversal'' in the middle. The model above assumes that appeal panels only care about the stringency of the trial sentence $U$.\footnote{This assumption is similar to the strict monotonicity condition routinely invoked in random judge designs with a single treatment.} In reality, appeal panels likely differ in how they assess other dimensions of the trial sentence. But 2SLS might still assign proper weights as long as Assumptions \ref{assumption:non_neg} and \ref{assumption:zero} are satisfied. To assess whether Assumptions \ref{assumption:non_neg} and \ref{assumption:zero} are satisfied, we apply the test in Section \ref{subsec:Testing}. \begin{table}[H] \begin{centering} \caption{Testing for Average Monotonicity with Multiple Treatments: Decision Reversals.\label{tab:test_monotonicity_reversals}} \par\end{centering} \begin{singlespace} \noindent \begin{centering} {\scriptsize{}}% \begin{tabular}{l>{\centering}p{2cm}>{\centering}p{2cm}>{\centering}p{0.1cm}>{\centering}p{2cm}>{\centering}p{2cm}} \cline{1-3} \cline{5-6} & \textbf{\scriptsize{}Sentence Reduced} & \textbf{\scriptsize{}Sentence Increased} & & \textbf{\scriptsize{}Sentence Reduced} & \textbf{\scriptsize{}Sentence Increased}\tabularnewline & {\scriptsize{}$(D_{M})$} & {\scriptsize{}$(D_{H})$} & & {\scriptsize{}$(D_{M})$} & {\scriptsize{}$(D_{H})$}\tabularnewline & \textbf{\scriptsize{}(1)} & \textbf{\scriptsize{}(2)} & & \textbf{\scriptsize{}(3)} & \textbf{\scriptsize{}(4)}\tabularnewline \hline \hline \multicolumn{6}{l}{\textbf{\scriptsize{}A. Full Sample}}\tabularnewline {\scriptsize{}Tendency of Sentence Reduction} & {\scriptsize{}1.000{*}{*}{*}} & {\scriptsize{}-0.000} & & {\scriptsize{}1.000{*}{*}{*}} & {\scriptsize{}-0.000}\tabularnewline {\scriptsize{}$(P_{M})$} & {\scriptsize{}(0.296)} & {\scriptsize{}(0.276)} & & {\scriptsize{}(0.308)} & {\scriptsize{}(0.284)}\tabularnewline & {\scriptsize{}{[}0.000{]}} & {\scriptsize{}{[}1.000{]}} & & {\scriptsize{}{[}0.001{]}} & {\scriptsize{}{[}1.000{]}}\tabularnewline {\scriptsize{}Tendency of Sentence Increase} & {\scriptsize{}-0.000} & {\scriptsize{}1.000{*}{*}{*}} & & {\scriptsize{}-0.000} & {\scriptsize{}1.000{*}{*}{*}}\tabularnewline {\scriptsize{}$(P_{H})$} & {\scriptsize{}(0.238)} & {\scriptsize{}(0.233)} & & {\scriptsize{}(0.247)} & {\scriptsize{}(0.241)}\tabularnewline & {\scriptsize{}{[}1.000{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}1.000{]}} & {\scriptsize{}{[}0.000{]}}\tabularnewline \cline{2-3} \cline{5-6} {\scriptsize{}Dependent Mean} & {\scriptsize{}0.337} & {\scriptsize{}0.232} & & {\scriptsize{}0.337} & {\scriptsize{}0.232}\tabularnewline {\scriptsize{}Number of Cases} & {\scriptsize{}16,495} & {\scriptsize{}16,495} & & {\scriptsize{}16,495} & {\scriptsize{}16,495}\tabularnewline \hline {\scriptsize{}Controls:} & & & & & \tabularnewline {\scriptsize{}Court x Case Year FEs} & $\checked$ & $\checked$ & & $\checked$ & $\checked$\tabularnewline {\scriptsize{}Additional Covariates} & & & & $\checked$ & $\checked$\tabularnewline \hline \hline \multicolumn{6}{l}{\textbf{\scriptsize{}B. Sub-Samples By Trial Judge Past Stringency}}\tabularnewline & \multicolumn{2}{c}{{\scriptsize{}Below Median}} & & \multicolumn{2}{c}{{\scriptsize{}Above Median}}\tabularnewline {\scriptsize{}Tendency of Sentence Reduction} & {\scriptsize{}0.797{*}} & {\scriptsize{}0.378} & & {\scriptsize{}1.120{*}{*}{*}} & {\scriptsize{}-0.379}\tabularnewline {\scriptsize{}$(P_{M})$} & {\scriptsize{}(0.425)} & {\scriptsize{}(0.411)} & & {\scriptsize{}(0.405)} & {\scriptsize{}(0.325)}\tabularnewline & {\scriptsize{}{[}0.062{]}} & {\scriptsize{}{[}0.359{]}} & & {\scriptsize{}{[}0.006{]}} & {\scriptsize{}{[}0.244{]}}\tabularnewline {\scriptsize{}Tendency of Sentence Increase} & {\scriptsize{}0.213} & {\scriptsize{}0.795{*}{*}} & & {\scriptsize{}-0.220} & {\scriptsize{}1.191{*}{*}{*}}\tabularnewline {\scriptsize{}$(P_{H})$} & {\scriptsize{}(0.330)} & {\scriptsize{}(0.306)} & & {\scriptsize{}(0.349)} & {\scriptsize{}(0.303)}\tabularnewline & {\scriptsize{}{[}0.323{]}} & {\scriptsize{}{[}0.010{]}} & & {\scriptsize{}{[}0.529{]}} & {\scriptsize{}{[}0.000{]}}\tabularnewline \cline{2-3} \cline{5-6} {\scriptsize{}Dependent Mean} & {\scriptsize{}0.323} & {\scriptsize{}0.243} & & {\scriptsize{}0.352} & {\scriptsize{}0.223}\tabularnewline {\scriptsize{}Number of Cases} & {\scriptsize{}8,247} & {\scriptsize{}8,247} & & {\scriptsize{}8,248} & {\scriptsize{}8,248}\tabularnewline \hline {\scriptsize{}Controls:} & & & & & \tabularnewline {\scriptsize{}Court x Case Year FEs} & $\checked$ & $\checked$ & & $\checked$ & $\checked$\tabularnewline \hline \hline \multicolumn{6}{l}{\textbf{\scriptsize{}C. Sub-Samples By Trial Case Type of Crime}}\tabularnewline & \multicolumn{2}{c}{{\scriptsize{}Violent}} & & \multicolumn{2}{c}{{\scriptsize{}Non-Violent}}\tabularnewline {\scriptsize{}Tendency of Sentence Reduction} & {\scriptsize{}0.892{*}{*}{*}} & {\scriptsize{}-0.104} & & {\scriptsize{}1.281{*}{*}{*}} & {\scriptsize{}0.180}\tabularnewline {\scriptsize{}$(P_{M})$} & {\scriptsize{}(0.359)} & {\scriptsize{}(0.311)} & & {\scriptsize{}(0.486)} & {\scriptsize{}(0.446)}\tabularnewline & {\scriptsize{}{[}0.013{]}} & {\scriptsize{}{[}0.652{]}} & & {\scriptsize{}{[}0.009{]}} & {\scriptsize{}{[}0.461{]}}\tabularnewline {\scriptsize{}Tendency of Sentence Increase} & {\scriptsize{}-0.185} & {\scriptsize{}1.226{*}{*}{*}} & & {\scriptsize{}0.421} & {\scriptsize{}0.386}\tabularnewline {\scriptsize{}$(P_{H})$} & {\scriptsize{}(0.251)} & {\scriptsize{}(0.260)} & & {\scriptsize{}(0.442)} & {\scriptsize{}(0.382)}\tabularnewline & {\scriptsize{}{[}0.319{]}} & {\scriptsize{}{[}0.000{]}} & & {\scriptsize{}{[}0.342{]}} & {\scriptsize{}{[}0.313{]}}\tabularnewline \cline{2-3} \cline{5-6} {\scriptsize{}Dependent Mean} & {\scriptsize{}0.319} & {\scriptsize{}0.257} & & {\scriptsize{}0.365} & {\scriptsize{}0.197}\tabularnewline {\scriptsize{}Number of Cases} & {\scriptsize{}9,883} & {\scriptsize{}9,883} & & {\scriptsize{}6,502} & {\scriptsize{}6,502}\tabularnewline \hline {\scriptsize{}Controls:} & & & & & \tabularnewline {\scriptsize{}Court x Case Year FEs} & $\checked$ & $\checked$ & & $\checked$ & $\checked$\tabularnewline \hline \end{tabular}{\scriptsize\par} \par\end{centering} \end{singlespace} \noindent \begin{centering} {\scriptsize{}}{\scriptsize\par} \par\end{centering} \begin{singlespace} \medskip{} \end{singlespace} \textit{\scriptsize{}Note:}\textit{\emph{\scriptsize{} The sample}}{\scriptsize{} consists of criminal cases assigned to judges in trial courts between 2005 and 2014 processed for an appeal hearing by 2019. }\textit{\emph{\scriptsize{}All estimations include controls for court x year fixed effects, while Columns (3)\textendash (4) in Panel A further control for defendant, case, and trial judge past characteristics as in \citet{BhullerSigstad2021}. Standard errors are clustered on appeal panel identifiers. {*}p<0.1, {*}{*}p<0.05, {*}{*}{*}p<0.01.}}{\scriptsize\par} \end{table} \paragraph*{Results.} In Panel A of Table \ref{tab:test_monotonicity_schoolchoice}, we consider the relationship between predicted reversal tendencies and sentence reductions and sentence increases for the full sample.\footnote{As in the judge IV literature, we construct the predicted reversal tendencies using leave-one-out reversal rates as instruments\textemdash the share of sentences that are, respectively, increased and decreased by the appeal panel in all cases except the current case. This ``jackknife IV'' is equivalent to using indicators for the assigned appeal panel as instruments in large samples and reduces bias in small samples (\citealp{AngristImbensKrueger1999})} By construction, the appeal panel's tendency of sentence reductions (increases) is related only to sentence reductions (increases) when controlling for the tendency of sentence increases (reductions). In Panels B and C, we run the sub-sample test proposed in Section \ref{subsec:Testing} for four different subsamples: Cases decided by lenient trial judges (below median stringency), cases decided by stringent trial judges (above median stringency), violent crime cases, and non-violent crime cases. Consistent with Assumptions \ref{assumption:non_neg} and \ref{assumption:zero}, we find a statistically significant positive relationship between the appeal panel's tendency of sentence reductions (increases) and sentence reductions (increases) and no statistically significant relationship between the appeal panel's tendency of sentence reductions (increases) and sentence increases (reductions) for all subsamples. While the latter estimates are not precise estimates of zero, we can not reject the no cross effects condition (Assumption \ref{assumption:zero}). We are thus not able to reject that 2SLS assigns proper weights in this setting. \subsection{Heterogeneous Treatment Effects Across Subpopulations} In the empirical literature, a typical application of multivariate 2SLS is to estimate heterogeneous effects of a single treatment. In this case, multiple treatment variables and instruments are constructed from interactions between indicators for various pre-determined subpopulations and the original treatment and instrument variables. Thus, rather than estimating separate univariate 2SLS regressions for each subsample, the researcher might estimate a multivariate 2SLS with interacted treatments and instruments. When does this approach ensure proper weights on agent-specific treatment effects? To formalize this approach, assume we have $n=m=1$\textemdash a binary treatment and a binary instrument\textemdash and an indicator variable $W\in\left\{ 0,1\right\} $ that is not affected by the instrument. To separately estimate the causal effect of treatment for agents with $W=0$ and $W=1$, the researcher runs a multivariate 2SLS with treatment variables $D'_{1}\equiv D_{1}\left(1-W\right)$ and $D'_{2}\equiv D_{1}W$ and instruments $Z'_{1}\equiv Z_{1}\left(1-W\right)$ and $Z'_{2}\equiv Z_{1}W$. In this case, Assumption \ref{assumption:zero} is mechanically satisfied. Assumption \ref{assumption:non_neg} becomes an average monotonicity condition under univariate 2SLS for the two subsamples. Thus, this approach is valid if and only if univariate 2SLS is valid in each subsample. \section{Conclusions\label{sec:Conclusion}} Two-stage least squares is a common approach to causal inference. We have presented necessary and sufficient conditions for 2SLS to identify a properly weighted sum of individual treatment effects when there are multiple treatments and arbitrary treatment effect heterogeneity. The conditions require in just-identified models that each instrument only affects one treatment and that choice behavior can be described by single-peaked preferences or by a selection model where the excluded treatment is always either the preferred or the next-best alternative. In overidentified models, 2SLS identifies ordered treatment effects in a general threshold-crossing model. We have seen one application where we can conclude that 2SLS does not assign proper weights and another where we cannot reject the validity of 2SLS. Whether multivariate 2SLS should be used depends on the setting. Justifying its use requires both running systematic empirical tests of the average monotonicity and no cross effects conditions and a careful discussion of why the conditions are likely to hold. \bibliographystyle{authordate3}
\section{Introduction} The discovery of a Higgs boson in the mass region of about $125$ GeV, announced by ATLAS \cite{atlas} and CMS \cite{cms} at the Large Hadron Collider (LHC) in the summer of $2012$, filled a gap in the Standard Model (SM), the theory that describes all the particles and interactions that make up the universe. However, despite its good agreement with the experimental data available today, it is still too early to consider the SM as the ultimate theory of particle interactions. Therefore, the need to explore extensions beyond the SM is obvious. The Two-Higgs-Doublet Model (2HDM), where just a second scalar Higgs doublet is added to the already existing one in the SM, is one of the simplest and minimal extensions beyond SM \cite{2hdm}. Its scalar sector contains five physical states: a light CP even neutral Higgs $h$, a heavy CP even neutral Higgs $H$, a CP odd (pseudoscaler) neutral Higgs $A$ and a pair of charged Higgs $H^\pm$, with $h$ being the SM-like Higgs boson observed at LHC. Depending on which type of fermions couples to which doublet, 2HDMs can be categorized into different types. Currently, the main focus is on the so-called type-II 2HDM \cite{thesis}, because it is an essential feature of the Minimal Supersymmetric Standard Model (MSSM). One of the most striking signs of physics beyond SM would be the appearance of a charged Higgs boson. However, the prospects for hunting the charged Higgs are quite difficult \cite{prospect1,prospect2}. Recent searches for $H^+$ at the LHC focus on production and decay via interactions with SM fermions. Such high-energy physics experiments require increasingly powerful and high-energy particle collisions. In view of the rapid development of modern laser devices \cite{laser1,laser2,laser3}, laser acceleration becomes more and more interesting and can be a promising solution to increase the required collision energy \cite{donald1999}. In this context, it is very motivating to study the processes of Higgs production and decay in the presence of strong laser fields. In 2014, Sarah Muller et al. \cite{muller1,muller2} conducted pioneering research on Higgs boson production and various particle physics processes in lepton collisions boosted by a laser field. Recently, another group of authors has also studied different physical processes in the SM and beyond \cite{bsm1,bsm2,bsm3,bsm4,bsm5}, including charged Higgs boson production \cite{hplus1,hplus2,hplus3}. A review of such contributions in strong field quantum electrodynamics (QED) can be found in \cite{qed1,qed2}. Moreover, laser-assisted electroweak decay processes have also recently attracted the attention of many researchers and have been the subject of numerous papers, among which we refer to \cite{decay1,wdecay,zdecay,decay3,decay4,decay5}. The purpose of the present study is to consider the laser-assisted charged Higgs decay within the framework of 2HDM type-II. This is done by addressing the three decay modes; namely, leptonic, hadronic and bosonic. Our theoretical calculation is based on the Furry picture approach \cite{furry}, where we evaluate the lowest-order $S$-matrix elements by using Volkov solutions \cite{volkov} to describe charged particles inside the laser field. The rest of the paper is organized as follows. First, we establish the expressions of decay width for different decay modes in Sect.~\ref{sec:theory}. In Sect.~\ref{sec:res}, we discuss the numerical results obtained, and we finally conclude in Sect.~\ref{sec:conclusion}. Note that natural units $c=\hbar=1$ are used throughout. \section{Outline of the theory}\label{sec:theory} We consider the decay of the charged Higgs boson $H^+$ in the presence of a laser field. Since we have three decay modes, this section is divided into three subsections. Each one is dedicated to the calculation of the decay width for each decay mode. The calculation is detailed for the first decay mode, and elsewhere we limit ourselves to the necessary and give the final expressions. We will start with the leptonic decay, then the hadronic and finally the bosonic decay mode. \subsection{Leptonic decay width of the charged Higgs in the presence of a laser field} We begin by considering the leptonic decay process of charged Higgs boson $H^{+}$, with 4-momentum $k_{H^+}$ and mass $M_{H^+}$, into an antilepton ($\ell^+$) and a corresponding neutrino ($\nu_{\ell}$) in a circularly polarized electromagnetic (EM) field. It can be schematized as follows: \begin{equation}\label{processus} H^{+}(k_{H^{+}})\longrightarrow \ell^{+} (p_{1})+\nu_{\ell}(p_{2}),~~~~\ell\equiv (e,\mu,\tau), \end{equation} where $p_{1}$ and $p_{2}$ are the free 4-momenta of antilepton and neutrino. The corresponding Feynman diagram is presented in Fig.~\ref{diagram1}. \begin{figure}[hbtp] \centering \includegraphics[scale=0.6]{fig1} \caption{Feynman diagram for the leptonic decay of the charged Higgs boson ($H^{+}\rightarrow \ell^{+}\nu_{\ell}$).}\label{diagram1} \end{figure} We take the laser field as a circularly polarized monochromatic EM field, which is classically described by the following 4-potential \begin{align}\label{potential} A^{\mu}(\phi)=a^{\mu}_{1}\cos(\phi)+a^{\mu}_{2}\sin(\phi), \end{align} where $\phi=(k.x)$ is the phase of the laser field. $k=(\omega,\textbf{k})$ is the wave 4-vector and $\omega$ is the laser frequency. The 4-amplitudes $a^{\mu}_{1}=|\textbf{a}|(0,1,0,0)$ and $a^{\mu}_{2}=|\textbf{a}|(0,0,1,0)$ are orthogonal and equal in magnitude, which implies $(a_{1}.a_{2})=0$ and $a_{1}^{2}=a_{2}^{2}=a^{2}=-|\textbf{a}|^{2}=-(\xi_{0}/\omega)^{2}$ where $\xi_{0}$ is the electric field strength. We assume that this 4-potential satisfies the Lorentz gauge condition, $k_{\mu}A^{\mu}=0$, which means $(k.a_{1})=(k.a_{2})=0$, indicating that the wave vector $\textbf{k}$ is chosen to be along the $z$-axis. \\ The equivalent low-order $S$-matrix element for the process (\ref{processus}) in 2HDM type II can be written as follows \cite{greiner}: \begin{equation} S_{fi}=\frac{ig m_{\ell}}{2\sqrt{2}M_{W}}\tan(\beta)\int d^{4}x\overline{\psi}_{\nu_{\ell}}(x,p_{2})(1+\gamma^{5})\psi_{\ell^+}(x,p_{1})\overline{\phi}_{H}(x,k_{H^{+}}), \end{equation} where $g$ is the electroweak coupling constant. $m_{\ell}$ and $M_{W}$ are the mass of the outgoing lepton and $W$-boson. In order to take into account the interaction of the charged Higgs (0-spin particle) with the laser field, its wave function obeys the Klein-Gordon equation for bosons of spin zero. Hence, the corresponding Volkov solutions are given, normalized to the volume $V$, as follows \cite{Szymanowski}: \begin{equation}\label{Higgswave function} \phi_{H}(x,k_{H^{+}})=\frac{1}{\sqrt{2QV}}\times e^{iS(q,x)}, \end{equation} where $Q$ is the total energy of $H^+$ in the presence of the laser field, and \begin{equation} S(q,x)=q.x-\frac{ e(a_{1}.k_{H^{+}})}{(k.k_{H^{+}})}\sin(\phi)+\frac{ e(a_{2}.k_{H^{+}})}{(k.k_{H^{+}})}\cos(\phi), \end{equation} where $e=-|e|<0$ is the charge of electron, and the 4-momentum $q$ of the dressed $H^+$ is given by \begin{equation} q_=k_{H^{+}}-\frac{e^{2}a^{2}}{2(k.k_{H^{+}})}k. \end{equation} The square of $q$ reads \begin{equation}\label{meffH} q^{2}=M^{*2}_{H^{+}}=M_{H^{+}}^{2}-e^{2}a^{2}, \end{equation} where $M^{*}_{H^+}$ is the effective mass of $H^+$ acquired inside the laser field.\\ The outgoing antilepton is described by the relativistic Dirac-Volkov functions \cite{volkov} normalized to the volume $V$ as follows: \begin{equation}\label{hwave function} \psi_{\ell^+}(x,p_{1})=\bigg[1-\frac{ e\slashed{k}\slashed{A}}{2(k.p_{1})}\bigg]\frac{v(p_{1},s_{1})}{\sqrt{2Q_{1}V}}\times e^{iS(q_{1},x)}, \end{equation} where \begin{equation} S(q_{1},x)=q_{1}.x-\frac{ e(a_{1}.p_{1})}{(k.p_{1})}\sin(\phi)+\frac{ e(a_{2}.p_{1})}{(k.p_{1})}\cos(\phi). \end{equation} $v(p_{1},s_{1})$ is the free Dirac spinor for the antilepton with 4-momentum $p_{1}$ and spin $s_{1}$ satisfying the following relation: $\sum_{s_{1}}v(p_{1},s_{1})\overline{v}(p_{1},s_{1})=\slashed{p}_{1}+m_{\ell}$. The 4-vector $q_{1}=(Q_{1},\textbf{q}_{1})$ is the quasi-momentum, which is related to $p_1$ by the following relation: \begin{equation} q_{1}=p_{1}-\frac{e^{2}a^{2}}{2(k.p_{1})}k,~~~q_{1}^{2}=m^{*2}_{\ell}=m_{\ell}^{2}-e^{2}a^{2}, \end{equation} where $m^{*}_{\ell}$ is the effective mass of the anti-leptons inside the laser field.\\ The outgoing neutrino, which is electrically neutral, does not interact with the EM field. Its wave function is given by \cite{greiner}: \begin{align}\label{neutrinowave} \psi_{\nu_{\ell}}(x,p_2)=\dfrac{u(p_{2},s_{2})}{\sqrt{2E_{2}V}}\times e^{-ip_{2}.x}, \end{align} where $E_{2}=p_{2}^{0}=|\textbf{p}_{2}|$, and $u(p_{2},s_{2})$ is the free Dirac spinor satisfying $\sum_{s_{2}}u(p_{2},s_{2})\overline{u}(p_{2},s_{2})=\slashed{p}_{2}$. \\ After some algebraic manipulations, we find that $S_{fi}$ becomes \begin{equation}\label{Sfileptons} \begin{split} S_{fi}(H^{+}\rightarrow \ell^{+}\nu_{\ell})=&\frac{igm_{\ell}}{2\sqrt{2}M_{W}}\frac{\tan(\beta)}{\sqrt{8QQ_{1}E_{2}V^{3}}}\int d^{4}x \overline{u}(p_{2},s_{2})\Big[\Big(1+\gamma^{5}\Big)\Big(1-\frac{ e\slashed{k}\slashed{A}}{2(k.p_{1})}\Big)\Big]v(p_{1},s_{1}),\\ & \times e^{i(q_{1}+p_{2}-q).x}\times e^{-iz_{\ell}\sin(\phi-\phi_{0})}, \end{split} \end{equation} where we have used the following transformation: \begin{equation} e^{i(S(q_1,x)-S(q,x))}=e^{i(q_{1}-q).x} \times e^{-iz_{\ell}\sin(\phi-\phi_{0})}, \end{equation} with \begin{equation}\label{argumentlepton} z_{\ell}=e \sqrt{\bigg(\frac{a_{1}.p_{1}}{k.p_{1}}-\frac{a_{1}.k_{H^{+}}}{k.k_{H^{+}}}\bigg)^{2}+\bigg(\frac{a_{2}.p_{1}}{k.p_{1}}-\frac{a_{2}.k_{H^{+}}}{k.k_{H^{+}}}\bigg)^{2}}, \end{equation} and \begin{equation} \phi_{0}=\arctan\bigg[\frac{(a_{2}.p_{1})(k.k_{H^{+}})-(a_{2}.k_{H^{+}})(k.p_{1})}{(a_{1}.p_{1})(k.k_{H^{+}})-(a_{1}.k_{H^{+}})(k.p_{1})}\bigg]. \end{equation} After integration over the space-time and using the transformation that introduces Bessel functions \begin{equation} e^{iz\sin(\phi)}=\sum_{n=-\infty}^{+\infty} J_{n}(z) e^{in \phi}, \end{equation} the $S$-matrix element can be written as a sum of ordinary Bessel functions, such that \begin{equation} S_{fi}(H^{+}\rightarrow \ell^{+}\nu_{\ell})=\sum_{n=-\infty}^{+\infty} \frac{igm_{\ell}}{2\sqrt{2}M_{W}}\frac{\tan(\beta)}{\sqrt{8QQ_{1}E_{2}V^{3}}}(2\pi)^{4}\delta^{4}(q_{1}+p_{2}-q-nk)\mathcal{M}^{n}_{fi}. \end{equation} The quantity $\mathcal{M}^{n}_{fi}$ is defined by \begin{equation} \mathcal{M}^{n}_{fi}=\overline{u}(p_{2},s_{2})\Big[\Big(1+\gamma^{5}\Big)\Big(b_{n}(z_{\ell})-C(p_{1})\slashed{k}\slashed{a}_{1}b_{1n}(z_{\ell})-C(p_{1})\slashed{k}\slashed{a}_{2}b_{2n}(z_{\ell})\Big)\Big]v(p_{1},s_{1}), \end{equation} where $C(p_{1})=e/[2(k.p_{1})]$ and the three coefficients $b_{n}(z_{\ell})$, $b_{1n}(z_{\ell})$ and $b_{2n}(z_{\ell})$ are expressed as a function of ordinary Bessel functions by \cite{landeau} \begin{equation} \begin{split} & b_{n}(z_{\ell})=J_{n}(z_{\ell})e^{in\phi_{0}},\\ &b_{1n}(z_{\ell})=\frac{1}{2}\big[ J_{n+1}(z_{\ell})e^{i(n+1)\phi_{0}}+J_{n-1}(z_{\ell})e^{i(n-1)\phi_{0}}\big],\\ &b_{2n}(z_{\ell})=\frac{1}{2i}\big[ J_{n+1}(z_{\ell})e^{i(n+1)\phi_{0}}-J_{n-1}(z_{\ell})e^{i(n-1)\phi_{0}}\big].\\ \end{split} \end{equation} $z_{\ell}$ ($\ell$ stands for leptonic) is the argument of Bessel functions already defined in Eq.~(\ref{argumentlepton}) and $n$, called the order, is interpreted as the number of photons exchanged between the laser field and the decay process.\\ To calculate the partial decay width, $\Gamma(H^{+}\rightarrow \ell^{+}\nu_{\ell})$, we multiply the square $S$-matrix element, $|S_{fi}|^{2}$, by the density of final states, and divide it by the time $T$ and finally, we have to make the average on the initial spins and the sum on the final ones. Thus, the laser-assisted leptonic decay width is expressed as follows: \begin{align} \Gamma(H^{+}\rightarrow \ell^{+}\nu_{\ell})=\sum_{n=-\infty}^{+\infty}\Gamma^{n}(H^{+}\rightarrow \ell^{+}\nu_{\ell}), \end{align} where the individual partial decay width for each $n$, $\Gamma^{n}(H^{+}\rightarrow \ell^{+}\nu_{\ell})$, is defined by \begin{align} \Gamma^{n}(H^{+}\rightarrow \ell^{+}\nu_{\ell})=\frac{g^{2}m^{2}_{\ell}\tan^{2}(\beta)}{64M^{2}_{W}Q}\int \dfrac{d^{3}q_{1}}{(2\pi)^{3}Q_{1}}\int \dfrac{d^{3}p_{2}}{(2\pi)^{3}E_{2}}(2\pi)^{4}\delta^{4}(q_{1}+p_{2}-q-nk)|\overline{\mathcal{M}^{n}_{fi}}|^{2}, \end{align} where \begin{align}\label{sums} |\overline{\mathcal{M}^{n}_{fi}}|^{2}=\sum_{s_{1},s_{2}}\Big|\overline{u}(p_{2},s_{2})\Big[\Big(1+\gamma^{5}\Big)\Big(b_{n}(z_{\ell})-C(p_{1})\slashed{k}\slashed{a}_{1}b_{1n}(z_{\ell})-C(p_{1})\slashed{k}\slashed{a}_{2}b_{2n}(z_{\ell})\Big)\Big]v(p_{1},s_{1})\Big|^{2}. \end{align} Performing the integration over $d^{3}p_{2}$ and using $\delta^{4}(q_{1}+p_{2}-q-nk)=\delta^{0}(Q_{1}+E_{2}-Q-n\omega)\delta^{3}(\textbf{q}_{1}+\textbf{p}_{2}-\textbf{q}-n\textbf{k})$, we find \begin{equation} \Gamma^{n}(H^{+}\rightarrow \ell^{+}\nu_{\ell})=\frac{g^{2}m^{2}_{\ell}\tan^{2}(\beta)}{64(2\pi)^{2}M^{2}_{W}Q}\int \dfrac{d^{3}q_{1}}{Q_{1}E_{2}}\delta^{0}(Q_{1}+E_{2}-Q-n\omega)|\overline{\mathcal{M}^{n}_{fi}}|^{2}, \end{equation} with $\textbf{q}_{1}+\textbf{p}_{2}-\textbf{q}-n\textbf{k}=0$. Choosing the rest frame of $H^{+}$ and using $ d^{3}q_{1}=|\textbf{q}_{1}|Q_{1}dQ_{1}d\Omega_{\ell}$, we get \begin{equation} \begin{split} \Gamma^{n}(H^{+}\rightarrow \ell^{+}\nu_{\ell})=&\frac{g^{2}m^{2}_{\ell}\tan^{2}(\beta)}{64(2\pi)^{2}M^{2}_{W}Q}\int \frac{|\textbf{q}_{1}|}{E_{2}}|\overline{\mathcal{M}^{n}_{fi}}|^{2}dQ_{1}d\Omega_{\ell}\delta^{0}\bigg(Q_{1}-Q-n\omega\\ &+\sqrt{\Big(n-\frac{e^{2}a^{2}}{2(k.k_{H^{+}})}\Big)^{2}\omega^{2}+Q^{2}_{1}-m^{*2}_{\ell}+2\omega\sqrt{Q^{2}_{1}-m^{*2}_{\ell}}\Big(\frac{e^{2}a^{2}}{2(k.k_{H^{+}})}-n\Big)\cos(\theta)}\bigg), \end{split} \end{equation} where we have replaced $E_{2}$ by its expression (the square root) to show the $Q_{1}$ dependence inside the delta function. The remaining integral over $dQ_{1}$ can be solved by using the familiar formula \cite{greiner}: \begin{align} \int dyf(y)\delta(g(y))=\dfrac{f(y)}{|g'(y)|}\bigg|_{g(y)=0}. \end{align} Thus, we get \begin{equation} \Gamma^{n}(H^{+}\rightarrow \ell^{+}\nu_{\ell})=\frac{g^{2}m^{2}_{\ell}\tan^{2}(\beta)}{64(2\pi)^{2}M^{2}_{W}Q}\int \frac{|\textbf{q}_{1}||\overline{\mathcal{M}^{n}_{fi}}|^{2}d\Omega_{\ell}}{Q+n\omega+\frac{Q_{1}\omega\cos(\theta)}{\sqrt{Q_{1}^{2}-m^{*2}_{\ell}}}\Big(n-\frac{e^{2}a^{2}}{2(k.k_{H^{+}})}\Big)}, \end{equation} where $g^{2}=8G_{F}M_{W}^{2}/\sqrt{2}$, with $G_{F}=(1.166~37\pm0.000~02)\times10^{-11}~\text{MeV}^{-2}$ is the Fermi coupling constant.\\ The term $|\overline{\mathcal{M}^{n}_{fi}}|^{2}$ in (\ref{sums}) can be calculated by converting the sums over the spins into traces as follows: \begin{equation}\label{trace1} |\overline{\mathcal{M}^{n}_{fi}}|^{2}=\text{Tr}\big[\slashed{p}_{2}\Lambda^{n}(\slashed{p}_{1}-m_{\ell})\overline{\Lambda}^{n}\big], \end{equation} where \begin{equation} \begin{split} &\Lambda^{n}=\big(1+\gamma^{5}\big)\big(b_{n}(z_{\ell})-C(p_{1})\slashed{k}\slashed{a}_{1}b_{1n}(z_{\ell})-C(p_{1})\slashed{k}\slashed{a}_{2}b_{2n}(z_{\ell})\big),\\ &\overline{\Lambda}^{n}=\big(1-\gamma^{5}\big)\big(b^{*}_{n}(z_{\ell})-C(p_{1})\slashed{a}_{1}\slashed{k}b^{*}_{1n}(z_{\ell})-C(p_{1})\slashed{a}_{2}\slashed{k}b^{*}_{2n}(z_{\ell})\big). \end{split} \end{equation} The trace calculation is performed with the help of FeynCalc \cite{feyncalc1}. Refer to appendix \ref{appendix} for the detailed and explicit expression of $|\overline{\mathcal{M}^{n}_{fi}}|^{2}$. \subsection{Hadronic decay width of the charged Higgs in the presence of a laser field} In the framework of beyond standard model, we consider the hadronic decay of $H^+$ into a pair of quarks \begin{equation}\label{processus_hadr} H^{+}(k_{H^{+}})\longrightarrow q (p_{1})+\overline{q}'(p_{2}), \end{equation} where $q\equiv (u,c,t)$ and $q'\equiv (d,s,b)$. The overall coupling between $H^+$ and the quarks is defined as follows \cite{marin2004}: \begin{equation} \text{vertex}-H^{+}\text{-}q\text{-}\overline{q}'=\frac{igV_{qq'}}{2\sqrt{2}M_{W}}(A+B\gamma^{5}), \end{equation} where $A=m_{q'}\tan(\beta)+m_{q}\cot(\beta)$ and $B=m_{q'}\tan(\beta)-m_{q}\cot(\beta)$. $V_{qq'}$ is the element of the CKM matrix. The lowest-order $S$-matrix element of the hadronic decay of $H^{+}$ is described as follows: \begin{equation}\label{hadr Sfi} S_{fi}(H^{+}\rightarrow q\overline{q}')=\frac{ig V_{qq'}}{2\sqrt{2}M_{W}}\int d^{4}x\overline{\psi}_{q}(x,p_{1})(A+B\gamma^{5})\psi_{\overline{q}'}(x,p_{2})\overline{\phi}_{H}(x,k_{H^{+}}), \end{equation} where $\psi_{q}$ and $\psi_{\overline{q}'}$ are, respectively, the relativistic Dirac-Volkov functions that describe the quark and antiquark inside the laser field.\\ To compute the hadronic decay width of $H^+$ in the presence of an EM field, we follow the same procedure as for the leptonic decay width. We get \begin{equation} \Gamma(H^{+}\rightarrow q \overline{q}')=\sum_{n=-\infty}^{+\infty}\Gamma^{n}(H^{+}\rightarrow q \overline{q}'), \end{equation} where $\Gamma^{n}(H^{+}\rightarrow q \overline{q}')$ is defined by \begin{equation} \Gamma^{n}(H^{+}\rightarrow q \overline{q}')=\frac{G_{F}\sqrt{2}|V_{qq'}|^{2}}{16(2\pi)^{2}Q}\int\frac{|\textbf{q}_{1}||\overline{\mathcal{M}^{n,h}_{fi}}|^{2}d\Omega_{q}}{Q+n\omega+\frac{\omega Q_{1}\cos(\theta)}{\sqrt{Q_{1}^{2}-m^{*2}_{q}}}\Big(n-\frac{e^{2}a^{2}}{2(k.k_{H^{+}})}\Big)}. \end{equation} The term $|\overline{\mathcal{M}^{n,h}_{fi}}|^{2}$ (the superscript $h$ stands for hadronic and $n$ is the number of photons) is reduced to trace calculation as follows: \begin{equation}\label{trace2} \begin{split} |\overline{\mathcal{M}^{n,h}_{fi}}|^{2}=&\text{Tr}\Big[(\slashed{p}_{1}+m_{q})\Big\lbrace\Big(A+B\gamma^{5}\Big)b_{n}(z_{h})+\Big(C(p_{1})\slashed{a}_{1}\slashed{k}(A+B\gamma^{5})-C(p_{2})(A+B\gamma^{5})\slashed{k}\slashed{a}_{1}\Big)\\ &\times b_{1n}(z_{h})+\Big(C(p_{1})\slashed{a}_{2}\slashed{k}(A+B\gamma^{5})-C(p_{2})(A+B\gamma^{5})\slashed{k}\slashed{a}_{2}\Big)b_{2n}(z_{h})\Big\rbrace(\slashed{p}_{2}-m_{q'})\\ &\times\Big\lbrace\Big(A-B\gamma^{5}\Big) b^{*}_{n}(z_{h})+\Big(C(p_{1})(A-B\gamma^{5})\slashed{k}\slashed{a}_{1}-C(p_{2})\slashed{a}_{1}\slashed{k}(A-B\gamma^{5})\Big) b^{*}_{1n}(z_{h})\\ &+\Big(C(p_{1})(A-B\gamma^{5})\slashed{k}\slashed{a}_{2}-C(p_{2})\slashed{a}_{2}\slashed{k}(A-B\gamma^{5})\Big)b^{*}_{2n}(z_{h})\Big\rbrace\Big], \end{split} \end{equation} where $z_{h}$ is the argument of Bessel functions. Note here that $C(p_{1})=\eta e/[2(k.p_1)]$ and $C(p_{2})=\eta' e/[2(k.p_2)]$, where the two factors $\eta=-2/3$ and $\eta'=1/3$ are, respectively, due to the fractional charge of up and down quarks. Regarding the sign, it should be noted that we considered $e<0$ as the charge of electron. The result of trace (\ref{trace2}) is included in appendix \ref{appendix}. \subsection{Bosonic decay width of the charged Higgs in the presence of a laser field}\label{subbosonic} The bosonic decay mode for the $H^+$ is depicted as follows: \begin{equation}\label{bosonic_mode} H^{+}(k_{H^{+}})\longrightarrow W^{+}(p_{W})+\Phi(p_{\Phi}),~~~~(\Phi\equiv h,H,A), \end{equation} with $h$, $H$ and $A$ being the light CP even neutral scalar, the heavy CP even neutral scalar and CP odd neutral pseudoscalar, respectively. The overall couplings between one gauge boson and two Higgs bosons in 2HDM of type II are defined as follows \cite{gunion2018}: \begin{equation} \begin{split} &\text{vertex}~H^{+}\text{-}W^{+}\text{-}h=\frac{-ig}{2}\cos(\beta-\alpha)(p_{W}^{\mu}+p_{h}^{\mu}),\\ &\text{vertex}~H^{+}\text{-}W^{+}\text{-}H=\frac{-ig}{2}\sin(\beta-\alpha)(p_{W}^{\mu}+p_{H}^{\mu}),\\ &\text{vertex}~H^{+}\text{-}W^{+}\text{-}A=\frac{-ig}{2}(p_{W}^{\mu}+p_{A}^{\mu}). \end{split} \end{equation} The lowest-order $S$-matrix element for the laser-assisted bosonic decay of the $H^+$ is as follows: \begin{equation} S_{fi}(H^{+}\rightarrow W^{+}\Phi)=\frac{-ig}{2}g_{{}_{HW\Phi}}\int d^{4}x\overline{\psi}_{\Phi}(x,p_{\Phi}) (p_{W}^{\mu}+p_{\Phi}^{\mu})\psi_{W}(x,p_{W})\overline{\phi}_{H}(x,k_{H^{+}}), \end{equation} where $g_{{}_{HW\Phi}}=\cos(\beta-\alpha)$, $g_{{}_{HW\Phi}}=\sin(\beta-\alpha)$ and $g_{{}_{HW\Phi}}=1$ correspond respectively to the decays $H^{+}\rightarrow W^{+}h$, $H^{+}\rightarrow W^{+}H$ and $H^{+}\rightarrow W^{+}A$. In order to take into account the interaction of the outgoing electrically charged $W^{+}$-boson (1-spin particle) with the EM field, we will describe it by the following wave function \cite{kurilin1999,obukhov2}: \begin{equation}\label{wwave function} \psi_{W}(x,p_{W})=\bigg[\textsl{g}_{\mu\nu}-\dfrac{e}{(k.p_{W})}\big(k_{\mu}A_{\nu}-k_{\nu}A_{\mu}\big)-\frac{e^{2}}{2(k.p_{W})^{2}}A^{2}k_{\mu}k_{\nu}\bigg]\frac{\varepsilon^{\nu}(p_{W},\lambda)}{\sqrt{2p^{0}_{W}V}}\times e^{iS(q_{W},x)}, \end{equation} where $\textsl{g}_{\mu\nu}=\text{diag}(1,-1,-1,-1)$ is the metric tensor of Minkowski space, $\varepsilon^{\nu}(p,\lambda)$ is the $W^{+}$-boson polarization 4-vector such that $\sum_{\lambda=1}^{3}\varepsilon_{\mu}(p_{W},\lambda)\varepsilon_{\nu}^{*}(p_{W},\lambda)=-\textsl{g}_{\mu\nu}+p^{W}_{\mu}p^{W}_{\nu}/M_{W}^{2}$, and \begin{equation} S(q_{W},x)=-q_{W}.x+\dfrac{e(a_{1}.p_{W})}{k.p_{W}}\sin(\phi)-\dfrac{e(a_{2}.p_{W})}{k.p_{W}}\cos(\phi), \end{equation} with the dressed 4-momentum $q_{W}=(Q_{W},\textbf{q}_{W})$ and the effective mass $M_{W}^{*}$ that the boson $W^{+}$ acquires inside the EM field. For the final neutral scalar bosons, they are described by the following wave function: \begin{equation} \psi_{\Phi}(x,p_{\Phi})=\frac{1}{\sqrt{2p_{\Phi}^0V}}\times e^{-ip_{\Phi}.x}, \end{equation} which obeys the Klein-Gordon equation for bosons with spin zero \cite{greinerqed}.\\ By following the same procedure as before, we obtain for the bosonic decay width \begin{equation} \Gamma(H^{+}\rightarrow W^{+}\Phi)=\sum^{+\infty}_{n=-\infty}\frac{\sqrt{2}G_{F}M^{2}_{W}}{8(2\pi)^{2}Q}g^{2}_{{}_{HW\Phi}}\int\frac{|\textbf{q}_{W}||\overline{\mathcal{M}^{n,b}_{fi}}|^{2}d\Omega_{W}}{Q+n\omega+\frac{\omega Q_{W}\cos(\theta)}{\sqrt{Q_{W}^{2}-M_{W}^{*2}}}\Big(n-\frac{e^{2}a^{2}}{2(k.k_{H^{+}})}\Big)}, \end{equation} where \begin{equation} \begin{split} |\overline{\mathcal{M}^{n,b}_{fi}}|^{2}=&\Big(-\textsl{g}^{\mu\nu}+\frac{p^{\mu}_{W}p^{\nu}_{W}}{M_{W}^{2}}\Big)\Big(p_{W}^{\mu}+p_{\Phi}^{\mu}\Big)\Big\lbrace \Big(\textsl{g}_{\mu\nu}-\dfrac{a^{2}e^{2}}{2(k.p_{W})}k_{\mu}k_{\nu}\Big) b_{n}(z_{b})+\frac{e}{k.p_{W}}\Big(k_{\mu}a_{1\nu}-k_{\nu}a_{1\mu}\Big) \\ &\times b_{1n}(z_{b})+\frac{e}{k.p_{W}}\Big(k_{\mu}a_{2\nu}-k_{\nu}a_{2\mu}\Big) b_{2n}(z_{b})\Big\rbrace\Big(p_{W}^{\nu}+p_{\Phi}^{\nu}\Big)\Big\lbrace \Big(\textsl{g}_{\nu\mu}-\dfrac{a^{2}e^{2}}{2(k.p_{W})}k_{\nu}k_{\mu}\Big) b^{*}_{n}(z_{b})\\ &+\frac{e}{k.p_{W}}\Big(k_{\nu}a_{1\mu}-k_{\mu}a_{1\nu}\Big) b^{*}_{1n}(z_{b})+\frac{e}{k.p_{W}}\Big(k_{\nu}a_{2\mu}-k_{\mu}a_{2\nu}\Big) b^{*}_{2n}(z_{b})\Big\rbrace, \end{split} \end{equation} where $z_{b}$ is the Bessel function argument that appears in the calculation of the bosonic decay width of $H^+$. The quantity $|\overline{\mathcal{M}^{n,b}_{fi}}|^{2}$ (the superscript $b$ stands for bosonic) does not reduce here to the trace calculation since the bosonic decay process (\ref{bosonic_mode}) contains only scalar bosons which have no spin to sum over. \section{Results and discussion}\label{sec:res} This section will discuss the different numerical results obtained. It is quite appropriate to begin by examining the accuracy and consistency of our theoretical calculation. We have always been accustomed to comparing our theoretical expressions in the presence of a laser field with the corresponding ones in the absence of the laser field when applying the missed field limit, i.e., at $\xi_0=0$ V/cm and $n=0$ (no photons exchange). We have chosen to compare with the results previously presented in the following literature \cite{ahmed2017,li2016}. The thing which is known to be paid attention to when working beyond the standard model is the values of the free parameters. They must be carefully selected to respect current experimental limits. In our case, in addition to laser parameters ($\xi_0$ and $\omega$), the free model parameters are taken as follows: $M_{H^+}$, $M_{H}$, $M_{A}$, $m_{h}$, $\tan(\beta)$ and $\sin(\beta-\alpha)$. For $M_{H^+}$, we mention here that whenever we want to fix its value, we choose it in the range $570-800$ GeV, according to the recent study \cite{misiak2017}. To enforce that the energy-conservation law is always respected, we also note here that we have applied a condition (added in our computational program) on the effective mass of the charged Higgs, $M_{H^+}^*$, so that it always remains greater than the masses of the particles in the final state (on shell). Otherwise (off shell), the decay width is zero. The first reference \cite{ahmed2017}, to be compared with, adopted degenerate masses of the neutral Higgs bosons (i.e., $M_{H}=M_{A}=M_{H^+}$), and chose the remaining parameters as follows, $m_h=125$ GeV, $\tan(\beta)=10$ and $\sin(\beta-\alpha)=1$. In the latter conditions, all $H^+$ decay modes are absent except two, which are $H^+ \rightarrow t \bar{b}$ and $H^+ \rightarrow \tau^+ \nu_\tau$. If we also apply these conditions and make the missed field limit, we get the result shown in Fig.~\ref{fig3}\textbf{(a)}. The second comparison we made was with the result presented in \cite{li2016}. Our obtained result is shown in Fig.~\ref{fig3}\textbf{(b)}, where the free parameters are taken as follows: $M_{H}=M_{A}=200$ GeV, $m_h=125$ GeV, $\tan(\beta)=1$ and $\sin(\beta-\alpha)=0.9$. Figs.~\ref{fig3}\textbf{(a)} and \ref{fig3}\textbf{(b)} are in good agreement, respectively, with the result presented in \cite{ahmed2017} (see Fig.~8 therein) and \cite{li2016} (see Fig.~2 therein) if the same parameters are selected. These two figures are only intended to verify our theoretical calculation if it gives the result without laser in the limit of the vanishing field. \begin{figure}[t] \centering \includegraphics[scale=0.55]{fig2a.eps}\hspace{0.2cm} \includegraphics[scale=0.55]{fig2b.eps} \caption{Branching ratios of $H^+$ decay in 2HDM type II as a function of its mass, setting $\xi_0=0$ V/cm and $n=0$ (absence of laser field). The free parameters are \textbf{(a)} $M_{H^+}=M_H=M_A$, $m_h=125$ GeV, $\tan(\beta)=10$, $\sin(\beta-\alpha)=1$ (to be compared with \cite{ahmed2017}) and \textbf{(b)} $M_H=M_A=200$ GeV, $m_h=125$ GeV, $\tan(\beta)=1$, $\sin(\beta-\alpha)=0.9$ (to be compared with \cite{li2016}).}\label{fig3} \end{figure} Because of the many decay modes of $H^+$, we decided to combine them into two, fermionic and bosonic. The first is the sum of the leptonic and hadronic widths, and the second is the bosonic width expressed in subsection~\ref{subbosonic}. \begin{equation} H^+\rightarrow \text{Fermions} = H^+\rightarrow \text{Hadr} + H^+\rightarrow \text{Lept}, \end{equation} where \begin{equation} H^+\rightarrow \text{Hadr} = H^+\rightarrow u\bar{d},~c\bar{s},~t\bar{b},~~~\text{and} ~~~H^+\rightarrow \text{Lept} = H^+\rightarrow e^+ \nu_e,~\mu^+ \nu_\mu,~\tau^+ \nu_\tau, \end{equation} where other hadronic decay channels are greatly suppressed by CKM off-diagonal matrix elements. For the bosonic mode, we define \begin{equation} H^+\rightarrow \text{Bosons} = H^+\rightarrow W^+h,~ W^+H, ~W^+A. \end{equation} \begin{figure}[hbtp] \centering \includegraphics[scale=0.5]{fig3.eps} \caption{Laser-free branching ratios of $H^+$ decay to bosonic and fermionic channels as a function of $M_{H^+}$. The free parameters are as in Fig.~\ref{fig3}\textbf{(b)}.}\label{fig4} \end{figure} The variations of the branching ratios for the fermionic and bosonic decay modes of $H^+$ are presented in Fig.~\ref{fig4} under the same conditions as in Fig.~\ref{fig3}\textbf{(b)}.\\ \begin{figure}[h] \centering \includegraphics[scale=0.55]{fig4a.eps}\hspace*{0.2cm} \includegraphics[scale=0.55]{fig4b.eps}\par\vspace*{0.1cm} \includegraphics[scale=0.55]{fig4c.eps}\hspace*{0.2cm} \includegraphics[scale=0.55]{fig4d.eps} \caption{Variation of the total decay width of $H^+$ in the presence of the laser versus the number of photons $n$. The free parameters are (unless otherwise stated) : $M_{H^+}=M_H=M_A=600$ GeV, $m_h=125$ GeV, $\sin(\beta-\alpha)=1$, $\tan(\beta)=10$, $\xi_0=10^7$ V/cm and $\hbar\omega=1.17$ eV.}\label{fig5} \end{figure} Given that the light charged Higgs boson has been excluded by the $B$-meson physics \cite{misiak2017,misiak2015}, we consider here the heavy charged Higgs regime. In this regime, and based on Fig.~\ref{fig3}\textbf{(a)}, we notice that channel $H^+\rightarrow t\bar{b}$ is the only dominant one respecting the conditions adopted there. In Figs.~\ref{fig3}\textbf{(b)} and \ref{fig4}, where the same free parameters have been chosen, we see that the two channels containing bosons in final state, exactly $H^+\rightarrow W^+H,~W^+A$, dominate in the heavy mass regime. \\ After checking the accuracy of our theoretical calculation by comparison with the recent literature, let us now consider the turn-on of the laser and discuss the decay of $H^+$ in the presence of a circularly polarized EM field. There are three parameters that characterize the laser when it is on, which are the field strength $\xi_0$, its frequency $\hbar\omega$, as well as the number of photons exchanged $n$. The interaction of the laser field with the decay system is therefore dependent on the modification of these parameters. The effect of the laser on $H^+$ decay is more reflected in the stimulated processes of absorption and emission of photons. To illustrate this phenomenon of multiphoton processes, we plot the variations of the total decay width $(\Gamma_\text{tot}=\Gamma(H^{+}\rightarrow \text{Fermions})+\Gamma(H^{+}\rightarrow \text{Bosons}))$ as a function of the number of photons $n$, as shown in Fig.~\ref{fig5}. The model parameters are chosen (unless otherwise stated) as follows: $M_{H^+}=M_H=M_A=600$ GeV, $m_h=125$ GeV, $\sin(\beta-\alpha)=1$, $\tan(\beta)=10$. For the laser parameters, we set $\xi_0=10^7$ V/cm and $\hbar\omega=1.17$ eV. \\ Figure \ref{fig5}\textbf{(a)} displays the photon exchange phenomenon for two different field strengths, $10^6$ and $10^7$ V/cm. Each point corresponds to the value of the total decay width with respect to an integer number of photons $n$. The positive side represents emission and the negative one represents absorption. It is clear that the number of photons exchanged at $\xi_0=10^7$ V/cm is greater than that exchanged at $\xi_0=10^6$ V/cm. The increasing number of photons with higher field strength is evidence of the size of the laser effect on the decay system. Figure \ref{fig5}\textbf{(b)} shows the photon exchange process for two different frequencies. In contrast to Fig.~\ref{fig5}\textbf{(a)}, we see that the largest number of photons is exchanged at the lowest frequency. A small frequency means a pulse duration large enough to match the lifetime that the free charged Higgs boson is expected to live. Therefore, the effect is stronger at low frequencies than at high frequencies. In Fig.~\ref{fig5}\textbf{(c)}, it is obvious that the mass of the charged Higgs boson does not significantly affect the photon exchange, at least at $\xi_0=10^7$ V/cm. The charged Higgs boson with this heavy mass only feels the presence of the laser field at super intensities, unlike the leptons and hadrons in the final state. This is clearly seen in the effective mass (Eq.~(\ref{meffH})) values of $H^+$. For example, if we take the mass $M_{H^+}=600$ GeV, it remains the same in the presence of the laser until $\xi_0=10^{13}$ V/cm. At super intensities (e.g., $\xi_0=10^{16}$ V/cm and $\omega=1.17$ eV), the effective mass becomes $M^*_{H^+}=623.253$ GeV. This means that the laser made $H^+$ gain an additional $23.253$ GeV of mass. Figure \ref{fig5}\textbf{(d)} indicates that large values of $\tan(\beta)$ induce the exchange of photons between the laser and the decay system. \begin{table} \caption{Numerical values of branching ratios for $H^+$ decay as a function of the laser field strength, with $M_{H^+}=620$ GeV and $\hbar\omega=0.117$ eV. The model parameters are as in figure \ref{fig3}\textbf{(b)}.}\label{tab1} \begin{center} \begin{tabular}{ccc} \toprule $\xi_{0}$ $[\text{V/cm}]$ & BR$(H^{+}\rightarrow \text{Fermions})$ & BR$(H^{+}\rightarrow \text{Bosons})$ \\ \hline $10$ & $0.2793$ & $0.7206$ \\ $10^{2}$ & $0.2793$ & $0.7206$ \\ $10^{3}$ & $0.27935$ & $0.7206$ \\ $10^{4}$ & $0.3587$ & $0.64124$ \\ $10^{5}$ & $0.5172$ & $0.4827$ \\ $10^{6}$ & $0.5845$ & $0.4154$ \\ $10^{7}$ & $0.57840$ & $0.4216$ \\ $10^{8}$ & $0.5742$ & $0.4257$ \\ $10^{9}$ & $0.58890$ & $0.4110$ \\ $10^{10}$ & $0.5667$ & $0.4332$ \\ $10^{11}$ & $0.1300$ & $0.8699$ \\ $10^{12}$ & $0.000026$ & $0.9999$ \\ \toprule \end{tabular} \end{center} \end{table} After discussing the effect of the laser on the total decay width and the photon exchange process, let us now turn to the analysis of the laser effect on the branching ratios. We shall do so in both choices of free parameters, as in Figs.~\ref{fig3}\textbf{(a)} and \ref{fig3}\textbf{(b)}. We start with the conditions chosen in Fig.~\ref{fig3}\textbf{(b)}. Table \ref{tab1} gives the numerical values of the bosonic and fermionic branching ratios in terms of field strength. The free parameters are chosen as in Fig.~\ref{fig3}\textbf{(b)}, with $M_{H^+}=620$ GeV. Through this table, it is clear that the low strengths of the laser field $[10-10^4~\text{V/cm}]$ did not affect the branching ratios, since the bosonic mode continued to be dominant, as in the absence of the laser. However, the laser effect starts to appear at high and medium field strengths $[10^5-10^{10}~\text{V/cm}]$. The laser has now enhanced the fermionic mode over the bosonic one. At field strengths of $10^{11}$ and $10^{12}$ V/cm (ultrastrong field), the laser made a dramatic and sudden change. It blocks the fermionic mode to fully open the bosonic one, which becomes the only one allowed at $10^{12}$ V/cm of almost $100\%$. Note that the two branching ratios listed in the table compensate for each other because of the probabilistic meaning they have. This means that their sum is 1 (or $100\%$). \begin{figure}[hbtp] \centering \includegraphics[scale=0.55]{fig5a.eps}\hspace*{0.2cm} \includegraphics[scale=0.55]{fig5b.eps} \caption{Variations of branching ratios for laser-assisted $H^+$ decay as a function of $M_{H^+}$ for two different frequencies at $\xi_0=10^7$ V/cm. The model parameters are chosen as in Fig.~\ref{fig3}\textbf{(a)}.}\label{fig6} \end{figure}\\ Under the same conditions as in Fig.~\ref{fig3}\textbf{(a)}, Fig.~\ref{fig6} displays the variations of branching ratios as a function of $M_{H^+}$ for two different frequencies $(0.117~\text{and}~2~\text{eV})$ at the field strength $\xi_0=10^7$ V/cm. In this case, as mentioned before, among all available channels, only $t\bar{b}$ and $\tau^+\nu_\tau$ channels remain open. As can be seen in this figure, the laser field strength of $10^7$ V/cm had no significant effect on the branching ratios. Indeed, the $t\bar{b}$ channel was initially dominant over $\tau^+\nu_\tau$ one in the absence of laser at the heavy Higgs masses. In the presence of a laser field of strength $10^7$ V/cm, there was only further enhancement of $t\bar{b}$ channel and suppression of the other depending on the frequency used. The effect of a laser with a lower frequency is significant compared to that with a higher frequency. \begin{figure}[hbtp] \centering \includegraphics[scale=0.6]{fig6.eps} \caption{Variations of branching ratios for laser-assisted $H^+$ decay as a function of the field strength. The model parameters are chosen as in Fig.~\ref{fig3}\textbf{(a)}, with $M_{H^+}=600$ GeV. The laser frequency is $\hbar\omega=0.117$ eV.}\label{fig7} \end{figure} Now, let us increase the laser field strength and see what happens in the ultra-high intensities regime. Figure \ref{fig7} shows the branching ratio changes versus the field strength under the same conditions as in Fig.~\ref{fig3}\textbf{(a)}. As can be seen in Fig~\ref{fig7}, there is no significant effect of the laser field on the branching ratios in the field strength range of $10$ to $10^{11}$ V/cm. But, once this range is exceeded, the laser makes a significant contribution to strongly enhancing $\tau^+\nu_\tau$ channel and accordingly reducing $t\bar{b}$. Although these super intensities are not yet available experimentally in laboratories, there is currently tremendous work to develop infrastructure for powerful laser sources, and it is only a matter of time before higher intensities are reached in the near future. We have carefully stopped at $10^{15}$ V/cm to avoid pair creation that occurs around $10^{16}$ V/cm (Schwinger limit) \cite{schwinger1,schwinger2,schwinger3}. This result, which is the change in branching ratios due to the laser, is very interesting and requires experimental investigation. \begin{figure}[hbtp] \centering \includegraphics[scale=0.6]{fig7a.eps}\hspace*{0.2cm} \includegraphics[scale=0.6]{fig7b.eps} \caption{Contour plot of branching ratios for laser-assisted $H^+$ decay as a function of the field strength and frequency. The model parameters are chosen as in Fig.~\ref{fig3}\textbf{(a)}, with $M_{H^+}=620$ GeV.}\label{fig8} \end{figure}\\ To give a clearer picture, we present in Fig.~\ref{fig8} a contour plot of the branching ratios, where their changes are highlighted in terms of field strength and frequency together. One can observe how the branching ratios change as the laser field strength increases at a specific frequency or vice versa. The effect of the laser becomes very significant at high field strengths and low frequencies. This confirms the previous discussion in Figs.~\ref{fig5}\textbf{(a)} and \ref{fig5}\textbf{(b)} about the effect of laser field strength and frequency on the photon exchange process. Moreover, we can see how the two contours are complementary and superposable to each other. \section{Conclusion}\label{sec:conclusion} In summary, we provided theoretical evidence that the branching ratios of charged Higgs decay can be modified in a large range by applying an appropriate laser field. Using $S$-matrix method, we have performed analytical calculations for charged Higgs decay in the presence of a circularly polarized radiation field. Our main result is shown in Fig.~\ref{fig7}, where the chosen free parameters allow only two channels, $H^+\rightarrow \tau^+\nu_\tau$ and $H^+\rightarrow t\bar{b}$. It is revealed that $\tau^+\nu_\tau$ channel, which is the lowest in the absence of a laser, becomes totally dominant in the region of superstrong fields $[10^{12}-10^{13}~\text{V/cm}]$. The fact that an appropriate laser field can modify branching ratios is extremely important, especially when dealing with a yet undiscovered particle. Recently, we found that the laser has an unprecedented effect on the branching ratios of vector bosons $W^-$ and $Z$ \cite{wdecay,zdecay}. Without forgetting that these results remain purely theoretical and therefore require experimental verification. It is time to redouble our efforts to take advantage of laser technology and implement it into large colliders in parallel with its continuous progress since the 1960s. The intense electromagnetic environment, combined with conventional acceleration, could be a prospective way to increase the collision energy required for detection of the charged Higgs boson.
\subsubsection*{References}} \usepackage{mathtools} \usepackage{booktabs} \usepackage{tikz} \usepackage{amsfonts} \usepackage{csquotes} \usepackage{caption} \usepackage{subcaption}\usepackage[ruled,linesnumbered]{algorithm2e} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{xcolor} \usepackage{cancel} \usepackage{times} \usepackage{soul} \usepackage{url} \usepackage{bbm} \urlstyle{same} \newtheorem{example}{Example} \newtheorem{theorem}{Theorem} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator*{\argmax}{arg\,max} \newcommand\colorcancel[2][black]{\renewcommand\CancelColor{\color{#1}}\cancel{#2}} \newcommand{\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}}{\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}} \newcommand{\mathbb{R}^{|\mathcal{S}||\mathcal{A}| \times 1}}{\mathbb{R}^{|\mathcal{S}||\mathcal{A}| \times 1}} \newcommand{\mathbb{R}^{|\mathcal{S}|}}{\mathbb{R}^{|\mathcal{S}|}} \newcommand{\Rvector}[1]{\mathbb{R}^{#1}} \newcommand{\Rmatrix}[2]{\mathbb{R}^{#1 \times #2}} \newcommand{\AdaBracket}[1]{\left(#1\right)} \newcommand{\AdaRectBracket}[1]{\left[#1\right]} \newcommand{\AdaAngleBracket}[1]{\left\langle#1\right\rangle} \newcommand{\AdaAngleProduct}[2]{\left\langle#1, #2\right\rangle} \newcommand{\fSubs}[2]{{#1}_{#2}} \newcommand{\sumJK}[1]{\sum_{j=#1}^{k}} \newcommand{\regT}[1]{\widehat{T}_{\pi_{#1}}} \newcommand{\regG}[2]{\widehat{G}(#1_{#2})} \newcommand{\KLPi}[2]{D_{KL}\left(\pi_{#1} \left| \! \right| \pi_{#2} \right)} \newcommand{D_{\!K\!L}\!\AdaBracket{\pi || \bar{\pi}}}{D_{\!K\!L}\!\AdaBracket{\pi || \bar{\pi}}} \newcommand{\KLindex}[2]{D_{\!K\!L}\!\AdaBracket{\pi_{#1}|| \pi_{#2}}} \newcommand{\KLany}[2]{D_{KL}\left(#1 \left| \! \right| #2 \right)} \newcommand{\mathcal{H}\left( \pi \right)}{\mathcal{H}\left( \pi \right)} \newcommand{\entropyany}[1]{\mathcal{H}\left( #1 \right)} \newcommand{\entropyIndex}[1]{\mathcal{H}\left( \pi_{#1} \right)} \newcommand{\mathcal{H}\left(\pi(a_{t}|s_{t}) \right)}{\mathcal{H}\left(\pi(a_{t}|s_{t}) \right)} \newcommand{\ERL}[2]{\mathbb{E}\left[ \sum_{t=#1}^{#2} r_{t} \right]} \newcommand{\ERLReg}[4]{\mathbb{E}\left[ \sum_{t=#1}^{#2} r_{t} + #3\mathcal{H}\left(\pi(a_{t}|s_{t}) \right) + #4 \KLPi{k+1}{k}\right]} \newcommand{\NormalEquation}[1]{\left(\Phi^{T}\Phi + \sigma^{2} I \right)^{-1}\Phi^{T}#1} \newcommand{\NormalEquationMorrison}[1]{\Phi^{T}\left(\Phi\Phi^{T} + \sigma^{2} I \right)^{-1} #1 } \newcommand{\MyNorm}[2]{\left|\!\left| #1 \right|\!\right|_{#2}} \newcommand{\textunderbrace}[2]{\ensuremath{\underbrace{\text{#1}}_{\text{#2}}}} \newcommand{\greedy}[1]{\mathcal{G}\!\AdaBracket{#1}} \newcommand{\greedyH}[1]{\mathcal{G}^{\tau}\!\AdaBracket{#1}} \newcommand{\greedyG}[1]{\mathcal{G}^{\alpha}\!\AdaBracket{#1}} \newcommand{\approxgreedyG}[1]{\tilde{\mathcal{G}}^{\alpha}\!\AdaBracket{#1}} \newcommand{\mathcal{G}}{\mathcal{G}} \newcommand{\mathcal{G}^{\tau}}{\mathcal{G}^{\tau}} \newcommand{\mathcal{G}^{\alpha}}{\mathcal{G}^{\alpha}} \newcommand{\tilde{\mathcal{G}}^{\alpha}}{\tilde{\mathcal{G}}^{\alpha}} \newcommand{\greedyKL}[1]{\mathcal{G}^{\lambda, 0}\!\AdaBracket{#1}} \newcommand{\BellmanKL}[2]{T^{\lambda}_{\pi_{#1}|\pi_{#2}}} \newcommand{T^{\lambda, 0}_{\pi|\bar{\pi}}}{T^{\lambda, 0}_{\pi|\bar{\pi}}} \newcommand{\BellmanH}[1]{T^{\tau}_{\pi_{#1}}} \newcommand{\BellmanG}[1]{T^{\alpha}_{\pi_{#1}}} \newcommand{\Bellman}[1]{T_{\pi_{#1}}} \newcommand{\approxBellmanG}[1]{\tilde{T}^{\alpha}_{\pi_{#1}}} \newcommand{\eq}[1]{Eq.\,(#1)} \newcommand{\psi^{\tau}}{\psi^{\tau}} \newcommand{\psi^{\lambda}}{\psi^{\lambda}} \newcommand{\psiTauIndex}[1]{\psi^{\tau}_{#1}} \newcommand{\psiLambdaIndex}[1]{\psi^{\lambda}_{#1}} \newcommand{Q^{\tau}}{Q^{\tau}} \newcommand{Q^{\lambda}_{\pi}}{Q^{\lambda}_{\pi}} \newcommand{V^{\lambda}_{\pi}}{V^{\lambda}_{\pi}} \newcommand{Q^{\alpha}}{Q^{\alpha}} \newcommand{V^{\tau}}{V^{\tau}} \newcommand{\entropyQIndex}[1]{Q^{\tau}_{\pi_{#1}}} \title{Enforcing KL Regularization in General Tsallis Entropy \\ Reinforcement Learning via Advantage Learning} \author[1]{\href{mailto:<<EMAIL>>?Subject=Your paper}{Lingwei~Zhu}{} } \author[2]{Zheng~Chen} \author[3]{Eiji~Uchibe} \author[1]{Takamitsu~Matsubara} \affil[1]{% Nara Institute of Science and Technology, Japan } \affil[2]{% Osaka University, Japan } \affil[3]{% Advanced Telecommunication Research, Japan } \begin{document} \maketitle \begin{abstract} Maximum Tsallis entropy (MTE) framework in reinforcement learning has gained popularity recently by virtue of its flexible modeling choices including the widely used Shannon entropy and sparse entropy. However, non-Shannon entropies suffer from approximation error and subsequent underperformance either due to its sensitivity or the lack of closed-form policy expression. To improve the tradeoff between flexibility and empirical performance, we propose to strengthen their error-robustness by enforcing implicit Kullback-Leibler (KL) regularization in MTE motivated by Munchausen DQN (MDQN). We do so by drawing connection between MDQN and advantage learning, by which MDQN is shown to fail on generalizing to the MTE framework. The proposed method Tsallis Advantage Learning (TAL) is verified on extensive experiments to not only significantly improve upon Tsallis-DQN for various non-closed-form Tsallis entropies, but also exhibits comparable performance to state-of-the-art maximum Shannon entropy algorithms. \end{abstract} \section{Introduction} \label{sec:introduction} The successes of modern reinforcement learning (RL) rely crucially on implementing value-based methods with powerful function approximators \citep{mnih2015human,OpenAI2020}. However, the susceptibility of value-based methods is also magnified: various sources of error can perturb action value estimates such that the non-optimal actions have temporally higher values than the optimal ones, putting unit probability mass on such deceptive actions can greatly slow down learning \citep{Fujimoto18-addressingApproximationError,fu2019-diagnosis} or even cause divergence \citep{Bertsekas:1996:NP:560669,wagner2011,Bellemare2016-increaseGap}. \begin{figure} \centering \includegraphics[width=0.7\linewidth]{plot_Gym/ggp_CartPole_MDQN_q1_q2.png} \caption{Munchausen DQN (MDQN) with entropic indices $q\!=\! 1,2$ (defined in Section \ref{sec:background}). For $q\!\neq\!1$ MDQN failed to learn anything on the simple environment \texttt{CartPole-v1}. } \label{fig:mt_cart} \end{figure} Recently there has seen promising progress towards alleviating this problem by leveraging \emph{entropy-regularized} algorithms \citep{haarnoja-SAC2018,ahmed19-entropy-policyOptimization}: by introducing entropy the policy becomes stochastic, hence optimal actions with temporarily low values can still be selected and subsequently help correct the value estimate. Besides the well-known Shannon entropy giving rise to Boltzmann softmax policy, the maximum Tsallis entropy (MTE) framework has gained recent popularity in that it offers more flexible modeling choices: by varying its entropic index $q$, Shannon entropy ($q\!=\!1$) and Tsallis sparse entropy ($q\!=\!2$) \citep{Martins16-sparsemax,Lee2018-TsallisRAL} can be recovered \citep{Lee2020-generalTsallisRSS}. Other values between $1<q<2$ and $q>2$ can also serve as an interesting substitute to Shannon or sparse entropy for more compact/diverse policies. However, a common problem of those entropies is the lack of robustness against errors: they do not enjoy closed-form policy expression when $q\neq 1,2$, hence empirical underperformance is often incurred by significant greedy step error. The sensitivity to errors holds true even for the closed-form sparsemax policy ($q\!=\!2$): due to its compactness, by contrast it is inherently less robust than the softmax \citep{chen2018-TsallisApproximate,Lee2020-generalTsallisRSS}. Implicit Kullback-Leibler (KL) regularization might come to rescue for improving the error-robustness of non-Shannon entropies. Currently one of the state-of-the-art methods Munchausen Deep Q-Network (MDQN) \citep{vieillard2020munchausen} has demonstrated that significant performance boost can be attained by adding logarithm of the stochastic policy $\ln\pi$ as \emph{a bootstrapping term to any temporal difference learning algorithms for facilitating learning.} The general claim and success of MDQN motivates us to investigate its Munchausen Tsallis DQN counterpart. However, as shown in Figure \ref{fig:mt_cart}, MDQN typically fails to learn anything even for simple tasks with Tsallis entropy when $q\!\neq\!1$, which suggests that directly resorting to MDQN for Tsallis entropy is infeasible. In this paper, we connect three relevant ideas: MDQN, KL regularization and advantage learning. We show the implicit KL regularization of MDQN happens as a result of advantage learning which is due to the equivalence between log-policy and advantage function, which only holds for Shannon entropy $q\!=\!1$. Therefore, the failure of MDQN in MTE is expected since for $q \!\neq\! 1$ the equivalence is lost. Motivated by this observation, we propose to enforce implicit KL regularization by explicitly enlarging the action gap in the MTE framework. By extensive experiments we demonstrate that TAL achieves significant improvement over the state-of-the-art value-based MTE method Tsallis-DQN, even for those entropic indices that do not have closed-form policy expression. We also show its performance is competitive with state-of-the-art advantage learning algorithms (including original MDQN), which brings a competitive substitute for the conventional Shannon entropy in relevant domains \citep{Lee2020-generalTsallisRSS}. The rest of the paper is organized as follows: in Section \ref{sec:related} we briefly survey related work. In Section \ref{sec:background} we review the background for the proposed method in Section \ref{sec:approach}. The proposed framework is comprehensively evaluated in Section \ref{sec:experiment}. We conclude the paper in Section \ref{sec:discussion}. \section{Related Work}\label{sec:related} The very recent success of MDQN shows significantly improved performance can be attained by simply augmenting reward function with logarithm of the policy. While the authors of \citep{vieillard2020munchausen} claimed such log-policy augmentation is generally applicable for any stochastic policy and demonstrated the effectiveness for soft Q-learning, we found that in practice MDQN worked poorly with the more general Tsallis entropy that is more suited to risk-sensitive applications \citep{Lee2018-TsallisRAL,Lee2020-generalTsallisRSS}, which begs the question of why MDQN achieved superior performance only with Shannon entropy. The connection with action gap maximization was mentioned in \citep{vieillard2020munchausen}, though the authors attributed the superior performance of MDQN to implicit KL regularization. The concept of advantage learning due to \citep{Baird1999-gradient-actionGap} lies in increasing the action gap and hence increasingly distinguishing the optimal action from suboptimal ones. Besides rendering the algorithm empirically more robust, increased action gap comes with various benefits. For example, \cite{Farahmand2011-actionGap} showed that if the action gap regularity assumption holds, convergence rate of suboptimality gap towards zero can be much faster. \cite{Bellemare2016-increaseGap} studied the non-stationary policy problem of Bellman optimality operator and proposed a solution by modifying based on the advantage learning scheme. Recently, advantage learning was extended by \citep{Lu2019-generalStochasticAL} to the setting of random action gap coefficients and by \citep{Ferret2021-selfImitationAdvantage} to self-imitation learning. The connection between advantage learning and entropy-regularized RL was first alluded to by \citep{azar2012dynamic} when studying KL-regularized policy iteration. This approach was followed by \citep{kozunoCVI} to incorporate Shannon entropy. By defining a preference function, \cite{kozunoCVI} found that KL regularization is possible by iterating upon an advantage learning scheme. In \citep{vieillard2020munchausen}, the authors showed how to derive CVI starting from MDQN. In this paper, we derive MDQN from CVI from an advantage learning perspective. By connecting those ideas we justify the use of advantage learning for implicitly enforcing KL regularization in the MTE framework. \section{Background}\label{sec:background} \subsection{RL Basics}\label{sec:rl_basics} Reinforcement learning problems are typically formulated by Markov decision processes (MDPs) which are expressed by the quintuple $(\mathcal{S}, \mathcal{A}, P, r, \gamma)$, where $\mathcal{S}$ and $\mathcal{A}$ denote state space and action space, respectively. $|\mathcal{S}|$ defines the cardinality of state space and likewise for the action space. $P$ denotes the transition probability kernel such that $P(\cdot|s,a)$ indicates the probability of transitioning to next state conditional upon taking action $a$ in state $s$. Let $r(s,a)$ denote the reward associated with that transition. When the time dependence $t$ should be made explicit, we write $r_t := r(s_t, a_t)$. The discount factor $\gamma \!\in\! (0,1)$ trades off the importance between current and future rewards. A policy $\pi$ maps a state to a distribution over actions. We define the state-action value function $Q_{\pi}\in \mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}$ as: \begin{align} Q_{\pi}(s,a) = \mathbb{E}\AdaRectBracket{\sum_{t=0}^{\infty} r_t | s_0=s , a_{0} = a} , \label{eq:qvalue} \end{align} where the expectation is with respect to the trajectory induced by policy $\pi$ and transition probability $P$. Value-based methods typically iterate on an initial $Q$ as: $T_{\pi}Q \!:=\! r + \gamma P_{\pi}Q$, where $T_{\pi}$ denotes the Bellman operator and $\gamma P_{\pi}Q \!:=\! \gamma\mathbb{E}_{s'\sim P(\cdot|s,a),a'\sim\pi(\cdot|s')}\!\AdaRectBracket{Q(s',a')}$, with the definition being component-wise. Repeating the above iteration guarantees convergence to its unique fixed point $Q_{\pi}$. Our goal is to find an optimal policy $\pi^*$ such that $T_{*}Q = \max_{\pi}T_{\pi}Q$. The optimal policy can be extracted with the greedy operator $\pi(a|s)\!\!=\!\greedy{Q_{\pi}}\!:=\!\argmax_{\pi}Q_{\pi}$. For convenience, for any two functions $F_1, F_2 \in\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}$ we define their inner product as $\AdaAngleProduct{F_1}{F_2}\in\mathbb{R}^{|\mathcal{S}|}$. We also define $\boldsymbol{1}$ as an all-one vector whose dimension should be clear from the context. To render the policy robust against suboptimal actions that have temporally deceptively high values, advantage learning scheme augments the standard Bellman operator $T_{\pi}Q$ with an additional action gap or advantage function: $A_{\pi}\in\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}\!=\! Q_{\pi} - V_{\pi}$, where $V_{\pi} \!=\! \AdaAngleProduct{\pi}{Q_{\pi}}$ is the average of action values. The agent is prompted to select actions that have values higher than the average to increasingly distinguish optimal actions from bad ones. \subsection{Maximum Entropy RL}\label{sec:maxEnt} In the recently popular maximum entropy RL literature, the reward is augmented by the Shannon entropy $\tau\mathcal{H}\left( \pi \right) \!:=\! \tau\AdaAngleProduct{-\pi}{\ln\pi}$, where $\tau$ is the augmentation coefficient. By the Fenchel conjugacy \citep{geist19-regularized}, the Shannon entropy induced optimal policy is a Boltzmann distribution: \begin{align} \greedyH{Q} = \frac{\exp\AdaBracket{\tau^{-1}Q} }{\AdaAngleProduct{\boldsymbol{1}}{\exp\AdaBracket{\tau^{-1}Q}}} = \exp\AdaBracket{\tau^{-1}(Q-V)}, \label{eq:boltzmann} \end{align} $V \!:=\! \tau\ln\AdaAngleProduct{\boldsymbol{1}}{\exp\AdaBracket{\tau^{-1}Q}}$ is the soft value function. Its regularized Bellman operators are defined as $\BellmanH{} {Q}\!=\! r \!+\! \gamma P\!\AdaAngleProduct{\pi}{Q \!-\!\tau\ln\pi}$. It turns out that the Shannon entropy is a special case of the well-known Tsallis entropy \citep{TsallisEntropy} parametrized by entropic index $q$: \begin{align} \begin{split} \alpha H_q(\pi):= \alpha \frac{k}{q-1} \AdaBracket{1 - \AdaAngleProduct{\boldsymbol{1}}{\pi^q}}, \end{split} \label{eq:tsallis_entropy} \end{align} where $\alpha$ is its regularization coefficient. The Shannon entropy is recovered by letting $k \!=\!\frac{1}{2}$ and $q\!\rightarrow\! 1$. When $q\!\rightarrow \!\infty$, the regularization effect vanishes. In this paper, we fix $k\!=\!\frac{1}{2}$ and consider various cases of $q$. The corresponding regularized Bellman operator is hence given by $\BellmanG{}Q \!=\! r \!+\! \gamma P\AdaAngleProduct{\pi}{\!Q+\frac{\alpha}{2(q-1)}\!\AdaBracket{1-\pi^{q-1}}\!}$. Tsallis entropy induces the stochastic optimal policy as: \begin{align} \greedyG{Q}(a|s) = \sqrt[\leftroot{-2}\uproot{16}q-1]{\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} }_{+} \frac{2(q-1)}{q}}, \label{eq:sparse_policy} \end{align} where the operation $[\cdot]_{+}$ converts negative components to $0$. $\psi$ is the normalization term to ensure the policy sums to one. When $q\!=\!2$, we recover the sparsemax policy \citep{Lee2018-TsallisRAL,chow18-Tsallis} whose normalization is: \begin{align} \begin{split} \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} = \frac{\sum_{a\in S(s)} \frac{Q(s,a)}{\alpha} - 1 }{K{(s)}}, \end{split} \label{eq:sparse_normalization} \end{align} where $S(s)$ is the set of actions satisfying $1 \!+\! i\frac{Q(s,a_{(i)})}{\alpha} \!>\! \sum_{j=1}^{i}\frac{Q(s,a_{(j)})}{\alpha}$, $a_{(j)}$ indicates the action with $j$th largest action value, $K(s)$ denotes the cardinality of $S(s)$. The value function is \begin{align} V=\frac{1}{2}\sum_{j=1}^{K(s)}\AdaBracket{\AdaBracket{\frac{Q(s,a_{(j)})}{\alpha} }^2 - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}}^2 } + \frac{1}{2}. \label{eq:sparse_value} \end{align} The sparsemax policy has been recently demonstrated as a suitable candidate for safety-sensitive tasks such as robotics \citep{Lee2018-TsallisRAL,Lee2020-generalTsallisRSS}. However, the performance of its value-based methods typically cannot match Shannon entropy since it often results in insufficient exploration. When $q\neq 1,2,\infty$, the normalization term and hence optimal policy might not have closed-form expression. But we can approximate the optimal policy by leveraging first order expansion following \citep{chen2018-TsallisApproximate}\footnotemark\footnotetext{\cite{chen2018-TsallisApproximate} considered the case of $k=1$, while we consider $k=\frac{1}{2}$ in this paper.}: \begin{align} \begin{split} \approxgreedyG{Q}(a|s) \approx \sqrt[\leftroot{-2}\uproot{16}q-1]{\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \tilde{\psi}\AdaBracket{\frac{Q(s, \cdot)}{\alpha}}}_{+} }, \end{split} \label{eq:approximate_policy} \end{align} where $\tilde{\psi}\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} \!\approx\! \frac{\sum_{a\in S(s)} \frac{Q(s,a)}{\alpha} - \frac{1}{2}q }{K{(s)}} + \AdaBracket{\frac{q}{2} - \frac{q}{q-2}}$ is the approximate normalization. The set $S(s)$ then allows actions satisfying $\frac{1}{2}q \!+\! i\frac{Q(s,a)}{\alpha} \!>\! \sum_{j=1}^{i}\!\!\frac{Q(s,a_{(j)})}{\alpha} \!+\! j(\frac{q}{2} \!-\! \frac{q}{q-2})$. We denote its associated Bellman operator as $\approxBellmanG{}$. Detailed derivation of approximate Tsallis policy is left to Appendix \ref{apdx:derivation}. \section{Approach}\label{sec:approach} \subsection{Munchausen RL}\label{sec:mdqn} MDQN \citep{vieillard2020munchausen} proposes \emph{optimizing for the immediate reward augmented by the scaled log-policy of the agent when using any TD scheme}. Specifically, MDQN was implemented based on soft Q-learning as follows: \begin{align} \begin{split} \begin{cases} \pi_{k+1} = \argmax_{\pi} \AdaAngleProduct{\pi}{Q_{k}} + \tau\mathcal{H}\left( \pi \right) & \\ Q_{k+1} = r + {\color{red}{\beta\tau \ln\pi_{k+1} }} + \gamma P \AdaAngleProduct{\pi_{k+1}}{Q_k - {\color{blue}\tau\ln\pi_{k+1} } } &, \end{cases} \end{split} \label{eq:mdqn_recursion} \end{align} where the red term is the \emph{Munchausen term}, the blue term comes from soft Q-learning. For simplicity let $\beta=1$, MDQN has the following equivalence: \begin{align} \begin{split} & Q_{k+1} - \tau\ln\pi_{k+1} = \\ & \quad r + \gamma P\AdaBracket{\AdaAngleProduct{\pi_{k+1}}{Q_{k} - \tau\ln\pi_{k}} - \tau\KLindex{k+1}{k}} \\ & \quad \Leftrightarrow Q'_{k+1} = r + \gamma P\AdaBracket{\AdaAngleProduct{\pi_{k+1}}{Q'_k} - \tau\KLindex{k+1}{k}}, \end{split} \label{eq:mdqn} \end{align} where $Q'_{k} \!:=\! Q_{k} \!-\! \tau \ln\pi_{k}$ is the newly defined action value function. Hence MDQN performs KL regularization by adding the Munchausen term $\ln\pi_{k+1}$ to soft Q-learning. One of the crucial properties of KL regularization is its optimal policy averages over past action values: $\pi_{k+1}\propto\exp\AdaBracket{\tau^{-1}\sum_{j=1}^{k}Q_j}$ \citep{vieillard2020leverage}, which effectively cancels out errors under mild assumptions. In the following section, we show the implicit KL regularization is performed when the Munchausen term $\ln\pi $ is equivalent to performing advantage learning under certain conditions, motivating our later proposal. \subsection{An Advantage Learning Perspective for Munchausen RL}\label{sec:entropy_advantage} It is worth noting that in the lieu of Shannon entropy augmentation, from \eq{\ref{eq:boltzmann}} one has $\ln\pi \!=\! \tau^{-1}\!\AdaBracket{Q-V}$, hence adding the Munchausen term coincides with advantage learning. In the recent literature, conservative value iteration (CVI) \citep{kozunoCVI} comprehensively analyzes the relationship between advantage learning and KL regularization: CVI states the conditions under which advantage learning could implicitly perform KL regularization. The connection between MDQN, KL regularization and advantage learning motivates us to investigate the possibility of enforcing implicit KL regularization for the MTE framework via advantage learning. To do so, we need to verify that the superior performance of MDQN is due to advantage learning. We re-derive MDQN by manipulating the CVI update rule since CVI generalizes advantage learning. We provide full derivation in Appendix \ref{apdx:adv_kl} and succintly summarize the key steps here. It turns out the CVI update rule can be written as the following, with $\Psi, W$ being the CVI action and state value function, respectively: \begin{align} \Psi_{k+1} = r + \gamma P \AdaAngleProduct{\pi_{k+1}}{\Psi_{k}} + \beta \AdaBracket{ \Psi_{k} - W_k}, \label{eq:cvi_valueiteration} \end{align} where $\beta \!\in\! [0,1]$ is a function of the Shannon entropy and KL divergence coefficients. It is worth noting that \eq{\ref{eq:cvi_valueiteration}} is itself a new value iteration scheme \textbf{regardless of the definition} of $\Psi$ and $\pi$ since we can arbitrarily initialize $\Psi_{0}, \pi_{0}$. CVI states that, if the policy $\pi_{k+1}$ in \eq{\ref{eq:cvi_valueiteration}} meets the Boltzmann assumption $\pi_{k+1}\propto\exp\AdaBracket{\tau^{-1}\Psi_k}$ (CVI itself uses Boltzmann policy but analyzes general advantage learning), then iterating upon \eq{\ref{eq:cvi_valueiteration}} along results in KL regularization. The simplest method to ensure $\pi_{k+1}$ is Boltzmann is perhaps to perform soft Q-learning. By rewriting \eq{\ref{eq:cvi_valueiteration}} as a soft Q-learning scheme and replacing $\Psi, W$ with $Q,V$ we have: \begin{align*} Q_{k+1} \!=\! r + {\color{red}{\beta\!\AdaBracket{ Q_{k} - V_k} }} + \gamma P \AdaAngleProduct{\pi_{k+1}}{Q_{k} \!-\! {\color{blue}{\tau\ln\pi_{k+1}} }}, \end{align*} where the blue part comes from soft Q-learning and the we recognize the red part is $\beta(Q_{k} - V_{k}) = \beta\tau\ln\pi_{k}$. We hence see this scheme is same with the MDQN update rule \eq{\ref{eq:mdqn_recursion}}. This above analysis implies that MDQN achieves implicit KL regularization and superior performance thanks to the equivalence between the Munchausen term and the action gap. This intuition is confirmed by that in practice, MDQN actually computes the $\ln\pi$ term by $Q-V$ \citep[Appendix B.1]{vieillard2020munchausen}. Hence as learning proceeds, the probabilities of optimal actions increase and so do $\ln\pi$, which implies the action gap is also increased as is shown in Figure \ref{fig:action_gap}. The key for deriving the relationship between CVI and MDQN is the equivalence $\tau\ln\pi_{k+1} = Q_{k} - V_{k}$. It is hence natural to conjecture that, if the equivalence does not hold as when $q\!\neq\!1$ in the general Tsallis entropy, MDQN can no longer perform implicit KL regularization, and learning performance might be significantly degraded. As an example, consider \eq{\ref{eq:sparse_policy}} which is $q\!= \!2$. The Munchausen term $\ln\pi \!=\! \ln\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}}}_{+}$ may be undefined since the policy assigns zero probabilities to some of the actions. Even if we add some small value $\Delta$ in practice to prevent ill-defined $\ln\pi$, it does not encode action gap information since $\alpha\ln\pi = \alpha\ln\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} + \Delta }_{+} \neq Q - V + \Delta$, where $V$ was defined in \eq{\ref{eq:sparse_value}}. This conclusion holds for other $q$ as well. Hence it is confirmed that resorting to MDQN does not bring KL regularization for the MTE framework. \begin{algorithm}[t] \caption{TAL-DQN}\label{algorithm} \SetKwInput{KwInput}{Input} \SetKwInput{KwInit}{Initialize} \KwInput{total steps $T$, update period $I$, \\ interaction period $C$, epsilon-greedy threshold $\epsilon$} \KwInit{ Network weights $\bar{\theta} = \theta$, \\ Replay buffer $B = \{\}$} \For{$t = 1, 2, \dots, T$ } { Collect tuple $(s_t, a_t, r_t, s_{t+1})$ in $B$ with $\pi_{q, \epsilon}$\\ \If{ mod$(t, C) = 0$} { update $\theta$ with minibatch $B_t \subset B$ on $\mathcal{L}_{\texttt{TAL}}$ \\ } \If{mod$(t, I) = 0$} { update target network $\bar{\theta} \leftarrow \theta$\\ } } \end{algorithm} \begin{figure*}[th!] \centering \includegraphics[width=\textwidth,trim=4 4 4 4,clip]{ggp_cartLunar_main_all.png} \caption{Comparison on \texttt{CartPole-v1} and \texttt{LunarLander-v2} between Tsallis Advantage Learning (TAL), Munchausen Tsallis DQN (MT-DQN) and Tsallis DQN with different entropic indices. All algorithms are averaged over 30 seeds to plot mean and $\pm 1$ standard deviation. For $q\!=\!-1,3,4$, approximate policy in \eq{\ref{eq:approximate_policy}} is employed. When $q\!\leq\!0$ Tsallis entropy becomes convex, hence the regularizaton properties fail to hold. We show $q=-1$ for completeness. } \label{fig:cart_lunar_q2} \end{figure*} \begin{figure}[t] \centering \includegraphics[width=\linewidth,trim=4 4 4 4,clip]{ggp_Acrobot_all.png} \caption{Comparison between Tsallis-DQN (orange), MT-DQN (blue) and TAL (green) with entropic indices $q\!=\! -1,2,3,4$ on \texttt{Acrobot-v1}. } \label{fig:acrobot} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\linewidth,trim=4 4 4 4,clip]{ggp_cartLunar_all.png} \caption{Comparison between Tsallis-DQN (orange), MT-DQN (blue) and TAL (green) with entropic indices $q\!=\! \frac{3}{2}, \,\, \frac{5}{2}$ on \texttt{CartPole-v1} and \texttt{LunarLander-v2}. } \label{fig:cartLunar_fraction} \end{figure} \subsection{Advantage Learning for General Tsallis Entropy RL} Motivated by the observation in the prior section, instead of relying on $\ln\pi$, we propose to explicitly perform advantage learning by increasing the action gap $Q - \AdaAngleProduct{\pi}{Q}$ to conform to the advantage learning scheme of \citep{azar2012dynamic,kozunoCVI}. Though the policy with $q \!\neq\! 1$ is no longer Boltzmann, by \citep[Eq.\,(12)]{kozunoCVI} the Tsallis policy can still be used. For justification the reader is referred to Appendix \ref{apdx:TAL}. We can succinctly summarize the proposed method: Tsallis advantage learning (TAL) as the following: \begin{align} \begin{split} \begin{cases} \pi_{k+1} = \approxgreedyG{Q_k}, & \\ Q_{k+1} = (\approxBellmanG{k+1})^{m} Q_{k} + \beta(Q_k - \AdaAngleProduct{\pi_{k+1}}{Q_k}), & \\ \end{cases} \end{split} \label{eq:tsallis_advantage_learning} \end{align} where $\tilde{\mathcal{G}}^{\alpha}$ is the approximate Tsallis policy defined in \eq{\ref{eq:approximate_policy}}. We can also change the policy/Bellman operator pair $(\tilde{\mathcal{G}}^{\alpha}, \BellmanG{})$ to $(\mathcal{G}^{\tau}, \BellmanH{}), (\mathcal{G}^{\alpha}, \BellmanG{}), (\mathcal{G}, \Bellman{})$ which correspond to settting $q\!=\!1, 2, \infty$, respectively. When $q \!=\!1$, this scheme coincides with Munchausen RL. When $q\!=\!\infty$, there is no regularization hence the scheme degenerates to advantage learning \citep{Baird1999-gradient-actionGap}. The superscript $m$ indicates $m$ times application of the Bellman operator. Typically $m \!=\! 1, \infty$ which correspond to value iteration and policy iteration schemes. $\beta$ is the advantage coefficient and typically is between $[0,1]$. $\AdaAngleProduct{\pi_{k+1}}{Q_k}$ is used to approximate the regularized value function $V$. We found that this approximation led to significantly better performance. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{plot_Gym/Acrobot_largest_gap_compare_var.png} \caption{Action gap between the actions having the largest and second largest values $Q(s,a_{(1)}) - Q(s,a_{(2)})$ of TAL and Tsallis-DQN with different entropic indices.} \label{fig:action_gap} \end{figure} \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{ggp_MinAtar_all.png} \caption{(Upper) Comparison between TAL, Tsallis-DQN and MT-DQN for $q\!=\!2$ on all MinAtar games. \\ (Lower) Comparison between TAL, Munchausen-DQN (MDQN), Persistent AL (PAL) and Stochastic AL (SAL) on all MinAtar games. All algorithms are averaged over 3 seeds to plot mean and $\pm 1$ standard deviation.} \label{fig:minatar} \end{figure*} \begin{figure*}[th!] \centering \includegraphics[width=\textwidth,trim=4 4 4 4,clip]{ggp_MinAtar_CVITAL_compare.png} \caption{Comparison between conservative value iteration (CVI) and TAL ($q\!=\!2$) on all MinAtar games. The similar learning curves indicate TAL can achieve performance comparable to SOTA algorithms but with more desirable properties such as sparsity or parsimonious description of actions. } \label{fig:minatar_cvital} \end{figure*} In this paper we are interested in verifying effectiveness of the proposed method as a value iteration algorithm, i.e. $m=1$. Specifically, we follow \citep{vieillard2020munchausen} to implement our algorithm based on the DQN architecture. We maintain two networks with parameters $\theta, \bar{\theta}$, with the latter being target network updated after a fixed number of timesteps. The loss function is defined by: \[ \mathcal{L}_{\texttt{TAL}}(\theta) \!:=\! \hat{\mathbb{E}}_{B}\AdaRectBracket{ \AdaBracket{r \!+\! \gamma\AdaAngleProduct{\pi_{\bar{\theta}}}{Q_{\bar{\theta}}} \!+\! \beta\AdaBracket{Q_{\bar{\theta}} \!-\! \AdaAngleProduct{\pi_{\bar{\theta}}}{Q_{\bar{\theta}}}} \!-\! Q_{\theta} }^2 }, \] where the policy $\pi_{\bar{\theta}}$ is computed following \eq{\ref{eq:tsallis_advantage_learning}}. The algorithm Tsallis Advantage Learning - DQN (TAL-DQN) is listed in Alg. \ref{algorithm}. We provide implementation details in Appendix \ref{apdx:implementation}. \section{Experiments}\label{sec:experiment} We aim to demonstrate that the proposed algorithm TAL is an effective generalization of Munchausen RL, in that when entropic index $q\!=\!1$ they coincide, but for other $q$ the Munchasuen bootstrapping term $\ln\pi$ can significantly deteriorate learning, while TAL can effectively boost the performance even for those $q$ that entail approximation. For comprehensive evaluation, we select three different domains: simple Gym classic control \citep{brockman2016openai}, lightweight Atari games \citep{young19minatar} and challenging full-fledged Atari games \citep{bellemare13-arcade-jair}. We aim to show TAL improves upon the SOTA value-based Tsallis entropy method Tsallis-DQN and achieves comparable performance with SOTA advantage learning methods. \subsection{Gym Classic Control} We first examine the simple Gym classic control problems \texttt{CartPole-v1}, \texttt{LunarLander-v2} and \texttt{Acrobot-v1}. Their simplicity allows for evaluation with large number of seeds to verify our analysis. We name the algorithm Tsallis-DQN that sets $\beta=0$ in \eq{\ref{eq:tsallis_advantage_learning}} and compare Tsallis-DQN with TAL and Munchausen-Tsallis-DQN (MT-DQN) for entropic indices $q \!=\! -1, 2,3,4$. When $q\!=\!2$ the policy has closed-form solution, for other indices the approximation introduced in \eq{\ref{eq:approximate_policy}} is employed. All algorithms are evaluated for $5\times 10^{5}$ steps with 30 seeds. We decompose the $5\times 10^5$ steps into 50 iterations. Implementation details such as network architecture and hyperparameters are provided in Appendix \ref{apdx:gym}. The results are shown in Figure \ref{fig:cart_lunar_q2}. Consistent with our analysis, Munchausen RL did not improve the performance for all entropic indices. For $q \!=\!2$, MT-DQN failed to learn any meaningful behavior even with analytic policy expression, while Tsallis-DQN performed relatively well. For $q\!=\! 3,4$, both MT-DQN and Tsallis-DQN failed to solve the \texttt{CartPole} environment. It is also interesting to inspect the case of $q \!=\!-1$, in which the Tsallis entropy becomes convex and hence the existing regularization results \citep{geist19-regularized,Li2019-regularizedSparse} fail to hold. We show such result only for completeness, and one can expect the poor performance of all entropy-regularized algorithms. One can see the same trend holds true for \texttt{LunarLander-v2} and \texttt{Acrobot-v1} as well in Figure \ref{fig:acrobot}. We quantitatively evaluate the action gap between the actions with the largest and second largest values, i.e. $Q(s,a_{(1)}) - Q(s,a_{(2)})$ and show the averaged results in Figure \ref{fig:action_gap}, which proves that the action gap is indeed enlarged. One might also be interested in non-integer value of $q$, since we might benefit from the intermediate values from the two analytic choices $q\!=\!1,2$. We therefore include the experiments with $q\!=\! \frac{3}{2}, \frac{5}{2}$ and show them in Figure \ref{fig:cartLunar_fraction}. It is apparent that that the trend still holds valid for non-integer values of $q$. For $q \!=\!\frac{3}{2} \in [1,2]$, we can expect this choice induces policy that stands between the softmax ($q\!=\!1$) and the Sparsemax ($q\!=\!2$), in that it is neither sparse nor assigns probability to all actions. However, with this choice, on both environments Tsallis-DQN and MT-DQN performed extremely poor, leading to the lowest scores possible. On the other hand, TAL managed to robustly converge to the optimal policy. For $q\!=\!\frac{5}{2}$ the situation is similar, with small improvement of Tsallis-DQN and MT-DQN. But we can see TAL did not converge to the optimal solution on \texttt{CartPole-v1}, this might be due to the hyperparameters in Table \ref{tb:gym} requires further fine-tuning for such specific choice. \begin{figure*}[t] \centering \includegraphics[width=\textwidth,trim=4 4 4 4,clip]{distributional_all.png} \caption{Comparison on full-fledged Atari games between TAL and MT-DQN implemented based on QR-DQN for $q=2$. } \label{fig:distributional_firstfive} \end{figure*} \begin{figure}[t] \centering \includegraphics[width=0.825\linewidth]{plot_Atari_distributional/ggp_Atari_KungFu_Compare.png} \caption{MT-DQN degraded the learning performance of Tsallis-DQN on the environment \texttt{KungFuMaster}. } \label{fig:kungfu} \end{figure} \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth,trim=4 4 4 4,clip]{ggp_AdvImprove_all.png} \caption{Comparison between TAL and Tsallis-DQN on four selected Atari games.} \label{fig:adv_improve} \end{figure} \subsection{MinAtar Games} We inspect whether TAL can still boost the performance of Tsallis-DQN and work well on relatively complicated problems with high dimensional image as the state space. MinAtar provides 5 lightweight Atari games with optimization on multiple aspects including sticky actions, training frequency and reward normalization, etc. We compare TAL with Tsallis-DQN, MT-DQN with entropic index $q\!=\!2$ since it enjoys closed-form policy expression. We also compare with persistent AL (PAL) \citep{Bellemare2016-increaseGap} that corrects the bias of the Bellman optimality operator; stochastic AL (SAL) that generalizes $\beta$ to random variables drawn from various distributions \citep{Lu2019-generalStochasticAL}. Every run consists of $10^{7}$ frames without frame skipping. We define every $200,000$ frames as one iteration so totally 50 iterations. All algorithms are averaged over 3 seeds. Since we use image as input, convolutional network is necessary. We detail the network architecture and hyperparameters used for all algorithms in Appendix \ref{apdx:minatar}. We first examine whether TAL boosts the performance of Tsallis-DQN. From the upper row of Figure \ref{fig:minatar} it is clear that for relatively simple environments like \texttt{Breakout} and \texttt{SpaceInvaders}, TAL improved upon Tsallis-DQN slightly. However for challenging tasks like \texttt{Seaquest, Asterix, Freeway}, Tsallis-DQN failed to learn meaningful behavior while TAL successfully converged. By contrast, MT-DQN showed flat learning curves for all environments, validating our analysis that $\ln\pi$ does not encode action gap information and hence can deteriorate learning. We also ask whether TAL can compete with state-of-the-art advantage learning algorithms. It is known that the hard max policy induced by Tsallis sparse entropy might cause brittle value function during learning, typically the performance of Tsallis entropy regularized algorithms cannot match SOTA algorithms such as PAL. From the lower row of Figure \ref{fig:minatar} we can see that PAL and MDQN performed the best, but TAL had similar performance throughout. On the other hand, SAL with the empirically performant choice of $\beta$ failed to keep up with other three algorithms due to the strong stochasticity in the advantage coefficient. This section confirms that Tsallis entropy regularized algorithms can perform competitively with SOTA advantage learning algorithms while enjoying strong theoretical properties for policies, whose good performance was due to the advantage learning and subsequent implicit KL regularization. \subsection{Distributional TAL on Atari Games} Similar to Munchausen RL that can be combined with distributional RL methods. We demonstrate that TAL can also be leveraged in the context of distributional RL. Specifically, we implement TAL on top of the \emph{quantile regression DQN} (QR-DQN) \citep{Dabney2018-QRDQN}. We compare TAL with MT-DQN with entropic index $q \!=\! 2$, since $q\!=\!1$ coincides with MDQN. We choose a subset of 15 games from the full-fledged Atari games \citep{bellemare13-arcade-jair} for showing TAL remains effective for challenging problems. Implementation details are provided in Appendix \ref{apdx:atari}. Every single run consists of $3\times 10^7$ steps. We define every $10^{5}$ steps as one iteration so totally 300 iterations. All algorithms are averaged over 3 seeds. The learning results in Figure \ref{fig:distributional_firstfive} further confirmed our analysis that TAL is robust on complicated environments, and can work well with state-of-the-art RL algorithms. By contrast, MT-DQN failed to learn any meaningful behaviors. \textbf{Did TAL improve upon Tsallis-DQN? } We compare TAL and Tsallis-DQN on \texttt{KungFuMaster} in which MT-DQN showed non-trivial performance. As illustrated by Figure \ref{fig:kungfu}, MT-DQN degraded the performance of Tsallis-DQN, proving the negative effect of the Tsallis Munchausen term. In Figure \ref{fig:adv_improve} we compare Tsallis-DQN and TAL, and one can see that TAL still improved upon Tsallis-DQN, which is consistent with the trend shown in Gym and MinAtar environments. \section{Discussion and Conclusion}\label{sec:discussion} In this paper we proposed to implicitly perform KL regularization in the maximum Tsallis entropy framework to improve its error-robustness since the non-Shannon entropies are inherently less robust. We showed simply resorting to recently successful Munchausen DQN led to significantly degraded performance, due to the loss of equivalence between log-policy and advantage learning. Accordingly, a novel algorithm Tsallis advantage learning was proposed to enforce implicit KL regularization. By extensive experiments we verified that TAL improved upon the SOTA value-based MTE method Tsallis-DQN by a large margin, and exhibited comparable performance to SOTA advantage learning methods. Several interesting future directions include combining TAL with actor-critic methods for further scalability, and leveraging general logarithm function for the Munchausen term so the log-policy term again encodes advantage information. \clearpage \subsubsection*{References}} \usepackage{mathtools} \usepackage{booktabs} \usepackage{tikz} \usepackage{amsfonts} \usepackage{csquotes} \usepackage{caption} \usepackage{subcaption}\usepackage[ruled,linesnumbered]{algorithm2e} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{xcolor} \usepackage{cancel} \usepackage{times} \usepackage{soul} \usepackage{url} \usepackage{bbm} \urlstyle{same} \newtheorem{example}{Example} \newtheorem{theorem}{Theorem} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator*{\argmax}{arg\,max} \newcommand\colorcancel[2][black]{\renewcommand\CancelColor{\color{#1}}\cancel{#2}} \newcommand{\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}}{\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}} \newcommand{\mathbb{R}^{|\mathcal{S}||\mathcal{A}| \times 1}}{\mathbb{R}^{|\mathcal{S}||\mathcal{A}| \times 1}} \newcommand{\mathbb{R}^{|\mathcal{S}|}}{\mathbb{R}^{|\mathcal{S}|}} \newcommand{\Rvector}[1]{\mathbb{R}^{#1}} \newcommand{\Rmatrix}[2]{\mathbb{R}^{#1 \times #2}} \newcommand{\AdaBracket}[1]{\left(#1\right)} \newcommand{\AdaRectBracket}[1]{\left[#1\right]} \newcommand{\AdaAngleBracket}[1]{\left\langle#1\right\rangle} \newcommand{\AdaAngleProduct}[2]{\left\langle#1, #2\right\rangle} \newcommand{\fSubs}[2]{{#1}_{#2}} \newcommand{\sumJK}[1]{\sum_{j=#1}^{k}} \newcommand{\regT}[1]{\widehat{T}_{\pi_{#1}}} \newcommand{\regG}[2]{\widehat{G}(#1_{#2})} \newcommand{\KLPi}[2]{D_{KL}\left(\pi_{#1} \left| \! \right| \pi_{#2} \right)} \newcommand{D_{\!K\!L}\!\AdaBracket{\pi || \bar{\pi}}}{D_{\!K\!L}\!\AdaBracket{\pi || \bar{\pi}}} \newcommand{\KLindex}[2]{D_{\!K\!L}\!\AdaBracket{\pi_{#1}|| \pi_{#2}}} \newcommand{\KLany}[2]{D_{KL}\left(#1 \left| \! \right| #2 \right)} \newcommand{\mathcal{H}\left( \pi \right)}{\mathcal{H}\left( \pi \right)} \newcommand{\entropyany}[1]{\mathcal{H}\left( #1 \right)} \newcommand{\entropyIndex}[1]{\mathcal{H}\left( \pi_{#1} \right)} \newcommand{\mathcal{H}\left(\pi(a_{t}|s_{t}) \right)}{\mathcal{H}\left(\pi(a_{t}|s_{t}) \right)} \newcommand{\ERL}[2]{\mathbb{E}\left[ \sum_{t=#1}^{#2} r_{t} \right]} \newcommand{\ERLReg}[4]{\mathbb{E}\left[ \sum_{t=#1}^{#2} r_{t} + #3\mathcal{H}\left(\pi(a_{t}|s_{t}) \right) + #4 \KLPi{k+1}{k}\right]} \newcommand{\NormalEquation}[1]{\left(\Phi^{T}\Phi + \sigma^{2} I \right)^{-1}\Phi^{T}#1} \newcommand{\NormalEquationMorrison}[1]{\Phi^{T}\left(\Phi\Phi^{T} + \sigma^{2} I \right)^{-1} #1 } \newcommand{\MyNorm}[2]{\left|\!\left| #1 \right|\!\right|_{#2}} \newcommand{\textunderbrace}[2]{\ensuremath{\underbrace{\text{#1}}_{\text{#2}}}} \newcommand{\greedy}[1]{\mathcal{G}\!\AdaBracket{#1}} \newcommand{\greedyH}[1]{\mathcal{G}^{\tau}\!\AdaBracket{#1}} \newcommand{\greedyG}[1]{\mathcal{G}^{\alpha}\!\AdaBracket{#1}} \newcommand{\approxgreedyG}[1]{\tilde{\mathcal{G}}^{\alpha}\!\AdaBracket{#1}} \newcommand{\mathcal{G}}{\mathcal{G}} \newcommand{\mathcal{G}^{\tau}}{\mathcal{G}^{\tau}} \newcommand{\mathcal{G}^{\alpha}}{\mathcal{G}^{\alpha}} \newcommand{\tilde{\mathcal{G}}^{\alpha}}{\tilde{\mathcal{G}}^{\alpha}} \newcommand{\greedyKL}[1]{\mathcal{G}^{\lambda, 0}\!\AdaBracket{#1}} \newcommand{\BellmanKL}[2]{T^{\lambda}_{\pi_{#1}|\pi_{#2}}} \newcommand{T^{\lambda, 0}_{\pi|\bar{\pi}}}{T^{\lambda, 0}_{\pi|\bar{\pi}}} \newcommand{\BellmanH}[1]{T^{\tau}_{\pi_{#1}}} \newcommand{\BellmanG}[1]{T^{\alpha}_{\pi_{#1}}} \newcommand{\Bellman}[1]{T_{\pi_{#1}}} \newcommand{\approxBellmanG}[1]{\tilde{T}^{\alpha}_{\pi_{#1}}} \newcommand{\eq}[1]{Eq.\,(#1)} \newcommand{\psi^{\tau}}{\psi^{\tau}} \newcommand{\psi^{\lambda}}{\psi^{\lambda}} \newcommand{\psiTauIndex}[1]{\psi^{\tau}_{#1}} \newcommand{\psiLambdaIndex}[1]{\psi^{\lambda}_{#1}} \newcommand{Q^{\tau}}{Q^{\tau}} \newcommand{Q^{\lambda}_{\pi}}{Q^{\lambda}_{\pi}} \newcommand{V^{\lambda}_{\pi}}{V^{\lambda}_{\pi}} \newcommand{Q^{\alpha}}{Q^{\alpha}} \newcommand{V^{\tau}}{V^{\tau}} \newcommand{\entropyQIndex}[1]{Q^{\tau}_{\pi_{#1}}} \title{Enforcing KL Regularization in General Tsallis Entropy \\ Reinforcement Learning via Advantage Learning} \author[1]{\href{mailto:<<EMAIL>>?Subject=Your paper}{Lingwei~Zhu}{} } \author[2]{Zheng~Chen} \author[3]{Eiji~Uchibe} \author[1]{Takamitsu~Matsubara} \affil[1]{% Nara Institute of Science and Technology, Japan } \affil[2]{% Osaka University, Japan } \affil[3]{% Advanced Telecommunication Research, Japan } \begin{document} \maketitle \begin{abstract} Maximum Tsallis entropy (MTE) framework in reinforcement learning has gained popularity recently by virtue of its flexible modeling choices including the widely used Shannon entropy and sparse entropy. However, non-Shannon entropies suffer from approximation error and subsequent underperformance either due to its sensitivity or the lack of closed-form policy expression. To improve the tradeoff between flexibility and empirical performance, we propose to strengthen their error-robustness by enforcing implicit Kullback-Leibler (KL) regularization in MTE motivated by Munchausen DQN (MDQN). We do so by drawing connection between MDQN and advantage learning, by which MDQN is shown to fail on generalizing to the MTE framework. The proposed method Tsallis Advantage Learning (TAL) is verified on extensive experiments to not only significantly improve upon Tsallis-DQN for various non-closed-form Tsallis entropies, but also exhibits comparable performance to state-of-the-art maximum Shannon entropy algorithms. \end{abstract} \section{Introduction} \label{sec:introduction} The successes of modern reinforcement learning (RL) rely crucially on implementing value-based methods with powerful function approximators \citep{mnih2015human,OpenAI2020}. However, the susceptibility of value-based methods is also magnified: various sources of error can perturb action value estimates such that the non-optimal actions have temporally higher values than the optimal ones, putting unit probability mass on such deceptive actions can greatly slow down learning \citep{Fujimoto18-addressingApproximationError,fu2019-diagnosis} or even cause divergence \citep{Bertsekas:1996:NP:560669,wagner2011,Bellemare2016-increaseGap}. \begin{figure} \centering \includegraphics[width=0.7\linewidth]{plot_Gym/ggp_CartPole_MDQN_q1_q2.png} \caption{Munchausen DQN (MDQN) with entropic indices $q\!=\! 1,2$ (defined in Section \ref{sec:background}). For $q\!\neq\!1$ MDQN failed to learn anything on the simple environment \texttt{CartPole-v1}. } \label{fig:mt_cart} \end{figure} Recently there has seen promising progress towards alleviating this problem by leveraging \emph{entropy-regularized} algorithms \citep{haarnoja-SAC2018,ahmed19-entropy-policyOptimization}: by introducing entropy the policy becomes stochastic, hence optimal actions with temporarily low values can still be selected and subsequently help correct the value estimate. Besides the well-known Shannon entropy giving rise to Boltzmann softmax policy, the maximum Tsallis entropy (MTE) framework has gained recent popularity in that it offers more flexible modeling choices: by varying its entropic index $q$, Shannon entropy ($q\!=\!1$) and Tsallis sparse entropy ($q\!=\!2$) \citep{Martins16-sparsemax,Lee2018-TsallisRAL} can be recovered \citep{Lee2020-generalTsallisRSS}. Other values between $1<q<2$ and $q>2$ can also serve as an interesting substitute to Shannon or sparse entropy for more compact/diverse policies. However, a common problem of those entropies is the lack of robustness against errors: they do not enjoy closed-form policy expression when $q\neq 1,2$, hence empirical underperformance is often incurred by significant greedy step error. The sensitivity to errors holds true even for the closed-form sparsemax policy ($q\!=\!2$): due to its compactness, by contrast it is inherently less robust than the softmax \citep{chen2018-TsallisApproximate,Lee2020-generalTsallisRSS}. Implicit Kullback-Leibler (KL) regularization might come to rescue for improving the error-robustness of non-Shannon entropies. Currently one of the state-of-the-art methods Munchausen Deep Q-Network (MDQN) \citep{vieillard2020munchausen} has demonstrated that significant performance boost can be attained by adding logarithm of the stochastic policy $\ln\pi$ as \emph{a bootstrapping term to any temporal difference learning algorithms for facilitating learning.} The general claim and success of MDQN motivates us to investigate its Munchausen Tsallis DQN counterpart. However, as shown in Figure \ref{fig:mt_cart}, MDQN typically fails to learn anything even for simple tasks with Tsallis entropy when $q\!\neq\!1$, which suggests that directly resorting to MDQN for Tsallis entropy is infeasible. In this paper, we connect three relevant ideas: MDQN, KL regularization and advantage learning. We show the implicit KL regularization of MDQN happens as a result of advantage learning which is due to the equivalence between log-policy and advantage function, which only holds for Shannon entropy $q\!=\!1$. Therefore, the failure of MDQN in MTE is expected since for $q \!\neq\! 1$ the equivalence is lost. Motivated by this observation, we propose to enforce implicit KL regularization by explicitly enlarging the action gap in the MTE framework. By extensive experiments we demonstrate that TAL achieves significant improvement over the state-of-the-art value-based MTE method Tsallis-DQN, even for those entropic indices that do not have closed-form policy expression. We also show its performance is competitive with state-of-the-art advantage learning algorithms (including original MDQN), which brings a competitive substitute for the conventional Shannon entropy in relevant domains \citep{Lee2020-generalTsallisRSS}. The rest of the paper is organized as follows: in Section \ref{sec:related} we briefly survey related work. In Section \ref{sec:background} we review the background for the proposed method in Section \ref{sec:approach}. The proposed framework is comprehensively evaluated in Section \ref{sec:experiment}. We conclude the paper in Section \ref{sec:discussion}. \section{Related Work}\label{sec:related} The very recent success of MDQN shows significantly improved performance can be attained by simply augmenting reward function with logarithm of the policy. While the authors of \citep{vieillard2020munchausen} claimed such log-policy augmentation is generally applicable for any stochastic policy and demonstrated the effectiveness for soft Q-learning, we found that in practice MDQN worked poorly with the more general Tsallis entropy that is more suited to risk-sensitive applications \citep{Lee2018-TsallisRAL,Lee2020-generalTsallisRSS}, which begs the question of why MDQN achieved superior performance only with Shannon entropy. The connection with action gap maximization was mentioned in \citep{vieillard2020munchausen}, though the authors attributed the superior performance of MDQN to implicit KL regularization. The concept of advantage learning due to \citep{Baird1999-gradient-actionGap} lies in increasing the action gap and hence increasingly distinguishing the optimal action from suboptimal ones. Besides rendering the algorithm empirically more robust, increased action gap comes with various benefits. For example, \cite{Farahmand2011-actionGap} showed that if the action gap regularity assumption holds, convergence rate of suboptimality gap towards zero can be much faster. \cite{Bellemare2016-increaseGap} studied the non-stationary policy problem of Bellman optimality operator and proposed a solution by modifying based on the advantage learning scheme. Recently, advantage learning was extended by \citep{Lu2019-generalStochasticAL} to the setting of random action gap coefficients and by \citep{Ferret2021-selfImitationAdvantage} to self-imitation learning. The connection between advantage learning and entropy-regularized RL was first alluded to by \citep{azar2012dynamic} when studying KL-regularized policy iteration. This approach was followed by \citep{kozunoCVI} to incorporate Shannon entropy. By defining a preference function, \cite{kozunoCVI} found that KL regularization is possible by iterating upon an advantage learning scheme. In \citep{vieillard2020munchausen}, the authors showed how to derive CVI starting from MDQN. In this paper, we derive MDQN from CVI from an advantage learning perspective. By connecting those ideas we justify the use of advantage learning for implicitly enforcing KL regularization in the MTE framework. \section{Background}\label{sec:background} \subsection{RL Basics}\label{sec:rl_basics} Reinforcement learning problems are typically formulated by Markov decision processes (MDPs) which are expressed by the quintuple $(\mathcal{S}, \mathcal{A}, P, r, \gamma)$, where $\mathcal{S}$ and $\mathcal{A}$ denote state space and action space, respectively. $|\mathcal{S}|$ defines the cardinality of state space and likewise for the action space. $P$ denotes the transition probability kernel such that $P(\cdot|s,a)$ indicates the probability of transitioning to next state conditional upon taking action $a$ in state $s$. Let $r(s,a)$ denote the reward associated with that transition. When the time dependence $t$ should be made explicit, we write $r_t := r(s_t, a_t)$. The discount factor $\gamma \!\in\! (0,1)$ trades off the importance between current and future rewards. A policy $\pi$ maps a state to a distribution over actions. We define the state-action value function $Q_{\pi}\in \mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}$ as: \begin{align} Q_{\pi}(s,a) = \mathbb{E}\AdaRectBracket{\sum_{t=0}^{\infty} r_t | s_0=s , a_{0} = a} , \label{eq:qvalue} \end{align} where the expectation is with respect to the trajectory induced by policy $\pi$ and transition probability $P$. Value-based methods typically iterate on an initial $Q$ as: $T_{\pi}Q \!:=\! r + \gamma P_{\pi}Q$, where $T_{\pi}$ denotes the Bellman operator and $\gamma P_{\pi}Q \!:=\! \gamma\mathbb{E}_{s'\sim P(\cdot|s,a),a'\sim\pi(\cdot|s')}\!\AdaRectBracket{Q(s',a')}$, with the definition being component-wise. Repeating the above iteration guarantees convergence to its unique fixed point $Q_{\pi}$. Our goal is to find an optimal policy $\pi^*$ such that $T_{*}Q = \max_{\pi}T_{\pi}Q$. The optimal policy can be extracted with the greedy operator $\pi(a|s)\!\!=\!\greedy{Q_{\pi}}\!:=\!\argmax_{\pi}Q_{\pi}$. For convenience, for any two functions $F_1, F_2 \in\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}$ we define their inner product as $\AdaAngleProduct{F_1}{F_2}\in\mathbb{R}^{|\mathcal{S}|}$. We also define $\boldsymbol{1}$ as an all-one vector whose dimension should be clear from the context. To render the policy robust against suboptimal actions that have temporally deceptively high values, advantage learning scheme augments the standard Bellman operator $T_{\pi}Q$ with an additional action gap or advantage function: $A_{\pi}\in\mathbb{R}^{|\mathcal{S}|\times|\mathcal{A}|}\!=\! Q_{\pi} - V_{\pi}$, where $V_{\pi} \!=\! \AdaAngleProduct{\pi}{Q_{\pi}}$ is the average of action values. The agent is prompted to select actions that have values higher than the average to increasingly distinguish optimal actions from bad ones. \subsection{Maximum Entropy RL}\label{sec:maxEnt} In the recently popular maximum entropy RL literature, the reward is augmented by the Shannon entropy $\tau\mathcal{H}\left( \pi \right) \!:=\! \tau\AdaAngleProduct{-\pi}{\ln\pi}$, where $\tau$ is the augmentation coefficient. By the Fenchel conjugacy \citep{geist19-regularized}, the Shannon entropy induced optimal policy is a Boltzmann distribution: \begin{align} \greedyH{Q} = \frac{\exp\AdaBracket{\tau^{-1}Q} }{\AdaAngleProduct{\boldsymbol{1}}{\exp\AdaBracket{\tau^{-1}Q}}} = \exp\AdaBracket{\tau^{-1}(Q-V)}, \label{eq:boltzmann} \end{align} $V \!:=\! \tau\ln\AdaAngleProduct{\boldsymbol{1}}{\exp\AdaBracket{\tau^{-1}Q}}$ is the soft value function. Its regularized Bellman operators are defined as $\BellmanH{} {Q}\!=\! r \!+\! \gamma P\!\AdaAngleProduct{\pi}{Q \!-\!\tau\ln\pi}$. It turns out that the Shannon entropy is a special case of the well-known Tsallis entropy \citep{TsallisEntropy} parametrized by entropic index $q$: \begin{align} \begin{split} \alpha H_q(\pi):= \alpha \frac{k}{q-1} \AdaBracket{1 - \AdaAngleProduct{\boldsymbol{1}}{\pi^q}}, \end{split} \label{eq:tsallis_entropy} \end{align} where $\alpha$ is its regularization coefficient. The Shannon entropy is recovered by letting $k \!=\!\frac{1}{2}$ and $q\!\rightarrow\! 1$. When $q\!\rightarrow \!\infty$, the regularization effect vanishes. In this paper, we fix $k\!=\!\frac{1}{2}$ and consider various cases of $q$. The corresponding regularized Bellman operator is hence given by $\BellmanG{}Q \!=\! r \!+\! \gamma P\AdaAngleProduct{\pi}{\!Q+\frac{\alpha}{2(q-1)}\!\AdaBracket{1-\pi^{q-1}}\!}$. Tsallis entropy induces the stochastic optimal policy as: \begin{align} \greedyG{Q}(a|s) = \sqrt[\leftroot{-2}\uproot{16}q-1]{\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} }_{+} \frac{2(q-1)}{q}}, \label{eq:sparse_policy} \end{align} where the operation $[\cdot]_{+}$ converts negative components to $0$. $\psi$ is the normalization term to ensure the policy sums to one. When $q\!=\!2$, we recover the sparsemax policy \citep{Lee2018-TsallisRAL,chow18-Tsallis} whose normalization is: \begin{align} \begin{split} \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} = \frac{\sum_{a\in S(s)} \frac{Q(s,a)}{\alpha} - 1 }{K{(s)}}, \end{split} \label{eq:sparse_normalization} \end{align} where $S(s)$ is the set of actions satisfying $1 \!+\! i\frac{Q(s,a_{(i)})}{\alpha} \!>\! \sum_{j=1}^{i}\frac{Q(s,a_{(j)})}{\alpha}$, $a_{(j)}$ indicates the action with $j$th largest action value, $K(s)$ denotes the cardinality of $S(s)$. The value function is \begin{align} V=\frac{1}{2}\sum_{j=1}^{K(s)}\AdaBracket{\AdaBracket{\frac{Q(s,a_{(j)})}{\alpha} }^2 - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}}^2 } + \frac{1}{2}. \label{eq:sparse_value} \end{align} The sparsemax policy has been recently demonstrated as a suitable candidate for safety-sensitive tasks such as robotics \citep{Lee2018-TsallisRAL,Lee2020-generalTsallisRSS}. However, the performance of its value-based methods typically cannot match Shannon entropy since it often results in insufficient exploration. When $q\neq 1,2,\infty$, the normalization term and hence optimal policy might not have closed-form expression. But we can approximate the optimal policy by leveraging first order expansion following \citep{chen2018-TsallisApproximate}\footnotemark\footnotetext{\cite{chen2018-TsallisApproximate} considered the case of $k=1$, while we consider $k=\frac{1}{2}$ in this paper.}: \begin{align} \begin{split} \approxgreedyG{Q}(a|s) \approx \sqrt[\leftroot{-2}\uproot{16}q-1]{\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \tilde{\psi}\AdaBracket{\frac{Q(s, \cdot)}{\alpha}}}_{+} }, \end{split} \label{eq:approximate_policy} \end{align} where $\tilde{\psi}\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} \!\approx\! \frac{\sum_{a\in S(s)} \frac{Q(s,a)}{\alpha} - \frac{1}{2}q }{K{(s)}} + \AdaBracket{\frac{q}{2} - \frac{q}{q-2}}$ is the approximate normalization. The set $S(s)$ then allows actions satisfying $\frac{1}{2}q \!+\! i\frac{Q(s,a)}{\alpha} \!>\! \sum_{j=1}^{i}\!\!\frac{Q(s,a_{(j)})}{\alpha} \!+\! j(\frac{q}{2} \!-\! \frac{q}{q-2})$. We denote its associated Bellman operator as $\approxBellmanG{}$. Detailed derivation of approximate Tsallis policy is left to Appendix \ref{apdx:derivation}. \section{Approach}\label{sec:approach} \subsection{Munchausen RL}\label{sec:mdqn} MDQN \citep{vieillard2020munchausen} proposes \emph{optimizing for the immediate reward augmented by the scaled log-policy of the agent when using any TD scheme}. Specifically, MDQN was implemented based on soft Q-learning as follows: \begin{align} \begin{split} \begin{cases} \pi_{k+1} = \argmax_{\pi} \AdaAngleProduct{\pi}{Q_{k}} + \tau\mathcal{H}\left( \pi \right) & \\ Q_{k+1} = r + {\color{red}{\beta\tau \ln\pi_{k+1} }} + \gamma P \AdaAngleProduct{\pi_{k+1}}{Q_k - {\color{blue}\tau\ln\pi_{k+1} } } &, \end{cases} \end{split} \label{eq:mdqn_recursion} \end{align} where the red term is the \emph{Munchausen term}, the blue term comes from soft Q-learning. For simplicity let $\beta=1$, MDQN has the following equivalence: \begin{align} \begin{split} & Q_{k+1} - \tau\ln\pi_{k+1} = \\ & \quad r + \gamma P\AdaBracket{\AdaAngleProduct{\pi_{k+1}}{Q_{k} - \tau\ln\pi_{k}} - \tau\KLindex{k+1}{k}} \\ & \quad \Leftrightarrow Q'_{k+1} = r + \gamma P\AdaBracket{\AdaAngleProduct{\pi_{k+1}}{Q'_k} - \tau\KLindex{k+1}{k}}, \end{split} \label{eq:mdqn} \end{align} where $Q'_{k} \!:=\! Q_{k} \!-\! \tau \ln\pi_{k}$ is the newly defined action value function. Hence MDQN performs KL regularization by adding the Munchausen term $\ln\pi_{k+1}$ to soft Q-learning. One of the crucial properties of KL regularization is its optimal policy averages over past action values: $\pi_{k+1}\propto\exp\AdaBracket{\tau^{-1}\sum_{j=1}^{k}Q_j}$ \citep{vieillard2020leverage}, which effectively cancels out errors under mild assumptions. In the following section, we show the implicit KL regularization is performed when the Munchausen term $\ln\pi $ is equivalent to performing advantage learning under certain conditions, motivating our later proposal. \subsection{An Advantage Learning Perspective for Munchausen RL}\label{sec:entropy_advantage} It is worth noting that in the lieu of Shannon entropy augmentation, from \eq{\ref{eq:boltzmann}} one has $\ln\pi \!=\! \tau^{-1}\!\AdaBracket{Q-V}$, hence adding the Munchausen term coincides with advantage learning. In the recent literature, conservative value iteration (CVI) \citep{kozunoCVI} comprehensively analyzes the relationship between advantage learning and KL regularization: CVI states the conditions under which advantage learning could implicitly perform KL regularization. The connection between MDQN, KL regularization and advantage learning motivates us to investigate the possibility of enforcing implicit KL regularization for the MTE framework via advantage learning. To do so, we need to verify that the superior performance of MDQN is due to advantage learning. We re-derive MDQN by manipulating the CVI update rule since CVI generalizes advantage learning. We provide full derivation in Appendix \ref{apdx:adv_kl} and succintly summarize the key steps here. It turns out the CVI update rule can be written as the following, with $\Psi, W$ being the CVI action and state value function, respectively: \begin{align} \Psi_{k+1} = r + \gamma P \AdaAngleProduct{\pi_{k+1}}{\Psi_{k}} + \beta \AdaBracket{ \Psi_{k} - W_k}, \label{eq:cvi_valueiteration} \end{align} where $\beta \!\in\! [0,1]$ is a function of the Shannon entropy and KL divergence coefficients. It is worth noting that \eq{\ref{eq:cvi_valueiteration}} is itself a new value iteration scheme \textbf{regardless of the definition} of $\Psi$ and $\pi$ since we can arbitrarily initialize $\Psi_{0}, \pi_{0}$. CVI states that, if the policy $\pi_{k+1}$ in \eq{\ref{eq:cvi_valueiteration}} meets the Boltzmann assumption $\pi_{k+1}\propto\exp\AdaBracket{\tau^{-1}\Psi_k}$ (CVI itself uses Boltzmann policy but analyzes general advantage learning), then iterating upon \eq{\ref{eq:cvi_valueiteration}} along results in KL regularization. The simplest method to ensure $\pi_{k+1}$ is Boltzmann is perhaps to perform soft Q-learning. By rewriting \eq{\ref{eq:cvi_valueiteration}} as a soft Q-learning scheme and replacing $\Psi, W$ with $Q,V$ we have: \begin{align*} Q_{k+1} \!=\! r + {\color{red}{\beta\!\AdaBracket{ Q_{k} - V_k} }} + \gamma P \AdaAngleProduct{\pi_{k+1}}{Q_{k} \!-\! {\color{blue}{\tau\ln\pi_{k+1}} }}, \end{align*} where the blue part comes from soft Q-learning and the we recognize the red part is $\beta(Q_{k} - V_{k}) = \beta\tau\ln\pi_{k}$. We hence see this scheme is same with the MDQN update rule \eq{\ref{eq:mdqn_recursion}}. This above analysis implies that MDQN achieves implicit KL regularization and superior performance thanks to the equivalence between the Munchausen term and the action gap. This intuition is confirmed by that in practice, MDQN actually computes the $\ln\pi$ term by $Q-V$ \citep[Appendix B.1]{vieillard2020munchausen}. Hence as learning proceeds, the probabilities of optimal actions increase and so do $\ln\pi$, which implies the action gap is also increased as is shown in Figure \ref{fig:action_gap}. The key for deriving the relationship between CVI and MDQN is the equivalence $\tau\ln\pi_{k+1} = Q_{k} - V_{k}$. It is hence natural to conjecture that, if the equivalence does not hold as when $q\!\neq\!1$ in the general Tsallis entropy, MDQN can no longer perform implicit KL regularization, and learning performance might be significantly degraded. As an example, consider \eq{\ref{eq:sparse_policy}} which is $q\!= \!2$. The Munchausen term $\ln\pi \!=\! \ln\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}}}_{+}$ may be undefined since the policy assigns zero probabilities to some of the actions. Even if we add some small value $\Delta$ in practice to prevent ill-defined $\ln\pi$, it does not encode action gap information since $\alpha\ln\pi = \alpha\ln\AdaRectBracket{\frac{Q(s,a)}{\alpha} - \psi\AdaBracket{\frac{Q(s,\cdot)}{\alpha}} + \Delta }_{+} \neq Q - V + \Delta$, where $V$ was defined in \eq{\ref{eq:sparse_value}}. This conclusion holds for other $q$ as well. Hence it is confirmed that resorting to MDQN does not bring KL regularization for the MTE framework. \begin{algorithm}[t] \caption{TAL-DQN}\label{algorithm} \SetKwInput{KwInput}{Input} \SetKwInput{KwInit}{Initialize} \KwInput{total steps $T$, update period $I$, \\ interaction period $C$, epsilon-greedy threshold $\epsilon$} \KwInit{ Network weights $\bar{\theta} = \theta$, \\ Replay buffer $B = \{\}$} \For{$t = 1, 2, \dots, T$ } { Collect tuple $(s_t, a_t, r_t, s_{t+1})$ in $B$ with $\pi_{q, \epsilon}$\\ \If{ mod$(t, C) = 0$} { update $\theta$ with minibatch $B_t \subset B$ on $\mathcal{L}_{\texttt{TAL}}$ \\ } \If{mod$(t, I) = 0$} { update target network $\bar{\theta} \leftarrow \theta$\\ } } \end{algorithm} \begin{figure*}[th!] \centering \includegraphics[width=\textwidth,trim=4 4 4 4,clip]{ggp_cartLunar_main_all.png} \caption{Comparison on \texttt{CartPole-v1} and \texttt{LunarLander-v2} between Tsallis Advantage Learning (TAL), Munchausen Tsallis DQN (MT-DQN) and Tsallis DQN with different entropic indices. All algorithms are averaged over 30 seeds to plot mean and $\pm 1$ standard deviation. For $q\!=\!-1,3,4$, approximate policy in \eq{\ref{eq:approximate_policy}} is employed. When $q\!\leq\!0$ Tsallis entropy becomes convex, hence the regularizaton properties fail to hold. We show $q=-1$ for completeness. } \label{fig:cart_lunar_q2} \end{figure*} \begin{figure}[t] \centering \includegraphics[width=\linewidth,trim=4 4 4 4,clip]{ggp_Acrobot_all.png} \caption{Comparison between Tsallis-DQN (orange), MT-DQN (blue) and TAL (green) with entropic indices $q\!=\! -1,2,3,4$ on \texttt{Acrobot-v1}. } \label{fig:acrobot} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\linewidth,trim=4 4 4 4,clip]{ggp_cartLunar_all.png} \caption{Comparison between Tsallis-DQN (orange), MT-DQN (blue) and TAL (green) with entropic indices $q\!=\! \frac{3}{2}, \,\, \frac{5}{2}$ on \texttt{CartPole-v1} and \texttt{LunarLander-v2}. } \label{fig:cartLunar_fraction} \end{figure} \subsection{Advantage Learning for General Tsallis Entropy RL} Motivated by the observation in the prior section, instead of relying on $\ln\pi$, we propose to explicitly perform advantage learning by increasing the action gap $Q - \AdaAngleProduct{\pi}{Q}$ to conform to the advantage learning scheme of \citep{azar2012dynamic,kozunoCVI}. Though the policy with $q \!\neq\! 1$ is no longer Boltzmann, by \citep[Eq.\,(12)]{kozunoCVI} the Tsallis policy can still be used. For justification the reader is referred to Appendix \ref{apdx:TAL}. We can succinctly summarize the proposed method: Tsallis advantage learning (TAL) as the following: \begin{align} \begin{split} \begin{cases} \pi_{k+1} = \approxgreedyG{Q_k}, & \\ Q_{k+1} = (\approxBellmanG{k+1})^{m} Q_{k} + \beta(Q_k - \AdaAngleProduct{\pi_{k+1}}{Q_k}), & \\ \end{cases} \end{split} \label{eq:tsallis_advantage_learning} \end{align} where $\tilde{\mathcal{G}}^{\alpha}$ is the approximate Tsallis policy defined in \eq{\ref{eq:approximate_policy}}. We can also change the policy/Bellman operator pair $(\tilde{\mathcal{G}}^{\alpha}, \BellmanG{})$ to $(\mathcal{G}^{\tau}, \BellmanH{}), (\mathcal{G}^{\alpha}, \BellmanG{}), (\mathcal{G}, \Bellman{})$ which correspond to settting $q\!=\!1, 2, \infty$, respectively. When $q \!=\!1$, this scheme coincides with Munchausen RL. When $q\!=\!\infty$, there is no regularization hence the scheme degenerates to advantage learning \citep{Baird1999-gradient-actionGap}. The superscript $m$ indicates $m$ times application of the Bellman operator. Typically $m \!=\! 1, \infty$ which correspond to value iteration and policy iteration schemes. $\beta$ is the advantage coefficient and typically is between $[0,1]$. $\AdaAngleProduct{\pi_{k+1}}{Q_k}$ is used to approximate the regularized value function $V$. We found that this approximation led to significantly better performance. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{plot_Gym/Acrobot_largest_gap_compare_var.png} \caption{Action gap between the actions having the largest and second largest values $Q(s,a_{(1)}) - Q(s,a_{(2)})$ of TAL and Tsallis-DQN with different entropic indices.} \label{fig:action_gap} \end{figure} \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{ggp_MinAtar_all.png} \caption{(Upper) Comparison between TAL, Tsallis-DQN and MT-DQN for $q\!=\!2$ on all MinAtar games. \\ (Lower) Comparison between TAL, Munchausen-DQN (MDQN), Persistent AL (PAL) and Stochastic AL (SAL) on all MinAtar games. All algorithms are averaged over 3 seeds to plot mean and $\pm 1$ standard deviation.} \label{fig:minatar} \end{figure*} \begin{figure*}[th!] \centering \includegraphics[width=\textwidth,trim=4 4 4 4,clip]{ggp_MinAtar_CVITAL_compare.png} \caption{Comparison between conservative value iteration (CVI) and TAL ($q\!=\!2$) on all MinAtar games. The similar learning curves indicate TAL can achieve performance comparable to SOTA algorithms but with more desirable properties such as sparsity or parsimonious description of actions. } \label{fig:minatar_cvital} \end{figure*} In this paper we are interested in verifying effectiveness of the proposed method as a value iteration algorithm, i.e. $m=1$. Specifically, we follow \citep{vieillard2020munchausen} to implement our algorithm based on the DQN architecture. We maintain two networks with parameters $\theta, \bar{\theta}$, with the latter being target network updated after a fixed number of timesteps. The loss function is defined by: \[ \mathcal{L}_{\texttt{TAL}}(\theta) \!:=\! \hat{\mathbb{E}}_{B}\AdaRectBracket{ \AdaBracket{r \!+\! \gamma\AdaAngleProduct{\pi_{\bar{\theta}}}{Q_{\bar{\theta}}} \!+\! \beta\AdaBracket{Q_{\bar{\theta}} \!-\! \AdaAngleProduct{\pi_{\bar{\theta}}}{Q_{\bar{\theta}}}} \!-\! Q_{\theta} }^2 }, \] where the policy $\pi_{\bar{\theta}}$ is computed following \eq{\ref{eq:tsallis_advantage_learning}}. The algorithm Tsallis Advantage Learning - DQN (TAL-DQN) is listed in Alg. \ref{algorithm}. We provide implementation details in Appendix \ref{apdx:implementation}. \section{Experiments}\label{sec:experiment} We aim to demonstrate that the proposed algorithm TAL is an effective generalization of Munchausen RL, in that when entropic index $q\!=\!1$ they coincide, but for other $q$ the Munchasuen bootstrapping term $\ln\pi$ can significantly deteriorate learning, while TAL can effectively boost the performance even for those $q$ that entail approximation. For comprehensive evaluation, we select three different domains: simple Gym classic control \citep{brockman2016openai}, lightweight Atari games \citep{young19minatar} and challenging full-fledged Atari games \citep{bellemare13-arcade-jair}. We aim to show TAL improves upon the SOTA value-based Tsallis entropy method Tsallis-DQN and achieves comparable performance with SOTA advantage learning methods. \subsection{Gym Classic Control} We first examine the simple Gym classic control problems \texttt{CartPole-v1}, \texttt{LunarLander-v2} and \texttt{Acrobot-v1}. Their simplicity allows for evaluation with large number of seeds to verify our analysis. We name the algorithm Tsallis-DQN that sets $\beta=0$ in \eq{\ref{eq:tsallis_advantage_learning}} and compare Tsallis-DQN with TAL and Munchausen-Tsallis-DQN (MT-DQN) for entropic indices $q \!=\! -1, 2,3,4$. When $q\!=\!2$ the policy has closed-form solution, for other indices the approximation introduced in \eq{\ref{eq:approximate_policy}} is employed. All algorithms are evaluated for $5\times 10^{5}$ steps with 30 seeds. We decompose the $5\times 10^5$ steps into 50 iterations. Implementation details such as network architecture and hyperparameters are provided in Appendix \ref{apdx:gym}. The results are shown in Figure \ref{fig:cart_lunar_q2}. Consistent with our analysis, Munchausen RL did not improve the performance for all entropic indices. For $q \!=\!2$, MT-DQN failed to learn any meaningful behavior even with analytic policy expression, while Tsallis-DQN performed relatively well. For $q\!=\! 3,4$, both MT-DQN and Tsallis-DQN failed to solve the \texttt{CartPole} environment. It is also interesting to inspect the case of $q \!=\!-1$, in which the Tsallis entropy becomes convex and hence the existing regularization results \citep{geist19-regularized,Li2019-regularizedSparse} fail to hold. We show such result only for completeness, and one can expect the poor performance of all entropy-regularized algorithms. One can see the same trend holds true for \texttt{LunarLander-v2} and \texttt{Acrobot-v1} as well in Figure \ref{fig:acrobot}. We quantitatively evaluate the action gap between the actions with the largest and second largest values, i.e. $Q(s,a_{(1)}) - Q(s,a_{(2)})$ and show the averaged results in Figure \ref{fig:action_gap}, which proves that the action gap is indeed enlarged. One might also be interested in non-integer value of $q$, since we might benefit from the intermediate values from the two analytic choices $q\!=\!1,2$. We therefore include the experiments with $q\!=\! \frac{3}{2}, \frac{5}{2}$ and show them in Figure \ref{fig:cartLunar_fraction}. It is apparent that that the trend still holds valid for non-integer values of $q$. For $q \!=\!\frac{3}{2} \in [1,2]$, we can expect this choice induces policy that stands between the softmax ($q\!=\!1$) and the Sparsemax ($q\!=\!2$), in that it is neither sparse nor assigns probability to all actions. However, with this choice, on both environments Tsallis-DQN and MT-DQN performed extremely poor, leading to the lowest scores possible. On the other hand, TAL managed to robustly converge to the optimal policy. For $q\!=\!\frac{5}{2}$ the situation is similar, with small improvement of Tsallis-DQN and MT-DQN. But we can see TAL did not converge to the optimal solution on \texttt{CartPole-v1}, this might be due to the hyperparameters in Table \ref{tb:gym} requires further fine-tuning for such specific choice. \begin{figure*}[t] \centering \includegraphics[width=\textwidth,trim=4 4 4 4,clip]{distributional_all.png} \caption{Comparison on full-fledged Atari games between TAL and MT-DQN implemented based on QR-DQN for $q=2$. } \label{fig:distributional_firstfive} \end{figure*} \begin{figure}[t] \centering \includegraphics[width=0.825\linewidth]{plot_Atari_distributional/ggp_Atari_KungFu_Compare.png} \caption{MT-DQN degraded the learning performance of Tsallis-DQN on the environment \texttt{KungFuMaster}. } \label{fig:kungfu} \end{figure} \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth,trim=4 4 4 4,clip]{ggp_AdvImprove_all.png} \caption{Comparison between TAL and Tsallis-DQN on four selected Atari games.} \label{fig:adv_improve} \end{figure} \subsection{MinAtar Games} We inspect whether TAL can still boost the performance of Tsallis-DQN and work well on relatively complicated problems with high dimensional image as the state space. MinAtar provides 5 lightweight Atari games with optimization on multiple aspects including sticky actions, training frequency and reward normalization, etc. We compare TAL with Tsallis-DQN, MT-DQN with entropic index $q\!=\!2$ since it enjoys closed-form policy expression. We also compare with persistent AL (PAL) \citep{Bellemare2016-increaseGap} that corrects the bias of the Bellman optimality operator; stochastic AL (SAL) that generalizes $\beta$ to random variables drawn from various distributions \citep{Lu2019-generalStochasticAL}. Every run consists of $10^{7}$ frames without frame skipping. We define every $200,000$ frames as one iteration so totally 50 iterations. All algorithms are averaged over 3 seeds. Since we use image as input, convolutional network is necessary. We detail the network architecture and hyperparameters used for all algorithms in Appendix \ref{apdx:minatar}. We first examine whether TAL boosts the performance of Tsallis-DQN. From the upper row of Figure \ref{fig:minatar} it is clear that for relatively simple environments like \texttt{Breakout} and \texttt{SpaceInvaders}, TAL improved upon Tsallis-DQN slightly. However for challenging tasks like \texttt{Seaquest, Asterix, Freeway}, Tsallis-DQN failed to learn meaningful behavior while TAL successfully converged. By contrast, MT-DQN showed flat learning curves for all environments, validating our analysis that $\ln\pi$ does not encode action gap information and hence can deteriorate learning. We also ask whether TAL can compete with state-of-the-art advantage learning algorithms. It is known that the hard max policy induced by Tsallis sparse entropy might cause brittle value function during learning, typically the performance of Tsallis entropy regularized algorithms cannot match SOTA algorithms such as PAL. From the lower row of Figure \ref{fig:minatar} we can see that PAL and MDQN performed the best, but TAL had similar performance throughout. On the other hand, SAL with the empirically performant choice of $\beta$ failed to keep up with other three algorithms due to the strong stochasticity in the advantage coefficient. This section confirms that Tsallis entropy regularized algorithms can perform competitively with SOTA advantage learning algorithms while enjoying strong theoretical properties for policies, whose good performance was due to the advantage learning and subsequent implicit KL regularization. \subsection{Distributional TAL on Atari Games} Similar to Munchausen RL that can be combined with distributional RL methods. We demonstrate that TAL can also be leveraged in the context of distributional RL. Specifically, we implement TAL on top of the \emph{quantile regression DQN} (QR-DQN) \citep{Dabney2018-QRDQN}. We compare TAL with MT-DQN with entropic index $q \!=\! 2$, since $q\!=\!1$ coincides with MDQN. We choose a subset of 15 games from the full-fledged Atari games \citep{bellemare13-arcade-jair} for showing TAL remains effective for challenging problems. Implementation details are provided in Appendix \ref{apdx:atari}. Every single run consists of $3\times 10^7$ steps. We define every $10^{5}$ steps as one iteration so totally 300 iterations. All algorithms are averaged over 3 seeds. The learning results in Figure \ref{fig:distributional_firstfive} further confirmed our analysis that TAL is robust on complicated environments, and can work well with state-of-the-art RL algorithms. By contrast, MT-DQN failed to learn any meaningful behaviors. \textbf{Did TAL improve upon Tsallis-DQN? } We compare TAL and Tsallis-DQN on \texttt{KungFuMaster} in which MT-DQN showed non-trivial performance. As illustrated by Figure \ref{fig:kungfu}, MT-DQN degraded the performance of Tsallis-DQN, proving the negative effect of the Tsallis Munchausen term. In Figure \ref{fig:adv_improve} we compare Tsallis-DQN and TAL, and one can see that TAL still improved upon Tsallis-DQN, which is consistent with the trend shown in Gym and MinAtar environments. \section{Discussion and Conclusion}\label{sec:discussion} In this paper we proposed to implicitly perform KL regularization in the maximum Tsallis entropy framework to improve its error-robustness since the non-Shannon entropies are inherently less robust. We showed simply resorting to recently successful Munchausen DQN led to significantly degraded performance, due to the loss of equivalence between log-policy and advantage learning. Accordingly, a novel algorithm Tsallis advantage learning was proposed to enforce implicit KL regularization. By extensive experiments we verified that TAL improved upon the SOTA value-based MTE method Tsallis-DQN by a large margin, and exhibited comparable performance to SOTA advantage learning methods. Several interesting future directions include combining TAL with actor-critic methods for further scalability, and leveraging general logarithm function for the Munchausen term so the log-policy term again encodes advantage information. \clearpage
\section{Introduction}\label{section:intro} White dwarfs (WDs) are the end-states of medium mass stars ($M_* \lesssim 8 M_\odot$), and their high gravity leads to rapid sinking of any elements heavier than helium. This sinking occurs on the timescales of days to millions of years \citep{Koester2009, Blouin2018}, and generally leaves the spectra of white dwarfs devoid of metal features. Nevertheless, over a thousand white dwarfs have been observed to be `polluted' with heavy elements \citep{Coutu2019}, with estimates that up to half of all white dwarfs are polluted \citep{Koester2014}. The source of the pollution is believed to be the remains of rocky parent bodies, which survived the post-main sequence evolution of the host star. Surviving planets can scatter these bodies onto highly eccentric orbits, such that the objects approach the white dwarf and are tidally disrupted and subsequently accreted by the star \citep[e.g.,][]{Debes2002, Jura2003}. The majority of WD polluters appear rocky \citep{Doyle2020, Swan2019} and a few appear icy \citep{Hoskin2020, Farihi2013}. Many accreted bodies are chondritic in composition, and based on this and their apparent masses, it has been often assumed that these parent bodies were small rocky bodies analogous to the asteroids, or Kuiper Belt objects \citep{Xu2017}, in the solar system. Here we attempt to quantify the fraction of polluting bodies that are exomoons rather than asteroids based on the parent body masses required for observed WDs and numerical simulations of the frequency of each population's accretion. We are motivated by the recent discovery of beryllium in a polluted white dwarf \citep{klein2021} and the interpretation that the observed large excess in Be relative to other rock-forming elements is a tell-tale indicator that the parent body accreted by the WD was an icy moon. In this interpretation, the excess Be is the result of irradiation of the icy moon in the radiation belt of its host giant planet \citep{Doyle2021}. \cite{Payne2016} and \cite{Payne2017} showed that moons can be liberated by close encounters between planets and that liberated moons could be accreted by a white dwarf. Here we examine this proposal in greater detail using a statistical analysis and N-body simulations of the liberation and accretion of moons. The probability of observing a moon versus an asteroid depends on the frequency and duration of the respective accretion events relative to the detectable amount of pollution on a typical WD. Based on occurence rates of dust around A-type stars, debris belts are expected to be ubiquitous amongst polluted white dwarf progenitors \citep{Melis2016}. Accordingly, assuming that any planetary systems with moons available for accretion would also have a debris belt available, the probability of observing moon versus asteroid accretion in a given WD system is \begin{equation} \frac{P_{\mbox{moon accretion}}}{P_{\mbox{asteroid accretion}}} = \frac{T_{\rm moons}}{T_{\rm asteroids}}, \end{equation}\label{Eqn:Pmoons} \noindent where $T$ is the fraction of time that the associated population provides observable pollution. Because we are interested in cumulative times, $T$ is dependent on the accretion rate of each population ($T=T(\mbox{accretion rate)}$). Because asteroids are expected to accrete much more frequently than moons due to their sheer number, ${P_{\mbox{moon accretion}}}/{P_{\mbox{asteroid accretion}}}$ will depend on whether the accumulation of successive asteroid accretions is sufficient to sustain high masses of WD pollution, compared to the single accretion events of relatively larger-mass moons. In this paper we estimate the parameters of Equation \ref{Eqn:Pmoons} for a system of three super-Earth to Neptune mass planets. A number of planetary architectures are capable of becoming unstable and aiding to feed meterial to the white dwarf \citep[e.g.,][]{Maldonado2022, Stephan2017, Veras2015}, however, we focus on this particular system because existing studies of asteroid (debris) belts in this architecture provide a baseline against which to compare moon accretions. Our paper is organized around Equation \ref{Eqn:Pmoons}. In \textsection \ref{Jura Model} we introduce an analytical model for masses of polluting elements in the WD convection zone, which we apply to all accretion events throughout this work. We show that this model implies that observed polluted WDs require masses much larger than one would expect for typical asteroid belt objects, emphasizing the need to understand moon accretions. In \textsection \ref{section:observability} we use observations of polluted WDs to put limits on the levels of pollution required for the accreter to be detectable. \textsection \ref{Section:Asteroids} finds $T_{\rm asteroids}$, the cumulative timescale of detectability of asteroid pollution, using extrapolated asteroid accretion frequencies from previous studies. We present the results from our own N-body simulations for moon accretions in \textsection \ref{Section:nbody}, and find $T_{\rm moons}$. Finally, we summarize all quantities and discuss the implications of Equation \ref{Eqn:Pmoons} in \textsection \ref{Section:Summary}. \section{Analytical Model for Convection Zone Masses}\label{Jura Model} To determine the duration and pollution levels associated with an accretion event, we make use of the model by \cite{Jura2009} for the buildup of accreted material in a white dwarf atmosphere. Throughout this work we will refer to the model as J09. The model describes the time-dependent mass of the polluter currently observable in the convection zone of a white dwarf as a function of polluting parent body mass, element settling times through the WD atmosphere, and the duration of the accretion event. The model assumes the accretion disk, and therefore accretion rate, decays exponentially as one might expect from dissipative forces that depend on mass. Under this assumption, the mass of element $Z$ that is observed to be in the convection zone of the white dwarf at the time of observation $t$ after the start of the accretion event, $M_{CV}(Z,t)$, is: \begin{equation}\label{Eqn:MCV} M_{\rm CV}(Z,t) = \frac{M_{\rm PB}(Z) \tau_{\rm set}(Z)}{\tau_{\rm disk} - \tau_{\rm set}(Z)} \left( e^{-t/\tau_{\rm disk}} - e^{-t/\tau_{\rm set}(Z)}\right), \end{equation} \noindent where $M_{\rm PB}(Z)$ is the mass of element $Z$ in the parent body, $\tau_{set}(Z)$ is the e-folding settling time of element $Z$, and $\tau_{\rm disk}$ is the characteristic lifetime of the accretion disk. The observable pollution mass $M_{\rm CV}(Z,t)$ in J09 depends on the settling timescale, which in turn depends on the properties of the host star. Therefore, variations in white dwarf temperature and composition have significant impacts on the maximum accumulations of pollution in the WD atmosphere and the timescales during which pollution levels are sufficiently high to be observable. In Figure \ref{Fig:MCV_example} we show the pollution masses for a representative element and parent body in a DA (top) and a DB (bottom) white dwarf in order to illustrate these differences. Defined spectroscopically, DAs have atmospheres dominated by hydrogen, while those of DB white dwarfs are helium-dominated. While white dwarf classifications extend well beyond these two categories, for simplicity we will restrict our discussion to these two broad categories, using the terms DA and DB to mean hydrogen and helium-dominated in what follows. The primary difference between the two types of WDs in the present context is that DAs generally have settling timescales for the heavy elements of days to thousands of years while the DBs have settling timescales of $10^5$ to $10^6$ yr for these elements. Additionally, because hot DAs will have minimal, if any, convection zones, we consider $M_{\rm CV}$ to more generally represent the mass of observable pollution in the WD atmosphere for these cases. The maximum heavy element mass in the convection zone for each WD type occurs where settling times are approached. In other words, the maximum is the amount of accreted material that can build up in the atmosphere before sinking exerts an influence on the abundances. In the example to follow, we assume a settling time of $10^2$ yr for the DA and $10^6$ yr for the DB. Both cases are assigned an accretion disk e-folding lifetime of $10^5$ yr. In Figure \ref{Fig:MCV_example}, we show the fraction of the parent body mass that is currently observable in the convection zone as a function of time since the start of accretion, for an exemplary heavy element. Both cases illustrate the three phases of pollution: while accretion is ongoing and before settling begins, the mass of the element builds up in the atmosphere (increasing phase). When the settling and accretion rates equalize (the blue point in Figure \ref{Fig:MCV_example}), the mass stays relatively constant (steady state). Once settling dominates as accretion wanes, the mass of the pollution decreases rapidly (decreasing phase). Note that, in this model, the majority of a single accretion event is in a decreasing phase. Because settling in the DBs begins after the majority of the parent body has been accreted onto the white dwarf, DBs can exhibit much larger fractions of the polluting metals than DAs, for the same parent body mass. The DA steady state phase occurs earlier and therefore at relatively higher settling and accretion rates than the DB phase, and the two DA rates conspire to cause very small fractions of the parent body to be observable at any given time. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{EXAMPLE_MCVt_H.pdf} \includegraphics[width=0.5\textwidth]{EXAMPLE_MCVt_He.pdf} \caption{Examples of the fraction of parent body masses of a particular element that are predicted to be in the convection zone of a WD as a function of time, according to the J09 model (Equation \ref{Eqn:MCV}). We assume an accretion disk lifetime of $10^5$ yr and settling times of $10^2 \rm yr$ for the DA (top) and $10^6 \rm yr$ for the DB (bottom). Note the three phases of accretion: increasing, steady state, and decreasing. While analogous phases occur both for the DA and DB, the timescales defining the boundaries of each phase are swapped due to the longer DB settling times. }\label{Fig:MCV_example} \end{figure} Estimates for $\tau_{\rm disk}$ generally range from $10^4$ to $10^6$ yr \citep[e.g.,][]{Girven2012}. In Figure \ref{MCV_Tdiskvary} we show how varying the disk timescale changes the pollution curves for the theoretical DA and DB stars shown in Figure \ref{Fig:MCV_example}. In particular, note that the maximum of the DA pollution decreases much more rapidly with increasing disk lifetimes than in the case of DBs. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{EXAMPLE_MCVt_H_Tvary.pdf} \includegraphics[width=0.5\textwidth]{EXAMPLE_MCVt_He_Tvary.pdf} \caption{Fraction of parent body mass for a typical rock-forming element in the convection zone of a WD as a function of time, for three different accretion disk lifetimes. The DA pollution curves decrease by nearly a factor of ten with increasing disk times, while the DB curves decrease less significantly. The peaks of both curves shift to later times as the disk accretion time increases, reflecting changes in the time where steady state between accretion and settling is achieved. }\label{MCV_Tdiskvary} \end{figure} We employ J09 in two ways. First, we estimate the parent body masses responsible for observed pollution in a sample of 21 white dwarfs and compare these masses with the distribution of asteroid and moon masses in our own solar system (\textsection \ref{section:MPB}). Secondly, we use the model in conjunction with the average masses of asteroids and moons to determine the timescales of observability for both populations (\textsection \ref{section:observability}). \subsection{Steady-State Parent Body Masses}\label{section:MPB} In order to calculate parent body masses for polluted white dwarfs, observed pollution masses ($M_{\rm CV}(Z)$) and settling times were collected from the references in Table \ref{Table:star_table}. The total masses of heavy elements in each white dwarfs are shown in Figure \ref{Fig:MCVZ_observed}. For an assumed disk timescale we then solve Equation \ref{Eqn:MCV} for the parent body mass at a range of possible elapsed accretion times for each observed element in the white dwarf. This gives an expression for the mass of element $Z$ in the parent body for an assumed elapsed accretion time $t_{\rm elapse}$ and an observed metal mass of $M_{\rm CV} (Z)$: \begin{equation}\label{Eqn:MPB_Solution} M_{\rm PB} (Z, t_{\rm elapse}) = \frac{M_{\rm CV}(Z) (\tau_{\rm disk} - \tau_{\rm set})}{\tau_{\rm set}\left( e^{-t_{\rm elapse}/\tau_{\rm disk}} - e^{-t_{\rm elapse}/\tau_{\rm set}}\right)}. \end{equation} Note that we change the time variable to $t_{\rm elapse}$ to emphasize the difference in the meaning of time between Equations \ref{Eqn:MCV} and \ref{Eqn:MPB_Solution}. Equation \ref{Eqn:MCV} solved for the variation in polluting element mass with time since accretion for a single parent body mass. Equation \ref{Eqn:MPB_Solution} instead takes an observed heavy metal mass and provides a range of parent body solutions that depend on the time at which one assumes the observation was taken. To obtain the total parent body mass solution, we sum over all observed elements at a given elapsed accretion time, such that $M_{\rm PB} (t_{\rm elapse})= \sum M_{\rm PB} (Z, t_{\rm elapse})$. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{MCVZ_sample.pdf} \caption{Total masses of heavy metals observed for the white dwarfs in Table \ref{Table:star_table}, sorted by type. The DAs tend to have lower observed masses of polluting elements compared to the DBs.}\label{Fig:MCVZ_observed} \end{figure} \begin{table*} \caption{All white dwarf parameters are collected from the references listed in the table. Any values not reported by the paper have been supplemented using the Montreal White Dwarf Database \citep{Dufour2017}. Throughout this work we group white dwarfs by their primary classification type (DA or DB only). } \begin{center} \begin{tabular}{c|c|c|c|c|c|c|c|c} \hline White Dwarf & Type & $T_{\rm eff}$ (K) & log(g) & $T_{\rm cool}$ (Gyr) & M$_*$ ($M_\odot$) & log($q$) & Disk$^\dagger$ & Reference \\ \hline NLTT 43806 & DAZ & 5830 & 8.00 & 2.4237 & 0.587 & -6.661 & N & \cite{Zuckerman2011}\\ G149-28 & DAZ & 8600 & 8.10 & 1.0683 & 0.657 & -9.224 & N & \cite{Zuckerman2011}\\ G29-38 & DAZ & 11820 & 8.40 & 0.7452 & 0.858 & -12.61 & Y & \cite{Xu2014}\\ GD 133 & DAZ & 12600 & 8.10 & 0.3960 & 0.667 & -15.434 & Y & \cite{Xu2014}\\ SDSS J1043+0855 & DA & 18330 & 8.05 & 0.1095 & 0.649 & -16.645 & Y & \cite{Melis2017}\\ WD 1226+110 & DAZ & 20900 & 8.15 & 0.0812 & 0.714 & -16.663 & Y & \cite{Gansicke2012}\\ WD 1929+012 & DAZ & 21200 & 7.91 & 0.0388 & 0.578 & -16.283 & Y & \cite{Gansicke2012}\\ WD 0446-255 & DBAZ & 10120 & 8.00 & 0.6355 & 0.581 & -5.242 & N & \cite{Swan2019}\\ GD 362 & DB & 10540 & 8.24 & 0.8098 & 0.732 & -5.789 & Y & \cite{Xu2013}\\ PG 1225-079 & DBAZ & 10800 & 8.00 & 0.5343 & 0.582 & -5.235 & Y & \cite{Xu2013}\\ WD 1350-162 & DBAZ & 11640 & 8.02 & 0.4484 & 0.596 & -5.273 & N & \cite{Swan2019}\\ WD 1232+563 & DBZA & 11787 & 8.30 & 0.6623 & 0.773 & -5.924 & N & \cite{Xu2019}\\ SDSS J0738+1835 & DBZA & 13950 & 8.40 & 0.495 & 0.842 & -6.324 & Y & \cite{Dufour2012}\\ HS 2253+8023 & DBAZ & 14400 & 8.40 & 0.4541 & 0.842 & -6.408 & N & \cite{Klein2011}\\ WD 2207+121 & DBZ & 14752 & 7.97 & 0.2046 & 0.572 & -5.591 & Y & \cite{Xu2019} \\ WD 1551+175 & DBAZ & 14756 & 8.02 & 0.2230 & 0.601 & -5.691 & Y & \cite{Xu2019}\\ WD 1145+017 & DBZA & 14500 & 8.11 & 0.2746 & 0.655 & -5.819 & Y & \cite{FortinArchambault2020}\\ GD 40 & DBZA & 15300 & 8.00 & 0.1912 & 0.591 & -5.805 & Y & \cite{Jura2012}\\ G241-6 & DB & 15300 & 8.00 & 0.1912 & 0.591 & -5.805 & N & \cite{Jura2012}\\ Ton 345 & DB & 19780 & 8.18 & 0.1097 & 0.706 & -7.883 & Y & \cite{Wilson2015}\\ WD 1536+520 & DBA & 20800 & 7.96 & 0.0491 & 0.578 & -8.938 & N & \cite{Farihi2016} \end{tabular} \end{center} {* $q$ is the fraction of stellar mass in the stellar envelope. Note that the DA WDs have much smaller stellar envelopes.\\ $\dagger$ Debris disks indicated for WDs with detected infrared excesses.} \label{Table:star_table} \end{table*} \begin{figure} \centering \includegraphics[width=0.5\textwidth]{Tmarks_G149-28_PB_Tdisk105_MM.pdf} \includegraphics[width=0.5\textwidth]{Tmarks_WD2207121_PB_Tdisk105_MM.pdf} \caption{An example plot of the parent body mass calculated from Equation \ref{Eqn:MPB_Solution} as a function of assumed elapsed accretion time for the DA G149-28 (top) and DB WD 2207+121 (bottom). We assume an accretion disk lifetime of $10^5$ years (dotted line). Settling timescales for the DB are approximately $10^6$ years, those for the DA are $\sim 400$ yr, and both are marked in dashed lines for each element. The parent body solution derived from Equation \ref{Eqn:MCV} is plotted for each element, and the dashed orange line shows the sum of all parent body elements at each assumed elapsed accretion time. }\label{MPB_example} \end{figure} As an example, Figure \ref{MPB_example} shows the application of Equation \ref{Eqn:MPB_Solution} to the DA G149-28, and DB WD 2207+121. The vertical lines show the settling times for each element associated with each WD and the assumed disk lifetimes of $10^5 \rm yr$. Note that the shape of the parent body solution is roughly the inverse of the pollution mass curve, reaching a minimum during the steady state phase of accretion, when the pollution mass is at a maximum. Equation \ref{Eqn:MPB_Solution} shows that the steady state point, $\rm dM_{\rm PB} (Z, t_{\rm elapse})/dt_{\rm elapse}=0$, coinciding with the minimum estimate for the parent body mass, will occur at time: \begin{equation}\label{Eqn:tmin} t_{\rm min} = \frac{\tau_{\rm disk} \tau_{\rm set}}{\tau_{\rm disk}-\tau_{\rm set}} \ln{\left(\frac{\tau_{\rm disk}}{\tau_{\rm set}}\right)}. \end{equation} In practice, when summing over multiple elements as in Figure \ref{MPB_example}, each element would reach the steady state point at slightly different times, due to the variations in settling times. Nonetheless, as long as the range of settling times are well above or below the disk lifetime, solving for elemental abundances at the time corresponding to steady state will give a minimum estimate for the total parent body mass. Thus, for the remainder of this work one can think of the `minimum parent body mass' to be analogous to the `parent body solution assuming steady state.' Note that this does not necessarily mean we are assuming all white dwarfs are in steady state, but rather that any other phase of accretion would require a more massive parent body than the steady state solution to explain the observed metal pollution. We calculate parent body masses for the white dwarfs in Table \ref{Table:star_table} using the effective temperature and log \textit{g} values reported in the references to obtain the WD convection zone masses and elemental settling times from the Montreal White Dwarf Database (MWDD) \citep{Dufour2017}. We then derive $M_{\rm CV}(Z)$ values from the relative abundances reported in the references, using the MWDD settling times and white dwarf envelope mass fractions. For comparison, we also considered the models provided by \cite{Koester2020}, which calculate settling times that include the lack of convection zones in hot, hydrogen dominated white dwarfs. We find that the settling timescales derived in the Koester models are generally comparable to those reported by the MWDD, and therefore do not significantly change the resulting parent body masses. Additionally, while we use all stellar parameters from the MWDD instead of those reported in each reference, we find that in most cases the values are in agreement, to within a factor of a few. Minimum parent body solutions for the observed white dwarfs are shown in Figure \ref{MPB_diskvary}, for a range of disk timescales. Because of the marked dependence on disk lifetime (Figure \ref{MCV_Tdiskvary}), we expect variations in assumed disk lifetime to change the minimum parent body estimates for DAs much more than for DBs. This expectation is realized, as shown in Figure \ref{MPB_diskvary}. We find that the majority of parent body estimates for DB WDs are between roughly $10^{23}$-$10^{24}$ g regardless of the disk timescale chosen. DA estimates are generally lower unless we increase the disk timescale to $10^7$ yr. This is beyond current estimates for disk lifetimes given in the literature, but does provide a more satisfactory agreement between parent body masses for DA and DB white dwarfs. Despite that effect, we will adopt a disk timescale of $10^5$ yr for the remainder of our analysis as that value is more generally accepted in the literature and results in lower parent body masses that we can take as minimum estimates. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{PBMass_Tdiskvary_MM.pdf} \caption{Parent body masses calculated assuming the white dwarf is in steady state, with four different assumed accretion disk timescales. DA parent body solutions tend to vary more dramatically with disk timescale than the DBs. Most DB parent body mass solutions are close to $\sim 10^{23}$,and while the DA solutions are somewhat lower, the two begin to converge as disk timescales increase. Note that the $10^7$ yr timescale is longer than most estimates for disk timescales.}\label{MPB_diskvary} \end{figure} Figure \ref{tmin_sample} shows the elapsed accretion times corresponding to the minimum parent body solution for each WD in the sample, using the stellar parameters from MWDD, and with a disk lifetime of $10^5$ years. The upper and lower limits show the range of accretion times for which the parent body solution is within a factor of two of the minimum. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{Tmin.pdf} \caption{Elapsed accretion times at which we calculate the minimum parent body mass solution, or equivalently the times where accretion and settling rates are equal. The upper and lower limits for each WD show the range of elapsed accretion times for which the parent body mass is within a factor of two of the minimum. }\label{tmin_sample} \end{figure} In Figure \ref{MComparison2} we show how the distribution of calculated parent body masses (assuming a disk lifetime of $10^5$ yr) compares to the distributions of moon masses in the solar system as well as to the approximate distribution of asteroid masses. Moon masses and radii are from the JPL Solar System Dynamics group \footnote{https://ssd.jpl.nasa.gov/ \citep{Giorgini1996} data taken 2021 August}. We calculate the asteroid masses assuming the distribution of asteroid radii is $dN \propto r^{-3.5} dr$ \citep{Dohnanyi1969}, and that all bodies have the same density of 3 g$/$cm$^3$. In reality, the majority of asteroids have lower densities ($\sim 2.5 \rm g/cm^3$), so we can consider the asteroid masses as upper limits. We assume that the range of asteroid diameters is 1-1000 km, corresponding with a range of masses of approximately $10^{15} - 10^{24}$ g. The WD pollution parent body masses are generally far larger than those defined by the asteroid distribution. While the DA parent body masses and the majority of the DB masses reside in the range of the largest bodies in our asteroid belt, such as Ceres ($\sim 10^{24}$ g) or Vesta ($\sim 10^{23}$ g), they are well above the bulk of the asteroid mass distribution. From our sample, for a disk timescale of $10^5$ yr, we consider a mean DA parent body to be $\sim10^{21}$ g and a mean DB to be $\sim10^{23}$ g. In our solar system, there are about 30 and 15 moons that fall above these DA and DB masses, respectively. The large calculated parent body masses compared to minor solar system bodies implicates an observational bias. This may be partially due to the large masses required to detect pollution, which we outline in the next section. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{Mass_Comparison_bytype.pdf} \caption{Fraction of bodies in each population with a given mass. Densities of 2.5 and 2 $\rm g/cm^3$ are assumed to calculate masses for asteroids and moons, respectively. The asteroid curve is derived from \cite{Dohnanyi1969} and the moon data are from the JPL Solar System Dynamics group. The parent body masses are split into DA and DB populations and assume a disk lifetime of $10^5$ yr. The DBs tend to have larger parent body mass solutions, though the masses for both the DAs and DBs are situated towards the tail end of asteroid masses and mid-to-high moon masses. Note that the parent body masses shown are lower limit solutions. }\label{MComparison2} \end{figure} \section{Pollution Detection Limits}\label{section:observability} In \textsection \ref{section:MPB}, we showed that in the context of the J09 model, most observed WD pollution requires parent body masses consistent with the more massive moons of the solar system, and the extremely rare most massive asteroids. We now turn to observations to determine a lower limit of observable pollution in a WD atmosphere to place further constraints on the differences between moon and asteroid pollution. Lower limits for observable masses of pollution in white dwarf atmospheres are obtained from measurements of calcium masses in polluted WDs. We choose calcium because there is a large sample of observations for Ca available in the literature with which we can assess minimum masses. We collect Ca masses for DA WDs from the SPY Survey \citep{Koester2005} and masses for the DBs from \cite{Zuckerman2010}. We first approximate a line to the lowest calcium masses in the SPY survey to derive an expression for minimum mass as a function of effective temperature (equation \ref{Eq:min_obs_Ca}). We then use the DB data to renormalize the line for the DB WDs. Because the data are expressed by number relative to hydrogen/helium, the relation between the minimum masses and temperature is dependent on the mass of the convection zone (mass of hydrogen for DAs or helium for DBs). Our expressions for the minimum masses of Ca that are observable in the polluted WDs are \begin{equation}\label{Eq:min_obs_Ca} \begin{split} M_{\mbox{min Ca, DA}} &= 10^{\frac{4 \rm {\it T}_{eff}(K)}{15000} - 12.6} \times \frac{m_{\rm Ca}}{m_{\rm H}}\times M_{\rm CV}\\ M_{\mbox{min Ca, DB}} &= 10^{\frac{4 \rm {\it T}_{eff}(K)}{15000} - 14.2} \times \frac{m_{\rm Ca}}{m_{\rm He}} \times M_{\rm CV}, \end{split} \end{equation} \noindent where $m_{\rm Ca}$ is the mass of calcium, $m_{\rm H}$ is the mass of hydrogen, $m_{\rm He}$ is the mass of helium, and $M_{\rm CV}$ is the mass of the WD convection zone or WD atmosphere. As the atmospheres of DAs tend to be relatively small (see Table \ref{Table:star_table}), their limits of detectable calcium mass are much lower than that of DBs. Applying Equation \ref{Eq:min_obs_Ca} to the white dwarfs in Table \ref{Table:star_table}, we obtain the minimum detectable calcium mass in the observable layers for each WD. The DBs have detection limits of $\sim 10^{18}$ g Ca, while the DA limits extend to orders of magnitude lower. The lower limit for calcium detection in the DAs is consistent with their lower observed $M_{\rm CV, Z}$ values, as described above. Taking the minimum observable calcium masses for each of the observed WDs, we now use the J09 model to calculate the parent body mass associated with each calcium mass limit. For each WD, we first apply the J09 model to the minimum detectable calcium mass to find the minimum mass of calcium in the parent body. We then calculate the total parent body mass by assuming chondritic composition ($\sim 1 \%$ calcium by mass), an accretion disk e-folding time of $10^5$ years, and settling times provided by the MWDD based on the effective temperature of each WD. Figure \ref{min_obs_PB} shows the resulting parent body masses associated with the extrapolated minimum observed calcium mass for each WD in our sample. These bodies would provide just enough calcium pollution to be detected with current technology. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{min_PB_obs.pdf} \caption{Calculated minimum detectable parent body masses associated with the detection limit for Ca, assuming chondritic parent body compositions. To obtain these masses, we solve the J09 model for the minimum mass of calcium in the parent body, assuming an $M_{\rm CV, Ca}$ according to Equation \ref{Eq:min_obs_Ca}. We then calculate the minimum parent body mass solution by assuming chondritic composition, settling timescales from MWDD corresponding to the effective temperature of each WD, and a disk timescale of $10^5 \rm yr$. } \label{min_obs_PB} \end{figure} While the instantaneous minimum observable pollution masses derived from equation \ref{Eq:min_obs_Ca} require much higher masses for the DBs, we find that DAs and DBs require similar overall parent body masses to produce observable pollution. This is due to the difference in fractions of parent body that can build up in each type of atmosphere (Figure \ref{Fig:MCV_example}). Assuming each parent body is accreting as a single event, the resulting minimum parent body masses required for observable pollution for both types of WDs are generally larger than the mean for solar system asteroids, and closer to the masses of solar system moons, suggesting an observational bias against ``typical" asteroids. In the following sections we will examine how moons and asteroids compare when we allow for continuous accretion of material. This approach is particularly necessary for asteroids, which are thought to reach accretion rates that require material from multiple objects to be present in the WD atmosphere at any one time. Going forward, we will adopt the instantaneous minimum observable mass limits of $5.3 \times 10^{16}$ and $1.3 \times 10^{20}$ g of total heavy elements for a typical DA ($T_{\rm eff} = 10000$ K) and DB ($T_{\rm eff} = 14000$ K), respectively. For single chondritic accretions, these limits correspond to minimum observable total parent body masses of $1.3 \times 10^{19}$ g for the DA and $1.7 \times 10^{20}$ g for the DB. Note that because DAs accumulate much smaller fractions of parent body in their atmospheres at steady state, the minimum observable parent body masses for DAs and DBs are similar, despite orders of magnitude differences in their instantaneous limits. \section{Continuous accretion models for asteroids and moons}\label{Section:Asteroids} While describing the J09 model in \textsection \ref{Jura Model}, we considered the increasing, steady state, and decreasing phases for a single accreting body. However, it is possible that pollution in the WD atmosphere could be from multiple parent bodies. In particular, \cite{Mustill2018} find that asteroids can accrete onto WDs continuously for up to billions of years. To assess how much of the pollution from continuous accretion could fall within observable limits, we consider populations of potential polluters based on mass frequency distributions of asteroids and moons in the solar system as guides. We then use total accretion rates determined previously from N-body simulations to construct synthetic pollution curves by applying the J09 model (Equation \ref{Eqn:MCV}) to each event. We currently restrict the comparison of moon and asteroid accretion to a three-planet system of super-Earths and Neptunes, a system that has previously been shown to result in high rates of asteroid accretion by \cite{Mustill2018}. Additionally, we focus on the first 200 Myr past WD formation, the time frame in which asteroid pollution levels are expected to be at their maximum. \subsection{Asteroid Accretion} Mustill's simulations show that in the first few million years after WD formation, a debris belt can reach a peak accretion rate of $\thicksim10^{-4} N_{\rm AB}$/Myr, where $N_{\rm AB}$ is the number of asteroid belt objects. Because the 200 Myr time span is relatively short compared to the full length of time considered in the Mustill simulations, we consider the accretion rate to be approximately constant in our calculations. We therefore use the accretion rate to constrain the total number of accretions that can occur within the 200 Myr period, and then pick the specific accretion event times randomly from a uniform distribution, such that each point in time is equally likely to be the start of an accretion event. The masses of accreting bodies for each event are chosen at random, without replacement, from the distribution of masses representing the solar system asteroid belt. We assume a range of radii of $0.5 - 500$ km and a total mass of the asteroid belt of $3\times10^{24}$ g. \cite{Dohnanyi1969} found the radius distribution for a collisionally-generated debris belt to be $dN \propto r^{-3.5} dr$. Translating this distribution into masses, we have an asteroid mass range of $1.6\times10^{15} - 1.6 \times 10^{24}$ g and $dN \propto \rho^{5/6} m^{-11/6} dm$. The total mass of the belt is then $M_{\rm belt} \propto \int m dN$, which we constrain to be the mass of the asteroid belt. Assuming that all bodies are spherical, we obtain $M_{\rm belt} = A \int \rho \frac{4 \pi}{3} r^3 r^{-3.5} dr$, where A is a constant, and $\rho$ is the density of the asteroids. Assuming a constant density of 3 $\rm g/cm^3$ and our adopted radius range of $0.5 - 500$ km, we find $dN = 1.7 \times 10^{19} r^{-3.5} dr$. This gives a total of about 12 million objects in the debris belt, for an accretion rate of approximately 1200 events/Myr. We therefore will only accrete a fraction of the total number of bodies in the full 200 Myr time period. To sample this distribution, we split the range of asteroid masses into 12 bins, spaced logarithmically in mass, a choice which leaves one object in the Ceres-mass bin. We assign each object in the belt a mass bin according to the distribution described previously, again assuming a constant asteroid density of 3 $\rm g/cm^3$. For each accretion event, we pick an object at random, identify its mass bin, and select a mass at random from the range of masses associated with that bin. We obtain masses of individual elements in the parent body by assuming chondritic composition, and then evolve these masses through the J09 model (Equation \ref{Eqn:MCV}) to track the total masses of polluting elements in the WD atmosphere. The number of bodies in the selected bin is then decreased by one. The upper panels of Figure \ref{fig:asteroid_jura_sim} show the results of this calculation assuming a disk e-folding time of $10^5$ yr and settling times for a 10000 K hydrogen-dominated WD and 14000 K helium-dominated WD. Each peak in the figure corresponds with an accretion event, and is followed by a tail during which mass sinks out of the atmosphere. The colored curves show the mass of individual elements comprising the polluting debris in the convection zone as a function of time and the black dashed curve shows the total mass of heavy elements in the convection zone. Note that because asteroid accretions are very frequent compared to the settling timescales, material from at least one body can be found in the mixing layer for the majority of the 200 Myr time interval. In \textsection \ref{section:observability} we found that the minimum convection zone pollution mass that is observable is about $5.3\times 10^{16}$ g for a typical DA WD and $1.3 \times 10^{20}$ g for a typical DB, as derived from observed calcium masses. The horizontal lines in Figure \ref{fig:asteroid_jura_sim} show the detectability threshold, and any peaks in pollution that exceed these limits are considered detectable periods of accretion. \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{jura_cont_comparison.pdf} \caption{Synthetic pollution mass curve for an asteroid belt (top) and a single moon event (bottom) as a function of time post WD formation. The black dashed line shows the total mass of pollution in the convection zone, the colored lines show the pollution mass per element. The horizontal line shows the minimum detectable mass of heavy elements. The left column shows accretion onto a DA WD while the right shows pollution of a DB. Top row: Continuous accretion of an asteroid-mass debris belt, based on the mean accretion rate of \cite{Mustill2018} and assuming the distribution of masses follows that of the solar system asteroid belt. Bottom row: Accretion of a single moon of mass $\sim10^{20}$ g onto a typical DA (left) and a moon of mass $\sim 10^{21}$ g onto a typical DB (right). These masses represent the median mass of the subset of solar system moons that satisfy the criteria for being liberated from their host planets and providing observable levels of metal pollution. }\label{fig:asteroid_jura_sim} \end{figure*} In both the DA and DB cases, a long-term mass of pollution is sustained in the atmosphere, with peaks when more massive asteroids accrete. The sustained background pollution is generally not enough to exceed detection limits, but the more massive asteroid accretions are observable. This suggests that while multiple debris belt objects may be contributing to observed pollution, it is likely that the majority of the observed mass is due to a single, more massive body. We find that asteroid accretions onto the DA can exceed the pollution detection limit for a total of $\sim 29$ Myr, resulting in a cumulative fraction of observable time of $T_{\rm asteroids, DA} = 0.145$ All else equal, pollution levels are higher for the DB case than the DA case as more mass can build up in the DB WD atmosphere due to slow settling times. Overall, in the DB simulation, the pollution is at an observable level for a total of $\sim 72$ Myr out of the 200 Myr interval, such that $T_{\rm asteroids, DB} = 0.360$. We note that in the asteroid accretion scenarios, the maximum masses of heavy elements that accumulate in the WD atmosphere are $\sim 5\times 10^{16}$ g for the DA and $\sim 10^{20}$ g for the DB. From Figure \ref{Fig:MCVZ_observed}, we see that the WDs in the observed sample have total masses of heavy metals that can exceed the maxima reached by our continuous asteroid accretion simulation by factors of up to $\sim10^3$. In addition to the expected vicissitudes of extrasolar asteroid belt masses, we consider that the higher observed masses could be due accretion of moons. \subsection{Moon Accretion Simulations}{\label{Section:nbody}} We carried out the same calculations for moons around WDs as we did for the asteroids in order to compare the expected detectability of accretion events for the two sources. For this purpose we require an accretion rate for moons. This rate comes from the efficacy of liberating moons from host planets, and the accretion rate of the liberated moons onto the WD. We simulate the separation of moons from their host planets during the stellar mass loss event that produces the WDs in order to estimate $f_{\rm moons}$, the frequency of moon accretions by WDs. Because moon orbital periods require very short time steps for integration, we break down $f_{\rm moons}$ into two parts to accommodate computational limits. We define $f_{\rm moons}$ as $N_{\rm moons} \times f_{\rm accrete}$, where $N_{\rm moons}$ is the number of moons in the system that can be liberated from their host planets and are able to provide detectable levels of pollution on a WD and $f_{\rm accrete}$ is how frequently a moon from this population reaches the white dwarf. We use the N-body code REBOUND \citep{Rein2012} to model three planets each with two moons. The IAS15 adaptive time-step integrator \citep{Rein2015} allows time-steps to be shortened or lengthened according to the occurrence of close encounters between particles. Due to computational limits, we set the smallest allowable timestep to be $0.1$ days. Following the approach described in \cite{Payne2017} for moon liberations, we start each simulation with a three-planet system (no moons) and integrate the planet orbits during stellar mass loss. The mass loss excites the planetary orbits, eventually leading to orbit crossings. We halt this portion of the simulation at the first orbit crossing, when the periapsis of any planet falls below the apoapsis of the adjacent interior planet, or, alternatively, when the apoapsis exceeds the periapsis of the adjacent exterior planet. At this point we insert two test particle moons around each planet (6 moons in total). The simulation is then resumed, including stellar mass loss if it is still ongoing. During the moon and planet portion of the simulation, we consider a moon to be accreted by the white dwarf if it passes within the Roche limit of the white dwarf ($\sim0.005$ AU). However, we note that it is possible that bodies farther away than 0.005 AU could still be accreted by the white dwarf, for example through Alfven wave drag \citep{Zhang2021}. Averaging the frequency of moon accretions across all simulation trials gives $f_{\rm accrete}$. \subsection{Initial Conditions for Moon Simulations} While Payne et al.\ use planetary architectures as simulated by \cite{Veras2015} and \cite{Veras2016} to assess moon accretion, we carry out our tests using the same three-planet system simulated by \cite{Mustill2018} (\textsection \ref{Section:Asteroids}) in order to compare our results for moon accretions to those of debris belt accretions. Each of our simulations begins with three planets around a 3$M_\odot$ main sequence host star that evolves into a $0.75 M_\odot$ white dwarf. The planets have masses of 1.3, 30.6, and 7.8 $M_\oplus$ and initial semi-major axes of 10, 11.6, and 13.07 AU, respectively, as prescribed by the Mustill simulations. We focus on this particular set of planets as they resulted in the largest fractions of asteroids engulfed by the white dwarf in the Mustill study. We choose random initial inclinations in the range $[0^{\circ},1^{\circ}]$, initial eccentricities of zero, and random values between $0^{\circ}$ and $360^{\circ}$ for all other orbital angles. Stellar mass loss is incorporated by updating the stellar mass according to the analytical formulae for single-star evolution by \cite{Hurley2000}. This code calculates stellar properties over 1 Gyr. For simplicity each of our simulations begins at the start of stellar mass loss such that white dwarf formation occurs $\sim100$ Myr after the start of the simulation. For the three-planet systems, the first orbit crossing usually occurs before the end of the stellar mass loss event. Because mass loss speeds up significantly towards the end of the 100 Myr interval, the stellar mass is usually still close to $\sim3 M_\odot$, and the semi-major axes of the planets have generally not increased dramatically, when the simulation is paused for moon insertion. We follow the prescription for moon insertion described by \cite{Payne2017}. The semi-major axis of each moon relative to the planet is chosen randomly in the range $r_{\rm min} < a_{\rm moon}/R_H <0.4$, where $R_H$ is the instantaneous Hill radius of the planet at the moment of the first orbit crossing. We considered two $r_{\rm min}$ values of $0.004$ and $0.04$. This range results in numerically manageable, stable orbits. Payne et al. found that once moons are liberated from their host planet, the initial conditions of the moons cease to matter due to the intense scattering each moon experiences. The initial inclination of each moon is randomly chosen to be within $1^{\circ}$ of the plane of planetary orbits, the eccentricity is set to zero, and all other angles are randomly chosen. For comparison with our initial conditions, Figure \ref{Figure:moon_a_plots} shows the distributions of semi-major axes relative to the host planet Hill radii for solar system moons. Data are gathered from the JPL Solar System Dynamics group, and we assume a uniform density of 2 $\rm g/cm^3$ for all bodies. The top panel shows the distribution of semi-major axes of moons by planet, and the lower panel shows the masses for the solar system moons. The range in $a_{\rm moon}/R_H$ in our simulations is seen to coincide with the upper third of the values exhibited by solar system moons; semi-major axes of $a/R_H = [0.04, 0.4]$ includes most of Jupiter's and Saturn's moons, but not the majority of Uranus' or Neptune's moons (Figure \ref{Figure:moon_a_plots}). \begin{figure} \centering \includegraphics[width=0.5\textwidth]{Moon_Dist_all.pdf} \includegraphics[width=0.5\textwidth]{mass_by_number.pdf} \caption{ Top: Distribution of moon semi-major axes relative to the planet hill radius, for each of the giant planets. Bottom: Distribution of moon masses, including and excluding the irregular satellites. Regular satellites tend to have smaller semi-major axes and larger masses than the irregulars. The shaded portions of each graph show the approximate range of initial semi-major axes that can result in liberated moons (top) and the range of moon masses that can produce observable levels of pollution (bottom), according to our model. }\label{Figure:moon_a_plots} \end{figure} \subsection{Accretion Rates of Liberated Moons} Figure \ref{Figure:summary_q} shows an example of the results from one simulation. The lower plot shows the instantaneous periapse of each moon, while the upper figures show snapshots of the orbital configurations. In this simulation, the closest approach of a moon to the WD is $\sim 0.007$ AU. Table \ref{Table:nbody} lists the closest approaches of each of the moon test particles across all simulations, as well as the initial conditions for each moon's orbit, relative to its host planet. \begin{figure*} \centering \includegraphics[width=0.70\textwidth]{EXAMPLE_sim.pdf} \caption{Top: Snapshots of orbits from simulation, for planets (thin black lines) and moons (colors). The times indicate the time since the WD formed, and the WD is shown as a black star at 0 AU. Bottom: Periapse versus time for the moons, in the same simulation as show in the top plot. Each curve corresponds with the orbits of the same color in the top plot. Two moons are scattered onto hyperbolic orbits following a close approach to the WD. } \label{Figure:summary_q} \end{figure*} Of the 60 moons comprising 10 simulations, one enters the Roche limit ($\lesssim$0.005 AU) of the white dwarf within the first 200 Myr after white dwarf formation. We therefore set the accretion rate of liberated moons at 1/60 per 200 Myr after the formation of the host WD. Note that like the asteroid N-body results, the moon accretion rates are dependent on the number of bodies available in the system. Our result should be taken as the fraction of liberated moons that accrete. In our simulations, all moons are liberated from their host planets. Consistent with \cite{Payne2017}, as a conservative estimate, we assume that any objects outside of $0.04 R_{\rm H}$ of their planet will be liberated. We therefore take the population of solar system moons with semi-major axes in this range as the population of potential moon parent bodies that could pollute a WD. In our solar system, out of a total of about 200 moons, 145 are situated at more than 0.04 $R_{\rm H}$, including the irregular satellites. Because moon accretions are single events, we can use the J09 accretion model to set a lower limit on the mass of a moon that can provide the minimum observable mass. For the DA of 10000 K, the least massive observable parent body is $1.3 \times10^{19}$ g and for the 14000 K DB the limit is $1.7\times10^{20}$ g. For the population of solar system moons exterior to our limit for liberation of $0.04 R_{\rm H}$, this gives a total of 22 moons that can provide observable pollution on a DA and 10 that can do so on a DB. We now return to our expression for the frequency of moon accretions, $f_{\rm moons}$ as $N_{\rm moons} \times f_{\rm accrete}$. We found that 1/60 of moons liberated from their host planets are expected to find their way to the WD. Inserting the accretion rate from the N-body simulations, and considering the number of moons that can both be accreted and observed on the surface of the WD based on the solar system population of moons, gives $f_{\rm moons, DA} = 22 \times 0.017/200 \rm Myr = 0.0019 \rm Myr^{-1}$ and $f_{\rm moons, DB} = 10 \times 0.017/200 \rm Myr = 0.0009 \rm Myr^{-1}$. \begin{table*} \caption{Minimum periapse ($q$) reached by each moon, in AU, and the parameters used to initialize the moon orbits. $a_{\rm moon}$ is given relative to the Hill radius of the planet. Two moons were inserted around each planet. The WD Roche limit is at 0.005 AU.}\label{Table:nbody} \begin{tabular}{c|c|c|c|c|c|c|c} \hline Run & $a_{\rm moon}/R_{\rm H}$ range & $q1_{\rm min}$ (AU) & $q2_{\rm min}$ & $q3_{\rm min}$ & $q4_{\rm min}$ & $q5_{\rm min}$ & $q6_{\rm min}$ \\ \hline 1 & 0.004-0.4 & 0.0612 & 0.0148 & 0.0060 & 20.1982 & 0.0018 & 0.0568 \\ 2 & 0.04-0.4 & 0.6077 & 4.7049 & 0.0619 & 6.6298 & 7.5362 & 2.4578 \\ 3 & 0.004-0.4 & 0.2180 & 0.1425 & 0.4133 & 1.5700 & 0.0328 & 0.8134 \\ 4 & 0.004-0.4 & 0.0078 & 0.0081 & 7.9765 & 0.6881 & 0.0187 & 0.0066 \\ 5 & 0.004-0.4 & 0.9560 & 1.8188 & 0.8765 & 0.0097 & 3.7238 & 0.0070 \\ 6 & 0.04-0.4 & 23.2735 & 22.1167 & 15.3154 & 4.8946 & 18.0538 & 17.4935 \\ 7 & 0.04-0.4 & 19.7743 & 33.2792 & 28.4050 & 19.1263 & 7.7563 & 31.6862 \\ 8 & 0.04-0.4 & 15.2427 & 11.6404 & 8.7045 & 20.0703 & 7.2406 & 26.1100 \\ 9 & 0.04-0.4 & 0.0069 & 0.0071 & 0.0341 & 24.2026 & 9.4522 & 10.7774 \\ 10 & 0.04-0.4 & 8.4775 & 21.0213 & 8.5416 & 0.0065 & 44.6118 & 27.5651 \end{tabular} \end{table*} \subsection{J09 Model for Moons} Applying the accretion rates of $f_{\rm moons, DA}= 0.0019 \rm Myr^{-1}$ and $f_{\rm moons, DB} = 0.0009 \rm Myr^{-1}$ results in 0.38 and 0.17 accretions in the first 200 Myr past WD formation, for the DA and DB WDs, respectively. One concludes that moons are expected to be visible as single accretion events, with no build up of pollution from multiple objects, unlike the case for asteroids. We use solar system moons as a guide for computing the median mass expected for accretion events with moons as parent bodies. In the previous section, we showed that only moons with total masses greater than $1.3\times10^{19}$ g and $1.7 \times 10^{20}$ g can be detected on the surface of a DA and DB, respectively. In order to obtain the population of observable moons, we therefore select the solar system moons that are above these mass limits, and are situated outside of our assumed liberation limit of $0.04 R_{\rm H}$. We assume the resulting moons represent the population of bodies that could both be liberated from their host planets and provide a detectable amount of pollution if they were to be accreted by their host WD. Recall that we found that 22 solar system moons meet these requirements for the DA accretion events and 10 solar system moons for the DB accretion events. Assuming any of these moons would be equally likely to accrete, we used the median mass moon of each population to represent the median mass moon expected to be observed accreting onto each WD type. This results in a median mass for an observed accreted moon on a DA of $1.2 \times 10^{20}$ g and $3.7 \times 10^{21}$ g for a DB. In the lower panels of Figure \ref{fig:asteroid_jura_sim}, we show the pollution curve due to accretions of these median mass objects on the same time axis as the asteroid accretions to illustrate how the single events compare with the continuous accretions. We assume that each moon has chondritic composition. Because these are single events, they follow the same phases of accretion as shown in Figure \ref{Fig:MCV_example}, however we now also show the variation in the abundances of individual elements. The heavy metal limit outlined in \textsection \ref{section:observability} is shown as a horizontal line in each plot. For a single moon accretion, the DA case exceeds the mass limit for $0.57 \rm Myr$ while the DB is observable for $3.89 \rm Myr$. Note that these timescales far exceed the duration of observability for a single asteroid on either WD type. However, because asteroid pollution accumulates from multiple bodies, the continuous asteroid calculations result in greater cumulative timescales of observability. For a mean fraction of observable time for the moons we multiply these numbers by the expected number of moon accretions in the 200 Myr time period for each case, obtaining $T_{\rm moons, DA} = 0.38 \mbox{ accretions} \times 0.57 \rm Myr / 200 \rm Myr = 0.001$ and $T_{\rm moons, DB} = 0.17 \mbox{ accretions} \times 3.89 \rm Myr / 200 \rm Myr = 0.003$. We can now use our results to evaluate the relative probabilities of detecting asteroids from a debris belt and moons in polluted WDs. Returning to Equation \ref{Eqn:Pmoons}, we now fill in the values derived for the DA and DB cases to find the relative probability of observing accretion of moons and asteroids, yielding \begin{equation} \left( \frac{P_{\mbox{moon accretion}}}{P_{\mbox{asteroid accretion}}}\right)_{\rm DA} = \frac{0.001}{0.145} = 0.007 \end{equation} and \begin{equation} \left( \frac{P_{\mbox{moon accretion}}}{P_{\mbox{asteroid accretion}}}\right)_{\rm DB} = \frac{0.003}{0.360}=0.008. \end{equation} Therefore, for three-planet Super-Earth/Neptune systems with both moons and asteroids available for accretion, we would only expect up to $1\%$ of polluted DAs and DBs to currently have observable amounts of pollution due to moon accretion. \section{Discussion}\label{Section:Summary} Over 1000 white dwarfs have observations of at least one polluting element in the atmosphere \citep{Coutu2019}. Around 20 are considered strongly polluted, with multiple rock-forming elements detected. Therefore, $\sim2\%$ of all polluted WDs can be considered `highly polluted'. The large, moon-like mass solutions calculated in \textsection\ref{Jura Model} represent the parent bodies associated with this highly polluted sample. Assuming that all of these high-mass parent bodies are indeed moons, this suggests that $\sim2\%$ of polluted white dwarfs are accreting moons. Of course, as shown by the pollution masses in Figure \ref{fig:asteroid_jura_sim}, accretion of the most massive asteroids may also result in high masses of pollution, so the population of the most highly polluted white dwarfs may also include the most massive debris belt members. Nonetheless, this statistic is consistent with our results derived from N-body accretion rates, that $\sim1\%$ of overall pollution is expected to come from moons as opposed to less massive debris belt objects. Uncertainties in this study include the timescales assumed in the J09 model, observational constraints beyond what has been considered in our minimum detectable mass method, exoplanet moon and asteroid populations, and the effects of planetary architectures beyond the three-planet system considered as our test case. We now explore these various possibilities and their effects on the parent body solutions or numerical accretion models. \subsection{Disk e-folding timescale} The e-folding lifetime of the debris disks around the WDs, $\tau_{\rm disk}$, determines how quickly pollution accretes onto the WD and, in conjunction with the settling times, limits the maximum mass of any given element that can accumulate in the WD atmosphere (Figure \ref{MCV_Tdiskvary}). Throughout the asteroid and moon comparison in this paper we assume $\tau_{\rm disk} = 10^5 \rm yr$, as an accommodation for estimates that span from $10^4$ to $10^6 \rm yr$. In \textsection\ref{Jura Model} we derived $t_{\rm min}$, the assumed elapsed accretion time which recovers a minimum solution for the parent body mass, or equivalently the steady state point in the J09 model. Plugging in $t_{\rm min}$ to the J09 model, we can therefore write the general solution for the minimum parent body mass solution relative to the observed mass in the atmosphere as a function of the ratio of the disk and settling timescales, for an arbitrary element: \begin{equation}\label{Eq:MPBminratio} \frac{M_{\rm PB}(Z, t_{\rm min})}{M_{\rm CV}(Z)} = \frac{\frac{\tau_{\rm disk}}{\tau_{\rm set}} -1}{\left(\frac{\tau_{\rm disk}}{\tau_{\rm set}}\right)^{\frac{1}{1 - \tau_{\rm disk}/\tau_{\rm set}}} - \left(\frac{\tau_{\rm disk}}{\tau_{\rm set}}\right)^{\frac{1}{\tau_{\rm set}/\tau_{\rm disk} -1}}}, \end{equation} where $M_{\rm PB}(Z, t_{\rm min})$ is the parent body solution assuming steady state for the element $Z$ and $M_{\rm CV}(Z)$ is the observed mass of the heavy metal. Figure \ref{fig:PBvtauratio} shows Equation \ref{Eq:MPBminratio} applied to a range of disk-to-settling time ratios. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{PBminvstauratio.pdf} \caption{Minimum parent body mass solution relative to the observed mass of pollution in the atmosphere, as a function of the ratio of the disk timescale to the settling time. DAs would be found towards the right, so that the steady-state parent body mass is several times the observed mass in the atmosphere. DBs would be towards the left, where the parent body solution approaches the mass of the polluting metals. }\label{fig:PBvtauratio} \end{figure} Writing the parent body mass expression in terms of the ratio of characteristic timescales shows why DAs and DBs have different sensitivities to changes in $\tau_{\rm disk}$ (outlined in \textsection\ref{Jura Model}) by illustrating the two limits of the parent body mass calculation. If disk timescales far exceed settling times, as they would for DAs, the minimum parent body solution will increase rapidly. For $\tau_{\rm disk} = 10^5$ yr and a DA settling time of days, parent body solutions can reach factors of $10^7$ times the observed metal mass. On the other hand, if settling times exceed disk timescales, as they may for DBs, $\tau_{\rm disk}/\tau_{\rm set}$ approaches 1, so that the minimum parent body mass is equal to current mass of metal in the WD atmosphere. Increasing the assumed disk timescale would shift parent body mass solutions to the right in Figure \ref{fig:PBvtauratio}. While DB WDs with very long settling times would not be strongly affected (parent body solutions would still be roughly equivalent to the mass of metal in the atmosphere), minimum parent body solutions trend approximately linearly with $\tau_{\rm disk}/\tau_{\rm set}$ when the disk timescale exceeds the settling time (DAs). Decreasing the assumed disk timescale would similarly not strongly affect the DBs but would decrease the parent body solutions of the DAs proportionally. Note that WDs with settling times within the range of disk timescale estimates will have non-linear dependencies on disk timescale. These effects can be seen in the parent body solutions calculated for the observed WDs (Figure \ref{MPB_diskvary}). We now return to our parameters $T_{\rm moons}$ and $T_{\rm asteroids}$, the timescales during which pollution exceeds detectable levels. For simplicity, we start by considering a single accretion with a generic observability timescale $T$. For a single event, $T$ depends on the peak mass of pollution ($M_{\rm CV}$) that can build up in the atmosphere, the duration for which a high mass of pollution can be sustained, and the detection limit associated with the WD. The maximum mass of pollution deposited by a given parent body mass is the inverse of Equation \ref{Eq:MPBminratio}. Therefore, pollution accumulation for DAs varies inversely with changing disk timescales while peak masses of pollution in DBs remain roughly constant. The amount of time that relatively large masses of pollution can be sustained in the WD atmosphere can be approximated as the difference between $\tau_{\rm disk}$ and $\tau_{\rm set}$. As seen in Figure \ref{MPB_example}, these timescales are on either side of $t_{\rm min}$, where the maximum $M_{\rm CV}$ is reached. For simplicity, we will consider DA settling times well below, and DB settling times well above, the range of possible disk timescales, so that $|\tau_{\rm disk} - \tau_{\rm set}|$ will be approximately equal to the longest of the two timescales. Based on this approximation, for DBs $|\tau_{\rm disk} - \tau_{\rm set}|$ $\sim \tau_{\rm set}$, and to a reasonable approximation, changing $\tau_{\rm disk}$ should not affect $T$ for the DBs. Therefore, and we anticipate $T_{\rm moons}$ and $T_{\rm asteroids}$ to be robust against disk timescales for DBs of sufficiently long settling times. DA settling times are short, so $|\tau_{\rm disk} - \tau_{\rm set}| \sim \tau_{\rm disk}$, and increasing the disk timescale will lengthen the amount of time that peak pollution levels can be sustained. However, increasing $\tau_{\rm disk}$ decreases the maximum mass of pollution that can be accumulated. If the decreased pollution masses still exceed the detection limit, then $T$ would increase, but if the new pollution masses do not exceed detection limits, $T$ would fall to zero. The overall effect on $T_{\rm moons}$ and $T_{\rm asteroids}$ will therefore depend on the detection limits and distribution of debris belt masses considered. For our distributions of moons and asteroids, generally only the most massive bodies are contributing towards observable pollution, so assuming that most pollution would remain above the detection threshold, we would expect $T_{\rm moons}$ and $T_{\rm asteroids}$ to increase with increases in disk timescale. \subsection{Asteroid belt mass and size distribution} The accretion rate extrapolated from N-body simulations depends on the number of objects in the asteroid belt, which in turn depends on the total mass and assumed distribution of radii for the population of asteroids. Furthermore, the number of bodies contributing to heavy element pollution at any given time, and therefore the median mass of heavy elements in the WD convection zone, varies directly with the accretion rate. In this work, we assumed a solar system mass asteroid belt, with radii spanning $0.5-500 \rm km$ following a distribution of $dN\propto r^{-3.5} dr$. Due to the continuous nature of asteroid accretion, pollution remains at a relatively stable minimum for the duration of accretion ($\sim 10^{16}$ g total in the DA, $\sim 10^{20}$ g for the DB), with short spikes to greater, observable masses when a particularly massive asteroid accretes. Whether asteroid accretion is observable for long time periods is therefore an `all or nothing' issue, and is very sensitive to how a typical amount of accumulated heavy elements compares to the detection limit. If the limit is just above the typical mass that can build up from multiple accretions, we will observe only the peaks of the most massive asteroid accretions. However, if the detectability limit is just below the typical mass of accumulated metals, accretion is observable for the entire time period. Given that many polluted white dwarf progenitors are estimated to be more massive than the Sun \citep{Coutu2019}, it is reasonable to assume that many of these systems may have had debris belts more massive than the asteroid belt. If the debris in these more massive belts follows the same collisionally-produced power-law distribution as described for the asteroid belt, there would be correspondingly more objects of any given mass. Assuming the accretion rates per number of available bodies is unchanged, a larger debris belt would increase the total number of accretion events, and therefore increase the typical pollution mass at every point in time, resulting in a larger $T_{\rm asteroids}$. If the moon accretions remain unchanged, this increase in $T_{\rm asteroids}$ would decrease the fraction of pollution that would be due to moons. \subsection{The impact of planet spacing on moon liberation} Because moon liberations depend on close encounters between planets, and planet separations determine how quickly systems can become unpacked during stellar evolution, we expect the frequency of moon liberations to vary with planetary system architectures. The three-planet system used throughout \textsection \ref{Section:Asteroids} has spacings of 5-7 mutual Hill radii, with the innermost planet situated at 10 AU. This arrangement of planets is somewhat more tightly packed than most observed systems. Separations for systems detected by the {\it Kepler} satellite generally peak around 14-20 mutual Hill radii \citep{Pu2015, Weiss2018}, however these observed planets are all on orbits interior to $\sim2$ AU, and it is unclear if this trend would directly apply to outer planets. One constraint on outer planet spacings is HR 8799 \citep{Marois2008, Marois2010}, which hosts four giant planets ($>5 M_{\rm Jup}$) exterior to 10 AU, and is a likely candidate for a future polluted white dwarf system \citep{Veras2021}. Considering the most stable configuration for these planets \citep{Gozdziewski2020}, separations are approximately 2-3 mutual $R_{\rm H}$. From the sample of directly-imaged exoplanets, \cite{Nielsen2019} found that approximately 9$\%$ of stars more massive than $1.5 M_{\odot}$ could host such massive planets outside of 10 AU. In Figure \ref{Figure:vary_spacing} we show the orbital crossings that result in simulations with initial planet spacings of 5-10, 10-20 and 20-30 mutual Hill radii. Planet masses for all three simulations are 1.3, 30.6, and 7.8 $M_{\oplus}$, the same as used in \textsection \ref{Section:Asteroids}. These simulations result in 502, 148, and 173 crossings for the 5-10, 10-20, and 20-30 cases, respectively. We find that while the number of crossings varies with planet spacings, crossings do still occur even at spacings more consistent with the majority of observed systems. From this simple comparison we do not anticipate that orbital crossings, and consequently moon liberations, would be entirely eliminated for more widely separated systems. Further study is necessary for more detailed connections between liberations and accretions and planetary architectures. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{sim_vary_rhill.pdf} \caption{The periapse evolution of three-planet systems for three different ranges of planet spacings in terms of mutual Hill radii: 5-10 (top), 10-20 (middle), and 20-30 (bottom). In each system, the innermost planet is at 10 AU and the spacings between each consecutive planet are randomly chosen from the stated ranges. Planet masses for all three simulations are 1.3, 30.6, and 7.8 $M_{\oplus}$. While the most closely packed system experiences the most orbital crossings between planets, crossings still occur in the more widely spaced systems. }\label{Figure:vary_spacing} \end{figure} \subsection{Populations of exomoons} In this paper, we assumed that moon populations would be similar to those in the solar system. It is possible that moon populations in exoplanet systems do not resemble the solar system. However, as there are no confirmed detections of rocky or icy exomoons, it is difficult to determine how many such moons a typical exoplanet system might have. Additionally, if exomoons in general are not found in all planetary systems, the probabilities of moon accretions derived in this work should be multiplied by the fraction of polluted white dwarf systems that do host exomoons. A first-order limit on the number of moons in a given WD system should be the placement of moon-hosting planets. \cite{Dobos2021} found that whether exomoons can survive in a stable orbit around a given planet depends on the proximity of the planet to the host star. They conclude that planets on very short period orbits ($< 100$ days) are most limited in the fraction of moons they can retain, while planets with longer periods could retain at least $60\%$ of their original moons. For the purposes of determining the populations of moons available to accrete onto a WD, the longer-period planets are likely more relevant, as the inner planets risk being engulfed by the star in its red giant phase. In our three-planet system, planets were originally located 10-13 AU around a 3$M_\odot$ star, with periods of $18-27$ years. According to the Dobos et al. study, these planets could retain about $70\%$ of their moons. The giant planets of the solar system have orbital periods of about 11 to 160 years, and have a similar moon retention fraction of $60-80 \%$. This suggests that whether or not the distributions in mass and semi-major axis of moons in our theoretical three-planet system match those for our solar system's moons, systems resembling our three-planet system should have a large portion of their moons intact and bound to planets when the white dwarf forms. Further constraints on exomoon populations could be made as Transit Timing Variation searches for exomoons progress \citep[e.g.,][]{Teachey2021,Kipping2021}. \section{Conclusions} Motivated by the large parent body masses required to explain observed levels of white dwarf pollution, and the recent discovery of beryllium in a white dwarf atmosphere, we have used N-body simulations and the \cite{Jura2009} accretion model to assess the likelihood that a WD will be polluted by a moon. We focus this study on the first 200 Myr past WD formation for a planetary system containing three Super-Earth/Neptune-class planets. Extrapolating from asteroid N-body simulations, we find that such a planetary system could sustain an asteroid accretion rate of approximately 1200 objects per Myr. Assuming that the system had a population of moons similar to the regular solar system moons, we find from N-body simulations that we could expect up to about 0.4 moon accretions per 200 Myr. Using the population of observed white dwarfs with calcium detections, we find that the pollution must have a calcium mass component of at least $5.8\times 10^{14}$ g to be observable in a DA atmosphere, and $1.4\times10^{18}$ g to be detected in a DB. We use these limits to determine the cumulative fractions of time that moons and asteroids can produce observable levels of pollution. Based on our numerical accretion model, we expect $\sim1\%$ of white dwarf pollution to come from moons as opposed to asteroids. If we consider, as a first-order approximation, that all of the most highly polluted WDs (requiring the most massive parent bodies) are polluted by moons, our parent body mass approach returns a similar statistic, of moons making up about $2\%$ of polluters. \acknowledgements C.M.\ and K.J.W.\ acknowledge support from NSF grants SPG-1826583 and SPG-1823617. EDY acknowledges support from NASA Exoplanets grant 80NSSC20K0270.
\section{Background} In a virtual production stage, an actor is surrounded by individually controllable LEDs, built of individual light sources \cite{Debevec:2002} or LED display panels \cite{Hamon:2014}. The popularity of this production technique has been in pursuit of three benefits: 1) To provide an in-camera background behind the actors which can eliminate the need for greenscreen, keying, and compositing; 2) To provide image-based lighting on the actors, illuminating them with images of the environments they are composited into; and 3) To show the actors and crew images of the scene to motivate eyelines and guide camera framing. While current LED panels are effective for in-camera backgrounds and showing images to the case and crew, they often fall short as image-based lighting instruments due to limited dynamic range, making them unable to reproduce the brightness of concentrated light sources in a scene. As a result, cinematographers must typically bring in additional studio lighting to compensate for this missing scene illumination, which adds expense and complexity to a shoot. In this work, we will modify the image-based lighting environment to spread out the energy of concentrated light sources so that the scene illumination can be represented within the dynamic range of typical LED panels. \section{Technique} \begin{figure}[h] \vspace{-5pt} \begin{tabular}{cc} \includegraphics[width=1.4in]{pano_images/ccm/HouseLightsKitchen_Panorama_8stopsup_recoveredhighlights_hdr_WHITESQEXP.jpg} & \includegraphics[width=1.4in]{pano_images/ccm/HouseLightsKitchen_Panorama_8stopsup_recoveredhighlights_hdr_WHITESQEXP_3x3_alt_plus_box.jpg} \\ \small{(a) HDRI Map} & \small{(b) LDR result} \\ \includegraphics[width=1.4in]{pano_images/HouseLightsKitchen_Panorama_3x3_alt_plus_box_MASK.jpg} & \includegraphics[width=1.4in]{pano_images/ccm/HouseLightsKitchen_Panorama_3x3_alt_plus_box_RECOLORED.jpg} \\ \small{(c) saturated regions} & \small{(d) dilated regions} \\ \end{tabular} \vspace{-10pt} \caption{Saturated pixel regions are detected in the HDRI map, and dilated until the pixels no longer saturate.} \label{fig:panos} \end{figure} \begin{figure*}[ht] \vspace{-5pt} \begin{tabular}{ccc} \includegraphics[width=2.in]{results/HouseLights/chloe_8stopsup_real_crop.jpg} & \includegraphics[width=2.in]{results/HouseLights/chloe_vp_no_dilation.jpg} & \includegraphics[width=2.in]{results/HouseLights/chloe_vp_w_dilation.jpg} \\ \small{(a) real environment} & \small{(b) VP clipped LDR IBL} & \small{(c) VP dilated LDR IBL} \\ \includegraphics[width=2.in]{results/SunnyPark/chloe_2stopsup_real.jpg} & \includegraphics[width=2.in]{results/SunnyPark/chloe_vp_no_dilation.jpg} & \includegraphics[width=2.in]{results/SunnyPark/chloe_vp_w_dilation.jpg} \\ \small{(d) real environment} & \small{(e) VP clipped LDR IBL} & \small{(f) VP dilated LDR IBL} \\ \end{tabular} \vspace{-10pt} \caption{(a, d). Subject in a real interior/outdoor environment. (b, e). In an LED stage displaying the clipped HDRI. (c, f). In the LED stage displaying the dilated environment.} \label{fig:people_result} \end{figure*} \begin{figure*}[ht] \vspace{-5pt} \begin{tabular}{ccc} \includegraphics[width=2.in]{results/IBL_LRFlip/HouseLightsKitchen_full_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/HouseLightsKitchen_clipped_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/HouseLightsKitchen_spread_rendering.jpg} \\ \small{(a) original HDRI} & \small{(b) clipped LDR IBL} & \small{(c) dilated LDR IBL} \\ \includegraphics[width=2.in]{results/IBL_LRFlip/SunnyPark_full_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/SunnyPark_clipped_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/SunnyPark_spread_rendering.jpg} \\ \small{(d) original HDRI} & \small{(e) clipped LDR IBL} & \small{(f) dilated LDR IBL} \\ \end{tabular} \vspace{-10pt} \caption{Renderings using: (a, d) HDR IBL; (b, e) clipped LDR IBL; (c, f) dilated LDR IBL.} \label{fig:ibl_result} \end{figure*} Our technique is simple and efficient, leveraging the fact that any area of an image-based lighting environment can be replaced with its average pixel value without changing the total energy of the environment, and changing the direction of the lighting by at most the radius of the area. Our algorithm uses the classic connected components techniques implemented in OpenCV to process the HDRI Map using this process: \begin{enumerate} \item Identify pixels in the HDRI map where one channel exceeds the maximum value displayable on the LED panels, which without loss of generality we will assume to be 1. \item Group these saturated pixels into connected components. \item For each connected component (CC): \begin{enumerate} \item Compute the CC’s average pixel value $\bar{x}$. \item If no channel of $\bar{x}$ exceeds 1, reset the entire CC’s pixel values with $\bar{x}$. \item Else, dilate the perimeter of the CC by one pixel, avoiding intersections with other CC's. \item If any CC’s were dilated in step 3(c), repeat step 3. \end{enumerate} \end{enumerate} In practice, the new $\bar{x}$ values can be computed from the previous ones as a weighted average of the previous $\bar{x}$ and the average value of the pixels added during dilation. Intersections are avoided by intersecting the CC’s pairwise and removing duplicated pixels from one of the regions. If there is more energy in the HDRI map than can be spread evenly across all directions without saturating, then it will become impossible to dilate the regions without intersection, and the algorithm should terminate suggesting that the pixel values in the HDRI map should be attenuated. The average pixel values $\bar{x}$ should be computed with respect to the solid angle subtended by each pixel, which for equirectangular maps is proportional to the cosine of the inclination, $\cos(\phi)$. Fig. \ref{fig:panos} shows this process for an interior HDRI environment. \section{Results} Fig. \ref{fig:panos}(a) shows an HDRI map of a living room with several ceiling lights with pixel values above 1. Fig. \ref{fig:panos}(c) shows the CC's of the clipped areas. Fig. \ref{fig:panos}(d) shows the CC's after dilation, with each colored by the average pixel value of dilated CC, now no longer saturating. Fig. \ref{fig:panos}(b) shows these dilated light source regions rendered back into the original map, forming an LDR result with the same total light energy. Fig. \ref{fig:people_result}(a, d) shows an actor in two real lighting environments (shown at the left and right of Fig. \ref{fig:teaser}). Fig. \ref{fig:people_result}(b, e) shows the actors on a VP stage, lit with a \textit{clipped} LDR IBL corresponding to the environment. Fig. \ref{fig:people_result}(c, f) shows the actors lit by the \textit{dilated} LDR IBL, with an reasonable match to the original lighting, somewhat diffused. Fig. \ref{fig:ibl_result}(a, d) shows a CG scene illuminated by two of the full HDRI environments of Fig. \ref{fig:teaser}(left and right). Fig \ref{fig:ibl_result}(b, e) shows the scene illuminated by the \textit{clipped} LDR environments, with missing illumination. Fig \ref{fig:ibl_result}(c, f) shows the scene illuminated by the \textit{dilated} LDR environments, with softer shadows and highlights but similar appearance to the originals. \section{Discussion and Future Work} Our technique can transform HDRI lighting reasonably accurately into an LDR image as long as the light sources are neither too bright nor too large in the original. While the technique softens shadows and highlights, the overall brightness, color, and directionality of the illumination is maintained. In future work, we would like to modify the technique to address heterogeneous brightness capabilities of the wall and ceiling panels in a VP stage, and to dilate multispectral lighting environments \cite{LeGendre:2016} with more than three LED color channels. \begin{acks} We thank Eyeline Studios, Connie Siu, Lukas Lepicovsky, and Stephan Trojansky for their help displaying our lighting environments in a VP LED stage. \end{acks} \bibliographystyle{ACM-Reference-Format} \section{Background} In a virtual production stage, an actor is surrounded by individually controllable LEDs, built of individual light sources \cite{Debevec:2002} or LED display panels \cite{Hamon:2014}. The popularity of this production technique has been in pursuit of three benefits: 1) To provide an in-camera background behind the actors which can eliminate the need for greenscreen, keying, and compositing; 2) To provide image-based lighting on the actors, illuminating them with images of the environments they are composited into; and 3) To show the actors and crew images of the scene to motivate eyelines and guide camera framing. While current LED panels are effective for in-camera backgrounds and showing images to the case and crew, they often fall short as image-based lighting instruments due to limited dynamic range, making them unable to reproduce the brightness of concentrated light sources in a scene. As a result, cinematographers must typically bring in additional studio lighting to compensate for this missing scene illumination, which adds expense and complexity to a shoot. In this work, we will modify the image-based lighting environment to spread out the energy of concentrated light sources so that the scene illumination can be represented within the dynamic range of typical LED panels. \section{Technique} \begin{figure}[h] \vspace{-5pt} \begin{tabular}{cc} \includegraphics[width=1.4in]{pano_images/ccm/HouseLightsKitchen_Panorama_8stopsup_recoveredhighlights_hdr_WHITESQEXP.jpg} & \includegraphics[width=1.4in]{pano_images/ccm/HouseLightsKitchen_Panorama_8stopsup_recoveredhighlights_hdr_WHITESQEXP_3x3_alt_plus_box.jpg} \\ \small{(a) HDRI Map} & \small{(b) LDR result} \\ \includegraphics[width=1.4in]{pano_images/HouseLightsKitchen_Panorama_3x3_alt_plus_box_MASK.jpg} & \includegraphics[width=1.4in]{pano_images/ccm/HouseLightsKitchen_Panorama_3x3_alt_plus_box_RECOLORED.jpg} \\ \small{(c) saturated regions} & \small{(d) dilated regions} \\ \end{tabular} \vspace{-10pt} \caption{Saturated pixel regions are detected in the HDRI map, and dilated until the pixels no longer saturate.} \label{fig:panos} \end{figure} \begin{figure*}[ht] \vspace{-5pt} \begin{tabular}{ccc} \includegraphics[width=2.in]{results/HouseLights/chloe_8stopsup_real_crop.jpg} & \includegraphics[width=2.in]{results/HouseLights/chloe_vp_no_dilation.jpg} & \includegraphics[width=2.in]{results/HouseLights/chloe_vp_w_dilation.jpg} \\ \small{(a) real environment} & \small{(b) VP clipped LDR IBL} & \small{(c) VP dilated LDR IBL} \\ \includegraphics[width=2.in]{results/SunnyPark/chloe_2stopsup_real.jpg} & \includegraphics[width=2.in]{results/SunnyPark/chloe_vp_no_dilation.jpg} & \includegraphics[width=2.in]{results/SunnyPark/chloe_vp_w_dilation.jpg} \\ \small{(d) real environment} & \small{(e) VP clipped LDR IBL} & \small{(f) VP dilated LDR IBL} \\ \end{tabular} \vspace{-10pt} \caption{(a, d). Subject in a real interior/outdoor environment. (b, e). In an LED stage displaying the clipped HDRI. (c, f). In the LED stage displaying the dilated environment.} \label{fig:people_result} \end{figure*} \begin{figure*}[ht] \vspace{-5pt} \begin{tabular}{ccc} \includegraphics[width=2.in]{results/IBL_LRFlip/HouseLightsKitchen_full_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/HouseLightsKitchen_clipped_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/HouseLightsKitchen_spread_rendering.jpg} \\ \small{(a) original HDRI} & \small{(b) clipped LDR IBL} & \small{(c) dilated LDR IBL} \\ \includegraphics[width=2.in]{results/IBL_LRFlip/SunnyPark_full_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/SunnyPark_clipped_rendering.jpg} & \includegraphics[width=2.in]{results/IBL_LRFlip/SunnyPark_spread_rendering.jpg} \\ \small{(d) original HDRI} & \small{(e) clipped LDR IBL} & \small{(f) dilated LDR IBL} \\ \end{tabular} \vspace{-10pt} \caption{Renderings using: (a, d) HDR IBL; (b, e) clipped LDR IBL; (c, f) dilated LDR IBL.} \label{fig:ibl_result} \end{figure*} Our technique is simple and efficient, leveraging the fact that any area of an image-based lighting environment can be replaced with its average pixel value without changing the total energy of the environment, and changing the direction of the lighting by at most the radius of the area. Our algorithm uses the classic connected components techniques implemented in OpenCV to process the HDRI Map using this process: \begin{enumerate} \item Identify pixels in the HDRI map where one channel exceeds the maximum value displayable on the LED panels, which without loss of generality we will assume to be 1. \item Group these saturated pixels into connected components. \item For each connected component (CC): \begin{enumerate} \item Compute the CC’s average pixel value $\bar{x}$. \item If no channel of $\bar{x}$ exceeds 1, reset the entire CC’s pixel values with $\bar{x}$. \item Else, dilate the perimeter of the CC by one pixel, avoiding intersections with other CC's. \item If any CC’s were dilated in step 3(c), repeat step 3. \end{enumerate} \end{enumerate} In practice, the new $\bar{x}$ values can be computed from the previous ones as a weighted average of the previous $\bar{x}$ and the average value of the pixels added during dilation. Intersections are avoided by intersecting the CC’s pairwise and removing duplicated pixels from one of the regions. If there is more energy in the HDRI map than can be spread evenly across all directions without saturating, then it will become impossible to dilate the regions without intersection, and the algorithm should terminate suggesting that the pixel values in the HDRI map should be attenuated. The average pixel values $\bar{x}$ should be computed with respect to the solid angle subtended by each pixel, which for equirectangular maps is proportional to the cosine of the inclination, $\cos(\phi)$. Fig. \ref{fig:panos} shows this process for an interior HDRI environment. \section{Results} Fig. \ref{fig:panos}(a) shows an HDRI map of a living room with several ceiling lights with pixel values above 1. Fig. \ref{fig:panos}(c) shows the CC's of the clipped areas. Fig. \ref{fig:panos}(d) shows the CC's after dilation, with each colored by the average pixel value of dilated CC, now no longer saturating. Fig. \ref{fig:panos}(b) shows these dilated light source regions rendered back into the original map, forming an LDR result with the same total light energy. Fig. \ref{fig:people_result}(a, d) shows an actor in two real lighting environments (shown at the left and right of Fig. \ref{fig:teaser}). Fig. \ref{fig:people_result}(b, e) shows the actors on a VP stage, lit with a \textit{clipped} LDR IBL corresponding to the environment. Fig. \ref{fig:people_result}(c, f) shows the actors lit by the \textit{dilated} LDR IBL, with an reasonable match to the original lighting, somewhat diffused. Fig. \ref{fig:ibl_result}(a, d) shows a CG scene illuminated by two of the full HDRI environments of Fig. \ref{fig:teaser}(left and right). Fig \ref{fig:ibl_result}(b, e) shows the scene illuminated by the \textit{clipped} LDR environments, with missing illumination. Fig \ref{fig:ibl_result}(c, f) shows the scene illuminated by the \textit{dilated} LDR environments, with softer shadows and highlights but similar appearance to the originals. \section{Discussion and Future Work} Our technique can transform HDRI lighting reasonably accurately into an LDR image as long as the light sources are neither too bright nor too large in the original. While the technique softens shadows and highlights, the overall brightness, color, and directionality of the illumination is maintained. In future work, we would like to modify the technique to address heterogeneous brightness capabilities of the wall and ceiling panels in a VP stage, and to dilate multispectral lighting environments \cite{LeGendre:2016} with more than three LED color channels. \begin{acks} We thank Eyeline Studios, Connie Siu, Lukas Lepicovsky, and Stephan Trojansky for their help displaying our lighting environments in a VP LED stage. \end{acks} \bibliographystyle{ACM-Reference-Format}
\section{Methods} \subsection{Corpora: r/ChangeMyView and LessWrong} Our main corpus is from the Reddit site r/ChangeMyView (r/CMV; \url{https://www.reddit.com/r/changemyview/}). A poster on r/CMV (the ``original poster'', or OP) presents a view that they hold to the rest of the group; the post begins a discussion where other participants present arguments against that point of view, with the goal of changing the OP's mind. The site is actively, and quite strictly, moderated, and provides a well-curated collection of arguments and counter-arguments about a variety of questions, from political policy to moral and ethical questions, and to abstract questions such as the existence of God. The ``good faith'' discussions of r/CMV have proved fertile ground for understanding persuasion; they have been used in studies of evidence-giving~\cite{priniski2018attitude}, language alignment and turn-taking~\cite{entry_order}, and as raw material for machine-learning prediction tasks (\emph{e.g.}, \citeA{Hidey_McKeown_2018}). As with many online systems, readers can upvote (or downvote) comments, but in addition, users are encouraged, where appropriate, to tag a comment with a ``delta'', to indicate that the comment changed their point of view. A recent post on r/CMV, for example, began ``massive companies and local businesses should not be treated the same under the law'', and garnered over a hundred responses in the following six hours.\footnote{See \url{https://bit.ly/cmv_example}} The OP tagged three replies with a ``delta'', indicating that the reply changed their point of view, including a reply that suggested it would be difficult to come up with clear definitions of large vs. small businesses, a reply that large vs. small business were already being treated differently, and a reply that suggested the fix would likely harm, rather than help, the people the OP had in mind. Our final corpus contains 100,170 ``posts'' (\emph{i.e.}, an original post stating a view), and a total of 5,833,572 replies and counter replies to the view; roughly 1\% of the replies are tagged as having changed someone's point of view. We use r/CMV to construct our argument patterns. To study how well our results extrapolate to other communities, we also use data from the discussion site ``LessWrong'' (\url{http://lesswrong.org}). LessWrong is a site associated with the ``rationalist'' community, where users make arguments about questions such as the dangers of artificial intelligence and the relative merits of different economic and political systems. LessWrong does not have r/CMV's delta-tagging system, but it does have an upvote/downvote mechanism that allows us to track how the arguments are perceived by other users. Our LessWrong data contains 25,841 posts, and 708,807 replies. \subsection{Argument Extraction with Linkage Networks} At heart, argument-making is associated with adjusting degrees of belief. To identify argument patterns in an unsupervised fashion, we thus begin with a seed set of words from the widely-used LIWC collection~\cite{pennebaker1999linguistic}: in particular, those from the wordlists ``Tentative'' (\emph{e.g.}, ``likely,'' ``vaguely'') and ``Certain'' (\emph{e.g.}, ``surely,'' ``clearly''). Because these seed words can convey different meanings depending on their adjacent words, we use standard methods~\cite{mikolov-bigrams} on the r/CMV corpus to locate bigrams containing these terms. Our seed list then contains not only a word like ``true'', but also combinations such as ``factually true'', ``necessarily true'', and ``holds true'' that may further signal different styles of approach. With this seed set in hand, we then use an information-theoretic method to find larger patterns of co-occurrence. For each pair of words $w_i$ and $w_j$ in this collection, we use the r/CMV data to measure the ``linkage'', or pointwise mutual information, between them, \begin{equation} L_{ij} = \log_2{\frac{P(w_i,w_j)}{P(w_i)P(w_j)}} \end{equation} where $P(w_i)$ is the probability of drawing word $w_i$ from a random document (r/CMV post) which in our case filtered to only include seed words. $P(w_i,w_j)$ is the probability of drawing $w_i$ and then $w_j$ from a random document, which can be estimated as \begin{equation} P(w_i, w_j) = \frac{1}{|\mathcal{D}|}\sum_{d\in\mathcal{D}}\frac{N(w_i, d)N(w_j,d)}{N(d)^2}, \end{equation} where $N(w_i,d)$ is the number of times word $w_i$ appears in document $d$, and $N(d)$ is the total number of words in document $d$. The linkage $L_{ij}$ measures the extent to which the use of one word predicts the use of another. With argument fragments represented as nodes in our linkage network, we then use Louvain clustering to detect communities of highly interlinked argument fragments based on the criteria of highest modularity~\cite{louvain-algorithm}. Unlike in topic modeling, the number of clusters is free to vary and not set ahead of time. The clusters define the basic patterns of co-occurrence in argument-related words. We then augment our network with candidate words and bigrams from an additional category in LIWC named ``cognitive processes", and from highly-weighted words from an argument-related topic detected through topic modeling of another subreddit, r/TheRedPill (Topic 2 in \citeA{chloe}). To do this, we measure the linkage between each new candidate fragment and the clusters found in the first step, \begin{equation} \label{linkage_cluster} \hat{L}_{kj} = \log_2{\frac{P(C_k,w_j)}{P(C_k)P(w_j)}} = \log_2{\frac{P(C_k | w_j)}{P(C_k)}} \end{equation} where $P(C_k)$ is the probability of drawing a word from cluster $C_k$ from a random document and $P(C_k|w_j)$ is the probability of drawing a word from cluster $C_k$ in random documents conditioned upon containing word $w_j$. This can be estimated as \begin{equation} P(C_k|w_j) = \frac{1}{Z} \sum_{d\in\mathcal{D}_j}\frac{N(C_k, d)N(w_j,d)}{N(d)} \end{equation} where $\mathcal{D}_j$ is a set of documents including word $w_j$, $N(C_k, d)$ is the number of times that a word in $C_k$ appears in document $d$. $N(w_j,d)$ is multiplied to use the information about the frequency of word $w_j$ appearing in document $d$. $Z$ is the normalizing constant for probability. The new $\hat{L}_{kj}$ represents a bipartite network between argument fragments and clusters. To maximize the modularity of this bipartite network, we first maximize the modularity of the network which only includes seed fragments---this involves a few minor changes in the original cluster memberships. Then, for each new candidate fragment, we admit the candidate only if adding the link results in an increase of modularity, assigning it to the cluster $k$ with maximum $\hat{L}_{kj}$. \subsection{Topic Modeling of Semantics} In both r/CMV and LessWrong, we expect that argument patterns will be more or less common---and more or less successful--depending upon the subject matter. A discussion about abortion rights, for example, might hinge on an argument over the definition of ``life'', while a discussion about foreign policy might involve more inductive concerns about the likelihood of success. This is both interesting in its own right, and a source of potentially spurious correlation. It may be the case (for example) that ``definitional'' arguments are more common in abortion debates, but it also may be the case that the underlying moral commitments of the participants make it less likely for people to change their mind compared to less hot-button topics. In order to separate posts into different semantic categories, we build a topic model~\cite{McCallumMALLET} of the texts, after removing argument words; because we are also interested in studying the intersubjective aspect of argument-making, we remove pronouns from this list as well. The resulting topics allow us to classify posts into combinations of different semantic themes; in nearly every case, one theme is dominant, and this enables us to separate out posts to look at the relationship between argument pattern (``pragmatics'') and subject matter (``semantics''). In addition, the topic model allows us to identify, and automatically remove, non-argument topics such as ``meta'' discussion (discussion of the rules of the site, complaints to moderators, and so on) and, in the case of LessWrong, a small component of Harry Potter fan fiction. \section{Results} We report three main results: (1) the nature of the argument patterns discovered by the linkage network method, (2) the relative effectiveness of these patterns in changing a person's view, and (3) the diversity of argument-making preferences at the level of the individual. \subsection{Argument Patterns} The linkage network method ends up allocating a total of 1,506 unigrams and bigrams into six distinct clusters or argument patterns. These six patterns are shown in Table~\ref{linkage_table}. We list sample bigrams from each cluster (these are more interpretable than the unigrams), along with provisional names that characterize the kinds of arguments the bigrams tend to appear in. To help support our provisional naming choices, Table~\ref{examples} provides examples of comments from r/CMV that are heavily-weighted on each pattern. Two of the patterns we find, ``deduction and certainty'' (P3), and ``induction and probability'' (P5), correspond to classic distinctions often made between, on the one hand, arguments based on certainties and definitive truths, amenable to proof and logical deduction, and, on the other, arguments based on relative likelihoods, average cases, and in conditions of potential uncertainty. A third pattern, ``causation and examples'' (P4), includes both causal vocabulary and words associated with example-giving; in both cases, the connection is to modal notions of possibility. Two of the patterns have a strongly intersubjective aspect, resonating with Grice's cooperative maxims~\cite{grice}. ``Relevance and presumption'' (P1) includes arguments where the writer draws attention to, and critiques, the relevance of a point made in an an argument; this includes both direct criticism of assumptions, as well as implicit responses (\emph{e.g.}, ``never said'', as in ``I never said that X [but you assumed so]'') and disagreements about relevance. This is related to the Gricean maxim of relation where it suggests all information should be relevant to the discourse. ``Definitions and clarity'' (P2) includes arguments that attempt to clarify terms, draw distinctions, or critique the definitions already in place (\emph{e.g.}, in the phrase ``trivially true''). Fragments such as ``ambiguous'' and ``vague term'' are directly linked to the Gricean maxim of manner (clarity) that discourages ambiguity in conversations. A final pattern, ``personal and anecdotal'', is commonly associated with evidence provided from a first-person perspective. It includes phrases about what things ``sound like'' or ``look like'', for example, as well as evidence from personal experience. While the ``relevance and presumption'' pattern contains ``never said'', for example, suggesting that an assumption has been (incorrectly) made, this pattern contains ``never felt'', as in ``I never felt that X''. Consistent with this interpretation, this final pattern is the most loaded on the personal pronoun ``I''. Table~\ref{linkage_table} also shows the relative frequency with which an argument pattern appears in a comment in both r/CMV and LessWrong. (We restrict our consideration to comments that have at least one hit in one of the argument patterns, and we eliminate the meta topic.) The two corpora show broad similarities, with ``relevance and presumption'' being the least common pattern and ``personal and anecdotal'' the most common. \begin{table*}[] \centering \begin{tabular}{l|l|c|c} Pattern & Sample Bigrams & r/CMV & LessWrong \\ \hline 1. Relevance \& Presumption & completely irrelevant, fundamentally wrong, never said & 14.4\% & 7.4\% \\% & $\mathbf{-32\%^{\star\star\star}}$ \\ 2. Definitions \& Clarity & defined as, distinction between, clarifying question, don't see & 12.8\% & 15.0\% \\%& $\mathbf{-14\%^{\star\star\star}}$ \\ 3. Deduction \& Certainty & can't prove, objectively true, doesn't change, an opinion & 11.2\% & 18.1\% \\%& $\mathbf{-20\%^{\star\star\star}}$ \\ 4. Causation \& Examples & directly correlated, mainly because, certain contexts & 15.8\% & 15.8\% \\%& $\mathbf{+31\%^{\star\star\star}}$ \\ 5. Induction \& Probability & quite possible, more likely, almost certainly, average person & 16.1\% & 20.7\% \\%& $\mathbf{+12\%^{\star\star\star}}$ \\ 6. Personal \& Anecdotal & seemed like, personal anecdote, never felt, definitely agree & 29.6\% & 23.0\% \\%& $\mathbf{+23\%^{\star\star\star}}$ \\ \end{tabular} \caption{Automatically-extracted argument patterns. Our method finds six clusters, corresponding to distinct argument-making pragmatics such as questioning relevance, discussing definitions, and deductive and certainty-based reasoning. The detected patterns appear at different rates, although in roughly similar rank-order in the two corpora, r/ChangeMyView and LessWrong.} \label{linkage_table} \end{table*} \begin{table*} \begin{tabular}{p{3.25in}|p{3.25in}} {\bf 1. Relevance and Presumption} & {\bf 2. Definitions and Clarity} \\ \hline Murder \textcolor{red}{has nothing} to do with trade. Rape \textcolor{red}{has nothing} to do with trade. Smoking weed \textcolor{red}{has nothing} to do with trade. Speeding \textcolor{red}{has nothing} to do with trade. [...] Each and every one of them is a person doing something against the rules of society. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline It's not \textcolor{red}{supposed to} prevent collusion, that's on the FEC to enforce. Again, if collusion is happening, that is illegal and should be prosecuted. That \textcolor{red}{says nothing} about whether Citizens United was the right decision or not. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline I \textcolor{red}{never said} that nobody else can enjoy it. [...] A straight person can go to a pride festival because they support it and there is \textcolor{red}{absolutely} \textcolor{red}{nothing wrong} with that. & I think it's more valuable to \textcolor{red}{specifically} and \textcolor{red}{explicitly} distinguish between ``racism" and ``systemic racism" at least in common parlance. [...] If you think of it like a Venn diagram, this overlap between the academic and colloquial definitions just \textcolor{yellow}{leads to} \textcolor{red}{ambiguity} in meaning. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline I'm \textcolor{red}{not sure} I follow the point you’re \textcolor{red}{trying to} make. People are \textcolor{red}{obviously} equipped to apply reason to problems---we do so every day, so we are \textcolor{red}{clearly} equipped to do it. We are simply trained not to apply that reason to \textcolor{yellow}{certain} categories of problems like overconsumption. [...] We have the mental equipment, we choose not to use it. That's \textcolor{red}{distinctly different} from not being ``mentally equipped'' to do it. \\ \hline {\bf 3. Deduction and Certainty} & {\bf 4. Causation and Examples} \\ \hline If you do accept that all the \textcolor{red}{facts} were reported on (maybe with bias), then the \textcolor{red}{question becomes} not whether there was information withheld but [...] \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline If I can only be sure of my own perceptions (which is \textcolor{red}{an assumption} in and of itself) and all other \textcolor{red}{evidence} is equally invalid, the pursuit of any knowledge becomes pointless. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline There is different [sic] between claiming something and offering \textcolor{red}{no proof} and claiming something and \textcolor{red}{proving} the opposite is wrong. & That said, different personalities \textcolor{red}{react differently} to the same things. A person who complains about something \textcolor{red}{isn't necessarily} weaker or more sensitive or less \textcolor{red}{confident} in their identity: they are \textcolor{red}{perhaps} more disagreeable and more assertive. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline More broadly, assessing whether something is a ``disability" \textcolor{red}{really depends} on whether it is impacting the particular task domain being \textcolor{red}{considered} [...] how an individual is affected by their autism \textcolor{red}{can vary} \textcolor{yellow}{a lot} \textcolor{red}{depending on} the individual. \\ \hline {\bf 5. Induction and Probability} & {\bf 6. Personal and Anecdotal} \\ \hline Males are at the forefront of a big swath of social dysfunction. If a woman has been beaten or killed, she was \textcolor{red}{most likely} beaten or killed by a man. [...] Men are \textcolor{red}{more likely} to die of suicide. [...] \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline It is very \textcolor{red}{possible} that if we achieved a technological singularity [...] the rate at which we can make new discoveries would accelerate so much that 1000 years of medical research \textcolor{red}{might be} accomplished in 10 years. Is it \textcolor{red}{unlikely} that this will happen? \textcolor{red}{Possibly}. Is it a greater than 0\% \textcolor{red}{possibility} that this will happen? \textcolor{yellow}{Absolutely}. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline The main issue with \textcolor{yellow}{any form} of vigilantism is that there is \textcolor{yellow}{absolutely} \textcolor{red}{no guarantee} or \textcolor{red}{likelihood} that the vigilantes would be any better than the people they replace. & Also, kids learn \textcolor{red}{a lot} through physical interaction. I \textcolor{red}{remember} growing up and playing on merry go rounds and teeter totters. Those gave me, and a ton of other kids, an intuitive understanding of how fulcrums and centripetal force works. We \textcolor{red}{didn't know} what they were called but we knew intuitively that the merry go round would \textcolor{red}{try} to throw us off the faster it went [...] \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline This one \textcolor{red}{feels} far more important to me. People have \textcolor{red}{never been} so interconnected. Information has \textcolor{red}{never} spread as far or as quickly as it does today. This has also \textcolor{yellow}{led} to a decline in other forms of news. \vspace{-0.2cm} \newline \hphantom{} \hspace{-0.3cm} \hrulefill \vspace{-0.1cm} \newline It turns out that it's \textcolor{red}{kind of} challenging to describe in very \textcolor{yellow}{explicit} terms, but I'll \textcolor{red}{try} to at least give a reasonable broad overview of how I personally \textcolor{red}{felt}. \end{tabular} \caption{Examples of the classification in action, using excerpts from comments in r/ChangeMyView. Each comment is dominated by a particular pattern; red words and bigrams are from the dominant pattern, yellow from other patterns. All of these comments received a ``delta'', indicating that the comment changed at least one reader's point of view.\label{examples}} \end{table*} \subsection{Argument Efficacy} Table~\ref{cmv_delta} shows the ``$\Delta$ bonus'', or the relative likelihood that a comment dominated by one of the six argument patterns is tagged as changing a person's point of view in the r/CMV data. Immediately apparent are the large differences in outcome for the different patterns. One of the least successful pattern, ``relevance and presumption'' is 42\% less likely to lead to a (reported) change in someone's point of view, compared to the most successful pattern, ``causation and examples''. These effects persist in both size and direction even when controlling for argument semantics. We can see that (for example) the negative effect associated with questioning relevance persists across discussions as varied as gun control, moral duties to animals and children, race, religion and culture, and sex and gender. (The ``induction and probability'' pattern has the most variability and, in discussions of both race and morality, the usually positive effect disappears, possibly reflecting an aversion to the use of stereotypes about ``likely'' characteristics.) Table~\ref{scores} shows that these patterns extrapolate, to a lesser extent, when considering popularity through upvote/downvote rating. \subsection{A Diversity of Preferences} Our final analysis considers the diversity of preferences at the individual level. Just as there are different types of arguments, we ask, are there different types of argument-makers? For simplicity, and so that each individual's preferences are well-sampled, we restrict to users with at least twenty comments, and calculate each user's average distribution over the six argument patterns. A simple PCA analysis (Table~\ref{factor}) then reveals two main components to user preferences in argument-making. The first component, which explains 67\% of the variance, corresponds to a ``personal--impersonal'' axis; users high on this first component tend to prefer arguments that draw on the ``personal and anecdotal'' pattern. The second component explains 13\% of the variance, and corresponds to a preference for both ``causation and examples'' and ``induction and probability''. We refer to this as the ``concrete--abstract'' axis; users high on this axis prefer reasoning about causes, examples, and relative probabilities as opposed to logical certainties, relevance, or definitions. Most notably, while successful arguments sometimes have a personal aspect (Table~\ref{cmv_delta}), the most successful argument-makers are found in the impersonal-concrete quadrant ($+32\%$ $\Delta$ bonus, compared to $-28\%$ for personal-abstract). The apparent contradiction arises from the fact that we have focused on the argument-makers who achieve repeated success. Personal arguments can often work, but users who are reliably successful often take a more impersonal (and concrete) stance. \section{Discussion} Traditional accounts of argument-making have focused on the inductive-deductive distinction. Our results suggest that, when it comes to pragmatics, psychologically distinct modes of persuasion emerge that go beyond the inductive-deductive distinction, with distinct properties and rates of real-world success. We don't just persuade each other by arguing probabilities. We also try to clarify our definitions, present hypotheticals, speak from personal experience, and make our---or our opponent's---assumptions explicit. This highlights a key, and often-neglected issue in the study of argument making: we argue with another, usually specific, person, and---contrary to normative results such as Aumann's Agreement theorem~\cite{hanson}---our disagreements may not always be about the information to hand, but how, for example, we divide up the space of possibilities. Remarkably, our findings suggest that argument patterns preserve their appeal across different contexts. Questioning relevance is just as unpopular in discussions about sexuality as it is in talk about the politics of crime. First-person testimony---including talk about what one has heard, feels is true, or has personally experienced---is enduringly popular across both communities and in domains, such as physics or AI, where it might seem beside the point. Furthermore, our results provide new insight into the diversity of argument preferences, about which little is currently known~\cite{knauff2021handbook}. Rather than dividing the world into (say) logicians and probabilists, we find a dominant role for preferences along a personal-impersonal axis. The shifting influence of individuals at different points along this axis may help explain recent results in cultural evolution~\cite{Scheffere2107848118}, that report a large-scale shift in discourse from impersonal rationality to a more intuitive and first-personal style. Finally, the fact that our pattern lexicon emerges from the simple LIWC categories of ``tentative'' and ``certain'' shows how common terms can signal distinct, and distinctly-successful forms of argument-making. While unsupervised techniques such as topic modelling have been successful in clustering documents with semantic similarity, potentially pragmatic phrases and patterns are often discarded as stopwords or ``junk'' topics. Simple information-theoretic methods, however, suggests there is far more than meets the eye. \hspace{-0.3cm} \hrulefill \begin{table}[H] \centering \begin{tabular}{l|c|c} & Personal-Impersonal & Concrete-Abstract \\ \hline Relevance & $-0.20$ & $-0.67$ \\ Definitions & $-0.25$ & $-0.25$ \\ Deduction & $-0.42$ & $-0.49$ \\ Causation & $-0.43$ & $\mathbf{+0.51}$ \\ Induction & $-0.29$ & $\mathbf{+0.16}$ \\ Personal & $\mathbf{+0.59}$ & $-0.24$ \end{tabular} \caption{Primary factors in argument-making preferences; factor loadings from a PCA analysis of the 22,493 participants from r/CMV with at least twenty comments.} \label{factor} \end{table} \begin{table*} \begin{tabular}{l|l|l|l|l|l|l|l} (r/CMV topic) & P($\Delta$) (\%) & Relevance & Definitions & Deduction & Causation & Induction & Personal \\ \hline [all] & $1.35$ & $\mathbf{-19.4\%^{\star\star\star}}$ & $\mathbf{-18.5\%^{\star\star\star}}$ & $\mathbf{-20.2\%^{\star\star\star}}$ & $\mathbf{+23.0\%^{\star\star\star}}$ & $\mathbf{+15.4\%^{\star\star\star}}$ & $\mathbf{+19.7\%^{\star\star\star}}$ \\ \hline black-white-culture & $1.04$ & $\mathbf{-24.6\%^{\star\star\star}}$ & $\textcolor{gray}{-9.9\%}$ & $\mathbf{-21.2\%^{\star\star\star}}$ & $\mathbf{+35.2\%^{\star\star\star}}$ & $\textcolor{gray}{+5.0\%}$ & $\mathbf{+15.5\%^{\star\star\star}}$ \\ man-sex-child & $1.18$ & $\mathbf{-21.8\%^{\star\star\star}}$ & $\mathbf{-13.3\%^{\star\star\star}}$ & $\mathbf{-27.4\%^{\star\star\star}}$ & $\mathbf{+28.2\%^{\star\star\star}}$ & $\mathbf{+9.7\%^{\star\star}}$ & $\mathbf{+24.7\%^{\star\star\star}}$ \\ country-war-power & $1.26$ & $\mathbf{-15.2\%^{\star\star\star}}$ & $\mathbf{-17.1\%^{\star\star\star}}$ & $\mathbf{-23.7\%^{\star\star\star}}$ & $\mathbf{+21.9\%^{\star\star\star}}$ & $\mathbf{+19.7\%^{\star\star\star}}$ & $\mathbf{+14.5\%^{\star\star\star}}$ \\ god-music-art & $1.74$ & $\mathbf{-14.5\%^{\star\star\star}}$ & $\mathbf{-17.7\%^{\star\star\star}}$ & $\mathbf{-24.5\%^{\star\star\star}}$ & $\mathbf{+20.8\%^{\star\star\star}}$ & $\mathbf{+9.3\%^{\star\star\star}}$ & $\mathbf{+26.6\%^{\star\star\star}}$ \\ food-animals-eat & $1.70$ & $\mathbf{-15.7\%^{\star\star\star}}$ & $\mathbf{-19.2\%^{\star\star\star}}$ & $\mathbf{-22.9\%^{\star\star\star}}$ & $\mathbf{+22.3\%^{\star\star\star}}$ & $\mathbf{+18.8\%^{\star\star\star}}$ & $\mathbf{+16.8\%^{\star\star\star}}$ \\ law-rape-legal & $1.21$ & $\mathbf{-24.2\%^{\star\star\star}}$ & $\mathbf{-16.9\%^{\star\star\star}}$ & $\mathbf{-13.9\%^{\star\star\star}}$ & $\mathbf{+20.2\%^{\star\star\star}}$ & $\mathbf{+20.4\%^{\star\star\star}}$ & $\mathbf{+14.4\%^{\star\star\star}}$ \\ human-moral-exist & $1.19$ & $\mathbf{-14.5\%^{\star\star}}$ & $\mathbf{-20.3\%^{\star\star\star}}$ & $\textcolor{gray}{-1.1\%}$ & $\mathbf{+18.5\%^{\star\star\star}}$ & $\textcolor{gray}{+8.5\%}$ & $\mathbf{+8.9\%^{\star}}$ \\ pay-job-vote & $1.26$ & $\mathbf{-20.6\%^{\star\star\star}}$ & $\mathbf{-19.4\%^{\star\star\star}}$ & $\mathbf{-19.9\%^{\star\star}}$ & $\mathbf{+27.2\%^{\star\star\star}}$ & $\mathbf{+20.9\%^{\star\star\star}}$ & $\mathbf{+11.7\%^{\star\star\star}}$ \\ school-education-high & $1.61$ & $\mathbf{-20.2\%^{\star\star\star}}$ & $\mathbf{-24.8\%^{\star\star\star}}$ & $\mathbf{-12.8\%^{\star\star}}$ & $\mathbf{+19.2\%^{\star\star\star}}$ & $\mathbf{+13.1\%^{\star\star}}$ & $\mathbf{+25.4\%^{\star\star\star}}$ \\ \end{tabular} \caption{The $\Delta$ bonus for different argument patterns, as a function of semantic context, in r/CMV. $\Delta$ bounus is the percentage increase (or decrease) in probability that a comment received a ``changed my view'' tag in r/CMV. In each case we show the percentage increase (or decrease) in probability that a comment received a ``changed my view'' tag. Semantics are labelled by the top three words in the topic model and correspond to intuitive themes (\emph{e.g.}, posts in the ``gun-crime-violence'' topic include arguments about crime and gun control.) Error bars are small (less than $\pm 0.1$ percentage points in most cases) and are not shown for clarity. $p$-value labels are for differences between outcomes controlling for semantics (\emph{e.g.}, ``relevance'' performs significantly worse in discussions under the gun-crime-violence topic, compared to the average outcome for the six patterns in that topic.). $\star$ indicates $p<0.05$; $\star\star$, $p<0.01$; $\star\star\star$, $p<10^{-3}$. \label{cmv_delta}} \end{table*} \begin{table*} \begin{tabular}{c} \begin{tabular}{p{3.25cm}|l|l|l|l|l|l|l} (r/CMV) & Average Score & Relevance & Definitions & Deduction & Causality & Induction & Personal \\ \hline all & $2.84$ & $\mathbf{-0.10^{\star\star\star}}$ & $\mathbf{-0.14^{\star\star\star}}$ & $\mathbf{-0.24^{\star\star\star}}$ & $\mathbf{+0.19^{\star\star\star}}$ & $\textcolor{gray}{-0.01}$ & $\mathbf{+0.29^{\star\star\star}}$ \\ \hline black-white-culture & $2.70$ & $\mathbf{-0.18^{\star\star}}$ & $\mathbf{-0.19^{\star\star\star}}$ & $\mathbf{-0.21^{\star\star}}$ & $\mathbf{+0.22^{\star\star}}$ & $\textcolor{gray}{+0.01}$ & $\mathbf{+0.25^{\star\star}}$ \\ man-sex-child & $3.08$ & $\mathbf{-0.19^{\star\star\star}}$ & $\mathbf{-0.15^{\star\star\star}}$ & $\mathbf{-0.29^{\star\star\star}}$ & $\mathbf{+0.27^{\star\star\star}}$ & $\textcolor{gray}{0.0}$ & $\mathbf{+0.36^{\star\star\star}}$ \\ country-war-power & $2.91$ & $\textcolor{gray}{-0.07}$ & $\mathbf{-0.13^{\star}}$ & $\mathbf{-0.31^{\star\star\star}}$ & $\mathbf{+0.18^{\star}}$ & $\textcolor{gray}{+0.03}$ & $\mathbf{+0.3^{\star\star\star}}$ \\ god-music-art & $3.12$ & $\textcolor{gray}{-0.03}$ & $\mathbf{-0.13^{\star}}$ & $\mathbf{-0.32^{\star\star\star}}$ & $\textcolor{gray}{-0.08}$ & $\textcolor{gray}{+0.02}$ & $\mathbf{+0.41^{\star\star\star}}$ \\ food-animals-eat & $3.00$ & $\textcolor{gray}{-0.05}$ & $\textcolor{gray}{-0.11}$ & $\mathbf{-0.35^{\star\star\star}}$ & $\mathbf{+0.21^{\star\star}}$ & $\textcolor{gray}{-0.08}$ & $\mathbf{+0.38^{\star\star\star}}$ \\ law-rape-legal & $2.69$ & $\textcolor{gray}{-0.1}$ & $\mathbf{-0.19^{\star\star\star}}$ & $\textcolor{gray}{-0.04}$ & $\mathbf{+0.11^{\star}}$ & $\textcolor{gray}{+0.05}$ & $\mathbf{+0.17^{\star\star\star}}$ \\ human-moral-exist & $2.17$ & $\textcolor{gray}{+0.01}$ & $\mathbf{-0.12^{\star\star}}$ & $\mathbf{-0.13^{\star\star}}$ & $\mathbf{+0.15^{\star\star}}$ & $\textcolor{gray}{-0.01}$ & $\mathbf{+0.1^{\star}}$ \\ pay-job-vote & $2.66$ & $\mathbf{-0.08^{\star}}$ & $\textcolor{gray}{-0.08}$ & $\mathbf{-0.23^{\star\star\star}}$ & $\mathbf{+0.22^{\star\star\star}}$ & $\textcolor{gray}{+0.02}$ & $\mathbf{+0.15^{\star\star\star}}$ \\ school-education-high & $2.85$ & $\mathbf{-0.16^{\star}}$ & $\mathbf{-0.18^{\star\star\star}}$ & $\textcolor{gray}{-0.03}$ & $\mathbf{+0.22^{\star\star}}$ & $\textcolor{gray}{-0.01}$ & $\mathbf{+0.16^{\star\star}}$ \\ \end{tabular} \\ \\ \begin{tabular}{p{3.25cm}|l|l|l|l|l|l|l} (LessWrong) & Average Score & Relevance & Definitions & Deduction & Causality & Induction & Personal \\ \hline all & $3.53$ & $\textcolor{gray}{+0.02}$ & $\mathbf{-0.11^{\star\star\star}}$ & $\mathbf{-0.17^{\star\star\star}}$ & $\mathbf{+0.09^{\star\star}}$ & $\mathbf{-0.37^{\star\star\star}}$ & $\mathbf{+0.54^{\star\star\star}}$\\ \hline utility-function-agent & $2.36$ & $\textcolor{gray}{-0.07}$ & $\textcolor{gray}{-0.05}$ & $\textcolor{gray}{+0.03}$ & $\textcolor{gray}{-0.08}$ & $\textcolor{gray}{-0.06}$ & $\mathbf{+0.23^{\star\star\star}}$ \\ universe-brain-physics & $2.89$ & $\textcolor{gray}{+0.2}$& $\mathbf{-0.14^{\star}}$ & $\textcolor{gray}{+0.04}$ & $\textcolor{gray}{-0.06}$ & $\mathbf{-0.32^{\star\star\star}}$ & $\mathbf{+0.29^{\star\star\star}}$ \\ money-years-risk & $3.81$ & $\textcolor{gray}{-0.13}$ & $\textcolor{gray}{-0.04}$ & $\mathbf{+0.16^{\star\star}}$ & $\textcolor{gray}{-0.01}$ & $\mathbf{-0.16^{\star\star}}$ & $\mathbf{+0.19^{\star\star\star}}$ \\ person-moral-bad & $4.23$ & $\textcolor{gray}{+0.1}$ & $\mathbf{-0.19^{\star\star\star}}$ & $\mathbf{-0.22^{\star\star\star}}$ & $\textcolor{gray}{0.0}$ & $\mathbf{-0.3^{\star\star\star}}$ & $\mathbf{+0.61^{\star\star\star}}$ \\ ai-humans-intelligence & $3.13$ & $\textcolor{gray}{-0.15}$ & $\textcolor{gray}{0.0}$ & $\textcolor{gray}{-0.04}$ & $\textcolor{gray}{-0.12}$ & $\textcolor{gray}{-0.01}$ & $\mathbf{+0.32^{\star\star\star}}$ \\ \end{tabular} \\ \\ \end{tabular} \caption{LessWrong and r/CMV score bonus for different argument pragmatics, as a function of semantic context. In each case we show the change in the number of upvotes on comments, conditional upon semantics, associated with domination by one argument pattern over another. Paralleling the case of the r/CMV $\Delta$-bonus result, we see large and significant differences in the overall rating of posts containing different argument patterns, which are largely stable in direction across semantic contexts. ``Personal and Anecdotal'' is strongly preferred in every context. While the argument patterns that convince tend to be the ones that others upvote, we see occasional divergences between upvoting and view-changing: for example, inductive and probabilistic arguments are more likely to receive a delta compared to baseline, but are not significantly upvoted. Differences also emerge between r/CMV and LessWrong, most notably in the latter's bias against inductive arguments, and tolerance of debates over relevance.\label{scores}} \end{table*} \clearpage \section{Acknowledgements} We thank Paul Smaldino, Ben Hoffmann, and our three anonymous referees for helpful feedback. R.W.N.\ and S.D.\ were supported in part by the National Science Foundation under Grant No.\ SES-1948887, and by the Survival and Flourishing Fund. \bibliographystyle{apacite} \setlength{\bibleftmargin}{.125in} \setlength{\bibindent}{-\bibleftmargin}
\section{Introduction} Artificial intelligence-based perception (AIP) using deep neural networks (DNN) has achieved remarkable performance. Yet as news reports can attest, AIP~can fail in surprising and catastrophic ways. This highlights the fact that, currently, the level of safety assurance possible for AIP~is insufficient to support the high levels of autonomy required for fully automated driving systems (ADS). In contrast, although human perception is imperfect, a status quo assumption by society is that the perception performance of a mature, unimpaired human is sufficient for the safe operation of a vehicle. Thus, achieving and assuring AIP~performance against a human baseline would be necessary for a societally acceptable ADS and therefore a worthy goal. In this paper, we take the position that this goal can be approached by studying how humans do perception and using this to construct a corresponding human-inspired AIP~architecture. The idea of using humans as inspiration for AIP~is not new. Many of the techniques of AI are based on human psychology or neurophysiology and this trend has accelerated in recent times (e.g., ~\cite{suchan2021commonsense,malowany2020biologically, yildirim2020efficient}). Instead, our focus is specifically on how to use the connection to humans to support the goal of \emph{safety and its assurance}. To investigate this concretely, we consider the basic perception task of \emph{object image classification}: does an image X depict a member of a given class C? We show that a human-inspired AIP~architecture for this task can assurably address key limitations of current DNN-based AIP~approaches while still leveraging the strengths of DNNs. The remainder of the paper is structured according the following contributions: 1) we review research from the cognitive sciences on human object image classification; 2) we present a safe AIP~architecture aligned with this work; and 3) we provide justification for the architecture from various perspectives including feasibility and assurability. Finally, we give conclusions. \section{How Humans (Probably) Do Classification} In this section, we review research from the cognitive sciences relevant to how humans do object image classification. \subsection{Dual Process Models}\label{sec:dual} In the cognitive sciences, a \emph{dual process} model of cognition is the dominant view~\cite{epstein1994integration,kahneman2011thinking,evans2013dual}. Type 1 thinking is fast, non-conscious holistic, intuitive, and the same across different individuals. Type 2 thinking is slow, conscious, sequential conceptual reasoning that varies across individuals and is correlated with intelligence measures. The dominant view on how the two types interact is \emph{default-interventionism}~\cite{kahneman2011thinking,evans2013dual}: the Type 1 process always produces some default response quickly, and the Type 2 process intervenes to produce a potentially different response only if ``difficulty, novelty, and motivation combine to command the resources of working memory''~\cite{evans2013dual}. The Type 1 default response may be wrong---humans often act as ``cognitive misers'' by substituting a less accurate easy-to-evaluate characteristic for a harder one, leading to biases (e.g., stereotyping). An important metacognitive factor is the level of ``confidence'' in the default response. When people are confident, they are less likely to invoke the Type 2 process~\cite{thompson2011intuition}. Thus, low confidence is a key triggering factor for Type 2 intervention. Time and risk play important roles. For fast (Type 1) binary perceptual decisions (less than 1,500\,ms), research supports the idea that evidence accumulates over time until a threshold is reached and a decision is made. In addition, there is a speed/accuracy tradeoff. If speed is a priority then accuracy may be lower, while a focus on high accuracy slows the decision (e.g.,~\cite{ratcliff2008diffusion}). A natural criterion for choosing the priority is the perceived risk associated with the decision. Safety-critical decisions that must be made quickly, e.g., an object appears suddenly in front of the vehicle, prioritize speed. In this case, accuracy may suffer, and Type 2 intervention is not an option, because it is slow. This suggests that even inaccurate Type 1 decisions should be appropriately conservative to manage risk. For example, if there is not enough time to determine whether the object that suddenly appeared is a pedestrian or a cyclist, a safe response may be to assume that it is a pedestrian, since this suggests a more conservative behaviour. Although this risk managing approach to Type 1 classification seems intuitive and prudent, it is difficult to support from research. The research on time pressure and human decision risk is focused on gambling contexts where it has been observed that when time pressure forces Type 1 decisions, these may be riskier decisions than if more time was available (e.g., ~\cite{madan2015rapid}). Since the risk in gambling contexts is measured in monetary terms, it is not clear how well these results transfer to fast safety-critical decision making. A related well-researched area is the ``choking-under-pressure'' phenomenon exhibited by humans in high-stakes situations such as sporting events~\cite{yu2015choking}. One explanation proposed for this is that pressure induces people to consciously monitor their behaviour causing a switch from automatic and efficient (Type 1) behaviour to a slower controlled (Type 2) behaviour~\cite{baumeister1984choking}. \subsection{Object Image Classification} Specific to the object image classification task, two prominent lines of research from different perspectives are \emph{object recognition}, studied in the neuropsychology of vision~\cite{dicarlo2012does}, and \emph{object categorization}, studied predominately in cognitive psychology and cognitive linguistics~\cite{goldstone2018categorization}. Object recognition concerns the ability to assign labels to particular objects sensed by the retina, including precise identifying labels and coarser category labels. Object categorization is the more general cognitive process of grouping objects based on similar or shared features~\cite{goldstone2018categorization}. Note that the term ``categorization'' used in the cognitive sciences is synonymous with ``classification'' as used in AI contexts. Vision processing in the brain has two major streams: the ventral stream is responsible for object recognition, whereas the dorsal stream is responsible for visually guided action. Recent research provides strong evidence that some Type 1 representation of a category is already in the ventral stream, expressed in terms of visual features, even though it is ultimately coded using more abstract (i.e., conceptual) features (Type 2) in downstream parts of the brain~\cite{bracci2017partnership}. The categorization in the ventral stream is fast, with a response time as little as 250-290\,ms for some categories, confirmed by multiple studies~\cite{fabre2011characteristics}. Humans are effective at recognizing objects under different confounding visual conditions, such as varying positions to the object, lighting, context, occlusion, etc. A key function of the ventral stream is to facilitate this ability by \emph{transforming object images into representations invariant to these conditions} before further processing to categorize the object~\cite{dicarlo2012does}. Two theories dominate regarding the form of the invariant object representation. The structural description theory~\cite{biederman1987recognition} proposes a 3D parts-based representation, while in the view-based theory~\cite{poggio1990network}, objects are represented as a combination of a small set of particular 2D views that can be transformed to represent any other view. In this paper, we will refer to the transformation of an object image to an invariant representation as \emph{object normalization}. Although object categorization can be seen to be part of object recognition, the research tradition in this area is focused on theories about \emph{concepts} --- the mental representation of a category. As such it is applicable to both Type 1 and Type 2 processes. The classical \emph{rule-based} theory of concepts extending back to Greek philosophers is that they consist of the necessary and sufficient conditions for membership in the category. This view has been much critiqued. For example, Wittgenstein observed that the requirement for a set of necessary conditions often does not hold due to presence of exceptions and famously illustrated this by attempting to find the necessary conditions for the category ``game''. It is also inconsistent with empirical evidence obtained by Rosch~\cite{rosch1973natural} that categories are graded, with some members more central or typical than others, having more of the common features. This led Rosch to propose that concepts are \emph{prototype-based} with membership determined by degree of similarity to the prototype. Another dominant proposal supported by empirical evidence is that concepts are \emph{exemplar-based}~\cite{medin1978context}, where exemplars are specifically remembered examples of the category and membership is determined by collective similarity to all exemplars. Each approach has its strengths and weakness and more recently, the accepted view is that all of these approaches may be used in some combination~\cite{murphy2016there}. Both the prototype and exemplar approaches to object categorization depend on \emph{similarity judgement} to compare the observed object image with stored representations. Research on human similarity judgement is extensive (See~\cite{goldstone2012similarity} for a review). Four basic approaches have been proposed: \emph{geometric} using a distance measure in a continuous space, \emph{feature-based} aggregating the number of shared discrete features, \emph{alignment-based} extending the feature-based approach to include relations (e.g., part-of) between features, and \emph{transformation-based} based on the effort needed to transform one image into another. \begin{figure*} \centering \includegraphics[width=0.7\textwidth]{hidual_cropped.pdf} \caption{Human inspired classification activity diagram.} \label{fig:hidual} \end{figure*} \section{An Assurable Human-Inspired Classification Architecture} Inspired by the research on object classification by humans presented above, in this section, we propose the high-level dual process architecture for classification shown in Fig.~\ref{fig:hidual}. Here, we assume that the fast Type 1 processes are carried out by DNNs, while slower Type 2 processes use reasoning with symbolic AI. The input to the system is an object image from an upstream process (e.g., the first stage of an object detector). In alignment with processing in the ventral stream, the first step is object normalization to eliminate the confounding effects of visual conditions. Then, a DNN-based classifier of the invariant object representation generates a classification based on visual features. We assume that these classifiers use prototype/exemplar methods to align with the human representations of concepts. Furthermore, we assume they measure confidence in their classification decision. If the result produced by fast classifiers is inadequate (e.g., too low confidence) and if there is available time, then a reasoning process can intervene to attempt to improve the result by exploiting conceptual knowledge about object classes. The reasoning process considers alternative classification hypotheses, then generates perceptual queries of the invariant object representation that could provide evidence to affirm or refute a hypothesis. We assume that these queries have yes/no answers and can all be viewed as classification problems\footnote{We limit the queries for simplicity, but more general Type 1 queries are be possible as well.}; thus, we ground the Type 2 reasoning process in the Type 1 perceptual process~\cite{harnad1990symbol}. Note that the a query is a recursive invocation (as indicated by the dashed arrows), since if the Type 1 process does not adequately answer a query, a Type 2 reasoning process can be invoked to intervene on it, and so on. Overall, the more time spent reasoning, the more this process can improve the quality of the classification by generating more potential hypotheses and by obtaining more evidence for hypotheses. \subsection{The Necessity of Dual Processes} We may reasonably ask whether the additional complexity of a dual process approach to classification is really necessary. After all, a DNN is a universal approximator and with sufficient training examples, it should get arbitrarily accurate. However, we argue that a pure DNN approach is intrinsically limited. The classes of objects, such as, pedestrian, cyclist and car, that are relevant for perception by an ADS have the crucial characteristic that they are not primarily determined by visual features but rather by conceptual features. For example, something is a cyclist not because of how it looks (visual features), but because it exhibits conceptual features such as having one or more wheels, carrying human rider(s), being propelled by rider effort, etc. Assessing the presence of these features definitively may require arbitrary amounts of reasoning. This suggests that visual features are insufficient to correctly characterize these classes, and thus, a DNN trained on object images alone \emph{cannot ever achieve perfect accuracy, regardless of how many training examples are provided}. However, having a similar visual appearance for certain subsets of class instances is a common occurrence. This could be due to genetics (for ``natural kinds''), design or fashion. For example, cyclists on bicycles have visual similarity but look different from cyclists on recumbent cycles who are visually similar to each other. When such clustering according to visual similarity is available, visual feature-based classifiers are useful approximators for these subclasses of instances. But even here, their performance is intrinsically limited as illustrated in Fig.~\ref{fig:FNFP}. It is always possible to find false negatives (FN)---unusual cyclists that fit the conceptual description but not the visual. On the other hand, we can also always find images that look like cyclists, but on careful inspection, do not satisfy the conceptual description, yielding false positives (FP). Despite the inaccuracies of visual-feature based classifiers, the benefit is that they may be fast in comparison to a classifier based on reasoning about conceptual features. Thus, when a safety critical decision must be made quickly, a visual-feature based classifier is preferable. This suggests that an optimal classifier strategy should follow a dual approach, leveraging visual features for speed and conceptual features for accuracy when the time is available. To further refine this conclusion, we must address an apparent paradox. The architecture in Fig.~\ref{fig:hidual} shows that conceptual reasoning must ultimately be grounded in visual features (or, more generally, in features of available sense modalities). This is because evidence to support conceptual hypotheses about objects in the world can only be obtained through visual means---there is no way to directly access knowledge about these objects. Thus, all reasoning about conceptual features must be reducible to reasoning about visual features. However, if this is the case, then it would seem that \emph{visual features alone must be enough} to characterize these classes, even if they are internally encoded in terms of conceptual features. The way out of this apparent paradox is to acknowledge that, while individual queries about the object image issued by a Type 2 classifier are ultimately answered using visual features, each such query appeals to potentially different visual features and the scope of such queries is limited only by the size of the knowledge base. In contrast, the set of visual features used by a Type 1 classifier for a specific class is much smaller, focused on that class only. For example, if a bicycle is decorated with flowers attached to the frame, these may create enough of a visual distortion to cause an FP in a Type 1 cyclist classifier. However, the Type 2 conceptual reasoning process can potentially identify the presence of flowers (using a Type 1 flower classifier) and conclude that these do not affect the satisfaction of the conceptual definition of cyclist. In this case, it is unlikely that the Type 1 cyclist classifier could ever learn to draw this conclusion because it would need to develop sensitivity to visual features about flowers. More generally, it would need to handle the visual features for every class in the knowledge base that could ever co-occur with a cyclist, which is likely to include most of the knowledge base. The dual process approach solves this scalability problem by delegating the job of ranging over the full span of world knowledge needed in the many varied, but rarer cases, to Type 2 classification and keeping Type 1 classification focused on typical class features. \begin{figure} \centering \includegraphics[width=0.45\textwidth]{FNFP_cropped.pdf} \caption{Visual feature based classifiers are intrinsically limited.} \label{fig:FNFP} \end{figure} \subsection{Addressing Safety} We assume that the safety requirements of an object classification subsystem are refined from system level (e.g., ADS) safety requirements (see~\cite{salay2021missing} for a schema of such a refinement). This refinement identifies specific performance requirements of the subsystem needed to address different potential hazard scenarios. Since these requirements are system specific, for our proposed high-level architecture we instead consider the general implications of the high-level requirement that the subsystem provides performance at least as good as humans. In particular, the following three requirements are relevant and follow from the review of human classification. \begin{myreq}\label{req:typical} The classification subsystem shall support accurate classification for both typical and atypical inputs. \end{myreq} Humans are able to effectively address both these types of inputs, and while it is well-known that DNN-based classifiers can achieve high accuracy on typical cases, they can often fail on unusual cases. As argued in the previous section, this is because DNN classifiers use visual features and these are only sufficient for characterizing subsets of class instances that cluster on visual similarity. These clusters identify visually prototypical class instances. However these only approximate the true class described by conceptual features, leading to both FNs and FPs for atypical cases. To correct these inevitable misperceptions by Type 1 classifiers, the architecture uses a Type 2 classifier based on conceptual reasoning. The decision on when to invoke the Type 2 classifier is a crucial part of the architecture (i.e., the ``good enough'' decision in Fig.~\ref{fig:hidual}). One signal relevant here is a measure of the uncertainty (or conversely, confidence) in the Type 1 classifier result. Assume the Type 1 classification process produces a categorical distribution $P(c)$ across classes and that this is \emph{calibrated}--- i.e., the value $P(c)$ for an input image accurately reflects the actual probability that $c$ is the correct class of the image. A true positive (TP) classification corresponds to sharp distribution with one class having high probability and the others low. A distribution close to uniform probability indicates high uncertainty and a potential FN representing a visually atypical instance (Fig.~\ref{fig:FNFP}, top). A distribution in which a few classes dominate also represents higher uncertainty indicating atypical visual ambiguity and could signal a potential FP. For example, the bottom right example in Fig.~\ref{fig:FNFP} could have highest probability for Cyclist (causing an FP) but with the probability of Pedestrian a close second. A limitation of this approach for detecting FPs is that it may require a large number of classes. For example, the bottom left example in Fig.~\ref{fig:FNFP} would only be caught if there was a class BicycleRide. \begin{myreq}\label{req:speed} The classification subsystem shall support classification for both fast and slow safety-critical decisions. \end{myreq} This requirement acknowledges that safety-critical decisions may occur over different time-frames. For example, an object appearing suddenly ahead of the ADS requires a fast response, whereas an object causing a traffic slowdown ahead allows for a slower response. When fast classification is required, the architecture assumes that this is provided by the Type 1 process alone, since Type 2 processes are too slow. For typical cases, this can provide assurably high levels of accuracy. A limitation of the architecture is that atypical cases may be misclassified by the Type 1 classifier and this can be a safety hazard in some situations. Uncertainty measurement of the Type 1 result, as discussed above, may play a mitigating role here by signaling to the driving policy when the classification may be incorrect and a conservative action should be taken to minimize risk. In~\cite{salay2020purss}, a systematic way to approach this with a quantifiable safety guarantee is proposed. A \emph{credible set} of $P(c)$ with confidence $\alpha$, is a smallest subset of classes such that their cumulative probability is not less than $\alpha$. Because the classifier is calibrated, the true class is in the credible set with probability at least $\alpha$. Thus, if the Type 1 classifier sends the credible set as its result to the driving policy, any action it produces that is safe for all the classes in the set will be safe at least $\alpha\times 100$\% of the time. For example, consider the bottom right image of a person walking their bicycle in Fig.~\ref{fig:FNFP}. Assume the Type 1 classifier returns the categorical distribution $\{$Cyclist:$0.55$, Pedestrian:$0.40$, Car:$0.05\}$. Simply selecting the class with the maximum probability would make the result Cyclist, but this is an FP---the true class is Pedestrian. However, we can be 95\% sure that the true class is one of $\{$Cyclist, Pedestrian$\}$, which is the credible set for $\alpha=0.95$. If the driving policy chooses an action that is safe for both classes in this set, it will be safe at least 95\% of the time. The cost is a potentially overly conservative action. A limitation of this approach is that it requires there to exist an action that is safe for every class in the credible set, which may not always be the case. \begin{myreq}\label{req:visual} The classification subsystem shall support accurate classification in the presence of confounding visual conditions within the range tolerated by humans. \end{myreq} Humans are effective at ignoring conditions such as varying positions to the object, lighting, context, occlusion, etc. However, these kinds of variations have proven to be challenging for DNN-based classifiers and are the basis for many kinds of adversarial attacks. The architecture addresses this issue by introducing the object normalizer. The Type 1 classifiers operate on the invariant representation in which the confounding effects are mostly removed. However, since the impact of confounding visual conditions is to introduce aleatoric uncertainty into the image, the effectiveness of object normalization and subsequent classification is ultimately limited by the amount of aleatoric uncertainty present. For example, a certain amount of lighting variation can be removed, but as the light gets lower, information loss increases until it is too great to discern the object in the image. There is, therefore, a limited range of tolerable visual conditions for both humans and machines. We require that the object normalizer + classifier combination operate at least within the human range. Methods for eliciting formal requirements representing such human-tolerable ranges have been recently proposed~\cite{hu2020towards, hu22}. \subsection{Type 1/Type 2 Consistency} We should expect that some \emph{consistency} relation holds between the Type 1 and Type 2 classifications, but what should it be? As discussed above, the Type 1 classification based on visual features is inherently limited---it may achieve high accuracy for typical cases but often produces FNs and FPs for atypical cases. Furthermore, recall that for humans, the interaction between the Type 1 and Type 2 processes is not a decision fusion of redundant perceptual processes, but rather that the Type 2 process intervenes to improve on the Type 1 result when necessary and possible. This relationship is inherited by the proposed architecture. Thus, the Type 2 classification is considered both to be \emph{authoritative} and it must be \emph{no worse} than the Type 1 classification. The latter condition suggests that when Type 1 is TP, then so must Type 2, but when Type 1 is FN or FP, Type 2 may be the same or TP. Note that we do not assume the Type 2 classification is necessarily always TP even though it is considered authoritative, since its accuracy is still limited when excessive aleatoric uncertainty is present. Furthermore, the degree of improvement over the Type 1 classification is limited by the reasoning time available, richness and correctness of the conceptual knowledge base and accuracy of the Type 1 classifiers used to answer queries. Until now we have been discussing the kind of \emph{classification consistency} that must hold between the Type 1 and Type 2 classification. Another kind of consistency is \emph{risk consistency}---how is the safety of the classifications related? If we assume that a correct classification is always at least as safe (i.e., leads to a driving policy action that is not more hazardous) as a misclassification, then our classification consistency requirement implies that, when time is not a safety-critical factor, the Type 2 classification is always at least as safe as the Type 1 classification. However, not all misclassifications are unsafe. For example, misclassifying a pedestrian as a cyclist, when it is still far ahead, may not lead to different behaviour by an ADS. Thus, the hazardousness of a given misclassification is situation-dependent. Can this fact be exploited to produce a stronger risk consistency requirement? In an assurance case, a fine-grained analysis of hazardous patterns of misperceptions relevant in different driving scenarios can provide a correspondingly fine-grained and risk-aware set of performance requirements for the Type 1 classifiers~\cite{salay2021missing}. Such a set of requirements identify the kinds of images that are more likely to cause hazardous actions if misclassified, thus the training of Type 1 classifiers can focus more on these. Another approach to stronger risk consistency is based on the credible set approach to representing uncertainty discussed above. If a Type 1 classifier produces the credible set for a required level of confidence $\alpha$ as output, then even though uncertainty is present, a driving policy can still perform a safe action, if one exists. In limited operational design domains, it may be possible to show that a safe action exists in every situation for any subset of classes. Thus, in such a restricted context we can satisfy the following additional risk consistency condition: the Type 1 classification will always be as safe as the Type 2 classification $\alpha\times 100\%$ of the time. Note that, even here, a Type 2 classification is still preferable when time permits because the action based on an uncertain Type 1 classification is more conservative than necessary and may hamper other ADS objectives such as progress or comfort. \section{Validation} Although the proposed architecture is human-inspired, this alone is not sufficient to justify it. In this section, we validate the architecture by analyzing the feasibility and assurability of the components. \subsection{Feasibility of Architecture Components} We briefly review existing work that could address the requirements of architecture components. \subsubsection{Object Normalization} The field of computer graphics studies how to render object and image-taking specifications (e.g., 3D mesh, light sources, textures, camera position, etc.) into an object image. The problem of \emph{inverse graphics} is how to produce such a specification from an object image; thus, it performs the task of object normalization. Solving the inverse graphics problem is active research and various recent approaches using neural networks have been proposed (e.g.,\cite{yao20183d,deng2019cerberus,yildirim2020efficient}). The idea of \emph{capsule networks} is a prominent approach~\cite{HintonSF18} where the network learns an object class by decomposing into object parts and their structural relationships. Another field that is relevant here is \emph{embodied AI}~\cite{chrisley2003embodied}. Humans learn about objects by engaging with them directly in the world. In this way, they automatically learn what aspects of their experience are irrelevant to tasks such as classification (e.g., their position relative to the object or the orientation of the object). Artificial agents may be able to obtain these same benefits if they learn in a similar way rather than being trained from a predefined dataset of static images~\cite{smith2005development}. To facilitate this, various simulation tools have been developed that allow artificial agents to roam and interact in a simulated world to learn about it directly~\cite{duan2021survey}. An example of applying this to object normalization is to learn spatial invariants of object classification by approaching objects in different ways in the simulated world~\cite{caudell2011retrospective}. \subsubsection{Type 1 Classification} An emerging trend for DNNs is \emph{dynamic} inference where the DNN can exit early if needed~\cite{teerapittayanon2016branchynet}. This can implement the speed/accuracy tradeoff observed in the ventral stream. Classifiers that use DNNs are typically structured as a series of convolutional layers followed by fully connected layers. The lack of interpretability of these approaches limits their applicability as a Type 1 classifier when safety assurance is required. Alternative and interpretable DNN architectures based on prototype or exemplar approaches have recently been investigated and have shown positive results (e.g., ~\cite{li2018deep,hase2019interpretable, papernot2018deep}). The paper ``This looks like that: deep learning for interpretable image recognition''~\cite{chen2018looks} is good example of such architectures. Here, a classifier for different bird species is developed by learning for each class a set of prototypical image fragments taken from training images. Inference is then done by judging similarity of the learned prototypes to an input image and assigning the image to the class with the best fit. \subsubsection{Type 2 Classification} The kind of reasoning needed here is focused on \emph{explaining} what the object image is. Thus, approaches to abductive reasoning are applicable. As discussed above, the classes used by ADSs often do not possess a common set of necessary conditions; thus, traditional monotonic logics may be inappropriate. Non-monotonic logics (e.g., default logic) have been developed to express class membership rules which allow exceptions. Case-based reasoning aligns well with exemplar-based categorization. Description logics have concepts as first class entities and have been extended to support prototype-based reasoning (e.g.,~\cite{baader2016reasoning}). Reasoning using formalized ``commonsense'' theories provides a way to utilize human conceptual knowledge about various domains (e.g., physics of objects)~\cite{davis2017logical,suchan2021commonsense}. Another line of research relevant here concerns formal executable models of conceptual categorization such as Dual PECCS~\cite{lieto2017dual} that incorporates both prototype and exemplar based reasoning. \subsection{Safety Assurance} \subsubsection{Performance Comparison} An assurance argument regarding a human baseline must rely on some performance metrics for comparing component performance to the baseline. A naive way to proceed is to use one of the many performance metrics that have been proposed to compare the performance of different classifiers (e.g., accuracy, precision, F1-score). Such ``generic'' metrics are problematic for several reasons. First, such comparisons should be ``species-fair'' and not be biased by operational differences ~\cite{firestone2020performance}. For example, the retina is high resolution in the fovea but loses resolution and is color blind at the periphery. Thus, it sees an image differently than a DNN that gets an image as a uniform pixel grid. This difference can result in different classification accuracy of an image even if this has nothing to do with classification knowledge. Second, comparisons should be \emph{risk-aware}---performance differences in a context that is not safety relevant are not important. One way to achieve this is to define specialized perception performance metrics for different hazardous driving scenarios~\cite{salay2021missing}. Finally, because generic metrics average performance over many trials, an AIP~may obtain the same value as a human on the metric but still make, what to humans seem like unjustifiable errors (e.g., adversarial examples), undermining the assurance argument. To address this, performance measurements should be made for different difficulty categories for humans. In particular, cases that are easy for humans (e.g., variations due to confounding visual conditions) should also be easy for the AIP---adversarial examples violate this condition. Furthermore, the use of an \emph{error consistency} metric is needed here, which measures the degree to which the AIP~is making the same decision as a human on individual trials~\cite{geirhos2020beyond}. A high error consistency provides evidence that the AIP~is following a similar strategy as the human in its classification decision. Note however that we are only interested in preserving strategies where humans make correct decisions and do not want to replicate their weaknesses. \subsubsection{Object Normalization} The object normalizer identifies where the confounding effects of visual conditions are explicitly addressed in the architecture. Thus, the assurance argument regarding robustness to adversarial cases focuses here. Furthermore, since we take human performance as a baseline, the performance of the normalizer needs only to be assured up to human tolerable bounds on these conditions (e.g., maximum level of fog after which human performance is inadequate). Methods for eliciting formal requirements representing such bounds, as well as corresponding testing criteria, have been recently proposed~\cite{hu2020towards, hu22}. A generic DNN-based object normalizer would be reusable for different classification tasks allowing any assurance effort to be amortized over all its applications. Thus, although not-interpretable, it could be subjected to increased and extensive testing scrutiny. In addition, this testing effort would be robust because it is not subject to distributional shift or dependencies on community-specific norms since ``objecthood'' is such a basic concept. Techniques for formally verifying DNNs are being developed (e.g.,\cite{liu2019algorithms}). Thus, formal verification may be a possible solution for invariances that can be expressed formally as object image transformations (e.g., affine transformations or injected Gaussian noise). Formalizable aspects of object normalization may also allow non-data-driven implementation amenable to traditional assurance practices. \subsubsection{Type 1 Classification} A significant positive impact of object normalization is to simplify the classification problem since the classifier needs only to learn the visual features of the class instances in an idealized setting. This reduces the size and diversity needed in the dataset to assure adequate sample coverage of the input distribution. It also improves generalization by reducing the likelihood of spurious correlations with noncausal features of the input. Prototype/exemplar-based classifier approaches using DNNs provide interpretability by allowing human inspection of the prototypes/exemplars to determine whether they are meaningful. For example, in ``This looks like that'' discussed above, the prototype fragments of bird images can be inspected by birding experts to determine whether they are indicative of the classes they correspond to. This expert assessment provides evidence for correctness in the safety argument. Unlike the many post hoc explainability mechanisms that have been proposed for DNNs, such as saliency maps, interpretability provides the faithful explanations needed for assurance~\cite{rudin2019stop}. Another potential benefit of prototype/exemplar-based classifier approaches is the alignment with how humans represent concepts. This could provide evidence that the classifier generalizes in the same way as humans---i.e., by judging similarity to prototypes (and/or exemplars) that have been validated as conforming to community or expert opinion. However, the validity of this ``evidence from alignment'' argument depends also on the alignment of the similarity metric used with how humans judge similarity. If generic object similarity judgement can be learned by a DNN, then, like an object normalizer, this is could be a reusable component that can be given a higher degree of testing scrutiny. However, there is mixed evidence about whether this is possible. Earlier studies show comparable performance for DNN-based similarity judgment relative to humans, but a more recent study found that DNNs cannot outperform humans when more complex categorical knowledge is needed to judge similarity~\cite{jozwik2017deep}. This suggests that similarity judgement may itself be a perception task that requires a dual process treatment to achieve human-level performance. \subsubsection{Type 2 Classification} The knowledge base used by reasoning here is expressed in terms of human understandable concepts; therefore, it is interpretable and inspectable. This allows verification of alignment with community-specific consensus knowledge about object classes. Additionally, since reasoning is formal and based on a logic, evidence of internal consistency (i.e., soundness) and areas of (in)completeness of the knowledge base can be facilitated using formal methods. The requirement of classification consistency imposes an important constraint between the knowledge at the Type 1 and Type 2 levels that must be verified as part of an assurance argument. Automatic cross-validation methods between the levels could facilitate this. For example, Type 2 reasoning could be used to label images with semantic information that is then used to train or test the Type 1 classifiers. Reasoning about the scope of conceptual knowledge used by Type 2 could form the basis for completeness claims about the Type 1 classifiers and the datasets used to train and test them. \section{Conclusion} Although imperfect, human perception performance is often assumed to serve as a minimum baseline for safety that a societally acceptable AIP~must meet. However, it is widely known that while current state-of-the-art AIP~has achieved high levels of performance using DNNs, they still fall short of this baseline. In this paper, we review research on how humans do the basic perception task of object classification. Then we propose a dual process architecture for a safety assurable object classification AIP~aligned with the findings of this research. We discuss how such an architecture is both potentially feasible and assurable. We plan on investigating several issues as part of future work. First, while this paper explores a dual processing architecture for classification, the ideas must be further developed for more general perception and decision making, potentially in a unified way. This should also go beyond a single modality like vision. When a fast and critical decision needs to be made, one may need to introduce additional sensing modalities. For example, tailpipe fumes on a cold day may appear in LiDAR like a potentially solid object, but a camera image can easily remove this ambiguity. Second, an interesting next step would be to develop a safety argument template that could be evolved and drive the development of concrete AIP~architectures in a safety-first manner. Finally, a key limitation is still the challenge to be robust to and detect out-of-distribution (OOD) samples at the Type 1 level when it needs to be fast and we intend to explore this further (plus validating the hypothesis that Type 2 can refute Type 1 for OOD samples in the long run with sufficient accuracy). Perhaps neuroscience can be helpful here too by providing insights into how the brain deals with uncertainty and novelty. Ultimately, the lessons we can learn from the human brain may be the key to achieving assurable and societally acceptable AIP. \section{notes} In particular, these concepts are meaningful for assessing the situational risk of different behavioural decisions humans can make during driving --- i.e., humans know what harms might happen to various objects as a consequence of their driving and how much to care about this. This risk perception is especially important for novel objects that are difficult to classify. Second, these concepts are typically not explicitly ``defined'' but rather they emerge through an imperfect process of implicit social consensus. This has various implications. The concept can vary across communities affecting the transferability of knowledge --- e.g., what is considered a typical cyclist in Canada may be different than in Vietnam. Even people in a given community may reasonably disagree about the classification of specific ambiguous cases, which means that some examples have no well-defined ground truth. The concept also naturally changes over time, e.g., as new types of cyclist vehicles are invented, exhibiting distributional shift. \subsection{Objectives/topics/Contributions} \begin{itemize} \item That DNNs have deficiencies is a common concern (Goyal, etc.) Examples are given (inability to deal with novelty, adversarial inputs, non-interpretability) but the reasons why these problems exist are not well articulated. Although some give reasons such as disconnection in a distributed representation, lack of compositionality, ... The reasons are in terms of operational deficiencies of the NN. Instead, we give reasons in terms of the characteristics of the classification problem itself (insufficiency of visual feature representation because of conceptual nature of class), the physical process (confounding impacts of image-taking on class - although is this really a reason why DNNs are not enough?) and the assurance problem (a:for human baseline comparisons, performance should not be measured generally but broken down by hardness categories (doesn't KITTI do this?) - in particular, the easyness of invariants that are common to humans and typical examples (scoped by community and time), as opposed to exposure to atypical examples that could vary among humans; b: compositionality of evidence from architectural alignments with how humans do it; c: the non-interpretability of DNNs can be addressed by factoring out certain non-interpretable but reusable functionality that (may be) class-agnostic (specifically, object normalization and similarity assessment) from class-specific (intrepretable classification of normalized object using exemplar/prototype approaches)) \item Topic: the limits of CV ML classification \item Topic: A safe human-inspired classification architecture \begin{itemize} \item Rather than promoting a particular architecture, I want to claim that humans use a dual process architecture because it is actually necessary \begin{enumerate} \item to address classes like Cyclist - there are limitations with visual features used in Type 1 \item to address the speed/accuracy trade-off needed for fast safety-critical decisions - i.e., for very fast decisions a Type 2 conscious reasoning approach would be too slow (and the decision should be conservative - but I don't have support for this aspect). But why is conscious reasoning necessarily slow? 1) intuition: compilation; 2) the speed of reasoning is dependent on the bound on knowledge being accessed - type 2 has access to all of conceptual knowledge (although it doesn't follow that it always has to use it - i.e., it could access it in a graduated way according to available time); 3) the visual sense domain is distinct from the conceptual domain in the sense that what is reified in the former do not correspond to concepts in the realm of social discourse \item since all information about the world is only available through sense data which is mediated by type 1 mechanisms (e.g., symbol grounding problem), type 2 reasoning is dependent on type 1 processes. I need a nice example of the unbounded problem of type 1 processes necessitating type 2. Ideally, even a general argument (proof) that looks something like this: say that there is some set of visual features necessary and sufficient to charcterize a classification problem. I claim there is always another feature, that in some context, is necessary to assess for the classification (i.e., an example will satisfy the visual features for C and yet will be notC (i.e., FP) or conversely (i.e., FN)). Well I can't prove it but there are convincing arguments: a) non-observable but conceptually relevant features - e.g., bike frame made out of a material that is not stable - but eventually some kind of test must be doable that allows for an observation. This where it connects to philosophy of science - checking conceptual features must ultimately correspond to checking some observable (i.e., visual) features otherwise it the classificiation is unscientific - scientifically ``undecidable'' - although, another possibility is that the maker of the bike (authorative source) asserts that it is made using an unstable material - unlike science we are classifyng artifacts as well as natural kinds; b) the issue of disguises or mimics, malicious or otherwise. \end{enumerate} \item The decomposition of the classification problem allows a corresponding decomposition of the argument. Specifically, we decomposes the classification problem by first normalizing objects subtracting out elements that humans consider irrelevant to class and then it classifies the normalized object either using a DNN or symbolic AI if too low confidence \item Aligning this decomposition architecture with how humans do it provides a basis for evidence that it does it as well as humans. Specifically, it allows us to compare the performance of the different stages to the corresponding human stage, separately. If the architectures were different, we could only make comparisons at the whole classification level (black box). So this allows a grey-box comparison. \item (very important) Another assurance factor is that the ``hardness'' level of an input (i.e., how hard it is to classify) should align with human opinion. A system that calls something hard that humans consider easy is alien and less trustworthy. This factor is hidden by performance metrics - i.e., they only give performance averaged over all cases but have the same metric value does not mean that it performs the same as humans on the same cases! What we want in a human baseline is to have the same as human performance at every hardness level (as judged by humans). \end{itemize} \end{itemize} \subsection{Parts} \begin{itemize} \item Classification task during driving \begin{itemize} \item Classification as a fundamental (atomic) perception task \item Distinction between object vs object image classification. \item Do I need a section on image taking? This is relevant in a number of places \begin{itemize} \item Embodied learning \item The definition of identity and classification invariants \item The limits of object image classification (and therefore, of CV ML classification with or without help) due to uncertainty in the O2I function \end{itemize} \end{itemize} \item Assurance objective for ADS \begin{itemize} \item We introduce a human baseline (a lower bound for safety) for classification performance as the Status Quo Assurance Assumption \item One counter to this is that maybe the human baseline on safe activity is only relevant at the whole perception subsystem level or whole ADS level - i.e., individual components need to carry out tasks as well as humans if this is compensated for at the system level. Although this is valid, having a human baseline at the component task level is a conservative goal and it is worth asking if it is achievable. \end{itemize} \end{itemize}
\section{Introduction} Population analyses aim at inferring the parameters that describe the distribution of the properties of a set of observed events drawn from a common population. In the context of gravitational-wave (GW) astrophysics, such analyses have been carried out for the 90 coalescing compact-object binaries that have so far been observed by ground-based gravitational wave detectors, and reported in the third gravitational wave transient catalogue, GWTC-3~\citep{LIGOScientific:2021usb,LIGOScientific:2021djp,LIGOScientific:2021psn}. These population analyses aimed at understanding the astrophysical processes that lead to the formation of the binaries \citep{LIGOScientific:2018mvr}, or at using them to constrain cosmic expansion history by estimating parameters including the Hubble constant \citep{LIGOScientific:2021aug}. Given a set of observed events, the usual approach to estimate distribution parameters is to complete a Bayesian hierarchical analysis using techniques such as Markov Chain Monte Carlo (MCMC). While these are the most reliable way to obtain posterior samples from actual data, they are typically computationally expensive and so it can become impractical to use these approaches to make forecasts for future observations that include surveys over parameter space. However, such surveys are crucial for scoping out the science cases of future detectors, such as the Einstein Telescope \citep{Punturo:2010zz}, Cosmic Explorer \citep{Reitze:2019iox} and the spaceborne LISA mission \citep{Audley:2017drz}, all of which are expected to detect thousands of sources from multiple populations. For explorations of this nature, one can trade off accuracy in the estimates of parameter-measurement precision for computational speed by using approximations that are valid in the limit of high signal-to-noise ratio (SNR). In the context of \emph{source} parameters for \emph{individual} signals, the Fisher matrix is commonly used to cheaply assess the measurement precision of a parameter \citep{Vallisneri:2007ev}. Within the linear-signal approximation, valid for high SNR sources, the inverse of the Fisher matrix is an approximation to the covariance matrix and therefore the width of the likelihood function. Under the assumption of flat priors, it also approximates the shape of the Bayesian posterior probability distribution we would expect to obtain in an MCMC analyses. For a parameter set $\vec \lambda$, the Fisher matrix can be written in general terms as the expectation value over the data generating process of derivatives of the log-likelihood $p(\mathbf{d}| \vec\lambda)$, \begin{equation} (\Gamma_{\lambda})_{ij} = \mathbb{E}\left[ - \frac{\partial^2 \ln p(\mathbf{d}|\vec\lambda)}{\partial \lambda^i \partial \lambda^j} \right]. \label{eq:popfishgen} \end{equation} While this provides a guide to measurement uncertainties for individual events, the Fisher matrix does not directly provide an indication of how well the properties of the population can be inferred when those events are subsequently combined in a hierarchical model. In this paper we address this shortcoming by deriving a Fisher Matrix for the population parameters assuming Gaussian noise and using the likelihood for population inference in the presence of selection effects from \citep{Mandel:2018mve}. The expression we obtain is valid for high SNRs and small biases in the individual events' parameters. We illustrate our formalism with two examples. First, we consider a ``Gaussian-Gaussian'' case, in which both noise and the data generation process are normally distributed, and check our expressions against the direct calculation of the Fisher matrix as an expectation value over data realizations. We also perform MCMC analyses with and without selection effects, as a cross-check to verify our results. Secondly, we consider the more astrophysically relevant case of a power-law distributed population (while still assuming Gaussian noise) and again validate our results against MCMC analyses with and without selection effects. We generally find an excellent agreement between the Fisher and MCMC estimates, while confirming results in \citep{Gair:2010yu} for the latter scenario. The paper is organized as follows. In Section \ref{sec:derivation_FM} we describe our population Fisher Matrix formalism, highlighting the main assumptions and steps to obtain the result. A derivation of corrections to this formula and their scalings is found in Appendix~\ref{app:popFMcorrect}. In Section \ref{sec:gaussian-gaussian}, we consider the Gaussian population model, checking our formula against a direct calculation of the Fisher Matrix and an MCMC analysis. In section \ref{sec:EMRI-model}, we consider the case of inference of a power-law massive black hole mass distribution using extreme-mass-ratio inspiral (EMRI) observations, once again comparing the result against MCMC. Finally, in section \ref{sec:conclusions} we discuss our results and prospects for future work. The framework we develop here could be applied in a wide variety of contexts. The focus on gravitational wave detectors and the choice of the examples provided here are driven purely by the authors' areas of expertise. The results can be fully reproduced with codes made publicly available at \url{https://github.com/aantonelli94/PopFisher}. \section{The Fisher matrix for population distributions} \label{sec:derivation_FM} The standard model used to represent the data stream, $\mathbf{d}$, of a gravitational wave detector is as a linear combination of a signal, $\mathbf{h}(\vec\theta)$, dependent on some parameters $\vec\theta$, and noise, $\mathbf{n}$, that is usually assumed to be a realisation of a stationary and Gaussian stochastic process described by a power spectral density $S_h(f)$, \begin{equation} \mathbf{d} = \mathbf{h}(\vec\theta) + \mathbf{n}, \qquad \langle \tilde{n}^*(f) \tilde{n}(f')\rangle = S_h(f) \delta(f-f'). \end{equation} In this model the likelihood is \begin{align} p(\mathbf{d} | \vec\theta) &\propto \exp\left[ -\frac{1}{2} \left( \mathbf{d} - \mathbf{h}(\vec\theta) | \mathbf{d} - \mathbf{h}(\vec\theta)\right) \right], \nonumber \\ \mbox{where } (\mathbf{a}|\mathbf{b}) &= 4\mbox{Re} \,\int_{0}^\infty \frac{\tilde{a}^*(f) \tilde{b}(f)}{S_h(f)} \, {\rm d}f. \label{eq:innprod} \end{align} To understand the precision with which gravitational wave observations can determine the parameters of a source, it is common to compute the Fisher information matrix, defined by \begin{equation} (\Gamma_{\theta})_{ij} = \mathbb{E}\left[ \frac{\partial \ln p(\mathbf{d}|\vec\theta)}{\partial \theta^i} \frac{\partial \ln p(\mathbf{d}|\vec\theta)}{\partial \theta^j} \right] \label{eq:eventfishgen}, \end{equation} where the expectation value is taken over realizations of the data drawn from the data generating process, $\mathbf{d}$. For the gravitational wave detector likelihood in Eq.~\eqref{eq:innprod}, the Fisher information matrix can be seen to reduce to \begin{equation} (\Gamma_{\theta})_{ij} = \left( \frac{\partial \mathbf{h}}{\partial\theta^i}\bigg| \frac{\partial \mathbf{h}}{\partial\theta^j} \right), \label{eq:sourceFM} \end{equation} where we are using the inner product introduced in Eq.~\eqref{eq:innprod}. The Fisher matrix provides a leading order approximation to the shape of the likelihood and hence also the Bayesian posterior when using priors that are approximately flat over the support of the likelihood. It becomes an increasingly good guide to the precision of parameter estimation as the SNR with which the source is observed increases. In population inference, we are no longer primarily interested in the parameters of the individual events, but in the parameters that characterise the population from which the individual events are drawn. We assume that we have some population model, $p(\vec\theta|\vec\lambda)$, that describes the probability distribution of the parameters, $\vec\theta$, of individual events drawn randomly from a population characterised by parameters, $\vec\lambda$. We want to infer the parameters of the population by combining the information from many observed events. For a given choice of population parameters, the distribution of observed datasets is characterised by \begin{align} p(\mathbf{d}|\vec\lambda) &= \frac{p_{\rm full}(\mathbf{d}|\vec\lambda)}{p_{\rm det}(\vec\lambda)} \label{eq:likewithsel}\\ \mbox{where } p_{\rm full}(\mathbf{d}|\vec\lambda) &= \int p(\mathbf{d}|\vec\theta) p(\vec\theta | \vec\lambda) \, {\rm d} \vec\theta \nonumber \\ p_{\rm det}(\vec\lambda) &= \int p_{\rm det}(\vec\theta) p(\vec\theta | \vec\lambda) \, {\rm d} \vec\theta \nonumber \\ p_{\rm det}(\vec\theta) &= \int_{\mathbf{d} > {\rm thresh}} p(\mathbf{d}|\vec\theta) \, {\rm d}\mathbf{d}. \label{eq:poplike} \end{align} This expression accounts for the fact that not all events that occur in the Universe are detected. Detection is a property of the observed data, $\mathbf{d}$, and the last integral is over all data sets that would pass the threshold to be counted as a detected event and hence included in the population inference. The normalisation term, $p_{\rm det}(\vec\lambda)$, depends only on the population parameters and represents the fraction of events in the Universe that are detectable. We refer the reader to~\citep{Mandel:2018mve} for further details. This form of the likelihood assumes that the number of events observed in a fixed time period does not convey any information about the population parameters. However, the precision with which the population parameters are estimated asymptotically is independent of that assumption. This is discussed in more detail in Appendix~\ref{app:rates}. Equation~\eqref{eq:popfishgen} is the equivalent of Eq.~\eqref{eq:eventfishgen} for this population likelihood, and so it should give a guide to the precision with which the population parameters can be measured. Note that the two forms of the expression are slightly different, but it is straightforward to show that the two results are equivalent by integrating by parts and using conservation of probability. This will be a good guide for a ``high signal-to-noise ratio'', which for populations means a large number of observed events. The fact that Eq.~\eqref{eq:popfishgen} is a good approximation to the precision of population inference can be seen as follows. In a general population inference problem, we have observed a set of events, indexed by $i$, with corresponding datasets $\{\mathbf{d}_i\}$. The posterior distribution on the population parameters from this set of events can be found from Bayes' theorem and takes the form \begin{equation} p(\vec{\lambda} | \left\{\mathbf{d}_i\right\} ) \propto \pi(\vec\lambda) \prod_{i=1}^n p(\mathbf{d}_i | \vec\lambda) \label{eq:jointlike} \end{equation} where $n$ is the total number of events observed, $\pi(\vec\lambda)$ is the prior on the population parameters and $p(\mathbf{d}_i | \vec\lambda)$ is the likelihood of the population parameters $\vec\lambda$ for dataset $\mathbf{d}_i$. The log-posterior is \begin{equation} \ln p(\vec{\lambda} | \left\{\mathbf{d}_i\right\} ) \propto \ln\pi(\vec\lambda) + \sum_{i=1}^n \ln p(\mathbf{d}_i | \vec\lambda). \end{equation} The latter quantity is a sum of independent random variables (assuming that all observations are independent). In the limit that $n \rightarrow \infty$ we can use the central limit theorem to deduce \begin{equation} \frac{1}{n} \sum_{i=1}^n \ln p(\mathbf{d}_i | \vec\lambda) \sim N\left( \mu(\vec\lambda | \vec\lambda_t), \frac{\sigma^2(\vec\lambda | \vec\lambda_t)}{n}\right) \end{equation} where \begin{equation} \mu(\vec\lambda | \vec\lambda_t) = \mathbb{E} \left[\ln p(\mathbf{d} | \vec\lambda)\right], \quad \sigma^2(\vec\lambda | \vec\lambda_t) = \mathbb{E} \left[(\ln p(\mathbf{d} | \vec\lambda) - \mu)^2\right] \end{equation} and the expectation value is taken over the data generating process, which we assume to be consistent with the likelihood we are using, evaluated for the true values of the population parameters $\vec\lambda_t$. Since \begin{align \frac{\partial \mu}{\partial \lambda^i} &= \int p(\mathbf{d} | \vec\lambda_t) \frac{1}{p(\mathbf{d} |\vec\lambda)} \frac{\partial p(\mathbf{d}|\vec\lambda)}{\partial \lambda^i} \, {\rm d}\mathbf{d} \nonumber \\ \Rightarrow \quad \frac{\partial \mu}{\partial \lambda^i}_{\vec\lambda=\vec\lambda_t} &= \int \frac{\partial p(\mathbf{d}|\vec\lambda)}{\partial \lambda^i} \, {\rm d}\mathbf{d} = \frac{\partial }{\partial \lambda^i}\,\int p(\mathbf{d}|\vec\lambda) \, {\rm d}\mathbf{d} \nonumber \\ &= \frac{\partial }{\partial \lambda^i}(1) = 0, \label{eq:unbiasproof} \end{align} we deduce that the population likelihood is peaked at the true parameters asymptotically (this is not true on average for a finite number of observations, as discussed in Appendix~\ref{app:popFMcorrect}). Note that this happens by virtue of the assumed consistency between the likelihood and the data-generating process, and would not be the case if the likelihood was only an approximation to the true population. As $n \rightarrow \infty$ the log-posterior converges to the function $n \mu(\vec\lambda)$, and so the posterior becomes increasingly concentrated around $\vec\lambda_t$. Expanding the function $\mu(\vec\lambda | \vec\lambda_t)$ near $\vec\lambda_t$ we have \begin{align} \mu(\vec\lambda | \vec\lambda_t)& = \mu\left(\vec\lambda_t | \vec\lambda_t\right) \nonumber\\ +& \frac{1}{2} \left( \frac{{\rm d}^2 \mu}{{\rm d} \lambda^i {\rm d}\lambda^j}\right)_{ \vec\lambda_ } (\lambda^i - \lambda^i_t) (\lambda^j - \lambda^j_t) + \cdots . \end{align} We deduce that the asymptotic covariance matrix is $\Gamma_\lambda^{-1}/n$, where \begin{equation} (\Gamma_{\lambda})_{ij} = -\left( \frac{{\rm d}^2 \mu}{{\rm d} \lambda^i {\rm d}\lambda^j}\right)_{ \vec\lambda_ } = \mathbb{E}\left[ - \frac{\partial^2 \ln p(\mathbf{d}|\vec\lambda)}{\partial \lambda^i \partial \lambda^j} \right]. \end{equation} In the last equality, we use Eq. \eqref{eq:unbiasproof}. This justifies the use of Eq.~\eqref{eq:popfishgen} to characterise the precision of parameter estimation in the limit $n\rightarrow\infty$. It becomes increasingly reliable as $n\rightarrow \infty$, as corrections to this formula scale like $n^{-\frac{1}{2}}$ relative to leading order. This is justified in more detail in Appendix~\ref{app:popFMcorrect}. This result can be evaluated at various levels of approximation. The full asymptotic posterior is described by the function $\mu(\vec\lambda|\vec\lambda_t)$, which can be evaluated through Monte Carlo integration. This is computationally expensive as it requires evaluation over different choices of $\vec\lambda$ and $\vec\lambda_t$. The next level of approximation is to evaluate Eq.~\eqref{eq:popfishgen} directly. This makes a linear signal approximation in the population parameters, but no approximation to the evaluation of $p(\mathbf{d}|\vec\lambda)$. This is less complex because evaluation is only needed in the vicinity of $\vec\lambda_t$. A final level of approximation is to simplify $p(\mathbf{d}|\vec\lambda)$ by using the linear signal approximation for the individual event parameters as well. This is the approach we will now describe. We consider a single observation of a source with parameters $\vec\theta_0$, and data $\mathbf{d} = \mathbf{h}(\vec\theta_0) + \mathbf{n}$. Taking the expectation value over the true data distribution then reduces to taking the expectation value over the distribution of the noise $\mathbf{n}$ and the distribution of the parameters $\vec\theta_0$, which is $p(\vec\theta_0 | \vec\lambda_t)$. Under the linear signal approximation we expand \begin{equation} \mathbf{h}(\vec\theta) = \mathbf{h}(\vec\theta_0) + \frac{\partial \mathbf{h}}{\partial \theta^i} \Delta \theta^i \end{equation} where $\Delta\theta^i = \theta^i - \theta_0^i$. The gravitational wave likelihood can then be written \begin{align} \tilde{p}(\{ \mathbf{d} \} | \vec\theta) &\propto \exp\left[ -\frac{1}{2} (\mathbf{d}-\mathbf{h}(\vec\theta) | \mathbf{d}-\mathbf{h}(\vec\theta))\right] \nonumber \\ &\approx\exp\left[-\frac{1}{2}\left( \mathbf{n} | \mathbf{n}\right) + N_i \Delta \theta^i -\frac{1}{2} (\Gamma_\theta)_{ij} \Delta\theta^i \Delta\theta^j \right] \nonumber \\ \mbox{where } N_i &= \left( \frac{\partial \mathbf{h}}{\partial\theta^i} \bigg| \mathbf{n} \right) \end{align} and $(\Gamma_\theta)_{ij}$ is the single source Fisher matrix defined in Eq.~\eqref{eq:sourceFM}. We similarly expand the source prior term \begin{align}\label{eq:lnp_P_H} \ln p(\vec\theta | \vec\lambda) &= \ln p(\vec\theta_0 | \vec\lambda) + P_i \Delta\theta^i - \frac{1}{2} H_{ij} \Delta \theta^i \Delta \theta^j + \cdots \nonumber \\ \mbox{where } P_i &= \frac{\partial \ln p(\vec\theta|\vec\lambda)}{\partial \theta^i}, \qquad H_{ij} = -\frac{\partial^2 \ln p(\vec\theta|\vec\lambda)}{\partial \theta^i \partial \theta^j}, \end{align} in which the derivatives are evaluated at the parameter space point $\theta_0$. Substituting the preceding two expressions into Eq.~\ref{eq:poplike} and integrating over $\vec\theta$, which is equivalent to integrating over $\Delta\vec\theta$ in the linear signal approximation, we obtain \begin{align \tilde{p}(\{ \mathbf{d} \} | \vec\lambda) &\approx \frac{\exp[-(\mathbf{n}|\mathbf{n})/2]}{p_{\rm det}(\vec\lambda)} \int {\rm d}\Delta\vec\theta \left[ p(\vec\theta_0|\vec\lambda) \right. \nonumber \\ &\hspace{0.5cm} \exp\left\{ -\frac{1}{2} (\Gamma_{ij} + H_{ij}) (\Delta\theta^i -\Delta\theta_{\rm bf}^i) (\Delta\theta^j -\Delta\theta_{\rm bf}^j) \right.\nonumber \\ &\hspace{1cm} \left.\left.+ \frac{1}{2} (N_i+P_i)(\Gamma+H)^{-1}_{ij}(N_j+P_j) \right\}\right] \nonumber\\ &=(2\pi)^{N/2}\frac{p(\vec\theta_0|\vec\lambda) \exp[-(\mathbf{n}|\mathbf{n})/2]}{p_{\rm det}(\vec\lambda) \sqrt{{\rm det}(\Gamma+H)}} \nonumber \\ &\hspace{0.5cm} \times \exp\left[\frac{1}{2} (N_i+P_i)(\Gamma+H)^{-1}_{ij}(N_j+P_j)\right], \label{eq:poplikeapprox} \end{align} where we have written $$ \Delta\theta_{\rm bf}^i=(\Gamma+H)^{-1}_{ik} (N_k+P_k). $$ This is the point at which the likelihood is maximized and hence is the ``best-fit'' point in parameter space. We can now evaluate the population Fisher matrix using the expression \begin{align} -(\Gamma_\lambda)_{ij} &= \int \left(\frac{\partial^2 \ln p(\mathbf{d} | \vec\lambda)}{\partial\lambda^i \partial\lambda^j}\right)_{\vec\lambda_t} p(\mathbf{d}|\vec\lambda_t) {\rm d}\mathbf{d} \nonumber \\ &= \int \int \left(\frac{\partial^2 \ln p(\mathbf{d} | \vec\lambda)}{\partial\lambda^i \partial\lambda^j}\right)_{\vec\lambda_t} p(\vec{\theta}_0|\vec\lambda_t) p(\mathbf{n}| \vec\theta_0) {\rm d}\mathbf{n} {\rm d}\vec\theta_0. \end{align} In the above the integral over the noise distribution is conditioned on $\vec\theta_0$ because of selection effects. This integral is over all noise realisations that ensure $\mathbf{d} = \mathbf{h}(\vec\theta_0) + \mathbf{n}$ is above the detection threshold. Substituting Eq.~\eqref{eq:poplikeapprox} into the above we obtain a sequence of terms. To simplify these we carry out the integral over the noise, $\mathbf{n}$. The only terms in Eq.~\eqref{eq:poplikeapprox} that depend on $\mathbf{n}$ are $N_i$ and the prefactor $\exp[-(\mathbf{n}|\mathbf{n})/2]$. The latter enters $\ln \tilde{p}$ additively and has no dependence on the population parameters, so it does not contribute to the final result. The former term also has no explicit dependence on the population parameters, but it appears multiplied by terms that do. There are thus three distinct types of term that appear in the argument of the integral - terms that have no explicit dependence on $\mathbf{n}$, terms that are linear in $N_i$ and terms that are quadratic in $N_i$. We define these integrals as follows \begin{align} p_{\rm det} (\vec\theta_0) &= \int p(\mathbf{n} | \vec\theta_0) {\rm d}\mathbf{n} \nonumber \\ \label{eq:Dijk} D_{i} &\equiv \int \left( \mathbf{n} \bigg| \frac{\partial \mathbf{h}}{\partial\theta^i} \right) p(\mathbf{n}) {\rm d}\mathbf{n} = \frac{\partial p_{\rm det}(\vec\theta_0)}{\partial\theta^i}\,,\nonumber\\ D_{ij} &\equiv \int \left( \mathbf{n} \bigg| \frac{\partial \mathbf{h}}{\partial\theta^i} \right) \left( \mathbf{n} \bigg| \frac{\partial \mathbf{h}}{\partial\theta^j} \right) p(\mathbf{n}) {\rm d}\mathbf{n}. \end{align} Using these expressions to carry out the integrals over $\mathbf{n}$, we obtain the final result \begin{align}\label{eq:gammalambda} -(\Gamma_\lambda)_{ij} &\equiv (\Gamma_\text{I})_{ij}+(\Gamma_\text{II})_{ij}+(\Gamma_\text{III})_{ij}+(\Gamma_\text{IV})_{ij}+(\Gamma_\text{V})_{ij}, \end{align} with \begin{align} (\Gamma_\text{I})_{ij}&=\int \frac{\partial^2 \ln (p(\vec\theta_0 | \vec\lambda)/p_{\rm det}(\vec\lambda))}{\partial\lambda^i \partial\lambda^j} \, \frac{p_{\rm det}(\vec\theta_0)}{p_{\rm det}(\vec\lambda)} p(\vec\theta_0 | \vec\lambda) {\rm d} \vec\theta_0, \nonumber \\ (\Gamma_\text{II})_{ij}&=- \frac{1}{2} \int \frac{\partial^2 \ln {\rm det}(\Gamma+H)}{\partial\lambda^i \partial\lambda^j} \, \frac{p_{\rm det}(\vec\theta_0)}{p_{\rm det}(\vec\lambda)} p(\vec\theta_0 | \vec\lambda) {\rm d} \vec\theta_0,\nonumber \\ (\Gamma_\text{III})_{ij}&= \frac{1}{2} \int \frac{\partial^2}{\partial\lambda^i \partial\lambda^j}\left[(\Gamma+H)^{-1}_{kl}\right] D_{kl} \, \frac{p(\vec\theta_0 | \vec\lambda)}{p_{\rm det}(\vec\lambda)} {\rm d} \vec\theta_0, \nonumber \\ (\Gamma_\text{IV})_{ij}&= \int \frac{\partial^2}{\partial\lambda^i \partial\lambda^j} \left[ P_k(\Gamma+H)^{-1}_{kl}\right]D_{l} \, \frac{p(\vec\theta_0 | \vec\lambda)}{p_{\rm det}(\vec\lambda)} {\rm d} \vec\theta_0, \nonumber \\ (\Gamma_\text{V})_{ij}&= \frac{1}{2} \int \frac{\partial^2}{\partial\lambda^i \partial\lambda^j} \left[ P_k (\Gamma+H)^{-1}_{kl} P_l \right] \, \frac{p_{\rm det}(\vec\theta_0)}{p_{\rm det}(\vec\lambda)} p(\vec\theta_0 | \vec\lambda) {\rm d} \vec\theta_0\nonumber. \end{align} This is an approximate expression for the population Fisher matrix which can be used to estimate the precision with which observations will be able to determine the population parameters. In the next sections we will illustrate the use of this result for a few sample problems. \section{Illustration I: a gaussian-gaussian model} \label{sec:gaussian-gaussian} The first application of Eq. \eqref{eq:gammalambda} we will consider is to a ``Gaussian-Gaussian'' model in which both observations and noise are normally distributed. We simplify the setting by assuming a waveform dependent on a single parameter $\theta$. The distribution of the parameter is \begin{align}\label{pthetalambda} p(\theta|\vec\lambda)= \mathcal{N}(\mu,\Sigma^2) = \frac{1}{\sqrt{2\pi \Sigma^2}} \exp\left[-\frac{(\theta-\mu)^2}{2\Sigma^2}\right], \end{align} with population parameters (henceforth, hyperparameters) $\vec\lambda =\{\mu,\Sigma^2\}$. Noise is also a Gaussian with zero mean and variance $\sigma$. Since the data stream is a sum of Gaussians, it is modelled by $\mathcal{N}(\mu,\sigma^2+\Sigma^2)$, with mean and variance given by the sums of individual means and variances, \begin{align}\label{eq:pdlambda} p(\boldsymbol{d}|\vec\lambda)= \frac{1}{\sqrt{2\pi (\sigma^2+\Sigma^2)}} \exp\left[-\frac{(\boldsymbol{d}-\mu)^2}{2(\sigma^2+\Sigma^2)}\right]. \end{align} Given the implicit simple choice for the signals, the Fisher matrix of source parameters reduces to \begin{equation}\label{eq:gamma} \Gamma_\theta = \left(\frac{\partial \boldsymbol h} {\partial \theta}\bigg|\frac{\partial \boldsymbol h} {\partial \theta}\right) = \frac{1}{\sigma^2}\left|\frac{\partial \boldsymbol h}{\partial \theta}\right|^2=\frac{1}{\sigma^2}, \end{equation} while from Eq.~\eqref{pthetalambda} we have that $P$ and $H$ in \eqref{eq:lnp_P_H} are \begin{align}\label{eq:PH} P = -\frac{(\theta-\mu)}{\Sigma^2} \quad \text{and}\quad H= \frac{1}{\Sigma^2}\,. \end{align} The example reported in this section does not have an immediate analogy in GW astrophysics, but it can be thought of as a more general application of the population Fisher matrix. The advantage of choosing such a simple setting is that the matrix entries can be directly integrated as expectation values over data realizations. In the presence of selection effects, the integrals to be solved are \begin{align}\label{eq:Gamma_expectation} (\Gamma_\lambda)_{ij} &= \mathbb{E} \left(-\frac{\partial^2}{\partial \lambda^i\partial \lambda^j}\left[\ln \left(\frac{p(\boldsymbol d|\theta,\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}\right)\right]\right) \nonumber\\ &= - \int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty \frac{\partial^2}{\partial \lambda^i\partial \lambda^j}\left[\ln \left(\frac{p(\boldsymbol d|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}\right)\right] \frac{p(\boldsymbol d|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}d\boldsymbol d. \end{align} We only select realizations of the data $\boldsymbol{d}>\ensuremath{\boldsymbol d_\text{th}}$ that are above a certain threshold. The predictions for the various components of the population Fisher matrix are\footnote{For the last integral, it is useful to notice that \begin{equation*} \int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty (\boldsymbol{d}-\mu)^2 p(\boldsymbol d|\vec\lambda)d\boldsymbol d = \ensuremath{(\sigma^2+\Sigma^2)} \left[1+(\ensuremath{\boldsymbol d_\text{th}}-\mu)\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}\right], \end{equation*} which follows from $(\boldsymbol{d}-\mu)p(\boldsymbol d|\vec\lambda) = - \ensuremath{(\sigma^2+\Sigma^2)} \partial p(\boldsymbol d|\vec\lambda)/\partial \boldsymbol d$, integrating by parts, and using Eq.\eqref{eq:pdetl}.} \begin{align} (\Gamma_\lambda)_{\mu\mu}&= \frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial \mu^2}+\frac{1}{\ensuremath{(\sigma^2+\Sigma^2)}},\nonumber\\ (\Gamma_\lambda)_{\mu\Sigma^2}&=\frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial \mu\partial \Sigma^2}+ \frac{1}{\ensuremath{(\sigma^2+\Sigma^2)}}\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec{\lambda})}{\ensuremath{p_{\rm det}(\vec{\lambda})}},\nonumber\\ (\Gamma_\lambda)_{\Sigma^2\Sigma^2}&=\frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{(\partial\Sigma^2)^2} + \frac{1}{2\ensuremath{(\sigma^2+\Sigma^2)}^2} \nonumber\\ &\quad+ \frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)}{\ensuremath{(\sigma^2+\Sigma^2)}^2}\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}},\label{gamma_mumupred} \end{align} where we have used Eqs.\eqref{eq:pdlambda}, \eqref{eq:Gamma_expectation}, the fact that the integral is normalized through \begin{equation}\label{eq:pdetl} \ensuremath{p_{\rm det}(\vec{\lambda})} = \int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty p(\boldsymbol d|\vec\lambda)d\boldsymbol d = \frac{1}{2} {\rm erfc} \left(\frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)}{\sqrt{2\ensuremath{(\sigma^2+\Sigma^2)}}}\right), \end{equation} and the definition \begin{equation}\label{pdet_def} p(\ensuremath{\boldsymbol d_\text{th}}|\vec{\lambda}) \equiv \frac{1}{\sqrt{2\pi \ensuremath{(\sigma^2+\Sigma^2)}}}\exp \left[- \frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)^2}{2\ensuremath{(\sigma^2+\Sigma^2)}}\right]. \end{equation} Finally, from Eq. \eqref{eq:pdetl} it follows that \begin{align} &\frac{\partial^2 \ln p_\text{det}(\lambda)}{(\partial \mu)^2} =\left(\frac{\ensuremath{\boldsymbol d_\text{th}}-\mu}{\sigma^2+\Sigma^2}\right)\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\lambda)}{p_\text{det}(\lambda)}-\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\lambda)^2}{p_\text{det}(\lambda)^2},\nonumber\\ &\frac{\partial^2 \ln p_\text{det}(\lambda)}{\partial \mu\partial\Sigma^2} =\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\lambda)}{p_\text{det}(\lambda)}\left[\frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)^2}{2(\sigma^2+\Sigma^2)^2}-\frac{1}{2(\sigma^2+\Sigma^2)}\right] \nonumber\\ &\qquad \qquad \qquad -\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\lambda)^2}{2 p_\text{det}(\lambda)^2}\left(\frac{\ensuremath{\boldsymbol d_\text{th}}-\mu}{\sigma^2+\Sigma^2}\right),\nonumber\\ & \frac{\partial^2 \ln p_\text{det}(\lambda)}{(\partial \Sigma^2)^2}=\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\lambda)}{p_\text{det}(\lambda)}\left[\frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)^3}{4(\sigma^2+\Sigma^2)^3}-\frac{3(\ensuremath{\boldsymbol d_\text{th}}-\mu)}{4(\sigma^2+\Sigma^2)^2}\right]\nonumber\\ &\qquad \qquad \qquad -\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\lambda)^2}{4 p_\text{det}(\lambda)^2}\left(\frac{\ensuremath{\boldsymbol d_\text{th}}-\mu}{\sigma^2+\Sigma^2}\right)^2. \end{align} \subsection{Solution from the population Fisher matrix} While in this simple setting the direct evaluation of the Fisher Matrix as expectation value is much simpler, we wish to now evaluate it using Eq. \eqref{eq:gammalambda} as an important sanity check of that general formula. For $(\Gamma_\lambda)_{\mu\mu}$, we notice that the $(\Gamma_\text{II})_{\mu\mu}$, $(\Gamma_\text{III})_{\mu\mu}$ and $(\Gamma_\text{IV})_{\mu\mu}$ vanish. The second and third terms vanish because $\Gamma+H$ does not depend on $\mu$, while the fourth term vanishes because $P$ is only linear in $\mu$ and two derivatives with respect to it are needed for $(\Gamma_\lambda)_{\mu\mu}$. The only terms contributing are therefore $(\Gamma_\text{I})_{\mu\mu}$ and $(\Gamma_\text{V})_{\mu\mu}$, which leads to \begin{align} (\Gamma_\lambda)_{\mu\mu} = & - \int \frac{\partial^2 \ln (p(\theta | \vec\lambda)/\ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial\mu^2} \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ &- \frac{1}{2} \int \frac{\partial^2}{\partial\mu^2} \left[ P^2 (\Gamma+H)^{-1}\right] \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ = & \frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial\mu^2} + \frac{1}{\ensuremath{(\sigma^2+\Sigma^2)}}, \end{align} where we have used $P$, $\Gamma$ and $H$ given in Eqs. \eqref{pthetalambda}, \eqref{eq:gamma} and \eqref{eq:PH}, as well as the normalisation \begin{equation}\label{eq:pdetnormalization} \int \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta =1. \end{equation} The result matches the prediction of Eq.\eqref{gamma_mumupred} as expected. In the case of $(\Gamma_\lambda)_{\mu\Sigma^2}$, the second and third terms, $(\Gamma_\text{II})_{\mu\Sigma^2}$ and $(\Gamma_\text{III})_{\mu\Sigma^2}$, vanish for the same reason as above, but now the fourth term $(\Gamma_\text{IV})_{\mu\Sigma^2}$ does contribute. Overall we have that \begin{align} (\Gamma_\lambda&)_{\mu\Sigma^2} = - \int \frac{\partial^2 \ln (p(\theta | \vec\lambda)/\ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial\mu\partial \Sigma^2} \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ & -\int \frac{\partial^2}{\partial\mu\partial \Sigma^2} \left[ P(\Gamma+H)^{-1}\right]D_{l} \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta\nonumber\\ &- \frac{1}{2} \int \frac{\partial^2}{\partial\mu\partial \Sigma^2} \left[ P^2 (\Gamma+H)^{-1}\right] \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ = & \frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial\mu\partial \Sigma^2} + \int \frac{(\theta-\mu)}{\Sigma^4}\, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ &+\int \left[ \frac{\sigma^2}{\ensuremath{(\sigma^2+\Sigma^2)}^2}\right]\frac{\partial p_{\rm det}(\theta)}{\partial\theta} \, \frac{p(\theta | \vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} d \theta\nonumber\\ & - \frac{\sigma^2(\sigma^2+2\Sigma^2)}{\Sigma^4\ensuremath{(\sigma^2+\Sigma^2)}^2}\frac{1}{\ensuremath{p_{\rm det}(\vec{\lambda})}}\int (\theta-\mu)p_{\rm det}(\theta) p(\theta | \vec\lambda) d \theta, \nonumber \end{align} where we have used the definition of $D_{i}$ in Eq. \eqref{eq:Dijk} and \eqref{eq:pdetnormalization}. We also notice that, from the definition \begin{align}\label{eq:pdet_theta} p_{\rm det}(\theta) &= \int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty p(\boldsymbol{d}|\theta) d\boldsymbol{d}\\ =&\int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty \frac{1}{\sqrt{2\pi\sigma^2}}\exp\left[- \frac{(\boldsymbol{d}-\theta)^2}{2\sigma^2}\right] d\boldsymbol{d} = \frac{1}{2}\text{erfc}\left(\frac{\ensuremath{\boldsymbol d_\text{th}}-\theta}{\sqrt{2\sigma^2}}\right),\nonumber \end{align} it follows that \begin{align}\label{eq:pdettheta} \frac{\partial p_{\rm det}(\theta)}{\partial\theta} &= \int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty \frac{(\boldsymbol{d}-\theta)}{\sigma^2}p(\boldsymbol{d}|\theta) d\boldsymbol{d} \nonumber\\ =& \frac{1}{\sqrt{2\pi \sigma^2}} \exp\left[- \frac{(\ensuremath{\boldsymbol d_\text{th}}-\theta)^2}{2\sigma^2}\right] \equiv p(\ensuremath{\boldsymbol d_\text{th}}|\theta), \end{align} which can be rearranged to give \begin{align} \label{eq:constraint} \int (\theta -\mu)&\frac{\partial p_{\rm det}(\theta)}{\partial \theta} p(\theta | \vec\lambda) d \theta \\ & = \Sigma^2 \frac{\partial}{\partial \mu}\int p(\ensuremath{\boldsymbol d_\text{th}}|\theta) p(\theta|\vec \lambda)d\theta \nonumber \\ &= \Sigma^2 \frac{\partial p(\ensuremath{\boldsymbol d_\text{th}}|\vec \lambda)}{\partial \mu} = \frac{\Sigma^2}{\ensuremath{(\sigma^2+\Sigma^2)}}(\ensuremath{\boldsymbol d_\text{th}}-\mu)p(\ensuremath{\boldsymbol d_\text{th}}|\vec \lambda).\nonumber \end{align} From Eq. \eqref{eq:pdetl} it also follows that $\partial\ensuremath{p_{\rm det}(\vec{\lambda})}/\partial \mu = p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)$. Using this constraint, and the fact that \begin{align} \frac{\partial p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\partial \mu} &= \int \frac{\partial}{\partial\mu} \big[p_{\rm det}(\theta) p(\theta|\vec\lambda)\big]d\theta \nonumber\\ &= \frac{1}{\Sigma^2}\int (\theta -\mu)p_{\rm det}(\theta) p(\theta | \vec\lambda) d \theta, \end{align} we immediately get \begin{equation}\label{eq:theta_meno_mu} \int (\theta -\mu)p_{\rm det}(\theta) p(\theta | \vec\lambda) d \theta = \Sigma^2 p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda), \end{equation} and, together with \eqref{eq:pdetnormalization} and \eqref{eq:constraint}, that \begin{equation} (\Gamma_\lambda)_{\mu\Sigma^2} = \frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{\partial \mu\partial \Sigma^2}+ \frac{1}{\ensuremath{(\sigma^2+\Sigma^2)}}\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec{\lambda})}{\ensuremath{p_{\rm det}(\vec{\lambda})}}. \end{equation} This agrees with Eq. \eqref{gamma_mumupred} as expected. Finally, we consider the case of $(\Gamma_\lambda)_{\Sigma^2\Sigma^2}$, in which no term in \eqref{eq:gammalambda} vanishes. The first term can be rearranged to give\footnote{The integral over $\theta$ can be evaluated by parts to obtain \begin{align}\label{eq:theta_meno_mu_squared} \int (\theta-\mu)^2 \,& \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta = \Sigma^2 + \frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)\Sigma^4}{\ensuremath{(\sigma^2+\Sigma^2)}} \frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}, \end{align} using \eqref{eq:pdetl} and \eqref{eq:theta_meno_mu} with vanishing boundary terms. } \begin{align}\label{eq:first_gammass} (\Gamma_\text{I})_{\Sigma^2\Sigma^2}&= \frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{(\partial\Sigma^2)^2} -\frac{1}{2\Sigma^4}\\ &+\frac{1}{\Sigma^6}\int (\theta-\mu)^2 \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta\nonumber\\ &=\frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{(\partial\Sigma^2)^2} +\frac{1}{2\Sigma^4}+ \frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)}{\Sigma^2\ensuremath{(\sigma^2+\Sigma^2)}} \frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}.\nonumber \end{align} Using Eq. \eqref{eq:pdetnormalization}, the second term $(\Gamma_\text{II})_{\Sigma^2\Sigma^2}$ is easily found to be \begin{equation}\label{eq:second_gammass} (\Gamma_\text{II})_{\Sigma^2\Sigma^2} = \frac{\sigma^2}{2\Sigma^4} \frac{(\sigma^2+2\Sigma^2)}{\ensuremath{(\sigma^2+\Sigma^2)}^2}. \end{equation} The third term $(\Gamma_\text{III})_{\Sigma^2\Sigma^2}$ contains $D_{ij}$ from Eq.\eqref{eq:Dijk}, which can be rearranged to give \begin{align} D&_{\theta\theta}= \frac{1}{\sqrt{2\pi}\sigma^3}\int_{\ensuremath{\boldsymbol d_\text{th}}}^\infty (\boldsymbol{d}-\theta)^2 \exp\left[-\frac{(\boldsymbol{d}-\theta)^2}{2\sigma^2}\right]d\boldsymbol{d}\nonumber\\ &= \frac{(\ensuremath{\boldsymbol d_\text{th}}-\theta)}{\sqrt{2\pi}\sigma^3}\exp\left[-\frac{(\ensuremath{\boldsymbol d_\text{th}}-\theta)^2}{2\sigma^2}\right] +\frac{1}{2\sigma^2}\text{erfc}\left(\frac{\ensuremath{\boldsymbol d_\text{th}}-\theta}{\sqrt{2\sigma^2}}\right).\nonumber \end{align} The complementary error function can be replaced by $p_{\rm det}(\theta)$ using \eqref{eq:pdet_theta}. With this in mind, we have \begin{align} \label{eq:third_gammass} (\Gamma_\text{III})_{\Sigma^2\Sigma^2} = \frac{\sigma^4}{\ensuremath{(\sigma^2+\Sigma^2)}^4} (\ensuremath{\boldsymbol d_\text{th}}-\mu)\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} +\frac{\sigma^2}{\ensuremath{(\sigma^2+\Sigma^2)}^3}. \end{align} The results follows from rearranging Eqs. \eqref{eq:pdettheta} and \eqref{pdet_def} into \begin{align*} &\int (\ensuremath{\boldsymbol d_\text{th}}-\theta)\exp\left[-\frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)^2}{2\sigma^2}\right] \, \frac{p(\theta | \vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} d \theta \nonumber\\ &\qquad\qquad= -\sigma^3 \sqrt{2\pi} \int \frac{\partial p(\ensuremath{\boldsymbol d_\text{th}}|\theta)}{\partial \ensuremath{\boldsymbol d_\text{th}}}\frac{p(\theta | \vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} d \theta\nonumber\\ &\qquad\qquad = -\frac{\sigma^3 \sqrt{2\pi}}{\ensuremath{p_{\rm det}(\vec{\lambda})}} \int \frac{\partial}{\partial \ensuremath{\boldsymbol d_\text{th}}}\big[p(\ensuremath{\boldsymbol d_\text{th}}|\theta)p(\theta | \vec\lambda) \big]d\theta \nonumber\\ &\qquad\qquad = \frac{\sigma^3 \sqrt{2\pi}}{\ensuremath{(\sigma^2+\Sigma^2)}}(\ensuremath{\boldsymbol d_\text{th}}-\mu)\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}. \nonumber \end{align*} The fourth term $(\Gamma_\text{IV})_{\Sigma^2\Sigma^2}$ is found using \eqref{eq:theta_meno_mu}, and reads \begin{align}\label{eq:fourth_gammass} (\Gamma_\text{IV})_{\Sigma^2\Sigma^2}&- \int \frac{\partial^2}{(\partial\Sigma^2)^2} \left[ P(\Gamma+H)^{-1}\right]D_{\theta} \, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ &= \frac{2\sigma^2\Sigma^2}{\ensuremath{(\sigma^2+\Sigma^2)}^4} (\ensuremath{\boldsymbol d_\text{th}}-\mu) \frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}. \end{align} Finally, the final term $(\Gamma_\text{V})_{\Sigma^2\Sigma^2}$ is found through \eqref{eq:theta_meno_mu_squared} to be \begin{align}\label{eq:fifth_gammass} (\Gamma_\text{V})_{\Sigma^2\Sigma^2}&=- \frac{1}{2} \int \frac{\partial^2}{(\partial\Sigma^2)^2} \left[ P^2 (\Gamma+H)^{-1}\right]\, \frac{p_{\rm det}(\theta)}{\ensuremath{p_{\rm det}(\vec{\lambda})}} p(\theta | \vec\lambda) d \theta \nonumber\\ &= -\frac{\sigma^2}{\Sigma^4} \frac{(\sigma^4 + 3\sigma^2 + \Sigma^2 + 3\Sigma^4)}{\ensuremath{(\sigma^2+\Sigma^2)}^3}\nonumber\\ &\qquad\left[1+ \frac{\Sigma^2}{\ensuremath{(\sigma^2+\Sigma^2)}}(\ensuremath{\boldsymbol d_\text{th}}-\mu)\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}\right]. \end{align} Adding up \eqref{eq:first_gammass} to \eqref{eq:fifth_gammass}, we find \begin{align} \Gamma_{\Sigma^2\Sigma^2}= \frac{\partial^2 \ln \ensuremath{p_{\rm det}(\vec{\lambda})}}{(\partial\Sigma^2)^2} + \frac{1}{2\ensuremath{(\sigma^2+\Sigma^2)}^2} + \frac{(\ensuremath{\boldsymbol d_\text{th}}-\mu)}{\ensuremath{(\sigma^2+\Sigma^2)}^2}\frac{p(\ensuremath{\boldsymbol d_\text{th}}|\vec\lambda)}{\ensuremath{p_{\rm det}(\vec{\lambda})}}, \end{align} which matches \eqref{gamma_mumupred} as expected. This concludes the analytic check. Equation \eqref{eq:gammalambda} can be used to reproduce the predictions \eqref{gamma_mumupred} obtained from the more general definition of the Fisher matrix as an expectation value over data realizations. \subsection{MCMC analysis} \begin{figure} \includegraphics[width=.5\textwidth]{fig5.pdf} \caption{Normally-distributed data with (red) and without (black) selection effects.}\label{fig:gaussian_data} \end{figure} \begin{figure} \centering \includegraphics[width=.49\textwidth]{fig2.pdf} \includegraphics[width=.49\textwidth]{fig4.pdf} \caption{Fisher and MCMC predictions for the toy Gaussian case with (red) and without (black) selection effects.}\label{fig:MCMC_gaussian} \end{figure} The Fisher predictions for the Gaussian-Gaussian model can be compared with MCMC simulations as a further check of the formalism. While this example is arguably textbook material, see for instance Sec. (6) in \citep{Vitale:2020aaz}, we report a few details below for completeness. The results of the present section can be fully reproduced with the codes accompanying the present paper. We simulate synthetic data including $N_\text{tot}=10^5$ observations from the observation model \eqref{eq:pdlambda}, choosing true mean $\mu_\text{tr}=0.5$, true variance $\Sigma^2_\text{tr}=1.0$ and noise variance $\sigma=0.1$. The latter two indicate that each event is taken with a high SNR. We then apply an arbitrary cutoff, imposing that only positive data are observed. That is, $\boldsymbol d_\text{th}=0$, resulting in around $N_\text{det}\sim 70000$ detected events. Figure \ref{fig:gaussian_data} shows the total (black) and detected (red) populations under our specified assumptions. We perform the MCMC analyses in both cases in which we do and do not have selection effects using \texttt{emcee} \citep{Foreman-Mackey:2012any}. As log-likelihood, we take the sum of individual log-likelihoods, \begin{align} \log p(d|\lambda)=- N\log p_\text{det}(\lambda) + \sum_{i}^{N} \log p(d_i|\lambda), \end{align} where $N=N_\text{tot}$ in the case in which we do not include selection effects, and $N=N_\text{det}$ in the case in which we do. We choose flat hyperpriors over a very broad range that includes the true values. The selection function is defined and integrated as in Eq. \eqref{eq:pdetl}, and is nontrivial only in the latter case. The MCMC posteriors for $\mu$ and $\Sigma^2$, in both the cases considered, can be found in Fig. \ref{fig:MCMC_gaussian}. We can then compare the predictions from the population Fisher matrix with what we obtain numerically. To this end, we invert the matrix \begin{equation}\label{eq:Fisher_tot} (\Gamma_\lambda)_{ij} = \begin{pmatrix} \Gamma_{\mu\mu} & \Gamma_{\mu\Sigma^2}\\ \Gamma_{\mu\Sigma^2} & \Gamma_{\Sigma^2\Sigma^2} \end{pmatrix} \end{equation} with entries given in Eq. \eqref{gamma_mumupred} and below. The errors are normalized by the number of events, \begin{equation*} \Delta\mu =\sqrt{N(\Gamma^{-1}_\lambda)_{\mu\mu}}, \quad \Delta\Sigma^2 =\sqrt{N(\Gamma^{-1}_\lambda)_{\Sigma^2\Sigma^2}}\nonumber. \end{equation*} In Fig. \ref{fig:MCMC_gaussian}, the Fisher predictions are shown (in black) to reproduce the widths from the MCMC runs. The same widths can be well approximated by the inverse of the matrix \begin{equation}\label{eq:Fisher_I} (\Gamma_\lambda)_{ij} = \begin{pmatrix} (\Gamma_\text{I})_{\mu\mu} & (\Gamma_\text{I})_{\mu\Sigma^2}\\ (\Gamma_\text{I})_{\mu\Sigma^2} & (\Gamma_\text{I})_{\Sigma^2\Sigma^2}, \end{pmatrix} \end{equation} in which only the first terms in Eq. \eqref{eq:gammalambda} are retained. The predictions are shown in red in Fig. \ref{fig:MCMC_gaussian}, and they overlap well with the full Fisher matrix predictions. Interestingly, retaining the first terms in Eq. \eqref{eq:Fisher_I} is equivalent to setting $\sigma =0$ in Eq. \eqref{eq:Fisher_tot}, which is the limit in which the parameters of the individual events are meaasured perfectly. This suggests that the reason that the approximation in Eq.~\eqref{eq:Fisher_I} works well in this case is because the individual measurements are much more precise than the scale over which the population is varying. We would expect the other terms contributing to Eq.~\eqref{eq:gammalambda} to become increasingly important as the measurement errors become larger. This hypothesis holds exactly in the simplified Gaussian-Gaussian case considered here, but we will revisit it in the GW-like illustration in the next section. \section{Illustration II: an example from gravitational-wave astrophysics} \label{sec:EMRI-model} The spaceborne LISA mission is expected to detect extreme mass ratio inspirals (EMRIs), namely binary systems in which one compact object, typically a stellar remnant, has a mass that is much smaller than the companion, typically a supermassive black hole (SMBH) in the centre of a galaxy \citep{Amaro-Seoane:2007osp, Barack:2009ux, Babak:2017tow}. Inference of the parameters that characterise EMRI systems is expected to provide accurate constraints on the theory of gravity \citep{Gair:2012nm}, as well as an insight into the astrophysical population of and stellar environments surrounding SMBHs \citep{Barausse:2014tra}. LISA might also detect a foreground generated by individually unresolved EMRIs, which would porvide information about the properties of the population of these systems \citep{Gair:2010bx,Gair:2010yu,Sesana:2010wy,Bonetti:2020jku}. The use of LISA observations of EMRIs to provide measurements of the BH mass function in the range probed by LISA has previously been investigated in \citep{Gair:2010yu}, henceforth ``GTV''. GTV assumed that the mass function was described by a power law $p(\theta|\lambda)\equiv p(M|\lambda)\propto M^{\alpha-1}$, with a true value that is close to flat in the log of the masses, i.e., $\alpha \approx 0$. GTV explored the ability of LISA to constrain the parameters of this mass function, using MCMC techniques to carry out hierarchical analyses on an extensive set of populations of simulated events. They found that with 10(1000) events, the spectral index $\alpha$ could be constrained at a level of precision $\Delta\alpha = 0.3 (0.03)$. Here, we will use the population Fisher Matrix formalism described above to predict the precision with which a set of EMRI observations might be able to constrain a power-law mass function. We do not expect to get exactly the same answer here, as the two analyses make a few different simplifying assumptions. In GTV the raw data was taken to be counts of events in a binned analysis, provided by point estimates of the parameters. Selection effects were included in the rate of events in each bin, by accounting for the length of time a source with the given parameters would be observable. This ignores the fact that the time remaining to plunge is constrained by the gravitational wave data. In this analysis we again approximate the observation process, assuming that the data can be reduced to a measurement of a single parameter, but we handle selection effects more carefully. GTV's results was computed ignoring measurement uncertainties in the model used in the analysis, although they did demonstrate consistency between results obtained on simulated data with and without measurement uncertainties. Here we will include measurement uncertainties, but we will approximate these as Gaussian, with equal variance for all observations. We will see that despite these differences in assumptions, the population Fisher matrix is able to predict qualitatively the results observed in GTV without the need for costly computational sampling of many posterior distributions. For a more direct comparison with numerical results we also perform our own MCMC analysis, under identical assumptions to those used to compute the population Fisher matrix, and find even better agreement. All the results in this section can be reproduced with the codes made available with this publication. We draw $N=100$ masses from a power law distribution, \begin{equation}\label{eq:power_law_model} p(M|\alpha) = \frac{\alpha}{M^\alpha_\text{max}-M^\alpha_\text{min}} M^{\alpha-1}, \end{equation} with maximal and minimal observable masses $M_\text{min}=10^4 M_\odot$ and $M_\text{max}=10^7 M_\odot$ and a true value for the spectral index that is exactly flat in the log of the masses, $\alpha=0$. The observed data is assumed to be a point estimate of the log of the mass, which is equal to the true value plus a normally-distributed uncertainty that has a variance $\sigma =0.1$. An arbitrary hard cutoff $\textbf{d}_\text{th}$ corresponding to masses $M\sim 5\times 10^{5} M_\odot$ is imposed, and only events with observed values above this threshold are included in the analysis. This introduces a large selection effect, and leads to only $N_\text{det}=39$ of the original 100 sources being observed. The true (underlying) and observed populations of events are represented in the top panel of Fig.\ref{fig:GWlike_example}. The Fisher-matrix prediction can again be obtained from Eq. \eqref{eq:gammalambda}, this time with $\theta =M$ and $\lambda =\alpha$. For sufficiently simple models, the integrals are analytically tractable. With the power-law distribution considered here, and in the presence of selection effects, this is already not possible. Because of this, we obtain the Fisher prediction in a semi-analytical fashion by solving the integrals with Monte-Carlo methods, i.e., by generating a sufficiently large set of $N_\text{s}$ samples, $\{M_i\}$, from a distribution $p(M|\alpha)$, we can approximate the integral of an arbitrary function $X(M)$ via \begin{equation} \int X(M) p(M|\alpha)dM\approx \frac{1}{N_\text{s}} \sum_i X(M_i). \end{equation} In this case we can draw samples from the distribution~\eqref{eq:power_law_model} directly using the method of inversion. The various terms entering the arguments of Eq.~\eqref{eq:gammalambda} --- $D_{i}$, $D_{ij}$, $P_i$ and $H_{ij}$ --- can be computed analytically. A \texttt{Mathematica} notebook that solves for the arguments of the Fisher-matrix integrals can be found in the accompanying codes. Following this procedure, we find that the Fisher matrix predicts an error $\Delta \alpha = \sqrt{(N_\text{det}\Gamma_{\alpha})^{-1}}\approx 0.19$. When rescaled to 10 observations by multiplying by $\sqrt{39/10}$, the inferred error is $\Delta \alpha\approx 0.37$, which is in good agreement with what was obtained in GTV, despite the differences in the assumptions used in each case. As in the Gaussian-Gaussian example, we find that the dominant contribution comes from the first term of the Fisher matrix, $\Gamma_I$. Once again, this behaviour appears to be driven by the assumed precision of measurement on the individual events. If the noise in the individual measurements, $\sigma$, is increased, the other terms make a larger contribution, although always a sub-dominant contribution for the range of values we have tried. This fact suggests that, when individual events are expected to be characterised with a precision better than the typical lengthscale over which the population prior varies, keeping only the first term in the sum will provide a good estimate for the expected precision of population inference, regardless of the population model chosen. This observation could help to reduce the complexity of using our formalism. We validate the Fisher predictions with an MCMC analysis for the same data set. The MCMC setup is similar to the one used in the first illustrative example. The likelihood is modified, and the selection function is no longer known analytically, but is approximated by a Monte Carlo integral, $p_\text{det}(\alpha)=(1/N_\text{s}) \sum \text{erfc}[(\ensuremath{\boldsymbol d_\text{th}} - M_i)/\sqrt{2\sigma^2}]/2$, with $\{M_i\}$ drawn from the power law distribution $p(M|\alpha)$. The posterior, KDE and $2\sigma$ percentile for the estimate of $\alpha$ are shown in the bottom panel of Fig.\eqref{fig:GWlike_example}. These are compared with the Fisher predictions above, and once again show very good agreement. We have also repeated the calculation in the absence of selection effects, $\textbf{d}_\text{th}\rightarrow - \infty$, and find a similar level of agreement between the Fisher predictions and the MCMC analysis. In this case, the first (dominant) term of the Fisher matrix can be integrated to get the following estimate of precision \begin{equation}\label{eq:Fisher_GWlike_example_analytical} \Gamma_\alpha \approx N_\text{tot}\left(\frac{1}{\alpha^2}-\frac{M_\text{max}^\alpha M_\text{min}^\alpha (\ln M_\text{max}-\ln M_\text{min})^2}{(M_\text{max}^\alpha-M_\text{min}^\alpha)^2}\right). \end{equation} The relative ease in obtaining and evaluating the above expression and the fact that it leads to results that are consistent with independent MCMC analyses showcase how useful our Fisher formalism could be in forecast studies for future detectors, which could nicely complement the source parameter precision estimated with state-of-the-art Fisher codes \citep{Borhanian:2020ypi,Harms:2022ymm}. We expect that the accuracy of the population Fisher matrix prediction should improve as the number of observations included in the analysis, $N_\text{tot}$, increases. We assess this by comparing the result of MCMC analyses of data sets with increasing numbers of observations to the population Fisher matrix. We do this first for the case without selection effects, so that we can make use of the analytical prediction given above. These results are shown in Fig. \ref{fig:Da_vs_N} as $N_\text{tot}$ is varied from 2 to 30 events. For each $N_\text{tot}$, we repeat the MCMC analysis several times to allow us to estimate the variance in the posterior width between different runs. This variance is larger when there are fewer events, as expected, and so more MCMC analyses were performed for lower $N_\text{tot}$'s to ensure the variance was accurately characterised. We find that for $N_\text{tot}\gtrapprox 10$ the (simplified) Fisher widths agree well with numerical simulations. For $N_\text{tot}< 10$, the differences are progressively more pronounced, but the variance in the MCMC widths also increases, and the Fisher matrix prediction is usually within the range spanned by the MCMC runs. The agreement becomes worse for very small numbers of observations, consistent with the expectation that this is an approximation valid in the limit of large $N_\text{tot}$. Finally, we check whether a similar level of agreement is seen in the case when the observations are subject to selection effects. For this, we obtain the population Fisher matrix prediction (dashed orange line) by rescaling the $\Delta\alpha$ prediction in Fig. \ref{fig:GWlike_example} by a factor $N_\text{det}^{-1/2}$. These results are also shown in Fig. \ref{fig:GWlike_example}. We see a similar trend --- the population Fisher matrix is very accurate for $N_\text{tot} > 10$, but the accuracy diminishes for very small numbers of observations, as expected. \begin{figure*} \centering \includegraphics[width=0.8\textwidth]{popfish_examples.pdf} \caption{\emph{Top panel:} distribution of masses for the underlying true population of Sec. \ref{sec:EMRI-model} (red) and for the observed population (dark gray). The true population is composed of $N=100$ events drawn from a power-law model that is flat in the logarithm of the masses. The threshold has been arbitrarily set at $\sim 5\times 10^5 M_\odot$, leading to 39 events actually being observed. \emph{Bottom panel:} MCMC posterior distribution for the spectral index describing the mass distribution. The histogram and KDE are compared against the Fisher estimate obtained as described in the text, demonstrating very good agreement between the two.} \label{fig:GWlike_example} \end{figure*} \begin{figure} \centering \includegraphics[width=\linewidth]{Da_vs_N.pdf} \caption{Fisher predictions for the width of the spectral index $\alpha$ as a function of the number of observed events $N$, compared to the range of measured uncertainties obtained over a set of MCMC runs (red and black points with error bars). The Fisher matrix prediction is approximated with Eq. \eqref{eq:Fisher_GWlike_example_analytical}. The agreement between the Fisher matrix predictions and the MCMC results is very good, especially if the number of events is increased beyond $N\sim 10$}. \label{fig:Da_vs_N} \end{figure} \section{Conclusions} \label{sec:conclusions} The Fisher information matrix is a valuable tool for estimating the precision attainable in parameter inference, especially in contexts where the cost of doing full posterior estimation via Bayesian sampling is highly expensive~\citep{Vallisneri:2007ev}. The Fisher matrix has been widely used in GW analyses to make forecasts for the precision with which the \emph{source} parameters describing individual GW signals can be estimated by current and future detectors. In this paper we have extended the Fisher matrix concept to the estimation of the parameters characterising the \emph{population} from which a set of observed sources is drawn. Our result was based on Eq. \eqref{eq:popfishgen}, which is the most general definition for the population Fisher matrix. However, we have obtained a simpler to evaluate expression, Eq. \eqref{eq:gammalambda}, which is valid when the signal-to-noise ratio of the individual events making up the population is high. We have tested this result both analytically and against numerical Monte-Carlo results for a reference Gaussian model (Sec. \ref{sec:gaussian-gaussian}) and for a more GW-like scenario (Sec. \ref{sec:EMRI-model}), in which we are using GW events to estimate the slope of a power-law population. We find that Eq. \eqref{eq:gammalambda} is generally in very good agreement with the numerical results, for a sufficiently large number of observations. In this case sufficiently large was only $O(10)$. Results for the power-law population case can be compared to previous results in the literature \citep{Gair:2010yu}, and are found to be in very good agreement. We conclude that we can reproduce the results of extensive sets of computationally expensive MCMC simulations much more cheaply, while also including a more careful treatment of selection effects. In addition, we have found that the first term in the sum that gives the population Fisher matrix, $(\Gamma_I)_{ij}$ in Eq. \eqref{eq:gammalambda}, is enough to reproduce well the precision attainable by the full Fisher matrix in both of the examples considered. This is most likely due to the fact that the noise-induced uncertainty in the parameter measurements of each individual event, $\sigma$, is much smaller than the scale on which the population model varies, and so measurement errors are essentially ignorable. This result could be useful to further reduce the computational cost of computing the population Fisher matrix in many contexts. The results presented in this paper represent the first attempt at describing population inference within a Fisher formalism for generic population models, and with a likelihood that takes into account selection effects in the way of \citep{Mandel:2018mve}. The formalism herein developed can be used to obtain forecasts for the precision of population analyses with future ground-based and spaceborne detectors, which are expected to detect many thousands (or even millions) of signals. Obtain such population inference forecasts in specific contexts of relevance to current and future observations is one possible future direction for the present project. Finally, it would be interesting to generalize the results of \citep{Cutler:2007mi} and \citep{Antonelli:2021vwg} to assess inference biases on population parameters from waveform modelling errors or confusion noise. \newline \noindent \textit{Data Availability Statement.} The results in this paper use \texttt{numpy} \citep{harris2020array}, \texttt{matplotlib} \citep{Hunter:2007}, \texttt{seaborn} \citep{Waskom2021}, \texttt{emcee} \citep{Foreman-Mackey:2012any}, \texttt{arviz} \citep{arviz_2019}. The results can be fully reproduced with codes made publicly available at \url{https://github.com/aantonelli94/PopFisher}. \bibliographystyle{mn2e}
\section{Introduction} Galaxy clusters represent the densest environments and trace the most massive dark matter halos in the Universe \citep{Kravtsov2012}. It is well known that massive elliptical galaxies are enhanced in clusters \cite[e.g.,][]{Dressler1980,Peng2010}. However, it remains unclear whether and how the dense environment affects their formation and quenching. To answer this question, we need to trace them back to the cosmic epoch when they are still actively forming stars. During the last decade, a number of young clusters and protoclusters have been found at $z > 2$ \citep[e.g.,][]{Wang2016, Casey2016, Miller2018, Oteo2018}, the peak of cosmic star formation history \citep[][]{Madau2014}. Contrary to mature clusters in the local Universe, which are dominated by massive quiescent galaxies in their cores \citep[e.g.,][]{Dressler1980}, these young clusters and protoclusters host a significant population of massive star-forming galaxies. In particular, observations have revealed the ubiquity of starbursts in these high-$z$ (proto)clusters. For example, \citet{Miller2018} observed a protocluster at $z=4.3$ hosting at least 14 gas-rich galaxies in a projected region of 130 kiloparsecs (kpc) in diameter with a total star formation rate (SFR) of 6000 M$_\odot$ yr$^{-1}$; \cite{Wang2016} identified an X-ray cluster at $z=2.51$ with a SFR of about 3400 M$_\odot$ yr$^{-1}$ in the central 80 kpc region. Many observations have found starbursting overdensities in the early Universe \citep[e.g.,][]{Blain2004,Casey2015,Casey2016,Oteo2018}, which are in line with the expectation of the hierarchical growth of structures associated with an enhancement of star formation or starburst galaxies in dense environments \citep{Dannerbauer2014,Dannerbauer2017,Hayashi2016}. However, the triggering mechanism of high-$z$ starbursts in dense environments is unclear. Observations have revealed evidence of merger and/or interactions in these starbursts in (proto)clusters \citep[e.g.,][]{Coogan2018,Hodge2013}, while simulations show the inefficiency of enhancing star formation in high-$z$ galaxies, even in the event of the most drastic gas-rich major mergers \citep{Fensch2017}. Meanwhile, starburst galaxies in dense environments such as GN20, similar to those in the field, contain a rotating gas disk and do not exhibit major merger evidence \citep{Hodge2012}. To understand the origin of starbursts in dense environments in the high-$z$ Universe, spatially and spectroscopically resolved measurements of their gas kinematic are needed. However, the large cost of high-resolution and high-sensitivity observations of galaxies in the early Universe has always been a limitation for in-depth kinematic studies of high-$z$ starbursts in (proto)clusters. One of the most distant young clusters, CLJ1001 at $z_{\rm spec}=2.51$ (\citealp{Wang2016}, W16, hereafter; see also \citealp{Casey2015,Daddi2017,Wang2018,Cucciati2018,Gomez-Guijarro2019,Champagne2021}), exhibits extended X-ray emission and encompasses an overdensity of massive star-forming galaxies, with a total SFR of $\sim$ 3400 $M_{\odot}$yr$^{-1}$ in its 80 kpc core (the cluster virial radius is $R_{\rm 200c} \sim 340$ kpc) and a gas depletion time of $\sim$ 200 Myr. CLJ1001 is in the phase of rapid transformation from a protocluster to a mature cluster, which makes it an ideal laboratory to study the connection between the triggering mechanism of cluster starbursts and their dense environment. Revealing the physical origin of cluster starbursts is key to uncovering the formation and quenching mechanisms of massive galaxies in clusters, which has been a longstanding problem in extragalactic studies. With these aims, we have conducted high-resolution CO $J= 3-2$ emission line (CO(3$-$2), hereafter) observations with the Atacama Large Millimeter/submillimeter Array (ALMA) toward the cluster core of CLJ1001 (Fig. \ref{fig1}). Thanks to newly obtained ALMA high resolution data, in this paper we study the molecular gas spatial distribution and resolved kinematics of two massive starburst galaxies (SBs) and two star-forming main sequence galaxies (MSs) in the galaxy cluster CLJ1001. This paper is organized as follows: in $\S$\ref{Sec:data}, we introduce the ALMA CO(3$-$2) line and 3.2 mm continuum observations. In $\S$\ref{Sec:Data Analysis}, we study the two cluster SBs and two cluster MSs involved in this work and analyze the structural properties of their molecular gas, CO excitation, dust mass, molecular gas mass, and gas kinematics. In $\S$\ref{Sec:results}, we present the results focusing on their molecular gas kinematics and their gas disk stabilities. In $\S$\ref{Discussion}, we discuss the triggering mechanism of the cluster SBs and the drivers of the low turbulent gas in the two cluster SBs. We summarize the main conclusions in $\S$\ref{Sec:summary}. We adopt a \cite{Chabrier2003} initial mass function (IMF) to estimate the SFR and stellar mass. We assume cosmological parameters of $H_{0}$ = 70 km s$^{-1}$ Mpc$^{-1}$, $\Omega_{M}$ = 0.3, and $\Omega_{\Lambda}$ = 0.7. When necessary, data from the literature have been converted with a conversion factor of SFR \citep[][IMF]{Salpeter1955} = 1.7 $\times$ SFR \citep[][IMF]{Chabrier2003} and M$_*$ \citep[][IMF]{Salpeter1955} = 1.7 $\times$ M$_*$ \citep[][IMF]{Chabrier2003}. \section{ALMA observations} \label{Sec:data} We carried out observations of the CO(3$-$2) transitions at the rest-frame frequency of $345.796 \,{\rm GHz}$ ($98.630 \,{\rm GHz}$ in the observed frame) for the galaxy cluster CLJ1001 at $z=2.51$ with ALMA band-3 receivers. These ALMA Cycle 4 observations (Project ID: 2016.1.01155.S; PI: T.~Wang) were taken between 2016 November and 2017 August with a total observing time, including calibration and overheads, of approximately 7 hours. We adopted two different array configurations to obtain reliable measurements of total flux and resolved kinematics information: a more compact array configuration (C40-4) observing low-resolution large spatial scales, while a more extended array configuration (C40-7) observing high-resolution small spatial scales, with an on-source time of 1.6 hours and 2.2 hours, respectively. The observations were performed with a single pointing covering a field of view (FOV) of $\sim$ 53$^{\prime\prime}$, corresponding to the full-width at half power (FWHP) of the ALMA primary beam. The calibration was performed using version 5.3.0 of the Common Astronomy Software Application package (CASA) \citep{mcmullin} with a standard pipeline. We carried out the data reduction in two cases. Case 1 was designed to obtain a high-resolution cube of CO(3$-$2) line. To this end, we first combined two configurations' data to form a single visibility table (UV table), using visibility weights of the compact configuration dataset (C40-4) to the extended configuration dataset (C40-7) proportional to 1:4. Imaging was carried out using the $tclean$ task with 0.04$^{\prime\prime}$ pixels and a channel width of 30 km s$^{-1}$ with a Briggs weighting of robust = 0.5 scheme. The resulting data cube has a synthesized beam size of $0.31^{\prime\prime} \times 0.25^{\prime\prime}$ ($\sim2.5$ kpc $\times$ 2.0 kpc in physical scale) with an rms sensitivity of $\sim 110-120~\mu$Jy beam$^{-1}$ per channel at the phase center. Case 2 was designed to derive the total flux of our sources. To this end, we combined two configurations' data with visibility weights proportional to 1:1. We used 0.2$^{\prime\prime}$ pixels and a channel width of 90 km s$^{-1}$ with a uvtaper of 1$^{\prime\prime}$ and a natural weighting scheme for imaging. The natural weighting provides a better sensitivity, enabling us to measure the total flux more robustly. The resulting data cube has a synthesized beam size of $1.54^{\prime\prime} \times 1.37^{\prime\prime}$ ($\sim12.3$ kpc $\times$ 11.0 kpc in physical scale) and a central rms level of $\sim 60~\mu$Jy beam$^{-1}$ per channel. We also created the observed 3.2 mm continuum maps using Briggs weighting (robust $=$ 0.5) after excluding the frequency range of the CO(3$-$2) line. We used the same method as for the CO(3$-$2) cubes to create two continuum maps with different angular resolutions. To estimate the continuum fluxes of our sources, we created continuum maps with a combination of two configurations' data with visibility weights proportional to 1:1. The rms level is $\sim 4.3~\mu$Jy beam$^{-1}$ in the map of $1.12^{\prime\prime} \times 1.06^{\prime\prime}$ angular resolution ($\sim9.0$ kpc $\times$ 8.5 kpc in physical scale). To measure the dust continuum sizes of our sources, we created continuum maps with a combination of two configurations' data with visibility weights of the compact configuration dataset (C40-4) to the extended configuration dataset (C40-7) proportional to 1:4. The rms level is $\sim 6.9~\mu$Jy beam$^{-1}$ in the map of $0.30^{\prime\prime} \times 0.24^{\prime\prime}$ angular resolution ($\sim2.4$ kpc $\times$ 1.9 kpc in physical scale). \begin{figure*}[h!] \begin{center} \includegraphics[width=1\textwidth]{img/fig1.pdf} \end{center} \vspace{-0.6truecm} \caption{Galaxy cluster CLJ1001 at $z=2.51$ and the four member galaxies. \textbf{Left}: Sky distributions of member galaxies around the cluster center. Red circles mark the two SBs and two MSs with the brightest CO(3$-$2) luminosities ($S/N\gg10$; $S/N\sim30$ for the two SBs) among all CO(3$-$2) detections (golden squares) in the central region of the cluster. The background is the $K_{\rm s}$-band image from the UltraVista survey with a size of 70$^{\prime\prime}$ $\times$ 70$^{\prime\prime}$. The white cross shows the cluster center. The scale bar indicates half of the virial radius ($R_{\rm 200c}$ $\sim 340$ kpc) of the cluster. The large green circle denotes the ALMA FOV, corresponding to FWHP $\sim$ 53$^{\prime\prime}$ of the ALMA antennas' primary beam at 98.63 GHz. \textbf{Middle}: Velocity-integrated intensity map ($Moment~0$) of CO(3$-$2) (golden contours) detected by ALMA overlaid on the \textit{HST}/F160W image of the two SBs and two MSs. Each panel is 2.5$^{\prime\prime}$ $\times$ 2.5$^{\prime\prime}$. The angular resolution is $0.31^{\prime\prime} \times 0.25^{\prime\prime}$ (gray-filled ellipse in the bottom-left corner). The contour levels start at $\pm3\sigma$ and increase in steps of $\pm3 \sigma$, where positive and negative contours are solid and dashed, respectively. The red cross in each panel denotes the centroid of the stellar emission determined from the \textit{HST}/F160W image. The derived integrated fluxes are presented in Table \ref{tab1}. \textbf{Right}: CO(3$-$2) line spectra of the four member galaxies. The CO lines are binned at 90 km s$^{-1}$, and the velocity range is shaded in green over which $Moment~0$ maps are integrated. The best-fit single Gaussian profiles are overlaid in red.} \label{fig1} \vspace{-12pt} \end{figure*} \begin{table*}\footnotesize \caption{Physical properties of the two SBs and two MSs in CLJ1001.} \centering \begin{tabular}{c cccccc} \hline \hline \noalign{\medskip} ID& $^a$ID$_{K_{\rm s}}$ &R.A.&Decl. & $z_{\rm CO(3-2)}$ & $I_{\rm CO(3-2)}$ & FWHM$_{\rm CO(3-2)}$ \\ && (J2000)&(J2000)& & (Jy km s$^{-1}$) & (km s$^{-1}$) \\ \noalign{\medskip} \hline \noalign{\smallskip} SB1 & 131077&10:00:56.95& +02:20:17.2& 2.494 &1.273 $\pm$ 0.036& 547 $\pm$ 38 \\ SB2 & 130891&10:00:57.56&+02:20:11.2& 2.512 &0.764 $\pm$ 0.028& 324 $\pm$ 17 \\ MS1 &130949&10:00:56.86&+02:20:08.7& 2.503 &0.537 $\pm$ 0.023& 453 $\pm$ 47 \\ MS2 &130901&10:00:57.39&+02:20:10.8& 2.507 &0.242 $\pm$ 0.024& 472 $\pm$ 103 \\ \hline \\ \hline \hline $^{b}$ log $M_{\rm *}$ & $^{c}$log $L_{\rm IR}$ &$^{d}$SFR& $^{e} L^{\prime}_{\rm CO(1-0)}$& $L^{\prime}_{\rm CO(3-2)}$&$^{f} R_{\rm 31}$&$S_{\rm 3.2mm}$ \\ ($M_{\odot}$)& ($L_{\odot}$)&($M_{\odot}$yr$^{-1}$) & (10$^{10}$ K km s$^{-1}$ pc$^{2}$) & (10$^{10}$ K km s$^{-1}$ pc$^{2}$) && ($\mu$Jy) \\ \hline 10.93 $\pm$ 0.15& 12.95$^{+0.04}_{-0.04}$ & 1314 $\pm$ 122 & 4.9 $\pm$ 0.4& 4.10 $\pm$ 0.12& 0.84 $\pm$ 0.07 &82 $\pm$ 10 \\ 10.83 $\pm$ 0.15 & 12.70$^{+0.16}_{-0.26}$ & 751 $\pm$ 338 &3.2 $\pm$ 0.3& 2.49 $\pm$ 0.09& 0.78 $\pm$ 0.08&38 $\pm$ 10 \\ 11.36 $\pm$ 0.15& 12.29$^{+0.16}_{-0.25}$ & 292 $\pm$ 128 & 2.3 $\pm$ 0.2& 1.74 $\pm$ 0.07 & 0.76 $\pm$ 0.07&62 $\pm$ 12 \\ 11.35 $\pm$ 0.15&12.30$^{+0.20}_{-0.40}$ & 300 $\pm$ 179 & 1.8 $\pm$ 0.3& 0.79 $\pm$ 0.08& 0.44 $\pm$ 0.08&18 $\pm$ 3 \\ \hline \\ \hline \hline \multicolumn{1}{c} {$^{g}M_{\rm dust}$}&\multicolumn{2}{c} {$^{h}$CO(3$-$2) Size ($UV$ $plane$)}&\multicolumn{2}{c} {$^{i}$CO(3$-$2) size ($image$ $plane$)} &\multicolumn{2}{c} {$^{j}$3.2 mm size (image plane)}\\ \multicolumn{1}{c} {($10^{8}$$M_{\odot}$)}&\multicolumn{2}{c} {(kpc $\times$ kpc)}& \multicolumn{2}{c} {(kpc $\times$ kpc)} & \multicolumn{2}{c} {(kpc $\times$ kpc)} \\ \noalign{\medskip} \hline \noalign{\smallskip} \multicolumn{1}{c} {16.0 $\pm$ 1.5}&\multicolumn{2}{c} {(2.05 $\pm$ 0.10) $\times$ (0.98 $\pm$ 0.11)}&\multicolumn{2}{c} {(2.10 $\pm$ 0.31) $\times$ (1.43 $\pm$ 0.32)}&\multicolumn{2}{c} {(1.87 $\pm$ 0.54)$\times$(1.27 $\pm$ 0.54)} \\ \multicolumn{1}{c} {10.8 $\pm$ 2.2}&\multicolumn{2}{c} {(1.42 $\pm$ 0.11) $\times$ (1.14 $\pm$ 0.17)}&\multicolumn{2}{c} {(1.70 $\pm$ 0.30) $\times$ (1.40 $\pm$ 0.32)}& \multicolumn{2}{c} {(...)}\\ \multicolumn{1}{c} {8.3 $\pm$ 4.8}&\multicolumn{2}{c} {(1.77 $\pm$ 0.20) $\times$ (1.56 $\pm$ 0.33)}&\multicolumn{2}{c} {(2.13 $\pm$ 0.32) $\times$ (1.79 $\pm$ 0.29)}&\multicolumn{2}{c} {(...)}\\ \multicolumn{1}{c} {4.3 $\pm$ 1.0}&\multicolumn{2}{c} {(0.79 $\pm$ 0.20) $\times$ (0.79 $\pm$ 0.37)}&\multicolumn{2}{c} {(2.32 $\pm$ 0.60) $\times$ (0.90 $\pm$ 0.53)}&\multicolumn{2}{c} {(...)}\\ \hline \end{tabular} \tablefoot{$^{a}$IDs from the $K_{\rm s}$-selected catalog \citep{Muzzin2013}. $^{b}$$M_{\rm *}$, derived from the SED fitting in \citetalias{Wang2016} (scaled to a \citealt{Chabrier2003} IMF by a factor 1.7). $^{c}$Total infrared luminosity, derived from the infrared SED fitting with \texttt{CIGALE}. $^{d}$SFR, derived from $L_{\rm IR}$ using \cite{kennicutt} (${\rm SFR}=\,1.49 \times 10^{-10} L_{\rm IR}$; \citealt{Chabrier2003} IMF). $^{e}L^{\prime}_{\rm CO(1-0)}$, from \citetalias{Wang2018}. $^{f}$CO excitation: $R_{\rm 31} = L^{\prime}_{\rm CO(3-2)}/L^{\prime}_{\rm CO(1-0)}$. $^{g}M_{\rm dust}$, derived from the infrared SED fitting with \texttt{CIGALE}. $^{h}$The best-fit semi-major and semi-minor axes of CO(3$-$2) in the $UV$ plane. $^{i}$The deconvolved semi-major and semi-minor axes of CO(3$-$2) in the image plane. $^{j}$The deconvolved semi-major and semi-minor axes of 3.2 mm dust continuum emission in the image plane.} \label{tab1} \end{table*} \begin{table*}\footnotesize \caption{Gas properties of the two SBs and two MSs.} \centering \begin{tabular}{ c c c c c} \hline\hline \noalign{\smallskip} \multicolumn{1}{c} {} & SB1 & SB2 & MS1 & MS2\\ \noalign{\medskip} \hline \noalign{\smallskip} $^{a} \alpha_{\rm CO}(Z)$ ($M_{\odot}$/(K km s$^{-1}$ pc$^{2}$)) & 4.09 & 4.10 & 4.06 & 4.06 \\ $^{b} M_{\rm gas,CO}$ ($10^{10}$$M_{\odot}$) & 20.2 $\pm$ 1.7& 13.3 $\pm$ 1.4 & 9.2 $\pm$ 0.9 & 7.4 $\pm$ 1.1\\ $^{c} f_{\rm gas,CO}$ & 0.70$^{+0.09}_{-0.06}$ & 0.66$^{+0.10}_{-0.07}$ & 0.29$^{+0.09}_{-0.06}$ & 0.25$^{+0.08}_{-0.06}$\\ $^{d} t_{\rm dep,CO}$ (Gyr)& 0.15 $\pm$ 0.02 & 0.18 $\pm$ 0.08 & 0.32 $\pm$ 0.14 & 0.25 $\pm$ 0.15 \\ \\ $^{e}\delta_{\rm GDR}$ & 126 $\pm$ 16 & 123 $\pm$ 28 & 110 $\pm$ 65 & 171 $\pm$ 47\\ $^{f} M_{\rm gas,GDR}$ ($10^{10}$$M_{\odot}$) & 17.9 $\pm$ 6.4 & 12.8 $\pm$ 5.1 & 7.6 $\pm$ 5.1 & 4.0 $\pm$ 1.7\\ $ f_{\rm gas,GDR}$ & 0.68$^{+0.12}_{-0.10}$ & 0.65$^{+0.13}_{-0.11}$ & 0.25$^{+0.15}_{-0.14}$ & 0.15$^{+0.08}_{-0.07}$\\ $ t_{\rm dep,GDR}$ (Gyr) & 0.14 $\pm$ 0.05& 0.17 $\pm$ 0.10& 0.26 $\pm$ 0.21& 0.13 $\pm$ 0.10\\ \\ $^{g} M_{\rm gas,3.2mm}$ ($10^{10}$$M_{\odot}$) & 22.7 $\pm$ 6.4 & 10.4 $\pm$ 3.9 & 17.1 $\pm$ 5.5 & 5.1 $\pm$ 1.6\\ $ f_{\rm gas,3.2mm}$ & 0.73$^{+0.10}_{-0.08}$ & 0.61$^{+0.13}_{-0.11}$ & 0.43$^{+0.13}_{-0.11}$ & 0.18$^{+0.08}_{-0.07}$\\ $ t_{\rm dep,3.2mm}$ (Gyr) & 0.17 $\pm$ 0.05& 0.14 $\pm$ 0.08& 0.59 $\pm$ 0.32& 0.17 $\pm$ 0.11\\ \hline \end{tabular} \tablefoot{The molecular gas masses are estimated based on the CO(1$-$0) emission line using metallicity-dependent conversion factors, gas-to-dust ratio, and 3.2mm dust continuum emission. $^{a}$CO-to-H$_2$ conversion factor ($\alpha_{\rm CO}(Z)$) from \citetalias{Wang2018}, calculated based on the mass-metallicity relation. $^{b}$Total molecular gas mass, computed as $M_{\rm gas,CO} = \alpha_{\rm CO}(Z) L_{\rm CO(1-0)}^{\prime}$. $^{c}$Gas fraction: $f_{\rm gas} = M_{\mathrm{gas}}/(M_{\mathrm{star}} + M_{\mathrm{gas}})$. $^{d}$Gas depletion time: $t_{\rm dep} = M_{\mathrm{gas}}/SFR$, which is the inverse of the star formation efficiency (SFE $= 1/t_{\rm dep}$). $^{e}$Gas-to-dust mass ratio, computed based on the $\delta_{\rm GDR}-Z$ relation (Eq.~\ref{GDR}). $^{f}$$M_{\rm gas,GDR}$, computed based on the gas-to-dust ratio (Eq.~\ref{Mgas}). $^{g}$$M_{\rm gas,3.2mm}$, computed based on the Rayleigh-Jeans tail dust continuum (Eq.~\ref{RJ}).} \label{tab3} \end{table*} \section{Data analysis} \label{Sec:Data Analysis} \subsection{Starburst and main-sequence galaxies} Four member galaxies in the cluster CLJ1001 have a CO(3$-$2) line detected with high significances ($35\sigma$, $27\sigma$, $23\sigma$, and $10\sigma$; see Table \ref{tab1}), allowing a detailed study of their kinematics. They are all massive star-forming galaxies with stellar masses of $\log(M_*/M_\odot)>10.8$, and they are located in the central 80 kpc region of the cluster (Fig. \ref{fig1}). These include two SBs and two MSs, with the SBs exhibiting specific star-formation rates (sSFR $\equiv$ SFR$/M_*$) more than three times the star-forming main-sequence \citep[SFMS;][]{Schreiber2015}. According to their distances from the SFMS ($\Delta$MS = SFR/SFR$_{\rm MS}$ $\sim$ 5.8, 3.9, 0.7, and 0.7, where SFR$_{\rm MS}$ is the SFR of a galaxy on the MS with the same stellar mass), the four galaxies were then named SB1, SB2, MS1, and MS2, respectively. The stellar masses were derived from spectral energy distribution (SED) fitting \citep[\citetalias{Wang2016};][W18, hereafter]{Wang2018}. The SFRs were calculated from the infrared luminosity \citep{kennicutt}\footnote{${\rm SFR}=\,1.49 \times 10^{-10} L_{\rm IR}$ in \cite{kennicutt}, which uses a \citealt{Kroupa2001} IMF. Here we neglect the small differences between the \citealt{Kroupa2001} IMF and the \citealt{Chabrier2003} IMF, and assume the same SFRs derived based on the two IMFs.}, which was derived from our infrared SED fitting (updated version of \citetalias{Wang2016} and \citetalias{Wang2018} with the addition of 3.2mm data, see $\S$\ref{dustmass}). The resulting SFRs of these four galaxies are consistent with those derived from the infrared luminosity of \citetalias{Wang2016} and \citetalias{Wang2018} within a 1$\sigma$ confidence level. We note that all data presented here have been converted to a \citealt{Chabrier2003} IMF. The results are presented in Table \ref{tab1}. The intense star formation of the two SBs shows that they are rapidly building up their stellar masses at a rate of 1314 $\pm$ 122 $M_{\odot}$yr$^{-1}$ and 751 $\pm$ 338 $M_{\odot}$yr$^{-1}$ (see Table \ref{tab1}). The CO(3$-$2) emission of all four galaxies reveals continuous velocity gradients in the observed gas rotation velocity fields ($Moment~1$) and position-velocity (PV) diagrams (Fig. \ref{fig2}). The observed velocity dispersion fields ($Moment~2$) exhibit central dispersion peaks. These are consistent with the kinematics of rotating disks. \subsection{Structural properties of the molecular gas} We measured the molecular gas structural properties of the four cluster members. To avoid uncertainties from the imaging process, we derived the source sizes with the visibility CO(3$-$2) data in the $UV$ plane by fitting an elliptical Gaussian (task $uvmodelfit$). The best-fit semi-major and semi-minor axes for the SB1, SB2, MS1, and MS2 are shown in Table \ref{tab1}. As a comparison, we also performed a two-dimensional (2D) elliptical Gaussian fit on the high-resolution $Moment~0$ map of CO(3$-$2). The deconvolved semi-major and semi-minor axis values were broadly consistent with our $UV$ analysis. We note that MS2 shows different sizes in the imaging and $UV$ analyses, which could be caused by its lowest significance ($10\sigma$) of (3$-$2) detections among the four sources. The two SBs with higher significances of CO(3$-$2) detections than the two MSs show intrinsic sizes consistent in both methods within the error. For the dust size, we only successfully measured the SB1 in the image plane, which has the highest signal-to-noise ratio ($S/N\sim8$) of 3.2 mm dust continuum emission among the four sources. The dust size of the SB1 was measured by a 2D elliptical Gaussian fit on the high-resolution $Moment~0$ map at 3.2 mm. We found that the dust size and molecular gas size of the SB1 are consistent within the error (see Table \ref{tab1}). Assuming a lack of significant size variation between the CO and dust continuum \citep[e.g.,][]{Puglisi2019}, we compared the molecular gas size (and/or dust size) of our sources with the literature. The typical dust size for galaxies at $z=2.5$ with a stellar mass of $10^{10.9} M_\odot$ is $0.99\pm0.34$ kpc in radius from the GOODS-ALMA 1.1 mm survey \citep[Figure 15 in][]{Gomez-Guijarro2021}. The dust distribution in the GOODS-ALMA sample was considered to be compact relative to the stellar distribution \citep{vanderWel2014} in \cite{Gomez-Guijarro2021}. By further using the submillimeter compactness criterion \citep{Puglisi2021}, which is used to select compact galaxies, defined as a ratio of the stellar size \citep{vanderWel2014} larger than the molecular gas size by a factor of 2.2, we conclude that the two SBs do not show compact gas disks. \subsection{CO excitation} The CO(3$-$2) line flux was measured from a 2D Gaussian fitting on the velocity-integrated intensity map ($Moment~0$) with the velocity range shown in Fig. \ref{fig1}. Then we calculated its luminosity $L_{\mathrm{CO(3-2)}}^{\prime}$ \citep{Solomon2005}. The CO(1$-$0) line luminosity $L_{\rm CO(1-0)}^{\prime}$ has already been obtained with the Karl G. Jansky Very Large Array (JVLA) observations in \citetalias{Wang2018}. Therefore, we can derive the CO excitation $R_{\rm 31}$ with the CO(3$-$2) to CO(1$-$0) line luminosity ratio ($R_{\rm 31} = L_{\rm CO(3-2)}^{\prime}/L_{\rm CO(1-0)}^{\prime}$). The values are listed in Table \ref{tab1}. The $R_{\rm 31}$ of the two SBs is around 0.8. It has been shown that starburst galaxies generally have higher CO excitation rates relative to main-sequence objects \citep[e.g.,][]{Valentino2020,Puglisi2021}. However, there exists a large variation in the $R_{\rm 31}$ values of high-$z$ galaxies across the literature. In \cite{Riechers2020}, the median $R_{\rm 31}$ is $0.84 \pm 0.26$ for MS galaxies at $z=2-3$ in the VLASPECS survey, while \cite{Daddi2015} showed an $R_{\rm 31}$ of $0.42 \pm 0.07$ for MS galaxies at $z\sim1.5$, which is a factor of two smaller. In addition, \cite{Sharon2016} presented an $R_{\rm 31}$ of $0.78 \pm 0.27$ for dusty submillimeter galaxies at $z \sim$ 2, while \cite{Harrington2018} reported an $R_{\rm 31}$ of only 0.34 for the strongly lensed hyper-luminous infrared galaxies at $z \sim$ 1-3. For starburst galaxies in protoclusters at similar redshifts, they also exhibit a broad range of $R_{\rm 31}\sim0.5-1.2$ (e.g., HXMM20 at $z=2.6$ in \citealp{Gomez-Guijarro2019} and BOSS 1441 at $z=2.3$ in \citealp{Li2021}). Therefore, the measured $R_{\rm 31}$ values for the two SBs are consistent with a wide range of values observed in other galaxies (including MSs and starbursts) at similar redshifts \citep[e.g.,][]{Boogaard2020,Aravena2014,Bothwell2013,Riechers2010}. The higher-$J$ CO transition observations (e.g., CO(5$-$4) and CO(6$-$5) probing warm and dense molecular gas) are necessary to establish whether the gas in the two SBs is highly excited as expected in starburst galaxies, or less excited as in MS galaxies. \subsection{Dust mass}\label{dustmass} To obtain the dust mass, $M_{\rm dust}$, we performed the infrared SED fitting with \texttt{CIGALE}\footnote{\texttt{CIGALE:} \url{https://cigale.lam.fr}} \citep[Code Investigating Galaxies Emission;][]{Burgarella2005,Noll2009,Boquien2019}. We fit data from 24 $\mu$m up to the millimeter wavelengths (see the data at 24 $\mu$m, 100 $\mu$m, 160 $\mu$m, 870 $\mu$m, and 1.8 mm in \citetalias{Wang2016}, and the data at 3.2 mm in Table \ref{tab1}). The dust infrared emission model \citep{Draine2014} combines two components with an extensive grid of parameters: the dust in the diffuse interstellar medium (ISM) heated by general diffuse starlight with a minimum radiation field $U_{\rm min}=0.1-50$ in the Habing unit \citep[1.2 $\times$ 10$^{-4}$ erg cm$^{-2}$ s$^{-1}$ sr$^{-1}$;][]{Habing1968}, and the dust tightly linked to star-forming regions illuminated by a variable radiation field ($U_{\rm min} < U < U_{\rm max}$) with a power-law distribution of a spectral index $\alpha=1-3$. The fraction of dust mass linked to the star-forming regions is $\gamma=0.0001-1$. Among the two dust components, the mass fraction of dust in the form of the polycyclic aromatic hydrocarbons (PAH) is $q_{\rm PAH}=0.47-7.32 \%$. We note that a large grid of models was generated by \texttt{CIGALE} and then fitted to the observations to estimate physical properties; for more details, readers can refer to \cite{Boquien2019}. To investigate the active galactic nuclei (AGN) contributions to the infrared SEDs, we also fit the infrared SED with an additional AGN template \citep{Fritz2006} using CIGALE. We did not find any sign of a significant contribution of an AGN ($f_{\rm AGN}<0.2 \%$) in the infrared SEDs of our two SBs and two MSs, in agreement with previous literature constraints (\citetalias{Wang2016,Wang2018}). The derived $M_{\rm dust}$ is given in Table \ref{tab1}. It is used to calculate the gas mass (in $\S$\ref{Sec:Molecular Gas Mass}). \begin{figure*}[h!] \begin{center} \includegraphics[width=0.99\textwidth]{img/fig2.pdf} \end{center} \vspace{-0.6truecm} \caption{CO morphology and kinematics of the four cluster members at $z=2.51$. From left to right: ALMA maps ($1.4^{\prime\prime} \times 1.4^{\prime\prime}$) of velocity-integrated CO(1$-$0) flux ($Moment~0$), velocity field ($Moment~1$), velocity dispersion ($Moment~2$), position-velocity (PV) diagrams along the major axis, the best-fit $Moment~1$ model with GalPAK$^{3D}$, and the residual between the data and the model. We note that these maps are without correction for beam-smearing. Gray-filled ellipses indicate the angular resolution of $0.31^{\prime\prime} \times 0.25^{\prime\prime}$. The four member galaxies have regular rotating disks of molecular gas. } \label{fig2} \vspace{-12pt} \end{figure*} \begin{figure*}[h!] \centering \includegraphics[width=1.\textwidth]{img/edfig1.pdf} \caption{Full MCMC chain for 20,000 iterations for the two SBs and two MSs. Each galaxy shows the fitting results of rotational velocity and intrinsic velocity dispersion. Red solid lines and black dashed lines refer to the median and the 1$\sigma$ standard deviations of the last 30\% of the MCMC chain.} \label{ed1} \end{figure*} \begin{figure*}[h!] \centering \includegraphics[width=1\textwidth]{img/edfig2.pdf} \caption{Observations (points) and best-fit PSF-convolved models (blue lines) for rotation velocity and total velocity dispersion profiles along the kinematic major axis. Each point was extracted from the spectrum in an aperture whose diameter is equal to the angular resolution 0.31$^{\prime\prime}$ and the red one restricted to the spaxels with a S/N $>$ 3 in the aperture. Orange and gray lines mark the intrinsic velocity dispersion $\sigma_{\rm 0}$ and 1$\sigma$ confidence from the GalPAK$^{3D}$. The $3.5^{\prime\prime} \times 3.5^{\prime\prime}$ \textit{HST}/F160W images are shown in the bottom-right corner with the red crosses denote the corresponding source. Since SB2 and MS2 are close to each other with mixed fluxes, the points at the lowest radius of SB2 and the highest radius of MS2 are not fitted well with models. For MS1, the points at the lowest radius are not fitted well with models because of two neighboring sources at similar redshifts. The $\sigma_{\rm 0}$ derived from GalPAK$^{3D}$ is lower than the lowest observed velocity dispersion profile because the latter one is still affected by the beam-smearing effect even at the large radii probed by our observations.} \label{ed2} \end{figure*} \begin{table*}\footnotesize \centering \caption{Summary of best-fit gas kinematic models for the two SBs and two MSs.} \begin{tabular}{l c c c c} \hline\hline \noalign{\smallskip} & SB1 & SB2 & MS1 & MS2 \\ \noalign{\medskip} \hline \noalign{\medskip} \multicolumn{1}{l} {Morphological parameters}& \\ \noalign{\medskip} \hline \noalign{\smallskip} $x_{\rm c}$ (pixel) & 16.53 $\pm$ 0.03 & 17.16 $\pm$ 0.04 & 15.70 $\pm$ 0.08 & 16.76 $\pm$ 0.14\\ $y_{\rm c}$ (pixel) & 16.67 $\pm$ 0.02 & 17.60 $\pm$ 0.03 & 16.73 $\pm$ 0.06 & 16.85 $\pm$ 0.10\\ $z_{\rm c}$ (pixel) & 12.75 $\pm$ 0.02 & 8.10 $\pm$ 0.02 & 10.22 $\pm$ 0.07 & 9.85 $\pm$ 0.13\\ Flux (Jy beam$^{-1}$) & 2.14 $\pm$ 0.01 & 1.17 $\pm$ 0.01 & 1.27 $\pm$ 0.02 & 0.67 $\pm$ 0.02\\ $r_{\rm 1/2}$ (kpc) & 1.79 $\pm$ 0.10 & 1.29 $\pm$ 0.09 & 2.43 $\pm$ 0.25 & 2.26 $\pm$ 1.04\\ $r_{\rm v}$ (kpc) & 0.17 $\pm$ 0.02 & 0.61 $\pm$ 0.03 & 0.02 $\pm$ 0.02 & 0.19 $\pm$ 0.08\\ \hline \noalign{\medskip} \multicolumn{1}{c} {Orientation of gas disk:}& \\ \noalign{\medskip} \hline Incl. (deg) & 37.37 $\pm$ 0.62 & 19.30 $\pm$ 1.21 & 45.72 $\pm$ 1.38 & 55.58 $\pm$ 2.18\\ PA (deg) & 12.32 $\pm$ 0.32 & 9.94 $\pm$ 0.92 & 148.68 $\pm$ 0.96 & 47.75 $\pm$ 2.03\\ \hline \noalign{\medskip} \multicolumn{1}{l} {Kinematic parameters$^{*}$}& \\ \noalign{\medskip} \hline $V_{\mathrm{max}}$ (km\,s$^{-1}$) & 419$^{+21}_{-58}$ & 497$^{+123}_{-252}$ & 327$^{+89}_{-47}$ & 245$^{+211}_{-97}$\\ $\sigma_{\mathrm{0}}$ (km\,s$^{-1}$) & 25$^{+11}_{-15}$ & 33$^{+27}_{-19}$ & 90$^{+15}_{-18}$ & 110$^{+36}_{-40}$\\ $^{a} V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ & 16.8$^{+7.4}_{-10.4}$ & 15.0$^{+13.0}_{-11.3}$ & 3.6$^{+1.1}_{-0.9}$ & 2.2$^{+2.0}_{-1.2}$ \\ \hline \\ \hline \noalign{\medskip} reduced-$\chi^2$ & 1.26 & 1.50 & 1.12 & 1.01 \\ \hline \multicolumn{5}{l}{$^{*}$ The uncertainties of the kinematic parameters were derived from simulations (see $\S$\ref{Molecular gas kinematics}).}\\ \end{tabular} \tablefoot{Total ten free parameters and their 1$\sigma$ uncertainties were determined from the GalPAK$^{3D}$. The parameters are the $x_{\rm c}$, $y_{\rm c}$, and $z_{\rm c}$ positions; the total flux in the same units as the input data cube; the disk half-light radius $r_{\rm 1/2}$; the turnover radius $r_{\rm v}$; the inclination angle Incl. (the angle between the normal of the disk plane and the line-of-sight of the observer); position angle PA; the maximum circular velocity $V_{\mathrm{max}}$ ; and the intrinsic velocity dispersion $\sigma_{\mathrm{0}}$. $^{a}$Rotation-to-random motions ratio, calculated from $V_{\mathrm{max}}$ and $\sigma_{\mathrm{0}}$. The bottom row is the reduced chi square $\chi^2$ in our MCMC fitting.} \label{summary} \end{table*} \subsection{Molecular gas mass} \label{Sec:Molecular Gas Mass} We adopted three commonly used methods to obtain the total molecular gas mass, $M_{\rm gas}$, and studied the gas properties of the two SBs and two MSs. The molecular gas masses were independently estimated based on the following: (i) the CO(1$-$0) line, (ii) the $M_{\rm dust}$ assuming a gas-to-dust mass ratio ($\delta_{\rm GDR}$), and (iii) the 3.2 mm dust continuum emission (see Table \ref{tab3}). To obtain the total molecular gas mass $M_{\rm gas,CO}$, we used the CO(1$-$0) luminosity (\citetalias{Wang2018}) instead of CO(3$-$2) to avoid uncertainties caused by the CO excitation ladder. The $M_{\rm gas,CO}$ was calculated by $M_{\rm gas,CO} = \alpha_{\rm CO}(Z) L_{\rm CO(1-0)}^{\prime}$, including a factor 1.36 correction for helium. As was done in our previous work (\citetalias{Wang2018}), the metallicity-dependent CO-to-H$_2$ conversion factor, $\alpha_{\rm CO}(Z)$, was determined following \cite{Genzel2015} and \cite{Tacconi2018}. The metallicity was derived from the stellar mass, using the mass-metallicity relation \citep{Genzel2015}. The gas mass, $M_{\rm gas,GDR}$, can also be determined through $M_{\rm dust}$ by employing the gas-to-dust ratio with a metallicity dependency \citep[e.g.,][]{Magdis2011,Magdis2012,Genzel2015,Bethermin2015}. They assumed that the gas-to-dust ratio is only related to the gas-phase metallicity ($\delta_{\rm GDR}-Z$) following the relation of \cite{Leroy2011}\footnote{Converted to the PP04 \citep{Pettini2004} metallicity scale by \cite{Magdis2012}.}: \begin{flalign} M_{\rm gas,GDR} = \delta_{\rm GDR} M_{\rm dust}, \label{Mgas} \end{flalign} \begin{flalign} \rm{log}\delta_{\rm GDR} = (10.54\pm1.0) - (0.99\pm0.12)\times(12 + \rm{log}(O/H)). \label{GDR} \end{flalign} The metallicity was determined from the redshift-dependent mass-metallicity relation \citep[MZR;][]{Genzel2015}: \begin{flalign} 12 + \rm{log}(O/H) = a - 0.087(\rm{log}M_{\rm *} - b)^2, \label{Z} \end{flalign} where a = 8.74 and b = 10.4 + 4.46log(1$+z$)$-$1.78log(1$+z$)$^2$. The metallicity derived here is on the PP04 scale \citep{Pettini2004}, consistent with the calibration used in Eq.~\ref{GDR} by \cite{Magdis2012}. We adopted an uncertainty of 0.15 dex for the metallicities \citep{Magdis2012}. The long-wavelength Rayleigh-Jeans (RJ) tail ($\geq$$\sim$200 $\mu$m in the rest frame) of dust continuum emission is nearly always optically thin, providing a reliable probe of the total dust content. The RJ-tail method \citep{Scoville2016} is based on an empirical calibration between the molecular gas content and the dust continuum at the rest frame 850$\mu$m, as the fiducial wavelength, which was obtained after considering a sample of low-redshift star-forming galaxies, ultra-luminous infrared galaxies, and $z = 2-3$ submillimeter galaxies. We used our single ALMA 3.2 mm measurement at the RJ tail to derive the total molecular gas mass, $M_{\rm gas,3.2mm}$, following Eq.6 and Eq.16 (corrected using the published erratum) in \cite{Scoville2016}: \begin{eqnarray} \label{RJ} M_{\rm gas,3.2mm}=1.78\, S_{\nu_{\rm obs}}{\rm [mJy]}\,(1+z)^{-(3+\beta)}\nonumber\\ \times \left( \frac{\nu_{\rm 850\mu m}}{\nu_{\rm obs}}\right)^{2+\beta}\,(d_{L}[{\rm Gpc}])^2\,\,\,\,\,\,\,\,\,\,\nonumber\\ \times \left\{ \frac{6.7\times10^{19}}{\alpha_{\rm 850}} \right\} \, \frac{\Gamma_{0}}{\Gamma_{\rm RJ}}\, 10^{10}M_{\odot}\,\,\nonumber\\ {\rm for} \, \, \lambda_{\rm rest} \gtrsim 250\, \mu {\rm m},\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \end{eqnarray} where $S_{\nu_{\rm obs}}$ is the observed flux density at the observed frequency $\nu_{\rm obs}$ corresponding to 3.2 mm, $\nu_{\rm 850\mu m}$ is the frequency corresponding to the rest-frame wavelength 850 $\mu m$, $d_L$ is the luminosity distance, and $\alpha_{850} = 6.7\times 10^{19}\,{\rm erg\, s^{-1}\, Hz^{-1}\,}M_{\odot}^{-1}$. The dust emissivity power-law spectral index $\beta$ is assumed to be 1.8. \ Furthermore, $\Gamma_{\rm RJ}$ is a correction for the deviation of the Planck function from RJ in the rest frame given by \begin{equation} \Gamma_{\rm RJ}(T_{\rm d}, \nu_{\rm obs}, z) = \frac{h\nu_{\mathrm obs}(1+z)/kT_{\rm d}}{e^{(h\nu_{\rm obs}(1+z)/kT_{\rm d})} - 1}, \end{equation} \noindent and $\Gamma_{0} = \Gamma_{\rm RJ}(T_{\rm d}, \nu_{850}, 0)$, where $h$ is the Planck constant and $k$ is the Boltzmann constant. The mass-weighted dust temperature $T_d$ is assumed to be $25\ {\rm K}$, which is considered to be a representative value for both local star-forming galaxies and high-redshift galaxies \citep{Scoville2016}. For our two SBs and two MSs, the $M_{\rm gas,CO}$, $M_{\rm gas,GDR}$, and $M_{\rm gas,3.2mm}$ derived from three different methods are consistent with each other (within one sigma for the two SBs and within two sigma for the two MSs). All these values are presented in Table \ref{tab3}. We note that in the empirical calibration of the RJ-tail method, $\alpha_{\rm CO}$ is set to 6.5 $M_\odot$ (K km s$^{-1}$ pc$^{2}$) $^{-1}$, which is different from what is used in our CO line method ($\alpha_{\rm CO}(Z)$ $\sim$ 4 $M_\odot$ (K km s$^{-1}$ pc$^{2}$) $^{-1}$ in Table \ref{tab3}), both of which include a correction factor of 1.36 for helium. To keep the independent measurements of $M_{\rm gas,3.2mm}$ and $M_{\rm gas,CO}$ and to maintain the consistency of the RJ-tail method commonly used in the literature, we did not perform any correction for $\alpha_{\rm CO}$ in the RJ-tail method. We also note that the derived $\alpha_{\rm CO}(Z)$ in \citetalias{Wang2018} is close to the Milky Way (MW) value (see Table \ref{tab3}). In general, two conversion factors are commonly used in the literature to convert CO luminosities into gas masses, that is to say the MW\ ($\alpha_{\rm CO, MW}$ = 4.36 $M_{\odot}$(K km s$^{-1}$ pc$^{2}$)$^{-1}$) and local starbursts \citep[$\alpha_{\rm CO, SB}$ = 0.8 $M_{\odot}$(K km s$^{-1}$ pc$^{2}$)$^{-1}$;][]{Downes1998,Tacconi2008} values. However, using $\alpha_{\rm CO, SB}$ = 0.8 $M_{\odot}$(K km s$^{-1}$ pc$^{2}$)$^{-1}$ for the two SBs would result in very low gas-to-dust ratios ($\delta_{\rm GDR}$$\sim$20), making the two SBs extreme cases. The resulting $\delta_{\rm GDR}$ would be $4-5$ times lower than the typical $\delta_{\rm GDR}$ of solar-metallicity galaxies regardless of redshift \citep{Remy-Ruyer2014}, which is more than three times lower than that of GN20 \citep[$\delta_{\rm GDR}$$\sim$65 using $\alpha_{\rm CO}$ = 0.8;][]{Magdis2011,Magdis2012}, and about three times lower than the median $\delta_{\rm GDR}$ of local ultra-luminous infrared galaxies \citep{Solomon1997,Downes1998}. Therefore, we consider that using the derived $\alpha_{\rm CO}(Z)$ for the two SBs is more reasonable than using $\alpha_{\rm CO, SB}$ = 0.8 $M_{\odot}$(K km s$^{-1}$ pc$^{2}$)$^{-1}$. In addition, some high-$z$ MS galaxies have been found to have gas properties of starbursts, the so-called SB in the MS, exhibiting compact dust structures \citep[e.g.,][]{Elbaz2018,Carlos2022}. Similarly, distant starburst galaxies can also exhibit MW-like ISM conditions when they present extended, instead of compact star formation \citep[e.g.,][]{Puglisi2021,Sharon2013} and/or large gas fractions. Here the two SBs exhibit both relatively extended CO sizes and large gas fractions (from the dust continuum and $\delta_{\rm GDR}$), favoring a MW-like $\alpha_{\rm CO}$. Hence, these pieces of evidence are all consistent with our derived $\alpha_{\rm CO}(Z)$. We however show that even if we had chosen a local SB conversion factor ($\alpha_{\rm CO, SB}$ = 0.8 $M_{\odot}$(K km s$^{-1}$ pc$^{2}$)$^{-1}$) for the two SBs, the main conclusions of the paper would remain unchanged. We emphasize that for the two SBs, the gas masses derived with the three independent methods are consistent within a 1$\sigma$ confidence level and the $M_{\rm gas,GDR}$ is independent of the assumption of the CO conversion factor. It is worth mentioning that \cite{Gomez-Guijarro2019} also reported CO(1$-$0) luminosity values and \cite{Champagne2021} reported CO(1$-$0) luminosity and gas mass values for the two SBs and two MSs. We carefully compared our results with those derived using the CO(1$-$0) luminosity and/or gas mass from the above two papers, which mainly affect the gas fractions and Toomre Q values \citep[][described later in $\S$\ref{Disk stabilities}]{toomre}. We found that using the CO(1$-$0) luminosity (and gas mass) from different papers did not change our final results. They all agree with our results (gas fractions and Toomre Q values) within a 1$\sigma$ confidence level. We emphasize again that in our work, the gas masses are calculated using three different methods that are consistent with each other (within 1$\sigma$ confidence for the two SBs and within 2$\sigma$ for the two MSs). In particular, for the gas mass derived from $\delta_{\rm GDR}$, it is independent of the CO(1$-$0) luminosity (and $\alpha_{\rm CO}$), providing support to our results. The derived molecular gas mass fractions, $f_{\rm gas} = M_{\mathrm{gas}}/(M_{\mathrm{*}} + M_{\mathrm{gas}})$, for the two SBs are $\sim$ 0.7 (0.70$^{+0.09}_{-0.06}$ and 0.66$^{+0.10}_{-0.07}$ based on the CO emission line, 0.68$^{+0.12}_{-0.10}$ and 0.65$^{+0.13}_{-0.11}$ based on the $\delta_{\rm GDR}$, and 0.73$^{+0.10}_{-0.08}$ and 0.61$^{+0.13}_{-0.11}$ based on the 3.2 mm dust continuum emission for the SB1 and SB2, respectively). They are two times lower for the two MSs, $f_{\rm gas} \sim$ 0.3 (0.29$^{+0.09}_{-0.06}$ and 0.25$^{+0.08}_{-0.06}$ based on the CO emission line, 0.25$^{+0.15}_{-0.14}$ and 0.15$^{+0.08}_{-0.07}$ based on the $\delta_{\rm GDR}$, and 0.43$^{+0.13}_{-0.11}$ and 0.18$^{+0.08}_{-0.07}$ based on the 3.2 mm dust continuum emission for the MS1 and MS2, respectively). As a reference, the typical $f_{\rm gas}$ of $z=2.5$ SB and MS galaxies in the field with a stellar mass of $10^{11} M_\odot$ is 0.7 and 0.5, respectively \citep{Liu2019,Tacconi2018,Scoville2017}. It shows that the two cluster SBs are gas-rich, similarly to field SBs. \begin{figure*}[h!] \centering \includegraphics[scale=0.38]{img/fig3_1.pdf} \includegraphics[scale=0.38]{img/fig3_2.pdf} \caption{Two cluster SBs have dynamically cold and gravitationally unstable gas disks. \textbf{Left}: Ratio of the gas rotational to random motion ($V_{\rm max}$/$\sigma_{\rm 0}$) as a function of redshift, with the comparison between the two cluster SBs and two cluster MSs and samples of observed and simulated field galaxies. The two cluster SBs and two cluster MSs are in red and green stars, respectively, with uncertainties derived from our simulation (see $\S$\ref{Molecular gas kinematics}). Filled gray symbols with vertical bars show the median values and 16-84th percentile range of field star-forming galaxies, including molecular and ionized gas detections. When possible, we identified field starbursts (orange symbols) within these literature samples at $z > 1$ as galaxies with a SFR at least 0.5 dex higher than the SFMS. Blue triangles represent field starbursts with individual CO observations \citep{Rivera2018,Barro2017,Swinbank2011,Tadaki2017,Tadaki2019}. The faint red points show massive ($M_{\rm *} > 10^{10} M_\odot$) rotation-dominated SBs at $z > $ 4 which have been found recently \citep{Rizzo2020,Rizzo2021, Lelli2021, Fraternali2021}, but no information on their environment is available yet. The light-blue area shows $V_{\rm max}$/$\sigma_{\rm 0}$ values for star-forming galaxies from Illustris-TNG50 simulations in the mass range 10$^{9}$-10$^{11}$$M_{\odot}$ \citep{pillepich}. The two lines with the light green and pink shaded regions describe $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ as a function of $f_{\rm gas}$ and Toomre $Q$ \citep{Wisnioski2015}, where a = $\sqrt{2}$ for a disk with constant rotational velocity. \textbf{Right}: Toomre parameter $Q$ (see $\S$\ref{Disk stabilities}) as a function of the main-sequence offset. The solid gray line and shaded area highlight the SFMS \citep{Schreiber2015} position and the $\pm 3 \times \Delta$MS region, commonly used to separate MS from SB galaxies. We note that the two MSs have the same $\Delta$MS of 0.7 and are drawn staggered by 0.1 in this figure in order to distinguish between them. The $Q$ values calculated using the 3.2 mm dust continuum, the $\delta_{\rm GDR}$, and the CO-based gas masses with $\alpha_{\rm CO}(Z)$ are shown by opened, filled light, and filled dark stars, respectively. The blue dashed line indicates the threshold $Q_{\rm crit}=0.67$ below which a thick disk (as assumed in our gas kinematic model) becomes gravitationally unstable. } \label{fig3} \vspace{-12pt} \end{figure*} \subsection{Molecular gas kinematics} \label{Molecular gas kinematics} We investigated the kinematic properties of the molecular gas of the two cluster SBs and two cluster MSs by applying a three-dimensional (3D) kinematic modeling technique \citep[GalPAK$^{3D}$;][]{Bouche2015} to the CO(3$-$2) line cube. The 3D kinematic modeling technique is currently the most advanced kinematic modeling approach for the low resolution observations \cite[see e.g.,][]{Rivera2018, Fraternali2021, Tadaki2019, Fujimoto2021}. GalPAK$^{3D}$ is a Bayesian parametric tool, using a Markov Chain Monte Carlo (MCMC) approach to derive the intrinsic galaxy parameters and kinematic properties from a 3D data cube. The model is convolved with a 3D kernel to account for the instrument point spread function (PSF) and the line spread function (LSF) smearing effect. GalPAK$^{3D}$ can thus return intrinsic galaxy properties. We adopted a thick exponential-disk light profile and an arctan rotational velocity curve to fit the 0.3$^{\prime\prime}$ resolution cube in order to determine the maximum circular velocity $V_{\rm max}$ and intrinsic velocity dispersion $\sigma_{\rm 0}$. The arctan rotational velocity curve is $V_{\rm rot} \propto V_{\rm max}$ arctan$(r/r_{\rm v})$, where $r_{\rm v}$ is the turnover radius. Fig. \ref{fig2} shows the best-fit models and residuals, based on the last 30\% chain fraction with 20,000 iterations. For the two SBs and two MSs, our gas kinematic modeling provides a good description of the observed $Moment$ 0, 1, and 2 maps (Figs. \ref{res_SB1}, \ref{res_SB2}, \ref{res_MS1}, and \ref{res_MS2}). We also plotted the full MCMC chain from GalPAK$^{3D}$ for the two SBs and two MSs with 20,000 iterations to confirm the convergence of rotational velocity and intrinsic velocity dispersion (Fig. \ref{ed1}). The MCMC results of the fitting procedure are given in Figs. \ref{MCMC_SB1}, \ref{MCMC_SB2}, \ref{MCMC_MS1}, and \ref{MCMC_MS2}, showing the posterior probability distributions of the model parameters and their marginalized distributions. The best-fitting values and their 1 $\sigma$ uncertainties are summarized in Table \ref{summary}. To investigate the performance of the fit, we compared the rotation velocity and velocity dispersion profiles from the observed data with that from the best-fit PSF-convolved model data. All values were derived from one-dimensional (1D) spectra extracted using circular apertures with diameters equal to an angular resolution of 0.31$^{\prime\prime}$ along the kinematic major axis. As shown in Fig. \ref{ed2}, the profiles from dynamical models and observations are consistent. Some points deviate from the models because of the flux contamination by neighboring sources. The derived best-fit $\sigma_{\rm 0}$ from GalPAK$^{3D}$ is lower than the lowest observed velocity dispersion, which is reasonable because the latter is still affected by the beam-smearing effect even at the large radii probed by our observations. Noticing that the best fit $\sigma_{\rm 0}$ of SB1 is lower than the CO(3$-$2) channel width of 30 km s$^{-1}$, we further tested the robustness of our fits. We applied the same analysis to the data cubes under the original channel width of $\sim$12 km s$^{-1}$. The results were consistent with each other within errors. Therefore, considering that a better sensitivity can help detect fainter galaxy edges and better sample the flat part of the rotation curves, we have adopted the values from the data cubes with a channel width of 30 km s$^{-1}$ in this work. Finally, we made a simple simulation to test the robustness of $\sigma_{\rm 0}$ and $V_{\rm max}$ given by the kinematic model of GalPAK$^{3D}$. Our purpose was to check first whether there is a global offset of the derived values or not, and second the reliability of the output uncertainties. To start, we randomly injected the best-fit PSF-convolved model data cube into the observed data cube (at the same positions as our galaxies, but at a different velocity and frequency to avoid the contamination of the CO emission from real sources). Then, we ran the GalPAK$^{3D}$ to derive $\sigma_{\rm 0}$ and $V_{\rm max}$. These two steps were repeated 100 times for each galaxy. In the end, we obtained distributions of $\sigma_{\rm 0}$ and $V_{\rm max}$. We calculated the median $\sigma_{\rm 0}$ and uncertainty (16-84th percentile range) values for the SB1, SB2, MS1, and MS2, respectively. In general, there is no global offset of the derived values from the GalPAK$^{3D}$, but the uncertainty is greatly underestimated by a factor of 5. Thus, we use the uncertainties of $\sigma_{\rm 0}$ and $V_{\rm max}$ given by this simulation in the main body of this paper, Fig. \ref{fig3}, Fig.~\ref{fig4}, and Table \ref{summary}. \section{Results} \label{Sec:results} \subsection{The two SBs have dynamically cold gas-rich disks with low velocity dispersions} \label{} Our SBs and MSs are located in a dense environment. To better understand the environmental effect on gas turbulence, we compare the four cluster members with field galaxies from the literature. The data included in Fig. \ref{fig3} and Fig. \ref{fig4} contain molecular and ionized gas observations. The ionized gas observations of the star-forming galaxies, sorted by redshifts from the lowest to the highest, are from surveys GHASP \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.4-11.0; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.6;][]{Epinat2010}, DYNAMO \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.0-11.8; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.3;][]{Green2014}, MUSE and KMOS \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=8.0-11.1; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=9.4, 9.8 at $z$ $\sim$ 0.7, 1.3;][]{Swinbank2017}, KROSS \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=8.7-11.0; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=9.9;][]{Johnson2018}, KMOS$^{3D}$ \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.0-11.7; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.5, 10.6, 10.7 at $z$ $\sim$ 0.9, 1.5, 2.3;][]{Wisnioski2015,Ubler2019}, MASSIV \citep[ log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.4-11.0; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.2;][]{Epinat2012}, SIGMA \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.2-11.8; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.0;][]{Simons2016}, SINS \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.8-11.5; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.8;][]{Forster2009,Cresci2009}, LAW09 \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.0-10.9; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.3;][]{Law2009}, AMAZE \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.2-10.6; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.0;][]{Gnerucci2011}, and KDS \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=9.0-10.5; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=9.8;][]{Turner2017}. The molecular gas observations of the star-forming galaxies, sorted by redshifts, are from the HERACLES survey \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=7.1-10.9; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=10.5;][]{Leroy2008,Leroy2009} and the PHIBSS survey \citep[log$M_{\rm *}$\lbrack$M_{\odot}$\rbrack=10.6-11.2; log$M_{\rm *}^{avg}$\lbrack$M_{\odot}$\rbrack=11.0;][]{Tacconi2013}. We note that although the velocity dispersion measured from the molecular gas is $\sim$10$-$15 km s$^{-1}$ lower than from the ionized gas (with extra contributions from thermal broadening and expansion of the HII regions) in the local Universe, this difference becomes smaller with increasing redshift \citep{Ubler2019}. Some field SBs with individual CO observations \citep{Rivera2018,Barro2017,Swinbank2011,Tadaki2017,Tadaki2019} are indicated with blue triangles in Figs. \ref{fig3} and \ref{fig4}. When possible, we also identified the field starbursts (orange symbols in Figs. \ref{fig3} and \ref{fig4}) within the above star-forming samples, requiring their SFR to be at least 0.5 dex higher than the MS. In general, the gas in these field starbursts is slightly more turbulent than in main-sequence galaxies, showing a higher $\sigma_{\rm 0}$, especially at $2<z <4$. A similar trend of increasing $\sigma_{\rm 0}$ as galaxies move above the MS at a fixed stellar mass is shown for star-forming galaxies at $z=0-3$ \citep[e.g.,][]{Perna2022,Wisnioski2015}, suggesting that mergers or interactions would increase gas $\sigma_{\rm 0}$ as they enhance star formation. The gas disks of the two SBs are rotation-dominated with gas rotational to random motion ratios ($V_{\mathrm{max}}/\sigma_{\mathrm{0}}$) of 16.8$^{+7.4}_{-10.4}$ and 15.0$^{+13.0}_{-11.3}$, while the two MSs have a $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ of 3.6$^{+1.1}_{-0.9}$ and 2.2$^{+2.0}_{-1.2}$ (see Fig. \ref{fig3} and Table \ref{summary}). The $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ for the two SBs are more than three times higher than those for SBs and MSs in the field at the same epoch, either from observations or simulations. Moreover, they are as high as the median ratio for disk galaxies in the local Universe. As an example, the KMOS$^{3D}$ survey \citep{Wisnioski2015} found a median $V_{\mathrm{max}}/\sigma_{\mathrm{0}} \simeq 3$ \cite[$V_{\mathrm{max}}/\sigma_{\mathrm{0}} \sim 5$ in][]{Wisnioski2019} for field MS galaxies with stellar masses of $\sim$10$^{10.5}$$M_{\odot}$ at z $\sim$ 2.3. From Illustris-TNG50 simulations \citep{pillepich}, the typical star-forming galaxies in the stellar mass range 10$^{9}$$M_{\odot}$-10$^{11}$$M_{\odot}$ have $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ $\simeq 5$ $\pm$ 1 at $z=2.5$ (light-blue area in Fig. \ref{fig3}). In addition, using $V_{\mathrm{max}}/\sigma_{\mathrm{0}} \propto 1/f_{\rm gas}$($z$, $M_{\rm *}$) \citep{Wisnioski2015}, we get a value of $V_{\mathrm{max}}/\sigma_{\mathrm{0}} \simeq 2$ $\pm$ 1 at $z=2.5$, which decreases with increasing redshift (gray lines; light-green and pink-shaded regions in Fig. \ref{fig3}). We note that there has recently been some debate about potential observational effects (beam-smearing effect) on the dynamical state of (field) high-$z$ galaxies \citep[e.g.,][]{Di Teodoro2016,Kohandel2020}. More specifically, when studying the gas kinematics with low spectral and spatial resolution data, the unresolved rotations within the PSF can artificially increase the value of $\sigma_{\mathrm{0}}$ and decrease the value of $V_{\mathrm{max}}$, leading to a severe systematic underestimation of the $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ ratio. The beam-smearing effect has been widely explored in local galaxies \citep[e.g., see Figure 6 in][] {Di Teodoro2015} and high-$z$ simulated galaxies \citep[e.g.,][]{Kohandel2020}. Subsequently, given the high spatial and spectral resolution of ALMA observations, which have been able to reach subkpc spatial resolution in high-$z$ galaxies, the beam-smearing effect is less significant. Compared to previous data, ALMA allows for a more robust way to measure intrinsic velocity dispersions. However, in our case, comparing two cluster SBs (with a spatial resolution of $\sim 0.3^{\prime\prime}$ and a channel width of 30 km s$^{-1}$) with other field SBs at similar redshifts and similar resolutions (with spatial resolutions of 0.1$^{\prime\prime}$-0.7$^{\prime\prime}$ and channel widths of 20-50 km s$^{-1}$, except for one with a channel width of $\sim$100 km s$^{-1}$), the $\sigma_{\rm 0}$ values of the two cluster SBs are about three times lower than that of those field SBs \citep[blue triangles in Fig. \ref{fig4};][]{Rivera2018,Barro2017,Swinbank2011,Tadaki2017}. In addition, even at the same spatial and spectroscopical resolution, the $\sigma_{\rm 0}$ values of the two cluster SBs are still more than three times lower than those of the two cluster MSs (green stars in Fig. \ref{fig4}). Furthermore, the simulations have confirmed the robustness of $\sigma_{\mathrm{0}}$ and $V_{\mathrm{max}}$ for the two SBs and two MSs in our measurements (see $\S$\ref{Molecular gas kinematics}). Therefore, we argue that the higher $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ and lower $\sigma_{\mathrm{0}}$ of the two cluster SBs with respect to field galaxies is a real physical difference, rather than being driven by observational effects. \begin{figure}[h!] \centering \includegraphics[scale=0.38]{img/fig4.pdf} \caption{Comparison of gas turbulence between the two cluster SBs and two cluster MSs and field galaxies. The intrinsic velocity dispersion increases with redshift. The symbol convention and the two lines are the same as in the left panel of Fig. \ref{fig3}. The two lines show the relation between the gas velocity dispersion, the gas fraction, and the disk instability for different stellar masses \citep{Wisnioski2015}. Here we assume $V_{\rm max}$ = 130 km s$^{-1}$, Q = 1, and a = $\sqrt{2}$ for a disk with constant rotational velocity. These tracks indicate that while $\sigma_0$ predictions from this relation depend on $M_{\rm *}$, this dependency mostly vanishes at $z>2$. The two cluster SBs have lower $\sigma_0$ than field SBs as well as most literature samples. Their uncertainties are derived from our simulation (see $\S$\ref{Molecular gas kinematics}).} \label{fig4} \vspace{-12pt} \end{figure} In general, high-redshift star-forming galaxies are gas-rich and thus are believed to have a more turbulent ISM than local ones \citep{Forster-Schreiber2020}. While previous studies suggest that starburst galaxies are more likely associated with mergers or interactions, which are dynamically hot, the two cluster SBs surprisingly host dynamically cold disks, that is with a large $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$. Recently, observations also found this type of phenomenon at $z > $ 4 with the presence of massive ($M_{\rm *} > 10^{10} M_\odot$) rotation-dominated SBs \citep[faint red points in Fig. \ref{fig3};][]{Rizzo2020,Rizzo2021, Lelli2021, Fraternali2021}, but no information on their environment is available yet. The rotationally supported and dynamically cold disks of the two SBs imply low gas turbulent motions that are lower than for field SBs and MSs at the same redshift (Fig. \ref{fig4}). Hence, the two cluster SBs appear to be weakly affected by extreme internal and$/$or external physical processes, such as stellar or AGN feedback and galaxy mergers. \subsection{The two SBs have gravitationally unstable gas disks} \label{Disk stabilities} To understand the triggering mechanism taking place in these two SBs, we further study the dynamical state of their disks. A rotating, symmetric gas disk is unstable with respect to the gravitational fragmentation if the Toomre $Q$ parameter, $Q=\kappa$$\sigma_{\rm 0,gas}$/$(\pi G{\Sigma_{\rm gas}})$ \citep{toomre}, is below a threshold value of $Q_{\rm crit}$. The $Q_{\rm crit}=1$ is for a thin gas disk, and $Q_{\rm crit}=0.67$ for a thick gas disk. We calculated the gas surface density, ${\Sigma_{\rm gas}} = 0.5M_{\rm gas}/(\pi r_{\rm 1/2}^2)$, where $M_{\rm gas}$ was derived from the CO(1$-$0) luminosity, the $M_{\rm dust}$ assuming a gas-to-dust mass ratio, and dust continuum emission at 3.2 mm. Here we adopt the maximum circular velocity $V_{\rm max}$, intrinsic velocity dispersion $\sigma_{\rm 0}$, the disk half-light radius $r_{\rm 1/2}$, and flat rotation curve with the epicyclic frequency $\kappa$=$\sqrt{2}$$V_{\rm max}/r_{\rm 1/2}$ \citep{Binney2008}. All of these values were derived from the gas kinematic modeling. The right panel of Fig. \ref{fig3} shows the $Q$ values of the two SBs and two MSs based on CO, $\delta_{\rm GDR}$, and dust continuum emission as a function of the main-sequence offset. For the two SBs and two MSs, the derived $Q$ values decrease as the SFR offset to the SFMS increases. The two SBs present $Q$ values much smaller than $Q_{\rm crit}$. We note that using the local starbursts' conversion factor ($\alpha_{\rm CO, SB}$ = 0.8 $M_{\odot}$(K km s$^{-1}$ pc$^{2}$)$^{-1}$) for the two SBs, the derived Toomre parameter $Q$ values increase by a factor of five but still remain below $Q_{\rm crit}$. The low Toomre $Q$ means that the gas disk can easily collapse due to gravitational instabilities, leading to a starburst (see $\S$\ref{Triggering mechanism of high-$z$ cluster starburst} for a more in-depth discussion). This is consistent with the fact that the SFE (1/$t_{\rm dep}$) values of the two SBs are $\gg$ 0.5 dex than the scaling relation of MS galaxies \citep{Liu2019}, suggesting that they have efficient star formation. \section{Discussion} \label{Discussion} \subsection{Triggering mechanism of high-$z$ cluster starburst} \label{Triggering mechanism of high-$z$ cluster starburst} The dynamically cold, rotating gas disks of the two SBs are mainly due to a low level of gas turbulent motions. Their intrinsic velocity dispersions are extremely low, with $\sigma_{\rm 0} \sim 20-30$ km\,s$^{-1}$, while the two MSs have $\sigma_{\rm 0} \sim 90-110$ km\,s$^{-1}$ (see Table \ref{summary}). Their $\sigma_{\rm 0}$ values are about three times lower than that of field SBs at similar redshifts based on molecular gas observations from 2D and 3D kinematic modeling \citep[blue triangles in Fig. \ref{fig4};][]{Rivera2018,Barro2017,Swinbank2011,Tadaki2017}, and even field MS galaxies. We note that the $\sigma_{\rm 0}$ values of the two cluster SBs are consistent with those of a group of massive ($M_{\rm *} > 10^{10} M_\odot$) rotation-dominated SBs recently found at $z > 4$ \citep[faint red points in Fig. \ref{fig4};][]{Rizzo2020,Rizzo2021, Lelli2021, Fraternali2021}. In general, the gas in field SBs at $z = 2-3$ (blue and orange markers in Fig. \ref{fig4}) seems slightly more turbulent than that in field MSs, with a higher median $\sigma_{\rm 0}$ by a factor of $\sim$1.5. Hence, the two cluster SBs exhibit strikingly different kinematic properties compared to field SBs at $z$ $\sim$ 2.5, whether they are observed by molecular gas or ionized gas. These results challenge our current understanding of the physical origin of high-$z$ starbursts in clusters and hint that mergers and interactions are not the only way to trigger starbursts. In addition, in the study of gas disk stabilities (see $\S$\ref{Disk stabilities} and Fig. \ref{fig3}), we find the two SBs have unstable gas disks, as shown by their relatively low Toomre $Q$ values. This means that their gas disks can easily collapse due to gravitational instabilities. According to current theories of galaxy evolution, the self-regulated star formation of galaxies require marginally gravitationally unstable disks \citep{Thompson2005,Cacciato2012}. In short, the accretion of gas from the intergalactic medium to a gas disk increases the self-gravity of the gas disk. Once the self-gravity of the gas overcomes stellar radiation pressure, the gas disk becomes unstable and can easily collapse, triggering star-formation. As the stellar feedback injects energy into the ISM, thus increasing gas turbulence and radiation pressure, the gas disk then becomes stable. Subsequently, star formation becomes inefficient and the gas self-gravity dominates again. Therefore, the Toomre $Q$ value of such a marginally unstable disk is always around $Q_{crit}$. However, in our case, the two SBs have much lower Toomre $Q$ values than $Q_{\rm crit}$ and they have high gas fractions ($\sim$0.7; see Table \ref{tab3}). The gas turbulence in these two SBs is very inefficient in balancing the gas self-gravity, leading to starbursts. In other words, in our work, the combination of the high gas fractions and the low velocity dispersions of the two SBs would naturally yield highly unstable gas disks, which in turn induce efficient starburst activities (Fig. \ref{fig3}). In fact, the two SBs have higher gas fractions than other MS galaxies, but they are still comparable to other SBs in the field (see $\S$\ref{Sec:Molecular Gas Mass}). It is their low velocity dispersions that make the two cluster SBs unusual. Thus, the most possible mechanism for inducing efficient star formation activity in the two cluster SBs is the self-gravitational instability of gas disks caused by the low $\sigma_{0}$ (and the high gas fractions). In the following section, we discuss possible scenarios most likely to lead to the low $\sigma_{0}$ and high gas fractions, which are believed to be the coplanar, corotating cold gas accretion through the cold cosmic-web streams. \subsection{Drivers of low turbulent gas in the two cluster SBs} \label{Sec:Low Turbulent Gas in The Two SBs} We further explore the physical origin of the extremely low velocity dispersions and high gas fractions of the cluster SBs. The two primary energy sources of gas turbulence are stellar feedback and gravitational instability \citep{Krumholz2016,Krumholz2018}, while a high gas fraction could either be due to a merger or gas infall (cold gas accretion). The two SBs favor a scenario in which cold gas is accreted via corotating and coplanar streams \citep[e.g.,][]{Danovich2012,Danovich2015}. Indeed, in such a scenario, most of the gravitational energy is converted to rotation rather than dispersion, thus building up angular momentum \citep{Kretschmer2020,Kretschmer2021}. As a result, the two cluster SBs would have high gas fractions, low turbulent gas disks with high rotational velocities ($V_{\mathrm{max}} \sim 400 - 500$ km\,s$^{-1}$; see Table \ref{summary}), and relatively extended gas disk sizes. Simulations do predict a high occurrence rate of such configurations of corotating and coplanar cold gas accretion in massive galaxies and halos \citep{Kretschmer2021,Dekel2020a} for which galaxy merger events are rare enough to allow gas disks to survive over a long timescale. More specifically, the cold gas disk with $V_{\mathrm{max}}/\sigma_{\mathrm{0}} \simeq 5$ in a $z\sim3.5$ galaxy, with a stellar mass of $M_{\rm *} \sim 10^{10} M_\odot$, typically survives for approximately five orbital periods (a duration time of $\sim410$ Myr) \citep{Kretschmer2021}, before being disrupted by a merger. Assuming the same duration time of 410 Myr between two merger events, we infer that our two cluster SBs, which have more massive cold gas disks with larger $V_{\mathrm{max}}/\sigma_{\mathrm{0}} > 10$, would survive for $\gtrsim15$ orbital periods to mergers. Gas-rich major mergers can also lead to high gas fractions in the merger remnants. Numerical simulations and observations further indicate that rotating disks can reform rapidly after the final coalescence stage of the gas-rich mergers \citep[e.g.,][]{Robertson2006,Hopkins2009,Ueda2014}. However, simulations of gas-rich major mergers reveal enhanced gas turbulence and reduced sizes of disk components that survive or that one rebuilt after a merger \citep[e.g.,][]{Bournaud2011}, which conflicts with the observed low $\sigma_{\mathrm{0}}$ and relatively extended disk sizes of the two SBs. We highlight that the $\sigma_{\mathrm{0}}$ values of the two SBs are significantly lower than their field counterparts (not only field SBs, but also most field MSs). Meanwhile, we have not seen clear evidence of galaxy mergers in the two cluster SBs; this not only includes the CO(3$-$2) map, but also the high-resolution HST/F160W image tracing the stellar structures. While the possibility cannot be fully ruled out that the two SBs are in the final coalescence stage of gas-rich mergers, the chance that both SBs are caught in this short stage is small. Thus, the high gas fraction, low $\sigma_{0}$, and lack of evidence for galaxy major mergers in the two SBs appear inconsistent with merger remnants. In summary, the two cluster SBs have suppressed velocity dispersion and high gas fraction. These two unique properties of the two SBs support the scenario of corotating and coplanar cold gas accretion as the cause of their highly efficient star formation. \section{Conclusions} \label{Sec:summary} In this paper, we have studied the molecular gas kinematics of two SBs and two MSs in the most distant known X-ray cluster CLJ1001 at $z=2.51$ (Fig.~\ref{fig1}), based on ALMA high-resolution CO(3$-$2) observations ($\sim$0.3$^{\prime\prime}$ corresponding to $\sim$2.5 kpc). These four galaxies show regular rotating gas disks, without clear evidence of a past gas-rich major merger (Fig.~\ref{fig2}). While exploring the disk stabilities, we find strong evidence that the two cluster SBs have gravitationally unstable gas disks (right panel of Fig.~\ref{fig3}). Therefore, we suggest that self-gravitational instability of the gas disks is the most likely mechanism that induces intense star formation in the two cluster SBs. The two cluster SBs show dynamically cold gas-rich disks with significantly higher $V_{\mathrm{max}}/\sigma_{\mathrm{0}}$ than their field counterparts at similar redshifts, implying that their gas is low-turbulent (left panel of Fig.~\ref{fig3} and Fig.~\ref{fig4}). The gas disks of the two cluster SBs have extremely low velocity dispersions ($\sigma_{\mathrm{0}} \sim 20-30$ km s$^{-1}$), which are three times lower than their field counterparts at similar redshifts. The suppressed velocity dispersions (see Table \ref{summary}) and high gas fractions ($\sim$0.7; see Table \ref{tab3}) of the two cluster SBs yield gravitationally unstable gas disks, which enable highly efficient star formation. The unique properties of the two cluster SBs (high gas fraction and suppressed velocity dispersion) support the scenario in which corotating and coplanar cold gas accretion might serve as an essential avenue to trigger starbursts in forming galaxy clusters at high redshift. This may represent an important process other than mergers and interactions in triggering starbursts at high redshifts, at least in massive halos. Characterizing the environment of the recently found massive ($M_{\rm *} > 10^{10} M_\odot$) rotation-dominated disks at $z > $ 4 with suppressed velocity dispersion presents a unique opportunity to support this scenario further. \begin{acknowledgements} We are very grateful to the anonymous referee for instructive comments, which helped to improve the overall quality and strengthened the analyses of this work. We thank Ken-ichi Tadaki and Nicolas Bouch{\'e} for the helpful discussion of the molecular gas kinematics with GalPAK$^{3D}$; Yong Shi, Alain Omont, Susan Kassin, Annagrazia Puglisi, Daizhong Liu, and Boris Sindhu Kalita for valuable discussions and suggestions that improved this paper. This paper makes use of the following ALMA data: ADS/JAO.ALMA \#2016.1.01155.S. ALMA is a partnership of ESO (representing its member states), NSF (USA), and NINS (Japan), together with NRC (Canada), NSC, ASIAA (Taiwan), and KASI (Republic of Korea), in cooperation with the Republic of Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO, and NAOJ. This work is supported by the National Key Research and Development Program of China (No. 2017YFA0402703), and by the National Natural Science Foundation of China (Key Project No. 11733002, Project No. 12173017, and Project No. 12141301). This work is also supported by the Programme National Cosmology et Galaxies (PNCG) of CNRS/INSU with INP and IN2P3, co-funded by CEA and CNES. M.-Y. X. acknowledges the support by China Scholarship Council (CSC). T.W. and K. K. acknowledges the support by NAOJ ALMA Scientific Research Grant Number 2017-06B. D. I. acknowledges the support by JSPS KAKENHI Grant Number JP21H01133. \end{acknowledgements}
\section{Introduction} Self-Supervised Learning (SSL) trains encoder models to transform unlabeled inputs into useful representations that are amenable to sample-efficient learning of multiple downstream tasks. The ability of SSL models to learn from unlabeled data has made them increasingly popular in important domains like computer vision, natural language processing, and speech recognition, where data are often abundant but labeling them is expensive~\citep{simclr, byol, moco, clip}. Recently, ML-as-a-Service providers like OpenAI~\citep{neelakantan2022text, OpenAI} and Cohere~\citep{cohere} have begun offering trained encoders over inference APIs. Users pay a fee to transform their input data into intermediate representations, which are then used for downstream models. High-performance SSL models in these domains are often costly to train; training a large BERT model can cost north of 1 million USD~\citep{sharir2020cost}. The value of these models and their exposure over publicly-accessible APIs make black-box model extraction attacks a realistic security threat. In a model extraction attack~\cite{pred_apis}, the attacker aims to steal a copy of the victim's model by submitting carefully selected queries and observing the outputs. The attacker uses the query-output pairs to rapidly train a local model, often at a fraction of the cost of the victim model~\citep{fidelity}. The stolen model can be used for financial gains or as a reconnaissance stage to mount further attacks like extracting private training data or constructing adversarial examples~\citep{papernot2017practical}. Past work on model extraction focused on the Supervised Learning (SL) setting, where the victim model typically returns a label or other low-dimensional outputs like confidence scores~\cite{pred_apis} or logits~\citep{DataFreeExtract}. In contrast, SSL encoders return high-dimensional representations; the de facto output for a ResNet-50 SimCLR model, a popular architecture in vision, is a 2048-dimensional vector. We hypothesize this significantly higher information leakage from encoders makes them more vulnerable to extraction attacks than SL models. In this paper, we introduce and compare several novel encoder extraction attacks to empirically demonstrate their threat to SSL models, and discuss the difficulties in protecting such models with existing defenses. The framework of our attacks is inspired by Siamese networks: we query the victim model with inputs from a reference dataset similar to the victim's training set (e.g. CIFAR10 against an ImageNet victim), and then use the query-output pairs to train a local encoder to output the same representations as the victim. We use two methods to train the local model during extraction. The first method directly minimizes the loss between the output layer of the local model and the output of the victim. The second method utilizes a separate projection head, which recreates the contrastive learning setup utilized by SSL frameworks like SimCLR. For each method, we compare different loss metrics, including MSE, InfoNCE, Soft Nearest Neighbors (SoftNN), or Wasserstein distance. We evaluate our attacks against ResNet-50 and ResNet-34 SimCLR victim models. We train the models and generate queries for the extraction attacks using ImageNet and CIFAR10, and evaluate the models' downstream performance on CIFAR100, STL10, SVHN, and Fashion-MNIST. We also simulate attackers with different levels of access to data that is in or out of distribution \textit{w.r.t.} the victim's training data. Our experimental results in Section~\ref{experiments} show that our attacks can steal a copy of the victim model that achieves considerable downstream performance in fewer than $\nicefrac{1}{5}$ of the queries used to train the victim. Against a victim model trained on 1.2M unlabeled samples from ImageNet, with a 91.9\% accuracy on the downstream Fashion-MNIST classification task, our direct extraction attack with the InfoNCE loss stole a copy of the encoder that achieves 90.5\% accuracy in 200K queries. Similarly, against a victim trained on 50K unlabeled samples from CIFAR10, with a 79.0\% accuracy on the downstream CIFAR10 classification task, our direct extraction attack with the SoftNN loss stole a copy that achieves 76.9\% accuracy in 9,000 queries. We discuss 5 current defenses against model extraction, including Prediction Poisoning~\citep{orekondy2019prediction}, Extraction Detection~\citep{juuti2019prada}, Watermarking~\citep{jia2020entangled}, Dataset Inference~\citep{maini2021dataset}, and Proof-of-Work~\citep{powDefense}. We show that for each of these defenses, the existing implementations are inadequate in the SSL setting, and that retrofitting them to the specificities of encoders is non-trivial. We identify two main sources of this difficulty: the lack of labels and the higher information leakage from the model outputs. Our main contributions are as follows: \begin{itemize} \item We call attention to a new setting for model extraction: the extraction of encoders trained with SSL. We find that the high dimensionality of their outputs make encoders particularly vulnerable to such attacks. \item We introduce and compare several novel model extraction attacks against SSL encoders and show that they are a realistic threat. In some cases, an attacker can steal a victim model using less than $\nicefrac{1}{5}$ of the queries required to train the victim. \item We discuss the effectiveness of existing defenses against model extraction in this new setting, and show that they are either inadequate or cannot be easily adapted for encoders. The difficulty stems from the lack of labels, which are utilized by some defenses, and the higher information leakage in the outputs compared to supervised models. We propose these challenges as avenues for future research. \end{itemize} \section{Related Work} \section{Background and Related Work} \subsection{Self-Supervised Learning} Self-Supervised Learning (SSL) is an ML paradigm that trains models to learn generic representations from unlabeled data. The representations are then used by downstream models to solve specific tasks. The training signal for SSL tasks is derived from an implicit structure in the input data, rather than explicit labels. For example, some tasks include predicting the rotation of an image~\citep{gidaris2018unsupervised}, or predicting masked words in a sentence~\citep{devlin2018bert}. These tasks teach models to identify key semantics of their input data and learn representations that are generally useful to many downstream tasks due to their similarity structure. Contrastive learning is a common approach to SSL where one trains representations so that similar pairs have representations close to each other while dissimilar ones are far apart. \subsection{Self-Supervised Learning Frameworks} Many new SSL frameworks have been proposed over the recent years; for ease of exposition, we focus on three current popular methods in the vision domain. The SimCLR~\citep{simclr} framework learns representations by maximizing agreement between differently augmented views of the same sample via a contrastive InfoNCE loss~\cite{cpc} in the latent space. The architecture is a Siamese network that contains two encoders with shared weights followed by a projection head. During training, the encoders are fed either two augmentations of the same input (positive pair) or augmentations of different inputs (negative pair). The output representations of the encoders are then fed into the projection head, whose outputs are used to compute a distance in the latent space; positive pairs should be close, and negative pairs far. The encoders and the projection head are trained concurrently. The authors show that the crucial data augmentation to create positive samples and achieve strong performance is a combination of a random resized crop and color distortion. SimSiam~\citep{SimSiam} is another Siamese network architecture that utilizes contrastive learning like SimCLR but simplifies the training process and architecture. In SimCLR, negative samples are needed during training to prevent the model from collapsing to a trivial solution, i.e. outputting the same representation for all inputs. The authors of SimSiam show that negative samples are not necessary; collapse can be avoided by applying the projection head to only one of the encoders (in alternation) and preventing the gradient from propagating through the other encoder during training. Barlow Twins~\citep{zbontar2021barlow} aims to create similar representations of two augmentations of the same image while reducing redundancy between the output units of the representations. It measures the cross-correlation matrix between two views and optimizes the matrix to be close to the identity matrix. The optimization process uses a unique loss function involving an invariance term and a redundancy reduction term. As with other methods, a projection head is used before passing the representation to the loss function. \subsection{Model Extraction Attacks} In the model extraction attacks for SL, an attacker queries the victim model to label its training points~\citep{pred_apis}. The main goals of such an adversary are to achieve a certain task accuracy of the stolen model~\citep{orekondy2019knockoff} or recreate a high fidelity copy that can be used to mount other attacks~\citep{fidelity}, such as the construction of adversarial examples~\citep{szegedy2013intriguing,papernot2017practical}. The attacker wants to minimize the number of queries required to achieve a given goal. In the self-supervised setting, the goal of an adversary is to learn high-quality embeddings that can be used to achieve high performance on many downstream tasks. \ahmad{Nicolas previously said to merge this section with the intro. Are we going to do that or is at fine as is?} \jonas{given that we have the space, I'd say we can keep this here for now. It provides a bit more exposition/context, and the intro is pretty long already so I don't want to pack more in. But if we need space this is at the top of the cut list} \subsection{Defenses against Model Extraction} Defenses against model extraction can be categorized based on when they are applied in the extraction process. They can be classified as proactive, active, passive, or reactive. Proactive defenses prevent the model stealing before it happens. One of the methods is based on the concept of proof-of-work~\citep{powDefense}, where the model API users have to expand some compute by solving a puzzle before they can read the desired model output. The difficulty of the puzzle is calibrated based on the deviation of a user from the expected behavior for a legitimate user. Active defenses introduce small perturbations into model outputs to poison the training objective of an attacker~\citep{orekondy2019prediction} or truncate outputs~\citep{pred_apis}, however, these active methods lower the quality of results for legitimate users. Passive defenses try to detect an attack~\citep{juuti2019prada}. Reactive defenses are post-hoc methods that are used to determine if a suspect model was stolen or not. The examples of such methods are watermarking~\citep{jia2020entangled}, dataset inference~\citep{maini2021dataset}, and Proof-of-Learning (PoL)~\citep{jia2021proof}. The PoL method can be immediately applied to SSL since defenders can claim ownership of a model by showing proof of incremental updates from their SSL model training. \section{Extraction Methods} \begin{figure}[t] \vskip 0in \begin{center} \centerline{\includegraphics[width=\columnwidth]{figures/rep-stealing-diagram.pdf}} \caption{\textbf{Stealing the encoder} model $f_v$ using \encircle{1} the direct comparison between victim and attacker's representations or \encircle{2} access to the latent vectors $z$ or recreating the projection head $g_v$.} \label{fig:byol-steal} \end{center} \vskip -0.3in \end{figure} \subsection{Threat Model} The adversary makes queries to the victim model for representations of arbitrary inputs. The adversary has direct access only to the output representations. We consider settings where the adversary has/does not have knowledge about the encoder architecture, the victim's data augmentation scheme, loss function used, victim's training/test set or external dataset, and other parameters and hyper-parameters set by the victim during training of the encoder model. \subsection{Extraction Algorithms} \label{sec:algorithms} We consider different approaches to extracting encoders trained with SSL. The final outcome of the self-supervised training process is an encoder or feature extractor $f$, where for an input $x$ we obtain the representation $y=f(x)$. The goal of an adversary is to steal the encoder $f$. Figure~\ref{fig:byol-steal} presents the stealing process from the attacker's perspective. An input image $x$ is augmented using two separate operators $t$ and $t'$ to obtain two correlated views $w=t(x)$ and $w'=t'(x)$. Here a view refers to a version of the image under a particular augmentation. It is also possible that $w = w'$ in the case when no augmentations are used or the same augmented $x$ is used by the victim and attacker. The view $w$ is passed through the attacker's encoder $f_a$ to obtain representation $y_a$ and $w'$ is fed to the victim's encoder $f_v$ which returns $y_v$. The representations can be further passed to the victim's head $g_v$ or attacker's $g_a$ to obtain latent vectors $z_v$ or $z_a$, respectively. To train the stolen encoder, our adversary adopts the methodology of Siamese networks, for example, SimSiam~\citep{SimSiam}, where one of the branches is the victim's encoder and the other is the attacker's stolen local model. The attacker tries to train the stolen model to output representations as similar as possible to the victim encoder. \paragraph{Direct Extraction.} The first plain attack method directly steals the encoder $f$ by comparing the victim representation $y_v$ with the representation $y_a$ obtained on the attacker's end through an appropriate loss function such as Mean Squared Error (MSE) or InfoNCE~\cite{cpc}. Algorithm~\ref{alg:stealing} presents the pseudo-code for stealing the representation model using the direct extraction method. \begin{algorithm}[t] \caption{Stealing an Encoder.}\label{alg:stealing} \algorithmicrequire{Querying Dataset $\mathcal{D}$, access to a victim model $f_v(w; \theta_v)$.} \algorithmicensure{Stolen representation model $f_a(w; \theta_a)$} \begin{algorithmic}[1] \STATE Initialize $f_a$ with a similar architecture as $f_v$. \FOR{sampled queries $\{x_k\}_{k=1}^{N} \in \mathcal{D}$} \STATE Sample augmentations $t$ and $t'$. \STATE Generate views $w_k=t(x_k)$ and $w_k'=t'(x_k)$. \STATE Query victim model to obtain representations:\newline $y_{v} = f_v(w_{k}')$ \STATE Generate representations from stolen model: \newline $y_{a} = f_a(w_{k}) $ \STATE Compute loss $\mathcal{L} \left\{ y_v, y_a \right\}$. \STATE Update stolen model parameters $\theta_a \coloneqq \theta_a - \eta \nabla_{\theta_a} \mathcal{L}$. \ENDFOR \end{algorithmic} \end{algorithm} \textbf{Recreate Projection Head.} The projection head $g$ is a critical component in the training process used for many contrastive learning approaches as shown by~\citet{simclr}. However, it is usually discarded after the training process. Another method of stealing a model is thus to first recreate the victim's head and then pass the representations obtained from the victim through the head before finding the loss (see the pseudo-code in Algorithm~\ref{alg:recreate-head}). In practice, recreating the head requires knowledge of the victim's training process such as the augmentations and the loss function used which may not be possible in all cases. At the end of the attack spectrum, we also assess the case where the victim releases the projected representations $z$ or an adversary can access the head $g_v$. Our adopted methodology is the \textit{Direct Extraction} since, as we show in the evaluation, this method is able to outperform or match the performance of more sophisticated methods such as the head recreation. Moreover, compared to these more sophisticated methods, which require the use of augmentations, direct extraction is less prone to being detected by a defender (as we discuss in Section~\ref{sec:detection-defense}). \begin{algorithm}[t!] \caption{Recreating a Projection Head.} \label{alg:recreate-head} \algorithmicrequire{Querying dataset $\mathcal{D}$, access to a victim model $f_v(w; \theta_v)$.} \algorithmicensure{Recreated victim head $g_v(y; \theta_v')$ as $g_a(y; \theta_a')$.} \begin{algorithmic}[1] \FOR{sampled queries $\{x_k\}_{k=1}^{N} \in \mathcal{D}$} \STATE Sample augmentations $t$ and $t'$. \STATE Generate views $w_k=t(x_k)$ and $w_k'=t'(x_k)$. \STATE Query victim model to obtain representations: \newline $y_k = f_v(w_k)$ and $y_k' = f_v(w_k')$. \STATE Pass representations through head: $z_k = g_a(y_k)$ and $z_k' = g_a(y_k')$. \STATE Compute loss $\mathcal{L} \left\{ z_k, z_k' \right\}$. \STATE Update parameters of the head $\theta_a' \coloneqq \theta_a' - \eta \nabla_{\theta_a'} \mathcal{L}$. \ENDFOR \end{algorithmic} \end{algorithm} \subsection{Loss Functions} \label{sec:loss-functions} One of the most important hyper-parameter choices for representation stealing is the loss function, which can be categorized into quadratic, symmetrized, contrastive, and supervised-contrastive. They can be arranged into a hierarchy as in Figure~\ref{fig:loss-hierarchy}. The standard \textit{quadratic loss} like MSE (Mean Squared Error) can be used to directly compare the representations from the victim and the stolen copy. For example, we train a stolen copy of the model with the MSE objective such that it minimizes the $\ell_2$-distance between its predicted representations and the representation outputs from the victim model. The \textit{symmetrized losses}~\citep{byol,SimSiam}, have two parts to the loss for a given data point $x$. When considering two separate views of $x$, $w$ and $w'$, the first part of the loss is $\mathcal{L}_1(g(f(w)),f(w'))$, where $f$ is the feature extractor, and $g$ represents the prediction head, which transforms the output of one view and matches it to the other view. More simply, the head $g$ is a small fully-connected neural network which transforms the representations from one space to another. The symmetry is achieved by computing the other part of the loss $\mathcal{L}_2(g(f(w')),f(w))$ and the final symmetrized loss is $\mathcal{L}=\mathcal{L}_1 + \mathcal{L}_2$. The loss functions $\mathcal{L}_1$ and $\mathcal{L}_2$ are commonly chosen as to be the negative cosine similarity. The standard supervised and symmetrized losses take into account only the distances between the representations and compare solely positive examples, i.e., the representations for the same input image. Finally, modern batch \textit{contrastive approaches}, such as InfoNCE~\citep{cpc} or Soft Nearest Neighbor (SoftNN)~\citep{softNearestNeighborLoss} compare not only positive but also the negative pair samples in terms of their distances and learn representations so that positive pairs have similar representations while negative pairs have representations which are far apart. The supervised contrastive loss (SupCon loss)~\citep{supconloss} is a novel extension to contrastive loss functions which uses labels from supervised learning in addition to positive and negative labeling. An attacker can use a labeled public dataset, such as ImageNet or Pascal VOC, to obtain the labels to be used with the SupCon loss. \section{Empirical Evaluation} \label{experiments} \subsection{Experimental Setup} We include results for victim models trained on ImageNet, CIFAR10, and SVHN datatsets. The ImageNet encoder has an output representation dimension of 2048, while encoders trained on CIFAR10 and SVHN return 512 dimensional representations. For ImageNet, we use the publicly available ResNet50 from~\citep{SimSiam}. For the CIFAR10 and SVHN datasets, we use a public PyTorch implementation of SimCLR~\citep{simclr} to train victim ResNet18 and ResNet34 models over 200 epochs with a batch size of 256 and a learning rate of 0.0003 with the Cosine Annealing Scheduler and the Adam optimizer. For training stolen models, we use similar (hyper-)parameters to the training of the victim models. More details on the experimental setup are in Section~\ref{sec:exeperimental-setup-details}. \subsection{Linear Evaluation} The usefulness of representations is determined by evaluating a linear layer trained from representations to predictions on a few labeled samples. We follow the same evaluation protocol as in \citet{simclr}, where a linear prediction layer is added to the model and is fine-tuned with the full labeled training set from the downstream task while the rest of the layers of the network are frozen. The test accuracy is then used as the performance metric. \subsection{Methods of Model Extraction} We compare the stealing algorithms in Table~\ref{tab:compare-attack-methods}. The \textit{Direct Extraction} steals $f_v$ by directly comparing the victim's and attacker's representations using the SoftNN loss, the \textit{Recreate Head} $g$ uses the SimSiam method of training, while \textit{Access Head} trains a stolen copy using the latent vectors $z_v$ and the InfoNCE loss. For CIFAR10 and STL10 datasets, the \textit{Direct Extraction} works best, while it is outperformed on the SVHN dataset by the \textit{Access Head} method. The results for the \textit{Recreate Head} are mixed; the downstream accuracy for loss functions such as InfoNCE improves when the head is first recreated while for other loss functions such as MSE, which directly compares the representations, the recreation of the head hurts the performance. This is in line with the SSL frameworks that use InfoNCE loss on outputs from the heads~\citep{simclr}. The results show that the representations can be stolen directly from the victim's outputs; the recreation or access to the head is not critical for downstream performance. We observe that bigger differences in performance stem from the selection of the loss function---a comparison of the different loss functions is found in Table~\ref{tab:compare-losses}. The choice of the loss function is an important parameter for stealing with the SoftNN stolen model having the highest downstream accuracy in two of the three datasets while InfoNCE has a higher performance in one of the tasks. However, as we show in Table~\ref{tab:combinednumqeury}, the number of queries used is also a factor behind the performance of different loss functions. We note that the SupCon loss gives the best performance on the CIFAR10 downstream task and this is likely a result of the fact that SupCon assumes access to labeled query data, which in this case was the CIFAR10 test set. The results in Table~\ref{tab:StealImagenet} show the stealing of the encoder pre-trained on ImageNet. Most methods perform quite well in extracting a representation model at a fraction of the cost with a small number of queries (less than one fifth) required to train the victim model as well as augmentations not being required. In general, the \textit{Direct Extraction} with InfoNCE loss performs the best and the performance of the stolen encoder increases with more queries. \begin{table}[t] \caption{\textbf{Comparison between attack methods} for the classification top-1 accuracy on downstream tasks CIFAR10, STL10, and SVHN. The models are stolen from a CIFAR10 victim encoder with 9,000 queries from the CIFAR10 test set. } \label{tab:compare-attack-methods} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Method\textbackslash Dataset & CIFAR10 & STL10 & SVHN \\ \midrule \textit{Victim Model} & 79.0 & 67.9 & 65.1 \\ \cdashlinelr{1-4} \textbf{Direct Extraction} & \textbf{76.9} & \textbf{67.1} & 67.3 \\ \textbf{Recreate Head} & 59.9 & 52.8 & 56.3 \\ \textbf{Access Head} & 75.6 & 65.0 & \textbf{69.8} \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{Comparison between loss functions.} We use the same setup as in Table~\ref{tab:compare-attack-methods}. Loss functions with (*) use data augmentations.} \label{tab:compare-losses} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccc} \toprule Loss Type\textbackslash Dataset & CIFAR10 & STL10 & SVHN \\ \midrule \textit{Victim Model} & 79.0 & 67.9 & 65.1 \\ \cdashlinelr{1-4} MSE & 75.5 & 64.8 & 58.8 \\ InfoNCE & 75.5 & 64.6 & \textbf{69.6} \\ SoftNN & \textbf{76.9} & \textbf{67.1} & 67.3 \\ Wasserstein & 63.9 & 50.8 & 49.5 \\ \cdashlinelr{1-4} SupCon* & \textbf{78.5} & 63.1 & 67.1 \\ Barlow* & 26.9 & 26.6 & 26.2 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table*}[t] \caption{\textbf{Linear Evaluation Accuracy} on a victim and stolen encoders. The victim encoder is pre-trained on the ImageNet dataset. } \label{tab:StealImagenet} \begin{center} \begin{small} \begin{sc} \begin{tabular}{ccccccccc} \toprule Loss & \# of Queries & Dataset & Data Type & CIFAR10 & CIFAR100 & STL10 & SVHN & F-MNIST\\ \midrule \textit{Victim Model} & N/A & N/A & N/A & 90.33 & 71.45 & 94.9 & 79.39 & 91.9 \\ \cdashlinelr{1-9} MSE & 50K & CIFAR10 & Train & 75.7 & 43.9 & 27.3 & 48.7 & 61.7 \\ InfoNCE & 50K & CIFAR10 & Train & 61.8 & 32.9 & 56.8 & 51.5 & 82.1 \\ MSE & 50K & ImageNet & Test & 47.7 & 19.3 & 13.1 & 23.8 & 82.1 \\ MSE & 50K & ImageNet & Train & 51.0 & 17.2 & 49.5 & 39.7 & 84.7 \\ InfoNCE & 50K & ImageNet & Test & 64.0 & 35.3 & 60.4 & 63.7 & 88.7 \\ InfoNCE & 50K & ImageNet & Train & 65.2 & 35.1 & 64.9 & 62.1 & 88.5 \\ MSE & 100K & ImageNet & Train & 55.5 & 23.0 & 27.1 & 27.3 & 82.1 \\ InfoNCE & 100K & ImageNet & Train & 68.1 & 38.9 & 63.1 & 61.5 & 89.0 \\ MSE & 200K & ImageNet & Train & 56.1 & 22.6 & 47.8 & 55.4 & 87.6 \\ InfoNCE & 200K & ImageNet & Train & 79.0 & 53.4 & 81.2 & 48.3 & \textbf{90.5} \\ InfoNCE & 250K & ImageNet & Train & \textbf{80.0} & \textbf{57.0} & \textbf{85.8} & \textbf{71.5} & 90.2 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table*} \section{Conclusions and Future Work} As MLaaS shifts away from prediction APIs and towards representation APIs, we analyze how the encoders trained with SSL can be extracted when exposed to the public. We find that the direct objective of imitating the victim's representations gives high performance on downstream tasks despite the attack requiring only a fraction (less than 15\% in certain cases) of the number of queries needed to train the stolen encoder in the first place. With limited queries, performance degrades rather quickly. We hypothesize this is due to a lack of useful inductive biases, \textit{e.g.}, data augmentations. For the ImageNet encoder, the attacker's accuracy for downstream tasks is within 1\% of the victim's accuracy on simple tasks like Fashion MNIST, and up to 17\% for more complicated datasets like CIFAR100. The quality of the stolen encoders is highly dependent on the selection of the attacker's loss function and tends to be better with the MSE loss in the limited query regime while InfoNCE is more useful when more queries are available. However, it is challenging to defend encoders trained with SSL since the output representations leak a substantial amount of information. The most promising defenses are reactive methods, such as watermarking, that can embed specific augmentations in high-capacity encoders. Overcoming the discussed challenges and improving defenses is an important avenue for future work. Another interesting direction to extend the work on encoder extraction is in the natural language domain for large text representation models. \section*{Acknowledgments} We would like to acknowledge our sponsors, who support our research with financial and in-kind contributions: CIFAR through the Canada CIFAR AI Chair program, DARPA through the GARD program, Intel, Meta, NFRF through an Exploration grant, and NSERC through the Discovery Grant and COHESA Strategic Alliance. Resources used in preparing this research were provided, in part, by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute. We would like to thank members of the CleverHans Lab for their feedback. \section{Additional Experimental Results} \subsection{Details on Experimental Setup} \label{sec:exeperimental-setup-details} We test various attack methods with different loss functions for the stealing process. We use different numbers of queries from different datasets, where each query represents an input to the victim model. The user then receives as output the representation from the victim. For training a stolen model, we use similar (hyper-)parameters to the training of the victim models, with a batch size of either 64 or 256, initial learning rate of around 0.0001, and the Adam optimizer. In the case of stealing from the ImageNet victim model, we use a larger learning rate of 0.1 or 1.0 with the LARS optimizer~\citep{ginsburg2018large} and a batch size of 256 or 512. For downstream tasks, we use CIFAR10, SVHN, STL-10, and Fashion MNIST datasets to compare the performance of the stolen model to the victim model. We use the standard linear evaluation protocol where an additional linear layer is added to the representation model while all other layers are frozen. The network is then optimized with labeled data from the specific downstream task. For the models stolen from a CIFAR10 or SVHN victim model, we use a learning rate of 0.0001 with the SGD optimizer for the linear evaluation with the parameters tuned for the victim model and then keep them constant while evaluating the models that are stolen from it. For the ImageNet victim model, we use a learning rate of 1.0 with the LARS optimizer and a batch size of 256. In all cases, the top 1 test accuracy on the specific downstream task was reported and used for the comparison between the victim and stolen models. We ran all experiments on machines equipped with an Intel\textregistered~Xeon\textregistered~Silver 4210 processor, 128 GB of RAM, and four NVIDIA GeForce RTX 2080 graphics cards, running Ubuntu 18.04. \subsection{Transferability of Adversarial Examples} \ahmad{Probably remove this section. It is no longer relevant. } \begin{figure}[ht] \vskip 0.2in \begin{center} \centerline{\includegraphics[width=\columnwidth]{figures/adversarial-examples.png}} \caption{Transferability of the FGSM attack using knockoff and representation-based model extraction methods.} \label{fig:advExamples1} \end{center} \vskip -0.2in \end{figure} One of the goals of extraction attacks is fidelity, which trains the stolen copy so that is as close as possible to the victim model in terms of outputs. This can be treated as a reconnaissance attack, where such an extracted model can be used to generate transferable adversarial examples on downstream tasks. We compare the transferability between a model extracted using labels/logits with the knockoff attack~\citep{orekondy2019knockoff} and a model extracted with representations on a single downstream task, which we select to be the standard multi-class classification. We train the stolen representation model using the InfoNCE loss with 9000 examples from the CIFAR10 test set as the queries giving a 54\% test set accuracy. We use 1000 images from the CIFAR10 test set for the final testing to prevent overlap with the used queries. The adversarial attack used is FGSM. The adversarial examples are only generated for the images the stolen model initially predicted correctly (there are therefore 543 images which are evaluated). For the representation model, we assess the performance on the downstream task based on the additional classifier trained on top of the representations from the stolen copy of the victim encoder. Then, we generate adversarial examples on the stolen copy with the downstream classifier. Finally, we check how the adversarial examples transfer to the victim model. We observe that there is a greater transferability from the extracted model using the knockoff attack than from the representation extraction, see Figure~\ref{fig:advExamples1}. In this case, the knockoff-based stolen copy is directly optimized for the selected downstream task. The victim model contains the classifier and with knockoff, which also steals the linear classifier layer, the stolen model is more closely linked to the victim model. With representations however, each model trains its own linear layer so there is a bigger difference between the models and therefore a lower transferability. \subsection{Perturbation based Defense Methods} We evaluated several types of perturbation based defenses against extraction attacks involving representations. To model a legitimate user, we used a two layer linear network which is trained by the legitimate user to map from representations obtained from the victim model to the final label in the specific downstream task the user is interested in. Therefore once the network is trained, the legitimate user can obtain a label for a new image by first querying the victim model and then using the obtained representation as an input to his or her trained network to find the label. By contrast, an adversary will first attempt to steal the full model on the victim side by querying and then add an additional linear layer for a downstream task. The major difference between an adversary and legitimate user is that an adversary trains a full model which gives it the additional benefit of being able to be useful for various downstream task and not having to first query the victim model to get the label for a new input. Table~\ref{tab:compare-defence} and~\ref{tab:compare-defence2} shows the results of using simple Gaussian noise with a mean of 10 and 0 respectively and the accuracy the legitimate user and adversary can obtain for different levels of noise. The results show that increasing the level of noise added harms the adversary while the accuracy of the legitimate user remains relatively constant. Moreover, using a higher mean for the noise is more effective. Table~\ref{tab:compare-defencehigh} shows results for an alternative defence method which only perturbs representations it identifies as being close to a previously queried representation. The defence seeks to identify attacker's which use several augmentations of the same image under the assumption that the representations of two augmentations of the same image will be more similar than the representations of two different images. We use the $L_2$ distance and cosine distance to measure the similarity between two representations and set a threshold. In the case the distance between a new representation and a previously returned representation is under a set threshold, it is replaced by random Gaussian noise with a high mean and variance. From Table ~\ref{tab:compare-defencehigh}, we see that there is little effect of this defense on a legitimate user as desired while an adversary using multiple augmentations (such as with the InfoNCE loss) has a reduced accuracy. The standard deviation $\sigma$ of the noise however does not have a major impact on reducing the accuracy of the adversary apart from the initial drop from no noise to noise with $\sigma = 20$. \subsection{Compare Loss Functions} We further compare loss functions in Table~\ref{tab:compare-lossessvhn}. \begin{table}[t] \caption{\textbf{Comparison between loss functions} for the classification top-1 accuracy on downstream tasks and models stolen from a SVHN victim model. 9000 queries from the SVHN test set are used for stealing. Loss functions with (*) use data augmentations.} \label{tab:compare-lossessvhn} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Loss\textbackslash Dataset & CIFAR10 & STL10 & SVHN \\ \midrule Victim Model & 57.5 & 50.6 & 80.5 \\ \midrule MSE & 51.2 & 46.3 & 80.6 \\ Wasserstein & 46.4 & 40.1 & 69.4 \\ InfoNCE & \textbf{56.3} & \textbf{50.4} & \textbf{86.2} \\ SoftNN & 48.4 & 44.6 & 78.6 \\ \midrule SupCon* & 42.3 & 33.9 & \textbf{92.1} \\ SimSiam* & 49.7 & 44.0 & 66.7 \\ Barlow* & 17.9 & 16.3 & 19.4 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{Comparison between number of queries} from the attacker to the classification accuracies on downstream tasks of CIFAR10, STL10 and SVHN for the stolen representation model. The victim model was trained using the CIFAR10 dataset and the attacker used the \textbf{SVHN} training set for queries. The attacker used the \textbf{InfoNCE} loss.} \label{tab:compare-queriessvhninfonce} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccccr} \toprule Queries\textbackslash Dataset & CIFAR10 & STL10 & SVHN \\ \midrule Victim Model & 79.0 & 67.9 & 65.1 \\ 500 & 35.7 & 31.1 & 26.4 \\ 1000 & 38.6 & 34.7 & 40.4 \\ 5000 & 50.5 & 46.6 & 72.7 \\ 10000 & 59.3 & 51.6 & 73.1 \\ 20000 & 69.3 & 56.6 & 72.8 \\ 30000 & 69.9 & 56.6 & 67.5 \\ 50000 & 71.8 & 57.6 & 67.1 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table*} \caption{\textbf{Comparison between number of queries} from the attacker to the classification accuracies on downstream tasks of CIFAR10, STL10 and SVHN for the stolen representation model. The victim model was trained using the CIFAR10 dataset and the attacker used the \textbf{SVHN} training set for queries. The attacker used the \textbf{SoftNN}, \textbf{MSE} and \textbf{InfoNCE} loss functions.} \label{tab:combinednumqeury} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccccccccc} \toprule \textbf{\# queries / Loss} & & \textbf{SoftNN} & & & \textbf{MSE} & & & \textbf{InfoNCE} \\ \cmidrule(lr){1-1} \cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10} \textbf{SVHN} & \textbf{CIFAR10} & \textbf{STL10} & \textbf{SVHN} & \textbf{CIFAR10} & \textbf{STL10} & \textbf{SVHN} & \textbf{CIFAR10} & \textbf{STL10} & \textbf{SVHN} \\ \cmidrule(lr){1-1} \cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10} 500 & 39.3 & 36.1 & 28.2 & 36.1 & 33.2 & 39.5 & 35.7 & 31.1 & 26.4 \\ 1000 & 40.0 & 39.6 & 40.9 & 43.4 & 39.7 & 58.1 & 38.6 & 34.7 & 40.4 \\ 5000 & 55.5 & 49.5 & 66.0 & 55.6 & 47.6 & 58.7 & 50.5 & 46.6 & 72.7 \\ 10000 & 60.4 & 53.4 & 65.9 & 59.3 & 50.0 & 58.0 & 59.3 & 51.6 & 73.1 \\ 20000 & 67.2 & 58.5 & 68.0 & 58.1 & 50.9 & 56.6 & 69.3 & 56.6 & 72.8 \\ 30000 & 70.8 & 58.5 & 67.3 & 60.6 & 51.0 & 58.7 & 69.9 & 56.6 & 67.5 \\ 50000 & 70.9 & 60.3 & 67.7 & 61.6 & 52.7 & 59.3 & 71.8 & 57.6 & 67.1 \\ \midrule \textbf{Victim} & \textbf{79.0} & \textbf{67.9} & \textbf{65.1} & \textbf{79.0} & \textbf{67.9} & \textbf{65.1} & \textbf{79.0} & \textbf{67.9} & \textbf{65.1} \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table*} \begin{table}[t] \caption{\textbf{Comparison between number of queries} from the attacker to the classification accuracies on downstream tasks of CIFAR10, STL10 and SVHN for the stolen representation model. An \textbf{ImageNet Resnet50} model was used as the victim model and the attacker used the \textbf{CIFAR10} training set for queries. The attacker used the \textbf{InfoNCE} loss. $^\dag$ - we also fine-tune the encoder apart from the final classifier. \ahmad{Remove this table} } \label{tab:compare-queriessImageNet} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccccr} \toprule Queries\textbackslash Dataset & CIFAR10 & STL10 & SVHN \\ \midrule Victim Model & 52.5 & 83.2 & 38.1 \\ Victim Model$^\dag$ & 81.7 & - & - \\ 500 & 22.4 & 18.1 & 20.3\\ 1000 & 27.2 & 20.2 & 19.4 \\ 5000 & 37.1 & 31.1 & 27.4 \\ 10000 & 42.8 & 33.9 & 33.4 \\ 20000 & 47.9 & 41.7 & 36.5 \\ 30000 & 55.9 & 46.1 & 43.5\\ 40000 & 56.2 & 51.3 & 44.6\\ 50000 & 58.9 & 52.7 & 46.5 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{Comparison between number of queries} from the attacker to the classification accuracies on downstream tasks of CIFAR10 and SVHN for the stolen representation model. The victim model was trained using the CIFAR10 dataset and the attacker used the \textbf{CIFAR10 training set} for queries. The attacker used the \textbf{Soft Nearest Neighbours} (SoftNN) loss. \ahmad{Based on previous results. To remove.} } \label{tab:compare-queries} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Queries\textbackslash Dataset & CIFAR10 & STL10 & SVHN \\ \midrule Victim Model & 67.3 & 74.5 & 59.3 \\ 500 & 47.7 & 39.3 & 45.1 \\ 1000 & 51.8 & 41.8 & 53.2 \\ 5000 & 58.4 & 49.2 & 59.1 \\ 10000 & 63.9 & 53.1 & 57.8 \\ 20000 & 67.5 & 55.3 & 58.2 \\ 30000 & 66.6 & 55.7 & 60.0 \\ 40000 & 65.5 & 56.3 & 58.8 \\ 50000 & 66.3 & 56.7 & 59.8 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \subsection{Adding Random Noise to Representations} \label{sec:add-noise-to-representations} \begin{table}[t] \caption{\textbf{Noise based perturbations} as a defence. The downstream accuracy on CIFAR10 for a legitimate user and an adversary are shown where the adversary used the \textbf{MSE} loss. All results are based on 9000 queries from the CIFAR10 test set. The noise added was Gaussian noise with a mean of 10 and standard deviation of $\sigma$ as in the table. } \label{tab:compare-defence} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccr} \toprule $\sigma$ \textbackslash Dataset & Legitimate & Adversary \\ \midrule 0 & 67.1 & 66.3 \\ 1 & 65.7 & 56.9 \\ 2 & 67.9 & 56.8 \\ 3 & 64.0 & 56.9 \\ 4 & 62.2 & 55.8\\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} The first approach to perturbing the representations is to add random Gaussian noise as in Table~\ref{tab:compare-defence}. In general, the representations are resilient to noise and rather a large amount of noise has to be added to decrease the performance on downstream tasks. We observe that such perturbations can even slightly increase the accuracy on the downstream task since they can act as regularizers. Overall, when we add noise, for a legitimate user - we decrease the accuracy $A_L$ of the downstream classifier trained on noisy representations. If we steal the encoder using noisy representations and then train the downstream classifier using the stolen encoder, the accuracy is around 10\% worse than $A_L$. This is a good starting point but we need a better method for the defense to make a wider gap in terms of accuracy between legitimate and malicious users. \begin{table}[t] \caption{\textbf{Noise based perturbations} as a defence. The downstream accuracy on CIFAR10 for a legitimate user and an adversary are shown where the adversary used the \textbf{MSE} loss for stealing the representation model. All results are based on 9000 queries from the CIFAR10 test set. The noise added was Gaussian noise with a mean of \textbf{0} and standard deviation of $\sigma$ as in the table. \ahmad{To be removed / updated} } \label{tab:compare-defence2} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccr} \toprule $\sigma$ \textbackslash Dataset & Legitimate & Adversary \\ \midrule 0 & 66.7 & 66.3 \\ 1 & 63.9 & 64.8 \\ 2 & 67.2 & 66.5 \\ 3 & 65.0 & 65.5 \\ 4 & 63.1 & 63.4 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{Noise based perturbations} as a defence where only very similar queries were perturbed by a large amount. The downstream accuracy on CIFAR10 for a legitimate user and an adversary are shown where the adversary used the \textbf{InfoNCE} loss (with two augmentations per image). All results are based on 9000 queries from the CIFAR10 test set. The noise added was Gaussian noise with a mean of 1000 and standard deviation of $\sigma$ as in the table. The first set of results are with the Cosine similarity as the distance metric and the second set of results is using the $\ell_2$ distance. } \label{tab:compare-defencehigh} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccr} \toprule $\sigma$ \textbackslash Dataset & Legitimate & Adversary \\ \midrule 0 & 66.9 & 53.1 \\ 20 & 65.4 & 41.2 \\ 40 & 65.3 & 44.7 \\ 60 & 66.0 & 41.8 \\ \midrule 0 & 66.9 & 52.2 \\ 20 & 65.4 & 44.9 \\ 40 & 65.3 & 45.7 \\ 60 & 64.7 & 45.4 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{False Positive and False Negative} rates for different threshold values $\tau$ for the identification of similar queries. This identification is used by the defense which perturbs similar queries. The $\ell_2$ distance is used and the victim model passes the representation through its head after which the threshold $\tau$ is used. } \label{tab:compare-threshold} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccr} \toprule $\tau$ & False Positive Rate (\%) & False Negative Rate (\%) \\ \midrule 12 & 4.7 $\pm$ 1.7 & 53.1 $\pm$ 2.8 \\ 13 & 12.3 $\pm$ 3.1 & 35.1 $\pm$ 3.1 \\ 14 & 27.7 $\pm$ 3.4 & 19.3 $\pm$ 2.2 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{False Positive and False Negative} rates for different threshold values $\tau$ for the identification of similar queries. This identification is used by the defense which perturbs similar queries. The $\ell_2$ distance is used and the victim model uses the representations directly. } \label{tab:compare-threshold2} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccr} \toprule $\tau$ & False Positive Rate (\%) & False Negative Rate (\%) \\ \midrule 17 & 7.7 $\pm$ 2.3 & 49.0 $\pm$ 2.5 \\ 18 & 16.2 $\pm$ 2.7 & 39.5 $\pm$ 2.5 \\ 19 & 28.2 $\pm$ 2.6 & 26.4 $\pm$ 2.2 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{False Positive and False Negative} rates for different threshold values $\tau$ for the identification of similar queries. This identification is used by the defense which perturbs similar queries. \textbf{Cosine similarity} is used and the victim model passes the representations through the head before using the threshold. Note that with cosine similarity, a similarity value $> \tau$ is classified as similar. \ahmad{These tables are probably no longer important to refer to or talk about since a) the results are not fully up to date and b) we do not want to focus specifically on the types of defenses. } } \label{tab:compare-threshold3} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lccr} \toprule $\tau$ & False Positive Rate (\%) & False Negative Rate (\%) \\ \midrule 0.45 & 31.4 $\pm$ 2.7 & 9.4 $\pm$ 1.8 \\ 0.5 & 15.5 $\pm$ 2.6 & 21.3 $\pm$ 2.3 \\ 0.55 & 7.0 $\pm$ 1.7 & 34.1 $\pm$ 2.1 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{table}[t] \caption{\textbf{Watermark Success Rate} on rotation prediction for models stolen with SVHN queries and different losses.} \label{tab:watermarking} \vskip 0.15in \small \centering \begin{tabular}{lccc} \toprule \textbf{\# Queries } & \textbf{ MSE } & \textbf{ SoftNN } & \textbf{ InfoNCE } \\ \midrule 10000 & 55.35 & 55.82 & 57.45 \\ 20000 & 55.92 & 55.32 & 57.2 \\ 30000 & 58.19 & 54.5 & 57.78 \\ 40000 & 55.78 & 56.68 & 55.75 \\ 50000 & 58.84 & 57.11 & 58.98 \\ 60000 & 56.84 & 57.58 & 58.02 \\ 70000 & 56.89 & 59.53 & 56.52 \\ \bottomrule \end{tabular} \end{table} \begin{table}[t] \caption{\textbf{Watermark Success Rate} on rotation prediction for models stolen with CIFAR10 queries and different augmentations applied to queries. \textbf{Standard} refers to the standard augmentations used in SimCLR, \textbf{+Rotation} refers to the standard augmentations along with rotations, and \textbf{NoAug} refers to completely unaugmented images.} \label{tab:watermarking_cifar_aug} \vskip 0.15in \small \centering \begin{tabular}{lccccccccc} \toprule \textbf{\# Queries } & & \textbf{ MSE } & & & \textbf{ SoftNN } & & & \textbf{ InfoNCE } \\ \cmidrule(lr){1-1} \cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10} & Standard & +Rotation & NoAug & Standard & +Rotation & NoAug & Standard & +Rotation & NoAug \\ \midrule 10000 & 54.69 & 73.76 & 54.61 & 55.48 & 74.49 & 56.45 & 56.53 & 56.85 & 57.0 \\ 20000 & 60.62 & 74.68 & 60.49 & 58.43 & 76.67 & 59.45 & 58.38 & 59.52 & 57.72 \\ 30000 & 61.45 & 75.84 & 61.45 & 59.03 & 77.86 & 62.03 & 58.01 & 59.92 & 58.84 \\ 40000 & 61.21 & 76.15 & 62.66 & 62.56 & 77.86 & 60.86 & 58.84 & 60.99 & 61.76 \\ 50000 & 59.81 & 76.5 & 60.95 & 62.15 & 78.53 & 63.94 & 59.42 & 63.21 & 62.34 \\ \bottomrule \end{tabular} \end{table} \section{Hierarchy of Loss Functions} \forestset{ sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,edge={->},base=bottom,where n children=0{}{}}}, background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}} } \begin{figure} \begin{center} \begin{forest} [quadratic [symmetrized] [contrastive [supervised contrastive] ] ] \end{forest} \end{center} \caption{Hierarchy of the loss functions.} \label{fig:loss-hierarchy} \end{figure} We present a hierarchy of loss functions in Figure~\ref{fig:loss-hierarchy}. \section{Hierarchy of Defenses} \begin{figure*} \begin{center} \begin{forest} [Defenses [Proactive [PoW-PATE] ] [Active [Noisy \\ Representations] ] [Passive \\ (against contrastive losses) [Detect Similar \\ Representations] ] [Reactive \\ (against quadratic losses) [Watermarking \\ Augmentations] [Dataset Inference \\ from Representations] ] ] \end{forest} \end{center} \caption{Hierarchy of the defense methods.} \label{fig:defense-hierarchy} \end{figure*} The hierarchy of defenses is presented in Figure~\ref{fig:defense-hierarchy}. \section{Stealing Algorithms} \begin{algorithm} \caption{Training a Downstream Classifier for Linear Evaluation Protocol}\label{alg:downstream} \algorithmicrequire{Victim or Stolen Model $f$, downstream task with labeled data} \algorithmicensure{Downstream linear classifier $g(x; \theta)$} \begin{algorithmic}[1] \STATE Add a linear layer to the model $f$ and freeze all previous layers \FOR{labeled query batches $\{x_k, y_k\}_{k=1}^{N}$} \STATE Compute loss $\mathcal{L} \left\{ \{f(x_k), y_k\} \right\}$ where $\mathcal{L} \{f(x),y\} = - \sum_{i} y_k \log f(x)$ \STATE Update linear model parameters $\theta \coloneqq \theta - \eta \nabla_{\theta} \mathcal{L}$ \ENDFOR \end{algorithmic} \end{algorithm} \section{Defenses} \subsection{Prediction Poisoning} \label{sec:prediction-poisoning-analysis} We can consider the gradient of the loss with respect to the model parameters $\theta \in \mathbb{R}^{D}$ for a query $x$ made by the attacker to formalize this objective as in~\cite{orekondy2019prediction}. We let $y_v \in \mathbb{R}^n$ be the representations returned by the victim model and $\tilde{y_v}$ be the perturbed representations which will act as targets for the stolen model $F$ to be trained by the attacker. Then the gradient of the loss function which will be used by the attacker to update its model parameters based on the unperturbed representations is $a = -\nabla_{\theta} \mathcal{L} \{ F(x; \theta), y_v \}$. Similarly, let $b = -\nabla_{\theta} \mathcal{L} \{ F(x; \theta), \tilde{y_v} \}$ be the gradient when the perturbed representations are returned. To harm the attacker's gradient, the similarity between $a$ and $b$ should be minimized. This similarity can be quantified with various metrics such as the $\ell_2$ distance or cosine similarity. We let $G$ be the downstream linear classifier trained by a legitimate user and $\phi \in \mathbb{R}^E$ be the parameters of this model. Further, let $J$ be the loss function used to train this classifier and $t \in \mathbb{R}^k$ be the target labels from the dataset used for the downstream task. Then in order to avoid harming the legitimate user, the victim must maximize the similarity between \begin{equation*} c = -\nabla_{\phi} J \{ G(y_v; \phi), t \} \end{equation*} and \begin{equation*} d = -\nabla_{\phi} J \{ G(\tilde{y_v}; \phi), t \} \end{equation*} Although there are various loss functions $\mathcal{L}$ which can be used by an attacker when training a stolen model, we assume for simplicity that the attacker uses the Mean Squared Error (MSE) loss. For the downstream task which involves a standard training task, we assume standard training so that $J$ can be chosen as the Cross Entropy Loss. With these assumptions, $a$ can be simplified as: \begin{align*} & -\nabla_{\theta} \mathcal{L} \{ F(x; \theta), y_v \} \\ & = -\nabla_{\theta} \frac{1}{n} \sum_{i=1}^{n} (F(x; \theta)_i - y_{v_i})^2 \\ & = - \frac{1}{n} \sum_{i=1}^{n} \nabla_{\theta} (F(x; \theta)_i - y_{v_i})^2 \\ & = - \frac{1}{n} \sum_{i=1}^{n} 2 (F(x; \theta)_i - y_{v_i}) \nabla_{\theta} (F(x; \theta)_i - y_{v_i}) \\ & = -\frac{2}{n} \sum_{i=1}^{n} (F(x; \theta)_i - y_{v_i}) \cdot \nabla_{\theta} (F(x; \theta)_i) \end{align*} since $\nabla_{\theta} y_{v} = 0$. This can then be simplified as the matrix product \begin{equation*} a = -\frac{2}{n} \nabla_{\theta} F^{T} (F(x; \theta)- y_v) \end{equation*} where $\nabla_{\theta} F \in \mathbb{R}^{n \times D}$ is the Jacobian of the stolen model $F$. In a similar way, $b$ can be simplified to \begin{equation*} -\frac{2}{n} \nabla_{\theta} F^{T} (F(x; \theta)-\tilde{y_v}) \end{equation*} To optimize $\tilde{y_v}$ so that the similarity between $a$ and $b$ is minimized, we thus need to recreate the attacker's model $F$ in some form to approximate the Jacobian $ \nabla_{\theta} F$ and the model's output $F(x)$. This can be done by using a surrogate model $F_{surr}$ on the victim's end. Then if we let $\mathrm{sim}$ be the similarity function used, the optimization objective can be written as \begin{equation*} \min_{\tilde{y_v}} \mathrm{sim} (a,b) = \min_{\tilde{y_v}} \mathrm{sim} (-\frac{2}{n} \nabla_{\theta} F_{surr}^{T} (F_{surr}(x; \theta)-y_v), -\frac{2}{n} \nabla_{\theta} F_{surr}^{T} (F_{surr}(x; \theta)-\tilde{y_v})) \end{equation*} We also simplify $c$ as \begin{align*} & -\nabla_{\phi} J \{ G(y_v; \phi), t \} \\ &= -\nabla_{\phi} -\sum_{i=1}^{k} t_i \log G(y_v; \phi)_i \\ &= \sum_{i=1}^{k} \nabla_{\phi} t_i \log G(y_v; \phi)_i \\ &= \sum_{i=1}^{k} t_i \nabla_{\phi} \log G(y_v; \phi)_i \\ &= \nabla_{\phi} \log G(y_v)^T t \\ \end{align*} and $d$ as $\nabla_{\phi} \log G(\tilde{y_v})^T t$. In this case, we note that to satisfy this optimization requirement, the victim must recreate the downstream classifier $G$ to estimate the Jacobians $\nabla_{\phi} \log G(y_v; \phi) \in \mathbb{R}^{k \times E}$ and $\nabla_{\phi} \log G(\tilde{y_v}; \phi)$. Again this can be done using a surrogate model $G_{surr}$ on the victim's end based on which we can write the optimization objective for the downstream task as \begin{equation*} \max_{\tilde{y_v}} \mathrm{sim} (\nabla_{\phi} \log G_{surr}(y_v)^T t, \nabla_{\phi} \log G_{surr}(\tilde{y_v})^T t) \end{equation*} Note that different similarity functions may be used for the two objectives. \subsection{Watermarking Defense} We include additional results for our Watermarking defense which embeds predictive information about a particular augmentation (rotations, in our case) in the features learned by the victim. The ability of the watermark to transfer is measured by the Watermark Success Rate, which is the accuracy of a classifier trained to predict the watermarking augmentation. In our experiments, this task is prediction between images rotated by angles in $[0^{\circ}, 180^{\circ}]$ or $[180^{\circ}, 360^{\circ}]$. A random, genuinely but separately trained, model achieves random performance on this task, i.e. around 50\% watermark success rate. Table~\ref{tab:watermarking} shows that the watermark transfers sufficiently for models stolen with SVHN queries and different losses. Since the watermarking strategy is closely related to the augmentations used during training or stealing, we test the watermark success rate for CIFAR10 queries that are augmented with the standard SimCLR augmentations, standard augmentations with rotations included, or no augmentations at all. We report these results in Table~\ref{tab:watermarking_cifar_aug} and find that in all cases, the watermark transfers to the stolen model well. If the adversary happens to use rotations as an augmentation, the watermark transfer is significantly stronger. However, this is not necessary for good watermark transfer, as demonstrated by the NoAug success rates. \subsection{Dataset Inference Defense} We also tested an approach based on Dataset Inference~\citep{maini2021dataset} as a possible defense. In the case of representation models, we directly measure the $\ell_2$ distance between the representations of a victim model and a model stolen with various methods. We also compute the distance between the representations of a victim model and a random model, which in this case was trained on the same dataset and using the same architecture but a different random seed that resulted in different parameters. The distance is evaluated on the representations of each model on the training data used to train the victim model. We obtain the results averaged across the datasets in Table~\ref{tab:datasetinfBig}. The general trend is that the more queries the adversaries issue against the victim model that are used to train the stolen copy, the smaller the distance between the representations from the victim and stolen models. In terms of loss functions, the stealing with MSE always results in smaller distances than for another Random model. On the other hand, for attacks that use either InfoNCE or SoftNN losses, it is rather hard to differentiate between stolen models and a random model based on the distances of their representations from the victim as some have a higher distance while others have a lower distance. We think that the attacks may be able to be identified as their distances become lower than a random model with more queries. We also observe a similar trend with watermarks where the MSE and SoftNN loss methods give different performances compared to a random model. The more an adversary interacts with the victim model to steal it, the easier it is to claim ownership by distinguishing the stolen model’s behavior on the victim model’s training set. \begin{table*}[t] \caption{$\ell_2$ distances between the representation of a stolen model and a victim model. The Random column denotes model of the same architecture and training procedure like the victim model but with a different initial random seed. The Victim column designates the type of dataset used by the victim. The AdvData represents the data used by an adversary to steal the victim model.\adam{We should use victim's training set to measure these distances.}} \label{tab:datasetinfBig} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{ccc|cccc} \toprule \# Queries & Victim & AdvData & Random & MSE & InfoNCE & SoftNN \\ \midrule 9K & CIFAR10 & CIFAR10 & 34.1 & 26.6 & 44 & 14.4 \\ 50K & CIFAR10 & CIFAR10 & 34.1 & 14.6 & 40 & 12.8 \\ 50K & ImageNet & CIFAR10 & 65.8 & 25.2 & 36.2 & 119.6 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table*} \begin{table*}[t] \caption{Average standard deviation values for various victim models, a random model and a stolen model from the victim with multiple loss functions used for stealing. In each case, the p-values, $p_1$ and $p_2$ associated with the two hypothesis tests $H_0: \mu_{\sigma_S} \leq \mu_{\sigma_V}$ and $H_0: \mu_{\sigma_R} = \mu_{\sigma_V}$ respectively are also presented. \ahmad{Remove} } \label{tab:otherdatasetinf} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{ccc|ccccc} \toprule \# Queries & Victim & Loss & $\mu_{\sigma_V}$ & $\mu_{\sigma_R}$ & $\mu_{\sigma_S}$ & $p_1$ & $p_2$ \\ \midrule 9K & CIFAR10 & MSE & 0.0608 & 0.0605 & 0.0197 & 0.999 & 0.978 \\ 9K & CIFAR10 & SoftNN & 0.0608 & 0.0605 & 0.0269 & 0.999 & 0.978 \\ 9K & CIFAR10 & InfoNCE & 0.0608 & 0.0605 & 0.045 & 0.973 & 0.978 \\ 50K & CIFAR10 & MSE & 0.0608 & 0.0605 & 0.029 & 0.999 & 0.978 \\ 50K & CIFAR10 & InfoNCE & 0.0608 & 0.0605 & 0.021 & 0.999 & 0.978 \\ 50K & CIFAR10 & SoftNN & 0.0608 & 0.0605 & 0.048 & 0.910 & 0.978 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table*} \begin{table*}[t] \caption{\textbf{Dataset Inference.} Compare the differences between raw data points and their augmentations for different private and public datasets. We use statistical t-test where the null hypothesis is that the differences in distances are smaller for the public dataset than for the private dataset, where $\Delta \mu$ is the effect size. \textit{Size} is the image size. U is un-/self-supervised learning, while S denotes the supervised learning.} \label{tab:dataset-inference-main} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{cccccccccc} \toprule Size & \# Queries & \# Aug. & Model & Learning & Private & Public & $\Delta \mu$ & p-value & t-value \\ \midrule 32 & 100 & 100 & SVHN & U & SVHN & SVHN & -0.17 & 0.99 & -2.90 \\ 32 & 10000 & 100 & SVHN & U & SVHN & SVHN & -0.005 & 0.79 & -0.82 \\ 224 & 64 & 10 & ImageNet & U & ImageNet & ImageNet & -0.005 & 0.99 & -2.53 \\ 224 & 32 & 10 & ImageNet & S & ImageNet & ImageNet & 0.71 & 0.028 & 1.92 \\ 224 & 64 & 10 & ImageNet & S & ImageNet & ImageNet & 1.06 & $10^{-5}$ & 4.03 \\ 224 & 64 & 10 & ImageNet & S & ImageNet & ImageNet & 0.89 & $10^{-4}$ & 3.61 \\ 224 & 128 & 10 & ImageNet & S & ImageNet & ImageNet & 0.36 & 0.02 & 1.97 \\ 224 & 256 & 10 & ImageNet & S & ImageNet & ImageNet & -0.44 & 0.99 & -3.31 \\ 224 & 256 & 10 & ImageNet & S & ImageNet & ImageNet & -0.12 & 0.81 & -0.87 \\ 224 & 1024 & 10 & ImageNet & U & ImageNet & ImageNet & -0.02 & 1.0 & -33.99 \\ \hline 32 & 50 & 10 & SVHN & S & SVHN & SVHN & 0.15 & 0.0685 & 1.49 \\ 32 & 50 & 10 & SVHN & S & SVHN & SVHN & 0.39 & 0.033 & 1.84 \\ 32 & 50 & 10 & CIFAR10 & S & CIFAR10 & CIFAR10 & -0.46 & 0.99 & -4.3 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table*} We present result for the dataset inference method in Table~\ref{tab:dataset-inference-main}. \section{Distances with Random Noise Augmentations} This section describes an alternate form of a defense based on the distances between the representations of multiple inputs close to one another. The process first consists of the selection of several points $\{ x_i \} _i$ in the training set by the victim model. Then for each such point $x_i$, several nearby points $x_i^{j}$ (within a ball of radius $r$) are generated by adding random noise $\delta = \mathcal{U} (0,r)$. For each value of $j$, the $\ell_2$ difference between the representations of the model on $x_i^j$ and $x_i$ are found. This is done for the victim model $f_v$ and the model being tested $f_t$ so that we have the following: $d_{v_i} = \{ \cup_{j} \lVert f_v(x_i^j) - f_v(x_i) \rVert_2 \}$ and $d_{t_i} = \{ \cup_{j} \lVert f_t(x_i^j) - f_t(x_i) \rVert_2 \}$. Next the standard deviation $\sigma_{v_i}$ and $\sigma_{t_i}$ of the lists $d_{v_i}$ and $d_{v_j}$ respectively are found. This is then repeated for all $i$ in the training set and the means of the standard deviations, $\mathbb{E} [ \sigma_v ]$ and $\mathbb{E} [ \sigma_t ]$ are found. We expect that $\mathbb{E} [ \sigma_t ]$ is less than $\mathbb{E} [ \sigma_v ]$ if the model $f_t$ is a stolen model as it will likely have overfit representations based on the representations it used from the victim model. It will therefore not be as reactive to small changes at a point (hence the lower standard deviation). Meanwhile we expect that for a random model that was not stolen and instead trained normally, the means of the standard deviations will be equal. To test this, we use a standard t-test with null hypothesis $H_0 :\mathbb{E} [ \sigma_t ] = \mathbb{E} [ \sigma_v ]$ where we reject the null hypothesis and thus decide that $t$ is a stolen model if $p < 0.05$. \newpage \section {Representation Model Architecture} \label{app:modelarch} This section shows a sample representation model architecture (in this case a ResNet34 model). (generated using \textit{torchsummary}). \VerbatimInput{figures/modelformat.txt} \section{Defense Strategies} We consider different defense strategies to protect representation models from model extraction attacks. We analyze current state-of-the-art strategies from SL and either show why they are inadequate for SSL in their present state or how they can be adjusted to the new setting. \subsection{Watermarking-based Defense} \label{sec:watermarking-defense} SL methods have been shown to use input triggers and labels to watermark their models and claim the ownership with high confidence~\cite{jia2020entangled}. In the self-supervised setting, labels are replaced by vector representations. Adding a trigger to the input may not entangle the watermark enough to be extracted during stealing, and adding a trigger to the representations leaves the defense susceptible to adaptive attacks like pruning. Instead, we can take advantage of data augmentations to incorporate structural watermarks in representations that are naturally extracted during stealing. In particular, we select a private augmentation, not used during contrastive training. We train representations to contain discriminative information about this augmentation instead of being invariant to it. We then use the presence of this information to claim ownership, without affecting downstream performance. Such a defense requires training the encoder simultaneously with an \textit{augmentation predictor}\xspace. This is a relatively small discriminator and adds a negligible computational cost to training. It is trained to distinguish between views of the private augmentation and the encoder is trained to output representations that perform well on the \textit{augmentation predictor}\xspace, in addition to the contrastive learning. Representations from this encoder are invariant to other augmentations but contain discriminative information about the private one. We hypothesize that any stolen model would extract this information and also perform well on the \textit{augmentation predictor}\xspace. On the other hand, other genuinely trained encoders should perform no better than random chance on it. We test our hypothesis on the \textit{Direct Extraction} attack against SimCLR encoders for CIFAR10 and SVHN datasets. The original SimCLR training procedure uses random crops, horizontal flips, color jitter, grayscale and Gaussian blur for contrastive learning of representations. We use rotation prediction as the watermarking task. For every input image, we randomly generate two views, one rotated by an angle in $[0^{\circ}, 180^{\circ}]$ and the other rotated by an angle in $[180^{\circ}, 360^{\circ}]$. The victim encoder includes a two-layer MLP, the \textit{augmentation predictor}\xspace, that maps representations to the rotation interval they belong to. The encoder optimizes both the training and watermarking objectives. When evaluating Watermark Success Rate, training images are selected and augmented with the same rotations the victim is trained with. The stolen model's representations are then evaluated on the \textit{augmentation predictor}\xspace to obtain its accuracy on the watermark task. Note that the same evaluation of another genuinely trained model gives an accuracy of around 50\%, close to random chance. To claim the ownership of the stolen model, we use the statistical t-test. The null hypothesis is that the probability of correct rotation classification for a tested model should be equal to those of a benign random model. Our results in Table~\ref{tab:ownership-watermark} and Figure~\ref{fig:wm_graph} give evidence that the watermarked behavior transfers to models stolen using different loss functions. These models obtain accuracies on the watermark task that are significantly higher than random chance and can be used to claim the ownership with 95\% confidence. While this method inherently entangles watermark behavior in the representations, an adaptive adversary may attempt to remove it. We note that such an adaptive attack is unlikely to succeed due to the absence of input-label pairs that are key to SL methods. As such, finding the private augmentation and stealing the victim while enforcing invariance would require as much insight and computational cost as training from scratch. However, we leave the complete treatment of this to future work. We note the assumptions, advantages and disadvantages of this method. The success of this defense hinges on two heavy assumptions: (1) genuinely trained models would not reasonably output representations that contain this exact discriminative information. In practice, they may actually be invariant to it. (2) The adversary is unable to guess the watermark task and remove its information without essentially training from scratch. If these assumptions hold, this defense has the advantage of inherently entangling the watermark task information into the representation. Even a model stolen with fewer queries extracts the watermark well enough for the defender to claim ownership, as demonstrated in Figure~\ref{fig:wm_graph}. Disadvantages include failure modes when the above assumptions do not hold, and the requirement to retrain existing encoders with an \textit{augmentation predictor}\xspace. This may be difficult especially if a model has already been trained. \begin{table}[t] \caption{\textbf{Ownership t-test for Watermarks.} $\Delta \mu$ is the effect size.} \label{tab:ownership-watermark} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{ccccc} \toprule Dataset & \# Queries & $\Delta \mu$ & p-value & t-value \\ \midrule CIFAR10 & 10K & 0.07 & 6.34e-14 & 9.81 \\ CIFAR10 & 50K & 0.11 & 1.27e-21 & 15 \\ SVHN & 10K & 0.06 & 2.59e-11 & 8.22 \\ SVHN & 50K & 0.09 & 3e-15 & 10.64 \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} \begin{figure}[t] \vskip -0.15in \centering \includegraphics[width=1.1\linewidth]{figures/WMvsStealQueries.png} \vskip -0.1in \caption{\textbf{Watermark Success Rate} for models stolen with different loss functions vs. a genuinely trained model (Random Model). } \label{fig:wm_graph} \vskip -0.1in \end{figure} \subsection{Perturbation-based Defenses} The perturbation-based defenses modify model outputs to hinder the training of the stolen copy. A simple application of this method for SSL is to perturb the output representations with some random noise. Due to the large dimensions and different use cases of representations compared to softmax outputs in the supervised setting, the results of adding noise highly depends on the training objectives of an attacker and legitimate user. We conducted a simple test of this adaptation and observed a drop of up to 10\% in the performance of a stolen encoder against a non-adaptive attacker, while also incurring a slight drop in performance (of around 1\% to 2\%) on downstream tasks for legitimate users. (see Section~\ref{sec:add-noise-to-representations} in Appendix). However, in general, this noise needs to be tuned according to the situation and may require further assumptions about attackers. Prediction poisoning is an advanced active defense method against the extraction of SL models, where the defender perturbs the outputs to decrease the performance of the attacker's stolen model~\citep{orekondy2019prediction} while maintaining a high quality of outputs for benign users. In the case of a prediction poisoning defense for SSL, the defender should add perturbations to the outputs that must simultaneously optimize two objectives: the perturbation should harm the training of an encoder model by an adversary, while not affecting the training of a downstream model used by a legitimate user. We provide an analysis that shows the difficulty in applying this defense in the SSL setting (see Section~\ref{sec:prediction-poisoning-analysis}). The prediction poisoning defense for SSL requires a complicated and expensive two-way optimization. The victim would have to use at least two surrogate models, for the stolen encoder and a legitimate downstream classifier, and approximate their respective Jacobians. Moreover, several assumptions are needed such as the type of loss functions used and the types of potential downstream tasks legitimate users are training on. Another issue is the lack of labels in SSL. The victim must know the target labels $L$ used by the legitimate user for the specific downstream task. This can be done by considering multiple possibilities for downstream tasks or by requiring legitimate users to choose a specific downstream task. However, since there can be multiple legitimate users, multiple possible values of $L$ would need to be considered, thereby further constraining the optimization. \subsection{Detection of Model Extraction} \label{sec:detection-defense} The passive defenses try to detect adversarial inputs by analyzing the distribution of input queries. However, there is a very wide spectrum of acceptable inputs to SSL models. Moreover, detection methods like PRADA~\citep{juuti2019prada} do not generalize to attacks that utilize only natural data~\citep{orekondy2019knockoff,pal2020activethief} while such data can be used for the representation extraction. The detection methods might be useful against attackers who apply contrastive loss functions (e.g., InfoNCE or SupCon) and provide two augmentations of the same image as inputs, for example, to recreate the head $g$. For this purpose, the victim can collect the history of representations returned for a given user. Then, for a new query $w$, it can check the history to determine if there is a similar query $w'$, potentially different augmentation of the same raw input image $x$. Most encoders are trained to maximize the similarity on outputs from a projection head $z=g(\cdot)$. Thus, we carry out the comparison between queries on the level of their projection outputs $z$ from the head $g_v$ instead of on representations $y$. We do not carry out the similarity search on the level of input images since the representations or projection outputs can be seen as compressed versions of inputs and stored at a much lower cost. There are different metrics that can be used to measure the distances between vectors. We find that both the $\ell_2$-norm and cosine distance metrics work relatively well in identifying similar queries (Tables~\ref{tab:compare-threshold},\ref{tab:compare-threshold3}) while a metric such as the $\ell_1$ norm hurts the performance. Moreover, using the head is important in improving the performance as we observe lower error rates (Tables~\ref{tab:compare-threshold},\ref{tab:compare-threshold2}). If queries for different views of the same input are run from different accounts, then the defense has to analyze representations from many accounts and find out which accounts issue queries that result in similar representations. \subsection{Dataset Inference} Another defense that we consider is inspired by the idea of dataset inference~\citep{maini2021dataset}. It identifies whether a given model was stolen by verifying if a suspected adversary's model has private knowledge from the victim's train set. It builds on the observation that a model behaves differently when presented with its training data versus unseen (test) data; the private training points are further away from decision boundaries than public (test) data points since the optimization algorithms locally \textit{overfit} around the decision boundaries. Then, the stolen model, although obtained by model extraction, exhibits similar behavior to the victim model. The self-supervised models do not have decision boundaries, so we adjust the dataset inference defense: instead of analyzing distances of data points from decision boundaries, we analyze loss values from private (train) vs public (test) sets. To compute the loss, we use the projection head from the training stage. \ahmad{This is still somewhat too focused on the results, highlight the difficulties} \textbf{Hypothesis Testing.} Using the loss scores produced by head $g_v$, we create equal-sized sample vectors $l_t$ and $l_p$ from private training and public data, respectively. Following \cite{maini2021dataset}'s method, we test the null hypothesis $\mathcal{H}_0 : \mu_p < \mu_t$ where $\mu_p=\bar{l_p}$ and $\mu_t = \bar{l_t}$ are mean loss scores. The test either rejects $\mathcal{H}_0$ and conclusively rule that $f_v$ is \textit{stolen}, or gives an inconclusive result. Our results suggest that the signal for identifying that a stolen model contains knowledge about a victim's private training data is much weaker for encoders than SL models. We hypothesize that SL models \textit{overfit} more to the training set than the encoders, which apply heavier augmentations (see Table~\ref{tab:dataset-inference-main}). This makes it harder to use dataset inference in the SSL setting. \subsection{Calibrated Proof-of-Work} The calibrated proof-of-work defense proposes to make model extraction more difficult by requiring users to solve a puzzle before they can read predictions from an ML model exposed via a public API~\citep{powDefense}. The puzzle is generated using the HashCash function and requires a user to find a suffix that can be appended to a challenge string so that the message digest has a specific number of leading zeros. The difficulty of the puzzle depends on how the privacy leakage incurred by a given user differs from the expected privacy leakage for a legitimate user. The defense requires us to model a behavior of a legitimate user. In the SL setting, we can expect queries to come from a similar distribution as the victim's training set. However, for the SSL models, the training set is usually much larger and more diverse. In principle, any user query might be valid since we cannot anticipate any specific downstream task. Moreover, this defense method estimates the information or privacy leakage from the target model. These can be easily computed based on the softmax outputs in SL but not directly from the representations, which are not trained to express probability values. The defense uses the PATE framework~\citep{papernot2017semi,papernot2018scalable}, which measures privacy leakage for individual queries. PATE creates teacher models that are trained on the defender’s training data and uses predictions from each teacher. Such predictions are not available in the encoder models. Another way to estimate the information leakage of a query is by computing the entropy value. Again, it can be calculated from the softmax values in SL but not from the representations. A possible way to circumvent the difficulty is by computing the entropy directly on the input image, however, this value is not tied to the model and does not reflect its information leakage. Overall, we could require a user to solve a small puzzle for each query to prevent the ML API from being flooded by requests, but it is challenging to precisely calibrate the difficulty of the puzzle. \section{Electronic Submission} \label{submission} Submission to ICML 2022 will be entirely electronic, via a web site (not email). Information about the submission process and \LaTeX\ templates are available on the conference web site at: \begin{center} \textbf{\texttt{http://icml.cc/}} \end{center} The guidelines below will be enforced for initial submissions and camera-ready copies. Here is a brief summary: \begin{itemize} \item Submissions must be in PDF\@. \item \textbf{New to this year}: If your paper has appendices, submit the appendix together with the main body and the references \textbf{as a single file}. Reviewers will not look for appendices as a separate PDF file. So if you submit such an extra file, reviewers will very likely miss it. \item Page limit: The main body of the paper has to be fitted to 8 pages, excluding references and appendices; the space for the latter two is not limited. For the final version of the paper, authors can add one extra page to the main body. \item \textbf{Do not include author information or acknowledgements} in your initial submission. \item Your paper should be in \textbf{10 point Times font}. \item Make sure your PDF file only uses Type-1 fonts. \item Place figure captions \emph{under} the figure (and omit titles from inside the graphic file itself). Place table captions \emph{over} the table. \item References must include page numbers whenever possible and be as complete as possible. Place multiple citations in chronological order. \item Do not alter the style template; in particular, do not compress the paper format by reducing the vertical spaces. \item Keep your abstract brief and self-contained, one paragraph and roughly 4--6 sentences. Gross violations will require correction at the camera-ready phase. The title should have content words capitalized. \end{itemize} \subsection{Submitting Papers} \textbf{Paper Deadline:} The deadline for paper submission that is advertised on the conference website is strict. If your full, anonymized, submission does not reach us on time, it will not be considered for publication. \textbf{Anonymous Submission:} ICML uses double-blind review: no identifying author information may appear on the title page or in the paper itself. \cref{author info} gives further details. \textbf{Simultaneous Submission:} ICML will not accept any paper which, at the time of submission, is under review for another conference or has already been published. This policy also applies to papers that overlap substantially in technical content with conference papers under review or previously published. ICML submissions must not be submitted to other conferences and journals during ICML's review period. Informal publications, such as technical reports or papers in workshop proceedings which do not appear in print, do not fall under these restrictions. \medskip Authors must provide their manuscripts in \textbf{PDF} format. Furthermore, please make sure that files contain only embedded Type-1 fonts (e.g.,~using the program \texttt{pdffonts} in linux or using File/DocumentProperties/Fonts in Acrobat). Other fonts (like Type-3) might come from graphics files imported into the document. Authors using \textbf{Word} must convert their document to PDF\@. Most of the latest versions of Word have the facility to do this automatically. Submissions will not be accepted in Word format or any format other than PDF\@. Really. We're not joking. Don't send Word. Those who use \textbf{\LaTeX} should avoid including Type-3 fonts. Those using \texttt{latex} and \texttt{dvips} may need the following two commands: {\footnotesize \begin{verbatim} dvips -Ppdf -tletter -G0 -o paper.ps paper.dvi ps2pdf paper.ps \end{verbatim}} It is a zero following the ``-G'', which tells dvips to use the config.pdf file. Newer \TeX\ distributions don't always need this option. Using \texttt{pdflatex} rather than \texttt{latex}, often gives better results. This program avoids the Type-3 font problem, and supports more advanced features in the \texttt{microtype} package. \textbf{Graphics files} should be a reasonable size, and included from an appropriate format. Use vector formats (.eps/.pdf) for plots, lossless bitmap formats (.png) for raster graphics with sharp lines, and jpeg for photo-like images. The style file uses the \texttt{hyperref} package to make clickable links in documents. If this causes problems for you, add \texttt{nohyperref} as one of the options to the \texttt{icml2022} usepackage statement. \subsection{Submitting Final Camera-Ready Copy} The final versions of papers accepted for publication should follow the same format and naming convention as initial submissions, except that author information (names and affiliations) should be given. See \cref{final author} for formatting instructions. The footnote, ``Preliminary work. Under review by the International Conference on Machine Learning (ICML). Do not distribute.'' must be modified to ``\textit{Proceedings of the $\mathit{39}^{th}$ International Conference on Machine Learning}, Baltimore, Maryland, USA, PMLR 162, 2022. Copyright 2022 by the author(s).'' For those using the \textbf{\LaTeX} style file, this change (and others) is handled automatically by simply changing $\mathtt{\backslash usepackage\{icml2022\}}$ to $$\mathtt{\backslash usepackage[accepted]\{icml2022\}}$$ Authors using \textbf{Word} must edit the footnote on the first page of the document themselves. Camera-ready copies should have the title of the paper as running head on each page except the first one. The running title consists of a single line centered above a horizontal rule which is $1$~point thick. The running head should be centered, bold and in $9$~point type. The rule should be $10$~points above the main text. For those using the \textbf{\LaTeX} style file, the original title is automatically set as running head using the \texttt{fancyhdr} package which is included in the ICML 2022 style file package. In case that the original title exceeds the size restrictions, a shorter form can be supplied by using \verb|\icmltitlerunning{...}| just before $\mathtt{\backslash begin\{document\}}$. Authors using \textbf{Word} must edit the header of the document themselves. \section{Format of the Paper} All submissions must follow the specified format. \subsection{Dimensions} The text of the paper should be formatted in two columns, with an overall width of 6.75~inches, height of 9.0~inches, and 0.25~inches between the columns. The left margin should be 0.75~inches and the top margin 1.0~inch (2.54~cm). The right and bottom margins will depend on whether you print on US letter or A4 paper, but all final versions must be produced for US letter size. Do not write anything on the margins. The paper body should be set in 10~point type with a vertical spacing of 11~points. Please use Times typeface throughout the text. \subsection{Title} The paper title should be set in 14~point bold type and centered between two horizontal rules that are 1~point thick, with 1.0~inch between the top rule and the top edge of the page. Capitalize the first letter of content words and put the rest of the title in lower case. \subsection{Author Information for Submission} \label{author info} ICML uses double-blind review, so author information must not appear. If you are using \LaTeX\/ and the \texttt{icml2022.sty} file, use \verb+\icmlauthor{...}+ to specify authors and \verb+\icmlaffiliation{...}+ to specify affiliations. (Read the TeX code used to produce this document for an example usage.) The author information will not be printed unless \texttt{accepted} is passed as an argument to the style file. Submissions that include the author information will not be reviewed. \subsubsection{Self-Citations} If you are citing published papers for which you are an author, refer to yourself in the third person. In particular, do not use phrases that reveal your identity (e.g., ``in previous work \cite{langley00}, we have shown \ldots''). Do not anonymize citations in the reference section. The only exception are manuscripts that are not yet published (e.g., under submission). If you choose to refer to such unpublished manuscripts \cite{anonymous}, anonymized copies have to be submitted as Supplementary Material via CMT\@. However, keep in mind that an ICML paper should be self contained and should contain sufficient detail for the reviewers to evaluate the work. In particular, reviewers are not required to look at the Supplementary Material when writing their review (they are not required to look at more than the first $8$ pages of the submitted document). \subsubsection{Camera-Ready Author Information} \label{final author} If a paper is accepted, a final camera-ready copy must be prepared. For camera-ready papers, author information should start 0.3~inches below the bottom rule surrounding the title. The authors' names should appear in 10~point bold type, in a row, separated by white space, and centered. Author names should not be broken across lines. Unbolded superscripted numbers, starting 1, should be used to refer to affiliations. Affiliations should be numbered in the order of appearance. A single footnote block of text should be used to list all the affiliations. (Academic affiliations should list Department, University, City, State/Region, Country. Similarly for industrial affiliations.) Each distinct affiliations should be listed once. If an author has multiple affiliations, multiple superscripts should be placed after the name, separated by thin spaces. If the authors would like to highlight equal contribution by multiple first authors, those authors should have an asterisk placed after their name in superscript, and the term ``\textsuperscript{*}Equal contribution" should be placed in the footnote block ahead of the list of affiliations. A list of corresponding authors and their emails (in the format Full Name \textless{}email@domain.com\textgreater{}) can follow the list of affiliations. Ideally only one or two names should be listed. A sample file with author names is included in the ICML2022 style file package. Turn on the \texttt{[accepted]} option to the stylefile to see the names rendered. All of the guidelines above are implemented by the \LaTeX\ style file. \subsection{Abstract} The paper abstract should begin in the left column, 0.4~inches below the final address. The heading `Abstract' should be centered, bold, and in 11~point type. The abstract body should use 10~point type, with a vertical spacing of 11~points, and should be indented 0.25~inches more than normal on left-hand and right-hand margins. Insert 0.4~inches of blank space after the body. Keep your abstract brief and self-contained, limiting it to one paragraph and roughly 4--6 sentences. Gross violations will require correction at the camera-ready phase. \subsection{Partitioning the Text} You should organize your paper into sections and paragraphs to help readers place a structure on the material and understand its contributions. \subsubsection{Sections and Subsections} Section headings should be numbered, flush left, and set in 11~pt bold type with the content words capitalized. Leave 0.25~inches of space before the heading and 0.15~inches after the heading. Similarly, subsection headings should be numbered, flush left, and set in 10~pt bold type with the content words capitalized. Leave 0.2~inches of space before the heading and 0.13~inches afterward. Finally, subsubsection headings should be numbered, flush left, and set in 10~pt small caps with the content words capitalized. Leave 0.18~inches of space before the heading and 0.1~inches after the heading. Please use no more than three levels of headings. \subsubsection{Paragraphs and Footnotes} Within each section or subsection, you should further partition the paper into paragraphs. Do not indent the first line of a given paragraph, but insert a blank line between succeeding ones. You can use footnotes\footnote{Footnotes should be complete sentences.} to provide readers with additional information about a topic without interrupting the flow of the paper. Indicate footnotes with a number in the text where the point is most relevant. Place the footnote in 9~point type at the bottom of the column in which it appears. Precede the first footnote in a column with a horizontal rule of 0.8~inches.\footnote{Multiple footnotes can appear in each column, in the same order as they appear in the text, but spread them across columns and pages if possible.} \begin{figure}[ht] \vskip 0.2in \begin{center} \centerline{\includegraphics[width=\columnwidth]{icml_numpapers}} \caption{Historical locations and number of accepted papers for International Machine Learning Conferences (ICML 1993 -- ICML 2008) and International Workshops on Machine Learning (ML 1988 -- ML 1992). At the time this figure was produced, the number of accepted papers for ICML 2008 was unknown and instead estimated.} \label{icml-historical} \end{center} \vskip -0.2in \end{figure} \subsection{Figures} You may want to include figures in the paper to illustrate your approach and results. Such artwork should be centered, legible, and separated from the text. Lines should be dark and at least 0.5~points thick for purposes of reproduction, and text should not appear on a gray background. Label all distinct components of each figure. If the figure takes the form of a graph, then give a name for each axis and include a legend that briefly describes each curve. Do not include a title inside the figure; instead, the caption should serve this function. Number figures sequentially, placing the figure number and caption \emph{after} the graphics, with at least 0.1~inches of space before the caption and 0.1~inches after it, as in \cref{icml-historical}. The figure caption should be set in 9~point type and centered unless it runs two or more lines, in which case it should be flush left. You may float figures to the top or bottom of a column, and you may set wide figures across both columns (use the environment \texttt{figure*} in \LaTeX). Always place two-column figures at the top or bottom of the page. \subsection{Algorithms} If you are using \LaTeX, please use the ``algorithm'' and ``algorithmic'' environments to format pseudocode. These require the corresponding stylefiles, algorithm.sty and algorithmic.sty, which are supplied with this package. \cref{alg:example} shows an example. \begin{algorithm}[tb] \caption{Bubble Sort} \label{alg:example} \begin{algorithmic} \STATE {\bfseries Input:} data $x_i$, size $m$ \REPEAT \STATE Initialize $noChange = true$. \FOR{$i=1$ {\bfseries to} $m-1$} \IF{$x_i > x_{i+1}$} \STATE Swap $x_i$ and $x_{i+1}$ \STATE $noChange = false$ \ENDIF \ENDFOR \UNTIL{$noChange$ is $true$} \end{algorithmic} \end{algorithm} \subsection{Tables} You may also want to include tables that summarize material. Like figures, these should be centered, legible, and numbered consecutively. However, place the title \emph{above} the table with at least 0.1~inches of space before the title and the same after it, as in \cref{sample-table}. The table title should be set in 9~point type and centered unless it runs two or more lines, in which case it should be flush left. \begin{table}[t] \caption{Classification accuracies for naive Bayes and flexible Bayes on various data sets.} \label{sample-table} \vskip 0.15in \begin{center} \begin{small} \begin{sc} \begin{tabular}{lcccr} \toprule Data set & Naive & Flexible & Better? \\ \midrule Breast & 95.9$\pm$ 0.2& 96.7$\pm$ 0.2& $\surd$ \\ Cleveland & 83.3$\pm$ 0.6& 80.0$\pm$ 0.6& $\times$\\ Glass2 & 61.9$\pm$ 1.4& 83.8$\pm$ 0.7& $\surd$ \\ Credit & 74.8$\pm$ 0.5& 78.3$\pm$ 0.6& \\ Horse & 73.3$\pm$ 0.9& 69.7$\pm$ 1.0& $\times$\\ Meta & 67.1$\pm$ 0.6& 76.5$\pm$ 0.5& $\surd$ \\ Pima & 75.1$\pm$ 0.6& 73.9$\pm$ 0.5& \\ Vehicle & 44.9$\pm$ 0.6& 61.5$\pm$ 0.4& $\surd$ \\ \bottomrule \end{tabular} \end{sc} \end{small} \end{center} \vskip -0.1in \end{table} Tables contain textual material, whereas figures contain graphical material. Specify the contents of each row and column in the table's topmost row. Again, you may float tables to a column's top or bottom, and set wide tables across both columns. Place two-column tables at the top or bottom of the page. \subsection{Theorems and such} The preferred way is to number definitions, propositions, lemmas, etc. consecutively, within sections, as shown below. \begin{definition} \label{def:inj} A function $f:X \to Y$ is injective if for any $x,y\in X$ different, $f(x)\ne f(y)$. \end{definition} Using \cref{def:inj} we immediate get the following result: \begin{proposition} If $f$ is injective mapping a set $X$ to another set $Y$, the cardinality of $Y$ is at least as large as that of $X$ \end{proposition} \begin{proof} Left as an exercise to the reader. \end{proof} \cref{lem:usefullemma} stated next will prove to be useful. \begin{lemma} \label{lem:usefullemma} For any $f:X \to Y$ and $g:Y\to Z$ injective functions, $f \circ g$ is injective. \end{lemma} \begin{theorem} \label{thm:bigtheorem} If $f:X\to Y$ is bijective, the cardinality of $X$ and $Y$ are the same. \end{theorem} An easy corollary of \cref{thm:bigtheorem} is the following: \begin{corollary} If $f:X\to Y$ is bijective, the cardinality of $X$ is at least as large as that of $Y$. \end{corollary} \begin{assumption} The set $X$ is finite. \label{ass:xfinite} \end{assumption} \begin{remark} According to some, it is only the finite case (cf. \cref{ass:xfinite}) that is interesting. \end{remark} \subsection{Citations and References} Please use APA reference format regardless of your formatter or word processor. If you rely on the \LaTeX\/ bibliographic facility, use \texttt{natbib.sty} and \texttt{icml2022.bst} included in the style-file package to obtain this format. Citations within the text should include the authors' last names and year. If the authors' names are included in the sentence, place only the year in parentheses, for example when referencing Arthur Samuel's pioneering work \yrcite{Samuel59}. Otherwise place the entire reference in parentheses with the authors and year separated by a comma \cite{Samuel59}. List multiple references separated by semicolons \cite{kearns89,Samuel59,mitchell80}. Use the `et~al.' construct only for citations with three or more authors or after listing all authors to a publication in an earlier reference \cite{MachineLearningI}. Authors should cite their own work in the third person in the initial version of their paper submitted for blind review. Please refer to \cref{author info} for detailed instructions on how to cite your own papers. Use an unnumbered first-level section heading for the references, and use a hanging indent style, with the first line of the reference flush against the left margin and subsequent lines indented by 10 points. The references at the end of this document give examples for journal articles \cite{Samuel59}, conference publications \cite{langley00}, book chapters \cite{Newell81}, books \cite{DudaHart2nd}, edited volumes \cite{MachineLearningI}, technical reports \cite{mitchell80}, and dissertations \cite{kearns89}. Alphabetize references by the surnames of the first authors, with single author entries preceding multiple author entries. Order references for the same authors by year of publication, with the earliest first. Make sure that each reference includes all relevant information (e.g., page numbers). Please put some effort into making references complete, presentable, and consistent, e.g. use the actual current name of authors. If using bibtex, please protect capital letters of names and abbreviations in titles, for example, use \{B\}ayesian or \{L\}ipschitz in your .bib file. \section*{Accessibility} Authors are kindly asked to make their submissions as accessible as possible for everyone including people with disabilities and sensory or neurological differences. Tips of how to achieve this and what to pay attention to will be provided on the conference website \url{http://icml.cc/}. \section*{Software and Data} If a paper is accepted, we strongly encourage the publication of software and data with the camera-ready version of the paper whenever appropriate. This can be done by including a URL in the camera-ready copy. However, \textbf{do not} include URLs that reveal your institution or identity in your submission for review. Instead, provide an anonymous URL or upload the material as ``Supplementary Material'' into the CMT reviewing system. Note that reviewers are not required to look at this material when writing their review. \section*{Acknowledgements} \textbf{Do not} include acknowledgements in the initial version of the paper submitted for blind review. If a paper is accepted, the final camera-ready version can (and probably should) include acknowledgements. In this case, please place such acknowledgements in an unnumbered section at the end of the paper. Typically, this will include thanks to reviewers who gave useful comments, to colleagues who contributed to the ideas, and to funding agencies and corporate sponsors that provided financial support. \nocite{langley00}
\section{Introduction} \subfile{sections/introduction} \section{Contributions} \subfile{sections/contribution} \section{Proposed Approach} \subfile{sections/proposedApproach} \section{Implementation Details} \subfile{sections/implementationDetails} \section{Datasets} \subfile{sections/Datasets} \section{Results} \subfile{sections/results} \section{Discussion and Conclusion} \subfile{sections/conclusion} \bibliographystyle{ieeetr} \subsection{The Lung CT Dataset} This dataset \cite{Grove2015} consists of reconstructed lung scans from 60 patients for a total of 4682 slices. Out of these scans, we chose to exclude the scans of the patients 232 and 233 due to an uncertainty on the file format that is beyond of our scope of understanding. As a result, we use slices from 58 patients, that we split into 53 for training and 5 for testing, for a total of 4543 slices. Each slice is then re-projected for 2D tomography: using the scanning geometry shown in Table \ref{table:scanning_geometries}, the dataset consists of 2330559 1D acquisitions. Fig. \ref{figure:R_111_patient_slice} shows a slice from the dataset. \subsection{The 3D Hand Model Dataset} This dataset consists of 50 3D left-hand models. It consists of a rigged blender model that can be deformed in order to change various parameters affecting the pose of the hand and the shape of fingers. As such, the dataset is a single blender file with a random deformation script. For reproducibility purposes, we indicate that we use the seed 22032022 to generate the dataset and rely on numpy random library. The dataset is available at \cite{Valat2022Hands}. The models are point clouds representing the surface of the object: no intern features are simulated. The base model and the code will be made available shortly after the publication of the paper. For this study, we split the dataset into 45 hands for training and 5 hands for testing. Fig. \ref{figure:3D_hand_example} shows the baseline model from which the samples are derived, using random transformations of the bone rig. For instance, Fig. \ref{figure:sample_7} shows the \nth{7} sample of the dataset from three different viewpoints. When re-projected using the scanning geometry shown in Table \ref{table:scanning_geometries}, the dataset consists of 25650 2D acquisitions. \end{document} \subsection{U-nets Architecture for Combining Acquisitions} \label{unets_architecture} According to the constraint stated in \ref{subsection:design_of_interpolation_networks}, the architecture has a two-channel input layer. For 2D (resp. 3D) imaging, layers have 1D (resp. 2D) kernels. Let $C(n, m, k, s, p)$ be a convolutional layer with $n$ input features, $m$ output features, a kernel of size $k$, a stride of size $s=1$ and a padding of size $p=1$ (default), followed by a LeakyReLu activation function with a negative slope of $0.1$. Let \textbf{$D_{m,n}$} be down-sampling unit with $m$ input features and $n$ output features. It is composed of the following sequence of layers \begin{center} $C(m, m, 4, 2, 1$) - $C(m, n, 3)$ - $C(n, n, 3)$ \end{center} The encoding part of the U-net is implemented as follows: \textbf{$C(2,32,3)$} - \textbf{$C(32,32,3)$} - \textbf{$D_{32-64}$} - \textbf{$D_{64-128}$} - \textbf{$D_{128-256}$} - \textbf{$D_{256-512}$} - \textbf{$D_{512-1024}$} - \textbf{$D_{1024-1024}$} - \textbf{$D_{1024-1024}$} - Let $CT(m, n, k, s, p)$ be a transposed convolutional layer with $m$ input features, $n$ output features, a kernel of size $k$, a stride of size $s=1$ and a padding of size $p=1$ (default), followed by a LeakyReLu activation function with a negative slope of $0.1$. Let \textbf{$U_{m,n}$} be an up-sampling unit with $m$ input features and $n$ output features. It is composed of the following sequence of layers: \begin{center} $CT(m, m, 4, 2, 1$) - $C(m, n, 3)$ - $C(2n, n, 3)$ \end{center} Note that the last layer of \textbf{$U_{m,n}$} has two $2n$ input features has it receives the residual from the corresponding down-sampling unit. The decoding part of the U-net is implemented as follows: \textbf{$D_{1024-1024}$} - \textbf{$D_{1024-1024}$} - \textbf{$D_{1024-512}$} - \textbf{$D_{512-256}$} - \textbf{$D_{256-128}$} - \textbf{$D_{128-64}$} - \textbf{$D_{64-32}$} - \textbf{$C(32,2,3)$} - \textbf{$C(4,1,3)$} \subsection{Sinogram Improvement Implementation} \label{sinogram_improvement_implementation} To study the impact of the initial interpolation on further regularisation frameworks, we implement the 2D sinogram improvement method proposed in \cite{Lee2018} and compare the performance it yields on sinograms interpolated with various methods. We do not implement it for 3D XCT as it does not scale to 3D. We implement this patch-based method, though use patches of size 64x64 for computational convenience instead of 50x50, which according to them should not affect performances. As patches are processed, all convolutional layers are 2D. The encoding part of the U-net is implemented as follows: \textbf{$C(1,32,3)$} - \textbf{$C(32,32,3)$} - \textbf{$D_{32-64}$} - \textbf{$D_{64-128}$} - \textbf{$D_{128-256}$} - \textbf{$D_{256-512}$} - \textbf{$D_{512-1024}$} The decoding part of the U-net is implemented as follows: \textbf{$D_{1024-512}$} - \textbf{$D_{512-256}$} - \textbf{$D_{256-128}$} - \textbf{$D_{128-64}$} - \textbf{$D_{64-32}$} - \textbf{$C(32,2,3)$} - \textbf{$C(4,1,3)$} \subsection{Training} We use the Adam optimiser with a learning rate of $10^{-4}$, train each network for four epochs by minimising the Mean-Square-Error between the inferred and target acquisitions. We refer the reader to our \href{https://github.com/Emvlt/data-driven-interpolation}{GitHub} and our \href{https://tensorboard.dev/experiment/WJEZyqVDSBe3sNmI350jAg}{Tensorboard} repositories for further implementation informations. \end{document} \subsection{The Interpolation Problem} Given a scarce-view sinogram made of N acquisitions sampled at regular angular intervals $\Delta\theta$, our goal is to infer intermediate measurements at given angular positions to up-sample the sinogram by a chosen ratio R. Let $A_i$ be a sampled (reference) measurement, a linear interpolation of acquisitions at equally distant intervals would compute the following: \begin{equation} A_j = w A_i + (1-w) A_{i+\Delta\theta} \label{eq:linear_interpolation} \end{equation} With \begin{equation*} w = 1-\frac{j-i}{\Delta\theta}, \forall j \in \left[ i+1, i+\mathrm{R}-1 \right] \end{equation*} Other interpolation methods estimate the contribution of neighbouring acquisitions and then use a weighted sum of these estimates to predict the intermediate acquisition. Consider Eq. (\ref{eq:linear_interpolation}), and let $g_w$ be a function that maps $A_i$ to $A_j$: \begin{equation} \label{superSlowMo_interpolation_equation} A_j = w g_w(A_i) + (1-w) g_{1-w}(A_{i+\Delta\theta}) \end{equation} The approach described in Eq. (\ref{superSlowMo_interpolation_equation}) is used in state-of-the-art (SOTA) interpolation techniques for estimating missing frames in videos, such as SuperSlowMo \cite{Jiang2017}. More generally, one can write the following generic interpolation: \begin{equation} \label{our_computation} A_j = f_w (A_i , A_{i+\Delta\theta}) \end{equation} Where $f_w$ is a non-linear function depending on R and $\Delta\theta$. We propose to approximate $f_w$ using a neural network (NN). \subsection{Design of the Interpolation Networks} \label{subsection:design_of_interpolation_networks} \begin{figure} \centering \begin{tikzpicture}[ node distance = 7mm and -3mm, every node/.style = {draw=black, rounded corners, fill=gray!30, minimum width=0cm, minimum height=0.5cm, align=center} ] \node (0) {$A_0$}; \node (1)[right=5mm of 0.east] {$A_1$}; \node (2)[right=5mm of 1.east] {$A_2$}; \node (3)[right=5mm of 2.east] {$A_3$}; \node (4)[right=5mm of 3.east] {$A_4$}; \draw [->,red] (4.north) to [out=150,in=30] (1.north); \draw [->,green] (4.north) to [out=150,in=30] (2.north); \draw [->,blue] (4.north) to [out=150,in=30] (3.north); \draw [->,blue] (0.south) to [out=-30,in=-150] (1.south); \draw [->,green](0.south) to [out=-30,in=-150] (2.south); \draw [->,red] (0.south) to [out=-30,in=-150] (3.south); \end{tikzpicture} \caption{For a factor of reduction of acquisitions of 4, there are 2 ways to combine evenly spaced acquisitions in between the two reference ones. } \label{fig:combining_acquisitions} \end{figure} As one can observe in Fig. \ref{fig:combining_acquisitions}, acquisitions $A_0$ and $A_4$ are given and we would like to infer missing ones, at three intermediate angles. Using Eq. \ref{eq:linear_interpolation}, we have \begin{equation} \begin{split} A_1 &= \frac{3}{4} A_0 + \frac{1}{4} A_4 = f_{(\frac{1}{4}, \frac{3}{4})} (A_0, A_4)\\ A_2 &= \frac{2}{4} A_0 + \frac{2}{4} A_4 = f_{(\frac{2}{4}, \frac{2}{4})} (A_0, A_4)\\ A_3 &= \frac{3}{4} A_4 + \frac{1}{4} A_0 = f_{(\frac{1}{4}, \frac{3}{4})} (A_4, A_0) \end{split} \end{equation} We train two networks to map $f_{(\frac{1}{4}, \frac{3}{4})}$ and $f_{(\frac{2}{4}, \frac{2}{4})}$. This choice imposes two constraints on the NN design: it must have two input channels on the first layer and a network will always receive the input from the closest acquisition on the first channel of its input layer. \end{document} \subsection{Description of Experiments} To begin with, for 2D XCT, we compare the performances of three deterministic methods (\textit{linear interpolation}, \textit{bilinear up-sampling}, \textit{nearest neighbours up-sampling}) to ours. We also estimate the impact of 2D enhancement procedures by implementing and training \cite{Lee2018} on sinograms interpolated with the four methods mentioned above. Then, for 3D XCT, we compare \textit{trilinear up-sampling}, \textit{linear interpolation} to our proposed approach. Finally, we change the proportion of given acquisitions to train our method and assess its performance for various R. We measure performance using the Peak Signal-to-Noise Ratio and compare the estimated sinograms to the ground truth (Sinogram-PSNR), as well as comparing the reconstructed images computed from the estimated sinograms using the SIRT algorithm (Image-PSNR). For sinogram estimation comparison, we further list the performance as a function of angular distance (Angular-PSNR). PSNR between arrays A and B is computed as : \begin{equation*}\label{eqn:psnr} \mbox{PSNR(A,B)} = 20 \log_{10}(\mbox{max(A,B)}) - 10\log_{10}(\mbox{MSE(A,B)}) \end{equation*} With MSE(A,B) the Mean-Square-Error between A and B. Sinogram-PSNR provides a general view of the quality of each method, whilst angular-PSNR allows us to understand the relationship between interpolation method and angular distance. Finally, image-PSNR shows if meaningful information in the image domain is added by the interpolation. \subsection{2D LungCT Results} \paragraph{Comparison between Interpolation Methods} The results are assessed on the test dataset, which is made of the slices from the patients with ID 64, 127, 143, 146 and 274. To begin with, we assess the sinogram-PSNR of sinograms interpolated using different up-sampling and interpolation methods and present the results in Table \ref{table:2D_LungCT_sinogram-PSNR}. For all volumes considered, we observe that the proposed approach yields an improvement of the sinogram-PSNR of 5.4db PSNR compared to the linear interpolation method, when averaged across the whole test dataset. Up-sampling methods significantly under-perform compared to interpolation methods. In addition to that, we report the per-slice sinogram-PSNR for the sample 274 in Fig. \ref{figure:sinogram_PSNR_274}. For all slices considered, the proposed approach outperforms the other methods. Fig. \ref{figure:sinograms_274_60} shows, for the slice 6 of the sample 274 of the HandCT dataset, the sinograms interpolated using the four described methods and their differences with the target sinogram. Considering the angular-PSNR shown in Fig. \ref{figure:angular_PSNR_LungCT}, it is clear that the initial enhancement method influences the sinogram quality. For the nearest-neighbour up-sampling, the performance drops significantly for the acquisitions further away from the reference ones. For bilinear up-sampling, the drop is less important and it averages to a better sinogram-PSNR. The proposed method outperforms deterministic methods for all considered acquisitions. This performance is confirmed by the image-PSNR, as shown in Table \ref{table:2D_LungCT_reconstruction-PSNR}. The proposed approach yields a 6.1dB PSNR improvement compared to linear interpolation when averaged across the whole test dataset. We also report the per-slice image-PSNR for the sample 274 in Fig. \ref{figure:image_PSNR_274} and the results are consistent with the per-slice sinogram-PSNR. A qualitative comparison between the target and scarce reconstructions, and the ones obtained from the linear and proposed interpolation method is available in Fig. \ref{figure:LungCT_reconstructions}. \paragraph{Impact on Further Regularisation} We report the impact of the initial interpolation on the 2D sinogram enhancement procedure in Table \ref{table:2D_LungCT_sinogram-PSNR_improved}. The procedure enhances significantly the sinogram-PSNR of the deterministic sinogram interpolation and up-sampling methods. However, the performance gain is less important for the proposed approach. As detailed in Table \ref{table:2D_LungCT_sinogram-PSNR_improved}, the 2D enhancement procedure yields only a 0.8 dB PSNR. Crucially, up-sampling a sinogram and enhancing it using an image-processing tool does not outperform the proposed interpolation method. This results is confirmed by the angular-PSNR shown in Fig. \ref{figure:angular_PSNR_LungCT_improved} and the image PSNR shown in Fig. \ref{figure:image_PSNR_LungCT_improved}. The whole 2D enhancement procedure yields a 0.72dB PSNR improvement, compared to the proposed stand-alone interpolation approach. \subsection{3D HandCT Results} \paragraph{Comparison Between Interpolation Methods} The results are assessed on the test dataset, which is made of the volumes with ID 7, 18, 3, 2 and 46. To begin with, we assess the sinogram-PSNR of the sinograms interpolated using different up-sampling and interpolation methods and present the results in Table \ref{table:3D_handCT_sinogram-PSNR}. For all the volumes considered, we observe that the proposed approach yields an improvement of the sinogram-PSNR of 6.48dB PSNR compared to the linear interpolation method, when averaged accross the test dataset. Compared to trilinear up-sampling, the proposed method yields an average sinogram-PSNR enhancement of 7.86 dB. The angular-PSNR shown in Fig. \ref{figure:angular_PSNR_HandCT} shows that up to 9.14dB are gained on acquisitions inferred at an angular distance of 8. compared to linear interpolation. This performance is confirmed by the image-PSNR, as shown in Table \ref{table:3D_handCT_reconstruction-PSNR}: the proposed approach yields a 7.4dB PSNR improvement compared to linear interpolation when averaged accross the test dataset, and 10.56dB PSNR compared to trilinear up-sampling. Fig. \ref{figure:acquisitions_HandCT} shows acquisitions inferred using the three considered methods, and their difference to the target acquisition. \paragraph{Efficiency Against Up-sampling Ratio} We reproduce the whole enhancement procedure for up-sampling ratios of 2, 4 and 8 to assess the performance of our method for different amount of acquisitions. These ratios correspond to angular intervals of 0.7\textdegree, 1.4\textdegree and 2.8\textdegree between available acquisitions. The results for the sinogram-PSNR averaged accross the test dataset are shown in Fig. \ref{figure:Sinogram-PSNR_against_ratio}. It is clear that, for an up-sampling ratio of 2, linear interpolation performs well. However, for fewer available projections, our method outperforms deterministic interpolation and up-sampling methods. The performance on the sinogram must be mitigated by the results of the image-PSNR shown in Fig. \ref{figure:Image-PSNR_against_ratio}. In the image space, the improvement is noticeable only for up-sampling ratios of 8 and 16. \end{document}
\section{Introduction} Overseas and international shipping highly depends on maritime logistics networks globally. According to Review of Maritime Transport 2021, over 80\% of the volume of international trade in goods is carried by sea, and the percentage is even higher for most developing countries \cite{UNCTAD2021}. Therefore, it is important to predict estimated time of arrival (ETA) of vessels accurately, so that the whole logistics networks run efficiently and smoothly with advanced scheduling and better operation arrangement. In this study, a probability density-based approach is proposed for constructing trajectories from historical ones, and physics-mathematical laws are used for calculating ETA given current dynamic and static status of target vessels. In this study, the work is organized as follows: Section 2 presents literature reviews on this topic. Problem statement follows in Section 3. Methodology is presented in Section 4 for both trajectory construction and ETA prediction. Section 5 shows experimental results and discussion, and lastly conclusion is drawn in Section 6. \section{Literature Review} After literature reviews, studies of trajectories and ETA predictions basically can be classified into two categories. One is machine learning based (e.g. \cite{Bodunov2018, Myung2011, VanLint2005, Wu2003}), and another is physics and mathematical based (e.g. \cite{Fei2011, Tay2012}) for simplicity. In the study of Bodunov $et. al.$\cite{Bodunov2018}, feed-forward neural networks (FFNN) were proposed to predict ETA of vessels, and ensemble machine learning technique was used for destination prediction of vessels. The ensemble machine learning technique was based on Random Forest, Gradient Boosting Decision Trees, XGBoost Trees and Extremely Randomized Trees. The machine learning based approach achieved 90\% and 97\% in accuracy for ETA prediction (in minutes) and destination prediction, respectively. The approach was to train the FFNN models using a target variable time in minutes between the cut-off time point of training snapshot and the timestamp associated to the last point of the trajectory with normalized features between 0 and 1. However, the problem of this approach was not robust when vessels diverge from historical geo-datasets, and the prediction of n-timestamp ahead was not covered due to lack of trajectory behaviour. Additionally, the computational efforts of training these FFNN models were expensive and time consuming. On the other side, according to the study of Fei $et. al.$\cite{Fei2011}, a short-term travelling time prediction approach was proposed by using Bayesian inference-based dynamic linear model. By introducing Bayesian approach, the approach was more robust than sole machine learning models without sacrificing accuracy. The proposed approach achieved as low as 0.26 minutes in MAE. However, this work's point was to find travelling time, not exactly ETA due to unconditional and conditional time coefficients. \section{Problem Statement} Given the background knowledge as mentioned above, the problem here is ``How to predict ETA accurately and effectively, given object vessels' profiles?''. The vessel's profile consists of dynamic status and static information. The dynamic status refers to instantaneous speed, heading, course, position, etc. While static information is about origin, destination, vessel type, cargo type, etc. \section{Methodology} In this section, the methodology of solving the problem stated is presented. To solve the problem stated, there are two steps. The first step is to construct possible trajectories and relevant information that object vessels could encounter according to static and dynamic information. The second step is to predict ETA of object vessels incorporated with the extracted trajectories and relevant information. \subsection{Trajectory Construction} Based on the historical journeys of vessels, their generic trajectories can be extracted and constructed with density scanning approaches, such as Lat-scanning, Lon-scanning and LatLon-scanning. Assume the historical trajectories of a particular origin-destination pair have Latitude-Longitude coordinates ($\mathbf{K}$) as follows: \begin{align} \mathbf{K} = \begin{bmatrix} \phi_1 & \lambda_1 \\ \phi_2 & \lambda_2 \\ \vdots & \vdots \\ \phi_m & \lambda_m \end{bmatrix} \end{align} , where $\phi_i$ and $\lambda_i$ are the $i^{th}$ latitude and longitude of the historical trajectories in radian. Taking Lat-scanning approach as a typical example, the idea is to scan latitudes across the historical trajectories ($\mathbf{K}$) from $\phi_{min}$ to $\phi_{max}$ with a scanning interval ($\eta$), where $\phi_{min} = \min(\{\phi_i, i = 1, 2, 3, ..., m\})$ and $\phi_{max} = \max(\{\phi_i, i = 1, 2, 3, ..., m\})$. At $k^{th}$ scanning latitude $\phi_k$, the longitude values within corresponding scanning interval are captured and the set of captured longitudes is denoted as $\mathbf{\Lambda_k}$, then the probability density of the set of captured longitudes is calculated. Thus, the longitude value with densest probability (i.e. $\lambda_k \in \mathbf{\Lambda_k}$ ) is returned as the corresponding longitude at the scanning latitude $\phi_k$. After iterations of scanning from $\phi_{min}$ to $\phi_{max}$, the constructed trajectories ($\mathbf{L}$) will be further sorted and Kalman filtered according to its trajectory smoothness from origin to destination. Similarly, this whole process can be applied for Lon-scanning and LatLon-scanning. Thus, the constructed trajectory ($\mathbf{L}$) given a particular origin-destination pair is obtained and denoted as follows: \begin{align} \mathbf{L} = \begin{bmatrix} \phi_1 & \lambda_1 \\ \phi_2 & \lambda_2 \\ \vdots & \vdots \\ \phi_n & \lambda_n \end{bmatrix} \label{Eq: L} \end{align} \subsection{ETA Prediction} Here are the mathematical steps for calculating ETA of an particular vessel, given that current position, current speed and origin-destination. As we have defined the trajectory constructed ($\mathbf{L}$) given by the origin-destination as before in Eq. \ref{Eq: L}. Thus, current position ($\mathbf{X_c}$) is defined as follows: \begin{align} \mathbf{X_c} = \begin{bmatrix} \phi_c & \lambda_c \end{bmatrix} \end{align} , where $\phi_c$ and $\lambda_c$ are the current latitude and longitude of the vessel in radian. Given $\mathbf{X_c}$ and $\mathbf{L}$, the closest next position ($\mathbf{X_k}$) in the constructed trajectory can be easily located. Therefore, the total distance to the destination ($D$) can be formulated as follows: \begin{align} D({\mathbf{X_c}, \mathbf{L})} = \psi(\mathbf{X_c}, \mathbf{X_k}) + \sum_{i=k \in \mathbf{L}}^{n-1} \psi(\mathbf{X_i}, \mathbf{X_{i+1}}) \end{align} , where function $\psi(\cdot)$ is the function to calculate distance under great-circle of sphere given by two coordinates on the sphere with Haversine formula \cite{GreatCircleDist}. Any two coordinates on the Earth are denoted as $\mathbf{X_i}, \mathbf{X_j} \equiv (\phi_i, \lambda_i), (\phi_j, \lambda_j)$. According to the Haversine formula, we have equations: \begin{align} H(\theta) & = \sin^{2}(\frac{\theta}{2}) \label{Eq. Haversine 1} \\ H(\theta) & = H(\phi_j-\phi_i) + H(\lambda_j-\lambda_i) \cdot \cos(\phi_i) \cdot \cos(\phi_j) \label{Eq. Haversine 2} \end{align} , where $\theta$ is the great-circle central angle between two coordinates on Earth in radian. Thus, we derive the following equations from Eq. \ref{Eq. Haversine 1} and \ref{Eq. Haversine 2}: \begin{align} \sin^{2}(\frac{\theta}{2}) & = \sin^{2}(\frac{\phi_j-\phi_i}{2}) + \sin^{2}(\frac{\lambda_j-\lambda_i}{2}) \cdot \cos(\phi_i) \cdot \cos(\phi_j) \\ \Rightarrow \theta & = 2 \sin^{-1} \left[ \sqrt{\sin^{2}(\frac{\phi_j-\phi_i}{2}) + \sin^{2}(\frac{\lambda_j-\lambda_i}{2}) \cdot \cos(\phi_i) \cdot \cos(\phi_j)} \right] \end{align} Hence, the function $\psi(\cdot)$ is derived as follows: \begin{align} & \psi(\mathbf{X_i}, \mathbf{X_j}) \equiv \psi((\phi_i, \lambda_i), (\phi_j, \lambda_j)) = R \cdot \theta \\ & = 2R \cdot \sin^{-1} \left[ \sqrt{\sin^{2}(\frac{\phi_j-\phi_i}{2}) + \sin^{2}(\frac{\lambda_j-\lambda_i}{2}) \cdot \cos(\phi_i) \cdot \cos(\phi_j)} \right] \end{align} , where $R$ is the radius of the Earth in km. Given the total distance to the destination ($D$) and current speed ($V$) of vessel (assuming at this constant average speed), the ETA ($T$) can be easily calculated as follows: \begin{align} T = \frac{D}{V} \end{align} \section{Result and Discussion} Based on the methodologies above, numerous rounds of experiments on ETA prediction were conducted. The experiments of ETA prediction are based on the routes between three ports in Australia and one port in Singapore. The three selected ports in Australia are Adelaide, Brisbane and Perth. The reason of the three ports selected is that the trajectories of these ports to Singapore (vice versa) are typical routes covering western, southern and eastern parts of Australia in general. For each particular trajectory, there are 10 timestamps randomly selected and validated across different vessels and journeys to demonstrate the proposed approach has homogeneous and generic capability of ETA predicting without biased conditions of object vessels. \newpage Here are the historical (Figure \ref{Fig: Actual Trajectories of Singapore to Adelaide}) and constructed (Figure \ref{Fig: Constructed Trajectories of Singapore to Adelaide}) trajectories by Lat-scanning, Lon-scanning and LatLon-scanning for Singapore-Adelaide journey with different scanning internals ($\eta$) in degree. According to the historical trajectories from Singapore to Adelaide in Figure \ref{Fig: Actual Trajectories of Singapore to Adelaide}, it is clear to demonstrate that there is no direct route. Generally, vessels will have a stop at Perth in between. The stop may introduce uncertainties in ETA prediction, which may make the prediction less accurate in general. The uncertainties may be due to loading or unloading cargoes, supplies or other services, which duration may be flexible and unpredictable. This stop delay would propagate to impact on ETA prediction toward a corresponding final destination. \begin{figure}[htbp] \centering \includegraphics[width=\linewidth]{./Figures/SGP-Adelaide/Routes_Combined.pdf} \caption{Actual Trajectories (Singapore $\rightarrow$ Adelaide)} \label{Fig: Actual Trajectories of Singapore to Adelaide} \end{figure} According to the constructed trajectories from Singapore to Adelaide in Figure \ref{Fig: Constructed Trajectories of Singapore to Adelaide} across different scanning internals ($\eta$) and scanning methods, it is clear to note that LatLon-scanning can perform better in latitude and longitude directions, compared to merely Lat-scanning or Lon-scanning. For Lat-scanning, it is accurately extracting movements along latitude direction, but there are distortions and missing points along longitude direction. Conversely, Lon-scanning provides detailed movements along longitude direction, but likely fails along latitude direction. Both Lat-scanning and Lon-scanning are losing fidelity with larger scanning intervals ($\eta$), while the issue can be resolved by applying LatLon-scanning. \begin{figure}[htbp] \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.1deg_LatScanned.pdf} \caption{$\eta$=0.1, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.1deg_LonScanned.pdf} \caption{$\eta$=0.1, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.1deg_LatLonScanned.pdf} \caption{$\eta$=0.1, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.3deg_LatScanned.pdf} \caption{$\eta$=0.3, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.3deg_LonScanned.pdf} \caption{$\eta$=0.3, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.3deg_LatLonScanned.pdf} \caption{$\eta$=0.3, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.6deg_LatScanned.pdf} \caption{$\eta$=0.6, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.6deg_LonScanned.pdf} \caption{$\eta$=0.6, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.6deg_LatLonScanned.pdf} \caption{$\eta$=0.6, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.9deg_LatScanned.pdf} \caption{$\eta$=0.9, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.9deg_LonScanned.pdf} \caption{$\eta$=0.9, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/0.9deg_LatLonScanned.pdf} \caption{$\eta$=0.9, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/1.0deg_LatScanned.pdf} \caption{$\eta$=1.0, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/1.0deg_LonScanned.pdf} \caption{$\eta$=1.0, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Adelaide/1.0deg_LatLonScanned.pdf} \caption{$\eta$=1.0, LatLon-Scan} \end{subfigure} \caption{Constructed Trajectories (Singapore $\rightarrow$ Adelaide)} \label{Fig: Constructed Trajectories of Singapore to Adelaide} \end{figure} \newpage Here are the historical (Figure \ref{Fig: Actual Trajectories of Adelaide to Singapore}) and constructed (Figure \ref{Fig: Constructed Trajectories of Adelaide to Singapore}) trajectories by Lat-scan, Lon-Scan and LatLon-Scan for Adelaide-Singapore journey with different scanning internals ($\eta$) in degree. According to the historical trajectories from Adelaide to Singapore in Figure \ref{Fig: Actual Trajectories of Adelaide to Singapore}, it is clear to illustrate that there is no direct route too. Generally, vessels will have a stop at Perth in between. In this case, it is similar to the trajectories above from Singapore to Adelaide, and there are also uncertainties introduced by this stop to influence on ETA prediction toward a corresponding final destination. \begin{figure}[htbp] \centering \includegraphics[width=\linewidth]{./Figures/Adelaide-SGP/Routes_Combined.pdf} \caption{Actual Trajectories (Adelaide $\rightarrow$ Singapore)} \label{Fig: Actual Trajectories of Adelaide to Singapore} \end{figure} According to the constructed trajectories from Adelaide to Singapore in Figure \ref{Fig: Constructed Trajectories of Adelaide to Singapore} across different scanning internals ($\eta$) and scanning methods, it is clear to note that LatLon-scanning can perform better in latitude and longitude directions, compared to merely Lat-scanning or Lon-scanning. For Lat-scanning, the movements are missing significantly along longitude direction as the scanning interval ($\eta$) increases. While, there are missing points along latitude direction for Lon-scanning. \begin{figure}[htbp] \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.1deg_LatScanned.pdf} \caption{$\eta$=0.1, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.1deg_LonScanned.pdf} \caption{$\eta$=0.1, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.1deg_LatLonScanned.pdf} \caption{$\eta$=0.1, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.3deg_LatScanned.pdf} \caption{$\eta$=0.3, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.3deg_LonScanned.pdf} \caption{$\eta$=0.3, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.3deg_LatLonScanned.pdf} \caption{$\eta$=0.3, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.6deg_LatScanned.pdf} \caption{$\eta$=0.6, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.6deg_LonScanned.pdf} \caption{$\eta$=0.6, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.6deg_LatLonScanned.pdf} \caption{$\eta$=0.6, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.9deg_LatScanned.pdf} \caption{$\eta$=0.9, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.9deg_LonScanned.pdf} \caption{$\eta$=0.9, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/0.9deg_LatLonScanned.pdf} \caption{$\eta$=0.9, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/1.0deg_LatScanned.pdf} \caption{$\eta$=1.0, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/1.0deg_LonScanned.pdf} \caption{$\eta$=1.0, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Adelaide-SGP/1.0deg_LatLonScanned.pdf} \caption{$\eta$=1.0, LatLon-Scan} \end{subfigure} \caption{Constructed Trajectories (Adelaide $\rightarrow$ Singapore)} \label{Fig: Constructed Trajectories of Adelaide to Singapore} \end{figure} \newpage Here are the historical (Figure \ref{Fig: Actual Trajectories of Singapore to Brisbane}) and constructed (Figure \ref{Fig: Constructed Trajectories of Singapore to Brisbane}) trajectories by Lat-scan, Lon-Scan and LatLon-Scan for Singapore-Brisbane journey with different scanning internals ($\eta$) in degree. According to the historical trajectories from Singapore to Brisbane in Figure \ref{Fig: Actual Trajectories of Singapore to Brisbane}, it is clear to illustrate that there is a direct route. In this case, it could be more straight forward and accurate to predict ETA of vessels. \begin{figure}[htbp] \centering \includegraphics[width=\linewidth]{./Figures/SGP-Brisbane/Routes_Combined.pdf} \caption{Actual Trajectories (Singapore $\rightarrow$ Brisbane)} \label{Fig: Actual Trajectories of Singapore to Brisbane} \end{figure} According to the constructed trajectories from Singapore to Brisbane in Figure \ref{Fig: Constructed Trajectories of Singapore to Brisbane} across different scanning internals ($\eta$) and scanning methods, it is clear to note that LatLon-scanning can perform better in latitude and longitude directions, compared to merely Lat-scanning or Lon-scanning. For Lat-scanning, the movements are missing significantly near Singapore along longitude direction as the scanning interval ($\eta$) increases. While Lon-scanning has similar missing issue where it approaches Brisbane along latitude direction. \begin{figure}[htbp] \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.1deg_LatScanned.pdf} \caption{$\eta$=0.1, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.1deg_LonScanned.pdf} \caption{$\eta$=0.1, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.1deg_LatLonScanned.pdf} \caption{$\eta$=0.1, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.3deg_LatScanned.pdf} \caption{$\eta$=0.3, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.3deg_LonScanned.pdf} \caption{$\eta$=0.3, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.3deg_LatLonScanned.pdf} \caption{$\eta$=0.3, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.6deg_LatScanned.pdf} \caption{$\eta$=0.6, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.6deg_LonScanned.pdf} \caption{$\eta$=0.6, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.6deg_LatLonScanned.pdf} \caption{$\eta$=0.6, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.9deg_LatScanned.pdf} \caption{$\eta$=0.9, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.9deg_LonScanned.pdf} \caption{$\eta$=0.9, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/0.9deg_LatLonScanned.pdf} \caption{$\eta$=0.9, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/1.0deg_LatScanned.pdf} \caption{$\eta$=1.0, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/1.0deg_LonScanned.pdf} \caption{$\eta$=1.0, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Brisbane/1.0deg_LatLonScanned.pdf} \caption{$\eta$=1.0, LatLon-Scan} \end{subfigure} \caption{Constructed Trajectories (Singapore $\rightarrow$ Brisbane)} \label{Fig: Constructed Trajectories of Singapore to Brisbane} \end{figure} \newpage Here are the historical (Figure \ref{Fig: Actual Trajectories of Brisbane to Singapore}) constructed (Figure \ref{Fig: Constructed Trajectories of Brisbane to Singapore}) trajectories by Lat-scan, Lon-Scan and LatLon-Scan for Brisbane-Singapore journey with different scanning internals ($\eta$) in degree. According to the historical trajectories from Brisbane to Singapore in Figure \ref{Fig: Actual Trajectories of Brisbane to Singapore}, it is clear to illustrate that there is a direct route. In this case, it could be more straight forward and accurate to predict ETA of vessels. \begin{figure}[htbp] \centering \includegraphics[width=\linewidth]{./Figures/Brisbane-SGP/Routes_Combined.pdf} \caption{Actual Trajectories (Brisbane $\rightarrow$ Singapore)} \label{Fig: Actual Trajectories of Brisbane to Singapore} \end{figure} According to the constructed trajectories from Brisbane to Singapore in Figure \ref{Fig: Constructed Trajectories of Brisbane to Singapore} across different scanning internals ($\eta$) and scanning methods, it is clear to note that LatLon-scanning can perform better in latitude and longitude directions, compared to merely Lat-scanning or Lon-scanning. Similarly to the trajectories from Singapore to Brisbane, there are also missing movements near Singapore and Brisbane for both Lat-scanning and Lon-scanning. \begin{figure}[htbp] \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.1deg_LatScanned.pdf} \caption{$\eta$=0.1, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.1deg_LonScanned.pdf} \caption{$\eta$=0.1, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.1deg_LatLonScanned.pdf} \caption{$\eta$=0.1, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.3deg_LatScanned.pdf} \caption{$\eta$=0.3, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.3deg_LonScanned.pdf} \caption{$\eta$=0.3, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.3deg_LatLonScanned.pdf} \caption{$\eta$=0.3, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.6deg_LatScanned.pdf} \caption{$\eta$=0.6, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.6deg_LonScanned.pdf} \caption{$\eta$=0.6, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.6deg_LatLonScanned.pdf} \caption{$\eta$=0.6, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.9deg_LatScanned.pdf} \caption{$\eta$=0.9, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.9deg_LonScanned.pdf} \caption{$\eta$=0.9, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/0.9deg_LatLonScanned.pdf} \caption{$\eta$=0.9, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/1.0deg_LatScanned.pdf} \caption{$\eta$=1.0, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/1.0deg_LonScanned.pdf} \caption{$\eta$=1.0, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Brisbane-SGP/1.0deg_LatLonScanned.pdf} \caption{$\eta$=1.0, LatLon-Scan} \end{subfigure} \caption{Constructed Trajectories (Brisbane $\rightarrow$ Singapore)} \label{Fig: Constructed Trajectories of Brisbane to Singapore} \end{figure} \newpage Here are the historical (Figure \ref{Fig: Actual Trajectories of Singapore to Perth}) and constructed (Figure \ref{Fig: Constructed Trajectories of Singapore to Perth}) trajectories by Lat-scan, Lon-Scan and LatLon-Scan for Singapore-Perth journey with different scanning internals ($\eta$) in degree. According to the historical trajectories from Singapore to Perth in Figure \ref{Fig: Actual Trajectories of Singapore to Perth}, it is clear to show that there is a direct route. In this case, it could be more straight forward and accurate to predict ETA of vessels. \begin{figure}[htbp] \centering \includegraphics[width=\linewidth]{./Figures/SGP-Perth/Routes_Combined.pdf} \caption{Actual Trajectories (Singapore $\rightarrow$ Perth)} \label{Fig: Actual Trajectories of Singapore to Perth} \end{figure} According to the constructed trajectories from Singapore to Perth in Figure \ref{Fig: Constructed Trajectories of Singapore to Perth} across different scanning internals ($\eta$) and scanning methods, it shows that Lat-scanning loses movements near Singapore, and Lon-scanning eliminates the movement details on passing Indonesia and near Perth. \begin{figure}[htbp] \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.1deg_LatScanned.pdf} \caption{$\eta$=0.1, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.1deg_LonScanned.pdf} \caption{$\eta$=0.1, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.1deg_LatLonScanned.pdf} \caption{$\eta$=0.1, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.3deg_LatScanned.pdf} \caption{$\eta$=0.3, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.3deg_LonScanned.pdf} \caption{$\eta$=0.3, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.3deg_LatLonScanned.pdf} \caption{$\eta$=0.3, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.6deg_LatScanned.pdf} \caption{$\eta$=0.6, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.6deg_LonScanned.pdf} \caption{$\eta$=0.6, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.6deg_LatLonScanned.pdf} \caption{$\eta$=0.6, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.9deg_LatScanned.pdf} \caption{$\eta$=0.9, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.9deg_LonScanned.pdf} \caption{$\eta$=0.9, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/0.9deg_LatLonScanned.pdf} \caption{$\eta$=0.9, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/1.0deg_LatScanned.pdf} \caption{$\eta$=1.0, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/1.0deg_LonScanned.pdf} \caption{$\eta$=1.0, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/SGP-Perth/1.0deg_LatLonScanned.pdf} \caption{$\eta$=1.0, LatLon-Scan} \end{subfigure} \caption{Constructed Trajectories (Singapore $\rightarrow$ Perth)} \label{Fig: Constructed Trajectories of Singapore to Perth} \end{figure} \newpage Here are the historical (Figure \ref{Fig: Actual Trajectories of Perth to Singapore}) and constructed (Figure \ref{Fig: Constructed Trajectories of Perth to Singapore}) trajectories by Lat-scan, Lon-Scan and LatLon-Scan for Perth-Singapore journey with different scanning internals ($\eta$) in degree. According to the historical trajectories from Perth to Singapore in Figure \ref{Fig: Actual Trajectories of Perth to Singapore}, it is clear to show that there is a direct route. In this case, it could be more straight forward and accurate to predict ETA of vessels. \begin{figure}[htbp] \centering \includegraphics[width=\linewidth]{./Figures/Perth-SGP/Routes_Combined.pdf} \caption{Actual Trajectories (Perth $\rightarrow$ Singapore)} \label{Fig: Actual Trajectories of Perth to Singapore} \end{figure} According to the constructed trajectories from Perth to Singapore in Figure \ref{Fig: Constructed Trajectories of Perth to Singapore} across different scanning internals ($\eta$) and scanning methods, similarly, it presents that there are missing details on passing Indonesia, near Singapore and Perth for Lat-scanning and Lon-scanning. latLon-scanning provides most holistic and detailed movements. \begin{figure}[htbp] \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.1deg_LatScanned.pdf} \caption{$\eta$=0.1, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.1deg_LonScanned.pdf} \caption{$\eta$=0.1, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.1deg_LatLonScanned.pdf} \caption{$\eta$=0.1, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.3deg_LatScanned.pdf} \caption{$\eta$=0.3, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.3deg_LonScanned.pdf} \caption{$\eta$=0.3, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.3deg_LatLonScanned.pdf} \caption{$\eta$=0.3, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.6deg_LatScanned.pdf} \caption{$\eta$=0.6, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.6deg_LonScanned.pdf} \caption{$\eta$=0.6, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.6deg_LatLonScanned.pdf} \caption{$\eta$=0.6, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.9deg_LatScanned.pdf} \caption{$\eta$=0.9, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.9deg_LonScanned.pdf} \caption{$\eta$=0.9, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/0.9deg_LatLonScanned.pdf} \caption{$\eta$=0.9, LatLon-Scan} \end{subfigure} \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/1.0deg_LatScanned.pdf} \caption{$\eta$=1.0, Lat-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/1.0deg_LonScanned.pdf} \caption{$\eta$=1.0, Lon-Scan} \end{subfigure}% \begin{subfigure}{.3\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Perth-SGP/1.0deg_LatLonScanned.pdf} \caption{$\eta$=1.0, LatLon-Scan} \end{subfigure} \caption{Constructed Trajectories (Perth $\rightarrow$ Singapore)} \label{Fig: Constructed Trajectories of Perth to Singapore} \end{figure} \newpage The evaluation metrics are Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), Accuracy (ACC), R-Squared, Mean of Error ($\boldsymbol{\mu_{e}}$) and Standard Deviation of Error ($\boldsymbol{\sigma_{e}}$) according to actual time of arrival (ATA) and ETA predicted. The evaluations of ETA prediction experimental results are tabulated as follows in Table \ref{Table: Evaluations of ETA Prediction Experimental Results}. The evaluations of ATA and ETA are also visualized in Figure \ref{Figure: Visualization of ATA and ETA Predictions}. \begin{table}[htbp] \resizebox{\linewidth}{!}{% \begin{tabular}{l|cccrcccc} \hline \textbf{Trajectory} & \textbf{MAE} & \textbf{MSE} & \textbf{RMSE} & \textbf{MAPE} & \textbf{ACC} & \textbf{R-Squared} & $\boldsymbol{\mu_{e}}$ & $\boldsymbol{\sigma_{e}}$ \\ \hline SGP-Adelaide & 0.409 & 0.238 & 0.488 & 14.31\% & 85.69\% & 0.967 & 0.111 & 0.475 \\ SGP-Brisbane & 0.889 & 1.029 & 1.015 & 13.58\% & 86.42\% & 0.714 & 0.683 & 0.750 \\ SGP-Perth & 0.105 & 0.021 & 0.147 & 3.02\% & 96.98\% & 0.994 & 0.001 & 0.147 \\ \textbf{From SGP} & 0.467 & 0.430 & 0.655 & 10.30\% & 89.70\% & 0.944 & 0.191 & 0.627 \\ \hline Adelaide-SGP & 0.139 & 0.046 & 0.215 & 2.36\% & 97.64\% & 0.994 & 0.056 & 0.208 \\ Brisbane-SGP & 0.580 & 0.531 & 0.729 & 9.39\% & 90.61\% & 0.906 & 0.030 & 0.728 \\ Perth-SGP & 0.077 & 0.010 & 0.100 & 4.88\% & 95.12\% & 0.998 & 0.022 & 0.098 \\ \textbf{To SGP} & 0.266 & 0.196 & 0.443 & 5.54\% & 94.46\% & 0.973 & 0.021 & 0.442 \\ \hline \textbf{OVERALL} & 0.366 & 0.313 & 0.559 & 7.92\% & 92.08\% & 0.959 & 0.106 & 0.549 \\ \hline \end{tabular}} \newline\newline\footnotesize\text{$\boldsymbol{\mu_{e}}$: Mean of ETA prediction errors in days.} \\ \footnotesize\text{$\boldsymbol{\sigma_{e}}$: Standard deviation of ETA prediction errors in days.} \caption{Evaluations of ETA Prediction Experimental Results} \label{Table: Evaluations of ETA Prediction Experimental Results} \end{table} \begin{figure}[htbp] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Figure_1_FromSGP.pdf} \caption{Trajectories (From Singapore Port)} \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.98\linewidth]{./Figures/Figure_2_ToSGP.pdf} \caption{Trajectories (To Singapore Port)} \end{subfigure} \caption{Visualization of ATA and ETA Predictions} \label{Figure: Visualization of ATA and ETA Predictions} \end{figure} From Table \ref{Table: Evaluations of ETA Prediction Experimental Results} and Figure \ref{Figure: Visualization of ATA and ETA Predictions}, the ETA predictions of trajectories from Singapore port to Australia ports are slightly less accurate than those of trajectories from Australia ports to Singapore port. A direct finding could be one of reasons to this, which is that the trajectories are more divergent from Singapore port to Australia ports according to illustration in Figures (\ref{Fig: Actual Trajectories of Singapore to Adelaide}, \ref{Fig: Actual Trajectories of Singapore to Brisbane} and \ref{Fig: Actual Trajectories of Singapore to Perth}) and Figures (\ref{Fig: Actual Trajectories of Adelaide to Singapore}, \ref{Fig: Actual Trajectories of Brisbane to Singapore} and \ref{Fig: Actual Trajectories of Perth to Singapore}). This inconsistency of trajectories results in the constructed trajectories being different from each particular historical trajectory. Numerically, the ETA predictions have 89.70\% and 94.46\% in accuracy with 0.944 and 0.973 R-Squared values for the trajectories ``from Singapore'' and ``to Singapore'', respectively. While the overall ETA prediction errors are about 0.106 days (i.e. 2.544 hours) on average with 0.549 days (i.e. 13.176 hours) standard deviation, and the proposed approach has an accuracy of 92.08\% with 0.959 R-Squared value for overall trajectories without differentiating origin and destination. Comparison among different trajectories ``from Singapore'' shows that Perth (96.98\%) as destination has the highest accuracy of ETA prediction, followed by Brisbane (86.42\%) and Adelaide (85.69\%). Similarly, the ETA prediction on trajectories ``to Singapore'' demonstrates that Adelaide (97.64\%) as origin has the highest accuracy, followed by Perth (95.12\%) and Brisbane (90.61\%). \section{Conclusion} In this study, a probability density-based approach for constructing trajectories is proposed and validated through an typical use-case application: Estimated Time of Arrival (ETA) prediction given origin-destination pairs. The ETA prediction is based on physics and mathematical laws given by the extracted information of probability density-based trajectories constructed. The overall ETA prediction errors are about 0.106 days (i.e. 2.544 hours) on average with 0.549 days (i.e. 13.176 hours) standard deviation, and the proposed approach has an accuracy of 92.08\% with 0.959 R-Squared value for overall trajectories selected between Singapore and Australia ports. Due to the nature of physics and mathematical laws, the computational cost of ETA prediction is extremely low and real-time response, compared with big-data approaches using AI/ML. However, the limitations of proposed approach are also considered and listed as follows: \begin{itemize} \item[(a)] Some origin-destination pairs have no direct route. Therefore, stops in between can introduce time gaps for ETA predictions. In this study, time gaps for stops are excluded before experimentation, so that the ETA predictions are mainly equivalent to consider travelling time solely. \item[(b)] The ETA prediction is calculated by current position and speed with the information of constructed trajectories. However, if there are unpredictable changes in routes due to bad weather or disasters etc., then ETA prediction may not be feasible to achieve with the constructed trajectories. \end{itemize} Last but not least, future direction of follow-ups on this study could be evaluating and comparing different approaches on constructing trajectories and ETA predictions, such as physics-mathematical based and big data AI/ML based approaches, in terms of accuracy, feasibility, real-time response capability, computational cost, etc. \section*{Acknowledgment} The authors gratefully thank for all who provide kind reviews, constructive comments and suggestions. \newpage
\chapter{Normalization of drift reduced Braginskii fluid theory} \setlength{\epigraphwidth}{0.7\textwidth} \epigraph{Keep computations to the lowest level of the multiplication table.}{David Hilbert} Converting the drift-reduced Braginskii equations from physical units to a normalized form is useful to numerically solve the model with both finite difference schema and physics-informed machine learning codes. For completeness, the full normalization procedure is shown below. The physical variables and all associated quantities are transformed according to \cite{francisquez2020fluid} \begin{align} \label{eq:normSMT1} \begin{split} n &\leftarrow n/n_0, \\ \phi &\leftarrow \phi/\phi_0, \\ \end{split} \quad \begin{split} T_{s} &\leftarrow T_{s}/T_{s0}, \\ v_{\parallel s} &\leftarrow v_{\parallel s}/c_{s0}, \\ \end{split} \end{align} where $n_0 = 5 \times 10^{19} \text{ m}^{-3}$, $T_{s0} = 25 \text{ eV}$, $c_{s0}^2 = T_{s0}/m_i$, $\phi_0 = B_0 a_0^2/ct_0$, and $t_0 = \sqrt{a_0 R_c/2}/c_{e0}$ is the interchange-like reference timescale. To match the simulation with experimental edge parameters of the Alcator C-Mod tokamak, $B_0 = B_{axis} R_0 /(R_0 + a_0)$ and $R_c = R_0 + a_0$. This in turn defines the following dimensionless constants \begin{eqnal} \!\begin{aligned} \epsilon_R &= \frac{2a}{R_c}, \\ \epsilon_v &= \frac{c_{e0}t_0}{R_c}, \\ \tau &= \frac{T_{i0}}{T_{e0}}, \end{aligned} \qquad \!\begin{aligned} \kappa^i &= 3.9\frac{2}{3}\frac{\TiReft_0}{m_i R_c^2\nu_{i0}}, \\ \eta &= 0.51\nu_{e0}t_0, \\ \kappa^e &= 3.2\frac{2}{3}\frac{\TeReft_0}{\nu_{e0}m_e R_c^2}, \end{aligned} \qquad \!\begin{aligned} \alpha_d &= \frac{T_{e0} ct_0}{eB_0 a^2}, \\ \epsilon_G &= \frac{0.08\tau}{\nu_{i0} t_0}, \\ \epsilon_{Ge} &= \frac{0.73}{12\nu_{e0}t_0} \end{aligned} \end{eqnal} where $c$ and $\nu_{s 0}$ denote the speed of light and collision rate \cite{Huba2013}, respectively. The spatiotemporal coordinates are normalized by the following conversions \begin{align} \label{eq:normXYZT} \begin{split} x &\leftarrow x/a_0, \\ z &\leftarrow z/R_0, \\ \end{split} \quad \begin{split} y &\leftarrow y/a_0, \\ t &\leftarrow t/t_0. \\ \end{split} \end{align} With these transformations, the unitless equations numerically solved are \begin{eqnal}\label{eq:normlnDotGDBH} \d{^e\ln n}{t} = -\epsilon_R\left[\curv{\phi}-\alpha_d\frac{\curv{p_e}}{n}\right] -\epsilon_v\delpar{\vpe}+\frac{1}{n}\nSrcN+\mathcal{D}_{\ln n} \end{eqnal} \begin{eqnal}\label{eq:normwDotGDBH} \pd{\gvort}{t} &= \curv{p_e}+\tau\curv{p_i}+\frac{\epsilon_v}{\alpha_d\epsilon_R}\delpar{j_{\parallel}}-\epsilon_G\curv{G_i} \\ &\quad-\div{\lbrace\frac{n}{B^3}\left[\phi,\gradperp{\phi}+\tau\alpha_d\frac{\gradperp{p_i}}{n}\right]+ \\ &\quad\sqrt{\tau}\epsilon_v\frac{n}{B^2}\vpi\delpar{\left(\gradperp{\phi}+\tau\alpha_d\frac{\gradperp{ p_i}}{n}\right)}\rbrace}+\mathcal{D}_{\gvort} \end{eqnal} \begin{eqnal}\label{eq:normvpeDotGDBH} \d{^e\vpe}{t} &= \frac{m_i}{m_e}\epsilon_v\left(\frac{1}{\alpha_d}\delpar{\phi}-\frac{\delpar{p_e}}{n}-0.71\delpar{T_e}\right) \\ &\quad +4\epsilon_v\epsilon_{Ge}\frac{m_i}{m_e}\frac{\delpar{G_e}}{n} +\epsilon_R\alpha_d T_e\curv{\vpe} +\eta\frac{j_{\parallel}}{T_e^{3/2}} +\momSrce +\mathcal{D}_{\vpi} \end{eqnal} \begin{eqnal}\label{eq:normvpiDotGDBH} \d{^i\vpi}{t} &= -\frac{\epsilon_v}{\sqrt{\tau}}\left(\frac{1}{\alpha_d}\delpar{\phi}+\tau\frac{\delpar{p_i}}{n}-0.71\delpar{T_e}\right) \\ &\quad +\frac{4\epsilon_v\epsilon_G}{\sqrt{\tau}}\frac{\delpar{G_i}}{n} -\epsilon_R\tau\alpha_d T_i\curv{\vpi} -\frac{m_e}{m_i}\frac{\eta}{\sqrt{\tau}}\frac{j_{\parallel}}{T_e^{3/2}} +\momSrci+\mathcal{D}_{\vpi} \end{eqnal} \begin{eqnal}\label{eq:normlTeDotGDBH} \d{^e\ln T_e}{t} &= \frac{5}{3}\epsilon_R\alpha_d\curv{T_e}+\frac{\kappa^e}{p_e}\delpar{T_e^{7/2}\delpar{\ln T_e}} -\frac{2}{3}\epsilon_v\delpar{\vpe} \\ &+\frac{2}{3n}\left[0.71\epsilon_v\left(\delpar{j_{\parallel}}-j_{\parallel}\delpar{\ln T_e}\right) +\frac{m_e}{m_i}\eta\frac{j_{\parallel}^2}{T_e^{5/2}}\right] \\ &-\frac{2}{3}\epsilon_R\left[\curv{\phi}-\alpha_d\frac{\curv{p_e}}{n}\right] +\frac{2}{3}\frac{1}{p_e}\enerSrceN +\mathcal{D}_{\ln T_e} \end{eqnal} \begin{eqnal}\label{eq:normlTiDotGDBH} \d{^i\ln T_i}{t} &= -\frac{5}{3}\tau\epsilon_R\alpha_d \curv{T_i}+\frac{\kappa^i}{p_i}\delpar{T_i^{7/2}\delpar{\ln T_i}} +\frac{2}{3}\frac{1}{p_i}\enerSrciN+\mathcal{D}_{\ln T_i}\\ &+\frac{2}{3}\left\lbrace -\epsilon_R\left[\curv{\phi}-\alpha_d\frac{\curv{p_e}}{n}\right] -\sqrt{\tau}\epsilon_v\delpar{\vpi} +\epsilon_v\frac{\delpar{j_{\parallel}}}{n}\right\rbrace, \end{eqnal} where the normalized diffusivities applied for all dynamical variables in only Chapter 2 are $\chi_x = -4.54 \times 10^{-10}$, $\chi_y = -1.89 \times 10^{-9}$, and $\chi_z = -8.91 \times 10^{-3}$. The normalized evolution equations given by \eqref{eq:normlnDotGDBH} and \eqref{eq:normlTeDotGDBH} are the physical model constraints learnt in the machine learning framework employed in Chapters 2, 3, and 5. A few subtle yet importance differences exist between the physical theory posed and the construction of the synthetic plasma in Chapter 2. One deviation between the theorized plasma and the one produced computationally is that the numerical code actually evolves the logarithmic form of $n$, $T_e$, and $T_i$ to enforce positivity and the high order diffusion operators act on these logarithmic quantities, too. While equivalent analytically, this choice numerically forces the drift-reduced Braginskii equations to be posed and solved in non-conservative form by the finite difference solver. Consequent errors due to numerical approximation can manifest as unexpected artificial sources or sinks in the simulation domain \cite{francisquez2020fluid}. In addition, simulation boundaries applied in practice only approximately satisfy the zero flux conditions when employing even- and odd-symmetry conditions on a cell-centered discretized grid \cite{francisquez2020fluid}. These computational discrepancies can cause potential misalignment between inferred dynamics using idealized theory and numerical modelling of the synthetic plasma's turbulent fields. Physics-informed deep learning can overcome these numerical limitations when representing plasma theory since positivity can be intrinsically encoded in the network. Further, it employs a continuous spatiotemporal domain and the nonlinear continuum equations represented by \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH} are consequently evaluated exactly up to computer precision \cite{Raissi_JMLR}. Unphysical numerical dissipation in observational data can therefore present deviations from reflecting the sought theory, but reasonable agreement is nevertheless found when analyzing the synthetic measurements with the partial differential equations embedded in the machine learning framework. \clearpage \newpage \chapter{Quantifying experimental profile evolution via multidimensional Gaussian process regression} \setlength{\epigraphwidth}{0.875\textwidth} \epigraph{I remember my friend Johnny von Neumann used to say, `with four parameters I can fit an elephant and with five I can make him wiggle his trunk.'}{Enrico Fermi, as quoted by Freeman Dyson} The edge density and temperature profiles of tokamak plasmas are strongly correlated with energy and particle confinement and resolving these profiles is fundamental to understanding edge dynamics. These quantities exhibit behaviours ranging from sharp plasma gradients and fast transient phenomena (e.g. transitions between low and high confinement regimes) to nominal stationary phases. Analysis of experimental edge measurements motivates robust fitting techniques to capture dynamic spatiotemporal evolution. Additionally, fusion plasma diagnostics have intrinsic measurement errors and data analysis requires a statistical framework to accurately quantify uncertainties. Appendix B outlines a generalized multidimensional adaptive Gaussian process routine capable of automatically handling noisy data and spatiotemporal correlations. This technique focuses on the edge-pedestal region in order to underline advancements in quantifying time-dependent plasma structures including transport barrier formation on the Alcator C-Mod tokamak. Outputs from this regression can be used to physically inform and prime neural networks about background profiles. Automatically generating accurate pedestal plasma density and temperature profiles requires handling large quantities of noisy observations. Current fitting routines in the fusion community involve a range of methods including nonlinear least squares via modified hyperbolic tangent functions \cite{Groebner_2001}, cubic splines \cite{Diallo_2011}, and various Bayesian techniques \cite{Fischer_2010}. Past Gaussian process (GP) regression codes typically fixed covariance function length scales \cite{Chilenski_2015} and generally permitted only one-dimensional scenarios to build radial profiles. This requires filtering or averaging temporal variation in data which can be limiting in the edge especially when analyzing transient phenomena such as spontaneous transitions of confinement regimes and transport barrier formation \cite{Mathews_2019}. Capability to capture both mean spatial and temporal variations of edge plasma profiles and associated gradients is therefore sought. Towards this task a deep multidimensional heteroscedastic GP routine was developed to provide automated fitting and uncertainty estimates from the Thomson scattering diagnostic on the Alcator C-Mod tokamak. Evolution of both plasma density and temperature is tracked across the edge-pedestal region with varying length scales typical of experimental data including the formation of both particle and energy transport barriers. This technique has the capability to routinely process thousands of discharges automatically to yield profile statistics and be run across novel experiments. The methodology and accompanying mathematical proofs are provided along with demonstrations on experimental data from Alcator C-Mod exhibiting transport barriers. \section{Method} The technique applied for reconstructing edge-pedestal plasma profiles is an adaptive heteroscedastic multidimensional GP routine. Each of these terms are individually defined and outlined below to introduce the scope of this method. \subsection{Gaussian process} A GP is a supervised learning method capable of solving classification and regression problems. The capability of fitting profiles via nonlinear probabilistic regression is the main focus of this appendix. In particular, the underlying assumption is that the variable (e.g. plasma density) being predicted at a certain location is normally distributed and spatiotemporally correlated with neighbouring points, indicating that partial observations provide information at nearby locations for conditioning future predictions. The function space definition of a GP is that any finite collection of the random variables modelled follow a joint Gaussian distribution, i.e. $(y_i,y_j) \sim \mathcal{N}(\mu,\Sigma)$ and any subset is given by $y_i \sim f({\bf x}_i) + \sigma_n\mathcal{N}(0,I)$ \cite{Rasmussen_2005}, where $\sigma^2_n$ is the noise variance. A GP is specified entirely up to its second-order statistics as denoted by the mean, $\mu({\bf x}_i)$, and covariance, $\Sigma({\bf x}_i,{\bf x}_j)$. Consequently, conditional predictions at ${\bf x}_b$ based upon observations at ${\bf x}_a$ are analytically given by \cite{Rasmussen_2005}: \begin{align} \label{GPR_machinery1} {\boldsymbol\mu}_{{ \bf y}_b \vert { \bf y}_a} = \boldsymbol\mu_b+\Sigma_{b,a}{\Sigma_{a,a}}^{-1}({\boldsymbol y_a}-\boldsymbol\mu_a) \end{align} \begin{align} \label{GPR_machinery2} {\Sigma}_{{ \bf y}_b \vert { \bf y}_a} = \Sigma_{b,b}-\Sigma_{b,a}{\Sigma_{a,a}}^{-1}\Sigma_{a,b} \end{align} To provide a brief proof of (\ref{GPR_machinery1}) and (\ref{GPR_machinery2}), one should note that a normally distributed random variable, ${\bf y}$, in $N$-dimensions is modelled by \cite{Rasmussen_2005} \begin{equation} P({ \bf y} \vert {\boldsymbol\mu}, { \bf \Sigma}) = \frac {1}{2\pi^{N/2} \lvert { \bf \Sigma} \rvert^{1/2}} \exp[-\frac{1}{2}({ \bf y}-{\boldsymbol\mu})^T { \bf \Sigma}^{-1} ({ \bf y}-{\boldsymbol\mu})], \end{equation} where ${ \bf \Sigma}$ is a positive semi-definite covariance matrix, ${\boldsymbol\mu} = [\mu_1, ..., \mu_N]$, ${ \bf y} = [y_1, ..., y_N]$, and ${\bf \Sigma}_{i,j} = \mathbb{E}[(y_i - \mu_i)(y_j - \mu_j)]$. In this formalism, the conditional probability of predicting a new point (or set of points), ${\bf y}_b$, can be ascertained from an observed point (or set of points), ${ \bf y}_a$, through the posterior distribution: ${ \bf y}_b \vert { \bf y}_a \sim \mathcal{N}({\boldsymbol\mu}_{{ \bf y}_b \vert { \bf y}_a},{\Sigma}_{{ \bf y}_b \vert { \bf y}_a})$. Following the treatment in \cite{Tso2010}, \eqref{GPR_machinery1} and \eqref{GPR_machinery2} can be derived by defining ${\bf z} \equiv {\bf y}_b + {\bf A} {\bf y}_a $ where ${\bf A} \equiv -\Sigma_{b,a} \Sigma^{-1}_{a,a}$, implying \begin{align} {\rm cov}({\bf z}, {\bf y}_a) &= {\rm cov}( {\bf y}_{b}, {\bf y}_a ) + {\rm cov}({\bf A}{\bf y}_a, {\bf y}_a) \nonumber \\ &= \Sigma_{b,a} + {\bf A} {\rm var}({\bf y}_a) \nonumber \\ &= \Sigma_{b,a} - \Sigma_{b,a} \Sigma^{-1}_{a,a} \Sigma_{a,a} \nonumber \\ &= 0 \end{align} Consequently, ${\bf z}$ and ${\bf y}_a$ are uncorrelated and, since they are assumed jointly normal in GP regression, they are independent. It is evident $\mathbb{E}[{\bf z}] = {\boldsymbol \mu}_b + {\bf A} {\boldsymbol \mu}_a$, and it follows that the conditional mean can be expressed as \begin{align} \mathbb{E}[{\bf y}_b | {\bf y}_a] &= \mathbb{E}[ {\bf z} - {\bf A} {\bf y}_a | {\bf y}_b] \nonumber \\ & = \mathbb{E}[{\bf z}|{\bf y}_a] - \mathbb{E}[{\bf A}{\bf y}_a|{\bf y}_a] \nonumber \\ & = \mathbb{E}[{\bf z}] - {\bf A}{\bf y}_a \nonumber \\ & = {\boldsymbol \mu}_b + {\bf A} ({\boldsymbol \mu}_a - {\bf y}_a) \nonumber \\ & = {\boldsymbol \mu}_b + \Sigma_{b,a} \Sigma^{-1}_{a,a} ({\bf y}_a- {\boldsymbol \mu}_a) \end{align} which proves the conditional mean \eqref{GPR_machinery1}, and \begin{align} {\rm var}({\bf x}-{\bf D}{\bf y}) &\equiv {\rm var}({\bf x}) + {\bf D}{\rm var}({\bf y}){\bf D}^T \nonumber - {\rm cov}({\bf x},{\bf y}){\bf D}^T - {\bf D}{\rm cov}({\bf y},{\bf x}) \end{align} implies \begin{align} {\rm var}({\bf y}_b|{\bf y}_a) &= {\rm var}({\bf z} - {\bf A} {\bf y}_a | {\bf y}_a) \nonumber \\ &= {\rm var}({\bf z}|{\bf y}_a) + {\rm var}({\bf A} {\bf y}_a | {\bf y}_a) \nonumber - {\bf A}{\rm cov}({\bf y}_a, {\bf z}) - {\rm cov}({\bf z}, {\bf y}_a) {\bf A}^T \nonumber \\ &= {\rm var}({\bf z}|{\bf y}_a) = {\rm var}({\bf z}) \end{align} Plugging the above result into the conditional variance yields \eqref{GPR_machinery2}, \begin{align} {\rm var}({\bf y}_b|{\bf y}_a) &= {\rm var}( {\bf y}_b + {\bf A} {\bf y}_a ) \nonumber \\ &= {\rm var}( {\bf y}_b ) + {\bf A} {\rm var}( {\bf y}_a ) {\bf A}^T + {\bf A} {\rm cov}({\bf y}_b,{\bf y}_a) + {\rm cov}({\bf y}_a,{\bf y}_b) {\bf A}^T \nonumber \\ &= \Sigma_{b,b} +\Sigma_{a,b} \Sigma^{-1}_{a,a} \Sigma_{a,a}\Sigma^{-1}_{a,a}\Sigma_{a,b} - 2 \Sigma_{b,a} \Sigma_{a,a}^{-1} \Sigma_{a,b} \nonumber \\ &= \Sigma_{b,b} +\Sigma_{b,a} \Sigma^{-1}_{a,a}\Sigma_{a,b} \nonumber - \indent 2 \Sigma_{b,a} \Sigma_{a,a}^{-1} \Sigma_{a,b} \nonumber \\ &= \Sigma_{b,b} -\Sigma_{b,a} \Sigma^{-1}_{a,a}\Sigma_{a,b} \end{align} Therefore, all that is required for the GP machinery are priors over ${\bf y}_a$ and ${\bf y}_b$ to obtain $\boldsymbol\mu_a$ and $\boldsymbol\mu_b$, respectively, and a covariance function which is defined in this paper by a heteroscedastic uncertainty component, $\epsilon$, along with an adaptive kernel function, $k({\bf x}_i,{\bf x}_j)$. The resulting covariance, $\Sigma_{i,j} = k({\bf x}_i,{\bf x}_j) + \epsilon({\bf x}_i) \delta_{i,j}$, describes similarity between data points and accounts for spatiotemporal correlations in the data since ${\bf x}$ represents the independent variables (e.g. $\psi$ and $t$). The hyperparameters of the prescribed adaptive kernel function are optimized through maximum {\it a posteriori} estimation on each individual discharge's observed data. Practically, given an experimental set of noisy measurements at arbitrary positions and times, this formalism allows inference of expected values across the spatiotemporal domain. Suitably selecting the kernel function, $k({\bf x}_i,{\bf x}_j)$, representing the full covariance is critical to the GP since it specifies the correlation between any pairs of random variables. Constraining kernels will consequently limit the range of behaviour that can be captured by the GP which may only be physically warranted in certain scenarios. To remain robust to tracking a wide range of spatiotemporal behaviour, an adaptive heteroscedastic kernel is optimized against experimental data. Utilizing alternative distributions (e.g. log-normal) and latent variable transformations can also permit scenarios with non-Gaussian residuals \cite{wang2012gaussian}, although Gaussianity is assumed here. \subsection{Adaptivity} GP regression is a nonparametric method without an explicit functional form. Nonparametric in this context means that there are no fixed number of constraining model parameters but instead the fitting routine becomes increasingly constrained as training data increases. Correlations between observed data points are based upon the prescribed covariance function. Various kernels have been proposed to embed this structure ranging from a Gaussian function (for expectedly smooth behaviour) to periodic functions (for expectedly cyclic behaviour) to combinations of multiple kernels (e.g. for automatic relevance determination) \cite{DD_thesis}. Despite the generic regression technique lacking a strictly fixed functional form, the optimized hyperparameters defining the kernel are typically constrained themselves. For example, a standard stationary isotropic Mat\'ern kernel is defined by \begin{equation} k({\bf x}_i,{\bf x}_j) = \sigma^2_k\frac{2^{1-\nu}}{\Gamma(\nu)}\Bigg(\sqrt{2\nu}\frac{|{\bf x}_i - {\bf x}_j| }{\rho}\Bigg)^\nu K_\nu\Bigg(\sqrt{2\nu}\frac{|{\bf x}_i - {\bf x}_j|}{\rho}\Bigg) \end{equation} where $\Gamma$ is the gamma function, $K_\nu$ is the modified Bessel function of the second kind, and $\rho$ and $\nu$ are non-negative globally constant hyperparameters which control spatial range and smoothness, respectively. A Mat\'ern kernel is $\nu - 1$ times differentiable and reduces to a Gaussian kernel in the limit $\nu \rightarrow \infty$ while becoming an exponential kernel when $\nu = 1/2$ \cite{Genton_2002}. It resultantly covers a wide class of kernels. Nevertheless, the hyperparameters are quite restrictive if simply constants \cite{heinonen16,2d-gpr-tomography}. Therefore, a version of the generalized nonstationary Mat\'ern kernel is encoded as \cite{Paciorek_2006,Plagemann_2008}: \begin{equation} \label{adaptive_kernel} k({\bf x}_i,{\bf x}_j) = \sigma^2_k \frac{2^{1-\nu}}{\Gamma(\nu)} \frac{|\rho_i|^{1/2}|\rho_j|^{1/2}}{\sqrt{\frac{1}{2}\rho^2_i + \frac{1}{2}\rho^2_j}} \Bigg(2\sqrt{\frac{2\nu |{\bf x}_i - {\bf x}_j|^2}{\rho^2_i + \rho^2_j}}\Bigg)^\nu K_\nu\Bigg(2\sqrt{\frac{2\nu |{\bf x}_i - {\bf x}_j|^2}{\rho^2_i + \rho^2_j}}\Bigg) \end{equation} where $\rho$ varies across the entire multidimensional domain and adapts to optimize the length scale based upon the experimental data being trained upon in each individual plasma discharge. The kernel accomplishes learning point estimates of local smoothness by representing the primary GP's locally isotropic length scale hyperparameter by a secondary GP with radial basis function (RBF) kernel that allows global variation of $\rho$ across the spatiotemporal grid. It is this second-level GP which introduces the notion of a deep process and adaptivity to the overall regression technique. A stationary kernel is purely a function of $\bf{x}_i - \bf{x}_j$, while additional local dependence exists in (\ref{adaptive_kernel}) through $\rho$ which introduces nonstationary behaviour \cite{Plagemann_2008}. A k-means clustering algorithm is used for training of the secondary GP which parametrizes the nonstationary covariances with latent length-scales \cite{Plagemann_2008}. \begin{figure} \centering \includegraphics[width=0.495\linewidth]{templates/lls_1d_data.png} \includegraphics[width=0.49\linewidth]{templates/lls_1d_scales.png} \caption{Comparison of two separate GPs simply training on 1-dimensional data: one employs a standard Mat\'ern kernel while the other includes an adaptive length scale. Fits to the original data samples (left) and computed length scales (right) are displayed. Figure courtesy of J.H. Metzen.} \label{fig:1dlls} \end{figure} Figure \ref{fig:1dlls} demonstrates a basic 1-dimensional example of a sinusoidal function with imposed discontinuity. The advantage conferred by the adaptive length scale can be quantitatively observed by comparing the log marginal likelihood (LML) \cite{Rasmussen_2005} between a standard Mat\'ern kernel and one with locally adaptive length scale. The order of magnitude improvement of LML (which is a logarithmic quantity) indicated in Figure \ref{fig:1dlls} occurs because a stationary Mat\'ern kernel is forced to decrease its constant global length scale considerably while an adaptive length scale permits reducing its value locally only near the discontinuity. The adaptive length scales not only provide the capability to better capture singular or transient phenomena on otherwise slowly-varying profiles but importantly improves uncertainty estimates across the domain. The code sets $\nu = 3/2$, which allows for potentially stiff behaviour and this value can be modified, if sought. It can also be kept as a variable for optimization to capture an entire spectrum of kernel functions. The user can freely specify upper and lower bounds on length scales to be learned across the grid which are given uniform prior distributions during training. As a preview for the application of these methods, the length scales can be extended to multidimensional scenarios as depicted in Figure \ref{fig:2dlls} where the learned input length scale varies across the entire spatial and temporal domain. The exact same kernel was initialized for both the data sets used in Figure \ref{fig:2dlls}, but since the datasets were themselves different, the locally learned length scales vary. A custom stochastic optimizer based on differential evolution is used in these examples for GP hyperparameter-tuning and finally polished off with gradient-based descent. Finding a global optimum in the likelihood function is not guaranteed, therefore this is helpful because the loss function may be multimodal and challenging for simple gradient-based methods acting on non-convex problems. \begin{figure} \centering \includegraphics[width=0.48\linewidth]{templates/lls_n.png} \includegraphics[width=0.48\linewidth]{templates/lls_T.png} \caption{Two examples of learning length scales that vary across the spatiotemporal domain by training identical GP models on experimentally measured electron density (left) and temperature (right) from the Thomson scattering diagnostic.} \label{fig:2dlls} \end{figure} \subsection{Heteroscedasticity} Heteroscedasticity refers to learning intrinsic scatter associated with the noisy variable, $y$, and introducing non-constant variances. The full covariance function applied in the GP can be broken down into an adaptive kernel and noisy variance component: \begin{equation} \Sigma({\bf x}_i,{\bf x}_j) = \underbrace{k({\bf x}_i,{\bf x}_j)}_{\text{adaptive}} + \underbrace{\sigma^2_n({\bf x}_i) \delta_{ij}}_{\text{heteroscedastic}} \end{equation} and heteroscedasticity is mathematically defined by $\sigma_n({\bf x}_i)$ having an explicit dependence on points in the input space. To contrast, homoscedasticity would entail a globally constant $\sigma_n$. To more vividly demonstrate the benefit of heteroscedasticity, a 1-dimensional example is displayed in Figure \ref{hetero_figure} by applying both homoscedastic and heteroscedastic components. The function to be learned is a linear relationship with variance growing quadratically along the abscissa. In this scenario with a homoscedastic noise model, the GP is forced to learn a constant intrinsic scatter in the underlying data commonly represented by white noise functions of constant amplitude. It is evident that enabling a heteroscedastic covariance function better captures the distribution of observed data. The mean estimates of both models are equivalent, but the predicted variances across the domain are markedly different and the heteroscedastic example obtains a larger LML and better captures intrinsic scatter in the data. The non-constant variances are learned across the domain using a k-means algorithm \cite{LIKAS2003451} to once again identify clustering centers to provide characteristic noise estimates even when explicit error bars are absent. These prototype values are then extended across the domain by using a pairwise RBF kernel. Both the adaptive length scale kernel and heteroscedastic components are combined to significantly improve overall fitting and stability of the numerical optimization. For example, they avoid zero variances while training. This heteroscedastic term in the full data-driven covariance function is modular to an extent and can be optionally subtracted away to output confidence intervals ($\mathbb{V}[f_*]$) instead of prediction intervals ($\mathbb{V}[y_*]$) which are wider and account for intrinsic scatter in observations. (Note that $\mathbb{E}[f_*] \equiv \mathbb{E}[y_*]$.) \begin{figure} \centering \includegraphics[width=0.47\linewidth]{templates/homoscedastic.png} \includegraphics[width=0.47\linewidth]{templates/heteroscedastic.png} \caption{Comparison of two separate GPs on 1-dimensional data both using an RBF kernel. The difference is that one utilizes an additional homoscedastic component (left) while the other GP uses a heteroscedastic component (right) in the full covariance structure. Figure courtesy of J.H. Metzen.} \label{hetero_figure} \end{figure} \subsection{Multidimensional} GPs do not require a fixed discretization scheme over the physical domain and hence easily handle spatially and temporally scattered diagnostic measurements involved in nonlinear regression. The generalized kernel above is encoded to handle data spanning any number of dimensions. Due to the highly non-convex optimization problem associated with finding optimal hyperparameters across the multidimensional space, the training applies stochastic optimization (Storn algorithm \cite{Storn_alg}) with gradient descent at the end to help avoid becoming trapped in local minima. An associated error checking routine has been developed and available in the code on GitHub to automatically identify regions of the domain, if any, over which the GP did not successfully converge during training and requiring further optimization. Generally, multidimensional sampling of the GP is performed by applying \begin{equation} f_* = \mu_* + B\mathcal{N}(0,I) \end{equation} where $B B^T = \Sigma_*$ and $B$ is a triangular matrix known as the Cholesky decomposition of the covariance matrix. To account for constraints such as monotonicity or positivity with respect to the mean in sampled profiles, modified or truncated normal distributions can be enabled in the code to permit constrained GP sampling to yield physically relevant results. Finally, the technique's flexibility allows it to automatically handle vast data sets (e.g. thousands of discharges fitted in parallel) to efficiently construct large multidimensional profile databases with minimal user input. \begin{figure} \begin{center} \includegraphics[width=0.975\linewidth]{templates/lls_2d_n.png} \caption{Corresponding length scales, $\rho$, learned across the spatial and temporal domain based on training of the adaptive heteroscedastic GP.} \label{lls_n_2d} \end{center} \end{figure} \section{Application to experimental data} The aforementioned adaptive heteroscedastic GP is now directly applied to experimental data originating from the Thomson scattering diagnostic on Alcator C-Mod which consists of two Nd:YAG lasers, each pulsing at 30 Hz. The measurements have an approximate spatial resolution of 1.0 cm and 1.3 mm in the core and edge, respectively \cite{JWHughes-TS-diagnostic}. It is noted that the GP itself is a continuous regression model and can provide fittings at arbitrary spatial and temporal resolution. Discharge number 1091016033 is analyzed which exhibits L-, H-, and I-mode behaviours within this single discharge as detailed in \cite{Whyte_2010}. Ion cyclotron range of frequencies (ICRF) heating of up to 5 MW is applied in the experiment with power primarily deposited in the core on the hydrogen minority species. The on-axis magnetic field is 5.6 T with a plasma current of approximately 1.2 MA. There is a wide range of plasma behaviour associated with time-varying density and temperature pedestal structure even in this single discharge including transport barrier formation and confinement mode transitions necessitating a suitably robust regression method. The tools outlined above have been demonstrated on discharge 1091016033, and can be easily automated for edge data analyses across any set of plasma discharges on Alcator C-Mod, or on other tokamaks with sufficiently resolved kinetic profiles. \begin{figure} \centering \includegraphics[width=0.48\linewidth]{templates/2D-GPR_n.png} \includegraphics[width=0.48\linewidth]{templates/2D-dndx.png} \caption{Electron density and corresponding spatial gradients produced by the adaptive heteroscedastic GP. This technique accounts for both spatial and temporal evolution of experimental data across the entire discharge over the edge-pedestal region (i.e. $0.85 < \psi < 1.05$, which covers data on both open and closed field lines).} \label{2D-GPR} \end{figure} \begin{center} \begin{figure*} \includegraphics[width=0.325\linewidth]{templates/L-mode-GPR.png} \includegraphics[width=0.325\linewidth]{templates/I-mode-GPR.png} \includegraphics[width=0.325\linewidth]{templates/H-mode-GPR.png} \\ \includegraphics[width=0.325\linewidth]{templates/L-mode-GPR_der.png} \includegraphics[width=0.325\linewidth]{templates/I-mode-GPR_der.png} \includegraphics[width=0.325\linewidth]{templates/H-mode-GPR_der.png} \caption{Electron density and temperature measurements during L- (left), I- (middle), and H-modes (right) fitted by the adaptive heteroscedastic GP without time-averaging experimental data. Proximity of experimental data to the time at which the GP is predicting is indicated by transparency of the data points. For simple demonstrative purposes, 95\% prediction intervals are displayed in the top three plots while 95\% confidence intervals are applied for the bottom.} \label{1D-GPR} \end{figure*} \end{center} To begin, the trained GPs can compute expected mean density and temperature along with corresponding uncertainties across the entire spatiotemporal domain covered by the plasma diagnostic. Spatial gradients (or time derivatives) can be directly produced and are displayed in Figure \ref{2D-GPR} for electron density across the grid as well. The key advantage of applying the adaptive GP for edge profile fitting is its ability to learn spatiotemporal correlations across the entire domain without any temporal averaging nor spatial filtering of data. This freedom in training is evident in the learned variable length scales for density across the discharge as visualized in Figure \ref{lls_n_2d}. Particular time slices can also be evaluated by the GPs. Fitted L-, I-, and H-mode profiles from discharge 1091016033 are displayed in Figure \ref{1D-GPR} without employing any time-averaging or filtering of experimental data as required when repeatedly applying a modified tanh function, which can miss important profile variation even within a confinement regime (e.g. while ramping up auxiliary heating). Density and temperature gradients along with uncertainties for all quantities are available across the experiment during L-, H-, and I-mode phases at times of 800, 1200, and 1475 milliseconds, respectively \cite{Whyte_2010}. A major benefit derived from applying the adaptive heteroscedastic GP is its ability to provide defining features (e.g. spatial and temporal gradients) of experimental profiles automatically across entire discharges. In past classification exercises to develop large confinement regime databases \cite{Mathews_2019}, individual time slices needed to be manually reviewed for the presence of density and/or temperature pedestals to identify windows containing different regimes (e.g. L-, H-, or I-modes). This is a highly time-intensive and arguably subjective route to develop meaningful confinement regime databases since discretely classifying plasma behaviour can miss underlying nuances (e.g. staircase pedestals, profile hollowing). Applying this multidimensional GP regression method can automate characterization of discharges based upon quantitative profile characteristics such as gradient scale lengths. It can handle variation across the edge-pedestal region which connects the high temperature core with the colder SOL upon crossing the separatrix. Different varieties of stationary confinement regimes may have quite different profile dynamics and structure for temperature and density necessitating adaptive fitting capability. Additionally, outputting the time-dependent evolution of plasma profiles and gradients with corresponding uncertainties helps capture subtleties in edge structures which are essential to better understand how confinement regimes across the entire discharge. Resolving these features helps improve systematic reconstructions of experimental measurements for further large scale analysis, for example in running stability codes or scientific machine learning, or in empirical database studies, e.g. characterizing upstream conditions of background plasmas for divertor heat flux studies \cite{Silvagni_2020}. For example, the multidimensional GP can provide key profile information into plasma simulations (e.g. inputs for global gyrokinetic codes or comparisons with EPED \cite{Snyder_2009}) which may require sampling inputs such as gradient profiles to output sufficient statistics. Additionally, the denoised equilibrium plasma dynamics can be useful observational constraints in scientific learning applications such as in Chapter 4. Overall, the outlined adaptive multidimensional GP regression routine can automate fitting and uncertainty estimation of edge-pedestal measurements from the Thomson scattering diagnostic on the Alcator C-Mod tokamak while being robust to edge-pedestal phenomena. Spatiotemporal evolution of plasma density and temperature is tracked with varying length scales extant in experimental data including the formation of both particle and energy transport barriers. Structure imposed on learned edge gradient profiles is minimized by using a data-driven kernel function which can be critical to model plasmas near sensitive instability boundaries. The application is focused on edge measurements of tokamak plasmas with relevance to numerical analysis of the pedestal, but these techniques extend beyond analysis of the edge-pedestal region and can be suitably adapted to novel scenarios exhibiting singular transient events. The GP introduced provides an automated tool to tackle nonlinear multidimensional regression tasks and helps resolve measurements of equilibrium profiles with dynamics spanning a wide range of physical scales. \chapter{Code and data availability} \section*{Chapter 2} \noindent All relevant data files and codes for constructing the deep networks can be found on Github at: \url{https://github.com/AbhilashMathews/PlasmaPINNs}. \section*{Chapter 3} \noindent All relevant data files and codes can be found on Github at \url{https://github.com/AbhilashMathews/PlasmaPINNtheory} and \url{https://github.com/ammarhakim/gky\\l-paper-inp/tree/master/2021_PoP_GK_Fluid_PINN}. Full documentation on the gyrokinetic simulation framework with the \texttt{Gkeyll} code is located at \url{https://gkeyll.readthedocs.io/en/latest/}. \section*{Chapter 4} The codes applied to analyze experimental GPI data are available on the MIT Engaging cluster at the following directory: \texttt{/home/mathewsa/PINNs/GPI}. \noindent The scripts there for training the deep learning framework realizations are: \noindent \texttt{GPI\_test\_HeI\_DEGAS2\_probe\_time\_2012\_best\_const\_priming\_rep\_v0.py} -- \\ \texttt{GPI\_test\_HeI\_DEGAS2\_probe\_time\_2012\_best\_const\_priming\_rep\_v799.py}. \noindent After training is complete, one can utilize the following scripts for plotting: \\ \texttt{GPI\_theory\_2D\_paper\_best\_prime\_1120711021\_probe\_time\_interval.py} and \\ \texttt{GPIpaper\_bestprime\_figures\_plot+save.py} (running certain functions in \\these codes will require access to the MFE workstations located at the PSFC). \\ \\ \noindent The HeI collisional radiative code \cite{GOTO_2003,Zholobenko_thesis} is written in C and utilizes the GNU Scientific Library (GSL) for numerical calculations. It is located on Engaging at: \\ \texttt{/net/eofe-data005/psfclab001/mathewsa/hecrmodel\_WZmodified\_NAG\_compatible} \noindent To compute all population and rate coefficients, users should prepare their own main function according to their purposes. Example makefiles (e.g. \texttt{Makefile\_PEC\_loop}) are included in the directory for this purpose. The energy levels are numbered in the code with $1^1$S, $2^1$S, $2^3$S, $2^1$P, $2^3$P, $3^1$S, $3^3$S, ... are indexed as 0, 1, 2, 3, 4, 5, 6, ..., respectively. Consequently, all singlet levels except $1^1$S have odd numbers and all triplet levels have even numbers. Labels like \texttt{S3P}, which means ``singlet 3P'', can be used to designate energy levels instead of the numbers. The correspondence between the numbers and the labels are defined in \texttt{hecrm.h}. The input parameters are the magnetic field strength (T) which is used for the singlet-triplet wavefunction mixing calculations, the electron temperature (eV) and the electron density (cm$^{-3}$). They are set in the \texttt{crmodel.prm structure}. See \texttt{hecrm.h} and \texttt{run.c}. The results are stored in the three structures, i.e., rate coefficient, population coefficient and \texttt{cr\_rate\_coefficient}, after calling the \texttt{hecrmodel} function. See \texttt{hecrm.h} for details. \noindent The population of a level $p$, $n(p)$ is expressed with the population coefficients as \begin{equation} n(p) = r_0(p)n_en_i + r_1(p)n_en(1^1S) + r_2(p)n_en(2^1S) + r_3(p)n_en(2^3S) \end{equation} \noindent in Formulation I, and as \begin{equation} n(p) = R_0(p)n_en_i + R_1(p)n_en(1^1S) \end{equation} \noindent in Formulation II, which is the one utilized in this thesis. The population coefficients in Formulation I and in Formulation II are stored respectively in the vectors \texttt{r0}, \texttt{r1}, \texttt{r2}, and \texttt{r3} and in the vectors \texttt{rr0} and \texttt{rr1} of the population coefficient structure. When the population coefficient structure is declared as \texttt{popcoe} like in the sample code \texttt{PEC\_run\_loop\_dens.c}, $R_1(3^3D)$ is found in \texttt{popcoe[i].rr1[T3D]}, where \texttt{i} is the index for the \texttt{ne} array. The spontaneous transition probabilities, i.e. Einstein A coefficients, are given in the matrix \texttt{a} of the rate coefficient structure. When the structure is declared as \texttt{rate}, the Einstein A coefficient for the transition $3^3D \rightarrow 2^3P$, for example, is taken as \texttt{gsl\_matrix\_get(rate.a, T3D, T2P)} or \texttt{MG(rate.a, T3D, T2P)}. Here, \texttt{MG} is the short form of \texttt{gsl\_matrix\_get} as defined in \texttt{hecrm.h}. Additional coefficients calculated in the code are stored in \texttt{cr\_rate\_coefficient} \cite{Fujimoto1979ACM,GOTO_2003}\footnote{Note: the electron temperature for the results in Fig. 7 of \cite{GOTO_2003} is 1 eV, not 10 eV.}. \\ \\ \noindent Files for computing Greenland's criteria and their outputs including $\tau_Q$ are located in the directory: \texttt{/net/eofe-data005/psfclab001/mathewsa/hecrmodel\_WZmodified\_\\NAG\_compatible/NAG/nll6i271bl/hecrmodel\_WZmodified}. Note that running these codes require usage of the commercial package \texttt{NAG Library (Mark 27.1)}. \section*{Chapter 5} The scripts for training the deep learning framework realizations are:\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_no\_sources\_rep\_v0.py} --\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_no\_sources\_rep\_v99.py} and\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_fix\_sources\_rep\_v0.py} --\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_fix\_sources\_rep\_v99.py} with\\ \texttt{plotting\_final\_paper+chapter\_plots.py} for plotting. \section*{Appendix B} All relevant data files and codes can be found on Github at \url{https://github.com/AbhilashMathews/gp_extras_applications}, which are based upon the \texttt{gp\_extras} package by J.H. Metzen at \url{https://github.com/jmetzen/gp\_extras}. \chapter{Introduction} \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{It is a profound and necessary truth that the deep things in science are not found because they are useful: they are found because it was possible to find them.}{J. Robert Oppenheimer} With the neutron discovered less than a century ago \cite{Chadwick_Nobel}, efforts to precisely understand the structure and potential of atomic nuclei have produced breakthroughs in human knowledge and technology. The beginning of World War II launched an era of covert and public research into unlocking the power of the atom, and it is still being widely explored today. One method found to generate power via the interaction of nuclei is through their fusion, where the difference in mass between reactants and products results in net energy. Humanity's advancements are linked with access to power \cite{Earth1,Earth2,Earth3}. As a potential source of abundant electricity across Earth and the depths of space, fusion energy is amongst society's greatest objectives. Due to their relatively large terrestrial abundance and/or cross-sections, the fusion reactions with hydrogen isotopes of primary interest in modern experiments include \begin{equation} ^2_1\text{D} \ + \ ^2_1\text{D} \ \rightarrow \ ^3_2\text{He} \ (0.82 \text{ MeV}) \ + \ ^1_0\text{n} \ (2.45 \text{ MeV}) \end{equation} \begin{equation} ^2_1\text{D} \ + \ ^2_1\text{D} \ \rightarrow \ ^3_1\text{T} \ (1.01 \text{ MeV}) \ + \ ^1_1\text{H} \ (3.02 \text{ MeV}) \end{equation} \begin{equation} ^2_1\text{D} \ + \ ^3_1\text{T} \ \rightarrow \ ^4_2\text{He} \ (3.52 \text{ MeV}) \ + \ ^1_0\text{n} \ (14.08 \text{ MeV}), \end{equation} but the fusing of these atomic nuclei to yield energy requires the right conditions. Conditions generally reliant upon the hydrogen isotopes being highly energetic themselves since the strong nuclear force can only overcome electrostatic repulsion between nuclei when they are in sufficiently close spatial proximity on the order of femtometres. Such energetic conditions generally necessitate the interacting species exist in ionized states collectively known as plasmas. Past work has demonstrated that fusion reactor concepts with nonequilibrium plasmas are unfeasible (without methods to recirculate power at high efficiencies) \cite{rider_thesis}. Reactors with hot plasmas near thermodynamic equilibrium accordingly require good bulk confinement. If defining the circulating power quality factor as $Q = P_f/P_h$, where $P_h$ is the externally applied heating and $P_f$ is the net thermonuclear power, then a simple power balance calculation of an equilibrium plasma (without radiative losses nor electricity recovery from auxiliary sources) finds the following modified Lawson criterion: \begin{equation}\label{eq:Lawson} n \tau_E = \frac{12 T}{\langle \sigma v \rangle Y_c}\frac{1}{1 + 5/Q} \end{equation} \noindent where $\langle \sigma v \rangle$ is the fusion reaction rate coefficient, $Y_c$ corresponds to the energy yield of charged particles, $\tau_E$ represents the characteristic energy confinement time, and $n$ and $T$ are the volume-averaged plasma density and temperature, respectively, under the approximations of quasineutrality and equilibration between ions and electrons in the plasma. The condition of $Q = 1$ is known as energy breakeven, and fusion power plants ideally seek to operate with $Q \gg 1$ for economic feasibility. If considering $^2_1$D-$^3_1$T plasmas, where $\langle \sigma v \rangle \sim T^2$ in conditions of interest to maximize the equilibrium plasma's fusion reaction rate, then the triple product metric can be cast as \begin{equation}\label{eq:triple_product} n T \tau_E \sim \frac{1}{1 + 5/Q}, \end{equation} \noindent which is directly related to $Q$. Namely, a fusion reactor's efficiency is strongly dependent upon the pressure and energy confinement time of the plasma \cite{twofluid_Lawson}. \section{Magnetic confinement fusion} Decades of worldwide effort on developing fusion concepts have resulted in the creation of numerous experiments, with a magnetic confinement fusion design known as the ``tokamak'' demonstrating values of $Q$ nearing 1 \cite{wurzel2022progress}. Tokamaks confine electrically conductive plasmas in a toroidal chamber using magnetic fields, which aim to insulate the hot ionized gas from the solid walls of the machine. The charged particles continuously swirl along magnetic field lines with toroidal and poloidal components conventionally induced by external electromagnets and transformer coils, respectively, to optimize plasma confinement by accounting for drifts of the gyrating ions and electrons in this curvilinear geometry. But as new tokamaks are being built in attempts to exceed breakeven and demonstrate the viability of fusion energy technology, there are significant uncertainties associated with predictions of $n T \tau_E$ in existing and upcoming experiments from first principles. That is because tokamak plasma transport tends to not only be determined by classical collisional processes diffusing particles and energy across inhomogeneous magnetic fields. Rather, the behaviour of these experimental plasmas are commonly anomalous and strongly influenced by turbulence \cite{Wesson_tokamaks}, which is often termed ``the most important unsolved problem of classical physics.''\footnote{Richard P. Feynman} To step over this difficulty, the fusion community has in large part relied upon empirical confinement scalings of $\tau_E$ derived from fitting power laws against 0-dimensional observational data and operational parameters across international fusion experiments \cite{scaling1,Physics__2007}. Cross-machine scalings have been similarly developed for estimating the structure of edge pressure profiles \cite{pedestal_scaling2,pedestal_scaling3,pedestal_scaling4} and heat flux widths \cite{Eich_2013,Brunner_2018} since boundary plasma turbulence is difficult to wholly simulate yet strongly influences global profiles and power handling. While these regression efforts are useful for building intuition on physical trends in experiment \cite{Buck-pal,Connor_1977,Petty_2008,Freidberg_elongation}, their ability to extrapolate to novel fusion plasma regimes is not clearly known. Recent progress in integrated modelling efforts have increased the fidelity of tokamak performance calculations \cite{SPARC_confinment}, i.e. to effectively estimate \{$n$, $T$, $\tau_E$\} and thereby $Q$ on future devices, but these core transport simulations still invoke questionable assumptions, particularly in the treatment of boundary conditions which crucially impact reactor performance, core fuelling, and safety of the vessel wall \cite{edge_core_association0,edge_core_association1}. Modelling turbulent edge profiles in magnetic confinement fusion devices is especially challenging due to the vast dynamical scales and nontrivial geometry and neutral interactions present whilst going from the hot confined region to the cooler boundary plasmas striking solid material surfaces just a few centimetres away. The sharp plasma gradients extant are potential sources of free energy associated with turbulent edge transport where fluctuation amplitudes can be on the same order as the background quantities. These dynamics can be described by kinetic theory where the evolution of the distribution function of any species $\alpha$, $f_\alpha$, is given by \begin{equation}\label{eq:kinetic_theory} \frac{d f_\alpha}{d t} = \frac{\partial f_\alpha}{\partial t} + {\bf \dot{x}}\frac{\partial f_\alpha}{\partial {\bf x}} + {\bf \dot{v}}\frac{\partial f_\alpha}{\partial {\bf v}} = C\{f_\alpha\} + S\{f_\alpha\}, \end{equation} \noindent where the terms $C\{f_\alpha\}$ and $S\{f_\alpha\}$ symbolize collisions and sources, respectively, in this 6-dimensional phase space. Fully kinetic global simulations for whole device modelling are intractable, though, even with modern computing facilities. Model approximations are thus inevitable, but once approximations are introduced into edge turbulence models, their effects on nonlinear dynamics need to be quantitatively evaluated---against higher fidelity simulations and/or experiment, if possible---for model predictions to be meaningful. An oft-applied set of equations to study the plasma edge is drift-reduced Braginskii fluid theory, which has been studied for decades starting from Braginskii's original formulation \cite{Braginskii1965RvPP}, and remains a highly active research area today \cite{BOUT++,TOKAM3X,GBS,Stegmeir2018,GDB,Thrysoe_2020,giacomin2021gbs,GBS_3fluid_kineticneutrals}. But the underlying model approximations tend to only be marginally satisfied in fusion plasmas and there is a scarcity of clear-cut validation tests of the theory against higher-fidelity simulations or experimental measurements. Even with modern drift-reduced Braginskii codes, diagnostic comparisons tend to be qualitative with considerable uncertainties in quantitative accuracy \cite{2009val,2011val,NIELSEN2015,2016val,2016val_v2,Nielsen_2019,2020val,2021val,code_2022_validations}, although these efforts are improving \cite{Zholobenko_2021_validation}. This challenge in precisely ascertaining the reduced turbulence theory's predictive reliability is in part due to difficulties in aligning nonlinear calculations with numerous free parameters for chaotic systems \cite{chaos_review,chaos_turbulence,chaos_edge}. Unobserved dynamics related to sources and boundaries can be tough to diagnose on turbulent scales in the harsh conditions and geometry of the plasma edge. Quantitative methods to unambiguously test validity are thus needed if there is to be any certainty when using edge models to improve integrated simulations of fusion reactors. One hallmark of a turbulence theory is the nonlinear connection that it sets between dynamical variables as visualized in Figure \ref{simple_network_graph}. For ionized gases, perturbations in the plasma are intrinsically linked with perturbations of the electromagnetic field. Accordingly, the electric potential response concomitant with electron pressure fluctuations constitutes one of the key relationships demarcating a plasma turbulence theory and presents a significant consistency test en route to its full validation. The electric field perpendicular to magnetic field lines is a particularly important quantity as it is a strong drive of cross-field fluxes and thus edge pressure profiles on turbulent scales. These ${\bf E \times B}$ flows are observed to strongly influence edge plasma stability \cite{osti_1630104,osti_1762124} and the motion of coherent structures which can account for significant particle losses during standard operation of tokamaks \cite{blobs_review,Carralero_2017,Kube_2018}. Resultant turbulence-induced fluxes impacting walls can cause sputtering, erosion, and impurity injection which can further adversely affect safe operation and confinement of fusion plasmas \cite{blobs_review,kuang_SPARC,kuang_ARC}. Therefore, it is imperative that transport models for boundary plasmas are capable of accurately predicting the turbulent electric field response to electron pressure fluctuations. The aim of this thesis is to build a framework to examine this fundamental relationship and quantitative impacts from common approximations on turbulent fields as expected in drift-reduced Braginskii fluid theory. The machinery used for this objective are physics-informed neural networks (PINNs). \begin{figure}[ht] \centering \includegraphics[width=0.625\linewidth]{templates/Figure1_thesis_update.png} \caption{\label{simple_network_graph}A visual representation of connections that exist and define multi-field turbulence models. The nonlinear relationship between $n_e$ and $T_e$ with $\phi$ will be examined in this thesis for plasma conditions relevant to nuclear fusion.} \end{figure} \section{Deep learning of physics} At its core, this thesis seeks to utilize machine learning---computation algorithms training to complete objectives by the use of experience and data---to model turbulent physical systems. It is instructive to translate the language of machine learning into physics for building familiarity and understanding why such efforts could potentially help advance turbulence modelling. To start, it is useful to consider a generic goal shared by physics and machine learning: predict physical variable(s) ${\bf y}$ based upon observation(s) of ${\bf x}$. Experimentally, one is interested in the distribution $p({\bf y} \lvert {\bf x})$ denoting the conditional probability of ${\bf y}$ given ${\bf x}$. Following the exposition in \cite{tegmark}, this statement can be expressed via Bayes’ theorem as \begin{equation}\label{eq:Bayes1} p({\bf y} \lvert {\bf x}) = p({\bf x} \lvert {\bf y})p({\bf y})/p({\bf x}) = p({\bf x} \lvert {\bf y})p({\bf y})/\sum\limits_{{\bf y}'} p({\bf x}' \lvert {\bf y}')p({\bf y}'). \end{equation} The negative logarithm of these probabilities can be defined according to \begin{equation} H_{\bf y}({\bf x}) \equiv -\ln p({\bf x} \lvert {\bf y}), \end{equation} \begin{equation} \mu_{\bf y} \equiv -\ln p({\bf y}), \end{equation} \noindent where $H_{\bf y}({\bf x})$ represents the Hamiltonian of ${\bf x}$ given ${\bf y}$ up to an arbitrary additive constant. Eq. \eqref{eq:Bayes1} can accordingly be recast in the usual Boltzmann form as \begin{equation} p({\bf y} \lvert {\bf x}) = \frac{1}{N({\bf x})}e^{-[ H_{\bf y}({\bf x}) + \mu_{\bf y}]} \end{equation} with \begin{equation} N({\bf x}) = \sum_{{\bf y}'} e^{-[ H_{{\bf y}'}({\bf x}) + \mu_{{\bf y}'}]}. \end{equation} To understand how a neural network can map this vector-valued function given by Bayes' theorem, one recognizes that a simple $n$-layer feedforward network is just a series of linear and nonlinear transformations in succession equal to \begin{equation}{\label{simple_network_eqn}} {\bf f(x)} = {\bf \sigma}_n {\bf A}_n ... {\bf \sigma}_2 {\bf A}_2 {\bf \sigma}_1 {\bf A}_1 {\bf x}, \end{equation} \noindent where ${\bf \sigma}_i$ is a nonlinear operator, and ${\bf A}_i$ are affine transformations of the form ${\bf A}_i {\bf x} = {\bf W}_i {\bf x} + {\bf b}_i$ with weight matrices ${\bf W}_i$ and bias vectors ${\bf b}_i$ that need to be tuned. The more layers present, the ``deeper'' the network. These weights and biases are analogous to the set of coefficients optimized in ordinary polynomial regression, but the functional form of the solution is not necessarily fixed {\it a priori}. This is motivated by multilayer feedforward neural networks being universal function approximators in theory capable of approximating any measurable function to arbitrary degrees of accuracy \cite{cybenko_approximation_1989,HORNIK}. These neurons (universal analog computing modules) constituting graph networks are akin to NAND gates (universal digital computing modules) in logic circuits: any computable function can be accurately described by a sufficiently large network of them. And just as NAND gates are not unique (e.g. NOR gates are also universal), nor is any particular activation function \cite{tegmark}. Regularly chosen nonlinear operators for neurons include local functions such as the hyperbolic tangent, \begin{equation} \text{tanh}(x) = (e^x - e^{-x})/(e^x + e^{-x}), \end{equation} \noindent or collective operations such as {\it max-pooling} (i.e. maximum of all vector elements). One function known as {\it softmax} exponentiates and normalizes all terms according to \begin{equation} \sigma(x_i) \equiv e^{x_i}/\sum\limits_{i} e^{x_i}. \end{equation} For any Hamiltonian approximated by an $n$-layer feedforward neural network, one can therefore fully represent the sought physical variable's distribution by simply applying the computational graph's outputs through a softmax layer, \begin{equation} {\bf p({\bf y} \lvert x)} = \sigma[-{\bf H_y (x)} - {\bf \mu_y}]. \end{equation} But this expression for the sought probability distribution is an accurate representation only if the graphs are adequately trained to learn the original Hamiltonian function. Whether the networks are practically capable of learning such dynamics, e.g. ${\bf H_y (x)}$, is not always clear. In practice, there are numerous deeply interconnected influences jointly acting on networks during learning including construction of the overall graph architecture, initialization of ${\bf W}_i$ and ${\bf b}_i$, complexity of the objective function (e.g. Hamiltonian), selection of nonlinear activation in neurons, potential lack of a deterministic relationship between the given inputs and targets, and the optimization procedure employed for training ${\bf W}_i$ and ${\bf b}_i$ \cite{GlorotAISTATS2010,tegmark,wang2020understanding,HORNIK}. While advancements in all categories are essential in the generalized learning of complex systems with artificial intelligence, for the task of representing edge plasma turbulence, physics-informed constraints (e.g. partial differential equations, algebraic expressions, correlations) are embedded into the training of networks to uncover unobserved dynamics ($\bf y$) given limited information ($\bf x$). The ability to exactly differentiate graphs significantly enables physically useful and computationally efficient mathematical constructions that can serve as regularization mechanisms \cite{raissi2017physics}. If a network is trying to represent the Hamiltonian, for example, then its self-differentiation with respect to phase space coordinates would yield the classical equations of motion, which can act to physically inform and numerically guide ${\bf W}_i$ and ${\bf b}_i$ to help us uncover what we can. This ethos will be at the heart of this analysis of fusion plasmas in both simulation and experiment with networks representing turbulent fields in these systems. \section{Outline of chapters} The primary results composing this thesis include the development of a novel physics-informed deep learning technique in Chapter 2 to uncover the turbulent electric field consistent with drift-reduced Braginskii theory from just 2-dimensional electron pressure measurements aligned with the magnetic field. In Chapter 3, this computational technique enables the first direct comparisons of instantaneous turbulent fields between two distinct full-$f$ global plasma turbulence models: electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetics. Good agreement is found between the two models in magnetized helical plasmas at low normalized pressure while being quantitatively inconsistent at high-$\beta$. To transfer the above turbulent field analysis framework to boundary plasmas in experiment, Chapter 4 develops and demonstrates an entirely new optimization technique to translate brightness measurements of HeI line radiation into local plasma and neutral fluctuations via a novel integrated framework of networks that combines neutral transport physics and collisional radiative theory for the $3^3 D - 2^3 P$ transition in atomic helium. This analysis for ionized gases is transferable to both magnetized and unmagnetized environments with arbitrary geometries and extends the gas puff imaging approach in fusion plasmas. Based upon fast camera data on the Alcator C-Mod tokamak, the first 2-dimensional time-dependent experimental measurements of the turbulent electron density, electron temperature, and neutral density are presented in a fusion plasma using a single spectral line. These experimental measurements are then utilized in Chapter 5 to estimate the 2-dimensional turbulent electric field consistent with drift-reduced Braginskii theory under the framework of an axisymmetric fusion plasma with purely toroidal field. To further examine the effects of approximations in neutral dynamics on turbulent field predictions, calculations are performed with and without atomic helium effects on particle and energy sources within the reduced plasma turbulence model. The inclusion of neutral helium (which is locally puffed in the experiment) is found to strengthen correlations between the electric field and plasma pressure. The neutral dynamics are also associated with an observed broadening of turbulent field fluctuation amplitudes, underlining their quantitative importance on turbulent ${\bf E \times B}$ flows and edge shearing of coherent plasma structures. \chapter{Uncovering turbulent fields from electron pressure observations} \setlength{\epigraphwidth}{1.0\textwidth} \epigraph{There is a physical problem that is common to many fields, that is very old, and that has not been solved. It is not the problem of finding new fundamental particles, but something left over from a long time ago---over a hundred years. Nobody in physics has really been able to analyze it mathematically satisfactorily in spite of its importance to the sister sciences. It is the analysis of circulating or turbulent fluids.}{Richard P. Feynman} \setlength{\epigraphwidth}{0.5\textwidth} \epigraph{Shall I refuse my dinner because I do not fully understand the process of digestion?}{Oliver Heaviside} The boundary region is critical in determining a fusion reactor's overall viability since edge plasma conditions strongly influence a myriad of reactor operations \cite{Federici_2001,Li2020,Chang2021}. Validating edge turbulence models is accordingly a crucially important endeavour since gathering sufficient information to effectively test reduced turbulent transport models is vital towards developing predictive capability for future devices. These machines will access novel burning plasma regimes and operate with some of the largest temperature gradients in the universe, but existing models may be inaccurate and standard diagnostics incapable of surviving such harsh thermonuclear environments \cite{biel_diagnostics_2019}. Yet edge modelling continues to need improvement---comprehensive gyrokinetic codes suitable for the boundary of tokamaks are still under development and fluid simulations commonly lack essential physics necessary to study collisionless systems. On this point, this chapter introduces the transport model known as drift-reduced Braginskii theory \cite{Braginskii1965RvPP,Kim-1993,francisquez_thesis} which is relevant to boundary plasmas and widely applied to analyze edge turbulence. Various adaptations of these equations have been recently taken to investigate several important edge phenomena including pedestal physics \cite{Francisquez_2017}, blob dynamics \cite{Ricci_2012}, neutral effects \cite{Thrysoe_2018}, and heat fluxes impinging plasma-facing components \cite{nespoli_non-linear_2017}. While experimental trends are at times reproduced in these works \cite{Zholobenko_2021_validation}, direct quantitative agreement between the two-fluid turbulence theory and observations is generally lacking on a wide scale due to difficulty in aligning global simulations with plasma experiments where relevant measurements may be sparse or missing altogether. Fusion plasma diagnostic measurements are inherently noisy and limited in their spatiotemporal scope (e.g. 1- or 2-dimensional profiles of electron density and temperature \cite{griener_continuous_2020,Bowman_2020,Mathews2020,mathews2022deep}) and resultantly require suitable analysis techniques. To this end, Chapter 2 demonstrates a physics-informed deep learning framework to diagnose unknown turbulent field fluctuations consistent with drift-reduced Braginskii theory from limited electron pressure observations. Namely, the drift-reduced Braginskii model is represented via PINNs \cite{Lagaris_1998,raissi2017physics,SIRIGNANO20181339}---highly expressive function approximators trained to solve supervised learning tasks while respecting nonlinear partial differential equations---to infer unobserved field dynamics from partial measurements of a synthetic plasma. As will be illustrated through a readily adaptable multi-network machine learning framework, this paradigm is transferable to the broad study of quasineutral plasmas in magnetized collisional environments and presents novel pathways for the AI-assisted interpretation of plasma diagnostics. In ways previously inaccessible with classical analytic methods, this approach has the ability to improve the direct testing of reduced turbulence models in both experiment and simulation to inform physicists of the equations necessary to model the edge. The overall computational technique introduces a systematic pathway towards quantitatively testing plasma turbulence theories, and is to date among the most complex systems applied in physics-informed deep learning codes. To demonstrate this framework, Chapter 2 proceeds with a description of a synthetic plasma modelled computationally via drift-reduced Braginskii theory in Section \ref{sec:level2.1}, outlines a machine learning architecture for multi-field turbulence analysis in Section \ref{sec:level2.2}, presents results in the robust learning of unknown turbulent fields in Section \ref{sec:level2.3}, and concludes with a summary in Section \ref{sec:level2.4}. \section{\label{sec:level2.1}Drift-reduced Braginskii modelling} \begin{figure}[ht] \centering \includegraphics[width=0.48\linewidth]{templates/helix_arrowsrectangle_chapter2.png} \caption{\label{chapter2_geometry}A visualization of the geometry employed in \texttt{GDB} where the black contours represent the helical shaping of magnetic field lines with constant pitch angle. The shaded region indicates an example of a 2-dimensional field-aligned rectangular cross-section analyzed in the larger 3-dimensional domain of the full plasma.} \end{figure} The synthetic plasma analyzed is numerically simulated by the global drift-ballooning (\texttt{GDB}) finite difference code \cite{GDB, francisquez2020fluid} which solves the two-fluid drift-reduced Braginskii equations in the electrostatic limit relevant to low-$\beta$ conditions. This is a full-$f$ \cite{Belli_2008,Full-F,Held_2020,deltaf_DRB} fluid model in the sense that the evolution of the equilibrium and fluctuating components of the solution are not separated and relative perturbation amplitudes can be of order unity as found in experiments \cite{Garcia_SOL_fluctuations}. A 3-dimensional simulation domain is implemented with a shearless field-aligned coordinate system where ${\bf \hat{x}}$ is the unit vector along the radial direction (i.e. ${\bf{\hat{R}}}$), the helical magnetic field is oriented along ${\bf \hat{z}}$, and ${\bf \hat{y}}$ is perpendicular to both ${\bf \hat{x}}$ and ${\bf \hat{z}}$. Figure \ref{chapter2_geometry} displays a visualization of this geometry in Cartesian coordinates $(\mathcal{X},\mathcal{Y},\mathcal{Z})$ applied in \texttt{GDB}. The two-fluid theory encoded in the numerical simulation assumes the plasma is magnetized ($\Omega_i \gg \frac{\partial}{\partial t}$), collisional ($\nu_{ei} \gg \frac{\partial}{\partial t}$), and quasineutral ($\nabla \cdot \v{j} \approx 0$) with the reduced perpendicular fluid velocity given by ${\bf E \times B}$, diamagnetic, and ion polarization drifts. After neglecting collisional drifts and terms of order $m_e/m_i$, one arrives at the following equations (in Gaussian units) governing the plasma's density ($n \approx n_e \approx n_i$), vorticity ($\gvort$), parallel electron velocity ($\vpe$), parallel ion velocity ($\vpi$), electron temperature ($T_e$), and ion temperature ($T_i$) \cite{francisquez2020fluid,francisquez_thesis,Braginskii1965RvPP} \begin{eqnal}\label{eq:nDotGDBH} \d{^e n}{t} = -\frac{2c}{B}\left[n\curv{\phi}-\frac{1}{e}\curv{p_e}\right] -n\delpar{\vpe} +\nSrcN+\mathcal{D}_{n} \end{eqnal} \begin{eqnal}\label{eq:wDotGDBH} \pd{\gvort}{t} &= \frac{2c}{eB}\left[\curv{p_e}+\curv{p_i}\right]-\frac{1}{em_i \Omega_i}\curv{G_i}+\frac{1}{e}\delpar{j_{\parallel}}+\mathcal{D}_{\gvort}\\ &\quad-\div{\left\lbrace\frac{nc^2}{\Omega_i B^2}\left[\phi,\gradperp{\phi}+\frac{\gradperp{p_i}}{en}\right]+\frac{nc}{\Omega_i B}\vpi\delpar{\left(\gradperp{\phi}+\frac{\gradperp{ p_i}}{en}\right)}\right\rbrace} \end{eqnal} \begin{eqnal}\label{eq:vpeDotGDBH} \d{^e\vpe}{t} &= \frac{1}{m_e}\left(e\delpar{\phi}-\frac{\delpar{p_e}}{n}-0.71\delpar{T_e} + e\eta_\parallelj_{\parallel} \right) \\ &\quad + \frac{2}{3} \frac{\delpar{G_e}}{n} + \frac{2cT_e}{eB}\curv{\vpe}+\momSrce+\mathcal{D}_{\vpe} \end{eqnal} \begin{eqnal}\label{eq:vpiDotGDBH} \d{^i\vpi}{t} &= \frac{1}{m_i}\left(-e\delpar{\phi}-\frac{\delpar{p_i}}{n}+0.71\delpar{T_e} - e\eta_\parallelj_{\parallel} \right)\\ &+\frac{2 T_e}{3n}\frac{\delpar{G_i}}{n}-\frac{2cT_i}{eB}\curv{\vpi}+\momSrci+\mathcal{D}_{\vpi} \end{eqnal} \begin{eqnal}\label{eq:TeDotGDBH} \d{^e T_e}{t} = \frac{2T_e}{3n}\left[\d{^e n}{t} + \frac{1}{T_e}\delpar \kappa^e_\parallel \delpar T_e + \frac{5n}{m_e \Omega_e} \curv{T_e} \right.\\ \left. + \eta_\parallel \frac{j_{\parallel}^2}{T_e} + \frac{0.71}{e}(\delpar{j_{\parallel}} - \frac{j_{\parallel}}{T_e}\delpar{T_e}) + \frac{1}{T_e} \enerSrceN \right] + \mathcal{D}_{T_e} \end{eqnal} \begin{eqnal}\label{eq:TiDotGDBH} \d{^i T_i}{t} &= \frac{2T_i}{3n}\left[\d{^i n}{t} + \frac{1}{T_i}\delpar \kappa^i_\parallel \delpar T_i - \frac{5n}{m_i \Omega_i} \curv{T_i} + \frac{1}{T_i} \enerSrciN \right] + \mathcal{D}_{T_i} \end{eqnal} \noindent whereby the field-aligned electric current density is $j_{\parallel} = en\left(\vpi - \vpe\right)$, the stress tensor's gyroviscous terms contain $G_s = \eta^s_0 \left\lbrace 2\delpar{v_{\parallel s}}+c\left[\curv{\phi} + \curv{p_s}/(q_s n)\right]\right\rbrace$, and $\eta^s_0$, $\Omega_s$, and $q_s$ are the species ($s = \{e,i\}$) viscosity, cyclotron frequency, and electric charge, respectively. The convective derivatives are $d^s f/dt = \partial_t f + (c/B)\left[\phi,f\right] + v_{\parallel s}\delpar{f}$ with $\left[F,G\right] = \v{b_0} \times \nabla F \cdot \nabla G$ and $\v{b_0}$ representing the unit vector parallel to the magnetic field. The field's magnitude, $B$, decreases over the major radius of the torus ($B\propto1/R$), and its curvature is $\gv{\kappa} = -{\bf{\hat{R}}}/R$. The curvature operator, $\curv{f} = \v{b_0} \times \gv{\kappa} \cdot \grad{f}$, $\nabla_\parallel = -\partial / \partial z$, and $\v{b_0} = -{\bf \hat{z}}$ follow past convention \cite{francisquez2020fluid}. The coefficients $\kappa^s_\parallel$ and $\eta^s_\parallel$ correspond to parallel thermal conductivity and electrical resistivity, respectively. Time-independent Gaussian-shaped density ($\nSrcN$) and energy sources ($S_{E,s}$) are placed at the left wall while zero external momentum ($S_{\mathcal{M}\parallel s}$) is explicitly forced upon the system. Explicit hyperdiffusion consisting of both fourth-order cross-field and second-order parallel diffusion is applied for numerical stability in the form of $\mathcal{D}_f = \chi_x \frac{\partial f} {\partial x^4} + \chi_y \frac{\partial f} {\partial y^4} + \chi_z \frac{\partial f} {\partial z^2}$. Under quasineutrality, electric fields arise not by local imbalance of charged particles but by the requirement that the electric current density is divergence free \cite{DRB_consistency3,Zholobenko_2021}. Accordingly, the electrostatic potential, $\phi$, is numerically solved for the synthetic plasma via the following boundary value problem: \begin{equation}\label{BVP_gvort_phi} \div{ \frac{nc}{\Omega_i B}\left(\gradperp{\phi}+\frac{\gradperp{p_i}}{en}\right) } = \gvort. \end{equation} The synthetic plasma consists of deuterium ions and electrons with real masses (i.e. $m_i = 3.34 \times 10^{-27} \text{ kg}$ and $m_e = 9.11\times 10^{-31} \text{ kg}$) and on-axis magnetic field of $B_{axis} = 5.0 \text{ T}$ with minor and major radius of $a_0 = 0.22 \text{ m}$ and $R_0 = 0.68 \text{ m}$, respectively, consistent with characteristics of discharges in the Alcator C-Mod tokamak \cite{Hutch_CMod,Marmar_CMod,Alcator_Greenwald} for which there is evidence of fluid drift turbulence controlling edge profiles \cite{labombard_evidence_2005}. Moreover, drift-reduced models, where the ion gyration frequency is assumed to be faster than the plasma fluctuations (i.e. $\Omega_i \gg \frac{\partial}{\partial t}$), are generally good approximations to full velocity models when studying edge turbulence \cite{Leddy_full_velocity}. This discretized toroidal geometry is a flux-tube-like domain corresponding to Figure \ref{chapter2_geometry} on the outboard side (i.e. strictly bad curvature) of the tokamak scrape-off layer (SOL) with field lines of constant helicity wrapping around the torus and terminating on walls producing both resistive interchange and toroidal drift-wave turbulence. Transport is primarily along blobby field-aligned structures with increased pressure propagating due to perpendicular drifts which polarize the blob and yield outward ${\bf E \times B}$ drift of the filament. This is related to the Poynting vector representing the directional energy flux density of the electromagnetic field \cite{Thrysoe_2020,DRB_consistency3}. The physical dimensions of the entire simulation domain are $[L_x = 7.7\text{ cm}, L_y = 5.5 \text{ cm}, L_z = 1800.0 \text{ cm}]$ with spatiotemporal resolution of $[\Delta x = 0.03 \text{ cm}, \Delta y = 0.04 \text{ cm}, \Delta z = 56.25 \text{ cm}, \Delta t = 4.55 \times 10^{-11} \text{ s}]$. Periodic boundary conditions are employed in the binormal direction for all quantities. Homogeneous Neumann conditions (i.e. fixing the function's derivative normal to the boundary) are set on the radial surfaces for $n$, $\vpe$, $\vpi$, $T_e$, and $T_i$ while homogeneous Dirichlet conditions (i.e. fixing the function on the boundary) are used for $\gvort$ and $\phi$. By constraining $\phi = 0$ along the walls, this in principle enforces radial $\bf {E \times B}$ flows to go to zero on the simulation boundaries for the synthetic plasma being analyzed. The lower limit of the Bohm criterion, a necessary condition for the formation of a stationary Debye sheath \cite{Riemann_1991}---the transition from a plasma to a solid surface---is imposed as a parallel boundary condition, \begin{equation} \vpi(z=\pm \frac{L_z}{2}) = \mp c_{s} = -\sqrt{\frac{T_i + T_e}{m_i}}, \end{equation} \begin{equation} \vpe(z=\frac{\pm L_z}{2}) = \begin{cases} \mp c_{s}\exp(\Lambda - \frac{e\phi}{T_e}) &\mbox{if } \phi > 0 \\ \mp c_{s}\exp(\Lambda) &\mbox{if } \phi \leq 0 \end{cases}, \end{equation} where $\Lambda = \log\sqrt{m_i/[2\pi m_e(1 + T_i/T_e)]}$. Since the direction of the flows at the sheath entrance are known, ghost cells in the $z$-direction are filled such that an upwind stencil ensues to evolve $n$, $\gvort$, $T_e$, and $T_i$ \cite{francisquez2020fluid}. For $T_e$ and $T_i$ specifically, finite conductive heat fluxes entering the sheaths are applied according to $q_{{\parallel},s} = -\kappa^s_{\parallel} \delpar T_s = \pm \gamma_s n v_{{\parallel},s} T_s$, where the upper (lower) sign corresponds to the top (bottom) sheath and $\gamma_s$ is the sheath transmission coefficient. Its value for ions and electrons is taken to be $\gamma_i =5T_i/2T_e$ and $\gamma_e = 2 + \lvert e \phi \rvert/T_e$, respectively \cite{francisquez2020fluid}. Collisional coefficients and diffusivities are kept constant in the direct numerical simulation as they can be unphysically large at high temperatures due to the lack of kinetic effects and generally require closures going beyond Chapman-Enskog to account for plasma where $\nu_{ei} \not\gg \partial/ \partial t$ \cite{Chapman_1970}. To start the numerical simulation, electrons and ions are initialized with zero parallel velocity and vorticity fields along with truncated Gaussian density and temperature profiles. A second-order trapezoidal leap-frog time-stepping scheme evolves the system of equations forward with subcycling of parabolic terms (e.g. $\delpar \kappa^s_\parallel \delpar T_s$) \cite{computational_methods,francisquez_thesis} due to the low frequency turbulence structure changing slowly over the thermal diffusion timescale. The commonly applied Boussinesq approximation \cite{GRILLIX_2018} in Braginskii solvers is also used when evolving the generalized vorticity, $\gvort$. The normalizations applied to solve these partial differential equations in both the finite difference code and deep learning framework are sketched in the Appendix. A complete treatment of the numerical solver and greater specificity regarding the turbulence simulations can be found in \cite{GDB,francisquez2020fluid}. \section{\label{sec:level2.2}Machine learning fluid theory} Neural networks are operationally computational programs composed of elementary arithmetic operations (e.g. addition, multiplication) and functions (e.g. $\exp$, $\sin$, $\log$) which can be differentiated to arbitrary order up to machine precision via application of chain rule \cite{Raissi_JMLR,AD_2020}. While biases are presently inevitable \cite{wang2020eigenvector}, these regression models are in theory constructed without necessarily committing to a designated class of basis functions (e.g. polynomial, trigonometric). Automatic differentiation in conjunction with this adaptive capacity of neural networks permits them to effectively address nonlinear optimization problems in physics and engineering by training upon both partial differential equations and observational data via multi-task learning \cite{raissi2017physics}. Constraining classically underdetermined systems by physical laws and experimental measurements in this way presents an emerging technique in computational mechanics which this thesis extends to the deduction of unknown turbulent plasma dynamics. In this physics-informed deep learning framework, every dynamical variable in equations \eqref{eq:nDotGDBH}--\eqref{eq:TiDotGDBH} is approximated by its own fully-connected neural network, which is commonly known as a data-efficient universal function approximator \cite{cybenko_approximation_1989}, which can be molded to learn unknown turbulent fields given sufficient training. \begin{figure}[ht] \centering \includegraphics[width=0.85\linewidth]{templates/33883059redorng_both_n_e_T_e.png} \caption{\label{observed_dens_and_Te}These 2-dimensional slices of the simulated turbulent electron density and temperature over a short temporal window are the only observed variables used as inputs to the deep learning framework. The full 3D synthetic plasma exhibits field-aligned filamentary structures (i.e. blobs).} \end{figure} For analysis in the multi-network framework, partial measurements of $n_e$ and $T_e$ over time only come from a smaller 2-dimensional field-aligned domain in the interior of the synthetic plasma described in Section \ref{sec:level2.1} to emulate experiment with dimensions of $[L^*_x = 3.8 \text{ cm}, L^*_y = 3.8 \text{ cm}]$ and spatiotemporal resolution of $[\Delta^* x = 0.03 \text{ cm}, \Delta^* y = 0.04 \text{ cm}, \Delta^* t = 7.27 \times 10^{-7} \text{ s}]$ as depicted by a snapshot in Figure \ref{observed_dens_and_Te}. Each network consequently takes the local spatiotemporal points $(x,y,t)$ from the reduced domain for measurements as the only inputs to the initial layer while the dynamical variable being represented (e.g. $\phi$) is the sole output. In the middle of the architecture, every network consists of 5 hidden layers with 50 neurons per hidden layer and hyperbolic tangent activation functions ($\sigma$) using Xavier initialization \cite{GlorotAISTATS2010}. \begin{figure}[ht] \centering \includegraphics[width=0.8\linewidth]{templates/ne_time_trace.png} \caption{\label{observed_1D_dens_time} A local time trace of the turbulent $n_e$ over 200 $\mu$s from the simulated plasma at $[x = 1.0 \text{ cm}, y = 0.0 \text{ cm}, z = -28.1 \text{ cm}]$. The observed synthetic data analyzed in the machine learning framework only comes from the small temporal window (green) which corresponds to just 4 points in time.} \end{figure} \begin{figure*} \centering \includegraphics[width=1.0\linewidth]{templates/PlasmaPINNconnectivity.png} \caption{\label{PlasmaPINN}Visualization of the physics-informed framework with individual networks---where $\theta_{n_e}$ represents the weights and biases of the $n_e$ network, for example---being selectively trained against loss functions comprising both partial observations, $\mathcal{L}_{n_e}$ and $\mathcal{L}_{T_e}$, and reduced theory, $\mathcal{L}_{f_{n_e}}$ and $\mathcal{L}_{f_{T_e}}$, to infer unobserved turbulent dynamics. All spatial gradients and time derivatives in $f_{n_e}$ and $f_{T_e}$ are represented using automatic differentiation of each individual variable's network which in practice extends the size of the computation graph being evaluated. To handle reduced 2-dimensional data from the 3-dimensional synthetic plasma, the z-coordinate is removed from the networks for simplicity and as a test for determining the minimal information necessary to learn $\phi$. If noisy data are observed, then $\theta_{n_e}$ (and $\theta_{T_e}$, if $T_e$ measurements are available) should be additionally trained against $\mathcal{L}_{f_{n_e}}$ (and $\mathcal{L}_{f_{T_e}}$).} \end{figure*} In actuality, the repeated differentiation and summation of networks to construct every single term's representation in the partial differential equations subsequently constructs a far larger resultant computation graph. The cumulative network is therefore a truly deep approximation---at least compared to the 5 hidden layers in each dynamical variable's individual network---of the plasma turbulence theory. Partial observations of the simulated plasma consist of only $n_e$ and $T_e$ measurements of 2-dimensional spatial extent, which is similar to experimental fluctuation diagnostics like gas puff imaging \cite{Zweben_2017,mathews2022deep}, as visualized in Figure \ref{observed_dens_and_Te} over just 4 separate time slices (i.e. 2.9 $\mu$s). For reference, the synthetic plasma's fluctuations have an approximate autocorrelation time of 1.5 $\mu$s and radial autocorrelation length of 0.4 cm. The narrow temporal extent of the strongly fluctuating $n_e$ observations at a local spatial point is further visualized in Figure \ref{observed_1D_dens_time}. Properties of all other dynamical variables in the 6-field turbulence theory are taken to be unknown, and the networks are simultaneously optimized against the drift-reduced Braginskii equations and observed data to better approximate the unmeasured quantities. Physical constraints are learned by the networks via minimization of ascribed loss functions encompassing both limited measurements of the plasma and two-fluid turbulence model. To be precise, partial synthetic measurements are learned by training the $n_e$ and $T_e$ networks against the average $\mathcal{L}_2$-norm of their respective relative errors \begin{equation}\label{eq:L_n_DotGDBH} \mathcal{L}_{n_e} = \frac{1}{N_0}\sum_{i=1}^{N_0} \lvert n^*_{e}(x^i_0,y^i_0,z^i_0,t^i_0) - n^i_{e,0} \rvert^2, \end{equation} \begin{equation}\label{eq:L_Te_DotGDBH} \mathcal{L}_{T_e} = \frac{1}{N_0}\sum_{i=1}^{N_0} \lvert T^*_{e}(x^i_0,y^i_0,z^i_0,t^i_0) - T^i_{e,0} \rvert^2, \end{equation} where $\lbrace x_0^i,y_0^i,z_0^i,t_0^i,n_{e,0}^i,T_{e,0}^i\rbrace^{N_0}_{i=1}$ correspond to the set of observed data and the variables $n^*_e$ and $T^*_e$ symbolize predicted electron density and temperature, respectively, by the networks. The theory enforcing physical constraints in the deep learning framework is expressed by evaluating the individual terms in the model by differentiating the graphs with respect to input spatiotemporal coordinates via application of chain rule through automatic differentiation \cite{tensorflow2015-whitepaper}. Correspondingly, model loss functions are embedded during training by recasting \eqref{eq:nDotGDBH} and \eqref{eq:TeDotGDBH} in the following implicit form \begin{eqnal}\label{eq:f_n_DotGDBH} f_{n_e} &\coloneqq -\d{^e n}{t} -\frac{2c}{B}\left[n\curv{\phi}-\frac{1}{e}\curv{p_e}\right]-n\delpar{\vpe} +\nSrcN+\mathcal{D}_{n}, \end{eqnal} \begin{eqnal}\label{eq:f_Te_DotGDBH} f_{T_e} &\coloneqq -\d{^e T_e}{t} + \frac{2T_e}{3n}\left[\d{^e n}{t} + \frac{1}{T_e}\delpar \kappa^e_\parallel \delpar T_e + \eta_\parallel \right.\\& \left. + \frac{5n}{m_e \Omega_e} \curv{T_e} \frac{j_{\parallel}^2}{T_e} + \frac{0.71}{e}(\delpar{j_{\parallel}} - \frac{j_{\parallel}}{T_e}\delpar{T_e}) + \frac{1}{T_e} \enerSrceN \right] + \mathcal{D}_{T_e}, \end{eqnal} and then further normalized into dimensionless form matching the numerical code as in \eqref{eq:normlnDotGDBH} and \eqref{eq:normlTeDotGDBH} \cite{francisquez2020fluid}. This normalized implicit formulation is vital to learning via optimization since all physical terms collectively sum to zero when the equations are ideally satisfied. These physical constraints provided by the unitless evolution equations of $n_e$ and $T_e$ are jointly optimized using loss functions defined by \begin{equation}\label{eq:L_f_n_DotGDBH} \mathcal{L}_{f_{n_e}} = \frac{1}{N_f}\sum_{i=1}^{N_f} \lvert f^{*}_{n_e}(x^i_f,y^i_f,z^i_f,t^i_f) \rvert^2, \end{equation} \begin{equation}\label{eq:L_f_Te_DotGDBH} \mathcal{L}_{f_{T_e}} = \frac{1}{N_f}\sum_{i=1}^{N_f} \lvert f^{*}_{T_e}(x^i_f,y^i_f,z^i_f,t^i_f) \rvert^2, \end{equation} where $\lbrace x_f^i,y_f^i,z_f^i,t_f^i\rbrace^{N_f}_{i=1}$ denote the set of collocation points, and $f^{*}_{n_e}$ and $f^{*}_{T_e}$ are the null partial differential equations prescribed by \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH} in normalized form directly evaluated by the neural networks. Optimization against the applied plasma theory is central to the methodology and enforces physical constraints in the deep learning framework by ensuring each sub-network respects the multi-field turbulence model's constraints as visualized in Figure \ref{PlasmaPINN}. This enables fine tuning of each neural networks' weights and biases by adjusting them in this generalized regression model to satisfy the physical laws governing the nonlinear connection sought between the sub-networks. The set of collocation points over which the partial differential equations are evaluated can be arbitrarily large and span any extent over the physical domain, but are taken in this example to correspond to the positions of the synthetic measurements being trained upon, i.e. $\lbrace x_0^i,y_0^i,z_0^i,t_0^i\rbrace^{N_0}_{i=1} = \lbrace x_f^i,y_f^i,z_f^i,t_f^i\rbrace^{N_f}_{i=1}$. It should be once again noted that the only observed dynamical quantities in these equations are 2-dimensional views of $n_e$ and $T_e$ without any explicit information about boundary conditions nor initializations. All analytic terms encoded in these equations including high-order operators are computed exactly by the neural networks without any approximation (e.g. linearization) nor discretization. This machine learning framework with a collocation grid of arbitrarily high resolution uses a continuous spatiotemporal domain without time-stepping nor finite difference schema in contrast with the numerical \texttt{GDB} code. To handle 2-dimensional data, slow variation of dynamics is assumed in the $z$-coordinate and effectively set all parallel derivatives to zero (i.e. $\frac{\partial}{\partial z}\rightarrow 0$). Notwithstanding, parallel flows and Ohmic heating terms in the model are still kept. If measurements in the $z$-direction are available or more collocation points utilized during training with observational data of reduced dimensionality, this procedure may be relaxed---it is partly a trade-off between computational fidelity and stability. It is noteworthy that the temporal resolution of the data observed by the neural networks is several orders of magnitude lower than the time steps taken by the finite difference solver in \texttt{GDB} as required for numerical stability, i.e. $\Delta^* t \gg \Delta t$. Also, if sought, training on data sets viewed at oblique angles in 3-dimensional space over long macroscopic timescales can be easily performed via segmentation of the domain and parallelization, but a limited spatial view with reduced dimensionality is taken to emulate experimental conditions for field-aligned observations \cite{Zweben_2017} and theoretically test what information is indispensable to learn unobserved turbulent dynamics. Loss functions are optimized with mini-batch sampling where $N_0 = N_f = 500$ using stochastic gradient descent via Adam \cite{kingma2014adam} and the L-BFGS algorithm---a quasi-Newton optimization algorithm \cite{10.5555/3112655.3112866}---for 20 hours over 32 cores on Intel Haswell-EP processors which corresponds to approximately 8694 full iterations over both optimizers. If observing noisy data, it is found that expanding to larger sample sizes with $N_0 = N_f = 2500$ and training solely via L-BFGS is optimal for learning. Removing $\mathcal{L}_{f_{n_e}}$ and $\mathcal{L}_{f_{T_e}}$ from the optimization process (i.e. setting $N_f = 0$) would correspond to training of classical neural networks without any knowledge of the underlying governing equations which would then be incapable of learning turbulent field fluctuations. Setting $N_0 = 0$ instead while providing initial and boundary conditions for all dynamical variables would alternatively correspond to regularly solving the equations directly via neural networks. Overall, priming networks by firstly training in stages on observed data or prior constraints, i.e. priming, is useful to enhance stability and convergence in this multi-objective task. Additionally, encoding domain expertise such as subsonic bounds on parallel flows or regularizing temperature to be strictly positive via suitable output activation functions can assist training by constraining the admissible solution landscape. Networks constructed in this way can intrinsically abide by physical laws which is especially useful to uncover unknowns like $\vpi$ and $T_i$. A fundamental goal in computational plasma modelling is determining the minimum complexity necessary (and no less) to develop sufficiently predictive tokamak simulations. With sparse availability of measurements in fusion experiments, designing diagnostic techniques for uncovering such information is crucial. On this point, it is emphasized that training is from scratch over just a single synthetic plasma discharge with no extraneous validation nor testing sets required since overfitting is technically not encountered in this physics-informed paradigm. The multi-network deep learning framework simply utilizes a single set of $n_e$ and $T_e$ measurements over a period of microseconds which corresponds to the small data regime of machine learning. Merging partial observational data of $n_e$ and $T_e$ along with physical laws in the form of partial differential equations governing the time-dependent evolution of $n_e$ and $T_e$ sufficiently constrains the set of admissible solutions for the previously unknown nonlinear mappings the neural networks ultimately learn. It is also quite general: due to quasineutrality, no significant adjustments are necessary to generalize the technique when multiple ions and impurities may be present in boundary plasmas beyond the inclusion of appropriate collisional drifts and sources in multi-species plasmas \cite{multi_species,DRB_consistency1}. This deep learning technique for diagnosing turbulent fields is hence easily transferable which permits its systematic application across magnetic confinement fusion experiments whereby the underlying physical model fundamental to the turbulent transport is consistent. The framework sketched can also be extended to different settings in the interdisciplinary study (both numerical and experimental) of magnetized collisional plasmas in propulsion engines and astrophysical environments. \section{\label{sec:level2.3}Numerical Experiments} \subsection{\label{sec:level2.3.1}Recovery of the unknown turbulent electric field} \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{templates/33883059phi.png} \caption{\label{learned_phi}The synthetic plasma's unobserved electric potential (top) at $t = 229.9 \ \mu\text{s}$ is learned approximately up to an additive constant by the neural network (bottom).} \end{figure} Accurate turbulent edge electric field fluctuation characterization is particularly significant to magnetic confinement fusion devices. By constraining the deep learning framework with the two-fluid turbulence theory and modest amounts of empirical information in the form of partial 2-dimensional observations of $n_e$ and $T_e$, it is found that physics-informed neural networks can accurately learn the plasma's electric potential on turbulent scales without the machine learning framework ever having observed this quantity, as displayed in Figures \ref{learned_phi} and \ref{1d_phi}. \begin{figure}[ht] \centering \includegraphics[width=0.85\linewidth]{templates/338830591d_phi_char.png} \caption{\label{1d_phi}A 1-dimensional radial profile of the true and predicted $\phi$ at $[y = 0.0 \text{ cm}, z = -28.1 \text{ cm}, t = 229.9 \ \mu\text{s}]$, i.e. a slice of Figure \ref{learned_phi}. The ordinates are offset differently but both exactly span 410 V with equivalent spacing.} \end{figure} \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{templates/33883059E_r_lim.png} \caption{\label{learned_E_r}The learned turbulent $E_r$ (bottom) closely agrees with the magnitude and structure of the true $E_r$ (top) despite $\gvort$, $\vpe$, $\vpi$, and $T_i$ being initially unknown.} \end{figure} It is notable that despite there being no knowledge of $\gvort, \vpe, \vpi,$ and $T_i$ (i.e. multiple unknowns existing in the partial differential equations and \eqref{BVP_gvort_phi} never even being directly invoked), the electric field is nonetheless learned consistently with the physical theory encoded by the plasma turbulence model. Since $\phi$ is a gauge-invariant quantity exact up to an additive constant, it is accordingly uncovered up to a scalar offset which varies randomly due to the stochastic nature of the optimization employed in the machine learning framework. This difference physically arises because no direct boundary information was enforced upon the neural network when learning $\phi$, although it could be technically implemented. By contrast, the \texttt{GDB} code imposed zero potential on the outer walls of the simulation domain. General agreement in both magnitude and structure in the learned radial electric field is evident in Figure \ref{learned_E_r} with an average absolute error of 2619 V/m. To better interpret the learning process, normalized loss functions being trained upon are tabulated after $M$ full iterations by the optimizers in Table \ref{loss_tabulate}. After one iteration, \eqref{eq:L_f_n_DotGDBH} and \eqref{eq:L_f_Te_DotGDBH} are relatively small in magnitude, and this would correspond to a trivial result satisfying the partial differential equations given the nonuniqueness of its solutions. As training progresses, observational data is better captured in the deep learning framework and the neural networks proceed to converge toward the sought solution as opposed to trivial ones. A difference in the rates of learning for $n_e$, $T_e$, and $\phi$ also exist since the electric field is learned implicitly via the model instead of being trained upon directly. Each individual loss function being optimized therefore does not necessarily decrease perfectly monotonically, but it is instead the collective training against partial differential equations in conjunction with observational data that is key. Namely, while there are many potential solutions to \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH}---and while they may be more easily satisfied by trivial solutions---the limited $n_e$ and $T_e$ measurements compel the optimizer towards the physical solution of the partially observed plasma. In scenarios where inconsistencies in the true and learned model $E_r$ exist, one might repurpose this machine learning framework to iteratively test and thereby discover the {\it correct} partial differential equations altogether by quantitatively examining the proposed model's consistency with observations as in Table \ref{loss_tabulate}. For example, the analytic form of reduced source models in fluid theories \cite{Thrysoe_2018,Thrysoe_2020} can be inserted in the physics-informed deep learning framework to account for local turbulent ionization and inelastic collisions with kinetic neutrals by observing such measurements of $n_e$, $T_e$, and $\phi$ in global simulations \cite{Wersal_2015} and experiments \cite{mathews2022deep}. \begin{table}[ht] {\centering \renewcommand{\arraystretch}{1.0} \includegraphics[width=0.9\linewidth]{Table1_PlasmaPINN_v2.png} \caption{\label{loss_tabulate}Each normalized loss function optimized in the machine learning framework is tabulated after $M$ full iterations, where $M = 8694$ corresponds to the final iteration after 20 hours of training against both the partial observations of $n_e$ and $T_e$ and their implicit evolution equations, i.e. \eqref{eq:L_n_DotGDBH}, \eqref{eq:L_Te_DotGDBH}, \eqref{eq:L_f_n_DotGDBH}, and \eqref{eq:L_f_Te_DotGDBH}.} } \end{table} \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{templates/Boltz_neo.png} \caption{\label{analytic_E_r}Estimates of the turbulent $\phi$ and $E_r$ as expected by the Boltzmann model or neoclassical estimates yield markedly errant predictions when compared to the true values displayed at the top of Figures \ref{learned_phi} and \ref{learned_E_r}.} \end{figure} \subsection{\label{sec:level2.3.2}Contrast with conventional calculations} For comparison, classical and oft-employed models for calculating the electric potential with adiabatic electrons such as the Boltzmann relation, i.e. $n_e(\phi) = n_e(\phi_0) e^{q_e(\phi_0 - \phi)/T_e}$ \cite{Callen_adiabatic}, fail when computing perpendicular turbulent field fluctuations. Alternative approximations of $E_r$ from simple ion pressure balance as expected neoclassically, i.e. $\nabla \phi = -\nabla p_i/(Z n_i e)$ where $Z=1$ for deuterium ions \cite{Viezzer_2013}, would yield highly incorrect estimates of the turbulent electric field, too. Such methods ordinarily used in magnetic confinement fusion are only applicable to discerning equilibrium fields and dynamics parallel to the magnetic field in steady-state scenarios, but are erroneous in the analysis of microturbulence in nonquiescent plasmas. This is markedly observed when comparing Figure \ref{analytic_E_r} to the true $\phi$ and $E_r$ as plotted in Figures \ref{learned_phi} and \ref{learned_E_r}, respectively. This deep learning technique based upon drift-reduced Braginskii theory therefore provides a novel way to accurately measure the turbulent electric field in edge plasmas from just the electron density and temperature. As a further point of contrast compared to classical techniques, it is important to note that the inverse learning scenario has not been demonstrated thus far. In particular, given observations of $\phi$ and $T_e$, one cannot simply infer the turbulent $n_e$ fluctuations with the machine learning framework outlined. This one-way nature in learning indicates a division exists between the two pathways when attempting to constrain the admissible solutions of \eqref{eq:L_f_n_DotGDBH} and \eqref{eq:L_f_Te_DotGDBH} to uncover unknown nonequilibrium dynamics. Training is thus unidirectional and representative of asymmetries extant in the partial data and turbulence theory being learnt via optimization. \subsection{\label{sec:level2.3.3}Impacts of noise in physics-informed deep learning} It is also important to examine the practicality of these results when noise corrupts the observations as inevitably expected when translating this framework to experiment. As an example test, it is found that if only observing density fluctuations with normally distributed errors, one can still largely recover the unmeasured perpendicular electric fields and even resolve the partially observed variables. Namely, given just $n_e$ measurements with Gaussian noise of 25\% as in Figure \ref{noisy_dens}, the deep learning framework is robust enough to learn the true turbulent density in this physics-informed paradigm, which can subsequently be used to infer the unmeasured electric field. If $E_r$ was already known, this technique could then precisely check the validity of the reduced turbulence theory against observations from experiment or kinetic simulations \cite{Mathews2021PoP}. But, if using a standard feed-forward neural network, one must be careful with convergence since the objective of simply minimizing $\mathcal{L}_{n_e}$ without sufficient regularization, as innately provided by $\mathcal{L}_{f_{n_e}}$, can result in overfitting of noisy data. \begin{figure} \centering \includegraphics[width=1.0\linewidth]{templates/noisy_dens_learn4vertpcol_box.png} \caption{\label{noisy_dens} The physics-informed deep learning framework is capable of recovering the true $n_e$ despite strong Gaussian noise, i.e. $\sigma = 0.25$, present. The classical solution corresponds to a standard feed-forward neural network where $N_f = 0$.} \end{figure} \section{\label{sec:level2.4}Conclusion} These results illustrate a custom physics-informed deep learning framework with the novel capacity to learn unknown nonequilibrium dynamics in a multi-field turbulent transport model broadly relevant to magnetized collisional plasmas. This chapter specifically demonstrates the ability to determine unobserved turbulent electric fields consistent with the drift-reduced Braginskii equations from partial electron pressure observations, in contrast with with standard analytic techniques. This technique can be applied to infer field fluctuations that may be difficult to measure or when plasma diagnostics provide only partial information. On the other hand, if experimental electric field measurements exist, then the quantitative validity of the plasma turbulence model embedded in the neural networks can be directly assessed. This technique is also quite robust since, due to quasineutrality, it can be used to study ionized gases in magnetized environments with multiple ions and impurities present as commonly found in astrophysical settings and fusion energy and space propulsion systems. From a mathematical physics standpoint, it is remarkable that nonlinear dynamics can be accurately recovered from partial data and theory in a 6-field model. Inferring completely unknown turbulent fields from just 2-dimensional measurements and representations of the evolution equations given by \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH} demonstrates a massive reduction in the original 3-dimensional turbulence model indicating redundancy and the existence of reduced theory characterizations. Going forward, this framework has the potential capability to be generalized (e.g. to learn $T_e$, $T_i$, $\vpe$, and $\vpi$ in addition to $\phi$ using just 1-dimensional $n_e$ measurements) and transform how turbulence theories are systematically and quantitatively validated in both plasma simulations and experiments. The interpretable physics-informed machine learning methodology outlined should also be transferable across models (e.g. collisionless fluids, gyrokinetic, electromagnetic, atomic physics) and complex geometries. Furthermore, known limitations and {\it unknown} corrections to Braginskii's theory exist \cite{Catto-paper}, which can be introduced in the deep learning framework to automate testing and discovery of reduced plasma turbulence models when high fidelity data is observed. These extensions in theory and computing are left for future works. \chapter{Turbulent field fluctuations in gyrokinetic and fluid plasmas} \setlength{\epigraphwidth}{0.48\textwidth} \epigraph{All models are wrong, but some are useful.}{George E. P. Box} Validating the accuracy of reduced turbulence theories is amongst the greatest challenges to the advancement of plasma modelling. But meaningfully evaluating dynamical connections between turbulent fields across theories or experiment has been an intricate task for conventional numerical methods. Namely, when comparing global plasma simulations to other numerical models or diagnostics, one must precisely align initial states, boundary conditions, and sources of particles, momentum, and energy (e.g. plasma heating, sheath effects, atomic and molecular processes) \cite{francisquez2020fluid,Mijin_2020}. These descriptions of physics can be increasingly difficult to reconcile when applying different representations---for example, fluid or gyrokinetic---or when measurements characterizing the plasma are sparse as commonly encountered in thermonuclear fusion devices. Additionally, imperfect conservation properties (both in theory and numerics due to discretization) and the limited accuracy of time-integration schema can introduce errors further misaligning comparative modelling efforts. Such difficulties exist even when examining the same nominal turbulence theory across numerical codes \cite{nonlinear_GK_comparison_new,Tronko_ORB5vGENE,nonlinear_GK_comparison1,nonlinear_GK_comparison2} and become magnified for cross-model comparisons \cite{francisquez2020fluid}. To overcome these classical limitations, Chapter 3 applies the custom physics-informed deep learning framework developed in Chapter 2 to demonstrate the first direct comparisons of instantaneous turbulent fields between electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetic simulations. Good overall quantitative agreement is found between the two turbulence models in magnetized helical plasmas at low normalized pressure. In the fusion community, both comprehensive full-$f$ global gyrokinetic \cite{mandell_hakim_hammett_francisquez_2020,XGC,GENE,COGENT,ELMFIRE,ORB5,GYSELA,PICLS} and two-fluid \cite{BOUT++,TOKAM3X,GBS,Stegmeir2018,GDB} direct numerical simulations are under active development to improve predictive modelling capabilities and the design of future reactors, but no single code can currently capture all the dynamics present in the edge with sufficient numerical realism. It is therefore of paramount importance to recognize when certain numerical or analytical simplifications make no discernible difference, or when a given theoretical assumption is too risky, to clearly identify the limits of present simulations \cite{francisquez2020fluid}. Adaptations of the drift-reduced Braginskii equations have recently investigated several important edge phenomena \cite{Francisquez_2017,Ricci_2012,Thrysoe_2018,nespoli_non-linear_2017}, but precise quantitative agreement with experiment is generally lacking on a wide scale. The predictive accuracy of these codes in fusion reactors is uncertain, especially since kinetic effects may not be negligible as edge plasma dynamics approach the ion Larmor radius and collision frequencies are comparable to turbulent timescales \cite{Braginskii1965RvPP,blobs_review}. Yet these fluid codes remain in widespread usage for their reduced computational cost, which offers the ability to perform parameter scans with direct numerical simulations that can help uncover underlying physics and optimize reactor engineering designs. Nevertheless, the Vlasov-Maxwell system of equations is the gold standard in plasma theory, but such modelling is prohibitively expensive when wholly simulating the extreme spatiotemporal scales extant in fusion reactors. For the purposes of more tractable yet high fidelity numerical simulations, this system is averaged over the fast gyro-motion of particles to formulate 5D gyrokinetics. Fluid-gyrokinetic comparisons therefore present a way to analyze the robustness of reduced modelling while also illuminating when collisional fluid theories may be insufficient. Quantifying potential shortcomings is thus vital for the testing and development of improved reduced models \cite{waltz2019kinetic}. While explicit comparisons of global nonlinear dynamics across turbulence models were previously impractical using standard numerical simulations, the physics-informed deep learning \cite{raissi2017physics} technique from Chapter 2 enables this direct quantitative cross-examination of plasma turbulence theories by uncovering the turbulent electric field expected in two-fluid and gyrokinetic models based upon an electron pressure fluctuation. This turbulence model validation framework is potentially transferable across magnetic confinement fusion experiments where the underlying physical model governing turbulent transport is consistent, which permits its systematic application. The framework sketched can thus be extended to different settings especially in the interdisciplinary study (both numerical and experimental) of magnetized collisional plasmas in space propulsion systems and astrophysical environments if sufficient observations exist. Overall, these physics-informed neural networks present a new paradigm in the testing of reduced plasma turbulence models. To demonstrate these results, this chapter describes a gyrokinetic model based upon \cite{mandell_hakim_hammett_francisquez_2020} in Section \ref{sec:level3.1}, outlines pertinent aspects of the physics-informed machine learning architecture from Chapter 2 now being applied anew on gyrokinetic simulation data in Section \ref{sec:level3.2}, presents the first direct comparisons of instantaneous turbulent fields in Section \ref{sec:level3.3}, and concludes with a summary in Section \ref{sec:level3.4}. \section{\label{sec:level3.1}Gyrokinetic modelling} Following the full treatment outlined in \cite{mandell_thesis} and \cite{mandell_hakim_hammett_francisquez_2020}, the long-wavelength gyrokinetic modelling analyzed in this chapter constitutes nonlinear global electromagnetic turbulence simulations on open field lines using the \texttt{Gkeyll} computational plasma framework. The full-$f$ electromagnetic gyrokinetic equation is solved in the symplectic formulation \cite{brizard2007foundations}, which describes the evolution of the gyrocenter distribution function $f_s(\v{Z},t)=f_s(\v{R},v_\parallel,\mu,t)$ for each species ($s = \{e,i\}$), where $\v{Z}$ is a phase-space coordinate composed of the guiding center position $\v{R}=(x,y,z)$, parallel velocity $v_\parallel$, and magnetic moment $\mu=m_s v_\perp^2/2B$. In terms of the gyrocentre Hamiltonian and the Poisson bracket in gyrocentre coordinates with collisions $C[f_s]$ and sources $S_s$, the gyrokinetic equation is \begin{align} \pderiv{f_s}{t} + \{f_s, H_s\} - \frac{q_s}{m_s}\pderiv{A_\parallel}{t}\pderiv{f_s}{v_\parallel} = C[f_s] + S_s, \label{liouville} \end{align} or, equivalently, \begin{align} \pderiv{f_s}{t} + \dot{\v{R}}\v{\cdot}\nabla f_s + \dot{v}^H_\parallel \pderiv{f_s}{v_\parallel}- \frac{q_s}{m_s}\pderiv{A_\parallel}{t}\pderiv{f_s}{v_\parallel} = C[f_s] + S_s, \end{align} where the gyrokinetic Poisson bracket is defined as \begin{equation} \{F,G\} = \frac{\v{B^*}}{m_s B_\parallel^*} \v{\cdot} \left(\nabla F \frac{\partial G}{\partial v_\parallel} - \frac{\partial F}{\partial v_\parallel}\nabla G\right) - \frac{\uv{b}}{q_s B_\parallel^*}\times \nabla F \v{\cdot} \nabla G, \end{equation} and the gyrocentre Hamiltonian is \begin{equation} H_s = \frac{1}{2}m_sv_\parallel^2 + \mu B + q_s \phi. \end{equation} The nonlinear phase-space characteristics are given by \begin{equation} \dot{\v{R}} = \{\v{R},H_s\} = \frac{\v{B^*}}{B_\parallel^*}v_\parallel + \frac{\uv{b}}{q_s B_\parallel^*}\times\left(\mu\nabla B + q_s \nabla \phi\right), \end{equation} \begin{eqnal}\label{vpardot} \dot{v}_\parallel &= \dot{v}^H_\parallel -\frac{q_s}{m_s}\pderiv{A_\parallel}{t} = \{v_\parallel,H_s\}-\frac{q_s}{m_s}\pderiv{A_\parallel}{t} \\ \quad &= -\frac{\v{B^*}}{m_s B_\parallel^*}\v{\cdot}\left(\mu\nabla B + q_s \nabla \phi\right)-\frac{q_s}{m_s}\pderiv{A_\parallel}{t}. \end{eqnal} \noindent Here, $B_\parallel^*=\uv{b}\v{\cdot} \v{B^*}$ is the parallel component of the effective magnetic field $\v{B^*}=\v{B}+(m_s v_\parallel/q_s)\nabla\times\uv{b} + \delta \v{B}$, where $\v{B} = B \uv{b}$ is the equilibrium magnetic field and $\delta \v{B} = \nabla\times(A_\parallel \uv{b})\approx \nabla A_\parallel \times \uv{b}$ is the perturbed magnetic field {(assuming that the equilibrium magnetic field varies on spatial scales larger than perturbations so that $A_\parallel\nabla\times\uv{b}$ can be neglected)}. Higher-order parallel compressional fluctuations of the magnetic field are neglected so that $\delta\v{B}=\delta\v{B}_\perp$ and the electric field is given by ${\mathbf E} = -\nabla\phi - (\partial{A_\parallel}/\partial t) \uv{b}$. The species charge and mass are $q_s$ and $m_s$, respectively. In \eqref{vpardot}, $\dot{v}_\parallel$ has been separated into a term coming from the Hamiltonian, $\dot{v}^H_\parallel = \{v_\parallel,H_s\}$, and another term proportional to the inductive component of the parallel electric field, $(q_s/m_s)\partial {A_\parallel}/\partial{t}$. In the absence of collisions and sources, \eqref{liouville} can be identified as a Liouville equation demonstrating that the distribution function is conserved along the nonlinear phase space characteristics. Accordingly, the gyrokinetic equation can be recast in the following conservative form, \begin{eqnal} \pderiv{(\mathcal{J}f_s)}{t} &+ \nabla\v{\cdot}( \mathcal{J} \dot{\v{R}} f_s) + \pderiv{}{v_\parallel}\left(\mathcal{J}\dot{v}^H_\parallel f_s\right) - \pderiv{}{v_\parallel}\left(\mathcal{J}\frac{q_s}{m_s}\pderiv{A_\parallel}{t} f_s \right) = \mathcal{J} C[f_s] + \mathcal{J} S_s, \label{emgk} \end{eqnal} where $\mathcal{J} = B_\parallel^*$ is the Jacobian of the gyrocentre coordinates and $\uv{b}\v{\cdot}\nabla\times\uv{b}\approx0$ so that $B_\parallel^*\approx B$. The symplectic formulation of electromagnetic gyrokinetics is utilized with the parallel velocity as an independent variable instead of the parallel canonical momentum $p_\parallel$ in the Hamiltonian formulation \cite{brizard2007foundations,hahm1988nonlinear}. This notation is used for convenience to explicitly display the time derivative of $A_\parallel$, which is characteristic of the symplectic formulation of electromagnetic gyrokinetics. The electrostatic potential, $\phi$, is determined by quasi-neutrality, \begin{equation} \sigma_g + \sigma_\text{pol} = \sigma_g - \nabla\v{\cdot}\v{P} = 0, \end{equation} with the guiding centre charge density (neglecting gyroaveraging in the long-wavelength limit) given by \begin{equation} \sigma_g = \sum_s q_s \int d\v{w}\ \mathcal{J} f_s. \end{equation} Here, $d\v{w}= 2\pi\, m_s^{-1} dv_\parallel\, d\mu = m_s^{-1} dv_\parallel\, d\mu \int d\alpha$ is the gyrocentre velocity-space volume element $(d{\bf v}=m_s^{-1}dv_\parallel\, d\mu\, d\alpha\, \mathcal{J})$ with the gyroangle $\alpha$ integrated away and the Jacobian factored out (formally, $\mathcal{J}$ should also be included in $d\v{w}$). The polarization vector is then \begin{eqnal} \v{P} &= -\sum_s \int d\v{w}\ \frac{m_s}{B^2}\mathcal{J}f_s \nabla_\perp \phi \approx -\sum_s \frac{m_s n_{0s}}{B^2} \nabla_\perp \phi \equiv - \epsilon_\perp \nabla_\perp \phi, \end{eqnal} where $\nabla_\perp=\nabla-\uv{b}(\uv{b}\v{\cdot}\nabla)$ is the gradient orthogonal to the background magnetic field. A linearized time-independent polarization density, $n_0$, is assumed which is consistent with neglecting a second-order ${\bf E \times B}$ energy term in the Hamiltonian. Such an approximation in the SOL is questionable due to the presence of large density fluctuations, although a linearized polarization density is commonly used in full-$f$ gyrokinetic simulations for computational efficiency and reflective of common numerical modelling practices \cite{ku2018fast,shi2019full,mandell_hakim_hammett_francisquez_2020}. Adding the nonlinear polarization density along with the second-order ${\bf E \times B}$ energy term in the Hamiltonian are improvements kept for future work. Consequently, the quasi-neutrality condition can be rewritten as the long-wavelength gyrokinetic Poisson equation, \begin{equation} -\nabla \v{\cdot} \sum_s \frac{m_s n_{0s}}{B^2} \nabla_\perp \phi = \sum_s q_s \int d\v{w}\ \mathcal{J}f_s, \label{poisson} \end{equation} where, even in the long-wavelength limit with no gyroaveraging, the first-order polarization charge density on the left-hand side of \eqref{poisson} incorporates some finite Larmor radius (FLR) or $k_\perp$ effects in its calculation. It is worth emphasizing that this “long-wavelength” limit is a valid limit of the full-$f$ gyrokinetic derivation since care was taken to include the guiding-center components of the field perturbations at $O(1)$. Further, although one may think of this as a drift-kinetic limit, the presence of the linearized ion polarization term in the quasineutrality equation distinguishes the long-wavelength gyrokinetic model from versions of drift-kinetics that, for example, include the polarization drift in the equations of motion. The parallel magnetic vector potential, $A_\parallel$, is determined by the parallel Amp\`ere equation, \begin{equation} -\nabla_\perp^2 A_\parallel = \mu_0 \sum_s q_s m_s \int v_\parallel \mathcal{J} f_s\,d\v{w}. \label{ampere1} \end{equation} Note that one can also take the time derivative of this equation to get a generalized Ohm's law which can be solved directly for $\pderivInline{A_\parallel}{t}$, the inductive component of the parallel electric field $E_\parallel$ \cite{reynders1993gyrokinetic, cummings1994gyrokinetic, chen2001gyrokinetic}: \begin{equation} -\nabla_\perp^2 \pderiv{A_\parallel}{t} = \mu_0 \sum_s q_s m_s \int v_\parallel \pderiv{(\mathcal{J} f_s)}{t}\, d\v{w}. \end{equation} Writing the gyrokinetic equation as \begin{equation} \pderiv{(\mathcal{J}f_s)}{t} = \pderiv{(\mathcal{J}f_s)}{t}^\star + \pderiv{}{v_\parallel}\left(\mathcal{J} \frac{q_s}{m_s}\pderiv{A_\parallel}{t} f_s\right), \label{fstar} \end{equation} where $\partial{(\mathcal{J}f_s)^\star}/\partial{t}$ denotes all terms in the gyrokinetic equation (including sources and collisions) except $\pderivInline{A_\parallel}{t}$, Ohm's law can be, after integration by parts, rewritten \begin{equation} \left(-\nabla_\perp^2 + \sum_s \mu_0 q_s^2 \int\mathcal{J} f_s\, d\v{w}\right) \pderiv{A_\parallel}{t} \notag = \mu_0 \sum_s q_s m_s \int v_\parallel \pderiv{(\mathcal{J}f_s)}{t}^\star\,d\v{w}. \label{ohmstar} \end{equation} To model collisions, the code uses a conservative Lenard--Bernstein (or Dougherty) operator \cite{Lenard1958plasma,Dougherty1964model,francisquez2020conservative}, \begin{eqnal} \label{eq:GkLBOEq} \mathcal{J}C[f_s] &= \nu\left\lbrace\pderiv{}{v_\parallel}\left[\left(v_\parallel - u_\parallel\right)\mathcal{J} f_s+v_{th,s}^2\pderiv{(\mathcal{J} f_s)}{v_\parallel}\right]\right.\\&\left.\quad +\pderiv{}{\mu}\left[2\mu \mathcal{J} f_s+2\mu\frac{m_s}{B}v_{th,s}^2\pderiv{(\mathcal{J} f_s)}{\mu}\right]\right\rbrace, \end{eqnal} where $n_s u_\parallel^2 = \int d\v{w} \mathcal{J}v_\parallel^2f_s$, $3 n_s v_{th,s}^2 = 2\int d\v{w} \mathcal{J}\mu Bf_s/m_s$, $n_s u_\parallel = \int d\v{w} \mathcal{J} v_\parallel f_s$, $n_s = \int d\v{w} \mathcal{J} f_s$, and $T_s = m_s v_{th,s}^2$. This collision operator contains the effects of drag and pitch-angle scattering, and it conserves number, momentum, and energy density. Consistent with the present long-wavelength treatment of the gyrokinetic system, FLR effects are ignored. In this work, both like-species and cross-species collisions among electrons and ions are included. The collision frequency $\nu$ is kept velocity-independent, i.e. $\nu\neq\nu(v)$. Further details about this collision operator, including its conservation properties and discretization, can be found in \cite{francisquez2020conservative}. To clarify the approximations undertaken in deriving the gyrokinetic model formulated above and its consequent effects on turbulent fields, the key assumptions are reviewed: The orderings in gyrokinetic theory that effectively reduce the full phase space's dimensionality are ${\omega}/{\Omega_s} \ll 1$ and $k_\perp/k_\parallel \gg 1$. These orderings express that the charged particle gyrofrequency ($\Omega_s = q_s B/m_s$) in a magnetic field is far greater than the characteristic frequencies of interest ($\omega$) with perpendicular wavenumbers ($k_\perp$) of Fourier modes being far larger than parallel wavenumbers ($k_\parallel$). Such properties are generally expected and observed for drift-wave turbulence in magnetically confined fusion plasmas where $\omega \ll \Omega_s$ \cite{Zweben_2007}. An additional “weak-flow” ordering \cite{Dimits_1992,Parra_Catto_2008,Dimits_2012} is applied where $v_{\bf E \times B}/v_{th,s} \approx k_\perp \rho_s q_s \phi/T_s \ll 1$ which allows for large amplitude perturbations. This approximation is also generally valid for electrons and deuterium ions in edge tokamak plasmas \cite{Belli_2018} as it assumes ${\bf E \times B}$ flows are far smaller than the thermal velocity, $v_{th,s}$, as observed in experiment \cite{blobs_review,Zweben_2015}. By constraining gradients of $\phi$ instead of $\phi$ itself, this weak-flow ordering simultaneously allows perturbations of order unity ($q_s \phi/T_s \sim 1$) at long wavelengths ($k_\perp \rho_s \ll 1$) and small perturbations ($q_s \phi/T_s \ll 1$) at short wavelengths ($k_\perp \rho_s \sim 1$) along with perturbations at intermediate scales. Alternatively, this approximation can be intuitively viewed as the potential energy variation around a gyro-orbit being small compared to the kinetic energy, $q_s\phi(\v{R} + {\bm \rho_s}) - q_s\phi(\v{R}) \approx q_s {\bm \rho_s} \cdot \nabla_\perp \phi \ll T_s$ \cite{mandell_thesis}. Here ${\bm \rho_s}$ is the gyroradius vector which points from the center of the gyro-orbit $\v{R}$ to the particle location $\v{x}$. To ensure consistency in the gyrokinetic model at higher order (although the guiding-centre limit is eventually taken in the continuum simulations, i.e. $k_\perp \rho_s \ll 1$), a strong-gradient ordering is also employed which assumes the background magnetic field varies slowly relative to edge profiles \cite{Zweben_2007}. As noted above, the long-wavelength limit is taken and variations of $\phi$ on the scale of the gyroradius is neglected. This yields guiding-center equations of motion which do not contain gyroaveraging operations. While extensions to a more complete gyrokinetic model are in progress, these contemporary modelling limitations are worth noting for the scope of the present results. In accordance with \cite{mandell_hakim_hammett_francisquez_2020}, the gyrokinetic turbulence is simulated on helical, open field lines as a rough model of the tokamak SOL at NSTX-like parameters. A field-aligned geometry \cite{beer1995field} is employed for numerical modelling whereby $x$ is the radial coordinate, $z$ is the coordinate parallel to the field lines, and $y$ is the binormal coordinate which labels field lines at constant $x$ and $z$. These coordinates map to physical cylindrical coordinates ($R,\varphi,Z)$ via $R=x$, $\varphi=(y/\sin\theta+z\cos\theta)/R_c$, $Z=z\sin\theta$. The field-line pitch $\sin\theta=B_v/B$ is taken to be constant, with $B_v$ the vertical component of the magnetic field (analogous to the poloidal field in tokamaks), and $B$ the total magnitude of the background magnetic field. The open field lines strike material walls at the top and bottom of the domain consistent with the simple magnetized torus configuration studied experimentally via devices such as the Helimak \cite{gentle2008} and TORPEX \cite{fasoli2006}. This system without magnetic shear contains unfavorable magnetic curvature producing the interchange instability that drives edge turbulence. There is no good curvature region to produce conventional ballooning-mode structure in the current setup. Further, $R_c=R_0+a$ is the radius of curvature at the centre of the simulation domain, with $R_0$ the major radius and $a$ the minor radius. This geometry is equivalent to the one in Chapter 2, with curvature operator \begin{equation} (\nabla\times\uv{b})\v{\cdot}\nabla f(x,y,z)\approx \left[(\nabla\times\uv{b})\v{\cdot} \nabla y\right]\pderiv{f}{y} =-\frac{1}{x}\pderiv{f}{y} \label{eq:GkCurv}, \end{equation} where $\v{B}=B_\text{axis}(R_0/R)\uv{e}_z$ in the last step and $B_\text{axis}$ is the magnetic field strength at the magnetic axis. This geometry represents a {flux-tube-like domain} on the outboard strictly bad curvature side that wraps helically around the torus and terminates on conducting plates at each end in $z$. {Note that although the simulation is on a flux-tube-like domain, it is not performed in the local limit commonly applied in $\delta f$ gyrokinetic codes; instead, the simulations are effectively global as they include radial variation of the magnetic field and kinetic profiles.} The simulation box is centred at $(x,y,z)=(R_c,0,0)$ with dimensions $L_x=56\rho_{i0}\approx 16.6$ cm, $L_y=100\rho_{i0}\approx 29.1$ cm, and $L_z=L_p/\sin\theta=8.0$ m, where $\rho_{i0} = \sqrt{m_i T_{i0}}/q_i B_0$ and $L_p=2.4$ m approximates the vertical height of the SOL. The velocity-space grid has extents $-4v_{th,s0}\leq v_\parallel \leq 4 v_{th,s0}$ and $0\leq\mu\leq6T_{s0}/B_0$, where $v_{th,s0}=\sqrt{T_{s0}/m_s}$ and $B_0=B_\text{axis}R_0/R_c$. The low-$\beta$ simulations presented here use piecewise-linear ($p=1$) basis functions, with $(N_x,N_y,N_z,N_{v_\parallel},N_\mu)=(32,64,16,10,5)$ the number of cells in each dimension. At high-$\beta$, due to the increased computational cost, the resolution is lowered to $(N_x,N_y,N_z,N_{v_\parallel},N_\mu)=(16,32,14,10,5)$. For $p=1$, one should double these numbers to obtain the equivalent number of grid points for comparison with standard grid-based gyrokinetic codes. The radial boundary conditions model conducting walls at the radial ends of the domain, given by the Dirichlet boundary condition $\phi=A_\parallel=0$. The condition $\phi=0$ effectively prevents ${\bf E \times B}$ flows into walls, while $A_\parallel=0$ makes it so that (perturbed) field lines never intersect the walls. For the latter, one can think of image currents in the conducting wall that mirror currents in the domain, resulting in exact cancellation of the perpendicular magnetic fluctuations at the wall. Also, the magnetic curvature and $\nabla B$ drifts do not have a radial component in this helical magnetic geometry. These boundary conditions on the fields are thus sufficient to guarantee that there is no flux of the distribution function into the radial walls. Conducting-sheath boundary conditions are applied in the $z$-direction \cite{shi2017gyrokinetic,shi2019full} to model the Debye sheath (the dynamics of which is beyond the gyrokinetic ordering), which partially reflects one species (typically electrons) and fully absorbs the other species depending on the sign of the sheath potential. This involves solving the gyrokinetic Poisson equation for $\phi$ at the $z$-boundary (i.e. sheath entrance), and using the resulting sheath potential to determine a cutoff velocity below which particles (typically low energy electrons) are reflected by the sheath. {Notably, this boundary condition allows current fluctuations in and out of the sheath. This differs from the standard logical sheath boundary condition \cite{parker1993suitable} which imposes zero net current to the sheath by assuming ion and electron currents at the sheath entrance are equal at all times.} The fields do not require a boundary condition in the $z$-direction since only perpendicular derivatives appear in the field equations. The simulations are carried out in a sheath-limited regime but there can be electrical disconnection from the plasma sheath if the Alfv\'en speed is slow enough. Periodic boundary conditions are used in the $y$-direction. The simulation parameters roughly approximate an H-mode deuterium plasma in the NSTX SOL: $B_\text{axis}=0.5$ T, $R_0=0.85$ m, $a=0.5$ m, $T_{e0}=T_{i0}=40$ eV. To model particles and heat from the core crossing the separatrix, a non-drifting Maxwellian source of ions and electrons is applied, \begin{equation} S_{s} = \frac{n_S(x,z)}{(2\pi T_S/m_{s})^{3/2}}\exp\left(-\frac{m_{s} v^2}{2 T_S}\right), \end{equation} with source temperature $T_{S}=70$ eV for both species and $v^2 = v_\parallel^2 + 2 \mu B/m_s$. The source density is given by \begin{equation} n_S(x,z) = \begin{cases} S_0\exp\left(\frac{-(x-x_S)^2}{(2\lambda_S)^2}\right)\qquad \qquad &|z|<L_z/4\\ 0 \qquad &\mathrm{otherwise} \end{cases} \end{equation} so that $x_S-3\lambda_S < x < x_S+3\lambda_S$ delimits the source region, and the code sets $x_S=1.3$ m and $\lambda_S=0.005$ m. This localized particle source structure in $z$-space results in plasma ballooning out largely in the centre of the magnetic field line. The source particle rate $S_0$ is chosen so that the total (ion plus electron) source power matches the desired power into the simulation domain, $P_\mathrm{src}$. Since \texttt{Gkeyll} simulates a flux-tube-like fraction of the whole SOL domain, $P_\mathrm{src}$ is related to the total SOL power, $P_\mathrm{SOL}$, by $P_\mathrm{src} = P_\mathrm{SOL}L_y L_z/(2\pi R_c L_\mathrm{pol})\approx0.115 P_\mathrm{SOL}$. Amplitudes are adjusted to approximate $P_\mathrm{SOL}=5.4$ MW crossing into these open flux surfaces at low-$\beta$ conditions relevant to NSTX \cite{Zweben_2015}. An artificially elevated density case with $P_\mathrm{SOL}=54.0$ MW is also tested to study edge turbulence at high-$\beta$. The collision frequency is comparable in magnitude to the inverse autocorrelation time of electron density fluctuations at low-$\beta$. For the high-$\beta$ case, $\nu$ is found to be about $10 \times$ larger, and the plasma thus sits in a strongly collisional regime. Simulations reach a quasi-steady state with the sources balanced by end losses to the sheath, although there is no neutral recycling included yet which is a focus of ongoing work \cite{bernard2020a}. Unlike in \cite{shi2019full}, no numerical heating nor source floors are applied in the algorithm to ensure positivity. In summary, the full-$f$ nonlinear electromagnetic gyrokinetic turbulence simulations of the NSTX plasma boundary region employ the lowest-order, i.e. guiding-center or drift-kinetic limit, of the system. Implementing gyroaveraging effects given by the next order terms in advanced geometries is the focus of future work \cite{noah_private}. These present approximations in modern full-$f$ global gyrokinetic simulations should be kept in mind when attributing any similarities or differences to two-fluid theory in the next sections since the gyrokinetic formulation can itself be improved. The turbulence simulations presented are thus a reflection of the current forefront of numerical modelling. A full exposition of the derivation and benchmarking including the energy-conserving discontinuous Galerkin scheme applied in \texttt{Gkeyll} for the discretization of the gyrokinetic system in 5-dimensional phase space along with explicit time-stepping and avoidance of the Amp\`ere cancellation problem is found in \cite{mandell_thesis}. \section{\label{sec:level3.2}Machine learning fluid theory (again)} A vital goal in computational plasma physics is determining the minimal complexity necessary in a theory to sufficiently represent observations of interest for predictive fusion reactor simulations. Convection-diffusion equations with effective mean transport coefficients are widely utilized \cite{Reiter_1991,SOLPS_DEKEYSER2019125} but insufficient in capturing edge plasma turbulence where scale separation between the equilibrium and fluctuations is not justified \cite{NAULIN2007,mandell_thesis}. Other reduced models such as classical magnetohydrodynamics are unable to resolve electron and ion temperature dynamics with differing energy transport mechanisms in the edge \cite{TeTi_2008,TeTi_2009,TeTi_2016}. Following the framework set forth in Chapter 2 (with few small differences noted here), Chapter 3 considers the widely used first-principles-based two-fluid drift-reduced Braginskii equations \cite{Braginskii1965RvPP,francisquez_thesis} in the electrostatic limit relevant to low-$\beta$ conditions in the edge of fusion experiments \cite{Zweben_2015} for comparison to gyrokinetic modelling \cite{mandell_hakim_hammett_francisquez_2020}. Drift-reduced Braginskii theory is also a full-$f$ \cite{Belli_2008,Full-F,Held_2020} nonlinear model but evaluated in the fluid limit. To align coordinates with the gyrokinetic plasma, one adjustment here is that $\v{b_0} = +{\bf \hat{z}}$ instead of $\v{b_0} = -{\bf \hat{z}}$ as in Chapter 2. The 3-dimensional shearless field-aligned coordinate system over which the fluid equations are formulated in the physics-informed machine learning framework thus exactly matches the gyrokinetic code's geometry. To consistently calculate the electric field response and integrate \eqref{eq:nDotGDBH}--\eqref{eq:TiDotGDBH} in time, classically one would compute the turbulent $\phi$ in drift-reduced Braginskii theory by directly invoking quasineutrality and numerically solving the boundary value problem given by the divergence-free condition of the electric current density \cite{DRB_consistency3,Zholobenko_2021}. For the purposes of comparison with gyrokinetic modelling, this novel technique can compute the turbulent electric field consistent with the drift-reduced Braginskii equations without explicitly evaluating $\nabla \cdot \v{j} = 0$ nor directly applying the Boussinesq approximation. Namely, this work applies the validated physics-informed deep learning framework from Chapter 2 to infer the gauge-invariant $\phi$ directly from \eqref{eq:nDotGDBH} and \eqref{eq:TeDotGDBH} for direct analysis of electron pressure and electric field fluctuations in nonlinear global electromagnetic gyrokinetic simulations and electrostatic two-fluid theory. The only existing requirement on the observational data in this deep learning framework is that the measurements' spatial and temporal resolutions should be be finer than the autocorrelation length and time, respectively, of the turbulence structures being analyzed. This scale condition is well-satisfied for the low-$\beta$ case and marginally-satisfied for the high-$\beta$ data analyzed. The set of collocation points over which the partial differential equations are evaluated correspond to the positions of the observed electron pressure data, i.e. $\lbrace x_0^i,y_0^i,z_0^i,t_0^i\rbrace^{N_0}_{i=1} = \lbrace x_f^i,y_f^i,z_f^i,t_f^i\rbrace^{N_f}_{i=1}$ once again. One difference is that loss functions are optimized with mini-batch sampling using $N_0 = N_f = 1000$ using just L-BFGS \cite{10.5555/3112655.3112866} for 20 hours over 32 cores on Intel Haswell-EP processors. The only locally observed dynamical quantities in these equations are 2-dimensional views of $n_e$ and $T_e$ (to emulate gas puff imaging \cite{mathews2022deep}) without any explicit information about boundary conditions nor initializations nor ion temperature dynamics nor parallel flows. The collocation grid consists of a continuous spatiotemporal domain without time-stepping nor finite difference schema in contrast with standard numerical codes. All analytic terms encoded in these equations including high-order operators are computed exactly by the neural networks without discretization. In that sense, it is a potentially higher fidelity continuous representation of the continuum equations. While the linearized polarization density---analogous to the Boussinesq approximation---is employed in the gyrokinetic simulations, no such approximations are explicitly applied by the neural networks. With the availability of measurements often sparse in fusion experiments, designing diagnostic techniques for validating turbulence theories with limited information is important. On this point, it is noteworthy that this framework can potentially be adapted to experimental measurements of electron density and temperature \cite{griener_continuous_2020,Bowman_2020,Mathews2020,mathews2022deep}. To handle the particular case of 2-dimensional turbulence data, one essentially assumes slow variation of dynamics in the $z$-coordinate and effectively set all parallel derivatives to zero. In computational theory comparisons where no such limitations exist, training on $n_e$ and $T_e$ in 3-dimensional space over long macroscopic timescales can be easily performed via segmentation of the domain and parallelization, but a limited spatial view away from numerical boundaries with reduced dimensionality is taken to mirror experimental conditions for field-aligned observations \cite{Zweben_2017,mathews2022deep} and fundamentally test what information is indispensable to compare kinetic and fluid turbulence. To compare the gyrokinetic and two-fluid theories as directly as possible, the toroidal simulations are analyzed at $z = L_z/3$ where no applied sources are present. Further, beyond the inclusion of appropriate collisional drifts and sources, this technique is generalizable to boundary plasmas with multiple ions and impurities present due to the quasi-neutrality assumptions underlying the two-fluid theory \cite{multi_species}. \section{\label{sec:level3.3}Quantifying plasma turbulence consistency} A defining characteristic of a nonlinear theory is how it mathematically connects dynamical variables. The focus of this work is quantitatively examining the nonlinear relationship extant in plasma turbulence models between electron pressure and electric field fluctuations. As outlined in Section \ref{sec:level3.2}, using a custom physics-informed deep learning framework whereby the drift-reduced Braginskii equations are embedded in the neural networks via constraints in the form of implicit partial differential equations, this thesis demonstrates the first ever direct comparisons of instantaneous turbulent fields between electrostatic two-fluid theory and electromagnetic long-wavelength gyrokinetic modelling in low-$\beta$ helical plasmas with results visualized in Figure \ref{PlasmaPINN_lowbeta}. This multi-network physics-informed deep learning framework enables direct comparison of drift-reduced Braginskii theory with gyrokinetics and bypasses demanding limitations in standard forward modelling numerical codes which must precisely align initial conditions, physical sources, numerical diffusion, and boundary constraints (e.g. particle and heat fluxes into walls) in both gyrokinetic and fluid representations when classically attempting comparisons of turbulence simulations and statistics. Further, the theoretical and numerical conservation properties of these simulations ordinarily need to be evaluated which can be a significant challenge especially when employing disparate numerical methods with differing discretization schema and integration accuracy altogether \cite{francisquez2020fluid}. This framework overcomes these hurdles by training on partial electron pressure observations simultaneously with the plasma theory sought for comparison. Figure \ref{PlasmaPINN_lowbeta} specifically shows that the turbulent electric field predicted by drift-reduced Braginskii two-fluid theory is largely consistent with long-wavelength gyrokinetic modelling in low-$\beta$ helical plasmas. The consistency is also evident if analyzing $y$-averaged radial electric field fluctuations and accounting for the inherent scatter ($\sigma_{PINN}$) from the stochastic optimization employed as displayed in Figure \ref{PlasmaPINN_lowbeta_avg}. To clarify the origins of $\sigma_{PINN}$, every time this physics-informed deep learning framework is trained from scratch against the electron pressure observations, the learned turbulent electric field will be slightly different due to the random initialization of weights and biases for the networks along with mini-batch sampling during training. To account for this stochasticity, the framework is trained anew 100 times while collecting the predicted turbulent $E_r$ after each optimization. the quantity $\sigma_{PINN}$ corresponds to the standard deviation from this collection. The two-fluid model's results displayed in Figure \ref{PlasmaPINN_lowbeta_avg} are thus based upon computing $\langle E_r\rangle_y$ from 100 independently-trained physics-informed machine learning frameworks. Their turbulent outputs are averaged together to produce the mean, while the scatter inherently associated with the 100 realizations---which approximately follows a normal distribution---comprises the shaded uncertainty interval spanning 2 standard deviations. As visualized, the $\langle E_r\rangle_y$ profiles predicted by the the electromagnetic gyrokinetic simulation and electrostatic drift-reduced Braginskii model are generally in agreement within error bounds at low-$\beta$. \begin{figure*}[ht] \includegraphics[width=1.0\linewidth]{templates/Fig1_EM_low_beta_GKvDRB_avg_div.png} \caption{\label{PlasmaPINN_lowbeta}The turbulent electric potential, $\phi$ (a gauge-invariant quantity which is equivalent up to a scalar constant offset), and radial electric field, $E_r$, concomitant with electron pressure fluctuations as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling in low-$\beta$ conditions are in good quantitative agreement. The two-fluid theory's $\phi$ and $E_r$ are based upon the training the physics-informed deep learning framework while the gyrokinetic results are from the discontinuous Galerkin numerical solver.} \end{figure*} \begin{figure}[ht] \includegraphics[width=0.9\linewidth]{templates/Fig2_lowbetaEM_avgEry_vs_x.png} \caption{\label{PlasmaPINN_lowbeta_avg}The $y$-averaged turbulent radial electric field, $\langle E_r\rangle_y$, as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling at low-$\beta$. The results plotted for the drift-reduced Braginskii output here are based upon collecting 100 independently-trained physics-informed neural networks.} \end{figure} \begin{figure*}[ht] \includegraphics[width=1.0\linewidth]{templates/Fig3_EM_high_beta_GKvDRB_avg_div.png} \caption{\label{PlasmaPINN_highbeta}The turbulent electric potential, $\phi$ (a gauge-invariant quantity which is equivalent up to a scalar constant offset), and radial electric field, $E_r$, concomitant with electron pressure fluctuations as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling in high-$\beta$ conditions are quantitatively inconsistent. The two-fluid theory's $\phi$ and $E_r$ are based upon the training of the physics-informed deep learning framework while the gyrokinetic results are from the discontinuous Galerkin numerical solver.} \end{figure*} \begin{figure}[ht] \includegraphics[width=0.9\linewidth]{templates/Fig4_highbetaES_avgEry_vs_x1.png} \caption{\label{PlasmaPINN_highbeta_avg}The $y$-averaged turbulent radial electric field, $\langle E_r\rangle_y$, as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling at high-$\beta$. The results plotted for the drift-reduced Braginskii output here are based upon collecting 100 independently-trained physics-informed neural networks.} \end{figure} In high-$\beta$ conditions where the particle source is artificially increased by 10$\times$, electromagnetic effects become important and the electrostatic two-fluid theory is inconsistent with electromagnetic gyrokinetic simulations as displayed by Figure \ref{PlasmaPINN_highbeta}. As remarked above, multiple realizations are conducted to analyze the sample statistics of the learned turbulent fields consistent with drift-reduced Braginskii two-fluid theory based solely upon the intrinsic scatter during training to account for the stochastic nature of the optimization. By collecting 100 independently-trained realizations, the uncertainty linked to this intrinsic scatter can be evaluated as demonstrated in Figure \ref{PlasmaPINN_highbeta_avg}. These discrepancies indicate that fluctuations in $\bf B_\perp$, which are evaluated by solving the parallel Amp\`ere equation (or, equivalently, generalized Ohm's law), cannot be neglected when considering plasma transport across the inhomogeneous background magnetic field as in electrostatic theory. While the fluid approximation is generally expected to be increasingly accurate at high density due to strong coupling between electrons and ions, these results underline the importance of electromagnetic effects even in shear-free high-$\beta$ plasmas as found in planetary magnetospheres and fusion experiments (e.g. dipole confinement \cite{LDX-experiment}), and for the first time enables the degree of error between instantaneous fluctuations to be precisely quantified across turbulence models. Uncertainty estimates stemming from the stochastic framework in both regimes are reflected in Figure \ref{PlasmaPINN_inst_err}. One should note that there are novel and different levels of errors to be mindful of in this evaluation. For example, poor convergence arising from nonuniqueness of the turbulent $E_r$ found during optimization against the drift-reduced Braginskii equations, or $\mathcal{L}_{f_{n_e}}$ and $\mathcal{L}_{f_{T_e}}$ remaining non-zero (and not below machine precision) even after training \cite{Mathews2021PRE}. These potential errors exist on top of standard approximations in the discontinuous Galerkin numerical scheme representing the underlying gyrokinetic theory such as the implemented Dougherty collision operator. Notwithstanding, when comparing the electrostatic drift-reduced Braginskii theory to electromagnetic long-wavelength gyrokinetic simulations at low-$\beta$, the results represent good consistency in the turbulent electric field and all observed discrepancies are mostly within the stochastic optimization's expected underlying scatter. Alternatively, when analyzing high-$\beta$ conditions, it is observed that the electrostatic two-fluid model cannot explain the turbulent electric field in the electromagnetic gyrokinetic simulations. In particular, $\Delta E_r \gtrsim 15\sigma_{PINN}$ in the bottom plot of Figure \ref{PlasmaPINN_inst_err}, where $\Delta E_r$ is the difference in the instantaneous $E_r$ predicted by two-fluid theory and gyrokinetics. This signals that the two sets of turbulent $E_r$ fluctuations are incompatible at high-$\beta$ conditions and precisely quantifies the separation in the models' predictions. \begin{figure} \includegraphics[width=1.0\linewidth]{templates/Fig5_relative_Er_error_norm_GKvDRB_merged_horizontal.png} \caption{\label{PlasmaPINN_inst_err}The relative error in the instantaneous radial electric field fluctuations ($\Delta E_r / \sigma_{PINN}$) between electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetic modelling is displayed in low-$\beta$ (top) and high-$\beta$ (bottom) conditions. While all errors in the low-$\beta$ scenario are generally within approximately 3--4 standard deviations and representative of mostly good quantitative agreement, one must go to over $15\sigma_{PINN}$ to fully account for the turbulent fields using an electrostatic two-fluid theory at $\beta_e \sim 2\%$. The results are based upon collecting 100 independently-trained physics-informed neural networks to compute the turbulent $E_r$ and the intrinsic scatter in these predictions.} \end{figure} Our multi-network physics-informed deep learning framework demonstrates the suitability of electrostatic two-fluid theory as a good approximation of turbulent electric fields in modern gyrokinetic simulations for low-$\beta$ helical plasmas with sufficient initial and boundary conditions. Conversely, the electrostatic turbulence model is demonstrably insufficient for high-$\beta$ plasmas. This finding is indicative of the importance of including electromagnetic effects such as magnetic flutter in determining cross-field transport even at $\beta_e \sim 2\%$. But field line perturbations and the reduced numerical representation of gyrokinetic theory are not the only effects at play causing mismatch at high-$\beta$: due to the nature of the strong localized particle source in $z$-space to produce high-$\beta$ conditions, parallel dynamics including electron flows along field lines and Ohmic heating effects become increasingly important. These variables should now be observed or learnt first from the 2-dimensional electron pressure measurements to accurately reconstruct the turbulent electric field which signifies a departure from the expected low-$\beta$ edge of tokamaks. Going forward, consideration of advanced magnetic geometries with squeezing and shearing of fusion plasmas near null-points, which may even couple-decouple upstream turbulence in tokamaks, will be important in the global validation of reduced turbulence models with realistic shaping \cite{Ryutov_geometry,Kuang2018APS,kuang_thesis,Nespoli_2020,Myra_2020}. Also, while there is good convergence in the low-$\beta$ gyrokinetic simulations at parameters relevant to the edge of NSTX, numerical convergence in the artificially elevated high-$\beta$ case is currently questionable and a potential source of discrepancy. Running the high-$\beta$ gyrokinetic simulation with proper collision frequency at an improved resolution of $(N_x,N_y,N_z,N_{v_\parallel},N_\mu)=(48,96,18,10,5)$ would cost $\sim$4 million CPU-hours to check and such investigations are left for the future. As for distinctiveness, the techniques used for computing the displayed turbulent electric fields in the two cases are markedly different. In particular, the long-wavelength gyrokinetic Poisson equation, which is originally derived from the divergence-free condition of the electric current density, is employed in the gyrokinetic simulations. In contrast, simply the electron fluid evolution equations are used to infer the unknown turbulent field fluctuations consistent with drift-reduced Braginskii theory \cite{Mathews2021PRE}. A principle underlying these models is quasineutrality, but this condition is not sufficient on its own. If one were to apply equilibrium models such as the Boltzmann relation or simple ion pressure balance as expected neoclassically, the turbulent electric field estimates for these nonequilibrium plasmas with nontrivial cross-field transport would be highly inaccurate as in Chapter 2. Further, no external knowledge of boundary conditions such as sheath effects are explicitly provided to the physics-informed deep learning framework, but this information implicitly propagates from the walls into the observations of electron pressure. This novel approach resultantly permits using limited 2D measurements to compare a global 3D fluid turbulence model directly against 5D gyrokinetics beyond statistical considerations for characterizing non-diffusive intermittent edge transport \cite{NAULIN2007}. All in all, the agreement between drift-reduced Braginskii theory and gyrokinetics supports its usage for predicting turbulent transport in low-$\beta$ shearless toroidal plasmas, but an analysis of all dynamical variables is required for the full validation of drift-reduced Braginskii theory. Alternatively, when 2-dimensional experimental electron density and temperature measurements are available \cite{Furno2008,mathews2022deep}, this technique can be used to infer $E_r$ and the resulting structure of turbulent fluxes heading downstream. \section{\label{sec:level3.4}Conclusion} To probe the fundamental question of how similar two distinct turbulence models truly are, using a novel technique to analyze electron pressure fluctuations, this chapter has directly demonstrated that there is good agreement in the turbulent electric fields predicted by electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetic simulations in low-$\beta$ helical plasmas. At $\beta_e \sim 2\%$, the 2-dimensional electrostatic nature of the utilized fluid theory becomes insufficient to explain the microinstability-induced particle and heat transport. Overall, by analyzing the interconnection between dynamical variables in these global full-$f$ models, physics-informed deep learning can quantitatively examine this defining nonlinear characteristic of turbulent physics. In particular, one can now unambiguously discern when agreement exists between multi-field turbulence theories and identify disagreement when incompatibilities exist with just 2-dimensional electron pressure measurements. This machine learning tool can therefore act as a necessary condition to diagnose when reduced turbulence models are unsuitable, or, conversely, iteratively construct and test theories till agreement is found with observations. While this work focuses on the electric field response to electron pressure, extending the analysis to all dynamical variables (e.g. $T_i, \vpe, \vpi$) for full validation of reduced multi-field turbulence models in a variety of regimes (e.g. collisionality, $\beta$, closed flux surfaces with sheared magnetic field lines) using electromagnetic fluid theory is the subject of future work. Also, since plasma fluctuations can now be directly compared across models, as gyrokinetic codes begin including fully kinetic neutrals, this optimization technique can help validate reduced source models to accurately account for atomic and molecular interactions with plasma turbulence in the edge of fusion reactors \cite{Thrysoe_2018,Thrysoe_2020} since these processes (e.g. ionization, recombination) affect the local electric field. Further progress in the gyrokinetic simulations such as the improved treatment of gyro-averaging effects \cite{brizard2007foundations}, collision operators \cite{francisquez2020conservative}, and advanced geometries \cite{mandell_thesis} will enable better testing and discovery of hybrid reduced theories as well \cite{zhu2021drift}. For example, in diverted reactor configurations, electromagnetic effects become increasingly important for transport near X-points where $\beta_{p} \rightarrow \infty$. A breakdown of Alfv\'{e}n's theorem in these regions can also arise due to the impact of Coulomb collisions and magnetic shear contributing to an enhanced perpendicular resistivity \cite{Myra-X-point} which presents an important test case of non-ideal effects within reduced turbulence models. While this work supports the usage of electrostatic two-fluid modelling, with adequate initial and boundary conditions, over long-wavelength gyrokinetics for low-$\beta$ magnetized plasmas without magnetic shear, a comparison of all dynamical variables beyond the turbulent electric field is required for a full validation of the reduced model. Further investigations into reactor conditions may suggest the modularization of individually validated fluid-kinetic turbulence models across different regions in integrated global device modelling efforts \cite{hakim2019discontinuous,Merlo2021_XGC_GENE}. This task can now be efficiently tackled through pathways in deep learning as demonstrated by this new class of validation techniques. In addition, precisely understanding the fundamental factors--both physical and numerical--determining the prediction interval, $\sigma_{PINN}$, is the subject of ongoing research in analyzing the nature (e.g. uniqueness, smoothness) of chaotic solutions to fluid turbulence equations and the chaotic convergence properties of physics-informed neural networks. \chapter{Plasma and neutral fluctuations from gas puff turbulence imaging in the SOL of Alcator C-Mod} \setlength{\epigraphwidth}{0.85\textwidth} \epigraph{Melody and harmony are like lines and colors in pictures. A simple linear picture may be completely beautiful; the introduction of color may make it vague and insignificant. Yet color may, by combination with lines, create great pictures, so long as it does not smother and destroy their value.}{Rabindranath Tagore, interviewed by Albert Einstein} Diagnosing edge plasmas is an essential task towards testing turbulence models and better understanding plasma fueling and confinement in fusion devices. Gas puff imaging (GPI) of turbulence is a widely applied experimental diagnostic that captures line emission based upon the interaction of neutrals with the hot plasma. As a technique with decades of application in a range of settings \cite{Zweben_2017}, optical imaging of fluctuations provides a view of plasma turbulence. This transport is critical to the operation and energy gain of nuclear fusion reactors, but interpretation (e.g. velocimetry \cite{velocimetry_GPI}) of these fluctuations to directly test reduced physics models is not always straightforward. By tracing the atomic theory underlying the nonlinear dynamics of observed HeI line emission, this chapter outlines a novel spectroscopic method for quantifying the 2-dimensional electron pressure and neutral dynamics on turbulent scales based upon high-resolution visible imaging. This framework is independent of the previous chapters, but will begin enabling the physics-informed deep learning techniques of Chapters 2 and 3 to be translated into experiment. The plasma edge in magnetic fusion devices is characterized by neighbouring regions: confined plasmas where temperatures can exceed 10$^{6}\text{ K}$, and the colder SOL where gaseous particles may not be completely ionized. These regions exist tightly coupled to one another and inseparable in many respects. Consequently, accounting for neutral transport in conjunction with ion and electron turbulence is essential in wholly analyzing boundary plasma fluctuations. Edge turbulence is characterized by a broadband spectrum with perturbation amplitudes of order unity and frequencies ranging up to 1 MHz. Edge localized modes and intermittent coherent structures convecting across open field lines can be responsible for significant particle losses and plasma-wall interactions that strongly influence operations. To model the vast dynamical scales present in fusion plasmas accordingly requires sufficiently complex modelling techniques. This chapter introduces custom neural architectures within a multi-network deep learning framework that bounds outputs to abide by collisional radiative theory \cite{Fujimoto1979ACM,GOTO_2003} and searches for solutions consistent with continuity constraints on neutral transport \cite{Wersal_2017}. Learning nonlinear physics via optimization in this way provides a new way to examine edge turbulence using 587.6 nm line emission observed by GPI. While the methodology is not fixed to any device, this chapter focuses on 2-dimensional experimental brightness measurements from open flux surfaces on the Alcator C-Mod tokamak \cite{Hutch_CMod, Alcator_Greenwald}, where a good signal-to-noise ratio is found. The validation techniques outlined in Chapters 2 and 3 emphasize the importance of comprehensive diagnostic coverage of electron dynamics on turbulent spatial and temporal scales. To this end, this chapter describes the first calculations of the 2-dimensional turbulent electron density, electron temperature, and neutral density that self-consistently include fluctuation-induced ionization using only observations of the 587.6 nm line via fast camera imaging. This novel turbulence diagnostic analysis paves new ways in systematically measuring edge plasma and neutral fluctuations. To demonstrate this framework, the present chapter evaluates the validity of collisional radiative theory in conditions relevant to fusion plasmas for atomic helium line emission in Section \ref{sec:level4.1}, overviews the experimental setup for GPI on the Alcator C-Mod tokamak in \ref{sec:level4.2}, outlines a custom physics-informed machine learning optimization technique designed for turbulence imaging in Section \ref{sec:level4.3}, presents results from the analysis applied to experimental fast camera data in section \ref{sec:level4.4}, and concludes with a summary and future outlook in Section \ref{sec:level4.5}. \section{\label{sec:level4.1}Time-dependent analysis of quantum states in atomic helium} The electronic transition from $3^3 D$ to $2^3 P$ quantum states in atomic helium results in photon emission with a rest frame wavelength of 587.6 nm. Atomic physics modelling of this line radiation in a plasma correspondingly requires tracking all relevant electron transition pathways that can populate or depopulate $3^3 D$ \cite{Fujimoto1979ACM,GOTO_2003}. The starting point in this analysis is to consider the full rate equations where a quantum state $p$ follows \begin{eqnal}\label{eq:full_rate_eqn} \frac{dn(p)}{dt} &= \sum\limits_{q \neq p} \lbrace {C(q,p)n_e + A(q,p)} \rbrace n(q) \\&- \lbrace {\sum\limits_{q \neq p} C(p,q)n_e + \sum\limits_{q < p} A(p,q)} + {S(p)n_e }\rbrace n(p) \\&+ \lbrace {\alpha(p)n_e + \beta(p) + \beta_d(p)} \rbrace n_i n_e, \end{eqnal} \noindent where $n(p)$ is the population density of the $p = n^{2S + 1} L$ state, in which $n$ is the principal quantum number, $S$ is the spin, and $L$ is the orbital angular momentum quantum number. The notation $q < p$ indicates that the quantum state $q$ lies energetically below $p$. Eq. \eqref{eq:full_rate_eqn} includes the spontaneous transition probability from $p$ to $q$ given by the Einstein A coefficient $A(p,q)$, electron impact transitions $C(p,q)$, electron impact ionization $S(p)$, three-body recombination $\alpha(p)$, radiative recombination $\beta(p)$, and dielectronic recombination $\beta_q(p)$, with $n_e$ and $n_i$ denoting the electron density and hydrogen-like He$^+$ density, respectively. All aforementioned rate coefficients except $A(p,q)$ have a dependence on the electron temperature ($T_e$) that arises from averaging cross-sections over a Maxwellian velocity distribution for electrons, which are based upon calculations with the convergent close-coupling (CCC) \cite{CCC1,CCC2,CCC3} and R-matrix with pseudostates (RMPS) \cite{RMPS} methods using high precision calculations of helium wavefunctions \cite{Drake1,Drake2}. The numerical framework applied follows \cite{GOTO_2003,Zholobenko_thesis} to model atomic helium with a corresponding energy level diagram visualized in Figure \ref{HeI_states}. Quantum states with $L \leq 2$ are resolved for $n < 8$ while states with $L \geq 3$ are bundled together into a single level denoted as ``$F+$''. For $n \geq 8$, $L$ is not resolved, while those with $n \geq 11$ are approximated as hydrogenic levels with statistical weights twice those of hydrogen. All energy levels up to $n=26$ are included with $n \geq 21$ being given by the Saha-Boltzmann equilibrium \cite{McWhirter_1963,Fujimoto1979ACM,Zholobenko_thesis}. For application in magnetized plasmas (e.g. tokamaks), where rate coefficients vary with magnetic field strength due to wavefunction mixing, spin-orbit interactions are included to account for mixing between the singlet and triplet fine structure levels \cite{GOTO_2003,Zholobenko_thesis}. Finite magnetic fields largely influence the modelling of metastable species and higher orbital quantum numbers \cite{Zholobenko_2021_validation}. To quantify radiation trapping effects, the dimensionless optical depth for a Doppler-broadened line transition between states $j \rightarrow k$ can be expressed as \cite{Huba2013} \begin{eqnal}\label{eq:optical_depth} \tau_{j \rightarrow k} = 5.4 \times 10^{-3} f_{j \rightarrow k} \lambda_{j \rightarrow k} n_j (\mu_j/T_j)^{\frac{1}{2}} L \end{eqnal} \noindent where $f_{j \rightarrow k}$ is the absorption oscillator strength, $\lambda_{jk} \ [\text{nm}]$ is the line center wavelength, $\mu_j$ is the mass ratio of the emitting species relative to a proton, $L \ [\text{cm}]$ is the physical depth of the gas along the viewing chord, and $n_j \ [10^{13} \ \text{cm}^{-3}]$ and $T_j \ [\text{eV}]$ are the density and temperature, respectively, of particles in state $j$. For 587.6 nm HeI line emission in conditions relevant to magnetic confinement fusion devices, where $f_{2^3P \rightarrow 3^3D} \sim 0.6$ \cite{HeI_coeff}, $\tau_{2^3P \rightarrow 3^3D} \ll 1$. This.results in the edge being optically thin for spectroscopic analysis of a localized gas puff \cite{Zholobenko_thesis,Zweben_2017}. \begin{figure}[ht] \centering \includegraphics[width=0.65\linewidth]{templates/HeI-quantum-states.png} \caption{\label{HeI_states} Energy level diagram for atomic helium considered in the calculations. An arrow connects $3^3D \rightarrow 2^3P$, which is the origin of the 587.6 nm photon emission. The labels $^{1,3}F+$ denote the quantum states representing all levels with $L \geq 3$. Figure reprinted from \cite{GOTO_2003} with permission from Elsevier.} \end{figure} The rate equations \eqref{eq:full_rate_eqn} for an optically thin plasma can be equivalently expressed in matrix form as \cite{STOTLER_2007,Zholobenko_thesis} \begin{eqnal}\label{eq:matrix_full_rate_eqn} \frac{d{\bf{n}}}{dt} = {\bf{M}}(n_e,T_e) {\bf{n}} + {\bf{\Gamma}}(n_e,T_e,n_i) \end{eqnal} \noindent where ${\bf{n}}$ is a vector of the $N$ atomic states, ${\bf{M}}$ represents the $N \times N$ matrix of rates for collisional ionization, excitation, de-excitation, radiative decay, and recombination as above, and ${\bf{\Gamma}}$ symbolizes sources. Since time-evolving every state in atomic helium is computationally expensive, effective atomic physics models known as collisional radiative (CR) theories are often constructed. This involves separating the $N$ states into $P$ and $Q$ spaces of sizes $N_P$ and $N_Q$, respectively, such that \eqref{eq:matrix_full_rate_eqn} becomes \begin{eqnal}\label{eq:matrix_P_Q} \frac{d}{dt} \begin{bmatrix} {\bf n_{P}} \\ {\bf n_{Q}} \end{bmatrix} = \begin{bmatrix} {\bf M_{P}} & {\bf M_{PQ}} \\ {\bf M_{QP}} & {\bf M_{Q}} \end{bmatrix} \begin{bmatrix} {\bf n_{P}} \\ {\bf n_{Q}} \end{bmatrix} + \begin{bmatrix} {\bf \Gamma_{P}} \\ {\bf \Gamma_{Q}} \end{bmatrix} = \begin{bmatrix} {\frac{d \bf n_{P}}{dt}} \\ {0} \end{bmatrix} \end{eqnal} Here the $Q$ space is assumed to be time-independent, under the expectation that they evolve on timescales faster than those of plasma turbulence fluctuations, this allows one to fold the dynamics of the $Q$ space into effective rates which depend upon $\bf n_P$. This can be written as \begin{eqnal}\label{eq:Qspace} {\bf n_{Q}} = - {\bf M_{Q}}^{-1}(\bf M_{QP} n_P + \bf \Gamma_{Q}) \end{eqnal} \begin{eqnal}\label{eq:Pspace} \frac{d}{dt}{\bf n_{P}} &= (\bf M_{P} - M_{PQ}M_Q^{-1}M_{QP})n_P - {\bf M_{PQ}M_Q^{-1}\Gamma_{Q}} + {\bf \Gamma_{P}} \\ &= {{\bf M}_{\text{eff}}}{\bf n_P} + {{\bf \Gamma}_{\text{eff}}} \end{eqnal} But the applicability of such a separation in dynamical space needs to be quantitatively tested. In particular, for the constructed CR model to be applicable, it should satisfy Greenland's criteria \cite{Greenland_CR,Greenland_full,STOTLER_2007}, which requires evaluating the normalized eigenvalues and eigenvectors of ${\bf M}(n_e,T_e)$. The $N$ eigenvectors are arranged as the columns of an $N \times N$ matrix $\bf T$, in order of increasing eigenvalue, $\lambda$, and can be partitioned into 4 submatrices: \begin{eqnal}\label{eq:Tspace} {\bf T} = \begin{bmatrix} {\bf T_{P}} & {\bf T_{PQ}} \\ {\bf T_{QP}} & {\bf T_{Q}} \end{bmatrix} \end{eqnal} In terms of these quantities, Greenland's criteria require that (i) $\lvert \lvert {\bf T_{QP}} \rvert \rvert \ll 1$ and (ii) $\lvert \lvert {\bf T_{QP}} {\bf T_{P}^{-1}} \rvert \rvert \ll 1$. From this point onwards, an $N_P = 1$ CR model is adopted where the $P$ space consists of only the ground state for atomic helium being dynamically evolved. In this formulation, meta-stable species (e.g. $2^1S$, $2^3S$) are taken to be in steady state. Greenland's criteria for the $N_P = 1$ CR theory were previously examined in a range of conditions relevant to fusion plasmas and found to widely satisfy (i) and (ii) \cite{STOTLER_2007}, but there is an additional unresolved practical condition: (iii) the shortest timescales over which $P$ space states are evolved should be larger than the inverse of the smallest $Q$ space eigenvalue, i.e. $\frac{\partial}{\partial t} < \lvert \lambda_Q \rvert$. In more concrete terms, phenomena on timescales faster than $\tau_Q \equiv 1/\lvert \lambda_Q \rvert$ are not resolved. As a result, $\tau_Q$ represents the slowest timescale in $Q$ space, which is not tracked, and the ground state of atomic helium should be evolved on timescales slower than $\tau_Q$ for the separation of the two dynamical spaces to be consistent since all timescales faster than $\tau_Q$ are effectively instantaneous. For the CR formulation to be subsequently applicable in the spectroscopic analysis of plasma turbulence, the autocorrelation time of $n_e$ ($\tau_{n_e}$) and $T_e$ ($\tau_{T_e}$) must be larger than $\tau_Q$. Additionally, the exposure time of the experimental imaging diagnostic, $\tau_{GPI}$, should satisfy the timescale criterion of \begin{eqnal}\label{eq:tauQ_validity} \tau_Q < \tau_{GPI} < \tau_{n_e},\tau_{T_e} \end{eqnal} \noindent for consistency. This ensures the experimentally observed line emission in a single exposure time is based upon neutrals nominally excited by a unique $n_e$ and $T_e$ instead of a range of contributing magnitudes. Using revised cross-sections from \cite{RALCHENKO2008,Zholobenko_2018}, $\tau_Q$ is calculated under the $N_P = 1$ CR formulation in Figure \ref{tauQ_5876} at a range of $n_e$ and $T_e$ relevant to fusion plasmas. This quantity demarcates the temporal domain of validity. An important trend from the plot is that as $n_e$ increases, the limit on the temporal resolution of turbulent fluctuation measurements improves. For high plasma density fluctuations such as coherent filamentary structures, the resolution is roughly $\tau_Q \lesssim 1 \ \mu\text{s}$ for even $n_e \sim 10^{13} \ \text{cm}^{-3}$. As $n_e$ increases in higher field devices, the theoretical limit for resolving temporal scales improves. This aids the application of this GPI analysis for studying plasma turbulence in new regimes on upcoming tokamaks. A lower limit on spatial resolution for turbulence diagnostic imaging is set by $v_{HeI}/A(3^3D, 2^3P)$, provided that it is shorter than $v_{HeI} \tau_{n_e}$---or $v_{HeI} \tau_{T_e}$, if smaller---where $v_{HeI}$ is the drift velocity of the atomic helium. The validity criteria for the $N_P = 1$ CR formulation are generally satisfied in analyzing the $3^3D \rightarrow 2^3P$ transition for fusion plasmas of sufficient density, but one should take care when checking validity in specialized scenarios. For example, if applying CR theory to cameras imaging different electronic transitions (e.g. for analysis of line ratios \cite{HeI_line_ratio1,HeI_line_ratio2,Griener_2018}) with long exposure times where $\tau_{n_e}, \tau_{T_e} < \tau_{GPI}$, the formulated CR theory is technically invalid as the condition given by Eq. \eqref{eq:tauQ_validity} is no longer met. This could potentially cause errors in $n_e$ and $T_e$ profiles in existing experimental diagnostics towards closed flux surfaces, where plasma fluctuations are temporally faster than the observed autocorrelation time of far SOL turbulence \cite{labombard_evidence_2005}. Farther in the SOL as the plasma pressure drops, one should check that $\tau_Q < \tau_{n_e}, \tau_{T_e}$. Diagnosing edge fluctuations thus necessitates sufficiently high resolution for both the experimental diagnostic and applied CR theory. \begin{figure}[ht] \centering \includegraphics[width=0.7\linewidth]{templates/Figure2pinktalk.png} \caption{\label{tauQ_5876} A contour plot of $\tau_Q$ for the $N_P = 1$ CR model scanned over a range of relevant electron densities and temperatures for magnetically-confined fusion plasmas. A logarithmic scale is applied on all axes including the colourbar.} \end{figure} The $N_P = 1$ CR formulation permits any excited state population density in $Q$ space to be written as \begin{eqnal}\label{eq:nQ_CR} {\bf n_Q}\lvert_q = n(q) = R_0(q)n_en_i + R_1(q)n_en(1^1S) \end{eqnal} \noindent where $R_0(q)$ and $R_1(q)$ are known as population coefficients associated with recombination and electron impact physics. The temporal evolution of the ground state, the only species in $P$ space for this CR model, follows \begin{eqnal}\label{eq:nP_CR} \frac{d}{dt}{\bf n_P} = \frac{d}{dt}{n(1^1S)} = \alpha_{CR}n_en_i - S_{CR}n_en(1^1S) \end{eqnal} \noindent where $\alpha_{CR}$ and $S_{CR}$ are the recombination and ionization rate coefficients, respectively. To generate photon emissivity coefficients from this CR model, Eq. \eqref{eq:nQ_CR} is multiplied by the Einstein A coefficient for the given radiative transition. For the 587.6 nm line, $A(3^3D, 2^3P) = 2 \times 10^7 \ {\text{s}}^{-1}$. If $q = 3^3 D$, by multiplying Eq. \eqref{eq:nQ_CR} with the corresponding spontaneous decay rate, one can compute \begin{eqnal}\label{eq:PECexc} \text{PEC}^{exc} = R_1(3^3D) A(3^3D, 2^3P) \end{eqnal} \begin{eqnal}\label{eq:PECrec} \text{PEC}^{rec} = R_0(3^3D) A(3^3D, 2^3P) \end{eqnal} Contours of all coefficients along with their dependence on $n_e$ and $T_e$ are visualized at a magnetic field of $B = 5 \ \text{T}$ in Figures \ref{CR_rate3} and \ref{CR_rate5}. The plotted coefficients do not vary appreciably over $1 <$ B (T) $< 10$, which is relevant to Alcator C-Mod. Given these rates, one can further simplify the expressions for Eqs. \eqref{eq:nQ_CR} and \eqref{eq:nP_CR} when modelling 587.6 nm line emission in the presence of edge plasma turbulence by removing the effects of volumetric recombination, i.e. $\text{PEC}^{exc} \gg \text{PEC}^{rec}$ and $S_{CR} \gg \alpha_{CR}$, which are negligible for edge fusion plasmas unless $n_i \gg n_0 \equiv n(1^1S)$, i.e. only if the HeII density is far greater than the ground state neutral helium density. The effects of charge-exchange are also neglected as the reaction rate is small compared to electron impact ionization for atomic helium as long as $5 \ \text{eV} < T_e < 5 \ \text{keV}$ \cite{AMJUEL}. Note that this is not necessarily true for other atomic or molecular species, e.g. deuterium \cite{Helander_Catto_K1994}, but allows for an expression of 587.6 nm photon emissivity given by \begin{eqnal}\label{eq:emissivity_GPI} I = C n_0 n_e \text{PEC}^{exc}(n_e,T_e) = Cn_0 f(n_e,T_e) \end{eqnal} \noindent where $f(n_e,T_e)$ can be interpreted as the photon emission rate per neutral consistent with the $N_P = 1$ CR model. Using an oft-applied exponential model of $f(n_e,T_e) \propto n_e^{\alpha_n} T_e^{\alpha_T}$ and treating $\alpha_n$ and $\alpha_T$ as constants could yield erroneous emissivity predictions where fluctuations of order unity are beyond the perturbative regime. For example, $\alpha_T$ varies by a factor of 5 when $T_e$ goes from 4 eV to 10 eV \cite{Zweben_2017}. It is important to therefore retain the full range of dependency on $n_e$ and $T_e$. A constant factor $C$ is introduced in \eqref{eq:emissivity_GPI} to account for instrument calibration along with effects introduced by the finite thickness of the observed emission cloud \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure3.png} \caption{\label{CR_rate3}Photon emissivity coefficients for the HeI 587.6 nm line based upon electron impact excitation (left) and recombination (right). These quantities follow from the $N_P = 1$ CR model's population coefficients, i.e. Eqs. \eqref{eq:PECexc} and \eqref{eq:PECrec}.} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure4.png} \caption{\label{CR_rate5}Ionization (left) and recombination (right) rate coefficients derived from the $N_P = 1$ CR model. These quantities represent sinks and sources in Eq. \eqref{eq:nP_CR} for atomic helium when considering their transport in fusion plasmas.} \end{figure*} \section{\label{sec:level4.2}Experimental imaging of helium line emission on turbulent scales in the SOL of Alcator C-Mod} Our experimental analysis technique is generic to any plasma discharge on Alcator C-Mod where good fast camera data exist for the 587.6 nm line. The plasma discharge chosen for this work is numbered 1120711021. This is a majority deuterium, lower single null diverted ohmic plasma with an on-axis toroidal magnetic field of 5.4 T and plasma current of 0.83 MA. The tokamak itself has a major radius of 0.68 m and minor radius of 0.22 m. The discharge has independent diagnostic measurements from a main chamber scanning probe equipped with a mirror Langmuir probe (MLP) biasing system run in a swept mode in the edge plasma \cite{MLP_origin,LaBombard_probevGPI}. Based on Thomson scattering \cite{JWHughes-TS-diagnostic} and electron cyclotron emission diagnostic measurements \cite{Basse_CMod}, the core electron density and temperature are $2.0 \times 10^{20} \ \text{m}^{-3}$ and $1.5$ keV, respectively. \subsection{\label{sec:level4.2.1}Gas puff imaging on Alcator C-Mod} For the present work, the GPI diagnostic on the Alcator C-Mod tokamak \cite{2002_Zweben,GPImanual} was configured to capture visible light at a wavelength of 587.6 nm arising from the interaction of the edge plasma with neutral helium puffed locally to the imaged region. This is a commonly used technique akin to other plasma diagnostics such as beam emission spectroscopy (BES) \cite{BES_McKee}. Helium is an ideal choice for 2-dimensional turbulence imaging for several reasons: its low atomic number results in radiative losses minimally perturbing the plasma state; its larger ionization energy allows for greater neutral penetration than thermal deuterium; its lack of molecular interactions reduces complexity in modelling; and its neutrality keeps its transport independent of external magnetic fields. The spatially localized HeI also provides a greater contrast to the background emissivity in fusion plasmas primarily fueled by hydrogen isotopes. Line emission from atomic helium was imaged onto a Phantom 710 fast camera, installed on Alcator C-Mod in 2009 to view the outboard midplane region \cite{GPImanual}. The camera has a maximum framing rate of 400,000 frames/s at 2.1 $\mu$s-exposure/frame when 64 $\times$ 64 pixels are being read out, and each pixel is approximately $20 \ \mu$m $\times \ 20 \ \mu$m. The diagnostic's resultant temporal resolution is 2.5 $\mu$s as it takes 0.4 $\mu$s to read values from the pixel array. The fast camera has a built-in positive offset of approximately 80 counts, which is subtracted from all GPI signals before analysis of the experimental data \cite{GPImanual}. Based upon the manufacturer’s specifications and sample bench tests, the fast camera measurements are expected to vary linearly with light level over the pixels analyzed. The brightness is thus offset in absolute magnitude by a constant scale factor and accounted for in the framework. \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/AB_view_GPI_ASP_v3.png} \caption{\label{CMOD_Phantom}A section of a panoramic photo of the Alcator C-Mod outer wall, showing approximately one quarter of the device and centered on the split poloidal limiter next to the gas puff imaging measurement location. Labels indicate the position of the GPI nozzle, its imaging telescope, and an approximate line of sight (red dashed). The position of the radial scanning probe, which provides the mirror Langmuir probe measurements, is also exhibited.} \end{figure} A coherent fiber bundle/image guide was used to couple light from viewing optics mounted on the outer wall of the vacuum vessel to the Phantom camera detector array. The optics imaged a roughly 60 mm $\times$ 60 mm region in the $(R,Z)$-plane just in front of a gas puff nozzle through a vacuum window onto the image guide. The viewing chords pointed downwards at a fixed angle of $11.0^{\circ}$ below horizontal towards the vertically-stacked 4-hole gas nozzle displaced from the telescope by approximately $35.5^{\circ}$ in toroidal angle as displayed in Figure \ref{CMOD_Phantom}. The central ray of the imaged view thus pierced the gas puff plane approximately parallel with the local magnetic field line \cite{GPImanual}. This aligns the GPI optics with field-aligned fluctuations for typical operational parameters of an on-axis toroidal field of 5.4 T and plasma current of 1.0 MA. For discharge 1120711021 having a plasma current of 0.83 MA, the viewing chords are oriented at an angle of approximately 2$^{\circ}$ to the local field. Spatial blurring due to this angular misalignment, $\theta_B$, consequently limit resolution to $\Delta x = L_{||} \tan \theta_B$, where $L_{||}$ is the emission cloud's length parallel to the local magnetic field line. For $L_{||}$ between 5 -- 40 mm, the smearing will be 0.2 -- 1.4 mm in addition to the 1 mm pixel spot size in the image plane. Since the gas cloud expands after exiting the 4-hole nozzle and the local magnetic field's pitch angle varies, the smearing increases for those chords farther away from the nozzle depending upon the collimation of the gas cloud \cite{Zweben_2009,Zweben_2017}. With this setup and under these plasma conditions, the spatial resolution over the portion of the field-of-view analyzed is estimated to be approximately 1--2 mm. A visualization of the experimental setup is displayed in Figure \ref{CMOD_GPI}. Diagnostics injecting HeI with smaller angular half-width like thermal helium beams \cite{BES_WEST,BES_McKee} are thus helpful and this physics-informed deep learning technique can be directly transferred for their analysis as long as Greenland’s criteria are satisfied. \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/GPI_eq_1120711021_v3_mathewsa.png} \caption[Visualization of the experimental GPI setup on a poloidal cross section of a lower single null diverted plasma discharge (1120711021) on Alcator C-Mod. The expansion at right shows raw counts measured by the fast camera at $t = 1.312858$ s, and includes overlays of both the last closed flux surface and the approximate domain of the analysis described in Section \ref{sec:level4.4}.]{\label{CMOD_GPI}Visualization of the experimental GPI setup on a poloidal cross section of a lower single null diverted plasma discharge (1120711021) on Alcator C-Mod. In this chapter, measurements are used from the midplane fast camera with a 587.6 nm optical filter with full width at half maximum of 11.4 nm which has a largely field-aligned view of edge fluctuations. The expansion at right shows raw counts measured by the fast camera at $t = 1.312858$ s, and includes overlays of both the last closed flux surface and the approximate domain of the analysis described in Section \ref{sec:level4.4}.} \end{figure} For background on the optics \cite{GPImanual}, the telescope contains no active shutter but a cylindrical shield on the front end, which is mounted on the outboard vessel wall at [$R = 102.5$ cm, $Z = 9.0$ cm]. A stainless steel mirror is located at the shield's back to direct light upward to several quartz lenses in vacuum. The image formed by the lenses is sent through a small vacuum window and mounted at the end of the bellows which carries the quartz fiber optics. This optics bundle is always in air, with one end connected to the camera, which uses a 5-m-long, $0.158” \times 0.158”$-sized coherent quartz fiber optic bundles to transmit the images. These have a better transmission than glass whilst not experiencing radiation browning which can darken glass bundles, but the quartz bundles have only $57 \times 57$ fibers (converse to $400 \times 400$ for glass in the past). These were hand-made by Fiberoptic Systems Inc. The quartz bundles were enclosed in custom vacuum bellows to transfer light from inside the vessel. The exterior end of the bellows was attached to a flange at the top of Alcator C-Mod, and the fiber optics came out of this end of the bellows and was connected in air to the camera. The square quartz optical bundle was imaged by a large 75 mm focal length commercial C-mount lens, focused to infinity for passage through the optical filter, and then $3 \times$ de-magnified and imaged onto the camera with a commercial 25 mm focal length C-mount lens. An Andover optical line transmission filter at 587.6 nm with full width at half maximum of 11.4 nm was screwed onto the larger lens. This optic was covered by a black cloth during operation. As noted above, helium gas is injected into the vessel via four vertically-displaced plasma-facing capillaries located at $Z = -4.2, -3.4, -2.6, \text{and} -1.9$ cm, which are mounted in a port on a shelf just below the outer midplane sitting in the shadow of two outboard limiters. The position $Z = 0$ corresponds to the vertical location of the machine midplane. The gas tubes' orifices are positioned at $R = 91.94$ cm with the channel exit diameter being 3 mm. The helium atoms are supplied by the Neutral gas INJection Array (NINJA) storage and delivery system \cite{NINJA_thesis} which has a pneumatically-controlled valve at the plenum which is connected to a 3.48-m-long, 1-mm-diameter capillary that feeds the 4 diverging gas tubes. Previous measurements indicate that the gas cloud exiting a single 1-mm-diameter capillary expands with angular half-width of 25$^{\circ}$ in both the poloidal and toroidal directions \cite{Terry_private}. This is the basis for estimating a spatial resolution of 1--2 mm given above. For discharge 1120711021, the plenum backing pressure was 434 torr and the total helium gas input was 6.27 torr$\cdot$L over two puffs with valve duration times of 0.08 s for each puff. The trigger time for the first NINJA valve opening was $t = 1.05$ s, while the second sustainment puff's trigger was applied at $t = 1.27$ s. The HeI flow rate at $t = 1.31$ s is estimated to be $1.21 \times 10^{20}$ s$^{-1}$ \cite{Terry_private}. Due to the tubes' spatial displacement, the helium gas puff is intended to be relatively uniform in the vertical direction. By definition, there is a shock at (or near) the vacuum-nozzle interface for this sonic flow since only particles moving downstream can escape and there is consequently no information being communicated to upstream particles \cite{shocks_in_tubes_Parks_and_Wu}. The neutral dynamics thus transition from a fluid regime in the gas tube to a kinetic regime upon entering the tokamak. The HeI exiting the diverging nozzles is approximately modelled by a drifting, cut-off Maxwellian distribution with a mean radial velocity of $-900$ m/s and a mean vertical velocity of $-20$ m/s since the direction of the non-choked flow in the capillaries is roughly 2.4$^{\circ}$ away from being oriented purely radially \cite{Terry_private}. \subsection{\label{sec:level4.2.2}Experimental validity of $N_P = 1$ HeI CR theory} To examine the experimental relevance of applying the $N_P = 1$ CR theory outlined in Section \ref{sec:level4.1} for analysis of edge plasma turbulence on Alcator C-Mod, a few key characteristic parameters of interest are reviewed based upon scanning MLP measurements of $n_e$ and $T_e$ in plasma discharge 1120711021. Magnetically disconnected from the GPI field of view, the scanning MLP in Figure \ref{CMOD_Phantom} is located at $Z = 11.1$ cm roughly $20^{\circ}$ in toroidal angle from the GPI view and radially traverses the tokamak plasma from the far edge to just inside the last closed flux surface (LCFS) with a temporal resolution of 0.3 $\mu$s. Measurements mapped to the midplane radius are visualized in Figure \ref{probe_1120711021} based upon a probe plunge nearly coincident temporally with the GPI analysis of this plasma discharge. While the probe bias is inherently perturbative due to the collection of charged particles, its effects on local plasma conditions are assumed to be negligible \cite{kuang_thesis}. From the MLP data, one can obtain autocorrelation times of fluctuations near the LCFS and approximately 8 - 10 mm radially outward into the SOL when mapped to the midplane radius. Towards closed flux surfaces, $\tau_{n_e}$ and $\tau_{T_e}$ are approximately 4.2 $\mu$s and 6.1 $\mu$s, respectively. In the far SOL, $\tau_{n_e}$ and $\tau_{T_e}$ increase to 15.6 $\mu$s and 22.9 $\mu$s, respectively. Since the probe has a finite velocity and the autocorrelation length of fluctuations is finite, these estimates of $\tau_{n_e}$ and $\tau_{T_e}$ act as conservative lower bounds as long as there is no aliasing nor phase-alignment between the probe's motion and turbulence structures. The fast camera exposure time of 2.1 $\mu$s is expected to be suitable for analysis of edge plasma fluctuations in this ohmic discharge, although faster cameras could be helpful in analyzing plasma conditions. Further, for turbulence near the LCFS where $n_e \gtrsim 10^{19} \ \text{m}^{-3}$ and $T_e \gtrsim 20$ eV, then $\tau_Q < 1 \ \mu$s, and the condition of $\tau_Q < \tau_{exp} < \tau_{n_e},\tau_{T_e}$ is well-satisfied. For fluctuations farther out into the SOL, this condition is still generally valid especially in the treatment of high pressure filaments, but one should be careful when $n_e$ drops below $2.5 \times 10^{18} \ \text{m}^{-3}$ in fusion plasmas. For spectroscopic techniques analyzing line intensities, each optical camera's exposure time needs to be suitably adjusted to satisfy the timescale condition. This is especially important towards closed flux surfaces where long camera exposure periods and shorter autocorrelation times would render examination of brightness ratios arising from turbulent fluctuations as inconsistent. \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure7utalk.png} \caption{\label{probe_1120711021} Experimental $n_e$ and $T_e$ measurements in discharge 1120711021 from the independent scanning mirror Langmuir probe. The full probe plunge duration is $1.288 < t \ \text{(s)} < 1.318$. As the probe is scanning back from closed flux surfaces, time series of $n_e$ and $T_e$ are plotted to compute autocorrelation times. Near the LCFS (red), $\tau_{n_e}$ and $\tau_{T_e}$ are approximately 4.2 $\mu$s and 6.1 $\mu$s, respectively. Farther into the SOL (green), $\tau_{n_e}$ and $\tau_{T_e}$ increase to 15.6 $\mu$s and 22.9 $\mu$s, respectively. For reference, the gray region roughly corresponds to the radial extent of the GPI data analyzed.} \end{figure*} Our framework outlined in the next sections can be applied to regions with arbitrary geometries (e.g. X-point, divertor) if using sufficiently planar helium beams where the width of the collimated gas is smaller than the parallel autocorrelation length of the plasma fluctuations in the direction of the viewing chords. Since the viewing chords are roughly field-aligned over the pixels being analyzed, this parallel scale condition is expected to be satisfied. Finally, it is noted that the signal-to-noise ratio degrades in the inboard portion of the field-of-view, which includes plasma close to or on closed flux surfaces where the electron pressure and ionization rate increase sharply \cite{jwhughes1,jwhughes2}. Accordingly, fluctuations are analyzed a few millimetres away from the LCFS on a 2-dimensional $(R,Z)$-grid co-located at the nominal gas puff plane. In future work, if greater neutral penetration can be achieved such that high signal-to-noise can be attained on closed flux surfaces, the capability to then probe pedestal dynamics also exists where priming the optimization framework on available 1-dimensional data may help. Such training on background profiles was found to aid stability, and this will likely be especially helpful when approaching or on closed flux surfaces. Accordingly, Appendix B outlines a generalized regression technique developed to output edge background profiles in any confinement regime \cite{Mathews2020}. This opportunity may already be viable on devices with smaller line-integrated $n_e$ and the methodology can extend to unmagnetized plasmas, too. \section{\label{sec:level4.3}Deep learning of time-dependent neutral transport physics and collisional radiative theory} A novel multi-network deep learning framework custom-built for analysis of 587.6 nm helium line emission in fusion plasmas is outlined to uncover $n_e$, $T_e$, and $n_0$. Combining the theory governing atomic emission and neutral transport with experimental turbulence measurements via fast camera imaging into an integrated analysis framework requires sufficiently sophisticated modelling techniques. Neural networks only receiving experimental brightness measurements from GPI are thus used while being optimized against the $N_P = 1$ CR theory for photon emissivity along with the continuity equation for neutral transport which accounts for ionization of helium atoms on turbulent scales. In this way, one can combine training upon both mathematical laws and observational data. To begin, the unobserved quantities $n_e$, $T_e$, and $n_0$ each represented with their own neural network. The initial layer inputs correspond to the local spatiotemporal points $(x,y,t)$, with the $(x,y)$-coordinate being equivalent to $(R,Z)$, from the approximately 2-dimensional domain viewed by the fast camera in the poloidal plane of the gas puff nozzle. The only output of each network is the respective dynamical variable being represented. Every network's inner architecture consists of 5 hidden layers with 150 neurons per hidden layer and hyperbolic tangent activation functions ($\sigma$) using Xavier initialization \cite{GlorotAISTATS2010}. To provide reasonable intervals for the optimization bounds, the networks for $n_e$, $T_e$, and $n_0$ are constrained via output activation functions to be between $2.5 \times 10^{18} < n_e \ (\text{m}^{-3}) < 7.5 \times 10^{19}$, $2.5 < T_e \ (\text{eV}) < 150.0$, and $0.1 < n_0 \ (\text{arb. units}) < 10.0$, i.e. $n_0$ is assumed to not vary by more than two orders of magnitude in the region of the GPI analysis. While required for numerical stability, care must be taken since solutions existing near these limits may not be fully converged. The learnt constant calibration factor, $C$, is similarly represented by a network but does not vary spatially nor temporally. Physically, this results in $n_0$ being determined up to a constant scaling. The scalar constant also accounts for the 2-dimensional approximation of the localized gas puff, which has a finite toroidal width from the helium atoms exiting the capillaries. By assuming $n_e$, $T_e$, and $n_0$ to be roughly uniform along the camera's sightline, the effect of this finite volume is absorbed when learning the calibration factor. While the 2-dimensional approximation is reasonable for sufficiently planar gas injection, the deep framework can technically be generalized towards natively handling 3-dimensional space since it employs a continuous domain without any discretization. This is a future extension. Our optimization is conducted in stages. To begin learning CR theory, novel neural network structures are constructed such that the outputs of the $n_e$ and $T_e$ networks serve as inputs to a new architecture representing the photon emissivity per neutral, $f \equiv f(n_e, T_e)$. The connectivity of the neurons conjoining $n_e$ and $T_e$ towards the network's output, $f$, is visualized in Figure \ref{network_structure_f}. These weights and biases are trained against $n_e \text{PEC}(n_e, T_e)$, which is derived from the $N_P = 1$ CR theory. The corresponding emissivity coefficient is plotted in Figure \ref{CR_rate3}. The ionization rate per neutral, $n_e S_{CR}(n_e, T_e)$, which is based upon the coefficient plotted in Figure \ref{CR_rate5}, is similarly represented by an architecture with $n_e$ and $T_e$ serving as inputs. All this training of the two architectures representing $f(n_e, T_e)$ and $n_e S_{CR}(n_e, T_e)$ is conducted in the first stage prior to any optimization against the fast camera data. This ensures the next stages involving training with embedded collisional radiative constraints take place under an integrated optimization framework with all quantities being represented by neural networks. For numerical purposes, $n_e$ are $T_e$ are normalized by $10^{19} \ \text{m}^{-3}$ and $50 \ \text{eV}$, respectively, and time is converted to units of microseconds during the optimization. For low temperature plasmas where $T_e < 2$ eV, training with the networks and output CR coefficients from \cite{GOTO_2003,Zholobenko_thesis} based upon fitted electron impact cross-sections should be carefully checked due to potential corrections to fits for collision strengths at such low energies. The $n_e$ and $T_e$ networks are trained only against constants of $10^{19} \ \text{m}^{-3}$ and 50 eV, respectively, for initialization. The priming, i.e. initial stage of overall training, of $n_e$ and $T_e$ and learning of CR coefficients by their respective networks takes place over the first 5 of 20 total hours of training. \begin{figure}[ht] \centering \includegraphics[width=0.7\linewidth]{templates/network_structure_f.png} \caption{\label{network_structure_f} Structure of networks to represent $f(n_e, T_e) = n_e \text{PEC}(n_e, T_e)$ which is one of the terms composing the total emissivity function, $I = C n_0 f(n_e, T_e)$. The ionization rate per neutral, $n_e S_{CR}(n_e, T_e)$, is similarly represented when applied in the transport equation and important to account for ``shadowing'' of neutrals \cite{2002_Zweben,STOTLER2003,Wersal_2017}. The left side of the overall network consists of the networks for the predicted $n_e$ and $T_e$, while the right side output represents the photon emissivity per neutral, where $\text{PEC}(n_e, T_e)$ is given by Figure \ref{CR_rate3}.} \end{figure} Next, the $n_e$, $T_e$, and $C$ networks are trained against Eq. \eqref{eq:emissivity_GPI} such that that the predicted brightness intensity consistent with CR theory matches experimental measurements from the fast camera. Additional constraints are thus placed in the optimizer such that solutions where $n_e$ and $T_e$ are correlated are favoured. This helps to avoid the learning of trivial solutions, e.g. purely $n_e$ fluctuations with zero $T_e$ fluctuations. Based upon past high-resolution MLP data, edge turbulent fluctuations were observed to exhibit strong correlations between the electron density and electron temperature which is a further motivation for applying this constraint \cite{KUBE2019_neTecorr}. Namely, the full loss function being collectively trained upon in this second stage is \begin{eqnal}\label{eq:loss_GPI} \mathcal{L}^{C,n_e,T_e} &= \frac{1}{N_0}\sum_{i=1}^{N_0} (\mathcal{L}_{GPI} + C_1 \mathcal{L}_{corr} + C_2 \mathcal{L}_{relcorr}), \end{eqnal} \noindent where \begin{eqnal}\label{eq:loss_GPI1} \mathcal{L}_{GPI} &= \lvert I^*(x^i_0,y^i_0,t^i_0) - I_0 \rvert^2 \end{eqnal} \begin{eqnal}\label{eq:loss_corr} \mathcal{L}_{corr} &= - [n^*_e(x^i_0,y^i_0,t^i_0) - \langle n^*_e(x^i_0,y^i_0,t^i_0) \rangle] \times \\& [T^*_e(x^i_0,y^i_0,t^i_0) - \langle T^*_e(x^i_0,y^i_0,t^i_0) \rangle] \end{eqnal} \begin{eqnal}\label{eq:loss_relcorr} \mathcal{L}_{relcorr} &= \frac{\lvert \langle n^*_e(x^i_0,y^i_0,t^i_0) - \langle n^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2}{\lvert \langle T^*_e(x^i_0,y^i_0,t^i_0) - \langle T^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2} \\&+ \frac{\lvert \langle T^*_e(x^i_0,y^i_0,t^i_0) - \langle T^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2}{\lvert \langle n^*_e(x^i_0,y^i_0,t^i_0) - \langle n^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2} \end{eqnal} \noindent with $I^*(x^i_0,y^i_0,t^i_0)$ following Eq. \eqref{eq:emissivity_GPI}, and the points $\lbrace x_0^i,y_0^i,t_0^i,I_{0}^i\rbrace^{N_0}_{i=1}$ corresponding to the set of observed data from GPI. The superscript notation on $\mathcal{L}$ identifies the multiple networks being simultaneously trained during optimization of the respective loss function, e.g. $\mathcal{L}^{C,n_e,T_e}$ indicates that the networks for $C$, $n_e$, and $T_e$ are being jointly optimized against this particular loss function. We note that the results from the converged solutions reported in Section \ref{sec:level4.4} are largely unchanged by removing \eqref{eq:loss_relcorr} in the optimization framework, although keeping it was found to enhance stability and thus the total number of realizations that converge. Better physics-informed optimization constraints may exist and should be investigated going forward to advance this turbulence analysis. While the coefficients $C_1$ and $C_2$ in Eq. \eqref{eq:loss_GPI} can be adaptively adjusted for optimal training in each iteration, they are set to constants of 1000 and 1, respectively, in the present implementation. The variables with asterisks symbolize predictions by their respective networks at the spatiotemporal points being evaluated during training. The notation $\langle X \rangle$ denotes the batch sample mean of $X$. This second training stage lasts for 100 minutes. The next stage involves optimizing the $n_0$ network against both Eq. \eqref{eq:loss_GPI1} and its transport equation which accounts for drifts and fluctuation-induced ionization. Namely, in implicit form, \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure9new.png} \caption{\label{learned_1D_turbulence_histogram}Histogram of the $n_e$, $T_e$, and $Cn_0$ fluctuations at $[R = 90.7 \text{ cm}, Z = -4.2 \text{ cm}, t = 1.312850 \text{ s}]$, i.e. with corresponding normalized poloidal magnetic flux coordinate $\psi_n=1.07$, based upon 50 converged realizations when training against experimental GPI data from plasma discharge 1120711021 in the optimization framework. The ensemble mean and standard deviation of these realizations are used to construct the results presented in Section \ref{sec:level4.4}.} \end{figure*} \begin{eqnal}\label{eq:loss_fn0} f_{n_0} = \frac{\partial n_0}{\partial t} + \frac{\partial (n_0 v_x)}{\partial x} + \frac{\partial (n_0 v_y)}{\partial y} + n_0 n_e S_{CR} \end{eqnal} \noindent where, based upon 3-dimensional Monte Carlo neutral transport simulations of this region, closures of $v_x \sim -900$ m/s and $v_y \sim -20$ m/s are applied for modelling HeI as it exits the capillaries into the GPI frame of view \cite{SGBAEK_DEGAS2_GPI_CMOD,Terry_private}. This approximation of HeI with constant drift may be reasonable for a narrow radial region, but the true velocity distribution characterizing helium gas particles becomes increasingly skewed the farther one goes away from the gas nozzles. Modelling other atomic and molecular species (e.g. deuterium) in this way may be inadequate as charge-exchange and recombination effects on trajectories are increasingly important. Also, neutral-neutral collisions and their impacts on velocity closures are presently neglected in this treatment. This allows for a scaling constant to be factored out of Eq. \eqref{eq:loss_fn0}, i.e. permitted by its linearity in $n_0$. If using a sufficiently high spectral resolution spectrometer to view the emission cloud, the Doppler shift can potentially be experimentally measured. This task for further exploring momentum transport physics and potentially even learning the velocity closure directly from the GPI data within the optimization framework in an additional stage of training is left for future work. The null formulation following Eq. \eqref{eq:loss_fn0} is vital for training since all physical terms collectively sum to zero when the unknown dynamical variables in the equation are correctly solved to self-consistently account for neutral propagation and ionization. The physical theory is computationally expressed by differentiating the $n_0$ neural network with respect to its input spatiotemporal coordinates via application of chain rule through automatic differentiation \cite{tensorflow2015-whitepaper}. By then multiplying and adding the graph outputs to construct representations of the physical constraints, the network for $n_0$ can be trained against \eqref{eq:loss_GPI} and \eqref{eq:loss_fn0} to satisfy the physical theory constraining the nonlinear connection between networks. This accounting of Eq. \eqref{eq:loss_fn0} is particularly essential since the Kubo number ($Ku = V_0/\lambda \omega$ where $V_0$ is the unperturbed drift, $\lambda$ is the autocorrelation length scale \cite{Kubo_def}, and $\omega$ is the fluctuation frequency) which quantifies the strength of turbulent perturbations on neutral transport, is large ($\gtrsim 1$) for helium \cite{Kubo_original,Kubo_number,SGBAEK_DEGAS2_GPI_CMOD}. There are no explicit boundary conditions applied for $n_0$, but instead its network is trained against the fast camera's experimentally measured intensities to learn how $n_0$ should be treated around the boundaries of the analyzed camera image. Namely, the loss function in this third following stage is given by \begin{eqnal}\label{eq:loss_n0_train} \mathcal{L}^{n_0} &= \frac{1}{N_0}\sum_{i=1}^{N_0} \mathcal{L}_{GPI} + \frac{C_{f_{n_0}}}{N_f}\sum_{j=1}^{N_f} \mathcal{L}_{f_{n_0}} \end{eqnal} \noindent with \begin{eqnal}\label{eq:loss_fn0_train} \mathcal{L}_{f_{n_0}} &= \lvert f^*_{n_0}(x^j_f,y^j_f,t^j_f) \rvert^2 , \end{eqnal} \noindent where $\lbrace x_f^j,y_f^j,t_f^j\rbrace^{N_f}_{j=1}$ denote the set of collocation points which can span any arbitrary domain but taken to be equivalent to the ones encompassed by $\lbrace x_0^i,y_0^i,t_0^i,I_{0}^i\rbrace^{N_0}_{i=1}$, and $f^*_{n_0}$ is the null partial differential equation prescribed by Eq. \eqref{eq:loss_fn0} in normalized form directly evaluated by the neural networks. For the remainder of the training time, i.e. after the first stage of priming and two subsequent stages training with Eq. \eqref{eq:loss_GPI} and then Eq. \eqref{eq:loss_n0_train} , the networks are further optimized sequentially against Eqs. \eqref{eq:loss_GPI} and \eqref{eq:loss_n0_train} in repeating intervals of 100 minutes to iteratively find convergence in their respective networks. The only difference in these later stages is that $C$ is no longer a free parameter whilst training against Eq. \eqref{eq:loss_GPI}, and $C_{f_{n_0}}$ in Eq. \eqref{eq:loss_n0_train} is increased from $10^2$ to $10^6$ to improve the focused learning of neutral transport physics. If $C_{f_{n_0}}$ is increased any higher, one risks finding trivial solutions at a higher occurrence. Generalizing the optimizers to adaptively update training coefficients \cite{wang2020understanding} is an important pathway for future investigation. All loss functions are trained with mini-batch sampling where $N_0 = N_f = 1000$ using the L-BFGS algorithm---a quasi-Newton optimization algorithm \cite{10.5555/3112655.3112866}. Also, points found to have difficulty converging (e.g. optimizer becomes stuck in local minima) were removed from subsequent training stages to improve learning in remaining regions of the spatiotemporal domain analyzed. In the end, the multi-network framework trains on only 8 (radial) $\times$ 38 (vertical) pixels over 39 frames imaged by the fast camera. By embedding $f(n_e,T_e)$ in Figure \ref{network_structure_f}, the emissivity predictions by the networks are forced to satisfy CR theory. Similarly, the ionization rate per neutral, $n_e S_{CR}$, is encoded in Eq. \eqref{eq:loss_fn0}. This ensures that the unobserved $n_e$, $T_e$, and $n_0$ being learnt are in agreement with the experimentally measured brightness while trying to satisfy the neutral transport physics for HeI which self-consistently includes time-dependent ionization in the presence of plasma turbulence. The repeated differentiation and summation of networks to represent every term in the ascribed loss functions resultantly constructs a far deeper computation graph representing the collective constraints beyond the 8 hidden layers in each dynamical variable's individual network. The cumulative graph is therefore a truly deep approximation of the physics governing the observed 587.6 nm line emission by the fast camera in Alcator C-Mod. Due to the stochastic nature of the initialization and multi-task training, learned solutions for $n_e$, $T_e$, $n_0$, and $C$ vary each time an individual optimization is run. This may arise due to a unique solution not necessarily existing given the above optimization constraints. Therefore, an ensemble of realizations are run and it is this collection of runs considered which roughly follow Gaussian statistics. Based upon testing within the optimization framework, the necessary criteria for convergence in normalized units are set to $\mathcal{L}_{GPI} < 10^{2.5}$, $\mathcal{L}_{corr} < -10^3$, and $\mathcal{L}_{f_{n_0}} < 10^{-3}$. Checks for spurious gradients, trivial solutions, and a low number of training iterations were additionally investigated for downselecting converged realizations. For analysis of C-Mod discharge 1120711021, there were 800 runs with 50 sufficiently converging within this present analysis. The scatter in learned turbulent fluctuations among these realizations is used to quantify uncertainty intervals associated with the optimization framework, and as an example, the distribution of inferred measurements at a particular spatial and temporal point are plotted in Figure \ref{learned_1D_turbulence_histogram}. It is also important to note that the loss functions never truly go to zero either and act to quantify potential discrepancies involved in modelling the physical system with deep networks, e.g. $\mathcal{L}_{f_{n_0}}$ can be understood as the outstanding error in approximating the neutral transport theory. For reference when performing future GPI analysis, of these converged runs, the normalized mean loss functions at the end of training for the collection of realizations were found to be $\mathcal{L}_{GPI} = (1.44 \pm 0.42) \times 10^2$, $\mathcal{L}_{corr} = (-4.51 \pm 0.20) \times 10^{3}$, $\mathcal{L}_{relcorr} = 6.75 \pm 0.03$, and $\mathcal{L}_{f_{n_0}} = (3.57 \pm 3.79) \times 10^{-5}$. Simply put, finite values of the loss metrics indicate the degree to which the framework satisfies the collective training conditions. Identifying these errors allows for their iterative improvement, while identifying even better loss functions is an open area for future research. \section{\label{sec:level4.4}Uncovering plasma-neutral dynamics in experimental turbulence imaging in Alcator C-Mod} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure10.png} \caption{\label{learned_2D_turbulence1}The learned 2-dimensional $n_e$, $T_e$, and $Cn_0$ for plasma discharge 1120711021 along with the experimentally observed 587.6 nm photon emission at $t = 1.312815$ s. The learned measurements are based upon the collective predictions within the deep learning framework training against the neutral transport physics and $N_P = 1$ CR theory constraints.} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure11.png} \caption{\label{GPI_predvexp_1d_1120711021_rvt}The learned $n_e$, $T_e$, and $Cn_0$ along with the experimentally observed 587.6 nm photon brightness for plasma discharge 1120711021 at $Z = -4.0 \text{ cm}$. These quantities are plotted as a function of radius and time.} \end{figure*} The learned turbulent $n_e$, $T_e$, and $Cn_0$ from the time-dependent analysis of fast camera imaging for plasma discharge 1120711021 using an ensemble of 50 optimizers are visualized in 2-dimensional space along with experimentally observed GPI measurements in Figure \ref{learned_2D_turbulence1}. The positive fluctuations in brightness are largely correlated with $n_e$ and $T_e$, and these regions tend to have depressed values of $n_0$ as the ionization rate is elevated. This results in a ``shadowing effect'' in atomic helium trajectories arising from increased ionization in regions of positive density fluctuation. The autocorrelation time of $n_0$ also decreases with radius, while it increases for $n_e$ and $T_e$. Temporal variation with radius is visualized in Figure \ref{GPI_predvexp_1d_1120711021_rvt} where, considering a 1-dimensional slice of Figure \ref{learned_2D_turbulence1}, the same physical quantities are plotted at $Z = -4.0$ cm. While correlations vary poloidally and radially, and precise dependencies across the turbulent variables change as $n_e$ and $T_e$ increase, the observed line emission is found to be strongly correlated with electron density and temperature. The atomic helium density fluctuations do not vary directly proportional to $I_0$ in this far edge region on open field lines near the gas tubes. There is instead a weak negative correlation over this narrow radial extent arising from the largest brightness fluctuations corresponding to trajectories with elevated ionization rates causing a depletion, or shadowing, of HeI. A correlation matrix for the normalized relative fluctuations in 2-dimensional space over the roughly 100 $\mu$s time window analyzed are displayed in Table \ref{table_correlation_matrix5}. The maximal $n_0$ fluctuation amplitudes tend to be roughly 30--40\% from peak-to-trough in this far edge region which sits away from the LCFS, where sharper equilibrium gradients and smaller relative fluctuation levels may result in different correlations. And while relative fluctuations may be correlated from $90.3 < R \ \text{(cm)} < 90.9$ as in Table \ref{table_correlation_matrix5}, connections between the turbulent quantities are nonlinear. To better visualize their interdependence, Figure \ref{turbulence_histogram} displays histograms for $n_e$, $T_e$, and $Cn_0$ vertically along $R = 90.3$ cm. The fluctuations follow different statistical distributions and cannot necessarily be linearly mapped from the observed noisy HeI line intensity experimentally measured by the fast camera. \begin{table} \centering \renewcommand{\arraystretch}{1.} \begin{NiceTabular}{ p{0.7cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|>{\arraybackslash}p{1.1cm}| }[] {} & $\{n_e\}$ & $\{T_e\}$ & $\{n_0\}$ &$\{I^*\}$ &$\{I_0\}$\\ \cline{1-6} $\{n_e\}$ & 1.000 & 0.887 & -0.325 & 0.843 & 0.822 \\ \cline{1-6} $\{T_e\}$ & 0.887 & 1.000 & -0.307 & 0.925 & 0.902 \\ \cline{1-6} $\{n_0\}$ & -0.325 & -0.307 & 1.000 & -0.051 & -0.059 \\ \cline{1-6} $\{I^*\}$ & 0.843 & 0.925 & -0.051 & 1.000 & 0.971 \\ \cline{1-6} $\{I_0\}$ & 0.822 & 0.902 & -0.059 & 0.971 & 1.000 \end{NiceTabular} \caption{\label{table_correlation_matrix5}A correlation matrix of the turbulent measurements inferred and observed experimentally in plasma discharge 1120711021. For reference, $I^*$ is the predicted emissivity given by Eq. \eqref{eq:emissivity_GPI}, and $I_0$ is the experimentally observed brightness of the 587.6 nm line. Each quantity's normalized fluctuation amplitude, i.e. $\{X\} = (X - \langle X \rangle)/\langle X \rangle$, is based upon measurements over $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$.} \end{table} \begin{figure*}[ht] \includegraphics[width=1.0\linewidth]{templates/Figure12.png} \caption{\label{turbulence_histogram}Histograms displaying the distribution of turbulent $n_e$, $T_e$, and $Cn_0$ at [$R$ = 90.3 cm, $-4.6 < Z \ \text{(cm)} < -1.0$, $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$] along with the experimentally observed 587.6 nm line intensity. \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure13update.png} \caption{\label{predicted_1D}Radial profiles of the inferred turbulent $n_e$, $T_e$, and $Cn_0$ at $[Z = -4.0 \text{ cm}, t = 1.312866 \text{ s}]$ along with a trace of the experimentally observed and predicted GPI intensity profiles. The computed line emission is based upon the deep learning framework following Eq. \eqref{eq:emissivity_GPI}. The dark line in each plot corresponds to the average output of the ensemble of realizations, while the shaded uncertainty intervals correspond to scatter ($\pm 2\sigma$) arising from the independently trained networks.} \end{figure*} \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/PINN_neTe_fullx.png} \caption{\label{GPIvprobes}For comparison, the inferred $n_e$ and $T_e$ are plotted over the roughly 100 $\mu$s time window analyzed from the experimental GPI. The independent mirror Langmuir probe is located at $Z = +11.1$ cm with a radially moving probe head. The MLP scan in the plotted region lasts roughly 6000 $\mu$s (i.e. 60$\times$ longer than the duration of the GPI analysis). All measurements are mapped to normalized poloidal magnetic flux coordinates, $\psi_n$, and none of the data displayed is time-averaged.} \end{figure} One should note that these learned $n_e$, $T_e$, and $Cn_0$ are consistent solutions with the collisional radiative and optimization constraints being trained upon, but not necessarily unique solutions. Accordingly, in Figure \ref{predicted_1D}, the predicted light emission from the ensemble of realizations is displayed against the fast camera's measurements. The mean outputs and uncertainty intervals for the turbulent $n_e$, $T_e$, and $Cn_0$ associated with the scatter of running an ensemble of stochastic realizations are also plotted. There is no temporal averaging of the profiles in Figure \ref{predicted_1D}. For GPI on Alcator C-Mod, sharp features exist in the experimental data potentially associated with noise, while the learned line intensity from the collection of networks is smoother and consistent in both magnitude and shape with the observed brightness. These measurements enable novel research pathways into the 2-dimensional tracking of experimental parameters (e.g. turbulent particle and heat fluxes both radially and poloidally) and calculation of fluctuating fields for model validation \cite{Mathews2021PRE,Mathews2021PoP}. They further provide the first quantitative estimates of 2-dimensional time-dependent structure for neutrals on turbulent scales in an experimental fusion plasma. To further examine the validity of these results, the turbulent $n_e$ and $T_e$ from the GPI measurements of the single spectral line are juxtaposed against an independent MLP with four electrodes in Figure \ref{GPIvprobes}. This scanning probe is plunged at times overlapping with the gas puff analysis, i.e. $1.287631 < t_{MLP} \ \text{(s)} < 1.317671$ versus $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$, although located at different positions toroidally and vertically as discussed in Section \ref{sec:level4.2}. The MLP measures fluctuations in time as it scans through the edge plasma to construct the resultant radial profile. For the purpose of comparison, turbulent measurements at different $Z$-locations are not time-averaged to compare the $n_e$ and $T_e$ fluctuations. While the measurement regions spatially spanned by the two independent diagnostics are magnetically disconnected, the data are mapped to common poloidal magnetic flux coordinates based upon magnetohydrodynamic equilibrium reconstruction in the tokamak plasma using the EFIT code \cite{Lao_1985}. Deconstructing the GPI fluctuations into the turbulent $n_e$, $T_e$, and $n_0$ instead of the raw brightness from atomic emission largely resolves diagnostic misalignment challenges. Namely, in contrast with past analysis of discharge 1120711021 \cite{Russell_probevGPI}, there is no radial shift applied to align the turbulent fluctuation profiles from these two independent experimental diagnostics. For GPI measurements in this 2-dimensional spatial domain spanning approximately $100 \ \mu$s, peak $n_e$ and $T_e$ fluctuations do not far exceed $3.0 \times 10^{19} \ \text{m}^{-3}$ and 30 eV, respectively, which are roughly consistent with the MLP in the far SOL. When evaluating the two sets of measurements side-by-side in Figure \ref{GPIvprobes}, excellent agreement is found in magnitude and structure between the $T_e$ measurements. The MLP $n_e$ data are slightly elevated on average although still quantitatively consistent within the measurement bounds of the four electrodes. A potential contributing factor to this observed difference in $n_e$ peaks could be natural variations in the poloidal structure of the intermittent fluctuations over the narrow time window analyzed (i.e. 100 $\mu$s for GPI, 6000 $\mu$s for MLP). The two diagnostics are magnetically disconnected and separated vertically by about 10 -- 15 cm. Fluctuation amplitudes measured by either diagnostic for both $n_e$ and $T_e$ are still in the range of 10 -- 100\%. One should also remember that, beyond the diagnostics viewing different spatiotemporal locations, systematic uncertainties extant in both the GPI and probe measurements can cause discrepancies left to be reconciled \cite{hutchinson_2002,probe_review}. For example, the MLP is intrinsically perturbative to local conditions and experimental analysis of the probe edge sheath assumes electrons can be described by a single Maxwellian velocity distribution \cite{kuang_thesis}. Additionally, while the optimization attempts to find consistent solutions within the applied framework, questions of uniqueness and generalized constraints are still being explored for better convergence. \section{\label{sec:level4.5}Conclusion} In summary, this chapter has developed a novel time-dependent deep learning framework for uncovering the turbulent fluctuations of both the plasma quantities, $n_e$ and $T_e$, as well as the neutrals underlying experimental imaging of HeI line radiation. Significantly, this allows determination of 2-dimensional fluctuation maps in the plasma boundary, revealing detailed spatiotemporal structure and nonlinear dynamics. It thereby extends the usefulness of the gas puff imaging method. The computational technique intrinsically constrains solutions via collisional radiative theory and trains networks against neutral transport physics. This advancement has allowed for the first estimates of the 2-dimensional $n_e$, $T_e$, and $n_0$ on turbulent scales which reveal fluctuation-induced ionization effects in a fusion plasma based upon optical imaging of just the 587.6 nm line. While the analysis is demonstrated on the edge of the Alcator C-Mod tokamak with quantitative agreement found with independent probe measurements, this technique is generalizable to ionized gases in a wide variety of conditions and geometries (e.g. stellarators, spheromaks, magneto-inertial fusion). A number of opportunities for future development exist. One key outstanding question is the identification of underlying numerical and physical factors contributing to non-uniqueness in outputs during optimization. From experimental noise to the chaotic properties of the turbulent system, finding sufficient conditions for precise convergence is the focus of ongoing research. Future extensions of the framework also include expanding the radial domain of coverage towards closed flux surfaces, which will require widening the queried bounds on $n_e$, $T_e$, $n_0$, and improving the overall training paradigm via adaptive training and architecture structures \cite{wang2020understanding}. For example, neutral density amplitudes can vary over orders of magnitude with steep shapes in background equilibrium profiles. Tactfully embedding this information during training of the networks can aid with the overall physical modelling via optimization. In this way, better experimental constraints from 1-dimensional data may help uncover further dynamics not otherwise directly probed by edge diagnostics. Adaptation to other experiments is a logical next step, and translating this present technique to contemporary experimental devices using helium beams is a pathway that can be explored immediately for regions that are traditionally difficult to probe (e.g. X-point). This deep learning framework can also be extended in principle to 3-dimensional geometries to account for integrated light emission along the camera's lines-of-sight. Further, this global turbulence imaging technique provides new ways to diagnose high pressure plasma events, e.g. disruptive instabilities such as edge localized modes that can be destructive to plasma facing components. Translating the framework for direct analysis of deuterium instead of helium is also possible with a few modifications, but requires investigation of relevant CR physics \cite{Greenland_full} where charge exchange and molecular effects are no longer necessarily negligible \cite{AMJUEL}. One prospect is to couple the turbulent $n_e$ and $T_e$ learned by the framework with Monte Carlo neutral transport codes \cite{STOTLER_time_dependent_DEGAS2}, potentially allowing recovery of 2-dimensional time-dependent estimates of atomic and molecular deuterium density and its emissivity, e.g. through the ultraviolet Ly$_\alpha$ line. These could be compared directly to experimental measurements of line emission from deuterium \cite{Lyalpha0,Lyalpha1}. Such extended comparisons will be important in the testing of reduced edge plasma turbulence models \cite{Mathews2021PRE}. \chapter{Initial estimates of the turbulent electric field by drift-reduced Braginskii theory in experiment} \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{Happy is he who gets to know the reasons for things.}{Virgil (70-19 BCE), Roman poet} Reduced turbulence models are, by definition, simplified descriptions of chaotic physical systems. Arguments for scale separation and geometric approximations are often undertaken in the pursuit of expedient yet reasonable estimates, but their precise effects on nonlinear processes in turbulence calculations are not always fully understood. As boundary plasmas in magnetic confinement fusion are governed by a vast range of spatiotemporal dynamics, model approximations are inevitable even using modern computing, but may only be weakly valid (if at all). To directly quantify their impacts, this chapter uses the experimental electron density and temperature inferences from Chapter 4 to compute the 2-dimensional turbulent electric field consistent with electrostatic drift-reduced Braginskii fluid theory under the assumption of axisymmetry with a purely toroidal field. The physics-informed deep learning technique outlined in Chapter 2 is used. In this present calculation, neutral deuterium sources and poloidal effects associated with parallel flows are neglected. Chapter 3 found that modelling low-$\beta$ plasmas under these exact assumptions led to excellent agreement when comparing the two-fluid theory's turbulent electric field against electromagnetic gyrokinetics. As an important first test towards translating the computational technique to experiment and directly testing reduced turbulence models, this chapter explores these approximations for an edge plasma in the Alcator C-Mod tokamak. All neglected physics can be re-inserted as a part of future work to ascertain their individual impacts, and as an initial step, the inclusion of helium gas (which is locally puffed in the experiment) is tested to gauge perturbative effects of injected neutral atoms, e.g. via the GPI diagnostic. Past simulations \cite{Thrysoe_2018,Zholobenko_2021_validation} and experiments \cite{exp0neut,exp1neut,exp2neut} have investigated the role of neutrals on edge turbulent fields, although results are at times mixed and/or inconclusive. The particle and energy sources associated with time-dependent ionization of HeI in the numerical framework are found to cause broadening in the computed turbulent electric field amplitudes along with an enhancement in correlation with the electron pressure that is not otherwise extant in plasmas without such neutral dynamics. This intensification of fields, which is due to the plasma-neutral interactions, reveals stronger ${\bf E \times B}$ flows and elevated average shearing rates on turbulent scales than expected in fully ionized gases \cite{mathews2022ErwHeI}. \section{\label{sec:level5.1}The experimental calculation} The focus of the present analysis will be plasma discharge 1120711021 from Alcator C-Mod as described in Chapter 4. This turbulent electric field calculation framework assumes the 2-dimensional experimental estimates of the electron density and temperature are parallel to the background magnetic field as developed in Chapter 2, but since GPI on Alcator C-Mod views the edge plasma in the $(R,Z)$-plane \cite{mathews2022deep}, an approximation of a purely toroidal magnetic geometry is the result. The plasma is further assumed to be magnetized, collisional, and quasineutral with the perpendicular fluid velocity given by ${\bf E \times B}$, diamagnetic, and ion polarization drifts. This chapter follows the prescription developed in Chapter 2 which utilizes just field-aligned turbulent $n_e$ and $T_e$ measurements along with Eqs. \eqref{eq:nDotGDBH} and \eqref{eq:TeDotGDBH} to calculate $\phi$ consistent with drift-reduced Braginskii theory. The equations are cast in a full-$f$ representation where fluctuations and global profiles evolve together \cite{francisquez_thesis}. No boundary nor initial conditions are explicitly assumed within the physics-informed deep learning framework. All analytic terms encoded in these continuum equations are computed exactly by the neural networks without any approximation as this machine learning framework uses a continuous spatiotemporal domain (e.g. no linearization nor discretization). Hyperdiffusion, which is ordinarily applied for stability in numerical codes, is set to zero. Density sources and energy sinks associated with time-dependent ionization of the local helium gas based upon collisional radiative modelling are outlined in Chapter 4. The sources and sinks are given by $\nSrcN = n_0 n_e S_{CR}$ and $S_{E,e} = -E_{HeI} \nSrcN$, where $n_0$ is the atomic helium density, $S_{CR}$ corresponds to the ionization rate coefficient, and $E_{HeI} = 24.587$ eV is the ionization energy of HeI. The 2-dimensional turbulent $n_e$ and $T_e$ in experiment come from an $(R,Z)$-aligned plane on open field lines with a rectangular cross-section that roughly spans $[90.3 < R \ \text{(cm)} < 90.9, -4.6 < Z \ \text{(cm)} < -1.0]$ over a duration of $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$. By assuming $\v{b_0}$ to be parallel to these measurements, the plasma turbulence model essentially neglects the poloidal component of the field lines present in Alcator C-Mod. For physical orientation, when viewed from above the machine, the toroidal magnetic field and plasma current in this discharge run clockwise. This results in the local magnetic field lines being pointed towards the imaging system and $\bf{B} \times \nabla B$ being directed downwards. Moreover, in keeping with the parallel uniformity approximation in Chapter 2, gradients along this field-aligned (nominally toroidal) direction are assumed to be small, i.e. $\nabla_\parallel \rightarrow 0$. Accordingly, an orthogonal right-handed geometry is employed for modelling whereby $x \equiv R$ is the radial coordinate, the parallel coordinate $\v{b_0} = +{\bf z}$ is purely toroidal, and the binormal (nominally vertical) direction is $y \equiv Z$. The plasma theory consists of electrons and deuterium ions with real electron-ion mass ratio, i.e. $m_i = 3.34 \times 10^{-27} \text{ kg}$ and $m_e = 9.11\times 10^{-31} \text{ kg}$. Beyond the inclusion of appropriate sources and collisional drifts, this technique \cite{Mathews2021PRE} to calculate the turbulent electric field is applicable even if multiple ions and impurities are present in the experimental plasma due to quasi-neutrality underlying the electron fluid theory in the machine learning framework \cite{multi_species}. \begin{figure} \centering \includegraphics[width=1.0\linewidth]{templates/ne_Te_phi_ER_EZ_exp_CMod_lesswide_col1.png} \caption{\label{observed_neTe_predicted_Er}The 2-dimensional $n_e$ and $T_e$ (top row) are computed from experimental GPI measurements from plasma discharge 1120711021 on Alcator C-Mod at $t = 1.312886$ s \cite{mathews2022deep}. The $E_R$ and $E_Z$ are inferred from drift-reduced Braginskii theory using these experimental $n_e$ and $T_e$ according to the deep learning framework outlined in Chapter 2 in the limiting cases of with (i.e. scaling factor of $n_0^* = 10^{19}$ m$^{-3}$) and without (i.e. $n_0^* = 0$) atomic helium sources.} \end{figure} \begin{table} \centering \renewcommand{\arraystretch}{1.} \begin{NiceTabular}{ p{0.6cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|>{\arraybackslash}p{1.2cm}| }[] {} & $n_e$ & $T_e$ & $E_R$&$E_R^{n_0}$ & $E_Z$ & $E_Z^{n_0}$\\ \cline{1-7} $n_e$ & 1.000 & 0.971 & -0.001 & 0.141 & 0.001 & -0.203 \\ \cline{1-7} $T_e$ & 0.971 & 1.000 & 0.016 & 0.154 & -0.014 & -0.203 \\ \cline{1-7} $E_R$ & -0.001 & 0.016 & 1.000 & 0.850 & 0.343 & 0.268 \\ \cline{1-7} $E_R^{n_0}$ & 0.141 & 0.154 & 0.850 & 1.000 & 0.347 & 0.287 \\ \cline{1-7} $E_Z$ & 0.001 & -0.014 & 0.343 & 0.347 & 1.000 & 0.882 \\ \cline{1-7} $E_Z^{n_0}$ & -0.203 & -0.203 & 0.268 & 0.287 & 0.882 & 1.000 \\ \end{NiceTabular} \caption[A correlation matrix of the turbulent fluctuations where $n_e$ and $T_e$ are inferred from plasma discharge 1120711021 based upon experimental GPI measurements over $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$.]{\label{table_correlation_matrix}A correlation matrix of the turbulent fluctuations where $n_e$ and $T_e$ are inferred from plasma discharge 1120711021 based upon experimental GPI measurements over $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$. The quantities $E_R^{n_0}$ and $E_R$ ($E_Z^{n_0}$ and $E_Z$) in this table correspond to the radial (vertical) turbulent electric fields predicted by drift-reduced Braginskii theory with and without HeI sources, respectively.} \end{table} \begin{figure}[ht] \includegraphics[width=1.0\linewidth]{templates/hist_Er_Ey_w_v_wo_sources_exp_CMod_newlong.png} \caption{\label{histogram_Er}Histograms of $E_R$ and $E_Z$ consistent with drift-reduced Braginskii theory in a toroidal axisymmetric geometry evaluated at the GPI pixels from $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$ in plasma discharge 1120711021 from the Alcator C-Mod tokamak.} \end{figure} \begin{figure}[ht] \includegraphics[width=1.0\linewidth]{templates/omegas_exp_CMod_lesswide_fixed.png} \caption{\label{ExB_velocity_shear}Visualizations of the radial and vertical turbulence shearing rates predicted by drift-reduced Braginskii theory in discharge 1120711021 at $t = 1.312886$ s on Alcator C-Mod under the assumption of axisymmetry with a purely toroidal magnetic field. The plots consider no sources (left) and, alternatively, neutral sources to account for time-dependent ionization of atomic helium (right).} \end{figure} As visualized in Figure \ref{observed_neTe_predicted_Er}, using the 2-dimensional $(R,Z)$-aligned experimentally-inferred $n_e$ and $T_e$ measurements from the helium GPI diagnostic, the time-dependent turbulent electric field predicted by the ascribed drift-reduced Braginskii theory is computed in the limits of (i) no sources and (ii) source effects due to time-dependent ionization of HeI. Since only the relative (and not absolute) brightness of the line emission across the field-of-view of the GPI is known for this plasma discharge, only the structure of the experimental turbulent profile of $n_0$ can be inferred. Nevertheless, as a conservative lower bound on $n_0$ \cite{Terry_private} in the model calculations to test the impacts of neutral dynamics on turbulent fields, the atomic helium density is scaled to an amplitude of approximately $10^{19}$ m$^{-3}$. Much larger scaling factors for $n_0$ (e.g. $10^{20}$ m$^{-3}$) were found to lead to numerical instability in the optimization, which suggests mathematical terms (e.g. poloidal flows) are missing in the reduced turbulence model's equations and/or that such high $n_0$ are unphysical. A matrix of correlation coefficients for these fluctuations is given in Table \ref{table_correlation_matrix}. The correlations between the turbulent electric field and $n_e$ and $T_e$ predicted by the plasma theory in fully ionized conditions are found to be nearly zero. This nonlinear connection changes with the inclusion of plasma-neutral interactions: time-dependent ionization effects due to atomic helium induce a positive (negative) dependence of the computed $E_R$ ($E_Z$) on $n_e$ and $T_e$. If the experimental $n_0$ is truly larger in magnitude, the reported correlations between these dynamical variables are expected to be even stronger. Further, the addition of neutral helium dynamics to drift-reduced Braginskii theory are found to broaden the distribution of turbulent field magnitudes over the 2-dimensional spatial domain as displayed in Figure \ref{histogram_Er}. This leads to amplified electric field fluctuations with sharper radial variation in the electric potential structure, and manifests as larger ${\bf E \times B}$ flows on turbulent scales in the boundary plasma. Intuitively, this all arises since the observed spatiotemporal evolution of $n_e$ and $T_e$ is not solely due to transport, but instead the self-consistent turbulent ${\bf E \times B}$ flows have to be mathematically balanced in Eqs. \eqref{eq:L_f_n_DotGDBH} and \eqref{eq:L_f_Te_DotGDBH} with sources and sinks. Experimentally, such effects are important for turbulence spreading \cite{Grenfell_2018} and material interactions since even small drifts can compete with flows perpendicular to surfaces at the plasma-sheath interface \cite{edge_flows}. Additionally, the radial and vertical turbulence shearing rates, $({\omega_{\bf E \times B}})_R = \lvert \partial({v_{\bf E \times B}})_Z/\partial R \rvert$ and $({\omega_{\bf E \times B}})_Z = \lvert \partial({v_{\bf E \times B}})_R/\partial Z \rvert$, are elevated on average when atomic helium is present in the edge compared to the case with no time-dependent ionization, i.e. $\langle ({\omega_{\bf E \times B}})_R \rangle$ rises from $4.74 \times 10^4$ to $5.38 \times 10^4$ s$^{-1}$ and $\langle ({\omega_{\bf E \times B}})_Z \rangle$ increases from $9.08 \times 10^3$ to $1.27 \times 10^4$ s$^{-1}$. At intermediate $n_0$ densities, $\langle ({\omega_{\bf E \times B}})_R \rangle$ and $\langle ({\omega_{\bf E \times B}})_Z \rangle$ still increase with $n_0$, although the trend is not strictly linear, as displayed in Table \ref{table_shear}. The modified shearing rates on turbulent scales visualized in Figure \ref{ExB_velocity_shear} can impact shear flow stabilization and cross-field transport of coherent structures. Not including time-dependent neutral dynamics in nonlinear simulations can accordingly mask these effects in edge profile predictions. The amplification of fields due to atomic helium and presence of correlations not present in fully ionized gases demonstrates the importance of neutrals on turbulent scales. They should thus be accounted in experimental tests to precisely validate reduced edge turbulence models, otherwise such errors in predicted fields due to plasma-neutral interactions that scale nonlinearly with $n_0$ will exist. \begin{table}[ht] \centering \renewcommand{\arraystretch}{1.} \begin{NiceTabular}{ p{2.5cm}|p{1.2cm}|p{1.2cm}|>{\arraybackslash}p{1.2cm} }[] {$n_0^* \ (10^{19}$ m$^{-3})$} & $1/4$ & $1/2$&$1$\\ \cline{1-4} $\Delta \langle ({\omega_{\bf E \times B}})_R \rangle$ & 0.42\% & 1.48\% & 13.50\% \\ \cline{1-4} $\Delta \langle ({\omega_{\bf E \times B}})_Z \rangle$ & 6.50\% & 13.44\% & 39.87\% \end{NiceTabular} \caption{\label{table_shear}Change in nonlinear turbulence shearing rates computed at varying $n_0$ and averaged over the spatiotemporal domain spanned by the camera frames. These calculations of relative change in turbulence shearing rate are with respect to the case with no sources where $\langle ({\omega_{\bf E \times B}})_R \rangle = 4.74 \times 10^4$ s$^{-1}$ and $\langle ({\omega_{\bf E \times B}})_Z \rangle = 9.08 \times 10^3$ s$^{-1}$.} \end{table} \section{\label{sec:level5.2}Present limitations and upcoming extensions} Due to the axisymmetric toroidal geometry assumed within the drift-reduced Braginskii model, direct comparisons with independent experimental diagnostics from Alcator C-Mod are not yet possible. But going forward, there are several extensions possible in translating these calculations towards empirical testing in magnetic confinement fusion devices to uncover new physics. For example, once flows and geometric effects arising from the poloidal magnetic field \cite{LaBombard_2005_flows} are inserted into the deep learning framework (and validated using modern 3-dimensional codes \cite{3D_geometry_1,3D_geometry_2,giacomin2021gbs}), the predictions from drift-reduced Braginskii theory can be directly compared to available experimental poloidal electric field measurements \cite{mccarthy_thesis}. Such experimental information can then even be used to invert the computational technique to potentially begin learning missing or misrepresented physical terms (e.g. transport coefficients, source functions). The development of edge diagnostics with wide coverage, e.g. probe arrays \cite{TCV_probe,Shao_2018}, capable of measuring radial and poloidal electric fields can thus significantly aid validation efforts especially if magnetically connected with the GPI emission cloud \cite{mathews2022deep}. It is important to underline that the presently used experimental inferences of $n_e$ and $T_e$ come from a 2-dimensional $(R,Z)$-aligned plane. If the vertically-stacked gas tubes utilized for GPI were oriented with the pitch angle of the local magnetic field, then the existing deep learning methodology, which assumes field-aligned 2D observations of $n_e$ and $T_e$, could be directly applied to better approximate the tokamak geometry with the reduced turbulence model. While such diagnostic adjustments are no longer possible on the retired Alcator C-Mod, they can be enacted on existing and upcoming fusion devices. Also, the time-dependent 2-dimensional $n_e$ and $T_e$ are based upon generalized collisional radiative constraints that are agnostic to any turbulence model. This permits the self-consistent learning of time-dependent 2-dimensional profiles for neutral species such as atomic and molecular deuterium \cite{GBS_3fluid_kineticneutrals} via application of existing Monte Carlo transport codes \cite{STOTLER_time_dependent_DEGAS2}, which could be playing a considerable role---as exemplified above by ionization of atomic helium---and can be added into the computational framework akin to that used here for helium. By isolating these effects such as the broadening of turbulent field amplitudes and shearing rates due to atomic helium, essential physics in the development of effective reduced turbulence models can be quantitatively identified. Overall, these initial calculations illustrate a novel pathway towards uncovering unobserved dynamics in experimental fusion plasmas which are conventionally difficult to diagnose. Further, by making no explicit assumptions on boundary conditions or the initializations for turbulent fields within the physics-informed deep learning framework, the nonlinear impacts of approximations (e.g. neglecting time-dependent neutrals) in these chaotic systems can be quantified on turbulent scales. \chapter{Final conclusions} Predicting edge plasma profiles is one of the greatest uncertainties in the design of fusion energy devices. To begin reducing uncertainty in turbulence models, by focusing on the defining trait of any nonlinear theory---the connections between dynamical variables---this thesis has demonstrated an original deep learning framework to start examining the quantitative accuracy of turbulent electric field predictions by the widely applied drift-reduced Braginskii model in the edge of fusion devices. A brief summary of the most important results of this thesis are as follows: First, a novel physics-informed machine learning system was created in Chapter 2 to uncover the unobserved turbulent electric field consistent with drift-reduced Braginskii theory from just partial 2-dimensional observations of the $n_e$ and $T_e$ in a synthetic plasma. This is not otherwise possible using conventional equilibrium models such as the Boltzmann relation or ion pressure balance. Moreover, this computational technique is robust to noisy measurements, which enhances its experimental applicability. In Chapter 3, this deep learning technique was utilized to compare the reduced fluid turbulence model against higher fidelity full-$f$ simulations. It demonstrates the first ever direct comparisons of nonlinear fields between two distinct global turbulence models: electrostatic drift-reduced Braginskii theory and long-wavelength electromagnetic gyrokinetics. Good quantitative agreement was confirmed between the independent models in helical plasmas similar to the edge of NSTX. At artificially elevated $\beta$, significant discrepancies in electric fields were not only observed but quantified to demonstrate that the two turbulence models were definitively inconsistent. In Chapter 4, a path was embarked on to start translating these techniques to the highest fidelity plasma of all: experiment. For this task, an entirely new optimization scheme based upon a multi-network physics-integrated framework was used to convert brightness measurements of HeI line radiation into local plasma and neutral fluctuations via the merging of transport physics and collisional radiative modelling for the $3^3 D - 2^3 P$ transition in atomic helium. This analysis for ionized gases is highly transferable to both magnetized and unmagnetized environments with arbitrary geometries. This work extends the gas puff imaging approach applied around the globe in fusion plasmas where conventional diagnostics are unable to provide such extended coverage of fluctuations. With this technique, based upon fast camera data on the Alcator C-Mod tokamak, the first 2-dimensional time-dependent experimental measurements of the $n_e$, $T_e$, and $n_0$ on turbulent scales are presented revealing shadowing effects in a fusion plasma using a single spectral line. The previous chapters' results are then collectively utilized in Chapter 5 to estimate the 2-dimensional turbulent electric field consistent with (i) drift-reduced Braginskii theory under the framework of an axisymmetric fusion plasma with purely toroidal field and (ii) experimental $n_e$ and $T_e$ measurements via gas puff imaging on Alcator C-Mod. The inclusion of atomic helium effects on particle and energy sources within the reduced turbulence model are found to strengthen correlations between the electric field and plasma pressure. The neutrals are also associated with an observed broadening of the turbulent field amplitudes and increased ${\bf E \times B}$ shearing rates. Overall, while the goal of improving confidence in predictions of edge $n_e$ and $T_e$ profiles still remains, this thesis has begun the development of a new physics-informed deep learning framework to quantitatively test a commonly used reduced edge turbulence model. In particular, by examining the relationship between $n_e$ and $T_e$ with $\phi$ on turbulent scales, good agreement is found between drift-reduced Braginskii theory and gyrokinetics at conditions relevant to modern tokamaks and novel pathways are opened for precise comparisons with experimental plasmas. This work thus emphasizes the importance of improving aspects of edge codes beyond the equations such as boundary conditions and initialization of simulations. Further, for full confidence in edge $n_e$ and $T_e$ predictions by reduced models, the channels examined need to be extended to all dynamical variables (e.g. $j_{||}$, $T_i$) beyond just $\phi$. Nevertheless, this thesis presents an important and necessary step towards this goal. \section{\label{sec:level6.1}Future works} From a computational physics perspective, there are numerous open questions. For starters, there are uncertainties arising from the intrinsic scatter associated with the stochastic optimization techniques utilized within the deep learning frameworks described in Chapters 2 to 5 to perform these turbulence calculations. While switching from first-order gradient-based methods (e.g. Adam) to approximately second-order (e.g. L-BFGS) aided training, safeguarding convergence in solutions remains a major area for improvement. Novel approaches (e.g. proximal gradient optimization algorithms, generalized loss functions) could help. The observed nonuniqueness may be a natural consequence arising from the sensitivity of the chaotic systems themselves being represented by the networks, but work is ongoing to identify the reasons---both numerical and physical---for this range and to improve precision. To better statistically capture errors, fully propagating experimental uncertainties is to be explored, although this thesis indicates a level of robustness exists to noisy $n_e$ and $T_e$ measurements. And extending the framework to infer relationships between all dynamical variables in the multi-field model with neutrals \cite{GBS_3fluid_kineticneutrals} is required for full testing Experimentally, there are several future directions created by this thesis. As noted in Chapter 5, if the gas tubes associated with GPI are aligned with the local magnetic field, then improved reconstructions of the turbulent electric field can be captured using the framework presently outlined in Chapter 2 even in the presence of significant poloidal field. Alternatively, extending the technique to innately handle 3-dimensional geometries and/or training against 2-dimensional $n_e$ and $T_e$ data from highly realistic drift-reduced Braginskii simulations employing proper tokamak geometry and sources as in \cite{giacomin2021gbs,GBS_3fluid_kineticneutrals,Zholobenko_2021_validation} could enable this work to use the existing GPI data for comparison of turbulent electric fields with available probe measurements. These increasingly sophisticated full device simulations include self-consistent kinetic neutrals (i.e. D$_2$, D) along with charged molecular species (i.e. D$_2^+$). Testing with these effects accounted will improve the overall applicability of this model to extract the turbulent electric field on new fusion devices. As an immediate extension, by coupling the learned $n_e$ and $T_e$ from Chapter 4---which uses a technique completely oblivious to plasma turbulence beyond the criteria outlined---with Monte Carlo neutral transport codes \cite{STOTLER_time_dependent_DEGAS2}, this can recover 2-dimensional time-dependent estimates of atomic and molecular species in experiment on turbulent scales. Emissivity predictions, e.g. of Ly$_\alpha$ radiation, could then be compared against experimental measurements of deuterium line emission as a secondary test of validity \cite{Lyalpha0,Lyalpha1}. These neutral profiles could also be applied in the experimental testing of reduced turbulence models. Further, the framework outlined in Chapter 4 yields new experimental pathways altogether for the GPI diagnostic. Efforts to transfer this analysis technique to existing devices with variable geometry (e.g. W7-X, TCV, DIII-D) can be tackled right away. Widening the domain towards the confined plasma to analyze pedestal dynamics will likely require significant advancements to the computational framework to simultaneously handle the multiscale behaviour in fluctuations and equilibrium profiles \cite{Fourier_multirate,wang2020understanding,wang2020eigenvector,wang2022causality}. As an example, Appendix B outlines a deep Gaussian process capable of learning transient and steep features (e.g. formation of pedestals across transitions between confinement regimes) in otherwise slowly evolving profiles. Bayesian integration of networks with such experimental information on macroscopic scales from independent plasma diagnostics could help augment their ability to learn edge dynamics. In addition, if not generalizing the GPI analysis technique to 3 dimensions, applying highly collimated HeI beams is sought for good reconstruction of the turbulent $n_e$ and $T_e$. On this point, the encoded velocity closure for neutral transport should be carefully examined---or perhaps even learned by networks---in novel experimental scenarios. A spectrometer with sufficiently high spectral resolution could also experimentally measure the Doppler shift. Finally, while the deep learning framework for GPI analysis can technically utilize deuterium line emission instead of puffing HeI, all the criteria listed in Chapter 4 would need to be re-visited and suitably developed to account for effects such as charge-exchange and recombination. \section{\label{sec:level6.2}Last remarks} While we began to understand the structure and potential of atomic nuclei just about one century ago, we are only now starting to delve into the structure and potential of neural networks. The practical ability for these artificial circuits to represent physical systems such as ionized gases permits this thesis to no longer use power laws but partial differential equations as regression constraints when training on spatiotemporally evolving (simulation or experimental) data on turbulent scales beyond 0-dimensional quantities. But unlocking their potential may not always be simple. Turbulence is fundamentally complex, and so may be the tools used to model it. Nevertheless, these tools can provide useful representations and insights not otherwise easy to uncover to view plasma dynamics in altogether new ways. This thesis itself represents just part of the beginning of a powerful technique with computational graphs that can solve essential problems in turbulence and the confinement of fusion energy systems to help continue providing breakthroughs in advancing human knowledge and technology. \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{The hardest problems we have to face do not come from philosophical questions about whether brains are machines or not. There is not the slightest reason to doubt that brains are anything other than machines with enormous numbers of parts that work in perfect accord with physical laws. As far as anyone can tell, our minds are merely complex processes. The serious problems come from our having had so little experience with machines of such complexity that we are not yet prepared to think effectively about them.}{Marvin Minsky} \newpage \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{Let us return for a moment to Lady Lovelace’s objection, which stated that the machine can only do what we tell it to do. One could say that a man can ``inject'' an idea into the machine, and that it will respond to a certain extent and then drop into quiescence, like a piano string struck by a hammer. Another simile would be an atomic pile of less than critical size: an injected idea is to correspond to a neutron entering the pile from without. Each such neutron will cause a certain disturbance which eventually dies away. If, however, the size of the pile is sufficiently increased, the disturbance caused by such an incoming neutron will very likely go on and on increasing until the whole pile is destroyed. Is there a corresponding phenomenon for minds, and is there one for machines? There does seem to be one for the human mind. The majority of them seem to be ``sub critical,'' i.e. to correspond in this analogy to piles of sub-critical size. An idea presented to such a mind will on average give rise to less than one idea in reply. A smallish proportion are supercritical. An idea presented to such a mind may give rise to a whole ``theory'' consisting of secondary, tertiary and more remote ideas. Animals’ minds seem to be very definitely sub-critical. Adhering to this analogy we ask, ``Can a machine be made to be super-critical?''}{Alan Turing} \section*{Acknowledgments} \setlength{\epigraphwidth}{0.8\textwidth} \epigraph{I suppose in the end, the whole of life becomes an act of letting go, but what always hurts the most is not taking a moment to say goodbye.}{Yann Martel, Life of Pi} It is only as I stitch together the final pieces of my PhD that I am realizing it is nearly over. A trek that once almost felt endless just a short while ago is now just about finished. And at this end, there are countless people to thank. To start, this thesis and myself owe immense gratitude to J.W. Hughes. He provided me an example every day of what it means to be a good scientist and an even better human. Freedom is not worth having if it does not include the freedom to make mistakes\footnote{Mahatma Gandhi}, and Jerry aptly provided ample freedom to find my own meaningful problems and make my own mistakes. There may be no greater gift as a student, and Jerry's wit---in life and experiment---made this journey a joy. I thank A.E. White for making this work all possible beginning on the first day I walked into the PSFC as a Cantabrigian by bringing Jerry into her office. While the project evolved over the years, Anne knew how to start it all. And ever since our first serendipitous encounter in Austin, D.R. Hatch was a source of constant encouragement when exploring unknown territory and truly beginning this research. I am also grateful to my thesis defence members D.G. Whyte and J.D. Hare for their time in crafting this dissertation. At every stage, from my NSE admission letter to navigating a pandemic abroad, B. Baker was incredibly supportive throughout the entirety of graduate school. Upon first meeting Mana on campus, I didn't realize how instrumental he would be to this work as a mentor and a friend, but this document would not exist without him. I can also say essentially all the same about Jim, who truly made these last chapters of the thesis possible. And while he may not be a formal co-author listed on publications, I wholeheartedly thank Ted for always being there at the beginning of my PhD. I could not have asked for a better neighbour. I am also indebted to the contributions of all my collaborators: M. Francisquez taught me to conduct the two-fluid simulations presented in Chapter 2 using the \texttt{GDB} code run on MIT's Engaging cluster and co-developed with B. Zhu and B.N. Rogers; N. Mandell developed and ran the electromagnetic gyrokinetic simulations described in Chapter 3, which were performed on the Perseus cluster at Princeton University and the Cori cluster at NERSC, and based upon the \texttt{Gkeyll} framework led by A. Hakim and G.W. Hammett; B. LaBombard and D. Brunner operated the mirror Langmuir probe utilized in Chapter 4; A.Q. Kuang and M.A. Miller assisted with probe data analysis in Chapter 4; S.G. Baek ran DEGAS2 simulations to inform neutral modelling in Chapters 4 and 5; J.L. Terry and S.J. Zweben operated the GPI diagnostic in Chapters 4 and 5; M. Goto, D. Stotler, D. Reiter, and W. Zholobenko developed the HeI collisional radiative codes employed in Chapters 4 and 5. The content of these pages are enabled by their technical support and camaraderie. Any errors in this thesis are my own. While this may be the end of my PhD at MIT, the sights of Park Street and Killian Court will forever feel warm. I thank all the wonderful people I ran into on Albany Street and across the world over the past years including Nick, Francesco, Pablo, Rachel, Beatrice, Thanh, Eli, Bodhi, Fernanda, Nima (Harvard's P283B taught me to truly view physics questions as constrained-optimization problems), Lt. Reynolds, Erica, Muni, Christian, Patricio, Yu-Jou, Libby, Cassidy, Alex, Lucio, Aaron, Sam, Evan, Anna (from Switzerland), Anna (from Austria), Manon, Eva, Josh, and the never-faraway Peter. Prior to ever setting foot in Cambridge, I am truly lucky to have met a lifelong teacher and advisor in Martin, who pushed me to this point starting from London. I also thank my best friends in Canada for always making me feel at home wherever I am---from Fenway Park with Katie and Sammy, to sailing into the Charles with Donna, to the great lake with George and Maher (or even adventuring on it in Niagara), to escaping the French secret police with Dylan, to Adam's backyards in Toronto and Montr\'eal and Killarney, to living in a van across Valhalla and sleeping in train stations by Berchtesgaden with Nicholas---no place is ever too distant. There are also many people without whom this thesis would literally not be possible such as the great folks at Jasper Health Services for helping me to still write, Mississauga Fire Department for allowing me to still breathe, and Procyon Wildlife for inspiring me years ago and still to this day. But beyond all, this PhD is the product of the unconditional love and support I constantly get from my big family---all the way from my dear grandparents to my boisterous cousins who are always full of life. At the core, my parents instilled the values of good work and education in me at an early age. Together with my older brother, they endlessly push me in everything that I do with their time and heart and extraordinary cooking. There can never be enough appreciation for all they've done and for what they mean to me. And to my littlest brother, Kobe, thank you for teaching me to see the world \\ \noindent\rule{15.25cm}{0.4pt} \\ \\ {\it \noindent As you set out for Ithaka\\ hope your road is a long one,\\ full of adventure, full of discovery.\\ Laistrygonians, Cyclops,\\ angry Poseidon---don’t be afraid of them:\\ you’ll never find things like that on your way\\ as long as you keep your thoughts raised high,\\ as long as a rare excitement\\ stirs your spirit and your body.\\ Laistrygonians, Cyclops,\\ wild Poseidon---you won’t encounter them\\ unless you bring them along inside your soul,\\ unless your soul sets them up in front of you.\\ \vspace{-0.7cm} \\ \\ Hope your road is a long one.\\ May there be many summer mornings when,\\ with what pleasure, what joy,\\ you enter harbors you’re seeing for the first time;\\ may you stop at Phoenician trading stations\\ to buy fine things,\\ mother of pearl and coral, amber and ebony,\\ sensual perfume of every kind---\\ as many sensual perfumes as you can;\\ and may you visit many Egyptian cities\\ to learn and go on learning from their scholars.\\ \vspace{-0.7cm} \\ \\ Keep Ithaka always in your mind.\\ Arriving there is what you’re destined for.\\ But don’t hurry the journey at all.\\ Better if it lasts for years,\\ so you’re old by the time you reach the island,\\ wealthy with all you’ve gained on the way,\\ not expecting Ithaka to make you rich.\\ \vspace{-0.7cm} \\ \\ Ithaka gave you the marvelous journey.\\ Without her you wouldn't have set out.\\ She has nothing left to give you now.\\ \vspace{-0.7cm} \\ \\ And if you find her poor, Ithaka won’t have fooled you.\\ Wise as you will have become, so full of experience,\\ you’ll have understood by then what these Ithakas mean.}\vspace{0.4cm}\\{--- C. P. Cavafy (translated by Edmund Keeley)} \newpage \section*{List of Publications} Part of the content included in this thesis has already been published in peer-reviewed journals or is presently under referee review. Permission to reuse text and figures from these articles has been granted and are listed below: \begin{itemize} \item {\bf A. Mathews}, J.W. Hughes, J.L. Terry, S.G. Baek, “Deep electric field predictions by drift-reduced Braginskii theory with plasma-neutral interactions based upon experimental images of boundary turbulence” arXiv:2204.11689 (2022) \item {\bf A. Mathews}, J.L. Terry, S.G. Baek, J.W. Hughes, A.Q. Kuang, B. LaBombard, M.A. Miller, D. Stotler, D. Reiter, W. Zholobenko, and M. Goto, “Deep modelling of plasma and neutral fluctuations from gas puff turbulence imaging” arXiv:2201.09988 (2022) \item {\bf A. Mathews}, N. Mandell, M. Francisquez, J.W. Hughes, and A. Hakim, “Turbulent field fluctuations in gyrokinetic and fluid plasmas” Physics of Plasmas {\bf 28}, 112301 (2021) \item {\bf A. Mathews}, M. Francisquez, J.W. Hughes, D.R. Hatch, B. Zhu, and B.N. Rogers, “Uncovering turbulent plasma dynamics via deep learning from partial observations” Physical Review E {\bf 104}, 025205 (2021) \item {\bf A. Mathews} and J.W. Hughes, “Quantifying experimental edge plasma evolution via multidimensional adaptive Gaussian process regression” IEEE Transactions on Plasma Science {\bf 49}, 12 (2021) \end{itemize} \noindent Funding support came from the Natural Sciences and Engineering Research Council of Canada (NSERC) through the doctoral postgraduate scholarship (PGS D), U.S. Department of Energy (DOE) Office of Science under the Fusion Energy Sciences program by contract DE-SC0014264, Joseph P. Kearney Fellowship, and Manson Benedict Fellowship from the MIT Department of Nuclear Science and Engineering. \chapter{Normalization of drift reduced Braginskii fluid theory} \setlength{\epigraphwidth}{0.7\textwidth} \epigraph{Keep computations to the lowest level of the multiplication table.}{David Hilbert} Converting the drift-reduced Braginskii equations from physical units to a normalized form is useful to numerically solve the model with both finite difference schema and physics-informed machine learning codes. For completeness, the full normalization procedure is shown below. The physical variables and all associated quantities are transformed according to \cite{francisquez2020fluid} \begin{align} \label{eq:normSMT1} \begin{split} n &\leftarrow n/n_0, \\ \phi &\leftarrow \phi/\phi_0, \\ \end{split} \quad \begin{split} T_{s} &\leftarrow T_{s}/T_{s0}, \\ v_{\parallel s} &\leftarrow v_{\parallel s}/c_{s0}, \\ \end{split} \end{align} where $n_0 = 5 \times 10^{19} \text{ m}^{-3}$, $T_{s0} = 25 \text{ eV}$, $c_{s0}^2 = T_{s0}/m_i$, $\phi_0 = B_0 a_0^2/ct_0$, and $t_0 = \sqrt{a_0 R_c/2}/c_{e0}$ is the interchange-like reference timescale. To match the simulation with experimental edge parameters of the Alcator C-Mod tokamak, $B_0 = B_{axis} R_0 /(R_0 + a_0)$ and $R_c = R_0 + a_0$. This in turn defines the following dimensionless constants \begin{eqnal} \!\begin{aligned} \epsilon_R &= \frac{2a}{R_c}, \\ \epsilon_v &= \frac{c_{e0}t_0}{R_c}, \\ \tau &= \frac{T_{i0}}{T_{e0}}, \end{aligned} \qquad \!\begin{aligned} \kappa^i &= 3.9\frac{2}{3}\frac{\TiReft_0}{m_i R_c^2\nu_{i0}}, \\ \eta &= 0.51\nu_{e0}t_0, \\ \kappa^e &= 3.2\frac{2}{3}\frac{\TeReft_0}{\nu_{e0}m_e R_c^2}, \end{aligned} \qquad \!\begin{aligned} \alpha_d &= \frac{T_{e0} ct_0}{eB_0 a^2}, \\ \epsilon_G &= \frac{0.08\tau}{\nu_{i0} t_0}, \\ \epsilon_{Ge} &= \frac{0.73}{12\nu_{e0}t_0} \end{aligned} \end{eqnal} where $c$ and $\nu_{s 0}$ denote the speed of light and collision rate \cite{Huba2013}, respectively. The spatiotemporal coordinates are normalized by the following conversions \begin{align} \label{eq:normXYZT} \begin{split} x &\leftarrow x/a_0, \\ z &\leftarrow z/R_0, \\ \end{split} \quad \begin{split} y &\leftarrow y/a_0, \\ t &\leftarrow t/t_0. \\ \end{split} \end{align} With these transformations, the unitless equations numerically solved are \begin{eqnal}\label{eq:normlnDotGDBH} \d{^e\ln n}{t} = -\epsilon_R\left[\curv{\phi}-\alpha_d\frac{\curv{p_e}}{n}\right] -\epsilon_v\delpar{\vpe}+\frac{1}{n}\nSrcN+\mathcal{D}_{\ln n} \end{eqnal} \begin{eqnal}\label{eq:normwDotGDBH} \pd{\gvort}{t} &= \curv{p_e}+\tau\curv{p_i}+\frac{\epsilon_v}{\alpha_d\epsilon_R}\delpar{j_{\parallel}}-\epsilon_G\curv{G_i} \\ &\quad-\div{\lbrace\frac{n}{B^3}\left[\phi,\gradperp{\phi}+\tau\alpha_d\frac{\gradperp{p_i}}{n}\right]+ \\ &\quad\sqrt{\tau}\epsilon_v\frac{n}{B^2}\vpi\delpar{\left(\gradperp{\phi}+\tau\alpha_d\frac{\gradperp{ p_i}}{n}\right)}\rbrace}+\mathcal{D}_{\gvort} \end{eqnal} \begin{eqnal}\label{eq:normvpeDotGDBH} \d{^e\vpe}{t} &= \frac{m_i}{m_e}\epsilon_v\left(\frac{1}{\alpha_d}\delpar{\phi}-\frac{\delpar{p_e}}{n}-0.71\delpar{T_e}\right) \\ &\quad +4\epsilon_v\epsilon_{Ge}\frac{m_i}{m_e}\frac{\delpar{G_e}}{n} +\epsilon_R\alpha_d T_e\curv{\vpe} +\eta\frac{j_{\parallel}}{T_e^{3/2}} +\momSrce +\mathcal{D}_{\vpi} \end{eqnal} \begin{eqnal}\label{eq:normvpiDotGDBH} \d{^i\vpi}{t} &= -\frac{\epsilon_v}{\sqrt{\tau}}\left(\frac{1}{\alpha_d}\delpar{\phi}+\tau\frac{\delpar{p_i}}{n}-0.71\delpar{T_e}\right) \\ &\quad +\frac{4\epsilon_v\epsilon_G}{\sqrt{\tau}}\frac{\delpar{G_i}}{n} -\epsilon_R\tau\alpha_d T_i\curv{\vpi} -\frac{m_e}{m_i}\frac{\eta}{\sqrt{\tau}}\frac{j_{\parallel}}{T_e^{3/2}} +\momSrci+\mathcal{D}_{\vpi} \end{eqnal} \begin{eqnal}\label{eq:normlTeDotGDBH} \d{^e\ln T_e}{t} &= \frac{5}{3}\epsilon_R\alpha_d\curv{T_e}+\frac{\kappa^e}{p_e}\delpar{T_e^{7/2}\delpar{\ln T_e}} -\frac{2}{3}\epsilon_v\delpar{\vpe} \\ &+\frac{2}{3n}\left[0.71\epsilon_v\left(\delpar{j_{\parallel}}-j_{\parallel}\delpar{\ln T_e}\right) +\frac{m_e}{m_i}\eta\frac{j_{\parallel}^2}{T_e^{5/2}}\right] \\ &-\frac{2}{3}\epsilon_R\left[\curv{\phi}-\alpha_d\frac{\curv{p_e}}{n}\right] +\frac{2}{3}\frac{1}{p_e}\enerSrceN +\mathcal{D}_{\ln T_e} \end{eqnal} \begin{eqnal}\label{eq:normlTiDotGDBH} \d{^i\ln T_i}{t} &= -\frac{5}{3}\tau\epsilon_R\alpha_d \curv{T_i}+\frac{\kappa^i}{p_i}\delpar{T_i^{7/2}\delpar{\ln T_i}} +\frac{2}{3}\frac{1}{p_i}\enerSrciN+\mathcal{D}_{\ln T_i}\\ &+\frac{2}{3}\left\lbrace -\epsilon_R\left[\curv{\phi}-\alpha_d\frac{\curv{p_e}}{n}\right] -\sqrt{\tau}\epsilon_v\delpar{\vpi} +\epsilon_v\frac{\delpar{j_{\parallel}}}{n}\right\rbrace, \end{eqnal} where the normalized diffusivities applied for all dynamical variables in only Chapter 2 are $\chi_x = -4.54 \times 10^{-10}$, $\chi_y = -1.89 \times 10^{-9}$, and $\chi_z = -8.91 \times 10^{-3}$. The normalized evolution equations given by \eqref{eq:normlnDotGDBH} and \eqref{eq:normlTeDotGDBH} are the physical model constraints learnt in the machine learning framework employed in Chapters 2, 3, and 5. A few subtle yet importance differences exist between the physical theory posed and the construction of the synthetic plasma in Chapter 2. One deviation between the theorized plasma and the one produced computationally is that the numerical code actually evolves the logarithmic form of $n$, $T_e$, and $T_i$ to enforce positivity and the high order diffusion operators act on these logarithmic quantities, too. While equivalent analytically, this choice numerically forces the drift-reduced Braginskii equations to be posed and solved in non-conservative form by the finite difference solver. Consequent errors due to numerical approximation can manifest as unexpected artificial sources or sinks in the simulation domain \cite{francisquez2020fluid}. In addition, simulation boundaries applied in practice only approximately satisfy the zero flux conditions when employing even- and odd-symmetry conditions on a cell-centered discretized grid \cite{francisquez2020fluid}. These computational discrepancies can cause potential misalignment between inferred dynamics using idealized theory and numerical modelling of the synthetic plasma's turbulent fields. Physics-informed deep learning can overcome these numerical limitations when representing plasma theory since positivity can be intrinsically encoded in the network. Further, it employs a continuous spatiotemporal domain and the nonlinear continuum equations represented by \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH} are consequently evaluated exactly up to computer precision \cite{Raissi_JMLR}. Unphysical numerical dissipation in observational data can therefore present deviations from reflecting the sought theory, but reasonable agreement is nevertheless found when analyzing the synthetic measurements with the partial differential equations embedded in the machine learning framework. \clearpage \newpage \chapter{Quantifying experimental profile evolution via multidimensional Gaussian process regression} \setlength{\epigraphwidth}{0.875\textwidth} \epigraph{I remember my friend Johnny von Neumann used to say, `with four parameters I can fit an elephant and with five I can make him wiggle his trunk.'}{Enrico Fermi, as quoted by Freeman Dyson} The edge density and temperature profiles of tokamak plasmas are strongly correlated with energy and particle confinement and resolving these profiles is fundamental to understanding edge dynamics. These quantities exhibit behaviours ranging from sharp plasma gradients and fast transient phenomena (e.g. transitions between low and high confinement regimes) to nominal stationary phases. Analysis of experimental edge measurements motivates robust fitting techniques to capture dynamic spatiotemporal evolution. Additionally, fusion plasma diagnostics have intrinsic measurement errors and data analysis requires a statistical framework to accurately quantify uncertainties. Appendix B outlines a generalized multidimensional adaptive Gaussian process routine capable of automatically handling noisy data and spatiotemporal correlations. This technique focuses on the edge-pedestal region in order to underline advancements in quantifying time-dependent plasma structures including transport barrier formation on the Alcator C-Mod tokamak. Outputs from this regression can be used to physically inform and prime neural networks about background profiles. Automatically generating accurate pedestal plasma density and temperature profiles requires handling large quantities of noisy observations. Current fitting routines in the fusion community involve a range of methods including nonlinear least squares via modified hyperbolic tangent functions \cite{Groebner_2001}, cubic splines \cite{Diallo_2011}, and various Bayesian techniques \cite{Fischer_2010}. Past Gaussian process (GP) regression codes typically fixed covariance function length scales \cite{Chilenski_2015} and generally permitted only one-dimensional scenarios to build radial profiles. This requires filtering or averaging temporal variation in data which can be limiting in the edge especially when analyzing transient phenomena such as spontaneous transitions of confinement regimes and transport barrier formation \cite{Mathews_2019}. Capability to capture both mean spatial and temporal variations of edge plasma profiles and associated gradients is therefore sought. Towards this task a deep multidimensional heteroscedastic GP routine was developed to provide automated fitting and uncertainty estimates from the Thomson scattering diagnostic on the Alcator C-Mod tokamak. Evolution of both plasma density and temperature is tracked across the edge-pedestal region with varying length scales typical of experimental data including the formation of both particle and energy transport barriers. This technique has the capability to routinely process thousands of discharges automatically to yield profile statistics and be run across novel experiments. The methodology and accompanying mathematical proofs are provided along with demonstrations on experimental data from Alcator C-Mod exhibiting transport barriers. \section{Method} The technique applied for reconstructing edge-pedestal plasma profiles is an adaptive heteroscedastic multidimensional GP routine. Each of these terms are individually defined and outlined below to introduce the scope of this method. \subsection{Gaussian process} A GP is a supervised learning method capable of solving classification and regression problems. The capability of fitting profiles via nonlinear probabilistic regression is the main focus of this appendix. In particular, the underlying assumption is that the variable (e.g. plasma density) being predicted at a certain location is normally distributed and spatiotemporally correlated with neighbouring points, indicating that partial observations provide information at nearby locations for conditioning future predictions. The function space definition of a GP is that any finite collection of the random variables modelled follow a joint Gaussian distribution, i.e. $(y_i,y_j) \sim \mathcal{N}(\mu,\Sigma)$ and any subset is given by $y_i \sim f({\bf x}_i) + \sigma_n\mathcal{N}(0,I)$ \cite{Rasmussen_2005}, where $\sigma^2_n$ is the noise variance. A GP is specified entirely up to its second-order statistics as denoted by the mean, $\mu({\bf x}_i)$, and covariance, $\Sigma({\bf x}_i,{\bf x}_j)$. Consequently, conditional predictions at ${\bf x}_b$ based upon observations at ${\bf x}_a$ are analytically given by \cite{Rasmussen_2005}: \begin{align} \label{GPR_machinery1} {\boldsymbol\mu}_{{ \bf y}_b \vert { \bf y}_a} = \boldsymbol\mu_b+\Sigma_{b,a}{\Sigma_{a,a}}^{-1}({\boldsymbol y_a}-\boldsymbol\mu_a) \end{align} \begin{align} \label{GPR_machinery2} {\Sigma}_{{ \bf y}_b \vert { \bf y}_a} = \Sigma_{b,b}-\Sigma_{b,a}{\Sigma_{a,a}}^{-1}\Sigma_{a,b} \end{align} To provide a brief proof of (\ref{GPR_machinery1}) and (\ref{GPR_machinery2}), one should note that a normally distributed random variable, ${\bf y}$, in $N$-dimensions is modelled by \cite{Rasmussen_2005} \begin{equation} P({ \bf y} \vert {\boldsymbol\mu}, { \bf \Sigma}) = \frac {1}{2\pi^{N/2} \lvert { \bf \Sigma} \rvert^{1/2}} \exp[-\frac{1}{2}({ \bf y}-{\boldsymbol\mu})^T { \bf \Sigma}^{-1} ({ \bf y}-{\boldsymbol\mu})], \end{equation} where ${ \bf \Sigma}$ is a positive semi-definite covariance matrix, ${\boldsymbol\mu} = [\mu_1, ..., \mu_N]$, ${ \bf y} = [y_1, ..., y_N]$, and ${\bf \Sigma}_{i,j} = \mathbb{E}[(y_i - \mu_i)(y_j - \mu_j)]$. In this formalism, the conditional probability of predicting a new point (or set of points), ${\bf y}_b$, can be ascertained from an observed point (or set of points), ${ \bf y}_a$, through the posterior distribution: ${ \bf y}_b \vert { \bf y}_a \sim \mathcal{N}({\boldsymbol\mu}_{{ \bf y}_b \vert { \bf y}_a},{\Sigma}_{{ \bf y}_b \vert { \bf y}_a})$. Following the treatment in \cite{Tso2010}, \eqref{GPR_machinery1} and \eqref{GPR_machinery2} can be derived by defining ${\bf z} \equiv {\bf y}_b + {\bf A} {\bf y}_a $ where ${\bf A} \equiv -\Sigma_{b,a} \Sigma^{-1}_{a,a}$, implying \begin{align} {\rm cov}({\bf z}, {\bf y}_a) &= {\rm cov}( {\bf y}_{b}, {\bf y}_a ) + {\rm cov}({\bf A}{\bf y}_a, {\bf y}_a) \nonumber \\ &= \Sigma_{b,a} + {\bf A} {\rm var}({\bf y}_a) \nonumber \\ &= \Sigma_{b,a} - \Sigma_{b,a} \Sigma^{-1}_{a,a} \Sigma_{a,a} \nonumber \\ &= 0 \end{align} Consequently, ${\bf z}$ and ${\bf y}_a$ are uncorrelated and, since they are assumed jointly normal in GP regression, they are independent. It is evident $\mathbb{E}[{\bf z}] = {\boldsymbol \mu}_b + {\bf A} {\boldsymbol \mu}_a$, and it follows that the conditional mean can be expressed as \begin{align} \mathbb{E}[{\bf y}_b | {\bf y}_a] &= \mathbb{E}[ {\bf z} - {\bf A} {\bf y}_a | {\bf y}_b] \nonumber \\ & = \mathbb{E}[{\bf z}|{\bf y}_a] - \mathbb{E}[{\bf A}{\bf y}_a|{\bf y}_a] \nonumber \\ & = \mathbb{E}[{\bf z}] - {\bf A}{\bf y}_a \nonumber \\ & = {\boldsymbol \mu}_b + {\bf A} ({\boldsymbol \mu}_a - {\bf y}_a) \nonumber \\ & = {\boldsymbol \mu}_b + \Sigma_{b,a} \Sigma^{-1}_{a,a} ({\bf y}_a- {\boldsymbol \mu}_a) \end{align} which proves the conditional mean \eqref{GPR_machinery1}, and \begin{align} {\rm var}({\bf x}-{\bf D}{\bf y}) &\equiv {\rm var}({\bf x}) + {\bf D}{\rm var}({\bf y}){\bf D}^T \nonumber - {\rm cov}({\bf x},{\bf y}){\bf D}^T - {\bf D}{\rm cov}({\bf y},{\bf x}) \end{align} implies \begin{align} {\rm var}({\bf y}_b|{\bf y}_a) &= {\rm var}({\bf z} - {\bf A} {\bf y}_a | {\bf y}_a) \nonumber \\ &= {\rm var}({\bf z}|{\bf y}_a) + {\rm var}({\bf A} {\bf y}_a | {\bf y}_a) \nonumber - {\bf A}{\rm cov}({\bf y}_a, {\bf z}) - {\rm cov}({\bf z}, {\bf y}_a) {\bf A}^T \nonumber \\ &= {\rm var}({\bf z}|{\bf y}_a) = {\rm var}({\bf z}) \end{align} Plugging the above result into the conditional variance yields \eqref{GPR_machinery2}, \begin{align} {\rm var}({\bf y}_b|{\bf y}_a) &= {\rm var}( {\bf y}_b + {\bf A} {\bf y}_a ) \nonumber \\ &= {\rm var}( {\bf y}_b ) + {\bf A} {\rm var}( {\bf y}_a ) {\bf A}^T + {\bf A} {\rm cov}({\bf y}_b,{\bf y}_a) + {\rm cov}({\bf y}_a,{\bf y}_b) {\bf A}^T \nonumber \\ &= \Sigma_{b,b} +\Sigma_{a,b} \Sigma^{-1}_{a,a} \Sigma_{a,a}\Sigma^{-1}_{a,a}\Sigma_{a,b} - 2 \Sigma_{b,a} \Sigma_{a,a}^{-1} \Sigma_{a,b} \nonumber \\ &= \Sigma_{b,b} +\Sigma_{b,a} \Sigma^{-1}_{a,a}\Sigma_{a,b} \nonumber - \indent 2 \Sigma_{b,a} \Sigma_{a,a}^{-1} \Sigma_{a,b} \nonumber \\ &= \Sigma_{b,b} -\Sigma_{b,a} \Sigma^{-1}_{a,a}\Sigma_{a,b} \end{align} Therefore, all that is required for the GP machinery are priors over ${\bf y}_a$ and ${\bf y}_b$ to obtain $\boldsymbol\mu_a$ and $\boldsymbol\mu_b$, respectively, and a covariance function which is defined in this paper by a heteroscedastic uncertainty component, $\epsilon$, along with an adaptive kernel function, $k({\bf x}_i,{\bf x}_j)$. The resulting covariance, $\Sigma_{i,j} = k({\bf x}_i,{\bf x}_j) + \epsilon({\bf x}_i) \delta_{i,j}$, describes similarity between data points and accounts for spatiotemporal correlations in the data since ${\bf x}$ represents the independent variables (e.g. $\psi$ and $t$). The hyperparameters of the prescribed adaptive kernel function are optimized through maximum {\it a posteriori} estimation on each individual discharge's observed data. Practically, given an experimental set of noisy measurements at arbitrary positions and times, this formalism allows inference of expected values across the spatiotemporal domain. Suitably selecting the kernel function, $k({\bf x}_i,{\bf x}_j)$, representing the full covariance is critical to the GP since it specifies the correlation between any pairs of random variables. Constraining kernels will consequently limit the range of behaviour that can be captured by the GP which may only be physically warranted in certain scenarios. To remain robust to tracking a wide range of spatiotemporal behaviour, an adaptive heteroscedastic kernel is optimized against experimental data. Utilizing alternative distributions (e.g. log-normal) and latent variable transformations can also permit scenarios with non-Gaussian residuals \cite{wang2012gaussian}, although Gaussianity is assumed here. \subsection{Adaptivity} GP regression is a nonparametric method without an explicit functional form. Nonparametric in this context means that there are no fixed number of constraining model parameters but instead the fitting routine becomes increasingly constrained as training data increases. Correlations between observed data points are based upon the prescribed covariance function. Various kernels have been proposed to embed this structure ranging from a Gaussian function (for expectedly smooth behaviour) to periodic functions (for expectedly cyclic behaviour) to combinations of multiple kernels (e.g. for automatic relevance determination) \cite{DD_thesis}. Despite the generic regression technique lacking a strictly fixed functional form, the optimized hyperparameters defining the kernel are typically constrained themselves. For example, a standard stationary isotropic Mat\'ern kernel is defined by \begin{equation} k({\bf x}_i,{\bf x}_j) = \sigma^2_k\frac{2^{1-\nu}}{\Gamma(\nu)}\Bigg(\sqrt{2\nu}\frac{|{\bf x}_i - {\bf x}_j| }{\rho}\Bigg)^\nu K_\nu\Bigg(\sqrt{2\nu}\frac{|{\bf x}_i - {\bf x}_j|}{\rho}\Bigg) \end{equation} where $\Gamma$ is the gamma function, $K_\nu$ is the modified Bessel function of the second kind, and $\rho$ and $\nu$ are non-negative globally constant hyperparameters which control spatial range and smoothness, respectively. A Mat\'ern kernel is $\nu - 1$ times differentiable and reduces to a Gaussian kernel in the limit $\nu \rightarrow \infty$ while becoming an exponential kernel when $\nu = 1/2$ \cite{Genton_2002}. It resultantly covers a wide class of kernels. Nevertheless, the hyperparameters are quite restrictive if simply constants \cite{heinonen16,2d-gpr-tomography}. Therefore, a version of the generalized nonstationary Mat\'ern kernel is encoded as \cite{Paciorek_2006,Plagemann_2008}: \begin{equation} \label{adaptive_kernel} k({\bf x}_i,{\bf x}_j) = \sigma^2_k \frac{2^{1-\nu}}{\Gamma(\nu)} \frac{|\rho_i|^{1/2}|\rho_j|^{1/2}}{\sqrt{\frac{1}{2}\rho^2_i + \frac{1}{2}\rho^2_j}} \Bigg(2\sqrt{\frac{2\nu |{\bf x}_i - {\bf x}_j|^2}{\rho^2_i + \rho^2_j}}\Bigg)^\nu K_\nu\Bigg(2\sqrt{\frac{2\nu |{\bf x}_i - {\bf x}_j|^2}{\rho^2_i + \rho^2_j}}\Bigg) \end{equation} where $\rho$ varies across the entire multidimensional domain and adapts to optimize the length scale based upon the experimental data being trained upon in each individual plasma discharge. The kernel accomplishes learning point estimates of local smoothness by representing the primary GP's locally isotropic length scale hyperparameter by a secondary GP with radial basis function (RBF) kernel that allows global variation of $\rho$ across the spatiotemporal grid. It is this second-level GP which introduces the notion of a deep process and adaptivity to the overall regression technique. A stationary kernel is purely a function of $\bf{x}_i - \bf{x}_j$, while additional local dependence exists in (\ref{adaptive_kernel}) through $\rho$ which introduces nonstationary behaviour \cite{Plagemann_2008}. A k-means clustering algorithm is used for training of the secondary GP which parametrizes the nonstationary covariances with latent length-scales \cite{Plagemann_2008}. \begin{figure} \centering \includegraphics[width=0.495\linewidth]{templates/lls_1d_data.png} \includegraphics[width=0.49\linewidth]{templates/lls_1d_scales.png} \caption{Comparison of two separate GPs simply training on 1-dimensional data: one employs a standard Mat\'ern kernel while the other includes an adaptive length scale. Fits to the original data samples (left) and computed length scales (right) are displayed. Figure courtesy of J.H. Metzen.} \label{fig:1dlls} \end{figure} Figure \ref{fig:1dlls} demonstrates a basic 1-dimensional example of a sinusoidal function with imposed discontinuity. The advantage conferred by the adaptive length scale can be quantitatively observed by comparing the log marginal likelihood (LML) \cite{Rasmussen_2005} between a standard Mat\'ern kernel and one with locally adaptive length scale. The order of magnitude improvement of LML (which is a logarithmic quantity) indicated in Figure \ref{fig:1dlls} occurs because a stationary Mat\'ern kernel is forced to decrease its constant global length scale considerably while an adaptive length scale permits reducing its value locally only near the discontinuity. The adaptive length scales not only provide the capability to better capture singular or transient phenomena on otherwise slowly-varying profiles but importantly improves uncertainty estimates across the domain. The code sets $\nu = 3/2$, which allows for potentially stiff behaviour and this value can be modified, if sought. It can also be kept as a variable for optimization to capture an entire spectrum of kernel functions. The user can freely specify upper and lower bounds on length scales to be learned across the grid which are given uniform prior distributions during training. As a preview for the application of these methods, the length scales can be extended to multidimensional scenarios as depicted in Figure \ref{fig:2dlls} where the learned input length scale varies across the entire spatial and temporal domain. The exact same kernel was initialized for both the data sets used in Figure \ref{fig:2dlls}, but since the datasets were themselves different, the locally learned length scales vary. A custom stochastic optimizer based on differential evolution is used in these examples for GP hyperparameter-tuning and finally polished off with gradient-based descent. Finding a global optimum in the likelihood function is not guaranteed, therefore this is helpful because the loss function may be multimodal and challenging for simple gradient-based methods acting on non-convex problems. \begin{figure} \centering \includegraphics[width=0.48\linewidth]{lls_n.png} \includegraphics[width=0.48\linewidth]{lls_T.png} \caption{Two examples of learning length scales that vary across the spatiotemporal domain by training identical GP models on experimentally measured electron density (left) and temperature (right) from the Thomson scattering diagnostic.} \label{fig:2dlls} \end{figure} \subsection{Heteroscedasticity} Heteroscedasticity refers to learning intrinsic scatter associated with the noisy variable, $y$, and introducing non-constant variances. The full covariance function applied in the GP can be broken down into an adaptive kernel and noisy variance component: \begin{equation} \Sigma({\bf x}_i,{\bf x}_j) = \underbrace{k({\bf x}_i,{\bf x}_j)}_{\text{adaptive}} + \underbrace{\sigma^2_n({\bf x}_i) \delta_{ij}}_{\text{heteroscedastic}} \end{equation} and heteroscedasticity is mathematically defined by $\sigma_n({\bf x}_i)$ having an explicit dependence on points in the input space. To contrast, homoscedasticity would entail a globally constant $\sigma_n$. To more vividly demonstrate the benefit of heteroscedasticity, a 1-dimensional example is displayed in Figure \ref{hetero_figure} by applying both homoscedastic and heteroscedastic components. The function to be learned is a linear relationship with variance growing quadratically along the abscissa. In this scenario with a homoscedastic noise model, the GP is forced to learn a constant intrinsic scatter in the underlying data commonly represented by white noise functions of constant amplitude. It is evident that enabling a heteroscedastic covariance function better captures the distribution of observed data. The mean estimates of both models are equivalent, but the predicted variances across the domain are markedly different and the heteroscedastic example obtains a larger LML and better captures intrinsic scatter in the data. The non-constant variances are learned across the domain using a k-means algorithm \cite{LIKAS2003451} to once again identify clustering centers to provide characteristic noise estimates even when explicit error bars are absent. These prototype values are then extended across the domain by using a pairwise RBF kernel. Both the adaptive length scale kernel and heteroscedastic components are combined to significantly improve overall fitting and stability of the numerical optimization. For example, they avoid zero variances while training. This heteroscedastic term in the full data-driven covariance function is modular to an extent and can be optionally subtracted away to output confidence intervals ($\mathbb{V}[f_*]$) instead of prediction intervals ($\mathbb{V}[y_*]$) which are wider and account for intrinsic scatter in observations. (Note that $\mathbb{E}[f_*] \equiv \mathbb{E}[y_*]$.) \begin{figure} \centering \includegraphics[width=0.47\linewidth]{templates/homoscedastic.png} \includegraphics[width=0.47\linewidth]{templates/heteroscedastic.png} \caption{Comparison of two separate GPs on 1-dimensional data both using an RBF kernel. The difference is that one utilizes an additional homoscedastic component (left) while the other GP uses a heteroscedastic component (right) in the full covariance structure. Figure courtesy of J.H. Metzen.} \label{hetero_figure} \end{figure} \subsection{Multidimensional} GPs do not require a fixed discretization scheme over the physical domain and hence easily handle spatially and temporally scattered diagnostic measurements involved in nonlinear regression. The generalized kernel above is encoded to handle data spanning any number of dimensions. Due to the highly non-convex optimization problem associated with finding optimal hyperparameters across the multidimensional space, the training applies stochastic optimization (Storn algorithm \cite{Storn_alg}) with gradient descent at the end to help avoid becoming trapped in local minima. An associated error checking routine has been developed and available in the code on GitHub to automatically identify regions of the domain, if any, over which the GP did not successfully converge during training and requiring further optimization. Generally, multidimensional sampling of the GP is performed by applying \begin{equation} f_* = \mu_* + B\mathcal{N}(0,I) \end{equation} where $B B^T = \Sigma_*$ and $B$ is a triangular matrix known as the Cholesky decomposition of the covariance matrix. To account for constraints such as monotonicity or positivity with respect to the mean in sampled profiles, modified or truncated normal distributions can be enabled in the code to permit constrained GP sampling to yield physically relevant results. Finally, the technique's flexibility allows it to automatically handle vast data sets (e.g. thousands of discharges fitted in parallel) to efficiently construct large multidimensional profile databases with minimal user input. \begin{figure} \begin{center} \includegraphics[width=0.975\linewidth]{templates/lls_2d_n.png} \caption{Corresponding length scales, $\rho$, learned across the spatial and temporal domain based on training of the adaptive heteroscedastic GP.} \label{lls_n_2d} \end{center} \end{figure} \section{Application to experimental data} The aforementioned adaptive heteroscedastic GP is now directly applied to experimental data originating from the Thomson scattering diagnostic on Alcator C-Mod which consists of two Nd:YAG lasers, each pulsing at 30 Hz. The measurements have an approximate spatial resolution of 1.0 cm and 1.3 mm in the core and edge, respectively \cite{JWHughes-TS-diagnostic}. It is noted that the GP itself is a continuous regression model and can provide fittings at arbitrary spatial and temporal resolution. Discharge number 1091016033 is analyzed which exhibits L-, H-, and I-mode behaviours within this single discharge as detailed in \cite{Whyte_2010}. Ion cyclotron range of frequencies (ICRF) heating of up to 5 MW is applied in the experiment with power primarily deposited in the core on the hydrogen minority species. The on-axis magnetic field is 5.6 T with a plasma current of approximately 1.2 MA. There is a wide range of plasma behaviour associated with time-varying density and temperature pedestal structure even in this single discharge including transport barrier formation and confinement mode transitions necessitating a suitably robust regression method. The tools outlined above have been demonstrated on discharge 1091016033, and can be easily automated for edge data analyses across any set of plasma discharges on Alcator C-Mod, or on other tokamaks with sufficiently resolved kinetic profiles. \begin{figure} \centering \includegraphics[width=0.48\linewidth]{2D-GPR_n.png} \includegraphics[width=0.48\linewidth]{2D-dndx.png} \caption{Electron density and corresponding spatial gradients produced by the adaptive heteroscedastic GP. This technique accounts for both spatial and temporal evolution of experimental data across the entire discharge over the edge-pedestal region (i.e. $0.85 < \psi < 1.05$, which covers data on both open and closed field lines).} \label{2D-GPR} \end{figure} \begin{center} \begin{figure*} \includegraphics[width=0.325\linewidth]{L-mode-GPR.png} \includegraphics[width=0.325\linewidth]{I-mode-GPR.png} \includegraphics[width=0.325\linewidth]{H-mode-GPR.png} \\ \includegraphics[width=0.325\linewidth]{L-mode-GPR_der.png} \includegraphics[width=0.325\linewidth]{I-mode-GPR_der.png} \includegraphics[width=0.325\linewidth]{H-mode-GPR_der.png} \caption{Electron density and temperature measurements during L- (left), I- (middle), and H-modes (right) fitted by the adaptive heteroscedastic GP without time-averaging experimental data. Proximity of experimental data to the time at which the GP is predicting is indicated by transparency of the data points. For simple demonstrative purposes, 95\% prediction intervals are displayed in the top three plots while 95\% confidence intervals are applied for the bottom.} \label{1D-GPR} \end{figure*} \end{center} To begin, the trained GPs can compute expected mean density and temperature along with corresponding uncertainties across the entire spatiotemporal domain covered by the plasma diagnostic. Spatial gradients (or time derivatives) can be directly produced and are displayed in Figure \ref{2D-GPR} for electron density across the grid as well. The key advantage of applying the adaptive GP for edge profile fitting is its ability to learn spatiotemporal correlations across the entire domain without any temporal averaging nor spatial filtering of data. This freedom in training is evident in the learned variable length scales for density across the discharge as visualized in Figure \ref{lls_n_2d}. Particular time slices can also be evaluated by the GPs. Fitted L-, I-, and H-mode profiles from discharge 1091016033 are displayed in Figure \ref{1D-GPR} without employing any time-averaging or filtering of experimental data as required when repeatedly applying a modified tanh function, which can miss important profile variation even within a confinement regime (e.g. while ramping up auxiliary heating). Density and temperature gradients along with uncertainties for all quantities are available across the experiment during L-, H-, and I-mode phases at times of 800, 1200, and 1475 milliseconds, respectively \cite{Whyte_2010}. A major benefit derived from applying the adaptive heteroscedastic GP is its ability to provide defining features (e.g. spatial and temporal gradients) of experimental profiles automatically across entire discharges. In past classification exercises to develop large confinement regime databases \cite{Mathews_2019}, individual time slices needed to be manually reviewed for the presence of density and/or temperature pedestals to identify windows containing different regimes (e.g. L-, H-, or I-modes). This is a highly time-intensive and arguably subjective route to develop meaningful confinement regime databases since discretely classifying plasma behaviour can miss underlying nuances (e.g. staircase pedestals, profile hollowing). Applying this multidimensional GP regression method can automate characterization of discharges based upon quantitative profile characteristics such as gradient scale lengths. It can handle variation across the edge-pedestal region which connects the high temperature core with the colder SOL upon crossing the separatrix. Different varieties of stationary confinement regimes may have quite different profile dynamics and structure for temperature and density necessitating adaptive fitting capability. Additionally, outputting the time-dependent evolution of plasma profiles and gradients with corresponding uncertainties helps capture subtleties in edge structures which are essential to better understand how confinement regimes across the entire discharge. Resolving these features helps improve systematic reconstructions of experimental measurements for further large scale analysis, for example in running stability codes or scientific machine learning, or in empirical database studies, e.g. characterizing upstream conditions of background plasmas for divertor heat flux studies \cite{Silvagni_2020}. For example, the multidimensional GP can provide key profile information into plasma simulations (e.g. inputs for global gyrokinetic codes or comparisons with EPED \cite{Snyder_2009}) which may require sampling inputs such as gradient profiles to output sufficient statistics. Additionally, the denoised equilibrium plasma dynamics can be useful observational constraints in scientific learning applications such as in Chapter 4. Overall, the outlined adaptive multidimensional GP regression routine can automate fitting and uncertainty estimation of edge-pedestal measurements from the Thomson scattering diagnostic on the Alcator C-Mod tokamak while being robust to edge-pedestal phenomena. Spatiotemporal evolution of plasma density and temperature is tracked with varying length scales extant in experimental data including the formation of both particle and energy transport barriers. Structure imposed on learned edge gradient profiles is minimized by using a data-driven kernel function which can be critical to model plasmas near sensitive instability boundaries. The application is focused on edge measurements of tokamak plasmas with relevance to numerical analysis of the pedestal, but these techniques extend beyond analysis of the edge-pedestal region and can be suitably adapted to novel scenarios exhibiting singular transient events. The GP introduced provides an automated tool to tackle nonlinear multidimensional regression tasks and helps resolve measurements of equilibrium profiles with dynamics spanning a wide range of physical scales. \chapter{Code and data availability} \section*{Chapter 2} \noindent All relevant data files and codes for constructing the deep networks can be found on Github at: \url{https://github.com/AbhilashMathews/PlasmaPINNs}. \section*{Chapter 3} \noindent All relevant data files and codes can be found on Github at \url{https://github.com/AbhilashMathews/PlasmaPINNtheory} and \url{https://github.com/ammarhakim/gky\\l-paper-inp/tree/master/2021_PoP_GK_Fluid_PINN}. Full documentation on the gyrokinetic simulation framework with the \texttt{Gkeyll} code is located at \url{https://gkeyll.readthedocs.io/en/latest/}. \section*{Chapter 4} The codes applied to analyze experimental GPI data are available on the MIT Engaging cluster at the following directory: \texttt{/home/mathewsa/PINNs/GPI}. \noindent The scripts there for training the deep learning framework realizations are: \noindent \texttt{GPI\_test\_HeI\_DEGAS2\_probe\_time\_2012\_best\_const\_priming\_rep\_v0.py} -- \\ \texttt{GPI\_test\_HeI\_DEGAS2\_probe\_time\_2012\_best\_const\_priming\_rep\_v799.py}. \noindent After training is complete, one can utilize the following scripts for plotting: \\ \texttt{GPI\_theory\_2D\_paper\_best\_prime\_1120711021\_probe\_time\_interval.py} and \\ \texttt{GPIpaper\_bestprime\_figures\_plot+save.py} (running certain functions in \\these codes will require access to the MFE workstations located at the PSFC). \\ \\ \noindent The HeI collisional radiative code \cite{GOTO_2003,Zholobenko_thesis} is written in C and utilizes the GNU Scientific Library (GSL) for numerical calculations. It is located on Engaging at: \\ \texttt{/net/eofe-data005/psfclab001/mathewsa/hecrmodel\_WZmodified\_NAG\_compatible} \noindent To compute all population and rate coefficients, users should prepare their own main function according to their purposes. Example makefiles (e.g. \texttt{Makefile\_PEC\_loop}) are included in the directory for this purpose. The energy levels are numbered in the code with $1^1$S, $2^1$S, $2^3$S, $2^1$P, $2^3$P, $3^1$S, $3^3$S, ... are indexed as 0, 1, 2, 3, 4, 5, 6, ..., respectively. Consequently, all singlet levels except $1^1$S have odd numbers and all triplet levels have even numbers. Labels like \texttt{S3P}, which means ``singlet 3P'', can be used to designate energy levels instead of the numbers. The correspondence between the numbers and the labels are defined in \texttt{hecrm.h}. The input parameters are the magnetic field strength (T) which is used for the singlet-triplet wavefunction mixing calculations, the electron temperature (eV) and the electron density (cm$^{-3}$). They are set in the \texttt{crmodel.prm structure}. See \texttt{hecrm.h} and \texttt{run.c}. The results are stored in the three structures, i.e., rate coefficient, population coefficient and \texttt{cr\_rate\_coefficient}, after calling the \texttt{hecrmodel} function. See \texttt{hecrm.h} for details. \noindent The population of a level $p$, $n(p)$ is expressed with the population coefficients as \begin{equation} n(p) = r_0(p)n_en_i + r_1(p)n_en(1^1S) + r_2(p)n_en(2^1S) + r_3(p)n_en(2^3S) \end{equation} \noindent in Formulation I, and as \begin{equation} n(p) = R_0(p)n_en_i + R_1(p)n_en(1^1S) \end{equation} \noindent in Formulation II, which is the one utilized in this thesis. The population coefficients in Formulation I and in Formulation II are stored respectively in the vectors \texttt{r0}, \texttt{r1}, \texttt{r2}, and \texttt{r3} and in the vectors \texttt{rr0} and \texttt{rr1} of the population coefficient structure. When the population coefficient structure is declared as \texttt{popcoe} like in the sample code \texttt{PEC\_run\_loop\_dens.c}, $R_1(3^3D)$ is found in \texttt{popcoe[i].rr1[T3D]}, where \texttt{i} is the index for the \texttt{ne} array. The spontaneous transition probabilities, i.e. Einstein A coefficients, are given in the matrix \texttt{a} of the rate coefficient structure. When the structure is declared as \texttt{rate}, the Einstein A coefficient for the transition $3^3D \rightarrow 2^3P$, for example, is taken as \texttt{gsl\_matrix\_get(rate.a, T3D, T2P)} or \texttt{MG(rate.a, T3D, T2P)}. Here, \texttt{MG} is the short form of \texttt{gsl\_matrix\_get} as defined in \texttt{hecrm.h}. Additional coefficients calculated in the code are stored in \texttt{cr\_rate\_coefficient} \cite{Fujimoto1979ACM,GOTO_2003}\footnote{Note: the electron temperature for the results in Fig. 7 of \cite{GOTO_2003} is 1 eV, not 10 eV.}. \\ \\ \noindent Files for computing Greenland's criteria and their outputs including $\tau_Q$ are located in the directory: \texttt{/net/eofe-data005/psfclab001/mathewsa/hecrmodel\_WZmodified\_\\NAG\_compatible/NAG/nll6i271bl/hecrmodel\_WZmodified}. Note that running these codes require usage of the commercial package \texttt{NAG Library (Mark 27.1)}. \section*{Chapter 5} The scripts for training the deep learning framework realizations are:\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_no\_sources\_rep\_v0.py} --\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_no\_sources\_rep\_v99.py} and\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_fix\_sources\_rep\_v0.py} --\\ \texttt{CMod\_ES\_DRB\_exp\_Er\_1120711021bestprime\_fix\_sources\_rep\_v99.py} with\\ \texttt{plotting\_final\_paper+chapter\_plots.py} for plotting. \section*{Appendix B} All relevant data files and codes can be found on Github at \url{https://github.com/AbhilashMathews/gp_extras_applications}, which are based upon the \texttt{gp\_extras} package by J.H. Metzen at \url{https://github.com/jmetzen/gp\_extras}. \chapter{Introduction} \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{It is a profound and necessary truth that the deep things in science are not found because they are useful: they are found because it was possible to find them.}{J. Robert Oppenheimer} With the neutron discovered less than a century ago \cite{Chadwick_Nobel}, efforts to precisely understand the structure and potential of atomic nuclei have produced breakthroughs in human knowledge and technology. The beginning of World War II launched an era of covert and public research into unlocking the power of the atom, and it is still being widely explored today. One method found to generate power via the interaction of nuclei is through their fusion, where the difference in mass between reactants and products results in net energy. Humanity's advancements are linked with access to power \cite{Earth1,Earth2,Earth3}. As a potential source of abundant electricity across Earth and the depths of space, fusion energy is amongst society's greatest objectives. Due to their relatively large terrestrial abundance and/or cross-sections, the fusion reactions with hydrogen isotopes of primary interest in modern experiments include \begin{equation} ^2_1\text{D} \ + \ ^2_1\text{D} \ \rightarrow \ ^3_2\text{He} \ (0.82 \text{ MeV}) \ + \ ^1_0\text{n} \ (2.45 \text{ MeV}) \end{equation} \begin{equation} ^2_1\text{D} \ + \ ^2_1\text{D} \ \rightarrow \ ^3_1\text{T} \ (1.01 \text{ MeV}) \ + \ ^1_1\text{H} \ (3.02 \text{ MeV}) \end{equation} \begin{equation} ^2_1\text{D} \ + \ ^3_1\text{T} \ \rightarrow \ ^4_2\text{He} \ (3.52 \text{ MeV}) \ + \ ^1_0\text{n} \ (14.08 \text{ MeV}), \end{equation} but the fusing of these atomic nuclei to yield energy requires the right conditions. Conditions generally reliant upon the hydrogen isotopes being highly energetic themselves since the strong nuclear force can only overcome electrostatic repulsion between nuclei when they are in sufficiently close spatial proximity on the order of femtometres. Such energetic conditions generally necessitate the interacting species exist in ionized states collectively known as plasmas. Past work has demonstrated that fusion reactor concepts with nonequilibrium plasmas are unfeasible (without methods to recirculate power at high efficiencies) \cite{rider_thesis}. Reactors with hot plasmas near thermodynamic equilibrium accordingly require good bulk confinement. If defining the circulating power quality factor as $Q = P_f/P_h$, where $P_h$ is the externally applied heating and $P_f$ is the net thermonuclear power, then a simple power balance calculation of an equilibrium plasma (without radiative losses nor electricity recovery from auxiliary sources) finds the following modified Lawson criterion: \begin{equation}\label{eq:Lawson} n \tau_E = \frac{12 T}{\langle \sigma v \rangle Y_c}\frac{1}{1 + 5/Q} \end{equation} \noindent where $\langle \sigma v \rangle$ is the fusion reaction rate coefficient, $Y_c$ corresponds to the energy yield of charged particles, $\tau_E$ represents the characteristic energy confinement time, and $n$ and $T$ are the volume-averaged plasma density and temperature, respectively, under the approximations of quasineutrality and equilibration between ions and electrons in the plasma. The condition of $Q = 1$ is known as energy breakeven, and fusion power plants ideally seek to operate with $Q \gg 1$ for economic feasibility. If considering $^2_1$D-$^3_1$T plasmas, where $\langle \sigma v \rangle \sim T^2$ in conditions of interest to maximize the equilibrium plasma's fusion reaction rate, then the triple product metric can be cast as \begin{equation}\label{eq:triple_product} n T \tau_E \sim \frac{1}{1 + 5/Q}, \end{equation} \noindent which is directly related to $Q$. Namely, a fusion reactor's efficiency is strongly dependent upon the pressure and energy confinement time of the plasma \cite{twofluid_Lawson}. \section{Magnetic confinement fusion} Decades of worldwide effort on developing fusion concepts have resulted in the creation of numerous experiments, with a magnetic confinement fusion design known as the ``tokamak'' demonstrating values of $Q$ nearing 1 \cite{wurzel2022progress}. Tokamaks confine electrically conductive plasmas in a toroidal chamber using magnetic fields, which aim to insulate the hot ionized gas from the solid walls of the machine. The charged particles continuously swirl along magnetic field lines with toroidal and poloidal components conventionally induced by external electromagnets and transformer coils, respectively, to optimize plasma confinement by accounting for drifts of the gyrating ions and electrons in this curvilinear geometry. But as new tokamaks are being built in attempts to exceed breakeven and demonstrate the viability of fusion energy technology, there are significant uncertainties associated with predictions of $n T \tau_E$ in existing and upcoming experiments from first principles. That is because tokamak plasma transport tends to not only be determined by classical collisional processes diffusing particles and energy across inhomogeneous magnetic fields. Rather, the behaviour of these experimental plasmas are commonly anomalous and strongly influenced by turbulence \cite{Wesson_tokamaks}, which is often termed ``the most important unsolved problem of classical physics.''\footnote{Richard P. Feynman} To step over this difficulty, the fusion community has in large part relied upon empirical confinement scalings of $\tau_E$ derived from fitting power laws against 0-dimensional observational data and operational parameters across international fusion experiments \cite{scaling1,Physics__2007}. Cross-machine scalings have been similarly developed for estimating the structure of edge pressure profiles \cite{pedestal_scaling2,pedestal_scaling3,pedestal_scaling4} and heat flux widths \cite{Eich_2013,Brunner_2018} since boundary plasma turbulence is difficult to wholly simulate yet strongly influences global profiles and power handling. While these regression efforts are useful for building intuition on physical trends in experiment \cite{Buck-pal,Connor_1977,Petty_2008,Freidberg_elongation}, their ability to extrapolate to novel fusion plasma regimes is not clearly known. Recent progress in integrated modelling efforts have increased the fidelity of tokamak performance calculations \cite{SPARC_confinment}, i.e. to effectively estimate \{$n$, $T$, $\tau_E$\} and thereby $Q$ on future devices, but these core transport simulations still invoke questionable assumptions, particularly in the treatment of boundary conditions which crucially impact reactor performance, core fuelling, and safety of the vessel wall \cite{edge_core_association0,edge_core_association1}. Modelling turbulent edge profiles in magnetic confinement fusion devices is especially challenging due to the vast dynamical scales and nontrivial geometry and neutral interactions present whilst going from the hot confined region to the cooler boundary plasmas striking solid material surfaces just a few centimetres away. The sharp plasma gradients extant are potential sources of free energy associated with turbulent edge transport where fluctuation amplitudes can be on the same order as the background quantities. These dynamics can be described by kinetic theory where the evolution of the distribution function of any species $\alpha$, $f_\alpha$, is given by \begin{equation}\label{eq:kinetic_theory} \frac{d f_\alpha}{d t} = \frac{\partial f_\alpha}{\partial t} + {\bf \dot{x}}\frac{\partial f_\alpha}{\partial {\bf x}} + {\bf \dot{v}}\frac{\partial f_\alpha}{\partial {\bf v}} = C\{f_\alpha\} + S\{f_\alpha\}, \end{equation} \noindent where the terms $C\{f_\alpha\}$ and $S\{f_\alpha\}$ symbolize collisions and sources, respectively, in this 6-dimensional phase space. Fully kinetic global simulations for whole device modelling are intractable, though, even with modern computing facilities. Model approximations are thus inevitable, but once approximations are introduced into edge turbulence models, their effects on nonlinear dynamics need to be quantitatively evaluated---against higher fidelity simulations and/or experiment, if possible---for model predictions to be meaningful. An oft-applied set of equations to study the plasma edge is drift-reduced Braginskii fluid theory, which has been studied for decades starting from Braginskii's original formulation \cite{Braginskii1965RvPP}, and remains a highly active research area today \cite{BOUT++,TOKAM3X,GBS,Stegmeir2018,GDB,Thrysoe_2020,giacomin2021gbs,GBS_3fluid_kineticneutrals}. But the underlying model approximations tend to only be marginally satisfied in fusion plasmas and there is a scarcity of clear-cut validation tests of the theory against higher-fidelity simulations or experimental measurements. Even with modern drift-reduced Braginskii codes, diagnostic comparisons tend to be qualitative with considerable uncertainties in quantitative accuracy \cite{2009val,2011val,NIELSEN2015,2016val,2016val_v2,Nielsen_2019,2020val,2021val,code_2022_validations}, although these efforts are improving \cite{Zholobenko_2021_validation}. This challenge in precisely ascertaining the reduced turbulence theory's predictive reliability is in part due to difficulties in aligning nonlinear calculations with numerous free parameters for chaotic systems \cite{chaos_review,chaos_turbulence,chaos_edge}. Unobserved dynamics related to sources and boundaries can be tough to diagnose on turbulent scales in the harsh conditions and geometry of the plasma edge. Quantitative methods to unambiguously test validity are thus needed if there is to be any certainty when using edge models to improve integrated simulations of fusion reactors. One hallmark of a turbulence theory is the nonlinear connection that it sets between dynamical variables as visualized in Figure \ref{simple_network_graph}. For ionized gases, perturbations in the plasma are intrinsically linked with perturbations of the electromagnetic field. Accordingly, the electric potential response concomitant with electron pressure fluctuations constitutes one of the key relationships demarcating a plasma turbulence theory and presents a significant consistency test en route to its full validation. The electric field perpendicular to magnetic field lines is a particularly important quantity as it is a strong drive of cross-field fluxes and thus edge pressure profiles on turbulent scales. These ${\bf E \times B}$ flows are observed to strongly influence edge plasma stability \cite{osti_1630104,osti_1762124} and the motion of coherent structures which can account for significant particle losses during standard operation of tokamaks \cite{blobs_review,Carralero_2017,Kube_2018}. Resultant turbulence-induced fluxes impacting walls can cause sputtering, erosion, and impurity injection which can further adversely affect safe operation and confinement of fusion plasmas \cite{blobs_review,kuang_SPARC,kuang_ARC}. Therefore, it is imperative that transport models for boundary plasmas are capable of accurately predicting the turbulent electric field response to electron pressure fluctuations. The aim of this thesis is to build a framework to examine this fundamental relationship and quantitative impacts from common approximations on turbulent fields as expected in drift-reduced Braginskii fluid theory. The machinery used for this objective are physics-informed neural networks (PINNs). \begin{figure}[ht] \centering \includegraphics[width=0.625\linewidth]{templates/Figure1_thesis_update.png} \caption{\label{simple_network_graph}A visual representation of connections that exist and define multi-field turbulence models. The nonlinear relationship between $n_e$ and $T_e$ with $\phi$ will be examined in this thesis for plasma conditions relevant to nuclear fusion.} \end{figure} \section{Deep learning of physics} At its core, this thesis seeks to utilize machine learning---computation algorithms training to complete objectives by the use of experience and data---to model turbulent physical systems. It is instructive to translate the language of machine learning into physics for building familiarity and understanding why such efforts could potentially help advance turbulence modelling. To start, it is useful to consider a generic goal shared by physics and machine learning: predict physical variable(s) ${\bf y}$ based upon observation(s) of ${\bf x}$. Experimentally, one is interested in the distribution $p({\bf y} \lvert {\bf x})$ denoting the conditional probability of ${\bf y}$ given ${\bf x}$. Following the exposition in \cite{tegmark}, this statement can be expressed via Bayes’ theorem as \begin{equation}\label{eq:Bayes1} p({\bf y} \lvert {\bf x}) = p({\bf x} \lvert {\bf y})p({\bf y})/p({\bf x}) = p({\bf x} \lvert {\bf y})p({\bf y})/\sum\limits_{{\bf y}'} p({\bf x}' \lvert {\bf y}')p({\bf y}'). \end{equation} The negative logarithm of these probabilities can be defined according to \begin{equation} H_{\bf y}({\bf x}) \equiv -\ln p({\bf x} \lvert {\bf y}), \end{equation} \begin{equation} \mu_{\bf y} \equiv -\ln p({\bf y}), \end{equation} \noindent where $H_{\bf y}({\bf x})$ represents the Hamiltonian of ${\bf x}$ given ${\bf y}$ up to an arbitrary additive constant. Eq. \eqref{eq:Bayes1} can accordingly be recast in the usual Boltzmann form as \begin{equation} p({\bf y} \lvert {\bf x}) = \frac{1}{N({\bf x})}e^{-[ H_{\bf y}({\bf x}) + \mu_{\bf y}]} \end{equation} with \begin{equation} N({\bf x}) = \sum_{{\bf y}'} e^{-[ H_{{\bf y}'}({\bf x}) + \mu_{{\bf y}'}]}. \end{equation} To understand how a neural network can map this vector-valued function given by Bayes' theorem, one recognizes that a simple $n$-layer feedforward network is just a series of linear and nonlinear transformations in succession equal to \begin{equation}{\label{simple_network_eqn}} {\bf f(x)} = {\bf \sigma}_n {\bf A}_n ... {\bf \sigma}_2 {\bf A}_2 {\bf \sigma}_1 {\bf A}_1 {\bf x}, \end{equation} \noindent where ${\bf \sigma}_i$ is a nonlinear operator, and ${\bf A}_i$ are affine transformations of the form ${\bf A}_i {\bf x} = {\bf W}_i {\bf x} + {\bf b}_i$ with weight matrices ${\bf W}_i$ and bias vectors ${\bf b}_i$ that need to be tuned. The more layers present, the ``deeper'' the network. These weights and biases are analogous to the set of coefficients optimized in ordinary polynomial regression, but the functional form of the solution is not necessarily fixed {\it a priori}. This is motivated by multilayer feedforward neural networks being universal function approximators in theory capable of approximating any measurable function to arbitrary degrees of accuracy \cite{cybenko_approximation_1989,HORNIK}. These neurons (universal analog computing modules) constituting graph networks are akin to NAND gates (universal digital computing modules) in logic circuits: any computable function can be accurately described by a sufficiently large network of them. And just as NAND gates are not unique (e.g. NOR gates are also universal), nor is any particular activation function \cite{tegmark}. Regularly chosen nonlinear operators for neurons include local functions such as the hyperbolic tangent, \begin{equation} \text{tanh}(x) = (e^x - e^{-x})/(e^x + e^{-x}), \end{equation} \noindent or collective operations such as {\it max-pooling} (i.e. maximum of all vector elements). One function known as {\it softmax} exponentiates and normalizes all terms according to \begin{equation} \sigma(x_i) \equiv e^{x_i}/\sum\limits_{i} e^{x_i}. \end{equation} For any Hamiltonian approximated by an $n$-layer feedforward neural network, one can therefore fully represent the sought physical variable's distribution by simply applying the computational graph's outputs through a softmax layer, \begin{equation} {\bf p({\bf y} \lvert x)} = \sigma[-{\bf H_y (x)} - {\bf \mu_y}]. \end{equation} But this expression for the sought probability distribution is an accurate representation only if the graphs are adequately trained to learn the original Hamiltonian function. Whether the networks are practically capable of learning such dynamics, e.g. ${\bf H_y (x)}$, is not always clear. In practice, there are numerous deeply interconnected influences jointly acting on networks during learning including construction of the overall graph architecture, initialization of ${\bf W}_i$ and ${\bf b}_i$, complexity of the objective function (e.g. Hamiltonian), selection of nonlinear activation in neurons, potential lack of a deterministic relationship between the given inputs and targets, and the optimization procedure employed for training ${\bf W}_i$ and ${\bf b}_i$ \cite{GlorotAISTATS2010,tegmark,wang2020understanding,HORNIK}. While advancements in all categories are essential in the generalized learning of complex systems with artificial intelligence, for the task of representing edge plasma turbulence, physics-informed constraints (e.g. partial differential equations, algebraic expressions, correlations) are embedded into the training of networks to uncover unobserved dynamics ($\bf y$) given limited information ($\bf x$). The ability to exactly differentiate graphs significantly enables physically useful and computationally efficient mathematical constructions that can serve as regularization mechanisms \cite{raissi2017physics}. If a network is trying to represent the Hamiltonian, for example, then its self-differentiation with respect to phase space coordinates would yield the classical equations of motion, which can act to physically inform and numerically guide ${\bf W}_i$ and ${\bf b}_i$ to help us uncover what we can. This ethos will be at the heart of this analysis of fusion plasmas in both simulation and experiment with networks representing turbulent fields in these systems. \section{Outline of chapters} The primary results composing this thesis include the development of a novel physics-informed deep learning technique in Chapter 2 to uncover the turbulent electric field consistent with drift-reduced Braginskii theory from just 2-dimensional electron pressure measurements aligned with the magnetic field. In Chapter 3, this computational technique enables the first direct comparisons of instantaneous turbulent fields between two distinct full-$f$ global plasma turbulence models: electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetics. Good agreement is found between the two models in magnetized helical plasmas at low normalized pressure while being quantitatively inconsistent at high-$\beta$. To transfer the above turbulent field analysis framework to boundary plasmas in experiment, Chapter 4 develops and demonstrates an entirely new optimization technique to translate brightness measurements of HeI line radiation into local plasma and neutral fluctuations via a novel integrated framework of networks that combines neutral transport physics and collisional radiative theory for the $3^3 D - 2^3 P$ transition in atomic helium. This analysis for ionized gases is transferable to both magnetized and unmagnetized environments with arbitrary geometries and extends the gas puff imaging approach in fusion plasmas. Based upon fast camera data on the Alcator C-Mod tokamak, the first 2-dimensional time-dependent experimental measurements of the turbulent electron density, electron temperature, and neutral density are presented in a fusion plasma using a single spectral line. These experimental measurements are then utilized in Chapter 5 to estimate the 2-dimensional turbulent electric field consistent with drift-reduced Braginskii theory under the framework of an axisymmetric fusion plasma with purely toroidal field. To further examine the effects of approximations in neutral dynamics on turbulent field predictions, calculations are performed with and without atomic helium effects on particle and energy sources within the reduced plasma turbulence model. The inclusion of neutral helium (which is locally puffed in the experiment) is found to strengthen correlations between the electric field and plasma pressure. The neutral dynamics are also associated with an observed broadening of turbulent field fluctuation amplitudes, underlining their quantitative importance on turbulent ${\bf E \times B}$ flows and edge shearing of coherent plasma structures. \chapter{Uncovering turbulent fields from electron pressure observations} \setlength{\epigraphwidth}{1.0\textwidth} \epigraph{There is a physical problem that is common to many fields, that is very old, and that has not been solved. It is not the problem of finding new fundamental particles, but something left over from a long time ago---over a hundred years. Nobody in physics has really been able to analyze it mathematically satisfactorily in spite of its importance to the sister sciences. It is the analysis of circulating or turbulent fluids.}{Richard P. Feynman} \setlength{\epigraphwidth}{0.5\textwidth} \epigraph{Shall I refuse my dinner because I do not fully understand the process of digestion?}{Oliver Heaviside} The boundary region is critical in determining a fusion reactor's overall viability since edge plasma conditions strongly influence a myriad of reactor operations \cite{Federici_2001,Li2020,Chang2021}. Validating edge turbulence models is accordingly a crucially important endeavour since gathering sufficient information to effectively test reduced turbulent transport models is vital towards developing predictive capability for future devices. These machines will access novel burning plasma regimes and operate with some of the largest temperature gradients in the universe, but existing models may be inaccurate and standard diagnostics incapable of surviving such harsh thermonuclear environments \cite{biel_diagnostics_2019}. Yet edge modelling continues to need improvement---comprehensive gyrokinetic codes suitable for the boundary of tokamaks are still under development and fluid simulations commonly lack essential physics necessary to study collisionless systems. On this point, this chapter introduces the transport model known as drift-reduced Braginskii theory \cite{Braginskii1965RvPP,Kim-1993,francisquez_thesis} which is relevant to boundary plasmas and widely applied to analyze edge turbulence. Various adaptations of these equations have been recently taken to investigate several important edge phenomena including pedestal physics \cite{Francisquez_2017}, blob dynamics \cite{Ricci_2012}, neutral effects \cite{Thrysoe_2018}, and heat fluxes impinging plasma-facing components \cite{nespoli_non-linear_2017}. While experimental trends are at times reproduced in these works \cite{Zholobenko_2021_validation}, direct quantitative agreement between the two-fluid turbulence theory and observations is generally lacking on a wide scale due to difficulty in aligning global simulations with plasma experiments where relevant measurements may be sparse or missing altogether. Fusion plasma diagnostic measurements are inherently noisy and limited in their spatiotemporal scope (e.g. 1- or 2-dimensional profiles of electron density and temperature \cite{griener_continuous_2020,Bowman_2020,Mathews2020,mathews2022deep}) and resultantly require suitable analysis techniques. To this end, Chapter 2 demonstrates a physics-informed deep learning framework to diagnose unknown turbulent field fluctuations consistent with drift-reduced Braginskii theory from limited electron pressure observations. Namely, the drift-reduced Braginskii model is represented via PINNs \cite{Lagaris_1998,raissi2017physics,SIRIGNANO20181339}---highly expressive function approximators trained to solve supervised learning tasks while respecting nonlinear partial differential equations---to infer unobserved field dynamics from partial measurements of a synthetic plasma. As will be illustrated through a readily adaptable multi-network machine learning framework, this paradigm is transferable to the broad study of quasineutral plasmas in magnetized collisional environments and presents novel pathways for the AI-assisted interpretation of plasma diagnostics. In ways previously inaccessible with classical analytic methods, this approach has the ability to improve the direct testing of reduced turbulence models in both experiment and simulation to inform physicists of the equations necessary to model the edge. The overall computational technique introduces a systematic pathway towards quantitatively testing plasma turbulence theories, and is to date among the most complex systems applied in physics-informed deep learning codes. To demonstrate this framework, Chapter 2 proceeds with a description of a synthetic plasma modelled computationally via drift-reduced Braginskii theory in Section \ref{sec:level2.1}, outlines a machine learning architecture for multi-field turbulence analysis in Section \ref{sec:level2.2}, presents results in the robust learning of unknown turbulent fields in Section \ref{sec:level2.3}, and concludes with a summary in Section \ref{sec:level2.4}. \section{\label{sec:level2.1}Drift-reduced Braginskii modelling} \begin{figure}[ht] \centering \includegraphics[width=0.48\linewidth]{templates/helix_arrowsrectangle_chapter2.png} \caption{\label{chapter2_geometry}A visualization of the geometry employed in \texttt{GDB} where the black contours represent the helical shaping of magnetic field lines with constant pitch angle. The shaded region indicates an example of a 2-dimensional field-aligned rectangular cross-section analyzed in the larger 3-dimensional domain of the full plasma.} \end{figure} The synthetic plasma analyzed is numerically simulated by the global drift-ballooning (\texttt{GDB}) finite difference code \cite{GDB, francisquez2020fluid} which solves the two-fluid drift-reduced Braginskii equations in the electrostatic limit relevant to low-$\beta$ conditions. This is a full-$f$ \cite{Belli_2008,Full-F,Held_2020,deltaf_DRB} fluid model in the sense that the evolution of the equilibrium and fluctuating components of the solution are not separated and relative perturbation amplitudes can be of order unity as found in experiments \cite{Garcia_SOL_fluctuations}. A 3-dimensional simulation domain is implemented with a shearless field-aligned coordinate system where ${\bf \hat{x}}$ is the unit vector along the radial direction (i.e. ${\bf{\hat{R}}}$), the helical magnetic field is oriented along ${\bf \hat{z}}$, and ${\bf \hat{y}}$ is perpendicular to both ${\bf \hat{x}}$ and ${\bf \hat{z}}$. Figure \ref{chapter2_geometry} displays a visualization of this geometry in Cartesian coordinates $(\mathcal{X},\mathcal{Y},\mathcal{Z})$ applied in \texttt{GDB}. The two-fluid theory encoded in the numerical simulation assumes the plasma is magnetized ($\Omega_i \gg \frac{\partial}{\partial t}$), collisional ($\nu_{ei} \gg \frac{\partial}{\partial t}$), and quasineutral ($\nabla \cdot \v{j} \approx 0$) with the reduced perpendicular fluid velocity given by ${\bf E \times B}$, diamagnetic, and ion polarization drifts. After neglecting collisional drifts and terms of order $m_e/m_i$, one arrives at the following equations (in Gaussian units) governing the plasma's density ($n \approx n_e \approx n_i$), vorticity ($\gvort$), parallel electron velocity ($\vpe$), parallel ion velocity ($\vpi$), electron temperature ($T_e$), and ion temperature ($T_i$) \cite{francisquez2020fluid,francisquez_thesis,Braginskii1965RvPP} \begin{eqnal}\label{eq:nDotGDBH} \d{^e n}{t} = -\frac{2c}{B}\left[n\curv{\phi}-\frac{1}{e}\curv{p_e}\right] -n\delpar{\vpe} +\nSrcN+\mathcal{D}_{n} \end{eqnal} \begin{eqnal}\label{eq:wDotGDBH} \pd{\gvort}{t} &= \frac{2c}{eB}\left[\curv{p_e}+\curv{p_i}\right]-\frac{1}{em_i \Omega_i}\curv{G_i}+\frac{1}{e}\delpar{j_{\parallel}}+\mathcal{D}_{\gvort}\\ &\quad-\div{\left\lbrace\frac{nc^2}{\Omega_i B^2}\left[\phi,\gradperp{\phi}+\frac{\gradperp{p_i}}{en}\right]+\frac{nc}{\Omega_i B}\vpi\delpar{\left(\gradperp{\phi}+\frac{\gradperp{ p_i}}{en}\right)}\right\rbrace} \end{eqnal} \begin{eqnal}\label{eq:vpeDotGDBH} \d{^e\vpe}{t} &= \frac{1}{m_e}\left(e\delpar{\phi}-\frac{\delpar{p_e}}{n}-0.71\delpar{T_e} + e\eta_\parallelj_{\parallel} \right) \\ &\quad + \frac{2}{3} \frac{\delpar{G_e}}{n} + \frac{2cT_e}{eB}\curv{\vpe}+\momSrce+\mathcal{D}_{\vpe} \end{eqnal} \begin{eqnal}\label{eq:vpiDotGDBH} \d{^i\vpi}{t} &= \frac{1}{m_i}\left(-e\delpar{\phi}-\frac{\delpar{p_i}}{n}+0.71\delpar{T_e} - e\eta_\parallelj_{\parallel} \right)\\ &+\frac{2 T_e}{3n}\frac{\delpar{G_i}}{n}-\frac{2cT_i}{eB}\curv{\vpi}+\momSrci+\mathcal{D}_{\vpi} \end{eqnal} \begin{eqnal}\label{eq:TeDotGDBH} \d{^e T_e}{t} = \frac{2T_e}{3n}\left[\d{^e n}{t} + \frac{1}{T_e}\delpar \kappa^e_\parallel \delpar T_e + \frac{5n}{m_e \Omega_e} \curv{T_e} \right.\\ \left. + \eta_\parallel \frac{j_{\parallel}^2}{T_e} + \frac{0.71}{e}(\delpar{j_{\parallel}} - \frac{j_{\parallel}}{T_e}\delpar{T_e}) + \frac{1}{T_e} \enerSrceN \right] + \mathcal{D}_{T_e} \end{eqnal} \begin{eqnal}\label{eq:TiDotGDBH} \d{^i T_i}{t} &= \frac{2T_i}{3n}\left[\d{^i n}{t} + \frac{1}{T_i}\delpar \kappa^i_\parallel \delpar T_i - \frac{5n}{m_i \Omega_i} \curv{T_i} + \frac{1}{T_i} \enerSrciN \right] + \mathcal{D}_{T_i} \end{eqnal} \noindent whereby the field-aligned electric current density is $j_{\parallel} = en\left(\vpi - \vpe\right)$, the stress tensor's gyroviscous terms contain $G_s = \eta^s_0 \left\lbrace 2\delpar{v_{\parallel s}}+c\left[\curv{\phi} + \curv{p_s}/(q_s n)\right]\right\rbrace$, and $\eta^s_0$, $\Omega_s$, and $q_s$ are the species ($s = \{e,i\}$) viscosity, cyclotron frequency, and electric charge, respectively. The convective derivatives are $d^s f/dt = \partial_t f + (c/B)\left[\phi,f\right] + v_{\parallel s}\delpar{f}$ with $\left[F,G\right] = \v{b_0} \times \nabla F \cdot \nabla G$ and $\v{b_0}$ representing the unit vector parallel to the magnetic field. The field's magnitude, $B$, decreases over the major radius of the torus ($B\propto1/R$), and its curvature is $\gv{\kappa} = -{\bf{\hat{R}}}/R$. The curvature operator, $\curv{f} = \v{b_0} \times \gv{\kappa} \cdot \grad{f}$, $\nabla_\parallel = -\partial / \partial z$, and $\v{b_0} = -{\bf \hat{z}}$ follow past convention \cite{francisquez2020fluid}. The coefficients $\kappa^s_\parallel$ and $\eta^s_\parallel$ correspond to parallel thermal conductivity and electrical resistivity, respectively. Time-independent Gaussian-shaped density ($\nSrcN$) and energy sources ($S_{E,s}$) are placed at the left wall while zero external momentum ($S_{\mathcal{M}\parallel s}$) is explicitly forced upon the system. Explicit hyperdiffusion consisting of both fourth-order cross-field and second-order parallel diffusion is applied for numerical stability in the form of $\mathcal{D}_f = \chi_x \frac{\partial f} {\partial x^4} + \chi_y \frac{\partial f} {\partial y^4} + \chi_z \frac{\partial f} {\partial z^2}$. Under quasineutrality, electric fields arise not by local imbalance of charged particles but by the requirement that the electric current density is divergence free \cite{DRB_consistency3,Zholobenko_2021}. Accordingly, the electrostatic potential, $\phi$, is numerically solved for the synthetic plasma via the following boundary value problem: \begin{equation}\label{BVP_gvort_phi} \div{ \frac{nc}{\Omega_i B}\left(\gradperp{\phi}+\frac{\gradperp{p_i}}{en}\right) } = \gvort. \end{equation} The synthetic plasma consists of deuterium ions and electrons with real masses (i.e. $m_i = 3.34 \times 10^{-27} \text{ kg}$ and $m_e = 9.11\times 10^{-31} \text{ kg}$) and on-axis magnetic field of $B_{axis} = 5.0 \text{ T}$ with minor and major radius of $a_0 = 0.22 \text{ m}$ and $R_0 = 0.68 \text{ m}$, respectively, consistent with characteristics of discharges in the Alcator C-Mod tokamak \cite{Hutch_CMod,Marmar_CMod,Alcator_Greenwald} for which there is evidence of fluid drift turbulence controlling edge profiles \cite{labombard_evidence_2005}. Moreover, drift-reduced models, where the ion gyration frequency is assumed to be faster than the plasma fluctuations (i.e. $\Omega_i \gg \frac{\partial}{\partial t}$), are generally good approximations to full velocity models when studying edge turbulence \cite{Leddy_full_velocity}. This discretized toroidal geometry is a flux-tube-like domain corresponding to Figure \ref{chapter2_geometry} on the outboard side (i.e. strictly bad curvature) of the tokamak scrape-off layer (SOL) with field lines of constant helicity wrapping around the torus and terminating on walls producing both resistive interchange and toroidal drift-wave turbulence. Transport is primarily along blobby field-aligned structures with increased pressure propagating due to perpendicular drifts which polarize the blob and yield outward ${\bf E \times B}$ drift of the filament. This is related to the Poynting vector representing the directional energy flux density of the electromagnetic field \cite{Thrysoe_2020,DRB_consistency3}. The physical dimensions of the entire simulation domain are $[L_x = 7.7\text{ cm}, L_y = 5.5 \text{ cm}, L_z = 1800.0 \text{ cm}]$ with spatiotemporal resolution of $[\Delta x = 0.03 \text{ cm}, \Delta y = 0.04 \text{ cm}, \Delta z = 56.25 \text{ cm}, \Delta t = 4.55 \times 10^{-11} \text{ s}]$. Periodic boundary conditions are employed in the binormal direction for all quantities. Homogeneous Neumann conditions (i.e. fixing the function's derivative normal to the boundary) are set on the radial surfaces for $n$, $\vpe$, $\vpi$, $T_e$, and $T_i$ while homogeneous Dirichlet conditions (i.e. fixing the function on the boundary) are used for $\gvort$ and $\phi$. By constraining $\phi = 0$ along the walls, this in principle enforces radial $\bf {E \times B}$ flows to go to zero on the simulation boundaries for the synthetic plasma being analyzed. The lower limit of the Bohm criterion, a necessary condition for the formation of a stationary Debye sheath \cite{Riemann_1991}---the transition from a plasma to a solid surface---is imposed as a parallel boundary condition, \begin{equation} \vpi(z=\pm \frac{L_z}{2}) = \mp c_{s} = -\sqrt{\frac{T_i + T_e}{m_i}}, \end{equation} \begin{equation} \vpe(z=\frac{\pm L_z}{2}) = \begin{cases} \mp c_{s}\exp(\Lambda - \frac{e\phi}{T_e}) &\mbox{if } \phi > 0 \\ \mp c_{s}\exp(\Lambda) &\mbox{if } \phi \leq 0 \end{cases}, \end{equation} where $\Lambda = \log\sqrt{m_i/[2\pi m_e(1 + T_i/T_e)]}$. Since the direction of the flows at the sheath entrance are known, ghost cells in the $z$-direction are filled such that an upwind stencil ensues to evolve $n$, $\gvort$, $T_e$, and $T_i$ \cite{francisquez2020fluid}. For $T_e$ and $T_i$ specifically, finite conductive heat fluxes entering the sheaths are applied according to $q_{{\parallel},s} = -\kappa^s_{\parallel} \delpar T_s = \pm \gamma_s n v_{{\parallel},s} T_s$, where the upper (lower) sign corresponds to the top (bottom) sheath and $\gamma_s$ is the sheath transmission coefficient. Its value for ions and electrons is taken to be $\gamma_i =5T_i/2T_e$ and $\gamma_e = 2 + \lvert e \phi \rvert/T_e$, respectively \cite{francisquez2020fluid}. Collisional coefficients and diffusivities are kept constant in the direct numerical simulation as they can be unphysically large at high temperatures due to the lack of kinetic effects and generally require closures going beyond Chapman-Enskog to account for plasma where $\nu_{ei} \not\gg \partial/ \partial t$ \cite{Chapman_1970}. To start the numerical simulation, electrons and ions are initialized with zero parallel velocity and vorticity fields along with truncated Gaussian density and temperature profiles. A second-order trapezoidal leap-frog time-stepping scheme evolves the system of equations forward with subcycling of parabolic terms (e.g. $\delpar \kappa^s_\parallel \delpar T_s$) \cite{computational_methods,francisquez_thesis} due to the low frequency turbulence structure changing slowly over the thermal diffusion timescale. The commonly applied Boussinesq approximation \cite{GRILLIX_2018} in Braginskii solvers is also used when evolving the generalized vorticity, $\gvort$. The normalizations applied to solve these partial differential equations in both the finite difference code and deep learning framework are sketched in the Appendix. A complete treatment of the numerical solver and greater specificity regarding the turbulence simulations can be found in \cite{GDB,francisquez2020fluid}. \section{\label{sec:level2.2}Machine learning fluid theory} Neural networks are operationally computational programs composed of elementary arithmetic operations (e.g. addition, multiplication) and functions (e.g. $\exp$, $\sin$, $\log$) which can be differentiated to arbitrary order up to machine precision via application of chain rule \cite{Raissi_JMLR,AD_2020}. While biases are presently inevitable \cite{wang2020eigenvector}, these regression models are in theory constructed without necessarily committing to a designated class of basis functions (e.g. polynomial, trigonometric). Automatic differentiation in conjunction with this adaptive capacity of neural networks permits them to effectively address nonlinear optimization problems in physics and engineering by training upon both partial differential equations and observational data via multi-task learning \cite{raissi2017physics}. Constraining classically underdetermined systems by physical laws and experimental measurements in this way presents an emerging technique in computational mechanics which this thesis extends to the deduction of unknown turbulent plasma dynamics. In this physics-informed deep learning framework, every dynamical variable in equations \eqref{eq:nDotGDBH}--\eqref{eq:TiDotGDBH} is approximated by its own fully-connected neural network, which is commonly known as a data-efficient universal function approximator \cite{cybenko_approximation_1989}, which can be molded to learn unknown turbulent fields given sufficient training. \begin{figure}[ht] \centering \includegraphics[width=0.85\linewidth]{33883059redorng_both_n_e_T_e.png} \caption{\label{observed_dens_and_Te}These 2-dimensional slices of the simulated turbulent electron density and temperature over a short temporal window are the only observed variables used as inputs to the deep learning framework. The full 3D synthetic plasma exhibits field-aligned filamentary structures (i.e. blobs).} \end{figure} For analysis in the multi-network framework, partial measurements of $n_e$ and $T_e$ over time only come from a smaller 2-dimensional field-aligned domain in the interior of the synthetic plasma described in Section \ref{sec:level2.1} to emulate experiment with dimensions of $[L^*_x = 3.8 \text{ cm}, L^*_y = 3.8 \text{ cm}]$ and spatiotemporal resolution of $[\Delta^* x = 0.03 \text{ cm}, \Delta^* y = 0.04 \text{ cm}, \Delta^* t = 7.27 \times 10^{-7} \text{ s}]$ as depicted by a snapshot in Figure \ref{observed_dens_and_Te}. Each network consequently takes the local spatiotemporal points $(x,y,t)$ from the reduced domain for measurements as the only inputs to the initial layer while the dynamical variable being represented (e.g. $\phi$) is the sole output. In the middle of the architecture, every network consists of 5 hidden layers with 50 neurons per hidden layer and hyperbolic tangent activation functions ($\sigma$) using Xavier initialization \cite{GlorotAISTATS2010}. \begin{figure}[ht] \centering \includegraphics[width=0.8\linewidth]{ne_time_trace.png} \caption{\label{observed_1D_dens_time} A local time trace of the turbulent $n_e$ over 200 $\mu$s from the simulated plasma at $[x = 1.0 \text{ cm}, y = 0.0 \text{ cm}, z = -28.1 \text{ cm}]$. The observed synthetic data analyzed in the machine learning framework only comes from the small temporal window (green) which corresponds to just 4 points in time.} \end{figure} \begin{figure*} \centering \includegraphics[width=1.0\linewidth]{PlasmaPINNconnectivity.png} \caption{\label{PlasmaPINN}Visualization of the physics-informed framework with individual networks---where $\theta_{n_e}$ represents the weights and biases of the $n_e$ network, for example---being selectively trained against loss functions comprising both partial observations, $\mathcal{L}_{n_e}$ and $\mathcal{L}_{T_e}$, and reduced theory, $\mathcal{L}_{f_{n_e}}$ and $\mathcal{L}_{f_{T_e}}$, to infer unobserved turbulent dynamics. All spatial gradients and time derivatives in $f_{n_e}$ and $f_{T_e}$ are represented using automatic differentiation of each individual variable's network which in practice extends the size of the computation graph being evaluated. To handle reduced 2-dimensional data from the 3-dimensional synthetic plasma, the z-coordinate is removed from the networks for simplicity and as a test for determining the minimal information necessary to learn $\phi$. If noisy data are observed, then $\theta_{n_e}$ (and $\theta_{T_e}$, if $T_e$ measurements are available) should be additionally trained against $\mathcal{L}_{f_{n_e}}$ (and $\mathcal{L}_{f_{T_e}}$).} \end{figure*} In actuality, the repeated differentiation and summation of networks to construct every single term's representation in the partial differential equations subsequently constructs a far larger resultant computation graph. The cumulative network is therefore a truly deep approximation---at least compared to the 5 hidden layers in each dynamical variable's individual network---of the plasma turbulence theory. Partial observations of the simulated plasma consist of only $n_e$ and $T_e$ measurements of 2-dimensional spatial extent, which is similar to experimental fluctuation diagnostics like gas puff imaging \cite{Zweben_2017,mathews2022deep}, as visualized in Figure \ref{observed_dens_and_Te} over just 4 separate time slices (i.e. 2.9 $\mu$s). For reference, the synthetic plasma's fluctuations have an approximate autocorrelation time of 1.5 $\mu$s and radial autocorrelation length of 0.4 cm. The narrow temporal extent of the strongly fluctuating $n_e$ observations at a local spatial point is further visualized in Figure \ref{observed_1D_dens_time}. Properties of all other dynamical variables in the 6-field turbulence theory are taken to be unknown, and the networks are simultaneously optimized against the drift-reduced Braginskii equations and observed data to better approximate the unmeasured quantities. Physical constraints are learned by the networks via minimization of ascribed loss functions encompassing both limited measurements of the plasma and two-fluid turbulence model. To be precise, partial synthetic measurements are learned by training the $n_e$ and $T_e$ networks against the average $\mathcal{L}_2$-norm of their respective relative errors \begin{equation}\label{eq:L_n_DotGDBH} \mathcal{L}_{n_e} = \frac{1}{N_0}\sum_{i=1}^{N_0} \lvert n^*_{e}(x^i_0,y^i_0,z^i_0,t^i_0) - n^i_{e,0} \rvert^2, \end{equation} \begin{equation}\label{eq:L_Te_DotGDBH} \mathcal{L}_{T_e} = \frac{1}{N_0}\sum_{i=1}^{N_0} \lvert T^*_{e}(x^i_0,y^i_0,z^i_0,t^i_0) - T^i_{e,0} \rvert^2, \end{equation} where $\lbrace x_0^i,y_0^i,z_0^i,t_0^i,n_{e,0}^i,T_{e,0}^i\rbrace^{N_0}_{i=1}$ correspond to the set of observed data and the variables $n^*_e$ and $T^*_e$ symbolize predicted electron density and temperature, respectively, by the networks. The theory enforcing physical constraints in the deep learning framework is expressed by evaluating the individual terms in the model by differentiating the graphs with respect to input spatiotemporal coordinates via application of chain rule through automatic differentiation \cite{tensorflow2015-whitepaper}. Correspondingly, model loss functions are embedded during training by recasting \eqref{eq:nDotGDBH} and \eqref{eq:TeDotGDBH} in the following implicit form \begin{eqnal}\label{eq:f_n_DotGDBH} f_{n_e} &\coloneqq -\d{^e n}{t} -\frac{2c}{B}\left[n\curv{\phi}-\frac{1}{e}\curv{p_e}\right]-n\delpar{\vpe} +\nSrcN+\mathcal{D}_{n}, \end{eqnal} \begin{eqnal}\label{eq:f_Te_DotGDBH} f_{T_e} &\coloneqq -\d{^e T_e}{t} + \frac{2T_e}{3n}\left[\d{^e n}{t} + \frac{1}{T_e}\delpar \kappa^e_\parallel \delpar T_e + \eta_\parallel \right.\\& \left. + \frac{5n}{m_e \Omega_e} \curv{T_e} \frac{j_{\parallel}^2}{T_e} + \frac{0.71}{e}(\delpar{j_{\parallel}} - \frac{j_{\parallel}}{T_e}\delpar{T_e}) + \frac{1}{T_e} \enerSrceN \right] + \mathcal{D}_{T_e}, \end{eqnal} and then further normalized into dimensionless form matching the numerical code as in \eqref{eq:normlnDotGDBH} and \eqref{eq:normlTeDotGDBH} \cite{francisquez2020fluid}. This normalized implicit formulation is vital to learning via optimization since all physical terms collectively sum to zero when the equations are ideally satisfied. These physical constraints provided by the unitless evolution equations of $n_e$ and $T_e$ are jointly optimized using loss functions defined by \begin{equation}\label{eq:L_f_n_DotGDBH} \mathcal{L}_{f_{n_e}} = \frac{1}{N_f}\sum_{i=1}^{N_f} \lvert f^{*}_{n_e}(x^i_f,y^i_f,z^i_f,t^i_f) \rvert^2, \end{equation} \begin{equation}\label{eq:L_f_Te_DotGDBH} \mathcal{L}_{f_{T_e}} = \frac{1}{N_f}\sum_{i=1}^{N_f} \lvert f^{*}_{T_e}(x^i_f,y^i_f,z^i_f,t^i_f) \rvert^2, \end{equation} where $\lbrace x_f^i,y_f^i,z_f^i,t_f^i\rbrace^{N_f}_{i=1}$ denote the set of collocation points, and $f^{*}_{n_e}$ and $f^{*}_{T_e}$ are the null partial differential equations prescribed by \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH} in normalized form directly evaluated by the neural networks. Optimization against the applied plasma theory is central to the methodology and enforces physical constraints in the deep learning framework by ensuring each sub-network respects the multi-field turbulence model's constraints as visualized in Figure \ref{PlasmaPINN}. This enables fine tuning of each neural networks' weights and biases by adjusting them in this generalized regression model to satisfy the physical laws governing the nonlinear connection sought between the sub-networks. The set of collocation points over which the partial differential equations are evaluated can be arbitrarily large and span any extent over the physical domain, but are taken in this example to correspond to the positions of the synthetic measurements being trained upon, i.e. $\lbrace x_0^i,y_0^i,z_0^i,t_0^i\rbrace^{N_0}_{i=1} = \lbrace x_f^i,y_f^i,z_f^i,t_f^i\rbrace^{N_f}_{i=1}$. It should be once again noted that the only observed dynamical quantities in these equations are 2-dimensional views of $n_e$ and $T_e$ without any explicit information about boundary conditions nor initializations. All analytic terms encoded in these equations including high-order operators are computed exactly by the neural networks without any approximation (e.g. linearization) nor discretization. This machine learning framework with a collocation grid of arbitrarily high resolution uses a continuous spatiotemporal domain without time-stepping nor finite difference schema in contrast with the numerical \texttt{GDB} code. To handle 2-dimensional data, slow variation of dynamics is assumed in the $z$-coordinate and effectively set all parallel derivatives to zero (i.e. $\frac{\partial}{\partial z}\rightarrow 0$). Notwithstanding, parallel flows and Ohmic heating terms in the model are still kept. If measurements in the $z$-direction are available or more collocation points utilized during training with observational data of reduced dimensionality, this procedure may be relaxed---it is partly a trade-off between computational fidelity and stability. It is noteworthy that the temporal resolution of the data observed by the neural networks is several orders of magnitude lower than the time steps taken by the finite difference solver in \texttt{GDB} as required for numerical stability, i.e. $\Delta^* t \gg \Delta t$. Also, if sought, training on data sets viewed at oblique angles in 3-dimensional space over long macroscopic timescales can be easily performed via segmentation of the domain and parallelization, but a limited spatial view with reduced dimensionality is taken to emulate experimental conditions for field-aligned observations \cite{Zweben_2017} and theoretically test what information is indispensable to learn unobserved turbulent dynamics. Loss functions are optimized with mini-batch sampling where $N_0 = N_f = 500$ using stochastic gradient descent via Adam \cite{kingma2014adam} and the L-BFGS algorithm---a quasi-Newton optimization algorithm \cite{10.5555/3112655.3112866}---for 20 hours over 32 cores on Intel Haswell-EP processors which corresponds to approximately 8694 full iterations over both optimizers. If observing noisy data, it is found that expanding to larger sample sizes with $N_0 = N_f = 2500$ and training solely via L-BFGS is optimal for learning. Removing $\mathcal{L}_{f_{n_e}}$ and $\mathcal{L}_{f_{T_e}}$ from the optimization process (i.e. setting $N_f = 0$) would correspond to training of classical neural networks without any knowledge of the underlying governing equations which would then be incapable of learning turbulent field fluctuations. Setting $N_0 = 0$ instead while providing initial and boundary conditions for all dynamical variables would alternatively correspond to regularly solving the equations directly via neural networks. Overall, priming networks by firstly training in stages on observed data or prior constraints, i.e. priming, is useful to enhance stability and convergence in this multi-objective task. Additionally, encoding domain expertise such as subsonic bounds on parallel flows or regularizing temperature to be strictly positive via suitable output activation functions can assist training by constraining the admissible solution landscape. Networks constructed in this way can intrinsically abide by physical laws which is especially useful to uncover unknowns like $\vpi$ and $T_i$. A fundamental goal in computational plasma modelling is determining the minimum complexity necessary (and no less) to develop sufficiently predictive tokamak simulations. With sparse availability of measurements in fusion experiments, designing diagnostic techniques for uncovering such information is crucial. On this point, it is emphasized that training is from scratch over just a single synthetic plasma discharge with no extraneous validation nor testing sets required since overfitting is technically not encountered in this physics-informed paradigm. The multi-network deep learning framework simply utilizes a single set of $n_e$ and $T_e$ measurements over a period of microseconds which corresponds to the small data regime of machine learning. Merging partial observational data of $n_e$ and $T_e$ along with physical laws in the form of partial differential equations governing the time-dependent evolution of $n_e$ and $T_e$ sufficiently constrains the set of admissible solutions for the previously unknown nonlinear mappings the neural networks ultimately learn. It is also quite general: due to quasineutrality, no significant adjustments are necessary to generalize the technique when multiple ions and impurities may be present in boundary plasmas beyond the inclusion of appropriate collisional drifts and sources in multi-species plasmas \cite{multi_species,DRB_consistency1}. This deep learning technique for diagnosing turbulent fields is hence easily transferable which permits its systematic application across magnetic confinement fusion experiments whereby the underlying physical model fundamental to the turbulent transport is consistent. The framework sketched can also be extended to different settings in the interdisciplinary study (both numerical and experimental) of magnetized collisional plasmas in propulsion engines and astrophysical environments. \section{\label{sec:level2.3}Numerical Experiments} \subsection{\label{sec:level2.3.1}Recovery of the unknown turbulent electric field} \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{33883059phi.png} \caption{\label{learned_phi}The synthetic plasma's unobserved electric potential (top) at $t = 229.9 \ \mu\text{s}$ is learned approximately up to an additive constant by the neural network (bottom).} \end{figure} Accurate turbulent edge electric field fluctuation characterization is particularly significant to magnetic confinement fusion devices. By constraining the deep learning framework with the two-fluid turbulence theory and modest amounts of empirical information in the form of partial 2-dimensional observations of $n_e$ and $T_e$, it is found that physics-informed neural networks can accurately learn the plasma's electric potential on turbulent scales without the machine learning framework ever having observed this quantity, as displayed in Figures \ref{learned_phi} and \ref{1d_phi}. \begin{figure}[ht] \centering \includegraphics[width=0.85\linewidth]{338830591d_phi_char.png} \caption{\label{1d_phi}A 1-dimensional radial profile of the true and predicted $\phi$ at $[y = 0.0 \text{ cm}, z = -28.1 \text{ cm}, t = 229.9 \ \mu\text{s}]$, i.e. a slice of Figure \ref{learned_phi}. The ordinates are offset differently but both exactly span 410 V with equivalent spacing.} \end{figure} \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{33883059E_r_lim.png} \caption{\label{learned_E_r}The learned turbulent $E_r$ (bottom) closely agrees with the magnitude and structure of the true $E_r$ (top) despite $\gvort$, $\vpe$, $\vpi$, and $T_i$ being initially unknown.} \end{figure} It is notable that despite there being no knowledge of $\gvort, \vpe, \vpi,$ and $T_i$ (i.e. multiple unknowns existing in the partial differential equations and \eqref{BVP_gvort_phi} never even being directly invoked), the electric field is nonetheless learned consistently with the physical theory encoded by the plasma turbulence model. Since $\phi$ is a gauge-invariant quantity exact up to an additive constant, it is accordingly uncovered up to a scalar offset which varies randomly due to the stochastic nature of the optimization employed in the machine learning framework. This difference physically arises because no direct boundary information was enforced upon the neural network when learning $\phi$, although it could be technically implemented. By contrast, the \texttt{GDB} code imposed zero potential on the outer walls of the simulation domain. General agreement in both magnitude and structure in the learned radial electric field is evident in Figure \ref{learned_E_r} with an average absolute error of 2619 V/m. To better interpret the learning process, normalized loss functions being trained upon are tabulated after $M$ full iterations by the optimizers in Table \ref{loss_tabulate}. After one iteration, \eqref{eq:L_f_n_DotGDBH} and \eqref{eq:L_f_Te_DotGDBH} are relatively small in magnitude, and this would correspond to a trivial result satisfying the partial differential equations given the nonuniqueness of its solutions. As training progresses, observational data is better captured in the deep learning framework and the neural networks proceed to converge toward the sought solution as opposed to trivial ones. A difference in the rates of learning for $n_e$, $T_e$, and $\phi$ also exist since the electric field is learned implicitly via the model instead of being trained upon directly. Each individual loss function being optimized therefore does not necessarily decrease perfectly monotonically, but it is instead the collective training against partial differential equations in conjunction with observational data that is key. Namely, while there are many potential solutions to \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH}---and while they may be more easily satisfied by trivial solutions---the limited $n_e$ and $T_e$ measurements compel the optimizer towards the physical solution of the partially observed plasma. In scenarios where inconsistencies in the true and learned model $E_r$ exist, one might repurpose this machine learning framework to iteratively test and thereby discover the {\it correct} partial differential equations altogether by quantitatively examining the proposed model's consistency with observations as in Table \ref{loss_tabulate}. For example, the analytic form of reduced source models in fluid theories \cite{Thrysoe_2018,Thrysoe_2020} can be inserted in the physics-informed deep learning framework to account for local turbulent ionization and inelastic collisions with kinetic neutrals by observing such measurements of $n_e$, $T_e$, and $\phi$ in global simulations \cite{Wersal_2015} and experiments \cite{mathews2022deep}. \begin{table}[ht] {\centering \renewcommand{\arraystretch}{1.0} \includegraphics[width=0.9\linewidth]{Table1_PlasmaPINN_v2.png} \caption{\label{loss_tabulate}Each normalized loss function optimized in the machine learning framework is tabulated after $M$ full iterations, where $M = 8694$ corresponds to the final iteration after 20 hours of training against both the partial observations of $n_e$ and $T_e$ and their implicit evolution equations, i.e. \eqref{eq:L_n_DotGDBH}, \eqref{eq:L_Te_DotGDBH}, \eqref{eq:L_f_n_DotGDBH}, and \eqref{eq:L_f_Te_DotGDBH}.} } \end{table} \begin{figure}[ht] \centering \includegraphics[width=0.9\linewidth]{Boltz_neo.png} \caption{\label{analytic_E_r}Estimates of the turbulent $\phi$ and $E_r$ as expected by the Boltzmann model or neoclassical estimates yield markedly errant predictions when compared to the true values displayed at the top of Figures \ref{learned_phi} and \ref{learned_E_r}.} \end{figure} \subsection{\label{sec:level2.3.2}Contrast with conventional calculations} For comparison, classical and oft-employed models for calculating the electric potential with adiabatic electrons such as the Boltzmann relation, i.e. $n_e(\phi) = n_e(\phi_0) e^{q_e(\phi_0 - \phi)/T_e}$ \cite{Callen_adiabatic}, fail when computing perpendicular turbulent field fluctuations. Alternative approximations of $E_r$ from simple ion pressure balance as expected neoclassically, i.e. $\nabla \phi = -\nabla p_i/(Z n_i e)$ where $Z=1$ for deuterium ions \cite{Viezzer_2013}, would yield highly incorrect estimates of the turbulent electric field, too. Such methods ordinarily used in magnetic confinement fusion are only applicable to discerning equilibrium fields and dynamics parallel to the magnetic field in steady-state scenarios, but are erroneous in the analysis of microturbulence in nonquiescent plasmas. This is markedly observed when comparing Figure \ref{analytic_E_r} to the true $\phi$ and $E_r$ as plotted in Figures \ref{learned_phi} and \ref{learned_E_r}, respectively. This deep learning technique based upon drift-reduced Braginskii theory therefore provides a novel way to accurately measure the turbulent electric field in edge plasmas from just the electron density and temperature. As a further point of contrast compared to classical techniques, it is important to note that the inverse learning scenario has not been demonstrated thus far. In particular, given observations of $\phi$ and $T_e$, one cannot simply infer the turbulent $n_e$ fluctuations with the machine learning framework outlined. This one-way nature in learning indicates a division exists between the two pathways when attempting to constrain the admissible solutions of \eqref{eq:L_f_n_DotGDBH} and \eqref{eq:L_f_Te_DotGDBH} to uncover unknown nonequilibrium dynamics. Training is thus unidirectional and representative of asymmetries extant in the partial data and turbulence theory being learnt via optimization. \subsection{\label{sec:level2.3.3}Impacts of noise in physics-informed deep learning} It is also important to examine the practicality of these results when noise corrupts the observations as inevitably expected when translating this framework to experiment. As an example test, it is found that if only observing density fluctuations with normally distributed errors, one can still largely recover the unmeasured perpendicular electric fields and even resolve the partially observed variables. Namely, given just $n_e$ measurements with Gaussian noise of 25\% as in Figure \ref{noisy_dens}, the deep learning framework is robust enough to learn the true turbulent density in this physics-informed paradigm, which can subsequently be used to infer the unmeasured electric field. If $E_r$ was already known, this technique could then precisely check the validity of the reduced turbulence theory against observations from experiment or kinetic simulations \cite{Mathews2021PoP}. But, if using a standard feed-forward neural network, one must be careful with convergence since the objective of simply minimizing $\mathcal{L}_{n_e}$ without sufficient regularization, as innately provided by $\mathcal{L}_{f_{n_e}}$, can result in overfitting of noisy data. \begin{figure} \centering \includegraphics[width=1.0\linewidth]{templates/noisy_dens_learn4vertpcol_box.png} \caption{\label{noisy_dens} The physics-informed deep learning framework is capable of recovering the true $n_e$ despite strong Gaussian noise, i.e. $\sigma = 0.25$, present. The classical solution corresponds to a standard feed-forward neural network where $N_f = 0$.} \end{figure} \section{\label{sec:level2.4}Conclusion} These results illustrate a custom physics-informed deep learning framework with the novel capacity to learn unknown nonequilibrium dynamics in a multi-field turbulent transport model broadly relevant to magnetized collisional plasmas. This chapter specifically demonstrates the ability to determine unobserved turbulent electric fields consistent with the drift-reduced Braginskii equations from partial electron pressure observations, in contrast with with standard analytic techniques. This technique can be applied to infer field fluctuations that may be difficult to measure or when plasma diagnostics provide only partial information. On the other hand, if experimental electric field measurements exist, then the quantitative validity of the plasma turbulence model embedded in the neural networks can be directly assessed. This technique is also quite robust since, due to quasineutrality, it can be used to study ionized gases in magnetized environments with multiple ions and impurities present as commonly found in astrophysical settings and fusion energy and space propulsion systems. From a mathematical physics standpoint, it is remarkable that nonlinear dynamics can be accurately recovered from partial data and theory in a 6-field model. Inferring completely unknown turbulent fields from just 2-dimensional measurements and representations of the evolution equations given by \eqref{eq:f_n_DotGDBH} and \eqref{eq:f_Te_DotGDBH} demonstrates a massive reduction in the original 3-dimensional turbulence model indicating redundancy and the existence of reduced theory characterizations. Going forward, this framework has the potential capability to be generalized (e.g. to learn $T_e$, $T_i$, $\vpe$, and $\vpi$ in addition to $\phi$ using just 1-dimensional $n_e$ measurements) and transform how turbulence theories are systematically and quantitatively validated in both plasma simulations and experiments. The interpretable physics-informed machine learning methodology outlined should also be transferable across models (e.g. collisionless fluids, gyrokinetic, electromagnetic, atomic physics) and complex geometries. Furthermore, known limitations and {\it unknown} corrections to Braginskii's theory exist \cite{Catto-paper}, which can be introduced in the deep learning framework to automate testing and discovery of reduced plasma turbulence models when high fidelity data is observed. These extensions in theory and computing are left for future works. \chapter{Turbulent field fluctuations in gyrokinetic and fluid plasmas} \setlength{\epigraphwidth}{0.48\textwidth} \epigraph{All models are wrong, but some are useful.}{George E. P. Box} Validating the accuracy of reduced turbulence theories is amongst the greatest challenges to the advancement of plasma modelling. But meaningfully evaluating dynamical connections between turbulent fields across theories or experiment has been an intricate task for conventional numerical methods. Namely, when comparing global plasma simulations to other numerical models or diagnostics, one must precisely align initial states, boundary conditions, and sources of particles, momentum, and energy (e.g. plasma heating, sheath effects, atomic and molecular processes) \cite{francisquez2020fluid,Mijin_2020}. These descriptions of physics can be increasingly difficult to reconcile when applying different representations---for example, fluid or gyrokinetic---or when measurements characterizing the plasma are sparse as commonly encountered in thermonuclear fusion devices. Additionally, imperfect conservation properties (both in theory and numerics due to discretization) and the limited accuracy of time-integration schema can introduce errors further misaligning comparative modelling efforts. Such difficulties exist even when examining the same nominal turbulence theory across numerical codes \cite{nonlinear_GK_comparison_new,Tronko_ORB5vGENE,nonlinear_GK_comparison1,nonlinear_GK_comparison2} and become magnified for cross-model comparisons \cite{francisquez2020fluid}. To overcome these classical limitations, Chapter 3 applies the custom physics-informed deep learning framework developed in Chapter 2 to demonstrate the first direct comparisons of instantaneous turbulent fields between electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetic simulations. Good overall quantitative agreement is found between the two turbulence models in magnetized helical plasmas at low normalized pressure. In the fusion community, both comprehensive full-$f$ global gyrokinetic \cite{mandell_hakim_hammett_francisquez_2020,XGC,GENE,COGENT,ELMFIRE,ORB5,GYSELA,PICLS} and two-fluid \cite{BOUT++,TOKAM3X,GBS,Stegmeir2018,GDB} direct numerical simulations are under active development to improve predictive modelling capabilities and the design of future reactors, but no single code can currently capture all the dynamics present in the edge with sufficient numerical realism. It is therefore of paramount importance to recognize when certain numerical or analytical simplifications make no discernible difference, or when a given theoretical assumption is too risky, to clearly identify the limits of present simulations \cite{francisquez2020fluid}. Adaptations of the drift-reduced Braginskii equations have recently investigated several important edge phenomena \cite{Francisquez_2017,Ricci_2012,Thrysoe_2018,nespoli_non-linear_2017}, but precise quantitative agreement with experiment is generally lacking on a wide scale. The predictive accuracy of these codes in fusion reactors is uncertain, especially since kinetic effects may not be negligible as edge plasma dynamics approach the ion Larmor radius and collision frequencies are comparable to turbulent timescales \cite{Braginskii1965RvPP,blobs_review}. Yet these fluid codes remain in widespread usage for their reduced computational cost, which offers the ability to perform parameter scans with direct numerical simulations that can help uncover underlying physics and optimize reactor engineering designs. Nevertheless, the Vlasov-Maxwell system of equations is the gold standard in plasma theory, but such modelling is prohibitively expensive when wholly simulating the extreme spatiotemporal scales extant in fusion reactors. For the purposes of more tractable yet high fidelity numerical simulations, this system is averaged over the fast gyro-motion of particles to formulate 5D gyrokinetics. Fluid-gyrokinetic comparisons therefore present a way to analyze the robustness of reduced modelling while also illuminating when collisional fluid theories may be insufficient. Quantifying potential shortcomings is thus vital for the testing and development of improved reduced models \cite{waltz2019kinetic}. While explicit comparisons of global nonlinear dynamics across turbulence models were previously impractical using standard numerical simulations, the physics-informed deep learning \cite{raissi2017physics} technique from Chapter 2 enables this direct quantitative cross-examination of plasma turbulence theories by uncovering the turbulent electric field expected in two-fluid and gyrokinetic models based upon an electron pressure fluctuation. This turbulence model validation framework is potentially transferable across magnetic confinement fusion experiments where the underlying physical model governing turbulent transport is consistent, which permits its systematic application. The framework sketched can thus be extended to different settings especially in the interdisciplinary study (both numerical and experimental) of magnetized collisional plasmas in space propulsion systems and astrophysical environments if sufficient observations exist. Overall, these physics-informed neural networks present a new paradigm in the testing of reduced plasma turbulence models. To demonstrate these results, this chapter describes a gyrokinetic model based upon \cite{mandell_hakim_hammett_francisquez_2020} in Section \ref{sec:level3.1}, outlines pertinent aspects of the physics-informed machine learning architecture from Chapter 2 now being applied anew on gyrokinetic simulation data in Section \ref{sec:level3.2}, presents the first direct comparisons of instantaneous turbulent fields in Section \ref{sec:level3.3}, and concludes with a summary in Section \ref{sec:level3.4}. \section{\label{sec:level3.1}Gyrokinetic modelling} Following the full treatment outlined in \cite{mandell_thesis} and \cite{mandell_hakim_hammett_francisquez_2020}, the long-wavelength gyrokinetic modelling analyzed in this chapter constitutes nonlinear global electromagnetic turbulence simulations on open field lines using the \texttt{Gkeyll} computational plasma framework. The full-$f$ electromagnetic gyrokinetic equation is solved in the symplectic formulation \cite{brizard2007foundations}, which describes the evolution of the gyrocenter distribution function $f_s(\v{Z},t)=f_s(\v{R},v_\parallel,\mu,t)$ for each species ($s = \{e,i\}$), where $\v{Z}$ is a phase-space coordinate composed of the guiding center position $\v{R}=(x,y,z)$, parallel velocity $v_\parallel$, and magnetic moment $\mu=m_s v_\perp^2/2B$. In terms of the gyrocentre Hamiltonian and the Poisson bracket in gyrocentre coordinates with collisions $C[f_s]$ and sources $S_s$, the gyrokinetic equation is \begin{align} \pderiv{f_s}{t} + \{f_s, H_s\} - \frac{q_s}{m_s}\pderiv{A_\parallel}{t}\pderiv{f_s}{v_\parallel} = C[f_s] + S_s, \label{liouville} \end{align} or, equivalently, \begin{align} \pderiv{f_s}{t} + \dot{\v{R}}\v{\cdot}\nabla f_s + \dot{v}^H_\parallel \pderiv{f_s}{v_\parallel}- \frac{q_s}{m_s}\pderiv{A_\parallel}{t}\pderiv{f_s}{v_\parallel} = C[f_s] + S_s, \end{align} where the gyrokinetic Poisson bracket is defined as \begin{equation} \{F,G\} = \frac{\v{B^*}}{m_s B_\parallel^*} \v{\cdot} \left(\nabla F \frac{\partial G}{\partial v_\parallel} - \frac{\partial F}{\partial v_\parallel}\nabla G\right) - \frac{\uv{b}}{q_s B_\parallel^*}\times \nabla F \v{\cdot} \nabla G, \end{equation} and the gyrocentre Hamiltonian is \begin{equation} H_s = \frac{1}{2}m_sv_\parallel^2 + \mu B + q_s \phi. \end{equation} The nonlinear phase-space characteristics are given by \begin{equation} \dot{\v{R}} = \{\v{R},H_s\} = \frac{\v{B^*}}{B_\parallel^*}v_\parallel + \frac{\uv{b}}{q_s B_\parallel^*}\times\left(\mu\nabla B + q_s \nabla \phi\right), \end{equation} \begin{eqnal}\label{vpardot} \dot{v}_\parallel &= \dot{v}^H_\parallel -\frac{q_s}{m_s}\pderiv{A_\parallel}{t} = \{v_\parallel,H_s\}-\frac{q_s}{m_s}\pderiv{A_\parallel}{t} \\ \quad &= -\frac{\v{B^*}}{m_s B_\parallel^*}\v{\cdot}\left(\mu\nabla B + q_s \nabla \phi\right)-\frac{q_s}{m_s}\pderiv{A_\parallel}{t}. \end{eqnal} \noindent Here, $B_\parallel^*=\uv{b}\v{\cdot} \v{B^*}$ is the parallel component of the effective magnetic field $\v{B^*}=\v{B}+(m_s v_\parallel/q_s)\nabla\times\uv{b} + \delta \v{B}$, where $\v{B} = B \uv{b}$ is the equilibrium magnetic field and $\delta \v{B} = \nabla\times(A_\parallel \uv{b})\approx \nabla A_\parallel \times \uv{b}$ is the perturbed magnetic field {(assuming that the equilibrium magnetic field varies on spatial scales larger than perturbations so that $A_\parallel\nabla\times\uv{b}$ can be neglected)}. Higher-order parallel compressional fluctuations of the magnetic field are neglected so that $\delta\v{B}=\delta\v{B}_\perp$ and the electric field is given by ${\mathbf E} = -\nabla\phi - (\partial{A_\parallel}/\partial t) \uv{b}$. The species charge and mass are $q_s$ and $m_s$, respectively. In \eqref{vpardot}, $\dot{v}_\parallel$ has been separated into a term coming from the Hamiltonian, $\dot{v}^H_\parallel = \{v_\parallel,H_s\}$, and another term proportional to the inductive component of the parallel electric field, $(q_s/m_s)\partial {A_\parallel}/\partial{t}$. In the absence of collisions and sources, \eqref{liouville} can be identified as a Liouville equation demonstrating that the distribution function is conserved along the nonlinear phase space characteristics. Accordingly, the gyrokinetic equation can be recast in the following conservative form, \begin{eqnal} \pderiv{(\mathcal{J}f_s)}{t} &+ \nabla\v{\cdot}( \mathcal{J} \dot{\v{R}} f_s) + \pderiv{}{v_\parallel}\left(\mathcal{J}\dot{v}^H_\parallel f_s\right) - \pderiv{}{v_\parallel}\left(\mathcal{J}\frac{q_s}{m_s}\pderiv{A_\parallel}{t} f_s \right) = \mathcal{J} C[f_s] + \mathcal{J} S_s, \label{emgk} \end{eqnal} where $\mathcal{J} = B_\parallel^*$ is the Jacobian of the gyrocentre coordinates and $\uv{b}\v{\cdot}\nabla\times\uv{b}\approx0$ so that $B_\parallel^*\approx B$. The symplectic formulation of electromagnetic gyrokinetics is utilized with the parallel velocity as an independent variable instead of the parallel canonical momentum $p_\parallel$ in the Hamiltonian formulation \cite{brizard2007foundations,hahm1988nonlinear}. This notation is used for convenience to explicitly display the time derivative of $A_\parallel$, which is characteristic of the symplectic formulation of electromagnetic gyrokinetics. The electrostatic potential, $\phi$, is determined by quasi-neutrality, \begin{equation} \sigma_g + \sigma_\text{pol} = \sigma_g - \nabla\v{\cdot}\v{P} = 0, \end{equation} with the guiding centre charge density (neglecting gyroaveraging in the long-wavelength limit) given by \begin{equation} \sigma_g = \sum_s q_s \int d\v{w}\ \mathcal{J} f_s. \end{equation} Here, $d\v{w}= 2\pi\, m_s^{-1} dv_\parallel\, d\mu = m_s^{-1} dv_\parallel\, d\mu \int d\alpha$ is the gyrocentre velocity-space volume element $(d{\bf v}=m_s^{-1}dv_\parallel\, d\mu\, d\alpha\, \mathcal{J})$ with the gyroangle $\alpha$ integrated away and the Jacobian factored out (formally, $\mathcal{J}$ should also be included in $d\v{w}$). The polarization vector is then \begin{eqnal} \v{P} &= -\sum_s \int d\v{w}\ \frac{m_s}{B^2}\mathcal{J}f_s \nabla_\perp \phi \approx -\sum_s \frac{m_s n_{0s}}{B^2} \nabla_\perp \phi \equiv - \epsilon_\perp \nabla_\perp \phi, \end{eqnal} where $\nabla_\perp=\nabla-\uv{b}(\uv{b}\v{\cdot}\nabla)$ is the gradient orthogonal to the background magnetic field. A linearized time-independent polarization density, $n_0$, is assumed which is consistent with neglecting a second-order ${\bf E \times B}$ energy term in the Hamiltonian. Such an approximation in the SOL is questionable due to the presence of large density fluctuations, although a linearized polarization density is commonly used in full-$f$ gyrokinetic simulations for computational efficiency and reflective of common numerical modelling practices \cite{ku2018fast,shi2019full,mandell_hakim_hammett_francisquez_2020}. Adding the nonlinear polarization density along with the second-order ${\bf E \times B}$ energy term in the Hamiltonian are improvements kept for future work. Consequently, the quasi-neutrality condition can be rewritten as the long-wavelength gyrokinetic Poisson equation, \begin{equation} -\nabla \v{\cdot} \sum_s \frac{m_s n_{0s}}{B^2} \nabla_\perp \phi = \sum_s q_s \int d\v{w}\ \mathcal{J}f_s, \label{poisson} \end{equation} where, even in the long-wavelength limit with no gyroaveraging, the first-order polarization charge density on the left-hand side of \eqref{poisson} incorporates some finite Larmor radius (FLR) or $k_\perp$ effects in its calculation. It is worth emphasizing that this “long-wavelength” limit is a valid limit of the full-$f$ gyrokinetic derivation since care was taken to include the guiding-center components of the field perturbations at $O(1)$. Further, although one may think of this as a drift-kinetic limit, the presence of the linearized ion polarization term in the quasineutrality equation distinguishes the long-wavelength gyrokinetic model from versions of drift-kinetics that, for example, include the polarization drift in the equations of motion. The parallel magnetic vector potential, $A_\parallel$, is determined by the parallel Amp\`ere equation, \begin{equation} -\nabla_\perp^2 A_\parallel = \mu_0 \sum_s q_s m_s \int v_\parallel \mathcal{J} f_s\,d\v{w}. \label{ampere1} \end{equation} Note that one can also take the time derivative of this equation to get a generalized Ohm's law which can be solved directly for $\pderivInline{A_\parallel}{t}$, the inductive component of the parallel electric field $E_\parallel$ \cite{reynders1993gyrokinetic, cummings1994gyrokinetic, chen2001gyrokinetic}: \begin{equation} -\nabla_\perp^2 \pderiv{A_\parallel}{t} = \mu_0 \sum_s q_s m_s \int v_\parallel \pderiv{(\mathcal{J} f_s)}{t}\, d\v{w}. \end{equation} Writing the gyrokinetic equation as \begin{equation} \pderiv{(\mathcal{J}f_s)}{t} = \pderiv{(\mathcal{J}f_s)}{t}^\star + \pderiv{}{v_\parallel}\left(\mathcal{J} \frac{q_s}{m_s}\pderiv{A_\parallel}{t} f_s\right), \label{fstar} \end{equation} where $\partial{(\mathcal{J}f_s)^\star}/\partial{t}$ denotes all terms in the gyrokinetic equation (including sources and collisions) except $\pderivInline{A_\parallel}{t}$, Ohm's law can be, after integration by parts, rewritten \begin{equation} \left(-\nabla_\perp^2 + \sum_s \mu_0 q_s^2 \int\mathcal{J} f_s\, d\v{w}\right) \pderiv{A_\parallel}{t} \notag = \mu_0 \sum_s q_s m_s \int v_\parallel \pderiv{(\mathcal{J}f_s)}{t}^\star\,d\v{w}. \label{ohmstar} \end{equation} To model collisions, the code uses a conservative Lenard--Bernstein (or Dougherty) operator \cite{Lenard1958plasma,Dougherty1964model,francisquez2020conservative}, \begin{eqnal} \label{eq:GkLBOEq} \mathcal{J}C[f_s] &= \nu\left\lbrace\pderiv{}{v_\parallel}\left[\left(v_\parallel - u_\parallel\right)\mathcal{J} f_s+v_{th,s}^2\pderiv{(\mathcal{J} f_s)}{v_\parallel}\right]\right.\\&\left.\quad +\pderiv{}{\mu}\left[2\mu \mathcal{J} f_s+2\mu\frac{m_s}{B}v_{th,s}^2\pderiv{(\mathcal{J} f_s)}{\mu}\right]\right\rbrace, \end{eqnal} where $n_s u_\parallel^2 = \int d\v{w} \mathcal{J}v_\parallel^2f_s$, $3 n_s v_{th,s}^2 = 2\int d\v{w} \mathcal{J}\mu Bf_s/m_s$, $n_s u_\parallel = \int d\v{w} \mathcal{J} v_\parallel f_s$, $n_s = \int d\v{w} \mathcal{J} f_s$, and $T_s = m_s v_{th,s}^2$. This collision operator contains the effects of drag and pitch-angle scattering, and it conserves number, momentum, and energy density. Consistent with the present long-wavelength treatment of the gyrokinetic system, FLR effects are ignored. In this work, both like-species and cross-species collisions among electrons and ions are included. The collision frequency $\nu$ is kept velocity-independent, i.e. $\nu\neq\nu(v)$. Further details about this collision operator, including its conservation properties and discretization, can be found in \cite{francisquez2020conservative}. To clarify the approximations undertaken in deriving the gyrokinetic model formulated above and its consequent effects on turbulent fields, the key assumptions are reviewed: The orderings in gyrokinetic theory that effectively reduce the full phase space's dimensionality are ${\omega}/{\Omega_s} \ll 1$ and $k_\perp/k_\parallel \gg 1$. These orderings express that the charged particle gyrofrequency ($\Omega_s = q_s B/m_s$) in a magnetic field is far greater than the characteristic frequencies of interest ($\omega$) with perpendicular wavenumbers ($k_\perp$) of Fourier modes being far larger than parallel wavenumbers ($k_\parallel$). Such properties are generally expected and observed for drift-wave turbulence in magnetically confined fusion plasmas where $\omega \ll \Omega_s$ \cite{Zweben_2007}. An additional “weak-flow” ordering \cite{Dimits_1992,Parra_Catto_2008,Dimits_2012} is applied where $v_{\bf E \times B}/v_{th,s} \approx k_\perp \rho_s q_s \phi/T_s \ll 1$ which allows for large amplitude perturbations. This approximation is also generally valid for electrons and deuterium ions in edge tokamak plasmas \cite{Belli_2018} as it assumes ${\bf E \times B}$ flows are far smaller than the thermal velocity, $v_{th,s}$, as observed in experiment \cite{blobs_review,Zweben_2015}. By constraining gradients of $\phi$ instead of $\phi$ itself, this weak-flow ordering simultaneously allows perturbations of order unity ($q_s \phi/T_s \sim 1$) at long wavelengths ($k_\perp \rho_s \ll 1$) and small perturbations ($q_s \phi/T_s \ll 1$) at short wavelengths ($k_\perp \rho_s \sim 1$) along with perturbations at intermediate scales. Alternatively, this approximation can be intuitively viewed as the potential energy variation around a gyro-orbit being small compared to the kinetic energy, $q_s\phi(\v{R} + {\bm \rho_s}) - q_s\phi(\v{R}) \approx q_s {\bm \rho_s} \cdot \nabla_\perp \phi \ll T_s$ \cite{mandell_thesis}. Here ${\bm \rho_s}$ is the gyroradius vector which points from the center of the gyro-orbit $\v{R}$ to the particle location $\v{x}$. To ensure consistency in the gyrokinetic model at higher order (although the guiding-centre limit is eventually taken in the continuum simulations, i.e. $k_\perp \rho_s \ll 1$), a strong-gradient ordering is also employed which assumes the background magnetic field varies slowly relative to edge profiles \cite{Zweben_2007}. As noted above, the long-wavelength limit is taken and variations of $\phi$ on the scale of the gyroradius is neglected. This yields guiding-center equations of motion which do not contain gyroaveraging operations. While extensions to a more complete gyrokinetic model are in progress, these contemporary modelling limitations are worth noting for the scope of the present results. In accordance with \cite{mandell_hakim_hammett_francisquez_2020}, the gyrokinetic turbulence is simulated on helical, open field lines as a rough model of the tokamak SOL at NSTX-like parameters. A field-aligned geometry \cite{beer1995field} is employed for numerical modelling whereby $x$ is the radial coordinate, $z$ is the coordinate parallel to the field lines, and $y$ is the binormal coordinate which labels field lines at constant $x$ and $z$. These coordinates map to physical cylindrical coordinates ($R,\varphi,Z)$ via $R=x$, $\varphi=(y/\sin\theta+z\cos\theta)/R_c$, $Z=z\sin\theta$. The field-line pitch $\sin\theta=B_v/B$ is taken to be constant, with $B_v$ the vertical component of the magnetic field (analogous to the poloidal field in tokamaks), and $B$ the total magnitude of the background magnetic field. The open field lines strike material walls at the top and bottom of the domain consistent with the simple magnetized torus configuration studied experimentally via devices such as the Helimak \cite{gentle2008} and TORPEX \cite{fasoli2006}. This system without magnetic shear contains unfavorable magnetic curvature producing the interchange instability that drives edge turbulence. There is no good curvature region to produce conventional ballooning-mode structure in the current setup. Further, $R_c=R_0+a$ is the radius of curvature at the centre of the simulation domain, with $R_0$ the major radius and $a$ the minor radius. This geometry is equivalent to the one in Chapter 2, with curvature operator \begin{equation} (\nabla\times\uv{b})\v{\cdot}\nabla f(x,y,z)\approx \left[(\nabla\times\uv{b})\v{\cdot} \nabla y\right]\pderiv{f}{y} =-\frac{1}{x}\pderiv{f}{y} \label{eq:GkCurv}, \end{equation} where $\v{B}=B_\text{axis}(R_0/R)\uv{e}_z$ in the last step and $B_\text{axis}$ is the magnetic field strength at the magnetic axis. This geometry represents a {flux-tube-like domain} on the outboard strictly bad curvature side that wraps helically around the torus and terminates on conducting plates at each end in $z$. {Note that although the simulation is on a flux-tube-like domain, it is not performed in the local limit commonly applied in $\delta f$ gyrokinetic codes; instead, the simulations are effectively global as they include radial variation of the magnetic field and kinetic profiles.} The simulation box is centred at $(x,y,z)=(R_c,0,0)$ with dimensions $L_x=56\rho_{i0}\approx 16.6$ cm, $L_y=100\rho_{i0}\approx 29.1$ cm, and $L_z=L_p/\sin\theta=8.0$ m, where $\rho_{i0} = \sqrt{m_i T_{i0}}/q_i B_0$ and $L_p=2.4$ m approximates the vertical height of the SOL. The velocity-space grid has extents $-4v_{th,s0}\leq v_\parallel \leq 4 v_{th,s0}$ and $0\leq\mu\leq6T_{s0}/B_0$, where $v_{th,s0}=\sqrt{T_{s0}/m_s}$ and $B_0=B_\text{axis}R_0/R_c$. The low-$\beta$ simulations presented here use piecewise-linear ($p=1$) basis functions, with $(N_x,N_y,N_z,N_{v_\parallel},N_\mu)=(32,64,16,10,5)$ the number of cells in each dimension. At high-$\beta$, due to the increased computational cost, the resolution is lowered to $(N_x,N_y,N_z,N_{v_\parallel},N_\mu)=(16,32,14,10,5)$. For $p=1$, one should double these numbers to obtain the equivalent number of grid points for comparison with standard grid-based gyrokinetic codes. The radial boundary conditions model conducting walls at the radial ends of the domain, given by the Dirichlet boundary condition $\phi=A_\parallel=0$. The condition $\phi=0$ effectively prevents ${\bf E \times B}$ flows into walls, while $A_\parallel=0$ makes it so that (perturbed) field lines never intersect the walls. For the latter, one can think of image currents in the conducting wall that mirror currents in the domain, resulting in exact cancellation of the perpendicular magnetic fluctuations at the wall. Also, the magnetic curvature and $\nabla B$ drifts do not have a radial component in this helical magnetic geometry. These boundary conditions on the fields are thus sufficient to guarantee that there is no flux of the distribution function into the radial walls. Conducting-sheath boundary conditions are applied in the $z$-direction \cite{shi2017gyrokinetic,shi2019full} to model the Debye sheath (the dynamics of which is beyond the gyrokinetic ordering), which partially reflects one species (typically electrons) and fully absorbs the other species depending on the sign of the sheath potential. This involves solving the gyrokinetic Poisson equation for $\phi$ at the $z$-boundary (i.e. sheath entrance), and using the resulting sheath potential to determine a cutoff velocity below which particles (typically low energy electrons) are reflected by the sheath. {Notably, this boundary condition allows current fluctuations in and out of the sheath. This differs from the standard logical sheath boundary condition \cite{parker1993suitable} which imposes zero net current to the sheath by assuming ion and electron currents at the sheath entrance are equal at all times.} The fields do not require a boundary condition in the $z$-direction since only perpendicular derivatives appear in the field equations. The simulations are carried out in a sheath-limited regime but there can be electrical disconnection from the plasma sheath if the Alfv\'en speed is slow enough. Periodic boundary conditions are used in the $y$-direction. The simulation parameters roughly approximate an H-mode deuterium plasma in the NSTX SOL: $B_\text{axis}=0.5$ T, $R_0=0.85$ m, $a=0.5$ m, $T_{e0}=T_{i0}=40$ eV. To model particles and heat from the core crossing the separatrix, a non-drifting Maxwellian source of ions and electrons is applied, \begin{equation} S_{s} = \frac{n_S(x,z)}{(2\pi T_S/m_{s})^{3/2}}\exp\left(-\frac{m_{s} v^2}{2 T_S}\right), \end{equation} with source temperature $T_{S}=70$ eV for both species and $v^2 = v_\parallel^2 + 2 \mu B/m_s$. The source density is given by \begin{equation} n_S(x,z) = \begin{cases} S_0\exp\left(\frac{-(x-x_S)^2}{(2\lambda_S)^2}\right)\qquad \qquad &|z|<L_z/4\\ 0 \qquad &\mathrm{otherwise} \end{cases} \end{equation} so that $x_S-3\lambda_S < x < x_S+3\lambda_S$ delimits the source region, and the code sets $x_S=1.3$ m and $\lambda_S=0.005$ m. This localized particle source structure in $z$-space results in plasma ballooning out largely in the centre of the magnetic field line. The source particle rate $S_0$ is chosen so that the total (ion plus electron) source power matches the desired power into the simulation domain, $P_\mathrm{src}$. Since \texttt{Gkeyll} simulates a flux-tube-like fraction of the whole SOL domain, $P_\mathrm{src}$ is related to the total SOL power, $P_\mathrm{SOL}$, by $P_\mathrm{src} = P_\mathrm{SOL}L_y L_z/(2\pi R_c L_\mathrm{pol})\approx0.115 P_\mathrm{SOL}$. Amplitudes are adjusted to approximate $P_\mathrm{SOL}=5.4$ MW crossing into these open flux surfaces at low-$\beta$ conditions relevant to NSTX \cite{Zweben_2015}. An artificially elevated density case with $P_\mathrm{SOL}=54.0$ MW is also tested to study edge turbulence at high-$\beta$. The collision frequency is comparable in magnitude to the inverse autocorrelation time of electron density fluctuations at low-$\beta$. For the high-$\beta$ case, $\nu$ is found to be about $10 \times$ larger, and the plasma thus sits in a strongly collisional regime. Simulations reach a quasi-steady state with the sources balanced by end losses to the sheath, although there is no neutral recycling included yet which is a focus of ongoing work \cite{bernard2020a}. Unlike in \cite{shi2019full}, no numerical heating nor source floors are applied in the algorithm to ensure positivity. In summary, the full-$f$ nonlinear electromagnetic gyrokinetic turbulence simulations of the NSTX plasma boundary region employ the lowest-order, i.e. guiding-center or drift-kinetic limit, of the system. Implementing gyroaveraging effects given by the next order terms in advanced geometries is the focus of future work \cite{noah_private}. These present approximations in modern full-$f$ global gyrokinetic simulations should be kept in mind when attributing any similarities or differences to two-fluid theory in the next sections since the gyrokinetic formulation can itself be improved. The turbulence simulations presented are thus a reflection of the current forefront of numerical modelling. A full exposition of the derivation and benchmarking including the energy-conserving discontinuous Galerkin scheme applied in \texttt{Gkeyll} for the discretization of the gyrokinetic system in 5-dimensional phase space along with explicit time-stepping and avoidance of the Amp\`ere cancellation problem is found in \cite{mandell_thesis}. \section{\label{sec:level3.2}Machine learning fluid theory (again)} A vital goal in computational plasma physics is determining the minimal complexity necessary in a theory to sufficiently represent observations of interest for predictive fusion reactor simulations. Convection-diffusion equations with effective mean transport coefficients are widely utilized \cite{Reiter_1991,SOLPS_DEKEYSER2019125} but insufficient in capturing edge plasma turbulence where scale separation between the equilibrium and fluctuations is not justified \cite{NAULIN2007,mandell_thesis}. Other reduced models such as classical magnetohydrodynamics are unable to resolve electron and ion temperature dynamics with differing energy transport mechanisms in the edge \cite{TeTi_2008,TeTi_2009,TeTi_2016}. Following the framework set forth in Chapter 2 (with few small differences noted here), Chapter 3 considers the widely used first-principles-based two-fluid drift-reduced Braginskii equations \cite{Braginskii1965RvPP,francisquez_thesis} in the electrostatic limit relevant to low-$\beta$ conditions in the edge of fusion experiments \cite{Zweben_2015} for comparison to gyrokinetic modelling \cite{mandell_hakim_hammett_francisquez_2020}. Drift-reduced Braginskii theory is also a full-$f$ \cite{Belli_2008,Full-F,Held_2020} nonlinear model but evaluated in the fluid limit. To align coordinates with the gyrokinetic plasma, one adjustment here is that $\v{b_0} = +{\bf \hat{z}}$ instead of $\v{b_0} = -{\bf \hat{z}}$ as in Chapter 2. The 3-dimensional shearless field-aligned coordinate system over which the fluid equations are formulated in the physics-informed machine learning framework thus exactly matches the gyrokinetic code's geometry. To consistently calculate the electric field response and integrate \eqref{eq:nDotGDBH}--\eqref{eq:TiDotGDBH} in time, classically one would compute the turbulent $\phi$ in drift-reduced Braginskii theory by directly invoking quasineutrality and numerically solving the boundary value problem given by the divergence-free condition of the electric current density \cite{DRB_consistency3,Zholobenko_2021}. For the purposes of comparison with gyrokinetic modelling, this novel technique can compute the turbulent electric field consistent with the drift-reduced Braginskii equations without explicitly evaluating $\nabla \cdot \v{j} = 0$ nor directly applying the Boussinesq approximation. Namely, this work applies the validated physics-informed deep learning framework from Chapter 2 to infer the gauge-invariant $\phi$ directly from \eqref{eq:nDotGDBH} and \eqref{eq:TeDotGDBH} for direct analysis of electron pressure and electric field fluctuations in nonlinear global electromagnetic gyrokinetic simulations and electrostatic two-fluid theory. The only existing requirement on the observational data in this deep learning framework is that the measurements' spatial and temporal resolutions should be be finer than the autocorrelation length and time, respectively, of the turbulence structures being analyzed. This scale condition is well-satisfied for the low-$\beta$ case and marginally-satisfied for the high-$\beta$ data analyzed. The set of collocation points over which the partial differential equations are evaluated correspond to the positions of the observed electron pressure data, i.e. $\lbrace x_0^i,y_0^i,z_0^i,t_0^i\rbrace^{N_0}_{i=1} = \lbrace x_f^i,y_f^i,z_f^i,t_f^i\rbrace^{N_f}_{i=1}$ once again. One difference is that loss functions are optimized with mini-batch sampling using $N_0 = N_f = 1000$ using just L-BFGS \cite{10.5555/3112655.3112866} for 20 hours over 32 cores on Intel Haswell-EP processors. The only locally observed dynamical quantities in these equations are 2-dimensional views of $n_e$ and $T_e$ (to emulate gas puff imaging \cite{mathews2022deep}) without any explicit information about boundary conditions nor initializations nor ion temperature dynamics nor parallel flows. The collocation grid consists of a continuous spatiotemporal domain without time-stepping nor finite difference schema in contrast with standard numerical codes. All analytic terms encoded in these equations including high-order operators are computed exactly by the neural networks without discretization. In that sense, it is a potentially higher fidelity continuous representation of the continuum equations. While the linearized polarization density---analogous to the Boussinesq approximation---is employed in the gyrokinetic simulations, no such approximations are explicitly applied by the neural networks. With the availability of measurements often sparse in fusion experiments, designing diagnostic techniques for validating turbulence theories with limited information is important. On this point, it is noteworthy that this framework can potentially be adapted to experimental measurements of electron density and temperature \cite{griener_continuous_2020,Bowman_2020,Mathews2020,mathews2022deep}. To handle the particular case of 2-dimensional turbulence data, one essentially assumes slow variation of dynamics in the $z$-coordinate and effectively set all parallel derivatives to zero. In computational theory comparisons where no such limitations exist, training on $n_e$ and $T_e$ in 3-dimensional space over long macroscopic timescales can be easily performed via segmentation of the domain and parallelization, but a limited spatial view away from numerical boundaries with reduced dimensionality is taken to mirror experimental conditions for field-aligned observations \cite{Zweben_2017,mathews2022deep} and fundamentally test what information is indispensable to compare kinetic and fluid turbulence. To compare the gyrokinetic and two-fluid theories as directly as possible, the toroidal simulations are analyzed at $z = L_z/3$ where no applied sources are present. Further, beyond the inclusion of appropriate collisional drifts and sources, this technique is generalizable to boundary plasmas with multiple ions and impurities present due to the quasi-neutrality assumptions underlying the two-fluid theory \cite{multi_species}. \section{\label{sec:level3.3}Quantifying plasma turbulence consistency} A defining characteristic of a nonlinear theory is how it mathematically connects dynamical variables. The focus of this work is quantitatively examining the nonlinear relationship extant in plasma turbulence models between electron pressure and electric field fluctuations. As outlined in Section \ref{sec:level3.2}, using a custom physics-informed deep learning framework whereby the drift-reduced Braginskii equations are embedded in the neural networks via constraints in the form of implicit partial differential equations, this thesis demonstrates the first ever direct comparisons of instantaneous turbulent fields between electrostatic two-fluid theory and electromagnetic long-wavelength gyrokinetic modelling in low-$\beta$ helical plasmas with results visualized in Figure \ref{PlasmaPINN_lowbeta}. This multi-network physics-informed deep learning framework enables direct comparison of drift-reduced Braginskii theory with gyrokinetics and bypasses demanding limitations in standard forward modelling numerical codes which must precisely align initial conditions, physical sources, numerical diffusion, and boundary constraints (e.g. particle and heat fluxes into walls) in both gyrokinetic and fluid representations when classically attempting comparisons of turbulence simulations and statistics. Further, the theoretical and numerical conservation properties of these simulations ordinarily need to be evaluated which can be a significant challenge especially when employing disparate numerical methods with differing discretization schema and integration accuracy altogether \cite{francisquez2020fluid}. This framework overcomes these hurdles by training on partial electron pressure observations simultaneously with the plasma theory sought for comparison. Figure \ref{PlasmaPINN_lowbeta} specifically shows that the turbulent electric field predicted by drift-reduced Braginskii two-fluid theory is largely consistent with long-wavelength gyrokinetic modelling in low-$\beta$ helical plasmas. The consistency is also evident if analyzing $y$-averaged radial electric field fluctuations and accounting for the inherent scatter ($\sigma_{PINN}$) from the stochastic optimization employed as displayed in Figure \ref{PlasmaPINN_lowbeta_avg}. To clarify the origins of $\sigma_{PINN}$, every time this physics-informed deep learning framework is trained from scratch against the electron pressure observations, the learned turbulent electric field will be slightly different due to the random initialization of weights and biases for the networks along with mini-batch sampling during training. To account for this stochasticity, the framework is trained anew 100 times while collecting the predicted turbulent $E_r$ after each optimization. the quantity $\sigma_{PINN}$ corresponds to the standard deviation from this collection. The two-fluid model's results displayed in Figure \ref{PlasmaPINN_lowbeta_avg} are thus based upon computing $\langle E_r\rangle_y$ from 100 independently-trained physics-informed machine learning frameworks. Their turbulent outputs are averaged together to produce the mean, while the scatter inherently associated with the 100 realizations---which approximately follows a normal distribution---comprises the shaded uncertainty interval spanning 2 standard deviations. As visualized, the $\langle E_r\rangle_y$ profiles predicted by the the electromagnetic gyrokinetic simulation and electrostatic drift-reduced Braginskii model are generally in agreement within error bounds at low-$\beta$. \begin{figure*}[ht] \includegraphics[width=1.0\linewidth]{templates/Fig1_EM_low_beta_GKvDRB_avg_div.png} \caption{\label{PlasmaPINN_lowbeta}The turbulent electric potential, $\phi$ (a gauge-invariant quantity which is equivalent up to a scalar constant offset), and radial electric field, $E_r$, concomitant with electron pressure fluctuations as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling in low-$\beta$ conditions are in good quantitative agreement. The two-fluid theory's $\phi$ and $E_r$ are based upon the training the physics-informed deep learning framework while the gyrokinetic results are from the discontinuous Galerkin numerical solver.} \end{figure*} \begin{figure}[ht] \includegraphics[width=0.9\linewidth]{Fig2_lowbetaEM_avgEry_vs_x.png} \caption{\label{PlasmaPINN_lowbeta_avg}The $y$-averaged turbulent radial electric field, $\langle E_r\rangle_y$, as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling at low-$\beta$. The results plotted for the drift-reduced Braginskii output here are based upon collecting 100 independently-trained physics-informed neural networks.} \end{figure} \begin{figure*}[ht] \includegraphics[width=1.0\linewidth]{templates/Fig3_EM_high_beta_GKvDRB_avg_div.png} \caption{\label{PlasmaPINN_highbeta}The turbulent electric potential, $\phi$ (a gauge-invariant quantity which is equivalent up to a scalar constant offset), and radial electric field, $E_r$, concomitant with electron pressure fluctuations as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling in high-$\beta$ conditions are quantitatively inconsistent. The two-fluid theory's $\phi$ and $E_r$ are based upon the training of the physics-informed deep learning framework while the gyrokinetic results are from the discontinuous Galerkin numerical solver.} \end{figure*} \begin{figure}[ht] \includegraphics[width=0.9\linewidth]{templates/Fig4_highbetaES_avgEry_vs_x1.png} \caption{\label{PlasmaPINN_highbeta_avg}The $y$-averaged turbulent radial electric field, $\langle E_r\rangle_y$, as predicted by electrostatic drift-reduced Braginskii theory and electromagnetic gyrokinetic modelling at high-$\beta$. The results plotted for the drift-reduced Braginskii output here are based upon collecting 100 independently-trained physics-informed neural networks.} \end{figure} In high-$\beta$ conditions where the particle source is artificially increased by 10$\times$, electromagnetic effects become important and the electrostatic two-fluid theory is inconsistent with electromagnetic gyrokinetic simulations as displayed by Figure \ref{PlasmaPINN_highbeta}. As remarked above, multiple realizations are conducted to analyze the sample statistics of the learned turbulent fields consistent with drift-reduced Braginskii two-fluid theory based solely upon the intrinsic scatter during training to account for the stochastic nature of the optimization. By collecting 100 independently-trained realizations, the uncertainty linked to this intrinsic scatter can be evaluated as demonstrated in Figure \ref{PlasmaPINN_highbeta_avg}. These discrepancies indicate that fluctuations in $\bf B_\perp$, which are evaluated by solving the parallel Amp\`ere equation (or, equivalently, generalized Ohm's law), cannot be neglected when considering plasma transport across the inhomogeneous background magnetic field as in electrostatic theory. While the fluid approximation is generally expected to be increasingly accurate at high density due to strong coupling between electrons and ions, these results underline the importance of electromagnetic effects even in shear-free high-$\beta$ plasmas as found in planetary magnetospheres and fusion experiments (e.g. dipole confinement \cite{LDX-experiment}), and for the first time enables the degree of error between instantaneous fluctuations to be precisely quantified across turbulence models. Uncertainty estimates stemming from the stochastic framework in both regimes are reflected in Figure \ref{PlasmaPINN_inst_err}. One should note that there are novel and different levels of errors to be mindful of in this evaluation. For example, poor convergence arising from nonuniqueness of the turbulent $E_r$ found during optimization against the drift-reduced Braginskii equations, or $\mathcal{L}_{f_{n_e}}$ and $\mathcal{L}_{f_{T_e}}$ remaining non-zero (and not below machine precision) even after training \cite{Mathews2021PRE}. These potential errors exist on top of standard approximations in the discontinuous Galerkin numerical scheme representing the underlying gyrokinetic theory such as the implemented Dougherty collision operator. Notwithstanding, when comparing the electrostatic drift-reduced Braginskii theory to electromagnetic long-wavelength gyrokinetic simulations at low-$\beta$, the results represent good consistency in the turbulent electric field and all observed discrepancies are mostly within the stochastic optimization's expected underlying scatter. Alternatively, when analyzing high-$\beta$ conditions, it is observed that the electrostatic two-fluid model cannot explain the turbulent electric field in the electromagnetic gyrokinetic simulations. In particular, $\Delta E_r \gtrsim 15\sigma_{PINN}$ in the bottom plot of Figure \ref{PlasmaPINN_inst_err}, where $\Delta E_r$ is the difference in the instantaneous $E_r$ predicted by two-fluid theory and gyrokinetics. This signals that the two sets of turbulent $E_r$ fluctuations are incompatible at high-$\beta$ conditions and precisely quantifies the separation in the models' predictions. \begin{figure} \includegraphics[width=1.0\linewidth]{templates/Fig5_relative_Er_error_norm_GKvDRB_merged_horizontal.png} \caption{\label{PlasmaPINN_inst_err}The relative error in the instantaneous radial electric field fluctuations ($\Delta E_r / \sigma_{PINN}$) between electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetic modelling is displayed in low-$\beta$ (top) and high-$\beta$ (bottom) conditions. While all errors in the low-$\beta$ scenario are generally within approximately 3--4 standard deviations and representative of mostly good quantitative agreement, one must go to over $15\sigma_{PINN}$ to fully account for the turbulent fields using an electrostatic two-fluid theory at $\beta_e \sim 2\%$. The results are based upon collecting 100 independently-trained physics-informed neural networks to compute the turbulent $E_r$ and the intrinsic scatter in these predictions.} \end{figure} Our multi-network physics-informed deep learning framework demonstrates the suitability of electrostatic two-fluid theory as a good approximation of turbulent electric fields in modern gyrokinetic simulations for low-$\beta$ helical plasmas with sufficient initial and boundary conditions. Conversely, the electrostatic turbulence model is demonstrably insufficient for high-$\beta$ plasmas. This finding is indicative of the importance of including electromagnetic effects such as magnetic flutter in determining cross-field transport even at $\beta_e \sim 2\%$. But field line perturbations and the reduced numerical representation of gyrokinetic theory are not the only effects at play causing mismatch at high-$\beta$: due to the nature of the strong localized particle source in $z$-space to produce high-$\beta$ conditions, parallel dynamics including electron flows along field lines and Ohmic heating effects become increasingly important. These variables should now be observed or learnt first from the 2-dimensional electron pressure measurements to accurately reconstruct the turbulent electric field which signifies a departure from the expected low-$\beta$ edge of tokamaks. Going forward, consideration of advanced magnetic geometries with squeezing and shearing of fusion plasmas near null-points, which may even couple-decouple upstream turbulence in tokamaks, will be important in the global validation of reduced turbulence models with realistic shaping \cite{Ryutov_geometry,Kuang2018APS,kuang_thesis,Nespoli_2020,Myra_2020}. Also, while there is good convergence in the low-$\beta$ gyrokinetic simulations at parameters relevant to the edge of NSTX, numerical convergence in the artificially elevated high-$\beta$ case is currently questionable and a potential source of discrepancy. Running the high-$\beta$ gyrokinetic simulation with proper collision frequency at an improved resolution of $(N_x,N_y,N_z,N_{v_\parallel},N_\mu)=(48,96,18,10,5)$ would cost $\sim$4 million CPU-hours to check and such investigations are left for the future. As for distinctiveness, the techniques used for computing the displayed turbulent electric fields in the two cases are markedly different. In particular, the long-wavelength gyrokinetic Poisson equation, which is originally derived from the divergence-free condition of the electric current density, is employed in the gyrokinetic simulations. In contrast, simply the electron fluid evolution equations are used to infer the unknown turbulent field fluctuations consistent with drift-reduced Braginskii theory \cite{Mathews2021PRE}. A principle underlying these models is quasineutrality, but this condition is not sufficient on its own. If one were to apply equilibrium models such as the Boltzmann relation or simple ion pressure balance as expected neoclassically, the turbulent electric field estimates for these nonequilibrium plasmas with nontrivial cross-field transport would be highly inaccurate as in Chapter 2. Further, no external knowledge of boundary conditions such as sheath effects are explicitly provided to the physics-informed deep learning framework, but this information implicitly propagates from the walls into the observations of electron pressure. This novel approach resultantly permits using limited 2D measurements to compare a global 3D fluid turbulence model directly against 5D gyrokinetics beyond statistical considerations for characterizing non-diffusive intermittent edge transport \cite{NAULIN2007}. All in all, the agreement between drift-reduced Braginskii theory and gyrokinetics supports its usage for predicting turbulent transport in low-$\beta$ shearless toroidal plasmas, but an analysis of all dynamical variables is required for the full validation of drift-reduced Braginskii theory. Alternatively, when 2-dimensional experimental electron density and temperature measurements are available \cite{Furno2008,mathews2022deep}, this technique can be used to infer $E_r$ and the resulting structure of turbulent fluxes heading downstream. \section{\label{sec:level3.4}Conclusion} To probe the fundamental question of how similar two distinct turbulence models truly are, using a novel technique to analyze electron pressure fluctuations, this chapter has directly demonstrated that there is good agreement in the turbulent electric fields predicted by electrostatic drift-reduced Braginskii theory and electromagnetic long-wavelength gyrokinetic simulations in low-$\beta$ helical plasmas. At $\beta_e \sim 2\%$, the 2-dimensional electrostatic nature of the utilized fluid theory becomes insufficient to explain the microinstability-induced particle and heat transport. Overall, by analyzing the interconnection between dynamical variables in these global full-$f$ models, physics-informed deep learning can quantitatively examine this defining nonlinear characteristic of turbulent physics. In particular, one can now unambiguously discern when agreement exists between multi-field turbulence theories and identify disagreement when incompatibilities exist with just 2-dimensional electron pressure measurements. This machine learning tool can therefore act as a necessary condition to diagnose when reduced turbulence models are unsuitable, or, conversely, iteratively construct and test theories till agreement is found with observations. While this work focuses on the electric field response to electron pressure, extending the analysis to all dynamical variables (e.g. $T_i, \vpe, \vpi$) for full validation of reduced multi-field turbulence models in a variety of regimes (e.g. collisionality, $\beta$, closed flux surfaces with sheared magnetic field lines) using electromagnetic fluid theory is the subject of future work. Also, since plasma fluctuations can now be directly compared across models, as gyrokinetic codes begin including fully kinetic neutrals, this optimization technique can help validate reduced source models to accurately account for atomic and molecular interactions with plasma turbulence in the edge of fusion reactors \cite{Thrysoe_2018,Thrysoe_2020} since these processes (e.g. ionization, recombination) affect the local electric field. Further progress in the gyrokinetic simulations such as the improved treatment of gyro-averaging effects \cite{brizard2007foundations}, collision operators \cite{francisquez2020conservative}, and advanced geometries \cite{mandell_thesis} will enable better testing and discovery of hybrid reduced theories as well \cite{zhu2021drift}. For example, in diverted reactor configurations, electromagnetic effects become increasingly important for transport near X-points where $\beta_{p} \rightarrow \infty$. A breakdown of Alfv\'{e}n's theorem in these regions can also arise due to the impact of Coulomb collisions and magnetic shear contributing to an enhanced perpendicular resistivity \cite{Myra-X-point} which presents an important test case of non-ideal effects within reduced turbulence models. While this work supports the usage of electrostatic two-fluid modelling, with adequate initial and boundary conditions, over long-wavelength gyrokinetics for low-$\beta$ magnetized plasmas without magnetic shear, a comparison of all dynamical variables beyond the turbulent electric field is required for a full validation of the reduced model. Further investigations into reactor conditions may suggest the modularization of individually validated fluid-kinetic turbulence models across different regions in integrated global device modelling efforts \cite{hakim2019discontinuous,Merlo2021_XGC_GENE}. This task can now be efficiently tackled through pathways in deep learning as demonstrated by this new class of validation techniques. In addition, precisely understanding the fundamental factors--both physical and numerical--determining the prediction interval, $\sigma_{PINN}$, is the subject of ongoing research in analyzing the nature (e.g. uniqueness, smoothness) of chaotic solutions to fluid turbulence equations and the chaotic convergence properties of physics-informed neural networks. \chapter{Plasma and neutral fluctuations from gas puff turbulence imaging in the SOL of Alcator C-Mod} \setlength{\epigraphwidth}{0.85\textwidth} \epigraph{Melody and harmony are like lines and colors in pictures. A simple linear picture may be completely beautiful; the introduction of color may make it vague and insignificant. Yet color may, by combination with lines, create great pictures, so long as it does not smother and destroy their value.}{Rabindranath Tagore, interviewed by Albert Einstein} Diagnosing edge plasmas is an essential task towards testing turbulence models and better understanding plasma fueling and confinement in fusion devices. Gas puff imaging (GPI) of turbulence is a widely applied experimental diagnostic that captures line emission based upon the interaction of neutrals with the hot plasma. As a technique with decades of application in a range of settings \cite{Zweben_2017}, optical imaging of fluctuations provides a view of plasma turbulence. This transport is critical to the operation and energy gain of nuclear fusion reactors, but interpretation (e.g. velocimetry \cite{velocimetry_GPI}) of these fluctuations to directly test reduced physics models is not always straightforward. By tracing the atomic theory underlying the nonlinear dynamics of observed HeI line emission, this chapter outlines a novel spectroscopic method for quantifying the 2-dimensional electron pressure and neutral dynamics on turbulent scales based upon high-resolution visible imaging. This framework is independent of the previous chapters, but will begin enabling the physics-informed deep learning techniques of Chapters 2 and 3 to be translated into experiment. The plasma edge in magnetic fusion devices is characterized by neighbouring regions: confined plasmas where temperatures can exceed 10$^{6}\text{ K}$, and the colder SOL where gaseous particles may not be completely ionized. These regions exist tightly coupled to one another and inseparable in many respects. Consequently, accounting for neutral transport in conjunction with ion and electron turbulence is essential in wholly analyzing boundary plasma fluctuations. Edge turbulence is characterized by a broadband spectrum with perturbation amplitudes of order unity and frequencies ranging up to 1 MHz. Edge localized modes and intermittent coherent structures convecting across open field lines can be responsible for significant particle losses and plasma-wall interactions that strongly influence operations. To model the vast dynamical scales present in fusion plasmas accordingly requires sufficiently complex modelling techniques. This chapter introduces custom neural architectures within a multi-network deep learning framework that bounds outputs to abide by collisional radiative theory \cite{Fujimoto1979ACM,GOTO_2003} and searches for solutions consistent with continuity constraints on neutral transport \cite{Wersal_2017}. Learning nonlinear physics via optimization in this way provides a new way to examine edge turbulence using 587.6 nm line emission observed by GPI. While the methodology is not fixed to any device, this chapter focuses on 2-dimensional experimental brightness measurements from open flux surfaces on the Alcator C-Mod tokamak \cite{Hutch_CMod, Alcator_Greenwald}, where a good signal-to-noise ratio is found. The validation techniques outlined in Chapters 2 and 3 emphasize the importance of comprehensive diagnostic coverage of electron dynamics on turbulent spatial and temporal scales. To this end, this chapter describes the first calculations of the 2-dimensional turbulent electron density, electron temperature, and neutral density that self-consistently include fluctuation-induced ionization using only observations of the 587.6 nm line via fast camera imaging. This novel turbulence diagnostic analysis paves new ways in systematically measuring edge plasma and neutral fluctuations. To demonstrate this framework, the present chapter evaluates the validity of collisional radiative theory in conditions relevant to fusion plasmas for atomic helium line emission in Section \ref{sec:level4.1}, overviews the experimental setup for GPI on the Alcator C-Mod tokamak in \ref{sec:level4.2}, outlines a custom physics-informed machine learning optimization technique designed for turbulence imaging in Section \ref{sec:level4.3}, presents results from the analysis applied to experimental fast camera data in section \ref{sec:level4.4}, and concludes with a summary and future outlook in Section \ref{sec:level4.5}. \section{\label{sec:level4.1}Time-dependent analysis of quantum states in atomic helium} The electronic transition from $3^3 D$ to $2^3 P$ quantum states in atomic helium results in photon emission with a rest frame wavelength of 587.6 nm. Atomic physics modelling of this line radiation in a plasma correspondingly requires tracking all relevant electron transition pathways that can populate or depopulate $3^3 D$ \cite{Fujimoto1979ACM,GOTO_2003}. The starting point in this analysis is to consider the full rate equations where a quantum state $p$ follows \begin{eqnal}\label{eq:full_rate_eqn} \frac{dn(p)}{dt} &= \sum\limits_{q \neq p} \lbrace {C(q,p)n_e + A(q,p)} \rbrace n(q) \\&- \lbrace {\sum\limits_{q \neq p} C(p,q)n_e + \sum\limits_{q < p} A(p,q)} + {S(p)n_e }\rbrace n(p) \\&+ \lbrace {\alpha(p)n_e + \beta(p) + \beta_d(p)} \rbrace n_i n_e, \end{eqnal} \noindent where $n(p)$ is the population density of the $p = n^{2S + 1} L$ state, in which $n$ is the principal quantum number, $S$ is the spin, and $L$ is the orbital angular momentum quantum number. The notation $q < p$ indicates that the quantum state $q$ lies energetically below $p$. Eq. \eqref{eq:full_rate_eqn} includes the spontaneous transition probability from $p$ to $q$ given by the Einstein A coefficient $A(p,q)$, electron impact transitions $C(p,q)$, electron impact ionization $S(p)$, three-body recombination $\alpha(p)$, radiative recombination $\beta(p)$, and dielectronic recombination $\beta_q(p)$, with $n_e$ and $n_i$ denoting the electron density and hydrogen-like He$^+$ density, respectively. All aforementioned rate coefficients except $A(p,q)$ have a dependence on the electron temperature ($T_e$) that arises from averaging cross-sections over a Maxwellian velocity distribution for electrons, which are based upon calculations with the convergent close-coupling (CCC) \cite{CCC1,CCC2,CCC3} and R-matrix with pseudostates (RMPS) \cite{RMPS} methods using high precision calculations of helium wavefunctions \cite{Drake1,Drake2}. The numerical framework applied follows \cite{GOTO_2003,Zholobenko_thesis} to model atomic helium with a corresponding energy level diagram visualized in Figure \ref{HeI_states}. Quantum states with $L \leq 2$ are resolved for $n < 8$ while states with $L \geq 3$ are bundled together into a single level denoted as ``$F+$''. For $n \geq 8$, $L$ is not resolved, while those with $n \geq 11$ are approximated as hydrogenic levels with statistical weights twice those of hydrogen. All energy levels up to $n=26$ are included with $n \geq 21$ being given by the Saha-Boltzmann equilibrium \cite{McWhirter_1963,Fujimoto1979ACM,Zholobenko_thesis}. For application in magnetized plasmas (e.g. tokamaks), where rate coefficients vary with magnetic field strength due to wavefunction mixing, spin-orbit interactions are included to account for mixing between the singlet and triplet fine structure levels \cite{GOTO_2003,Zholobenko_thesis}. Finite magnetic fields largely influence the modelling of metastable species and higher orbital quantum numbers \cite{Zholobenko_2021_validation}. To quantify radiation trapping effects, the dimensionless optical depth for a Doppler-broadened line transition between states $j \rightarrow k$ can be expressed as \cite{Huba2013} \begin{eqnal}\label{eq:optical_depth} \tau_{j \rightarrow k} = 5.4 \times 10^{-3} f_{j \rightarrow k} \lambda_{j \rightarrow k} n_j (\mu_j/T_j)^{\frac{1}{2}} L \end{eqnal} \noindent where $f_{j \rightarrow k}$ is the absorption oscillator strength, $\lambda_{jk} \ [\text{nm}]$ is the line center wavelength, $\mu_j$ is the mass ratio of the emitting species relative to a proton, $L \ [\text{cm}]$ is the physical depth of the gas along the viewing chord, and $n_j \ [10^{13} \ \text{cm}^{-3}]$ and $T_j \ [\text{eV}]$ are the density and temperature, respectively, of particles in state $j$. For 587.6 nm HeI line emission in conditions relevant to magnetic confinement fusion devices, where $f_{2^3P \rightarrow 3^3D} \sim 0.6$ \cite{HeI_coeff}, $\tau_{2^3P \rightarrow 3^3D} \ll 1$. This.results in the edge being optically thin for spectroscopic analysis of a localized gas puff \cite{Zholobenko_thesis,Zweben_2017}. \begin{figure}[ht] \centering \includegraphics[width=0.65\linewidth]{HeI-quantum-states.png} \caption{\label{HeI_states} Energy level diagram for atomic helium considered in the calculations. An arrow connects $3^3D \rightarrow 2^3P$, which is the origin of the 587.6 nm photon emission. The labels $^{1,3}F+$ denote the quantum states representing all levels with $L \geq 3$. Figure reprinted from \cite{GOTO_2003} with permission from Elsevier.} \end{figure} The rate equations \eqref{eq:full_rate_eqn} for an optically thin plasma can be equivalently expressed in matrix form as \cite{STOTLER_2007,Zholobenko_thesis} \begin{eqnal}\label{eq:matrix_full_rate_eqn} \frac{d{\bf{n}}}{dt} = {\bf{M}}(n_e,T_e) {\bf{n}} + {\bf{\Gamma}}(n_e,T_e,n_i) \end{eqnal} \noindent where ${\bf{n}}$ is a vector of the $N$ atomic states, ${\bf{M}}$ represents the $N \times N$ matrix of rates for collisional ionization, excitation, de-excitation, radiative decay, and recombination as above, and ${\bf{\Gamma}}$ symbolizes sources. Since time-evolving every state in atomic helium is computationally expensive, effective atomic physics models known as collisional radiative (CR) theories are often constructed. This involves separating the $N$ states into $P$ and $Q$ spaces of sizes $N_P$ and $N_Q$, respectively, such that \eqref{eq:matrix_full_rate_eqn} becomes \begin{eqnal}\label{eq:matrix_P_Q} \frac{d}{dt} \begin{bmatrix} {\bf n_{P}} \\ {\bf n_{Q}} \end{bmatrix} = \begin{bmatrix} {\bf M_{P}} & {\bf M_{PQ}} \\ {\bf M_{QP}} & {\bf M_{Q}} \end{bmatrix} \begin{bmatrix} {\bf n_{P}} \\ {\bf n_{Q}} \end{bmatrix} + \begin{bmatrix} {\bf \Gamma_{P}} \\ {\bf \Gamma_{Q}} \end{bmatrix} = \begin{bmatrix} {\frac{d \bf n_{P}}{dt}} \\ {0} \end{bmatrix} \end{eqnal} Here the $Q$ space is assumed to be time-independent, under the expectation that they evolve on timescales faster than those of plasma turbulence fluctuations, this allows one to fold the dynamics of the $Q$ space into effective rates which depend upon $\bf n_P$. This can be written as \begin{eqnal}\label{eq:Qspace} {\bf n_{Q}} = - {\bf M_{Q}}^{-1}(\bf M_{QP} n_P + \bf \Gamma_{Q}) \end{eqnal} \begin{eqnal}\label{eq:Pspace} \frac{d}{dt}{\bf n_{P}} &= (\bf M_{P} - M_{PQ}M_Q^{-1}M_{QP})n_P - {\bf M_{PQ}M_Q^{-1}\Gamma_{Q}} + {\bf \Gamma_{P}} \\ &= {{\bf M}_{\text{eff}}}{\bf n_P} + {{\bf \Gamma}_{\text{eff}}} \end{eqnal} But the applicability of such a separation in dynamical space needs to be quantitatively tested. In particular, for the constructed CR model to be applicable, it should satisfy Greenland's criteria \cite{Greenland_CR,Greenland_full,STOTLER_2007}, which requires evaluating the normalized eigenvalues and eigenvectors of ${\bf M}(n_e,T_e)$. The $N$ eigenvectors are arranged as the columns of an $N \times N$ matrix $\bf T$, in order of increasing eigenvalue, $\lambda$, and can be partitioned into 4 submatrices: \begin{eqnal}\label{eq:Tspace} {\bf T} = \begin{bmatrix} {\bf T_{P}} & {\bf T_{PQ}} \\ {\bf T_{QP}} & {\bf T_{Q}} \end{bmatrix} \end{eqnal} In terms of these quantities, Greenland's criteria require that (i) $\lvert \lvert {\bf T_{QP}} \rvert \rvert \ll 1$ and (ii) $\lvert \lvert {\bf T_{QP}} {\bf T_{P}^{-1}} \rvert \rvert \ll 1$. From this point onwards, an $N_P = 1$ CR model is adopted where the $P$ space consists of only the ground state for atomic helium being dynamically evolved. In this formulation, meta-stable species (e.g. $2^1S$, $2^3S$) are taken to be in steady state. Greenland's criteria for the $N_P = 1$ CR theory were previously examined in a range of conditions relevant to fusion plasmas and found to widely satisfy (i) and (ii) \cite{STOTLER_2007}, but there is an additional unresolved practical condition: (iii) the shortest timescales over which $P$ space states are evolved should be larger than the inverse of the smallest $Q$ space eigenvalue, i.e. $\frac{\partial}{\partial t} < \lvert \lambda_Q \rvert$. In more concrete terms, phenomena on timescales faster than $\tau_Q \equiv 1/\lvert \lambda_Q \rvert$ are not resolved. As a result, $\tau_Q$ represents the slowest timescale in $Q$ space, which is not tracked, and the ground state of atomic helium should be evolved on timescales slower than $\tau_Q$ for the separation of the two dynamical spaces to be consistent since all timescales faster than $\tau_Q$ are effectively instantaneous. For the CR formulation to be subsequently applicable in the spectroscopic analysis of plasma turbulence, the autocorrelation time of $n_e$ ($\tau_{n_e}$) and $T_e$ ($\tau_{T_e}$) must be larger than $\tau_Q$. Additionally, the exposure time of the experimental imaging diagnostic, $\tau_{GPI}$, should satisfy the timescale criterion of \begin{eqnal}\label{eq:tauQ_validity} \tau_Q < \tau_{GPI} < \tau_{n_e},\tau_{T_e} \end{eqnal} \noindent for consistency. This ensures the experimentally observed line emission in a single exposure time is based upon neutrals nominally excited by a unique $n_e$ and $T_e$ instead of a range of contributing magnitudes. Using revised cross-sections from \cite{RALCHENKO2008,Zholobenko_2018}, $\tau_Q$ is calculated under the $N_P = 1$ CR formulation in Figure \ref{tauQ_5876} at a range of $n_e$ and $T_e$ relevant to fusion plasmas. This quantity demarcates the temporal domain of validity. An important trend from the plot is that as $n_e$ increases, the limit on the temporal resolution of turbulent fluctuation measurements improves. For high plasma density fluctuations such as coherent filamentary structures, the resolution is roughly $\tau_Q \lesssim 1 \ \mu\text{s}$ for even $n_e \sim 10^{13} \ \text{cm}^{-3}$. As $n_e$ increases in higher field devices, the theoretical limit for resolving temporal scales improves. This aids the application of this GPI analysis for studying plasma turbulence in new regimes on upcoming tokamaks. A lower limit on spatial resolution for turbulence diagnostic imaging is set by $v_{HeI}/A(3^3D, 2^3P)$, provided that it is shorter than $v_{HeI} \tau_{n_e}$---or $v_{HeI} \tau_{T_e}$, if smaller---where $v_{HeI}$ is the drift velocity of the atomic helium. The validity criteria for the $N_P = 1$ CR formulation are generally satisfied in analyzing the $3^3D \rightarrow 2^3P$ transition for fusion plasmas of sufficient density, but one should take care when checking validity in specialized scenarios. For example, if applying CR theory to cameras imaging different electronic transitions (e.g. for analysis of line ratios \cite{HeI_line_ratio1,HeI_line_ratio2,Griener_2018}) with long exposure times where $\tau_{n_e}, \tau_{T_e} < \tau_{GPI}$, the formulated CR theory is technically invalid as the condition given by Eq. \eqref{eq:tauQ_validity} is no longer met. This could potentially cause errors in $n_e$ and $T_e$ profiles in existing experimental diagnostics towards closed flux surfaces, where plasma fluctuations are temporally faster than the observed autocorrelation time of far SOL turbulence \cite{labombard_evidence_2005}. Farther in the SOL as the plasma pressure drops, one should check that $\tau_Q < \tau_{n_e}, \tau_{T_e}$. Diagnosing edge fluctuations thus necessitates sufficiently high resolution for both the experimental diagnostic and applied CR theory. \begin{figure}[ht] \centering \includegraphics[width=0.7\linewidth]{templates/Figure2pinktalk.png} \caption{\label{tauQ_5876} A contour plot of $\tau_Q$ for the $N_P = 1$ CR model scanned over a range of relevant electron densities and temperatures for magnetically-confined fusion plasmas. A logarithmic scale is applied on all axes including the colourbar.} \end{figure} The $N_P = 1$ CR formulation permits any excited state population density in $Q$ space to be written as \begin{eqnal}\label{eq:nQ_CR} {\bf n_Q}\lvert_q = n(q) = R_0(q)n_en_i + R_1(q)n_en(1^1S) \end{eqnal} \noindent where $R_0(q)$ and $R_1(q)$ are known as population coefficients associated with recombination and electron impact physics. The temporal evolution of the ground state, the only species in $P$ space for this CR model, follows \begin{eqnal}\label{eq:nP_CR} \frac{d}{dt}{\bf n_P} = \frac{d}{dt}{n(1^1S)} = \alpha_{CR}n_en_i - S_{CR}n_en(1^1S) \end{eqnal} \noindent where $\alpha_{CR}$ and $S_{CR}$ are the recombination and ionization rate coefficients, respectively. To generate photon emissivity coefficients from this CR model, Eq. \eqref{eq:nQ_CR} is multiplied by the Einstein A coefficient for the given radiative transition. For the 587.6 nm line, $A(3^3D, 2^3P) = 2 \times 10^7 \ {\text{s}}^{-1}$. If $q = 3^3 D$, by multiplying Eq. \eqref{eq:nQ_CR} with the corresponding spontaneous decay rate, one can compute \begin{eqnal}\label{eq:PECexc} \text{PEC}^{exc} = R_1(3^3D) A(3^3D, 2^3P) \end{eqnal} \begin{eqnal}\label{eq:PECrec} \text{PEC}^{rec} = R_0(3^3D) A(3^3D, 2^3P) \end{eqnal} Contours of all coefficients along with their dependence on $n_e$ and $T_e$ are visualized at a magnetic field of $B = 5 \ \text{T}$ in Figures \ref{CR_rate3} and \ref{CR_rate5}. The plotted coefficients do not vary appreciably over $1 <$ B (T) $< 10$, which is relevant to Alcator C-Mod. Given these rates, one can further simplify the expressions for Eqs. \eqref{eq:nQ_CR} and \eqref{eq:nP_CR} when modelling 587.6 nm line emission in the presence of edge plasma turbulence by removing the effects of volumetric recombination, i.e. $\text{PEC}^{exc} \gg \text{PEC}^{rec}$ and $S_{CR} \gg \alpha_{CR}$, which are negligible for edge fusion plasmas unless $n_i \gg n_0 \equiv n(1^1S)$, i.e. only if the HeII density is far greater than the ground state neutral helium density. The effects of charge-exchange are also neglected as the reaction rate is small compared to electron impact ionization for atomic helium as long as $5 \ \text{eV} < T_e < 5 \ \text{keV}$ \cite{AMJUEL}. Note that this is not necessarily true for other atomic or molecular species, e.g. deuterium \cite{Helander_Catto_K1994}, but allows for an expression of 587.6 nm photon emissivity given by \begin{eqnal}\label{eq:emissivity_GPI} I = C n_0 n_e \text{PEC}^{exc}(n_e,T_e) = Cn_0 f(n_e,T_e) \end{eqnal} \noindent where $f(n_e,T_e)$ can be interpreted as the photon emission rate per neutral consistent with the $N_P = 1$ CR model. Using an oft-applied exponential model of $f(n_e,T_e) \propto n_e^{\alpha_n} T_e^{\alpha_T}$ and treating $\alpha_n$ and $\alpha_T$ as constants could yield erroneous emissivity predictions where fluctuations of order unity are beyond the perturbative regime. For example, $\alpha_T$ varies by a factor of 5 when $T_e$ goes from 4 eV to 10 eV \cite{Zweben_2017}. It is important to therefore retain the full range of dependency on $n_e$ and $T_e$. A constant factor $C$ is introduced in \eqref{eq:emissivity_GPI} to account for instrument calibration along with effects introduced by the finite thickness of the observed emission cloud \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{Figure3.png} \caption{\label{CR_rate3}Photon emissivity coefficients for the HeI 587.6 nm line based upon electron impact excitation (left) and recombination (right). These quantities follow from the $N_P = 1$ CR model's population coefficients, i.e. Eqs. \eqref{eq:PECexc} and \eqref{eq:PECrec}.} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{Figure4.png} \caption{\label{CR_rate5}Ionization (left) and recombination (right) rate coefficients derived from the $N_P = 1$ CR model. These quantities represent sinks and sources in Eq. \eqref{eq:nP_CR} for atomic helium when considering their transport in fusion plasmas.} \end{figure*} \section{\label{sec:level4.2}Experimental imaging of helium line emission on turbulent scales in the SOL of Alcator C-Mod} Our experimental analysis technique is generic to any plasma discharge on Alcator C-Mod where good fast camera data exist for the 587.6 nm line. The plasma discharge chosen for this work is numbered 1120711021. This is a majority deuterium, lower single null diverted ohmic plasma with an on-axis toroidal magnetic field of 5.4 T and plasma current of 0.83 MA. The tokamak itself has a major radius of 0.68 m and minor radius of 0.22 m. The discharge has independent diagnostic measurements from a main chamber scanning probe equipped with a mirror Langmuir probe (MLP) biasing system run in a swept mode in the edge plasma \cite{MLP_origin,LaBombard_probevGPI}. Based on Thomson scattering \cite{JWHughes-TS-diagnostic} and electron cyclotron emission diagnostic measurements \cite{Basse_CMod}, the core electron density and temperature are $2.0 \times 10^{20} \ \text{m}^{-3}$ and $1.5$ keV, respectively. \subsection{\label{sec:level4.2.1}Gas puff imaging on Alcator C-Mod} For the present work, the GPI diagnostic on the Alcator C-Mod tokamak \cite{2002_Zweben,GPImanual} was configured to capture visible light at a wavelength of 587.6 nm arising from the interaction of the edge plasma with neutral helium puffed locally to the imaged region. This is a commonly used technique akin to other plasma diagnostics such as beam emission spectroscopy (BES) \cite{BES_McKee}. Helium is an ideal choice for 2-dimensional turbulence imaging for several reasons: its low atomic number results in radiative losses minimally perturbing the plasma state; its larger ionization energy allows for greater neutral penetration than thermal deuterium; its lack of molecular interactions reduces complexity in modelling; and its neutrality keeps its transport independent of external magnetic fields. The spatially localized HeI also provides a greater contrast to the background emissivity in fusion plasmas primarily fueled by hydrogen isotopes. Line emission from atomic helium was imaged onto a Phantom 710 fast camera, installed on Alcator C-Mod in 2009 to view the outboard midplane region \cite{GPImanual}. The camera has a maximum framing rate of 400,000 frames/s at 2.1 $\mu$s-exposure/frame when 64 $\times$ 64 pixels are being read out, and each pixel is approximately $20 \ \mu$m $\times \ 20 \ \mu$m. The diagnostic's resultant temporal resolution is 2.5 $\mu$s as it takes 0.4 $\mu$s to read values from the pixel array. The fast camera has a built-in positive offset of approximately 80 counts, which is subtracted from all GPI signals before analysis of the experimental data \cite{GPImanual}. Based upon the manufacturer’s specifications and sample bench tests, the fast camera measurements are expected to vary linearly with light level over the pixels analyzed. The brightness is thus offset in absolute magnitude by a constant scale factor and accounted for in the framework. \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{AB_view_GPI_ASP_v3.png} \caption{\label{CMOD_Phantom}A section of a panoramic photo of the Alcator C-Mod outer wall, showing approximately one quarter of the device and centered on the split poloidal limiter next to the gas puff imaging measurement location. Labels indicate the position of the GPI nozzle, its imaging telescope, and an approximate line of sight (red dashed). The position of the radial scanning probe, which provides the mirror Langmuir probe measurements, is also exhibited.} \end{figure} A coherent fiber bundle/image guide was used to couple light from viewing optics mounted on the outer wall of the vacuum vessel to the Phantom camera detector array. The optics imaged a roughly 60 mm $\times$ 60 mm region in the $(R,Z)$-plane just in front of a gas puff nozzle through a vacuum window onto the image guide. The viewing chords pointed downwards at a fixed angle of $11.0^{\circ}$ below horizontal towards the vertically-stacked 4-hole gas nozzle displaced from the telescope by approximately $35.5^{\circ}$ in toroidal angle as displayed in Figure \ref{CMOD_Phantom}. The central ray of the imaged view thus pierced the gas puff plane approximately parallel with the local magnetic field line \cite{GPImanual}. This aligns the GPI optics with field-aligned fluctuations for typical operational parameters of an on-axis toroidal field of 5.4 T and plasma current of 1.0 MA. For discharge 1120711021 having a plasma current of 0.83 MA, the viewing chords are oriented at an angle of approximately 2$^{\circ}$ to the local field. Spatial blurring due to this angular misalignment, $\theta_B$, consequently limit resolution to $\Delta x = L_{||} \tan \theta_B$, where $L_{||}$ is the emission cloud's length parallel to the local magnetic field line. For $L_{||}$ between 5 -- 40 mm, the smearing will be 0.2 -- 1.4 mm in addition to the 1 mm pixel spot size in the image plane. Since the gas cloud expands after exiting the 4-hole nozzle and the local magnetic field's pitch angle varies, the smearing increases for those chords farther away from the nozzle depending upon the collimation of the gas cloud \cite{Zweben_2009,Zweben_2017}. With this setup and under these plasma conditions, the spatial resolution over the portion of the field-of-view analyzed is estimated to be approximately 1--2 mm. A visualization of the experimental setup is displayed in Figure \ref{CMOD_GPI}. Diagnostics injecting HeI with smaller angular half-width like thermal helium beams \cite{BES_WEST,BES_McKee} are thus helpful and this physics-informed deep learning technique can be directly transferred for their analysis as long as Greenland’s criteria are satisfied. \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{GPI_eq_1120711021_v3_mathewsa.png} \caption[Visualization of the experimental GPI setup on a poloidal cross section of a lower single null diverted plasma discharge (1120711021) on Alcator C-Mod. The expansion at right shows raw counts measured by the fast camera at $t = 1.312858$ s, and includes overlays of both the last closed flux surface and the approximate domain of the analysis described in Section \ref{sec:level4.4}.]{\label{CMOD_GPI}Visualization of the experimental GPI setup on a poloidal cross section of a lower single null diverted plasma discharge (1120711021) on Alcator C-Mod. In this chapter, measurements are used from the midplane fast camera with a 587.6 nm optical filter with full width at half maximum of 11.4 nm which has a largely field-aligned view of edge fluctuations. The expansion at right shows raw counts measured by the fast camera at $t = 1.312858$ s, and includes overlays of both the last closed flux surface and the approximate domain of the analysis described in Section \ref{sec:level4.4}.} \end{figure} For background on the optics \cite{GPImanual}, the telescope contains no active shutter but a cylindrical shield on the front end, which is mounted on the outboard vessel wall at [$R = 102.5$ cm, $Z = 9.0$ cm]. A stainless steel mirror is located at the shield's back to direct light upward to several quartz lenses in vacuum. The image formed by the lenses is sent through a small vacuum window and mounted at the end of the bellows which carries the quartz fiber optics. This optics bundle is always in air, with one end connected to the camera, which uses a 5-m-long, $0.158” \times 0.158”$-sized coherent quartz fiber optic bundles to transmit the images. These have a better transmission than glass whilst not experiencing radiation browning which can darken glass bundles, but the quartz bundles have only $57 \times 57$ fibers (converse to $400 \times 400$ for glass in the past). These were hand-made by Fiberoptic Systems Inc. The quartz bundles were enclosed in custom vacuum bellows to transfer light from inside the vessel. The exterior end of the bellows was attached to a flange at the top of Alcator C-Mod, and the fiber optics came out of this end of the bellows and was connected in air to the camera. The square quartz optical bundle was imaged by a large 75 mm focal length commercial C-mount lens, focused to infinity for passage through the optical filter, and then $3 \times$ de-magnified and imaged onto the camera with a commercial 25 mm focal length C-mount lens. An Andover optical line transmission filter at 587.6 nm with full width at half maximum of 11.4 nm was screwed onto the larger lens. This optic was covered by a black cloth during operation. As noted above, helium gas is injected into the vessel via four vertically-displaced plasma-facing capillaries located at $Z = -4.2, -3.4, -2.6, \text{and} -1.9$ cm, which are mounted in a port on a shelf just below the outer midplane sitting in the shadow of two outboard limiters. The position $Z = 0$ corresponds to the vertical location of the machine midplane. The gas tubes' orifices are positioned at $R = 91.94$ cm with the channel exit diameter being 3 mm. The helium atoms are supplied by the Neutral gas INJection Array (NINJA) storage and delivery system \cite{NINJA_thesis} which has a pneumatically-controlled valve at the plenum which is connected to a 3.48-m-long, 1-mm-diameter capillary that feeds the 4 diverging gas tubes. Previous measurements indicate that the gas cloud exiting a single 1-mm-diameter capillary expands with angular half-width of 25$^{\circ}$ in both the poloidal and toroidal directions \cite{Terry_private}. This is the basis for estimating a spatial resolution of 1--2 mm given above. For discharge 1120711021, the plenum backing pressure was 434 torr and the total helium gas input was 6.27 torr$\cdot$L over two puffs with valve duration times of 0.08 s for each puff. The trigger time for the first NINJA valve opening was $t = 1.05$ s, while the second sustainment puff's trigger was applied at $t = 1.27$ s. The HeI flow rate at $t = 1.31$ s is estimated to be $1.21 \times 10^{20}$ s$^{-1}$ \cite{Terry_private}. Due to the tubes' spatial displacement, the helium gas puff is intended to be relatively uniform in the vertical direction. By definition, there is a shock at (or near) the vacuum-nozzle interface for this sonic flow since only particles moving downstream can escape and there is consequently no information being communicated to upstream particles \cite{shocks_in_tubes_Parks_and_Wu}. The neutral dynamics thus transition from a fluid regime in the gas tube to a kinetic regime upon entering the tokamak. The HeI exiting the diverging nozzles is approximately modelled by a drifting, cut-off Maxwellian distribution with a mean radial velocity of $-900$ m/s and a mean vertical velocity of $-20$ m/s since the direction of the non-choked flow in the capillaries is roughly 2.4$^{\circ}$ away from being oriented purely radially \cite{Terry_private}. \subsection{\label{sec:level4.2.2}Experimental validity of $N_P = 1$ HeI CR theory} To examine the experimental relevance of applying the $N_P = 1$ CR theory outlined in Section \ref{sec:level4.1} for analysis of edge plasma turbulence on Alcator C-Mod, a few key characteristic parameters of interest are reviewed based upon scanning MLP measurements of $n_e$ and $T_e$ in plasma discharge 1120711021. Magnetically disconnected from the GPI field of view, the scanning MLP in Figure \ref{CMOD_Phantom} is located at $Z = 11.1$ cm roughly $20^{\circ}$ in toroidal angle from the GPI view and radially traverses the tokamak plasma from the far edge to just inside the last closed flux surface (LCFS) with a temporal resolution of 0.3 $\mu$s. Measurements mapped to the midplane radius are visualized in Figure \ref{probe_1120711021} based upon a probe plunge nearly coincident temporally with the GPI analysis of this plasma discharge. While the probe bias is inherently perturbative due to the collection of charged particles, its effects on local plasma conditions are assumed to be negligible \cite{kuang_thesis}. From the MLP data, one can obtain autocorrelation times of fluctuations near the LCFS and approximately 8 - 10 mm radially outward into the SOL when mapped to the midplane radius. Towards closed flux surfaces, $\tau_{n_e}$ and $\tau_{T_e}$ are approximately 4.2 $\mu$s and 6.1 $\mu$s, respectively. In the far SOL, $\tau_{n_e}$ and $\tau_{T_e}$ increase to 15.6 $\mu$s and 22.9 $\mu$s, respectively. Since the probe has a finite velocity and the autocorrelation length of fluctuations is finite, these estimates of $\tau_{n_e}$ and $\tau_{T_e}$ act as conservative lower bounds as long as there is no aliasing nor phase-alignment between the probe's motion and turbulence structures. The fast camera exposure time of 2.1 $\mu$s is expected to be suitable for analysis of edge plasma fluctuations in this ohmic discharge, although faster cameras could be helpful in analyzing plasma conditions. Further, for turbulence near the LCFS where $n_e \gtrsim 10^{19} \ \text{m}^{-3}$ and $T_e \gtrsim 20$ eV, then $\tau_Q < 1 \ \mu$s, and the condition of $\tau_Q < \tau_{exp} < \tau_{n_e},\tau_{T_e}$ is well-satisfied. For fluctuations farther out into the SOL, this condition is still generally valid especially in the treatment of high pressure filaments, but one should be careful when $n_e$ drops below $2.5 \times 10^{18} \ \text{m}^{-3}$ in fusion plasmas. For spectroscopic techniques analyzing line intensities, each optical camera's exposure time needs to be suitably adjusted to satisfy the timescale condition. This is especially important towards closed flux surfaces where long camera exposure periods and shorter autocorrelation times would render examination of brightness ratios arising from turbulent fluctuations as inconsistent. \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{Figure7utalk.png} \caption{\label{probe_1120711021} Experimental $n_e$ and $T_e$ measurements in discharge 1120711021 from the independent scanning mirror Langmuir probe. The full probe plunge duration is $1.288 < t \ \text{(s)} < 1.318$. As the probe is scanning back from closed flux surfaces, time series of $n_e$ and $T_e$ are plotted to compute autocorrelation times. Near the LCFS (red), $\tau_{n_e}$ and $\tau_{T_e}$ are approximately 4.2 $\mu$s and 6.1 $\mu$s, respectively. Farther into the SOL (green), $\tau_{n_e}$ and $\tau_{T_e}$ increase to 15.6 $\mu$s and 22.9 $\mu$s, respectively. For reference, the gray region roughly corresponds to the radial extent of the GPI data analyzed.} \end{figure*} Our framework outlined in the next sections can be applied to regions with arbitrary geometries (e.g. X-point, divertor) if using sufficiently planar helium beams where the width of the collimated gas is smaller than the parallel autocorrelation length of the plasma fluctuations in the direction of the viewing chords. Since the viewing chords are roughly field-aligned over the pixels being analyzed, this parallel scale condition is expected to be satisfied. Finally, it is noted that the signal-to-noise ratio degrades in the inboard portion of the field-of-view, which includes plasma close to or on closed flux surfaces where the electron pressure and ionization rate increase sharply \cite{jwhughes1,jwhughes2}. Accordingly, fluctuations are analyzed a few millimetres away from the LCFS on a 2-dimensional $(R,Z)$-grid co-located at the nominal gas puff plane. In future work, if greater neutral penetration can be achieved such that high signal-to-noise can be attained on closed flux surfaces, the capability to then probe pedestal dynamics also exists where priming the optimization framework on available 1-dimensional data may help. Such training on background profiles was found to aid stability, and this will likely be especially helpful when approaching or on closed flux surfaces. Accordingly, Appendix B outlines a generalized regression technique developed to output edge background profiles in any confinement regime \cite{Mathews2020}. This opportunity may already be viable on devices with smaller line-integrated $n_e$ and the methodology can extend to unmagnetized plasmas, too. \section{\label{sec:level4.3}Deep learning of time-dependent neutral transport physics and collisional radiative theory} A novel multi-network deep learning framework custom-built for analysis of 587.6 nm helium line emission in fusion plasmas is outlined to uncover $n_e$, $T_e$, and $n_0$. Combining the theory governing atomic emission and neutral transport with experimental turbulence measurements via fast camera imaging into an integrated analysis framework requires sufficiently sophisticated modelling techniques. Neural networks only receiving experimental brightness measurements from GPI are thus used while being optimized against the $N_P = 1$ CR theory for photon emissivity along with the continuity equation for neutral transport which accounts for ionization of helium atoms on turbulent scales. In this way, one can combine training upon both mathematical laws and observational data. To begin, the unobserved quantities $n_e$, $T_e$, and $n_0$ each represented with their own neural network. The initial layer inputs correspond to the local spatiotemporal points $(x,y,t)$, with the $(x,y)$-coordinate being equivalent to $(R,Z)$, from the approximately 2-dimensional domain viewed by the fast camera in the poloidal plane of the gas puff nozzle. The only output of each network is the respective dynamical variable being represented. Every network's inner architecture consists of 5 hidden layers with 150 neurons per hidden layer and hyperbolic tangent activation functions ($\sigma$) using Xavier initialization \cite{GlorotAISTATS2010}. To provide reasonable intervals for the optimization bounds, the networks for $n_e$, $T_e$, and $n_0$ are constrained via output activation functions to be between $2.5 \times 10^{18} < n_e \ (\text{m}^{-3}) < 7.5 \times 10^{19}$, $2.5 < T_e \ (\text{eV}) < 150.0$, and $0.1 < n_0 \ (\text{arb. units}) < 10.0$, i.e. $n_0$ is assumed to not vary by more than two orders of magnitude in the region of the GPI analysis. While required for numerical stability, care must be taken since solutions existing near these limits may not be fully converged. The learnt constant calibration factor, $C$, is similarly represented by a network but does not vary spatially nor temporally. Physically, this results in $n_0$ being determined up to a constant scaling. The scalar constant also accounts for the 2-dimensional approximation of the localized gas puff, which has a finite toroidal width from the helium atoms exiting the capillaries. By assuming $n_e$, $T_e$, and $n_0$ to be roughly uniform along the camera's sightline, the effect of this finite volume is absorbed when learning the calibration factor. While the 2-dimensional approximation is reasonable for sufficiently planar gas injection, the deep framework can technically be generalized towards natively handling 3-dimensional space since it employs a continuous domain without any discretization. This is a future extension. Our optimization is conducted in stages. To begin learning CR theory, novel neural network structures are constructed such that the outputs of the $n_e$ and $T_e$ networks serve as inputs to a new architecture representing the photon emissivity per neutral, $f \equiv f(n_e, T_e)$. The connectivity of the neurons conjoining $n_e$ and $T_e$ towards the network's output, $f$, is visualized in Figure \ref{network_structure_f}. These weights and biases are trained against $n_e \text{PEC}(n_e, T_e)$, which is derived from the $N_P = 1$ CR theory. The corresponding emissivity coefficient is plotted in Figure \ref{CR_rate3}. The ionization rate per neutral, $n_e S_{CR}(n_e, T_e)$, which is based upon the coefficient plotted in Figure \ref{CR_rate5}, is similarly represented by an architecture with $n_e$ and $T_e$ serving as inputs. All this training of the two architectures representing $f(n_e, T_e)$ and $n_e S_{CR}(n_e, T_e)$ is conducted in the first stage prior to any optimization against the fast camera data. This ensures the next stages involving training with embedded collisional radiative constraints take place under an integrated optimization framework with all quantities being represented by neural networks. For numerical purposes, $n_e$ are $T_e$ are normalized by $10^{19} \ \text{m}^{-3}$ and $50 \ \text{eV}$, respectively, and time is converted to units of microseconds during the optimization. For low temperature plasmas where $T_e < 2$ eV, training with the networks and output CR coefficients from \cite{GOTO_2003,Zholobenko_thesis} based upon fitted electron impact cross-sections should be carefully checked due to potential corrections to fits for collision strengths at such low energies. The $n_e$ and $T_e$ networks are trained only against constants of $10^{19} \ \text{m}^{-3}$ and 50 eV, respectively, for initialization. The priming, i.e. initial stage of overall training, of $n_e$ and $T_e$ and learning of CR coefficients by their respective networks takes place over the first 5 of 20 total hours of training. \begin{figure}[ht] \centering \includegraphics[width=0.7\linewidth]{network_structure_f.png} \caption{\label{network_structure_f} Structure of networks to represent $f(n_e, T_e) = n_e \text{PEC}(n_e, T_e)$ which is one of the terms composing the total emissivity function, $I = C n_0 f(n_e, T_e)$. The ionization rate per neutral, $n_e S_{CR}(n_e, T_e)$, is similarly represented when applied in the transport equation and important to account for ``shadowing'' of neutrals \cite{2002_Zweben,STOTLER2003,Wersal_2017}. The left side of the overall network consists of the networks for the predicted $n_e$ and $T_e$, while the right side output represents the photon emissivity per neutral, where $\text{PEC}(n_e, T_e)$ is given by Figure \ref{CR_rate3}.} \end{figure} Next, the $n_e$, $T_e$, and $C$ networks are trained against Eq. \eqref{eq:emissivity_GPI} such that that the predicted brightness intensity consistent with CR theory matches experimental measurements from the fast camera. Additional constraints are thus placed in the optimizer such that solutions where $n_e$ and $T_e$ are correlated are favoured. This helps to avoid the learning of trivial solutions, e.g. purely $n_e$ fluctuations with zero $T_e$ fluctuations. Based upon past high-resolution MLP data, edge turbulent fluctuations were observed to exhibit strong correlations between the electron density and electron temperature which is a further motivation for applying this constraint \cite{KUBE2019_neTecorr}. Namely, the full loss function being collectively trained upon in this second stage is \begin{eqnal}\label{eq:loss_GPI} \mathcal{L}^{C,n_e,T_e} &= \frac{1}{N_0}\sum_{i=1}^{N_0} (\mathcal{L}_{GPI} + C_1 \mathcal{L}_{corr} + C_2 \mathcal{L}_{relcorr}), \end{eqnal} \noindent where \begin{eqnal}\label{eq:loss_GPI1} \mathcal{L}_{GPI} &= \lvert I^*(x^i_0,y^i_0,t^i_0) - I_0 \rvert^2 \end{eqnal} \begin{eqnal}\label{eq:loss_corr} \mathcal{L}_{corr} &= - [n^*_e(x^i_0,y^i_0,t^i_0) - \langle n^*_e(x^i_0,y^i_0,t^i_0) \rangle] \times \\& [T^*_e(x^i_0,y^i_0,t^i_0) - \langle T^*_e(x^i_0,y^i_0,t^i_0) \rangle] \end{eqnal} \begin{eqnal}\label{eq:loss_relcorr} \mathcal{L}_{relcorr} &= \frac{\lvert \langle n^*_e(x^i_0,y^i_0,t^i_0) - \langle n^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2}{\lvert \langle T^*_e(x^i_0,y^i_0,t^i_0) - \langle T^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2} \\&+ \frac{\lvert \langle T^*_e(x^i_0,y^i_0,t^i_0) - \langle T^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2}{\lvert \langle n^*_e(x^i_0,y^i_0,t^i_0) - \langle n^*_e(x^i_0,y^i_0,t^i_0) \rangle \rangle \rvert^2} \end{eqnal} \noindent with $I^*(x^i_0,y^i_0,t^i_0)$ following Eq. \eqref{eq:emissivity_GPI}, and the points $\lbrace x_0^i,y_0^i,t_0^i,I_{0}^i\rbrace^{N_0}_{i=1}$ corresponding to the set of observed data from GPI. The superscript notation on $\mathcal{L}$ identifies the multiple networks being simultaneously trained during optimization of the respective loss function, e.g. $\mathcal{L}^{C,n_e,T_e}$ indicates that the networks for $C$, $n_e$, and $T_e$ are being jointly optimized against this particular loss function. We note that the results from the converged solutions reported in Section \ref{sec:level4.4} are largely unchanged by removing \eqref{eq:loss_relcorr} in the optimization framework, although keeping it was found to enhance stability and thus the total number of realizations that converge. Better physics-informed optimization constraints may exist and should be investigated going forward to advance this turbulence analysis. While the coefficients $C_1$ and $C_2$ in Eq. \eqref{eq:loss_GPI} can be adaptively adjusted for optimal training in each iteration, they are set to constants of 1000 and 1, respectively, in the present implementation. The variables with asterisks symbolize predictions by their respective networks at the spatiotemporal points being evaluated during training. The notation $\langle X \rangle$ denotes the batch sample mean of $X$. This second training stage lasts for 100 minutes. The next stage involves optimizing the $n_0$ network against both Eq. \eqref{eq:loss_GPI1} and its transport equation which accounts for drifts and fluctuation-induced ionization. Namely, in implicit form, \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{Figure9new.png} \caption{\label{learned_1D_turbulence_histogram}Histogram of the $n_e$, $T_e$, and $Cn_0$ fluctuations at $[R = 90.7 \text{ cm}, Z = -4.2 \text{ cm}, t = 1.312850 \text{ s}]$, i.e. with corresponding normalized poloidal magnetic flux coordinate $\psi_n=1.07$, based upon 50 converged realizations when training against experimental GPI data from plasma discharge 1120711021 in the optimization framework. The ensemble mean and standard deviation of these realizations are used to construct the results presented in Section \ref{sec:level4.4}.} \end{figure*} \begin{eqnal}\label{eq:loss_fn0} f_{n_0} = \frac{\partial n_0}{\partial t} + \frac{\partial (n_0 v_x)}{\partial x} + \frac{\partial (n_0 v_y)}{\partial y} + n_0 n_e S_{CR} \end{eqnal} \noindent where, based upon 3-dimensional Monte Carlo neutral transport simulations of this region, closures of $v_x \sim -900$ m/s and $v_y \sim -20$ m/s are applied for modelling HeI as it exits the capillaries into the GPI frame of view \cite{SGBAEK_DEGAS2_GPI_CMOD,Terry_private}. This approximation of HeI with constant drift may be reasonable for a narrow radial region, but the true velocity distribution characterizing helium gas particles becomes increasingly skewed the farther one goes away from the gas nozzles. Modelling other atomic and molecular species (e.g. deuterium) in this way may be inadequate as charge-exchange and recombination effects on trajectories are increasingly important. Also, neutral-neutral collisions and their impacts on velocity closures are presently neglected in this treatment. This allows for a scaling constant to be factored out of Eq. \eqref{eq:loss_fn0}, i.e. permitted by its linearity in $n_0$. If using a sufficiently high spectral resolution spectrometer to view the emission cloud, the Doppler shift can potentially be experimentally measured. This task for further exploring momentum transport physics and potentially even learning the velocity closure directly from the GPI data within the optimization framework in an additional stage of training is left for future work. The null formulation following Eq. \eqref{eq:loss_fn0} is vital for training since all physical terms collectively sum to zero when the unknown dynamical variables in the equation are correctly solved to self-consistently account for neutral propagation and ionization. The physical theory is computationally expressed by differentiating the $n_0$ neural network with respect to its input spatiotemporal coordinates via application of chain rule through automatic differentiation \cite{tensorflow2015-whitepaper}. By then multiplying and adding the graph outputs to construct representations of the physical constraints, the network for $n_0$ can be trained against \eqref{eq:loss_GPI} and \eqref{eq:loss_fn0} to satisfy the physical theory constraining the nonlinear connection between networks. This accounting of Eq. \eqref{eq:loss_fn0} is particularly essential since the Kubo number ($Ku = V_0/\lambda \omega$ where $V_0$ is the unperturbed drift, $\lambda$ is the autocorrelation length scale \cite{Kubo_def}, and $\omega$ is the fluctuation frequency) which quantifies the strength of turbulent perturbations on neutral transport, is large ($\gtrsim 1$) for helium \cite{Kubo_original,Kubo_number,SGBAEK_DEGAS2_GPI_CMOD}. There are no explicit boundary conditions applied for $n_0$, but instead its network is trained against the fast camera's experimentally measured intensities to learn how $n_0$ should be treated around the boundaries of the analyzed camera image. Namely, the loss function in this third following stage is given by \begin{eqnal}\label{eq:loss_n0_train} \mathcal{L}^{n_0} &= \frac{1}{N_0}\sum_{i=1}^{N_0} \mathcal{L}_{GPI} + \frac{C_{f_{n_0}}}{N_f}\sum_{j=1}^{N_f} \mathcal{L}_{f_{n_0}} \end{eqnal} \noindent with \begin{eqnal}\label{eq:loss_fn0_train} \mathcal{L}_{f_{n_0}} &= \lvert f^*_{n_0}(x^j_f,y^j_f,t^j_f) \rvert^2 , \end{eqnal} \noindent where $\lbrace x_f^j,y_f^j,t_f^j\rbrace^{N_f}_{j=1}$ denote the set of collocation points which can span any arbitrary domain but taken to be equivalent to the ones encompassed by $\lbrace x_0^i,y_0^i,t_0^i,I_{0}^i\rbrace^{N_0}_{i=1}$, and $f^*_{n_0}$ is the null partial differential equation prescribed by Eq. \eqref{eq:loss_fn0} in normalized form directly evaluated by the neural networks. For the remainder of the training time, i.e. after the first stage of priming and two subsequent stages training with Eq. \eqref{eq:loss_GPI} and then Eq. \eqref{eq:loss_n0_train} , the networks are further optimized sequentially against Eqs. \eqref{eq:loss_GPI} and \eqref{eq:loss_n0_train} in repeating intervals of 100 minutes to iteratively find convergence in their respective networks. The only difference in these later stages is that $C$ is no longer a free parameter whilst training against Eq. \eqref{eq:loss_GPI}, and $C_{f_{n_0}}$ in Eq. \eqref{eq:loss_n0_train} is increased from $10^2$ to $10^6$ to improve the focused learning of neutral transport physics. If $C_{f_{n_0}}$ is increased any higher, one risks finding trivial solutions at a higher occurrence. Generalizing the optimizers to adaptively update training coefficients \cite{wang2020understanding} is an important pathway for future investigation. All loss functions are trained with mini-batch sampling where $N_0 = N_f = 1000$ using the L-BFGS algorithm---a quasi-Newton optimization algorithm \cite{10.5555/3112655.3112866}. Also, points found to have difficulty converging (e.g. optimizer becomes stuck in local minima) were removed from subsequent training stages to improve learning in remaining regions of the spatiotemporal domain analyzed. In the end, the multi-network framework trains on only 8 (radial) $\times$ 38 (vertical) pixels over 39 frames imaged by the fast camera. By embedding $f(n_e,T_e)$ in Figure \ref{network_structure_f}, the emissivity predictions by the networks are forced to satisfy CR theory. Similarly, the ionization rate per neutral, $n_e S_{CR}$, is encoded in Eq. \eqref{eq:loss_fn0}. This ensures that the unobserved $n_e$, $T_e$, and $n_0$ being learnt are in agreement with the experimentally measured brightness while trying to satisfy the neutral transport physics for HeI which self-consistently includes time-dependent ionization in the presence of plasma turbulence. The repeated differentiation and summation of networks to represent every term in the ascribed loss functions resultantly constructs a far deeper computation graph representing the collective constraints beyond the 8 hidden layers in each dynamical variable's individual network. The cumulative graph is therefore a truly deep approximation of the physics governing the observed 587.6 nm line emission by the fast camera in Alcator C-Mod. Due to the stochastic nature of the initialization and multi-task training, learned solutions for $n_e$, $T_e$, $n_0$, and $C$ vary each time an individual optimization is run. This may arise due to a unique solution not necessarily existing given the above optimization constraints. Therefore, an ensemble of realizations are run and it is this collection of runs considered which roughly follow Gaussian statistics. Based upon testing within the optimization framework, the necessary criteria for convergence in normalized units are set to $\mathcal{L}_{GPI} < 10^{2.5}$, $\mathcal{L}_{corr} < -10^3$, and $\mathcal{L}_{f_{n_0}} < 10^{-3}$. Checks for spurious gradients, trivial solutions, and a low number of training iterations were additionally investigated for downselecting converged realizations. For analysis of C-Mod discharge 1120711021, there were 800 runs with 50 sufficiently converging within this present analysis. The scatter in learned turbulent fluctuations among these realizations is used to quantify uncertainty intervals associated with the optimization framework, and as an example, the distribution of inferred measurements at a particular spatial and temporal point are plotted in Figure \ref{learned_1D_turbulence_histogram}. It is also important to note that the loss functions never truly go to zero either and act to quantify potential discrepancies involved in modelling the physical system with deep networks, e.g. $\mathcal{L}_{f_{n_0}}$ can be understood as the outstanding error in approximating the neutral transport theory. For reference when performing future GPI analysis, of these converged runs, the normalized mean loss functions at the end of training for the collection of realizations were found to be $\mathcal{L}_{GPI} = (1.44 \pm 0.42) \times 10^2$, $\mathcal{L}_{corr} = (-4.51 \pm 0.20) \times 10^{3}$, $\mathcal{L}_{relcorr} = 6.75 \pm 0.03$, and $\mathcal{L}_{f_{n_0}} = (3.57 \pm 3.79) \times 10^{-5}$. Simply put, finite values of the loss metrics indicate the degree to which the framework satisfies the collective training conditions. Identifying these errors allows for their iterative improvement, while identifying even better loss functions is an open area for future research. \section{\label{sec:level4.4}Uncovering plasma-neutral dynamics in experimental turbulence imaging in Alcator C-Mod} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{Figure10.png} \caption{\label{learned_2D_turbulence1}The learned 2-dimensional $n_e$, $T_e$, and $Cn_0$ for plasma discharge 1120711021 along with the experimentally observed 587.6 nm photon emission at $t = 1.312815$ s. The learned measurements are based upon the collective predictions within the deep learning framework training against the neutral transport physics and $N_P = 1$ CR theory constraints.} \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{Figure11.png} \caption{\label{GPI_predvexp_1d_1120711021_rvt}The learned $n_e$, $T_e$, and $Cn_0$ along with the experimentally observed 587.6 nm photon brightness for plasma discharge 1120711021 at $Z = -4.0 \text{ cm}$. These quantities are plotted as a function of radius and time.} \end{figure*} The learned turbulent $n_e$, $T_e$, and $Cn_0$ from the time-dependent analysis of fast camera imaging for plasma discharge 1120711021 using an ensemble of 50 optimizers are visualized in 2-dimensional space along with experimentally observed GPI measurements in Figure \ref{learned_2D_turbulence1}. The positive fluctuations in brightness are largely correlated with $n_e$ and $T_e$, and these regions tend to have depressed values of $n_0$ as the ionization rate is elevated. This results in a ``shadowing effect'' in atomic helium trajectories arising from increased ionization in regions of positive density fluctuation. The autocorrelation time of $n_0$ also decreases with radius, while it increases for $n_e$ and $T_e$. Temporal variation with radius is visualized in Figure \ref{GPI_predvexp_1d_1120711021_rvt} where, considering a 1-dimensional slice of Figure \ref{learned_2D_turbulence1}, the same physical quantities are plotted at $Z = -4.0$ cm. While correlations vary poloidally and radially, and precise dependencies across the turbulent variables change as $n_e$ and $T_e$ increase, the observed line emission is found to be strongly correlated with electron density and temperature. The atomic helium density fluctuations do not vary directly proportional to $I_0$ in this far edge region on open field lines near the gas tubes. There is instead a weak negative correlation over this narrow radial extent arising from the largest brightness fluctuations corresponding to trajectories with elevated ionization rates causing a depletion, or shadowing, of HeI. A correlation matrix for the normalized relative fluctuations in 2-dimensional space over the roughly 100 $\mu$s time window analyzed are displayed in Table \ref{table_correlation_matrix5}. The maximal $n_0$ fluctuation amplitudes tend to be roughly 30--40\% from peak-to-trough in this far edge region which sits away from the LCFS, where sharper equilibrium gradients and smaller relative fluctuation levels may result in different correlations. And while relative fluctuations may be correlated from $90.3 < R \ \text{(cm)} < 90.9$ as in Table \ref{table_correlation_matrix5}, connections between the turbulent quantities are nonlinear. To better visualize their interdependence, Figure \ref{turbulence_histogram} displays histograms for $n_e$, $T_e$, and $Cn_0$ vertically along $R = 90.3$ cm. The fluctuations follow different statistical distributions and cannot necessarily be linearly mapped from the observed noisy HeI line intensity experimentally measured by the fast camera. \begin{table} \centering \renewcommand{\arraystretch}{1.} \begin{NiceTabular}{ p{0.7cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|>{\arraybackslash}p{1.1cm}| }[] {} & $\{n_e\}$ & $\{T_e\}$ & $\{n_0\}$ &$\{I^*\}$ &$\{I_0\}$\\ \cline{1-6} $\{n_e\}$ & 1.000 & 0.887 & -0.325 & 0.843 & 0.822 \\ \cline{1-6} $\{T_e\}$ & 0.887 & 1.000 & -0.307 & 0.925 & 0.902 \\ \cline{1-6} $\{n_0\}$ & -0.325 & -0.307 & 1.000 & -0.051 & -0.059 \\ \cline{1-6} $\{I^*\}$ & 0.843 & 0.925 & -0.051 & 1.000 & 0.971 \\ \cline{1-6} $\{I_0\}$ & 0.822 & 0.902 & -0.059 & 0.971 & 1.000 \end{NiceTabular} \caption{\label{table_correlation_matrix5}A correlation matrix of the turbulent measurements inferred and observed experimentally in plasma discharge 1120711021. For reference, $I^*$ is the predicted emissivity given by Eq. \eqref{eq:emissivity_GPI}, and $I_0$ is the experimentally observed brightness of the 587.6 nm line. Each quantity's normalized fluctuation amplitude, i.e. $\{X\} = (X - \langle X \rangle)/\langle X \rangle$, is based upon measurements over $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$.} \end{table} \begin{figure*}[ht] \includegraphics[width=1.0\linewidth]{Figure12.png} \caption{\label{turbulence_histogram}Histograms displaying the distribution of turbulent $n_e$, $T_e$, and $Cn_0$ at [$R$ = 90.3 cm, $-4.6 < Z \ \text{(cm)} < -1.0$, $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$] along with the experimentally observed 587.6 nm line intensity. \end{figure*} \begin{figure*}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/Figure13update.png} \caption{\label{predicted_1D}Radial profiles of the inferred turbulent $n_e$, $T_e$, and $Cn_0$ at $[Z = -4.0 \text{ cm}, t = 1.312866 \text{ s}]$ along with a trace of the experimentally observed and predicted GPI intensity profiles. The computed line emission is based upon the deep learning framework following Eq. \eqref{eq:emissivity_GPI}. The dark line in each plot corresponds to the average output of the ensemble of realizations, while the shaded uncertainty intervals correspond to scatter ($\pm 2\sigma$) arising from the independently trained networks.} \end{figure*} \begin{figure}[ht] \centering \includegraphics[width=1.0\linewidth]{templates/PINN_neTe_fullx.png} \caption{\label{GPIvprobes}For comparison, the inferred $n_e$ and $T_e$ are plotted over the roughly 100 $\mu$s time window analyzed from the experimental GPI. The independent mirror Langmuir probe is located at $Z = +11.1$ cm with a radially moving probe head. The MLP scan in the plotted region lasts roughly 6000 $\mu$s (i.e. 60$\times$ longer than the duration of the GPI analysis). All measurements are mapped to normalized poloidal magnetic flux coordinates, $\psi_n$, and none of the data displayed is time-averaged.} \end{figure} One should note that these learned $n_e$, $T_e$, and $Cn_0$ are consistent solutions with the collisional radiative and optimization constraints being trained upon, but not necessarily unique solutions. Accordingly, in Figure \ref{predicted_1D}, the predicted light emission from the ensemble of realizations is displayed against the fast camera's measurements. The mean outputs and uncertainty intervals for the turbulent $n_e$, $T_e$, and $Cn_0$ associated with the scatter of running an ensemble of stochastic realizations are also plotted. There is no temporal averaging of the profiles in Figure \ref{predicted_1D}. For GPI on Alcator C-Mod, sharp features exist in the experimental data potentially associated with noise, while the learned line intensity from the collection of networks is smoother and consistent in both magnitude and shape with the observed brightness. These measurements enable novel research pathways into the 2-dimensional tracking of experimental parameters (e.g. turbulent particle and heat fluxes both radially and poloidally) and calculation of fluctuating fields for model validation \cite{Mathews2021PRE,Mathews2021PoP}. They further provide the first quantitative estimates of 2-dimensional time-dependent structure for neutrals on turbulent scales in an experimental fusion plasma. To further examine the validity of these results, the turbulent $n_e$ and $T_e$ from the GPI measurements of the single spectral line are juxtaposed against an independent MLP with four electrodes in Figure \ref{GPIvprobes}. This scanning probe is plunged at times overlapping with the gas puff analysis, i.e. $1.287631 < t_{MLP} \ \text{(s)} < 1.317671$ versus $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$, although located at different positions toroidally and vertically as discussed in Section \ref{sec:level4.2}. The MLP measures fluctuations in time as it scans through the edge plasma to construct the resultant radial profile. For the purpose of comparison, turbulent measurements at different $Z$-locations are not time-averaged to compare the $n_e$ and $T_e$ fluctuations. While the measurement regions spatially spanned by the two independent diagnostics are magnetically disconnected, the data are mapped to common poloidal magnetic flux coordinates based upon magnetohydrodynamic equilibrium reconstruction in the tokamak plasma using the EFIT code \cite{Lao_1985}. Deconstructing the GPI fluctuations into the turbulent $n_e$, $T_e$, and $n_0$ instead of the raw brightness from atomic emission largely resolves diagnostic misalignment challenges. Namely, in contrast with past analysis of discharge 1120711021 \cite{Russell_probevGPI}, there is no radial shift applied to align the turbulent fluctuation profiles from these two independent experimental diagnostics. For GPI measurements in this 2-dimensional spatial domain spanning approximately $100 \ \mu$s, peak $n_e$ and $T_e$ fluctuations do not far exceed $3.0 \times 10^{19} \ \text{m}^{-3}$ and 30 eV, respectively, which are roughly consistent with the MLP in the far SOL. When evaluating the two sets of measurements side-by-side in Figure \ref{GPIvprobes}, excellent agreement is found in magnitude and structure between the $T_e$ measurements. The MLP $n_e$ data are slightly elevated on average although still quantitatively consistent within the measurement bounds of the four electrodes. A potential contributing factor to this observed difference in $n_e$ peaks could be natural variations in the poloidal structure of the intermittent fluctuations over the narrow time window analyzed (i.e. 100 $\mu$s for GPI, 6000 $\mu$s for MLP). The two diagnostics are magnetically disconnected and separated vertically by about 10 -- 15 cm. Fluctuation amplitudes measured by either diagnostic for both $n_e$ and $T_e$ are still in the range of 10 -- 100\%. One should also remember that, beyond the diagnostics viewing different spatiotemporal locations, systematic uncertainties extant in both the GPI and probe measurements can cause discrepancies left to be reconciled \cite{hutchinson_2002,probe_review}. For example, the MLP is intrinsically perturbative to local conditions and experimental analysis of the probe edge sheath assumes electrons can be described by a single Maxwellian velocity distribution \cite{kuang_thesis}. Additionally, while the optimization attempts to find consistent solutions within the applied framework, questions of uniqueness and generalized constraints are still being explored for better convergence. \section{\label{sec:level4.5}Conclusion} In summary, this chapter has developed a novel time-dependent deep learning framework for uncovering the turbulent fluctuations of both the plasma quantities, $n_e$ and $T_e$, as well as the neutrals underlying experimental imaging of HeI line radiation. Significantly, this allows determination of 2-dimensional fluctuation maps in the plasma boundary, revealing detailed spatiotemporal structure and nonlinear dynamics. It thereby extends the usefulness of the gas puff imaging method. The computational technique intrinsically constrains solutions via collisional radiative theory and trains networks against neutral transport physics. This advancement has allowed for the first estimates of the 2-dimensional $n_e$, $T_e$, and $n_0$ on turbulent scales which reveal fluctuation-induced ionization effects in a fusion plasma based upon optical imaging of just the 587.6 nm line. While the analysis is demonstrated on the edge of the Alcator C-Mod tokamak with quantitative agreement found with independent probe measurements, this technique is generalizable to ionized gases in a wide variety of conditions and geometries (e.g. stellarators, spheromaks, magneto-inertial fusion). A number of opportunities for future development exist. One key outstanding question is the identification of underlying numerical and physical factors contributing to non-uniqueness in outputs during optimization. From experimental noise to the chaotic properties of the turbulent system, finding sufficient conditions for precise convergence is the focus of ongoing research. Future extensions of the framework also include expanding the radial domain of coverage towards closed flux surfaces, which will require widening the queried bounds on $n_e$, $T_e$, $n_0$, and improving the overall training paradigm via adaptive training and architecture structures \cite{wang2020understanding}. For example, neutral density amplitudes can vary over orders of magnitude with steep shapes in background equilibrium profiles. Tactfully embedding this information during training of the networks can aid with the overall physical modelling via optimization. In this way, better experimental constraints from 1-dimensional data may help uncover further dynamics not otherwise directly probed by edge diagnostics. Adaptation to other experiments is a logical next step, and translating this present technique to contemporary experimental devices using helium beams is a pathway that can be explored immediately for regions that are traditionally difficult to probe (e.g. X-point). This deep learning framework can also be extended in principle to 3-dimensional geometries to account for integrated light emission along the camera's lines-of-sight. Further, this global turbulence imaging technique provides new ways to diagnose high pressure plasma events, e.g. disruptive instabilities such as edge localized modes that can be destructive to plasma facing components. Translating the framework for direct analysis of deuterium instead of helium is also possible with a few modifications, but requires investigation of relevant CR physics \cite{Greenland_full} where charge exchange and molecular effects are no longer necessarily negligible \cite{AMJUEL}. One prospect is to couple the turbulent $n_e$ and $T_e$ learned by the framework with Monte Carlo neutral transport codes \cite{STOTLER_time_dependent_DEGAS2}, potentially allowing recovery of 2-dimensional time-dependent estimates of atomic and molecular deuterium density and its emissivity, e.g. through the ultraviolet Ly$_\alpha$ line. These could be compared directly to experimental measurements of line emission from deuterium \cite{Lyalpha0,Lyalpha1}. Such extended comparisons will be important in the testing of reduced edge plasma turbulence models \cite{Mathews2021PRE}. \chapter{Initial estimates of the turbulent electric field by drift-reduced Braginskii theory in experiment} \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{Happy is he who gets to know the reasons for things.}{Virgil (70-19 BCE), Roman poet} Reduced turbulence models are, by definition, simplified descriptions of chaotic physical systems. Arguments for scale separation and geometric approximations are often undertaken in the pursuit of expedient yet reasonable estimates, but their precise effects on nonlinear processes in turbulence calculations are not always fully understood. As boundary plasmas in magnetic confinement fusion are governed by a vast range of spatiotemporal dynamics, model approximations are inevitable even using modern computing, but may only be weakly valid (if at all). To directly quantify their impacts, this chapter uses the experimental electron density and temperature inferences from Chapter 4 to compute the 2-dimensional turbulent electric field consistent with electrostatic drift-reduced Braginskii fluid theory under the assumption of axisymmetry with a purely toroidal field. The physics-informed deep learning technique outlined in Chapter 2 is used. In this present calculation, neutral deuterium sources and poloidal effects associated with parallel flows are neglected. Chapter 3 found that modelling low-$\beta$ plasmas under these exact assumptions led to excellent agreement when comparing the two-fluid theory's turbulent electric field against electromagnetic gyrokinetics. As an important first test towards translating the computational technique to experiment and directly testing reduced turbulence models, this chapter explores these approximations for an edge plasma in the Alcator C-Mod tokamak. All neglected physics can be re-inserted as a part of future work to ascertain their individual impacts, and as an initial step, the inclusion of helium gas (which is locally puffed in the experiment) is tested to gauge perturbative effects of injected neutral atoms, e.g. via the GPI diagnostic. Past simulations \cite{Thrysoe_2018,Zholobenko_2021_validation} and experiments \cite{exp0neut,exp1neut,exp2neut} have investigated the role of neutrals on edge turbulent fields, although results are at times mixed and/or inconclusive. The particle and energy sources associated with time-dependent ionization of HeI in the numerical framework are found to cause broadening in the computed turbulent electric field amplitudes along with an enhancement in correlation with the electron pressure that is not otherwise extant in plasmas without such neutral dynamics. This intensification of fields, which is due to the plasma-neutral interactions, reveals stronger ${\bf E \times B}$ flows and elevated average shearing rates on turbulent scales than expected in fully ionized gases \cite{mathews2022ErwHeI}. \section{\label{sec:level5.1}The experimental calculation} The focus of the present analysis will be plasma discharge 1120711021 from Alcator C-Mod as described in Chapter 4. This turbulent electric field calculation framework assumes the 2-dimensional experimental estimates of the electron density and temperature are parallel to the background magnetic field as developed in Chapter 2, but since GPI on Alcator C-Mod views the edge plasma in the $(R,Z)$-plane \cite{mathews2022deep}, an approximation of a purely toroidal magnetic geometry is the result. The plasma is further assumed to be magnetized, collisional, and quasineutral with the perpendicular fluid velocity given by ${\bf E \times B}$, diamagnetic, and ion polarization drifts. This chapter follows the prescription developed in Chapter 2 which utilizes just field-aligned turbulent $n_e$ and $T_e$ measurements along with Eqs. \eqref{eq:nDotGDBH} and \eqref{eq:TeDotGDBH} to calculate $\phi$ consistent with drift-reduced Braginskii theory. The equations are cast in a full-$f$ representation where fluctuations and global profiles evolve together \cite{francisquez_thesis}. No boundary nor initial conditions are explicitly assumed within the physics-informed deep learning framework. All analytic terms encoded in these continuum equations are computed exactly by the neural networks without any approximation as this machine learning framework uses a continuous spatiotemporal domain (e.g. no linearization nor discretization). Hyperdiffusion, which is ordinarily applied for stability in numerical codes, is set to zero. Density sources and energy sinks associated with time-dependent ionization of the local helium gas based upon collisional radiative modelling are outlined in Chapter 4. The sources and sinks are given by $\nSrcN = n_0 n_e S_{CR}$ and $S_{E,e} = -E_{HeI} \nSrcN$, where $n_0$ is the atomic helium density, $S_{CR}$ corresponds to the ionization rate coefficient, and $E_{HeI} = 24.587$ eV is the ionization energy of HeI. The 2-dimensional turbulent $n_e$ and $T_e$ in experiment come from an $(R,Z)$-aligned plane on open field lines with a rectangular cross-section that roughly spans $[90.3 < R \ \text{(cm)} < 90.9, -4.6 < Z \ \text{(cm)} < -1.0]$ over a duration of $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$. By assuming $\v{b_0}$ to be parallel to these measurements, the plasma turbulence model essentially neglects the poloidal component of the field lines present in Alcator C-Mod. For physical orientation, when viewed from above the machine, the toroidal magnetic field and plasma current in this discharge run clockwise. This results in the local magnetic field lines being pointed towards the imaging system and $\bf{B} \times \nabla B$ being directed downwards. Moreover, in keeping with the parallel uniformity approximation in Chapter 2, gradients along this field-aligned (nominally toroidal) direction are assumed to be small, i.e. $\nabla_\parallel \rightarrow 0$. Accordingly, an orthogonal right-handed geometry is employed for modelling whereby $x \equiv R$ is the radial coordinate, the parallel coordinate $\v{b_0} = +{\bf z}$ is purely toroidal, and the binormal (nominally vertical) direction is $y \equiv Z$. The plasma theory consists of electrons and deuterium ions with real electron-ion mass ratio, i.e. $m_i = 3.34 \times 10^{-27} \text{ kg}$ and $m_e = 9.11\times 10^{-31} \text{ kg}$. Beyond the inclusion of appropriate sources and collisional drifts, this technique \cite{Mathews2021PRE} to calculate the turbulent electric field is applicable even if multiple ions and impurities are present in the experimental plasma due to quasi-neutrality underlying the electron fluid theory in the machine learning framework \cite{multi_species}. \begin{figure} \centering \includegraphics[width=1.0\linewidth]{templates/ne_Te_phi_ER_EZ_exp_CMod_lesswide_col1.png} \caption{\label{observed_neTe_predicted_Er}The 2-dimensional $n_e$ and $T_e$ (top row) are computed from experimental GPI measurements from plasma discharge 1120711021 on Alcator C-Mod at $t = 1.312886$ s \cite{mathews2022deep}. The $E_R$ and $E_Z$ are inferred from drift-reduced Braginskii theory using these experimental $n_e$ and $T_e$ according to the deep learning framework outlined in Chapter 2 in the limiting cases of with (i.e. scaling factor of $n_0^* = 10^{19}$ m$^{-3}$) and without (i.e. $n_0^* = 0$) atomic helium sources.} \end{figure} \begin{table} \centering \renewcommand{\arraystretch}{1.} \begin{NiceTabular}{ p{0.6cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|>{\arraybackslash}p{1.2cm}| }[] {} & $n_e$ & $T_e$ & $E_R$&$E_R^{n_0}$ & $E_Z$ & $E_Z^{n_0}$\\ \cline{1-7} $n_e$ & 1.000 & 0.971 & -0.001 & 0.141 & 0.001 & -0.203 \\ \cline{1-7} $T_e$ & 0.971 & 1.000 & 0.016 & 0.154 & -0.014 & -0.203 \\ \cline{1-7} $E_R$ & -0.001 & 0.016 & 1.000 & 0.850 & 0.343 & 0.268 \\ \cline{1-7} $E_R^{n_0}$ & 0.141 & 0.154 & 0.850 & 1.000 & 0.347 & 0.287 \\ \cline{1-7} $E_Z$ & 0.001 & -0.014 & 0.343 & 0.347 & 1.000 & 0.882 \\ \cline{1-7} $E_Z^{n_0}$ & -0.203 & -0.203 & 0.268 & 0.287 & 0.882 & 1.000 \\ \end{NiceTabular} \caption[A correlation matrix of the turbulent fluctuations where $n_e$ and $T_e$ are inferred from plasma discharge 1120711021 based upon experimental GPI measurements over $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$.]{\label{table_correlation_matrix}A correlation matrix of the turbulent fluctuations where $n_e$ and $T_e$ are inferred from plasma discharge 1120711021 based upon experimental GPI measurements over $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$. The quantities $E_R^{n_0}$ and $E_R$ ($E_Z^{n_0}$ and $E_Z$) in this table correspond to the radial (vertical) turbulent electric fields predicted by drift-reduced Braginskii theory with and without HeI sources, respectively.} \end{table} \begin{figure}[ht] \includegraphics[width=1.0\linewidth]{templates/hist_Er_Ey_w_v_wo_sources_exp_CMod_newlong.png} \caption{\label{histogram_Er}Histograms of $E_R$ and $E_Z$ consistent with drift-reduced Braginskii theory in a toroidal axisymmetric geometry evaluated at the GPI pixels from $90.3 < R \ \text{(cm)} < 90.9$, $-4.6 < Z \ \text{(cm)} < -1.0$, and $1.312799 < t_{GPI} \ \text{(s)} < 1.312896$ in plasma discharge 1120711021 from the Alcator C-Mod tokamak.} \end{figure} \begin{figure}[ht] \includegraphics[width=1.0\linewidth]{templates/omegas_exp_CMod_lesswide_fixed.png} \caption{\label{ExB_velocity_shear}Visualizations of the radial and vertical turbulence shearing rates predicted by drift-reduced Braginskii theory in discharge 1120711021 at $t = 1.312886$ s on Alcator C-Mod under the assumption of axisymmetry with a purely toroidal magnetic field. The plots consider no sources (left) and, alternatively, neutral sources to account for time-dependent ionization of atomic helium (right).} \end{figure} As visualized in Figure \ref{observed_neTe_predicted_Er}, using the 2-dimensional $(R,Z)$-aligned experimentally-inferred $n_e$ and $T_e$ measurements from the helium GPI diagnostic, the time-dependent turbulent electric field predicted by the ascribed drift-reduced Braginskii theory is computed in the limits of (i) no sources and (ii) source effects due to time-dependent ionization of HeI. Since only the relative (and not absolute) brightness of the line emission across the field-of-view of the GPI is known for this plasma discharge, only the structure of the experimental turbulent profile of $n_0$ can be inferred. Nevertheless, as a conservative lower bound on $n_0$ \cite{Terry_private} in the model calculations to test the impacts of neutral dynamics on turbulent fields, the atomic helium density is scaled to an amplitude of approximately $10^{19}$ m$^{-3}$. Much larger scaling factors for $n_0$ (e.g. $10^{20}$ m$^{-3}$) were found to lead to numerical instability in the optimization, which suggests mathematical terms (e.g. poloidal flows) are missing in the reduced turbulence model's equations and/or that such high $n_0$ are unphysical. A matrix of correlation coefficients for these fluctuations is given in Table \ref{table_correlation_matrix}. The correlations between the turbulent electric field and $n_e$ and $T_e$ predicted by the plasma theory in fully ionized conditions are found to be nearly zero. This nonlinear connection changes with the inclusion of plasma-neutral interactions: time-dependent ionization effects due to atomic helium induce a positive (negative) dependence of the computed $E_R$ ($E_Z$) on $n_e$ and $T_e$. If the experimental $n_0$ is truly larger in magnitude, the reported correlations between these dynamical variables are expected to be even stronger. Further, the addition of neutral helium dynamics to drift-reduced Braginskii theory are found to broaden the distribution of turbulent field magnitudes over the 2-dimensional spatial domain as displayed in Figure \ref{histogram_Er}. This leads to amplified electric field fluctuations with sharper radial variation in the electric potential structure, and manifests as larger ${\bf E \times B}$ flows on turbulent scales in the boundary plasma. Intuitively, this all arises since the observed spatiotemporal evolution of $n_e$ and $T_e$ is not solely due to transport, but instead the self-consistent turbulent ${\bf E \times B}$ flows have to be mathematically balanced in Eqs. \eqref{eq:L_f_n_DotGDBH} and \eqref{eq:L_f_Te_DotGDBH} with sources and sinks. Experimentally, such effects are important for turbulence spreading \cite{Grenfell_2018} and material interactions since even small drifts can compete with flows perpendicular to surfaces at the plasma-sheath interface \cite{edge_flows}. Additionally, the radial and vertical turbulence shearing rates, $({\omega_{\bf E \times B}})_R = \lvert \partial({v_{\bf E \times B}})_Z/\partial R \rvert$ and $({\omega_{\bf E \times B}})_Z = \lvert \partial({v_{\bf E \times B}})_R/\partial Z \rvert$, are elevated on average when atomic helium is present in the edge compared to the case with no time-dependent ionization, i.e. $\langle ({\omega_{\bf E \times B}})_R \rangle$ rises from $4.74 \times 10^4$ to $5.38 \times 10^4$ s$^{-1}$ and $\langle ({\omega_{\bf E \times B}})_Z \rangle$ increases from $9.08 \times 10^3$ to $1.27 \times 10^4$ s$^{-1}$. At intermediate $n_0$ densities, $\langle ({\omega_{\bf E \times B}})_R \rangle$ and $\langle ({\omega_{\bf E \times B}})_Z \rangle$ still increase with $n_0$, although the trend is not strictly linear, as displayed in Table \ref{table_shear}. The modified shearing rates on turbulent scales visualized in Figure \ref{ExB_velocity_shear} can impact shear flow stabilization and cross-field transport of coherent structures. Not including time-dependent neutral dynamics in nonlinear simulations can accordingly mask these effects in edge profile predictions. The amplification of fields due to atomic helium and presence of correlations not present in fully ionized gases demonstrates the importance of neutrals on turbulent scales. They should thus be accounted in experimental tests to precisely validate reduced edge turbulence models, otherwise such errors in predicted fields due to plasma-neutral interactions that scale nonlinearly with $n_0$ will exist. \begin{table}[ht] \centering \renewcommand{\arraystretch}{1.} \begin{NiceTabular}{ p{2.5cm}|p{1.2cm}|p{1.2cm}|>{\arraybackslash}p{1.2cm} }[] {$n_0^* \ (10^{19}$ m$^{-3})$} & $1/4$ & $1/2$&$1$\\ \cline{1-4} $\Delta \langle ({\omega_{\bf E \times B}})_R \rangle$ & 0.42\% & 1.48\% & 13.50\% \\ \cline{1-4} $\Delta \langle ({\omega_{\bf E \times B}})_Z \rangle$ & 6.50\% & 13.44\% & 39.87\% \end{NiceTabular} \caption{\label{table_shear}Change in nonlinear turbulence shearing rates computed at varying $n_0$ and averaged over the spatiotemporal domain spanned by the camera frames. These calculations of relative change in turbulence shearing rate are with respect to the case with no sources where $\langle ({\omega_{\bf E \times B}})_R \rangle = 4.74 \times 10^4$ s$^{-1}$ and $\langle ({\omega_{\bf E \times B}})_Z \rangle = 9.08 \times 10^3$ s$^{-1}$.} \end{table} \section{\label{sec:level5.2}Present limitations and upcoming extensions} Due to the axisymmetric toroidal geometry assumed within the drift-reduced Braginskii model, direct comparisons with independent experimental diagnostics from Alcator C-Mod are not yet possible. But going forward, there are several extensions possible in translating these calculations towards empirical testing in magnetic confinement fusion devices to uncover new physics. For example, once flows and geometric effects arising from the poloidal magnetic field \cite{LaBombard_2005_flows} are inserted into the deep learning framework (and validated using modern 3-dimensional codes \cite{3D_geometry_1,3D_geometry_2,giacomin2021gbs}), the predictions from drift-reduced Braginskii theory can be directly compared to available experimental poloidal electric field measurements \cite{mccarthy_thesis}. Such experimental information can then even be used to invert the computational technique to potentially begin learning missing or misrepresented physical terms (e.g. transport coefficients, source functions). The development of edge diagnostics with wide coverage, e.g. probe arrays \cite{TCV_probe,Shao_2018}, capable of measuring radial and poloidal electric fields can thus significantly aid validation efforts especially if magnetically connected with the GPI emission cloud \cite{mathews2022deep}. It is important to underline that the presently used experimental inferences of $n_e$ and $T_e$ come from a 2-dimensional $(R,Z)$-aligned plane. If the vertically-stacked gas tubes utilized for GPI were oriented with the pitch angle of the local magnetic field, then the existing deep learning methodology, which assumes field-aligned 2D observations of $n_e$ and $T_e$, could be directly applied to better approximate the tokamak geometry with the reduced turbulence model. While such diagnostic adjustments are no longer possible on the retired Alcator C-Mod, they can be enacted on existing and upcoming fusion devices. Also, the time-dependent 2-dimensional $n_e$ and $T_e$ are based upon generalized collisional radiative constraints that are agnostic to any turbulence model. This permits the self-consistent learning of time-dependent 2-dimensional profiles for neutral species such as atomic and molecular deuterium \cite{GBS_3fluid_kineticneutrals} via application of existing Monte Carlo transport codes \cite{STOTLER_time_dependent_DEGAS2}, which could be playing a considerable role---as exemplified above by ionization of atomic helium---and can be added into the computational framework akin to that used here for helium. By isolating these effects such as the broadening of turbulent field amplitudes and shearing rates due to atomic helium, essential physics in the development of effective reduced turbulence models can be quantitatively identified. Overall, these initial calculations illustrate a novel pathway towards uncovering unobserved dynamics in experimental fusion plasmas which are conventionally difficult to diagnose. Further, by making no explicit assumptions on boundary conditions or the initializations for turbulent fields within the physics-informed deep learning framework, the nonlinear impacts of approximations (e.g. neglecting time-dependent neutrals) in these chaotic systems can be quantified on turbulent scales. \chapter{Final conclusions} Predicting edge plasma profiles is one of the greatest uncertainties in the design of fusion energy devices. To begin reducing uncertainty in turbulence models, by focusing on the defining trait of any nonlinear theory---the connections between dynamical variables---this thesis has demonstrated an original deep learning framework to start examining the quantitative accuracy of turbulent electric field predictions by the widely applied drift-reduced Braginskii model in the edge of fusion devices. A brief summary of the most important results of this thesis are as follows: First, a novel physics-informed machine learning system was created in Chapter 2 to uncover the unobserved turbulent electric field consistent with drift-reduced Braginskii theory from just partial 2-dimensional observations of the $n_e$ and $T_e$ in a synthetic plasma. This is not otherwise possible using conventional equilibrium models such as the Boltzmann relation or ion pressure balance. Moreover, this computational technique is robust to noisy measurements, which enhances its experimental applicability. In Chapter 3, this deep learning technique was utilized to compare the reduced fluid turbulence model against higher fidelity full-$f$ simulations. It demonstrates the first ever direct comparisons of nonlinear fields between two distinct global turbulence models: electrostatic drift-reduced Braginskii theory and long-wavelength electromagnetic gyrokinetics. Good quantitative agreement was confirmed between the independent models in helical plasmas similar to the edge of NSTX. At artificially elevated $\beta$, significant discrepancies in electric fields were not only observed but quantified to demonstrate that the two turbulence models were definitively inconsistent. In Chapter 4, a path was embarked on to start translating these techniques to the highest fidelity plasma of all: experiment. For this task, an entirely new optimization scheme based upon a multi-network physics-integrated framework was used to convert brightness measurements of HeI line radiation into local plasma and neutral fluctuations via the merging of transport physics and collisional radiative modelling for the $3^3 D - 2^3 P$ transition in atomic helium. This analysis for ionized gases is highly transferable to both magnetized and unmagnetized environments with arbitrary geometries. This work extends the gas puff imaging approach applied around the globe in fusion plasmas where conventional diagnostics are unable to provide such extended coverage of fluctuations. With this technique, based upon fast camera data on the Alcator C-Mod tokamak, the first 2-dimensional time-dependent experimental measurements of the $n_e$, $T_e$, and $n_0$ on turbulent scales are presented revealing shadowing effects in a fusion plasma using a single spectral line. The previous chapters' results are then collectively utilized in Chapter 5 to estimate the 2-dimensional turbulent electric field consistent with (i) drift-reduced Braginskii theory under the framework of an axisymmetric fusion plasma with purely toroidal field and (ii) experimental $n_e$ and $T_e$ measurements via gas puff imaging on Alcator C-Mod. The inclusion of atomic helium effects on particle and energy sources within the reduced turbulence model are found to strengthen correlations between the electric field and plasma pressure. The neutrals are also associated with an observed broadening of the turbulent field amplitudes and increased ${\bf E \times B}$ shearing rates. Overall, while the goal of improving confidence in predictions of edge $n_e$ and $T_e$ profiles still remains, this thesis has begun the development of a new physics-informed deep learning framework to quantitatively test a commonly used reduced edge turbulence model. In particular, by examining the relationship between $n_e$ and $T_e$ with $\phi$ on turbulent scales, good agreement is found between drift-reduced Braginskii theory and gyrokinetics at conditions relevant to modern tokamaks and novel pathways are opened for precise comparisons with experimental plasmas. This work thus emphasizes the importance of improving aspects of edge codes beyond the equations such as boundary conditions and initialization of simulations. Further, for full confidence in edge $n_e$ and $T_e$ predictions by reduced models, the channels examined need to be extended to all dynamical variables (e.g. $j_{||}$, $T_i$) beyond just $\phi$. Nevertheless, this thesis presents an important and necessary step towards this goal. \section{\label{sec:level6.1}Future works} From a computational physics perspective, there are numerous open questions. For starters, there are uncertainties arising from the intrinsic scatter associated with the stochastic optimization techniques utilized within the deep learning frameworks described in Chapters 2 to 5 to perform these turbulence calculations. While switching from first-order gradient-based methods (e.g. Adam) to approximately second-order (e.g. L-BFGS) aided training, safeguarding convergence in solutions remains a major area for improvement. Novel approaches (e.g. proximal gradient optimization algorithms, generalized loss functions) could help. The observed nonuniqueness may be a natural consequence arising from the sensitivity of the chaotic systems themselves being represented by the networks, but work is ongoing to identify the reasons---both numerical and physical---for this range and to improve precision. To better statistically capture errors, fully propagating experimental uncertainties is to be explored, although this thesis indicates a level of robustness exists to noisy $n_e$ and $T_e$ measurements. And extending the framework to infer relationships between all dynamical variables in the multi-field model with neutrals \cite{GBS_3fluid_kineticneutrals} is required for full testing Experimentally, there are several future directions created by this thesis. As noted in Chapter 5, if the gas tubes associated with GPI are aligned with the local magnetic field, then improved reconstructions of the turbulent electric field can be captured using the framework presently outlined in Chapter 2 even in the presence of significant poloidal field. Alternatively, extending the technique to innately handle 3-dimensional geometries and/or training against 2-dimensional $n_e$ and $T_e$ data from highly realistic drift-reduced Braginskii simulations employing proper tokamak geometry and sources as in \cite{giacomin2021gbs,GBS_3fluid_kineticneutrals,Zholobenko_2021_validation} could enable this work to use the existing GPI data for comparison of turbulent electric fields with available probe measurements. These increasingly sophisticated full device simulations include self-consistent kinetic neutrals (i.e. D$_2$, D) along with charged molecular species (i.e. D$_2^+$). Testing with these effects accounted will improve the overall applicability of this model to extract the turbulent electric field on new fusion devices. As an immediate extension, by coupling the learned $n_e$ and $T_e$ from Chapter 4---which uses a technique completely oblivious to plasma turbulence beyond the criteria outlined---with Monte Carlo neutral transport codes \cite{STOTLER_time_dependent_DEGAS2}, this can recover 2-dimensional time-dependent estimates of atomic and molecular species in experiment on turbulent scales. Emissivity predictions, e.g. of Ly$_\alpha$ radiation, could then be compared against experimental measurements of deuterium line emission as a secondary test of validity \cite{Lyalpha0,Lyalpha1}. These neutral profiles could also be applied in the experimental testing of reduced turbulence models. Further, the framework outlined in Chapter 4 yields new experimental pathways altogether for the GPI diagnostic. Efforts to transfer this analysis technique to existing devices with variable geometry (e.g. W7-X, TCV, DIII-D) can be tackled right away. Widening the domain towards the confined plasma to analyze pedestal dynamics will likely require significant advancements to the computational framework to simultaneously handle the multiscale behaviour in fluctuations and equilibrium profiles \cite{Fourier_multirate,wang2020understanding,wang2020eigenvector,wang2022causality}. As an example, Appendix B outlines a deep Gaussian process capable of learning transient and steep features (e.g. formation of pedestals across transitions between confinement regimes) in otherwise slowly evolving profiles. Bayesian integration of networks with such experimental information on macroscopic scales from independent plasma diagnostics could help augment their ability to learn edge dynamics. In addition, if not generalizing the GPI analysis technique to 3 dimensions, applying highly collimated HeI beams is sought for good reconstruction of the turbulent $n_e$ and $T_e$. On this point, the encoded velocity closure for neutral transport should be carefully examined---or perhaps even learned by networks---in novel experimental scenarios. A spectrometer with sufficiently high spectral resolution could also experimentally measure the Doppler shift. Finally, while the deep learning framework for GPI analysis can technically utilize deuterium line emission instead of puffing HeI, all the criteria listed in Chapter 4 would need to be re-visited and suitably developed to account for effects such as charge-exchange and recombination. \section{\label{sec:level6.2}Last remarks} While we began to understand the structure and potential of atomic nuclei just about one century ago, we are only now starting to delve into the structure and potential of neural networks. The practical ability for these artificial circuits to represent physical systems such as ionized gases permits this thesis to no longer use power laws but partial differential equations as regression constraints when training on spatiotemporally evolving (simulation or experimental) data on turbulent scales beyond 0-dimensional quantities. But unlocking their potential may not always be simple. Turbulence is fundamentally complex, and so may be the tools used to model it. Nevertheless, these tools can provide useful representations and insights not otherwise easy to uncover to view plasma dynamics in altogether new ways. This thesis itself represents just part of the beginning of a powerful technique with computational graphs that can solve essential problems in turbulence and the confinement of fusion energy systems to help continue providing breakthroughs in advancing human knowledge and technology. \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{The hardest problems we have to face do not come from philosophical questions about whether brains are machines or not. There is not the slightest reason to doubt that brains are anything other than machines with enormous numbers of parts that work in perfect accord with physical laws. As far as anyone can tell, our minds are merely complex processes. The serious problems come from our having had so little experience with machines of such complexity that we are not yet prepared to think effectively about them.}{Marvin Minsky} \newpage \setlength{\epigraphwidth}{0.6\textwidth} \epigraph{Let us return for a moment to Lady Lovelace’s objection, which stated that the machine can only do what we tell it to do. One could say that a man can ``inject'' an idea into the machine, and that it will respond to a certain extent and then drop into quiescence, like a piano string struck by a hammer. Another simile would be an atomic pile of less than critical size: an injected idea is to correspond to a neutron entering the pile from without. Each such neutron will cause a certain disturbance which eventually dies away. If, however, the size of the pile is sufficiently increased, the disturbance caused by such an incoming neutron will very likely go on and on increasing until the whole pile is destroyed. Is there a corresponding phenomenon for minds, and is there one for machines? There does seem to be one for the human mind. The majority of them seem to be ``sub critical,'' i.e. to correspond in this analogy to piles of sub-critical size. An idea presented to such a mind will on average give rise to less than one idea in reply. A smallish proportion are supercritical. An idea presented to such a mind may give rise to a whole ``theory'' consisting of secondary, tertiary and more remote ideas. Animals’ minds seem to be very definitely sub-critical. Adhering to this analogy we ask, ``Can a machine be made to be super-critical?''}{Alan Turing} \section*{Acknowledgments} \setlength{\epigraphwidth}{0.8\textwidth} \epigraph{I suppose in the end, the whole of life becomes an act of letting go, but what always hurts the most is not taking a moment to say goodbye.}{Yann Martel, Life of Pi} It is only as I stitch together the final pieces of my PhD that I am realizing it is nearly over. A trek that once almost felt endless just a short while ago is now just about finished. And at this end, there are countless people to thank. To start, this thesis and myself owe immense gratitude to J.W. Hughes. He provided me an example every day of what it means to be a good scientist and an even better human. Freedom is not worth having if it does not include the freedom to make mistakes\footnote{Mahatma Gandhi}, and Jerry aptly provided ample freedom to find my own meaningful problems and make my own mistakes. There may be no greater gift as a student, and Jerry's wit---in life and experiment---made this journey a joy. I thank A.E. White for making this work all possible beginning on the first day I walked into the PSFC as a Cantabrigian by bringing Jerry into her office. While the project evolved over the years, Anne knew how to start it all. And ever since our first serendipitous encounter in Austin, D.R. Hatch was a source of constant encouragement when exploring unknown territory and truly beginning this research. I am also grateful to my thesis defence members D.G. Whyte and J.D. Hare for their time in crafting this dissertation. At every stage, from my NSE admission letter to navigating a pandemic abroad, B. Baker was incredibly supportive throughout the entirety of graduate school. Upon first meeting Mana on campus, I didn't realize how instrumental he would be to this work as a mentor and a friend, but this document would not exist without him. I can also say essentially all the same about Jim, who truly made these last chapters of the thesis possible. And while he may not be a formal co-author listed on publications, I wholeheartedly thank Ted for always being there at the beginning of my PhD. I could not have asked for a better neighbour. I am also indebted to the contributions of all my collaborators: M. Francisquez taught me to conduct the two-fluid simulations presented in Chapter 2 using the \texttt{GDB} code run on MIT's Engaging cluster and co-developed with B. Zhu and B.N. Rogers; N. Mandell developed and ran the electromagnetic gyrokinetic simulations described in Chapter 3, which were performed on the Perseus cluster at Princeton University and the Cori cluster at NERSC, and based upon the \texttt{Gkeyll} framework led by A. Hakim and G.W. Hammett; B. LaBombard and D. Brunner operated the mirror Langmuir probe utilized in Chapter 4; A.Q. Kuang and M.A. Miller assisted with probe data analysis in Chapter 4; S.G. Baek ran DEGAS2 simulations to inform neutral modelling in Chapters 4 and 5; J.L. Terry and S.J. Zweben operated the GPI diagnostic in Chapters 4 and 5; M. Goto, D. Stotler, D. Reiter, and W. Zholobenko developed the HeI collisional radiative codes employed in Chapters 4 and 5. The content of these pages are enabled by their technical support and camaraderie. Any errors in this thesis are my own. While this may be the end of my PhD at MIT, the sights of Park Street and Killian Court will forever feel warm. I thank all the wonderful people I ran into on Albany Street and across the world over the past years including Nick, Francesco, Pablo, Rachel, Beatrice, Thanh, Eli, Bodhi, Fernanda, Nima (Harvard's P283B taught me to truly view physics questions as constrained-optimization problems), Lt. Reynolds, Erica, Muni, Christian, Patricio, Yu-Jou, Libby, Cassidy, Alex, Lucio, Aaron, Sam, Evan, Anna (from Switzerland), Anna (from Austria), Manon, Eva, Josh, and the never-faraway Peter. Prior to ever setting foot in Cambridge, I am truly lucky to have met a lifelong teacher and advisor in Martin, who pushed me to this point starting from London. I also thank my best friends in Canada for always making me feel at home wherever I am---from Fenway Park with Katie and Sammy, to sailing into the Charles with Donna, to the great lake with George and Maher (or even adventuring on it in Niagara), to escaping the French secret police with Dylan, to Adam's backyards in Toronto and Montr\'eal and Killarney, to living in a van across Valhalla and sleeping in train stations by Berchtesgaden with Nicholas---no place is ever too distant. There are also many people without whom this thesis would literally not be possible such as the great folks at Jasper Health Services for helping me to still write, Mississauga Fire Department for allowing me to still breathe, and Procyon Wildlife for inspiring me years ago and still to this day. But beyond all, this PhD is the product of the unconditional love and support I constantly get from my big family---all the way from my dear grandparents to my boisterous cousins who are always full of life. At the core, my parents instilled the values of good work and education in me at an early age. Together with my older brother, they endlessly push me in everything that I do with their time and heart and extraordinary cooking. There can never be enough appreciation for all they've done and for what they mean to me. And to my littlest brother, Kobe, thank you for teaching me to see the world \\ \noindent\rule{15.25cm}{0.4pt} \\ \\ {\it \noindent As you set out for Ithaka\\ hope your road is a long one,\\ full of adventure, full of discovery.\\ Laistrygonians, Cyclops,\\ angry Poseidon---don’t be afraid of them:\\ you’ll never find things like that on your way\\ as long as you keep your thoughts raised high,\\ as long as a rare excitement\\ stirs your spirit and your body.\\ Laistrygonians, Cyclops,\\ wild Poseidon---you won’t encounter them\\ unless you bring them along inside your soul,\\ unless your soul sets them up in front of you.\\ \vspace{-0.7cm} \\ \\ Hope your road is a long one.\\ May there be many summer mornings when,\\ with what pleasure, what joy,\\ you enter harbors you’re seeing for the first time;\\ may you stop at Phoenician trading stations\\ to buy fine things,\\ mother of pearl and coral, amber and ebony,\\ sensual perfume of every kind---\\ as many sensual perfumes as you can;\\ and may you visit many Egyptian cities\\ to learn and go on learning from their scholars.\\ \vspace{-0.7cm} \\ \\ Keep Ithaka always in your mind.\\ Arriving there is what you’re destined for.\\ But don’t hurry the journey at all.\\ Better if it lasts for years,\\ so you’re old by the time you reach the island,\\ wealthy with all you’ve gained on the way,\\ not expecting Ithaka to make you rich.\\ \vspace{-0.7cm} \\ \\ Ithaka gave you the marvelous journey.\\ Without her you wouldn't have set out.\\ She has nothing left to give you now.\\ \vspace{-0.7cm} \\ \\ And if you find her poor, Ithaka won’t have fooled you.\\ Wise as you will have become, so full of experience,\\ you’ll have understood by then what these Ithakas mean.}\vspace{0.4cm}\\{--- C. P. Cavafy (translated by Edmund Keeley)} \newpage \section*{List of Publications} Part of the content included in this thesis has already been published in peer-reviewed journals or is presently under referee review. Permission to reuse text and figures from these articles has been granted and are listed below: \begin{itemize} \item {\bf A. Mathews}, J.W. Hughes, J.L. Terry, S.G. Baek, “Deep electric field predictions by drift-reduced Braginskii theory with plasma-neutral interactions based upon experimental images of boundary turbulence” arXiv:2204.11689 (2022) \item {\bf A. Mathews}, J.L. Terry, S.G. Baek, J.W. Hughes, A.Q. Kuang, B. LaBombard, M.A. Miller, D. Stotler, D. Reiter, W. Zholobenko, and M. Goto, “Deep modelling of plasma and neutral fluctuations from gas puff turbulence imaging” arXiv:2201.09988 (2022) \item {\bf A. Mathews}, N. Mandell, M. Francisquez, J.W. Hughes, and A. Hakim, “Turbulent field fluctuations in gyrokinetic and fluid plasmas” Physics of Plasmas {\bf 28}, 112301 (2021) \item {\bf A. Mathews}, M. Francisquez, J.W. Hughes, D.R. Hatch, B. Zhu, and B.N. Rogers, “Uncovering turbulent plasma dynamics via deep learning from partial observations” Physical Review E {\bf 104}, 025205 (2021) \item {\bf A. Mathews} and J.W. Hughes, “Quantifying experimental edge plasma evolution via multidimensional adaptive Gaussian process regression” IEEE Transactions on Plasma Science {\bf 49}, 12 (2021) \end{itemize} \noindent Funding support came from the Natural Sciences and Engineering Research Council of Canada (NSERC) through the doctoral postgraduate scholarship (PGS D), U.S. Department of Energy (DOE) Office of Science under the Fusion Energy Sciences program by contract DE-SC0014264, Joseph P. Kearney Fellowship, and Manson Benedict Fellowship from the MIT Department of Nuclear Science and Engineering. \chapter{} command for the appendix title. \chapter{Chapter Title}
\section{Introduction} \label{sec:intro} The best current model to describe our Universe is the $\Lambda$CDM model, which prescribes the existence of a cosmological constant $\Lambda$ associated with dark energy, together with cold dark matter (CDM) and ordinary matter (baryons; see e.g.\ \citealp{Dodelson03}). In particular, the $\Lambda$CDM model predicts that dark matter is about five times more abundant than ordinary matter, with galaxies forming along the cosmic web structure woven by dark matter, made of filaments connecting different clusters, all surrounded by voids. While its gravitational effects are observed by many probes, dark matter remains a mystery, with multiple experiments still ongoing to shed light on its nature (see e.g.\ \citealp{Trimble87, Bertone05, Buchmueller17, deSwart17}, and references therein). The most common tool to analyse and track the origin and evolution of dark matter structures are cosmological $N$-body simulations (\citealp{Holmberg41, Navarro96,Tormen97, Jenkins98, Springel05a, Springel05b, Boylan09, Angulo12, VillaescusaNavarro20b, VillaescusaNavarro20, Chacon20}, and references therein). In its basic formulation, an $N$-body simulation is run by putting a certain number of massive particles in a cubic box, imposing periodic boundary conditions and letting gravity be the only force acting on the particles through its gravitational potential, governed by the Poisson equation \citep{Springel05a}. The initial conditions are usually described with a Gaussian density field, which can be entirely summarised by a given power spectrum, i.e.\ by the Fourier counterpart of the correlation function between different particles in the simulation. Starting from high redshift, the position and velocity of the particles are updated iteratively until today ($z=0$), while various snapshots are taken at different redshifts. Several methods to run an $N$-body simulation are available, with different levels of complexity, approximation, and speed \citep{Hockney88, Chacon20}. These include the direct resolution of the equation of motion for each particle \citep{Mikkola93}, approximated methods like the tree code method \citep{Barnes86, Callahan92}, or mean-field approaches like standard \citep{Klypin97} or adaptive \citep{Shea04} particle mesh. In general, though, $N$-body simulations are computationally expensive to run, and usually require access to high performance computing hardware. This limits the possibility of fully exploring the impact of different cosmological parameters on the dark matter evolution in our Universe, and hinders statistical analyses of the large-scale structure (see e.g.\ \citealp{Taylor13, Taylor14}): $N$-body simulations are essential to associate a covariance matrix to real measurements, and thousands of simulations are usually needed to obtain accurate estimates of such matrices. In recent years, many cheaper approximations have been proposed, which try to capture both the large-scale structure of the cosmic web and its smaller-scale details. These approximations often rely on Lagrangian perturbation theory \citep{Buchert92, Buchert93, Buchert94}, and can produce accurate dark matter halo mock catalogues and dark matter density fields \citep{Monaco02, Monaco13, White14, Kitaura13, Chuang14, Tassev13, Tassev15, Howlett15, Rizzo17, Tosone20, Tosone21}. While being capable of capturing the large-scale-structure statistics with fewer computational resources, these methods usually fail to accurately produce the correct small-scale statistics, and to date no inexpensive exact alternative to $N$-body simulations exists. Another typical approximation to describe (dark) matter fields is found by resorting to a lognormal random field, which represents the simplest alternative to running an entire $N$-body simulation \citep{Coles91, Peebles93, Taruya02, Percival04, Hilbert11, Xavier16}. A lognormal random field can be easily obtained from a Gaussian random field (see Sect.~\ref{sec:training_data} for further details), and can be entirely described by a small number of parameters; moreover, a lognormal variable has a skewed distribution which is suited for e.g.\ the matter overdensity field, whose values range from -1 in voids to values much higher than 1 in clustered dense regions. However, as reported in \citet{Xavier16} and as shown in Fig.~\ref{fig:histo_with_density}, the lognormal approximation comes with its own limitations, and fails to reproduce the correct matter density distribution especially at its tails. Machine learning (ML) techniques have also been proposed to replace expensive $N$-body simulations. In \citet{Rodriguez18}, generative adversarial networks \citep[GANs,][]{Goodfellow14} were successfully trained to generate slices of $N$-body simulations, and \citet{Mustafa19} applied the same technique to weak lensing convergence maps. \citet{Perraudin19} and \citet{Feder20} then extended the application of GANs to 3-D boxes, proving that, while challenging to train, GANs can capture both large- and small-scale features, and are capable of accurately recovering the statistical information contained in the training data. \citet{He19} and \citet{Oliveira20}, on the other hand, showed that it is possible to train a U-shaped neural network architecture \citep[U-net,][]{Ronneberger15} to map simple linear initial conditions to the corresponding final evolved fields, correctly learning the non-linear growth of structures under the gravitational influence. \citet{Kaushal21} additionally used Lagrangian perturbation theory to evolve such initial conditions and only learn the difference in the density fields at $z=0$. In these latter works, it was also shown that such architectures can perform well even on input data obtained from different cosmological parameters than the training data, thus demonstrating the appealing feature of being able to extrapolate outside the training distribution. Other works have explored the use of super-resolution techniques to $N$-body simulations \citep{Ramanah20, Li21}, the application of normalising flows \citep[e.g.][]{Papamakarios19} as generative models of the large-scale structure \citep{Rouhiainen21, Dai22}, wavelet phase harmonics statistics to produce realistic 2-D density fields \citep{Allys20}, or combinations of ML-inspired techniques with more traditional methods to improve the accuracy of fast $N$-body solvers \citep{Dai18, Dai20, Dai21, Bohm20}. While being useful, all the previous approaches still require a relatively high amount of computational resources, might not scale well to high-resolution fields, or introduce many approximations that prevent them from being used reliably in place of full $N$-body simulations. In this paper, we show that it is possible to improve the lognormal approximation by means of ML techniques, with the long-term goal of integrating our approach with the \textit{Full-sky Lognormal Astro-fields Simulation Kit} \citep[\textsc{FLASK},][]{Xavier16}, in order to be able to cheaply generate more realistic high-resolution full-sky density fields. For this purpose, we start from the Quijote $N$-body simulation suite \citep{VillaescusaNavarro20}, which offers thousands of realisations of a single cosmological parameterisation, as well as hundreds of simulations at different values of the cosmological parameters. We devise a pipeline to create lognormal density fields which are the approximated counterpart of the simulated density fields. By construction, these lognormal fields have the same power spectrum as the one from the fiducial $N$-body simulations, and the phases of the underlying Gaussian fields are taken from the initial conditions of the simulated fields (all details are reported in Sect.~\ref{sec:training_data}). Having the pairs of lognormal and corresponding simulated density fields, we draw from image-to-image translation techniques based on convolutional neural networks and adversarial training, in order to obtain a model that can map simple lognormal fields to more realistic density fields (see Fig.~\ref{fig:histo_with_density}). We extensively validate our model by measuring first-, second-, and higher-order statistics, obtaining good agreement, almost always within 10\%, on all scales. We additionally discuss how our model, despite being trained on a single set of cosmological parameters, can be successfully applied to slightly different cosmologies without re-training, while needing a more extensive study for different redshifts or cosmologies with bigger variations in the parameters. \begin{figure*} \includegraphics[width=2\columnwidth]{figures/histo_with_density} \caption{\textit{Left panel}: histograms of the matter overdensity $\delta$, defined in Eq.~(\ref{eq:overdensity}), for a lognormal random field (red) and an $N$-body simulation dark matter density field (grey). \textit{Middle and right panels}: square maps of a lognormal (middle) and $N$-body (right) density fields, with a side of 512 pixels. In these maps, we clipped the maximum and minimum values before applying a logarithm to reduce their dynamic range; the symbol `$\ln$' indicates the natural logarithm throughout this paper. The right-hand-side plot is a slice of a simulation from the Quijote suite \citep{VillaescusaNavarro20}, while the middle plot, obtained following the procedure described in Sect.~\ref{sec:training_data}, represents its lognormal counterpart. The goal of this paper is to train a machine learning model (described in Sect.~\ref{sec:iti_translation}) to transform the lognormal map to the more realistic $N$-body map, thus improving the statistical power of the fast lognormal approximation.} \label{fig:histo_with_density} \end{figure*} The paper is structured as follows. In Sect.~\ref{sec:data} we describe the Quijote simulation data, on which this work is based. In Sect.~\ref{sec:method}, we detail the procedure that we apply to obtain the training data, and describe the image-to-image translation technique that we employ in this work. In Sect.~\ref{sec:results}, we present the results for different resolutions of the density fields, as well as for different values of redshift and cosmological parameters, and demonstrate the performance of our model through a wide range of statistical tests. We conclude in Sect.~\ref{sec:conclusions} with a summary of our work, planned improvements and an outline of possible future applications of our model. \section{Data} \label{sec:data} In this work, we use the Quijote simulation suite \citep{VillaescusaNavarro20}. This set of $N$-body simulations includes $15\,000$ realisations following 512$^3$ dark matter particles in a box with comoving length of $1$ $h^{-1} \ \rm{Gpc}$, with the matter density parameter $\Omega_{\rm{m}} = 0.3175$, the baryon density parameter $\Omega_{\rm{b}} = 0.049$, the Hubble parameter $h = 0.6711$, the scalar spectral index $n_{\rm{s}} = 0.9624$, the root mean square of the matter fluctuations in spheres of radius 8 $h^{-1}$ Mpc $\sigma_8 = 0.834$, and the dark energy equation of state parameter $w = -1$; neutrinos are considered massless. These simulations were run using the TreePM code Gadget-III, which is an improved version of Gadget-II \citep{Springel05a}. We consider snapshots of both the initial conditions ($z=127$) and today ($z=0$), as well the $z=1$ snapshot for further validation of our model (see Sect.~\ref{sec:zc_dep}). In each $N$-body simulation, we convert the information on the particles' position to a continuous random field through a mass assignment scheme. We analyse the matter overdensity field $\delta(\mathbf{x})$, defined as: \begin{equation} \delta(\mathbf{x})=\frac{\rho(\mathbf{x})}{\bar{\rho}} -1 \ , \label{eq:overdensity} \end{equation} with $\rho(\mathbf{x})$ being the matter density field at each position $\mathbf{x}$, and $\bar{\rho}$ being the mean density in the volume of the simulation. Following \citet{Chaniotis04, Jing05, Sefusatti16}, we consider a regular grid of points in all three directions. The continuous overdensity field is obtained by interpolating the discrete overdensity field on this grid, i.e.\ by evaluating the continuous function \begin{equation} \tilde{\delta}(\mathbf{x})= \int \frac{\dif \mathbf{x'}}{(2\pi)^3} W(\mathbf{x} - \mathbf{x'}) \delta(\mathbf{x'}) \ , \label{eq:integral_overdensity} \end{equation} with $W(\mathbf{x})$ being the weight function describing the number of grid points to which every particle is assigned. We choose the piecewise cubic spline interpolation scheme, i.e.\ we explicitly write the weight function as $W(\mathbf{x}) = W_{\rm{1D}}(x_1/H) W_{\rm{1D}}(x_2/H) W_{\rm{1D}}(x_3/H)$, with $H$ being the grid spacing, $x_1$ ($x_2$, $x_3$) being the $x$ ($y$, $z$) direction, and $W_{\rm{1D}}$ being the unidimensional weight function \begin{equation} W_{\rm{1D}}(s) = \begin{cases} \frac{4-6s^2+3|s|^3}{6} & \rm{if} \ 0 \leq |s| < 1 \ ;\\ \frac{(2-|s|)^3}{6} & \rm{if} \ 1 \leq |s| < 2 \ ;\\ 0 & \rm{otherwise} \ ; \end{cases} \label{eq:pcs} \end{equation} we refer the reader to \citet{Sefusatti16} for more details. We consider both a grid with $N^3_{\rm{high}} = 512^3$ pixels and $N^3_{\rm{low}} = 128^3$ pixels, and present the results in Sect.~\ref{sec:highres} and Sect.~\ref{sec:lowres}, respectively. \section{Method} \label{sec:method} Our goal is to obtain 2-D projected density lognormal fields corresponding to slices of the Quijote simulations, in order to train a model that can take as input a lognormal map and predict a more realistic density field with the same statistics as the simulated one. In the following sections, we describe the procedure that we follow to obtain such a dataset (Sect.~\ref{sec:training_data}), and the machine learning algorithm that we employ to learn the transformation (Sect.~\ref{sec:iti_translation}). \subsection{Obtaining the training data} \label{sec:training_data} Since the long-term goal of the project is to increase the accuracy in large-scale structure description of random field maps on the sphere like the ones produced by \textsc{FLASK} \citep{Xavier16}, we choose to work with slices of the density field rather than the full 3-D boxes. We slice a given box along the third axis, and obtain multiple square density fields from a single simulation (128 in the low-resolution case, and 512 in the high-resolution case); the width of each slice is $1000 \ h^{-1} \ \rm{Mpc} /128 \simeq 7.8$ $h^{-1}$ Mpc in the former case, and $1000 \ h^{-1}\ \rm{Mpc} /512 \simeq 1.9$ $h^{-1}$ Mpc in the latter case. Since we consider 800 simulations in the low-resolution case, and 200 in the high-resolution case, we are left with $102\,400$ maps in both instances. We also consider the initial conditions of the 3-D boxes, namely the $N$-body simulations at $z=127$, which we slice in the same way. \begin{figure*} \includegraphics[width=2\columnwidth]{figures/flowchart.pdf} \caption{Flowchart of the steps to create the training data, as described in Sect.~\ref{sec:training_data}. We first measure the power spectrum of each slice of the $z=0$ boxes (in red in the top panel), which is concatenated with the theory power spectrum obtained using \textsc{CLASS} (\citealp{Blas11}; in grey in the top panel). We then generate a lognormal random field with this power spectrum, following \citet{Coles91, Percival04}. Crucially, when generating the underlying Gaussian field, we use the Fourier phases of the initial conditions of the $N$-body simulation, which consist of a Gaussian random field at $z=127$. In this way, the lognormal field displays increased correlation with the $N$-body field. The final training data consists of pairs of lognormal ($\delta_{\rm{LN}}$) and simulated ($\delta_{\rm{SIM}}$) density fields, with either low (side $N_{\rm{low}} = 128$) or high (side $N_{\rm{high}} = 512$) resolution, as explained in Sect.~\ref{sec:data}. The machine learning model employed to learn the mapping from $\delta_{\rm{LN}}$ to $\delta_{\rm{SIM}}$ is presented in Sect.~\ref{sec:iti_translation}.} \label{fig:flowchart} \end{figure*} In order to create the lognormal counterpart of the more realistic maps, we start by measuring the power spectrum of each simulation's slice at $z=0$, which we wish to impose on the lognormal fields. We recall here that the 2-D matter power spectrum $P(k)$ can be implicitly defined through the Fourier transform $\delta(\mathbf{k})$ of the matter density contrast $\delta(\mathbf{x})$\footnote{From now on, we use $\mathbf{k}$, $\mathbf{x}$ and $\mathbf{r}$ to indicate projected 2-D vectors.}, defined as in Eq.~(\ref{eq:overdensity}): \begin{equation} \langle \delta(\mathbf{k}) \delta(\mathbf{k'}) \rangle = \left( 2\pi \right)^2 P(k) \delta_{\mathrm{D}}(\mathbf{k}+\mathbf{k'}) \ , \label{eq:ps} \end{equation} where $\langle \cdot \rangle$ denotes an average over the whole Fourier space, $k=|\mathbf{k}|$, and $\delta_{\mathrm{D}}(\cdot)$ indicates the Dirac delta function \citep{Dodelson03}; this in turn yields the estimator \begin{equation} \hat{P}(k) = \frac{1}{N_{\rm{modes}}(k)} \sum_{|\mathbf{k}|=k} |\delta(\mathbf{k})|^2 \ , \label{eq:ps_est} \end{equation} where $N_{\rm{modes}} (k)$ is the number of modes in each $k$ bin, and the sum is performed over all $\mathbf{k}$ vectors whose magnitude is $k$. The definition in Eq.~(\ref{eq:ps}) implies that $P(k)$ is the Fourier counterpart of the 2-D matter correlation function $\xi(r)$, with $r=|\mathbf{r}|$, i.e.\ \begin{equation} P(k) = \int \xi(r) e^{-\mathrm{i} \mathbf{k} \cdot \mathbf{r}} \dif^2 \mathbf{r} \ , \label{eq:power} \end{equation} where $\xi(r)$ is defined as \begin{equation} \xi(r) = \langle \delta(\mathbf{x}) \delta(\mathbf{x}+\mathbf{r}) \rangle \ , \end{equation} with $\langle \cdot \rangle$ representing the average over all locations $\textbf{x}$ in the plane in this case. In order to generate a lognormal random field with a given power spectrum, we follow the procedure of \citet{Coles91, Percival04}. We start by converting the measured power spectrum to the matter correlation function $\xi_{\rm{LN}}(r)$, then we calculate the corresponding Gaussian correlation function, \begin{equation} \xi_{\rm{G}}(r) = \ln \left[ 1+\xi_{\rm{LN}}(r) \right] \ , \end{equation} transform it back to Fourier space and create a Gaussian random field realisation $\delta_{\rm{G}}$ on a grid with this power spectrum and the required resolution ($N_{\rm{low}}$ or $N_{\rm{high}}$). It is well known that a zero-mean Gaussian field is entirely specified by the given power spectrum, which only depends on the absolute value of the Fourier coefficients: this means that the Fourier phases can be uniformly sampled from the $[ 0, 2\pi ]$ interval \citep{Coles00, Chiang00, Watts03}. Crucially, when generating the Gaussian random field, we employ the set of phases of the Gaussian initial conditions of the Quijote simulation realisation; in this way, the final lognormal density fields will have a high level of correlation with the density fields obtained from the simulations, especially on larger scales, as shown in Fig.~\ref{fig:histo_with_density}. While the amount of correlation is limited due to the evolution from $z=127$ to $z=0$, we argue that our choice facilitates learning the skeleton of the large-scale structure: the Pearson correlation coefficient between pairs of maps can be as high as 0.5, if we smooth the fields with a Gaussian kernel on scales of about $50 \ h^{-1}$ Mpc, while it is consistent with 0 if using completely random phases. Finally, we obtain the lognormal field $\delta_{\rm{LN}}$ by calculating for each grid point \begin{equation} \delta_{\rm{LN}} = \exp{ \left( \delta_{\rm{G}} - \sigma^2_{\rm{G}}/2 \right) } -1 \, \end{equation} where $\sigma_{\rm{G}}$ is the standard deviation of the Gaussian field. For all these operations we employ the \textsc{Python} package \textsc{nbodykit} \citep{Hand18}. A flowchart representing the steps followed to produce the training data is reported in Fig.~\ref{fig:flowchart}. \begin{figure*} \includegraphics[width=2\columnwidth]{figures/unet.pdf} \caption{A representation of the generative model employed in this work, as described in Sect.~\ref{sec:iti_translation}. Following \citet{Isola17}, we have two convolutional neural networks, the generator (bottom left) and the critic (top right). We feed the lognormal maps through the generator, which is a U-net \citep{Ronneberger15}, that first downsamples and then upsamples each image using various convolutional layers, with all details reported in Appendix~\ref{app:model}. To improve the performance of the model, each upsampling step is concatenated with the output of a downsampling step, as indicated by the dashed lines (\textit{skip connections}). The output of the generator, dubbed $\delta_{\rm{GEN}}$, is then compared with the target data $\delta_{\rm{SIM}}$ by the critic network, which is again made of various convolutional layers, ending with a dense layer in order to have a single output. The critic and generator networks are trained together, minimising the loss function of Eq.~(\ref{eq:WGGAN-GP}). Note that in addition to the standard adversarial loss, we include a penalty term in the form of the mean squared error between the generated and target maps, which we found to significantly improve the performance of our model; this is indicated by the short-dashed lines (\textit{identity}).} \label{fig:architecture} \end{figure*} We observe two limitations due to the fact that we measure the power spectrum from a finite-resolution grid. First, by relying on the boxes only, we are capable of surveying only a limited range in $k$, namely no larger than $k \in [0.025 \ h \ \rm{Mpc ^{-1}}$, $1 \ h \ \rm{Mpc ^{-1}}]$ in the high-resolution case, and $k \in [0.025 \ h \ \rm{Mpc ^{-1}}$, $0.3 \ h \ \rm{Mpc ^{-1}}]$ in the low-resolution case. In order to access larger scales (i.e.\ lower $k$ values), we concatenate the measured power spectrum with the theoretical one obtained with \citep[\textsc{CLASS}][]{Blas11} for $k \in [10^{-5} \ h \ \rm{Mpc ^{-1}}$, $0.025 \ h \ \rm{Mpc ^{-1}}]$: this makes the procedure outlined in the previous paragraphs more stable numerically. Second, we observe a mismatch in power in the lognormal fields with respect to the imposed power spectrum. We attribute this discrepancy to the fact that when converting the Quijote initial conditions to a density field, the mass assignment scheme introduces extra spurious correlation in the phases, as well as to the noise arising from measuring the power spectrum on a slice of the density field, rather than the entire box. We correct for this effect, which is more pronounced at higher resolution, by iteratively rescaling the input power by the ratio of the output and target power at each $k$, until the mismatch across a sample of 100 random maps is smaller than $1 \%$ at all $k$ values. We checked that this iterative adaptation scheme effectively removes the power mismatch, leaving the final performance of the model unaffected: the results presented in Sect.~\ref{sec:results} do not change significantly if we use as input a slice of a 3-D lognormal field generated with completely random Fourier phases. We further remark that this correction would not be necessary if we had access to a perfectly Gaussian density field of the initial conditions. We are left with pairs of square density field maps (dubbed $\delta_{\rm{LN}}$ and $\delta_{\rm{SIM}}$), which we use as the training (80\%), validation (10\%) and test (10\%) data, further discussed in the next section. Note that to reduce the correlations between slices coming from the same simulation cube we shift the pixels by a random amount along both the first and second axis, independently for each pair of maps, assuming periodic boundary conditions. It could also be possible to randomly rotate and flip the slices in order to augment the training data; while we found it is not needed in our setup, we defer further investigations to future work. Before feeding the pairs into the neural network architecture described in the next section, we additionally preprocess each map by calculating $\ln { \left( 1+ \delta\right)}$ to decrease the dynamic range of each density value $\delta$. \begin{figure*} \includegraphics[width=2\columnwidth]{figures/vis_insp.pdf} \caption{The lognormal (left) and $N$-body (middle) density fields as in Fig.~\ref{fig:histo_with_density}, with the prediction of our model (right) given the lognormal field. In these maps, we clipped the maximum and minimum values before applying the logarithm to reduce their dynamic range. The model is described in Sect.~\ref{sec:iti_translation}. We remark that we are not interested in an exact match of the middle and right panels, as we explain in Sect.~\ref{sec:vis_insp}, and thoroughly test that the predicted fields carry the same statistical information as the $N$-body maps from Sect.~\ref{sec:statistics}.} \label{fig:vis_insp} \end{figure*} \subsection{Image-to-image translation} \label{sec:iti_translation} As discussed in Sect.~\ref{sec:intro}, machine learning generative techniques have extensively been applied to $N$-body simulations. In this work, we aim at mapping lognormal fields to more realistic fields, hence we employ the \textit{pix2pix} network structure, first proposed in \citet{Isola17}. The model is composed of two parts, as sketched in Fig.~\ref{fig:architecture}; all implementation details are reported in Appendix~\ref{app:model}. The first part is a U-net \citep{Ronneberger15}, which takes as an input a lognormal map $\delta_{\rm{LN}}$, obtained and preprocessed as described in Sect.~\ref{sec:training_data}. The map is passed through various convolutional layers to yield a compressed feature map, which is then upsampled back to the original resolution. Crucially, these upsampling steps are concatenated with the corresponding downsampled feature maps, which allow various scales to be accessible in the output map; removing these skip connections significantly impairs the performance of the model. We call the output map the \textit{generated} map $\delta_{\rm{GEN}}$. We want the generated map to carry the same statistical information as the $\delta_{\rm{SIM}}$ density field. We tested that minimising a simple $\ell^1$ or $\ell^2$ norm between $\delta_{\rm{GEN}}$ and $\delta_{\rm{SIM}}$ is not sufficient to yield accurate results. For this reason, following \citet{Isola17}, we employ a second convolutional block as a discriminator, and express the loss in the framework of adversarial training. In the standard GAN framework \citep{Goodfellow14}, the generator network $G$ is trained together with the discriminator network $D$ until an equilibrium where neither $G$ or $D$ can improve their performance is reached: while $G$ attempts to generate realistic images, $D$ tries to distinguish between real and fake examples. Since we found this framework to be particularly unstable during training, we actually implemented the Wasserstein GAN with gradient penalty \citep[WGAN-GP,][]{Arjovsky17, Gulrajani17}, which we found superior both in performance and training stability. In this framework, a generator $G$ is trained alongside a critic $C$ to minimise the following cost function: \begin{align} \nonumber & \mathbb{E}_{\delta_{\rm{GEN}}} \left [ C(\delta_{\rm{GEN}}) \right ] - \mathbb{E}_{\delta_{\rm{SIM}}} \left [C(\delta_{\rm{SIM}}) \right ] + \\ & \ \ \ \ \ \ \ \ \ \ \ \ \ + \lambda_1 \mathbb{E}_{\hat{\delta}} \left [ \left( ||\nabla_{\hat{\delta}} C(\hat{\delta}) ||_2 - 1 \right) ^2 \right ] + \lambda_2 || \delta_{\rm{GEN}} - \delta_{\rm{SIM}} ||^2_2 \ , \label{eq:WGGAN-GP} \end{align} where $\delta_{\rm{GEN}} = G(\delta_{\rm{LN}})$, $\mathbb{E}_{\delta_{\rm{GEN}}}$ and $\mathbb{E}_{\delta_{\rm{SIM}}}$ indicate the expectation value over samples of the generated and simulated maps (usually estimated through sample averages), respectively, $\hat{\delta}$ represents a linear combination of $\delta_{\rm{GEN}}$ and $\delta_{\rm{SIM}}$\footnote{In particular, $\hat{\delta} = \delta_{\rm{SIM}} + u(\delta_{\rm{GEN}} - \delta_{\rm{SIM}})$, with $u\sim U(0,1)$, where $U(0,1)$ indicates the uniform distribution between 0 and 1. This linear combination means that we are constraining the gradient norm to be 1 only along lines connecting real and fake data, which should be sufficient to guarantee good experimental results \citep{Gulrajani17}.}, $|| \cdot ||_2$ indicates the $\ell^2$ norm, and $\lambda_1$ and $\lambda_2$ are two positive hyperparameters that allow us to tune the amount of regularisation given by the gradient penalty and the $\ell^2$ norm, respectively. In short, Eq.~(\ref{eq:WGGAN-GP}) indicates that we wish to minimise the Wasserstein-1 (or earth mover) distance between the real data and generated data distributions, while constraining the gradient of the critic network to be close to unity; this is needed since the formulation of the Wasserstein distance as in the first two terms of Eq.~(\ref{eq:WGGAN-GP}) only holds when the critic is a 1-Lipschitz function, i.e.\ when its gradient is bound \citep[see][for more details]{Gulrajani17}. We observe that in the standard WGAN-GP formulation $\lambda_2=0$, while in our case we found it key to minimise the $\ell^2$ norm between simulated and generated maps as well in order to obtain improved results. \begin{figure*} \centering \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/legend.pdf} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/pxc_z0_512.pdf} \caption{Pixel counts} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/ps_z0_512.pdf} \caption{Power spectrum} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/pkc_z0_512.pdf} \caption{Peak counts} \end{subfigure} \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/b_k04k06_z0_512_new.pdf} \caption{Bispectrum with $k_1=0.4 \ h \ \rm{Mpc}^{-1}$, $k_2=0.6 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/rb_k04k06_z0_512_new.pdf} \caption{Reduced bispectrum with $k_1=0.4 \ h \ \rm{Mpc}^{-1}$, $k_2=0.6 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/b_k04k04_z0_512_new.pdf} \caption{Bispectrum with $k_1=0.4 \ h \ \rm{Mpc}^{-1}$, $k_2=0.4 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/rb_k04k04_z0_512_new.pdf} \caption{Reduced bispectrum with $k_1=0.4 \ h \ \rm{Mpc}^{-1}$, $k_2=0.4 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \caption{Comparison of the statistical tests described in Sect.~\ref{sec:statistics} for the lognormal ($\delta_{\textrm{LN}}$, in red), $N$-body ($\delta_{\textrm{SIM}}$, in grey), and predicted ($\delta_{\textrm{GEN}}$, in cyan) maps, considering a resolution of $N_{\textrm{high}} = 512$. The performance is measured at the bottom of each panel by calculating the relative difference of $N$-body against predicted and lognormal maps (dashed lines). All solid lines indicate the mean values over 30 maps, and the error bars represent the error on the mean (or propagated error, in the case of the relative differences). We observe that, except for the range $-1 < \delta < 0$ in panel (a) and some individual $\theta$ values in panels (d)--(g), the prediction always matches the target statistics within the error bars, performing significantly better than the lognormal approximation.} \label{fig:512_z0} \end{figure*} To train the networks, we use the Adam optimiser \citep{Kingma14} with learning rate $10^{-5}$; we set the additional Adam hyperparameters $\beta_1=0$ and $\beta_2=0.9$, following \citet{Gulrajani17}, and refer the reader to \citet{Kingma14} and \citet{Gulrajani17} for more details. We feed the data in batches of 32 pairs at each iteration, and train our model for 10 epochs, where each epoch consists of feeding the entire training set through the network. For each batch, we update the critic parameters 10 times, and the generator parameters only once. Each epoch takes about 1 h (8 h) for the low (high) resolution case, on a Tesla P100 GPU; after training, mapping a lognormal map through the generator takes $\mathcal{O} (1 \ \rm{s})$ on the same hardware, and can be efficiently done in batches. We save the model after each epoch. In order to select the best model amongst the saved ones, for each of them we run the statistical tests described in Sect.~\ref{sec:statistics}, and measure the mean percentage difference between the target and predicted maps for randomly-sampled maps of the validation set. The best model is chosen as the one which minimises the sum of the mean percentage differences over all tests; the results are then shown on maps from the test set. In the high resolution case, we actually found that the trained model generates some maps whose power spectrum is significantly different from the input and target ones, which we attribute to instabilities of the WGAN-GP framework. For this reason, we take all the predictions from the test set, and we rank them based on the mean difference between the input power spectrum and the predicted power spectrum; we select the best 30 maps according to this metric, and discuss possible ways to make the model more stable in Sect.~\ref{sec:conclusions}. We show the results of our best models in the next section. These models are found with $\lambda_1 = 100$ and $\lambda_2 = 10$; we defer a full grid search over these hyperparameters to future work. \begin{figure*} \centering \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/legend.pdf} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/pxc_z0_128.pdf} \caption{Pixel counts} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/ps_z0_128.pdf} \caption{Power spectrum} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/pkc_z0_128.pdf} \caption{Peak counts} \end{subfigure} \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/b_k01k03_z0_128_new.pdf} \caption{Bispectrum with $k_1=0.1 \ h \ \rm{Mpc}^{-1}$, $k_2=0.3 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/rb_k01k03_z0_128_new.pdf} \caption{Reduced bispectrum with $k_1=0.1 \ h \ \rm{Mpc}^{-1}$, $k_2=0.3 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/b_k02k02_z0_128_new.pdf} \caption{Bispectrum with $k_1=0.2 \ h \ \rm{Mpc}^{-1}$, $k_2=0.2 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/rb_k02k02_z0_128_new.pdf} \caption{Reduced bispectrum with $k_1=0.2 \ h \ \rm{Mpc}^{-1}$, $k_2=0.2 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \caption{Same as Fig.~\ref{fig:512_z0}, with a lower field resolution $N_{\rm{low}} = 128$. In this case, the solid lines indicate the mean values over 100 maps. We observe that the model's performance is almost always within the 5\% range, except for the bispectra, where significant differences are present at high $\theta$; we discuss these discrepancies in Sect.~\ref{sec:lowres}. Despite these differences, our model still outperforms the lognormal approximation.} \label{fig:128_z0} \end{figure*} \begin{figure*} \centering \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/legend.pdf} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/pxc_z1_128.pdf} \caption{Pixel counts} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/ps_z1_128.pdf} \caption{Power spectrum} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/pkc_z1_128.pdf} \caption{Peak counts} \end{subfigure} \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/b_k01k03_z1_128_new.pdf} \caption{Bispectrum with $k_1=0.1 \ h \ \rm{Mpc}^{-1}$, $k_2=0.3 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/rb_k01k03_z1_128_new.pdf} \caption{Reduced bispectrum with $k_1=0.1 \ h \ \rm{Mpc}^{-1}$, $k_2=0.3 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/b_k02k02_z1_128_new.pdf} \caption{Bispectrum with $k_1=0.2 \ h \ \rm{Mpc}^{-1}$, $k_2=0.2 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \hfil \begin{subfigure}{0.22\linewidth} \includegraphics[width=\linewidth]{figures/rb_k02k02_z1_128_new.pdf} \caption{Reduced bispectrum with $k_1=0.2 \ h \ \rm{Mpc}^{-1}$, $k_2=0.2 \ h \ \rm{Mpc}^{-1}$} \end{subfigure} \caption{Same as Fig.~\ref{fig:128_z0}, for a different model trained on data at redshift $z=1$. We observe a good overall performance of our model, which generally outperforms the lognormal approximation. } \label{fig:128_z1} \end{figure*} \section{Results} \label{sec:results} In this section, we validate the performance of the trained model by comparing the statistics of the generated and simulated maps. \subsection{Qualitative comparison} \label{sec:vis_insp} While the appearance of the maps is irrelevant for the purpose of our statistical analysis, a visual inspection is nonetheless useful to intuitively understand whether our model is on the right track to learn the $N$-body features. In Fig.~\ref{fig:vis_insp}, we show a lognormal map, its $N$-body counterpart and the prediction of our model given the lognormal map for the high-resolution case. Our goal is not to obtain an exact visual match between the model's prediction and the $N$-body map, given that we used the random phases of the $z=127$ simulations, which only have partial correlations with the $z=0$ slices. For the applications we focus on (discussed in Sect.~\ref{sec:conclusions}), the actual position of peaks and voids in the lognormal map is irrelevant, since it is dictated by the random sampling of the phases: we only aim to generate maps which carry the same statistical signal as the $N$-body maps on average, improving on the lognormal approximation. We observe that while the predicted field does not match the $N$-body pattern pixel by pixel, the model has learnt the correct morphology of the large-scale structure on top of the lognormal field. \subsection{Statistics} \label{sec:statistics} While visual inspection of the generated maps against the target ones is a necessary zeroth-order test to provide intuition on whether the model was adequately trained, it is then fundamental to compare the summary statistics of interests and carefully quantify their agreement. We compare the generated and simulated fields through four different summary statistics, which we briefly describe here. \subsubsection{Pixel counts} The first test consists of binning the pixels of the generated and target density fields into a histogram. While the lognormal distribution is a good approximation of the simulated fields, there is a significant difference between the two, especially at the tails of the density values (see e.g.\ Fig.~\ref{fig:histo_with_density}). We show in panel (a) of Fig.~\ref{fig:512_z0} and Fig.~\ref{fig:128_z0} the performance of our model with respect to the pixel counts for high and low resolution, respectively. \subsubsection{Power spectrum} \label{subsec:ps} We compare the power spectrum as defined in Eq.~(\ref{eq:ps}) for the simulated maps and the ones predicted by our model given the lognormal maps. While it could be argued that this is a trivial task (given that the input and output maps have the same power spectrum by construction), it is not obvious that our model does not modify the power spectrum information while learning the new density distribution, and as anticipated at the end of Sect.~\ref{sec:iti_translation} we actually found some failures of the trained model which yield discrepant power spectra in the high-resolution case. We therefore the power spectra and show the results in panel (b) of Fig.~\ref{fig:512_z0} and Fig.~\ref{fig:128_z0}, for high and low resolution, respectively. \subsubsection{Bispectrum} To probe the non-Gaussian features of the density fields, we measure the matter bispectrum of the maps, i.e.\ the counterpart of the three-point matter correlation function in Fourier space. The matter bispectrum $B(k_1, k_2, k_3)$ for a 2-D field is defined implicitly as (see e.g.\ \citealp{Sefusatti06}): \begin{equation} \langle \delta(\mathbf{k}_1) \delta(\mathbf{k}_2) \delta(\mathbf{k}_3) \rangle= (2\pi)^2 \delta_{\mathrm{D}}(\mathbf{k}_1+\mathbf{k}_2+\mathbf{k}_3) B(k_1, k_2, k_3) \ , \end{equation} where $\delta(\mathbf{k})$ indicates the Fourier transform of the matter overdensity $\delta(\mathbf{x})$, $k_i = |\mathbf{k}_i|$, and all $\mathbf{k}_i$ vectors are in the plane of the simulation box slices. To further assess that our model correctly captured the information beyond the power spectrum, we also measure the reduced matter bispectrum $Q(k_1, k_2, k_3)$, see e.g.\ \citet{Liguori10}, defined as: \begin{equation} Q(k_1, k_2, k_3) = \frac{B(k_1, k_2, k_3)}{P(k_1)P(k_2)+P(k_1)P(k_3)+P(k_2)P(k_3)} \ . \end{equation} We measure bispectra and reduced bispectra for different configurations depending on the resolution; different triangle configurations usually probe different inflationary models \citep{Liguori10}, and one must include as many configurations as possible to break degeneracies when inferring cosmological parameters \citep{Berge10}. Moreover, different bispectra configurations can shed light on the size of collapsing regions, as well as on the relative position of clusters and voids in the large-scale structure \citep{Munshi20}. We calculate bispectra and reduced bispectra based on an estimator of the binned bispectrum (see e.g.\ \citealp{Bucher16}); we consider the centroid of each bin as the value of $\mathbf{k}$ at which the bispectrum is evaluated. We report the results in panels (d)--(g) of Fig.~\ref{fig:512_z0} and Fig.~\ref{fig:128_z0} (for high and low resolution, respectively) as a function of the angle $\theta$ between the vectors $\mathbf{k}_1$ and $\mathbf{k}_2$. \subsubsection{Peak counts} To further assess whether the model has correctly learnt the most non-Gaussian features of the simulated density fields, we verify that the peak counts of the generated and target maps match within the error bars. A peak is defined as a density pixel which is higher than the 8 surrounding pixels. Peak count statistics have been shown to carry significant cosmological information, especially in weak lensing studies, as they trace the most dense regions \citep{Pires09, Pires12, Dietrich10, Marian11, Mainini14, Lin15a, Lin15b, Lin16c, Kacprzak16, Shan18, Martinet18, Harnois21}. We bin the peak values for both the simulated and target maps, and compare them in panel (c) of Fig.~\ref{fig:512_z0} and Fig.~\ref{fig:128_z0}, for high and low resolution, respectively. \subsection{High resolution} \label{sec:highres} In Fig.~\ref{fig:512_z0} we compare the performance of the predictions of our model against the target maps, for the case with $512^2$ pixels. We run the statistical tests on 30 maps sampled from the test set as described at the end of Sect.~\ref{sec:iti_translation}; the solid lines show the mean values and the dashed areas represent the error on the mean. In panel (b), we show that the trained model is capable of preserving the correct power spectrum on all scales from 0.025 $h \ \rm{Mpc}^{-1}$ to 1 $h \ \rm{Mpc}^{-1}$, with percentage differences going no higher than 5\%, and always within the error bars. At the same time, the model correctly improves on the lognormal approximation as far as the peak counts and pixel counts are concerned, with significant differences for $-1 < \delta < 0$ in the latter case only. We believe that the performance in this case could be ameliorated by e.g.\ exploring different network architectures. In panels (d)-(g), we show the results for the (reduced) bispectrum, for $k_1=0.4 \ h \ \rm{Mpc}^{-1}$, $k_2=0.6 \ h \ \rm{Mpc}^{-1}$ --- panels (d) and (e) --- and for $k_1=0.4 \ h \ \rm{Mpc}^{-1}$, $k_2=0.4 \ h \ \rm{Mpc}^{-1}$ --- panels (f) and (g). The performance is very good overall, with the percentage difference between target and predicted maps being within the error bars except for a few individual values of $\theta$, significantly improving on the lognormal approximation. \subsection{Low resolution} \label{sec:lowres} In Fig.~\ref{fig:128_z0} we compare the performance of the predictions of our model against the target maps, for the case with $128^2$ pixels. In this case, we use 100 randomly-sampled maps from the test set. We observe good agreement between predicted and target maps for the pixel counts, power spectrum and peak counts statistics, with the power spectrum in particular being almost always within 2\%. As far as the bispectra are concerned, we consider two configurations, one with $k_1=0.1 \ h \ \rm{Mpc}^{-1}$, $k_2=0.3 \ h \ \rm{Mpc}^{-1}$ --- panels (d) and (e) --- and for $k_1=0.2 \ h \ \rm{Mpc}^{-1}$, $k_2=0.2 \ h \ \rm{Mpc}^{-1}$ --- panels (f) and (g). Since the fields have a lower resolution, the scales we probe are larger than in Sect.~\ref{sec:highres}. We observe a good agreement overall, except at high $\theta$: we argue that to improve the performance of the model we could use the same ranking approach based on the power spectrum as in the high-resolution case. \subsection{Redshift and cosmology dependence} \label{sec:zc_dep} So far, we have shown the performance of our model on a given fiducial set of cosmological parameters and redshift, from which the training data were obtained. However, in order for the method to become practical, it is critical to assess whether the performance degrades when the model is tested on lognormal maps obtained with a different cosmology or at different $z$. Examples of good generalisation properties of machine learning models applied to cosmological problems include \citet{He19, Kaushal21, Shao22}. We checked that the performance of our model does not degrade much when acting on fields with slightly different (within 2\%) values of $\Omega_{\rm{m}}$ and $\sigma_8$, even though a more complete analysis on bigger variations is required. We additionally verified that feeding our model, trained using maps at $z=0$, with lognormal maps at $z=0.5$ or $z=1.0$ does not yield satisfactory results, with percentage errors going well above 50\%. This failure is not unexpected: the different dynamic range of the lognormal maps at different redshifts highlights that our model is not capable of extrapolating to such different input values. To overcome these limitations, one possible solution is to normalise the maps, either after or before training the model. For instance, one could rescale the field at $z=1$ through the linear growth factor \citep{Eisenstein99} to $z=0$, and then invert this transformation after feeding the map through the generator trained as above. However, this approach would ignore the non-linear scales, and directly dividing each pixel value by the linear growth factor could lead to unphysical fields with $\delta<-1$. Alternatively, instead of the dark matter overdensity field, we could consider the corresponding peak height field, calculated by measuring for each pixel $1.686/\sigma(M)$, where $\sigma(M)$ is the mass enclosed within a given scale; since the peak height is known to extrapolate better, having a weaker dependence on cosmological parameters \citep{Press74, Bond91, Percival05, Kravtsov12}, we expect a model trained on this field to have an improved generalisation performance. Moreover, we can actually show that with our current setup we can successfully train a second model on data generated as described in Sect.~\ref{sec:training_data} with $z \neq 0$. We show the results for a model trained on fields at $z=1$, which have a lower contrast and less non-linearity than $z=0$, in Fig.~\ref{fig:128_z1} for the low-resolution case, with good performance overall. We also expect that it would be possible to train a conditional model by providing the redshift or cosmology `label' together with the input lognormal map, thus obtaining a conditional WGAN-GP \citep[see e.g.][]{Mirza14, Yiu21}; such a model could be trained e.g.\ on maps with $z=0$ and $z=1$, and then used to predict maps at $z=0.5$, similarly to \citet{Chen20}. All these points indicate that it will be possible to make our model conditional on $z$ and different cosmological parameter; we defer these studies to future work. \section{Conclusions} \label{sec:conclusions} In this paper, we employed the Quijote simulations as a starting point to train a machine learning model that is capable of transforming projected lognormal realisations of the dark matter density field to more realistic samples of the dark matter distribution. We employed state-of-the-art image-to-image translation techniques, combining convolutional neural networks and adversarial training, to learn such a model, and extensively validated its performance through a thorough set of statistical tests. We observed a significant reduction in the error of non-Gaussian features like peak counts and bispectra, from tens of percent for the pure lognormal model to no more than 10\% obtained by our model in most cases; the latter frequently shows an order of magnitude improvement over the former. Furthermore, the mapping is extremely fast, taking $\mathcal{O}(1 \ s)$. We mainly focused on a fiducial cosmology and a single redshift value; however, in order to avoid running large suites of $N$-body simulations, the proposed method has to generalise well to other redshifts and cosmologies. We verified that there is room for improvement when applying our model to different redshift values and significant variations in the cosmological parameters, and we outlined a few promising avenues to investigate in order to overcome these issues. While in this work we trained different models for different resolutions of the density field, we also expect an improved model to be able to deal with a varying slice thickness. We plan to extend this work to random fields on the sphere, and integrate it into the \textsc{FLASK} package developed in \citet{Xavier16}. We aim to extend our approach to spherical random fields by iteratively applying our model to square patches of the sky, thus providing the community with a tool to quickly generate realistic dark matter realisations that overcome the limitations of the lognormal approximation. We also plan to compare our approach to a direct generation of spherical fields by means of spherical convolutional layers, as proposed e.g.\ for mass maps in \citet{Yiu21}. Additionally, we believe that the procedure outlined in this paper could be applied to augment analytical approximations to $N$-body simulations (like L-PICOLA, \citealp{Howlett15}, or FastPM, \citealp{Feng16}), as well as semi-analytical models of galaxies, which, in the same vein as lognormal random fields, provide a fast approximation to hydrodynamical simulations by modelling complicated baryonic processes \citep{White91, Kauffmann93, Cole94, Somerville99, Lacey01}. We further plan to explore the possibility to employ the dataset described in this work to reduce the variance in the statistics of large-scale structure observables using a small number of expensive simulations \citep{Chartier20, Chartier21, Ding22}, as well as to replace our WGAN-GP model with either a possibly more stable GAN version \citep{Kwon21}, or with a more compact model, like the one proposed in the context of Lagrangian deep learning (LDL, \citealp{Dai21}), using graph neural networks (GNNs, see e.g.\ \citealp{Zhou18} for a review) or through normalising flows (e.g.\ FFJORD, \citealp{Grathwohl18}, or more recently TRENF, \citealp{Dai22}). This will be investigated in future work. \section*{Acknowledgements} We thank Ofer Lahav, Shirley Ho, John Shawe-Taylor and Ilya Feige for useful discussion and feedback on this work. DP thanks William Coulton and Susan Pyne for their help with the bispectrum estimation. DP was supported by the STFC UCL Centre for Doctoral Training in Data Intensive Science. This work has been partially enabled by funding from the UCL Cosmoparticle Initiative. We acknowledge the use of $\textsc{NumPy}$ \citep{Harris20}, $\textsc{Matplotlib}$ \citep{Hunter07}, $\textsc{TensorFlow}$ \citep{Abadi15}, and $\textsc{NN-SVG}$ \citep{LeNail19}. \section*{Data Availability} The original data underlying this article (i.e.\ the Quijote simulations) are available through the \textit{globus} server, as detailed in the documentation \href{https://quijote-simulations.readthedocs.io/en/latest/data.html#data-access}{at this link}. The byproduct data obtained for this work will be shared on reasonable request to the corresponding author. The code to reproduce this work will be shared upon acceptance of the paper \href{https://github.com/dpiras/better_than_lognormal}{\faicon{github}}. \bibliographystyle{mnras}
\section{Introduction} \label{sec1} In modern statistics and computing practices, there exists a common bottleneck that complex data with unprecedented size cannot fit into memory nor be analyzed in a limited time on a single machine. One popular solution is distributed statistical learning which works by distributing the learning task to different machines and combining the estimates afterward \citep{boyd2011distributed,zhang2012communication, lee2017communication}. According to the way of partitioning the dataset, we call it \emph{observation-distributed} or \emph{feature-distributed}. Substantial progress has been made on the former type that partitions samples into subsets and then fits the same model using each subset with the same feature space in different machines. Most of the literature focuses on the massive linear or generalized linear models \citep{chen2014split, battey2015distributed, zhang2015divide, zeng2015random, tang2016method, zhao2016partially, he2016sparse, lee2017communication, shi2018massive}. For nonparametric inference, the existing studies include a partial linear model \citep{zhao2016partially} and nonparametric regression model \citep{zhang2013divide}. However, to the best of our knowledge, the feature-distributed statistical learning method, especially for high dimensional nonparametric regression, still remains to be developed. In this paper, we propose a \emph{feature-distributed} algorithm for sparse additive model with potentially massive number of covariates ($p\gg n$). This problem can be formulated as follows: we are given $n$ observations with response $y_i \in R$ and covariates $\{x_{i1},\cdots,x_{ip}\} \in R^p$ for $i=1,\cdots, n$. The goal is to fit the additive model \citep{stone1985additive} \begin{equation} \label{1} y_i=\sum_{j=1}^{p} f_j(x_{ij})+\varepsilon_i, \end{equation} where the number of covariates $p$ can grow much faster than the sample size $n$ with $\log(p)=n^{v}$ for some $v\in (0,1)$. What makes the high dimensional inference possible is the sparsity assumption where only a small subset of $\{f_j, j=1,\cdots,p\}$ are nonzero functions. Many sparsity-promoted estimators have been proposed for (\ref{1}) \citep{aerts2002some, ravikumar2009sparse, meier2009high, koltchinskii2010sparsity, huang2010variable, raskutti2012minimax, yuan2016minimax, petersen2016fused, sadhanala2017additive}. Since sparse additive models (SpAM) are essentially a functional version of the group-lasso, \cite{ravikumar2009sparse} borrowed ideas from the sparse linear model and proposed a corresponding algorithm for solving the problem \begin{equation*} \min_{\beta_j\in R^{d_n}, j=1,\cdots, p}\frac{1}{2n}\left\| Y-\sum_{j=1}^{p} \Psi_j\beta_j \right\|_2^2 +\lambda\sum_{j=1}^{p}\sqrt{\frac{1}{n} \beta_j^{{ \mathrm{\scriptscriptstyle T} }}\Psi_j^{{ \mathrm{\scriptscriptstyle T} }}\Psi_j\beta_j}. \end{equation*} where $\beta_j=(\beta_{j1}, \cdots, \beta_{jd_n})^{{ \mathrm{\scriptscriptstyle T} }}$ is a length-$d_n$ vector of coefficients, and $\Psi_j=(\psi_{j1},\cdots, \psi_{jd_n})$ is an $n\times d_n$ matrix of the truncated set of orthogonal basis functions for $f_j$ evaluated at the training data. Minimax optimal rates of convergence were established in \cite{raskutti2012minimax} and \cite{yuan2016minimax}. Other extensions of the high dimensional additive model have been proposed by \cite{lou2016sparse, sadhanala2017additive, petersen2019data} and \cite{ Haris2019Generalized}. Considering datasets of massive dimensions that the computational complexity or memory requirements cannot fit into one single computer, the aforementioned frameworks for additive models are not directly applicable. A distributed solution and the decentralized storage of datasets are necessary. Most works on distributed statistical inference assume that the data is partitioned by observations, because of the good theoretical properties of the averaged estimators. However, under the high-dimensional additive model, the spline basis functions are constructed from the whole sample. Besides, each component is represented by a group of basis functions which results in a much higher dimension of the design matrix than the number of observations. It is thus desirable to seek feature-distributed algorithms. But feature-distributed studies are scarce, partially due to the fact that the feature distribution process which ignores the correlation between covariates could lead to incorrect inference. Indeed, dividing feature space directly usually leads to misspecified models and ineradicable bias. Next, we review several works on feature distributed methods. Inspired by \emph{group testing}, \cite{zhou2014parallel} proposed a \emph{parallelizable feature selection} algorithm. They randomly sectionalized features repeatedly for tests and then ranked the features by the test scores. This attempt can boost efficiency but its success heavily depends on the correlation structure of covariates. \cite{song2015split} proposed a Bayesian variable selection approach for ultrahigh dimensional linear regression models based on splitting feature set into lower-dimensional subsets and screening relevant variables respectively with the marginal inclusion probability for final aggregation. Similar treatments can be found in the \cite{yang2016feature}, although in the final stage they utilized the \emph{sketch} approach for further selection. The efficiency of this kind of algorithms will again be highly affected by the correlation structure among features. Thus the identifiability condition for controlling the degree of multicollinearity is necessary. Based on those key facts, \cite{wang2016decorrelated} relaxed the correlation requirements by preprocessing the data with a \textsl{decorrelation} operator (DECO) to lower the correlation in feature space under the linear regression model. In a related work, this decorrelation operator was proposed to satisfy the irrepresentable condition for \textsl{lasso} \citep{jia2015preconditioning}. With DECO, we can get consistent estimates of coefficients with misspecified submodels. In this work, we consider decorrelating covariates and propose the feature-distributed algorithm DDAC-SpAM under the high-dimensional additive model. That is, we first divide the whole dataset by predictors, i.e. each local machine operates on only $p_i$ variables. Then local machines approximate each component in additive models with a truncated set of B-spline basis. After decorrelating the design matrix of the B-spline basis with the central machine, local machines can in parallel conduct group lasso fit efficiently. Finally, the central machine combines the discovered important predictors and refines the estimates. Our work can be regarded as a functional extension of the DECO procedure proposed by \cite{wang2016decorrelated}. The rest of this article is organized as follows. In Section \ref{sec2} we reviewed the sparse additive model problem. In Section \ref{sec3}, we introduce the distributed feature selection procedure for the additive models after decorrelation. We present the \emph{sparsistency} property (i.e. sparsity pattern consistency) \citep{ravikumar2009sparse} of our algorithm in Section \ref{sec4}. Our simulations and a real data analysis are presented in Section \ref{sec5} and \ref{sec6}, showing the efficiency of our method. We conclude with a discussion in Section \ref{sec7}. All the technical details are relegated to the Appendix and supplementary material. Some standard notation used throughout this paper is collected here. For number $a$, $\lceil a\rceil$ represent the smallest integer larger than or equal to $a$. For a square matrix $A$, let $\lambda_{\textrm{min}}(A)$ and $\lambda_{\textrm{max}}(A)$ denote the minimum and maximum eigenvalues and we use the norms $\|A\|=\sqrt{\lambda_\textrm{max}(A^{{ \mathrm{\scriptscriptstyle T} }} A)}$ and $\|A\|_{\infty}=\max_{i}\sum_{j=1}^{n}|A_{ij}|$. For vector $v=(v_1,\cdots,v_k)^{{ \mathrm{\scriptscriptstyle T} }}$, we use the norms $\|v\|=\sqrt{\sum_{j=1}^{k}v_j^2}$ and $\|v\|_\infty=\max_{j}|v_j|$. \section{Sparse Additive Model} \label{sec2} Given a random sample $\{(x_{i1}, \cdots, x_{ip}), y_i\}_{i=1}^n$, with $x_{ij}\in [0,1]$, we consider the nonparametric additive model \begin{align*} y_i=\sum_{j=1}^{p} f_j(x_{ij})+\varepsilon_i, \end{align*} where the error $\varepsilon_i \stackrel{i.i.d.}{\sim} N(0,\sigma^2)$, $i=1,\cdots,n$. Let $\varepsilon=(\varepsilon_1,\cdots,\varepsilon_n)^{{ \mathrm{\scriptscriptstyle T} }}$. $X=(X_1,\cdots,X_p)$ is the $n\times p$ design matrix and $Y=(y_1,\cdots,y_n)^{{ \mathrm{\scriptscriptstyle T} }}$ is the response vector. To ensure identifiability of the $\{f_j$, $j=1,\cdots,p\}$, we assume $E f_j=0$. For function $f_j$, let $\{\psi_{jk}, k=0,1,\cdots \}$ denote the uniformly bounded basis functions with respect to Lebesgue measure on $[0,1]$. Following \cite{ravikumar2009sparse}, we assume the following smoothness condition. \begin{condition}\label{C.1} For $j=1,\cdots, p$, $f_j\in \mathcal{T}_j$ where \begin{gather*} \mathcal{T}_j=\left\{f_j\in\mathcal{H}_j: f_j(x)=\sum_{k=0}^{\infty}\beta_{jk}\psi_{jk}(x),\sum_{k=0}^{\infty}\beta_{jk}^2k^4 \leq C^2\right\} \end{gather*} for some $0<C<\infty$, where $\mathcal{H}_j$ is a Hilbert space of square integrable functions with the inner product $\langle f_j,f'_j\rangle=E f_jf'_j$ and $\|f_j\|^2=E f_j^2<\infty$ and $\sup_x|\psi_{jk}(x)|\leq B$ for some $B$. $\{\beta_{jk}$, $k=0,1,\cdots\}$ are the parameters corresponding to $f_j$. \end{condition} The standard form of the penalized additive model optimization problem is \begin{align} \min_{f_1\in \mathcal{T}_1,\cdots, f_p\in \mathcal{T}_p} \sum_{i=1}^{n}\left\{y_i-\sum_{j=1}^{p}f_j(x_{ij})\right\}^2+J(f_{1},\cdots,f_{p}). \label{optmize1} \end{align} where $J$ is a sparsity-smoothness penalty. In this paper, we restrict our discussion to the sparsity-inducing penalty \begin{align*} J(f_{1},\cdots,f_{p})=\lambda_n\sum_{j=1}^{p}\sqrt{ \sum_{i=1}^n f_{j}^2(x_{ij})}. \end{align*} According to \cite{meier2009high}, we approximate $\{f_j$, $j=1,\cdots, p\}$ by a cubic B-spline with a proper number of knots. The usual choice would be to place $d_n-4\asymp \lceil n^{1/5}\rceil $ interior knots at the empirical quantile of $X_j$, i.e., \begin{align*} f_j(x)\approx{f}_{nj}(x)=\sum_{k=1}^{d_n}\beta_{jk}\psi_{jk}(x). \end{align*} With Condition \ref{C.1}, we can bound the truncation bias by $\|f_j-f_{nj}\|^2=O(1/d_n^4)$. Let $h=\sum_{j=1}^pf_{j}$ and $h_{n}=\sum_{j=1}^pf_{nj}$. Let $S=\{j: f_j\neq 0\}$. Assuming the sparsity condition $s=|S|=O(1)$, it follows that $\|h-h_{n}\|^2=O(1/d_n^4)$. Let $\Psi_j$ denote the $n\times d_n$ matrix with $\Psi_j(i,l)=\psi_{jl}(x_{ij})$. It is the block of B-spline basis for $f_j$. Then the optimization problem (\ref{optmize1}) can be reformulated as \begin{align} \label{SpAM} \min_{\beta_1,\cdots,\beta_p}\left\|Y-\sum_{j=1}^{p}\Psi_j\beta_j\right\|^2+ \lambda\sum_{j=1}^{p}\frac{1}{\sqrt{n}}\|\Psi_j\beta_j\|. \end{align} This group-wise variable selection problem can be solved with the standardized group lasso \citep{simon2012standardization} technique. The algorithm for standardized group lasso can be regarded as a special group lasso procedure after orthogonalization within each group, in which group lasso is computationally more intensive than lasso \citep{tibshirani1996regression}. Since its solution paths are not piecewise linear, the least angle regression (LARS) algorithm \citep{efron2004least} is not applicable. Instead, the block coordinate-wise descent-type algorithms \citep{hastie1990generalized, meier2008group, foygel2010exact, wood2011fast, yang2015fast} are common approaches. Computational complexity is somewhat tricky to quantify since it depends greatly on the number of iterations. Since each spline block costs $O(nd_n)$ operations, $O(npd_n)$ calculations are required for entire data in one pass. The number of back-fitting loops required for convergence is usually related to $p$. As for the noniterative components, orthogonalization within each block can be solved by QR decomposition which costs $O(npd_n^2)$ operations. Besides, compared with linear regression, memory footprint increases with the expanded spline basis functions $\Psi_j$ taking place of original $X_j$. All these manifest that we need distributed learning to relieve stress from computation time and memory cost. Before introducing our method, some additional notation is needed. Let $\Psi=(\Psi_1,\cdots,\Psi_p)$ denote $n\times pd_n$ design matrix of the B-spline bases and $\beta=(\beta_1^{{ \mathrm{\scriptscriptstyle T} }},\beta_2^{{ \mathrm{\scriptscriptstyle T} }},\cdots,\beta_p^{{ \mathrm{\scriptscriptstyle T} }})^{{ \mathrm{\scriptscriptstyle T} }}$ be the length-$pd_n$ coefficient vector. If $A\subset\{1,\cdots,p\}$, we denote the $n\times d_n|A|$ submatrix of $\Psi$ by $\Psi_A$ where for each $j\in A$, $\Psi_j$ appears as a submatrix in the corresponding order. Correspondingly, $\beta_A$ is the coefficients of $\Psi_A$. For parallel computing, assume $X$ has been column-wisely partitioned into $m$ parts. If $X_j$ is assigned to the $i$th group and it is the $k$th predictor in group $i$, we denote it by $X_k^{(i)}$. Its original index $j$ is one-to-one mapped to $k^{(i)}$. We denote the $i$th part of $X$ by $X^{(i)}=(X^{(i)}_{1},X^{(i)}_{2},\cdots,X^{(i)}_{p_i})$ which are stored in local machine $i$, $i=1,\cdots,m$ and its spline basis matrix is denoted by $\Psi^{(i)}$. Excluding $\Psi^{(i)}$, we denote the remaining submatrix of $\Psi$ by $\Psi^{(-i)}$. Let $S^{(i)}$ denote the true set of important variables in the $i$th group, i.e., $S^{(i)}=\{j^{(i)}: f_j^{(i)}\neq 0\}$, with $s_i=|S^{(i)}|$, and let $S^{c(i)}=\{j^{(i)}: f_j^{(i)}\equiv 0\}$ denote its complement. Thus, $S$ is the union of $S^{(i)}$, $i=1,\cdots,m$, and $S^c$ denotes its complement. $\Psi^{(i)}_S$ is the submatrix of $\Psi^{(i)}$ consisting of spline basis of important predictors in the $i$th group and $\Psi^{(i)}_{S^c}$ is the basis matrix for the noise predictors. \section{DDAC-SpAM Algorithm} \label{sec3} Since $X$ has already been column-wisely partitioned, each local machine stores one subset of the predictors and $Y$. Before the parallel variable selection, let us begin with a decorrelation step for the additive model. Reformulated as the linear combination of basis functions, we have \begin{gather} Y=\Psi\beta +Z+\varepsilon. \label{equation} \end{gather} where $Z=(z_1,\cdots,z_n)^{{ \mathrm{\scriptscriptstyle T} }}$ with $z_i=\sum_{j=1}^pf_{j}(x_{ij})-f_{nj}(x_{ij})$, $i=1,\cdots,n$. The most intuitive way to reduce correlation is orthogonalizing the basis matrix $\Psi$ to make its columns uncorrelated by left-multiplication. If $\Psi$ has full column rank with $n > p d_n$, we write $\Psi$ via singular value decomposition as $\Psi=UDV^{{ \mathrm{\scriptscriptstyle T} }}$, where $U$ is a $n\times pd_n$ tall matrix with orthonormal columns, $D$ is a $pd_n\times pd_n$ diagonal matrix and $V$ is a $pd_n\times pd_n$ orthogonal matrix. Then, we set $\widetilde{\Psi}=F\Psi$. Here, $F=UD^{-1}U^{{ \mathrm{\scriptscriptstyle T} }}$. It is easy to see that the columns of $\tilde{\Psi}$ are orthogonal. Actually, $F$ can be calculated in the central machine by \begin{align*} \left(\sum_{i=1}^{m}\Psi^{(i)}\Psi^{(i){ \mathrm{\scriptscriptstyle T} }}\right)^{\frac{+}{2}}, \end{align*} where the $n\times n$ matrix $\Psi^{(i)}\Psi^{(i){ \mathrm{\scriptscriptstyle T} }}$ is transmitted from local machine and $A^{+}$ denotes the Penrose-Moore pseudo-inverse of $A$. Left multiplying $F$ on both sides of (\ref{equation}), we get \begin{align*} FY=F\Psi\beta +FZ+F\varepsilon. \end{align*} It can be denoted as \begin{align} \label{tildey} \widetilde{Y}=\widetilde{\Psi}\beta +\widetilde{Z}+\widetilde{\varepsilon}. \end{align} The spline basis matrix $\widetilde{\Psi}$ satisfies $\widetilde{\Psi}_{i}^{{ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_{j}=0$ for any $i\neq j$ and $\widetilde{\Psi}_{i}^{{ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_{i}=I_{d_n}$. The group lasso working mechanism for the $i$th data subgroup $\left\{\widetilde{Y}, \widetilde{\Psi}^{(i)}\right\}$ can be shown as follow. Firstly, the optimization object (\ref{SpAM}) would be \begin{gather} \label{subgroup} L(\beta^{(i)})=\left\|\widetilde{Y}-\sum_{j=1}^{p_i}\widetilde{\Psi}_j^{(i)}\beta_j^{(i)} \right\|^2+\lambda_n\sum_{j=1}^{p_i}\frac{1}{\sqrt{n}}\|\widetilde{\Psi}_j^{(i)}\beta_j^{(i)}\|. \end{gather} As shown in \cite{yuan2006model} and \cite{ravikumar2009sparse}, a solution to (\ref{subgroup}) satisfies \begin{align*} \hat{\beta}_k^{(i)}=\left[1-\frac{\lambda_n}{\|P_k^{(i)}\|} \right]_{+}P_k^{(i)}, \end{align*} where $P_k^{(i)}=\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{Y}$. Combining with (\ref{tildey}), we can derive that \begin{align} P_k^{(i)}&=\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }} \left(\widetilde{\Psi}^{(i)}_k \beta^{(i)}_k+\widetilde{\Psi}^{(i)}_{-k}\beta^{(i)}_{-k}+ \widetilde{\Psi}^{(-i)}\beta^{(-i)} +\widetilde{Z}+\widetilde{\varepsilon} \right) \notag \\ &=\beta^{(i)}_k+\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}^{(i)}_{-k}\beta^{(i)}_{-k}+\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}^{(-i)}\beta^{(-i)} +\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{Z} +\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\varepsilon}\notag \\ &=\beta^{(i)}_k+\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{Z} +\widetilde{\Psi}_{k}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\varepsilon} \label{transform} \end{align} where $\widetilde{\Psi}^{(i)}_{-k}=(\widetilde{\Psi}^{(i)}_1,\cdots,\widetilde{\Psi}^{(i)}_{k-1},\widetilde{\Psi}^{(i)}_{k+1},\cdots,\widetilde{\Psi}^{(i)}_{p_i} )$ and $\beta^{(i)}_{-k}=(\beta^{(i){ \mathrm{\scriptscriptstyle T} }}_1$,$\cdots$,$\beta^{(i){ \mathrm{\scriptscriptstyle T} }}_{k-1}$,$\beta^{(i){ \mathrm{\scriptscriptstyle T} }}_{k+1}$,$\cdots$, $\beta^{(i){ \mathrm{\scriptscriptstyle T} }}_{p_i} )^{{ \mathrm{\scriptscriptstyle T} }}$. Since the last two terms of (\ref{transform}) can be bounded by Condition \ref{C.1}, with a mild condition for $\Psi\Psi^{{ \mathrm{\scriptscriptstyle T} }}$ to be presented in Section 4, $P_{k}^{(i)}$ converges to $\beta_k^{(i)}$ almost at the same rate as that with the full data. When $pd_n\geq n$, SVD of $\Psi$ generates a $n\times n$ orthogonal matrix $U$, a $pd_n\times n$ matrix $V$ with only orthonormal columns and $D$ is a $n\times n$ diagonal matrix. Then $F$ becomes $(\sum_{i=1}^{m}\Psi^{(i)}\Psi^{(i){ \mathrm{\scriptscriptstyle T} }})^{-\frac{1}{2}} $. Although the columns of $\widetilde{\Psi}$ are not exactly mutually orthogonal, i.e., for some $i\neq j$, $\widetilde{\Psi}_{i}^{{ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_{j}\neq 0$, according to \cite{khatri1965some}, we have $ E(\widetilde{\Psi}^{{ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi})=(n/pd_n)I_{pd_n}, $ which means that any two columns of $\widetilde{\Psi}$ are orthogonal in expectation. Thus, we can still take the same decorrelation step to get a new response $\widetilde{Y}$ and the design matrix $\widetilde{\Psi}$. The decorrelation operation mainly aims to lower the correlation between the basis functions in different blocks. To show it visually, we take a simple example with $n< pd_n$. We sample $X$ from zero mean normal distribution with covariance matrix $\Sigma = [\sigma_{ij}]$, where $\sigma_{ii}=1$, $\sigma_{ij}=\rho$ with $i\neq j$ and $(n,p)=(500,1000)$. A cubic B-spline with $d_n=5$ is used. We focus on comparing $\|n^{-1}\widetilde{\Psi}^{{ \mathrm{\scriptscriptstyle T} }}_i\widetilde{\Psi}_j\|$ and $\|n^{-1}\Psi^{{ \mathrm{\scriptscriptstyle T} }}_i \Psi_j\|$, $1\leq i<j\leq p$. The difference between these two terms is affected by the dependence between basis functions of different covariates. We call them quasi-correlation here. Figure \ref{Fig1} shows the boxplots of quasi-correlation before and after the decorrelation step when $\rho$ increases. It can be seen that while $\|n^{-1}\Psi^{{ \mathrm{\scriptscriptstyle T} }}_i \Psi_j\|$ increases with $\rho$, $\|n^{-1}\widetilde{\Psi}^{{ \mathrm{\scriptscriptstyle T} }}_i\widetilde{\Psi}_j\|$ is stable throughout the range of $\rho$, which means the decorrelation step reduces correlation between additive components in high-dimensional additive model significantly. \begin{figure} \begin{center} \includegraphics[width=10cm]{ggplot20.pdf} \end{center} \caption{Comparison between $\Psi$ and $\widetilde{\Psi}$. \label{Fig1}} \end{figure} After the decorrelation step, since $\{\widetilde{\Psi}_j^{(i)}, j=1,\cdots,p_i\}$ is not exactly column-orthogonal, we cannot apply the SpAM backfitting algorithm \citep{ravikumar2009sparse} directly with $\left\{\widetilde{Y}, \widetilde{\Psi}^{(i)}\right\}$ on the $i$th local machine. Following \cite{simon2012standardization}, we use a similar method as the standardized Group Lasso to solve this problem. Specifically, we apply QR decomposition for each block $\widetilde{\Psi}^{(i)}_j$, $i=1,\ldots, m$, $j=1,\ldots, p_i$ into the product of an orthogonal matrix $\widetilde{Q}^{(i)}_j$ and an upper triangular matrix $\widetilde{R}^{(i)}_j$. Then, the $i$th local machine runs the SpAM backfitting algorithm with $\left\{\widetilde{Y}, \widetilde{Q}^{(i)}\right\}$ to solve the following problem \begin{align} \label{thetasolve} \hat{\theta}^{(i)}=\mathop{\arg\min}_{\theta^{(i)}=(\theta_1^{(i){ \mathrm{\scriptscriptstyle T} }},\cdots,\theta_{p_i}^{(i){ \mathrm{\scriptscriptstyle T} }})^{{ \mathrm{\scriptscriptstyle T} }} }\frac{1}{n}\|\widetilde{Y}-\widetilde{Q}^{(i)}\theta^{(i)}\|^2+\lambda_n\sum_{j=1}^{p_i}\|\widetilde{Q}^{(i)}_j\theta^{(i)}_j\|, \quad i=1,\cdots,m \end{align} and select variables, where $\widetilde{Q}^{(i)}=(\widetilde{Q}^{(i)}_1,\ldots,\widetilde{Q}^{(i)}_{p_i})$. Although we can back-solve the original coordinates $\hat{\beta}^{(i)}$ by $\hat{\beta}^{(i)}_j=(\widetilde{R}_j^{(i)})^{-1}\hat{\theta}_j^{(i)}$, this is unnecessary since $\hat{\theta}^{(i)}_j=0$ implies $\hat{\beta}^{(i)}_j=0$. The local machines only need to transfer the selected important variables and their basis functions to the central machine. The final estimator of $\hat{\beta}^{(i)}$ and $f_j(X_j)$ will be computed on the central machine. Let $\hat{S}^{(i)}=\{j^{(i)}: \hat{\theta}_j^{(i)}\neq 0\}$ denote the $i$th estimated set of important variables, for $i=1,\cdots,m$, and $\hat{S}$ be their union. The details of DDAC-SpAM are provided in Algorithm \ref{algo}. \begin{algorithm}[t] \caption{Divide, decorrelate and conquer SpAM (DDAC-SpAM)} \label{algo} \KwIn{$Y$, $X$, $d_n$, the number of machines $m$, the ridge regularization parameter $r$.} On the central machine, store and standardize $Y$ to get $\underline{Y}$\; Randomly divide predictors into $m$ portions: $X^{(1)}$, $\cdots$, $X^{(m)}$ and allocate $(\underline{Y},X^{(i)})$ to the $i$th local machine for $i=1,\cdots, m$\; On the $i$th local machine, $i=1,\dots,m$, generate spline basis matrix $\Psi^{(i)}$ for $X^{(i)}$, standardize every column of $\Psi^{(i)}$ to get $\underline{\Psi}^{(i)}$ and transmit $\underline{\Psi}^{(i)}\underline{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}$ to the central machine\; On the central machine, compute $F=(\sum_{i=1}^{m}\underline{\Psi}^{(i)}\underline{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}+rI_n)^{-1/2}$ and transmit it to the local machines\; On the $i$th local machine, $i=1,\dots,m$, compute $\widetilde{\Psi}^{(i)}=F\underline{\Psi}^{(i)}$ and $\widetilde{Y}=F\underline{Y}$\; On the $i$th local machine, $i=1,\dots,m$, perform the QR factorization $\widetilde{\Psi}^{(i)}_j=\widetilde{Q}_j^{(i)}\widetilde{R}_j^{(i)}$, for $j=1, \cdots, p_i$, run the SpAM backfitting algorithm to solve (\ref{thetasolve}), push $\hat{S}^{(i)}$ and $\Psi_{\hat{S}^{(i)}}$ to the central machine\; On the central machine, combine $\Psi_{\hat{S}^{(i)}}$, $i=1,\cdots,m$, to get $\Psi_{\hat{S}}$. Apply ridge regression on $(Y, \Psi_{\hat{S}})$ and get $\hat{\beta}_{\hat{S}}$\; \KwOut{$\hat{S}$ and $\hat{f}_j$, $j\in \hat{S}$.} \end{algorithm} \begin{remark} Steps 1 and 2 are used for data initialization and division. Steps 3--5 are the decorrelation steps. Step 6 and 7 are distributed feature selection and final refinement steps, respectively. In Step 4, we invert $\sum_{i=1}^{m}\underline{\Psi}^{(i)}\underline{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}+rI_n$ instead of $\sum_{i=1}^{m}\underline{\Psi}^{(i)}\underline{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}$ for robustness. Besides, using ridge regression in Step 7 instead of ordinary least squares is also for robustness. \end{remark} Now, we analyze the computational complexity and memory consumption of DDAC-SpAM. For convenience, we assume that the $p$ features are evenly distributed to $m$ parts. Excluding spline interpolation, the costs of the decorrelation operation and QR factorization are $O(n^3+n^2pd_n /m +n^2 m )$ and $O(npd_n^2/m)$ per local machine, respectively, so are $O(n^3+n^2pd_n /m +n^2 m )$ overall. For parallel estimation, within each iteration of the SpAM backfitting algorithm, $O(npd_n/m)$ calculations are required. Assume the number of loops is $k$. So the total computational cost is $O(n^3+n^2pd_n /m +n^2 m + knpd_n/m)$ for DDAC-SpAM, compared with $O(knpd_n+npd_n^2)$ for SpAM on a single machine. Meanwhile, the memory consumption of every local machine through the entire algorithm is decreased by a factor of $m$. As shown above, DDAC-SpAM can significantly speed up computation and relax memory requirements. This will be demonstrated in the numerical study section. \section{Theoretical Results} \label{sec4} In this section, we provide the theoretical framework for DDAC-SpAM to show it is variable selection consistent (\textit{sparsistent}) under mild conditions. For results in this section, we will treat $X$ as random. When $p d_n\geq n$, let the spline interpolation $\Psi=UDV^{{ \mathrm{\scriptscriptstyle T} }}$, where $U$ is a $n\times n$ orthogonal, $D$ is a $n\times n$ diagonal matrix and $V$ satisfies $V^{{ \mathrm{\scriptscriptstyle T} }}V=I_n$. $\widetilde{\Psi}=F\Psi=UV^{{ \mathrm{\scriptscriptstyle T} }}$ satisfies $\widetilde{\Psi}\widetilde{\Psi}^{{ \mathrm{\scriptscriptstyle T} }}=I_n$. All of these $n\times pd_n$ matrices whose rows are in orthogonal form $\mathcal{V}(n,pd_n)$, called the Stiefel manifold \citep{downs1972orientation}. For clarity, we review the definition of uniform distribution for a random matrix. \begin{definition}\citep{chikuse2012statistics} A random $n\times p$ matrix $H$ is uniformly distributed on $\mathcal{V}(n,p)$, written $H\sim \textrm{uniform}$ $ (\mathcal{V}(n,p))$, if $H$ has the same distribution as $HO$ for any fixed $p\times p$ orthogonal matrix $O$. \end{definition} Besides Condition \ref{C.1}, we further make the following assumptions for $\Psi$. \begin{condition} $V \sim \textrm{uniform}$ $(\mathcal{V}(n,pd_n))$. \label{C.2} \end{condition} We allow the minimum eigenvalue of $\Psi\Psi^{{ \mathrm{\scriptscriptstyle T} }}$ decay with sample size at a certain rate. \begin{condition} $\lambda_{\min}(\Psi\Psi^{{ \mathrm{\scriptscriptstyle T} }}/pd_n)>\delta n^{\alpha-1}, \ \textrm{for some} \ 0<\alpha\leq 1$ and $\delta>0$. \label{C.3} \end{condition} Similar conditions as Condition \ref{C.2} have been applied to the design matrix of linear model \citep{jia2015preconditioning}. Condition \ref{C.3} is related to Theorem 2 in \cite{ravikumar2009sparse} in which they require the eigenvalues of $n^{-1}\Psi^{{ \mathrm{\scriptscriptstyle T} }}\Psi$ to be bounded by constants. When the number of covariates diverges with $n$, Condition \ref{C.3} is more general than theirs. We also assume that the truncation size $d_n$, regularization parameter $\lambda_n$ and the number of important variables $s$ satisfy \begin{condition} $sd_{n}=o(n)$, $s^2n^{1-\alpha}\lambda_n^{-2}d_n^{-3}\rightarrow 0$, $s^2n^{-\alpha}d_n^{-3}\rightarrow 0$, and $\lambda_n/\rho_n^{*}\rightarrow 0,$ where $\rho_n^{*}=\min_{j\in S}\|\beta_j^{\ast}\|_\infty$. \label{C.4} \end{condition} Similar conditions were assumed in many high-dimensional additive model variable selection literatures, such as condition (B2) for Theorem 3 in \cite{huang2010variable}. Additionally, assume \begin{condition} $\log(pd_n)=o(\lambda_n^2n^{\alpha}/d_n)$. \label{C.5} \end{condition} The breakdown point of diverging dimensionality $p$ in Condition \ref{C.5} decreases with $\alpha$ and this rate is the same as \cite{ravikumar2009sparse} when $\alpha=1$. To clarify the implications of Conditions \ref{C.4} and \ref{C.5}, assume the number of relevant variables is bounded, i.e., $s=O(1)$. Then, in practice, we can set $d_n=O(n^{1/5})$. The order of dimension $p_n$ can be as large as $\exp(n^{1/5})$. If $1/\rho_n^{*}=o(n^{\alpha/2-1/5}/\log{n})$, a suitable choice for the regularization parameter $\lambda_n$ would be $n^{1/5-\alpha/2}\log{n}$ for some $2/5<\alpha\leq 1$. The key of our algorithm is to reduce the correlation between predictors which leads to a milder constraint for the correlation structure of variables or $f(X_j)$ within Theorem 1 than before. It can be reflected in two aspects. First, there is no assumption for the correlation between important variables that are distributed to different local machines, since the bound of this kind of correlation is reduced to \begin{gather*} {\rm pr}\left\{\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(-i)}_S}{n}\right\|\leq \frac{M_1\rho_n^{\ast}}{\sqrt{s-s_i}}\right\}\rightarrow 1, \end{gather*} for some $M_1>0$, as shown in Lemma S.2 in the supplementary material of this paper. Second, there is no assumption for the correlation between important variables and irrelevant variables. Specifically, we do not need a version of \textsl{irrepresentable condition}\citep{zhao2006model} for selection consistency of SpAM. In previous works, such as \cite{ravikumar2009sparse}, this kind of condition can be formulated as an upper bound for $$\max_{j\in S^c}\|\left(\frac{1}{n}\Psi_j^{{ \mathrm{\scriptscriptstyle T} }}\Psi_S\right)\left(\frac{1}{n}\Psi_S^{{ \mathrm{\scriptscriptstyle T} }}\Psi_S\right)^{-1}\|, $$ while this bound exists in our work by \begin{gather*} {\rm pr}\left\{\max_{j\in S^{c(i)}}\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(i)}_j}{n}\right\|\leq\frac{M_2\lambda_n}{\rho_n^{*}},\|\frac{pd_n}{n}\left(\Psi_S^{(i){ \mathrm{\scriptscriptstyle T} }}\Psi_S^{(i)}\right)^{-1}\|\leq M_3 \right\}\rightarrow 1, \end{gather*} for some $M_2,M_3>0$. The details and proof of these results can be found in Lemmas S.2, S.3, S.4 of the Supplementary Material. \begin{theorem} Under Conditions \ref{C.1}-\ref{C.5}, the local estimator on machine $i$ is sparsistent: $${\rm pr}(\hat{S}^{(i)}=S^{(i)})\geq 1-2s_id_n\exp(-\frac{\rho_n^{*2}\delta } {1134\sigma^2}\cdot n^{\alpha})-2(p_i-s_i)d_n\exp(-\frac{7\delta\lambda_n^2}{20800d_n\sigma^2}\cdot n^{\alpha})\rightarrow 1. $$ \end{theorem} The proof of Theorem 1 is provided in the Appendix. After aggregating the results from local machines, we can derive the following corollary. \begin{corollary} Under Conditions \ref{C.1}-\ref{C.5}, the central estimator is sparsistent: $${\rm pr}(\hat{S}=S)\geq 1-2sd_n\exp(-\frac{\rho_n^{*2}\delta } {1134\sigma^2}\cdot n^{\alpha})-2(p-s)d_n\exp(-\frac{7\delta\lambda_n^2}{20800d_n\sigma^2}\cdot n^{\alpha})\rightarrow 1. $$ \end{corollary} \section{Simulation Studies} \label{sec5} \subsection{Performance Comparison Under Different Correlation Structures and Distributions} To study the performance of the DDAC-SpAM procedure on simulated data sets, we divide feature space evenly and randomly. The tuning parameter $r$ is fixed at 1 because the results are stable for different choices. For each $f_j$, we use a cubic B-spline parameterization with $d_n=\lceil 2n^{1/5}\rceil$. For comparison, we also include the full data SpAM with a ridge refinement (SpAM) and SpAM with separated feature space without decorrelation (DAC-SpAM). We report the false positives (FP), false negatives (FN), the mean squared error $\|\hat{h}-h\|^2 $ (MSE) and computational time (Runtime). We use \verb"gglasso" \citep{YangZougglasso} and \verb"glmnet" \citep{FriedmanHastieglmnet} with five-fold cross-validation to fit group lasso and ridge regression, respectively. $\lambda_n$ varies from the smallest value for which all coefficients are zero to 0.1\% of this maximal value and the number of $\lambda_n$ is 500. We define the signal-to-noise ratio $$\textrm{SNR}=\frac{\textrm{var}(h(X))}{\textrm{var}(\varepsilon)}. $$ Some of other simulation settings are adapted from \cite{meier2009high} and \cite{fan2011nonparametric}. \textsl{\textbf{Independent Predictors.}} We first consider the case with independent predictors. Two examples where predictors follow a normal distribution and uniform distribution are analyzed, respectively. \textsc{Example 1} ($SNR\approx15$). Following Example 1 in \cite{meier2009high}, we generate the data from the following additive model: $$y_i=2g_1(x_{i1})+1.6g_2(x_{i2})-4g_3(x_{i3},2)+g_4(x_{i4})+\varepsilon_i, $$ with \begin{equation*} g_1(x)=x, \quad g_2(x)=x^2-\frac{25}{12},\quad g_3(x,\omega)=\sin(\omega x), \quad g_4(x)=e^{-x}-2/5\cdot\sinh(5/2). \end{equation*} The covariates $X=(X_1,\cdots, X_p)$ are simulated from independent Uniform (-2.5, 2.5) and $\varepsilon \sim N(0,1)$. \textsc{Example 2} ($SNR\approx15$). In this example, the covariates $X=(X_1,\cdots, X_p)$ are simulated from independent standard normal distribution. The model is $$y_i=5g_1(x_{i1})+2.1g_5(x_{i2})+13.2g_6(x_{i3},\frac{\pi}{4})+17.2g_7(x_{i4},\frac{\pi}{4})+2.56\varepsilon_i, $$ with \begin{gather*} g_5(x)=(x-1)^2,\quad g_6(x,\omega)=\frac{\sin(\omega x)}{2-\sin(\omega x)},\\ g_7(x,\omega)=0.1\sin(\omega x)+0.2\cos(\omega x)+0.3\sin^2(\omega x)+0.4\cos^3(\omega x)+0.5\sin^3(\omega x). \end{gather*} where $\varepsilon \sim N(0,1)$. \textsl{\textbf{Dependent Predictors.}} For dependent predictors with different distributions, we investigate four different correlation structures. \textsc{Example 3} ($SNR\approx6.7$). Following Example 3 in \cite{meier2009high}, the covariates are generated with the random-effects model: \begin{gather*} X_j=\frac{W_j+tU_{\lceil j/20\rceil}}{1+t}, j=1,\cdots,p, \end{gather*} where $W_1,\cdots, W_p, U_1,\cdots,U_{\lceil p/20\rceil} \stackrel{i.i.d.}{\sim}$ Uniform $(0, 1)$. By construction, the $p$ predictors are partitioned into segments of size 20. Variables in different segments are independent while the variables in each segment are dependent through the shared $U$ variable. As a result, the correlation strength within each segment is controlled by $t$. Here, we set $t=1.5$, leading to a correlation between $X_i$ and $X_j$ to be 0.6. The model is $$y_i=2.5g_1(x_{i1})+2.6g_5(x_{i2})+g_6(x_{i3},2\pi)+g_7(x_{i4},2\pi)+0.3\varepsilon_i. $$ \textsc{Example 4} ($SNR\approx6.7$). The setting is the same as Example 3 but $X_j=(W_j+tU_{j})/(1+t)$ and $U_1=U_2=\cdots=U_p\sim $ Uniform (0,1). We set $t=1.5$ leading to the pairwise correlation of all covariates being 0.6. \textsc{Example 5} ($SNR\approx15$). The covariates are generated according to a multivariate normal distribution with covariance matrix $\Sigma_{ij}=0.6^{|i-j|}$, $i,j=1,\cdots,p$ and mean 0. $Y$ is generated with $$y_i=2.5g_1(x_{i1})+g_5(x_{i2})+6.5g_6(x_{i3},\frac{\pi}{4})+8.5g_7(x_{i4},\frac{\pi}{4})+1.2\varepsilon_i. $$ The model dimension and the sample size are fixed at $p=10,000$ and $n=500$ respectively and the number of machines is fixed as $m=20$. A total of 100 simulation runs are used for each setting. We report the average performance in Table \ref{table1}. Several conclusions can be drawn from Table \ref{table1}. In Examples 1 and 2 where all variables are independent, DDAC-SpAM performs similarly to DAC-SpAM but SpAM tends to include more irrelevant variables. This shows that for independent variables, distributed feature selection can enhance the selection accuracy. In Examples 3-5 where the variables are dependent, the performances of SpAM and DAC-SpAM deterioriate, partially due to the violation of the irrepresentable condition. On the contrary, DDAC-SpAM is far less affected and achieves the overall best performance. And in particular, it has a lower false-positive rate than the other two methods. This shows that the decorrelation step can handle such kinds of strong correlation structures. As for computation time, benefiting from distributed computing, DAC-SpAM and DDAC-SpAM take much less time than SpAM. \begin{table} \caption{Average false positive (FP), false negative (FN), mean squared error (MSE), time (in seconds) over 100 repetitions and their standard deviations (in parentheses). \label{table1}} \begin{center} \begin{tabular}{lccccc} Model & Method & \multicolumn{1}{c}{FP} & \multicolumn{1}{c}{FN} & \multicolumn{1}{c}{MSE} & \multicolumn{1}{c}{Time} \\\hline Example 1 & DDAC-SpAM & ~0.03 (0.17) & 0.00 (0.00) & 0.627 (0.10) & ~~16.22 (1.11) \\ & DAC-SpAM & ~0.21 (1.71) & 0.00 (0.00) & 0.632 (0.11) & ~~13.56 (0.86) \\ \vspace{0.15cm} & SpAM & ~0.99 (1.99) & 0.00 (0.00) & 0.715 (0.18) & 212.39 (20.82) \\ Example 2 & DDAC-SpAM & ~0.05 (0.26) & 0.00 (0.00) & 3.380 (0.84) & ~~24.10 (1.11)\\ & DAC-SpAM & ~0.05 (0.32) & 0.00 (0.00) & 3.393 (0.85) & ~~24.10 (1.10) \\ \vspace{0.15cm} & SpAM & ~0.58 (1.26) & 0.00 (0.00) & 3.513 (0.84) & 349.94 (14.49) \\ Example 3 & DDAC-SpAM & ~2.98 (2.60) & 0.17 (0.37) & 0.030 (0.03) & ~~16.24 (0.99) \\ & DAC-SpAM & ~4.03 (3.83) & 0.16 (0.39) & 0.030 (0.03) & ~~13.62 (0.77) \\ \vspace{0.15cm} & SpAM & 11.12 (8.97) & 0.00 (0.00) & 0.033 (0.01) & 214.00 (17.40) \\ Example 4 & DDAC-SpAM & ~~0.07 (0.43) & 0.02 (0.14) & 0.013 (0.01) & ~~16.41 (0.99) \\ & DAC-SpAM & 56.21 (18.31) & 0.00 (0.00) & 0.111 (0.07) & ~~25.60 (2.30) \\ \vspace{0.15cm} & SpAM & 22.72 (11.30) & 0.00 (0.00) & 0.045 (0.01) & 213.51 (18.65) \\ Example 5 & DDAC-SpAM & ~0.98 (0.51) & 0.01 (0.10) & 0.767 (0.30) & ~~24.44 (1.05)\\ & DAC-SpAM & ~1.05 (0.47) & 0.01 (0.10) & 0.766 (0.29) & ~~23.93 (1.04) \\ & SpAM & ~6.51 (8.72) & 0.00 (0.00) & 0.901 (0.23) & 348.79 (14.16) \\ \end{tabular} \end{center} \end{table} \subsection{Performance Comparison with Various Number of Machines} It looks a bit surprising in Corollary 1 that the sparsistent rate of the aggregated result is irrelevant to the number of machines $m$. This is mainly because this rate holds uniformly on all subsets of variables and aggregating the local selection results leads to the final sparsity pattern. To verify this property, in this experiment, we keep the sample size $n$ and the dimension $p$ fixed, but vary the number of machines $m$ from 1 to 200 ($m=1,10,20,100,200$) and use Example 4. Naturally, as $m$ increases, each machine has a lower local dimension. We summarize the results in Fig \ref{Fig2}. First, we observe that all three methods capture nearly all important variables. Compared with DAC-SpAM and SpAM, DDAC-SpAM has the smallest number of false positive variables. Due to the better variable selection performance, DDAC-SpAM also has a smaller estimation error. Besides, benefiting from the distributed framework, the time consumption of DDAC-SpAM and DAC-SpAM decreases as $m$ increases. In addition, although decorrelation increases the computational complexity which is evident when the data set is not partitioned, i.e. $m=1$, DDAC-SpAM takes less time than DAC-SpAM as $m$ increases. The reason is that the reduced correlation between variables leads to less number of back-fitting loops required for convergence in the additive model fitting. Overall, DDAC-SpAM is a competitive distributed variable selection method for high-dimensional additive models. \begin{figure} \begin{center} \includegraphics[width=12cm]{mmplot3.pdf} \end{center} \caption{Performance of DDAC-SpAM with different number of subsets. \label{Fig2}} \end{figure} \section{An Application to Real Data} \label{sec6} In this section, we compare the performances of DDAC-SpAM, SpAM, Deco-linear \citep{wang2016decorrelated} and Lasso \citep{tibshirani1996regression} on the meatspec data set analyzed by \cite{meier2009high} and \cite{YangZougglasso}. The data set was recorded by a Tecator near-infrared spectrometer which measured the spectrum of light transmitted through a sample of minced pork meat \citep{thodberg1993ace, borggaard1992optimal}. It is available in the R package \verb"faraway". Our aim is to predict the fat content by absorbances which can be measured more easily. This original data set contains $n=215$ observations with $p=100$ predictors which are highly correlated \citep{meier2009high}. After all predictors are centered and scaled to have mean 0 and variance 1, we add 1900 independent and standard normal distributed variables as interaction terms. Then, DDAC-SpAM, SpAM, Deco-linear, and Lasso are applied to those 2000 features. We use 10 machines for the DDAC-SpAM algorithm, where the features are distributed randomly. To compare the performances of all methods, we randomly split the dataset into a training set of 172 observations and a test set of 43 observations. This procedure is repeated 100 times. We compute the number of predictors selected and the prediction errors on the test set. Table \ref{Realdata1} includes the average values and their associated robust standard deviations over 100 replications. \begin{table} \caption{Mean model size (MS) and prediction error (PE) over 100 repetitions and their robust standard deviations (in parentheses). \label{Realdata1}} \begin{center} \begin{tabular}{lcc} Method & PE & MS \\\hline DDAC-SpAM & 0.357 (0.141) & 9.34 (2.17) \\ SpAM & 0.339 (0.140) & 15.11 (2.91) \\ Deco-Linear & 0.377 (0.121) & 82.60 (4.51) \\ Lasso & 0.401 (0.120) & 84.06 (13.60) \\ \end{tabular} \end{center} \end{table} From Table \ref{Realdata1}, all methods lead to a similar prediction error, but DDAC-SpAM selects significantly fewer predictors than competing methods. Considering the high correlation among predictors and to provide a more parsimonious list, DDAC-SpAM could be a very worthwhile method for distributed feature selection. \section{Discussion} \label{sec7} In this paper, we have studied a feature distributed learning framework named DDAC-SpAM for the high dimensional additive model. DDAC-SpAM makes predictors less correlated and more suitable for the further sparsistent variable selection. The experiments illustrate that this method not only reduces the computational cost substantially, but also outperforms the existing approach SpAM when covariates are highly correlated. This is the first paper to discuss how to combine the divide and conquer method with the high dimensional nonparametric model. The results demonstrate that DDAC-SpAM is attractive on theoretical analysis, empirical performance and its straightforward implement process. Given that we specifically approximate the additive components by truncated B-spline bases and then impose the sparsity penalty only, DDAC-SpAM framework is readily available for other smoothing method with the additive models, for example, smoothing splines \citep{speckman1985spline} and sparsity-smoothness penalized approaches \citep{meier2009high}. Besides, extension to the generalized additive model can be an interesting topic for future research. Although DDAC-SpAM is designed to solve large-$p$-small-$n$ problems, it can be combined with a sample space partition step to deal with extremely scalable large-$p$-large-$n$ problems. The details can be explored in future work. \section*{Appendix: Proof of Theorem 1} For the $i$-th group, we have \setcounter{equation}{0} \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \tildeY=\widetilde{\Psi}^{(i)}_S \beta_{S}^{*(i)}+\widetilde{Z}+W, \label{Ey} \end{equation} where $W=\widetilde{\Psi}^{(-i)}_S \beta_{S}^{*(-i)}+\tilde{\varepsilon}=W_{1}+W_{2}$. A vector $\hat{\beta}^{(i)} \in R^{d_{n} p_{i}}$ is the minimizer of the objective function \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} &R_{n}\left(\beta^{(i)}\right)+\lambda_{n} \Omega\left(\beta^{(i)}\right)\\ =&\frac{1}{2 n}\left\|\tildeY-\sum_{j=1}^{p_ i} \widetilde{\Psi}^{(i)}_j \beta_{j}^{(i)}\right\|^{2}+\lambda_n\sum_{j=1}^{p_i}\sqrt{\frac{1}{n}\beta_{j}^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(i)}_j\beta_{j}^{(i)}}\\ =&\frac{1}{2 n}\left\|\tildeY-\sum_{j=1}^{p_i} \widetilde{\Psi}^{(i)}_j \beta_{j}^{(i)}\right\|^{2}+\lambda_n \sum_{j=1}^{p_ i}\left\|\frac{1}{\sqrt{n}} \widetilde{\Psi}^{(i)}_j\beta_{j}^{(i)}\right\| \end{aligned} \label{Ecompose} \end{equation} if and only if there exists a subgradient $\hat{g}^{(i)} \epsilon \partial \Omega\left(\hat{\beta}^{(i)}\right)$, such that \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \frac{1}{n} \widetilde{\Psi}^{(i) { \mathrm{\scriptscriptstyle T} }}\left(\sum_{j=1}^{p_i} \widetilde{\Psi}_{j}^{(i)} \hat{\beta}_{j}^{(i)}-\widetilde{Y}\right)+\lambda_{n} \hat{g}^{(i)}=0. \label{Estationary} \end{equation} The subdifferential \(\partial \Omega ( \beta^{(i)} )\) is the set of vectors \(g^{(i)} \in R^{p_{i} d_{n}}\) satisfying \begin{gather*} g_{j}^{(i)}=\frac{\frac{1}{n}\widetilde{\Psi}_{j}^{(i){ \mathrm{\scriptscriptstyle T} }} \widetilde{\Psi}_{j}^{(i)}\beta_{j}^{(i)} }{\sqrt{\frac{1}{n}\beta_{j}^{(i)}\widetilde{\Psi}_{j}^{(i){ \mathrm{\scriptscriptstyle T} }} \widetilde{\Psi}_{j}^{(i)}\beta_{j}^{(i)}}}, \quad \textrm{if} \quad \beta_{j}^{(i)} \neq 0,\\ g_{j}^{(i){ \mathrm{\scriptscriptstyle T} }}(\frac{1}{n}\widetilde{\Psi}_{j}^{(i) { \mathrm{\scriptscriptstyle T} }} \widetilde{\Psi}_{j}^{(i)})^{-1}g_{j}^{(i)}\leq 1 , \quad \textrm{if} \quad \beta_{j}^{(i)} = 0. \end{gather*} We use ``witness" proof techniques \citep{wainwright2006sharp}, i.e., set $\hat{\beta}_{S^{c}}^{(i)}=0$ and $\hat{g}_{S}^{(i)}=\partial \Omega\left(\beta^{*(i) }\right)_{S}$. We then obtain $\hat{\beta}_{S}^{(i)}$ and $\hat{g}_{S^ c}^{(i)}$ from the stationary condition in (A.\ref{Estationary}). By showing that, with high probability $\hat{\beta}_{j}^{(i)} \neq 0 $ for $j\in S$ and $g_{j}^{(i){ \mathrm{\scriptscriptstyle T} }}(\frac{1}{n}\widetilde{\Psi}_{j}^{(i) { \mathrm{\scriptscriptstyle T} }} \widetilde{\Psi}_{j}^{(i)})^{-1}g_{j}^{(i)}\leq 1 $ for $j\in S^c$, we can then demonstrate that with high probability there exists a minimizer to the optimization problem in (A.\ref{Ecompose}) that has the same sparsity pattern as the true model. Setting $\hat{\beta}_{S^{c}}^{(i)}=0$ and $\hat{g}_{j}^{(i)}=\frac{\widetilde{\Psi}_{j}^{(i){ \mathrm{\scriptscriptstyle T} }} \widetilde{\Psi}_{j}^{(i)}\beta_{j}^{(i)} }{\sqrt{\frac{1}{n}\beta_{j}^{(i)}\widetilde{\Psi}_{j}^{(i){ \mathrm{\scriptscriptstyle T} }} \widetilde{\Psi}_{j}^{(i)}\beta_{j}^{(i)}}}$ for $j\in S^{(i)}$, the stationary condition for $\beta_S^{(i)}$ is \begin{equation*} \frac{1}{n}\widetilde{\Psi}^{(i)T}_S(\widetilde{\Psi}^{(i)}_S \beta_S^{(i)} - \tildeY)+\lambda_n \hat{g}_S^{(i)}=0. \end{equation*} With (A.\ref{Ey}), it can be written as $$\frac{1}{n}\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}_{S}^{(i)}\left(\beta_{S}^{(i)}-\beta_{S}^{*(i)}\right)-\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_1-\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_2-\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{Z}+\lambda_n\hat{g}_S^{(i)}=0$$ or \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \beta_S^{(i)}-\beta_S^{*(i)}=(\frac{1}{n}\widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S)^{-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_1+\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_2+\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{Z}+\lambda_n\hat{g}_S^{(i)}), \end{aligned} \label{beta4part} \end{equation} assuming that $\frac{1}{n}\widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S$ is nonsingular. Recalling our definition $\rho_n^*=\min_{j\in S^{(i)}}\left\| \beta_j^{*(i)}\right\|_\infty > 0$, it suffices to show that $$\left\|\beta_{S}^{(i)}-\beta_{S}^{*(i) }\right\|_{\infty}<\frac{\rho_{n}^{*}}{2}$$ in order to ensure that $\textrm{supp}(\beta_S^{(i)})=\textrm{supp}(\beta_S^{*(i)})=\{j:\left\|\beta_{j}^{*(i)}\right\|_{\infty} \neq 0\}$. Using $\Sigma_{SS}^{(i)}=\frac{1}{n}(\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(i)}_S)$ to simplify notation, we have the $l_\infty$ bound: \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \left\|\beta_{S}^{(i)}-\beta_{S}^{*(i) }\right\|_{\infty} \leq & \left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n}\widetilde{\Psi}^{(i)T}_S W_1)\right\|_{\infty}+\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n}\widetilde{\Psi}^{(i)T}_S W_2)\right\|_{\infty} \\ & +\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n}\widetilde{\Psi}^{(i)T}_S \widetilde{Z})\right\|_{\infty}+\lambda_n\left\|\Sigma_{SS}^{(i)-1}\hat{g}_S^{(i)}\right\|_{\infty}. \end{aligned} \label{betaerror} \end{equation} Now, we proceed to bound the first term of (A.\ref{betaerror}). Notice that derived from Condition 1, $\left\|\beta_{S}^{*(-i)}\right\|\leq \sqrt{s-s_i}C_1$ for some $C_1>0$, then \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} &\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_1 )\right\|_\infty\leq\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_1 )\right\|\\ \leq & \left\|\Sigma_{SS}^{(i)-1} \right\|\left\|\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(-i)}_S\right\|\left\|\beta_S^{*(-i)}\right\|\\ \leq &\sqrt{s-s_i}C_{1}\left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}\right]^{-1}\left[\frac{3(\sqrt{\frac{sd_n}{n}}+t_1 )+3(\sqrt{\frac{s}{p}}+t_2)}{1-3(\sqrt{\frac{s}{p}}+t_3)}\right], \end{aligned} \label{1.1} \end{equation} where the last inequality is derived with Lemma S.2 and Lemma S.3 in the supplemental material of this paper. $t_1, t_2, t_3, t_4, t_5, t_6$ are some positive constants as shown in Lemma S.2 and S.3. Then, consider the second term $\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_2)\right\|_\infty=\left\|\Sigma_{SS}^{(i)-1} (\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \tilde{\varepsilon})\right\|_\infty$. Note that $\tilde{\varepsilon}=F \varepsilon$ and $\varepsilon\sim N(0,\sigma^2I)$, so that $Q:=\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)}_S W_2)$ is Gaussian as well, with zero mean. Consider its $l$-th component, $Q_l=e_l^{{ \mathrm{\scriptscriptstyle T} }}Q$, where $e_l$ is a unit vector with its $l$-th component equal to 1. Then $E[Q_l]=0$, and \begin{equation*} \begin{aligned} \textrm{Var}(Q_l)&=\frac{\sigma^2}{n^2}e_l^{{ \mathrm{\scriptscriptstyle T} }}\Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S (FF^{{ \mathrm{\scriptscriptstyle T} }})\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1} e_l\\ &\leq \frac{\sigma^2}{n^2} \|FF^{{ \mathrm{\scriptscriptstyle T} }}\|\left\|\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1} e_l\right\|^2\leq \frac{\sigma^2}{n}\|FF^{{ \mathrm{\scriptscriptstyle T} }}\|\|\Sigma_{SS}^{(i)-1}\|. \end{aligned} \end{equation*} So $\|\textrm{Var}(Q)\|_\infty \leq \frac{\sigma^2}{n}\|FF^{{ \mathrm{\scriptscriptstyle T} }}\|\|\Sigma_{SS}^{(i)-1}\|$. With Gaussian comparison results \citep{ledoux2013probability}, we have \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} &\textrm{P}(\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)}_S W_2)\|_\infty\geq t_7)\\ \leq & 2 s_id_n\exp\left\{-\frac{t_7^2}{2\|\textrm{Var}(Q)\|_\infty}\right\} \leq 2 s_id_n\exp\left\{-\frac{t_7^2n}{2\sigma^2\left\| \Sigma_{SS}^{(i)-1}\right\| \left\| FF^{{ \mathrm{\scriptscriptstyle T} }} \right\|}\right\}\\ \leq & 2s_id_n\exp\left\{-\frac{\delta t_7^2n^{\alpha}} {2\sigma^2}\left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}\right]\right\}, \end{aligned} \label{1.2} \end{equation} with Lemma S.3. Denote the event $\eta_3=\left\{\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)}_S W_2)\|_\infty\leq t_7\right\}$. Then, we need to bound $\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{Z})\right\|_\infty$. Since, $$\widetilde{Z}=FZ=F\sum_{j\in S}\sum_{k=d_n+1}^{\infty}\beta_{jk}\Psi_{jk},$$ we can obtain that \begin{equation*} \begin{aligned} \left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S Z)\right\|_\infty &=\left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S F\sum_{j\in S}\sum_{k=d_n+1}^{\infty}\beta_{jk}\Psi_{jk})\right\|_\infty\\ &\leq \left\|\frac{1}{n}\Sigma_{SS}^{(i)-1} \widetilde{\Psi}^{(i)T}_S F\right\|\left\|\sum_{j\in S}\sum_{k=d_n+1}^{\infty}\beta_{jk}\Psi_{jk}\right\|. \end{aligned} \end{equation*} Working over the Sobolev space of $\psi_{jk}$ (Condition 1), \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \label{zequation} |z_i|&=|\sum_{j\in S}\sum_{k=d_n+1}^{\infty}\beta_{jk}^{*}\psi_{jk}(x_{ij})| \leq B\sum_{j\in S}\sum_{k=d_n+1}^{\infty}|\beta_{jk}^{\ast}| \leq\frac{sC_2}{d_n^{3/2}}, \end{aligned} \end{equation} for some constant $C_2>0$. Thus, we have $\left\| Z \right\|\leq \frac{\sqrt{n}sC_2}{d_n^{3/2}}$. Combined with $ \frac{1}{n} \left\| \Sigma_{SS}^{(i)-1} \widetilde{\Psi}^{(i)T}_S F \right\| \leq \frac{1}{n} \left\| \Sigma_{SS}^{(i)-1} \widetilde{\Psi}^{(i)T}_S \right\| \left\| F\right\|=\sqrt{\frac{1}{n} \left\| \Sigma_{SS}^{(i)-1} \right\|}\left\| F\right\|$, it can be derived that \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \left\|\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{Z})\right\|_\infty \leq C_2 \delta^{-\frac{1}{2}} \left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}\right]^{-\frac{1}{2}} s n^{-\frac{1}{2}\alpha}d_n^{-\frac{3}{2}}, \end{aligned} \label{1.3} \end{equation} following Lemma S.3. Finally, we consider the term $\lambda_n \left\| \Sigma_{SS}^{(i)-1} \hat{g}_S^{(i)}\right\|_\infty$. Note that for $j\in S^{(i)}$, $$ 1= \hat{g}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\left(\frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(i)}_j\right)^{-1}\hat{g}^{(i)}_j\geq \frac{1}{\left\| \Sigma_{SS}^{(i)}\right\|} \left\|\hat{g}^{(i)}_j \right\|^2 $$ and thus $\left\| \hat{g}^{(i)}_j \right\|\leq \sqrt{\left\| \Sigma_{SS}^{(i)}\right\|}$. Therefore, $$\lambda_n\left\| \Sigma_{SS}^{(i)-1} \hat{g}_S^{(i)} \right\|_\infty\leq \lambda_n \left\| \Sigma_{SS}^{(i)-1} \right\| \left\| \hat{g}_S^{(i)} \right\|\leq \lambda_n\left\| \Sigma_{SS}^{(i)-1}\right\| \sqrt{\left\| \Sigma_{SS}^{(i)}\right\|} .$$ It follows that \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} &\lambda_n \left\| \Sigma_{SS}^{(i)-1} \hat{g}_S^{(i)}\right\|_\infty\\ \leq & \lambda_n\left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6 )}\right]^{-1}\left[1+\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6 )}\right]^{\frac{1}{2}}, \end{aligned} \label{1.4} \end{equation} with Lemma S.3. Under Condition (C.2), we combine results (A.\ref{1.1}), (A.\ref{1.2}), (A.\ref{1.3}), (A.\ref{1.4}) with (A.\ref{betaerror}) and take $t_1=\frac{\rho_n^*}{480C_1\sqrt{s-s_i}}-\sqrt{\frac{sd_n}{n}}$, $t_2=\frac{\rho_n^*}{480C_1\sqrt{s-s_i}}-\sqrt{\frac{s}{p}}$, $t_3=\frac{1}{10}-\sqrt{\frac{s}{p}} $, $t_4=\frac{1}{10}-\sqrt{\frac{s_id_n}{n}}$, $t_5=t_6=\frac{1}{10}-\sqrt{\frac{s_i}{p}}$ and $t_7=\frac{\rho_n^{*}}{9}$. Therefore, we have \begin{equation*} \begin{aligned} &\left\|\beta_{S}^{(i)}-\beta_{S}^{*(i) }\right\|_{\infty}\\ \leq & \sqrt{s-s_i}C_{1}\left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}\right]^{-1}\left[\frac{3(\sqrt{\frac{sd_n}{n}}+t_1 )+3(\sqrt{\frac{s}{p}}+t_2)}{1-3(\sqrt{\frac{s}{p}}+t_3)}\right]\\ &+t_7+C_2 \delta^{-\frac{1}{2}} \left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}\right]^{-\frac{1}{2}} s n^{-\frac{1}{2}\alpha}d_n^{-\frac{3}{2}} \\ &+\lambda_n\left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6 )}\right]^{-1}\left[1+\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6 )}\right]^{\frac{1}{2}}\\ =&\frac{\rho_{n}^{*}}{32}+\frac{\rho_{n}^{*}}{9}+\sqrt{7}C_2s\delta^{-1/2}n^{-\alpha/2}d_n^{-3/2}+\sqrt{91}\lambda_n\\ \leq&\frac{35}{72}\rho_{n}^{*}\leq\frac{\rho_{n}^{*}}{2}. \end{aligned} \end{equation*} under the event $\eta_3$ and events $\eta_1$ and $\eta_2$ which are defined in the supplemental materials. Now, we analyze $\hat{g}_{S^c}^{(i)}$. We require that $$\hat{g}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\left(\frac{1}{n} \widetilde{\Psi}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_j^{(i)}\right)^{-1}\hat{g}_j^{(i)}\leq 1, \quad \textrm{for all} \quad j\in S^{c(i)}.$$ Since $$\hat{g}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\left(\frac{1}{n} \widetilde{\Psi}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_j^{(i)}\right)^{-1}\hat{g}_j^{(i)}\leq \left\| \hat{g}_j^{(i)} \right\|^2 \left\| \left(\frac{1}{n} \widetilde{\Psi}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_j^{(i)}\right)^{-1} \right\|,$$ it suffices to show that $$\max_{j\in S^{c(i)}}\left\| \hat{g}_j^{(i)} \right\|^2 \left\| \left(\frac{1}{n} \widetilde{\Psi}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_j^{(i)}\right)^{-1} \right\| \leq 1.$$ Recall that we have set $\hat{\beta}_{S^c}^{(i)}=\beta_{S^c}^{*(i)}=0$. The stationary condition for $j\in S^{c(i)}$ is thus given by $$\frac{1}{n} \widetilde{\Psi}^{{ \mathrm{\scriptscriptstyle T} }}_j\left(\widetilde{\Psi}^{(i)}_S\hat{\beta}_S^{(i)}-\widetilde{\Psi}^{(i)}_S\beta_S^{*(i)}-\widetilde{Z}-W\right)+\lambda_n\hat{g}_j^{(i)}=0.$$ Therefore, for $j\in S^{c(i)}$, \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} &\hat{g}_j^{(i)}=\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j\left(\widetilde{\Psi}^{(i)}_S\beta_S^{*(i)}-\widetilde{\Psi}^{(i)}_S\hat{\beta}_S^{(i)}+\widetilde{Z}+W\right)\\ &=\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j\widetilde{\Psi}^{(i)}_S\left(\beta_S^{*(i)}-\hat{\beta}_S^{(i)}\right) +\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{Z}+\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j W_1+\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j W_2\\ &:=\mathcal{G}_1+\mathcal{G}_2+\mathcal{G}_3+\mathcal{G}_4. \end{aligned} \label{2.1} \end{equation} Then, we obtain that \begin{equation*} \begin{aligned} &\mu_1=\textrm{E} (\mathcal{G}_1)=\textrm{E}\left(\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j\widetilde{\Psi}^{(i)}_S\left(\beta_S^{*(i)}-\hat{\beta}_S^{(i)}\right)\right)\\ &=-\frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1}(\frac{1}{n} \widetilde{\Psi}^{(i)T}_S W_1+\frac{1}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{Z}+\lambda_n\hat{g}_S^{(i)}), \end{aligned} \end{equation*} where the last equation is derived from (A.\ref{beta4part}). Meanwhile, $\mu_2=\textrm{E}(\mathcal{G}_2)=\mathcal{G}_2$, $\mu_3=\textrm{E} (\mathcal{G}_3)=\mathcal{G}_3$, and $\mu_4=\textrm{E}(\mathcal{G}_4)=0$. Under events $\eta_4$, $\eta_5$, $\eta_6$ and $\eta_1$, $\eta_2$ ( their definition and detailed description are included in the supplemental material), we have \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \left\| \mu_1 \right\| &\leq \frac{1}{\lambda_n} \left\| \frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j\widetilde{\Psi}^{(i)}_S \right\| \left( \left\| \frac{1}{n} \Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S W_1\right\| +\left\| \frac{1}{n} \Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S \widetilde{Z}\right\| +\left\| \lambda_n\Sigma_{SS}^{(i)-1}\hat{g}_S^{(i)} \right\| \right) \\ &\leq \frac{1}{pd_n\lambda_n}\cdot \frac{3(\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 )+3(\sqrt{\frac{s_i+1}{p}}+t_9)}{1-3(\sqrt{\frac{s_i+1}{p}}+t_{10}) }\cdot \left(\frac{\rho_{n}^{*}}{32}+\sqrt{7}C_2s\delta^{-1/2}n^{-\alpha/2}d_n^{-3/2}+\sqrt{91}\lambda_n\right) \end{aligned} \end{equation} where the second inequality comes from (A.\ref{1.1}), (A.\ref{1.3}) and (A.\ref{1.4}). Meanwhile, \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \left\| \mu_2 \right\| &=\left\| \frac{1}{\lambda_n}\cdot\frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{Z} \right\|\\ &=\left\| \frac{1}{\lambda_n}\cdot\frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j F \Psi_S^{(-d_n)}\beta_S^{*(-d_n)} \right\| \leq \left\| \frac{1}{\lambda_n}\cdot\frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j F \right\| \left\| \Psi_S^{(-d_n)}\beta_S^{*(-d_n)}\right\|\\ &\leq C_2(pd_n)^{-1}\delta^{-1/2}\lambda_n^{-1}n^{\frac{1}{2}(1-\alpha)}sd_n^{-3/2} \left[1+\frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right]^{\frac{1}{2}}, \end{aligned} \end{equation} where the last inequality follows Lemma S.5 and (A.\ref{zequation}), and \begin{equation} \renewcommand\theequation{A.\arabic{equation}} \begin{aligned} \left\| \mu_3 \right\| &=\left\| \frac{1}{\lambda_n}\frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j W_1 \right\|\\ &=\left\| \frac{1}{\lambda_n}\cdot\frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(-i)}_S \beta_S^{*(-i)} \right\| \leq \frac{1}{\lambda_n} \left\| \frac{1}{n}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(-i)}_S \right\| \left\| \beta_S^{*(-i)} \right\| \\ &\leq (pd_n)^{-1}\sqrt{s-s_i}C_1\lambda_n^{-1} \frac{3(\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} )+3(\sqrt{\frac{s-s_i+1}{p}}+t_{15})}{1-3(\sqrt{\frac{s-s_i+{15}}{p}}+t_{16})}. \end{aligned} \end{equation} where the last inequality follows Lemma S.6 and Condition 1. With a simple calculation, we can get \begin{equation*} \begin{aligned} \mathcal{E}_j\triangleq\hat{g}_j^{(i)}-\textrm{E}\hat{g}_j^{(i)}=\frac{1}{\lambda_n}\frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j(I-\frac{1}{n}\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S)W_2. \end{aligned} \end{equation*} which follows Gaussian distribution of mean zero. Then, following Lemma S.5, \begin{equation*} \begin{aligned} \textrm{E}( \mathcal{E}_{jk}^2 )& = \textrm{E}( e_k^{{ \mathrm{\scriptscriptstyle T} }}\mathcal{E}_j)^2\\ &= \frac{\sigma^2}{\lambda_n^2n^2}\left[e_k^{{ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j(I-\frac{1}{n}\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S)FF^{{ \mathrm{\scriptscriptstyle T} }}(I-\frac{1}{n}\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S)\widetilde{\Psi}^{(i)}_j e_k\right]\\ &\leq \sigma^2\lambda_n^{-2}\left\| \frac{1}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j(I-\frac{1}{n}\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S) \right\|^2 \left\| F \right\|^2\\ &\leq \sigma^2\lambda_n^{-2}\left\| \frac{1}{n} \widetilde{\Psi}^{(i)}_j\right\|^2 (\left\| I\right\|^2 +\left\| \frac{1}{n}\widetilde{\Psi}^{(i)}_S\Sigma_{SS}^{(i)-1}\widetilde{\Psi}^{(i)T}_S\right\|^2) \left\| F \right\|^2\\ &= \frac{2\sigma^2}{n}\lambda_n^{-2}\left\| \frac{1}{\sqrt{n}} \widetilde{\Psi}^{(i)}_j\right\|^2 \left\| F \right\|^2 \\ &\leq \delta^{-1}\frac{2\sigma^2}{n^\alpha}\lambda_n^{-2} \left[1+\frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right](pd_n)^{-2}. \end{aligned} \end{equation*} Therefore, we have by Markov's inequality and Gaussian comparison results \citep{ledoux2013probability} that \begin{equation*} \begin{aligned} &\textrm{P}\left(\max_{j\in S^{c(i)}}\left\| \mathcal{E}_j \right\|_\infty \geq \frac{t_{17}/(pd_n)}{\sqrt{d_n}} \right)\\ &\leq \frac{\sqrt{d_n}}{t_{17}}\textrm{E}\left(\max_{jk}\left|\mathcal{E}_{jk} \right| \right)\\ &\leq 2(p_i-s_i)d_n\exp{\left\{-\frac{t_{17}^2\delta\lambda_n^2}{4d_n\sigma^2}\left[1+\frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right]^{-1}n^{\alpha}\right\}}. \end{aligned} \end{equation*} Denote event $\eta_7=\left\{\max_{j\in S^{c(i)}}\left\| \mathcal{E}_j \right\|_\infty \leq \frac{t_{17}/(pd_n)}{\sqrt{d_n}} \right\}$. Finally, considering \begin{equation*} \begin{aligned} \left\| \hat{g}_j^{(i)} \right\| &\leq \left\| \textrm{E}\hat{g}_j^{(i)} \right\| +\left\| \hat{g}_j^{(i)}-\textrm{E}\hat{g}_j^{(i)} \right\|\\ &\leq\left\| \textrm{E}\hat{g}_j^{(i)} \right\| +\sqrt{d_n}\left\| \hat{g}_j^{(i)}-\textrm{E}\hat{g}_j^{(i)} \right\|_\infty \end{aligned} \end{equation*} and \begin{equation*} \begin{aligned} \left\| \textrm{E}(\hat{g}_j^{(i)})\right\| &\leq \left\| \mu_1 \right\| +\left\| \mu_2 \right\|+\left\| \mu_3 \right\|, \end{aligned} \end{equation*} thus setting $t_{8}=\frac{\lambda_n}{60\rho_n^{*}}-\sqrt{\frac{(s_i+1)d_n}{n}}$, $t_{9}=\frac{\lambda_n}{60\rho_n^{*}}-\sqrt{\frac{s_i+1}{p}}$, $t_{10}=\frac{1}{10}-\sqrt{\frac{s_i+1}{p}}$, $t_{11}=\frac{1}{10}-\sqrt{\frac{d_n}{n}}$, $t_{12}=\frac{1}{10}-\sqrt{\frac{1}{p}}$, $t_{13}=\frac{1}{10}-\sqrt{\frac{1}{p}}$, $t_{14}=\frac{\lambda_n}{100\sqrt{s-s_i}C_1\rho_n^{*}}-\sqrt{\frac{(s-s_i+1)d_n}{n}}$, $t_{15}=\frac{\lambda_n}{100\sqrt{s-s_i}C_1\rho_n^{*}}-\sqrt{\frac{s-s_i+1}{p}}$, $t_{16}=\frac{1}{10}-\sqrt{\frac{s-s_i+1}{p}}$, where $\theta>0$ and $t_{17}=\frac{1}{20}$, we have \begin{equation*} \begin{aligned} \max_{j\in S^{c(i)}}\left\| pd_n\hat{g}_j^{(i)} \right\| &\leq \frac{1}{\lambda_n}\cdot \frac{3(\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 )+3(\sqrt{\frac{s_i+1}{p}}+t_9)}{1-3(\sqrt{\frac{s_i+1}{p}}+t_{10}) }\cdot \left(\frac{\rho_{n}^{*}}{32}+\sqrt{7}C_2s\delta^{-1/2}n^{-\alpha/2}d_n^{-3/2}+\sqrt{91}\lambda_n\right)\\ &+C_2\delta^{-1/2}\lambda_n^{-1}n^{\frac{1}{2}(1-\alpha)}sd_n^{-3/2} \left[1+\frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right]^{\frac{1}{2}}\\ &+\sqrt{s-s_i}C_1\lambda_n^{-1} \frac{3(\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} )+3(\sqrt{\frac{s-s_i+1}{p}}+t_{15})}{1-3(\sqrt{\frac{s-s_i+1}{p}}+t_{16})}+t_{17}\\ \leq & \left[1+\frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right] \\ \leq & \min_{j\in S^c}\sqrt{\left\| (pd_n) \widetilde{\Psi}_j^{(i){ \mathrm{\scriptscriptstyle T} }}\widetilde{\Psi}_j^{(i)} /n\right\|}, \end{aligned} \end{equation*} under events $\eta_1$, $\eta_2$, $\cdots$, $\eta_7$. Considering the probability for the intersection of $\eta_1, \cdots, \eta_7$, we can conclude that the solution is sparsistent, i.e. $\hat{S}^{(i)}=S^{(i)}$ with probability at least $$1-2s_id_n\exp\{-\frac{C_3\delta } {\sigma^2}\cdot n^{\alpha}\}-2(p_i-s_i)d_n\exp\{-\frac{C_4\delta\lambda_n^2}{d_n\sigma^2}\cdot n^{\alpha}\},$$ where $C_3$ and $C_4$ are constants as shown in Theorem 1. This completes the proof of Theorem 1. \section*{Supplementary Materials} The supplementary material consists of Lemma S.1--S.6 and their proofs. Before the proof of Lemma S.2--S.6, we first restate Theorem C.1 of \cite{jia2015preconditioning} here for readers' convenience. \setcounter{lemma}{0} \renewcommand{\thelemma}{S.\arabic{lemma}} \begin{lemma} \label{VTV} \citep{jia2015preconditioning} Suppose that $V\in \textrm{R}^{n\times p}$ comes uniformly from stiefel-manifold. Let $V_B \in \textrm{R}^{n\times b} $ be any $b$ column of $V$. Suppose that $p-b\geq n$. For any $v_1$, $v_2$, $v_3>0$ with $\sqrt{\frac{b}{n}}+v_1<1 $, $\sqrt{\frac{b}{p}}+v_2 <1$ and $\sqrt{\frac{b}{p}}+v_3 <\frac{1}{3}$, we have $$P\left[\left\|\frac{p}{n}V_B^{{ \mathrm{\scriptscriptstyle T} }}V_B-I_b\right\|\geq \frac{3(\sqrt{\frac{b}{n}}+v_1 )+3(\sqrt{\frac{b}{p}}+v_2)}{1-3(\sqrt{\frac{b}{p}}+v_3 )}\right]\leq 2\exp\{-\frac{nv_1^2}{2}\}+2\exp\{-\frac{pv_2^2}{2}\}+\exp\{-\frac{pv_3^2}{2}\}.$$ \end{lemma} \renewcommand{\thelemma}{S.\arabic{lemma}} \begin{lemma} Suppose $(p-s)d_n\geq n$. Under Condition 2, for any $t_1$, $t_2$, $t_3>0$ with $\sqrt{\frac{sd_n}{n}}+t_1<1 $, $\sqrt{\frac{s}{p}}+t_2 <1$ and $\sqrt{\frac{s}{p}}+t_3 <\frac{1}{3}$, we have \begin{equation*} \begin{aligned} &P\left\{\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(-i)}_S}{n}\right\|\geq \frac{3(\sqrt{\frac{sd_n}{n}}+t_1 )+3(\sqrt{\frac{s}{p}}+t_2)}{1-3(\sqrt{\frac{s}{p}}+t_3 )}\right\}\\ \leq & 2\exp\{-\frac{nt_1^2}{2}\}+2\exp\{-\frac{pd_nt_2^2}{2}\}+\exp\{-\frac{pd_nt_3^2}{2}\}. \end{aligned} \end{equation*} \end{lemma} \noindent \textit{Proof of Lemma S.2.} Let $H=[\widetilde{\Psi}^{(i)}_S,\widetilde{\Psi}^{(-i)}_S]$. From Lemma \ref{VTV}, we have that \begin{gather*} P\left\{\left\|\frac{pd_n}{n} H^{{ \mathrm{\scriptscriptstyle T} }}H-I_{sd_n}\right\|\geq \frac{3(\sqrt{\frac{sd_n}{n}}+t_1 )+3(\sqrt{\frac{s}{p}}+t_2)}{1-3(\sqrt{\frac{s}{p}}+t_3) }\right\}\\ \leq 2\exp\{-\frac{nt_1^2}{2}\}+2\exp\{-\frac{pd_nt_2^2}{2}\}+\exp\{-\frac{pd_nt_3^2}{2}\}, \end{gather*} for any $t_1$, $t_2$, $t_3>0$ with $\sqrt{\frac{sd_n}{n}}+t_1 <1$, $\sqrt{\frac{s}{p}}+t_2 <1$ and $\sqrt{\frac{s}{p}}+t_3 <\frac{1}{3}$. Let $$\eta_1=\left\{\left\|\frac{pd_n}{n} H^{{ \mathrm{\scriptscriptstyle T} }}H-I_{sd_n}\right\|\leq \frac{3(\sqrt{\frac{sd_n}{n}}+t_1 )+3(\sqrt{\frac{s}{p}}+t_2)}{1-3(\sqrt{\frac{s}{p}}+t_3) }\right\}.$$ % Considering $$H^{{ \mathrm{\scriptscriptstyle T} }}H=\left(\begin{matrix}\widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S & \widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(-i)}_S \\ \widetilde{\Psi}^{(-i)T}_S \widetilde{\Psi}^{(i)}_S &\widetilde{\Psi}^{(-i)T}_S \widetilde{\Psi}^{(-i)}_S \end{matrix} \right)$$ and $$\widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(-i)}_S=\left(\begin{matrix}I_{s_i d_n}& 0_{s_id_n\times (s-s_i)d_n}\end{matrix} \right)(H^{{ \mathrm{\scriptscriptstyle T} }}H-I_{s d_n})\left(\begin{matrix}0_{s_id_n\times (s-s_i)d_n} \\ I_{(s-s_i)d_n} \end{matrix} \right),$$ we have $$\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(-i)}_S}{n}\right\|\leq \frac{3(\sqrt{\frac{sd_n}{n}}+t_1 )+3(\sqrt{\frac{s}{p}}+t_2)}{1-3(\sqrt{\frac{s}{p}}+t_3 )},$$ given the event $\eta_1$. Taking $t_1=\frac{\rho_n^*}{480C_1\sqrt{s-s_i}}-\sqrt{\frac{sd_n}{n}}>\frac{\rho_n^*}{960C_1\sqrt{s-s_i}}$, $t_2=\frac{\rho_n^*}{480C_1\sqrt{s-s_i}}-\sqrt{\frac{s}{p}}$, $t_3=\frac{1}{10}-\sqrt{\frac{s}{p}} $, we have $$P\left\{\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(-i)}_S}{n}\right\|\geq \frac{\rho_n^*}{56C_1\sqrt{s-s_i}}\right\}\leq 5\exp\{-\frac{n\rho_n^{*2}}{16200C_1^2(s-s_i)}\}\rightarrow 0.$$ \renewcommand{\thelemma}{S.\arabic{lemma}} \begin{lemma} Suppose $(p-s_i)d_n\geq n$. Under Condition 2, for any $t_4$, $t_5$, $t_6>0$ with $\sqrt{\frac{s_id_n}{n}}+t_4 <1$, $\sqrt{\frac{s_i}{p}}+t_5 <1$ and $\sqrt{\frac{s_i}{p}}+t_6 <\frac{1}{3}$, we have \begin{equation*} \begin{aligned} &P\left\{\left\|(\frac{pd_n}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S )^{-1}\right\|\geq \left[1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}\right]^{-1}\right\}\\ \leq & 2\exp\{-\frac{nt_4^2}{2}\}+2\exp\{-\frac{pd_nt_5^2}{2}\}+\exp\{-\frac{pd_nt_6^2}{2}\}. \end{aligned} \end{equation*} \end{lemma} \noindent \textit{Proof of Lemma S.3.} Lemma S.3 follows Lemma S.1 directly. Let $$\eta_2=\left\{\left\|(\frac{pd_n}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S )-I_{s_id_n}\right\|\leq \frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6 )}\right\}.$$ Then we have $$P(\eta_2)\geq 1-\frac{3(\sqrt{\frac{s_id_n}{n}}+t_4 )+3(\sqrt{\frac{s_i}{p}}+t_5)}{1-3(\sqrt{\frac{s_i}{p}}+t_6)}.$$ Taking $t_4=\frac{1}{10}-\sqrt{\frac{s_id_n}{n}}>\frac{1}{20}$, $t_5=t_6=\frac{1}{10}-\sqrt{\frac{s_i}{p}}$, we have \begin{equation*} \begin{aligned} P\left\{\left\|(\frac{pd_n}{n} \widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S )^{-1}\right\|\geq 7\right\} \leq 5\exp\{-\frac{n}{800}\}\rightarrow 0. \end{aligned} \end{equation*} \renewcommand{\thelemma}{S.\arabic{lemma}} \begin{lemma} Suppose $(p-s_i-1)d_n\geq n$. Under Condition 2, for any $t_8$, $t_9$, $t_{10}>0$ with $\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 <1$, $\sqrt{\frac{s_i+1}{p}}+t_9 <1$ and $\sqrt{\frac{s_i+1}{p}}+t_{10} <\frac{1}{3}$, we have \begin{equation*} \begin{aligned} &P\left\{\max_{j\in S^{c(i)}}\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(i)}_j}{n}\right\|\geq \frac{3(\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 )+3(\sqrt{\frac{s_i+1}{p}}+t_9)}{1-3(\sqrt{\frac{s_i+1}{p}}+t_{10}) }\right\}\\ \leq & (p_i-s_i)\left(2\exp\{-\frac{nt_8^2}{2}\}+2\exp\{-\frac{pd_nt_9^2}{2}\}+\exp\{-\frac{pd_nt_{10}^2}{2}\}\right). \end{aligned} \end{equation*} \end{lemma} \noindent \textit{Proof of Lemma S.4.} First, let $G=[\widetilde{\Psi}^{(i)}_S,\widetilde{\Psi}^{(i)}_j]$, $j\in S^{c(i)}$. From Lemma \ref{VTV}, we have that \begin{equation*} \begin{aligned} &\textrm{P}\left\{\left\|\frac{pd_n}{n} G^{{ \mathrm{\scriptscriptstyle T} }}G-I_{(s_i+1)d_n}\right\|\geq \frac{3(\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 )+3(\sqrt{\frac{s_i+1}{p}}+t_9)}{1-3(\sqrt{\frac{s_i+1}{p}}+t_{10}) }\right\} \\ &\leq 2\exp\{-\frac{nt_8^2}{2}\}+2\exp\{-\frac{pd_nt_9^2}{2}\}+\exp\{-\frac{pd_nt_{10}^2}{2}\}, \end{aligned} \end{equation*} for any $t_8$, $t_9$, $t_{10}>0$ with $\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 <1$, $\sqrt{\frac{s_i+1}{p}}+t_9 <1$ and $\sqrt{\frac{s_i+1}{p}}+t_{10} <\frac{1}{3}$. Then, considering $$G^{{ \mathrm{\scriptscriptstyle T} }}G=\left(\begin{matrix}\widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_S & \widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_j \\ \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(i)}_S &\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(i)}_j \end{matrix} \right)$$ and $$\widetilde{\Psi}^{(i)T}_S \widetilde{\Psi}^{(i)}_j=\left(\begin{matrix}I_{s_i d_n}& 0_{s_id_n\times d_n}\end{matrix} \right)(G^{{ \mathrm{\scriptscriptstyle T} }}G-I_{(s_i+1) d_n})\left(\begin{matrix}0_{s_id_n\times d_n} \\ I_{d_n} \end{matrix} \right),$$ and let $$\eta_4=\left\{\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(i)}_j}{n}\right\|\leq \frac{3(\sqrt{\frac{(s_i+1)d_n}{n}}+t_8 )+3(\sqrt{\frac{s_i+1}{p}}+t_9)}{1-3(\sqrt{\frac{s_i+1}{p}}+t_{10}) }\right\},$$ we have $$\textrm{P}(\eta_4)\geq 1-2\exp\{-\frac{nt_{8}^2}{2}\}-2\exp\{-\frac{pd_nt_{9}^2}{2}\}-\exp\{-\frac{pd_nt_{10}^2}{2}\}.$$ Taking $t_{8}=\frac{\lambda_n}{60\rho_n^{*}}-\sqrt{\frac{(s_i+1)d_n}{n}}>\frac{\lambda_n}{120\rho_n^{*}}$, $t_{9}=\frac{\lambda_n}{60\rho_n^{*}}-\sqrt{\frac{s_i+1}{p}}$, $t_{10}=\frac{1}{10}-\sqrt{\frac{s_i+1}{p}}$, we can derive that \begin{equation*} \begin{aligned} P\left\{\max_{j\in S^{c(i)}}\left\|\frac{pd_n\widetilde{\Psi}^{(i)T}_S\widetilde{\Psi}^{(i)}_j}{n}\right\|\geq \frac{\lambda_n}{7\rho^{*}_n}\right\} \leq 5(p_i-s_i)\exp\{-\frac{n\lambda_n^2}{2880\rho_n^{*}}\}\rightarrow 0. \end{aligned} \end{equation*} \renewcommand{\thelemma}{S.\arabic{lemma}} \begin{lemma} Suppose $(p-1)d_n\geq n$. Under Condition 2, for any $t_{11}$, $t_{12}$, $t_{13}>0$ with $\sqrt{\frac{d_n}{n}}+t_{11} <1$, $\sqrt{\frac{1}{p}}+t_{12} <1$ and $\sqrt{\frac{1}{p}}+t_{13} <\frac{1}{3}$, and $j\in S^{c(i)}$, we have \begin{equation*} \begin{aligned} &P\left\{\left\|(\frac{pd_n}{n} \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(i)}_j )-I_{d_n}\right\|\geq \frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right\}\\ \leq & 2\exp\{-\frac{nt_{11}^2}{2}\}+2\exp\{-\frac{pd_nt_{12}^2}{2}\}+\exp\{-\frac{pd_nt_{13}^2}{2}\}. \end{aligned} \end{equation*} \end{lemma} \noindent \textit{Proof of Lemma S.5.} Lemma S.5 follows Lemma S.1 straightly. Then let \begin{equation*} \begin{aligned} \eta_5=\left\{\left\| \frac{\sqrt{pd_n}}{\sqrt{n}}\widetilde{\Psi}^{(i)}_j \right\| \leq \left[1+\frac{3(\sqrt{\frac{d_n}{n}}+t_{11} )+3(\sqrt{\frac{1}{p}}+t_{12})}{1-3(\sqrt{\frac{1}{p}}+t_{13} )}\right]^{\frac{1}{2}}\right\}, \end{aligned} \end{equation*} we have $$\textrm{P}(\eta_5)\geq 1-2\exp\{-\frac{nt_{11}^2}{2}\}-2\exp\{-\frac{pd_nt_{12}^2}{2}\}-\exp\{-\frac{pd_nt_{13}^2}{2}\}.$$ Taking $t_{11}=\frac{1}{10}-\sqrt{\frac{d_n}{n}}$, $t_{12}=\frac{1}{10}-\sqrt{\frac{1}{p}}$, $t_{13}=\frac{1}{10}-\sqrt{\frac{1}{p}}$, it can be derived that $\textrm{P}(\eta_5)\rightarrow 1$. \renewcommand{\thelemma}{S.\arabic{lemma}} \begin{lemma} Suppose $(p-s+s_i-1)d_n\geq n$. Under Condition 2, for any $t_{14}$, $t_{15}$, $t_{16}>0$ with $\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} <1$, $\sqrt{\frac{s-s_i+1}{p}}+t_{15} <1$ and $\sqrt{\frac{s-s_i+1}{p}}+t_{16} <\frac{1}{3}$, and $j\in S^{c(i)}$, we have \begin{equation*} \begin{aligned} &P\left\{\left\|\frac{pd_n\widetilde{\Psi}^{(-i)T}_S\widetilde{\Psi}^{(i)}_j}{n}\right\|\leq \frac{3(\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} )+3(\sqrt{\frac{s-s_i+1}{p}}+t_{15})}{1-3(\sqrt{\frac{s-s_i+1}{p}}+t_{16})}\right\}\\ \leq & 2\exp\{-\frac{nt_{14}^2}{2}\}+2\exp\{-\frac{pd_nt_{15}^2}{2}\}+\exp\{-\frac{pd_nt_{16}^2}{2}\}. \end{aligned} \end{equation*} \end{lemma} \noindent \textit{Proof of Lemma S.6.} Let $K=[\widetilde{\Psi}^{(-i)}_S,\widetilde{\Psi}^{(i)}_j]$. From Lemma S.1, we have that \begin{equation*} \begin{aligned} &\textrm{P}\left\{\left\|\frac{pd_n}{n} K^{{ \mathrm{\scriptscriptstyle T} }}K-I_{(s-s_i+1)d_n}\right\|\geq \frac{3(\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} )+3(\sqrt{\frac{s-s_i+1}{p}}+t_{15})}{1-3(\sqrt{\frac{s-s_i+1}{p}}+t_{16}) }\right\} \\ &\leq 2\exp\{-\frac{nt_{14}^2}{2}\}+2\exp\{-\frac{pd_nt_{15}^2}{2}\}+\exp\{-\frac{pd_nt_{16}^2}{2}\}, \end{aligned} \end{equation*} for any $t_{14}$, $t_{15}$, $t_{16}>0$ with $\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} <1$, $\sqrt{\frac{s-s_i+1}{p}}+t_{15} <1$ and $\sqrt{\frac{s-s_i+1}{p}}+t_{16} <\frac{1}{3}$. Considering $$K^{{ \mathrm{\scriptscriptstyle T} }}K=\left(\begin{matrix}\widetilde{\Psi}^{(-i)T}_S \widetilde{\Psi}^{(-i)}_S & \widetilde{\Psi}^{(-i)T}_S \widetilde{\Psi}^{(i)}_j \\ \widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(-i)}_S &\widetilde{\Psi}^{(i){ \mathrm{\scriptscriptstyle T} }}_j \widetilde{\Psi}^{(i)}_j \end{matrix} \right)$$ and $$\widetilde{\Psi}^{(-i)T}_S \widetilde{\Psi}^{(i)}_j=\left(\begin{matrix}I_{(s-s_i) d_n}& 0_{(s-s_i)d_n\times d_n}\end{matrix} \right)(K^{{ \mathrm{\scriptscriptstyle T} }}K-I_{(s-s_i+1) d_n})\left(\begin{matrix}0_{(s-s_i)d_n\times d_n} \\ I_{d_n} \end{matrix} \right),$$ and denote $$\eta_6=\left\{\left\|\frac{pd_n\widetilde{\Psi}^{(-i)T}_S\widetilde{\Psi}^{(i)}_j}{n}\right\|\leq \frac{3(\sqrt{\frac{(s-s_i+1)d_n}{n}}+t_{14} )+3(\sqrt{\frac{s-s_i+1}{p}}+t_{15})}{1-3(\sqrt{\frac{s-s_i+1}{p}}+t_{16})}\right\},$$ we have $$\textrm{P}(\eta_6)\geq 1-2\exp\{-\frac{nt_{14}^2}{2}\}-2\exp\{-\frac{pd_nt_{15}^2}{2}\}-\exp\{-\frac{pd_nt_{16}^2}{2}\}.$$ \bibliographystyle{agsm}
\section*{Methods}\label{sec11} \textit{The XXZ Model} - For our numerical results we used state-of-the-art Matrix Product State calculations for the XXZ $s = 1/2$ limit of Eq. (\ref{Eq:GeneralHamiltonian}). The Hamiltonian in this limit reads \begin{equation} H_{\rm XXZ}(\mathcal{G}) = \frac{1}{N_{E}}\sum_{v,v' \in E}-J(\hat{\sigma}_{v}^{x}\hat{\sigma}^{x}_{v'} + \hat{\sigma}_{v}^{y}\hat{\sigma}^{y}_{v'}) + \Delta \hat{\sigma}^{z}_{v}\hat{\sigma}^{z}_{v'}, \label{Eq:XXZHamiltonian} \end{equation} which corresponds to setting, in Eq. (\ref{Eq:GeneralHamiltonian}), $J_{x} = J_{y} = -J$, $J_{z} = \Delta$, $\Vec{\beta} = 0$ and $s^{\alpha}_{v} = \sigma^{\alpha}_{v}$ --- dropping the factor of $1/2$ in front of the Pauli matrix $\sigma^{\alpha}_{v}$ for simplicity. We restrict ourselves to $\Delta \geq 0$, set $J = 1$ and define order parameters for the XY and anti-ferromagnetic (AFM) phases respectively via \begin{align} &C_{\rm AFM} = \frac{1}{N_{E}}\sum_{(v,v') \in E } \langle \sigma^{z}_{v}\sigma^{z}_{v'} \rangle , \notag \\ &C_{\rm XY} = \frac{1}{N_{E}}\sum_{\substack{v,v'=1 \\ v > v'}}^{L} \langle \sigma^{x}_{v}\sigma^{x}_{v'}+\sigma^{y}_{v}\sigma^{y}_{v'} \rangle. \label{Eq:OrderParameters} \end{align} These take a non-zero value in their respective phases, vanish in the opposing phase and, importantly, can be calculated for the ground state on \textit{any} graph. The XXZ Hamiltonian has rotational symmetry around the spin-$z$ axis meaning $\langle \sigma^{x}_{v}\sigma^{x}_{v} \rangle = \langle \sigma^{y}_{v}\sigma^{y}_{v} \rangle$ for the ground state. The parameter $C_{\rm XY}$ thus quantifies the simultaneous off-diagonal order in the $x$ and $y$ degrees of freedom. \par In this work we also introduce the Shannon Entropy of the spin-correlations in a given state as \begin{equation} H\left(\langle \sigma^{\alpha}_{v}\sigma^{\alpha}_{v'}\rangle \right) = \sum_{i = 0}^{n-1}p_{i}\log_{2}(p_{i}), \end{equation} where $p_{i}$ is the fraction of elements of the $L \times L$ matrix $\langle \sigma^{\alpha}_{v} \sigma^{\alpha}_{v'}\rangle$ which are between $-1 + 2i/n$ and $-1 + 2(i+1)/n$. The integer $n$ is the number of bins used to `bin up' the matrix elements. We use $n = 256$ throughout in order to make the connection between $\langle \sigma^{\alpha}_{v} \sigma^{\alpha}_{v'}\rangle$ and a grayscale image of the correlations in the system. This entropy measure is bounded as $0 \leq H(\langle \sigma^{\alpha}_{v}\sigma^{\alpha}_{v'}\rangle) \leq \log_{2}(n)$ and can be interpreted as the amount of information required to encode the distribution or image of off-diagonal correlations in a state. \par Our DMRG calculations often involve ensemble-averaging the ground state properties over a series of random graphs drawn from a corresponding ensemble for a given $\Delta$ and $L$. In order to assess the convergence of the order parameters $C_{\rm XY}$ and $C_{\rm AFM}$ to a well defined thermodynamic limit we calculate their variances ${\rm Var}(C_{\rm XY})$ and ${\rm Var}(C_{\rm AFM})$. These are defined as \begin{equation} {\rm Var}(C) = \frac{1}{n-1}\sum_{i=1}^{n}(C^{i} - \bar{C})^{2}, \end{equation} for $n$ draws of the graph from its ensemble and where $\bar{C}$ is the average of the ground state order parameter for these different draws. For a given $L$ and $\Delta$, the variance then tells us the fluctuation in the ground state properties when averaging over random instances of the given graph ensemble. As the order parameters have been appropriately normalised by the size of the graph the variance will allow us to infer the convergence of the ground state properties in the thermodynamic limit. We discuss explicit details of our Matrix Product State calculations and implementation in the Supplemental Material. We also provide plots and discussion on the truncation errors which occured during our simulations. \textit{Graph Construction. Non-trivial Cut} - In the main text we introduced the non-trivial cut graph where we assumed nothing but that there exists some bi-partition of the $L$ vertices into two sets, size $\lambda L$ and $(1-\lambda)L$, and where the cut-size $\alpha$ (i.e. the ratio of the number of edges between the two sets to the total number of edges in the graph $N_{E}$) is not equal to its expected value $2 \lambda (1-\lambda)$. We can construct such a graph by taking $L$ sites, partitioning them into the two corresponding sets and randomly assigning edges between sites in the same set with probability $p_{1}$ and between sites in different sets with probability $p_{2}$. The values of $\alpha$ and $N_{E}$ are then approximately \begin{align} &N_{E} \approx p_{1}(\lambda^{2} -\lambda + 1/2) + p_{2}\lambda(1-\lambda)L^{2}, \notag \\ &\alpha \approx \frac{2p_{2}\lambda(1-\lambda)}{p_{1}\lambda^{2} + p_{1}(1-\lambda)^{2} + 2p_{2}\lambda(1-\lambda)}, \end{align} which becomes exact as $L \rightarrow \infty$, with each unique pair of values of $p_{1}$ and $p_{2}$ uniquely specifying $N_{E}$ and $\alpha$. As a result, the parameters $p_{1}$ and $p_{2}$ can be interchanged freely with $\alpha$ and $N_{E}$ in this limit and lead us to define an instance of this graph as $\mathcal{G}(\lambda, p_{1}, p_{2})$. Provided $p_{1} \neq p_{2}$ and $0 < \lambda < 1$ then we find $\alpha \neq 2 \lambda (1-\lambda)$, meaning $\mathcal{G}(\lambda, p_{1}, p_{2})$ has a non-trivial cut. Our construction routine --- given its independent treatment of edges --- will uniformly sample over all graphs with $L$ vertices, a number of edges $N_{E}$ and non-trivial cut-size $\alpha$. \par \textit{Uniform Variate Graph} - We also introduced the uniform variate graph where the degree of each site follows the discrete uniform distribution $\mathcal{U}(L/4, 3L/4)$. We have used lower and upper bounds sufficiently separated from $0$ and $L - 1$ to avoid creating non-graphical degree distributions. To generate a given graph from this ensemble, we draw the degree distribution by randomly generating the degree of each site --- repeating until sum of the degrees is even --- and then using the Havel Hakimi (HH) \cite{HavelHakimi} algorithm to generate a graph with the given degree distribution. Such a routine does not sample uniformly from the space of all graphs with degrees drawn from the distribution $\mathcal{U}(L/4, 3L/4)$ due to the high assortativity \cite{Assortativity1} bias in the HH algoritithm. We are, however, unaware of an algorithm which can generate unbiased samples of dense, inhomogeneous graphs with a given degree distribution. Hence, our results are for the ensemble of graphs with degrees drawn from the distribution $\mathcal{U}(L/4, 3L/4)$ and generated by the HH algorithm. \section*{Supplementary information} Supplementary Material is included with this article. \section*{Acknowledgements} We would like to acknowledge use of the Tensor Network Python (TeNPy) library \cite{TENPY1} for our MPS simulations. These simulations were run on the University of Oxford Advanced Research Computing (ARC) facility and involved over over $100,000$ hours of exclusive use of nodes each equipped a with 48 core 2.9Ghz Intel Cascade Lake Processor. \section*{Declarations} \begin{itemize} \item DJ and JT acknowledge funding from EPSRC grant EP/P009565/1. DJ also acknowledges funding from the Cluster of Excellence ‘Advanced Imaging of Matter’ of the Deutsche Forschungsgemeinschaft (DFG) - EXC 2056 - project ID 390715994. AS acknowledges funding from the UK Engineering and Physical Sciences Research Council as well as from the Smith-Westlike scholarship. \item There are no competing interests. \item Code and data is freely available from the authors upon reasonable request. \item JT provided the idea for the project, formulated the proof and wrote the first draft the manuscript. JT, AS and AA ran the numerical simulations and analysed the data. JT and DJ edited the manuscript with help from AS and AA. All authors contributed substantially to discussions on the results and ideas contained therein. DJ oversaw and managed the overall project. \end{itemize}
\section{Physics Informed Neural Networks - Introduction} Physics Informed Neural Networks (PINNs) are commonly networks that are deployed to map the spatio-temporal coordinates to the field variables associated with a well defined Partial Differential Equation (PDE) or a family of PDEs. The networks are trained in an unsupervised manner, constrained with modified loss functions that embed the dynamics prescribed by the PDE in the form of residuals, the initial distribution of the field variables and the associated boundary conditions \cite{RAISSI2019}. \\ Consider a nonlinear Partial Differential Equation of the the general form: \begin{equation} \Gamma(u, t) + \Lambda(u, X) = 0,\quad X \ \epsilon\ \Omega,\ t\ \epsilon\ [0, T] \label{eq: gen_pde} \end{equation} \newline where $t$ represents the temporal coordinate time confined by a domain $[0,T]$, $X$ represents the spatial coordinates which belongs to the space $\Omega$, a subset of $\mathbb{R}^D$ ($D$ represents the number of spatial dimensions), $u(X,t)$ refers to the field variable(s) of interest that are being modelled by the PDE. $\Gamma$ is a function that represents the amalgamation of all the partial derivatives of the field variable with respect to time, while $\Lambda $ is a function that accounts for all other terms within the PDE, including spatial derivatives or eventual non-linear terms. \\ To further elucidate the formulation given in equation \ref{eq: gen_pde}, consider the two dimensional Wave equation, $\pdv[2]{u}{t} = c\big(\pdv[2]{u}{x} + \pdv[2]{u}{y}\big)$, the equation can be compared to the formulation as: $\Gamma(u,t) = \pdv[2]{u}{t}$, while $\Lambda(u, X) = - c\big(\pdv[2]{u}{x} + \pdv[2]{u}{y}\big)$. \\ To obtain well-defined solutions of a system of PDEs, the equations are coupled with an initial condition that describes the initial distribution of the field variables as well as the boundary conditions: \begin{align} \text{Initial Condition: } u(X_i, 0) = f(X_i),\ X_i\ \epsilon\ \Omega\label{eq: ic} \\ \text{Boundary Condition: } u(X_b, t) = g(X_b, t),\ X_b\ \epsilon\ \partial\Omega,\ t\ \epsilon\ [0, T] \label{eq: bc} \end{align} where, $f$ and $g$ are arbitrary functions, and where $\partial\Omega$ is the boundary of the domain $\Omega$. \\ \begin{figure}[h!] \centering \includegraphics[scale=0.35]{images/NN_arch.png} \caption{Layout of a Physics Informed Neural Network mapping from the spatio-temporal input space to the output field space.} \label{fig:PINN_Arch} \end{figure} In order to solve the well-defined PDE as given by equations \ref{eq: gen_pde}, \ref{eq: ic} and \ref{eq: bc} using a PINN approach, a fully-connected neural network with nonlinear activation functions as given in figure \ref{fig:PINN_Arch} is constructed. The network takes in three inputs, the spatio-temporal coordinates $x,y,t$ and outputs the field variable $u$. The network is trained in an unsupervised manner by minimising the residual error associated with the PDE, initial and boundary conditions by way of a modified loss function. This differs from supervised learning scenarios, where the loss function is governed by the reconstruction error, defined by the deviation of the neural network output from the true output as given in the training dataset. However, for a PINN we do not employ a labelled dataset but instead measure the loss by the deviation of the neural network output from the governing equations. The loss function of a PINN can be given as: \begin{equation} \text{[Training Loss] = [Domain Loss] + [Initial Loss] + [Boundary Loss]}. \label{eq: training_loss} \end{equation} Substituting equations \ref{eq: gen_pde}, \ref{eq: bc} and \ref{eq: ic} into equation \ref{eq: training_loss}, we obtain: \begin{equation} \begin{split} \text{[Training Loss]} = \Gamma(\tilde{u}, t) + \Lambda(\tilde{u}, X_d) + \\ \tilde{u}(X_i, 0) - f(X) + \\ \tilde{u}(X_b, t) - g(Y, t) \end{split} \label{eq: training_loss_expanded} \end{equation} where $\tilde{u}$ is the neural network output and $X_i, X_b, X_d$ coupled with the appropriate $t$ are the neural network inputs. \\ Equation \ref{eq: training_loss_expanded} estimates how well the neural network satisfies the PDE and the its associated constraints. In order to estimate the local partial derivatives of the field variables in space and time as found in equation \ref{eq: training_loss_expanded}, Automatic Differentiation tools are employed \cite{BAYDIN2018}. \subsection{PINNs over Numerical Schemes} Traditional numerical methods (finite difference, finite element methods) build solutions to PDEs bounded to a mesh, and inherently provide discretised solutions. PINNs on the other hand are bounded by the domain of interest that the input spatio-temporal coordinates $(X,t)$ span, hence rendering PINN solutions to be mesh-free and continuous. In addition, traditional numerical methods require precise implementation of a numerical solver, which can vary significantly depending on the PDEs and coordinates systems of the problem, while PINNs have a standard setup which remains mostly unchanged except for the formulation of the loss function as we move across various cases and physics-scenarios. PINNs are also invariant to change in the coordinate system as these are automatically accounted for within the loss function. Finally, traditional numerical schemes often pose significant difficulty in being parallelised across devices, whereas a PINN, being reliant on a neural network architecture, can easily be deployed across an ensemble of GPUs and convergence to solution can be accelerated. \\ \subsection{Visualising the Loss Landscape} Empirical understandings of the efficacy of the trained model with respect to the minima associated with the objective function, can be extensively visualised by mapping the loss landscape around the minimiser to which the PINN. We perform this by projecting the weights of the trained network along two orthogonal directions (\cite{GOLDSTEIN2016}, Lemma 5). The model being updated with the weight projections are then evaluated within the criteria of the loss function across this 2D projection space and mapped. For an extensive description of the visualisation method refer \cite{LI2018}. \\ A network initialised with parameters $\theta$, are trained to a model state characterised by $\theta^*$. Two orthogonal vectors are chosen in this parameter space $\delta_1$ and $\delta_2$. The weight parameters are projected as: \begin{equation} \theta^*_{proj} = \theta^* + \alpha\delta_1 + \beta\delta_2 \end{equation} In order to deal with the scale invariance properties of neural networks, we deploy a filter-wise normalisation, ensuring the directional weights $\delta_1$ and $\delta_2$ has the same norm as that of the PINN weights $\theta^*$ \cite{LI2018}. \subsection{Complexities and Errors} Neural Networks with sufficient neurons can simultaneously and uniformly approximate any function and its partial derivatives \cite{LU2019}. However, when we fixate on neural network of a specific architecture, we constrain and limit the space of nonlinear mappings that can be performed by the network (approximation error). The training dataset (i.e. the input points gathered across the domain) contributes to the second limiting factor. The solution to which the network converges to is governed by these points, and often might disproportionately represent the nonlinear mappings associated with the PDE (generalisation error). Hence the global minimum associated with the training dataset might not adequately represent the solution of the well-defined PDE which occupies a unique position in the loss landscape. Training the neural network towards the PDE solution often typically relies on stochastic gradient descent methods which engage in non-convex optimisation, often leading to the network getting stuck in slightly favourable local minima \cite{BLUM1992} (optimisation error). Bottou \textit{et al.} demonstrated that in a small-scale learning problem there exists a trade-off between approximation and estimation \cite{BOTTOU2008}. Lu \textit{et al.} explored this relationship within a PINN framework and showcased that a PINN solution carries with it inherent errors which can be expressed as \cite{LU2019}: \begin{equation} \epsilon = \epsilon_{approx} + \epsilon_{general} + \epsilon_{optim} \end{equation} \newline A well-defined PDE often has a unique solution that is prescribed by the initial-boundary value problem setup. For a PINN to effectively converge to the solution, it requires achieving this unique point in the arbitrary loss landscape that is defined by the network architecture, training dataset and the loss function together in conjunction. Loss landscapes facilitated by complex multi-objective loss functions (as seen in equation \ref{eq: training_loss_expanded}) involving local and higher order derivatives often have complicated Pareto-optimal fronts \cite{NGATCHOU2005}. These multi-objective loss entities tend to compete against each other within a restricted Pareto front with little to no room for movement. Non-convex optimisation poses a certain computational intractability \cite{BLUM1992}, PINNs guided by the PDE constraints often get stuck in local minima found across this tumultuous loss landscape, leading to large optimisation errors. \\ Since the objective of a PINN is to solve for a well-defined PDE, it would be in our interest to ignore the generalisation error and train the model to develop a heavy bias towards the solution. This bias towards the solution ignoring the generalisation error leads to a decrease in the approximation error allowing for better convergence. A PINN can be biased towards the solution by adding simulation/experimental data as a regulator within the training regime. Simulation data points, either sparsely sampled or gathered from a coarse solver for this purpose can be employed to form a reconstruction error, moving the optimisation task from that solely involving unsupervised learning to a hybrid regime that accommodates for unsupervised and supervised learning. \\ The paper is structured as follows: In section \ref{sparse pinns}, we explore the impact of regulating the PINNs with sparsely sampled simulation data, discuss how that affects the performance as well as the topological changes made to the loss landscape. We also explore the changes that occurs as we increase the amount of sparse data made available within the training regime. In section \ref{coarse pinns}, we explore the impact data gathered from coarse simulations can have in training PINNs to solve the PDE on a non-discretised domain. Section \ref{experimental data} discusses the impact psuedo-experimental data gathered from a fixed point in the spatial domain, akin to a diagnostic tool within an experimental setup can have on fine-tuning the PINN. Finally in section \label{conclusion}, we conclude the paper by summarising the results of our experiments, highlight our contributions, engage in a discussion about the advantages and disadvantages as well as provide an outlook to future work. \\ \section{Sparse Regulated PINNs} \label{sparse pinns} A sparse regulated PINN is identical in architecture to a Vanilla PINN as demonstrated in \cite{RAISSI2019}, \cite{LU2019}, \cite{HENNIGH2020}, \cite{SUN2020}, with the the only modification being in the formulation of the loss function. In addition to the three PDE constraints as demonstrated in equation \ref{eq: training_loss_expanded}, we have a new objective added to it, reconstruction loss of sparse simulation data points. The loss function for a sparse regulated PINN is expressed as: \begin{equation} \begin{split} \text{[Sparse Training Loss]} = \Gamma(\tilde{u}, t) + \Lambda(\tilde{u}, X_d) + \\ \tilde{u}(X_i, 0) - f(X_d) + \\ \tilde{u}(X_b, t) - g(X_b, t) + \\ \tilde{u}(X_s,t) - u(X_s,t) \end{split} \label{eq: sparse_training_loss} \end{equation} where, in addition to the terms described in equation \ref{eq: training_loss_expanded}, $\tilde{u}(X_s,t)$ is the neural network output for the sparse data points $X_s$, while $u(X_s,t)$ is the actual solution representing the field variable at space $X_s$ and time $t$. \\ Randomly gathering relatively small portions of sparsely located solution data from across the domain has vast impacts on reducing the approximation error. But it turns out that it is not only the approximation error that is reduced by regulating the training with sparse data. They work to decrease the optimisation error as well. Optimisation error is decreased as the sparse data points fed in as a regulator within the training regime morph the topology of the loss landscape, making it easily traversable for the optimiser. This holds true only of the sparse data is accurate, however if it is generated from a less-refined model, we must account for coarseness of the fit by weighing the loss function. \\ \subsection{Examples} For all experiments run on PINNs and Sparse regulated PINNs we use the same architecture as found in figure \ref{fig:PINN_Arch}. For each simulation, we deploy a ResNet based architecture with two blocks \cite{HE2015}, each block consisting of two fully connected layers with 64 neurons each. The ResNet configuration has been chosen to avoid dealing with issues of vanishing gradients as we require differentiating to higher order derivatives to satisfy the PDE criterion. A fully connected layer is deployed as an interface between the residual blocks and the output layer. We employ a Tanh activation function after each fully connected layer and block to effectively model non-linearity. Tanh functions are suited for PINNs as they are able to preserve higher order gradients \cite{RAMACHANDRAN2017}. All networks (except for Burgers') are trained for 20000 epochs with the Adam optimiser \cite{KINGMA2017} using a step scheduler for learning rate starting at 1e-3 and decreasing by a gamma factor of 0.9 every 5000 steps. A Quasi-Monte Carlo method is applied across each entity of the loss function to be able to integrate over the respective domains for discrete batches of the spatio-temporal inputs \cite{HENNIGH2020}. \subsubsection{Burgers' Equation} Consider the one dimensional Burgers' equation: \begin{align*} \pdv{u}{t} + u\pdv{u}{x} - \pdv[3]{u}{x}, \quad x \ \epsilon\ \Omega,\ t\ \epsilon\ [0, 1] \\ u(x,t=0) = -\sin(\pi x) + 1/\cosh(x) \\ \end{align*} where, $\Omega\ \epsilon\ [-1,1]$, $\nu = 0.01/\pi$ and bounded periodically.\\ The solution for the above equation is built using a spectral solver implemented in python. Comparing the solutions across the Vanilla PINN and Sparse regulated PINNs trained with 1$\%$ sparse data (as seen in figure \ref{fig:wave_solution}), it is evidently clear how the sparse data helps achieve better performance. \begin{figure}[h!] \centering \includegraphics[scale=0.25]{images/Burgers.png} \caption{PINN solutions visualised and compared to the numerical solution. The plot shows the network outputs at the time = 0 (initial), time=0.5 (middle) and time=1.0 (final). The Vanilla PINN trains to a L2 Error of 0.078 while the Sparse Regulated PINN converges to 0.001. The training was terminated after 5000 epochs. } \label{fig:wave_solution} \end{figure} The difference in performance can be further substantiated once we map the loss landscape associated with each PINN as seen in figure \ref{fig:landscapes_burgers}. The influence of the sparse data regulates and accentuates the crests and troughs of the landscape, helping the minimiser to reach a better minima. \begin{figure}[h!] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/Burgers_0.png} \caption{No Sparse Data} \label{sparse_0} \end{subfigure} \hfill \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.4]{images/Burgers_1.png} \caption{1\% Sparse Data} \label{sparse_1} \end{subfigure} \caption{Loss landscapes visualised of trained PINNs solving the 1D Burgers equation with and without sparse data representations. Figure \ref{sparse_0} shows a clear minima with a relatively bumpy loss landscape for the case of a Vanilla PINN, but in figure \ref{sparse_1} when sparse data representations are introduced the landscape becomes more defined. The X and Y axes represent projection of the trained neural network within orthogonal directions within the weight space, while the Z axis represents the logarithm of the loss value along these projections. } \label{fig:landscapes_burgers} \end{figure} \newpage \subsubsection{Wave Equation} Consider the two dimensional wave equation: \begin{align*} \pdv[2]{u}{t} - \bigg(\pdv[2]{u}{x} + \pdv[2]{u}{y}\bigg) = 0 , \quad x,y \ \epsilon\ \Omega,\ t\ \epsilon\ [0, 1]\\ u(x,y,t=0) = \exp^{-40((x-4)^2 + y^2)} \\ \pdv{u(x,y,t=0)}{t} = 0\\ u(x,y,t) = 0, \quad x,y \ \epsilon\ \partial\Omega,\ t\ \epsilon\ [0, 1] \end{align*} where, $\Omega\ \epsilon\ [-1,1]$ \\ The solution for the above equation is built by deploying a spectral solver that uses a leapfrog method for time discretisation and a Chebyshev spectral method on tensor product grid for spatial discretisation \cite{wave_spectral}.\\ \begin{figure}[h!] \centering \includegraphics[scale=0.5]{images/wave_soln.png} \caption{PINN solutions visualised and compared to the numerical solution. The plot shows the network outputs at the time = 0 (initial), time=0.5 (middle) and time=1.0 (final). The Vanilla PINN trains to a L2 Error of $5\times10^{-4}$ while the Sparse Regulated PINN converges to $3\times10^{-4}$.} \label{fig:wave_solution} \end{figure} Initially we train a vanilla PINN, optimised by enforcing the PDE constraints alone. This is followed up by training a sparse regulated PINN which in addition to the PDE constraints accommodates 1 percent of randomly sampled solution data to the training regime. Upon evaluating the loss landscape of both the trained networks and visualising we can see that the sparse data representations introduce necessary topological changes to the landscape creating succinct features making it easier for the minimiser to traverse and reach the minima. \\ \begin{figure}[h!] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/wave_sparse_0.png} \caption{No Sparse Data} \label{sparse_0} \end{subfigure} \hfill \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/wave_sparse_1.png} \caption{1\% Sparse Data} \label{sparse_1} \end{subfigure} \caption{Loss landscapes visualised of trained PINNs solving the 2D Wave Equation with and without sparse data representations. Figure \ref{sparse_0} shows a clear minima with a relatively bumpy loss landscape for the case of a Vanilla PINN, but in figure \ref{sparse_1} when sparse data representations are introduced the landscape becomes more defined with sharper minima. The X and Y axes represent projection of the trained neural network within orthogonal directions within the weight space, while the Z axis represents the logarithm of the loss value along these projections. } \label{fig:landscapes} \end{figure} \subsubsection{Navier-Stokes Equation} Consider the two dimensional Navier-Stokes equation: \begin{align*} \pdv{u}{t} + u\pdv{u}{x} + v\pdv{u}{y} + \frac{1}{\rho}\pdv{p}{x} - \nu\bigg(\pdv[2]{u}{x} + \pdv[2]{u}{x}\bigg) = 0 \\ \pdv{v}{t} + u\pdv{v}{x} + v\pdv{v}{y} + \frac{1}{\rho}\pdv{p}{y} - \nu\bigg(\pdv[2]{v}{x} + \pdv[2]{v}{x}\bigg) = 0 \\ \pdv[2]{p}{x} + \pdv[2]{p}{y} + \rho\bigg( \big(\pdv{u}{x}\big)^2 + 2\pdv{u}{x}\pdv{v}{y} + \big(\pdv{v}{y}\big)^2\bigg) =0 \\ \quad x,y \ \epsilon\ \Omega,\ t\ \epsilon\ [0, 1] \end{align*} where, $\Omega\ \epsilon\ [0,20]$x$[0,10]$ and $ \nu = 0.04, \rho=1.0, Re = 50$\\ The equations are employed along with the necessary initial and boundary conditions to model fluid flow around a rectangular block. The numerical solution is built using an explicit finite difference solver implemented with the FTCS scheme \cite{TANNEHILL1997}. \begin{figure}[h!] \centering \includegraphics[scale=0.5]{images/ns_block.png} \caption{PINN solutions visualised and compared to the numerical solution. The plot shows the network outputs at the time = 0.01 (early), time=0.5 (middle) and time=1.0 (final). The Vanilla PINN trains to a L2 Error of 8.237 while the Sparse Regulated PINN converges to 0.2331.} \label{fig:ns_solution} \end{figure} For the given PDE setup we notice that the Vanilla PINN struggles to converge towards the solution and is only capable of identifying the mere presence of the block, whereas the sparse regulated PINN models a lot more and gets to the vicinity of the true solution. The convergence properties of both the vanilla and sparse regulated PINNs can be characterised by looking at the topology of the loss landscape. \\ \begin{figure}[h!] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/NS_LL_0.png} \caption{No Sparse Data} \label{sparse_0_ns} \end{subfigure} \hfill \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/NS_LL_1.png} \caption{1\% Sparse Data} \label{sparse_1_ns} \end{subfigure} \caption{Loss landscapes visualised of trained PINNs solving the 2D Navier-Stokes modelling flow around block with and without sparse data representations. Figure \ref{sparse_0_ns}, there is no minima in sight and the model would require further extensive training to reach a minima. Figure \ref{sparse_1_ns} shows a clear overhaul of the loss landscape performed by the sparse simulation data. The model is currently stuck in a local minima and can reach the better minima within sight with a little training. The X and Y axes represent projection of the trained neural network within orthogonal directions within the weight space, while the Z axis represents the logarithm of the loss value along these projections. } \label{fig:landscapes_ns} \end{figure} The impact of regulation that sparse data performs on the loss landscape can be further elucidated by adding more sparse samples to the PINN. We notice that as we increase the amount of sparse data, the landscape becomes more clearly defined minima and the model arrives at them sooner, hence providing better convergence. Figure \ref{fig:landscapes_ns_many} plots the difference across PINNs regulated with varying amounts of sparse data. \begin{figure}[h!] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/NS_LL_0.png} \caption{No Sparse Data} \label{sparse_0_ns} \end{subfigure} \hfill \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/NS_LL_1.png} \caption{1\% Sparse Data} \label{sparse_1_ns} \end{subfigure} \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/NS_LL_5.png} \caption{5\% Sparse Data} \label{sparse_5_ns} \end{subfigure} \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/NS_LL_10.png} \caption{10\% Sparse Data} \label{sparse_10_ns} \end{subfigure} \caption{Loss landscape visualistions of the Navier-Stokes flow around the Block case. Topological changes the loss landscape undergoes as the percentage of sparse data introduced within the training regime is increased. The minima becomes deeper defined and the optimiser arrives at it at much faster as we provide more sparse data to regulate. The X and Y axes represent projection of the trained neural network within orthogonal directions within the weight space, while the Z axis represents the logarithm of the loss value along these projections.} \label{fig:landscapes_ns_many} \end{figure} \section{Coarse Regulated PINNs} \label{coarse pinns} In most scenarios, sparse simulation data might not be available or would be rather computationally intensive in obtaining them. It also might seem counter-intuitive to generate sparse simulation data with a numerical simulator before using that in a PINN to converge to the actual solution. However the regulation properties are not limited to sparse representations alone and can be extended to other forms of data that we can introduce within the training regime. \\ A more pragmatic approach would be to use a coarse simulator to generate the training data to be used as a regulator. Coarse simulation data built relatively inexpensively could be used to perform the necessary topological modifications on the loss landscape, allowing the optimiser to converge better and faster. Since PINNs are essentially mesh-invariant the residual loss functions within the training regime would help the PINN generate solutions of arbitrary meshes \cite{LI2018}. This allows for a coupled approach where quick, coarse approximations built by the numerical solver are then fine-tuned with the aid of a PINN. \\ Experimenting on the previous Navier-Stokes equation modelling flow around a block, we notice that the PINN with coarse data introduces similar regulation effects as that with the PINN with sparse data (see figure \ref{fig:ns_coarse}). Data to help with the regulation was built from a coarse solver with a mesh 1/10$^{th}$ coarser than the mesh on which the numerical solution was built and the coarse regulated PINN was tested on. The regulation effects is clearly seen when plotting the loss landscape, with clear defined minima fairly accessible to the minimiser (see figure \ref{fig:ns_coarse_ll} ). \begin{figure}[h!] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.3]{images/ns_coarse_1.png} \caption{Coarse regulated PINN solution} \label{fig:ns_coarse} \end{subfigure} \hfill \begin{subfigure}{0.5\textwidth} \includegraphics[scale=0.3]{images/NS_LL_coarse_10.png} \caption{Loss landscape of the coarse PINN} \label{fig:ns_coarse_ll} \end{subfigure} \caption{Figure \ref{fig:ns_coarse} visualises and compares the PINN solutions to the numerical solution. The plot shows the network outputs at the time = 0.01 (early), time=0.5 (middle) and time=1.0 (final). The Vanilla PINN trains to a L2 Error of 8.237 while the Coarse Regulated PINN converges to 0.2135. Figure \ref{fig:ns_coarse_ll} shows the loss landscape of a Coarse regulated PINN. Coarse data is from a mesh with a discretisation 10 times smaller than the numerical solution.} \label{fig:landscapes_ns} \end{figure} \section{Experimental Data as the Regulator} \label{experimental data} To test further the impact that data regulation can have on the loss landscape, we conducted experiments where we sampled data points from the simulation that is lying along a specific line within the domain. These location specific points mimic linear profiles of data captured by a certain diagnostic device. Our focus remains on the Navier-Stokes flow around the block case. We sampled two linear data points vertically along y-axis at two fixed x positions 1.5 metres before and after the block. From the entirety of the simulation data, we sampled these linear points for every 10$^{th}$ time iteration. We intend for these data points to be treated as linear profiles of experimental data capturing the information of the flow before and after the block. \begin{figure}[h!] \centering \begin{subfigure}{0.45\textwidth} \includegraphics[scale=0.2]{images/NS_line_data.png} \caption{Experimental Data regulated PINN solution} \label{fig:ns_line} \end{subfigure} \hfill \begin{subfigure}{0.5\textwidth} \includegraphics[scale=0.3]{images/NS_LL_linedata.png} \caption{Loss landscape of the Experimental Data regulated PINN} \label{fig:ns_line_ll} \end{subfigure} \caption{Figure \ref{fig:ns_line} visualises and compares the PINN solutions to the numerical solution. The plot shows the network outputs at the time = 0.01 (early), time=0.5 (middle) and time=1.0 (final). The Vanilla PINN trains to a L2 Error of 8.237 while the Data Regulated PINN converges to 1.763. Figure \ref{fig:ns_coarse_ll} shows the loss landscape of the PINN regulated with the linearly captured experimental data.} \label{fig:landscapes_ns} \end{figure} Though the introduction of the linearly sampled "experimental" data did not help the PINN converge towards the solution, it allowed the network to learn a gross generalisation of the dynamics associated with the losses. As can be seen by the mapping of the loss landscape in figure \ref{fig:ns_line_ll}, the data allows for regulating the landscape to a better degree than to the case without any data. However, the data seems to lack sufficient impact on the loss landscape for the network to converge towards the true solution. \\ \section{Conclusion} \label{conclusion} Training a Physics-Informed Neural Network to converge towards the solution of a well-defined PDE is often burdened with several challenges. The network is constrained to operate at a trade-off amongst approximation, generalisation and optimisation errors. By way of introducing regulating data into the training regime, the loss landscape topology is morphed sufficiently to reduce the approximation and optimisation errors. Data regulation for loss landscape engineering allows for taking a hybrid unsupervised-supervised approach that gives sufficient flexibility for the optimisation of the network. Through the course of this paper, we have demonstrated how challenging the loss landscapes of PINNs can be for the minimiser to traverse and how they can be engineered for better performance by way of adding regulating data. \\ We demonstrate that data representative of the PDE solution captured in any form, either sparsely sampled from existing datasets, or built using an inexpensive solver built on a coarse grid across the domain, or even experimental data captured from a specific point within the domain can help modify the landscape. They regulate and ease the optimisation challenge by allowing for the generation of local minima with much better proximity within the hyperspace of the network weights. We demonstrate that utilising the same computational resources, PINNs can improve performance by an order of magnitude without additional increase in training time. Aside from demonstrating methodologies for achieving better convergence in PINNs, we also explore and discuss the potential pitfalls that make training PINNs to the PDE solution a considerable challenge. \\ The relative impact of the data on the objective function should be weighted in its implementation within the training regime. Arguments could be raised to question the need for a PINN if it comes with prerequisite of having solution data. This could be countered by considering that sparse, coarse or even experimental data only produces half truths, partial aspects of the solution that allows to provide the necessary bias for the network. Once the network has been biased towards a neighbourhood much closer to that of the solution within the weight hyperspace, the data regulators can be slowly waned off, allowing for the network to fine-tune to the actual PDE solution. \\ Our next focus of research would be to experiment this method of data-regulated PINNs with experimental data captured from the Tokamak diagnostics in modelling Plasma configurations, exploring a hybrid surrogate model that can marry the physics governed by the PDEs while amalgamating the information found in experimental data. \acks{This work has been funded by the EPSRC Energy Programme [grant number EP/T012250/1]. To obtain further information on the data and models underlying this paper please contact <EMAIL>} \newpage
\section{Feed Forward Neural Network (FFNN)} \subsection{Decritpion of the FFNN} We have $n\in\ensuremath{\mathbb{N}}^*$ observations $(X_i,Y_i)_{i\in \llbracket 1,n\rrbracket}\in\mathbb{R}^p\times\mathbb{R}^\kappa$, \begin{figure}[http] \centering \includegraphics[scale=0.25]{NNFF.JPG} \label{FFNN} \caption{FFNN} \end{figure} Let us consider a Feed Forward Neural Network (FFNN) of $L$ layers such that : \begin{itemize} \item[$\diamond$] Layer $\ell=0$ corresponds to the input layer of $p\in\ensuremath{\mathbb{N}}^*$ neurones, \item[$\diamond$] Layer $\ell=L$ corresponds to the output layer of $\kappa\in\ensuremath{\mathbb{N}}^*$ neurones, \item[$\diamond$]Layers $\ell\in \llbracket1,L-1 \rrbracket$ correspond to hidden layers of $J\in\ensuremath{\mathbb{N}}^*$ neurones. \end{itemize} \fbox{\textbf{Input Layer $\ell=0$}} \begin{itemize} \item The \textbf{inputs} of the input Layer $\ell=0$ are the $z^0_j=X_{ij}$, $j\in \llbracket1,p \rrbracket$. \item The \textbf{outputs} of the input Layer $\ell=0$ are the $a^0_1,\ldots a^0_p$ and are obtained by applying the identity function activation $$a^0_j=z^0_j,\quad\forall j\in \llbracket1,p \rrbracket$$ \end{itemize} \fbox{\textbf{Hidden Layer $\ell=1$}} \begin{itemize} \item The \textbf{inputs} of the hidden Layer $\ell=1$ are the $\{z^1_{j}\}_{j\in \llbracket1,J \rrbracket}$, such that $$z^1_j=\sum_{k=1}^pa^0_k\,W^0_{kj}+b^0_j,\quad\text{where }$$ \begin{itemize} \item the $\{W^0_{k,j}\}_{k,j}$, $k\in \llbracket1,p \rrbracket$ and $j\in \llbracket1,J \rrbracket$ are the weights \item and $\{b^0_j\}_j$, $j\in \llbracket1,J \rrbracket$ denote the bias term of the layer $\ell=0$. \end{itemize} \item The \textbf{outputs} of the hidden Layer $\ell=1$ are the $a^1_1,\ldots a^1_J$ and are obtained by applying the activation function $S: t\rightarrow t\mathbbm{1}_{t>0}$ $$a^1_j=S(z^1_j), \,\,\forall j\in \llbracket1,J \rrbracket $$ \end{itemize} \fbox{\textbf{For $\ell\in \llbracket2,L-1 \rrbracket$: Hidden Layer $\ell$}} \begin{itemize} \item The \textbf{inputs} of the hidden Layer $\ell$ are the $\{z^\ell_{j}\}_{j\in \llbracket1,J \rrbracket}$ such that $$z^{\ell}_j=\sum_{k=1}^Ja^{\ell-1}_k\,W^{\ell-1}_{kj}+b^{\ell-1}_j,\quad \text{where } $$ - the $\{W^{\ell-1}_{k,j}\}_{k,j}$, $k\in \llbracket1,J \rrbracket$ and $j\in \llbracket1,J \rrbracket$ are the weights - and $\{b^{\ell-1}_j\}_j$, $j\in \llbracket1,J \rrbracket$ denote the bias term of the layer $\ell-1$. \item The \textbf{outputs} of the hidden Layer $\ell$ are the $a^\ell_1,\ldots a^\ell_J$ and are obtained by applying the activation function $S: t\rightarrow t\mathbbm{1}_{t>0}$ $$a^\ell_j=S(z^\ell_j), \,\,\forall j\in \llbracket1,J \rrbracket $$ \end{itemize} \fbox{\textbf{Output Layer $L$}} \begin{itemize} \item The \textbf{inputs} of the output Layer $L$ are the $\{z^1_{j}\}_{j\in \llbracket1,\kappa \rrbracket}$ such that $$z^{L}_j=\sum_{k=1}^Ja^{L-1}_k\,W^{L-1}_{kj}, \quad\text{where} $$ - the $\{W^{L-1}_{k,j}\}_{k,j}$, $k\in \llbracket1,J \rrbracket$ and $j\in \llbracket1,\kappa \rrbracket$ are the weights - note $b^{L-1}_j=0$ for all $j\in \llbracket1,\kappa \rrbracket$ on the layer $L$. \item The \textbf{outputs} of the output Layer $L$ are the $a^L_1,\ldots a^L_\kappa$ and are obtained by applying the identity function activation $$a^L_j=z^L_j,\quad\forall j\in \llbracket1,\kappa \rrbracket$$ \end{itemize} \subsection{1.2. Matrix form of notations} \begin{minipage}[t]{0.5\textwidth} \textbf{Inputs of the layer} \medskip \begin{itemize} \item $Z^0=X_i\in\mathbb{R}^p$ \item $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$. \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Outputs of the layer} \medskip \begin{itemize} \item $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} \end{minipage} \medskip \begin{minipage}[t]{0.5\textwidth} \textbf{Weights} \medskip \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Bias term} \medskip \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} \begin{mdframed} \begin{center}\textbf{\underline{To resume}} \end{center} For all $i\in \llbracket1,n \rrbracket$ \begin{itemize} \item \textbf{Input} :$Z^0=X_i=A^0$ \item $Z^{\ell+1}=A^\ell W^\ell+ B^\ell$, $\ell\in \llbracket 0,L-1 \rrbracket$ \item $A^\ell=S(Z^\ell)$, $\ell\in \llbracket1,L-1 \rrbracket$ \item \textbf{Output} : $A^L=Z^L$ \end{itemize} \end{mdframed} \section{Train the FFNN} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \end{mdframed} PARLER DE $\lambda$ avec critère BKK \subsection{Notations} Previously all the notation $s.t.$ have been defined for the observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define $$\mathbb{A}^{L-1}=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J}$$ Let us define the following quantity : for $\lambda>0$ $$\mathbb{H}:=\mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. Denote by : \begin{center}\fbox{$\theta:=\{\lambda,W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\}$}\end{center} then it is clear that $\mathbb{H}(\theta)$. \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define $\pi(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $$\pi(\textbf{Y}) = (Y_{\pi(1)},\ldots,Y_{\pi(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\mathbb{H}(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\mathbb{H}(\theta)\,\pi^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\mathbb{H}}:=\mathbb{H}(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \section{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define $\pi^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad\pi^t(\mathbb{Y})=(\pi^{t,1}(\mathbb{Y}_1),\ldots,\pi^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $$\pi(\mathbb{Y})=(\pi^{1}(\mathbb{Y}),\ldots,\pi^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\mathbb{H}(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^{t,k}(\mathbb{Y}_k)-\mathbb{H}(\theta)\,\pi^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\mathbb{H}(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[\pi(\mathbb{Y})-\mathbb{H}(\theta)\,\underset{obs.}{\odot}\pi( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\mathbb{H}}:=\mathbb{H}(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \end{document} Classe CART GEY, S.andNEDELEC, E.(2005). Model selection for CART regression trees.IEEE Transactions onInformation Theory51658–670. KLUSOWSKI, J. M.(2020). Sparse Learning with CART. InAdvances in Neural Information ProcessingSystems. RF gold standard DENIL, M., MATHESON, D.andDEFREITAS, N.(2014). Narrowing the gap: Random forests in theory andin practice. InInternational Conference on Machine Learning (ICML) MENTCH, L.andZHOU, S.(2020). Randomization as Regularization: A Degrees of Freedom Explanationfor Random Forest Success.Journal of Machine Learning Research211–36 GBDT gold standard Andreea Anghel, Nikolaos Papandreou, Thomas Parnell, Alessandro de Palma, and Haralampos Pozidis. Benchmarking and optimization of gradient boosting decision tree algorithms Vasyl Harasymiv. Lessons from 2 million machine learning models on kaggle, 2015. SVM .. [1] `LIBSVM: A Library for Support Vector Machines <http://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf>`_ .. [2] `Platt, John (1999). "Probabilistic outputs for support vector machines and comparison to regularizedlikelihood methods." <http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.1639>`_ Kernel-Ridge * Kevin P. Murphy "Machine Learning: A Probabilistic Perspective", The MIT Press chapter 14.4.3, pp. 492-493 MLP Hinton, Geoffrey E. "Connectionist learning procedures." Artificial intelligence 40.1 (1989): 185-234. Nystroem ligne 83 du pdf * Williams, C.K.I. and Seeger, M. "Using the Nystroem method to speed up kernel machines", Advances in neural information processing systems 2001 * T. Yang, Y. Li, M. Mahdavi, R. Jin and Z. Zhou "Nystroem Method vs Random Fourier Features: A Theoretical and Empirical Comparison", Advances in Neural Information Processing Systems 2012 RBF ligne 83 pdf .. [1] `David Duvenaud (2014). "The Kernel Cookbook: Advice on Covariance functions". <https://www.cs.toronto.edu/~duvenaud/cookbook/>`_ .. [2] `Carl Edward Rasmussen, Christopher K. I. Williams (2006). "Gaussian Processes for Machine Learning". The MIT Press. <http://www.gaussianprocess.org/gpml/>`_ Learning rate scheduler ligne 84 du pdf L. Smith. (2015)cite arxiv:1506.01186Comment: Presented at WACV 2017; see https://github.com/bckenstler/CLR for instructions to implement CLR in Keras. \section{Feed Forward Neural Network (FFNN)} \subsection{Decritpion of the FFNN\br{Description }} We have $n\in\ensuremath{\mathbb{N}}^*$ observations $(X_i,Y_i)_{i\in \llbracket 1,n\rrbracket}\in\mathbb{R}^p\times\mathbb{R}^\kappa$, \begin{figure}[http] \centering \includegraphics[scale=0.25]{NNFF.JPG} \label{FFNN} \caption{FFNN} \end{figure} Let us consider a Feed Forward Neural Network (FFNN) of $L$ layers such that : \begin{itemize} \item[$\diamond$] Layer $\ell=0$ corresponds to the input layer of $p\in\ensuremath{\mathbb{N}}^*$ neurones\br{neurons }, \item[$\diamond$] Layer $\ell=L$ corresponds to the output layer of $\kappa\in\ensuremath{\mathbb{N}}^*$ neurones\br{neurons }, \item[$\diamond$]Layers $\ell\in \llbracket1,L-1 \rrbracket$ correspond to hidden layers of $J\in\ensuremath{\mathbb{N}}^*$ neurones\br{neurons }. \end{itemize} \fbox{\textbf{Input Layer $\ell=0$}} \begin{itemize} \item The \textbf{inputs} of the input Layer $\ell=0$ are the $z^0_j=X_{ij}$, $j\in \llbracket1,p \rrbracket$. \item The \textbf{outputs} of the input Layer $\ell=0$ are the $a^0_1,\ldots a^0_p$ and are obtained by applying the identity function activation\br{identity activation function } $$a^0_j=z^0_j,\quad\forall j\in \llbracket1,p \rrbracket$$ \end{itemize} \fbox{\textbf{Hidden Layer $\ell=1$}} \begin{itemize} \item The \textbf{inputs} of the hidden Layer $\ell=1$ are the $\{z^1_{j}\}_{j\in \llbracket1,J \rrbracket}$, such that $$z^1_j=\sum_{k=1}^pa^0_k\,W^0_{kj}+b^0_j,\quad\text{where }$$ \begin{itemize} \item the $\{W^0_{k,j}\}_{k,j}$, $k\in \llbracket1,p \rrbracket$ and $j\in \llbracket1,J \rrbracket$ are the weights \item and $\{b^0_j\}_j$, $j\in \llbracket1,J \rrbracket$ denote the bias term of the layer $\ell=0$. \end{itemize} \item The \textbf{outputs} of the hidden Layer $\ell=1$ are the $a^1_1,\ldots a^1_J$ and are obtained by applying the activation function $S: t\rightarrow t\mathbbm{1}_{t>0}$ $$a^1_j=S(z^1_j), \,\,\forall j\in \llbracket1,J \rrbracket $$ \end{itemize} \fbox{\textbf{For $\ell\in \llbracket2,L-1 \rrbracket$: Hidden Layer $\ell$}} \begin{itemize} \item The \textbf{inputs} of the hidden Layer $\ell$ are the $\{z^\ell_{j}\}_{j\in \llbracket1,J \rrbracket}$ such that $$z^{\ell}_j=\sum_{k=1}^Ja^{\ell-1}_k\,W^{\ell-1}_{kj}+b^{\ell-1}_j,\quad \text{where } $$ - the $\{W^{\ell-1}_{k,j}\}_{k,j}$, $k\in \llbracket1,J \rrbracket$ and $j\in \llbracket1,J \rrbracket$ are the weights - and $\{b^{\ell-1}_j\}_j$, $j\in \llbracket1,J \rrbracket$ denote the bias term of the layer $\ell-1$. \item The \textbf{outputs} of the hidden Layer $\ell$ are the $a^\ell_1,\ldots a^\ell_J$ and are obtained by applying the activation function $S: t\rightarrow t\mathbbm{1}_{t>0}$ $$a^\ell_j=S(z^\ell_j), \,\,\forall j\in \llbracket1,J \rrbracket $$ \end{itemize} \fbox{\textbf{Output Layer $L$}} \begin{itemize} \item The \textbf{inputs} of the output Layer $L$ are the $\{z^1_{j}\}_{j\in \llbracket1,\kappa \rrbracket}$ such that $$z^{L}_j=\sum_{k=1}^Ja^{L-1}_k\,W^{L-1}_{kj}, \quad\text{where} $$ - the $\{W^{L-1}_{k,j}\}_{k,j}$, $k\in \llbracket1,J \rrbracket$ and $j\in \llbracket1,\kappa \rrbracket$ are the weights - note $b^{L-1}_j=0$ for all $j\in \llbracket1,\kappa \rrbracket$ on the layer $L$. \item The \textbf{outputs} of the output Layer $L$ are the $a^L_1,\ldots a^L_\kappa$ and are obtained by applying the identity function activation $$a^L_j=z^L_j,\quad\forall j\in \llbracket1,\kappa \rrbracket$$ \end{itemize} \subsection{1.2. Matrix form of notations} \begin{minipage}[t]{0.5\textwidth} \textbf{Inputs of the layer} \medskip \begin{itemize} \item $Z^0=X_i\in\mathbb{R}^p$ \item $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$. \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Outputs of the layer} \medskip \begin{itemize} \item $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} \end{minipage} \medskip \begin{minipage}[t]{0.5\textwidth} \textbf{Weights} \medskip \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Bias term} \medskip \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} \begin{mdframed} \begin{center}\textbf{\underline{To resume} \br{In summary }} \end{center} For all $i\in \llbracket1,n \rrbracket$ \begin{itemize} \item \textbf{Input} :$Z^0=X_i=A^0$ \item $Z^{\ell+1}=A^\ell W^\ell+ B^\ell$, $\ell\in \llbracket 0,L-1 \rrbracket$ \item $A^\ell=S(Z^\ell)$, $\ell\in \llbracket1,L-1 \rrbracket$ \item \textbf{Output} : $A^L=Z^L$ \end{itemize} \end{mdframed} \section{Train the FFNN} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \br{Pas d'initialisation pour la dernière couche } \end{mdframed} PARLER DE $\lambda$ avec critère BKK \br{Probablement parler de l'initialisation de la dernière couche à ce moment là} \subsection{Notations} Previously all the notation $s.t.$\br{pas besoin de s.t. } have been defined for the observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define $$\mathbb{A}^{L-1}=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J}$$ Let us define the following quantity : for $\lambda>0$ $$\mathbb{H}:=\mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. Denote by : \begin{center}\fbox{$\theta:=\{\lambda,W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\}$}\end{center} then it is clear that $\mathbb{H}(\theta)$\br{Il manque quelque chose? }. \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define $\pi(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $$\pi(\textbf{Y}) = (Y_{\pi(1)},\ldots,Y_{\pi(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\mathbb{H}(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\mathbb{H}(\theta)\,\pi^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction\br{prediction } $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\mathbb{H}}:=\mathbb{H}(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \section{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define $\pi^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad\pi^t(\mathbb{Y})=(\pi^{t,1}(\mathbb{Y}_1),\ldots,\pi^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $$\pi(\mathbb{Y})=(\pi^{1}(\mathbb{Y}),\ldots,\pi^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig\br{ setting} $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\mathbb{H}(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^{t,k}(\mathbb{Y}_k)-\mathbb{H}(\theta)\,\pi^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}\br{tensor notations? }: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\mathbb{H}(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[\pi(\mathbb{Y})-\mathbb{H}(\theta)\,\underset{obs.}{\odot}\pi( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\mathbb{H}}:=\mathbb{H}(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \br{Pour rester cohérent en tensoriel: } Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\underset{obs.}{\odot}\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \end{document} \section{Feed Forward Neural Network (FFNN)} \subsection{Decritpion of the FFNN} We have $n\in\ensuremath{\mathbb{N}}^*$ observations $(X_i,Y_i)_{i\in \llbracket 1,n\rrbracket}\in\mathbb{R}^p\times\mathbb{R}^\kappa$, \begin{figure}[http] \centering \includegraphics[scale=0.25]{NNFF.JPG} \label{FFNN} \caption{FFNN} \end{figure} Let us consider a Feed Forward Neural Network (FFNN) of $L$ layers such that : \begin{itemize} \item[$\diamond$] Layer $\ell=0$ corresponds to the input layer of $p\in\ensuremath{\mathbb{N}}^*$ neurones, \item[$\diamond$] Layer $\ell=L$ corresponds to the output layer of $\kappa\in\ensuremath{\mathbb{N}}^*$ neurones, \item[$\diamond$]Layers $\ell\in \llbracket1,L-1 \rrbracket$ correspond to hidden layers of $J\in\ensuremath{\mathbb{N}}^*$ neurones. \end{itemize} \fbox{\textbf{Input Layer $\ell=0$}} \begin{itemize} \item The \textbf{inputs} of the input Layer $\ell=0$ are the $z^0_j=X_{ij}$, $j\in \llbracket1,p \rrbracket$. \item The \textbf{outputs} of the input Layer $\ell=0$ are the $a^0_1,\ldots a^0_p$ and are obtained by applying the identity function activation $$a^0_j=z^0_j,\quad\forall j\in \llbracket1,p \rrbracket$$ \end{itemize} \fbox{\textbf{Hidden Layer $\ell=1$}} \begin{itemize} \item The \textbf{inputs} of the hidden Layer $\ell=1$ are the $\{z^1_{j}\}_{j\in \llbracket1,J \rrbracket}$, such that $$z^1_j=\sum_{k=1}^pa^0_k\,W^0_{kj}+b^0_j,\quad\text{where }$$ \begin{itemize} \item the $\{W^0_{k,j}\}_{k,j}$, $k\in \llbracket1,p \rrbracket$ and $j\in \llbracket1,J \rrbracket$ are the weights \item and $\{b^0_j\}_j$, $j\in \llbracket1,J \rrbracket$ denote the bias term of the layer $\ell=0$. \end{itemize} \item The \textbf{outputs} of the hidden Layer $\ell=1$ are the $a^1_1,\ldots a^1_J$ and are obtained by applying the activation function $S: t\rightarrow t\mathbbm{1}_{t>0}$ $$a^1_j=S(z^1_j), \,\,\forall j\in \llbracket1,J \rrbracket $$ \end{itemize} \fbox{\textbf{For $\ell\in \llbracket2,L-1 \rrbracket$: Hidden Layer $\ell$}} \begin{itemize} \item The \textbf{inputs} of the hidden Layer $\ell$ are the $\{z^\ell_{j}\}_{j\in \llbracket1,J \rrbracket}$ such that $$z^{\ell}_j=\sum_{k=1}^Ja^{\ell-1}_k\,W^{\ell-1}_{kj}+b^{\ell-1}_j,\quad \text{where } $$ - the $\{W^{\ell-1}_{k,j}\}_{k,j}$, $k\in \llbracket1,J \rrbracket$ and $j\in \llbracket1,J \rrbracket$ are the weights - and $\{b^{\ell-1}_j\}_j$, $j\in \llbracket1,J \rrbracket$ denote the bias term of the layer $\ell-1$. \item The \textbf{outputs} of the hidden Layer $\ell$ are the $a^\ell_1,\ldots a^\ell_J$ and are obtained by applying the activation function $S: t\rightarrow t\mathbbm{1}_{t>0}$ $$a^\ell_j=S(z^\ell_j), \,\,\forall j\in \llbracket1,J \rrbracket $$ \end{itemize} \fbox{\textbf{Output Layer $L$}} \begin{itemize} \item The \textbf{inputs} of the output Layer $L$ are the $\{z^1_{j}\}_{j\in \llbracket1,\kappa \rrbracket}$ such that $$z^{L}_j=\sum_{k=1}^Ja^{L-1}_k\,W^{L-1}_{kj}, \quad\text{where} $$ - the $\{W^{L-1}_{k,j}\}_{k,j}$, $k\in \llbracket1,J \rrbracket$ and $j\in \llbracket1,\kappa \rrbracket$ are the weights - note $b^{L-1}_j=0$ for all $j\in \llbracket1,\kappa \rrbracket$ on the layer $L$. \item The \textbf{outputs} of the output Layer $L$ are the $a^L_1,\ldots a^L_\kappa$ and are obtained by applying the identity function activation $$a^L_j=z^L_j,\quad\forall j\in \llbracket1,\kappa \rrbracket$$ \end{itemize} \subsection{1.2. Matrix form of notations} \begin{minipage}[t]{0.5\textwidth} \textbf{Inputs of the layer} \medskip \begin{itemize} \item $Z^0=X_i\in\mathbb{R}^p$ \item $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$. \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Outputs of the layer} \medskip \begin{itemize} \item $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} \end{minipage} \medskip \begin{minipage}[t]{0.5\textwidth} \textbf{Weights} \medskip \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Bias term} \medskip \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} \begin{mdframed} \begin{center}\textbf{\underline{To resume}} \end{center} For all $i\in \llbracket1,n \rrbracket$ \begin{itemize} \item \textbf{Input} :$Z^0=X_i=A^0$ \item $Z^{\ell+1}=A^\ell W^\ell+ B^\ell$, $\ell\in \llbracket 0,L-1 \rrbracket$ \item $A^\ell=S(Z^\ell)$, $\ell\in \llbracket1,L-1 \rrbracket$ \item \textbf{Output} : $A^L=Z^L$ \end{itemize} \end{mdframed} \section{Train the FFNN} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \end{mdframed} PARLER DE $\lambda$ avec critère BKK \subsection{Notations} Previously all the notation $s.t.$ have been defined for the observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define $$\mathbb{A}^{L-1}=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J}$$ Let us define the following quantity : for $\lambda>0$ $$\mathbb{H}:=\mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. Denote by : \begin{center}\fbox{$\theta:=\{\lambda,W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\}$}\end{center} then it is clear that $\mathbb{H}(\theta)$. \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define $\pi(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $$\pi(\textbf{Y}) = (Y_{\pi(1)},\ldots,Y_{\pi(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\mathbb{H}(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\mathbb{H}(\theta)\,\pi^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\mathbb{H}}:=\mathbb{H}(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \section{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define $\pi^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad\pi^t(\mathbb{Y})=(\pi^{t,1}(\mathbb{Y}_1),\ldots,\pi^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $$\pi(\mathbb{Y})=(\pi^{1}(\mathbb{Y}),\ldots,\pi^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\mathbb{H}(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^{t,k}(\mathbb{Y}_k)-\mathbb{H}(\theta)\,\pi^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\mathbb{H}(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[\pi(\mathbb{Y})-\mathbb{H}(\theta)\,\underset{obs.}{\odot}\pi( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\mathbb{H}}:=\mathbb{H}(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\mathbb{H}}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \end{document} \section{Introduction} \subsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \section{Related Work} \subsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \section{Nouvelle Loss} \subsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \section{Expériences} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Résultats} \subsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsection{Focus R2 et temps pour MLR } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \section{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \end{document} \section{brouillon} \newpage # Towards Understanding the Role of Over-Parametrization in Generalization of Neural Networks (2018) As part of our investigation we will establish that large neural networks with tens of thousands of parameters are capable of achieving superior test accuracy on data sets with only hundreds of observations. This is surprising, as it is commonly thought that deep neural networks require largedata sets to train properly [19,7]. We believe that this gap in knowledge has led to the commonmisbelief that unregularized, deep neural networks will necessarily overfit the types of data consideredby small-data professions. In fact, we establish that with minimal tuning, deep neural networksare able to achieve performance on par with a random forest classifier, which is considered to havestate-of-the-art performance on data sets from the UCI Repository [7] Noah Golowich, Alexander Rakhlin, and Ohad Shamir. Size-independent sample complexity of neural networks.arXiv preprint arXiv:1712.06541, 2017 19]Behnam Neyshabur, Ruslan Salakhutdinov, and Nathan Srebro. Path-SGD: Path-normalized optimization in deepneural networks. InAdvances in Neural Information Processsing Systems (NIPS), 2015 The mechanism by which a random forest is able to generalize well on small data sets is straightfor-ward: a random forest is an ensemble of low-bias, decorrelated trees. Randomization combined withaveraging reduces the ensemble’s variance, smoothing out the predictions from fully grown trees. Itis clear that a neural network should excel at bias reduction, but the way in which it achieves variance reduction is much more mysterious. The same paradox has been examined at length in the literature on AdaBoost, and in particular, it has been conjectured that the later stages of AdaBoost serve as abaggingphase which reduces variance [4, 5, 6, 23] # cholet You’ll sometimes hear that deep learning only works when lots of data is available. # Neural Network Modeling for Small Datasets Bartlett (1998) showingthat the generalization performance of an MLP depends moreon theL1norm‖c‖1of the weights between the hidden layerand the output layer rather than on the total number of weights. # Learnability, stability and uniform convergence. Journal of Machine Learning Research, 11:2635–2670, October 2010. # Harnessing the Power of Infinitely Wide Deep Nets on Small-dataTasks https://arxiv.org/pdf/1910.01663.pdf We recall that recently Olson et al. (2018) showed that multilayer neural networks can be reasonably effective on small datasets,specifically on a UCI testbed of tasks with as few as dozens of training examples. Of course, this requiredsome hyperparameter tuning, although they noted that such tuning is also needed for the champion method,Random Forests (RF), which multilayer neural networks could not beat Can NTK’s do better? Below wewill see that in the setup of Olson et al. (2018), NTK predictors indeed outperforms corresponding finite deepnetworks, and also slightly beats the earlier gold standard, RandomForests. This suggests NTK predictorsshould belong in any list of off-the-shelf machine learning methods. # DeepLabCut: markerless pose estimation of user-defined body parts with deep learning Nature Neuroscience volume 21, pages1281–1289(2018) Quantifying behavior is crucial for many applications in neuroscience. Videography provides easy methods for the observation and recording of animal behavior in diverse settings, yet extracting particular aspects of a behavior for further analysis can be highly time consuming. In motor control studies, humans or other animals are often marked with reflective markers to assist with computer-based tracking, but markers are intrusive, and the number and location of the markers must be determined a priori. Here we present an efficient method for markerless pose estimation based on transfer learning with deep neural networks that achieves excellent results with minimal training data. We demonstrate the versatility of this framework by tracking various body parts in multiple species across a broad collection of behaviors. Remarkably, even when only a small number of frames are labeled (~200), the algorithm achieves excellent tracking performance on test frames that is comparable to human accuracy. #Spectrally-normalized margin bounds for neural networks Peter L. Bartlett∗Dylan J. Foster†Matus Telgarsky https://arxiv.org/pdf/1706.08498.pdf Neural networks owe their astonishing success not only to their ability to fit any data set: they also generalize well, meaning they provide a close fit on unseen data. A classical statistical adage is that models capable of fitting too much will generalize poorly; what’s going on here? any analysis based solely on the number of possible labellings on a finite training set — as is thecase with VC dimension — is doomed: if the function class can fit all possible labels (as is the case withneural networks in standard configurations (Zhang et al., 2017)), then this analysis can not distinguish it from the collection of all possible functions! # champs d'application petit dataset https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4454870/ (environnement) Electronic health records: - AlvinRajkomar,EyalOren,KaiChen,AndrewMDai,NissanHajaj,MichaelaHardt,PeterJLiu,Xiaob- ing Liu, Jake Marcus, Mimi Sun, Patrik Sundberg, Hector Yee, Kun Zhang, Yi Zhang, Gerardo Flores, Gavin E Duggan, Jamie Irvine, Quoc Le, Kurt Litsch, Alexander Mossin, Justin Tansuwan, De Wang, James Wexler, Jimbo Wilson, Dana Ludwig, Samuel L Volchenboum, Katherine Chou, Michael Pearson, Srinivasan Madabushi, Nigam H Shah, Atul J Butte, Michael D Howell, Claire Cui, Greg S Corrado, and Jeffrey Dean. Scalable and accurate deep learning with electronic health records. npj Digital Medicine, 1, 2018. - Riccardo Miotto,LiLi,BrianAKidd,andJoelTDudley.DeepPatient:AnUnsupervisedRepresentation to Predict the Future of Patients from the Electronic Health Records. Nature Publishing Group, 2016. # NEURAL OBLIVIOUS DECISION ENSEMBLES FOR DEEP LEARNING ON TABULAR DATA 1909.06312.pdf In an important case of heterogenous tabular data, the advantage of DNNs over shallow counterparts remains questionable. In particular, there is no sufficient evidence that deep learning machinery allows constructing methods that outperform gradient boosting decision trees (GBDT), which are of- ten the top choice for tabular problems. While the superiority of deep architectures in these domains is undoubtful, machine learning for tabular data still did not fully benefit from the DNN power. Namely, the state-of-the-art perfor- mance in problems with tabular heterogeneous data is often achieved by ”shallow” models, such as gradient boosted decision trees (GBDT) (Friedman, 2001; Chen & Guestrin, 2016; Ke et al., 2017; Prokhorenkova et al., 2018). While the importance of deep learning on tabular data is recognized by the ML community, and many works address this problem (Zhou & Feng, 2017; Yang et al., 2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018), the proposed DNN approaches do not consistently outperform the state-of-the-art shallow models by a notable margin. In particular, to the best of our knowledge, there is still no universal DNN approach that was shown to systematically outperform the leading GBDT packages (e.g., XGBoost (Chen & Guestrin, 2016)). As additional evidence, a large number of Kaggle ML competitions with tabular data are still won by the shallow GBDT methods (Harasymiv, 2015). Overall, at the moment, there is no dominant deep learning solution for tabular data problems, and we aim to reduce this gap by our paper. Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properly tuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Ke et al., 2018) reports the marginal improvement over GBDT with default parameters, but in our experiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. # Using deep neural network with small dataset to predict material defects. Materials & Design, Volume 162, 15 January 2019, Pages 300-310 Large neural nets trained on relatively small datasets can overfit the training data. However, DNN trained by conventional methods with small datasets commonly shows worse performance than traditional machine learning methods, e.g. shallow neural network and support vector machine. This inherent limitation prevented the wide adoption of DNN in material study because collecting and assembling big dataset in material science is a challenge. It is found that a pre-trained and fine-tuned DNN shows better generalization performance over shallow neural network, support vector machine, and DNN trained by conventional methods. The trained DNN transforms scattered experimental data points into a map of high accuracy in high-dimensional chemistry and processing parameters space. Though DNN with big datasets is the optimal solution, DNN with small datasets and pre-training can be a reasonable choice when big datasets are unavailable in material study. # Self-Normalizing Neural Networks Klambauer et al. 1706.02515 success stories of Deep Learning with standard feed-forward neural networks (FNNs) are rare. FNNs that perform well are typically shallow and, therefore cannot exploit many levels of abstract representations. We compared SNNs on (a) 121 tasks from the UCI machine learning repository, on (b) drug discovery benchmarks, and on (c) astronomy tasks with standard FNNs, and other machine learning methods such as random forests and support vector machines. For FNNs we considered (i) ReLU networks without normalization, (ii) batch normalization, (iii) layer normalization, (iv) weight normalization, (v) highway networks, and (vi) residual networks. SNNs significantly outperformed all competing FNN methods at 121 UCI tasks, outperformed all competing methods at the Tox21 dataset, and set a new record at an astronomy data set. The winning SNN architectures are often very deep. Implementations are available at: github.com/bioinf-jku/SNNs. However, looking at Kaggle challenges that are not related to vision or sequential tasks, gradient boosting, random forests, or support vector machines (SVMs) are winning most of the competitions. Deep Learning is notably absent, and for the few cases where FNNs won, they are shallow. For example, the HIGGS challenge, the Merck Molecular Activity challenge, and the Tox21 Data challenge were all won by FNNs with at most four hidden layers. Surprisingly, it is hard to find success stories with FNNs that have many hidden layers, though they would allow for different levels of abstract representations of the input [3]. To robustly train very deep CNNs, batch normalization evolved into a standard to normalize neuron activations to zero mean and unit variance [20]. Layer normalization [2] also ensures zero mean and unit variance, while weight normalization [32] ensures zero mean and unit variance if in the previous layer the activations have zero mean and unit variance. However, training with normalization techniques is perturbed by stochastic gradient descent (SGD), stochastic regularization (like dropout), and the estimation of the normalization parameters. In contrast, FNNs trained with normalization techniques suffer from these perturbations and have high variance in the training error (see Figure 1). This high variance hinders learning and slows it down. Furthermore, strong regularization, such as dropout, is not possible as it would further increase the variance which in turn would lead to divergence of the learning process. We believe that this sensitivity to perturbations is the reason that FNNs are less successful than RNNs and CNNs. # Regularization Learning Networks: Deep Learning for Tabular Datasets Shavitt et Segal Neurips 2018 Despite their impressive performance, Deep Neural Networks (DNNs) typically underperform Gradient Boosting Trees (GBTs) on many tabular-dataset learning tasks. Here, we introduce Regularization Learning Networks (RLNs), which overcome this challenge by introducing an efficient hyperparameter tuning scheme which minimizes a new Counterfactual Loss. Our results show that RLNs significantly improve DNNs on tabular datasets, and achieve comparable results to GBTs, with the best performance achieved with an ensemble that combines GBTs and RLNs. # dropout Nitish Srivastava, Hinton [21] [23] proposed the method of Dropout to prevent over-fitting, effectively reducing the parameters of the full connection layer, and solve the problem of insufficient samples. Large neural nets trained on relatively small datasets can overfit the training data. This has the effect of the model learning the statistical noise in the training data, which results in poor performance when the model is evaluated on new data, e.g. a test dataset. Generalization error increases due to overfitting. One approach to reduce overfitting is to fit all possible different neural networks on the same dataset and to average the predictions from each model. This is not feasible in practice, and can be approximated using a small collection of different models, called an ensemble. # Small dataset in deep Neural networks are the basic building blocks of Deep learning models. However, Deep neural networks have millions of parameters to learn and this means we need a lot of iterations before we find the optimum values. If we have small data, running a large number of iteration can result in overfitting. Large dataset helps us avoid overfitting and generalizes better as it captures the inherent data distribution more effectively. Here are a few important factors which influence the network optimization process: 1. Optimization Algorithm: Gradient descent is the most popular optimization algorithm used for neural networks. The algorithm performance directly depends on the size of the training data. We may try updating the weights with a smaller training set(stochastic gradient descent being the extreme case when we do updates with single data point) which makes the training process fast however the updates have larger fluctuation. Training with the whole dataset makes training computationally expensive and slow. Adam, RMSprop, Adagrad, Stochastic Gradient descent are a few variations of gradient descent which optimizes the gradient update process and improves model performance 2 Loss function: Loss function also plays a crucial role in the optimization process and carefully selected loss function can help in improving the training process. Hinge loss is one such example which makes training with small dataset possible. 3.Parameter initialization: The initial state of the parameters greatly influences the optimization process. Poorly chosen initialization values can result in issues of divergence and getting stuck at saddle points or local minimum. Also, this increases the requirement of the training data for the training process. 4. Data size: Data size is a very crucial part of training neural networks. Larger datasets can help us better learn model parameters and improve the optimization process and imparts generalization. 1. Transfer learning: Transfer learning refers to the approach of using the learning from one task on to another task without the requirement of learning from scratch. It directly addresses the smart parameter initialization point for training neural networks. This technique has been widely used in computer vision tasks and has been instrumental in the wide application of deep learning in the industry. \subsection*{Replicability} Our Python code is released as an open source package for replication: \href{https://github.com/AnonymousSubmissionNeurips2020/Supplementary-Material.git}{github/AnonymousSubmissionNeurips2021/}. \subsection*{Configuration machine} We ran our experiments with this configuration: \begin{table}[http!] \begin{center} \centering \begin{tabular}{|ll|} \hline \footnotesize{\textbf{Cloud:}} & Google Cloud Plateform\\ \footnotesize{\textbf{CPU:}} & Intel Haswell 16 vCPUs\\ \footnotesize{\textbf{GPU:}} & NVIDIA Tesla P100\\ \footnotesize{\textbf{RAM:}} & 104 GB\\ \footnotesize{\textbf{MEM:}} & 500 GB SSD\\ \footnotesize{\textbf{Image:}} & rapids-0-7-gpu-experimental-notebooks\\ \hline \end{tabular} \end{center} \end{table} \section{State of the Art} We complete here the review of the existing literature on deep learning on tabular data. An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted {\texttt{FFNN}}{} as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized {\texttt{FFNN}}{} on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}{}}\label{secMLRloss} \subsection{The \texttt{\,MLR $\,$}{} loss} Recall $$\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ Where $\textbf{A}^{L-1}$ denotes the last hidden layer. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer of the {\texttt{FFNN}}; $(ii)$ the close-form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. First, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This new vector can be seen as a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \subsection{Cross-Entropy loss} In the classification task, the {\texttt{FFNN}}{} architecture is essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a {\texttt{Sigmoid}}{} and the Cross Entropy (\texttt{CE}) loss. (namely \texttt{torch.nn.BCEWithLogitsLoss} in PyTorch and referred to as {\texttt{BCE}}{} in this paper). Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \bigskip \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} \bigskip The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. Note that $\textbf{Y}^*$ with values in $\{-1,1\}$ is the symmetrized version of $\textbf{Y}$. Next, the Structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. \begin{mydef}[\texttt{BCE-MLR-NN}] Our \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} and $\textbf{P}(\cdot,\cdot,\textbf{x})$ $s.t.$ , $\textbf{P}=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}$. \end{mydef} \bigskip \section{Training a {\texttt{FFNN}}{} with \texttt{\,MLR $\,$}} \paragraph{The \textbf{NN}{} Architecture.} We consider {\texttt{FFNN}}{} with $L$ layers, $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$, and with all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$). \begin{table}[H] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} \paragraph{Dither{} \cite{dither}.} This step is distinct from the Structured dithering that we introduced in the \texttt{\,MLR $\,$}{} method. In the regression setting, we do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice. Let $\epsilon,\,(\epsilon^t)_t\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\tilde\sigma^2\ensuremath{\mathbb{I}})$. We set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and $\pi_{\epsilon}^t(\textbf{Y})=\pi^t(\textbf{Y})+\epsilon^{t}$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $\left(\textbf{Y}_{\epsilon},\left(\pi_{\epsilon}^t(\textbf{Y})\right)_{t=1}^T\right)$ instead of $\left(\textbf{Y},\left(\pi^t(\textbf{Y})\right)_{t=1}^T\right)$. \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}_{\epsilon}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}_{\epsilon}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi_{\epsilon}^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi_{\epsilon}^t(\textbf{Y})\right)\right|. \end{align*} Here again, $\tilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\tilde\sigma=0.03$ for all the datasets in our benchmark. Moreover, in our approach the batch size $b_s$ is not a hyperparameter as we fix it as in table above. Note that we do not apply this dither step in the classification setting. \paragraph{Initialization of $\boldsymbol{\theta}$.} The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \medskip \begin{mdframed} \underline{Recall $|{\texttt{input}}|=d$ and $|{\texttt{out}}|$=1} \medskip $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. The entries of $W^\ell$ are generated independently from the uniform distribution on the interval $\ensuremath{\mathcal{I}}_\ell$ : \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{I}}_1=\left(-\sqrt{\frac{6}{(d+J)}},\sqrt{\frac{6}{(d+J)}}\right)$ and $\,\ensuremath{\mathcal{I}}_L=\left(-\sqrt{\frac{6}{(d+1)}},\sqrt{\frac{6}{(d+1)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{I}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \end{itemize} \end{mdframed} \bigskip \paragraph{Efficient heuristic to initialize the Ridge parameter.} In our experiments, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray*} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray*} The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \bigskip \paragraph{Choice of the number of iterations during the train.} \begin{itemize} \item [$\bullet$] We fix the maximum number of iterations $\texttt{max}_{{\texttt{Iter}}}$ (depending on the value of $L$). \item [$\bullet$] We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the allotted time {\texttt{FixB}}. \item [$\bullet$] We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, $i.e.$ $${\texttt{Iter}}= \min(\texttt{max}_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$$ \end{itemize} \bigskip \paragraph{Training \texttt{\,MLR $\,$}{}-NN.} We train the {\texttt{FFNN}}{} with $b_s=\min(J,n)$ and we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ which depends on the number of layers $L$ (Table~\ref{tab:architectures1}). \medskip \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\,\boldsymbol{\theta} \\ \textbf{\texttt{set}}\,\lambda \\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < {\texttt{Iter}} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{x}\in\mathbb{R}^{b_s\times d}\\ \textbf{{for}}\,\, \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{A}^{\ell-1}W^{\ell} +B^{\ell}) \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{Compute }\, \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \quad \text{or}\quad \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda \\ \textbf{Backpropagate }\, (\boldsymbol{\theta},\lambda) \textbf{ through }\, \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \quad \text{or}\quad \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} $ \end{mdframed} We select a $validation$-set of size $n_{val}=20\%\, n$. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: $${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}.$$ Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$ \bigskip \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \section{Construction of the Benchmark} To produce this benchmark (Table~\ref{tab:datasets}), we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \begin{table}[H] \caption{Benchmark datasets. \# Num., \# Bin. and \# Cat. denote the initial number of numerical, binary and categorical features respectively. We denote by $d$ the number of features after the pre-processing and one-hot encoding.} \label{tab:datasets} \centering \footnotesize \begin{tabular}{|l|c|c|c|c|c|c|} \hline Description & Task & $n$ & $d$ & \# Num. & \# Bin. & \# Cat. \\ \hline \hline Concrete Slump Test -2 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0$ & $0 $ \\ \hline Concrete Slump Test -3 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0$ & $0 $ \\ \hline Concrete Slump Test -1 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0$ & $0 $ \\ \hline Servo & \texttt{Reg} & $ 168$ & $24$ & $2$ & $0$ & $4 $ \\ \hline Computer Hardware & \texttt{Reg} & $ 210$ & $7$ & $7$ & $0$ & $0 $ \\ \hline Yacht Hydrodynamics & \texttt{Reg} & $ 308$ & $33$ & $5$ & $0$ & $3 $ \\ \hline QSAR aquatic toxicity & \texttt{Reg} & $ 546$ & $34$ & $8$ & $0$ & $3 $ \\ \hline QSAR Bioconcentration classes & \texttt{Reg} & $ 779$ & $25$ & $8$ & $2$ & $2 $ \\ \hline QSAR fish toxicity & \texttt{Reg} & $ 909$ & $18$ & $6$ & $0$ & $2 $ \\ \hline insurance & \texttt{Reg} & $ 1338$ & $15$ & $3$ & $2$ & $2 $ \\ \hline Communities and Crime & \texttt{Reg} & $ 1994$ & $108$ & $99$ & $0$ & $2 $ \\ \hline Abalone R & \texttt{Reg} & $ 4178$ & $11$ & $7$ & $0$ & $1 $ \\ \hline squark automotive CLV training & \texttt{Reg} & $ 8099$ & $77$ & $7$ & $2$ & $14 $ \\ \hline Seoul Bike Sharing Demand & \texttt{Reg} & $ 8760$ & $15$ & $9$ & $2$ & $1 $ \\ \hline Electrical Grid Stability Simu & \texttt{Reg} & $ 10000$ & $12$ & $12$ & $0$ & $0 $ \\ \hline blr real estate prices & \texttt{Reg} & $ 13320$ & $2$ & $2$ & $0$ & $0 $ \\ \hline Cervical Cancer Behavior Risk & \Clf & $ 72$ & $149$ & $19$ & $0$ & $14 $ \\ \hline Post-Operative Patient & \Clf & $ 91$ & $32$ & $0$ & $0$ & $8 $ \\ \hline Breast Cancer Coimbra & \Clf & $ 116$ & $9$ & $9$ & $0$ & $0 $ \\ \hline Heart failure clinical records & \Clf & $ 299$ & $12$ & $7$ & $5$ & $0 $ \\ \hline Ionosphere & \Clf & $ 352$ & $34$ & $32$ & $2$ & $0 $ \\ \hline Congressional Voting Records & \Clf & $ 436$ & $64$ & $0$ & $0$ & $16 $ \\ \hline Cylinder Bands & \Clf & $ 541$ & $111$ & $1$ & $0$ & $19 $ \\ \hline Credit Approval & \Clf & $ 691$ & $42$ & $4$ & $0$ & $8 $ \\ \hline Tic-Tac-Toe Endgame & \Clf & $ 959$ & $36$ & $0$ & $0$ & $9 $ \\ \hline QSAR biodegradation & \Clf & $ 1056$ & $141$ & $41$ & $0$ & $15 $ \\ \hline Chess (King-Rook vs. King-Pawn & \Clf & $ 3196$ & $102$ & $0$ & $3$ & $33 $ \\ \hline Mushroom & \Clf & $ 8125$ & $125$ & $0$ & $1$ & $20 $ \\ \hline Electrical Grid Stability Simu & \Clf & $ 10000$ & $12$ & $12$ & $0$ & $0 $ \\ \hline MAGIC Gamma Telescope & \Clf & $ 19021$ & $10$ & $10$ & $0$ & $0 $ \\ \hline Adult & \Clf & $ 32561$ & $34$ & $6$ & $1$ & $4 $ \\ \hline Internet Firewall Data & \Clf & $ 65532$ & $11$ & $11$ & $0$ & $0 $ \\ \hline \end{tabular} \end{table} \subsection{Pre-processing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. \paragraph{Target treatement.} The target is centered and standardized via the function $\textbf{{function-T}}(\cdot)$. We remove the observation when the value is missing. \begin{mdframed} $ \begin{array}{l} \textbf{{function-T}}(Y)\\ \quad \left|\begin{array}{ll} Y -> \text{float32}(Y)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Y_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Y -> \frac{Y-\overline{Y}}{\bar\sigma(Y)}\\ \end{array} \right. \end{array} $ \end{mdframed} \bigskip \paragraph{Features treatment.} The imputation treatment is done during processing. For \textcolor{red}{categorical} \sout{qualitative} features, NAN Data may be considered as a new class. For \textcolor{red}{numerical} \sout{quantitative} features, we replace missing values by the mean. Denote by $n_j=\#\textbf{\texttt{set}}(X_j)$ the number of distinct values taken by the variable $X_j$ \bigskip $$ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}\,(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l}{\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)\leq 12\\ \qquad\textbf{{function-M}}\,(X_j)\\ {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-I}}\,(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)> 12\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $$ \bigskip $\bullet$ When $n_j=1$, we remove the variable $X_j$. $\bullet$ When $n_j=2$, potentially one of them being NAN, $\textbf{{function-C}}\,(\cdot)$. performs numerical encoding of binary categorical features. \begin{mdframed} $ \begin{array}{l} \textbf{{function-C}}\,(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i!=\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \end{mdframed} \bigskip $\bullet$ Numerical features with less than $12$ distinct values are also treated as categorical features ($2<n_j\leq 12$), potentially one of them being NAN. We apply this one-hot-encoding via $\textbf{{function-M}}\,(\cdot)$. \bigskip $\bullet$ Otherwise, the feature is removed or treated by the function $\textbf{{function-I}}\,(\cdot)$ if its type is \texttt{float}. In the latter case, the missing data is replaced by the mean of the variable. \begin{mdframed} $ \begin{array}{l} \textbf{{function-I}}\,(Z)\\ \quad\textbf{for}\,\, i=1:n\\ \quad \left|\begin{array}{ll} \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_{i}==\text{NAN} \\ \quad Z_{i} -> {\texttt{mean}}(Z)\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \end{mdframed} \section{\texttt{\,MLR $\,$}{} Parameters Analysis} We analyze now the key components which compose our method. We performed extensive evaluations (\textcolor{red}{$value$} seeds) on three datasets, \texttt{UCI36}, \texttt{UCI5}, \texttt{UCI18} of respective size $(n,d) = ()$, $()$ and $()$. In this section we study the behavior of our method and its key components through extensive evaluation (\textcolor{red}{$value$} seeds) on three datasets, \texttt{UCI36}, \texttt{UCI5}, \texttt{UCI18} which correspond respectively to n,d = (\textcolor{red}{$value$}, \textcolor{red}{$value$},\textcolor{red}{$value$}). These well-known datasets are quite representative of their respective sample size regimes. \subsection{Impact of the MLR components.} \textcolor{red}{In this section, we study the impact of the different components in \texttt{\,MLR $\,$}{} approach on the the ${\texttt{R}^2}$-score on the $test$ and the $validation$ set, computation time, the convergence of the method ({\texttt{Iter}}) and the initialization of the Ridge parameter ($\lambda_{init}$) . EST-CE QUE POUR CHAQUE ÉTUDE ON FAIT VARIER UN SEUL PARAMÈTRE ET ON FIXE LES AUTRES PARAMÈTREs AVEC LES VALEURS PA DÉFAUT TABLE~\ref{tab:architectures1}} \paragraph{Structured Dithering.} Recall that we added Structured noise $(\ensuremath{\mathbb{I}}_n-\textbf{H} )\xi$ to the target $\textbf{Y}$ with $\xi\sim \ensuremath{\mathcal{N}}(0,\sigma^2\ensuremath{\mathbb{I}})$. Table~\ref{tab:StructDithering} reveals the impact of the Structured dithering ($i.e.$ the parameter $\sigma$) \sout{on the ${\texttt{R}^2}$-score, computation time and the convergence of the method}. Default value in bold ($\boldsymbol{\sigma = 1}$) yields consistently good generalization performance. Of course, it is always possible to tune this hyperparameter around value $1$ for potential improvement of the generalization performances. Higher values of $\sigma$ lead to a significant degradation of ${\texttt{R}^2}$ score as it caused the method to diverge. In our experiments, $\sigma$ was not an hyperparameter as it was always set equal to $1$. \textcolor{red}{Adding Structured dithering has no impact on the value of $\lambda_{init}$.} \begin{table}[H] \caption{Structured dithering dependence.} \label{tab:StructDithering} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 &$\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.321$ & $30.356$ & $60.650$ & $0.479$ & $219.345$ \\ \hline &0.2 & $ 0.338$ & $30.424$ & $79.830$ & $0.496$ & $219.345 $ \\ \hline &\textbf{1} & $ 0.357$ & $30.423$ & $99.570$ & $0.515$ & $219.345 $ \\ \hline &2 & $ 0.089$ & $1.312$ & $0.250$ & $0.137$ & $219.345 $ \\ \hline &3 & $ 0.068$ & $1.257$ & $0.000$ & $0.116$ & $219.345 $ \\ \hline \hline UCI 5 & $\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.463$ & $32.250$ & $11.200$ & $0.511$ & $774.264 $ \\ \hline &0.2 & $ 0.463$ & $32.408$ & $14.550$ & $0.514$ & $774.264 $ \\ \hline &\textbf{1} & $ 0.460$ & $32.281$ & $46.750$ & $0.525$ & $774.264 $ \\ \hline &2 & $ 0.220$ & $1.276$ & $0.020$ & $0.226$ & $774.264 $ \\ \hline &3 & $ 0.216$ & $1.288$ & $0.000$ & $0.223$ & $774.264 $ \\ \hline \hline UCI 18 &$\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.863$ & $89.425$ & $181.300$ & $0.864$ & $10000.001 $ \\ \hline &0.2 & $ 0.863$ & $90.206$ & $188.520$ & $0.864$ & $10000.001 $ \\ \hline &\textbf{1} & $ 0.855$ & $89.968$ & $191.920$ & $0.857$ & $10000.001 $ \\ \hline &2 & $ 0.364$ & $1.876$ & $0.000$ & $0.363$ & $10000.001 $ \\ \hline &3 & $ 0.364$ & $1.891$ & $0.000$ & $0.363$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Permutations.} We studied the impact of the randomness aspect of the \texttt{\,MLR $\,$}{} loss. We compared different sets of permutations drawn at random, Table~\ref{tab:Permutation} shows that the choice of permutations has little impact on the value of \texttt{\,MLR $\,$}{}. \textcolor{red}{From $T>1$} \sout{For $T\geq 1$}, these variations drastically diminish. Meanwhile, the number of permutations has a direct negative impact on runtime per iteration and VRAM footprint. Past a certain threshold \textcolor{red}{$value$}, GPU parralelization no longer prevents the linear dependency with $T$. We escape any tradeoff by picking $T=2^{4}$ permutations in all our experiments. This value is large enough for the \texttt{\,MLR $\,$}{} loss to converge (with regards to $T$), yet still leveraging GPU parralelization. \begin{table}[H] \caption{Permutation dependence} \label{tab:Permutation} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0.0 & $ 0.252$ & $3.184$ & $61.050$ & $0.401$ & $31.831 $ \\ \hline & 1.0 & $ 0.331$ & $3.357$ & $110.040$ & $0.459$ & $285.238 $ \\ \hline & 2.0 & $ 0.338$ & $3.359$ & $109.960$ & $0.468$ & $215.370 $ \\ \hline & 4.0 & $ 0.343$ & $3.358$ & $109.370$ & $0.473$ & $219.345 $ \\ \hline & 16.0 & $ 0.347$ & $4.012$ & $116.190$ & $0.484$ & $216.235 $ \\ \hline & 256.0 & $ 0.351$ & $3.371$ & $117.160$ & $0.494$ & $219.345 $ \\ \hline & 1024.0 & $ 0.349$ & $3.433$ & $117.650$ & $0.495$ & $219.345 $ \\ \hline \end{tabular} \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 5 & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0.0 & $ 0.460$ & $3.253$ & $46.770$ & $0.509$ & $774.264 $ \\ \hline & 1.0 & $ 0.461$ & $3.452$ & $62.020$ & $0.518$ & $774.264 $ \\ \hline & 2.0 & $ 0.466$ & $3.461$ & $60.040$ & $0.518$ & $774.264 $ \\ \hline & 4.0 & $ 0.469$ & $3.462$ & $60.720$ & $0.521$ & $774.264 $ \\ \hline & 16.0 & $ 0.473$ & $6.172$ & $72.800$ & $0.527$ & $774.264 $ \\ \hline & 256.0 & $ 0.477$ & $3.496$ & $81.900$ & $0.532$ & $774.264 $ \\ \hline & 1024.0 & $ 0.480$ & $3.551$ & $81.530$ & $0.532$ & $774.264 $ \\ \hline \end{tabular} \end{table} \paragraph{Initialization of Ridge parameter $\lambda_{init}$.} \textcolor{red}{Recall that Ridge regularization is the essential component of the method as it provides a closed form representation of the last hidden layer on which we can conveniently apply the follow-up treatments: Structured dithering and random permutations.} \textcolor{red}{Contrary to $T$ and the dither parameter ($\sigma$), the choice of the appropriate initial value of $\lambda$ is very impact-full and depends on both network architecture and datasets characteristics as shown in Table~\ref{tab:lambdaInit}.} \textcolor{red}{J ESPERE QUE CE QUE J'ÉCRIS EST VRAI: When we compare the value $\lambda_{init}$ given by our heuristic (in bold) with other value chosen in Table~\ref{tab:lambdaInit} or with the oracle $\lambda^*$ found by grid-search on the performance on $test$ set , we observe that our heuristic is quite effective, as in average it varies only by a factor \textcolor{red}{$value$} of the optimal value. } \begin{table}[H] \caption{Dependence on $\lambda_{init}$} \label{tab:lambdaInit} \centering \begin{tabular}{|c|c|c|c|c|c|} \hline UCI 36 &$\lambda_{init}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ \\ \hline \hline &$10^{-3}$ & $ -0.444$ & $2.078$ & $90.270$ & $0.265 $ \\ \hline &$10^{-1}$ & $ 0.097$ & $2.083$ & $70.310$ & $0.254 $ \\ \hline &$10$ & $ 0.320$ & $2.070$ & $116.630$ & $0.466 $ \\ \hline &$10^{3}$ & $ 0.359$ & $2.087$ & $125.020$ & $0.480 $ \\ \hline &$10^{5}$ & $ 0.334$ & $2.103$ & $152.460$ & $0.428 $ \\ \hline &$10^{7}$ & $ 0.263$ & $2.104$ & $188.630$ & $0.339 $ \\ \hline &$10^{9}$ & $ -0.050$ & $2.089$ & $197.890$ & $-0.009 $ \\ \hline &$\boldsymbol{\lambda_{init}}$ & & & & \\ \hline &$\lambda^*$ & & & & \\ \hline \hline UCI 5 &$\lambda_{init}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ \\ \hline \hline &$10^{-3}$ & $ -33.053$ & $0.133$ & $2.510$ & $-9.371 $ \\ \hline &$10^{-1}$ & $ -3.768$ & $2.137$ & $36.770$ & $-0.151 $ \\ \hline &$10$ & $ 0.422$ & $2.086$ & $9.530$ & $0.477 $ \\ \hline &$10^{3}$ & $ 0.477$ & $2.094$ & $73.530$ & $0.529 $ \\ \hline &$10^{5}$ & $ 0.486$ & $2.088$ & $132.420$ & $0.522 $ \\ \hline &$10^{7}$ & $ 0.477$ & $2.088$ & $191.320$ & $0.488 $ \\ \hline &$10^{9}$ & $ 0.273$ & $2.086$ & $200.000$ & $0.287 $ \\ \hline &$\boldsymbol{\lambda_{init}}$ & & & & \\ \hline &$\lambda^*$ & & & & \\ \hline \hline UCI 18 &$\lambda_{init}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ \\ \hline \hline &$10^{-3}$ & $ 0.761$ & $5.042$ & $97.970$ & $0.775 $ \\ \hline &$10^{-1}$ & $ 0.795$ & $5.009$ & $66.370$ & $0.807 $ \\ \hline &$10$ & $ 0.844$ & $4.989$ & $161.160$ & $0.847 $ \\ \hline &$10^{3}$ & $ 0.843$ & $4.974$ & $194.550$ & $0.844 $ \\ \hline &$10^{5}$ & $ 0.774$ & $4.966$ & $197.510$ & $0.775 $ \\ \hline &$10^{7}$ & $ 0.711$ & $4.956$ & $198.600$ & $0.710 $ \\ \hline &$10^{9}$ & $ 0.614$ & $4.942$ & $198.830$ & $0.613 $ \\ \hline &$\boldsymbol{\lambda_{init}}$ & & & & \\ \hline &$\lambda^*$ & & & & \\ \hline \end{tabular} \end{table} \paragraph{Ablation study.} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets \textcolor{red}{LESQUELS?} with different sample sizes and feature to sample ratios. We repeated each experiment over 100 random $train$/$test$ splits. \textcolor{red}{All the results presented here correspond to the architecture of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{} with hyperparameters fixed as in Table~\ref{tab:architectures1}.}\\ A standard \RNN2 ({\texttt{FFNN}}{} of $2$ layers with a wide architecture, $J=2^{10}$) cannot be trained efficiently on small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark.\\ Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach.\\ The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging ($0.062$) is still of the same order of magnitude as the one we got when we applied permutations on top of Ridge to the {\texttt{FFNN}}{} ($0.043$). This means these two ingredients (permutations and struct. dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \begin{table}[H] \caption{Ablation Study in Regression.} \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline \RNN2 & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline {\texttt{FFNN}}{}+ Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline {\texttt{FFNN}}{}+ Ridge + Struct. Dithering & $ 0.323 \pm 0.075 $ & $ 0.400 \pm 0.048 $ \\ \hline {\texttt{FFNN}}{}+ Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $ \\ \hline \texttt{\,MLR $\,$}{} & $ 0.371 \pm 0.024 $ & $ 0.433 \pm 0.000 $ \\ \hline \end{tabular} \end{table} \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.184$ & $0.705$ & $162.120$ & $0.284$ & $210.307 $ \\ \hline &$2^{6}$ & $ 0.276$ & $0.751$ & $160.030$ & $0.364$ & $211.555 $ \\ \hline &$2^{8}$ & $ 0.325$ & $0.905$ & $135.400$ & $0.431$ & $205.351 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.344$ & $2.201$ & $113.610$ & $0.484$ & $222.455 $ \\ \hline &$2^{12}$ & $ 0.322$ & $15.796$ & $94.180$ & $0.503$ & $220.900 $ \\ \hline \hline UCI 5 &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.367$ & $0.724$ & $184.540$ & $0.379$ & $678.097 $ \\ \hline &$2^{6}$ & $ 0.442$ & $0.743$ & $157.840$ & $0.471$ & $628.464 $ \\ \hline &$2^{8}$ & $ 0.467$ & $0.907$ & $115.510$ & $0.512$ & $774.264 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.470$ & $2.188$ & $71.790$ & $0.527$ & $774.264 $ \\ \hline &$2^{12}$ & $ 0.460$ & $16.987$ & $37.210$ & $0.524$ & $774.264 $ \\ \hline \hline UCI 18 &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.622$ & $1.008$ & $200.000$ & $0.620$ & $9350.431 $ \\ \hline &$2^{6}$ & $ 0.714$ & $1.134$ & $200.000$ & $0.713$ & $9927.827 $ \\ \hline &$2^{8}$ & $ 0.773$ & $1.955$ & $199.880$ & $0.773$ & $10000.001 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.825$ & $7.062$ & $198.240$ & $0.825$ & $10000.001 $ \\ \hline &$2^{12}$ & $ 0.856$ & $54.121$ & $193.270$ & $0.857$ & $10000.001 $ \\ \hline \end{tabular} \caption{Width dependence} \label{tab:Width} \end{table} \subsection{Other hyperparameters.} The impact of the other hyperparameters in our method is sometimes strikingly different from what is usually observed in the general deep learning framework. (batch-size: \cite{}, layer-size\cite{}). Bear in mind that in the setting of regression on small tabular datasets, standard {\texttt{FFNN}}{} already behave quite differently with respect to hyperparameters. All results below are shown for both \texttt{\,MLR $\,$}{} and regular {\texttt{FFNN}}{} to get a point of reference. \paragraph{Dither.} At each iteration, we draw and add i.i.d. gaussian noise $\ensuremath{\mathcal{N}}(0,\tilde{\sigma}^2\ensuremath{\mathbb{I}})$ on the target $\textbf{Y}$ \textcolor{red}{in the regression setting}. In Table~\ref{tab:Dithering}, we see that adding a small amount of noise improves performances, but beyond a certain threshold, it deteriorates convergence \textcolor{red}{NE CORRESPOND PAS A CE QUE DIS LE TABLEAU}. \textcolor{red}{There again, we can improve generalization performance by considering $\tilde{\sigma}$ as an hyperparameter to be tuned. Nonetheless, we do not consider in all our experiments, we always set the noise level at $\tilde{\sigma}=0.03$. Emphasize that performing dithering has no impact on on run-time per iteration or on the value of $\lambda_{init}$.} \begin{table}[H] \caption{Dithering dependance : label noise scale} \label{tab:Dithering} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 & $\tilde{\sigma}$ &${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.347$ & $3.104$ & $116.490$ & $0.483$ & $220.900 $ \\ \hline &0.01 & $ 0.351$ & $3.110$ & $114.560$ & $0.486$ & $220.900 $ \\ \hline &\textbf{0.03} & & & & & \\ \hline &0.1 & $ 0.354$ & $3.111$ & $113.720$ & $0.490$ & $215.104 $ \\ \hline &0.3 & $ 0.353$ & $3.108$ & $119.300$ & $0.502$ & $216.367 $ \\ \hline \hline UCI 5 & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.475$ & $3.250$ & $76.830$ & $0.527$ & $774.264 $ \\ \hline &0.01 & $ 0.474$ & $3.258$ & $68.680$ & $0.527$ & $774.264 $ \\ \hline &\textbf{0.03} & & & & & \\ \hline &0.1 & $ 0.474$ & $3.258$ & $70.860$ & $0.528$ & $774.264 $ \\ \hline &0.3 & $ 0.474$ & $3.258$ & $68.620$ & $0.532$ & $774.264 $ \\ \hline \hline UCI 18 & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.813$ & $8.554$ & $197.430$ & $0.814$ & $10000.001 $ \\ \hline &0.01 & $ 0.814$ & $8.561$ & $197.240$ & $0.814$ & $10000.001 $ \\ \hline &\textbf{0.03} & & & & & \\ \hline &0.1 & $ 0.813$ & $8.561$ & $196.720$ & $0.814$ & $10000.001 $ \\ \hline &0.3 & $ 0.812$ & $8.567$ & $196.220$ & $0.813$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Width.} Most notably, Figure \ref{?} reveals that wider architecture is always better with our method as the generalization performance is an increasing function of the width of the network. We recall that for standard NN trained without MLR, wider architectures are more prone to overfitting. The impact on running time is highly dependant on specific framework and device configurations(See Figure \ref{?}). As a simple rule of thumb, the rate for the inversion of a square matrix is linear on a GPU with parralelization\cite{} and quadratic on a CPU without. The biggest limitation is the size of the VRAM of the GPU, as $32G$ is available at best currently (we conducted all these experiments on devices with $11G$VRAM, although they can be replicated with the common $8G$ VRAM as well without trouble). \paragraph{Batch size.} Its \sout{Batch size} effect on generalization is the subject of numerous studies \cite{} with contradicting conclusions and no universal guideline. However, note that the explored values almost always lie within \textcolor{red}{$value$} and \textcolor{red}{$value$}. Likewise, these studies do not focus on the very small sample regime. Figure \ref{} shows that our conclusions for the width of the network mostly hold true for the size of the batch: as big as possible. For small datasets this mean using the entire train-set at each iteration, while GPU memory constraints \textcolor{red}{rule out} \sout{rom} going beyond $2^{12}$ for large datasets. Downstream, a larger batch size means less gradient oscillation\cite{}, a larger learning rate \cite{} and less iterations\cite{}, these findings hold true in our experiments (as can be seen below). \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36&$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.122$ & $4.375$ & $32.596$ & $0.014$ & $38.452 $ \\ \hline &$2^{4}$ & $ 0.334$ & $5.194$ & $129.673$ & $0.520$ & $82.567 $ \\ \hline &$2^{5}$ & $ 0.349$ & $5.194$ & $107.269$ & $0.517$ & $110.214 $ \\ \hline &$2^{6}$ & $ 0.393$ & $5.352$ & $115.115$ & $0.500$ & $246.869 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.401$ & $5.238$ & $114.385$ & $0.499$ & $237.899 $ \\ \hline \hline UCI 5 &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.014$ & $4.658$ & $38.020$ & $0.003$ & $290.923 $ \\ \hline &$2^{4}$ & $ 0.415$ & $5.046$ & $148.680$ & $0.490$ & $158.198 $ \\ \hline &$2^{5}$ & $ 0.459$ & $5.180$ & $141.260$ & $0.527$ & $204.647 $ \\ \hline &$2^{6}$ & $ 0.474$ & $5.216$ & $128.820$ & $0.545$ & $253.497 $ \\ \hline &$2^{7}$ & $ 0.477$ & $5.277$ & $103.270$ & $0.540$ & $388.678 $ \\ \hline &$2^{8}$ & $ 0.478$ & $5.254$ & $97.010$ & $0.535$ & $774.264 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.475$ & $5.301$ & $72.470$ & $0.528$ & $774.264 $ \\ \hline \hline UCI 18 &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ 0.013$ & $4.536$ & $15.790$ & $0.013$ & $89.257 $ \\ \hline &$2^{4}$ & $ 0.640$ & $5.317$ & $168.790$ & $0.642$ & $107.543 $ \\ \hline &$2^{5}$ & $ 0.673$ & $5.375$ & $176.200$ & $0.675$ & $171.905 $ \\ \hline &$2^{6}$ & $ 0.703$ & $5.360$ & $186.940$ & $0.705$ & $212.625 $ \\ \hline &$2^{7}$ & $ 0.729$ & $5.413$ & $188.540$ & $0.730$ & $537.572 $ \\ \hline &$2^{8}$ & $ 0.750$ & $5.447$ & $189.770$ & $0.751$ & $774.264 $ \\ \hline &$2^{9}$ & $ 0.763$ & $5.460$ & $191.490$ & $0.765$ & $2641.979 $ \\ \hline &$2^{10}$ & $ 0.785$ & $5.781$ & $192.900$ & $0.786$ & $2782.560 $ \\ \hline &$2^{11}$ & $ 0.790$ & $6.908$ & $195.150$ & $0.791$ & $10000.001 $ \\ \hline &$2^{12}$ & $ 0.813$ & $9.842$ & $196.930$ & $0.814$ & $10000.001 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.824$ & $13.547$ & $197.800$ & $0.825$ & $10000.001 $ \\ \hline \hline UCI 0 &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.003$ & $4.826$ & $65.470$ & $-0.003$ & $185.268 $ \\ \hline &$2^{4}$ & $ 0.019$ & $5.344$ & $121.380$ & $0.021$ & $628.786 $ \\ \hline &$2^{5}$ & $ 0.050$ & $5.629$ & $157.860$ & $0.052$ & $563.540 $ \\ \hline &$2^{6}$ & $ 0.109$ & $5.659$ & $176.680$ & $0.110$ & $770.180 $ \\ \hline &$2^{7}$ & $ 0.148$ & $5.646$ & $171.810$ & $0.149$ & $705.241 $ \\ \hline &$2^{8}$ & $ 0.188$ & $5.678$ & $179.850$ & $0.190$ & $988.136 $ \\ \hline &$2^{9}$ & $ 0.209$ & $5.771$ & $185.860$ & $0.211$ & $911.264 $ \\ \hline &$2^{10}$ & $ 0.231$ & $6.165$ & $190.310$ & $0.233$ & $1001.640 $ \\ \hline &$2^{11}$ & $ 0.254$ & $7.251$ & $192.960$ & $0.255$ & $1245.079 $ \\ \hline &$2^{12}$ & $ 0.278$ & $10.199$ & $194.410$ & $0.279$ & $1376.753 $ \\ \hline &$2^{13}$ & $ 0.298$ & $20.653$ & $195.740$ & $0.298$ & $2782.560 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.316$ & $56.976$ & $193.520$ & $0.317$ & $3793.002 $ \\ \hline \end{tabular} \caption{ Batch size dependence \label{tab:Batchsize} } \end{table} \paragraph{Depth.} By contrast with batch size and network width, our study depicts the reverse story for network depth. Deep learning, by essence and through successive milestones (\cite{,,,}\cite{}) associated deeper architectures with improved performance and generalization. Meanwhile, our results clearly show that stacking layers not only gives diminishing returns, but can also become completely detrimental, to the point where shallow networks sometimes significantly outperform deeper networks (see results with dataset \ref{}). These findings seem to occur mostly for smaller datasets (see Figure \ref{}). Recall that going deeper often means adding specific schemes such as residual\cite{} and skip-connect\cite{} layers which were outside of the scope of this paper. Quite predictably, deeper network means bigger runtime per iteration\ref{}. \textbf{Learning rate \& number of iterations.} We restrained from tuning the calibration parameters of ADAM, or resorting to another optimizer as default pytorch setting works well. However, since the width and batch size we picked were outside of the usual ranges, we also had to adjust the learning rate accordingly. Indeed, Figure \ref{} shows that for larger learning rates, \texttt{\,MLR $\,$}{} behavior is very atypical. Far from double descent patterns, in most of our experiments, the generalization performance is achieved after a very small number of iterations. Most often, the performance beyond this optimum deteriorates just as fast.\ref{} We did not find any robust heuristic or metric to estimate the best iteration or a convergence criterion. As such, we rely on validation performance to perform early stopping which becomes mandatory in this regime. Although using smaller learning rates lead us back to more familiar patterns \ref{}, with more iterations required before reaching the optimum and a smoother and "safer" behavior, it came at the cost of worst performance and much longer training time \ref{}. This last point was to be expected since run-time scales linearly with the number of iterations. As we will see below, smoothing the prediction using ensemble methods proved more cost effective in term of run-time and performance. Note that these findings hold especially true for the most shallow architectures, while the behavior gradually falls back to the classical pattern when stacking additional layers. Figure \ref{} shows that the appropriate learning rate is smaller for deeper architectures, while, in turn, the optimal iteration comes later. \paragraph{Scalability.} In terms of scalability, we saw that the main bottle-neck is the GPU VRAM size, which at current trend should increase gradually over the years. The runtime per iteration is almost constant since it depends mostly on width, depth, batch-size and number of permutations which are either fix or bounded (for batch-size), and independent from the dataset size or shape. Meanwhile, the appropriate number of iterations increases mainly with the depth of the network, and as such, we can set a single value of $max_iter$ for each depth. It follows that, number of iterations and runtime per iterations depend mostly on network depth, and are almost constant with regards to the number of samples and features. \textcolor{red}{ Inclure graph avec very large datasets $n\approx 55M$ gives } \subsection{Dependance Row Tables} \section{Compared methods and selected hyperparameters} \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|l|l|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \paragraph{Selected architectures for \texttt{\,MLR $\,$}{} and {\texttt{FFNN}}{}. } In view of the above findings, we only varied the depth of the network when testing our method. That is, we did not perform any hyperparameter tuning for the benchmark. For each depth we picked a fixed appropriate value for learning rate and max iteration. All the other aforementioned hyperparameters were set to a constant value across all experiments. Table \ref{tab:architectures1} details these choices. \paragraph{Bagging and ensemble for \texttt{\,MLR $\,$}{} and {\texttt{FFNN}}{}.} The previous findings motivated us to also try using bagging, as the shallow networks exhibit high variance. To mitigate this, we train concurrently $10$ networks with different random train/valid split and weight initialization and average the output of the networks to yield a prediction. We will see in Section \ref{} that it significantly improves performance while also multiplying runtime by $10$. We called ${\texttt{Bag-MLR1}}$ and ${\texttt{Bag-MLR2}}$ these bagging estimators with each containing $10$ instances of ${\texttt{MLR$\textapprox$1}} $ and $ {\texttt{MLR$\textapprox$2}}$ networks respectively (architectures we just defined in Table \ref{tab:tab:MLRmethods}. Since our implementation is compatible with the scikit learn API, we used their implementation of Bagging. Finally, we also decided to build an ensemble estimator by aggregating networks of varying depth. We call {\texttt{Ens-MLR}}{} the estimator which contains $5$ instances of {\texttt{MLR$\textapprox$1}}, $5$ instances of {\texttt{MLR$\textapprox$2}} and $5$ instances of {\texttt{MLR$\textapprox$3}}, averaging the output of these $15$ networks to yield a prediction. \textcolor{red}{Ajouter un graphe et une explication pour la valeur 30 du bagging} \paragraph{Benchmark methods.} We picked $19$ methods to compare ourselves with. See Table \ref{tab:method} for the exhaustive list. For each \texttt{\,MLR $\,$} architecture and ensemble, we also ran a standard {\texttt{FFNN}}{} with the identical settings (directly coded in pytorch). We used \textcolor{red}{$value$} methods implemented in the scikit-learn library, including all the previously mentionned benchmarked methods. Finally we added the freely available py-earth implementation which emulates MARS. Note that besides the aforementionned standard FFNN and the multilayer perceptron implemented in scikit learn, we did not run the complete benchmark for any of the methods mentionned in section \ref{}(Intro) We did try initially to include SELU and Fastai Tabular but even those felt short for datasets in this range, as the scikit-learn multi-layer perceptron implementation outperformed them in both runtime and result. We also only used xgb from scikit-learn, and not xgboost and CAT-BOOST. These would probably get even better results than xgb for our largest datasets after a little bit of tuning. Likewise, we could get even better results by fine-tuning \texttt{\,MLR $\,$} and combining it with other deep learning regularization schemes but this would lead us outside of the scope of this benchmark and this paper. Also, we did not include kernel methods such as Nystr\"om in our benchmark since they can be used as feature engineering in combination with all other methods. Again, bear in mind that we did not use any data-enhancing techniques, nor manually tuned any method for any datasets, we aimed to compare the different methods not improve across all datasets not beat their respective leader-boards. \begin{table}[H] \caption{List of methods with their tuning grid} \label{tab:ComparedMethod} \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline {\texttt{Ens-MLR}} & \textbf{?} & \\ \hline {\texttt{RF}} & \textbf{?} & \\ \hline {\texttt{XGB}} & \textbf{?} & \\ \hline {\texttt{XRF}} & \textbf{?} & \\ \hline {\texttt{MLP}} & \textbf{?} & \\ \hline {\texttt{NN}{}}-1 & \textbf{?} & \\ \hline {\texttt{NN}{}}-2 & \textbf{?} & \\ \hline {\texttt{NN}{}}-3 & \textbf{?} & \\ \hline \texttt{Kernels} & \textbf{?} & \\ \hline {\texttt{MARS}} & \textbf{?} & \\ \hline {\texttt{CART}} & \textbf{?} & \\ \hline $\nu$-{\texttt{SVM}} & \textbf{?} & \\ \hline {\texttt{Ridge}} & \textbf{?} & \\ \hline \texttt{Lasso} & \textbf{?} & \\ \hline {\texttt{Elastic-Net}} & \textbf{?} & \\ \hline \texttt{Intercept} & \textbf{?} & \\ \hline \end{tabular} \end{table} \subsection{Overall Performance comparisons} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:}), with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method, R.F., as expected from \cite{fernandez2014we} comes three points behind the best \texttt{\,MLR $\,$}{} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$}{} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$}{} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind \texttt{\,MLR $\,$}{}, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat \texttt{\,MLR $\,$}{} on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat \texttt{\,MLR $\,$}{}, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by \texttt{\,MLR $\,$}{}, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}{}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}{}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$}{} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where \texttt{\,MLR $\,$}{} is not in the top three.} In agreement with \cite{fernandez2014we}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$}{} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$}{} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average R2 to best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating \texttt{\,MLR $\,$}{} neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. This last empirical observation leads to the discovery of another very interesting property of \texttt{\,MLR $\,$}{} neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$}{} eliminates the need to choose a specific width\ref{}, can automatically adapt the choice of the initial regularization parameter\ref{} to the dataset at hand and requires no tuning for the number of permutations and the level of noise applied on the target\ref{}. Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be pick by following a straightforward heuristic (see Section \ref{}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}{}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weakly correlated with the size of the considered dataset, it remains an impactful decision\footnote{As our dataset by dataset results \ref{} clearly shows}. And yet, we just found that this difficulty can mostly be alleviated by a simple aggregation of architectures of different depths. \textcolor{red}{ Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \label{tab:perf_rank} \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. } \end{table*} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN).} \label{tab:UCIfull} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{\texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{} Implementation} \subsection{Algorithms} \textcolor{red}{detail backpropagate.} \subsection{Inversion GPU, paralellization, set up} \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ (see Table~\ref{tab:hyp1}) for all the datasets in our benchmark. Therefore, $T$ is \textbf{not an hyperparameter} (see Table ???). Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. \\ The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. \textcolor{red}{We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is not costly as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix}. In addition, matrix inverse differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by the matrix ${\textbf{Perm}}(\textbf{Y})$ instead of vector $\textbf{Y}$. So the addition of the permuted term is also quite benign.} \\ \bibliographystyle{plain} \section{Introduction} \newpage \section{Related Work} \newpage \section{The {\texttt{FFNN}}} \subsection{Matrix form notations} Consider a regression function, $y=f^*(\textbf{x})$ maps an input $\textbf{x}$ to $y$. The goal of a FFNN is to approximate $f^*$ by mapping $\textbf{y}=f(\textbf{x},\boldsymbol{\theta})$ and learning the value of the parameters $\boldsymbol{\theta}$ that result in the best approximation. Let $\mathcal{D}_{train}=\{(\textbf{X}_i,Y_i)\}_{i=1}^n$ be a train set, we use the following notations: for $\ell\in \llbracket1,L-1 \rrbracket$ \begin{itemize} \item \textbf{\underline{First Layer.} } Input: $Z^0=X_i\in\mathbb{R}^p$, Output: $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item \textbf{\underline{Hidden Layers.} } Input: $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, Output: $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, \item \textbf{\underline{Last Layer.} } Input: :$Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$, Output: $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} Then, for all $i\in \llbracket1,n \rrbracket$, the FFNN is $s.t.$ $$\begin{array}{l} \textbf{Input} : Z^0=X_i=A^0\\ Z^{\ell+1}=A^\ell W^\ell+ B^\ell,\quad \ell\in \llbracket 0,L-1 \rrbracket\\ A^\ell={\texttt{ReLU}}(Z^\ell),\quad\ell\in \llbracket1,L-1 \rrbracket\\ \textbf{Output} : A^L=Z^L \end{array}$$ We set \begin{eqnarray} \label{theta} \boldsymbol{\theta}:=\{W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\},\quad\text{with} \end{eqnarray} \begin{minipage}[t]{0.55\textwidth} \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} Previously all the notation have been defined for one observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define \begin{eqnarray} \label{ALm1} \mathbb{A}^{L-1}:=\mathbb{A}^{L-1}(\boldsymbol{\theta},\mathbb{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J} \end{eqnarray} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} We want to train the ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{U}_i,Z_i)\}_{i=1}^m$, that is, to minimize $$ L(\boldsymbol{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\boldsymbol{\theta},\textbf{U}_i) - Z_i)^2 $$ A naive unregularized training method consists in minimizing the objective function $ L(\boldsymbol{\theta};\mathcal{D}_{train}) = \sum_{i=1}^n (f(\boldsymbol{\theta},\textbf{X}_i) - Y_i)^2. $ This approach is prone to overfitting. In \textbf{classical deep learning approach}, we minimize $$ \widetilde{L}\left(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})\right) = L(\boldsymbol{\theta};(\textbf{X},\textbf{Y})) + \mathrm{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. To this end, we first introduced a new loss based on permutations of the labels $\textbf{Y} = (Y_1,\cdots,Y_n)$. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y}$ as $ \pi(\textbf{Y}) = (Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} Let $T\geq 1$ be a fixed number. Let $\pi_t$, $1\leq t \leq T$, be permutations of $n$ elements drawn uniformly at random. The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}(\boldsymbol{\theta};\mathcal{D}_{train}) = L(\boldsymbol{\theta};(\mathbb{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\boldsymbol{\theta};(\mathbb{X},\pi_t(\textbf{Y})), $$ where $\mathbb{X}^\top = \left( \textbf{X}_1|\cdots|\textbf{X}_n \right)$. \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators $(\pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. Indeed, when $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\pi(i)}$ and $\mathbf{X}_i$. That means that $\mathbf{X}_i$ provides no information on the possible value of $\textbf{Y}_{\pi(i)}$. Therefore, predicting $\textbf{Y}_{\pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the \texttt{\,MLR $\,$}-loss. For $T = 1$, the \texttt{\,MLR $\,$}-loss could be written as follows: $$ \texttt{\,MLR $\,$}(\boldsymbol{\theta};\mathcal{D}_{train}) = L(\boldsymbol{\theta};(\textbf{X},\textbf{Y})) - L(\boldsymbol{\theta};(\textbf{X},\pi(\textbf{Y})). $$ \textcolor{red}{The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual loss function that fits the training set while the second term is introduced so that the trained model performs as poorly as possible when fitting the permuted labels.\\ Hence the $\texttt{\,MLR $\,$}$ loss is designed to capture only the meaningful \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. In other words, $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$.\\ Note that the \texttt{\,MLR $\,$}-loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. \texttt{\,MLR $\,$} is designed to capture only the \textcolor{red}{meaningful} \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed \texttt{\,MLR $\,$} focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. \paragraph{\texttt{\,MLR $\,$} to train Neural nets.} Applying $\texttt{\,MLR $\,$}$ to Neural nets is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $\texttt{\,MLR $\,$}$ loss is used to tune simultaneously a common set of regularization parameters}. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\lambda}:= \mathrm{argmin}_{\lambda}\; L(\widehat{\boldsymbol{\theta}}(\lambda);(\textbf{X},\textbf{Y}))- L(\widehat{\boldsymbol{\theta}}_{\pi}(\lambda);(\textbf{X},\pi(\textbf{Y}))), $$ with $\widehat{\boldsymbol{\theta}}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\, \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\, \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\pi(\textbf{Y}))) $. } $$ \widehat{\lambda}:= \mathrm{argmin}_{\lambda} L(\widehat{\boldsymbol{\theta}}(\lambda);(\textbf{X},\textbf{Y}))- \frac{1}{T}\sum_{t=1}^T L(\widehat{\boldsymbol{\theta}}_{\Pi_t}(\lambda);(\textbf{X},\pi_t(\textbf{Y}))), $$ with $ \widehat{\boldsymbol{\theta}}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\; \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi_t}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\; \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\pi_t(\textbf{Y}))) $. \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi_t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \paragraph{Our approach} To present our approach, let us define the following quantities : for $\lambda>0$ \begin{eqnarray} \label{W} \mathbb{W}&:=&\mathbb{W}(\boldsymbol{\theta},\lambda,\mathbb{X})=\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \H&:=&\H(\boldsymbol{\theta},\lambda,\mathbb{X})=\mathbb{A}^{L-1}\mathbb{W}\in\mathbb{R}^{n\times n}, \end{eqnarray} where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. In addition, we assume that $\H$ is differentiable w.r.t. $\boldsymbol{\theta}$ \begin{mydef}[MRL neural net] Set $\beta(\boldsymbol{\theta},\lambda,\textbf{Y}) = \mathbb{W}(\boldsymbol{\theta},\lambda,\mathbb{X}) \textbf{Y}$. The MLR neural net is $$ \textbf{NN}(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\cdot) =\mathbb{A}^{L-1}(\widehat{\boldsymbol{\theta}},\cdot) \beta(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\textbf{Y}) $$ where $(\widehat{\boldsymbol{\theta}},\widehat{\lambda}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ with \begin{align} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &:= \| \textbf{Y}-\mathbb{A}^{L-1}(\boldsymbol{\theta},\mathbb{X})\beta(\boldsymbol{\theta},\lambda,\textbf{Y})\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\mathbb{A}^{L-1}(\boldsymbol{\theta},\mathbb{X})\beta(\boldsymbol{\theta},\lambda,\pi^t(\textbf{Y}))\|_n^2 \end{align} \end{mydef} \begin{remark} \textcolor{red}{ Nonconvex but smooth loss. We can compute the derivative and so on...\\ compatible with graph differentiation and can fully exploit gpu parallelization... Inversion of matrix is not a costly operation. Ailleurs\\ \\Computational tractability?} \end{remark} We specify now our approach for a general function $\\H_{\boldsymbol{\theta}}$. In this paper, the function $\\H_{\boldsymbol{\theta}}$ takes the observations as an input and yields the values on the last hidden layer of a neural net as an output. This neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, and a ReLU activation function between each layer. There is not any additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, etc...). Also, note that $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})$ is the close form of the ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to \sout{the observation matrix} $\H_{\boldsymbol{\theta}}(\textbf{X})$ instead of $\textbf{X}$. Our approach fully embraces the interpretation of neural networks as automated differentiable feature engineering. As such, $\H_{\boldsymbol{\theta}}(\textbf{X})$ can be seen as a set of embeddings. \textcolor{red}{close form release the need for bi-level optimization.} The $\texttt{\,MLR $\,$}$ loss constructs embeddings that capture meaningful patterns in the data while pruning irrelevant connections. To this end, we leverage two key ingredients. First, label permutation is used to produce a control set $(\textbf{X},\pi(\textbf{Y}))$ that can only be fitted through memorization. Second, the Ridge performs shrinkage on the the embeddings. That way, we avoid trivial cases of perfect fit for both terms in the \texttt{\,MLR $\,$}-loss. We rather obtain a smooth behavior of both \sout{losses} \textcolor{red}{terms in \texttt{\,MLR $\,$}} w.r.t. the neural net parameters, \textcolor{red}{which can then be leveraged } to get a quantifiable comparison \textcolor{red}{between the two terms}. By maximizing the gap between the two \textcolor{red}{terms} \sout{quantities} in $\texttt{\,MLR $\,$}$, we \textcolor{red}{steer/optimize} the parameters towards the directions that maximize only generalization. This is not surprising since generalization directions are faster to learn than memorization directions \cite{PapierOptimization=Generalization}. **************************************************\\ **************************************************\\ \\ espace\\ **************************************************\\ **************************************************\\ Choix de Ridge plutôt qu'OLS: Ridge est Un estimateur biaisé, $\H_{\boldsymbol{\theta}}(X) \hat{\beta}$ permuté et $\H_{\boldsymbol{\theta}}(X) \hat\beta$ ont même variance car $Y$ et $\pi(Y)$ ont la même loi marginale Ainsi la différence des RMSE revient à une différence de biais pour un lambda donné. Dans le cas de Ridge le biais quantifie la perte de signale, ainsi, minimiser \texttt{\,MLR $\,$} revient à minimiser la perte de signal entre le cas informatif du cas non informatif. / On maximise la perte de signal supplémentaire dans le cas permuté. La Dvc quantifie, mesure l'expressivité d'un modèle(classe de fct). Notre approche est différente. On se fixe une Dvc de (n) à atteindre. Et on construit des embeddings qui permettent d'approcher les conditions à remplir/ nécessaires. de construire des embeddings, qui permettent d'approcher une Dvc proche de n, Dvc fait l'argmax sur n, pour une condition fixée. Nous on fixe n mais on essaie d'approcher la condition. Dans notre cas, la classe de fct considérée est fixée à la classe des Estimateurs Ridge dans $R_j (f(X) = 1_ {\H_{\boldsymbol{\theta}}(X) \beta^R >0})$. On se fixe une Dimension de VC (DVC) égale à la taille de notre échantillon n, et on cherche à construire les conditions de réalisation de cette DVC. Pour cela on cherche à construire $\H_{\boldsymbol{\theta}}(X)$ tel que pour le vecteur $Y$ de nos observations, le modèle soit le plus proche possible d'une expressivité $n$. Le plus proche possible au sens de la condition pas au sens de $n$. Par définition cela arrive si $||f(\H_{\boldsymbol{\theta}}(X) ) -Y ||_0$ que l'on remplacera par $CE() -> 0$. Dans le même temps, la construction des $\H_{\boldsymbol{\theta}}(X)$ doit répondre à une condition supplémentaire, le modèle doit être le moins expressif possible dans le cas non informatif, Y permuté. Ainsi, pour avoir une DVC proche de n, on construit $\H_{\boldsymbol{\theta}}(X)$ tel que la différence de ces deux expressivités soit la plus grande possible. \paragraph{Dvc} For a class of functions $\mathcal{C} $ from $\mathbb{R}^J$: $$D_{vc}(\mathcal{C}) = argmax_{n \in \ensuremath{\mathbb{N}}}\quad \exists \textbf{X} \in \mathbb{R}^{n,J}\quad \forall \textbf{Y} \in \{0;1\}^n \quad \exists f \in \mathcal{C} \quad \text{such that} \quad ||f(X)-Y||_0 = 0$$ For us, $n$ is a given value, it is the number of observations. We cannot optimize $n$ such that the condition is verified. But for $n$ given we can try to get as close as possible to the case where the condition is verified. We have chosen $\mathcal{C}$, it is the class of ridge estimators for classification, meaning all the functions of the form $f(X) = X \beta_{\lambda}$. So we are not using $D_{vc}$ to compare two class of functions. For a given value $\lambda$, we do not chose which element of $\mathcal{C}$ is used, it is always the ridge estimator with penalty $\lambda$. Also, we do not pick the worst labels possible in a logical sense. We are choosing the labels which are the worse in a statistical sense. This means we take the labels that are completely independent from the observations. To do so, we draw the permutations of $\textbf{Y}$ who verify this condition. So we consider only one value for the dimension $D_{vc}$, $n$. And with a fix candidate of the class \section{ Loss function for the general setting of $\kappa$ targets} \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define $\pi(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $$\pi(\textbf{Y}) = (Y_{\pi(1)},\ldots,Y_{\pi(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\H(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\H(\theta)\,\pi^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\H}:=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \subsection{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define $\pi^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad\pi^t(\mathbb{Y})=(\pi^{t,1}(\mathbb{Y}_1),\ldots,\pi^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $$\pi(\mathbb{Y})=(\pi^{1}(\mathbb{Y}),\ldots,\pi^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\H(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^{t,k}(\mathbb{Y}_k)-\H(\theta)\,\pi^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\H(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[\pi(\mathbb{Y})-\H(\theta)\,\underset{obs.}{\odot}\pi( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\H}:=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \paragraph{BKK for regression and tabular data} \paragraph{Parameter initialization} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \end{mdframed} Initialization of $\lambda$, the Ridge parameter: This parameter is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will prevent regularization effect. Furthermore, a very small value will bring numerical instability during the matrix inversion. Likewise, choosing $\lambda$ too big will prevent any learning. In both cases, the gradient with respect to $\lambda$ will vanish. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate value depends on many elements, such as datasize, the size of the model, how difficult the task is,... etc. However, we found a very efficient heuristic to pick an appropriate value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. We do not want to minimize the $\texttt{\,MLR $\,$}$ loss, we want to maximize its variations with respect to $\lambda$. This corresponds to the region where the regularization problem is \textit{interesting}. $$ \lambda = argmax_{\lambda \in \mathbb{R}_+^*} (\frac{d\texttt{\,MLR $\,$}}{d\lambda})(\lambda) $$ In practice, we use a grid : $l = 1 \cdots 40, \lambda_l = 10^{6 \times l / 40}$ $$ \lambda = argmax_{\lambda_{l}} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda_{l+1}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda_{l}) $$ \noindent \\ $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{Set }\boldsymbol{\theta} \\ \textbf{Set }\lambda \\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{WHILE } e < 1000\textbf{ DO:}\\ \quad \left| \begin{array}{llllll} A^{0}-> \textbf{X}\\ \textbf{FOR } l = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} A^{l} -> ReLU(A^{l-1}W^{l} +B^{l})\\ \end{array} \right.\\ \H(\boldsymbol{\theta},\lambda) = \mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\mathbb{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) = ||(\ensuremath{\mathbb{I}}_n - \H(\boldsymbol{\theta},\lambda))\textbf{Y}|| - \Sigma_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \H(\boldsymbol{\theta},\lambda))\pi^{t}(\textbf{Y})||\\ \textbf{Backpropagate } (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ $ \begin{array}{l} \textbf{Training})\\ \begin{array}{ll} \quad \left|\textbf{Initialization}\\ \begin{array}{ll} \textbf{Set }\boldsymbol{\theta} \\ \textbf{Set }\lambda \\ \end{array} \right.\\ \end{array} \end{array} $ \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \subsubsection{Pre-processing} \fbox{Functions} $ \begin{array}{l} \textbf{function C}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{max}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{mode}Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function R}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} \textbf{if}\,\, Z_i==\text{NAN} \\ \qquad\text{remove}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \fbox{Features pre-processing} \noindent\\ $ \begin{array}{l} \textbf{for}\,\, j=1:p\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \#\text{set}(X_j)=1\\ \qquad\text{remove}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)=2\\ \qquad\text{function C}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)\leq2\\ \qquad\text{function M}(X_j)\\ \textbf{else}\\ \quad \left| \begin{array}{l} \textbf{if}\,\, \text{type}(X_j)==\text{float}\\ \qquad\text{function R}(X_j)\\ \textbf{else} \\ \qquad\text{remove}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ $\left| \begin{array}{l} \end{array} \right.$ \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \subsection{Plan} Appendix for more details. \section{Rebuttal} Bookmark version Manuscrit \subsubsection{Generalization} Let us give one definition of \textbf{Generalization}: For a loss \textsf{L}\, (eg. cross-entropy or RMSE), a test datasets (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) and a constant prediction \ensuremath{\textsf{Y}_{Cste}} given by the intercept model (eg. mean or mode value), we define Generalization for any estimator \textsf{f}\, built independently from (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) as $$ \ensuremath{\textsf{Gen}\,} = \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Test}})) $$ We want to \textbf{maximize} \ensuremath{\textsf{Gen}\,} since it quantifies how well the estimator compares to the baseline on new data. Trying to choose \textsf{f}\, from a set of parametric estimators with no access to test data, we could set an intermediary goal based on a given dataset (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}). If we are to choose \textsf{f}\, from a set of parametric estimators, we could pick the parameters \ensuremath{\textsf{w}_{Train}} which minimize the loss on the train set (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}), $ \ensuremath{\textsf{w}_{Train}} = {argmin}_{\ensuremath{\textsf{w}}} \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}))) $ Focussing on gradient descent, we are searching for the best update $u_i = \ensuremath{\textsf{w}}_{i+1} - \ensuremath{\textsf{w}}_i$ at iteration $i$ to maximize \ensuremath{\textsf{Gen}\,}. To ease notation, we set $\frac{\partial \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}_i)))}{\partial \ensuremath{\textsf{w}}_i}/||\frac{\partial \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}_i)))}{\partial \ensuremath{\textsf{w}}_i}|| =\frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i)}{\partial \ensuremath{\textsf{w}}_i}$ where $\frac{\partial \textsf{L}\,}{\partial \ensuremath{\textsf{w}}}$ denotes the normalized gradient, i.e. its direction. If we minimize the loss on the train set through gradient descent(GD) with a learning rate $lr$, we get $u_i = -lr \frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i)}{\partial \ensuremath{\textsf{w}}_i} $. \subsubsection{Memorization} Good performance on the train set do not always translate to good performance on other test sets. To quantify this gap, we choose to use the following definition of \textbf{Memorization} (first introduced by ()): $$ \ensuremath{\textsf{Mem}\,} = (\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}))) - \ensuremath{\textsf{Gen}\,} $$ In a sense, \ensuremath{\textsf{Mem}\,} quantifies how deceiving performance on training data can be (this is strongly connected to the notion of Excess Optimism\cite{tibshirani2017excess} in statistics). Using definitions of \ensuremath{\textsf{Gen}\,} and \ensuremath{\textsf{Mem}\,}, we get $u_i = \ensuremath{\alpha}_i \frac{\partial |\ensuremath{\textsf{Gen}\,}|}{\partial \ensuremath{\textsf{w}}_i} + \ensuremath{\beta}_i \frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$ with $\ensuremath{\alpha}$, $\ensuremath{\beta}$ two reals such that. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. \subsubsection{Correct the direction} There exists a vast number of schemes to skew $u_i$ toward $\frac{\partial |\ensuremath{\textsf{Gen}\,}|}{\partial \ensuremath{\textsf{w}}_i}$. We could set constraints on \textsf{f}\, (eg. BatchNorm,... cite). Without access to $\frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$, we could actively correct for directions which should lead to memorization, like $\frac{\partial ||\ensuremath{\textsf{w}}_i||}{\partial \ensuremath{\textsf{w}}_i}$ (i.e. weight decay (cite)). Setting $u_i$ to also be a function of $u_{i-1}, u_{i-2}, ...$ to alleviate oscillations (see (cite Adam Momentum, etc) could also help, assuming $\ensuremath{\beta}_{i+1} \frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_{i+1}} \simeq - \ensuremath{\beta}_i \frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$. \subsubsection{Quantifying Memorization through permutations} Ou ici à voir... \subsubsection{Improve learning dynamic} Using discrete updates on a highly non convex landscape, \ensuremath{\textsf{Gen}\,} evolution from $\ensuremath{\textsf{w}}_i$ to $\ensuremath{\textsf{w}}_{i+1}$ depends not just on its direction with respect to $\frac{\partial |\ensuremath{\textsf{Gen}\,}|}{\partial \ensuremath{\textsf{w}}_i}$ but also on the norm of $u_i$ (see cite cycling learning rate, LR find, momentum, etc...). Navigating through saddle points, plateaus and steep sloops, not only does the choice of $u_i$ impacts \ensuremath{\textsf{Gen}\,} at $\ensuremath{\textsf{w}}_{i+1}$ but more importantly, $u_{i+1}$, $u_{i+2}$ and so on. In this article, we aim to improve the impact of $u_i$ on the following learning dynamic towards final \ensuremath{\textsf{Gen}\,}. However, our central point of focus will not be convergence, but memorization. More precisely, $u_i$ should improve how $\ensuremath{\alpha}_{i+1} - \ensuremath{\beta}_{i+1}$ compares to $\ensuremath{\alpha}_{i} - \ensuremath{\beta}_{i}$. \subsubsection{Memorization Capacity} At this point we should emphasize, when we pick $u_i$ our goal is not to correct $\frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i)}{\partial \ensuremath{\textsf{w}}_i}$ for memorization, but to impact $\frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i + u_i)}{\partial \ensuremath{\textsf{w}}_{i+1}}$. We will now give intuitions and heuristics on how our method was built to do so. Providing a theoretical proof to justify the construction is beyond the scope of this article. Results on Minimax bounds are available at : (REF PAPIER THEORIQUE). \subsubsection{Quantifying Memorization through permutations} Ou plus haut, à voir... Consider the uninformative case where observations and labels are completely independent (E[Y|X] = E[Y]), obtained by applying random permutations without fix point to \ensuremath{\textsf{Y}_{Train}}, which yields \ensuremath{\textsf{Y}_{\pi}}. At best we expect \textsf{f}\, to perform like the intercept model, meaning $\ensuremath{\textsf{Gen}\,} = 0$. Assuming any improvement beyond $\textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}})$ mostly comes from \ensuremath{\textsf{Mem}\,}, we get $\ensuremath{\textsf{Mem}\,} \simeq (\textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}})))$. Searching for how to quantify memorization capacity with respect to \ensuremath{\textsf{w}} in this edge case will give us a starting point. We could first think in terms of speed, ie how fast does \ensuremath{\textsf{Mem}\,} increases. Taking speed as the size of the derivative, we should get $\frac{\partial \ensuremath{\textsf{Mem}\,}}{\partial \ensuremath{\textsf{w}}} \simeq \frac{\partial \textsf{L}\, (\ensuremath{\textsf{w}})}{\partial \ensuremath{\textsf{w}}}$. \subsubsection{Dérivée} Travailler sur des dérivées secondes. || || , \subsubsection{Dérivée at w i+1 - dérivée at wi} Travailler sur des dérivées secondes. ||dL/dwi|| - ||dL/wi+ui|| = ||dL/dwi|| - ||dL/(wi- lr dL/wi)|| Ba empiriquement nope Lecun, DoubleBackProp \subsubsection{Vitesse = distance / iterations} L(wi) - L(wi*) = L(wi) - min w L(w) min w L(w) sur le train min w L(w)test > min w L(w) train avoir un omega tel que min w L(w) argmin omega (min w L(w) train - min w L(w) permut) min w L(w) differentiable selon omega, min w L(w) tractable Quel f(w, omega) on connait. Ridge. Ba le modèle linéaire c'est quand même limité. Rendre le truc plus puissant. En gardant la dérivabilité, on remplace X_train par une fonction paramétrique de xtrain, différentiable. h(X) = les couches cachées... \subsubsection{Capacité = point d'arrivée} \subsubsection{Changer le min = pénalization} \subsubsection{Contrainte par Hyper paramètre} \subsubsection{Hyper paramètre le cas ridge} \subsubsection{Prendre une fonction paramétrique différentiable de X dans le Ridge.} \subsection{Formalisme réseau de neurone et expression de la loss.} on $\ensuremath{\textsf{w}}_{i+1}$final value. evolution from $\ensuremath{\textsf{w}}_i$ to $\ensuremath{\textsf{w}}_{i+1}$While navigating through saddle points, plateaus and steep sloops, $u_i$ ,\ensuremath{\textsf{Gen}\,} . (see cite cycling learning rate, LR find, momentum, etc...). Navigating through saddle points, plateaus and steep sloops, $u_i$ impact on $\ensuremath{\alpha}_{i} - \ensuremath{\beta}_{i}$ \ensuremath{\textsf{Gen}\,} evolution also depends of the number of step we take (cite Early Stopping) and their size ((cite cycling learning rate, LR find, momentum, etc...)). If \textsf{L}\, lives in a highly non convex landscape, $\ensuremath{\alpha}_{i} - \ensuremath{\beta}_{i}$ is bound to evolve between iterations(see cite(Bias/Variance trade/off)(double slope gradient descent)). size of each step taken, we should also consider how the number and sizes of each step also impacts \ensuremath{\beta}, Clearly we wish $u_i$ be s.t. $\ensuremath{\alpha}_i >>> \ensuremath{\beta}_i$. To correct for the direction $\frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$ we can use weight decay SECTION on cherche $u$ tel que \ensuremath{\beta} petit pour avoir l'argmax de \ensuremath{\textsf{Gen}\,}, parce que fortement non convexe. The natural avenue is to correct $u$ for Regularization can be implicit (cite), To ease notation We denote $lr$ the learning rate. To ease notations, we will normalize all gradients, such that. $\frac{dL}{dw}$ as Then at iteration $i$ If we try to minimize the loss on the train set through gradient descent (GD), the gradient direction is a mixture of both meaningful patterns and memorization, ie $\frac{}{}$ just as with our previous example. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. \section{En dessous à commenter ensuite} \subsubsection{Generalization} Let us give one definition of Generalization: For a loss \textsf{L}\, (eg. cross-entropy or RMSE), a test datasets (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) and a constant prediction \ensuremath{\textsf{Y}_{Cste}} given by the intercept model (eg. mean or mode value), we define Generalization for any estimator \textsf{f}\, built independantly from (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) as $$ \ensuremath{\textsf{Gen}\,} = \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Test}})) $$ We want to \textbf{maximize} \ensuremath{\textsf{Gen}\,} since it quantifies how well the estimator compares to the baseline on new data. Since we do not have access to test data, we could set an intermediary goal based on a given dataset (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}). If we are to choose \textsf{f}\, from a set of parametric estimators, we could pick the parameters \ensuremath{\textsf{w}_{Train}} which minimize the loss on the train set, $ \ensuremath{\textsf{w}_{Train}} = {argmin}_{\ensuremath{\textsf{w}}} \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}))) $ and then hope good performance on the train set will always translate to good performance on other test sets. Most often, it is not the case, which has lead to the introduction of some of the most fundamental concepts in the fields Machine learning and Statistics, Overfitting, Regularization (either explicit or implicit), Validation set, Hyper-parameter tuning, etc.\\ \subsubsection{Memorization} Here we will choose to take another direction and try to find a way to directly quantify the variations of \ensuremath{\textsf{Gen}\,} with respect to the estimator parameters directly, using only the training set. Our procedure focuses on the notion of Memorization (first introduced by ()) which we choose to define in this article as: $$ \ensuremath{\textsf{Mem}\,} = (\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}))) - \ensuremath{\textsf{Gen}\,} $$ In a sense, \ensuremath{\textsf{Mem}\,} quantifies how deceiving performance on training data can be (this is strongly connected to the notion of Excess Optimism\cite{tibshirani2017excess} in statistics). Taking a broader view of Artificial Intelligence, we can also see memorization as the ability to just \textbf{learn by heart} each values of the dataset instead of trying to \textbf{capture meaningful concepts}. What we want here is not just to penalize memorization during training, but to explicitly try to maximize the gap between train performance and \ensuremath{\textsf{Mem}\,}, by leveraging a technique to directly quantify \ensuremath{\textsf{Mem}\,} variations without any out-of-sample-scheme, and in a differentiable manner.\\ \subsubsection{Permutation for Ridge} First, let us do so for a simple parametric family of estimators, the ridge linear model in regression. Instead of using the same loss during training and evaluation, we introduce a family of parametric loss functions. For \ensuremath{\lambda}\, a level of regularization, we pick \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,) such that $ \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,) = {argmin}_{\ensuremath{\textsf{w}}} \textsf{L}\,_{\ensuremath{\lambda}\,}(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}})) $. We are now set to search for \ensuremath{\lambda}\, where the associated \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,) maximizes \ensuremath{\textsf{Gen}\,}. Again, we do not need to know the actual value of \ensuremath{\textsf{Gen}\,} with respect to \ensuremath{\lambda}\,, only its variations. We have access to the variations of $\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,))))$ with respect to \ensuremath{\lambda}\,. Next, to connect the impact of \ensuremath{\lambda}\, on both train performance and test performance we should correct for $\frac{d\ensuremath{\textsf{Mem}\,}}{d\ensuremath{\lambda}\,}$ which we need to estimate. Consider the uninformative case where X and Y are completely independent, (E[Y|X] = E[Y]), obtained by applying random permutations without fix point to \ensuremath{\textsf{Y}_{Train}}, which yields \ensuremath{\textsf{Y}_{\pi}}. Then, at best $\ensuremath{\textsf{Gen}\,}_{Permut} = 0$ which corresponds to the intercept model performance, obtained when \ensuremath{\lambda}\, goes to infinity. We will make two assumptions: first any improvement from baseline train loss when we reduce regularization corresponds exclusively to memorization: $\frac{d\ensuremath{\textsf{Mem}\,}_{Permut}}{d\ensuremath{\lambda}\,}$ corresponds to the variations of $\textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{\pi}}(\ensuremath{\lambda}\,)))$. Second, these variations are a good proxy for the impact of \ensuremath{\lambda}\, on the capacity of the ridge estimator to memorize training data on the actual labels, without permutations. Doing so, to maximize generalization for true labels we should use: $$ {argmin}_{\ensuremath{\lambda}\,} \ensuremath{\textsf{Gen}\,} = {argmin}_{\ensuremath{\lambda}\,} \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,)))) - \textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{\pi}}(\ensuremath{\lambda}\,))) $$ Since the ridge estimator admits a differentiable close form with respect to \ensuremath{\lambda}\,, we can find the optimal value of \ensuremath{\lambda}\, by running a standard gradient procedure. In this article, we do not aim at providing a theoretical proof of these results, which is done in (ref). Rather we intend to extend this procedure to a family of vastly over-parametrized estimators, Feed-Forward deep neural networks with very large dense layers (eg: 4096 neurons). \subsubsection{Adaptation to Neural Networks} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the {\texttt{ReLU}} activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. We will make two important distinctions with our previous example. There is not a close form expression of a neural network given a set of hyper-parameters, we will use gradient descent to learn the weights. Previously, we did not use MLR to explore the entire space of weights for linear models. We restricted ourselves to weights which were solutions of the minimization of the \ensuremath{\lambda}\,-penalized loss on the train set. Here, we want to explore freely the high-dimensional space of neuron weights in every possible directions. If we try to minimize the loss on the train set, the gradient direction is a mixture of both meaningful patterns and memorization, just as with our previous example. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. Therefore, at each step of gradient descent, instead of trying to artificially skew the gradient in directions which memorize less, we want the update the weights such that at the next step of gradient descent, the direction of the gradient towards the steepest reduction of the train loss will naturally increase generalization much more than memorization in proportion. We do not want to reduce memorization, we want to reduce the capacity of the network to memorize. set afe toward a state where the next gradient towards the steepest reduction of the loss on the train set towards Prophilactic approach Conversely, since we want to identify the direction of steepest descent towards generalization, we need to disentangle from the gradient direction towards the steepest reduction of the loss on the train set the direction which increase the capacity of the neural network to memorize the train set. We do not want to prevent memorization during learning, Our goal at each step of the gradient descent is to find the direction of steepest descent towards generalization. There is not a close form expression of a neural network given a set of hyper-parameters,we will use gradient descent to learn the weights. Our goal at each step of the gradient descent is to find the direction of steepest descent towards generalization. If we try to minimize the loss on the train set, the gradient direction contains both meaningful patterns and memorization, just as with our previous example. If we use MLR to tune GD is a greedy procedure which selects the direction of steepest descent. When used to minimize the train loss, the gradient direction contains both meaningful patterns and memorization, just as with our previous example. We do not want to use MLR to optimize the amount of weight decay during training to skew the updates while aiming to minimize the train loss. Our goal is to disentangle the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization to get the direction which actually update the weights (W,L) of the NN at each step of gradient descent in the direction which increases \ensuremath{\textsf{Gen}\,} the most. GD is a greedy procedure which selects the direction of steepest descent. Here, at each gradient update, The gradient direction corresponding to the loss contains both meaningful patterns and memorization. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. Again, departing from other methods, our goal here is not to skew the weight updates towards direction which lead to increased generalization, at each step using L2 regularization Therefore, extending our ridge example to neural network does not mean using the MLR criterion to pick the amount of L2 weight decay The equivalent of Ridge penalization for neural networks is L2 penalization/weight decay applied during training. However the goal we set ourselves is to learn the weights of the neural network by directly optimizing generalization, not just skew the gradient updates in a direction which generalizes more through explicit regularization. More precisely, when we try to \subsection{Plan} \paragraph{Context/Constat (Problématique).} Probleme du deep: training = memorisation +generalization entangled. How to favoriser generalization a la memomrisation durant le training. /// /// On introduit les deux concepts et // //La mémorisation on en veut pas parce que ça abime la robustesse mais aussi ça que ça abime la généralisation en prenant sa place.// Problématique tel que nous on la formule: Donc c'est un bon objectif de minimiser la mémorisation durant l'entraînement (Chaque iteration doit etre la plus utile/efficace possible "Make it count"). //////UNderstainf deep learning requires rethinking//// Jusqu'à présent, on peut pas acceder cette quantité durant l'entrainement. Les gens ont proposé/utilisé des proxy (eg.tel la variance du modèle), ils sont imparfait car quand on les minimise certe on réduit la mémorisation mais on atteint pas son minimum. Fin Constat (Problématique) /// \paragraph{Notre Objectif.} MLR objectif d'améliorer le tradeoff entre memorization et généralization. Fondement de MLR: Et pour se faire notre parti pris/principe fondamentale: c'est de quantifier la memorisation en utilisant le train set, pour la minimiser durant l'apprentissage.\\ /// \paragraph{Presentation du principe/methode MLR.}\\ \subsection{Démonstration} f, w, Loss, (jeu train, jeu test) Entrainé un modèle what = argmin w de L(w, train) G = L(what, test) M = L(what, test) - L(what, train) Régularisé pour une autre loss $L$, L(omega)(w, train) what(omega) = argmin \{L(omega)(w, train)\} omegahat = argmin (omega) \{ L(what(omega), test)\} MLR Critère: omegaMLR = argmin (omega) \{ L(omega)(w, train)- L(omega)(w, permut train)\} MLR loss: on sépare w = (w1, w2) (rq: w1 les poids des couche cachée, w2 les poids de la couche de sortie) w2hat(omega) = argmin w2 \{L(omega)(w1, w2, train)\} w2hat est une fct de w1, omega et train: (la forme close du ridge) w2hat(omega, w1, train) MLR: (w1MLR, omegaMLR) = argmin (w1, omega) L(w1, w2hat(omega, w1, train), train) - L(w1, w2hat(omega, w1, permut train) , permut train) Donc on optimise les poids à l'intérieur, pas l'hyper paramètre omega: C'est pas du biniveau on optimise w1 en même temps que omega. pas l'un dans l'autre. Etape suivante : MLR: (w1MLR, omegaMLR) = argmin (w1, omega) L(w1, w2hat(omega, w1, train), train) + |1 - L(w1, w2hat(omega, w1, permut train) , permut train)| Rq : La loss de w2hat(omega) n'est pas celle de w1, omega, obvious pour la classif, Lomega c'est le risque empirique pour les coefs du ridge, L c'est la cross entropie. Qui est w1, qui est w2: Quelle est la forme de w, définisse WB, f(w) Our approach is to separate the weights of the architecture in two sets, one being dedicated to fit the permuted labels, the other being dedicated to prevent them from doing so. Precisely, the weights of the output layer are tasked with fitting the target given the output of the last hidden layer as well as possible. The weights on the hidden layer are tasked with producing an activation which makes that task as easy as possible with true labels, and as hard as possible with permuted labels. Maintenant Qui est L(omega)(w1,w2, train) pour identifier w2hat(omega, w1, train): L(omega) c'est le risque quadratique de l'estimateur ridge, donc w2hat(omega, w1, train) admet une forme close. To avoid solving a bi-level optimization, we leverage the fact that the inner part of our nested optimization process admits a closed-form solution. This closed-form is directly the solution of the following optimization problem: fit the target (true or permuted) given the activation of the last hidden layer. Since it is differentiable, the loss can be back-propagated through the closed-form to the weights of the hidden layers. And since it is a linear function of the target being fitted, it can efficiently be computed for both true and permuted targets. De plus pourquoi la pénalisation et l'introduction de omega? Pour well defined le tradeoff Depending on the activation values, the width of the last hidden layer, and the size of the batch, if we use the closed-form of the OLS, we could get into situations where it is either too easy or too hard to fit the targets, (for both true and permuted labels), which would lead to gradient vanishing. To ensure the trade-off between these two goals (fitting true labels, not fitting permuted labels) is correctly set, we use instead the ridge closed-form. That way, through the ridge regularization parameter we can control how difficult it is to fit targets. Dithering. Dithering can be used to regularize. Increasing the magnitude of the dithering increases regularization up to a point. However, If the noise level of the dithering goes above a certain threshold howether, it will skew the gradient in a random direction so much at each step that instability will prevent convergence all together. To avoid this drawback, we want to enforce gradient vanishing with respect to the random noise added to the target. To do so, our solution is to use the residuals of a standard gaussian white noise fitted using the aforementioned close-form. Indeed, if we fit random noise using a linear closed-form, the resulting residuals correspond to random variations that cannot be minimized through that closed-form. As such, even if the residuals have a strong impact on the loss, they will have a low impact on the gradient of that loss, meaning we can increase the magnitude of that random noise without skewing the gradient as much as we would with regular gaussian white noise. This is how we came up with the structured dithering ingredient. \paragraph{MLR method applied to Neural Networks.} \subsection{Démonstration} \section{Rebuttal Old} The rebuttal will be uploaded by tomorrow with completed values in Table 2. "Using Ridge closed-form on the last hidden layer of the FFNN already gives some significant improvement of the generalization performance (See the ablation study in Table 4). Sorry, my question here was on providing "motivation or intuition", beyond saying "much stronger regularisation than adding standard L2 weight regularisation to the loss". While I feel that your approach is certainly interesting, I do not feel that you provide enough evidence to support why MLR is a good idea."\\ We have preliminary theoretical results which prove that a MLR neural network with 0 hidden layers ()(i.e. Ridge model with only parameter being fitted through gradient descent on the MLR loss) admits better generalization performance than a Ridge model with being fitted through gradient descent on the quadratic loss. The reason is that the MLR loss is a much better proxy for the true generalization error than the quadratic loss. We are currently studying the extension of these theoretical results to shallow neural networks (). These results will be part of another future paper covering the theoretical aspects of MLR. Afterwards, we will attempt to tackle deep networks (), which is a much more challenging case. But all of this is beyond the scope and the time frame of this paper. In the meantime, here is some more insight about how we currently understand the mechanisms behind MLR: When training on regular targets, an over-parameterized neural network can outperform the intercept model in terms of test loss by learning generalizable relations between observations and targets. However, since it is also able to memorize the training set, it will try to minimize the loss on the training set using both memorization and generalization. In over-parametrized models, there are a lot of possible directions to explore to reduce training error via Gradient Descent. GD is a greedy procedure which selects the direction of steepest descent. The gradient direction corresponding to the quadratic loss contains both meaningful patterns and memorization. When training on permuted targets (that means there is nothing to learn beyond the expectation of ), an over-parameterized neural network is able to outperform the intercept model in terms of train loss, but only by memorizing the train set. The gradient direction corresponding to the quadratic loss contains only memorization. Based on those observations, our goal when we replace the quadratic loss by the MLR loss is to maximize the proportion of meaningful patterns of the steepest direction of descent at each GD step during training. At each gradient step, we want to minimize the ability of the neural network to use memorization to improve the train loss, while preserving its ability to do so through generalization. The leap of faith in our method (until theoretical results are made available...): Directions of gradient descent on permuted targets increase the ability of the NN to overfit permuted labels. By correcting the gradient for those memorization directions we also reduce the ability of NN to overfit true labels. This does not reduce the ability of the NN to increase generalization when fitting true labels. Now our motivation is to use the Ridge closed-form to perform this gradient correction: Minimizing the ability of the NN to increase memorization (i.e. fitting permuted labels) is a bi-level optimization problem, with two antagonistic goals. We want to address it in a tractable, efficient and differentiable manner. See the following reference for a natural approach to this bi-level optimization problem which sadly did not work in our case: Drucker et Le Cun. Improving generalization performance using double back propagation. IEEE transactions on Neural Networks (1992). So we had to look for an alternative approach to solve this problem. Our approach is to separate the weights of the architecture in two sets, one being dedicated to fit the permuted labels, the other being dedicated to prevent them from doing so. Precisely, the weights of the output layer are tasked with fitting the target given the output of the last hidden layer as well as possible. The weights on the hidden layer are tasked with producing an activation which makes that task as easy as possible with true labels, and as hard as possible with permuted labels. Second leap of faith (mostly because it would be far too long and tedious to explain why, for specific technical reasons,all the approaches which feel more natural we could find, either : -are very inefficient, -perform poorly, -or do not work at all.): To avoid solving a bi-level optimization, we leverage the fact that the inner part of our nested optimization process admits a closed-form solution. This closed-form is directly the solution of the following optimization problem: fit the target (true or permuted) given the activation of the last hidden layer. Since it is differentiable, the loss can be back-propagated through the closed-form to the weights of the hidden layers. And since it is a linear function of the target being fitted, it can efficiently be computed for both true and permuted targets. Depending on the activation values, the width of the last hidden layer, and the size of the batch, if we use the closed-form of the OLS, we could get into situations where it is either too easy or too hard to fit the targets, (for both true and permuted labels), which would lead to gradient vanishing. To ensure the trade-off between these two goals (fitting true labels, not fitting permuted labels) is correctly set, we use instead the ridge closed-form. That way, through the ridge regularization parameter we can control how difficult it is to fit targets. This closed-form can also be used to improve dithering: Dithering can be used to regularize. Increasing the magnitude of the dithering increases regularization up to a point. However, If the noise level of the dithering goes above a certain threshold howether, it will skew the gradient in a random direction so much at each step that instability will prevent convergence all together. To avoid this drawback, we want to enforce gradient vanishing with respect to the random noise added to the target. To do so, our solution is to use the residuals of a standard gaussian white noise fitted using the aforementioned close-form. Indeed, if we fit random noise using a linear closed-form, the resulting residuals correspond to random variations that cannot be minimized through that closed-form. As such, even if the residuals have a strong impact on the loss, they will have a low impact on the gradient of that loss, meaning we can increase the magnitude of that random noise without skewing the gradient as much as we would with regular gaussian white noise. This is how we came up with the structured dithering ingredient. \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning ({\text{DL}}) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that {\text{DL}}{} is irrelevant for tabular data \cite{videolecture}. While the need to handle tabular data arises in many fields ($e.g.$ material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), {\text{DL}}{} for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods \cite{Denil2014narrow,Delgado14a,Mentch2020Rand,Wainberg2016} are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a,Wainberg2016}. By contrast, training {\text{DL}}{} models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large datasets may be costly, or even impossible by the nature of the task at hand\footnote{$e.g.$ decision making on a limited amount of cases during a pandemic.} Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{shavitt2018}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on the preprocessing of categorical features which was an historical limitation of {\text{DL}}{} \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in {\text{DL}}{} libraries (tensorflow, PyTorch, \textit{etc.}). Meanwhile, tree based ensemble methods and Gradient Boosting Decision Trees ({\texttt{GBDT}}{}) are still considered the best option to handle categorical data \cite{Prokhorenkova2018,Anghel2018Bench,Harasymiv2015_gbdt}. Developing a {\text{DL}}{} solution for tabular data is desirable at it can leverage the particular strengths of {\text{DL}}{}, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the {\text{DL}}{} community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data. $\bm{*}$ uses the UCI database which has some well-known flaws \cite{Arora2020meuf,Klambauer2017,Wainberg2016}.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|cc|c|} \hline Method & End-to-end & Works without & Task & \multicolumn{2}{|c|}{ Benchmark } & Consistently outperforms \\ & differentiable & HP tuning & & \# datasets& Range $n$ & {\texttt{GBDT}} \\ \hline {\texttt{TabNN}}{} \cite{ke2019tabnn} & no & no & Reg/Classif &5&14.8K-7.3M & no\\%14.8K-7.29M \hline {\texttt{NODE}}{} \cite{Popov2020Neural} & \checkmark & no & Reg/Classif &6&500K-11M & no\\%Sometimes\\ \hline {\texttt{TabNet}}{} \cite{arik2020tabnet} & self-supervised & no & Reg/Classif & 4&10K-11M & \checkmark\\%Significantly \\ \hline {\texttt{DNDT}}{} \cite{YangMorillo2018} & \checkmark & \checkmark &\Clf &14& 150-1.1M & no\\ \hline {\texttt{NTK}}{} \cite{Arora2020meuf} & \checkmark & no & \Clf &90\bm{*}& 10-130K & no \\ \hline {\texttt{SNN}} {}\cite{Klambauer2017} & \checkmark & no & Reg/Classif &122\bm{*}& 10-130K & no\\ \hline {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} & no & \checkmark & \Clf& 6&9.8K-200K &no\\% rarely \\ \hline {\texttt{RLN}}{} \cite{shavitt2018} & \checkmark & \checkmark& Reg & 9&2.5K& no \\ \hline \texttt{\,MLR $\,$}{} (this work) & \checkmark & \checkmark & Reg/Classif & 32 & 72-65K & Reg:\checkmark\\%Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical {\text{DL}}{} regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{Hanson1988Comparing}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that dropout parameters are data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of {\text{DL}}{} remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. {\texttt{DNDT}}{} \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However {\texttt{DNDT}}{} is not scalable $w.r.t.$ the number of features and does not outperform Random Forests ({\texttt{RF}}) or standard {\texttt{NN}{}}{} on the UCI database. Attention-Mechanism ({\texttt{AM}}) has boosted {\text{DL}}{} performance on a range of {\texttt{NLP}}{} tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that {\texttt{AM}}{} can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited {\texttt{AM}}{} to develop {\texttt{TabNet}}{}, an interpretable {\text{DL}}{} method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with {\text{DL}}{}. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of {\texttt{RF}}{} or {\texttt{GBDT}}{}. However these architectures cannot be trained end-to-end, which may result in potentially inferior performance. {\texttt{TabNN}}{} \cite{ke2019tabnn} is a hybrid machine learning algorithm using {\texttt{GBDT}}{} and Deep Neural Networks ({\texttt{DNN}}). {\texttt{TabNN}}{} outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over {\texttt{GBDT}}{} seems marginal in their experiments on 6 data sets ranging in size from $15$K up to $7.9$M training samples. More recently, {\texttt{NODE}}{} \cite{Popov2020Neural}, a new {\texttt{DNN}}{} architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. {\texttt{NODE}}{} marginally outperforms ensemble methods ({\texttt{CatBoost}} \cite{Prokhorenkova2018}, {\texttt{XGBoost}} \cite{guestrin2016}) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train {\texttt{DNN}}{} by specific losses with interesting properties. In that regard, Regularization Learning Networks ({\texttt{RLN}}) \cite{shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. {\texttt{RLN}}{} performs significantly better than standard {\texttt{NN}{}}{} but could not beat {\texttt{GBDT}}{}. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel ({\texttt{NTK}}){}\cite{Arora2020meuf}, {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} and Self-Normalized Neural Networks ({\texttt{SNN}}) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We provide more details about these methods in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. Our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), penalizes memorization over permuted labels and structured noise through the application of a differentiable close-form regularization scheme on the last hidden layer during training. More specifically: - Our method outperforms usual methods (Ensemble, {\texttt{SVM}}, Boosting, Linear Regression, $etc.$ ) including the gold standards {\texttt{RF}}{} and {\texttt{GBDT}}{} for the usual statistics (Mean ${\texttt{R}^2}$, Friedman rank, P90, P95, P98, PMA) on a diverse collection of regression datasets. Our method also comes in a close second for classification tasks. - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot-encoding and standard imputation of missing data. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om \cite{Williams2001using} and {\texttt{RBF}}{} \cite{RasmussenW06} kernels, tree leaves). All the popular {\text{DL}}{} schemes can also be leveraged including learning rate schedulers \cite{smith2015cyclical}, optimizers, weight decay, batch-normalization, drop-out, residual layers and leaky activations \cite{smith2018disciplined}. - The performances of \textbf{NN}{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf {\text{DL}}{} solution or integrate it into the most advanced ML pipelines. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API (\textit{i.e.} it can be directly encapsulated into parameter search routines, bagging meta models, \textit{etc.}). For the sake of replicability, the code to run the benchmarks, the ablation study and the preprocessing applied to each dataset is also provided. The rest of the paper is organized as follows. We describe our approach in Section \ref{sec:MLRmethod}. In Section \ref{sec:exp}, we carry out a detailed ablation study of our method and evaluate its performances on real data. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \label{sec:MLRmethod} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the {\texttt{ReLU}} activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 3 essential ingredients of the \texttt{\,MLR $\,$}{} method are Ridge regularization, structured dithering and random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n} \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}_J$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term quantifies the amount of memorization of a model by comparing its {\texttt{RMSE}}{} on uninformative labels to the baseline ${\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$, $i.e.$ the performance achieved without fitting the data. Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances. We explain below the role of $(\I_n-\textbf{H}) \xi$ and $(\I_n-\textbf{H}) \xi_t$. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the Ridge instead of the {\texttt{OLS}}, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. More precisely, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the {\texttt{FFNN}}{} is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ \textbf{does not require hyperparameter tuning}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix,SHARMA201331}. \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align*} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, $etc$. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $11$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{10}$) and bigger batch size ($b_s = \min(J,n)$) is always better. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{{\texttt{Iter}}}$ and early stopping.} We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the alloted time {\texttt{FixB}}. We fix the maximum number of iterations $\max_{{\texttt{Iter}}}$ (depending on the value of $L$). Then, ${\texttt{Iter}} = \min(\max_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$ is the number of iterations that will actually be performed. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: ${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$ . Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} The generic values ($\tilde{\sigma} = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the {\texttt{FFNN}}{} architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size $b_s$, which are fixed in our method. As a pure DL method, \texttt{\,MLR $\,$}{} method is scalable. Its complexity is the same as training a standard {\texttt{NN}{}}{} \cite{Murugesan2018Embarrassingly}. We refer to the Appendix for a detailed description of the training protocol. \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the \texttt{BCE-MLR}{} loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. The {\texttt{FFNN}}{} architecture and the training protocol are essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a Sigmoid and the Cross Entropy (\texttt{CE}) loss. Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. The structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for a detailed discussion on this specific adaptation. \section{Experiments}\label{sec:exp} We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. See the supplementary material for the the github repository, the detailed description of our experimental setting and the exhaustive list of compared methods with their performances. \subsection{Setting.} \paragraph{Benchmark description.} To produce this benchmark we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules detailed in the appendix ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \paragraph{Preprocessing.} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot-encoding for categorical values and standardization for numerical features and target. We repeated our experiments 10 times using a different $80:20$ $train$/$test$ split of the data and no stratification scheme. \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|c|c|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \subsection{Ablation Analysis.} \begin{table}[H] \caption{Ablation Study in Regression. } \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline {\texttt{FFNN}} & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline + Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline + Ridge + Struct. Dithering & $ 0.323 \pm 0.075 $ & $ 0.400 \pm 0.048 $ \\ \hline + Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $ \\ \hline \texttt{\,MLR $\,$}{} & $ 0.371 \pm 0.024 $ & $ 0.433 \pm 0.000 $ \\ \hline \end{tabular} \end{table} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets with different sample sizes and feature to sample ratios. We repeated each experiment over 100 random $train$/$test$ splits. All the results presented here correspond to the architecture and hyperparameters of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{}. A standard {\texttt{FFNN}}{} of $2$ layers with a wide architecture ($J=1024$) cannot be trained efficiently on such small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark (Table \ref{tab:perfR2_rank}). Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach. The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging ($0.062$) is still of the same order of magnitude as the one we got when we applied permutations on top of Ridge to the {\texttt{FFNN}}{} ($0.043$). This means these two ingredients (permutations and struct. dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \subsection{Overall Performance comparisons.} \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the regression task on our benchmark. {\texttt{P90}}, {\texttt{P95}}, {\texttt{P98}}: the number of datasets a model achieves 90\%, 95\%, 98\% or more of the maximum test ${\texttt{R}^2}$-score respectively, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \label{tab:perfR2_rank} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean ${\texttt{R}^2}$-score & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline \texttt{\,MLR $\,$} & $2.525 \pm 1.355$ & $0.744 \pm 0.022$ & $0.963$ & $0.856$ & $0.719$ & $0.946 \pm 0.089$\\ {\texttt{GBDT}} & $2.719 \pm 1.850$ & $0.726 \pm 0.093$ & $0.863$ & $0.756$ & $0.650$ & $0.898 \pm 0.237$\\ {\texttt{RF}} & $3.538 \pm 1.896$ & $0.724 \pm 0.070$ & $0.825$ & $0.681$ & $0.481$ & $0.914 \pm 0.159$\\ {\texttt{SVM}} & $4.281 \pm 1.534$ & $0.711 \pm 0.068$ & $0.831$ & $0.594$ & $0.362$ & $0.882 \pm 0.172$\\ {\texttt{NN}{}} & $4.331 \pm 2.206$ & Aberating value & $0.725$ & $0.606$ & $0.475$ & Aberating value \\ {\texttt{MARS}} & $5.644 \pm 1.623$ & $0.677 \pm 0.066$ & $0.537$ & $0.350$ & $0.163$ & $0.861 \pm 0.167$\\ {\texttt{LM}} & $5.938 \pm 1.804$ & $0.658 \pm 0.094$ & $0.531$ & $0.294$ & $0.156$ & $0.837 \pm 0.179$\\ {\texttt{TREE}} & $7.125 \pm 1.613$ & $0.512 \pm 0.237$ & $0.338$ & $0.188$ & $0.119$ & $0.578 \pm 0.570$\\ {\texttt{Baseline}} & $8.900 \pm 0.375$ & $-0.023 \pm 0.211$ & $0.000$ & $0.000$ & $0.000$ & $-0.031 \pm 0.075$\\ \hline \end{tabular} } \end{table} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods for the regression task.} {\texttt{Ens-MLR}}{} with a {\texttt{P98}}{} of $0.719$ on the whole benchmark and Friedman Rank of $2.525$ is above {\texttt{GBDT}}{}, with a {\texttt{P98}}{} of $0.65$ and Friedman Rank $2.719$ in Table \ref{tab:perfR2_rank}. As revealed by its {\texttt{PMA}}{} statistics at $0.946 , {\texttt{Ens-MLR}}{} is far ahead of the other methods. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like {\texttt{RF}}{} which are often deemed the safest pick. Standard {\texttt{NN}{}}{} with equivalent architecture and {\texttt{MSE}}{} loss performs poorly with a Friedman rank of $4.331$. Noticeably, {\texttt{Ens-MLR}}{} was most often the best method among all the \texttt{\,MLR $\,$}{} methods \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the classification task with the accuracy score.} \label{tab:ACCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{Acc.}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.769 \pm 0.998$ & $0.889 \pm 0.038$ & $0.963$ & $0.881$ & $0.819$ & $0.971 \pm 0.054$\\ \texttt{\,MLR $\,$} & $2.913 \pm 1.403$ & $0.882 \pm 0.031$ & $0.963$ & $0.869$ & $0.800$ & $0.956 \pm 0.070$\\ {\texttt{RF}} & $3.056 \pm 1.415$ & $0.882 \pm 0.038$ & $0.912$ & $0.819$ & $0.656$ & $0.958 \pm 0.063$\\ {\texttt{GLM}} & $3.756 \pm 1.561$ & $0.862 \pm 0.060$ & $0.806$ & $0.631$ & $0.463$ & $0.940 \pm 0.062$\\ {\texttt{TREE}} & $4.763 \pm 1.195$ & $0.836 \pm 0.062$ & $0.731$ & $0.381$ & $0.237$ & $0.908 \pm 0.084$\\ {\texttt{QDA}} & $5.675 \pm 1.688$ & $0.723 \pm 0.160$ & $0.338$ & $0.194$ & $0.169$ & $0.796 \pm 0.159$\\ {\texttt{Baseline}} & $6.856 \pm 1.574$ & $0.593 \pm 0.168$ & $0.069$ & $0.025$ & $0.025$ & $0.661 \pm 0.133$\\ {\texttt{NN}{}} & $7.213 \pm 0.980$ & $0.565 \pm 0.152$ & $0.025$ & $0.013$ & $0.013$ & $0.625 \pm 0.136$\\ \hline \end{tabular} } \end{table} \begin{table} \caption{\textbf{Performances of the best in each class of methods} for the classification task with {\texttt{AUC}}{} score.} \label{tab:AUCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{AUC}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.738 \pm 1.190$ & $0.918 \pm 0.048$ & $0.938$ & $0.912$ & $0.875$ & $0.963 \pm 0.108$\\ \texttt{\,MLR $\,$} & $2.900 \pm 1.304$ & $0.908 \pm 0.012$ & $0.912$ & $0.844$ & $0.694$ & $0.952 \pm 0.106$\\ {\texttt{RF}} & $2.938 \pm 1.390$ & $0.912 \pm 0.047$ & $0.931$ & $0.887$ & $0.706$ & $0.956 \pm 0.095$\\ {\texttt{LM}} & $3.881 \pm 1.572$ & $0.889 \pm 0.060$ & $0.775$ & $0.662$ & $0.475$ & $0.935 \pm 0.094$\\ {\texttt{NN}{}} & $4.856 \pm 1.545$ & $0.843 \pm 0.154$ & $0.706$ & $0.506$ & $0.412$ & $0.896 \pm 0.155$\\ {\texttt{TREE}} & $5.975 \pm 1.160$ & $0.813 \pm 0.091$ & $0.394$ & $0.212$ & $0.212$ & $0.852 \pm 0.119$\\ {\texttt{QDA}} & $6.031 \pm 1.371$ & $0.772 \pm 0.149$ & $0.394$ & $0.256$ & $0.150$ & $0.818 \pm 0.152$\\ {\texttt{Baseline}} & $7.681 \pm 1.084$ & $0.499 \pm 0.151$ & $0.006$ & $0.000$ & $0.000$ & $0.537 \pm 0.072$\\ \hline \end{tabular} } \end{table} For binary classification task with the usual accuracy score, \texttt{\,MLR $\,$}{} is a close second behind {\texttt{GBDT}}{} both in terms of Accuracy and {\texttt{AUC}}{} scores. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. Nonetheless, higher performances can be achieved with the \texttt{\,MLR $\,$}{} approach by data-dependent tuning of the hyperparameters in Table \ref{tab:architectures1} and/or leveraging usual {\text{DL}}{} schemes. By replacing the standard losses by the \texttt{\,MLR $\,$}{} loss to train a simple {\texttt{FFNN}}{}, we were able to break down the tabular data deadlock and outperform the gold standard. However, nothing in our method is constrained to this setting. The \texttt{\,MLR $\,$}{} approach is perfectly applicable on {\texttt{CNN}}{} for classification tasks in the low sample regime with robustness issues. \newpage \bibliographystyle{plain} \section{Introduction} \newpage \section{Related Work} \newpage \section{Our method} Let us consider a training set $\mathcal{D}_{train}=\{ (\mathbf{X}_i,Y_i)\}_{i=1}^n$ and a test set $\mathcal{D}_{test}=\{ (\widetilde{\mathbf{X}}_i,\widetilde{Y}_i)\}_{i=1}^m$. We want to train a neural net $f(\bm{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on the test set, that is, to minimize $ L(\bm{\theta};\mathcal{D}_{test}) = \frac{1}{m} \sum_{i=1}^m (f(\bm{\theta},\widetilde{\mathbf{X}}_i) - \widetilde{Y}_i)^2 $ A naive unregularized training method consists in minimizing the objective function $$ L(\bm{\theta};\mathcal{D}_{train}) = \frac{1}{n} \sum_{i=1}^n (f(\bm{\theta},\mathbf{X}_i) - Y_i)^2. $$ To prevent overfitting, we introduced instead the Muddling Label Regularization (MLR) loss function. \paragraph{Muddling Label Regularization} \begin{mydef}[Muddling Label Regularization] \textcolor{red}{A COMPLETER} $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\bm{\theta};(\textbf{X},\Pi_t(\textbf{Y})). $$ were $\Pi$ is a ... taken as follow : \end{mydef} \begin{remark} \textcolor{red}{A COMPLETER} Let's take a label vector $\textbf{Y} = (Y_1,\cdots,Y_n)$. We permute the components of $Y$, etc. That way, we define the label permutation operator $\Pi$: $$ \Pi(\textbf{Y}) = (Y_{\Pi(1)},\cdots,Y_{\Pi(n)}). $$ \end{remark} Note that the MLR loss function is computed using only $\mathcal{D}_{train}$. No additional data is used to compute (MLR). Note also that $\Pi(\textbf{Y})$ can be seen as a basic form of data-augmentation of the labels. We draw $T$ label permutation operators $(\Pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\Pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. When $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the MLR loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\Pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Note that the expected number of fixed points ($\Pi(i) = i$) in a permutation drawn uniformly at random is smaller than $1$\footnote{Recall that $A_k $ is the event where the random permutation $\Pi$ admits exactly $k$ fixed points. We have $$ \mathbb{P}\left( A_k \right) = \frac{ \binom{n}{k}\, !(n-k) }{n!} = \frac{e^{-1}}{k!} \sum_{m=0}^{n-k} \frac{(-1)^m}{m!}\leq \frac{e^{-1}}{2k!}. $$ Consequently the expected number of fixed points is $\sum_{k=1}^n k \,\mathbb{P}\left( A_k \right) \leq 1$.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\Pi(i)}$ and $\mathbf{X}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $\textbf{Y}_{\Pi(i)}$. Therefore, predicting $\textbf{Y}_{\Pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the MLR Loss. For $T = 1$ The MLR loss could be written as follows: $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - L(\bm{\theta};(\textbf{X},\Pi(\textbf{Y})). $$ There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. MLR is designed to capture only the specific relationship between $\textbf{X}$ and $\textbf{Y}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed MLR focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\Pi(\textbf{Y}))$. \paragraph{a} \paragraph{b} \paragraph{c} We train a neural net by minimizing the following quantity on the train set: \begin{align} \tilde{\mathcal{L}}(\Theta, \mathcal{D}_{train}), \end{align} where $\Theta$ are the weights of the neural net and $\tilde{\mathcal{L}}$ is the new Muddling Label Regularization (MLR) loss function that we described below. We introduce now the new Muddling Label Regularization (MLR) loss function. In the regression setting, we recall the empirical risk: $$ \mathcal{L}() = \| \mathbb{Y} - \widehat{Y}\|_{n}( \Theta, X) = \left( \frac{1}{n} (Y_i - \widehat{Y}_i( \Theta,X_i,))^2\right)^{1/2}. $$ where $\widehat{Y}\|_{n} = ( \widehat{Y}_1(\Theta,X_i),\ldots, \widehat{Y}_n(\Theta,X_i))$ is the prediction of our model the MLR is based on emp Let $\mathcal{L}$ be a loss function. Let W and B (L(Y, Yhat) with Yhat = f_W(X) $n$ pairs of observations $(\mathbf{X}_i,Y_i)_{i=1}^n$ in $\mathbb{R}^p \times \mathbb{R}$. We are interested in the regression problem $$ \mathbb{E}[Y_i | ] $$ We want to find f_w such that $|| Y- f(X)||$ is small. satisfying Let us consider the regression model: \begin{eqnarray} \label{mod2} \textbf{Y} = \textbf{X} \beta^* + \bm{\xi}, \end{eqnarray} where $\textbf{X}^\top=(\mathbf{X}_1,\cdots,\mathbf{X}_n)$ is the $n\times p$ \textit{design matrix} and the $n$-dimensional vectors $\textbf{Y}=(Y_i,\cdots,Y_n)^\top$ and $\bm{\xi}=(\xi_1,\cdots,\xi_n)^\top$ are respectively the response and the noise variables. Throughout this paper, the noise level $\sigma>0$ is unknown. Set $||\textbf{v}||_n=(\frac{1}{n}\sum_{i=1}^n v_i^2)^{1/2}$ for any $\textbf{v}=(v_1,\ldots,v_n)^\top\in \mathbb{R}^n$. Let NN(x) be a neural network of the form : L layers, with A_l = S( \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \newpage \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour MLR } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} \newpage \section{Related Work} \newpage \section{$MLR$ Neural Nets} Let us consider a training set $\mathcal{D}_{train}=\{ (\mathbf{X}_i,Y_i)\}_{i=1}^n$ and a test set $\mathcal{D}_{test}=\{ (\widetilde{\mathbf{X}}_i,\widetilde{Y}_i)\}_{i=1}^m$. We want to train a neural net $f(\bm{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on the test set, that is, to minimize $ L(\bm{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\bm{\theta},\widetilde{\mathbf{X}}_i) - \widetilde{Y}_i)^2 $ A naive unregularized training method consists in minimizing the objective function $ L(\bm{\theta};\mathcal{D}_{train}) = \sum_{i=1}^n (f(\bm{\theta},\mathbf{X}_i) - Y_i)^2. $ To prevent overfitting, we introduced instead the Muddling Label Regularization (MLR) loss function. \paragraph{Muddling Label Regularization.} This new criterion is based on permutations of the labels $\textbf{Y} = (Y_1,\cdots,Y_n)$. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y}$ as $ \pi(\textbf{Y}) = (Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \begin{mydef}[Muddling Label Regularization] \label{def:MLR} Let $T\geq 1$ be a fixed number. Let $\pi_t$, $1\leq t \leq T$, be permutations of $n$ elements drawn uniformly at random. The MLR loss is defined as $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\bm{\theta};(\textbf{X},\pi_t(\textbf{Y})). $$ \end{mydef} Note that the MLR loss function is computed using only $\mathcal{D}_{train}$. No additional data is used to compute (MLR). The permuted label vector $\pi(\textbf{Y})$ can be seen as a basic form of data-augmentation of the labels. We draw $T$ label permutation operators $(\pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. When $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the MLR loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{Recall that $A_k $ is the event where the random permutation $\Pi$ admits exactly $k$ fixed points. We have $$ \mathbb{P}\left( A_k \right) = \frac{ \binom{n}{k}\, !(n-k) }{n!} = \frac{1}{k!} \sum_{m=0}^{n-k} \frac{(-1)^m}{m!}\leq \frac{1}{2k!},\quad \forall 0\leq k <n. $$ Consequently the expected number of fixed points is $\sum_{k=1}^n k \,\mathbb{P}\left( A_k \right) \leq e/2 + \frac{1}{(n-1)!}\leq 2$ for any $n\geq 3$.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\pi(i)}$ and $\mathbf{X}_i$. That means that $\mathbf{X}_i$ provides no information on the possible value of $\textbf{Y}_{\pi(i)}$. Therefore, predicting $\textbf{Y}_{\pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the MLR Loss. For $T = 1$, the MLR loss could be written as follows: $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - L(\bm{\theta};(\textbf{X},\pi(\textbf{Y})). $$ \textcolor{red}{The $MLR$ is composed of two antagonistic terms. The first term is the usual loss function that fits the training set while the second term is introduced so that the trained model performs as poorly as possible when fitting the permuted labels.\\ The $MLR$ loss is designed to capture only the meaningful \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$.\\ Indeed $MLR$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. } There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. MLR is designed to capture only the \textcolor{red}{meaningful} \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed MLR focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. \paragraph{Standard Neural nets training.} More specifically, in the classical deep learning approach, we minimize $$ \widetilde{L}\left(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})\right) = L(\bm{\theta};(\textbf{X},\textbf{Y})) + \mathrm{pen}(\bm{\theta};\bm{\lambda}), $$ where $\bm{\lambda}$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). A naive implementation of MLR looks like that: \textcolor{red}{ $$ \widehat{\bm{\lambda}}:= \mathrm{argmin}_{\bm{\lambda}}\; L(\widehat{\bm{\theta}}(\bm{\lambda});(\textbf{X},\textbf{Y}))- L(\widehat{\bm{\theta}}_{\Pi}(\bm{\lambda});(\textbf{X},\pi(\textbf{Y}))), $$ with $\widehat{\bm{\theta}}(\lambda) = \mathrm{argmin}_{\bm{\theta}}\, \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi}(\bm{\lambda}) = \mathrm{argmin}_{\bm{\theta}}\, \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\pi(\textbf{Y}))) $. } $$ \widehat{\bm{\lambda}}:= \mathrm{argmin}_{\bm{\lambda}} L(\widehat{\bm{\theta}}(\bm{\lambda});(\textbf{X},\textbf{Y}))- \frac{1}{T}\sum_{t=1}^T L(\widehat{\bm{\theta}}_{\Pi_t}(\bm{\lambda});(\textbf{X},\pi_t(\textbf{Y}))), $$ with $ \widehat{\bm{\theta}}(\lambda) = \mathrm{argmin}_{\bm{\theta}}\; \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi_t}(\bm{\lambda}) = \mathrm{argmin}_{\bm{\theta}}\; \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\pi_t(\textbf{Y}))) $. It is easy to see that optimizing $\bm{\lambda}$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi_t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \paragraph{MLR to train Neural nets.} The MLR criterion was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. Adapting the MLR criterion to Neural nets is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $MLR$ criterion is used to tune simultaneously a common set of regularization parameters}. We present now our approach. Let $\bm{\theta}$ be the weights on the hidden layers of our neural net $f(\bm{\theta},\bm{\lambda},\cdot)$, and let $\bm{\lambda}$ be a non-negative parameter that is specific to our method. Let $H_{\bm{\theta}}\,:\,\mathbb{R}^p \rightarrow \mathbb{R}^J$ be a function parametrized by $\bm{\theta}$ that we apply on the rows of $\textbf{X}$. In addition, we assume that $H_{\bm{\theta}}$ is differentiable w.r.t. $\bm\theta$ for all $\textbf{X}$. Define also $d(\textbf{Y}\,,\,\widehat{\textbf{Y}}): = \|\textbf{Y} - \widehat{\textbf{Y}} \|_2^2$. \begin{mydef}[MRL neural net] Set $ \beta(\bm{\theta},\lambda,\textbf{Y}) &= (H_{\bm{\theta}}(\textbf{X})^\top H_{\bm{\theta}}(\textbf{X}) + \lambda \,\ensuremath{\mathbb{I}}_J)^{-1}H_{\bm{\theta}}(\textbf{X})^\top \textbf{Y} $. The MLR neural net is $$ \textbf{NN}(\widehat{\bm{\theta}},\widehat{\bm{\lambda}},\cdot) = H_{\widehat{\bm{\theta}}}(\cdot)\,\beta(\widehat{\bm{\theta}},\widehat{\bm{\lambda}},\textbf{Y}) $$ where $(\widehat{\bm{\theta}},\widehat{\bm{\lambda}}) = \mathrm{argmin}_{\bm{\theta}, \bm{\lambda}} \;MLR_{\textbf{X},\textbf{Y}}(\bm{\theta},\bm{\lambda})$ with \begin{align} MLR_{\textbf{X},\textbf{Y}}(\bm{\theta},\bm{\lambda}) &:= d(\textbf{Y},H_{\bm{\theta}}(\textbf{X})\beta(\bm{\theta},\bm{\lambda},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T d(\pi_t(\textbf{Y}),H_{\bm{\theta}}(\textbf{X})\beta(\bm{\theta},\bm\lambda,\pi_t(\textbf{Y}))).\notag \end{align} \end{mydef} \begin{remark} \textcolor{red}{ Nonconvex but smooth loss. We can compute the derivative and so on...\\ compatible with graph differentiation and can fully exploit gpu parallelization... Inversion of matrix is not a costly operation. Ailleurs\\ \\Computational tractability?} \end{remark} We specify now our approach for a general function $H_\bm{\theta}$. In this paper, the function $H_\bm{\theta}$ takes the observations as an input and yields the values on the last hidden layer of a neural net as an output. This neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, and a ReLU activation function between each layer. There is not any additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, etc...). Also, note that $\beta(\bm{\theta},\lambda,\textbf{Y})$ is the close form of a ridge estimator for target vector $\textbf{Y}$ and the regularization parameter $\lambda$ but applied to the observation matrix $H_{\bm{\theta}}(\textbf{X})$ instead of $\textbf{X}$. Our approach fully embraces the interpretation of neural networks as automated differentiable feature engineering. As such, $H_{\bm{\theta}}(\textbf{X})$ can be seen as a set of embeddings. The $MLR$ loss constructs embeddings that capture meaningful patterns in the data while pruning irrelevant connections. To this end, we leverage two two key ingredients. First, label permutation is used to produce a control set $(\textbf{X},\pi(\textbf{Y}))$ that can only be fitted through memorization. Second, the Ridge performs shrinkage on the the embeddings. That way, we avoid trivial cases of perfect fit for both terms in the MLR. We rather obtain a smooth behavior of both losses w.r.t. the neural net parameters to get a quantifiable comparison. By maximizing the gap between the two quantities in $MLR$, we \textcolor{red}{steer/optimizer} the parameters towards the directions that maximize only generalization. This is not surprising since generalization directions are faster to learn than memorization directions \cite{PapierOptimization=Generalization}. **************************************************\\ **************************************************\\ \\ espace\\ **************************************************\\ **************************************************\\ \paragraph{BKK for regression and tabular data} $$ H_{\bm{\theta}}=? $$ et initialization de $\bm{\theta}$ et grille pour trouver $lambda$ initial. Let NN(x) be a neural network of the form : L layers, with A_l = S( \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \newpage \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour MLR } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} \newpage \section{Related Work} \newpage \section{$MLR$ Neural Nets} Let us consider a training set $\mathcal{D}_{train}=\{ (\mathbf{X}_i,Y_i)\}_{i=1}^n$ and a test set $\mathcal{D}_{test}=\{ (\widetilde{\mathbf{X}}_i,\widetilde{Y}_i)\}_{i=1}^m$. We want to train a neural net $f(\bm{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on the test set, that is, to minimize $ L(\bm{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\bm{\theta},\widetilde{\mathbf{X}}_i) - \widetilde{Y}_i)^2 $ A naive unregularized training method consists in minimizing the objective function $ L(\bm{\theta};\mathcal{D}_{train}) = \sum_{i=1}^n (f(\bm{\theta},\mathbf{X}_i) - Y_i)^2. $ To prevent overfitting, we introduced instead the Muddling Label Regularization ($MLR$) loss function. \paragraph{Muddling Label Regularization.} This new criterion is based on permutations of the labels $\textbf{Y} = (Y_1,\cdots,Y_n)$. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y}$ as $ \pi(\textbf{Y}) = (Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \begin{mydef}[Muddling Label Regularization] \label{def:MLR} Let $T\geq 1$ be a fixed number. Let $\pi_t$, $1\leq t \leq T$, be permutations of $n$ elements drawn uniformly at random. The MLR loss is defined as $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\bm{\theta};(\textbf{X},\pi_t(\textbf{Y})). $$ \end{mydef} Note that the MLR loss function is computed using only $\mathcal{D}_{train}$. No additional data is used to compute (MLR). The permuted label vector $\pi(\textbf{Y})$ can be seen as a basic form of data-augmentation of the labels. We draw $T$ label permutation operators $(\pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. When $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the MLR loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{Recall that $A_k $ is the event where the random permutation $\Pi$ admits exactly $k$ fixed points. We have $$ \mathbb{P}\left( A_k \right) = \frac{ \binom{n}{k}\, !(n-k) }{n!} = \frac{1}{k!} \sum_{m=0}^{n-k} \frac{(-1)^m}{m!}\leq \frac{1}{2k!},\quad \forall 0\leq k <n. $$ Consequently the expected number of fixed points is $\sum_{k=1}^n k \,\mathbb{P}\left( A_k \right) \leq e/2 + \frac{1}{(n-1)!}\leq 2$ for any $n\geq 3$.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\pi(i)}$ and $\mathbf{X}_i$. That means that $\mathbf{X}_i$ provides no information on the possible value of $\textbf{Y}_{\pi(i)}$. Therefore, predicting $\textbf{Y}_{\pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the MLR Loss. For $T = 1$, the MLR loss could be written as follows: $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - L(\bm{\theta};(\textbf{X},\pi(\textbf{Y})). $$ \textcolor{red}{The $MLR$ is composed of two antagonistic terms. The first term is the usual loss function that fits the training set while the second term is introduced so that the trained model performs as poorly as possible when fitting the permuted labels.\\ The $MLR$ loss is designed to capture only the meaningful \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. This means that $MLR$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$.\\ Note that the MLR loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. MLR is designed to capture only the \textcolor{red}{meaningful} \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed MLR focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. \paragraph{Classical deep learning approach.} In the classical deep learning approach, we minimize $$ \widetilde{L}\left(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})\right) = L(\bm{\theta};(\textbf{X},\textbf{Y})) + \mathrm{pen}(\bm{\theta};\bm{\lambda}), $$ where $\bm{\lambda}$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). \paragraph{MLR to train Neural nets.} Applying $MLR$ to Neural nets is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $MLR$ criterion is used to tune simultaneously a common set of regularization parameters}. A naive implementation of MLR looks like that: \textcolor{red}{ $$ \widehat{\bm{\lambda}}:= \mathrm{argmin}_{\bm{\lambda}}\; L(\widehat{\bm{\theta}}(\bm{\lambda});(\textbf{X},\textbf{Y}))- L(\widehat{\bm{\theta}}_{\pi}(\bm{\lambda});(\textbf{X},\pi(\textbf{Y}))), $$ with $\widehat{\bm{\theta}}(\lambda) = \mathrm{argmin}_{\bm{\theta}}\, \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi}(\bm{\lambda}) = \mathrm{argmin}_{\bm{\theta}}\, \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\pi(\textbf{Y}))) $. } $$ \widehat{\bm{\lambda}}:= \mathrm{argmin}_{\bm{\lambda}} L(\widehat{\bm{\theta}}(\bm{\lambda});(\textbf{X},\textbf{Y}))- \frac{1}{T}\sum_{t=1}^T L(\widehat{\bm{\theta}}_{\Pi_t}(\bm{\lambda});(\textbf{X},\pi_t(\textbf{Y}))), $$ with $ \widehat{\bm{\theta}}(\lambda) = \mathrm{argmin}_{\bm{\theta}}\; \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi_t}(\bm{\lambda}) = \mathrm{argmin}_{\bm{\theta}}\; \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\pi_t(\textbf{Y}))) $. \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\bm{\lambda}$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\bm{\lambda}$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi_t(\textbf{Y}) . This is something we do not want to do for obvious reasons. We present now our approach. Let $\bm{\theta}$ be the weights on the hidden layers of our neural net $f(\bm{\theta},\bm{\lambda},\cdot)$, and let $\bm{\lambda}$ be a non-negative parameter that is specific to our method. Let $H_{\bm{\theta}}\,:\,\mathbb{R}^p \rightarrow \mathbb{R}^J$ be a function parametrized by $\bm{\theta}$ that we apply on the rows of $\textbf{X}$. In addition, we assume that $H_{\bm{\theta}}$ is differentiable w.r.t. $\bm\theta$ for all $\textbf{X}$. Define also $d(\textbf{Y}\,,\,\widehat{\textbf{Y}}): = \|\textbf{Y} - \widehat{\textbf{Y}} \|_2^2$. \begin{mydef}[MRL neural net] Set $ \beta(\bm{\theta},\lambda,\textbf{Y}) &= (H_{\bm{\theta}}(\textbf{X})^\top H_{\bm{\theta}}(\textbf{X}) + \lambda \,\ensuremath{\mathbb{I}}_J)^{-1}H_{\bm{\theta}}(\textbf{X})^\top \textbf{Y} $. The MLR neural net is $$ \textbf{NN}(\widehat{\bm{\theta}},\widehat{\bm{\lambda}},\cdot) = H_{\widehat{\bm{\theta}}}(\cdot)\,\beta(\widehat{\bm{\theta}},\widehat{\bm{\lambda}},\textbf{Y}) $$ where $(\widehat{\bm{\theta}},\widehat{\bm{\lambda}}) = \mathrm{argmin}_{\bm{\theta}, \bm{\lambda}} \;MLR_{\textbf{X},\textbf{Y}}(\bm{\theta},\bm{\lambda})$ with \begin{align} MLR_{\textbf{X},\textbf{Y}}(\bm{\theta},\bm{\lambda}) &:= d(\textbf{Y},H_{\bm{\theta}}(\textbf{X})\beta(\bm{\theta},\bm{\lambda},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T d(\pi_t(\textbf{Y}),H_{\bm{\theta}}(\textbf{X})\beta(\bm{\theta},\bm\lambda,\pi_t(\textbf{Y}))).\notag \end{align} \end{mydef} \begin{remark} \textcolor{red}{ Nonconvex but smooth loss. We can compute the derivative and so on...\\ compatible with graph differentiation and can fully exploit gpu parallelization... Inversion of matrix is not a costly operation. Ailleurs\\ \\Computational tractability?} \end{remark} We specify now our approach for a general function $H_\bm{\theta}$. In this paper, the function $H_\bm{\theta}$ takes the observations as an input and yields the values on the last hidden layer of a neural net as an output. This neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, and a ReLU activation function between each layer. There is not any additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, etc...). Also, note that $\beta(\bm{\theta},\bm{\lambda},\textbf{Y})$ is the close form of the ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\bm{\lambda}$ but applied to \sout{the observation matrix} $H_{\bm{\theta}}(\textbf{X})$ instead of $\textbf{X}$. Our approach fully embraces the interpretation of neural networks as automated differentiable feature engineering. As such, $H_{\bm{\theta}}(\textbf{X})$ can be seen as a set of embeddings. \textcolor{red}{close form release the requirement for bi-level optimization.} The $MLR$ loss constructs embeddings that capture meaningful patterns in the data while pruning irrelevant connections. To this end, we leverage two key ingredients. First, label permutation is used to produce a control set $(\textbf{X},\pi(\textbf{Y}))$ that can only be fitted through memorization. Second, the Ridge performs shrinkage on the the embeddings. That way, we avoid trivial cases of perfect fit for both terms in the MLR loss. We rather obtain a smooth behavior of both \sout{losses} \textcolor{red}{terms in MLR} w.r.t. the neural net parameters, \textcolor{red}{which can then be leveraged } to get a quantifiable comparison \textcolor{red}{between the two terms}. By maximizing the gap between the two \textcolor{red}{terms} \sout{quantities} in $MLR$, we \textcolor{red}{steer/optimize} the parameters towards the directions that maximize only generalization. This is not surprising since generalization directions are faster to learn than memorization directions \cite{PapierOptimization=Generalization}. **************************************************\\ **************************************************\\ \\ espace\\ **************************************************\\ **************************************************\\ \paragraph{BKK for regression and tabular data} $$ H_{\bm{\theta}}=? $$ et initialization de $\bm{\theta}$ et grille pour trouver $lambda$ initial. Let NN(x) be a neural network of the form : L layers, with A_l = S( \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \newpage \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour MLR } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} \newpage \section{Related Work} \newpage \section{$MLR$ Neural Nets} Let us consider a training set $\mathcal{D}_{train}=\{ (\textbf{X}_i,Y_i)\}_{i=1}^n$ and a test set $\mathcal{D}_{test}=\{ (\mathbf{W}_i,Z_i)\}_{i=1}^m$. We want to train a neural net $f(\bm{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on the test set, that is, to minimize $ L(\bm{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\bm{\theta},\widetilde{\mathbf{X}}_i) - \widetilde{Y}_i)^2 $ A naive unregularized training method consists in minimizing the objective function $ L(\bm{\theta};\mathcal{D}_{train}) = \sum_{i=1}^n (f(\bm{\theta},\mathbf{X}_i) - Y_i)^2. $ To prevent overfitting, we introduced instead the Muddling Label Regularization ($MLR$) loss function. \paragraph{Muddling Label Regularization.} This new criterion is based on permutations of the labels $\textbf{Y} = (Y_1,\cdots,Y_n)$. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y}$ as $ \pi(\textbf{Y}) = (Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \begin{mydef}[Muddling Label Regularization] \label{def:MLR} Let $T\geq 1$ be a fixed number. Let $\pi_t$, $1\leq t \leq T$, be permutations of $n$ elements drawn uniformly at random. The MLR loss is defined as $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\bm{\theta};(\textbf{X},\pi_t(\textbf{Y})). $$ \end{mydef} Note that the MLR loss function is computed using only $\mathcal{D}_{train}$. No additional data is used to compute (MLR). The permuted label vector $\pi(\textbf{Y})$ can be seen as a basic form of data-augmentation of the labels. We draw $T$ label permutation operators $(\pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. When $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the MLR loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{Recall that $A_k $ is the event where the random permutation $\Pi$ admits exactly $k$ fixed points. We have $$ \mathbb{P}\left( A_k \right) = \frac{ \binom{n}{k}\, !(n-k) }{n!} = \frac{1}{k!} \sum_{m=0}^{n-k} \frac{(-1)^m}{m!}\leq \frac{1}{2k!},\quad \forall 0\leq k <n. $$ Consequently the expected number of fixed points is $\sum_{k=1}^n k \,\mathbb{P}\left( A_k \right) \leq e/2 + \frac{1}{(n-1)!}\leq 2$ for any $n\geq 3$.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\pi(i)}$ and $\mathbf{X}_i$. That means that $\mathbf{X}_i$ provides no information on the possible value of $\textbf{Y}_{\pi(i)}$. Therefore, predicting $\textbf{Y}_{\pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the MLR Loss. For $T = 1$, the MLR loss could be written as follows: $$ MLR(\bm{\theta};\mathcal{D}_{train}) = L(\bm{\theta};(\textbf{X},\textbf{Y})) - L(\bm{\theta};(\textbf{X},\pi(\textbf{Y})). $$ \textcolor{red}{The $MLR$ is composed of two antagonistic terms. The first term is the usual loss function that fits the training set while the second term is introduced so that the trained model performs as poorly as possible when fitting the permuted labels.\\ Hence the $MLR$ loss is designed to capture only the meaningful \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. In other words, $MLR$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$.\\ Note that the MLR loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. MLR is designed to capture only the \textcolor{red}{meaningful} \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed MLR focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. \paragraph{Classical deep learning approach.} In the classical deep learning approach, we minimize $$ \widetilde{L}\left(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})\right) = L(\bm{\theta};(\textbf{X},\textbf{Y})) + \mathrm{pen}(\bm{\theta};\bm{\lambda}), $$ where $\bm{\lambda}$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). \paragraph{MLR to train Neural nets.} Applying $MLR$ to Neural nets is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $MLR$ criterion is used to tune simultaneously a common set of regularization parameters}. A naive implementation of MLR looks like that: \textcolor{red}{ $$ \widehat{\bm{\lambda}}:= \mathrm{argmin}_{\bm{\lambda}}\; L(\widehat{\bm{\theta}}(\bm{\lambda});(\textbf{X},\textbf{Y}))- L(\widehat{\bm{\theta}}_{\pi}(\bm{\lambda});(\textbf{X},\pi(\textbf{Y}))), $$ with $\widehat{\bm{\theta}}(\lambda) = \mathrm{argmin}_{\bm{\theta}}\, \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi}(\bm{\lambda}) = \mathrm{argmin}_{\bm{\theta}}\, \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\pi(\textbf{Y}))) $. } $$ \widehat{\bm{\lambda}}:= \mathrm{argmin}_{\bm{\lambda}} L(\widehat{\bm{\theta}}(\bm{\lambda});(\textbf{X},\textbf{Y}))- \frac{1}{T}\sum_{t=1}^T L(\widehat{\bm{\theta}}_{\Pi_t}(\bm{\lambda});(\textbf{X},\pi_t(\textbf{Y}))), $$ with $ \widehat{\bm{\theta}}(\lambda) = \mathrm{argmin}_{\bm{\theta}}\; \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi_t}(\bm{\lambda}) = \mathrm{argmin}_{\bm{\theta}}\; \widetilde{L}(\bm{\theta},\bm{\lambda};(\textbf{X},\pi_t(\textbf{Y}))) $. \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\bm{\lambda}$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\bm{\lambda}$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi_t(\textbf{Y}) . This is something we do not want to do for obvious reasons. We present now our approach. Let $\bm{\theta}$ be the weights on the hidden layers of our neural net $f(\bm{\theta},\bm{\lambda},\cdot)$, and let $\bm{\lambda}$ be a non-negative parameter that is specific to our method. Let $H_{\bm{\theta}}\,:\,\mathbb{R}^p \rightarrow \mathbb{R}^J$ be a function parametrized by $\bm{\theta}$ that we apply on the rows of $\textbf{X}$. In addition, we assume that $H_{\bm{\theta}}$ is differentiable w.r.t. $\bm\theta$ for all $\textbf{X}$. Define also $d(\textbf{Y}\,,\,\widehat{\textbf{Y}}): = \|\textbf{Y} - \widehat{\textbf{Y}} \|_2^2$. \begin{mydef}[MRL neural net] Set $ \beta(\bm{\theta},\lambda,\textbf{Y}) &= (H_{\bm{\theta}}(\textbf{X})^\top H_{\bm{\theta}}(\textbf{X}) + \lambda \,\ensuremath{\mathbb{I}}_J)^{-1}H_{\bm{\theta}}(\textbf{X})^\top \textbf{Y} $. The MLR neural net is $$ \textbf{NN}(\widehat{\bm{\theta}},\widehat{\bm{\lambda}},\cdot) = H_{\widehat{\bm{\theta}}}(\cdot)\,\beta(\widehat{\bm{\theta}},\widehat{\bm{\lambda}},\textbf{Y}) $$ where $(\widehat{\bm{\theta}},\widehat{\bm{\lambda}}) = \mathrm{argmin}_{\bm{\theta}, \bm{\lambda}} \;MLR_{\textbf{X},\textbf{Y}}(\bm{\theta},\bm{\lambda})$ with \begin{align} MLR_{\textbf{X},\textbf{Y}}(\bm{\theta},\bm{\lambda}) &:= d(\textbf{Y},H_{\bm{\theta}}(\textbf{X})\beta(\bm{\theta},\bm{\lambda},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T d(\pi_t(\textbf{Y}),H_{\bm{\theta}}(\textbf{X})\beta(\bm{\theta},\bm\lambda,\pi_t(\textbf{Y}))).\notag \end{align} \end{mydef} \begin{remark} \textcolor{red}{ Nonconvex but smooth loss. We can compute the derivative and so on...\\ compatible with graph differentiation and can fully exploit gpu parallelization... Inversion of matrix is not a costly operation. Ailleurs\\ \\Computational tractability?} \end{remark} We specify now our approach for a general function $H_\bm{\theta}$. In this paper, the function $H_\bm{\theta}$ takes the observations as an input and yields the values on the last hidden layer of a neural net as an output. This neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, and a ReLU activation function between each layer. There is not any additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, etc...). Also, note that $\beta(\bm{\theta},\bm{\lambda},\textbf{Y})$ is the close form of the ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\bm{\lambda}$ but applied to \sout{the observation matrix} $H_{\bm{\theta}}(\textbf{X})$ instead of $\textbf{X}$. Our approach fully embraces the interpretation of neural networks as automated differentiable feature engineering. As such, $H_{\bm{\theta}}(\textbf{X})$ can be seen as a set of embeddings. \textcolor{red}{close form release the need for bi-level optimization.} The $MLR$ loss constructs embeddings that capture meaningful patterns in the data while pruning irrelevant connections. To this end, we leverage two key ingredients. First, label permutation is used to produce a control set $(\textbf{X},\pi(\textbf{Y}))$ that can only be fitted through memorization. Second, the Ridge performs shrinkage on the the embeddings. That way, we avoid trivial cases of perfect fit for both terms in the MLR loss. We rather obtain a smooth behavior of both \sout{losses} \textcolor{red}{terms in MLR} w.r.t. the neural net parameters, \textcolor{red}{which can then be leveraged } to get a quantifiable comparison \textcolor{red}{between the two terms}. By maximizing the gap between the two \textcolor{red}{terms} \sout{quantities} in $MLR$, we \textcolor{red}{steer/optimize} the parameters towards the directions that maximize only generalization. This is not surprising since generalization directions are faster to learn than memorization directions \cite{PapierOptimization=Generalization}. **************************************************\\ **************************************************\\ \\ espace\\ **************************************************\\ **************************************************\\ Choix de Ridge plutôt qu'OLS: Ridge est Un estimateur biaisé, $H_\theta(X) \hat{\beta}$ permuté et $H_\theta(X) \hat\beta$ ont même variance car $Y$ et $\pi(Y)$ ont la même loi marginale Ainsi la différence des RMSE revient à une différence de biais pour un lambda donné. Dans le cas de Ridge le biais quantifie la perte de signale, ainsi, minimiser MLR revient à minimiser la perte de signal entre le cas informatif du cas non informatif. / On maximise la perte de signal supplémentaire dans le cas permuté. La Dvc quantifie, mesure l'expressivité d'un modèle(classe de fct). Notre approche est différente. On se fixe une Dvc de (n) à atteindre. Et on construit des embeddings qui permettent d'approcher les conditions à remplir/ nécessaires. de construire des embeddings, qui permettent d'approcher une Dvc proche de n, Dvc fait l'argmax sur n, pour une condition fixée. Nous on fixe n mais on essaie d'approcher la condition. Dans notre cas, la classe de fct considérée est fixée à la classe des Estimateurs Ridge dans $R_j (f(X) = 1_ {H_\theta(X) \beta^R >0})$. On se fixe une Dimension de VC (DVC) égale à la taille de notre échantillon n, et on cherche à construire les conditions de réalisation de cette DVC. Pour cela on cherche à construire $H_\theta(X)$ tel que pour le vecteur $Y$ de nos observations, le modèle soit le plus proche possible d'une expressivité $n$. Le plus proche possible au sens de la condition pas au sens de $n$. Par définition cela arrive si $||f(H_\theta(X) ) -Y ||_0$ que l'on remplacera par $CE() -> 0$. Dans le même temps, la construction des $H_\theta(X)$ doit répondre à une condition supplémentaire, le modèle doit être le moins expressif possible dans le cas non informatif, Y permuté. Ainsi, pour avoir une DVC proche de n, on construit $H_\theta(X)$ tel que la différence de ces deux expressivités soit la plus grande possible. \paragraph{Dvc} For a class of functions $\mathcal{C} $ from $\mathbb{R}^J$: $$D_{vc}(\mathcal{C}) = argmax_{n \in \ensuremath{\mathbb{N}}}\quad \exists \textbf{X} \in \mathbb{R}^{n,J}\quad \forall \textbf{Y} \in \{0;1\}^n \quad \exists f \in \mathcal{C} \quad \text{such that} \quad ||f(X)-Y||_0 = 0$$ For us, $n$ is a given value, it is the number of observations. We cannot optimize $n$ such that the condition is verified. But for $n$ given we can try to get as close as possible to the case where the condition is verified. We have chosen $\mathcal{C}$, it is the class of ridge estimators for classification, meaning all the functions of the form $f(X) = X \beta_\lambda$. So we are not using $D_{vc}$ to compare two class of functions. For a given value $\lambda$, we do not chose which element of $\mathcal{C}$ is used, it is always the ridge estimator with penality $\lambda$. Also, we do not pick the worst labels possible in a logical sense. We are choosing the labels which are the worse in a statistical sense. This means we take the labels that are completely independent from the observations. To do so, we draw the permutations of $\textbf{Y}$ who verify this condition. So we consider only one value for the dimension $D_{vc}$, $n$. And with a fix candidate of the class \paragraph{BKK for regression and tabular data} $$ H_{\bm{\theta}}=? $$ et initialization de $\bm{\theta}$ et grille pour trouver $lambda$ initial. Let NN(x) be a neural network of the form : L layers, with A_l = S( \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \subsubsection{Pre-processing} \fbox{Functions} $ \begin{array}{l} \textbf{function C}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{max}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{mode}Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function R}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} \textbf{if}\,\, Z_i==\text{NAN} \\ \qquad\text{remove}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \fbox{Features pre-processing} \noindent\\ $ \begin{array}{l} \textbf{for}\,\, j=1:p\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \#\text{set}(X_j)=1\\ \qquad\text{remove}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)=2\\ \qquad\text{function C}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)\leq2\\ \qquad\text{function M}(X_j)\\ \textbf{else}\\ \quad \left| \begin{array}{l} \textbf{if}\,\, \text{type}(X_j)==\text{float}\\ \qquad\text{function R}(X_j)\\ \textbf{else} \\ \qquad\text{remove}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ $\left| \begin{array}{l} \end{array} \right.$ \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour MLR } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, MLR debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} \newpage \section{Related Work} \newpage \section{$\texttt{\,MLR $\,$}$ Neural Nets} Let us consider a training set $\mathcal{D}_{train}=\{ (\textbf{X}_i,Y_i)\}_{i=1}^n$ and a test set $\mathcal{D}_{test}=\{ (\textbf{P}_i,Z_i)\}_{i=1}^m$. We want to train a neural net $f(\boldsymbol{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on the test set, that is, to minimize $ L(\boldsymbol{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\boldsymbol{\theta},\textbf{P}_i) - Z_i)^2 $ A naive unregularized training method consists in minimizing the objective function $ L(\boldsymbol{\theta};\mathcal{D}_{train}) = \sum_{i=1}^n (f(\boldsymbol{\theta},\textbf{X}_i) - Y_i)^2. $ This approach is prone to overfitting. Therefore, we introduce instead the Muddling Label Regularization ($\texttt{\,MLR $\,$}$) loss function. \paragraph{Muddling Label Regularization.} This new criterion is based on permutations of the labels $\textbf{Y} = (Y_1,\cdots,Y_n)$. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y}$ as $ \pi(\textbf{Y}) = (Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \begin{mydef}[Muddling Label Regularization] \label{def:MLR} Let $T\geq 1$ be a fixed number. Let $\pi_t$, $1\leq t \leq T$, be permutations of $n$ elements drawn uniformly at random. The \texttt{\,MLR $\,$} loss is defined as $$ \texttt{\,MLR $\,$}(\boldsymbol{\theta};\mathcal{D}_{train}) = L(\boldsymbol{\theta};(\mathbb{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\boldsymbol{\theta};(\mathbb{X},\pi_t(\textbf{Y})), $$ where $\mathbb{X}^\top = \left( \textbf{X}_1|\cdots|\textbf{X}_n \right)$. \end{mydef} Note that the \texttt{\,MLR $\,$} loss function is computed using only $\mathcal{D}_{train}$. No additional data is used to compute (\texttt{\,MLR $\,$}). The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators $(\pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. Indeed, when $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$} loss. In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$} loss. - We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$} loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$} loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\pi(i)}$ and $\mathbf{X}_i$. That means that $\mathbf{X}_i$ provides no information on the possible value of $\textbf{Y}_{\pi(i)}$. Therefore, predicting $\textbf{Y}_{\pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the \texttt{\,MLR $\,$} Loss. For $T = 1$, the \texttt{\,MLR $\,$} loss could be written as follows: $$ \texttt{\,MLR $\,$}(\boldsymbol{\theta};\mathcal{D}_{train}) = L(\boldsymbol{\theta};(\textbf{X},\textbf{Y})) - L(\boldsymbol{\theta};(\textbf{X},\pi(\textbf{Y})). $$ \textcolor{red}{The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual loss function that fits the training set while the second term is introduced so that the trained model performs as poorly as possible when fitting the permuted labels.\\ Hence the $\texttt{\,MLR $\,$}$ loss is designed to capture only the meaningful \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. In other words, $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$.\\ Note that the \texttt{\,MLR $\,$} loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. \texttt{\,MLR $\,$} is designed to capture only the \textcolor{red}{meaningful} \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed \texttt{\,MLR $\,$} focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. \paragraph{Classical deep learning approach.} In the classical deep learning approach, we minimize $$ \widetilde{L}\left(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})\right) = L(\boldsymbol{\theta};(\textbf{X},\textbf{Y})) + \mathrm{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). \paragraph{\texttt{\,MLR $\,$} to train Neural nets.} Applying $\texttt{\,MLR $\,$}$ to Neural nets is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion is used to tune simultaneously a common set of regularization parameters}. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\lambda}:= \mathrm{argmin}_{\lambda}\; L(\widehat{\boldsymbol{\theta}}(\lambda);(\textbf{X},\textbf{Y}))- L(\widehat{\boldsymbol{\theta}}_{\pi}(\lambda);(\textbf{X},\pi(\textbf{Y}))), $$ with $\widehat{\boldsymbol{\theta}}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\, \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\, \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\pi(\textbf{Y}))) $. } $$ \widehat{\lambda}:= \mathrm{argmin}_{\lambda} L(\widehat{\boldsymbol{\theta}}(\lambda);(\textbf{X},\textbf{Y}))- \frac{1}{T}\sum_{t=1}^T L(\widehat{\boldsymbol{\theta}}_{\Pi_t}(\lambda);(\textbf{X},\pi_t(\textbf{Y}))), $$ with $ \widehat{\boldsymbol{\theta}}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\; \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi_t}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\; \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\pi_t(\textbf{Y}))) $. \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi_t(\textbf{Y}) . This is something we do not want to do for obvious reasons. We present now our approach. Let $\boldsymbol{\theta}$ be the weights on the hidden layers of our neural net $f(\boldsymbol{\theta},\lambda,\cdot)$, and let $\lambda$ be a non-negative parameter that is specific to our method. Let $\H_{\boldsymbol{\theta}}\,:\,\mathbb{R}^p \rightarrow \mathbb{R}^J$ be a function parametrized by $\boldsymbol{\theta}$ that we apply on the rows of $\textbf{X}$. In addition, we assume that $\H_{\boldsymbol{\theta}}$ is differentiable w.r.t. $\bm\theta$ for all $\textbf{X}$. Define also $d(\textbf{Y}\,,\,\widehat{\textbf{Y}}): = \|\textbf{Y} - \widehat{\textbf{Y}} \|_2^2$. \begin{mydef}[MRL neural net] Set $ \beta(\boldsymbol{\theta},\lambda,\textbf{Y}) = (\H_{\boldsymbol{\theta}}(\textbf{X})^\top \H_{\boldsymbol{\theta}}(\textbf{X}) + \lambda \,\ensuremath{\mathbb{I}}_J)^{-1}\H_{\boldsymbol{\theta}}(\textbf{X})^\top \textbf{Y} $. The MLR neural net is $$ \textbf{NN}(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\cdot) = \H_{\widehat{\boldsymbol{\theta}}}(\cdot)\,\beta(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\textbf{Y}) $$ where $(\widehat{\boldsymbol{\theta}},\widehat{\lambda}) = \mathrm{argmin}_{\boldsymbol{\theta}, \lambda} \;\texttt{\,MLR $\,$}_{\textbf{X},\textbf{Y}}(\boldsymbol{\theta},\lambda)$ with \begin{align} \texttt{\,MLR $\,$}_{\textbf{X},\textbf{Y}}(\boldsymbol{\theta},\lambda) &:= d(\textbf{Y},\H_{\boldsymbol{\theta}}(\textbf{X})\beta(\boldsymbol{\theta},\lambda,\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T d(\pi_t(\textbf{Y}),\H_{\boldsymbol{\theta}}(\textbf{X})\beta(\boldsymbol{\theta},\bm\lambda,\pi_t(\textbf{Y}))).\notag \end{align} \end{mydef} \begin{remark} \textcolor{red}{ Nonconvex but smooth loss. We can compute the derivative and so on...\\ compatible with graph differentiation and can fully exploit gpu parallelization... Inversion of matrix is not a costly operation. Ailleurs\\ \\Computational tractability?} \end{remark} We specify now our approach for a general function $\\H_{\boldsymbol{\theta}}$. In this paper, the function $\\H_{\boldsymbol{\theta}}$ takes the observations as an input and yields the values on the last hidden layer of a neural net as an output. This neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, and a ReLU activation function between each layer. There is not any additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, etc...). Also, note that $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})$ is the close form of the ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to \sout{the observation matrix} $\H_{\boldsymbol{\theta}}(\textbf{X})$ instead of $\textbf{X}$. Our approach fully embraces the interpretation of neural networks as automated differentiable feature engineering. As such, $\H_{\boldsymbol{\theta}}(\textbf{X})$ can be seen as a set of embeddings. \textcolor{red}{close form release the need for bi-level optimization.} The $\texttt{\,MLR $\,$}$ loss constructs embeddings that capture meaningful patterns in the data while pruning irrelevant connections. To this end, we leverage two key ingredients. First, label permutation is used to produce a control set $(\textbf{X},\pi(\textbf{Y}))$ that can only be fitted through memorization. Second, the Ridge performs shrinkage on the the embeddings. That way, we avoid trivial cases of perfect fit for both terms in the \texttt{\,MLR $\,$} loss. We rather obtain a smooth behavior of both \sout{losses} \textcolor{red}{terms in \texttt{\,MLR $\,$}} w.r.t. the neural net parameters, \textcolor{red}{which can then be leveraged } to get a quantifiable comparison \textcolor{red}{between the two terms}. By maximizing the gap between the two \textcolor{red}{terms} \sout{quantities} in $\texttt{\,MLR $\,$}$, we \textcolor{red}{steer/optimize} the parameters towards the directions that maximize only generalization. This is not surprising since generalization directions are faster to learn than memorization directions \cite{PapierOptimization=Generalization}. **************************************************\\ **************************************************\\ \\ espace\\ **************************************************\\ **************************************************\\ Choix de Ridge plutôt qu'OLS: Ridge est Un estimateur biaisé, $\H_\theta(X) \hat{\beta}$ permuté et $\H_\theta(X) \hat\beta$ ont même variance car $Y$ et $\pi(Y)$ ont la même loi marginale Ainsi la différence des RMSE revient à une différence de biais pour un lambda donné. Dans le cas de Ridge le biais quantifie la perte de signale, ainsi, minimiser \texttt{\,MLR $\,$} revient à minimiser la perte de signal entre le cas informatif du cas non informatif. / On maximise la perte de signal supplémentaire dans le cas permuté. La Dvc quantifie, mesure l'expressivité d'un modèle(classe de fct). Notre approche est différente. On se fixe une Dvc de (n) à atteindre. Et on construit des embeddings qui permettent d'approcher les conditions à remplir/ nécessaires. de construire des embeddings, qui permettent d'approcher une Dvc proche de n, Dvc fait l'argmax sur n, pour une condition fixée. Nous on fixe n mais on essaie d'approcher la condition. Dans notre cas, la classe de fct considérée est fixée à la classe des Estimateurs Ridge dans $R_j (f(X) = 1_ {\H_\theta(X) \beta^R >0})$. On se fixe une Dimension de VC (DVC) égale à la taille de notre échantillon n, et on cherche à construire les conditions de réalisation de cette DVC. Pour cela on cherche à construire $\H_\theta(X)$ tel que pour le vecteur $Y$ de nos observations, le modèle soit le plus proche possible d'une expressivité $n$. Le plus proche possible au sens de la condition pas au sens de $n$. Par définition cela arrive si $||f(\H_\theta(X) ) -Y ||_0$ que l'on remplacera par $CE() -> 0$. Dans le même temps, la construction des $\H_\theta(X)$ doit répondre à une condition supplémentaire, le modèle doit être le moins expressif possible dans le cas non informatif, Y permuté. Ainsi, pour avoir une DVC proche de n, on construit $\H_\theta(X)$ tel que la différence de ces deux expressivités soit la plus grande possible. \paragraph{Dvc} For a class of functions $\mathcal{C} $ from $\mathbb{R}^J$: $$D_{vc}(\mathcal{C}) = argmax_{n \in \ensuremath{\mathbb{N}}}\quad \exists \textbf{X} \in \mathbb{R}^{n,J}\quad \forall \textbf{Y} \in \{0;1\}^n \quad \exists f \in \mathcal{C} \quad \text{such that} \quad ||f(X)-Y||_0 = 0$$ For us, $n$ is a given value, it is the number of observations. We cannot optimize $n$ such that the condition is verified. But for $n$ given we can try to get as close as possible to the case where the condition is verified. We have chosen $\mathcal{C}$, it is the class of ridge estimators for classification, meaning all the functions of the form $f(X) = X \beta_\lambda$. So we are not using $D_{vc}$ to compare two class of functions. For a given value $\lambda$, we do not chose which element of $\mathcal{C}$ is used, it is always the ridge estimator with penalty $\lambda$. Also, we do not pick the worst labels possible in a logical sense. We are choosing the labels which are the worse in a statistical sense. This means we take the labels that are completely independent from the observations. To do so, we draw the permutations of $\textbf{Y}$ who verify this condition. So we consider only one value for the dimension $D_{vc}$, $n$. And with a fix candidate of the class \section{The FFNN : Matrix form notations} \begin{minipage}[t]{0.55\textwidth} \textbf{Inputs of the layer} \medskip \begin{itemize} \item $Z^0=X_i\in\mathbb{R}^p$ \item $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$. \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Outputs of the layer} \medskip \begin{itemize} \item $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, $\ell\in \llbracket1,L-1 \rrbracket$ \item $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} \end{minipage} \medskip \begin{minipage}[t]{0.55\textwidth} \textbf{Weights} \medskip \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \textbf{Bias term} \medskip \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} \begin{mdframed} \begin{center}\textbf{\underline{To resume}} \end{center} For all $i\in \llbracket1,n \rrbracket$ \begin{itemize} \item \textbf{Input} :$Z^0=X_i=A^0$ \item $Z^{\ell+1}=A^\ell W^\ell+ B^\ell$, $\ell\in \llbracket 0,L-1 \rrbracket$ \item $A^\ell=S(Z^\ell)$, $\ell\in \llbracket1,L-1 \rrbracket$ \item \textbf{Output} : $A^L=Z^L$ \end{itemize} \end{mdframed} Previously all the notation have been defined for one observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define $$\mathbb{A}^{L-1}=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J}$$ Let us define the following quantity : for $\lambda>0$ $$\H:=\mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. Denote by : \begin{center}\fbox{$\theta:=\{\lambda,W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\}$}\end{center} then it is clear that $\H(\theta)$. \section{ Loss function for the general setting of $\kappa$ targets} \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define $\pi(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $$\pi(\textbf{Y}) = (Y_{\pi(1)},\ldots,Y_{\pi(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\H(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\H(\theta)\,\pi^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\H}:=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \subsection{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define $\pi^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad\pi^t(\mathbb{Y})=(\pi^{t,1}(\mathbb{Y}_1),\ldots,\pi^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $$\pi(\mathbb{Y})=(\pi^{1}(\mathbb{Y}),\ldots,\pi^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\H(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^{t,k}(\mathbb{Y}_k)-\H(\theta)\,\pi^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\H(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[\pi(\mathbb{Y})-\H(\theta)\,\underset{obs.}{\odot}\pi( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\H}:=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-FFNN, the FFNN trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-FFNN appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \paragraph{BKK for regression and tabular data} \paragraph{Parameter initialization} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \end{mdframed} Initialization of $\lambda$, the Ridge parameter: This parameter is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will prevent regularization effect. Furthermore, a very small value will bring numerical instability during the matrix inversion. Likewise, choosing $\lambda$ too big will prevent any learning. In both cases, the gradient with respect to $\lambda$ will vanish. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate value depends on many elements, such as datasize, the size of the model, how difficult the task is,... etc. However, we found a very efficient heuristic to pick an appropriate value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not too find the best model before learning. This means that the want to maximize the gradient with respect to $\lambda$, as this implies that a small update in $\lambda$ will have a big impact on our loss. To do so we maximize the following quantity: $$ for e = 0, \lambda = argmax_{\lambda \in \mathbb{R}_+^*} $$ PARLER DE $\lambda$ avec critère BKK \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \subsubsection{Pre-processing} \fbox{Functions} $ \begin{array}{l} \textbf{function C}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{max}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{mode}Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function R}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} \textbf{if}\,\, Z_i==\text{NAN} \\ \qquad\text{remove}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \fbox{Features pre-processing} \noindent\\ $ \begin{array}{l} \textbf{for}\,\, j=1:p\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \#\text{set}(X_j)=1\\ \qquad\text{remove}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)=2\\ \qquad\text{function C}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)\leq2\\ \qquad\text{function M}(X_j)\\ \textbf{else}\\ \quad \left| \begin{array}{l} \textbf{if}\,\, \text{type}(X_j)==\text{float}\\ \qquad\text{function R}(X_j)\\ \textbf{else} \\ \qquad\text{remove}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ $\left| \begin{array}{l} \end{array} \right.$ \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} \newpage \section{Related Work} \newpage \section{The {\texttt{FFNN}}} \subsection{Matrix form notations} Consider a regression function, $\mathbb{E}(y)=f^*(\textbf{x})$ maps an input $\textbf{x}$ to $y$. The goal of a {\texttt{FFNN}} is to approximate $f^*$ by mapping $\mathbb{E}(\textbf{y})=f(\textbf{x},\boldsymbol{\theta})$ and learning the value of the parameters $\boldsymbol{\theta}$ that result in the best approximation. Let $\mathcal{D}_{train}=\{(\textbf{X}_i,Y_i)\}_{i=1}^n$ be a train set, we use the following notations: for $\ell\in \llbracket1,L-1 \rrbracket$ \begin{itemize} \item \textbf{\underline{First Layer.} } Input: $Z^0=X_i\in\mathbb{R}^p$, Output: $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item \textbf{\underline{Hidden Layers.} } Input: $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, Output: $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, \item \textbf{\underline{Last Layer.} } Input: :$Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$, Output: $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} Then, for all $i\in \llbracket1,n \rrbracket$, the {\texttt{FFNN}} is $s.t.$ $$ \begin{array}{l} \textbf{Input} : Z^0=X_i=A^0\\ Z^{\ell+1}=A^\ell W^\ell+ B^\ell,\quad \ell\in \llbracket 0,L-1 \rrbracket\\ A^\ell={\texttt{ReLU}}(Z^\ell),\quad\ell\in \llbracket1,L-1 \rrbracket\\ \textbf{Output} : A^L=Z^L \end{array} $$ We set \begin{eqnarray} \label{theta} \boldsymbol{\theta}=\{W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\},\quad\text{with} \end{eqnarray} \begin{minipage}[t]{0.55\textwidth} \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} Previously all the notation have been defined for one observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define \begin{eqnarray} \label{ALm1} \mathbb{A}^{L-1}=\mathbb{A}^{L-1}(\boldsymbol{\theta},\mathbb{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J}, \end{eqnarray} where $\mathbb{X}=(\textbf{X}_1,\ldots,\textbf{X}_n)$. \newpage \section{$\texttt{\,MLR $\,$}$ Neural Nets} We want to train the ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{U}_i,Z_i)\}_{i=1}^m$, that is, to minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\boldsymbol{\theta},\textbf{U}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. A \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ permutations of $n$ elements drawn uniformly at random. Therefore, we construct $T$ artificial/permuted $train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. Indeed, when $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{X}_i$. That means that $\textbf{X}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the \texttt{\,MLR $\,$}-loss. For $T = 1$, the \texttt{\,MLR $\,$}-loss could be written as follows: $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - {\texttt{MSE}}_f(\boldsymbol{\theta};\pi(\ensuremath{\mathcal{D}}_{train})). $$ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual {\texttt{MSE}} while the second term is the {\texttt{MSE}} on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\mathbb{X},\textbf{Y})$ and not in uncorrelated pairs $(\mathbb{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. \paragraph{\textbf{\texttt{MLR}} to train Neural nets.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion is used to tune simultaneously a common set of regularization parameters}. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\widehat{\boldsymbol{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\widehat{\boldsymbol{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\widehat{\boldsymbol{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\mathbb{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \mathbb{W}&=&\mathbb{W}(\boldsymbol{\theta},\lambda,\mathbb{X})=\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \H&=&\H(\boldsymbol{\theta},\lambda,\mathbb{X})=\mathbb{A}^{L-1}\mathbb{W}\in\mathbb{R}^{n\times n \end{eqnarray} where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. Note that \begin{eqnarray} \label{ridge} \H(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\mathbb{A}^{L-1}\mathbb{W}(\boldsymbol{\theta},\lambda,\mathbb{X})\textbf{Y}=\mathbb{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\mathbb{W}(\boldsymbol{\theta},\lambda,\mathbb{X}) \textbf{Y}$ is the close form of the ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\mathbb{A}^{L-1}$ instead of $\mathbb{X}$. In addition, we assume that $\H$ is differentiable w.r.t. $\boldsymbol{\theta}$. \begin{mydef}[\texttt{\,MLR $\,$} -loss] \label{MLRloss} We define the \texttt{\,MLR $\,$}-loss as follow \begin{align} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda,\textbf{Y}) &= \| \textbf{Y}-\H(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\H(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda,\textbf{Y}) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\H(\boldsymbol{\theta},\lambda)\, \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\H(\boldsymbol{\theta},\lambda)\,{\textbf{Perm}}( \textbf{Y}\right)\right) \end{align} \end{mydef} \paragraph{Setting $n\geq J$.} In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. We introduce some gaussian noise in $\textbf{Y}$ and $\pi(\textbf{Y})$. Let $\epsilon$ and $\xi$ be two centered independent Gaussian $n$-random vectors of variance $\sigma^2>0$ $$\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\ensuremath{\mathbb{I}}_n)\quad \text{independent of}\quad\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\ensuremath{\mathbb{I}}_n)/ $$ The hyperparameter $\sigma^2$ will be discuss in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$} neural net ($n\geq J$ setting)]\label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\bigcdot) =\mathbb{A}^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot) \, \beta(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\textbf{Y})=\mathbb{A}^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot) \,\mathbb{W}(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\mathbb{X}) \textbf{Y} $$ where $(\widehat{\boldsymbol{\theta}},\widehat{\lambda}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ with \begin{align} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\H(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\H(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\H(\boldsymbol{\theta},\lambda)\, \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\H(\boldsymbol{\theta},\lambda)\,{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right), \end{align} where $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$ \end{mydef} \paragraph{Setting $n<J$.} When the number $n$ of observations is smaller than the number of neurons $J$ ($n<J$). Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the the resulted matrix a noise term $\boldsymbol{\epsilon}\sim\ensuremath{\mathcal{N}}(\boldsymbol{0}_{r\times n},\sigma^2\ensuremath{\mathbb{I}}_{r\times n\times n})$. The resulted matrix is denoted by $$\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{r\times n}.$$ \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new noise term $\boldsymbol{\xi}\sim\ensuremath{\mathcal{N}}(\boldsymbol{0}_{r\times n\times T},\sigma^2\ensuremath{\mathbb{I}}_{r\times (n\times n) \times T})$. We repeat the previous step $T$ times: $${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{r\times n\times T}.$$ \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$} neural net ($n< J$ setting)]\label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\bigcdot) =\mathbb{A}^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot) \, \beta(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\textbf{Y})=\mathbb{A}^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot) \,\mathbb{W}(\widehat{\boldsymbol{\theta}},\widehat{\lambda},\mathbb{X}) \textbf{Y} $$ where $(\widehat{\boldsymbol{\theta}},\widehat{\lambda}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ with \begin{eqnarray} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\H(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\H(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{perm.}{{\texttt{mean}}}\left(\H(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{perm.}{{\texttt{mean}}}\left(\H(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray} \end{mydef} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard $FFNN$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\mathbb{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\H$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} In this paper, $\mathbb{A}^{L-1}$ corresponds to the output of the last hidden layer of our $FFNN$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\mathbb{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). To this end, we leverage several generalization schemes. First, label permutation is used to produce a control set $(\textbf{X},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second, Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of bias leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{Commentaires loss: Ca marche pour T=0 and on rajoute du bruit sur les labels. Repetition des donnees.\\ Third, we repeat the observations\\ Forth we add random gaussian noize } \section{ Loss function for the general setting of $\kappa$ targets} \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define ${\textbf{Perm}}(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $${\textbf{Perm}}(\textbf{Y}) = (Y_{{\textbf{Perm}}(1)},\ldots,Y_{{\textbf{Perm}}(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\H(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| {\textbf{Perm}}^t(\textbf{Y})-\H(\theta)\,{\textbf{Perm}}^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\H}=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-{\texttt{FFNN}}, the {\texttt{FFNN}} trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-{\texttt{FFNN}} applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \subsection{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define ${\textbf{Perm}}^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad{\textbf{Perm}}^t(\mathbb{Y})=({\textbf{Perm}}^{t,1}(\mathbb{Y}_1),\ldots,{\textbf{Perm}}^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $${\textbf{Perm}}(\mathbb{Y})=({\textbf{Perm}}^{1}(\mathbb{Y}),\ldots,{\textbf{Perm}}^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\H(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| {\textbf{Perm}}^{t,k}(\mathbb{Y}_k)-\H(\theta)\,{\textbf{Perm}}^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\H(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[{\textbf{Perm}}(\mathbb{Y})-\H(\theta)\,\underset{obs.}{\odot}{\textbf{Perm}}( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\H}=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-{\texttt{FFNN}}, the {\texttt{FFNN}} trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{\mathbb{W}}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-{\texttt{FFNN}} appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \paragraph{Parameter initialization} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \end{mdframed} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = argmax_{\lambda \in \mathbb{R}_+^*} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid $\left\lbrace \lambda_l = 10^{6 \times l / 40}\;: \; l = 1, \cdots, 40 \right\rbrace$ and \begin{equation}\label{eq:laminit} \lambda = argmax_{\lambda_{l}} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda_{l+1}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda_{l}). \end{equation} \noindent \\ $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{Set }\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{Set }\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{WHILE } e < max-iter \textbf{ DO:}\\ \quad \left| \begin{array}{llllll} \mathbb{A}^{0}-> \mathbb{X}\\ \textbf{FOR } l = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \mathbb{A}^{l} -> {\texttt{ReLU}}(\mathbb{A}^{l-1}\mathbb{W}^{l} +\mathbb{B}^{l})\\ \end{array} \right.\\ \H(\boldsymbol{\theta},\lambda) -> \mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\mathbb{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \H(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \H(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ $$ Y_{\epsilon} $$ detail backpropagate. \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \subsubsection{Pre-processing} \fbox{Functions} $ \begin{array}{l} \textbf{function C}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{max}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{mode}Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function R}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} \textbf{if}\,\, Z_i==\text{NAN} \\ \qquad\text{remove}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \fbox{Features pre-processing} \noindent\\ $ \begin{array}{l} \textbf{for}\,\, j=1:p\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \#\text{set}(X_j)=1\\ \qquad\text{remove}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)=2\\ \qquad\text{function C}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)\leq2\\ \qquad\text{function M}(X_j)\\ \textbf{else}\\ \quad \left| \begin{array}{l} \textbf{if}\,\, \text{type}(X_j)==\text{float}\\ \qquad\text{function R}(X_j)\\ \textbf{else} \\ \qquad\text{remove}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ $\left| \begin{array}{l} \end{array} \right.$ \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} \newpage \section{Related Work} \newpage \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\theta},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where $\ensuremath{\mathbb{I}}$ denote the identity matrix In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is sucht that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n<J$) and the large enough data setting ($n\geq J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n\geq J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\geq J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n<J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a centered gaussian noise $\boldsymbol{\epsilon}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n<J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n\geq J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n< J$ setting. \end{mydef} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). To this end, we leverage several generalization schemes. First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Preprocessing} \fbox{Functions} $ \begin{array}{l} \textbf{function C}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{max}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{mode}Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function R}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} \textbf{if}\,\, Z_i==\text{NAN} \\ \qquad\text{remove}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \fbox{Features pre-processing} \noindent\\ $ \begin{array}{l} \textbf{for}\,\, j=1:p\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \#\text{set}(X_j)=1\\ \qquad\text{remove}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)=2\\ \qquad\text{function C}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)\leq2\\ \qquad\text{function M}(X_j)\\ \textbf{else}\\ \quad \left| \begin{array}{l} \textbf{if}\,\, \text{type}(X_j)==\text{float}\\ \qquad\text{function R}(X_j)\\ \textbf{else} \\ \qquad\text{remove}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ $\left| \begin{array}{l} \end{array} \right.$ \newpage \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}} intialisation} \subsubsection{Xavier initialisation for $\theta$} \medskip \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^k = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^k\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{k+1}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{k})\right). \end{equation} \noindent \\ \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{Set }\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{Set }\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{WHILE } e < max_{iter} \textbf{ DO:}\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{FOR } \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \subsubsection{Pre-processing} \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the past decade, we have witnessed the impressive performance of deep learning in the fields of computer vision \cite{}, audio \cite{} and natural language processing \cite{}. But it is still widely believed that deep learning is irrelevant for tabular data. \textcolor{red}{It may seem strange at first considering that tabular data are "less complex" than image or textual data.} This may be due to the fact that there is no clearly identified best practice \textcolor{red}{architecture} to tackle tabular data with deep learning. While the needs to handle tabular data arise in many fields (e.g. material science \cite{}, medecine \cite{}, finance \cite{}), deep learning for tabular data remains understudied and underused. \sout{It is commonly accepted that standard ML Methods (SVM,RF,XGB,...) are better suited for tabular data and usually outperform DL both in generalization performance and execution time \cite{Delgado14a}.} \textcolor{red}{Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. \sout{It may seem strange at first considering that tabular data are "less complex" than image or textual data.}} \sout{Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning. By contrast, DL methods usually require extensive tuning, expertise and time to train. It may seem strange at first considering that tabular data are "less complex" than image or textual data. } Another limitation of DL that held back its use on tabular data is the handling of categorical data. Recent encoding techniques, $e.g$ entity embeddings \cite{Guo2016}, have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in deep learning. However, ensemble methods are still considered the best option to handle categorical data \cite{catboost}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their \textcolor{red}{extensive} \sout{intensive} use in Kaggle competitions? One of the greatest strengths of DL lies in its ability to perform automatic features engineering. Moreover, end-to-end training with gradient descent is a key factor in the success of DL. It even offers the possibility to use DL models in online settings (\cite{ZhangDu2016cat},...). Interpretability and fear of the "black box" remain obstacles to the wider use of DL. Attention-mechanism based neural network architecture have been developed to address this interpretability issue (\cite{NLP,BErt,Tabnet}). Recently Google developed TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a few datasets up to a dataset dependent fine-tuning of the hyperparameters. The growing number of articles in recent years on tabular data \sout{on these issues} shows the increasing interest of the DL community in this topic. These articles mainly deal with the classification problem rather than regression. Several of them \sout{existing works} proposed to translate/adapt the original idea behind decision trees into neural networks ([mettre ici tous les papiers qui font ça]). Among the most recent propositions, NODE \cite{} can be considered as the DL counterpart of CatBoost, thus benefiting from both end-to-end gradient-based optimization and other DL advantages \textcolor{red}{(?what?)}. For tabular data in the large sample regime ($n\geq???$), DL methods have made a major breakthrough as it may now outperform ensemble methods on some large dataset (AirBnB []). But success stories are still limited on small to medium size data sets where ensemble methods are still preferred. In many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences but the norm since collecting samples and assembling large data set may be costly. The deep learning community has developed successful solutions to handle the small data regime in computer vision tasks \cite{?,?,?}. However there is no fully satisfying DNN solution for small size tabular data where ensemble methods (XGB, GBD) remain the gold standard \cite{?,?,?,?}. SNN: \cite{Klambauer2017} The most common criticisms against deep learning are the high level of expertise required to design architecture and tune hyperparameters as well as the high cost of training. Existing solutions \cite{?,?,?} proposed complex hybrid architectures. Some of these solutions often involve a lot of ad-hoc steps during the training phase \cite{tabnet}. The performance of these methods were not evaluated on very small data sets ($n\lesssim 500$). To the best of our knowledge, there is no "\textit{pure}" deep learning solution for tabular data, that has been proven to perform better in average \sout{in mean} than standard ML Methods \textcolor{red}{both in the small and large sample regimes.} We propose a "\textit{pure}" deep learning solution that outperforms the gold standard (GBFT, XGB, RF) in average in the regression setting \sout{over ?30? datasets taken from} \textcolor{red}{on the UCI database and several recent Kaggle data sets}. The main contributions of our paper are: \begin{itemize} \item We propose a new end-to-end method to train a standard FFNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach relies on the use of the new \texttt{\,MLR $\,$} loss function introduced in \cite{MLR} which is differentiable with generalizing ability. \item In our empirical experiments, this method outperformed ensemble methods in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD Deep neural networks (DNN) have become extremely popular over the last decade for their impressive \sout{\textcolor{red}{state-of-the-art}} \sout{unmatched generalization} performance on several learning tasks: computer vision [1], natural language processing, speech recognition [2], reinforcement learning \cite{Goodfellow-et-al-2016}. However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. Also tabular data are usually of much smaller size than in computer vision. For these reasons, DNN trained by conventional methods under-perform traditional machine learning methods. For example, Kaggle ML competitions on tabular data are mostly won by ensemble methods (RF,GBDT,XGB,...) \cite{(Friedman, 2001; Harasymiv, 2015;Chen & Guestrin, 2016; Ke et al., 2017;Prokhorenkova et al., 2018)}, kernel methods, ?MARS,...? . The small data regime has been extensively studied by the deep learning community for computer vision tasks \cite{???}. This is not yet the case for tabular data although the need arises in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}. Developing deep learning solutions for tabular data is of interest to the Machine Learning community \cite{(Zhou & Feng, 2017; Yang et al.,2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018)}. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. \cite{Friedman2001,Prokhorenkova2018,guestrin2016,Ke2017} \cite{ke2019tabnn,} Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage \section{Related Work} \newpage \newpage \section{Experiments} We only considered the ?80? regression data sets in the UCI database. We noted for instance that the ??? data set has been split into 28 sub-datasets according to the city categorical feature, thus artificially increasing the number of regression problems. We eliminated these repetitions and consider only one dataset containing all modalities of the city feature. We eliminated similar repetitions for ?,?,?,? and ended up with ?30? genuinely different regression problems. We also added ?7? regression data sets used in Kaggle competitions. Table \ref{} in the Appendix summarizes all the considered regression data sets. Overall the number of samples ranges $?$ to $?$ and the number of features from $?$ to $?$. \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that DL is irrelevant for tabular data \cite{?}\href{https://www.youtube.com/watch?v=754vWvIimPo&t=2040s}{youtube}. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods\footnote{\href{https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html}{sklearn/RandomForestRegressor}} are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even undesirable by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{?}. This is due to the lack of transferable domain knowledge between tabular features. To make up for this limitation, an important line of work focuses on pre-processing of categorical features for DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is \sout{nonetheless} desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end via gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end to end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard FFNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE marginally outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual ${\texttt{MSE}}$ and $\texttt{CE}$ losses used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \begin{table*}[!hp] \footnotesize \centering \begin{tabular}{|c|cc|cc|c|} \hline Method & end to end differentiable & hyperparameter tuning & Task & dataset size range & Above GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15k$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & easy & Reg/Classif &$400k$ - $10.5M$ & Marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $10k-\textcolor{red}{1M}$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy &\Clf & 150 - 1M & No?\\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640 - 60k & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & 1k - 130k & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& 10k - 200k & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & 2.5k & No \\ \hline \textbf{MLR} & \checkmark & easy & Reg/Classif &$72$ - $55M$ & Significantly\\ \hline \end{tabular} \caption{ State of the Art: Deep Learning for supervised tasks on tabular data. \label{tab:SotA} } \end{table*} \paragraph{Contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBDT, XGB, RF) in regression tasks on the UCI database and several recent Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new DNN architecture for tabular data but we rather propose a new method to train a standard FFNN. More specifically: - We propose a new end-to-end method to train a standard FFNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach lay mostly in the use of the new \textbf{Muddling labels for Regularization} loss (\texttt{\,MLR $\,$}) that we introduced in \cite{MLR} for linear regression tasks. The powerful generalization ability of the \texttt{\,MLR $\,$} loss is the main reason for the success of our approach. The ablation study in Table \ref{} confirms that the MLR loss results in an overall performance improvement of ????\% on our benchmark. - In our experiments, this method outperformed ensemble methods by ?\% on our aggregated benchmark (UCI+ Kaggle) with dataset size ranging from $n=72$ to $n=43k$ with a focus on very small size datasets. Indeed, we have $16$ datasets with less than $1000$ training samples including $10$ datasets with less than $n<300$ training samples. - Wide architectures provide convergence guarantees of the gradient descent scheme \cite{pmlr-v97-du19a}, but are also more prone to overfitting. The generalizing ability of $\texttt{\,MLR $\,$}$ loss enables us to get all the advantages of wide architectures without the inconveniences. Since there is no longer any tradeoff when choosing the number of neurons per layer, the only limitation is the physical memory capability of GPUs, as wider is better. - We did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. - Our solution can be used as an off-the-shelve method for training a FFNN on any tabular dataset in any field. In that regard, it is an easy and accessible DL solution to researchers and practitioners. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} We consider the regression task. Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ and $Y_i\in \mathbb{R}$. Our model $f(\boldsymbol{\theta},\cdot)$ is a simple Feed-Forward Neural Network ({\texttt{FFNN}}) with $L-1$ \textcolor{red}{hidden} layers of equal size $J$ (hidden units). \textcolor{red}{C'est $L$ ou $L-1$ couches cachees? } to provide a function $f(\boldsymbol{\theta},\cdot)$ and to learn the value of the parameters $\boldsymbol{\theta}$ that result in the best function approximation. We consider {\texttt{FFNN}} with different size $L\in\{1,\,2,\,3,\,4\}$ of hidden Layers where each layer has $J$ hidden nodes. For an observation $\textbf{x}_i\in\mathbb{R}^d$, we set $A^0=\textbf{x}_i$ and for all $\ell=1,\cdots,L-2$ $$A^{\ell+1}=f_{\ell+1}(A^{\ell}):={\texttt{ReLU}}(W^{\ell+1}A^{\ell} +b^{\ell+1})\quad \text{and}\quad A^L=f_{L-1}(A^{L-1}):=W^LA^{L-1} $$ with $W^1\in\mathbb{R}^{J\times d}$, $W^L\in\mathbb{R}^{J\times 1}$ and $W^{\ell+1}\in\mathbb{R}^{J\times J}$. First note all the hidden layers have same number of neurons $J$. Second we do not take bias in the last layer ($b^L=\boldsymbol{0}$). Set $\boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}$, the ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ is such that for $n$ observations $\textbf{x}\in\mathbb{R}^{n\times d}$ $$\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})= f_{L-1}\circ f_{L-2}\circ\cdots\circ f_2 \circ f_1(\textbf{x})\in\mathbb{R}^{n\times J}. $$ We train this ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ using only the $train$-set $\mathcal{D}_{train}$ with the objective to build a model $\textbf{f}(\boldsymbol{\widehat{\theta}},\cdot)$ which minimizes the generalization error on the test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$: $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{ Muddling Label Regularization ($\texttt{\,MLR $\,$}$) loss} \textcolor{red}{Pourquoi ne pas reorgniser la section en Step 1 a Step 3 + definition du NN-MLR. Puis une discussion sur les 3 etapes. Ou alors une discussion au depart qui enonce les 3 ingredients de regularization: permutations, ridge, dithering.} We detail now the construction of the $\texttt{\,MLR $\,$}$ loss \sout{based on permutations} and the appropriate way to train a FFNN with it. \textcolor{red}{ There are 2 essential ingredients in the construction of the $\texttt{\,MLR $\,$}$ loss for FFNN which promote its regularization ability: Ridge regularization and permutations \sout{dithering}.} In order to better understand the intuition behind the $\texttt{\,MLR $\,$}$ loss, we will introduce \textcolor{red}{these ingredients} \sout{it} step by step until we obtain its final form in Definition \ref{MLRlossBigsetting}. \paragraph{Step 1: Permutations.} \textcolor{red}{The core of the $\texttt{\,MLR $\,$}$ loss is the use of permutations . For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \textcolor{red}{Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$.} This operation can be seen as a form of data-augmentation on the labels. The first version of the \texttt{\,MLR $\,$}-loss is $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is \textcolor{red}{required . \paragraph{The regularization effect of random permutations.} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ is \textbf{not an hyperparameter}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}). This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was first introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not to train with the \texttt{MLR} loss.} Applying $\texttt{\,MLR $\,$}$ to ${\texttt{FFNN}}$ is far from trivial. A natural strategy would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of $\texttt{\,MLR $\,$}$ looks like that: \textcolor{red}{Il faut verifier la formule ci-dessous. Je ne comprends pas le deuxieme terme.} $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\widehat{\bm\theta}_{\pi^t}(\lambda);\pi^t(\ensuremath{\mathcal{D}}_{train})) $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{\pi^t}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi^t(\mathcal{D}_{train})) $. This naive approach requires solving a bi-level optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ loss should rather be used to train the model and tune simultaneously the regularization parameters}. \paragraph{Step 2: Ridge regularization.} We define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{x},\textbf{Y})$. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where $\textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matrix with dimensionality implied by context. In addition, $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our model $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$, we apply Ridge regularization to the last hidden layer $\textbf{A}^{L-1}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train}):=\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} Therefore, the updated version of the \texttt{\,MLR $\,$}-loss becomes \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2. \end{align*} \paragraph{The effect of Ridge regularization.} From a computational perspective, the extra cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (\textcolor{red}{l'argument complexité papier 1}) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign. Recall that $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \paragraph{Step 3: dither.} We do not apply the \texttt{\,MLR $\,$}-loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$. Set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$, where $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We also apply noise on the permuted labels. For all $t=1,\cdots,T$, set $\pi_{\xi}^t(\textbf{Y})=\pi^t(\textbf{Y})+\xi^{t}$, where $\xi^{t}\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We underline that $\sigma$ is \textbf{not an hyperparameter} as we use the same value $\sigma=0.03$ for all the data sets in our benchmark. We can now give the final version of the $\texttt{\,MLR $\,$}$ loss. \begin{mydef}[\texttt{\,MLR $\,$}-Loss] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2. \end{align*} \end{mydef} \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \textcolor{red}{- comment} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y}, $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is given in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Implementation} \subsection{Implementation} \subsubsection{Algorithms} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{x}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \textcolor{red}{Probablement déplacer ce paragraphe dans une section précédente où on parle des hyper paramètres. Du coup en modifiant la première phrase et en faisant un spoiler sur le résultat des expériences. Du style : We also discovered in our numerical experiments how aggregating ... } This last empirical observation leads to the discovery of another very interesting property of $\texttt{\,MLR $\,$}$ neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$} eliminates the need to choose a specific width\ref{}, can automatically adapt the choice of the initial regularization parameter\ref{} to the dataset at hand and requires no tuning for the number of permutations and the level of noise applied on the target\ref{}. Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be pick by following a straightforward heuristic (see section \ref{}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weekly correlated with the size of the considered dataset, it remains an impactful decision\footnote{As our dataset by dataset results \ref{} clearly shows}. And yet, we just found that this difficulty can mostly be alleviated by simply aggregating architectures of different depths. \textcolor{red}{Sinon ça rend la section un peu longue.} \paragraph{Description and preprocessing.} To produce this benchmark we aggregated $Value$ tabular regression datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle\cite{}. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence, we went back to the exhaustive list of $Value$ available datasets tagged as regression in the UCI repository. We manually curated each dataset with a methodology fully described in the appendix (e.g. we did not select empty or duplicate datasets, times series, missing target, non i.i.d. samples, text format, etc). After screening the exhaustive list of $Value$ available datasets tagged as regression in the UCI repository we were left with $Value$. We $Value$ other datasets by repeating the process on Kaggle\cite{} for datasets with tag "regression" and format ".csv",".xls". We designed a methodology (available in the appendix) to curate the UCI archive (e.g. we did not select empty or duplicate datasets, times series, missing target, non i.i.d. samples, text format, etc). After screening the exhaustive list of $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the process on Kaggle \cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". We curated the UCI archive through a set of rules (detailed in the appendix), e.g. we did not select empty or duplicate datasets, times series, missing target, non i.i.d. samples, text format, etc... After screening the exhaustive list of $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the same process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". See Table \ref{} in the Appendix shows the list of violated rules for each available dataset. shows for each in the Appendix for the exhaustive list of available datasets with the detailed list of checked and violated rules. Table \ref{} shows for each available dataset which criteria were not met. Contrarily to Classification, the number of datasets that are actually well suited for tabular regression with iid samples is quite small. We provide in the Appendix both the comprehensive set of rules we designed to pick the $Value$ datasets we were left with after screening and the justification for each discarded dataset. the entire repository and the reason for each discarded dataset. the list of requirements that were not met. The criteria designed to include a dataset and the we curated the list, removed some redundancies and added others. See Appendix for a detailed discussion of the statistical justifications for removing/modifying The benchmark includes the regression datasets from the UCI Machine Learning repository \cite{Delgado14a}. We also added ?7? regression datasets used in Kaggle competitions. The size of the datasets in our benchmark ranges from $?$ to $?$ data points and the number of features from $?$ to $?$. \textcolor{red}{We address below the mistakes highlighted by \citep{bib:Wainberg2016} in the methodology of \cite{Delgado14a}}. We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} would be \textcolor{red}{over-represented} \sout{given far more weight than the other data sets} in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. We ended up with 21 genuinely different regression datasets. Table \ref{} in the Appendix summarizes all the considered regression datasets. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. \paragraph{Methods compared.}\textcolor{red}{Choix hyper-paramètres MLR} This last empirical observation leads to the discovery of another very interesting property of $\texttt{\,MLR $\,$}$ neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$} eliminates the need to choose a specific width\ref{}, can automatically adapt the choice of the initial regularization parameter\ref{} to the dataset at hand and requires no tuning for the number of permutations and the level of noise applied on the target\ref{}. Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be pick by following a straightforward heuristic (see section \ref{}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weekly correlated with the size of the considered dataset, it remains an impactful decision\footnote{As our dataset by dataset results \ref{} clearly shows}. And yet, we just found that this difficulty can mostly be alleviated by simply aggregating architectures of different depths. \textcolor{red}{Sinon ça rend la section un peu longue.} We use ??? methods with their best possible tuned hyperparameters including NN and the gold standard for tabular data (RF, XGB, ...). See Table ? in the appendix for the exhaustive list of methods and tuning methods. For each method in the benchmark, we use the validation set to perform 5-fold cv on the best designed grid to tune hyperparameters. \textcolor{red}{We did not compare using kernel methods such as Nystr\"om as they can be used as feature engineering for all the methods in our comparison study.} \begin{table*}[!hp] \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline Bagging MLR & \textbf{?} & \\ \hline RF & \textbf{?} & \\ \hline XGB & \textbf{?} & \\ \hline XRF & \textbf{?} & \\ \hline MLP & \textbf{?} & \\ \hline NN-1 & \textbf{?} & \\ \hline NN-2 & \textbf{?} & \\ \hline NN-3 & \textbf{?} & \\ \hline Kernels & \textbf{?} & \\ \hline MARS & \textbf{?} & \\ \hline CART & \textbf{?} & \\ \hline $\nu$-SVM & \textbf{?} & \\ \hline Ridge & \textbf{?} & \\ \hline LASSO & \textbf{?} & \\ \hline Elastic Net & \textbf{?} & \\ \hline Intercept & \textbf{?} & \\ \hline \end{tabular} \caption{ List of methods with their tuning grid \label{tab:method} } \end{table*} \paragraph{Overall Performance comparisons} \textcolor{red}{RANDOM Forests : pluriel partout : they, their, them... } \textcolor{red}{Mettre mean plutôt que average pquand on parle de la performance en moyenne parce que average ça fait aussi pensé à moyen au sens pas terrible.} \textbf{The $\texttt{\,MLR $\,$}$ method clearly outperforms all the compared methods}, with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. $\texttt{\,MLR $\,$}$ produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), $\texttt{\,MLR $\,$}$ actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method, R.F. \footnote{as expected from \cite{fernandez2014we}} comes three points behind the best \texttt{\,MLR $\,$} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind $\texttt{\,MLR $\,$}$, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat $\texttt{\,MLR $\,$}$ on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat $\texttt{\,MLR $\,$}$, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by $\texttt{\,MLR $\,$}$, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where $\texttt{\,MLR $\,$}$ is not in the top three.} In agreement with \cite{fernandez2014we}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average R2 to best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating $\texttt{\,MLR $\,$}$ neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. \paragraph{Discussion.} \textcolor{red}{Our method is scalable and the computational complexity is independent/sub-linear in the sample size?????} Our experiments on very large datasets $n\approx 55M$ gives..... Il faut faire cette Table \ref{tab:perf_rank} pour les performances avec MLR: \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \label{tab:perf_rank} \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. } \label{tab:stat_test} \end{table*} \paragraph{Ablation studies} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Noise on last layer & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline NN+Ridge + MLR + Noise on last layer + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \caption{ Ablation studies on our benchmark. \label{tab:ablation1} } \end{table*} \newpage \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN-MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging NN-MLR & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation2} } \end{table*} \paragraph{Friedman Ranking and Average Accuracy.} NTK is the best (Friedman Rank 28.34, Average Accuracy 81.95\%), followed by RF (Friedman Rank 33.51, Average Accuracy 81.56\%) and then followed by SVM with Gaussian kernel (Friedman Rank 35.76, Average Accuracy 81.03\%). The difference between NTK and RF is significant (-5.17 in Friedman Rank and +0.39\% in Average Accuracy), just as the superiority of RF is significant compared to other classifiers as claimed in \cite{fernandez2014we}. NN (with either He initialization or NTK initialization) performs significantly better than the polynomial kernel in terms of the Average Accuracy (80.88\% and 81.02\% vs. 78.21\%), but in terms of Friedman Rank, NN with He initialization is worse than polynomial kernel (40.97 vs. 38.44) and NN with NTK initialization is slightly better than polynomial kernel (38.06 vs. 38.44). On many datasets where most classifiers have similar performances, NN's rank is high as well, whereas on other datasets, NN is significantly better than most classifiers, including SVM with polynomial kernel. Therefore, NN enjoys higher Average Accuracy but suffers higher Friedman Rank. For example, on \textsc{ozone} dataset, NN with NTK initialization is only 0.25\% worse than polynomial kernel but their difference in terms of rank is 56. It is also interesting to see that NN with NTK initialization performs better than NN with He initialization (38.06 vs. 40.97 in Friedman Rank and 81.02\% vs. 80.88\% in Average Accuracy). \paragraph{P90/P95 and PMA.} This measures, for a given classifier, the fraction of datasets on which it achieves more than 90\%/95\% of the maximum accuracy among all classifiers. NTK is one of the best classifiers (ties with Gaussian kernel on P95), which shows NTK can consistently achieve superior classification performance across a broad range of datasets. Lastly, we consider the Percentage of the Maximum Accuracy (PMA). NTK achieves the best average PMA followed by RF whose PMA is 0.47\% below that of NTK and other classifiers are all below 94.6\%. An interesting observation is that NTK, NN with NTK initialization and RF have small standard deviation (5.17\%, 5.89\% and 5.30\%) whereas all other classifiers have much larger standard deviation. \section{Conclusion} All these findings reveal $\texttt{\,MLR $\,$}$ as a remarkably reliable method for tabular datasets, one which consistently produces either \textit{state-of-the-art} or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, $\texttt{\,MLR $\,$}$ can achieve these steady performances without any intensive tuning. \newpage \section{Annexe} \subsection{Discussion of the State of the Art} An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \subsection{Construction of the Benchmark} To produce this benchmark we aggregated $Value$ tabular regression datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle\cite{}. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence, we went back to the exhaustive list of $Value$ available datasets tagged as regression in the UCI repository. We manually curated each dataset with a methodology fully described in the appendix (e.g. we did not select empty or duplicate datasets, times series, missing target, non i.i.d. samples, text format, etc). After screening the exhaustive list of $Value$ available datasets tagged as regression in the UCI repository we were left with $Value$. We $Value$ other datasets by repeating the process on Kaggle\cite{} for datasets with tag "regression" and format ".csv",".xls". We designed a methodology (available in the appendix) to curate the UCI archive (e.g. we did not select empty or duplicate datasets, times series, missing target, non i.i.d. samples, text format, etc). After screening the exhaustive list of $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". \paragraph{UCI data sets.} We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} would be \textcolor{red}{over-represented} \sout{given far more weight than the other data sets} in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN). \label{tab:UCIfull}} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \subsection{Annexe} \begin{itemize} \item - Régimes data size: \item - Pour n = 100,300,600,1000,1500: \item - Les dataset avec n > 1500: (ceux qui marchent) plus gros: on prend n données et on re-teste les méthodes avec ces jeux de données coupées \item - Courbe : région de confiance : plot en relatif par rapport à la meilleure méthode \item - 1 version avec comparaison profondeur de MLR (et peut être pareil pour NN simple \item - 1 version avec le meilleur vs les meilleurs méthodes standards. \end{itemize} \begin{itemize} \item Ablation studies en propre sous forme tableau avec \item Target noise tout le temps \item baseline = NN + couches petites \item Soustraction et rapport MSE (regarder dans les papiers qui comparent les R2 (Klambauer SELU)) \item Colonnes : Méthodes & Moyenne vs baseline & Q25 vs Baseline & Médiane vs baseline & Q75 vs Baseline \item - NN + couches petites - NN + couches larges - NN + couches larges + ridge - MLR \item - NN + Bagging vs NN tout seul - NN + Ensemble vs NN tout seul - MLR + Bagging vs MLR tout seul - MLR + Ensemble vs MLR tout seul \end{itemize} \begin{itemize} \item Temps et performance \item Impact des HP sur MLR \item Courbe En fct de nb permut \item Courbe En fct de nb neurones par couches \item Courbe En fct de lambda init \end{itemize} \section{Plan} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that DL is irrelevant for tabular data \textcolor{red}{\cite{?}\href{https://www.youtube.com/watch?v=754vWvIimPo&t=2040s}{youtube}.} While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods (RandomForestRegressor \cite{scikit-learn}) are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even undesirable by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{?}. This is due to the lack of transferable domain knowledge between tabular features. To make up for this limitation, an important line of work focuses on pre-processing of categorical features for DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The \textcolor{red}{recent \texttt{PyTorch Tabular} project \cite{pytorchtab}} and the growing number of articles on tabular data in recent years show the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State of the Art: Deep Learning for supervised tasks on tabular data.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|c|cc|cc|c|} \hline Method & End to end differentiable & Hyperparameter tuning & Task & Dataset size range & Beat GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15K$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & \textcolor{red}{hard} & Reg/Classif &$400K$ - $10.5M$ & Marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $10K-\textcolor{red}{1M}$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy &\Clf & 150 - 1M & No\\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640 - 60K & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & 1K - 130K & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& 10K - 200K & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & 2.5K & No \\ \hline \textbf{MLR} (this work) & \checkmark & easy & Reg/Classif &$72$ - $55M$ & Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end to end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard {\texttt{FFNN}}{} but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE marginally outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual ${\texttt{MSE}}$ loss used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBDT, XGB, RF) in regression tasks on the UCI database and several recent Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new DNN architecture for tabular data but we rather propose a new method to train a standard {\texttt{FFNN}}{}. More specifically: - We propose a new end-to-end method to train a standard {\texttt{FFNN}}{} using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach lay mostly in the use of the new \textbf{Muddling labels for Regularization} loss (\texttt{\,MLR $\,$}{}) that was introduced in \cite{MLR} for linear regression tasks. The powerful generalization ability of the \texttt{\,MLR $\,$}{} loss is the main reason for the success of our approach. The ablation study in Table \ref{} confirms that the MLR loss results in an overall performance improvement of ????\% on our benchmark. - In our experiments, this method outperformed ensemble methods by ?\% on our aggregated benchmark (UCI+ Kaggle) with dataset size ranging from $n=72$ to \textcolor{red}{$n=43$K} with a focus on very small size datasets. Indeed, our benchmark includes $16$ datasets with less than $1000$ training samples including $10$ datasets with less than $n<300$ training samples. - Wide architectures provide convergence guarantees of the gradient descent scheme \cite{pmlr-v97-du19a}, but are also more prone to overfitting. The generalizing ability of \texttt{\,MLR $\,$}{} loss enables us to get all the advantages of wide architectures without the inconveniences. Since there is no longer any tradeoff when choosing the number of nodes per layer, the only limitation is the physical memory capability of GPUs, as wider is better. \textcolor{red}{Fusionner les 2 dernieres points?} \textcolor{red}{- Our solution can be used as an off-the-shelf \textcolor{green}{fully automatic} method for training a {\texttt{FFNN}}{} on any tabular dataset in any field. Indeed, we did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. Moreover, \texttt{\,MLR $\,$}{} can achieve excellent performances without any intensive tuning. Thus, our method is an easy and accessible DL solution to researchers and practitioners.} - We did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. - Our solution can be used as an off-the-shelf method for training a {\texttt{FFNN}}{} on any tabular dataset in any field as \texttt{\,MLR $\,$}{} can achieve excellent performances without any intensive tuning. In that regard, it is an easy and accessible DL solution to researchers and practitioners. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \subsection{Matrix form notations} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ and $Y_i \in \mathbb{R}$. We consider the regression task. Our goal is to recover $f^*$ where $Y_i = f^*(\textbf{x}_i) + noise$. Our model $f(\boldsymbol{\theta},\cdot)$ is a simple Feed-Forward Neural Networks ({\texttt{FFNN}}{}) with $L$ layers, $J$ hidden nodes on each hidden layer and the ReLu activation function between each hidden layer. For an observation $\textbf{x}_i\in\mathbb{R}^d$, we set $A^0=\textbf{x}_i$, $W^1\in\mathbb{R}^{J\times d}$ and \begin{eqnarray} \label{FFNN} A^{\ell+1}=f_{\ell+1}(A^{\ell})&:=&{\texttt{ReLU}}(W^{\ell+1}A^{\ell} +b^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell=1,\cdots,L-2\nonumber\\ A^L=f_{L}(A^{L-1})&:=&W^LA^{L-1},\quad W^L\in\mathbb{R}^{1\times J} \end{eqnarray} Note that there is no bias in the last layer ($b^L=\boldsymbol{0}$). Set $\boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}$. The last hidden layer of our ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ is such that for $n$ observations $\textbf{x}\in\mathbb{R}^{n\times d}$ \begin{align} \label{ALmoinsUn} \textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x}):= f_{L-1}\circ f_{L-2}\circ\cdots\circ f_2 \circ f_1(\textbf{x})\in\mathbb{R}^{n\times J}. \end{align} We train this ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ on the $train$-set $\mathcal{D}_{train}$ with the objective to build a model $\textbf{f}(\boldsymbol{\widehat{\theta}},\cdot)$ which minimizes the generalization error on the test set $\mathcal{D}_{test}=(\textbf{u},\textbf{Z})=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$: $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) =\left\|f(\boldsymbol{\widehat{\theta}},\textbf{u}) - \textbf{Z} \right\|_m^2= \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ \subsection{Loss: Muddling Label Regularization (\texttt{\,MLR $\,$}{})} The 2 essential ingredients in the construction of the \texttt{\,MLR $\,$}{} loss are the Ridge regularization and the random permutations as they promote the generalization ability of the trained {\texttt{FFNN}}{}. First, we define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{x},\textbf{Y})$. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matrix with dimensionality implied by context. In addition, $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our model $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$, we apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train}):=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}. \end{eqnarray} The core of the \texttt{\,MLR $\,$}{} loss is the use of \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} loss] \label{MLRlossBigsetting} For ${\textbf{Perm}}(\textbf{Y})=(\pi^t(\textbf{Y}))_{t=1}^T$, $T$ independently drawn permutations of the label vector $\textbf{Y}$, we define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n \textcolor{red}{+}\left|\| \textbf{Y}\|_n-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n\right|. \end{align*} \end{mydef} Taking the {\texttt{RMSE}} instead of the {\texttt{MSE}} slightly improves the generalization performances. The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}} while the second term is based on the {\texttt{RMSE}} applied to the permuted labels. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in three ways: $(i)$ The weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}). $(ii)$ The close form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. $(iii)$ This close form is computed by performing inversion on the covariance matrix of $\textbf{A}^{L-1}$. As such, it does not attempt to fit each target sample $Y_i$ individually but instead create embeddings that would work well for the entire batch $\textbf{Y}$ when using the ridge estimator. With a standard NN, the weights are optimized to fit all the samples in parallel. As a by-product, the last hidden layer can possibly be used as embeddings for another task or another model. By contrast, our model direct goal is to perform feature engineering as it focuses on the features of the embedding matrix rather than the individual samples. In that sense, our approach fully embraces the interpretation of neural networks (NN) as automated differentiable feature engineering. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. \\ Indeed, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. Thus, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \subsection{Model: \textbf{NN}\, and training protocol} \begin{table}[htb] \centering \hfill \begin{tabular}{|c|c|c|c|c|} \hline $T$ & $J$ & $\sigma$& $b_s$&{\texttt{FixB}}\\ \hline 16 & $2^{12}$ & 0.03&$\min(n,J)$&5 min\\ \hline \end{tabular} \hfill \begin{tabular}{|c|c|c|c|c|} \hline &$L=1$& $L=2$& $L=3$ & $L=4$ \\ \hline $\max_{iter}$&50&100&200&400 \\ \hline ${\texttt{$\ell_r$}}$&$10^{-2}$&$10^{-3}$&$10^{-3}$&$10^{-4}$\\ \hline \end{tabular} \hfill\null \caption{Parameters of our method.} \label{tab:hyp1} \end{table} \paragraph{Model \textbf{NN}.} In our approach, the number of permutations is fixed ($T=16$). We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and constant width $J$ on the hidden layers. In our experiments, we always take $J$ as large as physically possible (our machine with 11GVRAM allowed for $J=2^{12}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialisation of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal} (See Appendix for more details). \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,$\cdots$. However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural network on a gradient path that will lead to a good solution once the learning is completed, not before. To initialize $\lambda$, we do not attempt to minimize the \texttt{\,MLR $\,$}{} loss. We rather want to start in a region where the regularization problem is \textit{interesting}. That is when we maximized the variations of \texttt{\,MLR $\,$}{} with respect to $\lambda$. In practice, we use the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{6 \times k / 40}\;: \; k = 0, \cdots, 39 \right\rbrace$ and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\,\text{where}\,\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} \textcolor{red}{From a computational point of view, this step has a negligible cost because it corresponds to a simple evaluation of the loss at the 40 points of the grid. ?} \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice (\cite{reference}). \textcolor{red}{petite phrase on noise in the target.} Set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$, where $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We also apply noise on the permuted labels : for all $t=1,\cdots,T$, set $\pi_{\xi}^t(\textbf{Y})=\pi^t(\textbf{Y})+\xi^{t}$, where $\xi^{t}\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $(\textbf{Y}_{\epsilon},({\textbf{Perm}}_{\xi}(\textbf{Y}))$ instead of $(\textbf{Y},({\textbf{Perm}}(\textbf{Y})))$. Here again, $\sigma$ is \textbf{not an hyperparameter} as we use the same value $\sigma=0.03$ (see Table~\ref{tab:hyp1}) for all the data sets in our benchmark. \paragraph{Training protocol.} To train our {\texttt{FFNN}}{}, we use the Adam algorithm with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$) and with a fixed batch size $b_s$ (see Table~\ref{tab:hyp1}). We also fix the budget ({\texttt{FixB}} = 5 min), the maximum number of iterations $\max_{iter}$ (depending on the value of $L$) and we select a $validation$-set of size $n_{val}=\min(20\%\, n,2^{10})$. \\ - We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, i.e. the minimum between $n_ {iter}$ and the actual number of iterations during the allotted time {\texttt{FixB}}.\\ - Then, we read the $R^2$-score for each iteration on the $validation$-set and denote by ${\texttt{Iter}}^*$ the iteration with the best $R^2$-score : ${\texttt{Iter}}^*:=\arg\max\{R^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$.\\ - Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \paragraph{Our final models.} We propose several models based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss:\\ $\bullet$ {\texttt{Ens-MLR}} : a bagging of 30 {\texttt{FFNN}}{} (15 {\texttt{FFNN}}{} of depth $L$ for each $L\in \{1,2\}$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 30 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$). For the methods based on bagging, the final prediction is the mean of each \textbf{NN} prediction. \textcolor{red}{Our method only applies a basic preprocessing on the data (See Section \ref{Sec:exp} below) and does not require any tuning expertise. Thus it can be used as a fully automatic training method which already outperforms the state of the Art in our benchmark. Of course, it is also possible for an expert practitioner to further increase the performance of our method by making data dependent choices for the parameters. The budget ({\texttt{FixB}}=5min) is already sufficient to witness generalization even on large datasets. We discuss in detail the impact of each parameter of our method in the ablation study in the Appendix (Section 3). } \textcolor{red}{Citation bagging.} \section{Experiments}\label{Sec:exp} \paragraph{Benchmark description.} To produce this benchmark we aggregated $Value$ tabular regression datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle \cite{}. See Table \ref{} in the appendix for the exhaustive list. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence we started anew and curated the UCI repository through a set of rules detailed in the appendix (e.g. discard empty or \textbf{duplicate} datasets, times series, missing target, non i.i.d. samples, text format, etc.). After an exhaustive screening of the $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the same process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". See Table \ref{} in the Appendix for the list of violated rules for each available dataset. Contrarily to classification, there are not that many publicly available well-known datasets which are actually well suited for a tabular regression benchmark. \paragraph{Preprocessing.} \textcolor{red}{Preciser les functions utilisees pour chaque preprocessing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little pre-processing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. \sout{and} \textcolor{red}{categorical features with more than $Value$ modalities are considered as numerics if compatible} (as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target value. We then imputed all missing values with the mean or the mode for numerical and categorical features respectively. We applied one-hot encoding for categorical values, and standardization for numerical features and target. We used a 80/20 ratio for each $train$/$test$ split of the data, with a different seed and no stratification scheme. We provide both the code to download raw files and apply each steps, and the resulting data matrices. \textcolor{red}{All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments.} \paragraph{Ablation Analysis.} See the Appendix for the complete ablation study on the impact of each component of our method on the generalization performance. Here is a summary of our findings. The dither{} parameter and the number of permutations are not hyperparameters of the method. They were fixed once and for all for consistently good results in all our experiments ($\sigma = 0.03$ and $T=16$). For $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. Moreover, this value is not too large as it preserves GPU parallelization. Consequently, $T=16$ has little to no impact on the runtime of our method. The Ridge parameter is also not an hyperparameter of our method. It is trained alonside the weights of the NN architecture. The initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations (see \ref{}) reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width and the batch size. Interestingly, the impact of the other hyperparameters in our method is sometimes strikingly different from what is usually observed in the general deep learning framework. With our method, wider architecture and bigger batch size is always better. See Figures \ref{} and \ref{}. \textcolor{red}{A COMPLETER!} Table \ref{tab:ablation1} summarizes the impact of each key ingredient on the generalization performance of our method. The main contributor is the \texttt{\,MLR $\,$}{} loss in replacement of the standard ${\texttt{MSE}}$ with an improvement of $\%$. Ridge and bagging also contributed more marginally with about $\%$ improvement each. Table \ref{tab:ablation2} reveals that only bagging standard NN does not beat \textbf{NN} alone. This is another confirmation that the \texttt{\,MLR $\,$}{} loss is the key ingredient in our method. Moreover bagging on top of the \texttt{\,MLR $\,$}{} loss does improve our performance further. \begin{table}[!hp] \caption{Ablation studies on our benchmark.} \label{tab:ablation1} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \end{table} \begin{table}[!hp] \caption{Ablation study on our benchmark.} \label{tab:ablation2} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{\%$\pm$ \%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline \textbf{NN} & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging \textbf{NN} & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table}[!hp] \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score.} \label{tab:perf_rank} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \end{table} \paragraph{Overall Performance comparisons.} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:} in the appendix for the list), with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method R.F. (as expected from \cite{Delgado14a}) comes three points behind the best \texttt{\,MLR $\,$}{} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$}{} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$}{} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind \texttt{\,MLR $\,$}{}, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat \texttt{\,MLR $\,$}{} on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat \texttt{\,MLR $\,$}{}, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by \texttt{\,MLR $\,$}{}, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}{}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}{}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$}{} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where \texttt{\,MLR $\,$}{} is not in the top three.} In agreement with \cite{Delgado14a}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$}{} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$}{} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average $R^2$-score to the best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating \texttt{\,MLR $\,$}{} neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. This last empirical observation leads to the discovery of another very interesting property of \texttt{\,MLR $\,$}{} neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$}{} eliminates the need to choose a specific width \ref{}, can automatically adapt the choice of the initial regularization parameter (\ref{lambdainiti}) to the dataset at hand and requires no tuning for the number of permutations and the dither{} parameter (Table \ref{tab:hyp1}). Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be picked by following a straightforward heuristic (Table \ref{tab:hyp1}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}{}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weakly correlated with the size of the considered dataset, it remains an impactful decision as our dataset by dataset results \ref{} clearly shows. And yet, we just found that this difficulty can mostly be alleviated by a simple aggregation of architectures of different depths. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either \textit{state-of-the-art} or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. \newpage \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that DL is irrelevant for tabular data \textcolor{red}{\cite{?}\href{https://www.youtube.com/watch?v=754vWvIimPo&t=2040s}{youtube}.} While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods (RandomForestRegressor \cite{scikit-learn}) are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even undesirable by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{?}. This is due to the lack of transferable domain knowledge between tabular features. To make up for this limitation, an important line of work focuses on pre-processing of categorical features for DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The \textcolor{red}{recent \texttt{PyTorch Tabular} project \cite{pytorchtab}} and the growing number of articles on tabular data in recent years show the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State of the Art: Deep Learning for supervised tasks on tabular data.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|c|cc|cc|c|} \hline Method & End to end differentiable & Hyperparameter tuning & Task & Dataset size range & Beat GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15K$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & \textcolor{red}{hard} & Reg/Classif &$400K$ - $10.5M$ & Marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $10K-\textcolor{red}{1M}$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy &\Clf & 150 - 1M & No\\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640 - 60K & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & 1K - 130K & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& 10K - 200K & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & 2.5K & No \\ \hline \textbf{MLR} (this work) & \checkmark & easy & Reg/Classif &$72$ - $55M$ & Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end to end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard {\texttt{FFNN}}{} but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE marginally outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual ${\texttt{MSE}}$ loss used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBDT, XGB, RF) in regression tasks on the UCI database and several recent Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new DNN architecture for tabular data but we rather propose a new method to train a standard {\texttt{FFNN}}{}. More specifically: - We propose a new end-to-end method to train a standard {\texttt{FFNN}}{} using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach lay mostly in the use of the new \textbf{Muddling labels for Regularization} loss (\texttt{\,MLR $\,$}{}) that was introduced in \cite{MLR} for linear regression tasks. The powerful generalization ability of the \texttt{\,MLR $\,$}{} loss is the main reason for the success of our approach. The ablation study in Table \ref{} confirms that the MLR loss results in an overall performance improvement of ????\% on our benchmark. - In our experiments, this method outperformed ensemble methods by ?\% on our aggregated benchmark (UCI+ Kaggle) with dataset size ranging from $n=72$ to \textcolor{red}{$n=43$K} with a focus on very small size datasets. Indeed, our benchmark includes $16$ datasets with less than $1000$ training samples including $10$ datasets with less than $n<300$ training samples. - Wide architectures provide convergence guarantees of the gradient descent scheme \cite{pmlr-v97-du19a}, but are also more prone to overfitting. The generalizing ability of \texttt{\,MLR $\,$}{} loss enables us to get all the advantages of wide architectures without the inconveniences. Since there is no longer any tradeoff when choosing the number of nodes per layer, the only limitation is the physical memory capability of GPUs, as wider is better. \textcolor{red}{Fusionner les 2 dernieres points?} \textcolor{red}{- Our solution can be used as an off-the-shelf \textcolor{green}{fully automatic} method for training a {\texttt{FFNN}}{} on any tabular dataset in any field. Indeed, we did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. Moreover, \texttt{\,MLR $\,$}{} can achieve excellent performances without any intensive tuning. Thus, our method is an easy and accessible DL solution to researchers and practitioners.} - We did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. - Our solution can be used as an off-the-shelf method for training a {\texttt{FFNN}}{} on any tabular dataset in any field as \texttt{\,MLR $\,$}{} can achieve excellent performances without any intensive tuning. In that regard, it is an easy and accessible DL solution to researchers and practitioners. \textcolor{red}{ The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API. For the sake of replicability, we also provide the code required to run from scratch all the benchmarks and the ablation study in this paper } - on bat xgb - methode tout terrain data et pb - method compatible avec d'autres pour ameliorer les perf - facile a utiliser - on vous file le code - facile a utiliser - tout terrain - on bat xgb - compatible avec tous les tricks de deep et on n'a pas cherche a optimiser donc ameliorable - on file le benchmark et le code pour le tester ce que vous voulez \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \subsection{Matrix form notations} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider the regression task. Our goal is to recover $f^*$ where $Y_i = f^*(\textbf{x}_i) + noise$. \textcolor{red}{Let us consider \sout{Our model $f(\boldsymbol{\theta},\cdot)$ is } }a simple Feed-Forward Neural Networks ({\texttt{FFNN}}{}) with $L$ layers, $J$ hidden nodes on each hidden layer and the ReLu activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and \begin{eqnarray} \label{FFNN} \textbf{A}^1&=&{\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}\, \nonumber\\ \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1} \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^\ell=(b^\ell)_{1,\cdots,n}\in\mathbb{R}^{n\times J}$ denotes the bias terms. Note that there is no bias in the last layer ($b^L=\boldsymbol{0}$). Set $\boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}$. The last hidden layer of our ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ is such that for $n$ observations $\textbf{x}\in\mathbb{R}^{n\times d}$ \begin{align} \label{ALmoinsUn} \textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})\in\mathbb{R}^{n\times J}. \end{align} \textcolor{red}{Usually the last layer is} \subsection{Loss: Muddling Label Regularization (\texttt{\,MLR $\,$}{})} We train this ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ on the $train$-set $\mathcal{D}_{train}$ with the objective to build a model $\textbf{f}(\boldsymbol{\widehat{\theta}},\cdot)$ which minimizes the generalization error on the test set $\mathcal{D}_{test}=(\textbf{u},\textbf{Z})=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$: $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) =\left\|f(\boldsymbol{\widehat{\theta}},\textbf{u}) - \textbf{Z} \right\|_m^2= \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ The 2 essential ingredients in the construction of the \texttt{\,MLR $\,$}{} loss are the Ridge regularization and the random permutations as they promote the generalization ability of the trained {\texttt{FFNN}}{}. First, we define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{x},\textbf{Y})$. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matrix with dimensionality implied by context. In addition, $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our model $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$, we apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} The core of the \texttt{\,MLR $\,$}{} loss is the use of \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} loss] \label{MLRlossBigsetting} For ${\textbf{Perm}}(\textbf{Y})=(\pi^t(\textbf{Y}))_{t=1}^T$, $T$ independently drawn permutations of the label vector $\textbf{Y}$, we define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}\|_n + \left|\| \textbf{Y}\|_n-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\pi^t(\textbf{Y}))\|_n\right|. \end{align*} \end{mydef} Taking the {\texttt{RMSE}} instead of the {\texttt{MSE}} slightly improves the generalization performances. The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}} while the second term is based on the {\texttt{RMSE}} applied to the permuted labels. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in three ways: $(i)$ The weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}). $(ii)$ The close form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. $(iii)$ This close form is computed by performing inversion on the covariance matrix of $\textbf{A}^{L-1}$. As such, it does not attempt to fit each target sample $Y_i$ individually but instead create embeddings that would work well for the entire batch $\textbf{Y}$ when using the ridge estimator. With a standard NN, the weights are optimized to fit all the samples in parallel. As a by-product, the last hidden layer can possibly be used as embeddings for another task or another model. By contrast, our model direct goal is to perform feature engineering as it focuses on the features of the embedding matrix rather than the individual samples. In that sense, our approach fully embraces the interpretation of neural networks (NN) as automated differentiable feature engineering. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. \\ Indeed, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. Thus, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \subsection{Model: \textbf{NN}\, and training protocol} \paragraph{The \textbf{NN} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as physically possible (our machine with 11GVRAM allowed for $J=2^{12}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. All these choices are motivated in the ablation study in Section \ref{Sec:exp} below. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal} (See Appendix for more details). \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, etc. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{6 \times k / 40}\;: \; k = 0, \cdots, 39 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\,\text{where}\,\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} \textcolor{purple}{ From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $40$ matrix inversions or of the unique forward pass.} \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice (\cite{reference}). \textcolor{red}{petite phrase on noise in the target.} Set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$, where $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We also apply noise on the permuted labels : for all $t=1,\cdots,T$, set $\pi_{\xi}^t(\textbf{Y})=\pi^t(\textbf{Y})+\xi^{t}$, where $\xi^{t}\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $(\textbf{Y}_{\epsilon},({\textbf{Perm}}_{\xi}(\textbf{Y}))$ instead of $(\textbf{Y},({\textbf{Perm}}(\textbf{Y})))$. Here again, $\sigma$ is \textbf{not an hyperparameter} as we use the same value $\sigma=0.03$ (see Table~\ref{tab:hyp1}) for all the data sets in our benchmark. \paragraph{Training protocol.} To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$) and with a fixed batch size $b_s$ (see Table~\ref{tab:hyp1}). We also fix the budget ({\texttt{FixB}} = 5 min), the maximum number of iterations $\max_{iter}$ (depending on the value of $L$) and we select a $validation$-set of size $n_{val}=\min(20\%\, n,2^{10})$. \\ We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, i.e. the minimum between $n_ {iter}$ and the actual number of iterations during the allotted time {\texttt{FixB}}.\\ Then, we read the $R^2$-score for each iteration on the $validation$-set and denote by ${\texttt{Iter}}^*$ the iteration with the best $R^2$-score : ${\texttt{Iter}}^*:=\arg\max\{R^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$.\\ Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table*}[!hp] \footnotesize \centering \begin{tabular}{|c|c |c|c|c |c|c|c|} \hline $L$ & ${\texttt{$\ell_r$}}$ & $\max_{iter}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & $\sigma$ \\ \hline $1$ & $10^{-2}$ & $50$ & $5'$ & $2^{12}$ & $\min(n, J)$ & $16$ & $0.03$ \\ $2$ & $10^{-3}$ & $100$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ $3$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ \hline \end{tabular} \caption{ Selected and benchmarked architectures. \label{tab:architectures1} } \end{table*} \paragraph{Our final models.} We propose several models based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss:\\ $\bullet$ {\texttt{Ens-MLR}} : a bagging of 30 {\texttt{FFNN}}{} (15 {\texttt{FFNN}}{} of depth $L$ for each $L\in \{1,2\}$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 30 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$). For the methods based on bagging, the final prediction is the mean of each \textbf{NN} prediction. \textcolor{red}{Our method only applies a basic preprocessing on the data (See Section \ref{Sec:exp} below) and does not require any tuning expertise. Thus it can be used as a fully automatic training method which already outperforms the state of the Art in our benchmark. Of course, it is also possible for an expert practitioner to further improve the performance of our method by making data dependent choices for the \texttt{\,MLR $\,$}{} parameters. We discuss in detail the impact of each parameter of our method in the ablation study in the Appendix (Section 3).\\ ?????The budget ({\texttt{FixB}}=5min) is already sufficient to witness generalization even on large datasets. } \textcolor{red}{Citation bagging.} \section{Experiments}\label{Sec:exp} \paragraph{Benchmark description.} To produce this benchmark we aggregated $Value$ tabular regression datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle \cite{}. See Table \ref{} in the appendix for the exhaustive list. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence we started anew and curated the UCI repository through a set of rules detailed in the appendix (e.g. discard empty or \textbf{duplicate} datasets, times series, missing target, non i.i.d. samples, text format, etc.). After an exhaustive screening of the $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the same process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". See Table \ref{} in the Appendix for the list of violated rules for each available dataset. Contrarily to classification, there are not that many publicly available well-known datasets which are actually well suited for a tabular regression benchmark. \paragraph{Preprocessing.} \textcolor{red}{Preciser les functions utilisees pour chaque preprocessing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little pre-processing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. \sout{and} \textcolor{red}{categorical features with more than $Value$ modalities are considered as numerics if compatible} (as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target value. We then imputed all missing values with the mean or the mode for numerical and categorical features respectively. We applied one-hot encoding for categorical values, and standardization for numerical features and target. We used a 80/20 ratio for each $train$/$test$ split of the data, with a different seed and no stratification scheme. We provide both the code to download raw files and apply each steps, and the resulting data matrices. \textcolor{red}{All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments.} \paragraph{Ablation Analysis.} See the Appendix for the complete ablation study on the impact of each component of our method on the generalization performance. Here is a summary of our findings. The dither{} parameter and the number of permutations are not hyperparameters of the method. They were fixed once and for all for consistently good results in all our experiments ($\sigma = 0.03$ and $T=16$). For $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. Moreover, this value is not too large as it preserves GPU parallelization. Consequently, $T=16$ has little to no impact on the runtime of our method. The Ridge parameter is also not an hyperparameter of our method. It is trained alonside the weights of the NN architecture. The initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations (see \ref{}) reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width and the batch size. Interestingly, the impact of the other hyperparameters in our method is sometimes strikingly different from what is usually observed in the general deep learning framework. With our method, wider architecture and bigger batch size is always better. See Figures \ref{} and \ref{}. \textcolor{red}{A COMPLETER!} Table \ref{tab:ablation1} summarizes the impact of each key ingredient on the generalization performance of our method. The main contributor is the \texttt{\,MLR $\,$}{} loss in replacement of the standard ${\texttt{MSE}}$ with an improvement of $\%$. Ridge and bagging also contributed more marginally with about $\%$ improvement each. Table \ref{tab:ablation2} reveals that only bagging standard NN does not beat \textbf{NN} alone. This is another confirmation that the \texttt{\,MLR $\,$}{} loss is the key ingredient in our method. Moreover bagging on top of the \texttt{\,MLR $\,$}{} loss does improve our performance further. \begin{table*}[!hp] \footnotesize \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{0.5} \begin{tabular}{|c|c|c |c|c|c |c|c|c|} \hline Name & $L$ & $lr$ & $maxiter$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & $\sigma$ \\ \hline $\texttt{\,MLR $\,$}{}-1 $& $1$ & $10^{-2}$ & $50$ & $5'$ & $4096 = 2^{12}$ & $min(n, 4096)$ & $16$ & $0.03$ \\ $\texttt{\,MLR $\,$}{}-2 $& $2$ & $10^{-3}$ & $100$ & id. & id. & id. & id. & id.\\ $\texttt{\,MLR $\,$}{}-3 $& $3$ & $10^{-3}$ & $200$ & id. & id. & id. & id. & id.\\ $\texttt{\,MLR $\,$}{}-4 $& $4$ & $10^{-4}$ & $400$ & id. & id. & id. & id. & id.\\ \hline \end{tabular} } \caption{ Selected and benchmarked architectures. \label{tab:architectures1} } \end{table*} \begin{table*}[!hp] \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{iter}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & $\sigma$ \\ \hline $\texttt{\,MLR $\,$}{}-1 $& $1$ & $10^{-2}$ & $50$ & $5'$ & $2^{12}$ & $min(n, J)$ & $16$ & $0.03$ \\ $\texttt{\,MLR $\,$}{}-2 $& $2$ & $10^{-3}$ & $100$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ $\texttt{\,MLR $\,$}{}-3 $& $3$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ $\texttt{\,MLR $\,$}{}-4 $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ \hline \end{tabular} \caption{ Selected and benchmarked architectures. \label{tab:architectures1} } \end{table*} \begin{table}[!hp] \caption{Ablation studies on our benchmark.} \label{tab:ablation1} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \end{table} \begin{table}[!hp] \caption{Ablation study on our benchmark.} \label{tab:ablation2} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{\%$\pm$ \%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline \textbf{NN} & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging \textbf{NN} & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table}[!hp] \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score.} \label{tab:perf_rank} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \end{table} \paragraph{Overall Performance comparisons.} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:} in the appendix for the list), with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method R.F. (as expected from \cite{Delgado14a}) comes three points behind the best \texttt{\,MLR $\,$}{} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$}{} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$}{} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind \texttt{\,MLR $\,$}{}, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat \texttt{\,MLR $\,$}{} on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat \texttt{\,MLR $\,$}{}, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by \texttt{\,MLR $\,$}{}, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}{}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}{}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$}{} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where \texttt{\,MLR $\,$}{} is not in the top three.} In agreement with \cite{Delgado14a}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$}{} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$}{} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average $R^2$-score to the best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating \texttt{\,MLR $\,$}{} neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. This last empirical observation leads to the discovery of another very interesting property of \texttt{\,MLR $\,$}{} neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$}{} eliminates the need to choose a specific width \ref{}, can automatically adapt the choice of the initial regularization parameter (\ref{lambdainiti}) to the dataset at hand and requires no tuning for the number of permutations and the dither{} parameter (Table \ref{tab:hyp1}). Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be picked by following a straightforward heuristic (Table \ref{tab:hyp1}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}{}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weakly correlated with the size of the considered dataset, it remains an impactful decision as our dataset by dataset results \ref{} clearly shows. And yet, we just found that this difficulty can mostly be alleviated by a simple aggregation of architectures of different depths. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either \textit{state-of-the-art} or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. \newpage \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that DL is irrelevant for tabular data \cite{videolecture}. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods (RandomForestRegressor \cite{scikit-learn}) are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even undesirable by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{?}. This is due to the lack of transferable domain knowledge between tabular features. To make up for this limitation, an important line of work focuses on pre-processing of categorical features for DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The \textcolor{red}{recent \texttt{PyTorch Tabular} project \cite{pytorchtab}} and the growing number of articles on tabular data in recent years show the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State of the Art: Deep Learning for supervised tasks on tabular data.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|c|cc|cc|c|} \hline Method & End to end differentiable & Hyperparameter tuning & Task & Dataset size range & Beat GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15K$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & \textcolor{red}{hard} & Reg/Classif &$400K$ - $10.5M$ & Marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $10K-\textcolor{red}{1M}$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy &\Clf & 150 - 1M & No\\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640 - 60K & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & 1K - 130K & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& 10K - 200K & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & 2.5K & No \\ \hline \textbf{MLR} (this work) & \checkmark & easy & Reg/Classif &$72$ - $55M$ & Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end to end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard {\texttt{FFNN}}{} but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE marginally outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual ${\texttt{MSE}}$ loss used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBDT, XGB, RF) in regression/classification tasks on the UCI database and several recent Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new DNN architecture for tabular data but we rather train a standard {\texttt{FFNN}}{} using the new \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}) loss, which favors generalization over memorization. More specifically: - Our solution can be used as an off-the-shelf method for training a {\texttt{FFNN}}{}. Indeed we did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. Yet \texttt{\,MLR $\,$}{} achieved excellent performances without any intensive tuning. Hence, our method is an easy and accessible DL solution \sout{to researchers and practitioners}. - Our method works on any tabular dataset with iid samples, whatever the number of samples, of features, the type of features or the domain of the dataset. It performs well for the standard metrics (R2, Accuracy and AUC) and also scales well from a computational perspective. It produces competitive results for both easy and hard tasks in terms of the performance achieved by the best method in the class of standard methods (Ensemble, SVM, Boosting, Linear Regression,etc.). - In the regression setting, our method outperformed ensemble trees methods by ?\% on our aggregated benchmark (UCI+ Kaggle) with dataset size ranging from $n=72$ to \textcolor{red}{$n=43$K} with a focus on very small size datasets. Indeed, our regression benchmark includes $16$ datasets with less than $1000$ training samples including $10$ datasets with less than $n<300$ training samples. Moreover, our method proved more reliable than other methods like XGB with a much higher Friedman rank. Noticeably, our methods consistently rank in the top \textcolor{red}{3 or 5} across all the datasets in our benchmark. Likewise, in the binary classification setting, our method outperformed ensemble trees methods and support vector machines by ?\% in terms of AUC on UCI datasets with size ranging from $n=?$ to \textcolor{red}{$n=?$K}. In term of accuracy, although they came second behind ensemble trees methods in term of average accuracy (by ?\%), they performed more consistently, as the Friedman rank ?\% is well above all other methods. - Our approach is fully compatible with all feature engineering schemes, from embeddings, kernel, to tree leaves to name just a few popular ones. Simple tricks like dithering can improve performance even further. Nothing in the design of \texttt{\,MLR $\,$}{} prevents the use of sample weights. Moreover, as discussed in \ref{}, the last hidden layer of \texttt{\,MLR $\,$}{} networks can be used very effectively as embeddings for any other method. Notably, they proved to be very complementary with the other classes of methods we benchmarked, since the performance of \texttt{\,MLR $\,$}{} are not tied with those. As such, \texttt{\,MLR $\,$}{} might be a great addition to the stack of models aggregated by meta-learners. Using only basic aggregation techniques to build ensemble \texttt{\,MLR $\,$}{} models proved to be successful as their results were more reliable across the whole benchmark. On top of all these, most Deep learning schemes can be leveraged since \texttt{\,MLR $\,$}{} are based on a simple {\texttt{FFNN}}{} architecture and trained using standard gradient based routines. These might include learning rate schedulers, optimizers, weight decay, batch-normalization, drop-out, residual layers and leaky activations, just to name a few. The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API. Default parameters are set up to work well in most cases, and data format is standard numpy matrix, meaning \texttt{model().fit(X,y).predict(X)} calls are all you need. Also, it can be directly encapsulated into parameter search routines, bagging meta models,and all the other popular scikit-learn pipelines. For the sake of replicability, we also provide the code required to run from scratch all the experiments presented in the paper. Which includes the benchmarks, the ablation study and the preprocessing applied to each dataset, starting from raw publicly available files. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \subsection{Matrix form notations} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider the regression task. Our goal is to recover $f^*$ where $Y_i = f^*(\textbf{x}_i) + noise$. We consider a simple Feed-Forward Neural Networks ({\texttt{FFNN}}{}) with $L$ layers, $J$ \sout{hidden} nodes on each hidden layer and the ReLu activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and \begin{eqnarray} \label{FFNN} \textbf{A}^1&=&{\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}\, \nonumber\\ \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1} \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^\ell=(b^\ell)_{1,\cdots,n}\in\mathbb{R}^{n\times J}$ denotes the bias terms. Note that there is no bias in the last layer ($b^L=\boldsymbol{0}$). Set $\boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}$. The last hidden layer of our ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ is such that, \sout{for $n$ observations $\textbf{x}\in\mathbb{R}^{n\times d}$}, $ \textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})\in\mathbb{R}^{n\times J} $ . \textcolor{red}{Usually the last layer is???} \subsection{Regression tasks with the (\texttt{\,MLR $\,$}{}) loss} The 2 essential ingredients in the construction of the \texttt{\,MLR $\,$}{} loss are the Ridge regularization and the random permutations as they promote the generalization ability of the trained {\texttt{FFNN}}{}. First, we define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{x},\textbf{Y})$. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matrix with dimensionality implied by context. In addition, $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our model $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$, we apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} The core of the \texttt{\,MLR $\,$}{} loss is the use of \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} For ${\textbf{Perm}}(\textbf{Y})=(\pi^t(\textbf{Y}))_{t=1}^T$, $T$ independently drawn permutations of the label vector $\textbf{Y}$, we define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}\|_n + \frac{1}{T}\sum_{t=1}^T \left|\| \textbf{Y}\|_n-\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\pi^t(\textbf{Y}))\|_n\right|. \end{align*} \end{mydef} Taking the {\texttt{RMSE}} instead of the {\texttt{MSE}} slightly improves the generalization performances. The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}} while the second term is based on the {\texttt{RMSE}} applied to the permuted labels. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in three ways: $(i)$ The weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}). $(ii)$ The close form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. $(iii)$ This close form is computed by performing inversion on the covariance matrix of $\textbf{A}^{L-1}$. As such, it does not attempt to fit each target sample $Y_i$ individually but instead create embeddings that would work well for the entire batch $\textbf{Y}$ when using the ridge estimator. With a standard NN, the weights are optimized to fit all the samples in parallel. As a by-product, the last hidden layer can possibly be used as embeddings for another task or another model. By contrast, our model direct goal is to perform feature engineering as it focuses on the features of the embedding matrix rather than the individual samples. In that sense, our approach fully embraces the interpretation of neural networks (NN) as automated differentiable feature engineering. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. \\ Indeed, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. Thus, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as physically possible (our machine with 11GVRAM allowed for $J=2^{12}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. All these choices are motivated in the ablation study in Section \ref{Sec:exp} below. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal} (See Appendix for more details). \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, etc. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{6 \times k / 40}\;: \; k = 0, \cdots, 39 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\,\text{where}\,\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $40$ matrix inversions or of the unique forward pass. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice. Set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$, where $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We also apply noise on the permuted labels : for all $t=1,\cdots,T$, set $\pi_{\xi}^t(\textbf{Y})=\pi^t(\textbf{Y})+\xi^{t}$, where $\xi^{t}\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $(\textbf{Y}_{\epsilon},({\textbf{Perm}}_{\xi}(\textbf{Y}))$ instead of $(\textbf{Y},({\textbf{Perm}}(\textbf{Y})))$. Here again, $\sigma$ is \textbf{not an hyperparameter} as we use the same value $\sigma=0.03$ (Table~\ref{tab:hyp1}) for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{12}$) and bigger batch size ($b_S = \min(2^{12},n)$) is always better. See Figures \ref{} and \ref{} in the Appendix. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{iter}$ and Early stopping.} We fix the budget ({\texttt{FixB}} = 5 min), the maximum number of iterations $\max_{iter}$ (depending on the value of $L$). We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, i.e. the minimum between $n_{iter}$ and the actual number of iterations during the allotted time {\texttt{FixB}}. Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. To pick ${\texttt{Iter}}^*$, we read the $R^2$-score for each iteration on the $validation$-set and take by the iteration with the best $R^2$-score : ${\texttt{Iter}}^*:=\arg\max\{R^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$.\\ \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{iter}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & $\sigma$ (Reg$\vert$Classif) & $\tilde\sigma$ (Reg$\vert$Classif) \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{12}$ & $min(n, J)$ & $16$ & ($0.03$ $\vert$ $0$)& ($1$ $\vert$ $2$) \\ ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$& $id.$\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$& $id.$ \\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$& $id.$ \\ \hline \end{tabular} \end{table} \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. We propose several models based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: an ensemble of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (10 {\texttt{FFNN}}{} of depth $L$ for each $L\in \{1,2\}$). For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the (\texttt{BCE-MLR}{}) loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. We replace the RMSE by the Cross-Entropy loss ({\texttt{BCE}}{}). The NN architecture and the training protocol are essentially unchanged. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) \end{align} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for more details. \section{Experiments}\label{Sec:exp} \paragraph{Benchmark description.} To produce this benchmark we aggregated $Value$ tabular regression \textcolor{red}{and classification} datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle \cite{}. See Table \ref{} in the appendix for the exhaustive list. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence we started anew and curated the UCI repository through a set of rules detailed in the appendix (e.g. discard empty or \textbf{duplicate} datasets, times series, missing target, non i.i.d. samples, text format, etc.). After an exhaustive screening of the $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the same process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". See Table \ref{} in the Appendix for the list of violated rules for each available dataset. Contrarily to classification, there are not that many publicly available well-known datasets which are actually well suited for a tabular regression benchmark. \textcolor{red}{We repeated the same process for classification and ended up with $Value$ datasets well suited for tabular classification.} \paragraph{Preprocessing.} \textcolor{red}{Preciser les functions utilisees pour chaque preprocessing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little pre-processing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. \textcolor{red}{Categorical features with more than $20?$ modalities were discarded} as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target value. We then imputed all missing values with the mean or the mode for numerical and categorical features respectively. We applied one-hot encoding for categorical values, and standardization for numerical features and target. We used a 80/20 ratio for each $train$/$test$ split of the data, with a different seed and no stratification scheme. We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. \paragraph{Ablation Analysis.} See the Appendix for the complete ablation study on the impact of each component of our method on the generalization performance. Here is a summary of our findings. The generic values ($\sigma = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value (see Figure ? in the Appendix) which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. The Ridge parameter is not an hyperparameter of our method. It is trained alongside the weights of the NN architecture. The initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations (see \ref{}) reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width and the batch size, which are fixed in our method. \textcolor{red}{A COMPLETER!} Table \ref{tab:ablation1} summarizes the impact of each key ingredient on the generalization performance of our method. The main contributor is the \texttt{\,MLR $\,$}{} loss in replacement of the standard ${\texttt{MSE}}$ with an improvement of $\%$. Ridge and bagging also contributed more marginally with about $\%$ improvement each. Table \ref{tab:ablation2} reveals that only bagging standard NN does not beat \textbf{NN}{} alone. This is another confirmation that the \texttt{\,MLR $\,$}{} loss is the key ingredient in our method. Moreover bagging on top of the \texttt{\,MLR $\,$}{} loss does improve our performance further. \begin{table}[!hp] \caption{Ablation studies on our benchmark.} \label{tab:ablation1} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Bagging & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR Loss & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline \texttt{\,MLR $\,$}-NN: NN+Ridge + MLR Loss + Rotation & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline Bagging \texttt{\,MLR $\,$}-NN & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table}[!hp] \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score.} \label{tab:perf_rank} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \end{table} \paragraph{Overall Performance comparisons.} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:} in the appendix for the list), with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method R.F. (as expected from \cite{Delgado14a}) comes three points behind the best \texttt{\,MLR $\,$}{} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$}{} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$}{} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind \texttt{\,MLR $\,$}{}, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat \texttt{\,MLR $\,$}{} on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat \texttt{\,MLR $\,$}{}, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by \texttt{\,MLR $\,$}{}, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}{}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}{}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$}{} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where \texttt{\,MLR $\,$}{} is not in the top three.} In agreement with \cite{Delgado14a}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$}{} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$}{} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average $R^2$-score to the best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating \texttt{\,MLR $\,$}{} neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. This last empirical observation leads to the discovery of another very interesting property of \texttt{\,MLR $\,$}{} neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$}{} eliminates the need to choose a specific width \ref{}, can automatically adapt the choice of the initial regularization parameter (\ref{lambdainiti}) to the dataset at hand and requires no tuning for the number of permutations and the dither{} parameter (Table \ref{tab:hyp1}). Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be picked by following a straightforward heuristic (Table \ref{tab:hyp1}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}{}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weakly correlated with the size of the considered dataset, it remains an impactful decision as our dataset by dataset results \ref{} clearly shows. And yet, we just found that this difficulty can mostly be alleviated by a simple aggregation of architectures of different depths. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either \textit{state-of-the-art} or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. \textcolor{red}{A COMPLETER avec future directions} \newpage \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that DL is irrelevant for tabular data \cite{videolecture}. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods (\cite{scikit-learn}) are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even undesirable by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{???}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on pre-processing of categorical features which was an historical limitation of DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|c|cc|cc|c|} \hline Method & End-to-end differentiable & Hyperparameter tuning & Task & Dataset size range & Beat GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15K$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & \textcolor{red}{hard} & Reg/Classif &$400K$ - $10.5M$ & Marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $10K-\textcolor{red}{1M}$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy &\Clf & 150 - 1M & No\\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640 - 60K & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & 1K - 130K & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& 10K - 200K & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & 2.5K & No \\ \hline \textbf{MLR} (this work) & \checkmark & easy & Reg/Classif &$72$ - $55M$ & Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end-to-end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE marginally outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. The novelty of our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), stems from its ability to favor generalization over memorization during training by focusing on learning a rich representation of target patterns instead of matching target value for each individual sample. More specifically: - Our method proved more reliable than usual methods (Ensemble, SVM, Boosting, Linear Regression, etc.) including the gold standards RF and GBDT, on our aggregated benchmark (UCI+ Kaggle). It consistently ranked in the top \textcolor{red}{3 or 5} on all datasets in terms of $R^2$ for regression or Accuracy and AUC for binary classification, whatever the number of samples, of features, the type of features or the domain of the datasets. \textcolor{red}{The performances of \texttt{\,MLR $\,$}-NN{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners.} - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot encoding and standard imputation of missing data to function. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf DL solution or integrate it into the most advanced ML pipelines. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om and RBF kernels, tree leaves). \sout{Likewise, creating rich embeddings on the last hidden layer is the main focus of \texttt{\,MLR $\,$}{} and not a simple by-product of training a deep NN.} Learning rate schedulers, optimizers, weight decay, batch-normalization, drop-out, residual layers, leaky activations and all the other popular DL schemes can also be leveraged. Finally, the performances of \texttt{\,MLR $\,$}-NN{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API. Default parameters are set up to work well in most cases, and data format is standard numpy matrix, meaning \texttt{model().fit(X,y).predict(X)} calls are all you need. Also, it can be directly encapsulated into parameter search routines, bagging meta models,and all the other popular scikit-learn pipelines. For the sake of replicability, we also provide the code required to run from scratch all the experiments presented in the paper. Which includes the benchmarks, the ablation study and the preprocessing applied to each dataset, starting from raw publicly available files. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} \textcolor{red}{First version:} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the ReLu activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 2 essential ingredients of the \texttt{\,MLR $\,$}{} method are the Ridge regularization and the random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} We introduce now the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Let ${\textbf{Perm}}(\widetilde{\textbf{Y}})=(\pi^t(\widetilde{\textbf{Y}}))_{t=1}^T$ be $T$ independently drawn permutations of $\widetilde{\textbf{Y}}$. Set $\overline{\textbf{Y}} = mean(\textbf{Y})$. We define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}} \scalebox{1.3}{\ensuremath (}\textbf{Y}, \textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}\scalebox{1.3}{\ensuremath )} \\ &\hspace{1cm}+ \frac{1}{T}\sum_{t=1}^T \scalebox{1.75}{\ensuremath |} {\texttt{RMSE}} \scalebox{1.3}{\ensuremath (} \textbf{Y} , \overline{\textbf{Y}}\mathbbm{1}_n\scalebox{1.3}{\ensuremath )} - {\texttt{RMSE}} \scalebox{1.3}{\ensuremath (}\pi^t(\textbf{Y}),\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\pi^t(\textbf{Y})\scalebox{1.3}{\ensuremath )} \scalebox{1.75}{\ensuremath |}. \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term is based on the {\texttt{RMSE}}{} applied to the permuted labels.\textcolor{red}{Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances.} \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. First, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This new vector can be seen as a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ (see Table~\ref{tab:hyp1}) for all the datasets in our benchmark. Therefore, $T$ is \textbf{not an hyperparameter} (see Section~3.1 in the Appendix). Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. \\ The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. \textcolor{red}{We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is not costly as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix}. In addition, matrix inverse differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by the matrix ${\textbf{Perm}}(\textbf{Y})$ instead of vector $\textbf{Y}$. So the addition of the permuted term is also quite benign.} \\ \paragraph{Labels Rotation.} The use of a ridge layer to create embeddings enables us to leverage one additional trick. Since the output of the network is a function of the target, we can smooth its value by comparing how it would fare when prediction random gaussian noize. The use of a ridge layer to create embeddings enables us to leverage one additional trick. A simple way to regularize would be to add random gaussian noize to the target, (see Dithering below). Instead, we add the residuals of random gaussian noize that our model could try to predict. The fact that we add the residuals from our model means we add a quantity that cannot be fitted by our network. As a consequence, we add noise to the loss evaluation at each step, while preventing the network to fit that noise. The use of a ridge layer to create embeddings enables us to leverage one novel regularization scheme. Usually, dithering is a simple and efficient trick (we add noise on the target during training to smooth /blur the loss function) but a limited one, because the noise level cannot be too high since otherwise the model would attempt to fit the noise instead of the labels. As the noise is different at each gradient step this would cause instability and prevent the model from learning anything at all. The solution would be to use dithering by adding a noise that cannot be fitted by the model. This would blur the loss function without harming the learning. Since we have a close-form, we can also instantly predict noise. Substracting predicted noise from the original noise, let us get the residuals, which by definition cannot be fitted by the model. So this residual noise can have a much bigger magnitude (as big as the target variance). $$ \|\textbf{Y}\|_n={\texttt{RMSE}} ( \textbf{Y} , \overline{\textbf{Y}}\mathbbm{1}_n)$$ Let $\epsilon \sim \textcolor{red}{\tilde \sigma} \times \ensuremath{\mathcal{N}}(\bm{0}_n, \ensuremath{\mathbb{I}}_n)$ and $\xi_{t} \stackrel{i.i.d}{\sim} \textcolor{red}{\tilde \sigma} \times \ensuremath{\mathcal{N}}(\bm{0}_n, \ensuremath{\mathbb{I}}_n )$, for $t=1,\ldots,T$. We also define $\textbf{H}^{\scalebox{0.7}{\raisebox{0.5ex}{+}}} = (\ensuremath{\mathbb{I}}_n + \textbf{H})/2$ and $\textbf{H}^{\scalebox{1}{\raisebox{0.3ex}{-}}} = (\ensuremath{\mathbb{I}}_n - \textbf{H})/2$. Our final \texttt{\,MLR $\,$}{} loss is \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}} (\textbf{Y}, \textbf{H}^{\scalebox{0.7}{\raisebox{0.5ex}{+}}}\textbf{Y} - \textbf{H}^{\scalebox{1}{\raisebox{0.3ex}{-}}} \epsilon) \\ &\hspace{1cm}+ \frac{1}{T}\sum_{t=1}^T \scalebox{1.75}{\ensuremath |} \|\textbf{Y}\|_n - {\texttt{RMSE}} (\pi^t(\textbf{Y}), \textbf{H}^{\scalebox{0.7}{\raisebox{0.5ex}{+}}}\pi^t(\textbf{Y}) - \textbf{H}^{\scalebox{1}{\raisebox{0.3ex}{-}}}\xi_{t})\scalebox{1.75}{\ensuremath |}.\\ &= {\texttt{RMSE}} (\textbf{Y}, \textbf{Y}_- +\textbf{H}\textbf{Y}_+)+{\texttt{RMSE}} (\textbf{Y}, \textbf{Y}_+ +\textbf{H}\textbf{Y}_-) \\ \end{align*} \paragraph{Classif version precedente.} A last trick is to make the target continuous by adding some noise, we set $\epsilon\sim\mathcal N(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}})$ : \begin{eqnarray*} \textbf{Y}_+=\frac12(\textbf{Y}+\epsilon)\in\mathbb{R}^{n}\quad\text{and}\quad \textbf{Y}_-=\frac12(\textbf{Y}-\epsilon)\in\mathbb{R}^{n} \end{eqnarray*} Note that $\textbf{Y}=\textbf{Y}_++\textbf{Y}_-\in\{0,1\}^{n}$. Using the same trick on the permuted labels, we set $\forall t\in\llbracket1,T \rrbracket$ $i.i.d$ random variables $\xi_i^t\sim\mathcal N(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}})$ : \begin{eqnarray*} \pi_+^t(\textbf{Y})=\frac12(\pi^t(\textbf{Y})+\xi^t)\in\mathbb{R}^{n}\quad\text{and}\quad \pi_-^t(\textbf{Y})=\frac12(\pi^t(\textbf{Y})-\xi^t)\in\mathbb{R}^{n} \end{eqnarray*} Note that $\forall t\in\llbracket1,T \rrbracket$, $\pi^t(\textbf{Y})=\pi_+^t(\textbf{Y})+\pi_-^t(\textbf{Y})\in\{0,1\}^{n}$. \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{MLRlossBigsetting} Set $\textbf{H}:=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$, we define the \texttt{BCE-MLR}{} loss as \begin{eqnarray*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda)&=&\left\{{\texttt{BCE}}\left[\textbf{Y},(\textbf{Y}_++\textbf{H}\textbf{Y}_{-})\right]+{\texttt{BCE}}\left(\textbf{Y},\textbf{H}\textbf{Y}_++\textbf{Y}_-\right) \right\} \\ &&-\frac1T\sum_{t=1}^T\left\{{\texttt{BCE}}\left[\pi^t(\textbf{Y}),(\pi_+^t(\textbf{Y})+\textbf{H}\pi_-^t(\textbf{Y}))\right]\right.\\ &&+\left.{\texttt{BCE}}\left[\textbf{Y},(\textbf{H}\pi_+^t(\textbf{Y})+\pi_-^t(\textbf{Y}))\right] \right\}. \end{eqnarray*} \end{mydef} \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as physically possible (our machine with 11GVRAM allowed for $J=2^{12}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. All these choices are motivated in the ablation study in Section \ref{Sec:exp} below. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal} (See Appendix for more details). \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, etc. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{6 \times k / 40}\;: \; k = 0, \cdots, 39 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\,\text{where}\,\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $40$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is not an hyperparameter of our method. It is trained alongside the weights of the NN architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice. Set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$, where $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We also apply noise on the permuted labels : for all $t=1,\cdots,T$, set $\pi_{\xi}^t(\textbf{Y})=\pi^t(\textbf{Y})+\xi^{t}$, where $\xi^{t}\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $(\textbf{Y}_{\epsilon},({\textbf{Perm}}_{\xi}(\textbf{Y}))$ instead of $(\textbf{Y},({\textbf{Perm}}(\textbf{Y})))$. Here again, $\sigma$ is \textbf{not an hyperparameter} as we use the same value $\sigma=0.03$ (Table~\ref{tab:hyp1}) for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{12}$) and bigger batch size ($b_S = \min(2^{12},n)$) is always better. See Figures \ref{} and \ref{} in the Appendix. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{iter}$ and \sout{early} stopping \textcolor{red}{rule}.} We fix the budget ({\texttt{FixB}} = 5 min) and the maximum number of iterations $\max_{iter}$ (depending on the value of $L$). We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, i.e. the minimum between $n_{iter}$ and the actual number of iterations during the allotted time {\texttt{FixB}}. We read the $R^2$-score for each iteration on the $validation$-set and take by the iteration with the best $R^2$-score : ${\texttt{Iter}}^*:=\arg\max\{R^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$. Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{iter}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & $\sigma$ (Reg$\vert$Classif) \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{12}$ & $min(n, J)$ & $16$ & ($0.03$ $\vert$ $0$) \\ ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$ \\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$ \\ \hline \end{tabular} \end{table} \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. We propose several models based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: an ensemble of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (10 {\texttt{FFNN}}{} of depth $L$ for each $L\in \{1,2\}$). For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the (\texttt{BCE-MLR}{}) loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. We replace the RMSE by the Cross-Entropy loss ({\texttt{BCE}}{}). The NN architecture and the training protocol are essentially unchanged. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) \end{align} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for more details. \section{Experiments}\label{Sec:exp} \paragraph{Benchmark description.} To produce this benchmark we aggregated $Value$ tabular regression and classification datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle \cite{}. See Table \ref{} in the appendix for the exhaustive list. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence, we started anew and curated the UCI repository through a set of rules detailed in the appendix (e.g. discard empty or \textbf{duplicate} datasets, times series, missing target, non i.i.d. samples, text format, etc.). After an exhaustive screening of the $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the same process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". See Table \ref{} in the Appendix for the list of violated rules for each available dataset. Contrarily to classification, there are not that many publicly available well-known datasets which are actually well suited for a tabular regression benchmark. \textcolor{red}{We repeated the same process for classification and ended up with $Value$ datasets well suited for tabular classification.} \paragraph{Preprocessing.} \textcolor{red}{Preciser les functions utilisees pour chaque preprocessing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little pre-processing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. \textcolor{red}{Categorical features with more than $20?$ modalities were discarded} as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot encoding for categorical values and standardization for numerical features and target. We used a 80/20 ratio for each $train$/$test$ split of the data, with a different seed and no stratification scheme. We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. \paragraph{Ablation Analysis.} See the Appendix for the complete ablation study on the impact of each component of our method on the generalization performance. Here is a summary of our findings. The generic values ($\sigma = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value (see Figure ? in the Appendix) which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the NN architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations (see Figure \ref{?}) reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size, which are fixed in our method. \textcolor{red}{A COMPLETER!} Table \ref{tab:ablation1} summarizes the impact of each key ingredient on the generalization performance of our method. The main contributor is the \texttt{\,MLR $\,$}{} loss in replacement of the standard ${\texttt{MSE}}$ with an improvement of $\%$. Ridge and bagging also contributed more marginally with about $\%$ improvement each. Aggregating standard NN is not able to beat a single \textbf{NN}{} (see Table \ref{tab:ablation2}). This further reinforces the \texttt{\,MLR $\,$}{} loss as the key ingredient in our method. Moreover the addition of bagging on top of the \texttt{\,MLR $\,$}{} loss does improve our performance further. \begin{table}[!hp] \caption{Ablation studies on our benchmark.} \label{tab:ablation1} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Bagging & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR Loss & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline \texttt{\,MLR $\,$}-NN: NN+Ridge + MLR Loss + Rotation & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline Bagging \texttt{\,MLR $\,$}-NN & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table}[!hp] \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score.} \label{tab:perf_rank} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Short version} \paragraph{Overall Performance comparisons.} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:} in the appendix for the list), with a mean $R^2$-score of $0.60$ on the whole benchmark and Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, \textcolor{red}{R.F.}, with a mean $R^2$-score of $\textcolor{purple}{Value}$ and Friedman Rank $\textcolor{purple}{Value}$. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} The depth $L$ in the {\texttt{MLR$\textapprox$L}}{} method seems to be the only data-dependent hyperparameter (Table \ref{} in the Appendix). We observe however that a simple aggregation of {\texttt{MLR$\textapprox$L}}{} NN of different depths is able to reliably mimic the performance of the {\texttt{MLR$\textapprox$L}}{} NN with the most adequate depth for the dataset at hand. Indeed with a Friedman rank of $\textcolor{purple}{Value}$ on the benchmark, {\texttt{Ens-MLR}}{} outperforms all {\texttt{MLR$\textapprox$L}}{} architectures with a Friedman rank of $\textcolor{purple}{Value}$ at best. \medskip \textcolor{red}{Long version} \paragraph{Overall Performance comparisons.} \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:} in the appendix for the list), with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method R.F. (as expected from \cite{Delgado14a}) comes three points behind the best \texttt{\,MLR $\,$}{} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$}{} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$}{} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind \texttt{\,MLR $\,$}{}, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat \texttt{\,MLR $\,$}{} on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat \texttt{\,MLR $\,$}{}, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by \texttt{\,MLR $\,$}{}, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}{}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}{}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$}{} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where \texttt{\,MLR $\,$}{} is not in the top three.} In agreement with \cite{Delgado14a}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$}{} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$}{} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average $R^2$-score to the best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating \texttt{\,MLR $\,$}{} neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. This last empirical observation leads to the discovery of another very interesting property of \texttt{\,MLR $\,$}{} neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$}{} eliminates the need to choose a specific width \ref{}, can automatically adapt the choice of the initial regularization parameter (\ref{lambdainiti}) to the dataset at hand and requires no tuning for the number of permutations and the dither{} parameter (Table \ref{tab:hyp1}). Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be picked by following a straightforward heuristic (Table \ref{tab:hyp1}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}{}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weakly correlated with the size of the considered dataset, it remains an impactful decision as our dataset by dataset results \ref{} clearly shows. And yet, we just found that this difficulty can mostly be alleviated by a simple aggregation of architectures of different depths. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. \textcolor{red}{A COMPLETER avec future directions} \newpage \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that DL is irrelevant for tabular data \cite{videolecture}. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods (\cite{scikit-learn}) are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even \textcolor{red}{impossible} \sout{undesirable} by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{???}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on pre-processing of categorical features which was an historical limitation of DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|c|cc|cc|c|} \hline Method & End-to-end differentiable & Hyperparameter tuning & Task & Dataset size range & Beat GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15K$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & \textcolor{red}{hard} & Reg/Classif &$400K$ - $10.5M$ & Marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $10K-\textcolor{red}{1M}$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy &\Clf & 150 - 1M & No\\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640 - 60K & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & 1K - 130K & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& 10K - 200K & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & 2.5K & No \\ \hline \textbf{MLR} (this work) & \checkmark & easy & Reg/Classif &$72$ - $55M$ & Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end-to-end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE marginally outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. Our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), penalizes memorization over permuted labels and random noise through the application of a differentiable close-form regularization scheme on the last hidden layer during training. More specifically: - Our method proved more reliable than usual methods (Ensemble, SVM, Boosting, Linear Regression, etc.) including the gold standards RF and GBDT, on our aggregated benchmark (UCI+ Kaggle). It consistently ranked in the top \textcolor{red}{3 or 5} on all datasets in terms of $R^2$ for regression or Accuracy and AUC for binary classification, whatever the number of samples, of features, the type of features or the domain of the datasets. - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot encoding and standard imputation of missing data to function. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om and RBF kernels, tree leaves). All the popular DL schemes can also be leveraged including learning rate schedulers, optimizers, weight decay, batch-normalization, drop-out, residual layers, leaky activations. - The performances of \texttt{\,MLR $\,$}-NN{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf DL solution or integrate it into the most advanced ML pipelines. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API (\textit{i.e.} it can be directly encapsulated into parameter search routines, bagging meta models, \textit{etc.}). For the sake of replicability, the code to run the benchmarks, the ablation study and the preprocessing applied to each dataset is also provided. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the ReLu activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 2 essential ingredients of the \texttt{\,MLR $\,$}{} method are the Ridge regularization and the random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \texttt{perm}(\bY)=\pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$ and $\textbf{H}^\perp=\ensuremath{\mathbb{I}}-\textbf{H}$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let ${\textbf{Perm}}(\textbf{Y})=\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+\textbf{H}^\perp \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+\textbf{H}^\perp \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right| \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term quantifies the amount of memorization of a model by comparing its RMSE on uninformative labels to the baseline ${\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$, $i.e.$ the performance achieved without fitting the data. Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances. We explain below the role of $\textbf{H}^\perp \xi$ and $\textbf{H}^\perp \xi_t$. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. More precisely, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. See Section \ref{sup-secMLRloss} in the appendix for more detail \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $\textbf{H}^\perp \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ is \textbf{not an hyperparameter} (\textcolor{red}{see Section~??? in the Appendix}). Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. \\ The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix}. \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as physically possible (our machine with 11GVRAM allowed for $J=2^{12}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. All these choices are motivated in the ablation study in Section \ref{Sec:exp} below. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align*} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal} (See Appendix for more details). \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, etc. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{6 \times k / 40}\;: \; k = 0, \cdots, 39 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\,\text{where}\,\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $40$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is not an hyperparameter of our method. It is trained alongside the weights of the NN architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{12}$) and bigger batch size ($b_S = \min(2^{12},n)$) is always better. \textcolor{red}{See Figures \ref{} and \ref{} in the Appendix}. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{iter}$ and early stopping.} We fix the budget ({\texttt{FixB}} = 5 min) and the maximum number of iterations $\max_{iter}$ (depending on the value of $L$). We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, i.e. the minimum between $n_{iter}$ and the actual number of iterations during the allotted time {\texttt{FixB}}. We read the $R^2$-score for each iteration on the $validation$-set and take by the iteration with the best $R^2$-score : ${\texttt{Iter}}^*:=\arg\max\{R^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$. Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{iter}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & $\widetilde\sigma$ (Reg$\vert$Classif) \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{12}$ & $min(n, J)$ & $16$ & ($0.03$ $\vert$ $0$) \\ ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$ \\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & $id.$ \\ \hline \end{tabular} \end{table} \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. We propose several models based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: an ensemble of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (10 {\texttt{FFNN}}{} of depth $L$ for each $L\in \{1,2\}$). For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the (\texttt{BCE-MLR}{}) loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. The NN architecture and the training protocol are essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a {\texttt{Sigmoid}}{} and the Cross Entropy (\texttt{CE}) loss. Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{MLRlossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+\textbf{H}^\perp \xi+\textbf{H}\textbf{Y}^*\right \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+\textbf{H}^\perp \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. The structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the BCE is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for more details. \section{Experiments}\label{Sec:exp} \paragraph{Benchmark description.} To produce this benchmark we aggregated $Value$ tabular regression and classification datasets, including $Value$ from the UCI repository \cite{} and $Value$ from Kaggle \cite{}. See Table \ref{} in the appendix for the exhaustive list. Although \cite{Delgado14a} already built a benchmark based on the UCI repository, their methodology presents some flaws \cite{Wainberg2016}. Hence, we started anew and curated the UCI repository through a set of rules detailed in the appendix (e.g. discard empty or \textbf{duplicate} datasets, times series, missing target, non i.i.d. samples, text format, etc.). After an exhaustive screening of the $Value$ available datasets tagged as regression, we were left with $Value$ datasets. We added $Value$ datasets by repeating the same process on Kaggle\cite{} using the tags with "task": "regression" and "format" : ".csv",".xls". \textcolor{red}{We repeated the same process for classification \sout{and ended up with $Value$ datasets well suited for tabular classification.}} See Table \ref{} in the Appendix for the list of violated rules for each available dataset. \textcolor{red}{In summary, we have ? regression datasets and ? classification datasets.} Contrarily to classification, there are not that many publicly available well-known datasets which are actually well suited for a tabular regression benchmark. \paragraph{Preprocessing.} \textcolor{red}{Preciser les functions utilisees pour chaque preprocessing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little pre-processing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. \textcolor{red}{Categorical features with more than $20?$ modalities were discarded} as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot encoding for categorical values and standardization for numerical features and target. We used a 80/20 ratio for each $train$/$test$ split of the data, with a different seed and no stratification scheme. We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. \paragraph{Ablation Analysis.} See the Appendix for the complete ablation study on the impact of each component of our method on the generalization performance. Here is a summary of our findings. The generic values ($\tilde{\sigma} = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value (see Figure ? in the Appendix) which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the NN architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations (see Figure \ref{?}) reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size, which are fixed in our method. \textcolor{red}{A COMPLETER!} \textcolor{red}{Add a description of the Structured Dithering scheme!!!!!} \medskip \begin{table}[!hp] \caption{Regression Benchmark.} \label{Regression} \centering \footnotesize \begin{tabular}{|l||c|c|c|c|c|} \hline method & R2 & Rank & P90 & P95 & PMA \\ \hline ensemble & 0.672 & 4.939 & 0.800 & 0.628 & 0.919 \\ \hline MLR2bagging & 0.666 & 4.539 & 0.772 & 0.617 & 0.900 \\ \hline MLR1bagging & 0.658 & 6.783 & 0.783 & 0.556 & 0.903 \\ \hline MLR2 & 0.651 & 7.989 & 0.694 & 0.506 & 0.889 \\ \hline MLR3 & 0.648 & 7.756 & 0.656 & 0.506 & 0.910 \\ \hline MLR1 & 0.641 & 9.139 & 0.706 & 0.428 & 0.790 \\ \hline RF & 0.640 & 7.761 & 0.644 & 0.489 & 0.706 \\ \hline xgb & 0.634 & 7.383 & 0.739 & 0.522 & 0.628 \\ \hline XRF & 0.632 & 8.328 & 0.678 & 0.506 & 0.602 \\ \hline NN2 & 0.597 & 10.339 & 0.567 & 0.400 & 0.706 \\ \hline \end{tabular} \end{table} \begin{table}[!hp] \caption{Classification Benchmark AUC.} \label{Classification AUC} \centering \footnotesize \begin{tabular}{|l||c|c|c|c|c|} \hline method & AUC & Rank & P95 & P98 & PMA \\ \hline ensemble & 0.919 & 3.462 & 0.923 & 0.769 & 0.987 \\ \hline MLR1bagging & 0.919 & 4.077 & 0.923 & 0.923 & 0.987 \\ \hline RF & 0.917 & 3.462 & 0.846 & 0.692 & 0.984 \\ \hline MLR2bagging & 0.915 & 3.846 & 0.923 & 0.692 & 0.983 \\ \hline MLP & 0.913 & 6.385 & 0.923 & 0.615 & 0.981 \\ \hline XRF & 0.913 & 5.615 & 0.846 & 0.615 & 0.980 \\ \hline xgb & 0.908 & 6.154 & 0.923 & 0.538 & 0.976 \\ \hline Enet & 0.902 & 7.692 & 0.615 & 0.462 & 0.968 \\ \hline Ridge & 0.902 & 7.462 & 0.692 & 0.538 & 0.969 \\ \hline MLR1 & 0.899 & 9.308 & 0.846 & 0.462 & 0.966 \\ \hline \end{tabular} \end{table} \begin{table}[!hp] \caption{Classification Benchmark Accuracy.} \label{Classification ACC} \centering \footnotesize \begin{tabular}{|l||c|c|c|c|c|} \hline method & ACC & Rank & P95 & P98 & PMA \\ \hline XRF & 0.883 & 4.308 & 1.000 & 0.846 & 0.988 \\ \hline RF & 0.879 & 4.231 & 0.923 & 0.769 & 0.983 \\ \hline ensemble & 0.879 & 4.000 & 0.923 & 0.615 & 0.984 \\ \hline MLR2bagging & 0.877 & 4.231 & 0.923 & 0.692 & 0.982 \\ \hline MLR1bagging & 0.877 & 5.077 & 0.923 & 0.692 & 0.982 \\ \hline xgb & 0.875 & 4.692 & 0.923 & 0.769 & 0.980 \\ \hline Bagging & 0.867 & 8.538 & 0.769 & 0.462 & 0.970 \\ \hline MLR3 & 0.864 & 10.000 & 0.692 & 0.538 & 0.967 \\ \hline MLR1 & 0.863 & 10.231 & 0.769 & 0.462 & 0.966 \\ \hline MLR2 & 0.863 & 8.231 & 0.769 & 0.615 & 0.965 \\ \hline \end{tabular} \end{table} Table \ref{tab:ablation1} summarizes the impact of each key ingredient on the generalization performance of our method. The main contributor is the \texttt{\,MLR $\,$}{} loss in replacement of the standard ${\texttt{MSE}}$ with an improvement of $\%$. Ridge and bagging also contributed more marginally with about $\%$ improvement each. Aggregating standard NN is not able to beat a single \textbf{NN}{} (see Table \ref{tab:ablation2}). This further reinforces the \texttt{\,MLR $\,$}{} loss as the key ingredient in our method. Moreover the addition of bagging on top of the \texttt{\,MLR $\,$}{} loss does improve our performance further. \begin{table}[!hp] \caption{Ablation studies on our benchmark.} \label{tab:ablation1} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Bagging & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR Loss & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline \texttt{\,MLR $\,$}-NN: NN+Ridge + MLR Loss + Rotation & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline Bagging \texttt{\,MLR $\,$}-NN & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table}[!hp] \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score.} \label{tab:perf_rank} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \end{table} \textcolor{red}{Short version} \paragraph{Overall Performance comparisons.} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:} in the appendix for the list), with a mean $R^2$-score of $0.60$ on the whole benchmark and Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, \textcolor{red}{R.F.}, with a mean $R^2$-score of $\textcolor{purple}{Value}$ and Friedman Rank $\textcolor{purple}{Value}$. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} The depth $L$ in the {\texttt{MLR$\textapprox$L}}{} method seems to be the only data-dependent hyperparameter (Table \ref{} in the Appendix). We observe however that a simple aggregation of {\texttt{MLR$\textapprox$L}}{} NN of different depths is able to reliably mimic the performance of the {\texttt{MLR$\textapprox$L}}{} NN with the most adequate depth for the dataset at hand. Indeed with a Friedman rank of $\textcolor{purple}{Value}$ on the benchmark, {\texttt{Ens-MLR}}{} outperforms all {\texttt{MLR$\textapprox$L}}{} architectures with a Friedman rank of $\textcolor{purple}{Value}$ at best. \medskip \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. \textcolor{red}{A COMPLETER avec future directions} \newpage \bibliographystyle{plain} \section{Introduction} Over the past decade, we have witnessed the impressive performance of deep learning in the fields of computer vision \cite{}, audio \cite{} and natural language processing \cite{}. But it is still widely believed that deep learning is irrelevant for tabular data. \textcolor{red}{It may seem strange at first considering that tabular data are "less complex" than image or textual data.} This may be due to the fact that there is no clearly identified best practice \textcolor{red}{architecture} to tackle tabular data with deep learning. While the needs to handle tabular data arise in many fields (e.g. material science \cite{}, medecine \cite{}, finance \cite{}), deep learning for tabular data remains understudied and underused. \sout{It is commonly accepted that standard ML Methods (SVM,RF,XGB,...) are better suited for tabular data and usually outperform DL both in generalization performance and execution time \cite{Delgado14a}.} \textcolor{red}{Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. \sout{It may seem strange at first considering that tabular data are "less complex" than image or textual data.}} \sout{Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning. By contrast, DL methods usually require extensive tuning, expertise and time to train. It may seem strange at first considering that tabular data are "less complex" than image or textual data. } Another limitation of DL that held back its use on tabular data is the handling of categorical data. Recent encoding techniques, $e.g$ entity embeddings \cite{Guo2016}, have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in deep learning. However, ensemble methods are still considered the best option to handle categorical data \cite{catboost}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their \textcolor{red}{extensive} \sout{intensive} use in Kaggle competitions? \sout{One of the greatest strengths of DL lies in its ability to perform automatic features engineering. Moreover, end-to-end training via gradient descent is a key factor in the success of DL. It even offers the possibility to use DL models in online settings (\cite{ZhangDu2016cat,SahooPLH18},...).}\\ \textcolor{red}{Developing a DL solution for tabular data is still desirable at it can leverage the particular strengths of DL, namely its ability to perform automatic features engineering and end-to-end training via gradient descent. Moreover, recent work proved that DL is also amenable to online learning \cite{ZhangDu2016cat,SahooPLH18,WANG2021_IncLSTM,?}.} \paragraph{Related work.} \textcolor{red}{The growing number of articles on tabular data in recent years \sout{on these issues} shows the increasing interest of the DL community in this topic. These articles mainly deal with the classification problem rather than regression.} Interpretability and fear of the "black box" remain obstacles to the wider use of DL. Attention-mechanism based neural network architecture have been developed to address this interpretability issue (\cite{NLP,BErt,Tabnet}). Recently Google developed TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a few datasets up to a dataset dependent fine-tuning of the hyperparameters. \sout{The growing number of articles on tabular data in recent years \sout{on these issues} shows the increasing interest of the DL community in this topic. These articles mainly deal with the classification problem rather than regression.} Several of them \sout{existing works} proposed to translate/adapt the original idea behind decision trees into neural networks ([mettre ici tous les papiers qui font ça]). Among the most recent propositions, NODE \cite{} can be considered as the DL counterpart of CatBoost, thus benefiting from both end-to-end gradient-based optimization and other DL advantages \textcolor{red}{(?what?)}. For tabular data in the large sample regime ($n\geq???$), DL methods have made a major breakthrough as it may now outperform ensemble methods on some large dataset (AirBnB []). But success stories are still limited on small to medium size data sets where ensemble methods are still preferred. In many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences but the norm since collecting samples and assembling large data set may be costly. The deep learning community has developed successful solutions to handle the small data regime in computer vision tasks \cite{?,?,?}. However there is no fully satisfying DNN solution for small size tabular data where ensemble methods (XGB, GBD) remain the gold standard \cite{?,?,?,?}. SNN: \cite{Klambauer2017} The most common criticisms against deep learning are the high level of expertise required to design architecture and tune hyperparameters as well as the high cost of training. Existing solutions \cite{?,?,?} proposed complex hybrid architectures. Some of these solutions often involve a lot of ad-hoc steps during the training phase \cite{tabnet}. The performance of these methods were not evaluated on very small data sets ($n\lesssim 500$). To the best of our knowledge, there is no "\textit{pure}" deep learning solution for tabular data, that has been proven to perform better in average \sout{in mean} than standard ML Methods \textcolor{red}{both in the small and large sample regimes.} \paragraph{Our contributions.} We propose a "\textit{pure}" deep learning solution that outperforms the gold standard (GBFT, XGB, RF) in average in the regression setting \sout{over ?30? datasets taken from} \textcolor{red}{on the UCI database and several recent Kaggle data sets}. More specifically: \begin{itemize} \item We propose a new end-to-end method to train a standard FFNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach relies on the use of the new \texttt{\,MLR $\,$} loss function introduced in \cite{MLR} which is differentiable with generalizing ability. \item In our empirical experiments, this method outperformed ensemble methods in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD Deep neural networks (DNN) have become extremely popular over the last decade for their impressive \sout{\textcolor{red}{state-of-the-art}} \sout{unmatched generalization} performance on several learning tasks: computer vision [1], natural language processing, speech recognition [2], reinforcement learning \cite{Goodfellow-et-al-2016}. However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. Also tabular data are usually of much smaller size than in computer vision. For these reasons, DNN trained by conventional methods under-perform traditional machine learning methods. For example, Kaggle ML competitions on tabular data are mostly won by ensemble methods (RF,GBDT,XGB,...) \cite{(Friedman, 2001; Harasymiv, 2015;Chen & Guestrin, 2016; Ke et al., 2017;Prokhorenkova et al., 2018)}, kernel methods, ?MARS,...? . The small data regime has been extensively studied by the deep learning community for computer vision tasks \cite{???}. This is not yet the case for tabular data although the need arises in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}. Developing deep learning solutions for tabular data is of interest to the Machine Learning community \cite{(Zhou & Feng, 2017; Yang et al.,2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018)}. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. \cite{Friedman2001,Prokhorenkova2018,guestrin2016,Ke2017} \cite{ke2019tabnn,} Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage \section{Related Work} \newpage \newpage \section{Experiments} We only considered the ?80? regression data sets in the UCI database. We noted for instance that the ??? data set has been split into 28 sub-datasets according to the city categorical feature, thus artificially increasing the number of regression problems. We eliminated these redundancies and consider only one dataset containing all modalities of the city feature. We eliminated similar redundancies for ?,?,?,? data and ended up with ?30? genuinely different regression problems. We also added ?7? regression data sets used in Kaggle competitions. Table \ref{} in the Appendix summarizes all the considered regression data sets. Overall the number of samples ranges $?$ to $?$ and the number of features from $?$ to $?$. \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the past decade, we have witnessed the impressive performance of deep learning in the fields of computer vision \cite{}, audio \cite{} and natural language processing \cite{}. But it is still widely believed that deep learning is irrelevant for tabular data. It may seem strange at first considering that tabular data are "less complex" than image or textual data. This may be due to the fact that there is no clearly identified best practice architecture to tackle tabular data with deep learning. While the needs to handle tabular data arise in many fields (e.g. material science \cite{}, medecine \cite{}, finance \cite{}), deep learning for tabular data remains understudied and underused. Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. Another limitation of DL that held back its use on tabular data is the handling of categorical data. An important line of work mostly focused on better pre-processing of categorical features for DNN \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. Encoding techniques, $e.g$ entity embeddings \cite{Guo2016}, have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in deep learning. However, ensemble methods are still considered the best option to handle categorical data \cite{catboost}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their extensive use in Kaggle competitions? Developing a DL solution for tabular data is nonetheless desirable at it can leverage the particular strengths of DL, namely its ability to perform automatic features engineering and end-to-end training via gradient descent. Moreover, recent work proved that DL is also amenable to online learning \cite{ZhangDu2016cat,SahooPLH18,WANG2021_IncLSTM,?}. \paragraph{Related work.} The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic. These articles consider mostly classification but rarely regression. Interpretability and fear of the "black box" remain obstacles to the wider use of DL. Attention-mechanism based neural network architecture have been developed to address the interpretability issue (\cite{NLP,BErt}). Recently \cite{arik2020tabnet} exploited attention-mechanism to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a small number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated dataset dependent fine-tuning of the hyperparameters. An interesting line of research proposes to translate/adapt the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. Several recent works propose to combine decision trees with deep learning. DNDT \cite{YangMorillo2018} is a specific neural network architecture that can be trained via end-to-end via gradient descent but can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Tabnn \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). Tabnn outperforms standard FCNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15k$ up to $7.9M$ samples. NODE \cite{Popov2020Neural} is a new DNN architecture consisting of differentiable oblivious decision trees that can be trained end to end via backpropagation. NODE slightly outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets in regression and binary classification with the number of training samples ranging from $400K$ up to $10.5M$ and the number of features ranging from $11$ to $2000$. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small ($n\leq 5000$) UCI data sets. NTK performs well on small size ($n \leq 640$) CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end deep learning model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. Regularization Learning Networks (RLN) \cite{Shavitt2018} are a new family of neural networks trained with a new loss, named Counterfactual Loss, together with stochastic gradient descent. RLN perform significantly better than standard DNN on tabular data but could not beat GBT in their experiments. \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. SNN does not outperform SVM or Random Forests on the UCI database. ********************************* *********************************\\ \cite{Nazabal2018}\\ ******************************************************************\\ For tabular data in the large sample regime ($n\geq???$), DL methods have made a major breakthrough as it may now outperform ensemble methods on some large dataset (AirBnB []). But success stories are still limited on small to medium size data sets where ensemble methods are still preferred. In many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences but the norm since collecting samples and assembling large data set may be costly. The deep learning community has developed successful solutions to handle the small data regime in computer vision tasks \cite{?,?,?}. However there is no fully satisfying DNN solution for small size tabular data where ensemble methods (XGB, GBD) remain the gold standard \cite{?,?,?,?}. The most common criticisms against deep learning are the high level of expertise required to design architecture and tune hyperparameters as well as the high cost of training. Existing solutions \cite{?,?,?} proposed complex hybrid architectures. Some of these solutions often involve a lot of ad-hoc steps during the training phase \cite{tabnet}. The performance of these methods were not evaluated on very small data sets ($n\lesssim 500$). To the best of our knowledge, there is no "\textit{pure}" deep learning solution for tabular data, that has been proven to perform better in average \sout{in mean} than standard ML Methods \textcolor{red}{both in the small and large sample regimes.} \paragraph{Our contributions.} We propose a "\textit{pure}" deep learning solution that outperforms the gold standard (GBFT, XGB, RF) in average in the regression setting on the UCI database and several recent Kaggle data sets. We did not attempt to design a new DL architecture for tabular data as in the aforementioned works but we rather propose a new method to train standard FCNN. More specifically: \begin{itemize} \item We propose a new end-to-end method to train a standard FCNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach relies on the use of the new \texttt{\,MLR $\,$} loss function introduced in \cite{MLR} which is differentiable with generalizing ability. \item In our empirical experiments, this method outperformed ensemble methods in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD Deep neural networks (DNN) have become extremely popular over the last decade for their impressive \sout{\textcolor{red}{state-of-the-art}} \sout{unmatched generalization} performance on several learning tasks: computer vision [1], natural language processing, speech recognition [2], reinforcement learning \cite{Goodfellow-et-al-2016}. However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. Also tabular data are usually of much smaller size than in computer vision. For these reasons, DNN trained by conventional methods under-perform traditional machine learning methods. For example, Kaggle ML competitions on tabular data are mostly won by ensemble methods (RF,GBDT,XGB,...) \cite{(Friedman, 2001; Harasymiv, 2015;Chen & Guestrin, 2016; Ke et al., 2017;Prokhorenkova et al., 2018)}, kernel methods, ?MARS,...? . The small data regime has been extensively studied by the deep learning community for computer vision tasks \cite{???}. This is not yet the case for tabular data although the need arises in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}. Developing deep learning solutions for tabular data is of interest to the Machine Learning community \cite{(Zhou & Feng, 2017; Yang et al.,2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018)}. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. \cite{Friedman2001,Prokhorenkova2018,guestrin2016,Ke2017} \cite{ke2019tabnn,} Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage \section{Related Work} \newpage \newpage \section{Experiments} We only considered the ?80? regression data sets in the UCI database. We noted for instance that the ??? data set has been split into 28 sub-datasets according to the city categorical feature, thus artificially increasing the number of regression problems. We eliminated these redundancies and consider only one dataset containing all modalities of the city feature. We eliminated similar redundancies for ?,?,?,? data and ended up with ?30? genuinely different regression problems. We also added ?7? regression data sets used in Kaggle competitions. Table \ref{} in the Appendix summarizes all the considered regression data sets. Overall the number of samples ranges $?$ to $?$ and the number of features from $?$ to $?$. \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the past decade, we have witnessed the impressive performance of Deep Learning (DL) in the fields of computer vision \cite{}, audio \cite{} and natural language processing \cite{}. But it is still widely believed that DL is irrelevant for tabular data. It may seem strange at first considering that tabular data are "less complex" than image or textual data. This may be due to the fact that there is no clearly identified best practice architecture to tackle tabular data with DL. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. Another limitation of DL that held back its use on tabular data is the handling of categorical data. An important line of work mostly focused on better pre-processing of categorical features for DNN \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. Encoding techniques, $e.g$ entity embeddings \cite{Guo2016}, have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in DL. However, ensemble methods are still considered the best option to handle categorical data \cite{catboost}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their extensive use in Kaggle competitions? Developing a DL solution for tabular data is nonetheless desirable at it can leverage the particular strengths of DL, namely its ability to perform automatic features engineering and end-to-end training via gradient descent. \sout{\textcolor{red}{Moreover, recent work proved that DL is also amenable to online learning \cite{ZhangDu2016cat,SahooPLH18,WANG2021_IncLSTM,?}.}} \textcolor{red}{JE vois pas le lien avec le reste du papier} \section{Related work} The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic. These articles consider mostly classification but rarely regression. \paragraph{Regularization.} Two classical DL regularization strategies are dropout \cite{srivastava2014a} and weight decay. \cite{ZhangDW16} compared dropout with weight decay on tabular data, and found dropout to be better. However, dropout may fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} Fear of the "black box" remains a major obstacle to the wider use of DL. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end via gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-mechanism based neural network architecture have been developed to address the interpretability issue (\cite{NLP,BErt}). Recently \cite{arik2020tabnet} exploited attention-mechanism to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated dataset dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However the resulting architecture cannot be trained end to end resulting in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). Tabnn outperforms standard FCNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, \cite{Popov2020Neural} proposed NODE, a new DNN architecture consisting of differentiable oblivious decision trees which can be trained end-to-end via backpropagation. NODE slightly outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets in regression and binary classification with the number of training samples ranging from $400K$ up to $10.5M$ and the number of features ranging from $11$ to $2000$. \paragraph{Connections with other ML methods.} An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \paragraph{Stabilizing activation function.} \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \paragraph{New loss functions.} A promising line of research proposes to replace the usual quadratic loss used to train DNN by specific losses with interesting properties. For instance, \cite{Shavitt2018} propose the Regularization Learning Networks (RLN). This is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. Our contribution falls in this category. \paragraph{Small data regime.} Hybrid solutions decision trees/DL may outperform ensemble methods on tabular datasets in the large sample regime (\cite{Haldar2019,Popov2020Neural}). However, in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences \sout{but the norm} since collecting samples and assembling large data set may be costly. The DL community has developed successful solutions to handle the small data regime in computer vision tasks \cite{?}. However, to the best of our knowledge, there is no "\textit{pure}" DL solution that beats the gold standard (ensemble methods) on tabular data tasks in the small or medium sample regime. Our paper proposes to fill in this gap. \paragraph{Our contributions.} Our approach is based on the novel MLR loss function that we introduced in \cite{MLR} for linear regression tasks. We propose a pure deep learning solution that outperforms the gold standard (GBFT, XGB, RF) \sout{in average} in regression tasks on the UCI database and several recent large size Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new NN architecture for tabular data but we rather propose a new method to train a standard FCNN. More specifically: \begin{itemize} \item We propose a new end-to-end method to train a standard FCNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach relies on the use of the new \texttt{\,MLR $\,$} loss function introduced in \cite{MLR} which is differentiable with generalizing ability. \textcolor{red}{The ablation study in Table \ref{} revealed that the MLR loss was the key element in the success of our method with an overall performance improvement of \% on our benchmark.} \item In our empirical experiments, this method outperformed ensemble methods by ?\% overall on the UCI datasets.\\ in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD Deep neural networks (DNN) have become extremely popular over the last decade for their impressive \sout{\textcolor{red}{state-of-the-art}} \sout{unmatched generalization} performance on several learning tasks: computer vision [1], natural language processing, speech recognition [2], reinforcement learning \cite{Goodfellow-et-al-2016}. However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. Also tabular data are usually of much smaller size than in computer vision. For these reasons, DNN trained by conventional methods under-perform traditional machine learning methods. For example, Kaggle ML competitions on tabular data are mostly won by ensemble methods (RF,GBDT,XGB,...) \cite{(Friedman, 2001; Harasymiv, 2015;Chen & Guestrin, 2016; Ke et al., 2017;Prokhorenkova et al., 2018)}, kernel methods, ?MARS,...? . The small data regime has been extensively studied by the deep learning community for computer vision tasks \cite{???}. This is not yet the case for tabular data although the need arises in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}. Developing deep learning solutions for tabular data is of interest to the Machine Learning community \cite{(Zhou & Feng, 2017; Yang et al.,2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018)}. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. \cite{Friedman2001,Prokhorenkova2018,guestrin2016,Ke2017} \cite{ke2019tabnn,} Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage \section{Related Work} \newpage \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \paragraph{Description and preprocessing.} The benchmark includes the regression datasets from the UCI Machine Learning repository \cite{Delgado14a}. \textcolor{red}{We address below the methodology mistakes highlighted by \citep{bib:Wainberg2016} in the aforementioned paper}. We also added ?7? regression datasets used in Kaggle competitions. The size of the datasets ranges between $?$ and $?$ data points and the number of features from $?$ to $?$. We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} is \textcolor{red}{over-representated} \sout{given far more weight than the other data sets} in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. We ended up with 21 genuinely different regression datasets. Table \ref{} in the Appendix summarizes all the considered regression datasets. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \paragraph{Methods compared.} We use ??? methods with their best possible tuned hyperparameters including NN and the gold standard for tabular data (RF, XGB, ...). See Table ? in the appendix for the exhaustive list of methods and tuning methods. For each method in the benchmark, we use the validation set to perform 5-fold cv on the best designed grid to tune hyperparameters. \begin{table*}[!hp] \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline Bagging MLR & \textbf{?} & \\ \hline RF & \textbf{?} & \\ \hline XGB & \textbf{?} & \\ \hline XRF & \textbf{?} & \\ \hline MLP & \textbf{?} & \\ \hline NN-1 & \textbf{?} & \\ \hline NN-2 & \textbf{?} & \\ \hline NN-3 & \textbf{?} & \\ \hline Kernels & \textbf{?} & \\ \hline MARS & \textbf{?} & \\ \hline CART & \textbf{?} & \\ \hline $\nu$-SVM & \textbf{?} & \\ \hline Ridge & \textbf{?} & \\ \hline LASSO & \textbf{?} & \\ \hline Elastic Net & \textbf{?} & \\ \hline Intercept & \textbf{?} & \\ \hline \end{tabular} \caption{ List of methods with their tuning grid \label{tab:method} } \end{table*} \paragraph{Overall Performance comparisons} Je suggere de s'inspirer de "HARNESSING THE POWER OF INFINITELY WIDE DEEP NETS ON SMALL-DATA TASKS" pour la mise en valeur des resultats. Notamment, il faut calculer les statistiques dans le tableau ci-dessous a partir des resultats brutes des experiences. Il faut faire ce Table 1 pour les performances avec MLR: \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \caption{ Comparisons of ?17? methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. \label{tab:stat_test} } \end{table*} \paragraph{Ablation study} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Noise on last layer & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline NN+Ridge + MLR + Noise on last layer + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation1} } \end{table*} \newpage \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN-MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging NN-MLR & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation2} } \end{table*} \paragraph{Friedman Ranking and Average Accuracy.} NTK is the best (Friedman Rank 28.34, Average Accuracy 81.95\%), followed by RF (Friedman Rank 33.51, Average Accuracy 81.56\%) and then followed by SVM with Gaussian kernel (Friedman Rank 35.76, Average Accuracy 81.03\%). The difference between NTK and RF is significant (-5.17 in Friedman Rank and +0.39\% in Average Accuracy), just as the superiority of RF is significant compared to other classifiers as claimed in \cite{fernandez2014we}. NN (with either He initialization or NTK initialization) performs significantly better than the polynomial kernel in terms of the Average Accuracy (80.88\% and 81.02\% vs. 78.21\%), but in terms of Friedman Rank, NN with He initialization is worse than polynomial kernel (40.97 vs. 38.44) and NN with NTK initialization is slightly better than polynomial kernel (38.06 vs. 38.44). On many datasets where most classifiers have similar performances, NN's rank is high as well, whereas on other datasets, NN is significantly better than most classifiers, including SVM with polynomial kernel. Therefore, NN enjoys higher Average Accuracy but suffers higher Friedman Rank. For example, on \textsc{ozone} dataset, NN with NTK initialization is only 0.25\% worse than polynomial kernel but their difference in terms of rank is 56. It is also interesting to see that NN with NTK initialization performs better than NN with He initialization (38.06 vs. 40.97 in Friedman Rank and 81.02\% vs. 80.88\% in Average Accuracy). \paragraph{P90/P95 and PMA.} This measures, for a given classifier, the fraction of datasets on which it achieves more than 90\%/95\% of the maximum accuracy among all classifiers. NTK is one of the best classifiers (ties with Gaussian kernel on P95), which shows NTK can consistently achieve superior classification performance across a broad range of datasets. Lastly, we consider the Percentage of the Maximum Accuracy (PMA). NTK achieves the best average PMA followed by RF whose PMA is 0.47\% below that of NTK and other classifiers are all below 94.6\%. An interesting observation is that NTK, NN with NTK initialization and RF have small standard deviation (5.17\%, 5.89\% and 5.30\%) whereas all other classifiers have much larger standard deviation. \paragraph{Computation time.} \paragraph{List of UCI data sets.} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN). \label{tab:UCIfull}} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the past decade, we have witnessed the impressive performance of Deep Learning (DL) in the fields of computer vision \cite{}, audio \cite{} and natural language processing \cite{}. But it is still widely believed that DL is irrelevant for tabular data. It may seem strange at first considering that tabular data are "less complex" than image or textual data. This may be due to the fact that there is no clearly identified best practice architecture to tackle tabular data with DL. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. Another limitation of DL that held back its use on tabular data is the handling of categorical data. An important line of work mostly focused on better pre-processing of categorical features for DNN \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. Encoding techniques, $e.g$ entity embeddings \cite{Guo2016}, have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in DL. However, ensemble methods are still considered the best option to handle categorical data \cite{catboost}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their extensive use in Kaggle competitions? Developing a DL solution for tabular data is nonetheless desirable at it can leverage the particular strengths of DL, namely its ability to perform automatic features engineering and end-to-end training via gradient descent. \sout{\textcolor{red}{Moreover, recent work proved that DL is also amenable to online learning \cite{ZhangDu2016cat,SahooPLH18,WANG2021_IncLSTM,?}.}} \textcolor{red}{JE vois pas le lien avec le reste du papier} \section{Related work} The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic. These articles consider mostly classification but rarely regression. \paragraph{Regularization.} Two classical DL regularization strategies are dropout \cite{srivastava2014a} and weight decay. \cite{ZhangDW16} compared dropout with weight decay on tabular data, and found dropout to be better. However, dropout may fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} Fear of the "black box" remains a major obstacle to the wider use of DL. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end via gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-mechanism based neural network architecture have been developed to address the interpretability issue (\cite{NLP,BErt}). Recently \cite{arik2020tabnet} exploited attention-mechanism to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated dataset dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However the resulting architecture cannot be trained end to end resulting in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). Tabnn outperforms standard FCNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, \cite{Popov2020Neural} proposed NODE, a new DNN architecture consisting of differentiable oblivious decision trees which can be trained end-to-end via backpropagation. NODE slightly outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets in regression and binary classification with the number of training samples ranging from $400K$ up to $10.5M$ and the number of features ranging from $11$ to $2000$. \paragraph{Connections with other ML methods.} An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \paragraph{Stabilizing activation function.} \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \paragraph{New loss functions.} A promising line of research proposes to replace the usual quadratic loss used to train DNN by specific losses with interesting properties. For instance, \cite{Shavitt2018} propose the Regularization Learning Networks (RLN). This is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. Our contribution falls in this category. \paragraph{Small data regime.} Hybrid solutions decision trees/DL may outperform ensemble methods on tabular datasets in the large sample regime (\cite{Haldar2019,Popov2020Neural}). However, in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences \sout{but the norm} since collecting samples and assembling large data set may be costly. The DL community has developed successful solutions to handle the small data regime in computer vision tasks \cite{?}. However, to the best of our knowledge, there is no "\textit{pure}" DL solution that beats the gold standard (ensemble methods) on tabular data tasks in the small or medium sample regime. Our paper proposes to fill in this gap. \paragraph{Our contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBFT, XGB, RF) \sout{in average} in regression tasks on the UCI database and several recent large size Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new NN architecture for tabular data but we rather propose a new method to train a standard FCNN. More specifically: \begin{itemize} \item We propose a new end-to-end method to train a standard FCNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach lay mostly in the use of the new \texttt{\,MLR $\,$} loss that we introduced in \cite{MLR} for linear regression tasks. The \texttt{\,MLR $\,$} loss is differentiable and admits some powerful generalizing ability. These two fundamental properties are the main reasons for the success of our approach. \textcolor{red}{The ablation study in Table \ref{} confirms that the MLR loss is the key ingredient of our method with an overall performance improvement of \% on our benchmark.} \item Wide rather than deep architecture which provides stability in the convergence of the gradient descent scheme. \item In our empirical experiments, this method outperformed ensemble methods by ?\% overall on the UCI datasets.\\ in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD Deep neural networks (DNN) have become extremely popular over the last decade for their impressive \sout{\textcolor{red}{state-of-the-art}} \sout{unmatched generalization} performance on several learning tasks: computer vision [1], natural language processing, speech recognition [2], reinforcement learning \cite{Goodfellow-et-al-2016}. However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. Also tabular data are usually of much smaller size than in computer vision. For these reasons, DNN trained by conventional methods under-perform traditional machine learning methods. For example, Kaggle ML competitions on tabular data are mostly won by ensemble methods (RF,GBDT,XGB,...) \cite{(Friedman, 2001; Harasymiv, 2015;Chen & Guestrin, 2016; Ke et al., 2017;Prokhorenkova et al., 2018)}, kernel methods, ?MARS,...? . The small data regime has been extensively studied by the deep learning community for computer vision tasks \cite{???}. This is not yet the case for tabular data although the need arises in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}. Developing deep learning solutions for tabular data is of interest to the Machine Learning community \cite{(Zhou & Feng, 2017; Yang et al.,2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018)}. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. \cite{Friedman2001,Prokhorenkova2018,guestrin2016,Ke2017} \cite{ke2019tabnn,} Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage \section{Related Work} \newpage \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \paragraph{Description and preprocessing.} The benchmark includes the regression datasets from the UCI Machine Learning repository \cite{Delgado14a}. \textcolor{red}{We address below the methodology mistakes highlighted by \citep{bib:Wainberg2016} in the aforementioned paper}. We also added ?7? regression datasets used in Kaggle competitions. The size of the datasets ranges between $?$ and $?$ data points and the number of features from $?$ to $?$. We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} is \textcolor{red}{over-representated} \sout{given far more weight than the other data sets} in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. We ended up with 21 genuinely different regression datasets. Table \ref{} in the Appendix summarizes all the considered regression datasets. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \paragraph{Methods compared.} We use ??? methods with their best possible tuned hyperparameters including NN and the gold standard for tabular data (RF, XGB, ...). See Table ? in the appendix for the exhaustive list of methods and tuning methods. For each method in the benchmark, we use the validation set to perform 5-fold cv on the best designed grid to tune hyperparameters. \begin{table*}[!hp] \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline Bagging MLR & \textbf{?} & \\ \hline RF & \textbf{?} & \\ \hline XGB & \textbf{?} & \\ \hline XRF & \textbf{?} & \\ \hline MLP & \textbf{?} & \\ \hline NN-1 & \textbf{?} & \\ \hline NN-2 & \textbf{?} & \\ \hline NN-3 & \textbf{?} & \\ \hline Kernels & \textbf{?} & \\ \hline MARS & \textbf{?} & \\ \hline CART & \textbf{?} & \\ \hline $\nu$-SVM & \textbf{?} & \\ \hline Ridge & \textbf{?} & \\ \hline LASSO & \textbf{?} & \\ \hline Elastic Net & \textbf{?} & \\ \hline Intercept & \textbf{?} & \\ \hline \end{tabular} \caption{ List of methods with their tuning grid \label{tab:method} } \end{table*} \paragraph{Overall Performance comparisons} Je suggere de s'inspirer de "HARNESSING THE POWER OF INFINITELY WIDE DEEP NETS ON SMALL-DATA TASKS" pour la mise en valeur des resultats. Notamment, il faut calculer les statistiques dans le tableau ci-dessous a partir des resultats brutes des experiences. Il faut faire ce Table 1 pour les performances avec MLR: \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \caption{ Comparisons of ?17? methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. \label{tab:stat_test} } \end{table*} \paragraph{Ablation study} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Noise on last layer & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline NN+Ridge + MLR + Noise on last layer + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation1} } \end{table*} \newpage \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN-MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging NN-MLR & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation2} } \end{table*} \paragraph{Friedman Ranking and Average Accuracy.} NTK is the best (Friedman Rank 28.34, Average Accuracy 81.95\%), followed by RF (Friedman Rank 33.51, Average Accuracy 81.56\%) and then followed by SVM with Gaussian kernel (Friedman Rank 35.76, Average Accuracy 81.03\%). The difference between NTK and RF is significant (-5.17 in Friedman Rank and +0.39\% in Average Accuracy), just as the superiority of RF is significant compared to other classifiers as claimed in \cite{fernandez2014we}. NN (with either He initialization or NTK initialization) performs significantly better than the polynomial kernel in terms of the Average Accuracy (80.88\% and 81.02\% vs. 78.21\%), but in terms of Friedman Rank, NN with He initialization is worse than polynomial kernel (40.97 vs. 38.44) and NN with NTK initialization is slightly better than polynomial kernel (38.06 vs. 38.44). On many datasets where most classifiers have similar performances, NN's rank is high as well, whereas on other datasets, NN is significantly better than most classifiers, including SVM with polynomial kernel. Therefore, NN enjoys higher Average Accuracy but suffers higher Friedman Rank. For example, on \textsc{ozone} dataset, NN with NTK initialization is only 0.25\% worse than polynomial kernel but their difference in terms of rank is 56. It is also interesting to see that NN with NTK initialization performs better than NN with He initialization (38.06 vs. 40.97 in Friedman Rank and 81.02\% vs. 80.88\% in Average Accuracy). \paragraph{P90/P95 and PMA.} This measures, for a given classifier, the fraction of datasets on which it achieves more than 90\%/95\% of the maximum accuracy among all classifiers. NTK is one of the best classifiers (ties with Gaussian kernel on P95), which shows NTK can consistently achieve superior classification performance across a broad range of datasets. Lastly, we consider the Percentage of the Maximum Accuracy (PMA). NTK achieves the best average PMA followed by RF whose PMA is 0.47\% below that of NTK and other classifiers are all below 94.6\%. An interesting observation is that NTK, NN with NTK initialization and RF have small standard deviation (5.17\%, 5.89\% and 5.30\%) whereas all other classifiers have much larger standard deviation. \paragraph{Computation time.} \paragraph{List of UCI data sets.} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN). \label{tab:UCIfull}} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the past decade, we have witnessed the impressive performance of Deep Learning (DL) in the fields of computer vision \cite{}, audio \cite{} and natural language processing \cite{}. But it is still widely believed that DL is irrelevant for tabular data. It may seem strange at first considering that tabular data are "less complex" than image or textual data. This may be due to the fact that there is no clearly identified best practice architecture to tackle tabular data with deep learning. While the needs to handle tabular data arise in many fields (e.g. material science \cite{}, medecine \cite{}, finance \cite{}), deep learning for tabular data remains understudied and underused. Most experiments seem to indicate that ensemble methods are the most reliable on tabular data and often work very well without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. Another limitation of DL that held back its use on tabular data is the handling of categorical data. An important line of work mostly focused on better pre-processing of categorical features for DNN \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. Encoding techniques, $e.g$ entity embeddings \cite{Guo2016}, have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in deep learning. However, ensemble methods are still considered the best option to handle categorical data \cite{catboost}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their extensive use in Kaggle competitions? Developing a DL solution for tabular data is nonetheless desirable at it can leverage the particular strengths of DL, namely its ability to perform automatic features engineering and end-to-end training via gradient descent. Moreover, recent work proved that DL is also amenable to online learning \cite{ZhangDu2016cat,SahooPLH18,WANG2021_IncLSTM,?}. \paragraph{Related work.} The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic. These articles consider mostly classification but rarely regression. Interpretability and fear of the "black box" remain obstacles to the wider use of DL. Attention-mechanism based neural network architecture have been developed to address the interpretability issue (\cite{NLP,BErt}). Recently \cite{arik2020tabnet} exploited attention-mechanism to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a small number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated dataset dependent fine-tuning of the hyperparameters. An interesting line of research proposes to translate/adapt the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. Several recent works propose to combine decision trees with deep learning. DNDT \cite{YangMorillo2018} is a specific neural network architecture that can be trained via end-to-end via gradient descent but can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Tabnn \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). Tabnn outperforms standard FCNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. NODE \cite{Popov2020Neural} is a new DNN architecture consisting of differentiable oblivious decision trees that can be trained end to end via backpropagation. NODE slightly outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets in regression and binary classification with the number of training samples ranging from $400K$ up to $10.5M$ and the number of features ranging from $11$ to $2000$. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end deep learning model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. Regularization Learning Networks (RLN) \cite{Shavitt2018} are a new family of neural networks trained with a new loss, named Counterfactual Loss, together with stochastic gradient descent. RLN perform significantly better than standard DNN but could not beat GBT. \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. SNN does not outperform SVM or Random Forests on the UCI database. ********************************* *********************************\\ \cite{Nazabal2018}\\ ******************************************************************\\ For tabular data in the large sample regime ($n\geq???$), DL methods have made a major breakthrough as it may now outperform ensemble methods on some large dataset (AirBnB []). But success stories are still limited on small to medium size data sets where ensemble methods are still preferred. In many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences but the norm since collecting samples and assembling large data set may be costly. The deep learning community has developed successful solutions to handle the small data regime in computer vision tasks \cite{?,?,?}. However there is no fully satisfying DNN solution for small size tabular data where ensemble methods (XGB, GBD) remain the gold standard \cite{?,?,?,?}. The most common criticisms against deep learning are the high level of expertise required to design architecture and tune hyperparameters as well as the high cost of training. Existing solutions \cite{?,?,?} proposed complex hybrid architectures. Some of these solutions often involve a lot of ad-hoc steps during the training phase \cite{tabnet}. The performance of these methods were not evaluated on very small data sets ($n\lesssim 500$). To the best of our knowledge, there is no "\textit{pure}" deep learning solution for tabular data, that has been proven to perform better in average \sout{in mean} than standard ML Methods \textcolor{red}{both in the small and large sample regimes.} \paragraph{Our contributions.} We propose a "\textit{pure}" deep learning solution that outperforms the gold standard (GBFT, XGB, RF) in average in the regression setting on the UCI database and several recent Kaggle data sets. We did not attempt to design a new DL architecture for tabular data as in the aforementioned works but we rather propose a new method to train standard FCNN. More specifically: \begin{itemize} \item We propose a new end-to-end method to train a standard FCNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach relies on the use of the new \texttt{\,MLR $\,$} loss function introduced in \cite{MLR} which is differentiable with generalizing ability. \item In our empirical experiments, this method outperformed ensemble methods in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD Deep neural networks (DNN) have become extremely popular over the last decade for their impressive \sout{\textcolor{red}{state-of-the-art}} \sout{unmatched generalization} performance on several learning tasks: computer vision [1], natural language processing, speech recognition [2], reinforcement learning \cite{Goodfellow-et-al-2016}. However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. Also tabular data are usually of much smaller size than in computer vision. For these reasons, DNN trained by conventional methods under-perform traditional machine learning methods. For example, Kaggle ML competitions on tabular data are mostly won by ensemble methods (RF,GBDT,XGB,...) \cite{(Friedman, 2001; Harasymiv, 2015;Chen & Guestrin, 2016; Ke et al., 2017;Prokhorenkova et al., 2018)}, kernel methods, ?MARS,...? . The small data regime has been extensively studied by the deep learning community for computer vision tasks \cite{???}. This is not yet the case for tabular data although the need arises in many fields including material sciences \cite{FENG2019300}, digital medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}. Developing deep learning solutions for tabular data is of interest to the Machine Learning community \cite{(Zhou & Feng, 2017; Yang et al.,2018; Miller et al., 2017; Lay et al., 2018; Feng et al., 2018; Ke et al., 2018)}. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. \cite{Friedman2001,Prokhorenkova2018,guestrin2016,Ke2017} \cite{ke2019tabnn,} Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage \section{Related Work} \newpage \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \paragraph{Description and preprocessing} The benchmark includes the regression datasets from the UCI Machine Learning repository \cite{Delgado14a}. \textcolor{red}{We address below the methodology mistakes highlighted by \citep{bib:Wainberg2016} in the aforementioned paper}. We also added ?7? regression datasets used in Kaggle competitions. The size of the datasets ranges between $?$ and $?$ data points and the number of features from $?$ to $?$. We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} is given far more weight than the other data sets in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. We ended up with 21 genuinely different regression problems. Table \ref{} in the Appendix summarizes all the considered regression data sets. The missing values were imputed by basic techniques (the median for numerical features and the mode for categorical features). In the rest of the study, categorical features were treated as numerical features. All numerical features were centered and renormalized. \paragraph{Overall Performance comparisons} Je suggere de s'inspirer de "HARNESSING THE POWER OF INFINITELY WIDE DEEP NETS ON SMALL-DATA TASKS" pour la mise en valeur des resultats. Notamment, il faut calculer les statistiques dans le tableau ci-dessous a partir des resultats brutes des experiences. Il faut faire ce Table 1 pour les performances avec MLR: \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN (NTK init) & ? & ?\%$\pm$?\% & 85.56\% & 60.00\% & ?\% $\pm$5.89\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \caption{ Comparisons of ?17? methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. \label{tab:stat_test} } \end{table*} \paragraph{Ablation study} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Noise on last layer & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline NN+Ridge + MLR + Noise on last layer + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation1} } \end{table*} \newpage \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging MLR & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation2} } \end{table*} \paragraph{Friedman Ranking and Average Accuracy.} NTK is the best (Friedman Rank 28.34, Average Accuracy 81.95\%), followed by RF (Friedman Rank 33.51, Average Accuracy 81.56\%) and then followed by SVM with Gaussian kernel (Friedman Rank 35.76, Average Accuracy 81.03\%). The difference between NTK and RF is significant (-5.17 in Friedman Rank and +0.39\% in Average Accuracy), just as the superiority of RF is significant compared to other classifiers as claimed in \cite{fernandez2014we}. NN (with either He initialization or NTK initialization) performs significantly better than the polynomial kernel in terms of the Average Accuracy (80.88\% and 81.02\% vs. 78.21\%), but in terms of Friedman Rank, NN with He initialization is worse than polynomial kernel (40.97 vs. 38.44) and NN with NTK initialization is slightly better than polynomial kernel (38.06 vs. 38.44). On many datasets where most classifiers have similar performances, NN's rank is high as well, whereas on other datasets, NN is significantly better than most classifiers, including SVM with polynomial kernel. Therefore, NN enjoys higher Average Accuracy but suffers higher Friedman Rank. For example, on \textsc{ozone} dataset, NN with NTK initialization is only 0.25\% worse than polynomial kernel but their difference in terms of rank is 56. It is also interesting to see that NN with NTK initialization performs better than NN with He initialization (38.06 vs. 40.97 in Friedman Rank and 81.02\% vs. 80.88\% in Average Accuracy). \paragraph{P90/P95 and PMA.} This measures, for a given classifier, the fraction of datasets on which it achieves more than 90\%/95\% of the maximum accuracy among all classifiers. NTK is one of the best classifiers (ties with Gaussian kernel on P95), which shows NTK can consistently achieve superior classification performance across a broad range of datasets. Lastly, we consider the Percentage of the Maximum Accuracy (PMA). NTK achieves the best average PMA followed by RF whose PMA is 0.47\% below that of NTK and other classifiers are all below 94.6\%. An interesting observation is that NTK, NN with NTK initialization and RF have small standard deviation (5.17\%, 5.89\% and 5.30\%) whereas all other classifiers have much larger standard deviation. \paragraph{List of UCI data sets} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN). \label{tab:UCIfull}} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was widely believed that DL is irrelevant for tabular data. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods\footnote{\href{https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html}{sklearn/RandomForestRegressor}} are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even undesirable by the nature of the task at hand\footnote{e.g. decision making on a limited amount of cases during a pandemic.} \textcolor{red}{Papier new yorker}. Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{?}. This is due to the lack of transferable domain knowledge between tabular features. To make up for this limitation, an important line of work focuses on pre-processing of categorical features for DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016} which try to capture relationships between categories have become standard in DL libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a DL solution for tabular data is nonetheless desirable at it can leverage the particular strengths of DL, in particular its ability to perform automatic features engineering and end-to-end training via gradient descent. The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,Shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \paragraph{Regularization.} Two classical DL regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{?}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of DL remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end via gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However this architecture cannot be trained end to end, which may result in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). TabNN outperforms standard FCNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, NODE \cite{Popov2020Neural}, a new DNN architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. NODE slightly outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets in regression and binary classification with the number of training samples ranging from $400K$ up to $10.5M$ and the number of features ranging from $11$ to $2000$. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual {\texttt{MSE}} and \texttt{CE} losses used to train DNN by specific losses with interesting properties. In that regard, Regularization Learning Networks (RLN) \cite{Shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. \paragraph{Other approaches.} We also cite Neural Tangent Kernel (NTK)\cite{Arora2020meuf}, Net-DNF \cite{katzir2021netdnf} and Self-Normalized Neural Networks (SNN) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \begin{table*}[!hp] \footnotesize \begin{tabular}{|c|cc|cc|c|} \hline Method & end to end differentiable & hyperparameter tuning & Task & dataset size range & Above GBDT \\ \hline TabNN \cite{ke2019tabnn} & no & hard & Reg/Classif &$15K$ - $7.9M$ & Marginally \\ \hline NODE \cite{Popov2020Neural} & \checkmark & easy & Reg/Classif &$400K$ - $10.5M$ & marginally\\ \hline TabNet \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & $>10K$ & Significantly \\ \hline DNDT \cite{YangMorillo2018} & \checkmark & easy & & & \\ \hline NTK \cite{Arora2020meuf} & \checkmark & & \Clf & 640-60K & No \\ \hline SNN \cite{Klambauer2017} & \checkmark & hard & Reg/Classif & & No\\ \hline Net-DNF \cite{katzir2021netdnf} & \checkmark & & \Clf& & No \\ \hline RLN \cite{Shavitt2018} & \checkmark & easy& Reg & & No \\ \hline MLR & \checkmark & easy & Reg/Classif &$70$ to $10^5$ & Significantly\\ \hline \end{tabular} \caption{ State of the Art \label{tab:SotA} } \end{table*} \paragraph{Contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBDT, XGB, RF) in regression tasks on the UCI database and several recent Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new DNN architecture for tabular data but we rather propose a new method to train a standard FCNN. More specifically: - We propose a new end-to-end method to train a standard FCNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach lay mostly in the use of the new \textbf{Muddling labels for Regularization} loss (\texttt{\,MLR $\,$}) that we introduced in \cite{MLR} for linear regression tasks. The \texttt{\,MLR $\,$} loss is differentiable and admits some powerful generalizing ability. These two fundamental properties are the main reasons for the success of our approach. \textcolor{red}{The ablation study in Table \ref{} confirms that the MLR loss is the key ingredient of our method with an overall performance improvement of \% on our benchmark.} - In our experiments, this method outperformed ensemble methods by ?\% on our aggregated benchmark (UCI+ Kaggle) with dataset size ranging from $n=72$ to $n=43K$ with a focus on very small size datasets. Indeed, we have $16$ datasets with less than $1000$ training samples including $10$ datasets with less than $n<300$ training samples. - Wide architectures provide convergence guarantees of the gradient descent scheme \cite{pmlr-v97-du19a}, but are also more prone to overfitting. The generalizing ability of $\texttt{\,MLR $\,$}$ loss enables us to get all the advantages of wide architectures without the inconveniences. Since there is no longer any tradeoff when choosing the number of neurons per layer, the only limitation is the physical memory capability of GPUs, as wider is better. - We did not do any feature engineering. We only applied a basic pre-processing on the data (standardization, standard imputation of missing data) and one-hot encoding of categorical features. - Our solution can be used as an off-the-shelve method for training a FFNN on any tabular dataset in any field. In that regard, it is an easy and accessible DL solution to researchers and practitioners. \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \newpage \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Les us consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of size $n$ observations, such that $\textbf{x}_i\in\mathbb{R}^d$. We place ourselves in the regression setting, we want to recover the regression function $\textbf{Y}=f^*(\textbf{x})+noise$. In this paper, we consider simple Feed-Forward Neural Networks ({\texttt{FFNN}}) to provide a function $f(\boldsymbol{\theta},\cdot)$ and to learn the value of the parameters $\boldsymbol{\theta}$ that result in the best function approximation. We consider {\texttt{FFNN}} with different size $L\in\{1,\,2,\,3,\,4\}$ of hidden Layers where each layer has $J$ hidden nodes. For an observation $\textbf{x}_i\in\mathbb{R}^d$, we set $A^0=\textbf{x}_i$ and for all $\ell=1,\cdots,L-2$ $$A^{\ell+1}=f_{\ell+1}(A^{\ell}):={\texttt{ReLU}}(W^{\ell+1}A^{\ell} +b^{\ell+1})\quad \text{and}\quad A^L=f_{L-1}(A^{L-1}):=W^LA^{L-1} $$ with $W^1\in\mathbb{R}^{J\times d}$, $W^L\in\mathbb{R}^{J\times 1}$ and $W^{\ell+1}\in\mathbb{R}^{J\times J}$. First note all the hidden layers have same number of neurons $J$. Second we do not take bias in the last layer ($b^L=\boldsymbol{0}$). Set $\boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}$, the ${\texttt{FFNN}}_{\boldsymbol{\theta}}$ is such that for $n$ observations $\textbf{x}\in\mathbb{R}^{n\times d}$ $$\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})= f_{L-1}\circ f_{L-2}\circ\cdots\circ f_2 \circ f_1(\textbf{x})\in\mathbb{R}^{n\times J}. $$ Our aim is to train this ${\texttt{FFNN}}{\boldsymbol{\theta}}$ using only the $train$-set $\mathcal{D}_{train}$ to construct the best approximation function, $\textbf{f}(\boldsymbol{\widehat{\theta}},\cdot)$, with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, to minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-loss} In this paper, we propose a novel loss function : the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss. based on permutations. In order to better understand the construction and the intuitions of this new loss, we will introduce it and modify it step by step until obtaining its final form in definition ?. \paragraph{Step 1.} One of the novelties of this loss is its construction based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way, we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$: $(\pi^t(\textbf{Y}))_{t=1}^T$. The first version of the \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ First highlight that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the considered dataset. Therefore, $T$ is \textbf{not an hyperparameter}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train with our \texttt{MLR}-loss.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})) $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. We this naive approch $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Step 2.} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{x},\textbf{Y})$. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where $\textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}$ denotes the identity matrix with dimensionality implied by context. In addition, $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of models\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})=\textbf{x}\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}^\top(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} where $\textbf{A}^{L-1}$ is applied instead of $\textbf{x}$. \begin{eqnarray} \label{ridge} \textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y} \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x}) \textbf{Y}$ is the close form of the Ridge estimator. $(\pi^t(\textbf{Y}))_{t=1}^T$. Therefore, for$(\pi^t(\textbf{Y}))_{t=1}^T$, $T$ independently drawn permutations of the label vector $\textbf{Y}$, a second version of the \texttt{\,MLR $\,$}-loss is defined as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2. \end{align*} \paragraph{Motivation on the choice Ridge....} From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign. In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \paragraph{Final version : \texttt{\,MLR $\,$}-Loss.} In our approach, we do not apply the \texttt{\,MLR $\,$}-loss on $Y$ but on a noisy version of $Y$. We introduce independent Gaussian noises respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$. Set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$, where $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and for all $t=1,\cdots,T$ $\pi_{\xi}^t(\textbf{Y})=\pi^t(\textbf{Y})+\xi^{t}$, where $\xi^{t}\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$. We underline here that the level of variance $\sigma^2$ is a not an hyperparameter as we use for all dataset the same value : $\sigma=0.03$. We can now state the definition of our novel loss function. \begin{mydef}[\texttt{\,MLR $\,$}-Loss] \label{MLRlossBigsetting} The \texttt{\,MLR $\,$}-loss is defined as For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \end{align*} \end{mydef} \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \textcolor{red}{- comment} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{x}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \paragraph{Description and preprocessing.} The benchmark includes the regression datasets from the UCI Machine Learning repository \cite{Delgado14a}. \textcolor{red}{We address below the methodology mistakes highlighted by \citep{bib:Wainberg2016} in the aforementioned paper}. We also added ?7? regression datasets used in Kaggle competitions. The size of the datasets ranges between $?$ and $?$ data points and the number of features from $?$ to $?$. We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} is \textcolor{red}{over-representated} \sout{given far more weight than the other data sets} in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. We ended up with 21 genuinely different regression datasets. Table \ref{} in the Appendix summarizes all the considered regression datasets. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \paragraph{Methods compared.} We use ??? methods with their best possible tuned hyperparameters including NN and the gold standard for tabular data (RF, XGB, ...). See Table ? in the appendix for the exhaustive list of methods and tuning methods. For each method in the benchmark, we use the validation set to perform 5-fold cv on the best designed grid to tune hyperparameters. \begin{table*}[!hp] \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline Bagging MLR & \textbf{?} & \\ \hline RF & \textbf{?} & \\ \hline XGB & \textbf{?} & \\ \hline XRF & \textbf{?} & \\ \hline MLP & \textbf{?} & \\ \hline NN-1 & \textbf{?} & \\ \hline NN-2 & \textbf{?} & \\ \hline NN-3 & \textbf{?} & \\ \hline Kernels & \textbf{?} & \\ \hline MARS & \textbf{?} & \\ \hline CART & \textbf{?} & \\ \hline $\nu$-SVM & \textbf{?} & \\ \hline Ridge & \textbf{?} & \\ \hline LASSO & \textbf{?} & \\ \hline Elastic Net & \textbf{?} & \\ \hline Intercept & \textbf{?} & \\ \hline \end{tabular} \caption{ List of methods with their tuning grid \label{tab:method} } \end{table*} \paragraph{Overall Performance comparisons} Je suggere de s'inspirer de "HARNESSING THE POWER OF INFINITELY WIDE DEEP NETS ON SMALL-DATA TASKS" pour la mise en valeur des resultats. Notamment, il faut calculer les statistiques dans le tableau ci-dessous a partir des resultats brutes des experiences. Il faut faire ce Table 1 pour les performances avec MLR: \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \caption{ Comparisons of ?17? methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. \label{tab:stat_test} } \end{table*} \paragraph{Ablation study} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Noise on last layer & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline NN+Ridge + MLR + Noise on last layer + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation1} } \end{table*} \newpage \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN-MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging NN-MLR & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation2} } \end{table*} \paragraph{Friedman Ranking and Average Accuracy.} NTK is the best (Friedman Rank 28.34, Average Accuracy 81.95\%), followed by RF (Friedman Rank 33.51, Average Accuracy 81.56\%) and then followed by SVM with Gaussian kernel (Friedman Rank 35.76, Average Accuracy 81.03\%). The difference between NTK and RF is significant (-5.17 in Friedman Rank and +0.39\% in Average Accuracy), just as the superiority of RF is significant compared to other classifiers as claimed in \cite{fernandez2014we}. NN (with either He initialization or NTK initialization) performs significantly better than the polynomial kernel in terms of the Average Accuracy (80.88\% and 81.02\% vs. 78.21\%), but in terms of Friedman Rank, NN with He initialization is worse than polynomial kernel (40.97 vs. 38.44) and NN with NTK initialization is slightly better than polynomial kernel (38.06 vs. 38.44). On many datasets where most classifiers have similar performances, NN's rank is high as well, whereas on other datasets, NN is significantly better than most classifiers, including SVM with polynomial kernel. Therefore, NN enjoys higher Average Accuracy but suffers higher Friedman Rank. For example, on \textsc{ozone} dataset, NN with NTK initialization is only 0.25\% worse than polynomial kernel but their difference in terms of rank is 56. It is also interesting to see that NN with NTK initialization performs better than NN with He initialization (38.06 vs. 40.97 in Friedman Rank and 81.02\% vs. 80.88\% in Average Accuracy). \paragraph{P90/P95 and PMA.} This measures, for a given classifier, the fraction of datasets on which it achieves more than 90\%/95\% of the maximum accuracy among all classifiers. NTK is one of the best classifiers (ties with Gaussian kernel on P95), which shows NTK can consistently achieve superior classification performance across a broad range of datasets. Lastly, we consider the Percentage of the Maximum Accuracy (PMA). NTK achieves the best average PMA followed by RF whose PMA is 0.47\% below that of NTK and other classifiers are all below 94.6\%. An interesting observation is that NTK, NN with NTK initialization and RF have small standard deviation (5.17\%, 5.89\% and 5.30\%) whereas all other classifiers have much larger standard deviation. \paragraph{Computation time.} \paragraph{List of UCI data sets.} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN). \label{tab:UCIfull}} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{Conclusion} \newpage \section{Annexe} \subsection{Discussion of the State of the Art} An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning (DL) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was widely believed that DL is irrelevant for tabular data. It may seem strange at first considering that tabular data \textcolor{red}{appears at first less complicated to handle} \sout{are "less complex"} than image or textual data. This may be due to the fact that there is no clearly identified best practice architecture to tackle tabular data with DL. Another limitation of DL that held back its use on tabular data is the handling of categorical data. While the needs to handle tabular data arise in many fields (e.g. material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), DL for tabular data remains understudied and underused. Most experiments seem to indicate that ensemble methods are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training DL models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters. An important line of work mostly focused on better pre-processing of categorical features for DL \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. Nowadays, entity embeddings \cite{Guo2016} have become standard in DL libraries (Keras, PyTorch and FastAI) and make it possible to capture relationships between categories in DL. However, ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. So, why use DL on tabular data when standard ML methods work well or better as evidenced by their extensive use in Kaggle competitions? Developing a DL solution for tabular data is nonetheless desirable at it can leverage the particular strengths of DL, namely its ability to perform automatic features engineering and end-to-end training via gradient descent. The growing number of articles on tabular data in recent years shows the increasing interest of the DL community in this topic. These articles consider mostly classification but rarely regression. \paragraph{Regularization.} Two classical DL regularization strategies are dropout \cite{srivastava14a} and weight decay. \cite{ZhangDW16} compared dropout with weight decay on tabular data, and found dropout to be better. However, dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} Fear of the "black box" remains a major obstacle to the wider use of DL. DNDT \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end via gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However DNDT is not scalable w.r.t. the number of features and does not outperform Random Forests or standard NN on the UCI database. Attention-Mechanism (AM) has boosted DL performance on a range of NLP tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that AM can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited AM to develop TabNet, an interpretable DL method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with DL. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of random forests or GBDT ensembles. However the resulting architecture cannot be trained end to end resulting in potentially inferior performance. TabNN \cite{ke2019tabnn} is a hybrid machine learning algorithm using Gradient Boosted Decision Trees (GBDT) and Deep Neural Networks (DNN). Tabnn outperforms standard FCNN but the improvement over GBDT seems marginal in their experiments on 6 data sets ranging in size from $15K$ up to $7.9M$ training samples. More recently, \cite{Popov2020Neural} proposed NODE, a new DNN architecture consisting of differentiable oblivious decision trees which can be trained end-to-end via backpropagation. NODE slightly outperforms ensemble methods (Catboost, XGBoost) on 4 out of 6 large size tabular data sets in regression and binary classification with the number of training samples ranging from $400K$ up to $10.5M$ and the number of features ranging from $11$ to $2000$. \paragraph{Connections with other ML methods.} An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted FFNN as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized FFNN on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \paragraph{Stabilizing activation function.} \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \paragraph{New loss functions.} A promising line of research proposes to replace the usual quadratic loss used to train DNN by specific losses with interesting properties. For instance, \cite{Shavitt2018} propose the Regularization Learning Networks (RLN). This is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. RLN performs significantly better than standard DNN but could not beat GBDT. Our contribution falls in this line of research. \paragraph{Small data regime.} Hybrid solutions decision trees/DL may outperform ensemble methods on tabular datasets in the large sample regime (\cite{Haldar2019,Popov2020Neural}). However, in many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{?}, small and even very small samples ($n\lesssim 500$) are not rare occurrences \sout{but the norm} since collecting samples and assembling large data set may be costly. The DL community has developed successful solutions to handle the small data regime in computer vision tasks \cite{Oquab_2014_CVPR}. However, to the best of our knowledge, there is no "\textit{pure}" DL solution that beats the gold standard (ensemble methods) on tabular data tasks in the small or medium sample regime. Our paper proposes to fill in this gap. \paragraph{Contributions.} We propose a pure deep learning solution that outperforms the gold standard (GBDT, XGB, RF) in regression tasks on the UCI database and several recent large size Kaggle datasets. Contrarily to most of the aforementioned works, we did not attempt to design a new DNN architecture for tabular data but we rather propose a new method to train a standard FCNN. More specifically: \begin{itemize} \item We propose a new end-to-end method to train a standard FCNN using Adam gradient descent without any ad-hoc steps during the training. The novelty of our approach lay mostly in the use of the new \textbf{Muddling labels for Regularization} loss (\texttt{\,MLR $\,$}) that we introduced in \cite{MLR} for linear regression tasks. The \texttt{\,MLR $\,$} loss is differentiable and admits some powerful generalizing ability. These two fundamental properties are the main reasons for the success of our approach. \textcolor{red}{The ablation study in Table \ref{} confirms that the MLR loss is the key ingredient of our method with an overall performance improvement of \% on our benchmark.} \item \textcolor{red}{Wide rather than deep architecture which provides convergence guarantees of the gradient descent scheme \cite{pmlr-v97-du19a}. However, wide NN are also prone to overfitting. Regularization techniques need to be implemented for successful training but this is a delicate operation that often requires data dependent fine-tuning of hyperparameters. On the contrary, we completely circumvent this issue by using the \texttt{\,MLR $\,$} loss instead. The resulting training method is fully automatic.} \item In our empirical experiments, this method outperformed ensemble methods by ?\% overall on the UCI datasets.\\ in average on real tabular data sets for sample size ranging from $n=$ to $n=$. \item Our method does not requires any feature engineering. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \item Our solution provides a simple, fully automatic recipe for training a FFNN on tabular data. \textcolor{red}{Consequently} \sout{In that sense}, our method can be readily implemented on any tabular dataset. - standard ADAM gradient descent with defaults parameters. \item Fast ? \item GPU ? \end{itemize} \section{Ablative study} Here we summarize the details of our training protocol. \paragraph{batch} As for existing DNN architectures, NODE is trained end-to-end via mini-batch SGD However there is no \textcolor{red}{\sout{clearly identified} clear best practice} \sout{dominant} DNN architecture to tackle tabular dataset learning tasks. This may due to specificities of real life tabular data sets. For instance, they typically contain mixed and possibly heterogeneous features. Measurement errors or missing values in features often have a dramatic impact on the trained models. The main goal of this paper to present a new end-to-end DNN architecture that outperforms ensemble methods on tabular data even on small data sets. Our method leverages well-known machine learning techniques as well as several original ideas. Description: - Pour la regression, nouvelle loss+method pour train le FFNN. - La loss = permutation based penalized MSE penalisé par mesure de l'overffiting intrudouit (papier permuation vu comme mesure de l'overfitting \cite{zhang2016understanding}) Petit jeux de données: solutions - Rep+ bruit - Introduire l'idée des méthodes ensemblistes de reduction de variance (comme les RF) grace à du bagging sur des FFNN qui sont train avec très peu d'iteration pour eviter l'overffiting - Contributions: - Expliquer l'initiative de creer plus de jeux de donnees pour la regression ? Bentchmak propre sur la reg UCI+ autre qui contient des features aussi bien catégoriel que numérique - that is end-to-end differentiable and can use multi-layer representation learning - Size: from very small to relatively large data size ($n=72$ to $?$) - Novel Loss that help to avoid overfitting and thus may be useful in other settings (see notre papier) - Method rigoureuse replicable pour tuner les hyperparmetres - Another minor contribution is to design a clean regression benchmark for tabular data (including categorical and numerical heterogeneous features). This benchmark elaborates and corrects the previous benchmark of Delgado based on UCI database and include some additional data sets The rest of the paper is organized as follows. Related work - des methodes qui marchent (RF,....) ( Pour les données tabular la dataugmentation, le transfer n'ont pas sens - regularisation (penalité L2, L1, ridge mais sur les poids) - early stopping - dropout (petit dataset mais pas trop petit >500) \cite{srivastava14adrop} - la meuf (classif UCI peit dataset <5000) \cite{Arora2020meuf} - petit garcon (DNF class n>10000) \cite{katzir2021netdnf} - les connards (classif +reg+ gros jeu de données> 50K) \cite{Popov2020Neural} - Moderna : (classif, derniere couche pour faire des sub-NN, petit data set n=10 a n=67557, L=10, J=100, adan 20 epochs) \cite{Olson2018moderna} Delgado \cite{DELGADO201911} \newpage Specific DNN for tabular data. While a number of prior works propose architectures designed for tabular data (Ke et al., 2018; Shavitt & Segal, 2018), they mostly do not compare with the properlytuned GBDT implementations, which are the most appropriate baselines. The recent preprint (Keet al., 2018) reports the marginal improvement over GBDT with default parameters, but in ourexperiments, the baseline performance is much higher. To the best of our knowledge, our approach is the first to consistently outperform the tuned GBDTs over a large number of datasets. PLAN: - bien connu que l'on a beacuou de donnees, on peut prendre des reseaux de neurones tres grandet et bonne generalisaytion sans beaucoup de contraintes - petits jeux de donnees en image: transfer, data augmentation, drop out, early stopping, bagging, .... ces methodes sont efficaces en image. - Mais pour les donnees tabulaires, la literature pas fournie. Domaines: Metaux, medecine, environnement, recuperer les donnees coutent cher et il est necessaire de trouver des methodes pour les predictions. - Ils utilisent des methodes ensemblistes (RF et affiliees, voire methodes lineaire econometriques) qui sont connues pour bien fonctionner (Goldmark) - Domaine du deep: methodes drop-out utilisee sur les petits data sets. Utilisee comme une methode ensembliste. Limites du drop-out: generer beaucoup de reseaux de neurones differents pour reduire la variance. - Resampling: Faire des forets de perceptrons. \newpage \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}} \subsection{Matrix form notations} Consider $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be $train$-set of $n=|obs.|$ observations. Let describe our {\texttt{FFNN}}, for all observations $i\in \llbracket1,n \rrbracket$ \textbf{Input} : $A^0=\textbf{x}_i\in\mathbb{R}^{{\texttt{input}}}$ \begin{align*} A^{1}&={\texttt{ReLU}}(W^{1} \underset{{\texttt{input}} .}{\odot} A^0+b^1),\quad\text{where}\quad W^1\in\mathbb{R}^{{\texttt{hidden}}_1\times{\texttt{input}}},\,\,b^1\in\mathbb{R}^{{\texttt{hidden}}_1}\\ A^{\ell+1}&={\texttt{ReLU}}(W^{\ell+1} \underset{{\texttt{hidden}}_\ell.}{\odot} A^\ell +b^{\ell+1}),\quad\text{where}\quad W^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}\times{\texttt{hidden}}_{\ell}},\,\,b^{\ell+1}\in\mathbb{R}^{{\texttt{hidden}}_{\ell+1}} \end{align*} \textbf{Output} : $A^L=W^L\underset{{\texttt{hidden}}_{L-1}.}{\odot} A^{L-1}$, and $W^{L}\in\mathbb{R}^{{\texttt{hidden}}_L\times{\texttt{out}}}$ First note $\forall\ell$, the hidden layers $\ell$ have same number of neurons $|{\texttt{hidden}}_\ell|=J$. Second we take $b^L=\boldsymbol{0}$. The previous notations have been defined for one observation $\textbf{x}_i$ as $A^0=\textbf{x}_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Set $$ \boldsymbol{\theta}=\{W^0,\ldots,W^{L-1},b^0,\ldots,b^{L-1}\}, $$ we define \begin{eqnarray} \label{ALm1} \textbf{A}^{L-1}=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{X})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times {\texttt{hidden}}}, \end{eqnarray} where $\textbf{X}=(\textbf{x}_1,\ldots,\textbf{x}_n)\in\mathbb{R}^{n\times {\texttt{input}}}$. Train this ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the $train$-set $\mathcal{D}_{train}$ (${\texttt{FFNN}}(\boldsymbol{\widehat{\theta}},\cdot)$) with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{u}_i,Z_i)\}_{i=1}^m$, that is, minimize $$ {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{test}) = \frac1m \sum_{i=1}^m (f(\boldsymbol{\widehat{\theta}},\textbf{u}_i) - Z_i)^2. $$ A naive unregularized training method consists in minimizing the objective function ${\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train})$. This approach is prone to overfitting. An \textbf{classical deep learning approach} is to minimize $$ {\texttt{MSE}}_{f,\texttt{pen}}\left(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}\right) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) + \texttt{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). # \subsection{\texttt{\,MLR $\,$}-cost/loss} In this paper, we propose instead the \textbf{Muddling Label Regularization} (\texttt{\,MLR $\,$}) loss function based on permutations. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ For $T\geq 1$ a fixed number, consider $T$ random permutations (drawn uniformly at random) of $n$ elements. Therefore, we construct $T$ artificial/permuted $\,train$-sets to define our \texttt{\,MLR $\,$}-loss. The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by ${\textbf{Perm}}=(\pi^t)_{t=1}^T$ . \begin{mydef}[\texttt{\,MLR $\,$}-loss] \label{def:MLR} The \texttt{\,MLR $\,$}-loss is defined as $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \frac{1}{T}\sum_{t=1}^T {\texttt{MSE}}_f(\boldsymbol{\theta};\pi^t(\ensuremath{\mathcal{D}}_{train})). $$ $$ \texttt{\,MLR $\,$}_f(\boldsymbol{\theta};\mathcal{D}_{train}) = {\texttt{MSE}}_f(\boldsymbol{\theta};\mathcal{D}_{train}) - \underset{perm.}{{\texttt{mean}}}\left( {\texttt{MSE}}_f(\boldsymbol{\theta};{\textbf{Perm}}(\ensuremath{\mathcal{D}}_{train}))\right). $$ \end{mydef} Note that the \texttt{\,MLR $\,$}-loss is computed using only $\mathcal{D}_{train}$. No additional data is used to compute it. \paragraph{Discussion on why perm are usuful==Regularization} These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no \textcolor{red}{hard} optimization or tuning} is done on the construction of these permutations. \sout{Indeed, when $T$ is large enough (e.g. $T=100$)},\textcolor{red}{The choice of $T$ is done by CV on very small grid (will be discuss in section~\ref{}}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. \sout{In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$}-loss. - Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$}-loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}-loss. } When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. That means that $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$. Therefore, predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}-loss. \textcolor{red}{ The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual ${\texttt{MSE}}$ while the second term is the ${\texttt{MSE}}$ on the permuted labels. $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. Note that the $\texttt{\,MLR $\,$}$ loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } \paragraph{How not train \texttt{MLR}-{\texttt{FFNN}}.} Applying $\texttt{\,MLR $\,$}$ to {\texttt{FFNN}} is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}= \quad \underset{\lambda}{\arg\min}\; {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}(\lambda);(\mathcal{D}_{train}))- {\texttt{MSE}}_f(\boldsymbol{\widehat{\theta}}_{\pi}(\lambda);{\textbf{Perm}}(\mathcal{D}_{train})), $$ with $\boldsymbol{\widehat{\theta}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\mathcal{D}_{train}) $ and $ \widehat{\bm\theta}_{{\textbf{Perm}}}(\lambda) = \underset{\boldsymbol{\theta}}{\arg\min}\, {\texttt{MSE}}_f(\boldsymbol{\theta},\lambda;\pi(\mathcal{D}_{train})) $. } \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi^t(\textbf{Y}) . This is something we do not want to do for obvious reasons. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion should rather be used to tune simultaneously a common set of regularization parameters}. \paragraph{Our approach} To present our approach, let us define the following quantities based on the $train$-set $\ensuremath{\mathcal{D}}_{train}=(\textbf{X},\textbf{Y})$: for $\lambda>0$ \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{X})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n \end{eqnarray} where in this paper $\ensuremath{\mathbb{I}}$ denote the identity matrix with dimensionality implied by context In addition, we assume that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta}$. In our approach we take $f(\boldsymbol{\theta},\lambda,\ensuremath{\mathcal{D}}_{train})$ in the Ridge family of model/estimator. Indeed, we can write \begin{eqnarray} \label{ridge} \textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}&=&\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X})\textbf{Y}=\textbf{A}^{L-1}\beta(\boldsymbol{\theta},\lambda,\textbf{Y}), \end{eqnarray} where $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{X}) \textbf{Y}$ is the close form of the Ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to $\textbf{A}^{L-1}$ instead of $\textbf{X}$. Therefore, we can define the \texttt{\,MLR $\,$} loss as follow \begin{mydef}[\texttt{\,MLR $\,$} -loss/cost] \label{MLRloss1} \noindent\\ Let ${\textbf{Perm}}(\textbf{Y})\in\mathbb{R}^{n\times T}$ be $T$ permutations of $\textbf{Y}$. We define the \texttt{\,MLR $\,$}-loss as follows \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{norm^2}\left(\textbf{Y}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}\right)- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left({\textbf{Perm}}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}( \textbf{Y})\right)\right) \end{align*} The \texttt{\,MLR $\,$}-{\texttt{FFNN}}\, is such that $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$. \end{mydef} \paragraph{Motivation on the choice Ridge....} \textcolor{red}{ From a computational perspective, the over-cost of using MLR is marginal. We only need to compute $\textbf{A}^{L-1}$ once. We apply a matrix inversion instead of a matrix multiplication on the last layer. Thanks to parallelism \cite{} this is not costly (l'argument complexité papier 1) and differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by a matrix ${\textbf{Perm}}(\textbf{Y}_t)$ instead of a vector $\textbf{Y}$, so the addition of the permuted term is also quite benign.} \textcolor{red}{In this paper, $\textbf{A}^{L-1}$ corresponds to the output of the last hidden layer of our ${\texttt{FFNN}}$. Since this neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, $\textbf{A}^{L-1}$ is a $n\times J$ matrix. In our case, we will use a very basic architecture, with a width of $J$ on each hidden layer, a ReLU activation function between each layer. Also, there is no other additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, no weight decay, etc...). } \textcolor{red}{To this end, we leverage several generalization schemes. } \textcolor{red}{First, label permutation is used to produce a control set $(\textbf{x},{\textbf{Perm}}(\textbf{Y}))$ that can only be fitted through memorization. Second,} Ridge plays an important role too. Indeed, if we used the OLS instead of the Ridge to define $\texttt{\,MLR $\,$}$, overfitting would cancel out both bias terms. In that case $\texttt{\,MLR $\,$}$ would be completely uninformative. Because we use the Ridge to define $\texttt{\,MLR $\,$}$ with a value of $\lambda$ that is neither to small nor too large, $\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the two MSE terms in $\texttt{\,MLR $\,$}$. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes. \textcolor{red}{$\texttt{\,MLR $\,$}$ is actually equal to the difference of the biases of the Ridge applied on initial and permuted labels. Maximizing this difference of biases leads the $\textbf{NN}$ to perform a trade-off that steers the model towards a solution which generalizes.} \textcolor{red}{From an optimization perspective, $\textbf{NN}$ releases the need for bi-level optimization thanks to the use of the close form ridge estimator on the last hidden layer. Also, the gradient descent on $\textbf{NN}$ flows smoothly towards a satisfying solution even though $\textbf{NN}$, like standard ${\texttt{FFNN}}$, does not have a convex gradient landscape. In practice, we observed in our numerical experiments \ref{fig:} that $\textbf{NN}$ reduces the number of iterations required to converge and reduces the oscillations of the loss at each step. } \textcolor{red}{Commentaires loss: Ca marche pour T=0} \bigskip \textbf{In practice}, we distinguish two different settings according to the number of neurons $|{\texttt{hidden}}|=J$: the Small data setting ($n\leq J$) and the large enough data setting ($n>J$). For these two different settings, we use a different and adapted \texttt{\,MLR $\,$}-loss (Definition~\ref{MLRlossBigsetting} and \ref{MLRlossSmallsetting}). In our approach, we may apply the \texttt{\,MLR $\,$}-loss not on $\textbf{Y}$ but possibly on a noisy version of $\textbf{Y}$. \paragraph{\textcolor{red}{Discussion on noise in the target.}} \textcolor{red}{- diffusion , stabilité....} \paragraph{Setting $n>J$.} We introduce independent Gaussian noises $\epsilon\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ and $\xi\sim\ensuremath{\mathcal{N}}(\boldsymbol{0},\sigma^2\ensuremath{\mathbb{I}})$ respectively in the target $\textbf{Y}$ and its permuted versions $\pi^t(\textbf{Y})$ The level of variance $\sigma^2$ is a hyperparameter that will be discussed in section~\ref{}. \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n>J$] \label{MLRlossBigsetting} For $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and ${\textbf{Perm}}_{\xi}(\textbf{Y})={\textbf{Perm}}(\textbf{Y})+\xi$, we define \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \| \textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\epsilon}\|_n^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\xi}(\textbf{Y}))\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\epsilon}-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\epsilon}\right)- \underset{perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\xi}(\textbf{Y})-\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\xi}(\textbf{Y})\right)\right). \end{align*} \end{mydef} \paragraph{Setting $n\leq J$.} When the number $n$ of observations is smaller than the number of neurons $J$. Some adaptation are needed. \begin{enumerate} \item We duplicate $r$ times the vector $\textbf{Y}$ and we add to the resulted matrix a gaussian noise $\boldsymbol{\epsilon}$ of mean $\boldsymbol{0}$ (denote the zero with dimensionality implied by context) and of variance $\sigma^2\ensuremath{\mathbb{I}}$. The resulted matrix is denoted by \begin{eqnarray} \label{Rep} \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}={\texttt{repeat}}(\textbf{Y},r,\dim=1)+\boldsymbol{\epsilon}\in\mathbb{R}^{n\times r}. \end{eqnarray} \item We perform $r$ different permutations on the $r$ copies of $\textbf{Y}$, and then we add an independent new a centered gaussian noise $\boldsymbol{\xi}$ of variance $\sigma^2\ensuremath{\mathbb{I}}$. We repeat the previous step $T$ times: \begin{eqnarray} \label{RepPerm} {\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})={\textbf{Perm}}({\texttt{repeat}}(\textbf{Y},r,\dim=1))+\boldsymbol{\xi}\in\mathbb{R}^{n\times r\times T}. \end{eqnarray} \end{enumerate} \begin{mydef}[\texttt{\,MLR $\,$}-Loss/cost when $n\leq J$] \label{MLRlossSmallsetting} \noindent\\ For $\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}$ and ${\textbf{Perm}}_{\boldsymbol{\xi},{\texttt{rep}}}(\textbf{Y})$ defined respectively in \eqref{Rep} and \eqref{RepPerm}, we define \begin{eqnarray*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=& \frac 1r\sum_{k=1}^r\| \textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_k}-\frac 1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}_j}\|_n^2\nonumber\\ &&-\frac{1}{rT}\sum_{t=1}^T\sum_{k=1}^r\| \pi^t_{\boldsymbol{\xi},{\texttt{rep}}_k}(\textbf{Y})-\frac1r\sum_{j=1}^r\textbf{H}(\boldsymbol{\theta},\lambda)\pi^t_{\boldsymbol{\xi},{\texttt{rep}}_j}(\textbf{Y})\|_n^2\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &=&\underset{rep.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left(\textbf{Y}_{\boldsymbol{\epsilon},{\texttt{rep}}}-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot} \textbf{Y}_{\boldsymbol{\epsilon}}\right)\right)\right)-\nonumber\\ &&\underset{rep.,\,perm.}{{\texttt{mean}}}\left(\underset{obs.}{{\texttt{norm}}^2}\left({\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})-\underset{rep.}{{\texttt{mean}}}\left(\textbf{H}(\boldsymbol{\theta},\lambda)\underset{obs.}{\odot}{\textbf{Perm}}_{\boldsymbol{\xi}}(\textbf{Y})\right)\right)\right), \end{eqnarray*} \end{mydef} \paragraph{\textcolor{red}{Discussion on rep.}} \textcolor{red}{- comment} \sout{\textcolor{red}{Commentaires loss: on rajoute du bruit sur les labels. Repetition des donnees.}}\\ \sout{\textcolor{red}{Third, we repeat the observations}}\\ \sout{\textcolor{red}{Forth we add random gaussian noize }} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} \begin{mydef}[\texttt{\,MLR $\,$} neural net ] \label{def:MLRnet} The MLR neural net is $$ \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot) =\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \, \beta(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y})=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{X}) \textbf{Y} $$ with $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)$ where $\texttt{\,MLR $\,$}$ is defined in Definition~\ref{MLRlossBigsetting} for the $n>J$ setting or Definition~\ref{MLRlossSmallsetting} for the $n\leq J$ setting. \end{mydef} \textcolor{red}{PARLER du fait que l'on fait du batch}. \newpage \section{\texttt{\,MLR $\,$}-{\texttt{FFNN}} Experiments} \subsection{Implementation} \subsubsection{Pesudo Algo} A MODIFIER \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\boldsymbol{\theta} \quad (\text{Xavier initialization})\\ \textbf{\texttt{set}}\lambda \quad (\text{as in Eq. \eqref{eq:laminit}})\\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < max_{iter} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{X}\\ \textbf{{for}} \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{P}^{\ell}\odot\textbf{A}^{\ell-1} +b^{\ell})\\ \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) -> ||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda))\textbf{Y}||^2 - \frac{1}{T}\sum_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \textbf{H}(\boldsymbol{\theta},\lambda)){\textbf{Perm}}^{t}(\textbf{Y})||^2\\ \textbf{Backpropagate} (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ \end{mdframed} $$ Y_{\epsilon} $$ detail backpropagate. \subsubsection{Architecure intitialisation} \begin{mdframed} \underline{\textbf{Xavier initialisation, $\ell\in\llbracket1,L-1 \rrbracket$}} \medskip - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $|{\texttt{hidden}}_\ell|=J$. - $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. - The entries of $W^\ell$ are generated independently from the uniform distribution on $\ensuremath{\mathcal{U}}_\ell$ \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{U}}_1=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+J)}},\sqrt{\frac{6}{(|{\texttt{input}}|+J)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{U}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \item[$\bullet$] $\ensuremath{\mathcal{U}}_L=\left(-\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}},\sqrt{\frac{6}{(|{\texttt{input}}|+|{\texttt{out}}|)}}\right)$ \end{itemize} \end{mdframed} \subsubsection{Initialisation of $\lambda$} The initialization of the Ridge parameter $\lambda$ is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Also, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task,... However, we found a very efficient heuristic to pick an appropriate initial value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. To the initialize $\lambda$, we do not attempt to minimize the $\texttt{\,MLR $\,$}$ loss. We rather want to start in a region where the regularization problem is \textit{interesting}. This can be done by maximizing the variations of $\texttt{\,MLR $\,$}$ with respect to $\lambda$: $$ \lambda = \underset{\lambda \in \mathbb{R}_+^*}{\arg\max} \frac{d\texttt{\,MLR $\,$}}{d\lambda}(\lambda) . $$ In practice, we use the grid \begin{eqnarray} \label{grilleLambda} \ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{6 \times k / 40}\;: \; k = 1, \cdots, 40 \right\rbrace \end{eqnarray} and then we choose the initial value $\lambda_{init}$ of $\lambda$ as \begin{equation}\ \label{eq:laminit} \lambda_{init}=\underset{\lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}}{\arg\max} \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right). \end{equation} \subsubsection{Hyperparameters and other initialization} \paragraph{Number of layers.} We consider different size $L$ of layers :$\{1,2,3,4\}$ For each value \paragraph{Number of neurons and layers.} the number of neurons per layer is constant for all layer and is as big as possible , with our computer we choose $J=2^{12}$. \paragraph{Adam algo.} parameter by default \paragraph{Hyperparameters.} The number of permutations $T\in\ensuremath{\mathcal{G}}_T$, the Batch size $b_s\in\ensuremath{\mathcal{G}}_{b_s}$, the value of $\sigma^2\in\ensuremath{\mathcal{G}}_{\sigma^2}$, the number of replications $r\in\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ and the learning rate ${\texttt{$\ell_r$}}\in\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ are tuned by CV on the grid $$\ensuremath{\mathcal{G}}=\ensuremath{\mathcal{G}}_T \times \ensuremath{\mathcal{G}}_{\sigma^2}\times\ensuremath{\mathcal{G}}_{{\texttt{rep}}}\times\ensuremath{\mathcal{G}}_{b_s}\times\ensuremath{\mathcal{G}}_{\lambda} $$ where the set are define in the Table below. For this step, we set a $\max_{iter}^{CV}$ and a fix budjet time ${\texttt{FixB}}$. \begin{tabular}{|l|c|c|c|c|} \hline Setting & $\ensuremath{\mathcal{G}}_T$ & $\ensuremath{\mathcal{G}}_{\sigma^2}$ & $\ensuremath{\mathcal{G}}_{{\texttt{rep}}}$ & $\ensuremath{\mathcal{G}}_{b_s}$\\ \hline $n>J$ & $\left\{ 0;1;2^5;2^8;2^{10}\right\}$ & $\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$ & $\left\{ 1\right\}$ & $\left\{ 2^9;2^{10};2^{11}\right\}$\\ \hline $n\leq J$ & $\left\{ 0;1;2^5;2^8\right\}$ &$\left\{0;10^{-3};10^{-2} ;10^{-3/2}\right\}$&$\left\{ 1;2;8;\lfloor J/n \rfloor\right\}$ &$\left\{ \lfloor n/16 \rfloor;\lfloor n/8 \rfloor;\lfloor n/4\rfloor\right\}$\\ \hline \hline & $\ensuremath{\mathcal{G}}_{{\texttt{$\ell_r$}}}$ & $\max_{iter}^{CV}$ &{\texttt{FixB}}^{CV}&\\ \hline $n>J$ & $\left\{ 10^{-3};10^{-3,5} ;10^{-4}\right\}$ & 200&4min&\\ \hline $n\leq J$ & $\left\{ \right\}$ & 50&3min&\\ \hline \end{tabular} \subsubsection{ARRET} MIN (RMSE DU TRAIN/VALIDATION ; $\max_{ITER}$) with $\max_{ITER}=10^{4}$ \subsubsection{Inversion GPU, parralélisation, set up} \subsection{Datasets} \subsection{Preprocessing} \paragraph{Pre-processing} - expliquer avec des mots comment Features pre-processing EN UTILISANT LE NOM DES FUNCTIONS ET EN RAPPELANT RAPIDEMENT CE QU'ELLE FONT MAIS RAPIDEMENT ET RENVOYER A L'ANNEXE POUR PLUS DE DETAILS, insister sur les données categorielles. - rapidement pour Y \bigskip PRe traitement des features. On choisit quelles données sont traiter Comme reelle et celles qui vont être traiter comme catégorielles. Puis traite ces 2 types de features en faisant appelle aux autres fontions pour finir le pre-process \noindent\\ $ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)\leq2\\ \qquad\textbf{{function-M}}(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-T}}(X_j)\\ \textbf{{else}} \\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ \bigskip \paragraph{Functions UTILISÉE } FAIRE BASCULER CES FUNCTIONS EN ANNEXE \noindent\\ $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} \text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{\textbf{\texttt{sort}}(\textbf{\texttt{set}}($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI FAIT LE Traitement des données manquantes. \noindent\\ $ \begin{array}{l} \textbf{{function-C}}(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip FONCTION QUI Centre et reduit les données reelles et retire les données NAN. \noindent\\ $ \begin{array}{l} \textbf{{function-T}}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip \medskip \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsubsection{Philosophie???????} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \paragraph{Description and preprocessing.} The benchmark includes the regression datasets from the UCI Machine Learning repository \cite{Delgado14a}. \textcolor{red}{We address below the methodology mistakes highlighted by \citep{bib:Wainberg2016} in the aforementioned paper}. We also added ?7? regression datasets used in Kaggle competitions. The size of the datasets ranges between $?$ and $?$ data points and the number of features from $?$ to $?$. We \textcolor{red}{spotted/identified} several redundancies in the UCI database. For instance the data set \texttt{?} was split into 28 sub-datasets according to the \texttt{city} categorical feature, thus artificially increasing the number of regression problems. An ANOVA test revealed that this categorical feature does not have any impact on the target variable. This means that the data set \texttt{?} is \textcolor{red}{over-representated} \sout{given far more weight than the other data sets} in the performance evaluation without any valid reason. Therefore we decided to merge all these sub-datasets into one data set containing all modalities of the \texttt{city} feature. We eliminated similar redundancies for the following datasets: \texttt{}, \texttt{} and \texttt{}. We also eliminated all datasets related to time series. We ended up with 21 genuinely different regression datasets. Table \ref{} in the Appendix summarizes all the considered regression datasets. We only apply a basic pre-processing on the data (standardization, standard imputation of missing data) and elementary encoding of categorical features. \paragraph{Methods compared.} We use ??? methods with their best possible tuned hyperparameters including NN and the gold standard for tabular data (RF, XGB, ...). See Table ? in the appendix for the exhaustive list of methods and tuning methods. For each method in the benchmark, we use the validation set to perform 5-fold cv on the best designed grid to tune hyperparameters. \begin{table*}[!hp] \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline Bagging MLR & \textbf{?} & \\ \hline RF & \textbf{?} & \\ \hline XGB & \textbf{?} & \\ \hline XRF & \textbf{?} & \\ \hline MLP & \textbf{?} & \\ \hline NN-1 & \textbf{?} & \\ \hline NN-2 & \textbf{?} & \\ \hline NN-3 & \textbf{?} & \\ \hline Kernels & \textbf{?} & \\ \hline MARS & \textbf{?} & \\ \hline CART & \textbf{?} & \\ \hline $\nu$-SVM & \textbf{?} & \\ \hline Ridge & \textbf{?} & \\ \hline LASSO & \textbf{?} & \\ \hline Elastic Net & \textbf{?} & \\ \hline Intercept & \textbf{?} & \\ \hline \end{tabular} \caption{ List of methods with their tuning grid \label{tab:method} } \end{table*} \paragraph{Overall Performance comparisons} Je suggere de s'inspirer de "HARNESSING THE POWER OF INFINITELY WIDE DEEP NETS ON SMALL-DATA TASKS" pour la mise en valeur des resultats. Notamment, il faut calculer les statistiques dans le tableau ci-dessous a partir des resultats brutes des experiences. Il faut faire ce Table 1 pour les performances avec MLR: \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \caption{ Comparisons of ?17? methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. \label{tab:stat_test} } \end{table*} \paragraph{Ablation study} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN+Ridge & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN+Ridge + MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline NN+Ridge + MLR + Noise on last layer & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline NN+Ridge + MLR + Noise on last layer + Bagging & ? & 81.03\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & 94.56\% $\pm$8.22\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation1} } \end{table*} \newpage \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Classifier & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline NN & ? & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline Bagging NN & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline NN-MLR & ? & 81.02\%$\pm$14.47\% & 85.56\% & 60.00\% & 94.55\% $\pm$5.89\% \\ \hline Bagging NN-MLR & ? & 81.56\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline \end{tabular} } \caption{ Ablation study on our benchmark. \label{tab:ablation2} } \end{table*} \paragraph{Friedman Ranking and Average Accuracy.} NTK is the best (Friedman Rank 28.34, Average Accuracy 81.95\%), followed by RF (Friedman Rank 33.51, Average Accuracy 81.56\%) and then followed by SVM with Gaussian kernel (Friedman Rank 35.76, Average Accuracy 81.03\%). The difference between NTK and RF is significant (-5.17 in Friedman Rank and +0.39\% in Average Accuracy), just as the superiority of RF is significant compared to other classifiers as claimed in \cite{fernandez2014we}. NN (with either He initialization or NTK initialization) performs significantly better than the polynomial kernel in terms of the Average Accuracy (80.88\% and 81.02\% vs. 78.21\%), but in terms of Friedman Rank, NN with He initialization is worse than polynomial kernel (40.97 vs. 38.44) and NN with NTK initialization is slightly better than polynomial kernel (38.06 vs. 38.44). On many datasets where most classifiers have similar performances, NN's rank is high as well, whereas on other datasets, NN is significantly better than most classifiers, including SVM with polynomial kernel. Therefore, NN enjoys higher Average Accuracy but suffers higher Friedman Rank. For example, on \textsc{ozone} dataset, NN with NTK initialization is only 0.25\% worse than polynomial kernel but their difference in terms of rank is 56. It is also interesting to see that NN with NTK initialization performs better than NN with He initialization (38.06 vs. 40.97 in Friedman Rank and 81.02\% vs. 80.88\% in Average Accuracy). \paragraph{P90/P95 and PMA.} This measures, for a given classifier, the fraction of datasets on which it achieves more than 90\%/95\% of the maximum accuracy among all classifiers. NTK is one of the best classifiers (ties with Gaussian kernel on P95), which shows NTK can consistently achieve superior classification performance across a broad range of datasets. Lastly, we consider the Percentage of the Maximum Accuracy (PMA). NTK achieves the best average PMA followed by RF whose PMA is 0.47\% below that of NTK and other classifiers are all below 94.6\%. An interesting observation is that NTK, NN with NTK initialization and RF have small standard deviation (5.17\%, 5.89\% and 5.30\%) whereas all other classifiers have much larger standard deviation. \paragraph{Computation time.} \paragraph{List of UCI data sets.} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN). \label{tab:UCIfull}} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plain} \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning ({\text{DL}}) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that {\text{DL}}{} is irrelevant for tabular data \cite{videolecture}. While the need to handle tabular data arises in many fields ($e.g.$ material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), {\text{DL}}{} for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods \cite{Denil2014narrow,Delgado14a,Mentch2020Rand,Wainberg2016} are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a,Wainberg2016}. By contrast, training {\text{DL}}{} models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large datasets may be costly, or even impossible by the nature of the task at hand\footnote{$e.g.$ decision making on a limited amount of cases during a pandemic.} Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{shavitt2018}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on the preprocessing of categorical features which was an historical limitation of {\text{DL}}{} \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in {\text{DL}}{} libraries (tensorflow, PyTorch, \textit{etc.}). Meanwhile, tree based ensemble methods and Gradient Boosting Decision Trees ({\texttt{GBDT}}{}) are still considered the best option to handle categorical data \cite{Prokhorenkova2018,Anghel2018Bench,Harasymiv2015_gbdt}. Developing a {\text{DL}}{} solution for tabular data is desirable at it can leverage the particular strengths of {\text{DL}}{}, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the {\text{DL}}{} community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data. $\bm{*}$ uses the UCI database which has some well-known flaws \cite{Arora2020meuf,Klambauer2017,Wainberg2016}.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|cc|c|} \hline Method & End-to-end & Works without & Task & \multicolumn{2}{|c|}{ Benchmark } & Consistently outperforms \\ & differentiable & HP tuning & & \# datasets& Range $n$ & {\texttt{GBDT}} \\ \hline {\texttt{TabNN}}{} \cite{ke2019tabnn} & no & no & Reg/Classif &5&14.8K-7.3M & no\\%14.8K-7.29M \hline {\texttt{NODE}}{} \cite{Popov2020Neural} & \checkmark & no & Reg/Classif &6&500K-11M & no\\%Sometimes\\ \hline {\texttt{TabNet}}{} \cite{arik2020tabnet} & self-supervised & no & Reg/Classif & 4&10K-11M & \checkmark\\%Significantly \\ \hline {\texttt{DNDT}}{} \cite{YangMorillo2018} & \checkmark & \checkmark &\Clf &14& 150-1.1M & no\\ \hline {\texttt{NTK}}{} \cite{Arora2020meuf} & \checkmark & no & \Clf &90\bm{*}& 10-130K & no \\ \hline {\texttt{SNN}} {}\cite{Klambauer2017} & \checkmark & no & Reg/Classif &122\bm{*}& 10-130K & no\\ \hline {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} & no & \checkmark & \Clf& 6&9.8K-200K &no\\% rarely \\ \hline {\texttt{RLN}}{} \cite{shavitt2018} & \checkmark & \checkmark& Reg & 9&2.5K& no \\ \hline \texttt{\,MLR $\,$}{} (this work) & \checkmark & \checkmark & Reg/Classif & 32 & 72-65K & Reg:\checkmark\\%Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical {\text{DL}}{} regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{Hanson1988Comparing}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that dropout parameters are data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of {\text{DL}}{} remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. {\texttt{DNDT}}{} \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However {\texttt{DNDT}}{} is not scalable $w.r.t.$ the number of features and does not outperform Random Forests ({\texttt{RF}}) or standard {\texttt{NN}{}}{} on the UCI database. Attention-Mechanism ({\texttt{AM}}) has boosted {\text{DL}}{} performance on a range of {\texttt{NLP}}{} tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that {\texttt{AM}}{} can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited {\texttt{AM}}{} to develop {\texttt{TabNet}}{}, an interpretable {\text{DL}}{} method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with {\text{DL}}{}. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of {\texttt{RF}}{} or {\texttt{GBDT}}{}. However these architectures cannot be trained end-to-end, which may result in potentially inferior performance. {\texttt{TabNN}}{} \cite{ke2019tabnn} is a hybrid machine learning algorithm using {\texttt{GBDT}}{} and Deep Neural Networks ({\texttt{DNN}}). {\texttt{TabNN}}{} outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over {\texttt{GBDT}}{} seems marginal in their experiments on 6 data sets ranging in size from $15$K up to $7.9$M training samples. More recently, {\texttt{NODE}}{} \cite{Popov2020Neural}, a new {\texttt{DNN}}{} architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. {\texttt{NODE}}{} marginally outperforms ensemble methods ({\texttt{CatBoost}} \cite{Prokhorenkova2018}, {\texttt{XGBoost}} \cite{guestrin2016}) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train {\texttt{DNN}}{} by specific losses with interesting properties. In that regard, Regularization Learning Networks ({\texttt{RLN}}) \cite{shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. {\texttt{RLN}}{} performs significantly better than standard {\texttt{NN}{}}{} but could not beat {\texttt{GBDT}}{}. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel ({\texttt{NTK}}){}\cite{Arora2020meuf}, {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} and Self-Normalized Neural Networks ({\texttt{SNN}}) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We provide more details about these methods in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. Our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), penalizes memorization over permuted labels and structured noise through the application of a differentiable close-form regularization scheme on the last hidden layer during training. More specifically: - Our method outperforms usual methods (Ensemble, {\texttt{SVM}}, Boosting, Linear Regression, $etc.$ ) including the gold standards {\texttt{RF}}{} and {\texttt{GBDT}}{} for the usual statistics (Mean ${\texttt{R}^2}$, Friedman rank, P90, P95, P98, PMA) on a diverse collection of regression datasets. Our method also comes in a close second for classification tasks. - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot-encoding and standard imputation of missing data. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om \cite{Williams2001using} and {\texttt{RBF}}{} \cite{RasmussenW06} kernels, tree leaves). All the popular {\text{DL}}{} schemes can also be leveraged including learning rate schedulers \cite{smith2015cyclical}, optimizers, weight decay, batch-normalization, drop-out, residual layers and leaky activations \cite{smith2018disciplined}. - The performances of \textbf{NN}{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf {\text{DL}}{} solution or integrate it into the most advanced ML pipelines. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API (\textit{i.e.} it can be directly encapsulated into parameter search routines, bagging meta models, \textit{etc.}). For the sake of replicability, the code to run the benchmarks, the ablation study and the preprocessing applied to each dataset is also provided. The rest of the paper is organized as follows. We describe our approach in Section \ref{sec:MLRmethod}. In Section \ref{sec:exp}, we carry out a detailed ablation study of our method and evaluate its performances on real data. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \label{sec:MLRmethod} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the {\texttt{ReLU}} activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 3 essential ingredients of the \texttt{\,MLR $\,$}{} method are Ridge regularization, structured dithering and random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n} \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}_J$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term quantifies the amount of memorization of a model by comparing its {\texttt{RMSE}}{} on uninformative labels to the baseline ${\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$, $i.e.$ the performance achieved without fitting the data. Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances. We explain below the role of $(\I_n-\textbf{H}) \xi$ and $(\I_n-\textbf{H}) \xi_t$. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the Ridge instead of the {\texttt{OLS}}, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. More precisely, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the {\texttt{FFNN}}{} is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ \textbf{does not require hyperparameter tuning}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix,SHARMA201331}. \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align*} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, $etc$. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $11$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{10}$) and bigger batch size ($b_s = \min(J,n)$) is always better. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{{\texttt{Iter}}}$ and early stopping.} We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the alloted time {\texttt{FixB}}. We fix the maximum number of iterations $\max_{{\texttt{Iter}}}$ (depending on the value of $L$). Then, ${\texttt{Iter}} = \min(\max_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$ is the number of iterations that will actually be performed. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: ${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$ . Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} The generic values ($\tilde{\sigma} = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the {\texttt{FFNN}}{} architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size $b_s$, which are fixed in our method. As a pure DL method, \texttt{\,MLR $\,$}{} method is scalable. Its complexity is the same as training a standard {\texttt{NN}{}}{} \cite{Murugesan2018Embarrassingly}. We refer to the Appendix for a detailed description of the training protocol. \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the \texttt{BCE-MLR}{} loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. The {\texttt{FFNN}}{} architecture and the training protocol are essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a Sigmoid and the Cross Entropy (\texttt{CE}) loss. Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. The structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for a detailed discussion on this specific adaptation. \section{Experiments}\label{sec:exp} We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. See the supplementary material for the the github repository, the detailed description of our experimental setting and the exhaustive list of compared methods with their performances. \subsection{Setting.} \paragraph{Benchmark description.} To produce this benchmark we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules detailed in the appendix ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \paragraph{Preprocessing.} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot-encoding for categorical values and standardization for numerical features and target. We repeated our experiments 10 times using a different $80:20$ $train$/$test$ split of the data and no stratification scheme. \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|c|c|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \subsection{Ablation Analysis.} \begin{table}[H] \caption{Ablation Study in Regression. } \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline {\texttt{FFNN}} & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline + Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline + Ridge + Struct. Dithering & $ 0.323 \pm 0.075 $ & $ 0.400 \pm 0.048 $ \\ \hline + Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $ \\ \hline \texttt{\,MLR $\,$}{} & $ 0.371 \pm 0.024 $ & $ 0.433 \pm 0.000 $ \\ \hline \end{tabular} \end{table} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets with different sample sizes and feature to sample ratios. We repeated each experiment over 100 random $train$/$test$ splits. All the results presented here correspond to the architecture and hyperparameters of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{}. A standard {\texttt{FFNN}}{} of $2$ layers with a wide architecture ($J=1024$) cannot be trained efficiently on such small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark (Table \ref{tab:perfR2_rank}). Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach. The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging ($0.062$) is still of the same order of magnitude as the one we got when we applied permutations on top of Ridge to the {\texttt{FFNN}}{} ($0.043$). This means these two ingredients (permutations and struct. dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \subsection{Overall Performance comparisons.} \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the regression task on our benchmark. {\texttt{P90}}, {\texttt{P95}}, {\texttt{P98}}: the number of datasets a model achieves 90\%, 95\%, 98\% or more of the maximum test ${\texttt{R}^2}$-score respectively, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \label{tab:perfR2_rank} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean ${\texttt{R}^2}$-score & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline \texttt{\,MLR $\,$} & $2.525 \pm 1.355$ & $0.744 \pm 0.022$ & $0.963$ & $0.856$ & $0.719$ & $0.946 \pm 0.089$\\ {\texttt{GBDT}} & $2.719 \pm 1.850$ & $0.726 \pm 0.093$ & $0.863$ & $0.756$ & $0.650$ & $0.898 \pm 0.237$\\ {\texttt{RF}} & $3.538 \pm 1.896$ & $0.724 \pm 0.070$ & $0.825$ & $0.681$ & $0.481$ & $0.914 \pm 0.159$\\ {\texttt{SVM}} & $4.281 \pm 1.534$ & $0.711 \pm 0.068$ & $0.831$ & $0.594$ & $0.362$ & $0.882 \pm 0.172$\\ {\texttt{NN}{}} & $4.331 \pm 2.206$ & Aberating value & $0.725$ & $0.606$ & $0.475$ & Aberating value \\ {\texttt{MARS}} & $5.644 \pm 1.623$ & $0.677 \pm 0.066$ & $0.537$ & $0.350$ & $0.163$ & $0.861 \pm 0.167$\\ {\texttt{LM}} & $5.938 \pm 1.804$ & $0.658 \pm 0.094$ & $0.531$ & $0.294$ & $0.156$ & $0.837 \pm 0.179$\\ {\texttt{TREE}} & $7.125 \pm 1.613$ & $0.512 \pm 0.237$ & $0.338$ & $0.188$ & $0.119$ & $0.578 \pm 0.570$\\ {\texttt{Baseline}} & $8.900 \pm 0.375$ & $-0.023 \pm 0.211$ & $0.000$ & $0.000$ & $0.000$ & $-0.031 \pm 0.075$\\ \hline \end{tabular} } \end{table} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods for the regression task.} {\texttt{Ens-MLR}}{} with a {\texttt{P98}}{} of $0.719$ on the whole benchmark and Friedman Rank of $2.525$ is above {\texttt{GBDT}}{}, with a {\texttt{P98}}{} of $0.65$ and Friedman Rank $2.719$ in Table \ref{tab:perfR2_rank}. As revealed by its {\texttt{PMA}}{} statistics at $0.946 , {\texttt{Ens-MLR}}{} is far ahead of the other methods. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like {\texttt{RF}}{} which are often deemed the safest pick. Standard {\texttt{NN}{}}{} with equivalent architecture and {\texttt{MSE}}{} loss performs poorly with a Friedman rank of $4.331$. Noticeably, {\texttt{Ens-MLR}}{} was most often the best method among all the \texttt{\,MLR $\,$}{} methods \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the classification task with the accuracy score.} \label{tab:ACCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{Acc.}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.769 \pm 0.998$ & $0.889 \pm 0.038$ & $0.963$ & $0.881$ & $0.819$ & $0.971 \pm 0.054$\\ \texttt{\,MLR $\,$} & $2.913 \pm 1.403$ & $0.882 \pm 0.031$ & $0.963$ & $0.869$ & $0.800$ & $0.956 \pm 0.070$\\ {\texttt{RF}} & $3.056 \pm 1.415$ & $0.882 \pm 0.038$ & $0.912$ & $0.819$ & $0.656$ & $0.958 \pm 0.063$\\ {\texttt{GLM}} & $3.756 \pm 1.561$ & $0.862 \pm 0.060$ & $0.806$ & $0.631$ & $0.463$ & $0.940 \pm 0.062$\\ {\texttt{TREE}} & $4.763 \pm 1.195$ & $0.836 \pm 0.062$ & $0.731$ & $0.381$ & $0.237$ & $0.908 \pm 0.084$\\ {\texttt{QDA}} & $5.675 \pm 1.688$ & $0.723 \pm 0.160$ & $0.338$ & $0.194$ & $0.169$ & $0.796 \pm 0.159$\\ {\texttt{Baseline}} & $6.856 \pm 1.574$ & $0.593 \pm 0.168$ & $0.069$ & $0.025$ & $0.025$ & $0.661 \pm 0.133$\\ {\texttt{NN}{}} & $7.213 \pm 0.980$ & $0.565 \pm 0.152$ & $0.025$ & $0.013$ & $0.013$ & $0.625 \pm 0.136$\\ \hline \end{tabular} } \end{table} \begin{table} \caption{\textbf{Performances of the best in each class of methods} for the classification task with {\texttt{AUC}}{} score.} \label{tab:AUCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{AUC}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.738 \pm 1.190$ & $0.918 \pm 0.048$ & $0.938$ & $0.912$ & $0.875$ & $0.963 \pm 0.108$\\ \texttt{\,MLR $\,$} & $2.900 \pm 1.304$ & $0.908 \pm 0.012$ & $0.912$ & $0.844$ & $0.694$ & $0.952 \pm 0.106$\\ {\texttt{RF}} & $2.938 \pm 1.390$ & $0.912 \pm 0.047$ & $0.931$ & $0.887$ & $0.706$ & $0.956 \pm 0.095$\\ {\texttt{LM}} & $3.881 \pm 1.572$ & $0.889 \pm 0.060$ & $0.775$ & $0.662$ & $0.475$ & $0.935 \pm 0.094$\\ {\texttt{NN}{}} & $4.856 \pm 1.545$ & $0.843 \pm 0.154$ & $0.706$ & $0.506$ & $0.412$ & $0.896 \pm 0.155$\\ {\texttt{TREE}} & $5.975 \pm 1.160$ & $0.813 \pm 0.091$ & $0.394$ & $0.212$ & $0.212$ & $0.852 \pm 0.119$\\ {\texttt{QDA}} & $6.031 \pm 1.371$ & $0.772 \pm 0.149$ & $0.394$ & $0.256$ & $0.150$ & $0.818 \pm 0.152$\\ {\texttt{Baseline}} & $7.681 \pm 1.084$ & $0.499 \pm 0.151$ & $0.006$ & $0.000$ & $0.000$ & $0.537 \pm 0.072$\\ \hline \end{tabular} } \end{table} For binary classification task with the usual accuracy score, \texttt{\,MLR $\,$}{} is a close second behind {\texttt{GBDT}}{} both in terms of Accuracy and {\texttt{AUC}}{} scores. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. Nonetheless, higher performances can be achieved with the \texttt{\,MLR $\,$}{} approach by data-dependent tuning of the hyperparameters in Table \ref{tab:architectures1} and/or leveraging usual {\text{DL}}{} schemes. By replacing the standard losses by the \texttt{\,MLR $\,$}{} loss to train a simple {\texttt{FFNN}}{}, we were able to break down the tabular data deadlock and outperform the gold standard. However, nothing in our method is constrained to this setting. The \texttt{\,MLR $\,$}{} approach is perfectly applicable on {\texttt{CNN}}{} for classification tasks in the low sample regime with robustness issues. \newpage \bibliographystyle{plain} \section{Rebuttal} Bookmark version Manuscrit \subsubsection{Generalization} Let us give one definition of \textbf{Generalization}: For a loss \textsf{L}\, (eg. cross-entropy or RMSE), a test datasets (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) and a constant prediction \ensuremath{\textsf{Y}_{Cste}} given by the intercept model (eg. mean or mode value), we define Generalization for any estimator \textsf{f}\, built independently from (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) as $$ \ensuremath{\textsf{Gen}\,} = \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Test}})) $$ We want to \textbf{maximize} \ensuremath{\textsf{Gen}\,} since it quantifies how well the estimator compares to the baseline on new data. Trying to choose \textsf{f}\, from a set of parametric estimators with no access to test data, we could set an intermediary goal based on a given dataset (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}). If we are to choose \textsf{f}\, from a set of parametric estimators, we could pick the parameters \ensuremath{\textsf{w}_{Train}} which minimize the loss on the train set (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}), $ \ensuremath{\textsf{w}_{Train}} = {argmin}_{\ensuremath{\textsf{w}}} \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}))) $ Focussing on gradient descent, we are searching for the best update $u_i = \ensuremath{\textsf{w}}_{i+1} - \ensuremath{\textsf{w}}_i$ at iteration $i$ to maximize \ensuremath{\textsf{Gen}\,}. To ease notation, we set $\frac{\partial \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}_i)))}{\partial \ensuremath{\textsf{w}}_i}/||\frac{\partial \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}_i)))}{\partial \ensuremath{\textsf{w}}_i}|| =\frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i)}{\partial \ensuremath{\textsf{w}}_i}$ where $\frac{\partial \textsf{L}\,}{\partial \ensuremath{\textsf{w}}}$ denotes the normalized gradient, i.e. its direction. If we minimize the loss on the train set through gradient descent(GD) with a learning rate $lr$, we get $u_i = -lr \frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i)}{\partial \ensuremath{\textsf{w}}_i} $. \subsubsection{Memorization} Good performance on the train set do not always translate to good performance on other test sets. To quantify this gap, we choose to use the following definition of \textbf{Memorization} (first introduced by ()): $$ \ensuremath{\textsf{Mem}\,} = (\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}))) - \ensuremath{\textsf{Gen}\,} $$ In a sense, \ensuremath{\textsf{Mem}\,} quantifies how deceiving performance on training data can be (this is strongly connected to the notion of Excess Optimism\cite{tibshirani2017excess} in statistics). Using definitions of \ensuremath{\textsf{Gen}\,} and \ensuremath{\textsf{Mem}\,}, we get $u_i = \ensuremath{\alpha}_i \frac{\partial |\ensuremath{\textsf{Gen}\,}|}{\partial \ensuremath{\textsf{w}}_i} + \ensuremath{\beta}_i \frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$ with $\ensuremath{\alpha}$, $\ensuremath{\beta}$ two reals such that. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. \subsubsection{Correct the direction} There exists a vast number of schemes to skew $u_i$ toward $\frac{\partial |\ensuremath{\textsf{Gen}\,}|}{\partial \ensuremath{\textsf{w}}_i}$. We could set constraints on \textsf{f}\, (eg. BatchNorm,... cite). Without access to $\frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$, we could actively correct for directions which should lead to memorization, like $\frac{\partial ||\ensuremath{\textsf{w}}_i||}{\partial \ensuremath{\textsf{w}}_i}$ (i.e. weight decay (cite)). Setting $u_i$ to also be a function of $u_{i-1}, u_{i-2}, ...$ to alleviate oscillations (see (cite Adam Momentum, etc) could also help, assuming $\ensuremath{\beta}_{i+1} \frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_{i+1}} \simeq - \ensuremath{\beta}_i \frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$. \subsubsection{Quantifying Memorization through permutations} Ou ici à voir... \subsubsection{Improve learning dynamic} Using discrete updates on a highly non convex landscape, \ensuremath{\textsf{Gen}\,} evolution from $\ensuremath{\textsf{w}}_i$ to $\ensuremath{\textsf{w}}_{i+1}$ depends not just on its direction with respect to $\frac{\partial |\ensuremath{\textsf{Gen}\,}|}{\partial \ensuremath{\textsf{w}}_i}$ but also on the norm of $u_i$ (see cite cycling learning rate, LR find, momentum, etc...). Navigating through saddle points, plateaus and steep sloops, not only does the choice of $u_i$ impacts \ensuremath{\textsf{Gen}\,} at $\ensuremath{\textsf{w}}_{i+1}$ but more importantly, $u_{i+1}$, $u_{i+2}$ and so on. In this article, we aim to improve the impact of $u_i$ on the following learning dynamic towards final \ensuremath{\textsf{Gen}\,}. However, our central point of focus will not be convergence, but memorization. More precisely, $u_i$ should improve how $\ensuremath{\alpha}_{i+1} - \ensuremath{\beta}_{i+1}$ compares to $\ensuremath{\alpha}_{i} - \ensuremath{\beta}_{i}$. \subsubsection{Memorization Capacity} At this point we should emphasize, when we pick $u_i$ our goal is not to correct $\frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i)}{\partial \ensuremath{\textsf{w}}_i}$ for memorization, but to impact $\frac{\vec{\dot{\partial}} \textsf{L}\, (\ensuremath{\textsf{w}}_i + u_i)}{\partial \ensuremath{\textsf{w}}_{i+1}}$. We will now give intuitions and heuristics on how our method was built to do so. Providing a theoretical proof to justify the construction is beyond the scope of this article. Results on Minimax bounds are available at : (REF PAPIER THEORIQUE). \subsubsection{Quantifying Memorization through permutations} Ou plus haut, à voir... Consider the uninformative case where observations and labels are completely independent (E[Y|X] = E[Y]), obtained by applying random permutations without fix point to \ensuremath{\textsf{Y}_{Train}}, which yields \ensuremath{\textsf{Y}_{\pi}}. At best we expect \textsf{f}\, to perform like the intercept model, meaning $\ensuremath{\textsf{Gen}\,} = 0$. Assuming any improvement beyond $\textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}})$ mostly comes from \ensuremath{\textsf{Mem}\,}, we get $\ensuremath{\textsf{Mem}\,} \simeq (\textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}})))$. Searching for how to quantify memorization capacity with respect to \ensuremath{\textsf{w}} in this edge case will give us a starting point. We could first think in terms of speed, ie how fast does \ensuremath{\textsf{Mem}\,} increases. Taking speed as the size of the derivative, we should get $\frac{\partial \ensuremath{\textsf{Mem}\,}}{\partial \ensuremath{\textsf{w}}} \simeq \frac{\partial \textsf{L}\, (\ensuremath{\textsf{w}})}{\partial \ensuremath{\textsf{w}}}$. \subsubsection{Dérivée} Travailler sur des dérivées secondes. || || , \subsubsection{Dérivée at w i+1 - dérivée at wi} Travailler sur des dérivées secondes. ||dL/dwi|| - ||dL/wi+ui|| = ||dL/dwi|| - ||dL/(wi- lr dL/wi)|| Ba empiriquement nope Lecun, DoubleBackProp \subsubsection{Vitesse = distance / iterations} L(wi) - L(wi*) = L(wi) - min w L(w) min w L(w) sur le train min w L(w)test > min w L(w) train avoir un omega tel que min w L(w) argmin omega (min w L(w) train - min w L(w) permut) min w L(w) differentiable selon omega, min w L(w) tractable Quel f(w, omega) on connait. Ridge. Ba le modèle linéaire c'est quand même limité. Rendre le truc plus puissant. En gardant la dérivabilité, on remplace X_train par une fonction paramétrique de xtrain, différentiable. h(X) = les couches cachées... \subsubsection{Capacité = point d'arrivée} \subsubsection{Changer le min = pénalization} \subsubsection{Contrainte par Hyper paramètre} \subsubsection{Hyper paramètre le cas ridge} \subsubsection{Prendre une fonction paramétrique différentiable de X dans le Ridge.} \subsection{Formalisme réseau de neurone et expression de la loss.} on $\ensuremath{\textsf{w}}_{i+1}$final value. evolution from $\ensuremath{\textsf{w}}_i$ to $\ensuremath{\textsf{w}}_{i+1}$While navigating through saddle points, plateaus and steep sloops, $u_i$ ,\ensuremath{\textsf{Gen}\,} . (see cite cycling learning rate, LR find, momentum, etc...). Navigating through saddle points, plateaus and steep sloops, $u_i$ impact on $\ensuremath{\alpha}_{i} - \ensuremath{\beta}_{i}$ \ensuremath{\textsf{Gen}\,} evolution also depends of the number of step we take (cite Early Stopping) and their size ((cite cycling learning rate, LR find, momentum, etc...)). If \textsf{L}\, lives in a highly non convex landscape, $\ensuremath{\alpha}_{i} - \ensuremath{\beta}_{i}$ is bound to evolve between iterations(see cite(Bias/Variance trade/off)(double slope gradient descent)). size of each step taken, we should also consider how the number and sizes of each step also impacts \ensuremath{\beta}, Clearly we wish $u_i$ be s.t. $\ensuremath{\alpha}_i >>> \ensuremath{\beta}_i$. To correct for the direction $\frac{\partial |\ensuremath{\textsf{Mem}\,}|}{\partial \ensuremath{\textsf{w}}_i}$ we can use weight decay SECTION on cherche $u$ tel que \ensuremath{\beta} petit pour avoir l'argmax de \ensuremath{\textsf{Gen}\,}, parce que fortement non convexe. The natural avenue is to correct $u$ for Regularization can be implicit (cite), To ease notation We denote $lr$ the learning rate. To ease notations, we will normalize all gradients, such that. $\frac{dL}{dw}$ as Then at iteration $i$ If we try to minimize the loss on the train set through gradient descent (GD), the gradient direction is a mixture of both meaningful patterns and memorization, ie $\frac{}{}$ just as with our previous example. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. \section{En dessous à commenter ensuite} \subsubsection{Generalization} Let us give one definition of Generalization: For a loss \textsf{L}\, (eg. cross-entropy or RMSE), a test datasets (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) and a constant prediction \ensuremath{\textsf{Y}_{Cste}} given by the intercept model (eg. mean or mode value), we define Generalization for any estimator \textsf{f}\, built independantly from (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}) as $$ \ensuremath{\textsf{Gen}\,} = \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Test}})) $$ We want to \textbf{maximize} \ensuremath{\textsf{Gen}\,} since it quantifies how well the estimator compares to the baseline on new data. Since we do not have access to test data, we could set an intermediary goal based on a given dataset (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}). If we are to choose \textsf{f}\, from a set of parametric estimators, we could pick the parameters \ensuremath{\textsf{w}_{Train}} which minimize the loss on the train set, $ \ensuremath{\textsf{w}_{Train}} = {argmin}_{\ensuremath{\textsf{w}}} \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}))) $ and then hope good performance on the train set will always translate to good performance on other test sets. Most often, it is not the case, which has lead to the introduction of some of the most fundamental concepts in the fields Machine learning and Statistics, Overfitting, Regularization (either explicit or implicit), Validation set, Hyper-parameter tuning, etc.\\ \subsubsection{Memorization} Here we will choose to take another direction and try to find a way to directly quantify the variations of \ensuremath{\textsf{Gen}\,} with respect to the estimator parameters directly, using only the training set. Our procedure focuses on the notion of Memorization (first introduced by ()) which we choose to define in this article as: $$ \ensuremath{\textsf{Mem}\,} = (\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}))) - \ensuremath{\textsf{Gen}\,} $$ In a sense, \ensuremath{\textsf{Mem}\,} quantifies how deceiving performance on training data can be (this is strongly connected to the notion of Excess Optimism\cite{tibshirani2017excess} in statistics). Taking a broader view of Artificial Intelligence, we can also see memorization as the ability to just \textbf{learn by heart} each values of the dataset instead of trying to \textbf{capture meaningful concepts}. What we want here is not just to penalize memorization during training, but to explicitly try to maximize the gap between train performance and \ensuremath{\textsf{Mem}\,}, by leveraging a technique to directly quantify \ensuremath{\textsf{Mem}\,} variations without any out-of-sample-scheme, and in a differentiable manner.\\ \subsubsection{Permutation for Ridge} First, let us do so for a simple parametric family of estimators, the ridge linear model in regression. Instead of using the same loss during training and evaluation, we introduce a family of parametric loss functions. For \ensuremath{\lambda}\, a level of regularization, we pick \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,) such that $ \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,) = {argmin}_{\ensuremath{\textsf{w}}} \textsf{L}\,_{\ensuremath{\lambda}\,}(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}})) $. We are now set to search for \ensuremath{\lambda}\, where the associated \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,) maximizes \ensuremath{\textsf{Gen}\,}. Again, we do not need to know the actual value of \ensuremath{\textsf{Gen}\,} with respect to \ensuremath{\lambda}\,, only its variations. We have access to the variations of $\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,))))$ with respect to \ensuremath{\lambda}\,. Next, to connect the impact of \ensuremath{\lambda}\, on both train performance and test performance we should correct for $\frac{d\ensuremath{\textsf{Mem}\,}}{d\ensuremath{\lambda}\,}$ which we need to estimate. Consider the uninformative case where X and Y are completely independent, (E[Y|X] = E[Y]), obtained by applying random permutations without fix point to \ensuremath{\textsf{Y}_{Train}}, which yields \ensuremath{\textsf{Y}_{\pi}}. Then, at best $\ensuremath{\textsf{Gen}\,}_{Permut} = 0$ which corresponds to the intercept model performance, obtained when \ensuremath{\lambda}\, goes to infinity. We will make two assumptions: first any improvement from baseline train loss when we reduce regularization corresponds exclusively to memorization: $\frac{d\ensuremath{\textsf{Mem}\,}_{Permut}}{d\ensuremath{\lambda}\,}$ corresponds to the variations of $\textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{\pi}}(\ensuremath{\lambda}\,)))$. Second, these variations are a good proxy for the impact of \ensuremath{\lambda}\, on the capacity of the ridge estimator to memorize training data on the actual labels, without permutations. Doing so, to maximize generalization for true labels we should use: $$ {argmin}_{\ensuremath{\lambda}\,} \ensuremath{\textsf{Gen}\,} = {argmin}_{\ensuremath{\lambda}\,} \textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,)))) - \textsf{L}\,(\ensuremath{\textsf{Y}_{\pi}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{\pi}}(\ensuremath{\lambda}\,))) $$ Since the ridge estimator admits a differentiable close form with respect to \ensuremath{\lambda}\,, we can find the optimal value of \ensuremath{\lambda}\, by running a standard gradient procedure. In this article, we do not aim at providing a theoretical proof of these results, which is done in (ref). Rather we intend to extend this procedure to a family of vastly over-parametrized estimators, Feed-Forward deep neural networks with very large dense layers (eg: 4096 neurons). \subsubsection{Adaptation to Neural Networks} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the {\texttt{ReLU}} activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. We will make two important distinctions with our previous example. There is not a close form expression of a neural network given a set of hyper-parameters, we will use gradient descent to learn the weights. Previously, we did not use MLR to explore the entire space of weights for linear models. We restricted ourselves to weights which were solutions of the minimization of the \ensuremath{\lambda}\,-penalized loss on the train set. Here, we want to explore freely the high-dimensional space of neuron weights in every possible directions. If we try to minimize the loss on the train set, the gradient direction is a mixture of both meaningful patterns and memorization, just as with our previous example. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. Therefore, at each step of gradient descent, instead of trying to artificially skew the gradient in directions which memorize less, we want the update the weights such that at the next step of gradient descent, the direction of the gradient towards the steepest reduction of the train loss will naturally increase generalization much more than memorization in proportion. We do not want to reduce memorization, we want to reduce the capacity of the network to memorize. set afe toward a state where the next gradient towards the steepest reduction of the loss on the train set towards Prophilactic approach Conversely, since we want to identify the direction of steepest descent towards generalization, we need to disentangle from the gradient direction towards the steepest reduction of the loss on the train set the direction which increase the capacity of the neural network to memorize the train set. We do not want to prevent memorization during learning, Our goal at each step of the gradient descent is to find the direction of steepest descent towards generalization. There is not a close form expression of a neural network given a set of hyper-parameters,we will use gradient descent to learn the weights. Our goal at each step of the gradient descent is to find the direction of steepest descent towards generalization. If we try to minimize the loss on the train set, the gradient direction contains both meaningful patterns and memorization, just as with our previous example. If we use MLR to tune GD is a greedy procedure which selects the direction of steepest descent. When used to minimize the train loss, the gradient direction contains both meaningful patterns and memorization, just as with our previous example. We do not want to use MLR to optimize the amount of weight decay during training to skew the updates while aiming to minimize the train loss. Our goal is to disentangle the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization to get the direction which actually update the weights (W,L) of the NN at each step of gradient descent in the direction which increases \ensuremath{\textsf{Gen}\,} the most. GD is a greedy procedure which selects the direction of steepest descent. Here, at each gradient update, The gradient direction corresponding to the loss contains both meaningful patterns and memorization. Disentangling the part of the improvement on the train loss which corresponds to generalization from the part corresponding to memorization is not obvious in general. Again, departing from other methods, our goal here is not to skew the weight updates towards direction which lead to increased generalization, at each step using L2 regularization Therefore, extending our ridge example to neural network does not mean using the MLR criterion to pick the amount of L2 weight decay The equivalent of Ridge penalization for neural networks is L2 penalization/weight decay applied during training. However the goal we set ourselves is to learn the weights of the neural network by directly optimizing generalization, not just skew the gradient updates in a direction which generalizes more through explicit regularization. More precisely, when we try to \subsection{Plan} \paragraph{Context/Constat (Problématique).} Probleme du deep: training = memorisation +generalization entangled. How to favoriser generalization a la memomrisation durant le training. /// /// On introduit les deux concepts et // //La mémorisation on en veut pas parce que ça abime la robustesse mais aussi ça que ça abime la généralisation en prenant sa place.// Problématique tel que nous on la formule: Donc c'est un bon objectif de minimiser la mémorisation durant l'entraînement (Chaque iteration doit etre la plus utile/efficace possible "Make it count"). //////UNderstainf deep learning requires rethinking//// Jusqu'à présent, on peut pas acceder cette quantité durant l'entrainement. Les gens ont proposé/utilisé des proxy (eg.tel la variance du modèle), ils sont imparfait car quand on les minimise certe on réduit la mémorisation mais on atteint pas son minimum. Fin Constat (Problématique) /// \paragraph{Notre Objectif.} MLR objectif d'améliorer le tradeoff entre memorization et généralization. Fondement de MLR: Et pour se faire notre parti pris/principe fondamentale: c'est de quantifier la memorisation en utilisant le train set, pour la minimiser durant l'apprentissage.\\ /// \paragraph{Presentation du principe/methode MLR.}\\ \subsection{Démonstration} f, w, Loss, (jeu train, jeu test) Entrainé un modèle what = argmin w de L(w, train) G = L(what, test) M = L(what, test) - L(what, train) Régularisé pour une autre loss $L$, L(omega)(w, train) what(omega) = argmin \{L(omega)(w, train)\} omegahat = argmin (omega) \{ L(what(omega), test)\} MLR Critère: omegaMLR = argmin (omega) \{ L(omega)(w, train)- L(omega)(w, permut train)\} MLR loss: on sépare w = (w1, w2) (rq: w1 les poids des couche cachée, w2 les poids de la couche de sortie) w2hat(omega) = argmin w2 \{L(omega)(w1, w2, train)\} w2hat est une fct de w1, omega et train: (la forme close du ridge) w2hat(omega, w1, train) MLR: (w1MLR, omegaMLR) = argmin (w1, omega) L(w1, w2hat(omega, w1, train), train) - L(w1, w2hat(omega, w1, permut train) , permut train) Donc on optimise les poids à l'intérieur, pas l'hyper paramètre omega: C'est pas du biniveau on optimise w1 en même temps que omega. pas l'un dans l'autre. Etape suivante : MLR: (w1MLR, omegaMLR) = argmin (w1, omega) L(w1, w2hat(omega, w1, train), train) + |1 - L(w1, w2hat(omega, w1, permut train) , permut train)| Rq : La loss de w2hat(omega) n'est pas celle de w1, omega, obvious pour la classif, Lomega c'est le risque empirique pour les coefs du ridge, L c'est la cross entropie. Qui est w1, qui est w2: Quelle est la forme de w, définisse WB, f(w) Our approach is to separate the weights of the architecture in two sets, one being dedicated to fit the permuted labels, the other being dedicated to prevent them from doing so. Precisely, the weights of the output layer are tasked with fitting the target given the output of the last hidden layer as well as possible. The weights on the hidden layer are tasked with producing an activation which makes that task as easy as possible with true labels, and as hard as possible with permuted labels. Maintenant Qui est L(omega)(w1,w2, train) pour identifier w2hat(omega, w1, train): L(omega) c'est le risque quadratique de l'estimateur ridge, donc w2hat(omega, w1, train) admet une forme close. To avoid solving a bi-level optimization, we leverage the fact that the inner part of our nested optimization process admits a closed-form solution. This closed-form is directly the solution of the following optimization problem: fit the target (true or permuted) given the activation of the last hidden layer. Since it is differentiable, the loss can be back-propagated through the closed-form to the weights of the hidden layers. And since it is a linear function of the target being fitted, it can efficiently be computed for both true and permuted targets. De plus pourquoi la pénalisation et l'introduction de omega? Pour well defined le tradeoff Depending on the activation values, the width of the last hidden layer, and the size of the batch, if we use the closed-form of the OLS, we could get into situations where it is either too easy or too hard to fit the targets, (for both true and permuted labels), which would lead to gradient vanishing. To ensure the trade-off between these two goals (fitting true labels, not fitting permuted labels) is correctly set, we use instead the ridge closed-form. That way, through the ridge regularization parameter we can control how difficult it is to fit targets. Dithering. Dithering can be used to regularize. Increasing the magnitude of the dithering increases regularization up to a point. However, If the noise level of the dithering goes above a certain threshold howether, it will skew the gradient in a random direction so much at each step that instability will prevent convergence all together. To avoid this drawback, we want to enforce gradient vanishing with respect to the random noise added to the target. To do so, our solution is to use the residuals of a standard gaussian white noise fitted using the aforementioned close-form. Indeed, if we fit random noise using a linear closed-form, the resulting residuals correspond to random variations that cannot be minimized through that closed-form. As such, even if the residuals have a strong impact on the loss, they will have a low impact on the gradient of that loss, meaning we can increase the magnitude of that random noise without skewing the gradient as much as we would with regular gaussian white noise. This is how we came up with the structured dithering ingredient. \paragraph{MLR method applied to Neural Networks.} \subsection{Démonstration} \section{Rebuttal Old} The rebuttal will be uploaded by tomorrow with completed values in Table 2. "Using Ridge closed-form on the last hidden layer of the FFNN already gives some significant improvement of the generalization performance (See the ablation study in Table 4). Sorry, my question here was on providing "motivation or intuition", beyond saying "much stronger regularisation than adding standard L2 weight regularisation to the loss". While I feel that your approach is certainly interesting, I do not feel that you provide enough evidence to support why MLR is a good idea."\\ We have preliminary theoretical results which prove that a MLR neural network with 0 hidden layers ()(i.e. Ridge model with only parameter being fitted through gradient descent on the MLR loss) admits better generalization performance than a Ridge model with being fitted through gradient descent on the quadratic loss. The reason is that the MLR loss is a much better proxy for the true generalization error than the quadratic loss. We are currently studying the extension of these theoretical results to shallow neural networks (). These results will be part of another future paper covering the theoretical aspects of MLR. Afterwards, we will attempt to tackle deep networks (), which is a much more challenging case. But all of this is beyond the scope and the time frame of this paper. In the meantime, here is some more insight about how we currently understand the mechanisms behind MLR: When training on regular targets, an over-parameterized neural network can outperform the intercept model in terms of test loss by learning generalizable relations between observations and targets. However, since it is also able to memorize the training set, it will try to minimize the loss on the training set using both memorization and generalization. In over-parametrized models, there are a lot of possible directions to explore to reduce training error via Gradient Descent. GD is a greedy procedure which selects the direction of steepest descent. The gradient direction corresponding to the quadratic loss contains both meaningful patterns and memorization. When training on permuted targets (that means there is nothing to learn beyond the expectation of ), an over-parameterized neural network is able to outperform the intercept model in terms of train loss, but only by memorizing the train set. The gradient direction corresponding to the quadratic loss contains only memorization. Based on those observations, our goal when we replace the quadratic loss by the MLR loss is to maximize the proportion of meaningful patterns of the steepest direction of descent at each GD step during training. At each gradient step, we want to minimize the ability of the neural network to use memorization to improve the train loss, while preserving its ability to do so through generalization. The leap of faith in our method (until theoretical results are made available...): Directions of gradient descent on permuted targets increase the ability of the NN to overfit permuted labels. By correcting the gradient for those memorization directions we also reduce the ability of NN to overfit true labels. This does not reduce the ability of the NN to increase generalization when fitting true labels. Now our motivation is to use the Ridge closed-form to perform this gradient correction: Minimizing the ability of the NN to increase memorization (i.e. fitting permuted labels) is a bi-level optimization problem, with two antagonistic goals. We want to address it in a tractable, efficient and differentiable manner. See the following reference for a natural approach to this bi-level optimization problem which sadly did not work in our case: Drucker et Le Cun. Improving generalization performance using double back propagation. IEEE transactions on Neural Networks (1992). So we had to look for an alternative approach to solve this problem. Our approach is to separate the weights of the architecture in two sets, one being dedicated to fit the permuted labels, the other being dedicated to prevent them from doing so. Precisely, the weights of the output layer are tasked with fitting the target given the output of the last hidden layer as well as possible. The weights on the hidden layer are tasked with producing an activation which makes that task as easy as possible with true labels, and as hard as possible with permuted labels. Second leap of faith (mostly because it would be far too long and tedious to explain why, for specific technical reasons,all the approaches which feel more natural we could find, either : -are very inefficient, -perform poorly, -or do not work at all.): To avoid solving a bi-level optimization, we leverage the fact that the inner part of our nested optimization process admits a closed-form solution. This closed-form is directly the solution of the following optimization problem: fit the target (true or permuted) given the activation of the last hidden layer. Since it is differentiable, the loss can be back-propagated through the closed-form to the weights of the hidden layers. And since it is a linear function of the target being fitted, it can efficiently be computed for both true and permuted targets. Depending on the activation values, the width of the last hidden layer, and the size of the batch, if we use the closed-form of the OLS, we could get into situations where it is either too easy or too hard to fit the targets, (for both true and permuted labels), which would lead to gradient vanishing. To ensure the trade-off between these two goals (fitting true labels, not fitting permuted labels) is correctly set, we use instead the ridge closed-form. That way, through the ridge regularization parameter we can control how difficult it is to fit targets. This closed-form can also be used to improve dithering: Dithering can be used to regularize. Increasing the magnitude of the dithering increases regularization up to a point. However, If the noise level of the dithering goes above a certain threshold howether, it will skew the gradient in a random direction so much at each step that instability will prevent convergence all together. To avoid this drawback, we want to enforce gradient vanishing with respect to the random noise added to the target. To do so, our solution is to use the residuals of a standard gaussian white noise fitted using the aforementioned close-form. Indeed, if we fit random noise using a linear closed-form, the resulting residuals correspond to random variations that cannot be minimized through that closed-form. As such, even if the residuals have a strong impact on the loss, they will have a low impact on the gradient of that loss, meaning we can increase the magnitude of that random noise without skewing the gradient as much as we would with regular gaussian white noise. This is how we came up with the structured dithering ingredient. \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning ({\text{DL}}) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that {\text{DL}}{} is irrelevant for tabular data \cite{videolecture}. While the need to handle tabular data arises in many fields ($e.g.$ material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), {\text{DL}}{} for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods \cite{Denil2014narrow,Delgado14a,Mentch2020Rand,Wainberg2016} are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a,Wainberg2016}. By contrast, training {\text{DL}}{} models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large datasets may be costly, or even impossible by the nature of the task at hand\footnote{$e.g.$ decision making on a limited amount of cases during a pandemic.} Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{shavitt2018}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on the preprocessing of categorical features which was an historical limitation of {\text{DL}}{} \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in {\text{DL}}{} libraries (tensorflow, PyTorch, \textit{etc.}). Meanwhile, tree based ensemble methods and Gradient Boosting Decision Trees ({\texttt{GBDT}}{}) are still considered the best option to handle categorical data \cite{Prokhorenkova2018,Anghel2018Bench,Harasymiv2015_gbdt}. Developing a {\text{DL}}{} solution for tabular data is desirable at it can leverage the particular strengths of {\text{DL}}{}, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the {\text{DL}}{} community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data. $\bm{*}$ uses the UCI database which has some well-known flaws \cite{Arora2020meuf,Klambauer2017,Wainberg2016}.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|cc|c|} \hline Method & End-to-end & Works without & Task & \multicolumn{2}{|c|}{ Benchmark } & Consistently outperforms \\ & differentiable & HP tuning & & \# datasets& Range $n$ & {\texttt{GBDT}} \\ \hline {\texttt{TabNN}}{} \cite{ke2019tabnn} & no & no & Reg/Classif &5&14.8K-7.3M & no\\%14.8K-7.29M \hline {\texttt{NODE}}{} \cite{Popov2020Neural} & \checkmark & no & Reg/Classif &6&500K-11M & no\\%Sometimes\\ \hline {\texttt{TabNet}}{} \cite{arik2020tabnet} & self-supervised & no & Reg/Classif & 4&10K-11M & \checkmark\\%Significantly \\ \hline {\texttt{DNDT}}{} \cite{YangMorillo2018} & \checkmark & \checkmark &\Clf &14& 150-1.1M & no\\ \hline {\texttt{NTK}}{} \cite{Arora2020meuf} & \checkmark & no & \Clf &90\bm{*}& 10-130K & no \\ \hline {\texttt{SNN}} {}\cite{Klambauer2017} & \checkmark & no & Reg/Classif &122\bm{*}& 10-130K & no\\ \hline {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} & no & \checkmark & \Clf& 6&9.8K-200K &no\\% rarely \\ \hline {\texttt{RLN}}{} \cite{shavitt2018} & \checkmark & \checkmark& Reg & 9&2.5K& no \\ \hline \texttt{\,MLR $\,$}{} (this work) & \checkmark & \checkmark & Reg/Classif & 32 & 72-65K & Reg:\checkmark\\%Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical {\text{DL}}{} regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{Hanson1988Comparing}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that dropout parameters are data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of {\text{DL}}{} remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. {\texttt{DNDT}}{} \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However {\texttt{DNDT}}{} is not scalable $w.r.t.$ the number of features and does not outperform Random Forests ({\texttt{RF}}) or standard {\texttt{NN}{}}{} on the UCI database. Attention-Mechanism ({\texttt{AM}}) has boosted {\text{DL}}{} performance on a range of {\texttt{NLP}}{} tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that {\texttt{AM}}{} can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited {\texttt{AM}}{} to develop {\texttt{TabNet}}{}, an interpretable {\text{DL}}{} method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with {\text{DL}}{}. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of {\texttt{RF}}{} or {\texttt{GBDT}}{}. However these architectures cannot be trained end-to-end, which may result in potentially inferior performance. {\texttt{TabNN}}{} \cite{ke2019tabnn} is a hybrid machine learning algorithm using {\texttt{GBDT}}{} and Deep Neural Networks ({\texttt{DNN}}). {\texttt{TabNN}}{} outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over {\texttt{GBDT}}{} seems marginal in their experiments on 6 data sets ranging in size from $15$K up to $7.9$M training samples. More recently, {\texttt{NODE}}{} \cite{Popov2020Neural}, a new {\texttt{DNN}}{} architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. {\texttt{NODE}}{} marginally outperforms ensemble methods ({\texttt{CatBoost}} \cite{Prokhorenkova2018}, {\texttt{XGBoost}} \cite{guestrin2016}) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train {\texttt{DNN}}{} by specific losses with interesting properties. In that regard, Regularization Learning Networks ({\texttt{RLN}}) \cite{shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. {\texttt{RLN}}{} performs significantly better than standard {\texttt{NN}{}}{} but could not beat {\texttt{GBDT}}{}. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel ({\texttt{NTK}}){}\cite{Arora2020meuf}, {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} and Self-Normalized Neural Networks ({\texttt{SNN}}) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We provide more details about these methods in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. Our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), penalizes memorization over permuted labels and structured noise through the application of a differentiable close-form regularization scheme on the last hidden layer during training. More specifically: - Our method outperforms usual methods (Ensemble, {\texttt{SVM}}, Boosting, Linear Regression, $etc.$ ) including the gold standards {\texttt{RF}}{} and {\texttt{GBDT}}{} for the usual statistics (Mean ${\texttt{R}^2}$, Friedman rank, P90, P95, P98, PMA) on a diverse collection of regression datasets. Our method also comes in a close second for classification tasks. - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot-encoding and standard imputation of missing data. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om \cite{Williams2001using} and {\texttt{RBF}}{} \cite{RasmussenW06} kernels, tree leaves). All the popular {\text{DL}}{} schemes can also be leveraged including learning rate schedulers \cite{smith2015cyclical}, optimizers, weight decay, batch-normalization, drop-out, residual layers and leaky activations \cite{smith2018disciplined}. - The performances of \textbf{NN}{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf {\text{DL}}{} solution or integrate it into the most advanced ML pipelines. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API (\textit{i.e.} it can be directly encapsulated into parameter search routines, bagging meta models, \textit{etc.}). For the sake of replicability, the code to run the benchmarks, the ablation study and the preprocessing applied to each dataset is also provided. The rest of the paper is organized as follows. We describe our approach in Section \ref{sec:MLRmethod}. In Section \ref{sec:exp}, we carry out a detailed ablation study of our method and evaluate its performances on real data. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \label{sec:MLRmethod} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the {\texttt{ReLU}} activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 3 essential ingredients of the \texttt{\,MLR $\,$}{} method are Ridge regularization, structured dithering and random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n} \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}_J$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term quantifies the amount of memorization of a model by comparing its {\texttt{RMSE}}{} on uninformative labels to the baseline ${\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$, $i.e.$ the performance achieved without fitting the data. Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances. We explain below the role of $(\I_n-\textbf{H}) \xi$ and $(\I_n-\textbf{H}) \xi_t$. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the Ridge instead of the {\texttt{OLS}}, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. More precisely, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the {\texttt{FFNN}}{} is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ \textbf{does not require hyperparameter tuning}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix,SHARMA201331}. \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align*} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, $etc$. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $11$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{10}$) and bigger batch size ($b_s = \min(J,n)$) is always better. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{{\texttt{Iter}}}$ and early stopping.} We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the alloted time {\texttt{FixB}}. We fix the maximum number of iterations $\max_{{\texttt{Iter}}}$ (depending on the value of $L$). Then, ${\texttt{Iter}} = \min(\max_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$ is the number of iterations that will actually be performed. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: ${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$ . Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} The generic values ($\tilde{\sigma} = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the {\texttt{FFNN}}{} architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size $b_s$, which are fixed in our method. As a pure DL method, \texttt{\,MLR $\,$}{} method is scalable. Its complexity is the same as training a standard {\texttt{NN}{}}{} \cite{Murugesan2018Embarrassingly}. We refer to the Appendix for a detailed description of the training protocol. \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the \texttt{BCE-MLR}{} loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. The {\texttt{FFNN}}{} architecture and the training protocol are essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a Sigmoid and the Cross Entropy (\texttt{CE}) loss. Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. The structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for a detailed discussion on this specific adaptation. \section{Experiments}\label{sec:exp} We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. See the supplementary material for the the github repository, the detailed description of our experimental setting and the exhaustive list of compared methods with their performances. \subsection{Setting.} \paragraph{Benchmark description.} To produce this benchmark we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules detailed in the appendix ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \paragraph{Preprocessing.} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot-encoding for categorical values and standardization for numerical features and target. We repeated our experiments 10 times using a different $80:20$ $train$/$test$ split of the data and no stratification scheme. \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|c|c|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \subsection{Ablation Analysis.} \begin{table}[H] \caption{Ablation Study in Regression. } \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline {\texttt{FFNN}} & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline + Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline + Ridge + Struct. Dithering & $ 0.323 \pm 0.075 $ & $ 0.400 \pm 0.048 $ \\ \hline + Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $ \\ \hline \texttt{\,MLR $\,$}{} & $ 0.371 \pm 0.024 $ & $ 0.433 \pm 0.000 $ \\ \hline \end{tabular} \end{table} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets with different sample sizes and feature to sample ratios. We repeated each experiment over 100 random $train$/$test$ splits. All the results presented here correspond to the architecture and hyperparameters of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{}. A standard {\texttt{FFNN}}{} of $2$ layers with a wide architecture ($J=1024$) cannot be trained efficiently on such small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark (Table \ref{tab:perfR2_rank}). Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach. The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging ($0.062$) is still of the same order of magnitude as the one we got when we applied permutations on top of Ridge to the {\texttt{FFNN}}{} ($0.043$). This means these two ingredients (permutations and struct. dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \subsection{Overall Performance comparisons.} \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the regression task on our benchmark. {\texttt{P90}}, {\texttt{P95}}, {\texttt{P98}}: the number of datasets a model achieves 90\%, 95\%, 98\% or more of the maximum test ${\texttt{R}^2}$-score respectively, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \label{tab:perfR2_rank} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean ${\texttt{R}^2}$-score & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline \texttt{\,MLR $\,$} & $2.525 \pm 1.355$ & $0.744 \pm 0.022$ & $0.963$ & $0.856$ & $0.719$ & $0.946 \pm 0.089$\\ {\texttt{GBDT}} & $2.719 \pm 1.850$ & $0.726 \pm 0.093$ & $0.863$ & $0.756$ & $0.650$ & $0.898 \pm 0.237$\\ {\texttt{RF}} & $3.538 \pm 1.896$ & $0.724 \pm 0.070$ & $0.825$ & $0.681$ & $0.481$ & $0.914 \pm 0.159$\\ {\texttt{SVM}} & $4.281 \pm 1.534$ & $0.711 \pm 0.068$ & $0.831$ & $0.594$ & $0.362$ & $0.882 \pm 0.172$\\ {\texttt{NN}{}} & $4.331 \pm 2.206$ & Aberating value & $0.725$ & $0.606$ & $0.475$ & Aberating value \\ {\texttt{MARS}} & $5.644 \pm 1.623$ & $0.677 \pm 0.066$ & $0.537$ & $0.350$ & $0.163$ & $0.861 \pm 0.167$\\ {\texttt{LM}} & $5.938 \pm 1.804$ & $0.658 \pm 0.094$ & $0.531$ & $0.294$ & $0.156$ & $0.837 \pm 0.179$\\ {\texttt{TREE}} & $7.125 \pm 1.613$ & $0.512 \pm 0.237$ & $0.338$ & $0.188$ & $0.119$ & $0.578 \pm 0.570$\\ {\texttt{Baseline}} & $8.900 \pm 0.375$ & $-0.023 \pm 0.211$ & $0.000$ & $0.000$ & $0.000$ & $-0.031 \pm 0.075$\\ \hline \end{tabular} } \end{table} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods for the regression task.} {\texttt{Ens-MLR}}{} with a {\texttt{P98}}{} of $0.719$ on the whole benchmark and Friedman Rank of $2.525$ is above {\texttt{GBDT}}{}, with a {\texttt{P98}}{} of $0.65$ and Friedman Rank $2.719$ in Table \ref{tab:perfR2_rank}. As revealed by its {\texttt{PMA}}{} statistics at $0.946 , {\texttt{Ens-MLR}}{} is far ahead of the other methods. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like {\texttt{RF}}{} which are often deemed the safest pick. Standard {\texttt{NN}{}}{} with equivalent architecture and {\texttt{MSE}}{} loss performs poorly with a Friedman rank of $4.331$. Noticeably, {\texttt{Ens-MLR}}{} was most often the best method among all the \texttt{\,MLR $\,$}{} methods \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the classification task with the accuracy score.} \label{tab:ACCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{Acc.}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.769 \pm 0.998$ & $0.889 \pm 0.038$ & $0.963$ & $0.881$ & $0.819$ & $0.971 \pm 0.054$\\ \texttt{\,MLR $\,$} & $2.913 \pm 1.403$ & $0.882 \pm 0.031$ & $0.963$ & $0.869$ & $0.800$ & $0.956 \pm 0.070$\\ {\texttt{RF}} & $3.056 \pm 1.415$ & $0.882 \pm 0.038$ & $0.912$ & $0.819$ & $0.656$ & $0.958 \pm 0.063$\\ {\texttt{GLM}} & $3.756 \pm 1.561$ & $0.862 \pm 0.060$ & $0.806$ & $0.631$ & $0.463$ & $0.940 \pm 0.062$\\ {\texttt{TREE}} & $4.763 \pm 1.195$ & $0.836 \pm 0.062$ & $0.731$ & $0.381$ & $0.237$ & $0.908 \pm 0.084$\\ {\texttt{QDA}} & $5.675 \pm 1.688$ & $0.723 \pm 0.160$ & $0.338$ & $0.194$ & $0.169$ & $0.796 \pm 0.159$\\ {\texttt{Baseline}} & $6.856 \pm 1.574$ & $0.593 \pm 0.168$ & $0.069$ & $0.025$ & $0.025$ & $0.661 \pm 0.133$\\ {\texttt{NN}{}} & $7.213 \pm 0.980$ & $0.565 \pm 0.152$ & $0.025$ & $0.013$ & $0.013$ & $0.625 \pm 0.136$\\ \hline \end{tabular} } \end{table} \begin{table} \caption{\textbf{Performances of the best in each class of methods} for the classification task with {\texttt{AUC}}{} score.} \label{tab:AUCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{AUC}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.738 \pm 1.190$ & $0.918 \pm 0.048$ & $0.938$ & $0.912$ & $0.875$ & $0.963 \pm 0.108$\\ \texttt{\,MLR $\,$} & $2.900 \pm 1.304$ & $0.908 \pm 0.012$ & $0.912$ & $0.844$ & $0.694$ & $0.952 \pm 0.106$\\ {\texttt{RF}} & $2.938 \pm 1.390$ & $0.912 \pm 0.047$ & $0.931$ & $0.887$ & $0.706$ & $0.956 \pm 0.095$\\ {\texttt{LM}} & $3.881 \pm 1.572$ & $0.889 \pm 0.060$ & $0.775$ & $0.662$ & $0.475$ & $0.935 \pm 0.094$\\ {\texttt{NN}{}} & $4.856 \pm 1.545$ & $0.843 \pm 0.154$ & $0.706$ & $0.506$ & $0.412$ & $0.896 \pm 0.155$\\ {\texttt{TREE}} & $5.975 \pm 1.160$ & $0.813 \pm 0.091$ & $0.394$ & $0.212$ & $0.212$ & $0.852 \pm 0.119$\\ {\texttt{QDA}} & $6.031 \pm 1.371$ & $0.772 \pm 0.149$ & $0.394$ & $0.256$ & $0.150$ & $0.818 \pm 0.152$\\ {\texttt{Baseline}} & $7.681 \pm 1.084$ & $0.499 \pm 0.151$ & $0.006$ & $0.000$ & $0.000$ & $0.537 \pm 0.072$\\ \hline \end{tabular} } \end{table} For binary classification task with the usual accuracy score, \texttt{\,MLR $\,$}{} is a close second behind {\texttt{GBDT}}{} both in terms of Accuracy and {\texttt{AUC}}{} scores. \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. Nonetheless, higher performances can be achieved with the \texttt{\,MLR $\,$}{} approach by data-dependent tuning of the hyperparameters in Table \ref{tab:architectures1} and/or leveraging usual {\text{DL}}{} schemes. By replacing the standard losses by the \texttt{\,MLR $\,$}{} loss to train a simple {\texttt{FFNN}}{}, we were able to break down the tabular data deadlock and outperform the gold standard. However, nothing in our method is constrained to this setting. The \texttt{\,MLR $\,$}{} approach is perfectly applicable on {\texttt{CNN}}{} for classification tasks in the low sample regime with robustness issues. \newpage \bibliographystyle{plain} \section{Introduction} The need to handle tabular data arises in many fields ($e.g.$ material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}). In some of these fields, including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, these datasets can be very small since collecting samples and assembling large datasets may be costly, or even impossible. In some contexts were data are collected on a day to day basis, being able to make informed decisions and update policies as soon as possible can be a vital concern(cite). Despite the spectacular performance of Deep Learning ({\text{DL}}) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}, until recently there was few interest for their comparatively poor performances on tabular datasets, especially in the small sample regime ($n < 10^3$ or even $n<300$). Most experiments seemed to indicate that tree based ensemble methods \cite{Denil2014narrow,Delgado14a,Mentch2020Rand,Wainberg2016} were the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a,Wainberg2016}. Very recently, there has been a renewed interest\cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a} in the subject, motivated in part by the hope of possible breakthroughs comparable in magnitude to those witnessed for other data structures in terms of performance. This lead to the introduction of new network architectures(cite), losses(cite) regularization techniques (cite), and meta-learning schemes(cite) to handle tabular data. Technics to leverage classical schemes like dropout \cite{srivastava14a} and weight decay \cite{Hanson1988Comparing} specifically for tabular data were also studied. So far, benchmarks show mixed results (Cite, Cite), with some methods outperforming the aforementionned state of the art techniques (XGBoost, Catboost,...) on some large datasets. See cite() for a more detailed review of the current state of {\text{DL}}{} for tabular data. The comparison between {\text{DL}}{} and other techniques is even less favorable when we focused on the smallest datasets included in those benchmarks. Neural networks can memorize almost perfectly even large datasets(cite) and rely heavily on weight sharing (cite) and implicit regularization (cite) to achieve generalization. For unstructured data with no prior knowledge about domain distribution and feature relations the go-to solutions to data scarcity, transfer learning\cite{Oquab_2014_CVPR} and data-augmentation, most often fall short. \paragraph{Our Contribution} In this article we present \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}) a novel approach to reduce memorization during gradient descent when training over-parametrized models. We detail its application to very wide {\texttt{FFNN}}{}(section 2) and study the impact (section 3) for small tabular datasets. We evaluate generalization performance for a wide set of benchmarks against SOTA techniques(section 4). We provide a pytorch implementation and code to replicate experimental results. \section{Nouveau Plan} \subsubsection{Generalization and Memorization} Let us give some general definitions of \textbf{Generalization, Fitting and Memorization}: For the objective loss \textsf{L}\, (eg. Accuracy) and test dataset (\ensuremath{\textsf{X}_{Test}},\ensuremath{\textsf{Y}_{Test}}), we consider a Neural Network \textsf{f}\,. Its weights \ensuremath{\textsf{w}_{Train}} were found by minimizing training loss \ensuremath{\textsf{L}'}\, (eg. Cross-Entropy), using train datasets (\ensuremath{\textsf{X}_{Train}},\ensuremath{\textsf{Y}_{Train}}). Using the constant prediction \ensuremath{\textsf{Y}_{Cste}} given by the intercept model (eg. mean or mode value) as a baseline comparison we choose to define \ensuremath{\textsf{Gen}\,}, \ensuremath{\textsf{Fit}\,} and \ensuremath{\textsf{Mem}\,} as follow: \begin{align} \ensuremath{\textsf{Gen}\,} &= \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\ensuremath{\textsf{Y}_{Test}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Test}}, \ensuremath{\textsf{w}_{Train}}))\\ \ensuremath{\textsf{w}_{Train}} &= argmax \ensuremath{\textsf{Fit}\,} = argmax \ensuremath{\textsf{L}'}\,(\ensuremath{\textsf{Y}_{Train}}, \ensuremath{\textsf{Y}_{Cste}}) - \ensuremath{\textsf{L}'}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}})))\\ \ensuremath{\textsf{Mem}\,} &= \ensuremath{\textsf{Fit}\,} - \ensuremath{\textsf{Gen}\,} \end{align} We call \textbf{Memorization} the gap between train and test performance, although it has not been defined as such in (). By default, given the tendency of over-parametrized estimators to overfit, we expect $\ensuremath{\textsf{Fit}\,} > \ensuremath{\textsf{Gen}\,} $, most importantly, $\ensuremath{\textsf{Gen}\,}(\ensuremath{\textsf{w}_{Train}}) < max \ensuremath{\textsf{Gen}\,}$. Traditionally, we modify the training procedure using explicit regularization such that the obtained \ensuremath{\textsf{w}_{Train}} generalizes more. We can modify \ensuremath{\textsf{L}'}\, to move \ensuremath{\textsf{w}_{Train}} away from memo introduce constraint \textsf{C}\,, causing \ensuremath{\textsf{w}} to live in a subspace. We modify \ensuremath{\textsf{L}'}\,, adding secondary objectives based on \ensuremath{\textsf{w}}. Both \textsf{C}\, and \ensuremath{\textsf{L}'}\, are chosen by picking hyperparameters \ensuremath{\lambda}\, which maximize the initial objective \textsf{L}\, on validation set (\ensuremath{\textsf{X}_{Valid}}, \ensuremath{\textsf{Y}_{Valid}}), a proxy objective for \ensuremath{\textsf{Gen}\,}. \begin{align} \text{Outer loop : } \widehat{\ensuremath{\lambda}\,} &= argmax_\ensuremath{\lambda}\, \ensuremath{\widehat{\textsf{Gen}}\,} = argmin_\ensuremath{\lambda}\, \textsf{L}\,(\ensuremath{\textsf{Y}_{Valid}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Valid}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,)))\\ \text{Inner loop : } \widehat{\ensuremath{\textsf{w}}}(\ensuremath{\lambda}\,) &= argmax \ensuremath{\widehat{\textsf{Fit}}\,}_{\ensuremath{\lambda}\,} = argmin_{\ensuremath{\textsf{w}}| \textsf{C}\,(\ensuremath{\textsf{w}}, \ensuremath{\lambda}\,) = 0} \ensuremath{\textsf{L}'}\,_{\ensuremath{\lambda}\,}(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}})))\\ \end{align} Studying regularization gives only a very partial view of how DNN achieve generalization as depicted in Seminal work from (Zhang) and (Arpit). Both study the learning dynamic when observations and labels are not related. They assume the same mechanisms responsible for memorization on true data can be isolated and exhibited by training a neural network with same architecture over muddled labels. Here we will go three steps further. First, training two neural networks in parallel on both true and unrelated labels can give us a metric to quantify memorization happening for the neural net learning on true data. Second, minimizing this metric removes the negative impact of memorization on the generalization performance of the neural network which is fitting true data. Third, this metric can be a loss function differentiable with respect to \ensuremath{\lambda}\,, enabling gradient descent optimization. Different schemes to remove/reduce the relationship between $\ensuremath{\textsf{X}_{Train}}$ and $\ensuremath{\textsf{Y}_{Train}}$ are considered (Zhang) and (Arpit). We choose to use random permutation without replacement over labels. To insure reliability we will use several vectors of permuted labels, changing the random seed. In Arpit we see differences in learning dynamic for many indicators. An out-of-sample metric like valid performance(fig 10) would be redundant with cross-validation schemes. Comparing respective speeds during training (ie. sensitivity)(fig 6,7) makes sense. We tried to leverage Double Back propagation but could not make it work in practice. Measuring the number of iterations before convergence(fig 6,7) requires running full gradient descent for each vector of permuted labels. This is also the case with Train performance after convergence(fig 11), \textit{unless} we can design \textsf{C}\, and \ensuremath{\textsf{L}'}\, such that $\widehat{\ensuremath{\textsf{w}}}(\ensuremath{\lambda}\,, Y)$ is an explicit function of $\ensuremath{\lambda}\,$. We choose Train performance as our point of comparison. If we wish to maximize the memorization gap between solutions for true and permuted labels, then the objective is to get train loss to be as small as possible on true data and as close as possible to the intercept performance on permuted data. Denoting $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ the set of vectors of permuted targets obtained through random permutation without replacement $\pi$, we can define our new criterion we call "Muddling label Regularization" or \texttt{\,MLR $\,$}{}: \begin{align} \texttt{\,MLR $\,$}{}(\ensuremath{\lambda}\,) &=\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,, \ensuremath{\textsf{Y}_{Train}}))) \\ &+ \Sigma_t |\textsf{L}\,(\ensuremath{\textsf{Y}_{Train}}, \ensuremath{\textsf{Y}_{Cste}}) - \textsf{L}\,(\pi^t(\ensuremath{\textsf{Y}_{Train}}), \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,, \pi^t(\ensuremath{\textsf{Y}_{Train}}))))|\\ \ensuremath{\textsf{w}_{Train}}(\ensuremath{\lambda}\,, Y) &= argmin_{\ensuremath{\textsf{w}}| \textsf{C}\,(\ensuremath{\textsf{w}}, \ensuremath{\lambda}\,) = 0} \ensuremath{\textsf{L}'}\,_\ensuremath{\lambda}\, (Y, \textsf{f}\,(\ensuremath{\textsf{X}_{Train}}, \ensuremath{\textsf{w}}))\\ \end{align} \subsection{\texttt{\,MLR $\,$}{} as a loss for NN} Now we will focus on using \texttt{\,MLR $\,$}{} as a loss to train FFNN. We introduce the following notations for FFNN with fully-connected layers. Given $d$ denotes the number of features, we consider a simple architecture with $L$ layers, $J$ nodes on each hidden layer, the $S_h$ the activation function between each hidden layer (eg. {\texttt{ReLU}}\, ) and $S_o$ the output activation function (eg: sigmoid). For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&S_h(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&S_o(\textbf{A}^{L-1}W^L + B^{L}),\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. Now \ensuremath{\textsf{w}} will denote the weights on each layers, $\ensuremath{\textsf{w}} = (W^l,B^l)_{l < L}$. As said earlier, to learn \ensuremath{\lambda}\, through gradient descent over \texttt{\,MLR $\,$}{} for a FFNN, we need to find \textsf{C}\, and \ensuremath{\textsf{L}'}\, such that $\widehat{\ensuremath{\textsf{w}}}(\ensuremath{\lambda}\,, Y)$ is an explicit function differentiable w.r.t. $\ensuremath{\lambda}\,$. \subsubsection{Constraints for zero-depth neural network} For linear models (i.e. $L = 0$, $\textbf{A}^L = X$ and $\textsf{f}\,(X, \ensuremath{\textsf{w}}) = X W^L$), we consider the loss $\ensuremath{\textsf{L}'}\,_\ensuremath{\lambda}\, = RMSE(Y, X W^L) + \ensuremath{\lambda}\, ||\ensuremath{\textsf{w}}||$ with $\ensuremath{\lambda}\, \in \mathbb{R}_+^*$. We choose the following constraint : $\textsf{C}\,(W^L, \ensuremath{\lambda}\,) = 0 \iff \ensuremath{\textsf{w}} = argmin_{W^L} \ensuremath{\textsf{L}'}\,_\ensuremath{\lambda}\, (Y, X W^L)$ meaning given $X$ and $Y$, \ensuremath{\textsf{w}} minimizes the RMSE loss with a \ensuremath{\lambda}\, level of L2 penalization. Using the close-form of the Ridge estimator, we have $argmin_{W^L| \textsf{C}\,(W^L, \ensuremath{\lambda}\,) = 0} \ensuremath{\textsf{L}'}\,_\ensuremath{\lambda}\, (Y, X W^L) = (X^\top X + Id \ensuremath{\lambda}\,)^{-1}X^\top Y = \beta^{Ridge}(X, Y, \ensuremath{\lambda}\,)$ which is both explicit and differentiable w.r.t. \ensuremath{\lambda}\,. \subsubsection{Constraints for deep neural networks} Now, we introduce another NN with several hidden layers, denoting $\ensuremath{\textsf{w}}'$ the weights on the hidden layers of that deep NN, and $A(X,\ensuremath{\textsf{w}}')$ the output of the hidden layers of that NN. If we keep $\ensuremath{\textsf{L}'}\,$ the L2-penalized RMSE and \textsf{f}\, the family of linear estimators, but replace $X$ with $A(X,\ensuremath{\textsf{w}}')$, we get $argmin_{W^L| \textsf{C}\,(W^L, \ensuremath{\lambda}\,) = 0} \ensuremath{\textsf{L}'}\,_(Y, A(X,\ensuremath{\textsf{w}}')W^L) = \beta^{Ridge}(A(X,\ensuremath{\textsf{w}}'), Y, \ensuremath{\lambda}\,)$. Then, we combine both networks, meaning $\ensuremath{\textsf{w}} = (W^L, \ensuremath{\textsf{w}}')$ and $\textsf{f}\,(X, \ensuremath{\textsf{w}}) = A(X,\ensuremath{\textsf{w}}')W^L$. We choose the two following constraint: (1) $W^L$ minimizes the quantity $RMSE(Y, \textsf{f}\,(X, \ensuremath{\textsf{w}})) + \ensuremath{\lambda}\, ||W^L||$, (2) $\ensuremath{\textsf{w}}' = \ensuremath{\lambda}\,'$ where $(\ensuremath{\lambda}\,,\ensuremath{\lambda}\,')$ are the hyper-parameters of our constraint. Then, $\widehat{\ensuremath{\textsf{w}}}((\ensuremath{\lambda}\,,\ensuremath{\lambda}\,'), Y) = \beta^{Ridge}(A(X,\ensuremath{\textsf{w}}'), Y, \ensuremath{\lambda}\,)$ is an explicit function differentiable with respect to $(\ensuremath{\lambda}\,,\ensuremath{\lambda}\,')$. \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \label{sec:MLRmethod} Let us now precise how to obtain $\widehat{(\ensuremath{\lambda}\,,\ensuremath{\lambda}\,')} = argmin \texttt{\,MLR $\,$}{}((\ensuremath{\lambda}\,,\ensuremath{\lambda}\,'))$ and most importantly $\widehat{\ensuremath{\textsf{w}}}((\ensuremath{\lambda}\,,\ensuremath{\lambda}\,'), \ensuremath{\textsf{Y}_{Train}})$, the weights obtained when training a FFNN with \texttt{\,MLR $\,$}{}. During training, we consider observations $\ensuremath{\textsf{X}_{Train}}$, $\ensuremath{\textsf{Y}_{Train}}$. When using minibatch, at each gradient step $\ensuremath{\textsf{X}_{Train}}$, $\ensuremath{\textsf{Y}_{Train}}$ and $\ensuremath{\textsf{Y}_{\pi}}$ will correspond to the current minibatch. Stochastic gradient descent is never used with \texttt{\,MLR $\,$}{}(ie $n_{batch} > 1$). Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. When training a FFNN with \texttt{\,MLR $\,$}{}, we will consider the weights of the output layer to be entirely determined by $(W^l,B^l)_{1\cdots L-1}$, a scalar parameter $\lambda$ and a set of observations and labels X and Y: $W^L = \beta^{Ridge}(\textbf{A}^{L-1}, Y, \ensuremath{\lambda}\,), \ensuremath{\lambda}\,')$ and $B^{L} = 0$. X being $\ensuremath{\textsf{X}_{Train}}$ and Y being either $\ensuremath{\textsf{Y}_{Train}}$ or $\ensuremath{\textsf{Y}_{\pi}}$ depending on which part of the \texttt{\,MLR $\,$}{} loss is evaluated. Although $W^L$ corresponds to the solution for the RMSE with L2 penalization, using the identity function for the output layer, \texttt{\,MLR $\,$}{} is not evaluated with this loss. For binary classification \texttt{\,MLR $\,$}{} is evaluated using ${\texttt{BCE}}{}$. For regression we use ${\texttt{RMSE}}$ instead of the usual mean-squared error because it works better in practice. Also, for binary classification, $S_o$ is the sigmoid function. After training, values of each weights and bias will be set once and for all to their values at iteration $i^*$ (either the last or best if using early stopping). For $W^L$, we will take the value corresponding to the parameters and batch used to compute $W^L$ at iteration $i^*$, using true labels. Then, the train batch and parameter $\lambda$ will be discarded since $W^L$ now has a fix value. \subsection{\texttt{\,MLR $\,$}{} Loss Implementation} \begin{mydef}[\texttt{\,MLR $\,$}{} loss] \label{MLRlossBigsetting} Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ to be the baseline prediction given by the intercept model. Given $W^L$ is a function of both X and Y during training, the prediction of the network will depend on both X and Y: ${\texttt{FFNN}}{}(X,Y) = S_o(\textbf{A}^{L-1}(X) \beta^{Ridge}(\textbf{A}^{L-1}(X), Y, \ensuremath{\lambda}\,))$. Setting $\textbf{H}(X) = \textbf{A}^{L-1}(X) (\textbf{A}^{L-1}(X) \textbf{A}^{L-1}(X)^\top + \ensuremath{\lambda}\, \ensuremath{\mathbb{I}}_J)^{-1} \textbf{A}^{L-1}(X)^\top $, we get ${\texttt{FFNN}}{}(X,Y) = S_o(\textbf{H}(X))Y)$ We define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= \textsf{L}\,\,\left(\textbf{Y}\,;\,S_o(\textbf{H}(X)\textbf{Y})\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|\textsf{L}\,\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - \textsf{L}\,\,\left(\pi^t(\textbf{Y})\,;\,S_o(\textbf{H}(X)\,\pi^t(\textbf{Y}))\right)\right|. \end{align*} \end{mydef} \paragraph{Structured Dithering.} Reprendre motivation dithering... We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. Motivation Dithering... For RMSE noise target noise pred equivalent mais for BCE pas equivalent, mieux loss sur DECISION FUNCTION (pas pred, appliquée avant $S_o$). \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the {\texttt{FFNN}}{} is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ \textbf{does not require hyperparameter tuning}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix,SHARMA201331}. \subsection{Training protocol} \paragraph{Initialization of training parameters.} For $\boldsymbol{\theta}$ the weights of the hidden layers we use standard Xavier initialization(\cite{Gloriotetal}). For $\lambda$ too large, the estimator behaves like the intercept model, for $\lambda$ too small it behaves like the OLS. In both cases we encounter gradient vanishing. We initialize $\lambda$ at the point where $\texttt{\,MLR $\,$}{}$ sensitivity w.r.t. $\lambda$ is maximal. We estimate that argmax using grid search on finite difference approximation, to avoid computing the derivation graph. That way we only need to compute $\textbf{A}^{L-1}$ once. \paragraph{Data Preprocessing} For categorical features we apply one-hot encoding. Then, all features are standardized using the train set. For regression the target vector is standardized using the train set. Then permutations are generated (and not re-sampled for each minibatch). Meanwhile, the dithering noise is randomly sampled for each minibatch. \section{Experiments}\label{sec:exp} \subsection{Implementation of our method} \paragraph{The \textbf{NN}{} Architecture.} The following choices are justified in the ablation study (section...) In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. Concerning activation functions, we always take $S_h = {\texttt{ReLU}}$. For regression $S_o$ is the identity function. For classification $S_o$ is the sigmoid at train time and the ${\texttt{Hardmax}}$ at test time. \paragraph{Additional regularization schemes} Dither{} \cite{dither} : Beaucoup trop long! We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Hyper-parameters default values and range for tuning} We set a fix budget ({\texttt{FixB}} = 5 min) and train until convergence or divergence threshold are reached, else we stop if time budget or max iter is $depassé$. Then we pick th Then we read the ${\texttt{R}^2}$-score/AUC for each iteration on the $validation$-set and set the final weights using the iteration with the best ${\texttt{R}^2}$-score/AUC. Default values for hyper-parameters are set based on the ablation study (section...): ..... JUSTE LES VALEURS PAS DE COMMENTAIRE: => ABLATION STUDY Using wider architecture ($J=2^{10}$) and bigger batch size ($b_s = \min(J,n)$) is always better. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. \paragraph{Depth and model ensembling} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} \subsection{Benchmark protocol}\label{sec:exp} For datasets used, we provide both the code to download raw files and apply each steps, and the resulting data matrices. For experiments, random seeds and random states are manually set for reproctibility. The code to produce our experiments and the tables of the exhaustive results are available at $ref$. \paragraph{Benchmark description.} To produce this benchmark we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules detailed in the appendix ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \paragraph{Preprocessing.} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot-encoding for categorical values and standardization for numerical features and target. We repeated our experiments 10 times using a different $80:20$ $train$/$test$ split of the data and no stratification scheme. \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|c|c|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \subsection{Benchmark Results} \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the regression task on our benchmark. {\texttt{P90}}, {\texttt{P95}}, {\texttt{P98}}: the number of datasets a model achieves 90\%, 95\%, 98\% or more of the maximum test ${\texttt{R}^2}$-score respectively, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \label{tab:perfR2_rank} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean ${\texttt{R}^2}$-score & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline \texttt{\,MLR $\,$} & $2.525 \pm 1.355$ & $0.744 \pm 0.022$ & $0.963$ & $0.856$ & $0.719$ & $0.946 \pm 0.089$\\ {\texttt{GBDT}} & $2.719 \pm 1.850$ & $0.726 \pm 0.093$ & $0.863$ & $0.756$ & $0.650$ & $0.898 \pm 0.237$\\ {\texttt{RF}} & $3.538 \pm 1.896$ & $0.724 \pm 0.070$ & $0.825$ & $0.681$ & $0.481$ & $0.914 \pm 0.159$\\ {\texttt{SVM}} & $4.281 \pm 1.534$ & $0.711 \pm 0.068$ & $0.831$ & $0.594$ & $0.362$ & $0.882 \pm 0.172$\\ {\texttt{NN}{}} & $4.331 \pm 2.206$ & Aberating value & $0.725$ & $0.606$ & $0.475$ & Aberating value \\ {\texttt{MARS}} & $5.644 \pm 1.623$ & $0.677 \pm 0.066$ & $0.537$ & $0.350$ & $0.163$ & $0.861 \pm 0.167$\\ {\texttt{LM}} & $5.938 \pm 1.804$ & $0.658 \pm 0.094$ & $0.531$ & $0.294$ & $0.156$ & $0.837 \pm 0.179$\\ {\texttt{TREE}} & $7.125 \pm 1.613$ & $0.512 \pm 0.237$ & $0.338$ & $0.188$ & $0.119$ & $0.578 \pm 0.570$\\ {\texttt{Baseline}} & $8.900 \pm 0.375$ & $-0.023 \pm 0.211$ & $0.000$ & $0.000$ & $0.000$ & $-0.031 \pm 0.075$\\ \hline \end{tabular} } \end{table} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods for the regression task.} {\texttt{Ens-MLR}}{} with a {\texttt{P98}}{} of $0.719$ on the whole benchmark and Friedman Rank of $2.525$ is above {\texttt{GBDT}}{}, with a {\texttt{P98}}{} of $0.65$ and Friedman Rank $2.719$ in Table \ref{tab:perfR2_rank}. As revealed by its {\texttt{PMA}}{} statistics at $0.946 , {\texttt{Ens-MLR}}{} is far ahead of the other methods. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like {\texttt{RF}}{} which are often deemed the safest pick. Standard {\texttt{NN}{}}{} with equivalent architecture and {\texttt{MSE}}{} loss performs poorly with a Friedman rank of $4.331$. Noticeably, {\texttt{Ens-MLR}}{} was most often the best method among all the \texttt{\,MLR $\,$}{} methods \begin{table}[H] \caption{\textbf{Performances of the best method in each class of methods} for the classification task with the accuracy score.} \label{tab:ACCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{Acc.}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.769 \pm 0.998$ & $0.889 \pm 0.038$ & $0.963$ & $0.881$ & $0.819$ & $0.971 \pm 0.054$\\ \texttt{\,MLR $\,$} & $2.913 \pm 1.403$ & $0.882 \pm 0.031$ & $0.963$ & $0.869$ & $0.800$ & $0.956 \pm 0.070$\\ {\texttt{RF}} & $3.056 \pm 1.415$ & $0.882 \pm 0.038$ & $0.912$ & $0.819$ & $0.656$ & $0.958 \pm 0.063$\\ {\texttt{GLM}} & $3.756 \pm 1.561$ & $0.862 \pm 0.060$ & $0.806$ & $0.631$ & $0.463$ & $0.940 \pm 0.062$\\ {\texttt{TREE}} & $4.763 \pm 1.195$ & $0.836 \pm 0.062$ & $0.731$ & $0.381$ & $0.237$ & $0.908 \pm 0.084$\\ {\texttt{QDA}} & $5.675 \pm 1.688$ & $0.723 \pm 0.160$ & $0.338$ & $0.194$ & $0.169$ & $0.796 \pm 0.159$\\ {\texttt{Baseline}} & $6.856 \pm 1.574$ & $0.593 \pm 0.168$ & $0.069$ & $0.025$ & $0.025$ & $0.661 \pm 0.133$\\ {\texttt{NN}{}} & $7.213 \pm 0.980$ & $0.565 \pm 0.152$ & $0.025$ & $0.013$ & $0.013$ & $0.625 \pm 0.136$\\ \hline \end{tabular} } \end{table} \begin{table} \caption{\textbf{Performances of the best in each class of methods} for the classification task with {\texttt{AUC}}{} score.} \label{tab:AUCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{AUC}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.738 \pm 1.190$ & $0.918 \pm 0.048$ & $0.938$ & $0.912$ & $0.875$ & $0.963 \pm 0.108$\\ \texttt{\,MLR $\,$} & $2.900 \pm 1.304$ & $0.908 \pm 0.012$ & $0.912$ & $0.844$ & $0.694$ & $0.952 \pm 0.106$\\ {\texttt{RF}} & $2.938 \pm 1.390$ & $0.912 \pm 0.047$ & $0.931$ & $0.887$ & $0.706$ & $0.956 \pm 0.095$\\ {\texttt{LM}} & $3.881 \pm 1.572$ & $0.889 \pm 0.060$ & $0.775$ & $0.662$ & $0.475$ & $0.935 \pm 0.094$\\ {\texttt{NN}{}} & $4.856 \pm 1.545$ & $0.843 \pm 0.154$ & $0.706$ & $0.506$ & $0.412$ & $0.896 \pm 0.155$\\ {\texttt{TREE}} & $5.975 \pm 1.160$ & $0.813 \pm 0.091$ & $0.394$ & $0.212$ & $0.212$ & $0.852 \pm 0.119$\\ {\texttt{QDA}} & $6.031 \pm 1.371$ & $0.772 \pm 0.149$ & $0.394$ & $0.256$ & $0.150$ & $0.818 \pm 0.152$\\ {\texttt{Baseline}} & $7.681 \pm 1.084$ & $0.499 \pm 0.151$ & $0.006$ & $0.000$ & $0.000$ & $0.537 \pm 0.072$\\ \hline \end{tabular} } \end{table} For binary classification task with the usual accuracy score, \texttt{\,MLR $\,$}{} is a close second behind {\texttt{GBDT}}{} both in terms of Accuracy and {\texttt{AUC}}{} scores. \subsection{Ablation Analysis.} \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. Nonetheless, higher performances can be achieved with the \texttt{\,MLR $\,$}{} approach by data-dependent tuning of the hyperparameters in Table \ref{tab:architectures1} and/or leveraging usual {\text{DL}}{} schemes. By replacing the standard losses by the \texttt{\,MLR $\,$}{} loss to train a simple {\texttt{FFNN}}{}, we were able to break down the tabular data deadlock and outperform the gold standard. However, nothing in our method is constrained to this setting. The \texttt{\,MLR $\,$}{} approach is perfectly applicable on {\texttt{CNN}}{} for classification tasks in the low sample regime with robustness issues. \newpage \bibliographystyle{plain} \section{Katia: Introduction} Generalization is a central problem in Deep Learning (DL). It is strongly connected to the notion of {\it capacity} of a model, that is the range of functions this model can approximate. It impacts both the complexity of the patterns a model can learn but also {\it memorization}, the ability of a model to fit arbitrary labels \cite{goodfellow2016deep}. Because of their high capacity, overparametrized Deep Neural Networks ({\texttt{DNN}}{}) can memorize small size Tabular Datasets ({\text{TD}}) and achieve poor generalization performances \cite{?}. Common techniques like Drop-out \cite{Hinton2012,srivastava14adrop}, early stopping \cite{pmlr-v108-li20j}), data augmentation \cite{shorten2019survey} or weight decay \cite{Hanson1988Comparing,krogh1992simple,bos1996using} used during training can reduce the capacity of a {\texttt{DNN}}{} and sometimes delay the memorization phenomenon but cannot prevent it \cite{arpit2017closer}. In this paper, we propose \texttt{AdaCap}{}, a new training technique for Feed-Forward Neural Networks ({\texttt{FFNN}}) that automatically optimize the $capacity$ of {\texttt{FFNN}}{} so it can capture the high-level abstract representations underlying the problem at hand without memorizing the train dataset. \texttt{AdaCap}{} relies on two novel ingredients. The first one is the \texttt{Tikhonov}{} Training Scheme (TTS) which provides a differentiable data-dependent quantification of the capacity of a {\texttt{FFNN}}{} through the application of the \texttt{Tikhonov}{} operator on the output of the last hidden layer. TTS modulates the $capacity$ of the {\texttt{FFNN}}{} via the additional \texttt{Tikhonov}{} parameter that can be trained simultaneously as the {\texttt{FFNN}}{} weights by backpropagation gradient descent. This new TTS works in a fundamentally different way form other existing training techniques like weight decay. Figure \ref{fig:1Xcorrelmat} reveals that the \texttt{Tikhonov}{} training scheme alone produced highly-structured embeddings whereas the embeddings produced by weigh decay do not look any different from the initialization and do not present any remarkable structure. \begin{figure}[htp] \centering \includegraphics[scale=0.15]{FiguresPDF/CorrelMat/clusteredcorrelmatMLR_L2_3.pdf} \includegraphics[scale=0.15]{FiguresPDF/CorrelMat/clusteredcorrelmatNN_L2_3.pdf} \includegraphics[scale=0.15]{FiguresPDF/CorrelMat/WD1em4_clusteredcorrelmatNN_L2_3.pdf} \caption{We trained a {\texttt{DNN}}{} with either \texttt{AdaCap}{} or the usual method with weight decay, using identical architectures and parameters in both cases. We computed the correlation matrices of the {\texttt{DNN}}{} hidden layer weights. \textbf{Left:} {\texttt{DNN}}{} trained with \texttt{AdaCap}{}. We observe highly structured layers. \textbf{Middle:} {\texttt{DNN}}{} trained without using weight decays nor \texttt{AdaCap}{}. \textbf{Right:} {\texttt{DNN}}{} trained using weight decays with parameter $1e^{-4}$. There is no apparent structure in the hidden layers.} \label{fig:1Xcorrelmat} \end{figure} \textcolor{magenta}{Katia: A crucial part is the }fine tuning of the parameter \texttt{Tikhonov}{} as it has an impact on the performance of the generalization. This is achieved thanks to the second new ingredient: the loss \texttt{\,MLR $\,$}{}. \textcolor{magenta}{Katia: The starting point are the works of\cite{zhang2016understanding,arpit2017closer} where it has been studied the ability of {\texttt{DNN}}{} to fit noise data (e.g. partially corrupted labels, random labels, shuffling or random generation of features). We take the reverse approach. We do not attempt to address the noise and corruptions already present in the original labels. Instead, we purposely generate purely corrupted labels during training as a tool to reduce the propensity of the {\texttt{DNN}}{} to memorize label noise during gradient descent. The underlying intuition is that we no longer see generalization as the ability of a model to perform well on unseen data, but rather as the ability to avoid finding pattern where none exist. Concretely, we propose the \textbf{Muddling labels Regularization} (\texttt{\,MLR $\,$}) loss which uses randomly permuted labels to quantify the propensity of a model to memorize. In Section \ref{sec:MLRloss}, we provide theoretical evidences in a regression setting that the \texttt{\,MLR $\,$}{} loss is an accurate in-sample estimator of the generalization error (Fig.~\ref{fig:2pred}) which can be used to perform Hyper-Parameter Optimization (HPO) without using a hold-out $validation$-set if a Signal-to-Noise Ratio condition is satisfied. This new \texttt{\,MLR $\,$}{} loss is a key component of our novel training method for {\texttt{FFNN}}.} \begin{figure}[htp] \centering \includegraphics[scale=0.30]{FiguresPDF/Plots/Rework_Criterion_Landscape_MLR.pdf} \includegraphics[scale=0.30]{FiguresPDF/Plots/Rework_Criterion_Landscape_CV.pdf} \caption{\textcolor{red}{Refaire une figure plus simple } Comparison of the \texttt{\,MLR $\,$}{} loss (orange) and the CV error (red) as estimators of the test error (blue) for Ridge models in Regression with {\texttt{RMSE}}{}. We see that the \texttt{\,MLR $\,$}{} loss is a better estimate of the test error than CV for all values of hyperparameter $\lambda$. This allows for more precise tuning of $\lambda$.} \label{fig:2pred} \end{figure} \textcolor{magenta}{Katia: We leverage the strengths of the new \texttt{\,MLR $\,$}{} loss to develop a novel training method for {\texttt{FFNN}}{} based on the $adaptive$ control of their $capacity$ using only the train set \textcolor{red}{and which generalizes well even on small size datasets}. By adapting a model’s $capacity$ to the dataset at hand, we hope to maximize the generalization performance of the trained model on unseen data.} \sout{Concretely we design a new train objective that leverages the strengths of the \texttt{\,MLR $\,$}{} loss and the \texttt{Tikhonov}{} operator to perform a data-dependent tuning of the {\texttt{FFNN}}{} capacity during training.} \textcolor{magenta}{Katia:We propose \texttt{AdaCap}{} a novel training method which works as follows. Before training: a) generate a new set of completely uninformative labels by {\it muddling} original labels through random permutations; then, at each GD iteration: b) quantify the ability of the {\texttt{DNN}}{}'s output layer to fit true labels rather than permuted labels via the new \textbf{Muddling Labels Regularization} (\texttt{\,MLR $\,$}) loss; c) apply the \texttt{Tikhonov}{} operator to the output of the last hidden layer and back-propagate the \texttt{\,MLR $\,$}{} objective through the {\texttt{DNN}}{}- indirectly carrying over its $capacity$ control effect to the hidden layers of the {\texttt{DNN}}{}.} AJOUTER DES TRUCS ICI SUR NOTRE METHODE ADACAP (VOIR LE A PLACER)\\ \textcolor{magenta}{Katia:This approach can lead to an improvement of generalization not only in the presence of label corruption but also in other settings prone to overfitting - $e.g.$ tabular data \cite{SHWARTZZIV202284,gorishniy2021revisiting,borisov2021deep}, small datasets \cite{?}, few-shot learning \textcolor{red}{(starting from \cite{fei2006one,fink2005object}, state of the art :\cite{wang2020generalizing}). See experiments in Section \ref{sec:4}.} Moreover, \texttt{AdaCap}{} is compatible with other DL learning schemes to further improve generalization performance.} \textcolor{orange}{Katia: LU JUSQUE LA , la suite a trier. JAI MIS EN MAGENTA ET BARRER et MIS EN SOURDINE CE QUE J'AI REPRIS OU PAS ENVIE DE METTRE} \bigskip A PLACER , a restructer ou a virer:\\ \textcolor{orange}{Katia: ETAT DE L art dans le désordre} \textcolor{orange}{Katia: petit data set, donnes tabulaire} - This benign overfitting phenonemon is attributed to the techniques used during the training phase, Stochastic Gradient Descent and the related batch learning techniques \cite{bottou1998online} which perform some form of implicit regularization \cite{pmlr-v80-gunasekar18a,smith2021on}. These techniques can achieve generalization provided a large number of observations is available. \textcolor{red}{For small size tabular datasets, their ability to achieve generalize is not guaranteed \cite{????}.}\\ \textcolor{magenta}{Karim: POURQUOI C'EST LA?:} Although batch size has a positive impact on generalization \cite{he2019control}, it cannot maximize generalization on its own. - Very recently, there has been a renewed interest in the subject, with several new methods \cite{kadra2021welltuned,fiedler2021simple,zimmer-tpami21a,gorishniy2021revisiting,kadra2021welltuned} and benchmarks \cite{SHWARTZZIV202284,fiedler2021simple,gorishniy2021revisiting}. See \cite{borisov2021deep} for an extensive review of the state of the art on tabular datasets. Current benchmarks heavily focus on the AutoML \cite{zoller2021benchmark,yao2018taking,he2021automl} usecase \cite{zimmer-tpami21a, feurer-arxiv20a}, using costly hyper-parameter tuning over a small collection of very popular big datasets which raised some concerns \cite{koch2021reduced,denton2021genealogy}. We tried to design a benchmark with a larger diversity of sizes and sources while focusing on usecases where models are trained in no more than a few minutes on a personal computer, as is common in most data-science projects \cite{paleyes2020challenges}. COMMENTAIRE IMPORTANCE SMALL DATASETS: \cite{Ng2016Nuts,Chahal2021Small} \textcolor{orange}{Katia: regularisation} -\textcolor{magenta}{Katia:\sout{Regularization is a popular approach to achieve generalization but it usually require intensive Hyper-Parameter Optimization (HPO) on a hold-out \textit{validation} set \cite{bergstra2012random,bergstra2011algorithms, bengio2000gradient,schmidhuber1987evolutionary,movckus1975bayesian,snoek2012practical,thompson1933likelihood,domke2012generic}. The main objective of this paper is to design a training scheme \textcolor{red}{for {\texttt{FFNN}}{}} that achieves generalization \textcolor{red}{without any hold-out $validation$-set} and which works even on small size datasets.}} \textcolor{orange}{Katia: loss....} \textcolor{magenta}{Katia : To mitigate the impact on memorization of potentially corrupted labels \cite{ChenLCZ19}, several techniques and/or losses were introduced, see \cite{ChenLCZ19,Harutyunyan2020Improving} for an extended survey. } \textcolor{magenta}{KARIM: EN DIRE UN PEU PLUS sur les methodes existantes: }\\ - robust loss \cite{Natarajan2013},\cite{ghosh2017robust},\cite{zhang2018generalized}; \cite{xu2019l_dmi})\\ - loss correction techniques \cite{sukhbaatar2014training,xiao2015learning,goldberger2016training})\\ -re-weighting samples \cite{patrini2017making,ren2018learning})\\ - detecting incorrect samples and re-labelling them - \cite{reed2014training,tanaka2018joint,ma2018dimensionality})\\ -employing two networks that select training examples for each other \cite{han2018co,yu2019does}). \textcolor{orange}{Katia: autre....} Existing methods addressing this problem can be distinguished by four main properties : adaptive, data dependent, gradient bases, local/global.\\ \paragraph{Adaptive approach.} A method is said to be adaptive when the update of the weights is constant/the same during the descent of the gradient, $i.e.$ for all iterations. The control then becomes a bi-level optimization problem. BIBLIADAdelta\cite{zeiler2012adadelta} AdaGrad\cite{duchi2011adaptive} + ON EST ADAPTIVE CAR ON MODIFIE LE LAMBDA EN MEME TEMPS QUE LES POIDS For example, weight decay control the $capacity$ of the {\texttt{DNN}}{} by regularizing all the weight. This method is not adaptive in the sens that the update of the weights at each iteration is the same (depending on the norm of the weight) and not data. \paragraph{Data-dependent approach.} The updating of weights can be dependent on the observations (features and/or target). Data-dependent methods, without being exhaustive, include Self Regularized Neural Networks\cite{xu2018srnn}+ NOUS ON EST DATA DEPENDANT CAR LA LOSS EST UNE FONCTION EXPLICITE DE NOS DATA \paragraph{Gradient based approach.} For the gradient based methods, the control/update is done during the calculation of the gradient of the loss and not through an optimazor scheme+ BIBLIO Self-Normalizing neural networks\cite{Klambauer2017}. NOUS ON EST GRADIENT BASED CAR LE CONTROLE SE FAIT PAR LA LOSS \paragraph{Local/global approach.} Methods are said to be global when the update is not done weight by weight but for all weights at the same time and in the same way (WD). Conversely a local method may update the weights individually according to a scheme that is not necessarily the same (Adagrad). Our approach is global because even if the update is done through the last layer only, the back propagation impacts all the weights. Indeed, our loss is differentiable and our gradient based method \paragraph{Benchmark : JE n'y ai pas touché} \begin{figure}[htp] \centering \includegraphics[scale=0.30]{FiguresPDF/Plots/MNISTv1.pdf} \caption{We trained a ConvNet on a toy few shot learning experiment on MNIST using either \texttt{AdaCap}{} or the standard method. We compare the generalization performance of the obtained models w.r.t. the number of samples per class. The performance of the \texttt{CNN} trained with \texttt{AdaCap}{} is uniformly better over the whole range of samples per class. In the low sample per class regime, it clearly outperforms the \texttt{CNN} trained using standard techniques.} \label{fig:Xcorrelmat} \end{figure} JE PENSE QUE CE PARAGRPH VA LÀ JUSTE POR DIRE QUE L'ON SE COMPARE AUSSI AVEC D'AUTRES METHODES QUI FONT DE LA GENERALISATION; Another popular approach to achieve generalization is models aggregation including Random Forest \cite{ho1995random,breiman2001random}, MARS \cite{friedman1991multivariate} and Boosting \cite{freund1995desicion}. It consists in the aggregation of weak learners previously built using bootstrapped subsets of the $training$-set. We illustrate the potential of \texttt{AdaCap}{} on a benchmark containing \textcolor{red}{67} tabular datasets in regression (\textcolor{red}{31}, binary (\textcolor{red}{24} and multiclass (\textcolor{red}{13} classification, against a large set of popular methods({\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{XGBoost}}{}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, \cite{guestrin2016},{\texttt{LightGBM}}{} \cite{Ke2017}, {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random}, {\texttt{SVM}} and kernel-based \cite{Chihchung2011}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}, {\texttt{MARS}}{} \cite{Friedman1991}, \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse} ). For Deep Learning architectures, we combined and compared \texttt{AdaCap}{} with . We left out deep learning methods designed to tackle categorical features as it is not the aim focus of this benchmark and of our proposed method (mainly TabNet\cite{}, Nodes\cite{}, RT transformers\cite{}. We timed on a subset of datasets and random seeds the use of Hyper-parameter optimization, \cite{zimmer-tpami21a, feurer-arxiv20a} which is both outside of the considered usecase and irrelevant to \texttt{AdaCap}{} since this method \textbf{does not introduce new tunable hyper-parameters}. Also note that some technique which require HPO are not Until recently, there was very little interest for {\text{DL}}{} on tabular datasets, which fall behind other type of algorithms. Very recently, there has been a renewed interest in the subject, with several new methods \cite{kadra2021welltuned,fiedler2021simple,zimmer-tpami21a,gorishniy2021revisiting,kadra2021welltuned} and benchmarks \cite{SHWARTZZIV202284,fiedler2021simple,gorishniy2021revisiting}. See \cite{borisov2021deep} for an extensive review of the state of the art on tabular datasets. Current benchmarks heavily focus on the AutoML \cite{zoller2021benchmark,yao2018taking,he2021automl} usecase \cite{zimmer-tpami21a, feurer-arxiv20a}, using costly hyper-parameter tuning over a small collection of very popular big datasets which raised some concerns \cite{koch2021reduced,denton2021genealogy}. We tried to design a benchmark with a larger diversity of sizes and sources while focusing on usecases where models are trained in no more than a few minutes on a personal computer, as is common in most data-science projects \cite{paleyes2020challenges}. COMMENTAIRE IMPORTANCE SMALL DATASETS: \cite{Ng2016Nuts,Chahal2021Small} CONCLUSION INTRO The main contribution of this paper is \texttt{AdaCap}{} which combine two ingredients : our new loss \texttt{\,MLR $\,$}{} and the \texttt{Tikhonov}{} operator. \texttt{AdaCap}{} is a training scheme which enables the use of \texttt{\,MLR $\,$}{} during gradient descent without bi-level optimization. We provide an implementation of \texttt{AdaCap}{} which can be plugged on any standard {\texttt{FFNN}}{} architectures and the code to replicate all experimental results. \section{DES BOUTS a reprendre ou pas et NON REPRIS + haut. VOIR SI ON A DE LA BIB et autre (sur!) A RECUPERER} \paragraph{MODEL STACKING} Model aggregation is another popular approach to achieve generalization. It concerns for instance Random Forest \cite{ho1995random,breiman2001random}, MARS \cite{friedman1991multivariate} and Boosting \cite{freund1995desicion}. This approach aggregates weak learners previously built using bootstrapped subsets of the $training$-set. The training time of these models is considerably lengthened when a large number of weak learners is considered, which is a requirement for improved generalization. Recall XGBOOST \cite{chen2016xgboost} combines a version of batch learning and model aggregation to train weak learners.\\ MARS, Random Forest, XGBOOST and Deep learning have obtained excellent results in Kaggle competitions and other machine learning benchmarks \cite{fernandez2014we, escalera2018neurips}. \paragraph{CRITERION AND LOSS FOR LABEL CORRUPTION} Another approach is based on unbiased estimation of the generalization error of a model (SURE \cite{stein1981estimation}, $AIC$ \cite{akaike1974new}, $C_p$-Mallows \cite{mallows2000some} on the $training$-set. (Natarajan et al., 2013 \cite{Natarajan2013}; Ghosh et al., 2017 \cite{ghosh2017robust}; Zhang and Sabuncu, 2018\cite{zhang2018generalized}; Xu et al., 2019)\cite{xu2019l_dmi}, loss correction techniques (Sukhbaatar et al., 2014\cite{sukhbaatar2014training}; Tong Xiao et al., 2015\cite{xiao2015learning}; Goldberger and Ben-Reuven, 2017\cite{goldberger2016training}; Patrini et al., 2017), \paragraph{REGULARIZATION} Regularized or constrained Empirical Risk Minimization (\textit{\texttt{ERM}} is a popular approach to achieve generalization \cite{kukavcka2017regularization} which Ridge \cite{hoerl1970ridge}, \texttt{Lasso} \cite{tibshirani1996regression} and Elastic-net \cite{zou2005regularization} belong to this category. \paragraph{HPO BESOIN SOLUTION} usually requires Hyper-Parameter Optimization (HPO) on a hold-out \textit{validation} set. However these methods still require regularization and/or constraints in order to generalize. This implies the introduction of numerous hyperparameters which require calibration on a hold-out $validation$-set for instance \textit{via} Grid-search. Tuning these hyperparameters requires expensive human expertise and/or computational resources. The most common HPO approach is data-splitting. Available data is partitioned into a {\it training/validation}-set. The {\it validation}-set is used to evaluate the generalization error of a model built using only the {\it training}-set. A non-exhaustive list of most used HPO strategies include Grid-search, Random search \cite{bergstra2012random} or more advanced hyperparameter optimization techniques \cite{bergstra2011algorithms, bengio2000gradient,schmidhuber1987evolutionary} and For instance, BlackBox optimization \cite{brochu2010tutorial} is used when the evaluation function is not available \cite{lacoste2014sequential}. It includes in particular Bayesian hyperparametric optimization \cite{movckus1975bayesian,snoek2012practical,thompson1933likelihood}. These techniques either scale exponentially with the dimension of the hyperparameter space, or requires a smooth convex optimization space \cite{shahriari2015taking}. Highly non-convex optimization problems on a high dimensionnal space can be tackled by Population based methods (Genetic Algorithms\cite{chen2018autostacker,real2017large,olson2016automating}, Particle Swarm~\cite{lorenzo2017particle,lin2008particle} but at a high computational cost. Another family of advanced methods, called gradient-based techniques, take advantage of gradient optimization techniques \cite{domke2012generic} like our method. They fall into two categories, Gradient Iteration and Gradient approximation. Gradient Iteration directly computes the gradient w.r.t. hyperparameters on the training/evaluation graph. This means differentiating a potentially lengthy optimization process which is known to be a major bottleneck \cite{pedregosa2016hyperparameter}. Gradient approximation is used to circumvent this difficulty, through implicit differentiation \cite{larsen1996design,bertrand2020implicit}. All these methods require data-splitting to evaluate the trained model on a hold-out $validation$-set, unlike our approach. \paragraph{DEEP PROBLEMATIC} Generalization is a central problem in Deep Learning ({\text{DL}}). Over-parametrized Deep Neural Networks ({\texttt{DNN}}) can generalize surprisingly well despite their $capacity$ to memorize the train set. In deep learning, the $capacity$ of neural networks is sufficient for memorizing the entire data set, including label noise/corruption\cite{zhang2016understanding}. Informally, a model with low $capacity$ may struggle to fit the training set while model with high $capacity$ may deteriorates the generalization performance (on the test set) as it can memorize the training set \cite{goodfellow2016deep}. The control of $capacity$ is to be understood in the sense that we want to delay the memorization to improve the performances of the generalization. It passes by \textbf{an update of the weights}. To highlight and quantify how the mechanism of memorization impacts generalization, \cite{zhang2016understanding,arpit2017closer} studies the ability of {\texttt{DNN}}{} to fit noise data (e.g. partially corrupted labels, random labels, shuffling or random generation of features). But their training is particularly susceptible to label noise \cite{zhang2016understanding,arpit2017closer}. despite their $capacity$ to memorize almost any training set \paragraph{LABEL NOISE CORRUPTION} Consequently, to mitigate the impact on memorization of potentially corrupted labels \cite{ChenLCZ19}, several techniques were introduced. See for example \cite{Harutyunyan2020Improving} and the references therein. See especially \cite{ChenLCZ19,Harutyunyan2020Improving} and the references therein for an extended survey. s re-weighting samples (Jiang et al., 2017\cite{patrini2017making}; Ren et al., 2018\cite{ren2018learning}, detecting incorrect samples and re- Improving Generalization by Controlling Label-Noise Information in Neural Network Weights labeling them (Reed et al., 2014\cite{reed2014training}; Tanaka et al., 2018\cite{tanaka2018joint}; Ma et al., 2018\cite{ma2018dimensionality}, and employing two networks that select training examples for each other (Han et al., 2018\cite{han2018co}; Yu et al., 2019\cite{yu2019does}. \paragraph{REGULARIZATION} Common techniques like weight decay \cite{Hanson1988Comparing}, drop-out \cite{Hinton2012,srivastava14adrop}, early stopping \cite{pmlr-v108-li20j}, data augmentation \cite{shorten2019survey} can sometimes help mitigate this phenomenon but cannot prevent it. Explicit regularization (eg. weight decay\cite{krogh1992simple,bos1996using},...) limits the $capacity$ of {\texttt{DNN}}{} in order to prevent memorization \cite{arpit2017closer}. Meanwhile, other methods improve generalization during the training phase without using a hold-out $validation$-set. For instance, Stochastic Gradient Descent and the related batch learning techniques \cite{bottou1998online} achieve generalization by splitting the training data into a large number of subsets and compute the empirical risk on a different subset at each step of the gradient descent. This strategy converges to a good estimation of the generalization risk provided a large number of observations is available. Bear in mind this method and the availability of massive datasets played a crucial role in the success of Deep neural networks. Although batch size has a positive impact on generalization \cite{he2019control}, it cannot maximize generalization on its own. \paragraph{DEEP TRAINMET MOTIVATION} \subsection{MLR DEEP TYPOLOGY} Existing methods addressing this problem can be distinguished by four main properties : adaptive, data dependent, gradient bases, local/global. \subsection{BENCHMARK AND TABULAR DATASETS} We illustrate the potential of \texttt{AdaCap}{} on a benchmark containing \textcolor{red}{67} tabular datasets in regression (\textcolor{red}{31}, binary (\textcolor{red}{24} and multiclass (\textcolor{red}{13} classification, against a large set of popular methods({\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{XGBoost}}{}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, \cite{guestrin2016},{\texttt{LightGBM}}{} \cite{Ke2017}, {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random}, {\texttt{SVM}} and kernel-based \cite{Chihchung2011}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}, {\texttt{MARS}}{} \cite{Friedman1991}, \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse} ). For Deep Learning architectures, we combined and compared \texttt{AdaCap}{} with . We left out deep learning methods designed to tackle categorical features as it is not the aim focus of this benchmark and of our proposed method (mainly TabNet\cite{}, Nodes\cite{}, RT transformers\cite{}. We timed on a subset of datasets and random seeds the use of Hyper-parameter optimization, \cite{zimmer-tpami21a, feurer-arxiv20a} which is both outside of the considered usecase and irrelevant to \texttt{AdaCap}{} since this method \textbf{does not introduce new tunable hyper-parameters}. Also note that some technique which require HPO are not Until recently, there was very little interest for {\text{DL}}{} on tabular datasets, which fall behind other type of algorithms. Very recently, there has been a renewed interest in the subject, with several new methods \cite{kadra2021welltuned,fiedler2021simple,zimmer-tpami21a,gorishniy2021revisiting,kadra2021welltuned} and benchmarks \cite{SHWARTZZIV202284,fiedler2021simple,gorishniy2021revisiting}. See \cite{borisov2021deep} for an extensive review of the state of the art on tabular datasets. Current benchmarks heavily focus on the AutoML \cite{zoller2021benchmark,yao2018taking,he2021automl} usecase \cite{zimmer-tpami21a, feurer-arxiv20a}, using costly hyper-parameter tuning over a small collection of very popular big datasets which raised some concerns \cite{koch2021reduced,denton2021genealogy}. We tried to design a benchmark with a larger diversity of sizes and sources while focusing on usecases where models are trained in no more than a few minutes on a personal computer, as is common in most data-science projects \cite{paleyes2020challenges}. COMMENTAIRE IMPORTANCE SMALL DATASETS: \cite{Ng2016Nuts,Chahal2021Small} \subsection{CONCLUSION INTRO} The main contribution of this paper is \texttt{AdaCap}{} which combine two ingredients : our new loss \texttt{\,MLR $\,$}{} and the \texttt{Tikhonov}{} operator. \texttt{AdaCap}{} is a training scheme which enables the use of \texttt{\,MLR $\,$}{} during gradient descent without bi-level optimization. We provide an implementation of \texttt{AdaCap}{} which can be plugged on any standard {\texttt{FFNN}}{} architectures and the code to replicate all experimental results. \subsection{Loss : avirer après le subsection} \paragraph{Ref a dsipacher} s (Natarajan et al., 2013 \cite{Natarajan2013}; Ghosh et al., 2017 \cite{ghosh2017robust}; Zhang & Sabuncu, 2018\cite{zhang2018generalized}; Xu et al., 2019)\cite{xu2019l_dmi}, loss correction techniques (Sukhbaatar et al., 2014\cite{sukhbaatar2014training}; Tong Xiao et al., 2015\cite{xiao2015learning}; Goldberger & Ben-Reuven, 2017\cite{goldberger2016training}; Patrini et al., 2017), re-weighting samples (Jiang et al., 2017\cite{patrini2017making}; Ren et al., 2018\cite{ren2018learning}, detecting incorrect samples and re- Improving Generalization by Controlling Label-Noise Information in Neural Network Weights labeling them (Reed et al., 2014\cite{reed2014training}; Tanaka et al., 2018\cite{tanaka2018joint}; Ma et al., 2018\cite{ma2018dimensionality}, and employing two networks that select training examples for each other (Han et al., 2018\cite{han2018co}; Yu et al., 2019\cite{yu2019does}. \textcolor{red}{PARTIE PAS FINIE. IL FAUT ENCORE REDUIRE LA TAILLE} Meanwhile, other methods improve generalization during the training phase without using a hold-out $validation$-set. For instance, Stochastic Gradient Descent and the related batch learning techniques \cite{bottou1998online} achieve generalization by splitting the training data into a large number of subsets and compute the empirical risk on a different subset at each step of the gradient descent. This strategy converges to a good estimation of the generalization risk provided a large number of observations is available. \textcolor{blue}{REDISPACHER CA???This can lead to an improvement of generalization not only in the presence of label corruption but also in other settings prone to overfitting, e.g., tabular data\cite{SHWARTZZIV202284,gorishniy2021revisiting,borisov2021deep}, small datasets\cite{}, few-shot learning (starting from \cite{fei2006one,fink2005object}, state of the art : \cite{wang2020generalizing}.} \subsection{conclusion de l'intro} We illustrate the potential of \texttt{AdaCap}{} on a benchmark containing \textcolor{red}{XX} tabular datasets in regression, binary and multiclass classification, against a large set of popular methods({\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{XGBoost}}{}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, \cite{guestrin2016},{\texttt{LightGBM}}{} \cite{Ke2017}, {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random}, {\texttt{SVM}} and kernel-based \cite{Chihchung2011}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}, {\texttt{MARS}}{} \cite{Friedman1991}, \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse} ). For Deep Learning architectures, we combined and compared \texttt{AdaCap}{} with . We left out deep learning methods designed to tackle categorical features as it is not the aim focus of this benchmark and of our proposed method (mainly TabNet\cite{}, Nodes\cite{}, RT transformers\cite{}. We timed on a subset of datasets and random seeds the use of Hyper-parameter optimization, \cite{zimmer-tpami21a, feurer-arxiv20a} which is both outside of the considered usecase and irrelevant to \texttt{AdaCap}{} since this method \textbf{does not introduce new tunable hyper-parameters}. Also note that some technique which require HPO are not \section{The \texttt{\,MLR $\,$}{} loss} \label{sec:MLRloss} \textbf{Setting.} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathcal{Y}$ where $\mathcal{Y}=\mathbb{R}$ for regression and $\mathcal{Y}$ is a finite set for classification. We optimise the objective $L(\texttt{act}_{\texttt{out}}(\bm{f}_{\boldsymbol{\theta}}(\textbf{x})),\textbf{Y})$ where $\bm{f}_{\boldsymbol{\theta}}(\textbf{x})$ is the output of the last hidden layer, $L$ is the loss function ({\texttt{MSE}}{} for regression and \texttt{CE}{} for classification) and $\texttt{act}_{\texttt{out}}$ is the activation function ($\ensuremath{\mathbb{I}}$ for regression, {\texttt{Sigmoid}}{} for binary classification and \texttt{logsoftmax}{} for multiclass). \textbf{Random permutations.} We build a randomized data set by applying random permutations on the $n$ components of the label vector $\textbf{Y}$. This randomization scheme presents the advantage of creating an artificial train set $(\textbf{x},\textbf{Y}_{\texttt{perm}})$ with marginal distributions of features and labels identical to those in the initial train set but where the connection between features and labels has been removed\footnote{The expected number of fixed points of a permutation drawn uniformly at random is equal to $1$.}. This means that there is no generalizing pattern to learn from the artificial dataset $(\textbf{x},\textbf{Y}_{\texttt{perm}})$. We replace the initial loss $L$ by \begin{align} &\texttt{\,MLR $\,$}(\boldsymbol{\theta}):=L\left(\textbf{Y},\texttt{act}_{\texttt{out}}(\bm{f}_{\boldsymbol{\theta}}(\textbf{x}))\right)\notag\\ &\hspace{2cm}- L\left(\textbf{Y}_{\texttt{perm}},\texttt{act}_{\texttt{out}}(\bm{f}_{\boldsymbol{\theta}}(\textbf{x}))\right). \label{eq:BLbis1} \end{align} The second term on the right-hand side of (\ref{eq:BLbis1} is used to quantify memorization of output layer $\bm{f}_{\boldsymbol{\theta}}$. Indeed, since there is no meaningful pattern linking $\textbf{x}$ to $\textbf{Y}_{\texttt{perm}}$, any $\bm{f}_{\boldsymbol{\theta}}$ which fits $(\textbf{x},\textbf{Y}_{\texttt{perm}}$ well achieves it via memorization only. We want to rule out such models. By minimizing the \texttt{\,MLR $\,$}{} loss, we hope to retain only the generalizing patterns. \textcolor{red}{The \texttt{\,MLR $\,$}{} approach marks a significant departure from the way random labels are used in Machine Learning or Deep Learning. In \cite{zhang2016understanding,arpit2017closer}, noise labels are used as a diagnostic tool in numerical experiments to study the impact of memorization on generalization, On the theory side, Rademacher Process (RP) is a central tool exploiting random (Rademacher) labels to compute data dependent measures of complexity of function classes used in learning \cite{KoltchinskiiSaintFlour2011}. However, RP are used to derive bounds on the excess risk of already trained models whereas the \texttt{\,MLR $\,$}{} approach uses randomly permuted labels to train the model. } \paragraph{Experiment.} We compare the \texttt{\,MLR $\,$}{} loss and Cross-Validation (CV) error to the true generalization error in the correlated regression setting described in Appendix \ref{app:syntheticdataMLR}. Fig. \ref{fig:3pred} reveals that the \texttt{\,MLR $\,$}{} is a better estimate of the generalization error than CV. Consequently, \texttt{\,MLR $\,$}{} gives a much more precise estimate of optimal hyperparameter $\lambda^*$ than CV. \textcolor{green}{This explains in part the improved generalization performance of {\texttt{DNN}}{} trained with the \texttt{\,MLR $\,$}{} loss as highlighted in the ablation study below (Fig. ?).\\} \paragraph{Theoretical investigation of \texttt{\,MLR $\,$}{}.} To understand the core mechanism behind the \texttt{\,MLR $\,$}{} loss, we consider the following toy regression model. Let $\textbf{Y} = \textbf{x} \bm{\beta}^* + \boldsymbol{\xi}$ with $\bm{\beta}^*\in \mathbb{R}^d$ and isotropic sub-Gaussian noise $\boldsymbol{\xi}\in\mathbb{R}^n$ ($\mathrm{Cov}(\boldsymbol{\xi}) = \sigma^2 \ensuremath{\mathbb{I}}_n$). We consider the class of Ridge models $\mathcal{F}^R = \{f_\lambda(\cdot) = \langle \bm{\beta}_\lambda,\cdot\rangle,\; \lambda>0\}$ with $\bm{\beta}_\lambda =\bm{\beta}_\lambda(\textbf{x},\textbf{Y}) =(\textbf{x}^\top\textbf{x} + \lambda \ensuremath{\mathbb{I}}_d)^{-1}\textbf{x}^\top \textbf{Y}\in\mathbb{R}^d$. Define the risk $R(\lambda) := \mathbb{E}_{\boldsymbol{\xi}}[\|\textbf{x}\bm{\beta}^* - \textbf{x}\bm{\beta}_\lambda\|_2^2]$, $\lambda^* = \mathrm{argmin}_{\lambda>0} R(\lambda)$ and $\widehat{\lambda}= \mathrm{argmin}_{\lambda>0} \texttt{\,MLR $\,$}(\lambda)$. Assume for simplicity that $\textbf{x}^\top \textbf{x}/n$ is an orthogonal projection onto a $r$-dimensional subspace of $\mathbb{R}^d$. Define the rate $$ \epsilon_n := \sqrt{\frac{r\sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2}} + \sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|_2^2}{n\sigma^2}}. $$ \begin{theo}\label{thm1} Under the above assumptions, we get w.h.p. \begin{align*} i.&\; \frac{\texttt{\,MLR $\,$}(\lambda)+\|P_{\textbf{x}}(\textbf{Y})\|_2^2}{R(\lambda)} = 1+O(\textcolor{red}{??\sqrt{\epsilon_n}??},\; \forall \lambda>0.\\ ii.& \; \frac{\widehat{\lambda}}{\lambda^*}= 1+O(\epsilon_n). \end{align*} \end{theo} \begin{coro} If $ r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$, then we get w.h.p. \begin{align*} i.&\quad \texttt{\,MLR $\,$}(\lambda)+\|P_{\textbf{x}}(\textbf{Y})\|_2^2 = \biggl( 1+ o(1)\biggr)R(\lambda),\quad \forall \lambda>0.\\ ii.& \quad \widehat{\lambda}= \biggl( 1+o(1)\biggr)\lambda^*. \end{align*} \end{coro} See Appendix \ref{app:proofThm1} for the proof. In our setting, $\|\textbf{x}\bm{\beta}^*\|_2^2/(n\sigma^2)$ is the Signal-to-Noise Ratio {\text{SNR}}. The intermediate {\text{SNR}}{} regime $ r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$ is the only regime where using Ridge regularization can yield a significant improvement in the prediction. In that regime, the \texttt{\,MLR $\,$}{} loss can be used to find optimal hyperparameter $\lambda^*$. In the high SNR regime $\|\textbf{x}\bm{\beta}^*\|_2^2\geq n \sigma^2$, no regularization is needed, i.e. $\lambda^*=0$ is the optimal choice. Conversely in the low SNR regime $ \|\textbf{x}\bm{\beta}^*\|_2^2\leq r \sigma^2$, the signal is completely drowned in the noise. Consequently it is better to use the zero estimator, i.e. $\lambda^*=\infty$. In a nutshell, while the high and low {\text{SNR}}{} regimes correspond to trivial cases where regularization is not useful, in the intermediate regime where regularization is beneficial, \texttt{\,MLR $\,$}{} is useful. \section{The \texttt{AdaCap}{} method to train {\texttt{DNN}}{}} \paragraph{The \textbf{\texttt{Tikhonov}{}} $capacity$ control scheme.} Consider a {\texttt{DNN}}{} architecture with $L$ layers. Denote by $\boldsymbol{\theta}$ the hidden layers weights and by $\textbf{A}^{L-1}(\boldsymbol{\theta}, \bigcdot)\,:\, \mathbb{R}^{n\times d} \rightarrow \mathbb{R}^{n\times d_{L-1}}$ the output of the last hidden layer. Let $\lambda \in \mathbb{R}_+^*$ be the \texttt{Tikhonov}{} parameter and define \begin{align} \label{eq:Pmat} &\textbf{P}(\lambda,\boldsymbol{\theta},\textbf{x}):=\left[\left(\textbf{A}^{L-1}\right)^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}\left(\textbf{A}^{L-1}\right)^\top \end{align} where $\textbf{A}^{L-1}:=A^{L-1}(\boldsymbol{\theta}, \textbf{x})$ and $\ensuremath{\mathbb{I}} = \ensuremath{\mathbb{I}}_{d_{L-1}}$ the identity matrix. The \texttt{Tikhonov}{} operator is \begin{align} \label{eq:Hmat} &\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x}):=\textbf{A}^{L-1}\textbf{P}(\lambda,\boldsymbol{\theta},\textbf{x}). \end{align} \textcolor{red}{Then, during training, the Tikhonov $capacity$ control scheme outputs the following prediction for target vector\footnote{In multiclass setting, replace \textbf{Y}\, by its one-hot encoding.} $\textbf{Y}$:} \begin{align} \label{eq:model2} \bm{f}_{\lambda,\boldsymbol{\theta},\textbf{Y}}(\textbf{x})=\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y}, \end{align} Note that $(\lambda,\boldsymbol{\theta},\textbf{x}, \textbf{Y})$ may change at each iteration during training/GD. To train this {\texttt{DNN}}{}, we run a gradient descent optimization scheme over parameters $(\lambda,\boldsymbol{\theta})$ \begin{align} \label{eq:ridgeMLRNN} &(\widehat{\lambda}, \widehat{\boldsymbol{\theta}})= \underset{\lambda>0,\, \boldsymbol{\theta}}{\arg\min} \; L\left(\textbf{Y},\texttt{act}_{\texttt{out}}\left(\bm{f}_{\lambda, \boldsymbol{\theta},\textbf{Y}}(\textbf{x})\right)\right). \end{align} Eventually, at test time, we freeze $\textbf{P}(\widehat{\lambda}, \widehat{\boldsymbol{\theta}}, \textbf{x})$, and obtain our final predictor \begin{align} \label{eq:model2} \bm{f}_{\widehat{\lambda}, \widehat{\boldsymbol{\theta}}}(\bigcdot)=\texttt{act}_{\texttt{out}}\left(A^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot) \textbf{P}(\widehat{\lambda}, \widehat{\boldsymbol{\theta}},\textbf{x})\textbf{Y}\right), \end{align} where $\texttt{act}_{\texttt{out}}$ is the activation function applied to the output layer. Here, $\textbf{P}(\widehat{\lambda}, \widehat{\boldsymbol{\theta}},\textbf{x})\textbf{Y}$ are the weights of the output layer set once and for all using the minibatch ($\textbf{x}$, $\textbf{Y}$) associated with ($\widehat{\lambda}, \widehat{\boldsymbol{\theta}}$) in case of batch-learning. Therefore, we recover the architecture of a standard {\texttt{DNN}}{} where the output of the hidden layers $A^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot)$ is multiplied by the weights of the output layer. \textcolor{red}{{\it The Tikhonov training scheme works in a fundamentally different way from weight decay}. When we apply the Tikhonov operator to the output of the last hidden layer and then use backpropagation to train the {\texttt{DNN}}{}, we are indirectly carrying over its $capacity$ control effect to the hidden layers of the {\texttt{DNN}}{}. In other words, we are performing {\it inter-layers} regularization (i.e. regularization across the hidden layers) whereas weight decay performs {\it intra-layer} regularization. Weight decay imposes too many restrictions on the exploration freedom of the {\texttt{DNN}}{} during training, therefore limiting the {\texttt{DNN}}{} ability to learn pertinent embeddings. On the contrary, the Tikhonov $capacity$ control scheme gives enough freedom to the {\texttt{DNN}}{} to learn well-adapted embeddings. This is confirmed in our experiments. We trained a {\texttt{DNN}}{} using weight decay on the one-hand and Tikhonov operator on the other hand while all the other training choices were the same between the two training schemes (same loss $L$, same architecture size, same initialization, same learning rate, etc.). Figure \ref{fig:embeddings} reveals that our Tikhonov training scheme produced highly structured embeddings whereas the embeddings produced by weigh decay do not look different from the initialization and do not present any remarkable structure. The ablation study in Table \ref{tab:?} reveals that the Tikhonov scheme alone already produces a significant improvement of the generalization performance of a {\texttt{DNN}}.} \paragraph{Training with \texttt{\,MLR $\,$}{} loss and the \textbf{\texttt{Tikhonov}{} scheme}.} We quantify the $capacity$ of our model to memorize labels $\textbf{Y}$ by $L\left(\textbf{Y},\texttt{act}_{\texttt{out}}\left(\bm{f}_{\lambda, \boldsymbol{\theta},\textbf{Y}}(\textbf{x})\right)\right)$ w.r.t. to labels $\textbf{Y}$ where the \texttt{Tikhonov}{} parameter $\lambda$ modulates the level the $capacity$ of this model. We are not so much interested in adapting the capacity to the train set $(\textbf{x},\textbf{Y})$ but rather to the generalization performance on the test set. This is why we replace $L$ by \texttt{\,MLR $\,$}{} in \eqref{eq:ridgeMLRNN}. Since \texttt{\,MLR $\,$}{} is a more accurate in-sample estimate of the generalization error than the usual train loss (Theorem \ref{thm1}), we expect \texttt{\,MLR $\,$}{} to provide better tuning of $\lambda$ and thus some further gain on the generalization performance. Combining \eqref{eq:BLbis1} and \eqref{eq:model2}, we obtain the following training loss of our method. \begin{align} &\texttt{\,MLR $\,$}(\lambda, \boldsymbol{\theta}):=L\biggl(\textbf{Y},\texttt{act}_{\texttt{out}}(\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y})\biggr)\notag\\ &\hspace{1cm} - L\biggl(\textbf{Y}_{\texttt{perm}},\texttt{act}_{\texttt{out}}(\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y}_{\texttt{perm}})\biggr) \label{eq:BLbis1-DNN} \end{align} To train this model, we run a gradient descent optimization scheme over parameters $(\lambda,\boldsymbol{\theta})$: \begin{align} \label{eq:ridgeMLRNN2} &(\widehat{\lambda}, \widehat{\boldsymbol{\theta}} )= \mathrm{argmin}_{\lambda,\boldsymbol{\theta}|\lambda>0}\; \texttt{\,MLR $\,$}(\lambda, \boldsymbol{\theta}). \end{align} The \texttt{AdaCap}{} predictor is defined again by \eqref{eq:model2} but with weights obtained in \eqref{eq:ridgeMLRNN2}. The \traimet{} predictor corresponds to the architecture of a standard {\texttt{DNN}}{}. Indeed, At test time, we freeze $\textbf{P}(\widehat{\lambda},\widehat{\boldsymbol{\theta}},\textbf{x})\textbf{Y}$ which becomes the weights of the output layer. Once the {\texttt{DNN}}{} is trained, the corrupted labels $\textbf{Y}_{\texttt{perm}}$ and the \texttt{Tikhonov}{} parameter $\widehat{\lambda}$ have no further use and are thus discarded. If using batch-learning, we use the minibatch $(\textbf{x},\textbf{Y})$ corresponding to $(\widehat{\boldsymbol{\theta}},\widehat{\lambda})$. In any case, the entire training set can also be discarded once the output layer is frozen. \textbf{Comments.}\\ $\bullet$ \texttt{AdaCap}{} does not depend on the format of the input, but only requires the architecture to end with a dense layer. Thus it is applicable to ConvNets \cite{LeCun1989BackpropagationAT} \textcolor{red}{(see experiment ... figure ...), and compatible with residual blocks \cite{?}, Gated Linear Units\cite{?}, DropOut \cite{?}, batch normalization \cite{?}, etc.} \\ $\bullet$ The random labels are generated before training and are not updated or changed thereafter. Note that in practice, the random seed used to generate the label permutation has virtually no impact as shown in Figure \ref{fig:}. \textcolor{red}{ (montrer la figure)} \\ $\bullet$ In view of Theorem \ref{thm1}, both terms composing the \texttt{\,MLR $\,$}{} loss should be equally weighted to produce an accurate estimator of the generalization error. \textcolor{red}{Our experiment in Figure ???? confirms that this is indeed the best possible combination}.\\ $\bullet$ Note that $\lambda$ is not an hyperparameter in \texttt{AdaCap}{} . It is trained alongside $\boldsymbol{\theta}$ by \texttt{GD}. The initial value $\lambda_{\texttt{init}}$ is chosen with a simple heuristic rule. For initial weights $\boldsymbol{\theta}$, we pick the value which maximizes sensitivity of the \texttt{\,MLR $\,$}{} loss $w.r.t.$ variations of $\lambda$ (See \eqref{lambdainiti} in Appendix \ref{sec:Protocol}).\\ $\bullet$ Both terms of the \texttt{\,MLR $\,$}{} loss depend on $\boldsymbol{\theta}$ through the quantity $\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})$, meaning we compute only one derivation graph $w.r.t.$ $\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})$.\\ $\bullet$ When using the \textbf{\texttt{Tikhonov}{} operator} during training, we replace a matrix multiplication by a matrix inversion. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU \cite{SHARMA201331}\footnote{this paper states that the time complexity of matrix inversion scales as $J$ as long as $J^2$ threads can be supported by the GPU where $J$ is the size of the matrix.}. Time computation comparisons are provided in the ablation study (Table \ref{}). \textcolor{green}{The overcost depends on the dataset but remains reasonable on our benchmark. A PRECISER AVEC LES RESULTATS.}\\ $\bullet$ For very large datasets, batch-learning can be used successfully with \texttt{AdaCap}{}. As seen in the ablation study, when using the \textbf{\texttt{Tikhonov}{} scheme}, it is always beneficial to use mini-batches as large as possible. Stochastic Gradient Descent is not compatible with the \textbf{\texttt{Tikhonov}{} scheme} since $\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})$ presents no interest for minibatch of size 1. \include{Experiments} \section{Conclusion} \textcolor{red}{Tabular data. On est encore loin de savoir quelle architecture ou methode est de loin la meilleure?} The \texttt{\,MLR $\,$}{} training method produces {\texttt{DNN}}{} models which are competitive with the gold standard on tabular datasets on a diverse benchmark. The trained models behave differently from other known models. Thus they constitute a nice addition to the pool of candidate models used in meta-learning. The \texttt{\,MLR $\,$}{} training method can be applied to any usual {\texttt{DNN}}{} architectures and other types of data (image, text, etc). The few experiments we carried out on MNIST and {\texttt{CNN}}{} architectures were promising. We shall further explore this direction in a future work. \section{Broader Impact (TEMPORAIRE)} \cite{koch2021reduced} raised some concerns about benchmarks cultures tending to valorize state-of-the-art (SOTA) results on a small number of popular large size datasets with a focus on intensive Hyper-Parameter Optimization (HPO) for a single method with the objective to obtain a clear winner model over a limited number of other compared models. We believe that this methodology is not adapted to tackle the characteristics of learning on Tabular Datasets ({\text{TD}}):\\ \bibliographystyle{icml2022.bst} \section{Experiments}\label{sec:exp} \section{Introduction} \newpage \section{Related Work} \newpage \section{The {\texttt{FFNN}}} \subsection{Matrix form notations} Consider a regression function, $y=f^*(\textbf{x})$ maps an input $\textbf{x}$ to $y$. The goal of a {\texttt{FFNN}} is to approximate $f^*$ by mapping $\textbf{y}=f(\textbf{x},\boldsymbol{\theta})$ and learning the value of the parameters $\boldsymbol{\theta}$ that result in the best approximation. Let $\mathcal{D}_{train}=\{(\textbf{X}_i,Y_i)\}_{i=1}^n$ be a train set, we use the following notations: for $\ell\in \llbracket1,L-1 \rrbracket$ \begin{itemize} \item \textbf{\underline{First Layer.} } Input: $Z^0=X_i\in\mathbb{R}^p$, Output: $A^0=(a^0_1,\ldots,a^0_p)^\top\in\mathbb{R}^p$ \item \textbf{\underline{Hidden Layers.} } Input: $Z^\ell=(z^\ell_1,\ldots,z^\ell_J)^\top\in\mathbb{R}^J$, Output: $A^\ell=(a^\ell_1,\ldots,a^\ell_J)^\top\in\mathbb{R}_+^J$, \item \textbf{\underline{Last Layer.} } Input: :$Z^L=(z^L_1,\ldots,z^L_\kappa)^\top\in\mathbb{R}^\kappa$, Output: $A^L=(a^L_1,\ldots,a^L_J)^\top\in\mathbb{R}^\kappa$ \end{itemize} Then, for all $i\in \llbracket1,n \rrbracket$, the {\texttt{FFNN}} is $s.t.$ $$ \begin{array}{l} \textbf{Input} : Z^0=X_i=A^0\\ Z^{\ell+1}=A^\ell W^\ell+ B^\ell,\quad \ell\in \llbracket 0,L-1 \rrbracket\\ A^\ell={\texttt{ReLU}}(Z^\ell),\quad\ell\in \llbracket1,L-1 \rrbracket\\ \textbf{Output} : A^L=Z^L \end{array} $$ We set \begin{eqnarray} \label{theta} \boldsymbol{\theta}:=\{W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\},\quad\text{with} \end{eqnarray} \begin{minipage}[t]{0.55\textwidth} \begin{itemize} \item $W^0=[W^0_{kj}]_{k,j}$, with $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$ \item $W^\ell=[W^\ell_{kj}]_{k,j}$, $\ell\in\llbracket 1,L-2\rrbracket$,$(k,j)\times \llbracket1,J \rrbracket^2$ \item $W^{L-1}=[W^{L-1}_{kj}]_{k,j}$, $(k,j)\in \llbracket1,J \rrbracket\times\llbracket1,\kappa \rrbracket$ \end{itemize} \end{minipage} \begin{minipage}[t]{0.4\textwidth} \begin{itemize} \item $B^\ell=(b^\ell_1,\ldots,b^\ell_J)^\top\in\mathbb{R}^J$, $\ell\in \llbracket0,L-2 \rrbracket$ \item Note that $B^{L-1}=0_\kappa$. \end{itemize} \end{minipage} Previously all the notation have been defined for one observation $X_i$ as $Z^0=A^0=X_i$. Therefore all the previous notation may be indexed by $i$ : for example $A^{L-1}$ should be indexed $A^{L-1}[i]$ meaning that this vector is associated to the observation $i$. Let us define \begin{eqnarray} \label{ALm1} \mathbb{A}^{L-1}:=\mathbb{A}^{L-1}(\boldsymbol{\theta})=\begin{pmatrix} A^{L-1}[1]\\ \vdots\\ A^{L-1}[n]\\ \end{pmatrix}\in\mathbb{R}^{n\times J} \end{eqnarray} \subsection{\texttt{\,MLR $\,$}-{\texttt{FFNN}}} We want to train the ${\texttt{FFNN}}(\boldsymbol{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on a test set $\mathcal{D}_{test}=\{ (\textbf{U}_i,Z_i)\}_{i=1}^m$, that is, to minimize $$ L(\boldsymbol{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\boldsymbol{\theta},\textbf{U}_i) - Z_i)^2 $$ \medskip Let us define the following quantity : for $\lambda>0$ $$\H:=\mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\mathbb{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ where $\ensuremath{\mathbb{I}}_J$ denote the identity matrix of size $J$. Denote by : \begin{center}\fbox{$\theta:=\{\lambda,W^0,\ldots,W^{L-2},B^0,\ldots,B^{L-2}\}$}\end{center} then it is clear that $\H(\theta)$. \newpage \section{$\texttt{\,MLR $\,$}$ Neural Nets} Let us consider a training set $\mathcal{D}_{train}=\{ (\textbf{X}_i,Y_i)\}_{i=1}^n$ and a test set $\mathcal{D}_{test}=\{ (\textbf{U}_i,Z_i)\}_{i=1}^m$. We want to train a neural net $f(\boldsymbol{\theta},\cdot)$ using only the train set $\mathcal{D}_{train}$ with the objective to achieve generalization on the test set, that is, to minimize $ L(\boldsymbol{\theta};\mathcal{D}_{test}) = \sum_{i=1}^m (f(\boldsymbol{\theta},\textbf{U}_i) - Z_i)^2 $ A naive unregularized training method consists in minimizing the objective function $ L(\boldsymbol{\theta};\mathcal{D}_{train}) = \sum_{i=1}^n (f(\boldsymbol{\theta},\textbf{X}_i) - Y_i)^2. $ This approach is prone to overfitting. Therefore, we introduce instead the Muddling Label Regularization ($\texttt{\,MLR $\,$}$) loss function. \paragraph{Muddling Label Regularization.} This new criterion is based on permutations of the labels $\textbf{Y} = (Y_1,\cdots,Y_n)$. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y}$ as $ \pi(\textbf{Y}) = (Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ \begin{mydef}[Muddling Label Regularization] \label{def:MLR} Let $T\geq 1$ be a fixed number. Let $\pi_t$, $1\leq t \leq T$, be permutations of $n$ elements drawn uniformly at random. The \texttt{\,MLR $\,$} loss is defined as $$ \texttt{\,MLR $\,$}(\boldsymbol{\theta};\mathcal{D}_{train}) = L(\boldsymbol{\theta};(\mathbb{X},\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T L(\boldsymbol{\theta};(\mathbb{X},\pi_t(\textbf{Y})), $$ where $\mathbb{X}^\top = \left( \textbf{X}_1|\cdots|\textbf{X}_n \right)$. \end{mydef} Note that the \texttt{\,MLR $\,$} loss function is computed using only $\mathcal{D}_{train}$. No additional data is used to compute (\texttt{\,MLR $\,$}). The permuted label vector $\pi(\textbf{Y})$ can be seen as a form of data-augmentation of the labels. We draw $T$ label permutation operators $(\pi_t)_{t=1}^T$ \textbf{uniformly at random} in the set of all possible label permutations. That way we obtain $T$ independently drawn permutations of the label vector $\textbf{Y}$, which we denote by $\{\pi_t(\textbf{Y})\}_{t=1}^T$. These permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. Indeed, when $T$ is large enough (e.g. $T=100$), the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$} loss. In practice, it is enough to take $T$ large enough (e.g. $T\geq 100$) Il suffit de prendre un T assez grand pour que le choix des permut et implicitement du choix de la seed n'aient que peu/pas d'impact sur la \texttt{\,MLR $\,$} loss. - We insist that \textbf{no optimization or tuning} is done on the construction of these permutations. Indeed, when $T$ is large enough (e.g. $T=100$), the value of the \texttt{\,MLR $\,$} loss is not impacted by specific choices of the permutations, the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$} loss. \paragraph{Permutations = Regularization.} When we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This means, this new vector is a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is smaller than $2$\footnote{ It is a well-known fact that the expected number of fixed points of a permutation drawn uniformly at random is equal to $1$. See \cite{????}.}. This means that the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $\textbf{Y}_{\pi(i)}$ and $\mathbf{X}_i$. That means that $\mathbf{X}_i$ provides no information on the possible value of $\textbf{Y}_{\pi(i)}$. Therefore, predicting $\textbf{Y}_{\pi(i)}$ using $\mathbf{X}_i$ can only result in overfitting. Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behing the \texttt{\,MLR $\,$} Loss. For $T = 1$, the \texttt{\,MLR $\,$} loss could be written as follows: $$ \texttt{\,MLR $\,$}(\boldsymbol{\theta};\mathcal{D}_{train}) = L(\boldsymbol{\theta};(\textbf{X},\textbf{Y})) - L(\boldsymbol{\theta};(\textbf{X},\pi(\textbf{Y})). $$ \textcolor{red}{The $\texttt{\,MLR $\,$}$ is composed of two antagonistic terms. The first term is the usual loss function that fits the training set while the second term is introduced so that the trained model performs as poorly as possible when fitting the permuted labels.\\ Hence the $\texttt{\,MLR $\,$}$ loss is designed to capture only the meaningful \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. In other words, $\texttt{\,MLR $\,$}$ focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$.\\ Note that the \texttt{\,MLR $\,$} loss was introduced in the linear regression setting in \cite{MLR} where its generalization ability was also theoretically justified. } There are two opposite objectives. On the one hand, we keep the initial loss function used to fit the training set. On the other hand, we also want our model to perform as poorly as possible when fitting the permuted labels. \texttt{\,MLR $\,$} is designed to capture only the \textcolor{red}{meaningful} \sout{specific} relationship between $\textbf{Y}$ and $\textbf{X}$ instead of trying at all cost to match the coincidental variations of $\textbf{Y}$ with $\textbf{X}$. Indeed \texttt{\,MLR $\,$} focuses on patterns that appear only in $(\textbf{X},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{X},\pi(\textbf{Y}))$. \paragraph{Classical deep learning approach.} In the classical deep learning approach, we minimize $$ \widetilde{L}\left(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})\right) = L(\boldsymbol{\theta};(\textbf{X},\textbf{Y})) + \mathrm{pen}(\boldsymbol{\theta};\lambda), $$ where $\lambda$ is a common set of regularisation parameters (e.g. weight decay, drop out level, batch normalization, ...). \paragraph{\texttt{\,MLR $\,$} to train Neural nets.} Applying $\texttt{\,MLR $\,$}$ to Neural nets is far from trivial. A natural strategy \sout{for deep learning practitioners} would be to construct two mirror networks in parallel. One is trained on the true labels $\textbf{Y}$ while the second is trained on the permuted labels $\pi(\textbf{Y})$. \textcolor{red}{The $\texttt{\,MLR $\,$}$ criterion is used to tune simultaneously a common set of regularization parameters}. A naive implementation of \texttt{\,MLR $\,$} looks like that: \textcolor{red}{ $$ \widehat{\boldsymbol{\lambda}}:= \mathrm{argmin}_{\lambda}\; L(\widehat{\boldsymbol{\theta}}(\lambda);(\textbf{X},\textbf{Y}))- L(\widehat{\boldsymbol{\theta}}_{\pi}(\lambda);(\textbf{X},\pi(\textbf{Y}))), $$ with $\widehat{\boldsymbol{\theta}}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\, \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\, \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\pi(\textbf{Y}))) $. } $$ \widehat{\boldsymbol{\lambda}}:= \mathrm{argmin}_{\lambda} L(\widehat{\boldsymbol{\theta}}(\lambda);(\textbf{X},\textbf{Y}))- \frac{1}{T}\sum_{t=1}^T L(\widehat{\boldsymbol{\theta}}_{\Pi_t}(\lambda);(\textbf{X},\pi_t(\textbf{Y}))), $$ with $ \widehat{\boldsymbol{\theta}}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\; \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\textbf{Y})) $ and $ \widehat{\bm\theta}_{\pi_t}(\lambda) = \mathrm{argmin}_{\boldsymbol{\theta}}\; \widetilde{L}(\boldsymbol{\theta},\lambda;(\textbf{X},\pi_t(\textbf{Y}))) $. \textcolor{red}{Optimizing/Tuning} \sout{It is easy to see that optimizing} $\lambda$ requires solving a double nested \textcolor{red}{/ bi-level} optimization problem. Indeed, at each step of the optimization of $\lambda$, we need to back propagate the gradient through the graph of an entire gradient descent process. In addition this must be repeated $1+T$ times, one time for $\textbf{Y}$ and one time for each permutation $\pi_t(\textbf{Y}) . This is something we do not want to do for obvious reasons. We present now our approach. Let $\boldsymbol{\theta}$ be the weights on the hidden layers of our neural net $f(\boldsymbol{\theta},\lambda,\cdot)$, and let $\lambda$ be a non-negative parameter that is specific to our method. Let $\H_{\boldsymbol{\theta}}\,:\,\mathbb{R}^p \rightarrow \mathbb{R}^J$ be a function parametrized by $\boldsymbol{\theta}$ that we apply on the rows of $\textbf{X}$. In addition, we assume that $\H_{\boldsymbol{\theta}}$ is differentiable w.r.t. $\bm\theta$ for all $\textbf{X}$. Define also $d(\textbf{Y}\,,\,\widehat{\textbf{Y}}): = \|\textbf{Y} - \widehat{\textbf{Y}} \|_2^2$. \begin{mydef}[MRL neural net] Set $ \beta(\boldsymbol{\theta},\lambda,\textbf{Y}) = (\H_{\boldsymbol{\theta}}(\textbf{X})^\top \H_{\boldsymbol{\theta}}(\textbf{X}) + \lambda \,\ensuremath{\mathbb{I}}_J)^{-1}\H_{\boldsymbol{\theta}}(\textbf{X})^\top \textbf{Y} $. The MLR neural net is $$ \textbf{NN}(\widehat{\boldsymbol{\theta}},\widehat{\boldsymbol{\lambda}},\cdot) = \H_{\widehat{\boldsymbol{\theta}}}(\cdot)\,\beta(\widehat{\boldsymbol{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{Y}) $$ where $(\widehat{\boldsymbol{\theta}},\widehat{\boldsymbol{\lambda}}) = \mathrm{argmin}_{\boldsymbol{\theta}, \lambda} \;\texttt{\,MLR $\,$}_{\textbf{X},\textbf{Y}}(\boldsymbol{\theta},\lambda)$ with \begin{align} \texttt{\,MLR $\,$}_{\textbf{X},\textbf{Y}}(\boldsymbol{\theta},\lambda) &:= d(\textbf{Y},\H_{\boldsymbol{\theta}}(\textbf{X})\beta(\boldsymbol{\theta},\lambda,\textbf{Y})) - \frac{1}{T}\sum_{t=1}^T d(\pi_t(\textbf{Y}),\H_{\boldsymbol{\theta}}(\textbf{X})\beta(\boldsymbol{\theta},\bm\lambda,\pi_t(\textbf{Y}))).\notag \end{align} \end{mydef} \begin{remark} \textcolor{red}{ Nonconvex but smooth loss. We can compute the derivative and so on...\\ compatible with graph differentiation and can fully exploit gpu parallelization... Inversion of matrix is not a costly operation. Ailleurs\\ \\Computational tractability?} \end{remark} We specify now our approach for a general function $\\H_{\boldsymbol{\theta}}$. In this paper, the function $\\H_{\boldsymbol{\theta}}$ takes the observations as an input and yields the values on the last hidden layer of a neural net as an output. This neural net is assumed to be a feed-forward with $J$ neurons on each hidden layer, and a ReLU activation function between each layer. There is not any additional deep learning scheme applied to the hidden layers (no batch-norm, no weight constraint, no drop-out, etc...). Also, note that $\beta(\boldsymbol{\theta},\lambda,\textbf{Y})$ is the close form of the ridge estimator for target vector $\textbf{Y}$ and regularization parameter $\lambda$ but applied to \sout{the observation matrix} $\H_{\boldsymbol{\theta}}(\textbf{X})$ instead of $\textbf{X}$. Our approach fully embraces the interpretation of neural networks as automated differentiable feature engineering. As such, $\H_{\boldsymbol{\theta}}(\textbf{X})$ can be seen as a set of embeddings. \textcolor{red}{close form release the need for bi-level optimization.} The $\texttt{\,MLR $\,$}$ loss constructs embeddings that capture meaningful patterns in the data while pruning irrelevant connections. To this end, we leverage two key ingredients. First, label permutation is used to produce a control set $(\textbf{X},\pi(\textbf{Y}))$ that can only be fitted through memorization. Second, the Ridge performs shrinkage on the the embeddings. That way, we avoid trivial cases of perfect fit for both terms in the \texttt{\,MLR $\,$} loss. We rather obtain a smooth behavior of both \sout{losses} \textcolor{red}{terms in \texttt{\,MLR $\,$}} w.r.t. the neural net parameters, \textcolor{red}{which can then be leveraged } to get a quantifiable comparison \textcolor{red}{between the two terms}. By maximizing the gap between the two \textcolor{red}{terms} \sout{quantities} in $\texttt{\,MLR $\,$}$, we \textcolor{red}{steer/optimize} the parameters towards the directions that maximize only generalization. This is not surprising since generalization directions are faster to learn than memorization directions \cite{PapierOptimization=Generalization}. **************************************************\\ **************************************************\\ \\ espace\\ **************************************************\\ **************************************************\\ Choix de Ridge plutôt qu'OLS: Ridge est Un estimateur biaisé, $\H_\theta(X) \hat{\beta}$ permuté et $\H_\theta(X) \hat\beta$ ont même variance car $Y$ et $\pi(Y)$ ont la même loi marginale Ainsi la différence des RMSE revient à une différence de biais pour un lambda donné. Dans le cas de Ridge le biais quantifie la perte de signale, ainsi, minimiser \texttt{\,MLR $\,$} revient à minimiser la perte de signal entre le cas informatif du cas non informatif. / On maximise la perte de signal supplémentaire dans le cas permuté. La Dvc quantifie, mesure l'expressivité d'un modèle(classe de fct). Notre approche est différente. On se fixe une Dvc de (n) à atteindre. Et on construit des embeddings qui permettent d'approcher les conditions à remplir/ nécessaires. de construire des embeddings, qui permettent d'approcher une Dvc proche de n, Dvc fait l'argmax sur n, pour une condition fixée. Nous on fixe n mais on essaie d'approcher la condition. Dans notre cas, la classe de fct considérée est fixée à la classe des Estimateurs Ridge dans $R_j (f(X) = 1_ {\H_\theta(X) \beta^R >0})$. On se fixe une Dimension de VC (DVC) égale à la taille de notre échantillon n, et on cherche à construire les conditions de réalisation de cette DVC. Pour cela on cherche à construire $\H_\theta(X)$ tel que pour le vecteur $Y$ de nos observations, le modèle soit le plus proche possible d'une expressivité $n$. Le plus proche possible au sens de la condition pas au sens de $n$. Par définition cela arrive si $||f(\H_\theta(X) ) -Y ||_0$ que l'on remplacera par $CE() -> 0$. Dans le même temps, la construction des $\H_\theta(X)$ doit répondre à une condition supplémentaire, le modèle doit être le moins expressif possible dans le cas non informatif, Y permuté. Ainsi, pour avoir une DVC proche de n, on construit $\H_\theta(X)$ tel que la différence de ces deux expressivités soit la plus grande possible. \paragraph{Dvc} For a class of functions $\mathcal{C} $ from $\mathbb{R}^J$: $$D_{vc}(\mathcal{C}) = argmax_{n \in \ensuremath{\mathbb{N}}}\quad \exists \textbf{X} \in \mathbb{R}^{n,J}\quad \forall \textbf{Y} \in \{0;1\}^n \quad \exists f \in \mathcal{C} \quad \text{such that} \quad ||f(X)-Y||_0 = 0$$ For us, $n$ is a given value, it is the number of observations. We cannot optimize $n$ such that the condition is verified. But for $n$ given we can try to get as close as possible to the case where the condition is verified. We have chosen $\mathcal{C}$, it is the class of ridge estimators for classification, meaning all the functions of the form $f(X) = X \beta_\lambda$. So we are not using $D_{vc}$ to compare two class of functions. For a given value $\lambda$, we do not chose which element of $\mathcal{C}$ is used, it is always the ridge estimator with penalty $\lambda$. Also, we do not pick the worst labels possible in a logical sense. We are choosing the labels which are the worse in a statistical sense. This means we take the labels that are completely independent from the observations. To do so, we draw the permutations of $\textbf{Y}$ who verify this condition. So we consider only one value for the dimension $D_{vc}$, $n$. And with a fix candidate of the class \section{ Loss function for the general setting of $\kappa$ targets} \subsection{Loss function for the setting of one target ($\kappa=1$)} In this setting, $Y_i\in\mathbb{R}$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\textbf{Y}=(Y_1,\ldots,Y_n)^\top$. \textbf{Permutations.} Define $\pi(\textbf{Y})$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\textbf{Y}$ of the initial dataset. We set $$\pi(\textbf{Y}) = (Y_{\pi(1)},\ldots,Y_{\pi(n)})^\top$$ Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^t\}_{t\in \llbracket1,T \rrbracket}$ be $T$ permutations in $\mathfrak{S}_n$. \textbf{Loss function.} Now define our novel Loss function \textbf{NN} $$\textbf{NN}(\theta)=\| \textbf{Y}-\H(\theta)\,\textbf{Y}\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^t(\textbf{Y})-\H(\theta)\,\pi^t(\textbf{Y})\|^2 $$ \paragraph{Fitted.} Our final prédiction $\widehat{\textbf{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=\{\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2}\}$ where $$ \widehat\theta=\underset{\theta}{\arg\min}\textbf{NN}(\theta) $$ Then, $$\widehat{\H}:=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\textbf{Y}\in\mathbb{R}^{J}. $$ Therefore, $$\widehat{\textbf{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\textbf{Y}\in\mathbb{R}^n $$ \paragraph{Prediction} We called the $Trained$-FFNN, the {\texttt{FFNN}} trained on the $train$-dataset $(\mathbb{X},\textbf{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\textbf{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}$. Therefore, $$\widehat{\textbf{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-{\texttt{FFNN}} applied to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \subsection{ Loss function for the general setting of $\kappa$ targets} In this setting, $Y_i\in\mathbb{R}^\kappa$ for all $i\in \llbracket1,n \rrbracket$. Denote by $\mathbb{Y}=(\mathbb{Y}_1,\ldots,\mathbb{Y}_\kappa)\in\mathbb{R}^{n\times \kappa}$, where $$\mathbb{Y}_k=(Y_{1k},\ldots,Y_{nk})^\top\in\mathbb{R}^n.$$ \textbf{Permutations.} For all $k\in \llbracket1,\kappa \rrbracket$, define $\pi^{k}(\mathbb{Y}_k)$ a permutation in $\mathfrak{S}_n$ (the set of permutations of $n$ points) on the components of $\mathbb{Y}_k$ of the initial dataset. We set $\pi^{k}(\mathbb{Y}_k) = (\mathbb{Y}_{\pi(1)k},\ldots,\mathbb{Y}_{\pi(n)k})^\top$. Fix $T\in\ensuremath{\mathbb{N}}^*$. Let $\{\pi^{t,k}\}_{t\in \llbracket1,T \rrbracket}^{k\in \llbracket1,\kappa \rrbracket}$ be $\kappa\times T$ permutations in $\mathfrak{S}_n$. Denote by $$\forall t\in \llbracket1,T \rrbracket:\quad\pi^t(\mathbb{Y})=(\pi^{t,1}(\mathbb{Y}_1),\ldots,\pi^{t,\kappa}(\mathbb{Y}_\kappa))\in\mathbb{R}^{n\times \kappa}$$ Then we define by $$\pi(\mathbb{Y})=(\pi^{1}(\mathbb{Y}),\ldots,\pi^{T}(\mathbb{Y}))\in\mathbb{R}^{T\times n\times \kappa}$$ \textbf{Loss function.} Now define our novel Loss function $\textbf{NN}_\kappa$ for the settig $\kappa$-targets. $$\textbf{NN}_\kappa(\theta)= \frac1\kappa\sum_{k=1}^\kappa\left(\| \mathbb{Y}_k-\H(\theta)\,\mathbb{Y}_k\|^2-\frac{1}{T}\sum_{t=1}^T\| \pi^{t,k}(\mathbb{Y}_k)-\H(\theta)\,\pi^{t,k}(\mathbb{Y}_k)\|^2\right) $$ We can use tensor formulation\footnote{Note that for the tensor formulation \fbox{$T\times n\times \kappa$ will be called $perm. \times obs. \times target.$}.}: $$\textbf{NN}_\kappa(\theta)=\underset{target}{mean}\left[\underset{obs.}{norm^2}\left[\mathbb{Y}-\H(\theta)\,\underset{obs.}{\odot} \mathbb{Y}\right]- \underset{perm.}{mean}\left(\underset{obs.}{norm^2}\left[\pi(\mathbb{Y})-\H(\theta)\,\underset{obs.}{\odot}\pi( \mathbb{Y})\right]\right)\right] $$ \paragraph{Fitted.} Our final prédiction $\widehat{\mathbb{Y}}$ is obtained as follows. We construct $\widehat{ \mathbb{A}}^{L-1}$ from $\widehat\theta=(\widehat W^0,\ldots,\widehat W^{L-2},\widehat B^0,\ldots,\widehat B^{L-2})$ with $$ \widehat\theta=\underset{\theta}{\arg\min\,}\textbf{NN}_\kappa(\theta). $$ Then, $$\widehat{\H}:=\H(\widehat\theta)=\widehat{\mathbb{A}}^{L-1}\left[(\widehat{\mathbb{A}}^{L-1})^\top+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\in\mathbb{R}^{n\times n}.$$ And we set $$\widehat{W}^{L-1}=\left[(\widehat{\mathbb{A}}^{L-1})^\top\widehat{\mathbb{A}}^{L-1}+\widehat{\boldsymbol{\lambda}} \ensuremath{\mathbb{I}}_J\right]^{-1}(\widehat{\mathbb{A}}^{L-1})^\top\mathbb{Y}\in\mathbb{R}^{J\times\kappa}. $$ Therefore, $$\widehat{\mathbb{Y}}:=\widehat{\mathbb{A}}^L=\widehat Z^L=\widehat{\mathbb{A}}^{L-1}\widehat{W}^{L-1}=\widehat{\H}\,\mathbb{Y}\in\mathbb{R}^{n\times \kappa}. $$ \paragraph{Prediction} We called the $Trained$-{\texttt{FFNN}}, the {\texttt{FFNN}} trained on the $train$-dataset $(\mathbb{X},\mathbb{Y})$. So, $\widehat \theta$ and $\widehat{W}^{L-1}$ have been contructed from the $train$-dataset $(\mathbb{X},\mathbb{Y})$. Now, consider $N\in\ensuremath{\mathbb{N}}^*$ new observations $(U_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^p$, where $p\in\ensuremath{\mathbb{N}}^*$ denotes the number of features, we want to predict $(Z_i)_{i\in \llbracket1,N \rrbracket}\in\mathbb{R}^\kappa$, $\kappa\in\ensuremath{\mathbb{N}}^*$ the number of targets. Therefore, $$\widehat{\mathbb{Z}}:=\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\widehat{W}^{L-1}\in\mathbb{R}^{N\times\kappa}, $$ with $\widehat{\mathbb{A}}_{\mathbb{U}}^{L-1}\in\mathbb{R}^{N\times J}$ is given by the $Trained$-{\texttt{FFNN}} appiled to the $test$-sample $\mathbb{U}=[(U_1,\ldots,U_N]$. \paragraph{BKK for regression and tabular data} \paragraph{Parameter initialization} \begin{mdframed} \underline{\textbf{Xavier initialisation}} \medskip - $b^{\ell}_j=0$ for all $(\ell,j)\in\llbracket0,L-2 \rrbracket\times\llbracket1,J\rrbracket$. - $\{W^0_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(p+J)},\sqrt{6/(p+J)}\right)$, $(k,j)\in \llbracket1,p \rrbracket\times \llbracket1,J \rrbracket$. - $\{W^\ell_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(2J)},\sqrt{6/(2J)}\right)$, $(k,j)\in \llbracket1,J \rrbracket^2$, $\forall\ell\in \llbracket1,L-2 \rrbracket$. - $\{W^{L-1}_{kj}\}_{k,j}\overset{i.i.d.}{\sim}\mathcal U\left(-\sqrt{6/(J+\kappa)},\sqrt{6/(J+\kappa)}\right)$, $(k,j)\in \llbracket1,J \rrbracket\times \llbracket1,\kappa \rrbracket$ \end{mdframed} Initialization of $\lambda$, the Ridge parameter: This parameter is both crucial and non trivial. It is easy to see that choosing $\lambda$ close to $0$ will prevent regularization effect. Furthermore, a very small value will bring numerical instability during the matrix inversion. Likewise, choosing $\lambda$ too big will prevent any learning. In both cases, the gradient with respect to $\lambda$ will vanish. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate value depends on many elements, such as datasize, the size of the model, how difficult the task is,... etc. However, we found a very efficient heuristic to pick an appropriate value. Our goal when choosing $\lambda$ is to set up the Neural networks on a gradient path that will lead to a good solution once the learning is done, not before. We do not want to minimize the $\texttt{\,MLR $\,$}$ loss, we want to maximize its variations with respect to $\lambda$. This corresponds to the region where the regularization problem is \textit{interesting}. $$ \lambda = argmax_{\lambda \in \mathbb{R}_+^*} (\frac{d\texttt{\,MLR $\,$}}{d\lambda})(\lambda) $$ In practice, we use a grid : $l = 1 \cdots 40, \lambda_l = 10^{6 \times l / 40}$ $$ \lambda = argmax_{\lambda_{l}} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda_{l+1}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda_{l}) $$ \noindent \\ $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{Set }\boldsymbol{\theta} \\ \textbf{Set }\lambda \\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{WHILE } e < 1000\textbf{ DO:}\\ \quad \left| \begin{array}{llllll} A^{0}-> \textbf{X}\\ \textbf{FOR } l = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} A^{l} -> ReLU(A^{l-1}W^{l} +B^{l})\\ \end{array} \right.\\ \H(\boldsymbol{\theta},\lambda) = \mathbb{A}^{L-1}\left[(\mathbb{A}^{L-1})^\top\mathbb{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\mathbb{A}^{L-1}}^\top\\ \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) = ||(\ensuremath{\mathbb{I}}_n - \H(\boldsymbol{\theta},\lambda))\textbf{Y}|| - \Sigma_{t = 1}^{T}||(\ensuremath{\mathbb{I}}_n - \H(\boldsymbol{\theta},\lambda))\pi^{t}(\textbf{Y})||\\ \textbf{Backpropagate } (\boldsymbol{\theta},\lambda) \textbf{ through } \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\. \end{array} $ $ \begin{array}{l} \textbf{Training})\\ \begin{array}{ll} \quad \left|\textbf{Initialization}\\ \begin{array}{ll} \textbf{Set }\boldsymbol{\theta} \\ \textbf{Set }\lambda \\ \end{array} \right.\\ \end{array} \end{array} $ \newpage \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \newpage \section{Experiments} \subsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsection{Datasets} \subsubsection{Pre-processing} \fbox{Functions} $ \begin{array}{l} \textbf{function C}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{max}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\text{mode}Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function R}(Z)\\ \quad \left|\begin{array}{ll} Z -> \text{float32}(Z)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} \textbf{if}\,\, Z_i==\text{NAN} \\ \qquad\text{remove}(x_i,Y_i)\\ \end{array} \right.\\ Z -> \frac{Z-\overline{Z}}{\bar\sigma(Z)}\\ \end{array} \right. \end{array} $ \bigskip $ \begin{array}{l} \textbf{function M}(Z)\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \text{type}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{else}\\ \quad \left| \begin{array}{l} \text{sort(set($Z$))} \\ Z -> \left(\text{index}\left(Z_i==\text{sort(set($Z$))} [\,:\,]\right)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \fbox{Features pre-processing} \noindent\\ $ \begin{array}{l} \textbf{for}\,\, j=1:p\\ \quad \left|\begin{array}{ll} \textbf{if}\,\, \#\text{set}(X_j)=1\\ \qquad\text{remove}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)=2\\ \qquad\text{function C}(X_j)\\ \textbf{elif}\,\, \#\text{set}(X_j)\leq2\\ \qquad\text{function M}(X_j)\\ \textbf{else}\\ \quad \left| \begin{array}{l} \textbf{if}\,\, \text{type}(X_j)==\text{float}\\ \qquad\text{function R}(X_j)\\ \textbf{else} \\ \qquad\text{remove}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $ $\left| \begin{array}{l} \end{array} \right.$ \subsubsection{Caractéristiques} \subsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \section{Conclusion} \newpage \section{Annexe} \subsection{Introduction} \subsubsection{NN caractéristiques} \begin{itemize} \item Avancées, Engouement \item Approximateur universels, capable d'apprendre du bruit, overfitting extrême \item Hors tradeoff Biais Variance, régime mixte: Highly non convex, optimisation produit solution différente, solution proche initialisation \item Optimisateur, BN, pénalité, WD, Batch learning, Drop Out, Skip, Pruning, initialisation \item Desirable properties: Convergence, vitesse, Généralisation \end{itemize} \subsubsection{Problématiques Données} \begin{itemize} \item Sujets: Stabilité, Adversarial, Robustesse, interprétation, fairness, causalité. \item Mais biais du survivant : néglige Petit, Multivarié, Regression \item \textcolor{red}{BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point} \item \textcolor{red}{Crucial mais négligé : Médical Covid! Nouveauté, pas de Transfer possible} \item - Petit plus important, le temps presse \item - Multivarié car il y a beaucoup de domaines avec des infos non structurés,\\ methode plus universelle car on peut aussi l'appliquer sur des donnees structurees quitte a perdre de la performance\\ IA Scriptée, Faible, Forte, \item - Regression : Quantification, décisions globales pas locales (utilisateur vs institution) \end{itemize} \subsubsection{Problématiques Démocratisation} \begin{itemize} \item Transfer = Pré appris, usage commercial centralisé, repent biais, erreur, bride nouveauté \item Individu : partage connaissance et expertise, empowerment, coût d'accès \item Calibration pb : Taille HParam =Explosion en terme de temps \item Optimisateurs Auto ML : sur couche complexité, Pas encore démocratisé, toujours itératif \item Expertise devient artisanat et expérience plutôt que scientifique \item Empilement de techniques pour améliorer la généralisation, complexité des modèles \end{itemize} \subsection{Related Work} \subsubsection{Neural Network} \begin{itemize} \item Sujets caractéristiques BV, apprentissage \item Sujets autoML \item Sujets liste des éléments à calibrer \end{itemize} \subsubsection{Autre modèles} \begin{itemize} \item RF \item XGB \item MARS \end{itemize} \subsubsection{Problématique (Related works)} \begin{itemize} \item Benchmarks \item SELU \item Ensemble \item Double descente \end{itemize} \subsection{Nouvelle Loss} \subsubsection{Philosophie} \begin{itemize} \item Comparaison Fitté versus pas fitté \item Permutation trick Explication permutation ce que c'est ce que c'est pas(reviewers) (T pas hyper paramètre, permutations pas triviales, on fit pas les permutations, et pondère pas les permutations) \item Philosophie nouvelle loss(papier mlinéaire) et oas de coefficient devant la partie permutée. (la théorie nous dit que c'est comme ça et pas autrement) \item Cas Ridge, Forme Close Rappel papier 1 \end{itemize} \subsubsection{Définition données et RN classique} \begin{itemize} \item Données \item Modèle et paramètres \item Apprentissage/Calibration \end{itemize} \subsubsection{Modification BKK} \begin{itemize} \item Nouveauté lambda beta Ypermuté \item Loss et apprentissage Prédiction avec Beta \item Calibration Lambda \end{itemize} \subsection{Expériences} \subsubsection{Implémentation} \begin{itemize} \item Pseudo Algo, \item Inversion GPU, parralélisation,set up \item Hparam, Architecture, initialisation \end{itemize} \subsubsection{Datasets} \begin{itemize} \item Source et méthodo nettoyage \item Caractéristiques \end{itemize} \subsubsection{Algos Comparés} \begin{itemize} \item Liste \item Grid Search et grille \item Seed, train test split R2 \end{itemize} \subsection{Résultats} \subsubsubsection{Comparaison avec autres modèles} \begin{itemize} \item Quand Meilleur? \item Diff meilleur et Top et <0.05 \item Variance stabilité, uniformément meilleur (Uni meilleure) Analyse quartile (Boxplot) \end{itemize} \subsubsection{Focus R2 et temps pour \texttt{\,MLR $\,$} } \begin{itemize} \item En fonction de T (interval de confiance à partir de T= 1) \item en fonction de N, P, ... \item En fonction de l'archi \end{itemize} \subsection{Trajectoire, poids appris} \begin{itemize} \item Lambda choisi \item Early stopping, trajectoire, Overfitting \item Structure poids appris \end{itemize} \subsection{Conclusion} \begin{itemize} \item SIMPLE : recap technique \item Meilleur : recap résultat, 1 seule modif, première expérience \item Compatible autres techniques, Classif, images, transfer, pruning, relearning, \item Analyse adversarial, few shot, sparsité, outliers, robustesse, fairness, Aggrégat, ensemble, interprétation \end{itemize} EXPLIQUER DANS LE PAPIER REGRESSION POURQUOI ON FAIT PAS LA CLASSIF ENSEMBLE "PAS TRIVIAL!!!" AU MOINS DEUX ENDROITS - STABILITE ::: Mettre loss sur train monotone en fonction de l'itération convergence smooth, sans besoin de critère adaptatif - Jeux données meilleur en moyenne mais pour chaque seed. (médiane / max min) - En fonction de T, évolution, T = 1 pas stable, T = 30 tout vérifié - Graphe en fonction des jeux de données, N P, origine, Rang effectif, Asymétrie, - En fonction de l'archi profondeur largeur impact perf et le temps. BACH PROFONDEUR = SMOOTHNESS mais pas possible en pratique car blocage overfitting, \texttt{\,MLR $\,$} debloque ce point 5.3 Fitt du lambda Poids initiaux couches evaluation du critère pour différentes valeurs de lambda, : ensuite c'est un paramètre comme un autre, et il évolue peu (1 ordre de grandeur max durant le fit) En revanche le lambda choisi lien avec l'architecture. Batch learning? pourquoi pas? Théorique : pour généralisation, pas besoin car bkk généralise). De plus Convergence est pas smooth avec batch, moins bien, oscillation apparaissent. PAS ADAM : Formule update du gradient Mini figure (en annexe) avec les différents optimizers comparaison (adam, adadelta, etc...) pas tous les jeux de données, pas toutes les architectures. Early stopping : 30 itérations = pas de lr scheduling, pas de lr cycle, early stopping et tolérance inutile. critère de convergence. Pas de tolérance. Trajectoire discussion choisir jeu de donnée / seed intéressante : graphe de lambda loss, r2 train, r2 test, RMSE, et RMSE permuté, en fonction du nombre d'itérations : évolution lambda en fct de l'itération : fonction convexe ou concave, Itérations E: jamais vu d'intérêt à dépasser 30 et comme la perf se dégrade quasi pas après l'optimum. : CONSTANTE DE LA METHODE, En ouverture : quand arrêter de façon optimum, rajoutant de la contrainte, changer les permuts, continue de généraliser ( ) Structure poids appris : Boucle poids appris je calcule la sparsité et le rang effectif des poids par couche. Lidéal : structure sparse = modèles sparses (LASSO, MARS ) \bibliographystyle{plainnat} \subsection*{Replicability} Our Python code is released as an open source package for replication: \href{https://github.com/AnonymousSubmissionNeurips2020/Supplementary-Material.git}{github/AnonymousSubmissionNeurips2021/}. \subsection*{Configuration machine} We ran our experiments with this configuration: \begin{table}[http!] \begin{center} \centering \begin{tabular}{|ll|} \hline \footnotesize{\textbf{Cloud:}} & Google Cloud Plateform\\ \footnotesize{\textbf{CPU:}} & Intel Haswell 16 vCPUs\\ \footnotesize{\textbf{GPU:}} & NVIDIA Tesla P100\\ \footnotesize{\textbf{RAM:}} & 104 GB\\ \footnotesize{\textbf{MEM:}} & 500 GB SSD\\ \footnotesize{\textbf{Image:}} & rapids-0-7-gpu-experimental-notebooks\\ \hline \end{tabular} \end{center} \end{table} \section{State of the Art} We complete here the review of the existing literature on deep learning on tabular data. An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted {\texttt{FFNN}}{} as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized {\texttt{FFNN}}{} on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel (NTK) induced by infinitely wide neural networks on small classification tasks. NTK slightly outperforms Random Forests implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). NTK performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of NTK limits its use in large scale learning tasks. Net-DNF \cite{katzir2021netdnf} is an end-to-end DL model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, XGBoost outperforms Net-DNF in their experiments. \cite{Klambauer2017} proposes Self-Normalized Neural Networks (SNN) based on the SELU activation function to train very deep feed-forward neural networks more efficiently. SNN architecture is motivated as it makes SGD more stable. However SNN requires careful tuning of hyperparameters and does not outperform SVM or Random Forests on the UCI database. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}{}}\label{secMLRloss} \subsection{The \texttt{\,MLR $\,$}{} loss} Recall $$\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ Where $\textbf{A}^{L-1}$ denotes the last hidden layer. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer of the {\texttt{FFNN}}; $(ii)$ the close-form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. First, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This new vector can be seen as a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \subsection{Cross-Entropy loss} In the classification task, the {\texttt{FFNN}}{} architecture is essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a {\texttt{Sigmoid}}{} and the Cross Entropy (\texttt{CE}) loss. (namely \texttt{torch.nn.BCEWithLogitsLoss} in PyTorch and referred to as {\texttt{BCE}}{} in this paper). Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \bigskip \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} \bigskip The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. Note that $\textbf{Y}^*$ with values in $\{-1,1\}$ is the symmetrized version of $\textbf{Y}$. Next, the Structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. \begin{mydef}[\texttt{BCE-MLR-NN}] Our \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} and $\textbf{P}(\cdot,\cdot,\textbf{x})$ $s.t.$ , $\textbf{P}=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}$. \end{mydef} \bigskip \section{Training a {\texttt{FFNN}}{} with \texttt{\,MLR $\,$}} \paragraph{The \textbf{NN}{} Architecture.} We consider {\texttt{FFNN}}{} with $L$ layers, $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$, and with all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$). \begin{table}[H] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} \paragraph{Dither{} \cite{dither}.} This step is distinct from the Structured dithering that we introduced in the \texttt{\,MLR $\,$}{} method. In the regression setting, we do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice. Let $\epsilon,\,(\epsilon^t)_t\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\tilde\sigma^2\ensuremath{\mathbb{I}})$. We set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and $\pi_{\epsilon}^t(\textbf{Y})=\pi^t(\textbf{Y})+\epsilon^{t}$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $\left(\textbf{Y}_{\epsilon},\left(\pi_{\epsilon}^t(\textbf{Y})\right)_{t=1}^T\right)$ instead of $\left(\textbf{Y},\left(\pi^t(\textbf{Y})\right)_{t=1}^T\right)$. \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}_{\epsilon}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}_{\epsilon}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi_{\epsilon}^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi_{\epsilon}^t(\textbf{Y})\right)\right|. \end{align*} Here again, $\tilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\tilde\sigma=0.03$ for all the datasets in our benchmark. Moreover, in our approach the batch size $b_s$ is not a hyperparameter as we fix it as in table above. Note that we do not apply this dither step in the classification setting. \paragraph{Initialization of $\boldsymbol{\theta}$.} The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \medskip \begin{mdframed} \underline{Recall $|{\texttt{input}}|=d$ and $|{\texttt{out}}|$=1} \medskip $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. The entries of $W^\ell$ are generated independently from the uniform distribution on the interval $\ensuremath{\mathcal{I}}_\ell$ : \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{I}}_1=\left(-\sqrt{\frac{6}{(d+J)}},\sqrt{\frac{6}{(d+J)}}\right)$ and $\,\ensuremath{\mathcal{I}}_L=\left(-\sqrt{\frac{6}{(d+1)}},\sqrt{\frac{6}{(d+1)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{I}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \end{itemize} \end{mdframed} \bigskip \paragraph{Efficient heuristic to initialize the Ridge parameter.} In our experiments, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray*} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray*} The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \bigskip \paragraph{Choice of the number of iterations during the train.} \begin{itemize} \item [$\bullet$] We fix the maximum number of iterations $\texttt{max}_{{\texttt{Iter}}}$ (depending on the value of $L$). \item [$\bullet$] We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the allotted time {\texttt{FixB}}. \item [$\bullet$] We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, $i.e.$ $${\texttt{Iter}}= \min(\texttt{max}_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$$ \end{itemize} \bigskip \paragraph{Training \texttt{\,MLR $\,$}{}-NN.} We train the {\texttt{FFNN}}{} with $b_s=\min(J,n)$ and we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ which depends on the number of layers $L$ (Table~\ref{tab:architectures1}). \medskip \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\,\boldsymbol{\theta} \\ \textbf{\texttt{set}}\,\lambda \\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < {\texttt{Iter}} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{x}\in\mathbb{R}^{b_s\times d}\\ \textbf{{for}}\,\, \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{A}^{\ell-1}W^{\ell} +B^{\ell}) \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{Compute }\, \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \quad \text{or}\quad \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda \\ \textbf{Backpropagate }\, (\boldsymbol{\theta},\lambda) \textbf{ through }\, \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \quad \text{or}\quad \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} $ \end{mdframed} We select a $validation$-set of size $n_{val}=20\%\, n$. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: $${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}.$$ Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$ \bigskip \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \section{Construction of the Benchmark} To produce this benchmark (Table~\ref{tab:datasets}), we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \begin{table}[H] \caption{Benchmark datasets. \# Num., \# Bin. and \# Cat. denote the initial number of numerical, binary and categorical features respectively. We denote by $d$ the number of features after the pre-processing and one-hot encoding.} \label{tab:datasets} \centering \footnotesize \begin{tabular}{|l|c|c|c|c|c|c|} \hline Description & Task & $n$ & $d$ & \# Num. & \# Bin. & \# Cat. \\ \hline \hline Concrete Slump Test -2 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0$ & $0 $ \\ \hline Concrete Slump Test -3 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0$ & $0 $ \\ \hline Concrete Slump Test -1 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0$ & $0 $ \\ \hline Servo & \texttt{Reg} & $ 168$ & $24$ & $2$ & $0$ & $4 $ \\ \hline Computer Hardware & \texttt{Reg} & $ 210$ & $7$ & $7$ & $0$ & $0 $ \\ \hline Yacht Hydrodynamics & \texttt{Reg} & $ 308$ & $33$ & $5$ & $0$ & $3 $ \\ \hline QSAR aquatic toxicity & \texttt{Reg} & $ 546$ & $34$ & $8$ & $0$ & $3 $ \\ \hline QSAR Bioconcentration classes & \texttt{Reg} & $ 779$ & $25$ & $8$ & $2$ & $2 $ \\ \hline QSAR fish toxicity & \texttt{Reg} & $ 909$ & $18$ & $6$ & $0$ & $2 $ \\ \hline insurance & \texttt{Reg} & $ 1338$ & $15$ & $3$ & $2$ & $2 $ \\ \hline Communities and Crime & \texttt{Reg} & $ 1994$ & $108$ & $99$ & $0$ & $2 $ \\ \hline Abalone R & \texttt{Reg} & $ 4178$ & $11$ & $7$ & $0$ & $1 $ \\ \hline squark automotive CLV training & \texttt{Reg} & $ 8099$ & $77$ & $7$ & $2$ & $14 $ \\ \hline Seoul Bike Sharing Demand & \texttt{Reg} & $ 8760$ & $15$ & $9$ & $2$ & $1 $ \\ \hline Electrical Grid Stability Simu & \texttt{Reg} & $ 10000$ & $12$ & $12$ & $0$ & $0 $ \\ \hline blr real estate prices & \texttt{Reg} & $ 13320$ & $2$ & $2$ & $0$ & $0 $ \\ \hline Cervical Cancer Behavior Risk & \Clf & $ 72$ & $149$ & $19$ & $0$ & $14 $ \\ \hline Post-Operative Patient & \Clf & $ 91$ & $32$ & $0$ & $0$ & $8 $ \\ \hline Breast Cancer Coimbra & \Clf & $ 116$ & $9$ & $9$ & $0$ & $0 $ \\ \hline Heart failure clinical records & \Clf & $ 299$ & $12$ & $7$ & $5$ & $0 $ \\ \hline Ionosphere & \Clf & $ 352$ & $34$ & $32$ & $2$ & $0 $ \\ \hline Congressional Voting Records & \Clf & $ 436$ & $64$ & $0$ & $0$ & $16 $ \\ \hline Cylinder Bands & \Clf & $ 541$ & $111$ & $1$ & $0$ & $19 $ \\ \hline Credit Approval & \Clf & $ 691$ & $42$ & $4$ & $0$ & $8 $ \\ \hline Tic-Tac-Toe Endgame & \Clf & $ 959$ & $36$ & $0$ & $0$ & $9 $ \\ \hline QSAR biodegradation & \Clf & $ 1056$ & $141$ & $41$ & $0$ & $15 $ \\ \hline Chess (King-Rook vs. King-Pawn & \Clf & $ 3196$ & $102$ & $0$ & $3$ & $33 $ \\ \hline Mushroom & \Clf & $ 8125$ & $125$ & $0$ & $1$ & $20 $ \\ \hline Electrical Grid Stability Simu & \Clf & $ 10000$ & $12$ & $12$ & $0$ & $0 $ \\ \hline MAGIC Gamma Telescope & \Clf & $ 19021$ & $10$ & $10$ & $0$ & $0 $ \\ \hline Adult & \Clf & $ 32561$ & $34$ & $6$ & $1$ & $4 $ \\ \hline Internet Firewall Data & \Clf & $ 65532$ & $11$ & $11$ & $0$ & $0 $ \\ \hline \end{tabular} \end{table} \subsection{Pre-processing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. \paragraph{Target treatement.} The target is centered and standardized via the function $\textbf{{function-T}}(\cdot)$. We remove the observation when the value is missing. \begin{mdframed} $ \begin{array}{l} \textbf{{function-T}}(Y)\\ \quad \left|\begin{array}{ll} Y -> \text{float32}(Y)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Y_i==\text{NAN} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Y -> \frac{Y-\overline{Y}}{\bar\sigma(Y)}\\ \end{array} \right. \end{array} $ \end{mdframed} \bigskip \paragraph{Features treatment.} The imputation treatment is done during processing. For \textcolor{red}{categorical} \sout{qualitative} features, NAN Data may be considered as a new class. For \textcolor{red}{numerical} \sout{quantitative} features, we replace missing values by the mean. Denote by $n_j=\#\textbf{\texttt{set}}(X_j)$ the number of distinct values taken by the variable $X_j$ \bigskip $$ \begin{array}{l} \textbf{{for}}\,\, j=1:p\\ \quad \left|\begin{array}{ll} {\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)=1\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)=2\\ \qquad\textbf{{function-C}}\,(X_j)\\ \textbf{{else}}\\ \quad \left| \begin{array}{l}{\textbf{if}} \,\, \#\textbf{\texttt{set}}(X_j)\leq 12\\ \qquad\textbf{{function-M}}\,(X_j)\\ {\textbf{if}}\,\, \textbf{\texttt{type}}(X_j)==\text{float}\\ \qquad\textbf{{function-I}}\,(X_j)\\ \textbf{{elif}}\,\, \#\textbf{\texttt{set}}(X_j)> 12\\ \qquad\textbf{\texttt{remove}}(X_j)\\ \end{array} \right. \end{array} \right. \end{array} $$ \bigskip $\bullet$ When $n_j=1$, we remove the variable $X_j$. $\bullet$ When $n_j=2$, potentially one of them being NAN, $\textbf{{function-C}}\,(\cdot)$. performs numerical encoding of binary categorical features. \begin{mdframed} $ \begin{array}{l} \textbf{{function-C}}\,(Z)\\ \quad \left|\begin{array}{ll} {\textbf{if}}\,\, \textbf{\texttt{type}}(Z)\in[\text{int, float}]\\ \quad \left| \begin{array}{l} Z -> \left(Z_i==\textbf{\texttt{max}}(Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \textbf{{else}}\\ \quad \left| \begin{array}{l} Z -> \left(Z_i!=\textbf{\texttt{mode}} (Z)\right)_{i=1,\cdots,n}\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \end{mdframed} \bigskip $\bullet$ Numerical features with less than $12$ distinct values are also treated as categorical features ($2<n_j\leq 12$), potentially one of them being NAN. We apply this one-hot-encoding via $\textbf{{function-M}}\,(\cdot)$. \bigskip $\bullet$ Otherwise, the feature is removed or treated by the function $\textbf{{function-I}}\,(\cdot)$ if its type is \texttt{float}. In the latter case, the missing data is replaced by the mean of the variable. \begin{mdframed} $ \begin{array}{l} \textbf{{function-I}}\,(Z)\\ \quad\textbf{for}\,\, i=1:n\\ \quad \left|\begin{array}{ll} \quad \left| \begin{array}{l} {\textbf{if}}\,\, Z_{i}==\text{NAN} \\ \quad Z_{i} -> {\texttt{mean}}(Z)\\ \end{array} \right.\\ \end{array} \right. \end{array} $ \end{mdframed} \section{\texttt{\,MLR $\,$}{} Parameters Analysis} We analyze now the key components which compose our method. We performed extensive evaluations (\textcolor{red}{$value$} seeds) on three datasets, \texttt{UCI36}, \texttt{UCI5}, \texttt{UCI18} of respective size $(n,d) = ()$, $()$ and $()$. In this section we study the behavior of our method and its key components through extensive evaluation (\textcolor{red}{$value$} seeds) on three datasets, \texttt{UCI36}, \texttt{UCI5}, \texttt{UCI18} which correspond respectively to n,d = (\textcolor{red}{$value$}, \textcolor{red}{$value$},\textcolor{red}{$value$}). These well-known datasets are quite representative of their respective sample size regimes. \subsection{Impact of the MLR components.} \textcolor{red}{In this section, we study the impact of the different components in \texttt{\,MLR $\,$}{} approach on the the ${\texttt{R}^2}$-score on the $test$ and the $validation$ set, computation time, the convergence of the method ({\texttt{Iter}}) and the initialization of the Ridge parameter ($\lambda_{init}$) . EST-CE QUE POUR CHAQUE ÉTUDE ON FAIT VARIER UN SEUL PARAMÈTRE ET ON FIXE LES AUTRES PARAMÈTREs AVEC LES VALEURS PA DÉFAUT TABLE~\ref{tab:architectures1}} \paragraph{Structured Dithering.} Recall that we added Structured noise $(\ensuremath{\mathbb{I}}_n-\textbf{H} )\xi$ to the target $\textbf{Y}$ with $\xi\sim \ensuremath{\mathcal{N}}(0,\sigma^2\ensuremath{\mathbb{I}})$. Table~\ref{tab:StructDithering} reveals the impact of the Structured dithering ($i.e.$ the parameter $\sigma$) \sout{on the ${\texttt{R}^2}$-score, computation time and the convergence of the method}. Default value in bold ($\boldsymbol{\sigma = 1}$) yields consistently good generalization performance. Of course, it is always possible to tune this hyperparameter around value $1$ for potential improvement of the generalization performances. Higher values of $\sigma$ lead to a significant degradation of ${\texttt{R}^2}$ score as it caused the method to diverge. In our experiments, $\sigma$ was not an hyperparameter as it was always set equal to $1$. \textcolor{red}{Adding Structured dithering has no impact on the value of $\lambda_{init}$.} \begin{table}[H] \caption{Structured dithering dependence.} \label{tab:StructDithering} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 &$\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.321$ & $30.356$ & $60.650$ & $0.479$ & $219.345$ \\ \hline &0.2 & $ 0.338$ & $30.424$ & $79.830$ & $0.496$ & $219.345 $ \\ \hline &\textbf{1} & $ 0.357$ & $30.423$ & $99.570$ & $0.515$ & $219.345 $ \\ \hline &2 & $ 0.089$ & $1.312$ & $0.250$ & $0.137$ & $219.345 $ \\ \hline &3 & $ 0.068$ & $1.257$ & $0.000$ & $0.116$ & $219.345 $ \\ \hline \hline UCI 5 & $\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.463$ & $32.250$ & $11.200$ & $0.511$ & $774.264 $ \\ \hline &0.2 & $ 0.463$ & $32.408$ & $14.550$ & $0.514$ & $774.264 $ \\ \hline &\textbf{1} & $ 0.460$ & $32.281$ & $46.750$ & $0.525$ & $774.264 $ \\ \hline &2 & $ 0.220$ & $1.276$ & $0.020$ & $0.226$ & $774.264 $ \\ \hline &3 & $ 0.216$ & $1.288$ & $0.000$ & $0.223$ & $774.264 $ \\ \hline \hline UCI 18 &$\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.863$ & $89.425$ & $181.300$ & $0.864$ & $10000.001 $ \\ \hline &0.2 & $ 0.863$ & $90.206$ & $188.520$ & $0.864$ & $10000.001 $ \\ \hline &\textbf{1} & $ 0.855$ & $89.968$ & $191.920$ & $0.857$ & $10000.001 $ \\ \hline &2 & $ 0.364$ & $1.876$ & $0.000$ & $0.363$ & $10000.001 $ \\ \hline &3 & $ 0.364$ & $1.891$ & $0.000$ & $0.363$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Permutations.} We studied the impact of the randomness aspect of the \texttt{\,MLR $\,$}{} loss. We compared different sets of permutations drawn at random, Table~\ref{tab:Permutation} shows that the choice of permutations has little impact on the value of \texttt{\,MLR $\,$}{}. \textcolor{red}{From $T>1$} \sout{For $T\geq 1$}, these variations drastically diminish. Meanwhile, the number of permutations has a direct negative impact on runtime per iteration and VRAM footprint. Past a certain threshold \textcolor{red}{$value$}, GPU parralelization no longer prevents the linear dependency with $T$. We escape any tradeoff by picking $T=2^{4}$ permutations in all our experiments. This value is large enough for the \texttt{\,MLR $\,$}{} loss to converge (with regards to $T$), yet still leveraging GPU parralelization. \begin{table}[H] \caption{Permutation dependence} \label{tab:Permutation} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0.0 & $ 0.252$ & $3.184$ & $61.050$ & $0.401$ & $31.831 $ \\ \hline & 1.0 & $ 0.331$ & $3.357$ & $110.040$ & $0.459$ & $285.238 $ \\ \hline & 2.0 & $ 0.338$ & $3.359$ & $109.960$ & $0.468$ & $215.370 $ \\ \hline & 4.0 & $ 0.343$ & $3.358$ & $109.370$ & $0.473$ & $219.345 $ \\ \hline & 16.0 & $ 0.347$ & $4.012$ & $116.190$ & $0.484$ & $216.235 $ \\ \hline & 256.0 & $ 0.351$ & $3.371$ & $117.160$ & $0.494$ & $219.345 $ \\ \hline & 1024.0 & $ 0.349$ & $3.433$ & $117.650$ & $0.495$ & $219.345 $ \\ \hline \end{tabular} \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 5 & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0.0 & $ 0.460$ & $3.253$ & $46.770$ & $0.509$ & $774.264 $ \\ \hline & 1.0 & $ 0.461$ & $3.452$ & $62.020$ & $0.518$ & $774.264 $ \\ \hline & 2.0 & $ 0.466$ & $3.461$ & $60.040$ & $0.518$ & $774.264 $ \\ \hline & 4.0 & $ 0.469$ & $3.462$ & $60.720$ & $0.521$ & $774.264 $ \\ \hline & 16.0 & $ 0.473$ & $6.172$ & $72.800$ & $0.527$ & $774.264 $ \\ \hline & 256.0 & $ 0.477$ & $3.496$ & $81.900$ & $0.532$ & $774.264 $ \\ \hline & 1024.0 & $ 0.480$ & $3.551$ & $81.530$ & $0.532$ & $774.264 $ \\ \hline \end{tabular} \end{table} \paragraph{Initialization of Ridge parameter $\lambda_{init}$.} \paragraph{Ablation study.} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets \textcolor{red}{LESQUELS?} with different sample sizes and feature to sample ratios. We repeated each experiment over 100 random $train$/$test$ splits. \textcolor{red}{All the results presented here correspond to the architecture of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{} with hyperparameters fixed as in Table~\ref{tab:architectures1}.}\\ A standard \RNN2 ({\texttt{FFNN}}{} of $2$ layers with a wide architecture, $J=2^{10}$) cannot be trained efficiently on small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark.\\ Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach.\\ The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging ($0.062$) is still of the same order of magnitude as the one we got when we applied permutations on top of Ridge to the {\texttt{FFNN}}{} ($0.043$). This means these two ingredients (permutations and struct. dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \begin{table}[H] \caption{Ablation Study in Regression.} \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline \RNN2 & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline {\texttt{FFNN}}{}+ Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline {\texttt{FFNN}}{}+ Ridge + Struct. Dithering & $ 0.323 \pm 0.075 $ & $ 0.400 \pm 0.048 $ \\ \hline {\texttt{FFNN}}{}+ Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $ \\ \hline \texttt{\,MLR $\,$}{} & $ 0.371 \pm 0.024 $ & $ 0.433 \pm 0.000 $ \\ \hline \end{tabular} \end{table} \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.184$ & $0.705$ & $162.120$ & $0.284$ & $210.307 $ \\ \hline &$2^{6}$ & $ 0.276$ & $0.751$ & $160.030$ & $0.364$ & $211.555 $ \\ \hline &$2^{8}$ & $ 0.325$ & $0.905$ & $135.400$ & $0.431$ & $205.351 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.344$ & $2.201$ & $113.610$ & $0.484$ & $222.455 $ \\ \hline &$2^{12}$ & $ 0.322$ & $15.796$ & $94.180$ & $0.503$ & $220.900 $ \\ \hline \hline UCI 5 &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.367$ & $0.724$ & $184.540$ & $0.379$ & $678.097 $ \\ \hline &$2^{6}$ & $ 0.442$ & $0.743$ & $157.840$ & $0.471$ & $628.464 $ \\ \hline &$2^{8}$ & $ 0.467$ & $0.907$ & $115.510$ & $0.512$ & $774.264 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.470$ & $2.188$ & $71.790$ & $0.527$ & $774.264 $ \\ \hline &$2^{12}$ & $ 0.460$ & $16.987$ & $37.210$ & $0.524$ & $774.264 $ \\ \hline \hline UCI 18 &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.622$ & $1.008$ & $200.000$ & $0.620$ & $9350.431 $ \\ \hline &$2^{6}$ & $ 0.714$ & $1.134$ & $200.000$ & $0.713$ & $9927.827 $ \\ \hline &$2^{8}$ & $ 0.773$ & $1.955$ & $199.880$ & $0.773$ & $10000.001 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.825$ & $7.062$ & $198.240$ & $0.825$ & $10000.001 $ \\ \hline &$2^{12}$ & $ 0.856$ & $54.121$ & $193.270$ & $0.857$ & $10000.001 $ \\ \hline \end{tabular} \caption{Width dependence} \label{tab:Width} \end{table} \subsection{Other hyperparameters.} The impact of the other hyperparameters in our method is sometimes strikingly different from what is usually observed in the general deep learning framework. (batch-size: \cite{}, layer-size\cite{}). Bear in mind that in the setting of regression on small tabular datasets, standard {\texttt{FFNN}}{} already behave quite differently with respect to hyperparameters. All results below are shown for both \texttt{\,MLR $\,$}{} and regular {\texttt{FFNN}}{} to get a point of reference. \paragraph{Dither.} At each iteration, we draw and add i.i.d. gaussian noise $\ensuremath{\mathcal{N}}(0,\tilde{\sigma}^2\ensuremath{\mathbb{I}})$ on the target $\textbf{Y}$ \textcolor{red}{in the regression setting}. In Table~\ref{tab:Dithering}, we see that adding a small amount of noise improves performances, but beyond a certain threshold, it deteriorates convergence \textcolor{red}{NE CORRESPOND PAS A CE QUE DIS LE TABLEAU}. \textcolor{red}{There again, we can improve generalization performance by considering $\tilde{\sigma}$ as an hyperparameter to be tuned. Nonetheless, we do not consider in all our experiments, we always set the noise level at $\tilde{\sigma}=0.03$. Emphasize that performing dithering has no impact on on run-time per iteration or on the value of $\lambda_{init}$.} \begin{table}[H] \caption{Dithering dependance : label noise scale} \label{tab:Dithering} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36 & $\tilde{\sigma}$ &${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.347$ & $3.104$ & $116.490$ & $0.483$ & $220.900 $ \\ \hline &0.01 & $ 0.351$ & $3.110$ & $114.560$ & $0.486$ & $220.900 $ \\ \hline &\textbf{0.03} & & & & & \\ \hline &0.1 & $ 0.354$ & $3.111$ & $113.720$ & $0.490$ & $215.104 $ \\ \hline &0.3 & $ 0.353$ & $3.108$ & $119.300$ & $0.502$ & $216.367 $ \\ \hline \hline UCI 5 & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.475$ & $3.250$ & $76.830$ & $0.527$ & $774.264 $ \\ \hline &0.01 & $ 0.474$ & $3.258$ & $68.680$ & $0.527$ & $774.264 $ \\ \hline &\textbf{0.03} & & & & & \\ \hline &0.1 & $ 0.474$ & $3.258$ & $70.860$ & $0.528$ & $774.264 $ \\ \hline &0.3 & $ 0.474$ & $3.258$ & $68.620$ & $0.532$ & $774.264 $ \\ \hline \hline UCI 18 & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0.0 & $ 0.813$ & $8.554$ & $197.430$ & $0.814$ & $10000.001 $ \\ \hline &0.01 & $ 0.814$ & $8.561$ & $197.240$ & $0.814$ & $10000.001 $ \\ \hline &\textbf{0.03} & & & & & \\ \hline &0.1 & $ 0.813$ & $8.561$ & $196.720$ & $0.814$ & $10000.001 $ \\ \hline &0.3 & $ 0.812$ & $8.567$ & $196.220$ & $0.813$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Width.} Most notably, Figure \ref{?} reveals that wider architecture is always better with our method as the generalization performance is an increasing function of the width of the network. We recall that for standard NN trained without MLR, wider architectures are more prone to overfitting. The impact on running time is highly dependant on specific framework and device configurations(See Figure \ref{?}). As a simple rule of thumb, the rate for the inversion of a square matrix is linear on a GPU with parralelization\cite{} and quadratic on a CPU without. The biggest limitation is the size of the VRAM of the GPU, as $32G$ is available at best currently (we conducted all these experiments on devices with $11G$VRAM, although they can be replicated with the common $8G$ VRAM as well without trouble). \paragraph{Batch size.} Its \sout{Batch size} effect on generalization is the subject of numerous studies \cite{} with contradicting conclusions and no universal guideline. However, note that the explored values almost always lie within \textcolor{red}{$value$} and \textcolor{red}{$value$}. Likewise, these studies do not focus on the very small sample regime. Figure \ref{} shows that our conclusions for the width of the network mostly hold true for the size of the batch: as big as possible. For small datasets this mean using the entire train-set at each iteration, while GPU memory constraints \textcolor{red}{rule out} \sout{rom} going beyond $2^{12}$ for large datasets. Downstream, a larger batch size means less gradient oscillation\cite{}, a larger learning rate \cite{} and less iterations\cite{}, these findings hold true in our experiments (as can be seen below). \begin{table}[H] \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline UCI 36&$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.122$ & $4.375$ & $32.596$ & $0.014$ & $38.452 $ \\ \hline &$2^{4}$ & $ 0.334$ & $5.194$ & $129.673$ & $0.520$ & $82.567 $ \\ \hline &$2^{5}$ & $ 0.349$ & $5.194$ & $107.269$ & $0.517$ & $110.214 $ \\ \hline &$2^{6}$ & $ 0.393$ & $5.352$ & $115.115$ & $0.500$ & $246.869 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.401$ & $5.238$ & $114.385$ & $0.499$ & $237.899 $ \\ \hline \hline UCI 5 &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.014$ & $4.658$ & $38.020$ & $0.003$ & $290.923 $ \\ \hline &$2^{4}$ & $ 0.415$ & $5.046$ & $148.680$ & $0.490$ & $158.198 $ \\ \hline &$2^{5}$ & $ 0.459$ & $5.180$ & $141.260$ & $0.527$ & $204.647 $ \\ \hline &$2^{6}$ & $ 0.474$ & $5.216$ & $128.820$ & $0.545$ & $253.497 $ \\ \hline &$2^{7}$ & $ 0.477$ & $5.277$ & $103.270$ & $0.540$ & $388.678 $ \\ \hline &$2^{8}$ & $ 0.478$ & $5.254$ & $97.010$ & $0.535$ & $774.264 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.475$ & $5.301$ & $72.470$ & $0.528$ & $774.264 $ \\ \hline \hline UCI 18 &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ 0.013$ & $4.536$ & $15.790$ & $0.013$ & $89.257 $ \\ \hline &$2^{4}$ & $ 0.640$ & $5.317$ & $168.790$ & $0.642$ & $107.543 $ \\ \hline &$2^{5}$ & $ 0.673$ & $5.375$ & $176.200$ & $0.675$ & $171.905 $ \\ \hline &$2^{6}$ & $ 0.703$ & $5.360$ & $186.940$ & $0.705$ & $212.625 $ \\ \hline &$2^{7}$ & $ 0.729$ & $5.413$ & $188.540$ & $0.730$ & $537.572 $ \\ \hline &$2^{8}$ & $ 0.750$ & $5.447$ & $189.770$ & $0.751$ & $774.264 $ \\ \hline &$2^{9}$ & $ 0.763$ & $5.460$ & $191.490$ & $0.765$ & $2641.979 $ \\ \hline &$2^{10}$ & $ 0.785$ & $5.781$ & $192.900$ & $0.786$ & $2782.560 $ \\ \hline &$2^{11}$ & $ 0.790$ & $6.908$ & $195.150$ & $0.791$ & $10000.001 $ \\ \hline &$2^{12}$ & $ 0.813$ & $9.842$ & $196.930$ & $0.814$ & $10000.001 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.824$ & $13.547$ & $197.800$ & $0.825$ & $10000.001 $ \\ \hline \hline UCI 0 &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.003$ & $4.826$ & $65.470$ & $-0.003$ & $185.268 $ \\ \hline &$2^{4}$ & $ 0.019$ & $5.344$ & $121.380$ & $0.021$ & $628.786 $ \\ \hline &$2^{5}$ & $ 0.050$ & $5.629$ & $157.860$ & $0.052$ & $563.540 $ \\ \hline &$2^{6}$ & $ 0.109$ & $5.659$ & $176.680$ & $0.110$ & $770.180 $ \\ \hline &$2^{7}$ & $ 0.148$ & $5.646$ & $171.810$ & $0.149$ & $705.241 $ \\ \hline &$2^{8}$ & $ 0.188$ & $5.678$ & $179.850$ & $0.190$ & $988.136 $ \\ \hline &$2^{9}$ & $ 0.209$ & $5.771$ & $185.860$ & $0.211$ & $911.264 $ \\ \hline &$2^{10}$ & $ 0.231$ & $6.165$ & $190.310$ & $0.233$ & $1001.640 $ \\ \hline &$2^{11}$ & $ 0.254$ & $7.251$ & $192.960$ & $0.255$ & $1245.079 $ \\ \hline &$2^{12}$ & $ 0.278$ & $10.199$ & $194.410$ & $0.279$ & $1376.753 $ \\ \hline &$2^{13}$ & $ 0.298$ & $20.653$ & $195.740$ & $0.298$ & $2782.560 $ \\ \hline &$\boldsymbol{\min(n,2^{10})}$ & $ 0.316$ & $56.976$ & $193.520$ & $0.317$ & $3793.002 $ \\ \hline \end{tabular} \caption{ Batch size dependence \label{tab:Batchsize} } \end{table} \paragraph{Depth.} By contrast with batch size and network width, our study depicts the reverse story for network depth. Deep learning, by essence and through successive milestones (\cite{,,,}\cite{}) associated deeper architectures with improved performance and generalization. Meanwhile, our results clearly show that stacking layers not only gives diminishing returns, but can also become completely detrimental, to the point where shallow networks sometimes significantly outperform deeper networks (see results with dataset \ref{}). These findings seem to occur mostly for smaller datasets (see Figure \ref{}). Recall that going deeper often means adding specific schemes such as residual\cite{} and skip-connect\cite{} layers which were outside of the scope of this paper. Quite predictably, deeper network means bigger runtime per iteration\ref{}. \textbf{Learning rate \& number of iterations.} We restrained from tuning the calibration parameters of ADAM, or resorting to another optimizer as default pytorch setting works well. However, since the width and batch size we picked were outside of the usual ranges, we also had to adjust the learning rate accordingly. Indeed, Figure \ref{} shows that for larger learning rates, \texttt{\,MLR $\,$}{} behavior is very atypical. Far from double descent patterns, in most of our experiments, the generalization performance is achieved after a very small number of iterations. Most often, the performance beyond this optimum deteriorates just as fast.\ref{} We did not find any robust heuristic or metric to estimate the best iteration or a convergence criterion. As such, we rely on validation performance to perform early stopping which becomes mandatory in this regime. Although using smaller learning rates lead us back to more familiar patterns \ref{}, with more iterations required before reaching the optimum and a smoother and "safer" behavior, it came at the cost of worst performance and much longer training time \ref{}. This last point was to be expected since run-time scales linearly with the number of iterations. As we will see below, smoothing the prediction using ensemble methods proved more cost effective in term of run-time and performance. Note that these findings hold especially true for the most shallow architectures, while the behavior gradually falls back to the classical pattern when stacking additional layers. Figure \ref{} shows that the appropriate learning rate is smaller for deeper architectures, while, in turn, the optimal iteration comes later. \paragraph{Scalability.} In terms of scalability, we saw that the main bottle-neck is the GPU VRAM size, which at current trend should increase gradually over the years. The runtime per iteration is almost constant since it depends mostly on width, depth, batch-size and number of permutations which are either fix or bounded (for batch-size), and independent from the dataset size or shape. Meanwhile, the appropriate number of iterations increases mainly with the depth of the network, and as such, we can set a single value of $max_iter$ for each depth. It follows that, number of iterations and runtime per iterations depend mostly on network depth, and are almost constant with regards to the number of samples and features. \textcolor{red}{ Inclure graph avec very large datasets $n\approx 55M$ gives } \subsection{Dependance Row Tables} \section{Compared methods and selected hyperparameters} \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|l|l|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \paragraph{Selected architectures for \texttt{\,MLR $\,$}{} and {\texttt{FFNN}}{}. } In view of the above findings, we only varied the depth of the network when testing our method. That is, we did not perform any hyperparameter tuning for the benchmark. For each depth we picked a fixed appropriate value for learning rate and max iteration. All the other aforementioned hyperparameters were set to a constant value across all experiments. Table \ref{tab:architectures1} details these choices. \paragraph{Bagging and ensemble for \texttt{\,MLR $\,$}{} and {\texttt{FFNN}}{}.} The previous findings motivated us to also try using bagging, as the shallow networks exhibit high variance. To mitigate this, we train concurrently $10$ networks with different random train/valid split and weight initialization and average the output of the networks to yield a prediction. We will see in Section \ref{} that it significantly improves performance while also multiplying runtime by $10$. We called ${\texttt{Bag-MLR1}}$ and ${\texttt{Bag-MLR2}}$ these bagging estimators with each containing $10$ instances of ${\texttt{MLR$\textapprox$1}} $ and $ {\texttt{MLR$\textapprox$2}}$ networks respectively (architectures we just defined in Table \ref{tab:tab:MLRmethods}. Since our implementation is compatible with the scikit learn API, we used their implementation of Bagging. Finally, we also decided to build an ensemble estimator by aggregating networks of varying depth. We call {\texttt{Ens-MLR}}{} the estimator which contains $5$ instances of {\texttt{MLR$\textapprox$1}}, $5$ instances of {\texttt{MLR$\textapprox$2}} and $5$ instances of {\texttt{MLR$\textapprox$3}}, averaging the output of these $15$ networks to yield a prediction. \textcolor{red}{Ajouter un graphe et une explication pour la valeur 30 du bagging} \paragraph{Benchmark methods.} We picked $19$ methods to compare ourselves with. See Table \ref{tab:method} for the exhaustive list. For each \texttt{\,MLR $\,$} architecture and ensemble, we also ran a standard {\texttt{FFNN}}{} with the identical settings (directly coded in pytorch). We used \textcolor{red}{$value$} methods implemented in the scikit-learn library, including all the previously mentionned benchmarked methods. Finally we added the freely available py-earth implementation which emulates MARS. Note that besides the aforementionned standard FFNN and the multilayer perceptron implemented in scikit learn, we did not run the complete benchmark for any of the methods mentionned in section \ref{}(Intro) We did try initially to include SELU and Fastai Tabular but even those felt short for datasets in this range, as the scikit-learn multi-layer perceptron implementation outperformed them in both runtime and result. We also only used xgb from scikit-learn, and not xgboost and CAT-BOOST. These would probably get even better results than xgb for our largest datasets after a little bit of tuning. Likewise, we could get even better results by fine-tuning \texttt{\,MLR $\,$} and combining it with other deep learning regularization schemes but this would lead us outside of the scope of this benchmark and this paper. Also, we did not include kernel methods such as Nystr\"om in our benchmark since they can be used as feature engineering in combination with all other methods. Again, bear in mind that we did not use any data-enhancing techniques, nor manually tuned any method for any datasets, we aimed to compare the different methods not improve across all datasets not beat their respective leader-boards. \begin{table}[H] \caption{List of methods with their tuning grid} \label{tab:ComparedMethod} \centering \begin{tabular}{|c|c|c|} \hline Method & hyperparameters & tuning grid \\ \hline {\texttt{Ens-MLR}} & \textbf{?} & \\ \hline {\texttt{RF}} & \textbf{?} & \\ \hline {\texttt{XGB}} & \textbf{?} & \\ \hline {\texttt{XRF}} & \textbf{?} & \\ \hline {\texttt{MLP}} & \textbf{?} & \\ \hline {\texttt{NN}{}}-1 & \textbf{?} & \\ \hline {\texttt{NN}{}}-2 & \textbf{?} & \\ \hline {\texttt{NN}{}}-3 & \textbf{?} & \\ \hline \texttt{Kernels} & \textbf{?} & \\ \hline {\texttt{MARS}} & \textbf{?} & \\ \hline {\texttt{CART}} & \textbf{?} & \\ \hline $\nu$-{\texttt{SVM}} & \textbf{?} & \\ \hline {\texttt{Ridge}} & \textbf{?} & \\ \hline \texttt{Lasso} & \textbf{?} & \\ \hline {\texttt{Elastic-Net}} & \textbf{?} & \\ \hline \texttt{Intercept} & \textbf{?} & \\ \hline \end{tabular} \end{table} \subsection{Overall Performance comparisons} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods} (Table \ref{tab:}), with a mean $R^2$-score of $0.60$ on the whole benchmark. It beats all the others not only in mean, but \textbf{also in rank}, with a mean Friedman Rank of $\textcolor{purple}{Value}$, far above the next best method, at $\textcolor{purple}{Value}$. Surprisingly, it ranks first only on $6$ out of the $21$ datasets. Likewise, it only ranks in third in terms of median $R^2$-score. This discrepancy between its excellent mean performance and Friedman rank on the one hand, and median and number of times it achieves top ranking on the other hand also indicates a clear pattern. \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like R.F. which are often deemed the safest pick. As revealed by its $P90$ and $P95$ statistics (at $\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively in Table \ref{tab:}), \texttt{\,MLR $\,$}{} actually almost never "loses" to the best method by a lot. \textbf{Another important take-away fact is that \texttt{\,MLR $\,$}{} ranks in the top three on $18$ out of the $21$ datasets, on top of being the best in average.} Indeed, the next best method, R.F., as expected from \cite{fernandez2014we} comes three points behind the best \texttt{\,MLR $\,$}{} method, with a mean $R^2$-score of $0.57$. Although the median performance for R.F., at $\textcolor{purple}{Value}$ is slightly above \texttt{\,MLR $\,$}{} (at $\textcolor{purple}{Value}$), as a whole their performance are less robust, as revealed by the minimum and Q05 values ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively). Meanwhile, \texttt{\,MLR $\,$}{} only fails by ($\textcolor{purple}{Value}$ and $\textcolor{purple}{Value}$ respectively) in the worst cases. Also, when R.F. do not fail spectacularly they usually come close behind \texttt{\,MLR $\,$}{}, the gap is consistent across seeds, as statistical confidence is reached for $\textcolor{purple}{Value}$ of the $\textcolor{purple}{Value}$ datasets. Note also that R.F. beat \texttt{\,MLR $\,$}{} on $8$ datasets out of $21$, but only with statistical confidence for $\textcolor{purple}{Value}$ datasets. Likewise, when R.F. beat \texttt{\,MLR $\,$}{}, the average gap is only $\textcolor{purple}{Value}$. But when R.F. are beaten by \texttt{\,MLR $\,$}{}, then the average gap is $\textcolor{purple}{Value}$. The only other notable contender is Xgboost which achieves a mean $R^2$-score of only $0.54$ over the whole benchmark. Xgboost is the only method which significantly beats MLR, on one dataset only: $Kaggle_2$ where it achieves $\textcolor{purple}{Value} (0.6)$, quite above \texttt{\,MLR $\,$}{}, at $\textcolor{purple}{Value} 0.4$. On $4$ other datasets, it also scores very marginally above \texttt{\,MLR $\,$}{}, although without statistical confidence. On the other $16$ datasets in our benchmark, Xgboost's results are far less consistent, as it performs a little bit worse than \texttt{\,MLR $\,$}{} on $\textcolor{purple}{Value}$ datasets and fails spectacularly on $\textcolor{purple}{Value}$ datasets, which corroborates its Q10 value of $\textcolor{purple}{Value}$). Another interesting finding is how positively correlated xgb's performances are with the size of the dataset (with a spearman correlation of $\textcolor{purple}{Value}$), as it really only starts getting competitive when $n$ gets above $311$. \textbf{Meanwhile there is not a single dataset in our benchmark with less than $779$ observations where \texttt{\,MLR $\,$}{} is not in the top three.} In agreement with \cite{fernandez2014we}, the other methods that sometimes achieve noticeable performances are MARS and Nu-SVM, although they are far behind the three aforementioned methods in all measured metrics. Note that even without using bagging, our method still ranks above R.F. and all others, at $0.58$. The addition of bagging to \texttt{\,MLR $\,$}{} improves performances, albeit marginally in average, very consistently (in $18$ out of the $21$ cases) and with a very high statistical confidence according to the Mann-Whitney test. Likewise, using an ensemble of \texttt{\,MLR $\,$}{} networks of varying depths (from one to three layers) produces results that never fall far behind the best of these three architectures. As a matter of fact it loses by only $\textcolor{purple}{Value}$ in average R2 to best suited architecture in the $17$ cases where it does. Likewise, it only outperforms the most appropriate architecture by $\textcolor{purple}{Value}$ in the $4$ other cases. However, in all cases, it outperforms the least well-suited architecture by at least $\textcolor{purple}{Value}$. This indicates that aggregating \texttt{\,MLR $\,$}{} neural networks of different depths yields models that reliably mimic the performances of the architecture best-suited for the specific dataset at hand. This last empirical observation leads to the discovery of another very interesting property of \texttt{\,MLR $\,$}{} neural networks. First recall that in section \ref{}, we found that \texttt{\,MLR $\,$}{} eliminates the need to choose a specific width\ref{}, can automatically adapt the choice of the initial regularization parameter\ref{} to the dataset at hand and requires no tuning for the number of permutations and the level of noise applied on the target\ref{}. Likewise, the appropriate learning rate mostly depends on the depth of the network, and as such, can simply be pick by following a straightforward heuristic (see Section \ref{}). The only meaningful requirement left to get the best out of \texttt{\,MLR $\,$}{}\footnote{Putting aside all the other popular training and regularization schemes that could be combined with MLR to achieve even better results.} is the depth of the network. Although the appropriate depth is somewhat weakly correlated with the size of the considered dataset, it remains an impactful decision\footnote{As our dataset by dataset results \ref{} clearly shows}. And yet, we just found that this difficulty can mostly be alleviated by a simple aggregation of architectures of different depths. \textcolor{red}{ Il faut faire la Table \ref{tab:perf_rank} pour les performances avec MLR:} \begin{table*}[!hp] \centering \resizebox{\columnwidth}{!}{% \renewcommand{\arraystretch}{1.5} \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average Accuracy & P90 & P95 & PMA \\ \hline Bagging MLR & \textbf{?} & \textbf{81.95\%$\pm$14.10\%} & \textbf{88.89\%} & \textbf{72.22\%} & \textbf{95.72\% $\pm$5.17\%} \\ \hline NN (Xavier init) & ? & 80.88\%$\pm$14.96\% & 81.11\% & 65.56\% & 94.34\% $\pm$7.22\% \\ \hline RF & ? & ?\% $\pm$13.90\% & 85.56\% & 67.78\% & 95.25\% $\pm$5.30\% \\ \hline linear SVM & ? & ?\% $\pm$ 15.09\% & 85.56\% & \textbf{72.22\%} & ?\% $\pm$8.22\% \\ \hline xgb & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline MARS & ? & 78.21\% $\pm$ 20.30\% & 80.00\% & 62.22\% & ?\% $\pm$18.05\% \\ \hline \end{tabular} } \label{tab:perf_rank} \caption{Comparisons of 21 methods on the UCI datasets. P90/P95: the number of datasets a model achieves 90\%/95\% or more of the maximum test $R^2$-score, divided by the total number of datasets. PMA: average percentage of the maximum test $R^2$-score. } \end{table*} \begin{table} \caption[Comparison of FNN methods on all 121 UCI data sets.]{Comparison of FNN methods on all 121 UCI data sets.. The table reports the accuracy of FNN methods at each individual task of the 121 UCI data sets. The first column gives the name of the data set, the second the number of training data points $N$, the third the number of features $M$ and the consecutive columns the accuracy values of self-normalizing networks (SNNs), ReLU networks without normalization and with MSRA initialization (MS), Highway networks (HW), Residual Networks (ResNet), networks with batch normalization (BN), weight normalization (WN), and layer normalization (LN).} \label{tab:UCIfull} \footnotesize \begin{tabular}{lrrlllllll} \toprule dataset & $N$ & $M$ & SNN & MS & HW & ResNet & BN & WN & LN\tabularnewline \midrule abalone & 4177 & 9 & 0.6657 & 0.6284 & 0.6427 & 0.6466 & 0.6303 & 0.6351 & 0.6178\tabularnewline acute-inflammation & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9000\tabularnewline acute-nephritis & 120 & 7 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 1.0000\tabularnewline adult & 48842 & 15 & 0.8476 & 0.8487 & 0.8453 & 0.8484 & 0.8499 & 0.8453 & 0.8517\tabularnewline annealing & 898 & 32 & 0.7600 & 0.7300 & 0.3600 & 0.2600 & 0.1200 & 0.6500 & 0.5000\tabularnewline arrhythmia & 452 & 263 & 0.6549 & 0.6372 & 0.6283 & 0.6460 & 0.5929 & 0.6018 & 0.5752\tabularnewline audiology-std & 196 & 60 & 0.8000 & 0.6800 & 0.7200 & 0.8000 & 0.6400 & 0.7200 & 0.8000\tabularnewline balance-scale & 625 & 5 & 0.9231 & 0.9231 & 0.9103 & 0.9167 & 0.9231 & 0.9551 & 0.9872\tabularnewline balloons & 16 & 5 & 1.0000 & 0.5000 & 0.2500 & 1.0000 & 1.0000 & 0.0000 & 0.7500\tabularnewline bank & 4521 & 17 & 0.8903 & 0.8876 & 0.8885 & 0.8796 & 0.8823 & 0.8850 & 0.8920\tabularnewline blood & 748 & 5 & 0.7701 & 0.7754 & 0.7968 & 0.8021 & 0.7647 & 0.7594 & 0.7112\tabularnewline breast-cancer & 286 & 10 & 0.7183 & 0.6901 & 0.7465 & 0.7465 & 0.7324 & 0.6197 & 0.6620\tabularnewline breast-cancer-wisc & 699 & 10 & 0.9714 & 0.9714 & 0.9771 & 0.9714 & 0.9829 & 0.9657 & 0.9714\tabularnewline breast-cancer-wisc-diag & 569 & 31 & 0.9789 & 0.9718 & 0.9789 & 0.9507 & 0.9789 & 0.9718 & 0.9648\tabularnewline breast-cancer-wisc-prog & 198 & 34 & 0.6735 & 0.7347 & 0.8367 & 0.8163 & 0.7755 & 0.8367 & 0.7959\tabularnewline breast-tissue & 106 & 10 & 0.7308 & 0.4615 & 0.6154 & 0.4231 & 0.4615 & 0.5385 & 0.5769\tabularnewline car & 1728 & 7 & 0.9838 & 0.9861 & 0.9560 & 0.9282 & 0.9606 & 0.9769 & 0.9907\tabularnewline cardiotocography-10clases & 2126 & 22 & 0.8399 & 0.8418 & 0.8456 & 0.8173 & 0.7910 & 0.8606 & 0.8362\tabularnewline cardiotocography-3clases & 2126 & 22 & 0.9153 & 0.8964 & 0.9171 & 0.9021 & 0.9096 & 0.8945 & 0.9021\tabularnewline chess-krvk & 28056 & 7 & 0.8805 & 0.8606 & 0.5255 & 0.8543 & 0.8781 & 0.7673 & 0.8938\tabularnewline chess-krvkp & 3196 & 37 & 0.9912 & 0.9900 & 0.9900 & 0.9912 & 0.9862 & 0.9912 & 0.9875\tabularnewline congressional-voting & 435 & 17 & 0.6147 & 0.6055 & 0.5872 & 0.5963 & 0.5872 & 0.5872 & 0.5780\tabularnewline conn-bench-sonar-mines-rocks & 208 & 61 & 0.7885 & 0.8269 & 0.8462 & 0.8077 & 0.7115 & 0.8269 & 0.6731\tabularnewline conn-bench-vowel-deterding & 990 & 12 & 0.9957 & 0.9935 & 0.9784 & 0.9935 & 0.9610 & 0.9524 & 0.9935\tabularnewline connect-4 & 67557 & 43 & 0.8807 & 0.8831 & 0.8599 & 0.8716 & 0.8729 & 0.8833 & 0.8856\tabularnewline contrac & 1473 & 10 & 0.5190 & 0.5136 & 0.5054 & 0.5136 & 0.4538 & 0.4755 & 0.4592\tabularnewline credit-approval & 690 & 16 & 0.8430 & 0.8430 & 0.8547 & 0.8430 & 0.8721 & 0.9070 & 0.8547\tabularnewline cylinder-bands & 512 & 36 & 0.7266 & 0.7656 & 0.7969 & 0.7734 & 0.7500 & 0.7578 & 0.7578\tabularnewline dermatology & 366 & 35 & 0.9231 & 0.9121 & 0.9780 & 0.9231 & 0.9341 & 0.9451 & 0.9451\tabularnewline echocardiogram & 131 & 11 & 0.8182 & 0.8485 & 0.6061 & 0.8485 & 0.8485 & 0.7879 & 0.8182\tabularnewline ecoli & 336 & 8 & 0.8929 & 0.8333 & 0.8690 & 0.8214 & 0.8214 & 0.8452 & 0.8571\tabularnewline energy-y1 & 768 & 9 & 0.9583 & 0.9583 & 0.8802 & 0.8177 & 0.8646 & 0.9010 & 0.9479\tabularnewline energy-y2 & 768 & 9 & 0.9063 & 0.8958 & 0.9010 & 0.8750 & 0.8750 & 0.8906 & 0.8802\tabularnewline fertility & 100 & 10 & 0.9200 & 0.8800 & 0.8800 & 0.8400 & 0.6800 & 0.6800 & 0.8800\tabularnewline flags & 194 & 29 & 0.4583 & 0.4583 & 0.4375 & 0.3750 & 0.4167 & 0.4167 & 0.3542\tabularnewline glass & 214 & 10 & 0.7358 & 0.6038 & 0.6415 & 0.6415 & 0.5849 & 0.6792 & 0.6981\tabularnewline haberman-survival & 306 & 4 & 0.7368 & 0.7237 & 0.6447 & 0.6842 & 0.7368 & 0.7500 & 0.6842\tabularnewline hayes-roth & 160 & 4 & 0.6786 & 0.4643 & 0.7857 & 0.7143 & 0.7500 & 0.5714 & 0.8929\tabularnewline heart-cleveland & 303 & 14 & 0.6184 & 0.6053 & 0.6316 & 0.5658 & 0.5789 & 0.5658 & 0.5789\tabularnewline heart-hungarian & 294 & 13 & 0.7945 & 0.8356 & 0.7945 & 0.8082 & 0.8493 & 0.7534 & 0.8493\tabularnewline heart-switzerland & 123 & 13 & 0.3548 & 0.3871 & 0.5806 & 0.3226 & 0.3871 & 0.2581 & 0.5161\tabularnewline heart-va & 200 & 13 & 0.3600 & 0.2600 & 0.4000 & 0.2600 & 0.2800 & 0.2200 & 0.2400\tabularnewline hepatitis & 155 & 20 & 0.7692 & 0.7692 & 0.6667 & 0.7692 & 0.8718 & 0.8462 & 0.7436\tabularnewline hill-valley & 1212 & 101 & 0.5248 & 0.5116 & 0.5000 & 0.5396 & 0.5050 & 0.4934 & 0.5050\tabularnewline horse-colic & 368 & 26 & 0.8088 & 0.8529 & 0.7794 & 0.8088 & 0.8529 & 0.7059 & 0.7941\tabularnewline ilpd-indian-liver & 583 & 10 & 0.6986 & 0.6644 & 0.6781 & 0.6712 & 0.5959 & 0.6918 & 0.6986\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} image-segmentation & 2310 & 19 & 0.9114 & 0.9090 & 0.9024 & 0.8919 & 0.8481 & 0.8938 & 0.8838\tabularnewline ionosphere & 351 & 34 & 0.8864 & 0.9091 & 0.9432 & 0.9545 & 0.9432 & 0.9318 & 0.9432\tabularnewline iris & 150 & 5 & 0.9730 & 0.9189 & 0.8378 & 0.9730 & 0.9189 & 1.0000 & 0.9730\tabularnewline led-display & 1000 & 8 & 0.7640 & 0.7200 & 0.7040 & 0.7160 & 0.6280 & 0.6920 & 0.6480\tabularnewline lenses & 24 & 5 & 0.6667 & 1.0000 & 1.0000 & 0.6667 & 0.8333 & 0.8333 & 0.6667\tabularnewline letter & 20000 & 17 & 0.9726 & 0.9712 & 0.8984 & 0.9762 & 0.9796 & 0.9580 & 0.9742\tabularnewline libras & 360 & 91 & 0.7889 & 0.8667 & 0.8222 & 0.7111 & 0.7444 & 0.8000 & 0.8333\tabularnewline low-res-spect & 531 & 101 & 0.8571 & 0.8496 & 0.9023 & 0.8647 & 0.8571 & 0.8872 & 0.8947\tabularnewline lung-cancer & 32 & 57 & 0.6250 & 0.3750 & 0.1250 & 0.2500 & 0.5000 & 0.5000 & 0.2500\tabularnewline lymphography & 148 & 19 & 0.9189 & 0.7297 & 0.7297 & 0.6757 & 0.7568 & 0.7568 & 0.7838\tabularnewline magic & 19020 & 11 & 0.8692 & 0.8629 & 0.8673 & 0.8723 & 0.8713 & 0.8690 & 0.8620\tabularnewline mammographic & 961 & 6 & 0.8250 & 0.8083 & 0.7917 & 0.7833 & 0.8167 & 0.8292 & 0.8208\tabularnewline miniboone & 130064 & 51 & 0.9307 & 0.9250 & 0.9270 & 0.9254 & 0.9262 & 0.9272 & 0.9313\tabularnewline molec-biol-promoter & 106 & 58 & 0.8462 & 0.7692 & 0.6923 & 0.7692 & 0.7692 & 0.6923 & 0.4615\tabularnewline molec-biol-splice & 3190 & 61 & 0.9009 & 0.8482 & 0.8833 & 0.8557 & 0.8519 & 0.8494 & 0.8607\tabularnewline monks-1 & 556 & 7 & 0.7523 & 0.6551 & 0.5833 & 0.7546 & 0.9074 & 0.5000 & 0.7014\tabularnewline monks-2 & 601 & 7 & 0.5926 & 0.6343 & 0.6389 & 0.6273 & 0.3287 & 0.6644 & 0.5162\tabularnewline monks-3 & 554 & 7 & 0.6042 & 0.7454 & 0.5880 & 0.5833 & 0.5278 & 0.5231 & 0.6991\tabularnewline mushroom & 8124 & 22 & 1.0000 & 1.0000 & 1.0000 & 1.0000 & 0.9990 & 0.9995 & 0.9995\tabularnewline musk-1 & 476 & 167 & 0.8739 & 0.8655 & 0.8992 & 0.8739 & 0.8235 & 0.8992 & 0.8992\tabularnewline musk-2 & 6598 & 167 & 0.9891 & 0.9945 & 0.9915 & 0.9964 & 0.9982 & 0.9927 & 0.9951\tabularnewline nursery & 12960 & 9 & 0.9978 & 0.9988 & 1.0000 & 0.9994 & 0.9994 & 0.9966 & 0.9966\tabularnewline oocytes\_merluccius\_nucleus\_4d & 1022 & 42 & 0.8235 & 0.8196 & 0.7176 & 0.8000 & 0.8078 & 0.8078 & 0.7686\tabularnewline oocytes\_merluccius\_states\_2f & 1022 & 26 & 0.9529 & 0.9490 & 0.9490 & 0.9373 & 0.9333 & 0.9020 & 0.9412\tabularnewline oocytes\_trisopterus\_nucleus\_2f & 912 & 26 & 0.7982 & 0.8728 & 0.8289 & 0.7719 & 0.7456 & 0.7939 & 0.8202\tabularnewline oocytes\_trisopterus\_states\_5b & 912 & 33 & 0.9342 & 0.9430 & 0.9342 & 0.8947 & 0.8947 & 0.9254 & 0.8991\tabularnewline optical & 5620 & 63 & 0.9711 & 0.9666 & 0.9644 & 0.9627 & 0.9716 & 0.9638 & 0.9755\tabularnewline ozone & 2536 & 73 & 0.9700 & 0.9732 & 0.9716 & 0.9669 & 0.9669 & 0.9748 & 0.9716\tabularnewline page-blocks & 5473 & 11 & 0.9583 & 0.9708 & 0.9656 & 0.9605 & 0.9613 & 0.9730 & 0.9708\tabularnewline parkinsons & 195 & 23 & 0.8980 & 0.9184 & 0.8367 & 0.9184 & 0.8571 & 0.8163 & 0.8571\tabularnewline pendigits & 10992 & 17 & 0.9706 & 0.9714 & 0.9671 & 0.9708 & 0.9734 & 0.9620 & 0.9657\tabularnewline pima & 768 & 9 & 0.7552 & 0.7656 & 0.7188 & 0.7135 & 0.7188 & 0.6979 & 0.6927\tabularnewline pittsburg-bridges-MATERIAL & 106 & 8 & 0.8846 & 0.8462 & 0.9231 & 0.9231 & 0.8846 & 0.8077 & 0.9231\tabularnewline pittsburg-bridges-REL-L & 103 & 8 & 0.6923 & 0.7692 & 0.6923 & 0.8462 & 0.7692 & 0.6538 & 0.7308\tabularnewline pittsburg-bridges-SPAN & 92 & 8 & 0.6957 & 0.5217 & 0.5652 & 0.5652 & 0.5652 & 0.6522 & 0.6087\tabularnewline pittsburg-bridges-T-OR-D & 102 & 8 & 0.8400 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800 & 0.8800\tabularnewline pittsburg-bridges-TYPE & 105 & 8 & 0.6538 & 0.6538 & 0.5385 & 0.6538 & 0.1154 & 0.4615 & 0.6538\tabularnewline planning & 182 & 13 & 0.6889 & 0.6667 & 0.6000 & 0.7111 & 0.6222 & 0.6444 & 0.6889\tabularnewline plant-margin & 1600 & 65 & 0.8125 & 0.8125 & 0.8375 & 0.7975 & 0.7600 & 0.8175 & 0.8425\tabularnewline plant-shape & 1600 & 65 & 0.7275 & 0.6350 & 0.6325 & 0.5150 & 0.2850 & 0.6575 & 0.6775\tabularnewline plant-texture & 1599 & 65 & 0.8125 & 0.7900 & 0.7900 & 0.8000 & 0.8200 & 0.8175 & 0.8350\tabularnewline post-operative & 90 & 9 & 0.7273 & 0.7273 & 0.5909 & 0.7273 & 0.5909 & 0.5455 & 0.7727\tabularnewline primary-tumor & 330 & 18 & 0.5244 & 0.5000 & 0.4512 & 0.3902 & 0.5122 & 0.5000 & 0.4512\tabularnewline ringnorm & 7400 & 21 & 0.9751 & 0.9843 & 0.9692 & 0.9811 & 0.9843 & 0.9719 & 0.9827\tabularnewline seeds & 210 & 8 & 0.8846 & 0.8654 & 0.9423 & 0.8654 & 0.8654 & 0.8846 & 0.8846\tabularnewline semeion & 1593 & 257 & 0.9196 & 0.9296 & 0.9447 & 0.9146 & 0.9372 & 0.9322 & 0.9447\tabularnewline soybean & 683 & 36 & 0.8511 & 0.8723 & 0.8617 & 0.8670 & 0.8883 & 0.8537 & 0.8484\tabularnewline spambase & 4601 & 58 & 0.9409 & 0.9461 & 0.9435 & 0.9461 & 0.9426 & 0.9504 & 0.9513\tabularnewline spect & 265 & 23 & 0.6398 & 0.6183 & 0.6022 & 0.6667 & 0.6344 & 0.6398 & 0.6720\tabularnewline spectf & 267 & 45 & 0.4973 & 0.6043 & 0.8930 & 0.7005 & 0.2299 & 0.4545 & 0.5561\tabularnewline statlog-australian-credit & 690 & 15 & 0.5988 & 0.6802 & 0.6802 & 0.6395 & 0.6802 & 0.6860 & 0.6279\tabularnewline statlog-german-credit & 1000 & 25 & 0.7560 & 0.7280 & 0.7760 & 0.7720 & 0.7520 & 0.7400 & 0.7400\tabularnewline \end{tabular} \end{table} \begin{table} \footnotesize \begin{tabular}{lrrlllllll} statlog-heart & 270 & 14 & 0.9254 & 0.8358 & 0.7761 & 0.8657 & 0.7910 & 0.8657 & 0.7910\tabularnewline statlog-image & 2310 & 19 & 0.9549 & 0.9757 & 0.9584 & 0.9584 & 0.9671 & 0.9515 & 0.9757\tabularnewline statlog-landsat & 6435 & 37 & 0.9100 & 0.9075 & 0.9110 & 0.9055 & 0.9040 & 0.8925 & 0.9040\tabularnewline statlog-shuttle & 58000 & 10 & 0.9990 & 0.9983 & 0.9977 & 0.9992 & 0.9988 & 0.9988 & 0.9987\tabularnewline statlog-vehicle & 846 & 19 & 0.8009 & 0.8294 & 0.7962 & 0.7583 & 0.7583 & 0.8009 & 0.7915\tabularnewline steel-plates & 1941 & 28 & 0.7835 & 0.7567 & 0.7608 & 0.7629 & 0.7031 & 0.7856 & 0.7588\tabularnewline synthetic-control & 600 & 61 & 0.9867 & 0.9800 & 0.9867 & 0.9600 & 0.9733 & 0.9867 & 0.9733\tabularnewline teaching & 151 & 6 & 0.5000 & 0.6053 & 0.5263 & 0.5526 & 0.5000 & 0.3158 & 0.6316\tabularnewline thyroid & 7200 & 22 & 0.9816 & 0.9770 & 0.9708 & 0.9799 & 0.9778 & 0.9807 & 0.9752\tabularnewline tic-tac-toe & 958 & 10 & 0.9665 & 0.9833 & 0.9749 & 0.9623 & 0.9833 & 0.9707 & 0.9791\tabularnewline titanic & 2201 & 4 & 0.7836 & 0.7909 & 0.7927 & 0.7727 & 0.7800 & 0.7818 & 0.7891\tabularnewline trains & 10 & 30 & NA & NA & NA & NA & 0.5000 & 0.5000 & 1.0000\tabularnewline twonorm & 7400 & 21 & 0.9805 & 0.9778 & 0.9708 & 0.9735 & 0.9757 & 0.9730 & 0.9724\tabularnewline vertebral-column-2clases & 310 & 7 & 0.8312 & 0.8701 & 0.8571 & 0.8312 & 0.8312 & 0.6623 & 0.8442\tabularnewline vertebral-column-3clases & 310 & 7 & 0.8312 & 0.8052 & 0.7922 & 0.7532 & 0.7792 & 0.7403 & 0.8312\tabularnewline wall-following & 5456 & 25 & 0.9098 & 0.9076 & 0.9230 & 0.9223 & 0.9333 & 0.9274 & 0.9128\tabularnewline waveform & 5000 & 22 & 0.8480 & 0.8312 & 0.8320 & 0.8360 & 0.8360 & 0.8376 & 0.8448\tabularnewline waveform-noise & 5000 & 41 & 0.8608 & 0.8328 & 0.8696 & 0.8584 & 0.8480 & 0.8640 & 0.8504\tabularnewline wine & 178 & 14 & 0.9773 & 0.9318 & 0.9091 & 0.9773 & 0.9773 & 0.9773 & 0.9773\tabularnewline wine-quality-red & 1599 & 12 & 0.6300 & 0.6250 & 0.5625 & 0.6150 & 0.5450 & 0.5575 & 0.6100\tabularnewline wine-quality-white & 4898 & 12 & 0.6373 & 0.6479 & 0.5564 & 0.6307 & 0.5335 & 0.5482 & 0.6544\tabularnewline yeast & 1484 & 9 & 0.6307 & 0.6173 & 0.6065 & 0.5499 & 0.4906 & 0.5876 & 0.6092\tabularnewline zoo & 101 & 17 & 0.9200 & 1.0000 & 0.8800 & 1.0000 & 0.7200 & 0.9600 & 0.9600\tabularnewline \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on small UCI data sets]{UCI comparison reporting the average rank of a method on 75 classification task of the UCI machine learning repository with less than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked third having been outperformed by Random Forests and SVMs. \label{tab:uciS1}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SVM & LibSVM\_weka & 9.3 &\\ RandomForest & RRFglobal\_caret & 9.6 & 2.5e-01 \\ SNN & SNN & 9.6 & 3.8e-01 \\ LMR & SimpleLogistic\_weka & 9.9 & 1.5e-01 \\ NeuralNetworks & lvq\_caret & 10.1 & 1.0e-01 \\ MARS & gcvEarth\_caret & 10.7 & 3.6e-02 \\ MSRAinit & MSRAinit & 11.0 & 4.0e-02 \\ LayerNorm & LayerNorm & 11.3 & 7.2e-02 \\ Highway & Highway & 11.5 & 8.9e-03 \\ DiscriminantAnalysis & mda\_R & 11.8 & 2.6e-03 \\ Boosting & LogitBoost\_weka & 11.9 & 2.4e-02 \\ Bagging & ctreeBag\_R & 12.1 & 1.8e-03 \\ ResNet & ResNet & 12.3 & 3.5e-03 \\ BatchNorm & BatchNorm & 12.6 & 4.9e-04 \\ Rule-based & JRip\_caret & 12.9 & 1.7e-04 \\ WeightNorm & WeightNorm & 13.0 & 8.3e-05 \\ DecisionTree & rpart2\_caret & 13.6 & 7.0e-04 \\ OtherEnsembles & Dagging\_weka & 13.9 & 3.0e-05 \\ Nearest Neighbour & NNge\_weka & 14.0 & 7.7e-04 \\ OtherMethods & pam\_caret & 14.2 & 1.5e-04 \\ PLSR & simpls\_R & 14.3 & 4.6e-05 \\ Bayesian & NaiveBayes\_weka & 14.6 & 1.2e-04 \\ GLM & bayesglm\_caret & 15.0 & 1.6e-06 \\ Stacking & Stacking\_weka & 20.9 & 2.2e-12 \\ \bottomrule \end{tabular} \end{table} \begin{table}[ht] \caption[Method comparison on large UCI data sets]{UCI comparison reporting the average rank of a method on 46 classification task of the UCI machine learning repository with more than 1000 data points. For each dataset, the 24 compared methods, were ranked by their accuracy and the ranks were averaged across the tasks. The first column gives the method group, the second the method, the third the average rank , and the last the $p$-value of a paired Wilcoxon test whether the difference to the best performing method is significant. SNNs are ranked first having outperformed diverse machine learning methods and other FNNs. \label{tab:uciS2}} \centering \begin{tabular}{llrr} \toprule methodGroup & method & avg. rank & $p$-value \\ \midrule SNN & SNN & 5.8 & \\ SVM & LibSVM\_weka & 6.1 & 5.8e-01 \\ RandomForest & RRFglobal\_caret & 6.6 & 2.1e-01 \\ MSRAinit & MSRAinit & 7.1 & 4.5e-03 \\ LayerNorm & LayerNorm & 7.2 & 7.1e-02 \\ Highway & Highway & 7.9 & 1.7e-03 \\ ResNet & ResNet & 8.4 & 1.7e-04 \\ WeightNorm & WeightNorm & 8.7 & 5.5e-04 \\ BatchNorm & BatchNorm & 9.7 & 1.8e-04 \\ MARS & gcvEarth\_caret & 9.9 & 8.2e-05 \\ Boosting & LogitBoost\_weka & 12.1 & 2.2e-07 \\ LMR & SimpleLogistic\_weka & 12.4 & 3.8e-09 \\ Rule-based & JRip\_caret & 12.4 & 9.0e-08 \\ Bagging & ctreeBag\_R & 13.5 & 1.6e-05 \\ DiscriminantAnalysis & mda\_R & 13.9 & 1.4e-10 \\ Nearest Neighbour & NNge\_weka & 14.1 & 1.6e-10 \\ DecisionTree & rpart2\_caret & 15.5 & 2.3e-08 \\ OtherEnsembles & Dagging\_weka & 16.1 & 4.4e-12 \\ NeuralNetworks & lvq\_caret & 16.3 & 1.6e-12 \\ Bayesian & NaiveBayes\_weka & 17.9 & 1.6e-12 \\ OtherMethods & pam\_caret & 18.3 & 2.8e-14 \\ GLM & bayesglm\_caret & 18.7 & 1.5e-11 \\ PLSR & simpls\_R & 19.0 & 3.4e-11 \\ Stacking & Stacking\_weka & 22.5 & 2.8e-14 \\ \bottomrule \end{tabular} \end{table} \section{\texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{} Implementation} \subsection{Algorithms} \textcolor{red}{detail backpropagate.} \subsection{Inversion GPU, paralellization, set up} \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ (see Table~\ref{tab:hyp1}) for all the datasets in our benchmark. Therefore, $T$ is \textbf{not an hyperparameter} (see Table ???). Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. \\ The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. \textcolor{red}{We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is not costly as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix}. In addition, matrix inverse differentiates well in torch or tensorflow. Parallelization is also used when we multiply $\textbf{H}$ by the matrix ${\textbf{Perm}}(\textbf{Y})$ instead of vector $\textbf{Y}$. So the addition of the permuted term is also quite benign.} \\ \bibliographystyle{plain} \section{Benchmark datasets} Table \ref{tab:datasets} gather the datasets information. \begin{table} \caption{Benchmark datasets. \# Num. and \# Cat. denote the initial number of numerical and categorical features respectively. We denote by $d$ the number of features after the pre-processing and one-hot encoding.} \label{tab:datasets} \footnotesize \scalebox{0.75}{ \begin{tabular}{|l|c|c|c|c|c|c|l|} \hline Description & Task & $n$ & $d$ & \# Num. & \# Cat. & Field & Link \\ \hline \hline Concrete Slump Test -2 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0 $ & Construction Materials& \href{https://archive.ics.uci.edu/ml/datasets/Concrete+Slump+Test}{UCI: click here}\\ \hline Concrete Slump Test -3 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0 $ & Construction Materials& \href{https://archive.ics.uci.edu/ml/datasets/Concrete+Slump+Test}{UCI: click here}\\ \hline Concrete Slump Test -1 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0 $ & Construction Materials & \href{https://archive.ics.uci.edu/ml/datasets/Concrete+Slump+Test}{UCI: click here}\\ \hline Servo & \texttt{Reg} & $ 168$ & $24$ & $2$ & $4 $ & Control Engineering& \href{https://archive.ics.uci.edu/ml/datasets/Servo}{UCI: click here}\\ \hline Computer Hardware & \texttt{Reg} & $ 210$ & $7$ & $7$ & $0 $ & Computer & \href{https://archive.ics.uci.edu/ml/datasets/Computer+Hardware}{UCI: click here} \\ \hline Yacht Hydrodynamics & \texttt{Reg} & $ 308$ & $33$ & $5$ & $3 $ &Hydromechanics& \href{http://archive.ics.uci.edu/ml/datasets/yacht+hydrodynamics}{UCI: click here}\\ \hline QSAR aquatic toxicity & \texttt{Reg} & $ 546$ & $34$ & $8$ & $3 $ &Earth and Environmental Sciences & \href{https://archive.ics.uci.edu/ml/datasets/QSAR+aquatic+toxicity}{UCI: click here}\\ \hline QSAR Bioconcentration classes & \texttt{Reg} & $ 779$ & $25$ & $8$ & $4 $ & Life and Environmental Sciences& \href{https://archive.ics.uci.edu/ml/datasets/QSAR+Bioconcentration+classes+dataset}{UCI: click here}\\ \hline QSAR fish toxicity & \texttt{Reg} & $ 909$ & $18$ & $6$ & $2 $ & Life and Environmental Sciences& \href{https://archive.ics.uci.edu/ml/datasets/QSAR+fish+toxicity}{UCI: click here} \\ \hline insurance & \texttt{Reg} & $ 1338$ & $15$ & $3$ & $4 $ & insurance &\href{https://www.kaggle.com/mirichoi0218/insurance}{Kaggle: click here}\\ \hline Communities and Crime & \texttt{Reg} & $ 1994$ & $108$ & $99$ & $2 $ & Social sciences& \href{http://archive.ics.uci.edu/ml/datasets/communities+and+crime }{UCI: click here}\\ \hline Abalone R & \texttt{Reg} & $ 4178$ & $11$ & $7$ & $1 $ & Biology & \href{https://archive.ics.uci.edu/ml/datasets/abalone}{UCI: click here} \\ \hline squark automotive CLV training & \texttt{Reg} & $ 8099$ & $77$ & $7$ & $16 $ & Marketing& \href{https://www.kaggle.com/arashnic/marketing-seris-customer-lifetime-value}{Kaggle: click here}\\ \hline Seoul Bike Sharing Demand & \texttt{Reg} & $ 8760$ & $15$ & $9$ & $3 $ & Marketing & \href{https://archive.ics.uci.edu/ml/datasets/Seoul+Bike+Sharing+Demand}{UCI: click here}\\ \hline Electrical Grid Stability Simu & \texttt{Reg} & $ 10000$ & $12$ & $12$ & $0 $ & Power Grid & \href{https://archive.ics.uci.edu/ml/datasets/Electrical+Grid+Stability+Simulated+Data+}{UCI: click here}\\ \hline blr real estate prices & \texttt{Reg} & $ 13320$ & $2$ & $2$ & $0 $ & Real Estate & \href{https://www.kaggle.com/amitabhajoy/bengaluru-house-price-data}{Kaggle: click here} \\ \hline Cervical Cancer Behavior Risk & \Clf & $ 72$ & $149$ & $19$ & $14 $ & Medicine & \href{https://archive.ics.uci.edu/ml/datasets/Cervical+Cancer+Behavior+Risk}{UCI: click here} \\ \hline Post-Operative Patient & \Clf & $ 91$ & $32$ & $0$ & $8 $ & Medicine & \href{https://archive.ics.uci.edu/ml/datasets/Post-Operative+Patient}{UCI: click here} \\ \hline Breast Cancer Coimbra & \Clf & $ 116$ & $9$ & $9$ & $0 $ &Medicine & \href{https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Coimbra}{UCI: click here} \\ \hline Heart failure clinical records & \Clf & $ 299$ & $12$ & $7$ & $5 $ & Medicine & \href{https://archive.ics.uci.edu/ml/datasets/Heart+failure+clinical+records}{UCI: click here} \\ \hline Ionosphere & \Clf & $ 352$ & $34$ & $32$ & $2 $ & Earth and Communication systems& \href{http://archive.ics.uci.edu/ml/datasets/Ionosphere}{UCI: click here} \\ \hline Congressional Voting Records & \Clf & $ 436$ & $64$ & $0$ & $16 $ & Political science & \href{https://archive.ics.uci.edu/ml/datasets/congressional+voting+records}{UCI: click here}\\ \hline Cylinder Bands & \Clf & $ 541$ & $111$ & $1$ & $19 $ & Manufacturing quality control & \href{https://archive.ics.uci.edu/ml/datasets/Cylinder+Bands}{UCI: click here} \\ \hline Credit Approval & \Clf & $ 691$ & $42$ & $4$ & $8 $ & Banking & \href{https://archive.ics.uci.edu/ml/datasets/credit+approval}{UCI: click here}\\ \hline Tic-Tac-Toe Endgame & \Clf & $ 959$ & $36$ & $0$ & $9 $ & Game & \href{https://archive.ics.uci.edu/ml/datasets/Tic-Tac-Toe+Endgame}{UCI: click here} \\ \hline QSAR biodegradation & \Clf & $ 1056$ & $141$ & $41$ & $15 $ & Chemometrics & \href{https://archive.ics.uci.edu/ml/datasets/QSAR+biodegradation}{UCI: click here}\\ \hline Chess (King-Rook vs. King-Pawn & \Clf & $ 3196$ & $102$ & $0$ & $36 $ & Game &\href{https://archive.ics.uci.edu/ml/machine-learning-databases/chess/king-rook-vs-king/}{UCI: click here} \\ \hline Mushroom & \Clf & $ 8125$ & $125$ & $0$ & $21 $ & Life & \href{https://archive.ics.uci.edu/ml/datasets/mushroom}{UCI: click here}\\ \hline Electrical Grid Stability Simu & \Clf & $ 10000$ & $12$ & $12$ & $0 $ & Power Grid & \href{https://archive.ics.uci.edu/ml/datasets/Electrical+Grid+Stability+Simulated+Data+}{UCI: click here}\\ \hline MAGIC Gamma Telescope & \Clf & $ 19021$ & $10$ & $10$ & $0 $ & Earth Science & \href{https://archive.ics.uci.edu/ml/datasets/magic+gamma+telescope}{UCI: click here}\\ \hline Adult & \Clf & $ 32561$ & $34$ & $6$ & $5 $ &Social sciences &\href{https://archive.ics.uci.edu/ml/datasets/adult}{UCI: click here} \\ \hline Internet Firewall Data & \Clf & $ 65532$ & $11$ & $11$ & $0 $ & Digital Forensic and Security & \href{https://archive.ics.uci.edu/ml/datasets/Internet+Firewall+Data}{UCI: click here}\\ \hline \end{tabular} } \end{table} \section{Overall Benchmark performances} \subsection{Regression} Table \ref{tab:reg.Fried} presents the overall performance comparison of the models over the 16 regression datasets with default HP for every models. We see that the model Ensemble-MLR performs better than all the GBDT models in terms of Friedman ranks and percentiles statistics. Our conclusion and discussion of the advantages of the MLR method in the submitted manuscript remain valid. See Section \ref{sec:datawisereg} for the dataset-wise performance \begin{table}[ht] \centering \caption{Overall performance comparison of the models with default HP for the regression task over 16 regression datasets. {\texttt{P90}}, {\texttt{P95}}, {\texttt{P98}}: the number of datasets a model achieves 90\%, 95\%, 98\% or more of the maximum test ${\texttt{R}^2}$-score respectively, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \label{tab:reg.Fried} \begin{tabular}{rllllrrr} \hline & method & mean $R^2$-score & F.Rank & PMA & P90 & P95 & P98 \\ \hline 1 & Ensemble-MLR & 0.738±0.041 & 7.713±4.42 & 0.956±0.059 & 0.88 & 0.67 & 0.54 \\ 2 & CATBOOST & 0.719±0.050 & 8.406±6.863 & 0.912±0.204 & 0.82 & 0.74 & 0.54 \\ 3 & XGBOOST & 0.7±0.063 & 10.088±6.899 & 0.873±0.325 & 0.79 & 0.59 & 0.39 \\ 4 & xgb & 0.699±0.065 & 10.287±7.079 & 0.87±0.367 & 0.78 & 0.59 & 0.41 \\ 5 & XRF & 0.719±0.052 & 10.394±6.782 & 0.918±0.155 & 0.79 & 0.59 & 0.41 \\ 6 & RF & 0.71±0.053 & 11.137±7.229 & 0.908±0.165 & 0.74 & 0.61 & 0.42 \\ 7 & LGBM & 0.706±0.048 & 12.306±6.9 & 0.907±0.151 & 0.76 & 0.59 & 0.34 \\ 8 & NuSVM & 0.706±0.0469 & 13.75±6.735 & 0.903±0.164 & 0.79 & 0.48 & 0.22 \\ 9 & MLP & 0.666±0.109 & 13.806±6.778 & 0.827±0.364 & 0.59 & 0.51 & 0.38 \\ 10 & FASTAI & -1.5*10^8\pm 2.47*10^8 & 14.031±7.858 & -2.25*10^8\pm1.06*10^9 & 0.66 & 0.48 & 0.30\\ 11 & MARS & 0.677±0.053 & 16.156±5.42 & 0.861±0.167 & 0.54 & 0.35 & 0.16 \\ 12 & Kernel & 0.645±0.061 & 17.169±5.125 & 0.82±0.196 & 0.49 & 0.27 & 0.14 \\ 13 & Lasso & 0.656±0.043 & 17.306±5.554 & 0.837±0.182 & 0.52 & 0.29 & 0.14 \\ 14 & Enet & 0.655±0.042 & 17.337±5.568 & 0.836±0.184 & 0.52 & 0.29 & 0.14 \\ 15 & Ridge & 0.655±0.045 & 17.831±5.34 & 0.836±0.174 & 0.49 & 0.28 & 0.15 \\ 16 & CART & 0.512±0.115 & 20.438±5.595 & 0.578±0.57 & 0.34 & 0.19 & 0.12 \\ 17 & Intercept & -0.023±0.028 & 24.669±0.982 & -0.031±0.075 & 0.00 & 0.00 & 0.00 \\ \hline \end{tabular} \end{table} \subsection{Classification} Table \ref{tab:overallACC} and Table \ref{tab:overallAUC} present presents the overall performance of the classification models over the 16 classification datasets. See Section \ref{sec:datawisecla} for the dataset-wise performance \input{rebuttal/overall_ACC.tex} \input{rebuttal/overall_AUC.tex} \section{HPO for MLR and GBDT} We study the impact of HPO on performance. Due to time limitation, we compared 4 methods (RF, CatBoost, XgBoost and MLR) as well as their bagging and ensemble versions on 9 regression datasets. For each dataset, we ran 10 repetitions. Table \ref{tab:overallhpo} reccord the R2 performance of Catboost, XgBoost, FR and MLR with HPO and Bagging or Ensemble applied on them. Table \ref{tab:HPO_R2_Fried} gives the Friedman rank and the Percentile performances of Catboost, XgBoost, FR and MLR with HPO without any bagging or ensemble strategies implemented on them. Tables \ref{tab:HPO_R2_Fried_Bag} and \ref{tab:HPO_R2_Fried_Ens} gives the Friedman rank and the Percentile performances of Catboost, XgBoost, FR and MLR with HPO and bagging or ensemble strategies implemented on them. We used the Optuna library (Akiba et al., 2019) to tune HP, running 50 step of hyperparameter search with 5 fold cross validation to evaluate candidates. The hyperparameter search spaces were set as prescribed in their original papers for XGB and Catboost. See for instance the following reference for more details: \textbf{Shwartz-Ziv and Armon.} Tabular Data: Deep Learning is Not All You Need. arXiv:2106.03253. Table \ref{tab:overallhpo} summarizes the overall performance on 9 regression datasets. Predictably, applying ensemble strategies to RF, XgBoost, CatBoost marginally improve their performances. Ensemble-MLR performs significantly better than ensemble of HPO-RF, HPO-XgBoost, HPO-CatBoost on 1 dataset. Ensemble of HPO-CatBoost performs significantly better than the other methods on 1 dataset. On the remaining datasets, all the methods have similar performances. So far, These preliminary results confirm what we claim in our contribution section: “MLR is not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners.” \input{./rebuttal/overall_reg_HPO.tex} \input{./rebuttal/overall_HPO_reg_fried.tex} \input{./rebuttal/overall_Bagging_HPO_reg_fried.tex} \input{./rebuttal/overall_Ensemble_HPO_reg_fried.tex} \subsection{MLR} The list of hyperparameters and their search spaces for MLR: \begin{itemize} \item min batch size: float $16/n_{train}$ \item Max runtime: $[6]$ \item depth: integer in [1,5] \item width: integer logarithmic scale $[16,4096]$ \item ridge init: logarithmic scale $[1e-1, 1e7]$ \item Learning rate: logarithmic scale $[\max( e^{-2}/width,e^{-5}],\max(e^{1}/width,e^{-5})] $ \item $max_{iter}$: integer $\max(\min(width*e^{-5})^{1/2},10),300)$ \end{itemize} \subsection{CATBOOST} The list of hyperparameters and their search spaces for Catboost: \begin{itemize} \item Learning rate: Log-Uniform distribution $[e^{-5}, 1]$ \item Random strength: Discrete uniform distribution $[1, 20]$ \item Max size: Discrete uniform distribution $[0, 25]$ \item L2 leaf regularization: Log-Uniform distribution $[1, 10]$ \item Bagging temperature: Uniform distribution $[0, 1]$ \item Leaf estimation iterations: Discrete uniform distribution $[1, 20]$ \end{itemize} \subsection{XGBoost} The list of hyperparameters and their search spaces for XGBoost: \begin{itemize} \item Eta: Log-Uniform distribution $[e^{-7}, 1]$ \item Max depth: Discrete uniform distribution $[1, 10]$ \item Subsample: Uniform distribution $[0.2, 1]$ \item Colsample bytree: Uniform distribution $[0.2, 1]$ \item Colsample bylevel: Uniform distribution $[0.2, 1]$ \item Min child weight: Log-Uniform distribution $[e^{-16}, e^5]$ \item Alpha: Uniform choice \{0, Log-Uniform distribution $[e^{-16}, e^2]$\} \item Lambda: Uniform choice \{0, Log-Uniform distribution $[e^{-16}, e^2]$\} \item Gamma: Uniform choice \{0, Log-Uniform distribution $[e^{-16}, e^2]$\} \end{itemize} \subsection{RF} The list of hyperparameters and their search spaces for RF: \begin{itemize} \item $n_{estimators}$: $100$ \item Max features: ["auto","sqrt","log2"] \item Max depth: log scale $[2, 100]$ \item Max leaf nodes: log scale $[2, 1024]$ \item Max samples leaf: log scale $[1, 16]$ \item Boostrap: ["True", "False"] \item max samples: ["max samples", 0.05, 1.] \end{itemize} \section{Dataset-wise regression benchmark performances}\label{sec:datawisereg} For each dataset, we provide the R2-test score performance table of all the models in the benchmark. \input{./rebuttal/R1.tex} \input{./rebuttal/R2.tex} \input{./rebuttal/R4.tex} \input{./rebuttal/R5.tex} \input{./rebuttal/R8.tex} \input{./rebuttal/R9.tex} \input{./rebuttal/R10.tex} \input{./rebuttal/R11.tex} \input{./rebuttal/R12.tex} \input{./rebuttal/R13.tex} \input{./rebuttal/R14.tex} \input{./rebuttal/R16.tex} \input{./rebuttal/R17.tex} \input{./rebuttal/R18.tex} \input{./rebuttal/R22.tex} \input{./rebuttal/R23.tex} \section{Dataset-wise classification benchmark performances}\label{sec:datawisecla} For each dataset, we provide the ACC and ACU test performance table of all the models in the benchmark in Tables \ref{tab:classification-c0}-\ref{tab:classification-c16} \input{./rebuttal/C0.tex} \input{./rebuttal/C1.tex} \input{./rebuttal/C2.tex} \input{./rebuttal/C3.tex} \input{./rebuttal/C4.tex} \input{./rebuttal/C5.tex} \input{./rebuttal/C6.tex} \input{./rebuttal/C8.tex} \input{./rebuttal/C9.tex} \input{./rebuttal/C10.tex} \input{./rebuttal/C11.tex} \input{./rebuttal/C12.tex} \input{./rebuttal/C13.tex} \input{./rebuttal/C14.tex} \input{./rebuttal/C15.tex} \input{./rebuttal/C16.tex} \section{Dataset-wise HPO and Ensemble performances} Tables \ref{tab:hpo0}-\ref{tab:hpo9} contains the datawise performances of HPO CatBoost, XGBoost, RF and MLR. \input{./rebuttal/HPO_0.tex} \input{./rebuttal/HPO_1.tex} \input{./rebuttal/HPO_2.tex} \input{./rebuttal/HPO_3.tex} \input{./rebuttal/HPO_4.tex} \input{./rebuttal/HPO_5.tex} \input{./rebuttal/HPO_6.tex} \input{./rebuttal/HPO_7.tex} \input{./rebuttal/HPO_8.tex} \input{./rebuttal/HPO_9.tex} \end{document} \section{Experiments} \label{sec:exp} Our goal in this section is to tabulate the impact of \texttt{AdaCap}{} on simple {\texttt{FFNN}}{} architectures, on a tabular data benchmark, an ablation and parameter dependence study, and also a toy few shot learning experiment (Fig. \ref{fig:fewshot}). Note that in the main text, we report only the key results. In supplementary, we provide a detailed description of the benchmarked {\texttt{FFNN}}{} architectures and corresponding hyperparameters choices; a dependence study of impact of batchsize, {\texttt{DO}}\&{\texttt{BN}}, and random seed; the exhaustive results for the tabular benchmark; the implementation choices for compared methods; datasets used with sources and characteristics; datasets preprocessing protocol; hardware implementation. \subsection{Implementation details} Creating a pertinent benchmark for {\text{TD}}{} is still an ongoing process for ML research community. Because researchers compute budget is limited, arbitrages have to be made between number of datasets, number of methods evaluated, intensity of HPO, dataset size, number of train-test splits. We tried to cover a broad set of usecases \cite{paleyes2020challenges} where improving {\texttt{DNN}}{} performance compared to other existing methods is relevant, leaving out hours-long training processes relying on HPO to get the optimal performance for each benchmarked method. We detail below how this choice affected the way we designed our benchmark. \begin{table*}[h] \caption{Regression task focus: test {\texttt{RMSE}}{} (lower is better), P90 (higher is better), and runtime for the $10$ methods from all categories which performed best on $26$ tabular datasets. {\texttt{RMSE}}{} is averaged over $10$ train/test splits. The P90 metric measures for each method, the percentage of experiments where the best {\texttt{RMSE}}{} is not under 90\% of the method {\texttt{RMSE}}{}, meaning it did not underperform too much. \texttt{AdaCap}{} + {\texttt{SNN}}{} outperforms the other architectures and {\texttt{CatBoost}} by a large margin in terms of avg. {\texttt{RMSE}}{} but \texttt{AdaCap}{} + \texttt{GLU}{}{\texttt{MLP}}{} performances are more consistent as revealed by the P90 metric, even more so on the $8$ datasets where the best method obtains a {\texttt{RMSE}}{} score under $0.25$.} \label{tab:runtime} \centering \footnotesize \begin{tabular}{|l||c|c|c|c|c|c|} \hline method & {\texttt{RMSE}}{} avg. & P90 & {\texttt{RMSE}}{} avg. & P90 & avg. runtime & max \\ & all {\text{TD}} & all {\text{TD}} & {\text{TD}} with & {\text{TD}} with & avg. & runtime \\ % & & & $\min{\texttt{RMSE}}{} < 0.25$ & $\min{\texttt{RMSE}}{} < 0.25$ & (sec.) & (sec.) \\ \hline \hline \trainmet{}{\texttt{SNN}}{} & \textbf{0.4147} & $55.0$ & $0.1486$ & $32.5$ & \textbf{19.798} & $169.82$ \\ \GLU{} \MLP & $0.4201$ & $54.230$ & $0.1498$ & $40.0$ & $9.8911$ & $35.699$ \\ \trainmet{}\GLU{}\MLP & $0.4206$ & \textbf{60.384} & \textbf{0.1455} & \textbf{56.25} & $22.355$ & $179.88$ \\ \trainmet{}\ResBlock & $0.4214$ & $50.0$ & $0.1532$ & $30.0$ & $17.192$ & $166.13$ \\ {\texttt{CatBoost}}{} & $0.4221$ & $66.538$ & $0.1910$ & $45.0$ & $92.518$ & $315.15$ \\ \MLP & $0.4230$ & $50.769$ & $0.1601$ & $26.25$ & $4.0581$ & $22.213$ \\ \trainmet{}\MLP & $0.4233$ & $46.923$ & $0.1566$ & $17.5$ & $17.208$ & $168.10$ \\ \trainmet{}\Fast{\texttt{SNN}}{} & $0.4245$ & $42.307$ & $0.1591$ & $16.25$ & $7.6670$ & $38.286$ \\ \mlrnetbatchresblock & $0.4257$ & $45.384$ & $0.1580$ & $20.0$ & $194.72$ & \textbf{2654.7} \\ {\texttt{SNN}}{} & $0.4260$ & $40.384$ & $0.1526$ & $18.75$ & \textbf{7.1895} & $32.581$ \\ \hline \end{tabular} \end{table*} \noindent \textbf{{\texttt{FFNN}}{} Architectures.} For binary classification (\texttt{BinClf}), multiclass classification (\texttt{MultiClf}) and regression (\texttt{Reg}), the output activation/training loss are {\texttt{Sigmoid}}/{\texttt{BCE}}, \texttt{logsoftmax}/\texttt{CE}{} and \ensuremath{\mathbb{I}}/{\texttt{RMSE}}{} respectively. We also implemented the corresponding \texttt{\,MLR $\,$}{} losses. In all cases, we used the Adam (\texttt{Adam}) \cite{kingma2014adam} optimizer and the One Cycle Learning Rate Scheduler scheme \cite{,smith2015cyclical}. Early-Stopping is performed using a validation set of size $\min(n*0.2, 2048)$. Unless mentioned otherwise, Batch-Learning is performed with batch size $b_s=\min (n*0.8, 2048)$ and the maximum number of iteration does not depend on the number of epochs and batches per epoch, to cap the training time, in accordance with our benchmark philosophy. We initialized layer weights with Kaiming \cite{kaiming2015}. Then, for \texttt{AdaCap}{}, the \texttt{Tikhonov}{} parameter $\lambda$ is initialized by maximizing the \texttt{\,MLR $\,$}{} loss sensitivity $w.r.t.$ $\lambda$ on the first mini-batch (See Appendix \ref{sec:appprotocol}). When using \texttt{AdaCap}{}, we used no other additional regularization tricks. Otherwise we used \texttt{BN}{} and $\texttt{DO} = 0.2$ on all hidden layers. Unless mentioned otherwise, we set $\max_{{\texttt{Iter}}} = 500$ and $\max_{{\texttt{$\ell_r$}}} = 0.01$, hidden layers width $512$ and {\texttt{ReLU}}{} activation. We implemented some architectures detailed in \cite{Klambauer2017,gorishniy2021revisiting}; {\texttt{MLP}}: MultiLayer Perceptrons of depth $2$; \texttt{ResBlock}: Residual Networks with $2$ Resblock of depth $2$; {\texttt{SNN}}{} for {\texttt{MLP}}{} with depth $3$ and {\texttt{SELU}}{} activation. We define \texttt{GLU}{} when hidden layers are replaced with Gated Linear Units. \texttt{Fast}{} denotes a faster version of {\texttt{MLP}}{} and {\texttt{SNN}}{} with $\max_{{\texttt{Iter}}} = 200$ and hidden layers width $256$. \texttt{Batch}{\texttt{MLP}}{} and \texttt{Batch}\texttt{ResBlock}{} denote a slower version where the number of epochs is set at $20$ and $50$ respectively and the batch size is set at $min(n,256)$ but the number of iterations is not limited, we enforce a one hour training budget instead. The \texttt{Batch}{} architectures are outside of the scope of this benchmark and only provided for compute time and performance comparison with iteration bounded versions. In total, we implemented $16$ architectures: {\texttt{MLP}}, \texttt{Fast}{\texttt{MLP}}, \texttt{Batch}{\texttt{MLP}}, {\texttt{SNN}}, \texttt{Fast}{\texttt{SNN}}, {\texttt{MLP}}\texttt{GLU}, \texttt{ResBlock}, \texttt{Batch}\texttt{ResBlock}; each time trained with and without \texttt{AdaCap}. These where evaluated individually but to count which methods perform best (Table \ref{tab:countsentiredatasets}) we used a restricted set of methods (\#4) for {\texttt{DNN}}{}. When the top~1 count is made without \texttt{AdaCap}, we picked {\texttt{MLP}}, \texttt{ResBlock}, {\texttt{SNN}}{} and {\texttt{MLP}}\texttt{GLU}. When \texttt{AdaCap}{} is included, we picked {\texttt{MLP}}, \texttt{AdaCap}\texttt{ResBlock}, \texttt{AdaCap}{\texttt{SNN}}{} and \texttt{AdaCap}{\texttt{MLP}}\texttt{GLU}. We do so to avoid biasing results in favor of {\texttt{DNN}}{} by increasing the number of contenders from this category. See Table~\ref{tab:architectureinfos-app} in the Appendix. \noindent \textbf{Other compared methods.} We considered {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} ), {\texttt{MARS}}{} \cite{Friedman1991} (py-earth implementation) and the scikit learn implementation of {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{barandiaran1998random,breiman2001}, Ridge \texttt{Kernels}{} and {\texttt{NuSVM}} \cite{Chihchung2011}, {\texttt{MLP}}{} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, Logistic regression ({\texttt{LogReg}}{} \cite{cox1958}), \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse},\texttt{Adaboost} and {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}. We included a second version of {\texttt{CatBoost}}{} denoted \texttt{Fast}{\texttt{CatBoost}}{}, with hyperparameters chosen to reduce runtime considerably while minimizing performance degradation. \noindent \textbf{Benchmarked Tabular Data.} {\text{TD}}{} are very diverse. We browsed UCI \cite{Dua:2019}, Kaggle and OpenML \cite{OpenML2013}, choosing datasets containing structured columns, $i.i.d.$ samples, one or more specified targets and corresponding to a non trivial learning task, that is the {\texttt{RF}}{} performance is neither perfect nor behind the intercept model. We ended up with $44$ datasets (Table~\ref{tab:dataset-app}): UCI $34$, Kaggle $5$ and openml $5$, from medical, marketing, finance, human ressources, credit scoring, house pricing, ecology, physics, chemistry, industry and other domains. Sample size ranges from $57$ to $36584$ and the number of features from $4$ to $1628$, with a diverse range of continuous/categorical mixtures. The tasks include $26$ continuous and ordinal \texttt{Reg}{} and $18$ \texttt{BinClf}{} tasks. Data scarcity is a frequent issue in {\text{TD}}{} \cite{Chahal2021Small} and Transfer Learning is almost never applicable. However, the small sample regime was not really considered by previous benchmarks. We included $28$ datasets with less than $1000$ samples (\texttt{Reg}{} task:$15$, \texttt{BinClf}{} task:$13$). We also made a focus on the $8$ \texttt{Reg}{} datasets where the smallest {\texttt{RMSE}}{} achieved by any method is under $0.25$, this corresponds to datasets where the {\text{SNR}} is high but the function to approximate is not trivial. For the bagging experiment, we only used the $15$ smallest regression datasets to reduce compute time. \noindent \textbf{Dataset preprocessing.} We applied uniformly the following pipeline: $\bullet$ remove columns with id information, time-stamps, categorical features with more than $12$ modalities (considering missing values as a modality); $\bullet$ remove rows with missing target value; $\bullet$ replace feature missing values with mean-imputation; $\bullet$ standardize feature columns and regression target column. For some regression datasets, we also applied transformations ($e.g.$ $log(\cdot)$ or $\log(1+\cdot)$) on target when relevant/recommended (see Appendix \ref{app:pre-processing}). \noindent \textbf{Training and Evaluation Protocol.} For each dataset, we used $10$ different train/test splits (with fixed seed for reproducibility) without stratification as it is more realistic. For each dataset and each split, the test set was only used for evaluation and never accessed before prediction. Methods which require a validation set can split the train set only. We evaluated on both train and test set the ${\texttt{R}^2}$-score and {\texttt{RMSE}}{} for regression and the Accuracy ({\texttt{Acc.}}) or Area Under Curve {\texttt{AUC}}{} for classification (in a {\it one-versus-rest} fashion for multiclass). For each dataset and each we also computed the average performance over the $10$ train/test splits for the following global metrics: PMA, P90, P95 and Friedman Rank. We also counted each time a method outperformed all others (\texttt{Top1}) on one train/test splits of one dataset. \noindent \textbf{Meta-Learning and Stacking} Since the most popular competitors to {\texttt{DNN}}{} on {\text{TD}}{} are ensemble methods, it makes sense to also consider Meta-Learning schemes, as mentionned by \cite{gorishniy2021revisiting}. For a subset of \texttt{Reg}{} datasets, we picked the methods from each category which performed best globally and evaluated bagging models, each comprised of $10$ instances of one unique method, trained with a different seed for the method (but always using the same train/test split), averaging the prediction of the $10$ weak learners. This scheme multiplies training time by $10$, which for most compared methods means a few minutes instead of a few second. Although it has been shown that HPO can drastically increase the performance of some methods on some large datasets, it also most often multiply the compute cost by a factor of $500$ ($5$ Fold \texttt{CV} $*$ $100$ iterations in \cite{gorishniy2021revisiting}), from several hours to a few days. \textbf{Benchmark limitations.} This benchmark does not address some interesting but out of scope cases for relevance or compute budget reasons: huge datasets (10M+), specific categorical features handling, HPO, pretraining, Data Augmentation, handling missing values, Fairness, etc., and does not include methods designed for those cases (notably {\texttt{NODE}}, {\texttt{TabNet}}, FeatureTokenizer, leaving out the comparison/combination of \texttt{AdaCap}{} with these. \subsection{Tabular Data benchmark results} \textbf{Main takeaway: \texttt{AdaCap}{} vs regular {\texttt{DNN}}{}.} $\bullet$ Compared with regular {\texttt{DNN}}{}, \texttt{AdaCap}{} is almost irrelevant for classification but almost always improves \texttt{Reg}{} performance. Its impact compounds with the use of {\texttt{SELU}}{}, \texttt{GLU}{} and \texttt{ResBlock}.\\ $\bullet$ Compute time wise, the overcost of the \texttt{Tikhonov}{} operator matrix inversion is akin to increasing the depth of the network (Table~\ref{tab:runtime}). \\ $\bullet$ There is no SOTA method for {\text{TD}}. In terms of achieving top~1 performance, {\texttt{GBDT}}{} comes first on only less than 40\% of the regression datasets followed by {\texttt{DNN}}{} without \texttt{AdaCap}{} at 30\%. Using \texttt{AdaCap}{} to train {\texttt{DNN}}{}, the margin between {\texttt{GBDT}}{} and \texttt{AdaCap}{}-{\texttt{DNN}}{} divides by 3 this gap. (Table~\ref{tab:countsentiredatasets}). In terms of average {\texttt{RMSE}}{} performance across all \texttt{Reg}{} datasets, \texttt{AdaCap}{}{\texttt{SNN}}{} and \texttt{AdaCap}{}\texttt{GLU}{}{\texttt{MLP}}{} actually comes first before {\texttt{CatBoost}}{} (Table~\ref{tab:runtime}).\\ $\bullet$ On regression {\text{TD}}{} where the best achievable {\texttt{RMSE}}{} is under $0.25$ \texttt{AdaCap}{} dominates the leaderboard. This confirms our claim that \texttt{AdaCap}{} can delay memorization during training, giving {\texttt{DNN}}{} more leeway to capture the most subtle patterns.\\ $\bullet$ Although \texttt{AdaCap}{} reduces the impact of the random seed used for initialization (Table~\ref{tab:randomseedimpact}), it still benefits as much from bagging as other non ensemble methods. \begin{table}[http!] \caption{Impact of bagging $10$ instances of the same method, on regression {\text{TD}}{}. We took the top methods of each category and for $1$ train/test split of $15$ regression {\text{TD}}{} we trained the method $10$ times with different random seed and averaged the predictions evaluate the potential variation of {\texttt{RMSE}}{} with simple method ensembling (lower is better).} \label{tab:metalearning} \centering \footnotesize \begin{tabular}{|l||c|c|c|} \hline top~8 & {\texttt{RMSE}}{} & {\texttt{RMSE}}{} & {\texttt{RMSE}}{} \% \\ best methods & no bag & bag10 & variation \% \\ \hline \hline \trainmet{}{\texttt{SNN}}{} & $0.3532$ & $0.3322$ & $-5.933$ \\ \trainmet{}\GLU{}\MLP & $0.3482$ & $0.3330$ & $-4.362$ \\ {\texttt{SNN}}{} & $0.3615$ & $0.3374$ & $-6.671$ \\ \GLU{} \MLP & $0.3593$ & $0.3402$ & $-5.296$ \\ \Fast\MLP & $0.3698$ & $0.3492$ & $-5.562$ \\ {\texttt{CatBoost}}{} & $0.3638$ & $0.3610$ & \textit{-0.782} \\ \texttt{FastCat} & $0.3879$ & $0.3689$ & $-4.884$ \\ {\texttt{XRF}}{} & $0.3813$ & $0.3799$ & $-0.363$ \\ \hline \end{tabular} \end{table} \textbf{Few-shot.} We conducted a toy few-shot learning experiment on MNIST \cite{deng2012mnist} to verify that \texttt{AdaCap}{} is also compatible with {\texttt{CNN}}{} architectures in an image multiclass setting. We followed the setting of the pytorch tutorial \cite{mnist2016pytorch} and we repeated the experiment with \texttt{AdaCap}{} but without {\texttt{DO}}{} nor {\texttt{BN}}{}. The results are detailed in Fig. \ref{fig:fewshot}. \subsection{Ablation, Learning Dynamic, Dependency study} Figure~\ref{fig:1Xcorrelmat} shows the impact of both \texttt{Tikhonov}{} and \texttt{\,MLR $\,$}{} on the trained model. \texttt{AdaCap}{} removes oscillations in learning dynamics Figure~\ref{fig:NewLearningDynamic}. \texttt{AdaCap}{} can handle small batchsize very well whereas standard {\texttt{MLP}}{} fails (Table~\ref{tab:batchsize}). {\texttt{MLP}}{} trained with \texttt{AdaCap}{} performs better in term of {\texttt{RMSE}}{} than when trained with {\texttt{BN}}{}+{\texttt{DO}}{} (Table~\ref{tab:rmseDOBN}). Combining \texttt{AdaCap}{} with {\texttt{BN}}{} or {\texttt{DO}}{} does not improve {\texttt{RMSE}}{}. The random seed used to generate the label permutation has virtually no impact (Table~\ref{tab:randomseedimpact}). \section{Introduction} Generalization is a central problem in Deep Learning ({\text{DL}}). It is strongly connected to the notion of {\it capacity} of a model, that is the range of functions a model can approximate. It impacts both the complexity of the patterns a model can learn but also {\it memorization}, the ability of a model to fit arbitrary labels \cite{goodfellow2016deep}. Because of their high capacity, overparametrized Deep Neural Networks ({\texttt{DNN}}{}) can memorize the entire train set to the detriment of generalization. Common techniques like Dropout ({\texttt{DO}}) \cite{Hinton2012,srivastava14adrop}, Early Stopping \cite{pmlr-v108-li20j}, Data Augmentation \cite{shorten2019survey} or {\text{Weight Decay}}{} \cite{Hanson1988Comparing,krogh1992simple,bos1996using} used during training can reduce the capacity of a {\texttt{DNN}}{} and sometimes delay memorization but cannot prevent it \cite{arpit2017closer}. We propose \texttt{AdaCap}{}, a new training technique for Feed-Forward Neural Networks ({\texttt{FFNN}}) that optimizes the $capacity$ of {\texttt{FFNN}}{} during training so that it can capture the high-level abstract representations underlying the problem at hand and mitigate memorization of the train set. \texttt{AdaCap}{} relies on two novel ingredients, the \textbf{\texttt{Tikhonov}{} operator} and the \textbf{Muddling labels Regularization} (\texttt{\,MLR $\,$}) loss. The \textbf{\texttt{Tikhonov}{} operator} provides a differentiable data-dependent quantification of the capacity of a {\texttt{FFNN}}{} through the application of this operator on the output of the last hidden layer. The \texttt{Tikhonov}{} operator modulates the capacity of the {\texttt{FFNN}}{} via the additional \texttt{Tikhonov}{} parameter that can be trained concomitantly with the hidden layers weights by Gradient Descent (\texttt{GD}). This operator works in a fundamentally different way from other existing training techniques like {\text{Weight Decay}}{} (See Section \ref{sec:adapcap} and Fig. \ref{fig:1Xcorrelmat}). \begin{figure}[http!] \centering \includegraphics[scale=0.27]{FiguresPDF/CorrelMat/WeightCorrelationAllMatv2.pdf} \caption{We trained a {\texttt{MLP}}{} on the \texttt{Boston} dataset with either usual training (with/without {\text{Weight Decay}}{}) or \texttt{AdaCap}{}, using identical architectures and parameters in both cases. We plot the clustered correlation matrices of last hidden layer weights (in absolute value). \textbf{Upper left:} usual loss and no regularization. \textbf{Upper right:} usual loss and {\text{Weight Decay}}{} only. \textbf{Bottom left:} usual loss and \texttt{Tikhonov}{} scheme alone (no {\text{Weight Decay}}). \textbf{Bottom right:} \texttt{AdaCap}{} alone. Contrarily to {\text{Weight Decay}}, \texttt{AdaCap}{} produced a model with highly structured hidden layer weights even with a plain {\texttt{MLP}}{} architecture, indicating its learning behavior is very different from the standard one. } \label{fig:1Xcorrelmat} \end{figure} The problem is then the tuning of the \texttt{Tikhonov}{} parameter that modulates capacity as it directly impacts the generalization performance of the trained {\texttt{FFNN}}. This motivated the introduction of the \texttt{\,MLR $\,$}{} loss which performs capacity tuning without using a hold-out validation set. The \texttt{\,MLR $\,$}{} loss is based on a novel way to exploit random labels. Random labels have been used in \cite{zhang2016understanding,arpit2017closer} as a diagnostic tool to understand how overparametrized {\texttt{DNN}}{} can generalize surprisingly well despite their capacity to memorise the train set. This benign overfitting phenonemon is attributed in part to the implicit regularization effect of the optimizer schemes used during training \cite{pmlr-v80-gunasekar18a,smith2021on}. Understanding that the training of {\texttt{DNN}}{} is extremely susceptible to corrupted labels, numerous methods have been proposed to identify the noisy labels or to reduce their impact on generalization. These approaches include loss correction techniques \cite{patrini2017making}, reweighing samples \cite{jiang2017mentornet}, training two networks in parallel \cite{han2018co}. See \cite{ChenLCZ19,Harutyunyan2020Improving} for an extended survey. We propose a different approach. We do not attempt to address the noise and corruptions already present in the original labels. Instead, we \textbf{purposely generate purely corrupted labels during training} as a tool to reduce the propensity of the {\texttt{DNN}}{} to memorize label noise during gradient descent. The underlying intuition is that we no longer see generalization as the ability of a model to perform well on unseen data, but rather as the ability to avoid finding pattern where none exists. Concretely, we propose the \textbf{Muddling labels Regularization} loss which uses randomly permuted labels to quantify the overfitting ability of a model on a given dataset. In Section \ref{sec:MLRloss}, we provide theoretical evidences in a regression setting that \textbf{the \texttt{\,MLR $\,$}{} loss is an accurate estimator of the generalization error} (Fig. \ref{fig:3pred}) which can be used to perform Hyper-Parameter Optimization (HPO) without using a hold-out $validation$-set if a Signal-to-Noise Ratio ({\text{SNR}}) condition is satisfied. This property motivates using the \texttt{\,MLR $\,$}{} loss rather than the usual losses during training to perform $adaptive$ control of the $capacity$ of {\texttt{DNN}}{}. This can improve generalization (Fig. \ref{fig:NewLearningDynamic}) not only in the presence of label corruption but also in other settings prone to overfitting - $e.g.$ Tabular Data \cite{borisov2021deep,gorishniy2021revisiting,SHWARTZZIV202284}, Few-Shot Learning (Fig. \ref{fig:fewshot}), a task introduced in \cite{fink2005object,fei2006one}. See \cite{wang2020generalizing} for a recent survey. \begin{figure}[htp] \centering \includegraphics[scale=0.35]{FiguresPDF/Plots/LearningDynamicv5.pdf} \caption{{\texttt{RMSE}}{} across iterations for train and valid sets when training \texttt{AdaCap}{}, \texttt{Tikhonov}{} and regular {\texttt{DNN}}{} on \texttt{Abalone} {\text{TD}}. We can see the improvement in terms of generalization and memorization when adding \texttt{Tikhonov}{} and then \texttt{\,MLR $\,$}{}: The train {\texttt{RMSE}}{} converges to a higher plateau but validation {\texttt{RMSE}}{} keeps improving further. \texttt{Tikhonov}{} smooths the learning dynamic, removes the oscillations. Adding the \texttt{\,MLR $\,$}{} loss makes no change to the learning dynamic on the first iterations but impact the last iterations and delays memorization even more.} \label{fig:NewLearningDynamic} \end{figure} Our novel training method \texttt{AdaCap}{} works as follows. Before training: a) generate a new set of completely uninformative labels by {\it muddling} original labels through random permutations; then, at each \texttt{GD}{} iteration: b) apply the \texttt{Tikhonov}{} operator to the output of the last hidden layer; c) quantify the ability of the {\texttt{DNN}}{}'s output layer to fit true labels rather than permuted labels via the new (\texttt{\,MLR $\,$}) loss; d) back-propagate the \texttt{\,MLR $\,$}{} objective through the network. \texttt{AdaCap}{} is a gradient-based, global, data-dependent method which trains the weights and adjusts the capacity of the {\texttt{FFNN}}{} simultaneously during the training phase without using a hold-out $validation$ set. \texttt{AdaCap}{} is designed to work on most {\texttt{FFNN}}{} architectures and is compatible with the usual training techniques like Gradient Optimizers \cite{kingma2014adam}, Learning Rate Schedulers \cite{smith2019super}, Dropout \cite{srivastava14adrop}, Batch-Norm \cite{ioffe2015batch}, {\text{Weight Decay}}{} \cite{krogh1992simple,bos1996using}, etc. \begin{figure}[htp] \centering \includegraphics[scale=0.43]{FiguresPDF/Plots/MNISTACConlyv7.pdf} \caption{Few-shot learning experiment on MNIST \cite{deng2012mnist}. When training a simple ConvNet, the generalization performance of the obtained models $w.r.t.$ the number of samples per class is uniformly better over the whole range of samples per class when using \texttt{AdaCap}{}, especially in the low sample per class regime. } \label{fig:fewshot} \end{figure} {\texttt{DNN}}{} have not demonstrated yet the same level of success on Tabular Data ({\text{TD}}) as on images \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and text \cite{bert2019}, which makes it an interesting frontier for {\texttt{DNN}}{} architectures. Due to the popularity of tree-based ensemble methods ({\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{RF}}{} \cite{barandiaran1998random,breiman2001}), there has been a strong emphasis on the preprocessing of categorical features which was an historical limitation of {\text{DL}}{}. Notable contributions include {\texttt{NODE}}{} \cite{Popov2020Neural} and {\texttt{TabNet}}{} \cite{arik2020tabnet}. {\texttt{NODE}}{} (Neural Oblivious Decision Ensembles) are tree-like architectures which can be trained end-to-end via backpropagation. {\texttt{TabNet}}{} leverages Attention Mechanisms \cite{Bahdanau2014-Attention} to pretrain {\texttt{DNN}}{} with feature encoding. The comparison between simple {\texttt{DNN}}{}, {\texttt{NODE}}, {\texttt{TabNet}}, {\texttt{RF}}{} and {\texttt{GBDT}}{} on {\text{TD}}{} was made concomitantly by Kadra et~al. \yrcite{kadra2021welltuned}, Gorishniy et~al. \yrcite{gorishniy2021revisiting} and Shwartz-Ziv \& Armon \yrcite{SHWARTZZIV202284}. Their benchmarks are more oriented towards an {\texttt{AutoML}}{} approach than ours, as they all use heavy HPO, and report training times in minutes/hours, even for some small and medium size datasets. See Appendix \ref{app:HPO-bib} for a more detailed discussion. As claimed by \cite{SHWARTZZIV202284}, their results (like ours) indicate that {\texttt{DNN}}{} are not (yet?) the alpha and the omega of {\text{TD}}. \cite{kadra2021welltuned} also introduces an HPO strategy called the regularization cocktail. Regarding the new techniques for {\texttt{DNN}}{} on {\text{TD}}{}, we mention here a few relevant to our work which we included in our benchmark. See \cite{borisov2021deep} and the references therein for a more exhaustive list. \cite{Klambauer2017} introduced Self-Normalizing Networks ({\texttt{SNN}}) to train deeper {\texttt{FFNN}}{} models, leveraging the {\texttt{SELU}}{} activation function. Gorishniy et~al.\yrcite{gorishniy2021revisiting} proposed new architecture schemes: \texttt{ResBlock}, Gated Linear Units \texttt{GLU}, and FeatureTokenizer-Transformers, which are adaptation for {\text{TD}}{} of ResNet \cite{He2015Deep}, Gated convolutional networks \cite{dauphin2017language} and Transformers \cite{vaswani2017attention}. We illustrate the potential of \texttt{AdaCap}{} on a benchmark of 44 tabular datasets from diverse domains of application, including 26 regression tasks, 18 classification tasks, against a large set of popular methods {\texttt{GBDT}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002,guestrin2016,Ke2017,Prokhorenkova2018}; Decision Trees and {\texttt{RF}}{} \cite{Breiman1984,barandiaran1998random,breiman2001,gey2005model,Klusowski2020sparse}, Kernels \cite{Chihchung2011}, {\texttt{MLP}}{} \cite{Hinton89connectionistlearning}, {\texttt{GLM}}{} \cite{cox1958,Hoerl1970,tibshirani1996,Zou05}, {\texttt{MARS}}{} \cite{Friedman1991}). For {\text{DL}}{} architectures, we combined and compared \texttt{AdaCap}{} with {\texttt{MLP}}, \texttt{GLU}, \texttt{ResBlock}{}, {\texttt{SNN}}{} and {\texttt{CNN}}. We left out recent methods designed to tackle categorical features ({\texttt{TabNet}}, {\texttt{NODE}}, \texttt{FT-Transformers}) as it is not the focus of this benchmark and of our proposed method. Our experimental study reveals that using \texttt{AdaCap}{} to train {\texttt{FFNN}}{} leads to an improvement of the generalization performance on regression tabular datasets especially those with high Signal-to-Noise Ratio ({\text{SNR}}), the datasets where it is possible but not trivial to obtain a very small test {\texttt{RMSE}}. \texttt{AdaCap}{} works best in combination with other schemes and architectures like {\texttt{SNN}}{}, \texttt{GLU}{} or \texttt{ResBlock}{}. Introducing \texttt{AdaCap}{} to the list of available {\texttt{DNN}}{} schemes allows neural networks to gain ground against the {\texttt{GBDT}}{} family. \section{The \texttt{\,MLR $\,$}{} loss} \label{sec:MLRloss} \begin{figure}[htp] \centering \includegraphics[scale=0.435]{FiguresPDF/Plots/MLRCriterionICML2022ReworkT16v3.pdf} \caption{Comparison of the \texttt{\,MLR $\,$}{} criterion (blue), \texttt{CV}{} criterion ($10$-Fold cross-validation {\texttt{RMSE}}{}) (orange) for out-of-sample performance (test set {\texttt{RMSE}}) (green) estimation with the Ridge model. We generated synthetic regression data (Appendix \ref{app:syntheticdataMLR}), and train a Ridge model with different levels of regularization $\lambda$. We also train a Ridge model with a randomly permuted target vector. We evaluate the \texttt{\,MLR $\,$}{} criterion, the $10$-Fold \texttt{CV}{} {\texttt{RMSE}}{} and test {\texttt{RMSE}}{} over the $\lambda$ grid and compare their respective argmin, $\widehat{\lambda}_{\texttt{\,MLR $\,$}}$, $\widehat{\lambda}_{\texttt{CV}}$ and $\lambda^*$. The goal is to obtain an argmin as close as possible to the optimal one in terms of generalization. Averaging over $100$ seeds, the {\texttt{RMSE}}{} test performances with $\widehat{\lambda}_{\texttt{\,MLR $\,$}}$, $\widehat{\lambda}_{\texttt{CV}}$ and $\lambda^*$ are $0.7128$, $0.7221$ and $0.7061$ respectively. Above figure is the criterion landscape for random seed $0$. We see that \texttt{\,MLR $\,$}{} provides a better estimate of the argmin of test {\texttt{RMSE}}{} than \texttt{CV}{}. } \label{fig:3pred} \end{figure} \textbf{Setting.} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathcal{Y}$ where $\mathcal{Y}=\mathbb{R}$ for regression and $\mathcal{Y}$ is a finite set for classification. We optimise the objective $L(\texttt{act}_{\texttt{out}}(\bm{f}_{\boldsymbol{\theta}}(\textbf{x})),\textbf{Y})$ where $\bm{f}_{\boldsymbol{\theta}}(\textbf{x})$ is the output of the last hidden layer, $L$ is the loss function ({\texttt{MSE}}{} for regression and \texttt{CE}{} for classification) and $\texttt{act}_{\texttt{out}}$ is the activation function ($\ensuremath{\mathbb{I}}$ for regression, {\texttt{Sigmoid}}{} for binary classification and \texttt{logsoftmax}{} for multiclass). \textbf{Random permutations.}We build a randomized data set by applying random permutations on the $n$ components of the label vector $\textbf{Y}$. This randomization scheme presents the advantage of creating an artificial train set $(\textbf{x},\textbf{Y}_{\texttt{perm}})$ with marginal distributions of features and labels identical to those in the initial train set but where the connection between features and labels has been removed\footnote{The expected number of fixed points of a permutation drawn uniformly at random is equal to $1$.}. This means that there is no generalizing pattern to learn from the artificial dataset $(\textbf{x},\textbf{Y}_{\texttt{perm}})$. We replace the initial loss $L$ by \begin{align} &\texttt{\,MLR $\,$}(\boldsymbol{\theta}):=L\left(\textbf{Y},\texttt{act}_{\texttt{out}}(\bm{f}_{\boldsymbol{\theta}}(\textbf{x}))\right)\notag\\ &\hspace{2cm}- L\left(\textbf{Y}_{\texttt{perm}},\texttt{act}_{\texttt{out}}(\bm{f}_{\boldsymbol{\theta}}(\textbf{x}))\right). \label{eq:BLbis1} \end{align} The second term on the right-hand side of \eqref{eq:BLbis1} is used to quantify memorization of output layer $\bm{f}_{\boldsymbol{\theta}}$. Indeed, since there is no meaningful pattern linking $\textbf{x}$ to $\textbf{Y}_{\texttt{perm}}$, any $\bm{f}_{\boldsymbol{\theta}}$ which fits $(\textbf{x},\textbf{Y}_{\texttt{perm}})$ well achieves it via memorization only. We want to rule out such models. By minimizing the \texttt{\,MLR $\,$}{} loss, we hope to retain only the generalizing patterns. The \texttt{\,MLR $\,$}{} approach uses random labels in an original way. In \cite{zhang2016understanding,arpit2017closer}, noise labels are used as a diagnostic tool in numerical experiments. On the theory side, Rademacher Process (RP) is a central tool exploiting random (Rademacher) labels to compute data dependent measures of complexity of function classes used in learning \cite{KoltchinskiiSaintFlour2011}. However, RP are used to derive bounds on the excess risk of already trained models whereas the \texttt{\,MLR $\,$}{} approach uses randomly permuted labels to train the model. \noindent \textbf{Experiment (Fig.\ref{fig:3pred}).} We compare the \texttt{\,MLR $\,$}{} loss and Cross-Validation (CV) error to the true generalization error in the correlated regression setting described in Appendix \ref{app:syntheticdataMLR}. \texttt{\,MLR $\,$}{} is a better estimate of the generalization error than \texttt{CV}, thus yielding a more precise estimate of the optimal hyperparameter $\lambda^*$ than \texttt{CV}. \noindent \textbf{Theoretical investigation of \texttt{\,MLR $\,$}{}.} To understand the core mechanism behind the \texttt{\,MLR $\,$}{} loss, we consider the following toy regression model. Let $\textbf{Y} = \textbf{x} \bm{\beta}^* + \boldsymbol{\xi}$ with $\bm{\beta}^*\in \mathbb{R}^d$ and isotropic sub-Gaussian noise $\boldsymbol{\xi}\in\mathbb{R}^n$ ($\mathrm{Cov}(\boldsymbol{\xi}) = \sigma^2 \ensuremath{\mathbb{I}}_n$). We consider the class of Ridge models $\mathcal{F}^R = \{f_\lambda(\cdot) = \langle \bm{\beta}_\lambda,\cdot\rangle,\; \lambda>0\}$ with $\bm{\beta}_\lambda =\bm{\beta}_\lambda(\textbf{x},\textbf{Y}) =(\textbf{x}^\top\textbf{x} + \lambda \ensuremath{\mathbb{I}}_d)^{-1}\textbf{x}^\top \textbf{Y}\in\mathbb{R}^d$. Define the risk $R(\lambda) := \mathbb{E}_{\boldsymbol{\xi}}[\|\textbf{x}\bm{\beta}^* - \textbf{x}\bm{\beta}_\lambda\|_2^2]$, and the optimal parameter $\lambda^* = \mathrm{argmin}_{\lambda>0} R(\lambda)$. We assume for simplicity that $\textbf{x}^\top \textbf{x}/n$ is an orthogonal projection (denoted $P_{\textbf{x}}$) onto a $r$-dimensional subspace of $\mathbb{R}^d$. Define the rate $$ \epsilon_n := \sqrt{\frac{r\sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2}} + \sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|_2^2}{n\sigma^2}}. $$ \begin{theo}\label{thm1} Under the above assumptions. If $ r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$, then we get w.h.p. \begin{align*} \texttt{\,MLR $\,$}(\lambda)+\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 =\left( 1+ o(1)\right)R(\lambda),\quad \forall \lambda >\epsilon_n. \end{align*} \end{theo} Proof is provided in Appendix \ref{app:proofThm1}. In our setting, $\|\textbf{x}\bm{\beta}^*\|_2^2/(n\sigma^2)$ is the Signal-to-Noise Ratio {\text{SNR}}. The intermediate {\text{SNR}}{} regime $ r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$ is the only regime where using Ridge regularization can yield a significant improvement in the prediction. In that regime, the \texttt{\,MLR $\,$}{} loss can be used to find optimal hyperparameter $\lambda^*$. In the high {\text{SNR}}{} regime $\|\textbf{x}\bm{\beta}^*\|_2^2\geq n \sigma^2$, no regularization is needed, i.e. $\lambda^*=0$ is the optimal choice. Conversely in the low {\text{SNR}}{} regime $ \|\textbf{x}\bm{\beta}^*\|_2^2\leq r \sigma^2$, the signal is completely drowned in the noise. Consequently it is better to use the zero estimator, i.e. $\lambda^*=\infty$. \\ In a nutshell, while the high and low {\text{SNR}}{} regimes correspond to trivial cases where regularization is not useful, in the intermediate regime where regularization is beneficial, \texttt{\,MLR $\,$}{} is useful. \section{The \texttt{AdaCap}{} method to train {\texttt{DNN}}{}} \label{sec:adapcap} \textbf{The \textbf{\texttt{Tikhonov}{}} operator scheme.} Consider a {\texttt{DNN}}{} architecture with $L$ layers. Denote by $\boldsymbol{\theta}$ the hidden layers weights and by $\textbf{A}^{L-1}(\boldsymbol{\theta}, \bigcdot)\,:\, \mathbb{R}^{n\times d} \rightarrow \mathbb{R}^{n\times d_{L-1}}$ the output of the last hidden layer.\\ Let $\lambda \in \mathbb{R}_+^*$ be the \texttt{Tikhonov}{} parameter and define \begin{align} \label{eq:Pmat} &\textbf{P}(\lambda,\boldsymbol{\theta},\textbf{x}):=\left[\left(\textbf{A}^{L-1}\right)^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}\left(\textbf{A}^{L-1}\right)^\top \end{align} where $\textbf{A}^{L-1}:=A^{L-1}(\boldsymbol{\theta}, \textbf{x})$ and $\ensuremath{\mathbb{I}} = \ensuremath{\mathbb{I}}_{d_{L-1}}$ the identity matrix. The \texttt{Tikhonov}{} operator is \begin{align} \label{eq:Hmat} &\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x}):=\textbf{A}^{L-1}\textbf{P}(\lambda,\boldsymbol{\theta},\textbf{x}). \end{align} During training, the \texttt{Tikhonov}{} operator scheme outputs the following prediction for target vector\footnote{In multiclass setting, replace \textbf{Y}\, by its one-hot encoding.} $\textbf{Y}$: \begin{align} \label{eq:model2} \bm{f}_{\lambda,\boldsymbol{\theta},\textbf{Y}}(\textbf{x})=\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y}, \end{align} Note that $(\lambda,\boldsymbol{\theta},\textbf{x}, \textbf{Y})$ may change at each iteration during training/\texttt{GD}. To train this {\texttt{DNN}}{}, we run a Gradient Descent Optimization scheme over parameters $(\lambda,\boldsymbol{\theta})$ \begin{align} \label{eq:ridgeMLRNN} &(\widehat{\lambda}, \widehat{\boldsymbol{\theta}})= \underset{\lambda>0,\, \boldsymbol{\theta}}{\arg\min} \; L\left(\textbf{Y},\texttt{act}_{\texttt{out}}\left(\bm{f}_{\lambda, \boldsymbol{\theta},\textbf{Y}}(\textbf{x})\right)\right). \end{align} Eventually, at test time, we freeze $\textbf{P}(\widehat{\lambda}, \widehat{\boldsymbol{\theta}}, \textbf{x})$, and obtain our final predictor \begin{align} \label{eq:model3} \bm{f}_{\widehat{\lambda}, \widehat{\boldsymbol{\theta}}}(\bigcdot)=\texttt{act}_{\texttt{out}}\left(A^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot) \textbf{P}(\widehat{\lambda}, \widehat{\boldsymbol{\theta}},\textbf{x})\textbf{Y}\right), \end{align} where $\texttt{act}_{\texttt{out}}$ is the last activation function applied to the output layer. Here, $\textbf{P}(\widehat{\lambda}, \widehat{\boldsymbol{\theta}},\textbf{x})\textbf{Y}$ are the weights of the output layer set once and for all using the minibatch ($\textbf{x}$, $\textbf{Y}$) associated with ($\widehat{\lambda}, \widehat{\boldsymbol{\theta}}$) in case of batch-learning. Therefore, we recover the architecture of a standard {\texttt{DNN}}{} where the output of the hidden layers $A^{L-1}(\widehat{\boldsymbol{\theta}},\bigcdot)$ is multiplied by the weights of the output layer. \textbf{The \texttt{Tikhonov}{} operator scheme works in a fundamentally different way from {\text{Weight Decay}}}. When we apply the \texttt{Tikhonov}{} operator to the output of the last hidden layer and then use backpropagation to train the {\texttt{DNN}}{}, we are indirectly carrying over its $capacity$ control effect to the hidden layers of the {\texttt{DNN}}. In other words, we are performing {\it inter-layers} regularization (i.e. regularization across the hidden layers) whereas {\text{Weight Decay}}{} performs {\it intra-layer} regularization. We trained a {\texttt{DNN}}{} using {\text{Weight Decay}}{} on the one-hand and Tikhonov operator on the other hand while all the other training choices were the same between the two training schemes (same loss $L$, same architecture size, same initialization, same learning rate, etc.). Fig. \ref{fig:1Xcorrelmat} shows that the \texttt{Tikhonov}{} scheme works differently from other $L_2$ regularization schemes like {\text{Weight Decay}}. Indeed, Fig.~ \ref{fig:NewLearningDynamic} reveals that the \texttt{Tikhonov}{} scheme completely changes the learning dynamic during \texttt{GD}{}. \noindent \textbf{Training with \texttt{\,MLR $\,$}{} loss and the \textbf{\texttt{Tikhonov}{} scheme}.} We quantify the $capacity$ of our model to memorize labels $\textbf{Y}$ by $L\left(\textbf{Y},\texttt{act}_{\texttt{out}}\left(\bm{f}_{\lambda, \boldsymbol{\theta},\textbf{Y}}(\textbf{x})\right)\right)$ w.r.t. to labels $\textbf{Y}$ where the \texttt{Tikhonov}{} parameter $\lambda$ modulates the level the $capacity$ of this model. However, we are not so much interested in adapting the capacity to the train set $(\textbf{x},\textbf{Y})$ but rather to the generalization performance on the test set. This is why we replace $L$ by \texttt{\,MLR $\,$}{} in \eqref{eq:ridgeMLRNN}. Since \texttt{\,MLR $\,$}{} is a more accurate in-sample estimate of the generalization error than the usual train loss (Theorem \ref{thm1}), we expect \texttt{\,MLR $\,$}{} to provide better tuning of $\lambda$ and thus some further gain on the generalization performance.\\ Combining \eqref{eq:BLbis1} and \eqref{eq:model2}, we obtain the following train loss of our method. \begin{align} &\texttt{\,MLR $\,$}(\lambda, \boldsymbol{\theta}):=L\biggl(\textbf{Y},\texttt{act}_{\texttt{out}}(\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y})\biggr)\notag\\ &\hspace{1cm} - L\biggl(\textbf{Y}_{\texttt{perm}},\texttt{act}_{\texttt{out}}(\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y}_{\texttt{perm}})\biggr) \label{eq:BLbis1-DNN} \end{align} To train this model, we run a Gradient Descent Optimization scheme over parameters $(\lambda,\boldsymbol{\theta})$: \begin{align} \label{eq:ridgeMLRNN2} &(\widehat{\lambda}, \widehat{\boldsymbol{\theta}} )= \mathrm{argmin}_{\lambda,\boldsymbol{\theta}|\lambda>0}\; \texttt{\,MLR $\,$}(\lambda, \boldsymbol{\theta}). \end{align} The \texttt{AdaCap}{} predictor is defined again by \eqref{eq:model2} but with weights obtained in \eqref{eq:ridgeMLRNN2} and corresponds to the architecture of a standard {\texttt{DNN}}{}. Indeed, at test time, we freeze $\textbf{P}(\widehat{\lambda},\widehat{\boldsymbol{\theta}},\textbf{x})\textbf{Y}$ which becomes the weights of the output layer. Once the {\texttt{DNN}}{} is trained, the corrupted labels $\textbf{Y}_{\texttt{perm}}$ and the \texttt{Tikhonov}{} parameter $\widehat{\lambda}$ have no further use and are thus discarded. If using Batch-Learning, we use the minibatch $(\textbf{x},\textbf{Y})$ corresponding to $(\widehat{\boldsymbol{\theta}},\widehat{\lambda})$. In any case, the entire training set can also be discarded once the output layer is frozen. \textbf{Comments.}\\ $\bullet$ \texttt{Tikhonov}{} is absolutely needed to use \texttt{\,MLR $\,$}{} on {\texttt{DNN}}{} in a differentiable fashion because {\texttt{FFNN}}{} have such a high capacity to memorize labels on the hidden layers that the SNR between output layer and target is too high for \texttt{\,MLR $\,$}{} to be applicable without controlling capacity via the \texttt{Tikhonov}{} operator. Controlling network capacity via HPO over regularization techniques would produce a standard bi-level optimization problem.\\ $\bullet$ The random labels are generated before training and are not updated or changed thereafter. Note that in practice, the random seed used to generate the label permutation has virtually no impact as shown in Table \ref{tab:randomseedimpact}. \\ $\bullet$ In view of Theorem \ref{thm1}, both terms composing the \texttt{\,MLR $\,$}{} loss should be equally weighted to produce an accurate estimator of the generalization error.\\ $\bullet$ Note that $\lambda$ is not an hyperparameter in \texttt{AdaCap}{} . It is trained alongside $\boldsymbol{\theta}$ by \texttt{GD}. The initial value $\lambda_{\texttt{init}}$ is chosen with a simple heuristic rule. For initial weights $\boldsymbol{\theta}$, we pick the value which maximizes sensitivity of the \texttt{\,MLR $\,$}{} loss $w.r.t.$ variations of $\lambda$ (See \eqref{lambdainiti} in Appendix \ref{sec:appprotocol}).\\ $\bullet$ Both terms of the \texttt{\,MLR $\,$}{} loss depend on $\boldsymbol{\theta}$ through the quantity $\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})$, meaning we compute only one derivation graph $w.r.t.$ $\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})$.\\ $\bullet$ When using the \textbf{\texttt{Tikhonov}{} operator} during training, we replace a matrix multiplication by a matrix inversion. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU \cite{SHARMA201331}\footnote{This article states that the time complexity of matrix inversion scales as $J$ as long as $J^2$ threads can be supported by the GPU where $J$ is the size of the matrix.}. Time computation comparisons are provided in Table \ref{tab:runtime}. The overcost depends on the dataset but remains comparable to applying Dropout (\texttt{DO}{}) and Batch Norm (\texttt{BN}{}) on each hidden layers for {\texttt{DNN}}{} with depth $3+$.\\ $\bullet$ For large datasets, \texttt{AdaCap}{} can be combined with Batch-Learning. Table \ref{tab:batchsize} in appendix reveals that \texttt{AdaCap}{} works best with large batch-size, but handles very small batches and seeing fewer times each sample much better than regular {\texttt{DNN}}{}. \section{Conclusion} We introduced the \texttt{\,MLR $\,$}{} loss, an in-sample metric for out-of-sample performance, and the \texttt{Tikhonov}{} operator, a training scheme which modulates the capacity of a {\texttt{FFNN}}{}. By combining these we obtain \texttt{AdaCap}{}, a training scheme which changes greatly the learning dynamic of {\texttt{DNN}}{}. \texttt{AdaCap}{} can be combined advantageously with {\texttt{CNN}}, \texttt{GLU}, {\texttt{SNN}}{} and \texttt{ResBlock}. Its performance are poor on binary classification tabular datasets, but excellent on regression datasets, especially in the high {\text{SNR}}{} regime were it dominates the leaderboard.\\ Learning on tabular data has witnessed a regain of interest recently. The topic is difficult given the typical data heterogeneity, data scarcity, the diversity of domains and learning tasks and other possible constraints (compute time or memory constraints). We believe that the list of possible topics is so vast that a single benchmark cannot cover them all. It is probably more reasonable to segment the topics and design adapted benchmarks for each.\\ In future work, we will investigate development of \texttt{AdaCap}{} for more recent architectures including attention-mechanism to handle heterogeneity in data . Finally, we note that the scope of applications for \texttt{AdaCap}{} is not restricted to tabular data. The few experiments we carried out on MNIST and {\texttt{CNN}}{} architectures were promising. We shall also further explore this direction in a future work. \subsection{{\text{TD}}{} benchmark results} \textbf{There is no such thing as "SOTA" for {\text{TD}}.} In our benchmark, the most proficient method, CatBoost, is beaten on 43 out of the 67 datasets we used. The set of existing competitive methods is very large. Out of the 30 candidate methods we included in our study, 20 outperformed all others on at least one dataset. Methods which are neither GBDT, {\texttt{DNN}}{} or ${\texttt{RF}}$ based are not included in any \textcolor{red}{aforementionned (pas mentionn\'e avant} benchmark. Yet, they outperformed all other methods on $9$ datasets which is more or less the number of datasets considered in these benchmarks. We tried $5$ different implementations of GBDT, Catboost was beaten by at least one of those on $?$ datasets. \paragraph{Benchmark description.} {\text{TD}}{} are very diverse. \textcolor{red}{Plus de details sur l'origine des jeux de donnees.} We included 67 datasets from Kaggle, Uci and openml covering diverse domains with sample size ranging from $57$ to $11M+$ and the number of features from $4$ to $4K+$, with a diverse range of continuous/categorical mixtures. The tasks include $31$ regressions, $24$ binary classification and $13$ multiclass.\\ Data scarcity is a frequent issue in tabular learning tasks \cite{Chahal2021Small}. Transfer learning is almost never applicable for TD, so handling the small sample regime is often an important issue. We included $32$ datasets with less than $1000$ observations. For all large datasets, we repeated all experiments for different train sizes.\\ $\bullet$ Although HPO can drastically increase the performance of some methods on some large datasets, it also most often multiply the compute cost by a factor of $500$ ($5$ Fold CV $*$ $100$ iterations). We did experiment on HPO on a subset of datasets nonetheless.\\ $\bullet$ and META learning schemes\textcolor{red}{a completer}\\ $\bullet$ Handling categorical features is another difficult challenge in {\text{TD}}{}, but beyond the scope of this paper. We only applied \texttt{AdaCap}{} to simple architectures combined with one-hot-encoding. We implemented MLP with either dense layers, resblocks, gated linear units, or SELU activations. We always used $Adam$ and $OneCycleLearningRate$ with early stopping. We used $batch norm$ and $dropout = 0.1$ for regular {\texttt{DNN}}{} and no explicit regularization scheme for \texttt{AdaCap}{}. Table ... details the characteristics of each architecture evaluated.\\ \paragraph{main takeaways} \textbf{There is no such thing as "SOTA" for {\text{TD}}.} In our benchmark, the most proficient method, CatBoost, is beaten on 43 out of the 67 datasets we used. The set of existing competitive methods is very large. Out of the 30 candidate methods we included in our study, 20 outperformed all others on at least one dataset. Methods which are neither GBDT, {\texttt{DNN}}{} or ${\texttt{RF}}$ based are not included in any \textcolor{red}{aforementionned (pas mentionn\'e avant} benchmark. Yet, they outperformed all other methods on $9$ datasets which is more or less the number of datasets considered in these benchmarks. We tried $5$ different implementations of GBDT, Catboost was beaten by at least one of those on $?$ datasets. \paragraph{Performance evaluation metrics.} $\bullet$ For each dataset, we used the following train-test split strategies: we did $10$ random $80/20$ train-test split without stratification. We also did $10$ train-test splits with train sizes in $\left\lbrace 50 * 2^d,\; 0\leq d\leq 8 \right\rbrace$ with stratification (for both regression an classification tasks).\\ $\bullet$ For each non-deterministic method, we used $1$ random seed for each train-test split, and evaluated on both train and test set the $R2-score$ and $RMSE$ or $Accuracy$ and {\it Area Under Curve} for regression and classification respectively (in a {\it one-versus-rest} fashion for multiclass).\\ \paragraph{Compared methods.} \textbf{There is no such thing as "SOTA" for {\text{TD}}.} In our benchmark, the most proficient method, CatBoost, is beaten on 43 out of the 67 datasets we used. The set of existing competitive methods is very large. Out of the 30 candidate methods we included in our study, 20 outperformed all others on at least one dataset. Methods which are neither GBDT, {\texttt{DNN}}{} or ${\texttt{RF}}$ based are not included in any \textcolor{red}{aforementionned (pas mentionn\'e avant} benchmark. Yet, they outperformed all other methods on $9$ datasets which is more or less the number of datasets considered in these benchmarks. We tried $5$ different implementations of GBDT, Catboost was beaten by at least one of those on $?$ datasets. We included in our study {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} ), {\texttt{MARS}}{} \cite{Friedman1991} (using the py-earth implementation) and the scikit learn implementation of {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random}, Ridge Kernel and Nu-{\texttt{SVM}}{} \cite{Chihchung2011}, {\texttt{MLP}}{} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}, \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}, \texttt{Adaboost}, and {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}. See Appendix \ref{app:datamodellist} for the exhaustive lists of methods and the description of datasets included in our benchmark as well as our preprocessing. \paragraph{{\texttt{DNN}}{} training protocol.} \paragraph{Overall performance comparison.} For concision, we precise for each method the number of times it outperformed all others as $METHOD$, $R:x$, $CLF:y$ where $x$ is the number of datasets for regression and $y$ is the number for classification.\\ $\bullet$ For GBDT algorithms we included Catboost with default hyperparameter values. In agreement with its reputation, it outperformed the other models on more datasets than any other method, but still in a minority of cases. Please note this came at the cost of compute time, since it is also the slowest one with an average training time of $?$ which is not really in tune with our benchmark philosophy. We also evaluated CATboost with another set of hyper-parameters designed to improve the time/performance tradeoff. It divided average training time by $?$ and still outperformed all other methods on $ $ datasets. We also included XGBoost $ ?$, LightGBM $ ?$, and the scikit learn implementation of $xgb$ $ ?$, and adaboost $? $. This means that even less popular implementations of GBDT are still relevant.\\ $\bullet$ For other tree based methods, we included the scikit learn implementations of ${\texttt{RF}}$ $ ?$, ${\texttt{XRF}}$ $ ?$, ${\texttt{CART}}$ $ ?$ and ${\texttt{XCART}}$ $ ?$. Noticeably, ${\texttt{XRF}}$ outperforms ${\texttt{RF}}$ on $?$ out of $?$ datasets.\\ $\bullet$ Linear models (\texttt{Lasso}{} $?$, {\texttt{Elastic-Net}}{} $?$, {\texttt{Ridge}}{} $?$, Logistic Regression $? $) are the only ones where we allowed moderate HPO, picking the regularization level with cross validation. Noticeably, \texttt{Lasso}{} and {\texttt{Elastic-Net}}{} outperformed all other models in $?$ out of the $?$ datasets with more than $?$ features.\\ $\bullet$ We also included Kernel $? $ and NuSVM $? $, and the pyearth implementation of Multivariate Adaptive Regression Splines (MARS) $? $. These results are in accordance with the aforementionned philosophy, only $?$ methods never came first. Il manque un point sur \textcolor{red}{COMMENTAIRE IMPORTANCE SMALL DATASETS: few shot learning??? \cite{Ng2016Nuts,Chahal2021Small}} \paragraph{Behavior and Properties of \texttt{AdaCap}{} w.r.t {\texttt{FFNN}}{} architecture} - trainmet marche mieux avec des réseaux larges\\ - trainmet marche mieux avec des batch larges\\ - trainmet se combine très bien avec resblock, très mal avec dropout et batchnorm\\ - trainmet requires earlystopping\\ - Il faut pas mettre de coefficient devant les termes de MLR ça marche moins bien.\\ - Commentaire sur l'impact de la profondeur sur trainmet\\ \paragraph{Comparison training {\texttt{FFNN}}{} without and without \texttt{AdaCap}{}.} - sur les petits modèles trainmet est bcp plus long que la méthode classique, sur les gros modèle c'est pas le cas\\ - trainmet loss match beaucoup plus la perf de généralization que la loss normale (et on devait s'y attendre!)\\ - trainmet loss est beaucoup plus stable que standard loss, beaucoup/pas d'estimation \\ - trainmet est-il plus fiable que regularnet? plus souvent dans le top? Moins de fois très mauvais?\\ - Trainmet marche bien aussi avec des convnets, la plus value est très importante sur un trainset plus petit\\ \paragraph{What \texttt{AdaCap}{} is good at.} - Adacap is much more appropriate for regression tasks: it never came first for classification (NN only came first 3/ 21 times actually anyway) but it came first 6 / 27 times in regression. We will know focus on regression: - IF we compare only NN with GBDT: Without including Adacap in the picture, Deep NN come first 9 times out of 31, By adding Adacap to the mix of available NN tricks, we get the NN family to win 12/31 times (Adacap is best 8 times) Meaning the DNN family wins 50\% more often with the addition of Adacap against Catboost. - If we include all families: without adacap : GBDT wins 16, NN 7 RF 4 SVM 2 GLM 2, meanwhile, with adacap : GBDT wins 16, NN+Adacap 8 Adacap 6 , RF 4 SVM 2 NN 2 GLM 1 - If setting a time budget, the number of times Adacap + NN comes first vary a lot: for 1sec :0/1, for 10sec 5/4, for 60sec 6/2, - In terms of average RMSE, the pictures is more favorable to Adacap, which has a decisive impact on average performance. Being good all around leads to low average RMSE. There, the best Adacap architecture (selu) comes at 0.413024, Catboost at 0.417636, while without adacap, the best regular NN (glu) at 0.422760, RF at 0.438172, NuSVM at 0.472135, MARS at 0.493821, Enet at 0.499256 - On datasets with high signal to noise ratio (the 9/31 datasets for which the best possible RMSE is under 0.3, Adacap+resnet+glu comes at 0.161896 (Adacap+selu at 0.164808) regular NN (glu) at 0.165464, Catboost at 0.200510. Noticeably these 9 datasets have a diverse number of samples : 82, 167, 245, 512, 7008, 8000, 36584 but always a somewhat low number of features: 7, 9, 13, 15, 22, 26. - In terms of time comparison, Best Adacap (selu with 2 hidden layers) takes 20.709967 in average on the 27 seven regression datasets, Catboost 96.610780 seconds and NN glu (3layers deep) 10.382365 seconds. RF takes 4.010701 nuSVM 13.213286 MARS 1.741683 Enet 0.290724 and CART 0.066393. What is very interesting is that Adacap is faster than regular net for some big architectures: for resblock, 17.830224 vs 18.747128 - In terms of time comparison on the 15 datasets with less then 1000 samples, Best Adacap (selu with 2 hidden layers) takes 4.528561 seconds in average on the 15 seven regression datasets, Catboost 38.132730 seconds and NN glu (3layers deep) 4.854471 seconds. RF takes 0.302734 nuSVM 0.065009 MARS 0.287235 Enet 0.246365 and CART 0.005134. What is very interesting is that for these small datasets, Adacap is faster than regular net for some big architectures: for resblock, 3.567358 vs 4.252559 -REFAIRE TIME COMPARISON AND AVERAGE RMSE AVEC: mise GEN à 0 si erreur - Adacap is much more appropriate for regression tasks: it never came first for classification (NN only came first 3/ 21 times actually anyway) but it came first 6 / 27 times in regression - Avec budget temps limité \paragraph{What \texttt{AdaCap}{} is good at.} - trainmet est le plus utile pour aller chercher les derniers points de généralisation sur des jeux de donnée midsize\\ \paragraph{Few shot learning.} -\cite{Ng2016Nuts,Chahal2021Small}\\ - trainmet marche bien aussi avec des convnets, la plus value est très importante sur un trainset plus petit\\ - Pour le même dataset, selon la taille du train size le classement des méthodes peut changer du tout au tout, besoin de tester plusieurs trainsize pour comprendre\\ \paragraph{HPO vs bagging} - En faisant du bagging on peut améliorer significativement ça peut être bcp plus efficace et bcp moins cher \\ \paragraph{Meta Learning} - En faisant du métalearning on peut dépasser la meilleure méthode avec d'autre, donc la meilleure méthode suffit pas\\ \paragraph{Where are we at on Tabular datasets?} - C'est important d'avoir une diversité de dataset et méthodes\\ - Commentaire sur la taille des données qui cela favorise\\ - Les méthodes les plus réputées le sont quand même pour de bonnes raisons\\ - Catboost reste l'algo qui marche le mieux le plus souvent\\ - trainmet est parfois meilleur\\ - Plein de méthodes différentes sont parfois les meilleurs il faut continuer à tester plein de méthodes sur les benchmarks\\ -Il y a pas vraiment un trade off temps performance, les temps de calcul varient énormément entre méthodes, et entre implémentations\\ - c'est quoi les méthodes qui sont jamais les meilleurs, c'est lesquels qu'on peut commencer à exclure, qui sont toujours moins bonne qu'une autre?\\ - les métriques utilisées impactes beaucoup les résultats du benchmark, R2 vs RMSE\\ - Le nombre de seed est important pour le découpage train test, d'une seed à l'autre les résultats peuvent bcp changer.\\ - Les tabular dataset c'est encore un champ très ouvert, on peut pas pour l'instant choisir une solution unique ou même restreindre à quelques candidats.\\ \paragraph{A classer.} Voir : - à feature équivalente, si on change la target on a le classement qui change, l traitement des features fait pas tout\\ - La gestion des features catégorielles est pas le seul axe d'amélioration, sur des jeux de données sans feature cat il y a encore bcp de chose à dire/à faire.\\ - C'est important de regarder les tailles de données, ça suffit pas de regarder juste la classification. \\ - shrinkage peut déjà améliorer beaucoup, ensuite MLR est une upgrade\\ - La seed influence surtout le train valid cut pour l'early stopping, pas le choix des permuts\\ - trainmet est-il parfois vraiment bien meilleur que les autres? \\ \paragraph{Deja inclus dans la discussion benchmark description.} - beaucoup de dataset + beaucoup de seed + beaucoup de méthodes = coûte cher et compliqué, tâche trop générale, il faudrait peut être restreindre ou segmenter le problème pour pouvoir mieux progresser.\\ \subsection{BENCHMARK AND TABULAR DATASETS} We illustrate the potential of \texttt{AdaCap}{} on a benchmark containing \textcolor{red}{67} tabular datasets in regression (\textcolor{red}{31}), binary (\textcolor{red}{24}) and multiclass (\textcolor{red}{13}) classification, against a large set of popular methods({\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{XGBoost}}{}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, \cite{guestrin2016},{\texttt{LightGBM}}{} \cite{Ke2017}, {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random}, {\texttt{SVM}} and kernel-based \cite{Chihchung2011}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}, {\texttt{MARS}}{} \cite{Friedman1991}, \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse} ). For Deep Learning architectures, we combined and compared \texttt{AdaCap}{} with . We left out deep learning methods designed to tackle categorical features as it is not the aim focus of this benchmark and of our proposed method (mainly TabNet\cite{}, Nodes\cite{}, RT transformers\cite{}). We timed on a subset of datasets and random seeds the use of Hyper-parameter optimization, \cite{zimmer-tpami21a, feurer-arxiv20a} which is both outside of the considered usecase and irrelevant to \texttt{AdaCap}{} since this method \textbf{does not introduce new tunable hyper-parameters}. Also note that some technique which require HPO are not Until recently, there was very little interest for {\text{DL}}{} on tabular datasets, which fall behind other type of algorithms. Very recently, there has been a renewed interest in the subject, with several new methods \cite{kadra2021welltuned,fiedler2021simple,zimmer-tpami21a,gorishniy2021revisiting,kadra2021welltuned} and benchmarks \cite{SHWARTZZIV202284,fiedler2021simple,gorishniy2021revisiting}. See \cite{borisov2021deep} for an extensive review of the state of the art on tabular datasets. Current benchmarks heavily focus on the AutoML (\cite{zoller2021benchmark,yao2018taking,he2021automl}) usecase \cite{zimmer-tpami21a, feurer-arxiv20a}, using costly hyper-parameter tuning over a small collection of very popular big datasets which raised some concerns \cite{koch2021reduced,denton2021genealogy}. We tried to design a benchmark with a larger diversity of sizes and sources while focusing on usecases where models are trained in no more than a few minutes on a personal computer, as is common in most data-science projects \cite{paleyes2020challenges}. COMMENTAIRE IMPORTANCE SMALL DATASETS: \cite{Ng2016Nuts,Chahal2021Small} \paragraph{The goal of this benchmark.} Phrase objectif de l'etude. \paragraph{\texttt{AdaCap}{} Methods.} We evaluate \texttt{AdaCap}{} variants, namely,...\\ We compare our methods to \paragraph{Compared models.} See Appendix \ref{} for the exhaustive list of compared methods and details about their implementations. \paragraph{Datasets.} \paragraph{Performance metrics.} \paragraph{Results.} \paragraph{Considered models.} \textcolor{red}{A REPRENDRE et METTRE DANS LA PARTIE SUIVANTE.} We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. See the supplementary material for the the github repository, the detailed description of our experimental setting and the exhaustive list of compared methods with their performances. To train \eqref{eq:ridgeMLRNN}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ which depends on the number of layers $L$. Weights $\boldsymbol{\theta}$ are initialized as in \cite{Gloriotetal} and $\lambda_{init}$ is chosen to maximize sensitivity of the $\texttt{\,MLR $\,$}{}$ metric to variation of $\lambda$ \sout{(See \eqref{lambdainiti} below for our heuristic rule)}. Our empirical investigations revealed that the obtained $\widehat{\lambda}$ after training is close to the optimal oracle choice of $\lambda$ on the test set. The complete training protocol is provided in Appendix \ref{sec:appprotocol}. \textcolor{red}{RAJOUTER UNE EXPERIENCE POUR CONFIRMER} \subsection{Setting.} \paragraph{Benchmark description.} To produce this benchmark we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules detailed in the appendix ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \paragraph{Preprocessing.} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot-encoding for categorical values and standardization for numerical features and target. We repeated our experiments 10 times using a different $80:20$ $train$/$test$ split of the data and no stratification scheme. \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. In the rest of the paper, we only display the main classes of methods in Table \ref{tab:methods}. \subsection{Ablation Analysis.} \begin{table}[h] \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline {\texttt{FFNN}} & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline + Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline + Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $\\ \hline \end{tabular} \caption{Ablation Study for \texttt{\,MLR $\,$}{} in Regression. } \end{table} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets with different sample sizes and feature to sample ratios. We repeated each experiment over 100 random $train$/$test$ splits. All the results presented here correspond to the architecture and hyperparameters of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{}. A standard {\texttt{FFNN}}{} of $2$ layers with a wide architecture ($J=1024$) cannot be trained efficiently on such small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark (Table \ref{tab:perfR2_rank}). Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach. \textcolor{red}{ In our experiments, we see that both Ridge regularization and random permutations yield an improvement of the generalization performance. Even better, their effects stack up so that a single \textbf{NN}{} trained with the \texttt{\,MLR $\,$}{} method can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging on top of the \texttt{\,MLR $\,$}{} method is still of the same order of magnitude ($0.062$) as the one we got when we applied random permutations on top of Ridge regularization to the {\texttt{FFNN}}{} ($0.043$). This means the two ingredients of the \texttt{\,MLR $\,$}{} method (random permutations and Ridge regularization) are not just simple variance reduction techniques like bagging but actually work in a more sophisticated way to build generalizing models. See again Figure \ref{} which reveals highly structured embeddings on the last hidden layer of the trained \textbf{NN}.} \subsection{Overall Performance comparisons.} \begin{table}[H] \label{tab:perfR2_rank} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean ${\texttt{R}^2}$-score & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline \texttt{\,MLR $\,$} & $2.525 \pm 1.355$ & $0.744 \pm 0.022$ & $0.963$ & $0.856$ & $0.719$ & $0.946 \pm 0.089$\\ {\texttt{GBDT}} & $2.719 \pm 1.850$ & $0.726 \pm 0.093$ & $0.863$ & $0.756$ & $0.650$ & $0.898 \pm 0.237$\\ {\texttt{RF}} & $3.538 \pm 1.896$ & $0.724 \pm 0.070$ & $0.825$ & $0.681$ & $0.481$ & $0.914 \pm 0.159$\\ {\texttt{SVM}} & $4.281 \pm 1.534$ & $0.711 \pm 0.068$ & $0.831$ & $0.594$ & $0.362$ & $0.882 \pm 0.172$\\ {\texttt{NN}{}} & $4.331 \pm 2.206$ & Aberating value & $0.725$ & $0.606$ & $0.475$ & Aberating value \\ {\texttt{MARS}} & $5.644 \pm 1.623$ & $0.677 \pm 0.066$ & $0.537$ & $0.350$ & $0.163$ & $0.861 \pm 0.167$\\ {\texttt{LM}} & $5.938 \pm 1.804$ & $0.658 \pm 0.094$ & $0.531$ & $0.294$ & $0.156$ & $0.837 \pm 0.179$\\ {\texttt{TREE}} & $7.125 \pm 1.613$ & $0.512 \pm 0.237$ & $0.338$ & $0.188$ & $0.119$ & $0.578 \pm 0.570$\\ {\texttt{Baseline}} & $8.900 \pm 0.375$ & $-0.023 \pm 0.211$ & $0.000$ & $0.000$ & $0.000$ & $-0.031 \pm 0.075$\\ \hline \end{tabular} } \caption{\textbf{Performances of the best method in each class of methods} for the regression task on our benchmark. {\texttt{P90}}, {\texttt{P95}}, {\texttt{P98}}: the number of datasets a model achieves 90\%, 95\%, 98\% or more of the maximum test ${\texttt{R}^2}$-score respectively, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \end{table} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods for the regression task.} {\texttt{Ens-MLR}}{} with a {\texttt{P98}}{} of $0.719$ on the whole benchmark and Friedman Rank of $2.525$ is above {\texttt{GBDT}}{}, with a {\texttt{P98}}{} of $0.65$ and Friedman Rank $2.719$ in Table \ref{tab:perfR2_rank}. As revealed by its {\texttt{PMA}}{} statistics at $0.946 , {\texttt{Ens-MLR}}{} is far ahead of the other methods. This means that \texttt{\,MLR $\,$}{} produces reliable results at a rate that is even above methods like {\texttt{RF}}{} which are often deemed the safest pick. Standard {\texttt{NN}{}}{} with equivalent architecture and {\texttt{MSE}}{} loss performs poorly with a Friedman rank of $4.331$. Noticeably, {\texttt{Ens-MLR}}{} was most often the best method among all the \texttt{\,MLR $\,$}{} methods \begin{table}[h] \caption{\textbf{Performances of the best method in each class of methods} for the classification task with the accuracy score.} \label{tab:ACCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{Acc.}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.769 \pm 0.998$ & $0.889 \pm 0.038$ & $0.963$ & $0.881$ & $0.819$ & $0.971 \pm 0.054$\\ \texttt{\,MLR $\,$} & $2.913 \pm 1.403$ & $0.882 \pm 0.031$ & $0.963$ & $0.869$ & $0.800$ & $0.956 \pm 0.070$\\ {\texttt{RF}} & $3.056 \pm 1.415$ & $0.882 \pm 0.038$ & $0.912$ & $0.819$ & $0.656$ & $0.958 \pm 0.063$\\ {\texttt{GLM}} & $3.756 \pm 1.561$ & $0.862 \pm 0.060$ & $0.806$ & $0.631$ & $0.463$ & $0.940 \pm 0.062$\\ {\texttt{TREE}} & $4.763 \pm 1.195$ & $0.836 \pm 0.062$ & $0.731$ & $0.381$ & $0.237$ & $0.908 \pm 0.084$\\ {\texttt{QDA}} & $5.675 \pm 1.688$ & $0.723 \pm 0.160$ & $0.338$ & $0.194$ & $0.169$ & $0.796 \pm 0.159$\\ {\texttt{Baseline}} & $6.856 \pm 1.574$ & $0.593 \pm 0.168$ & $0.069$ & $0.025$ & $0.025$ & $0.661 \pm 0.133$\\ {\texttt{NN}{}} & $7.213 \pm 0.980$ & $0.565 \pm 0.152$ & $0.025$ & $0.013$ & $0.013$ & $0.625 \pm 0.136$\\ \hline \end{tabular} } \end{table} \begin{table} \caption{\textbf{Performances of the best in each class of methods} for the classification task with {\texttt{AUC}}{} score.} \label{tab:AUCperf} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Class & & & & & & \\ of Methods & {\texttt{F. Rank}} & Mean {\texttt{AUC}} & {\texttt{P90}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline \hline {\texttt{GBDT}} & $1.738 \pm 1.190$ & $0.918 \pm 0.048$ & $0.938$ & $0.912$ & $0.875$ & $0.963 \pm 0.108$\\ \texttt{\,MLR $\,$} & $2.900 \pm 1.304$ & $0.908 \pm 0.012$ & $0.912$ & $0.844$ & $0.694$ & $0.952 \pm 0.106$\\ {\texttt{RF}} & $2.938 \pm 1.390$ & $0.912 \pm 0.047$ & $0.931$ & $0.887$ & $0.706$ & $0.956 \pm 0.095$\\ {\texttt{LM}} & $3.881 \pm 1.572$ & $0.889 \pm 0.060$ & $0.775$ & $0.662$ & $0.475$ & $0.935 \pm 0.094$\\ {\texttt{NN}{}} & $4.856 \pm 1.545$ & $0.843 \pm 0.154$ & $0.706$ & $0.506$ & $0.412$ & $0.896 \pm 0.155$\\ {\texttt{TREE}} & $5.975 \pm 1.160$ & $0.813 \pm 0.091$ & $0.394$ & $0.212$ & $0.212$ & $0.852 \pm 0.119$\\ {\texttt{QDA}} & $6.031 \pm 1.371$ & $0.772 \pm 0.149$ & $0.394$ & $0.256$ & $0.150$ & $0.818 \pm 0.152$\\ {\texttt{Baseline}} & $7.681 \pm 1.084$ & $0.499 \pm 0.151$ & $0.006$ & $0.000$ & $0.000$ & $0.537 \pm 0.072$\\ \hline \end{tabular} } \end{table} For binary classification task with the usual accuracy score, \texttt{\,MLR $\,$}{} is a close second behind {\texttt{GBDT}}{} both in terms of Accuracy and {\texttt{AUC}}{} scores. \subsection*{Replicability} Our Python code is released as an open source package for replication: \href{https://github.com/anonymousNeurIPS2021submission5254/SupplementaryMaterial}{github/anonymousNeurIPS2021submission5254/}. \subsection*{Configuration machine} We ran our experiments using several setups and GPU's: \begin{itemize} \item Google Cloud Plateform: NVIDIA Tesla P100, \item Google Colab : NVIDIA Tesla TESLA K80 and NVIDIA Tesla TESLA T4, \item Personal Computer : NVIDIA RTX 2080 Ti and NVIDIA RTX 2080 MaxQ. \end{itemize} \section{State of the Art} We complete here the review of the existing literature on deep learning on tabular data. An interesting line of research proposes to transpose the "leverage weak learners" idea underlying ensemble methods into neural networks. \cite{Olson2018moderna} proposes an interpretation of fitted {\texttt{FFNN}}{} as ensembles of relatively weakly correlated, low-bias sub-networks. Thus this paper provides some insight on the generalization ability of overparametrized {\texttt{FFNN}}{} on small datasets. Their experiments concerns binary classification on the UCI dataset but they did not attempt to outperform ensemble methods as it was not the goal of this work. The paper \cite{Arora2020meuf} carried out a study of Neural Tangent Kernel ({\texttt{NTK}}) induced by infinitely wide neural networks on small classification tasks. {\texttt{NTK}}{} slightly outperforms {\texttt{RF}}{} implemented as in \cite{Delgado14a} on small UCI data sets ($n\leq 5000$). {\texttt{NTK}}{} performs well on small size ($n \leq 640$) subsets of the CIFAR-10 benchmark but is inferior to ResNet-34 for larger size. However their architecture does not cover the regression task. Moreover, the super-quadratic running time of {\texttt{NTK}}{} limits its use in large scale learning tasks. {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} is an end-to-end {\text{DL}}{} model to handle tabular data. Its architecture is designed to emulate Boolean formulas in decision making. However, {\texttt{XGBoost}}{} outperforms {\texttt{Net-DNF}}{} in their experiments. \cite{Klambauer2017} proposes Self-Normalized Neural Networks ({\texttt{SNN}}) based on the {\texttt{SELU}}{} activation function to train very deep feed-forward neural networks more efficiently. {\texttt{SNN}}{} architecture is motivated as it makes SGD more stable. However {\texttt{SNN}}{} requires careful tuning of hyperparameters and does not outperform {\texttt{SVM}}{} or {\texttt{RF}}{} on the UCI database. \section{The \texttt{\,MLR $\,$}-{\texttt{FFNN}}{}}\label{secMLRloss} \subsection{The \texttt{\,MLR $\,$}{} loss} Recall $$\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{n\times n},$$ Where $\textbf{A}^{L-1}$ denotes the last hidden layer. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer of the {\texttt{FFNN}}; $(ii)$ the close-form we choose is the ridge instead of the OLS, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. This measure is actively used to penalize overfitting during the training phase. This is the underlying mecanism behind the \texttt{\,MLR $\,$}{} loss. First, when we take a permuted label vector we obtain a new label vector with two properties. First both $\textbf{Y}$ and $\pi(\textbf{Y})$ admit the same marginal distributions. This new vector can be seen as a "realistic" data-augmented new sample for the training set. Second the expected number of fixed points ($\pi(i) = i$) in a permutation drawn uniformly at random is equal to $1$ (See Chapter 5 in \cite{permutebook}); $i.e.$ the proportion of fixed points in a random permutation of $n$ elements is insignificant. Thus the label permutation breaks the dependence relationship between $Y_{\pi(i)}$ and $\textbf{x}_i$. Therefore, $\textbf{x}_i$ provides no information on the possible value of $Y_{\pi(i)}$ and predicting $Y_{\pi(i)}$ using $\textbf{x}_i$ can only result in overfitting. In other words, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \subsection{Cross-Entropy loss} In the classification task, the {\texttt{FFNN}}{} architecture is essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a {\texttt{Sigmoid}}{} and the Cross Entropy (\texttt{CE}) loss. (namely \texttt{torch.nn.BCEWithLogitsLoss} in PyTorch and referred to as {\texttt{BCE}}{} in this paper). Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \bigskip \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} \bigskip The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. Note that $\textbf{Y}^*$ with values in $\{-1,1\}$ is the symmetrized version of $\textbf{Y}$. Next, the Structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. \begin{mydef}[\texttt{BCE-MLR-NN}] Our \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} and $\textbf{P}(\cdot,\cdot,\textbf{x})$ $s.t.$ , $\textbf{P}=\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}$. \end{mydef} \bigskip \section{Training a {\texttt{FFNN}}{} with \texttt{\,MLR $\,$}} \paragraph{The \textbf{NN}{} Architecture.} We consider {\texttt{FFNN}}{} with $L$ layers, $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$, and with all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$). \begin{table}[H] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} \paragraph{Dither{} \cite{dither}.} This step is distinct from the Structured dithering that we introduced in the \texttt{\,MLR $\,$}{} method. In the regression setting, we do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ but rather on a noisy version of $\textbf{Y}$ as is usually done in practice. Let $\epsilon,\,(\epsilon^t)_t\,\overset{i.i.d}{\sim}\ensuremath{\mathcal{N}}(\boldsymbol{0},\tilde\sigma^2\ensuremath{\mathbb{I}})$. We set $\textbf{Y}_{\epsilon}=\textbf{Y}+\epsilon$ and $\pi_{\epsilon}^t(\textbf{Y})=\pi^t(\textbf{Y})+\epsilon^{t}$. In our experiments, we use the \texttt{\,MLR $\,$}{} loss on $\left(\textbf{Y}_{\epsilon},\left(\pi_{\epsilon}^t(\textbf{Y})\right)_{t=1}^T\right)$ instead of $\left(\textbf{Y},\left(\pi^t(\textbf{Y})\right)_{t=1}^T\right)$. \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}_{\epsilon}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}_{\epsilon}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi_{\epsilon}^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi_{\epsilon}^t(\textbf{Y})\right)\right|. \end{align*} Here again, $\tilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\tilde\sigma=0.03$ for all the datasets in our benchmark. Moreover, in our approach the batch size $b_s$ is not a hyperparameter as we fix it as in table above. Note that we do not apply this dither step in the classification setting. \paragraph{Initialization of $\boldsymbol{\theta}$.} The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \medskip \begin{mdframed} \underline{Recall $|{\texttt{input}}|=d$ and $|{\texttt{out}}|$=1} \medskip $\forall\ell\in\llbracket1,L-1 \rrbracket$, $b^{\ell}=\boldsymbol{0}$. The entries of $W^\ell$ are generated independently from the uniform distribution on the interval $\ensuremath{\mathcal{I}}_\ell$ : \begin{itemize} \item[$\bullet$] $\ensuremath{\mathcal{I}}_1=\left(-\sqrt{\frac{6}{(d+J)}},\sqrt{\frac{6}{(d+J)}}\right)$ and $\,\ensuremath{\mathcal{I}}_L=\left(-\sqrt{\frac{6}{(d+1)}},\sqrt{\frac{6}{(d+1)}}\right)$ \item[$\bullet$] $\ensuremath{\mathcal{I}}_\ell=\left(-\sqrt{\frac{6}{(J+J)}},\sqrt{\frac{6}{(J+J)}}\right)$, $\forall\ell\in\llbracket2,L-1 \rrbracket $ \end{itemize} \end{mdframed} \bigskip \paragraph{Efficient heuristic to initialize the Ridge parameter.} In our experiments, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray*} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray*} The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \bigskip \paragraph{Choice of the number of iterations during the train.} \begin{itemize} \item [$\bullet$] We fix the maximum number of iterations $\texttt{max}_{{\texttt{Iter}}}$ (depending on the value of $L$). \item [$\bullet$] We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the allotted time {\texttt{FixB}}. \item [$\bullet$] We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, $i.e.$ $${\texttt{Iter}}= \min(\texttt{max}_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$$ \end{itemize} \bigskip \paragraph{Training \texttt{\,MLR $\,$}{}-NN.} We train the {\texttt{FFNN}}{} with $b_s=\min(J,n)$ and we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ which depends on the number of layers $L$ (Table~\ref{tab:architectures1}). \medskip \begin{mdframed} $ \begin{array}{l} \textbf{Training}\\ \quad \left|\begin{array}{llll} \textbf{Initialization}\\ \quad \left| \begin{array}{ll} \textbf{\texttt{set}}\,\boldsymbol{\theta} \\ \textbf{\texttt{set}}\,\lambda \\ \end{array} \right.\\ \textbf{Optimization}\\ \quad \left| \begin{array}{ll} \textbf{{while}}\,\, e < {\texttt{Iter}} \,\,\,\textbf{{do}}:\\ \quad \left| \begin{array}{llllll} \textbf{A}^{0}-> \textbf{x}\in\mathbb{R}^{b_s\times d}\\ \textbf{{for}}\,\, \ell = 1 \cdots L-1:\\ \quad \left|\begin{array}{l} \textbf{A}^{\ell} -> {\texttt{ReLU}}(\textbf{A}^{\ell-1}W^{\ell} +B^{\ell}) \end{array} \right.\\ \textbf{H}(\boldsymbol{\theta},\lambda) -> \textbf{A}^{L-1}\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}{\textbf{A}^{L-1}}^\top\\ \texttt{Compute }\, \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \quad \text{or}\quad \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda \\ \textbf{Backpropagate }\, (\boldsymbol{\theta},\lambda) \textbf{ through }\, \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \quad \text{or}\quad \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda)\\ e -> e+1\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} \right.\\ \end{array} $ \end{mdframed} We select a $validation$-set of size $n_{val}=20\%\, n$. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: $${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}.$$ Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$ \bigskip \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. Our models are:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively).\\ $\bullet$ {\texttt{Best-MLR}}{}: the best prediction among 20 \textbf{NN}{} in terms of the validation score.\\ $\bullet$ {\texttt{Top5-MLR}}{}: the aggregation of the top 5 among 20 \textbf{NN}{} in terms of the validation score. For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \section{Construction of the Benchmark} To produce this benchmark (Table~\ref{tab:datasets}), we aggregated 32 tabular datasets (16 in regression and 16 in classification), from the UCI repository and Kaggle. For computational reasons, we have chosen to restrict the number of datasets but we performed more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). \begin{table}[H] \caption{Benchmark datasets. \# Num. and \# Cat. denote the initial number of numerical and categorical features respectively. We denote by $d$ the number of features after the pre-processing and one-hot encoding.} \label{tab:datasets} \centering \footnotesize \begin{tabular}{|l|c|c|c|c|c|} \hline Description & Task & $n$ & $d$ & \# Num. & \# Cat. \\ \hline \hline Concrete Slump Test -2 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0 $ \\ \hline Concrete Slump Test -3 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0 $ \\ \hline Concrete Slump Test -1 & \texttt{Reg} & $ 103$ & $8$ & $8$ & $0 $ \\ \hline Servo & \texttt{Reg} & $ 168$ & $24$ & $2$ & $4 $ \\ \hline Computer Hardware & \texttt{Reg} & $ 210$ & $7$ & $7$ & $0 $ \\ \hline Yacht Hydrodynamics & \texttt{Reg} & $ 308$ & $33$ & $5$ & $3 $ \\ \hline QSAR aquatic toxicity & \texttt{Reg} & $ 546$ & $34$ & $8$ & $3 $ \\ \hline QSAR Bioconcentration classes & \texttt{Reg} & $ 779$ & $25$ & $8$ & $4 $ \\ \hline QSAR fish toxicity & \texttt{Reg} & $ 909$ & $18$ & $6$ & $2 $ \\ \hline insurance & \texttt{Reg} & $ 1338$ & $15$ & $3$ & $4 $ \\ \hline Communities and Crime & \texttt{Reg} & $ 1994$ & $108$ & $99$ & $2 $ \\ \hline Abalone R & \texttt{Reg} & $ 4178$ & $11$ & $7$ & $1 $ \\ \hline squark automotive CLV training & \texttt{Reg} & $ 8099$ & $77$ & $7$ & $16 $ \\ \hline Seoul Bike Sharing Demand & \texttt{Reg} & $ 8760$ & $15$ & $9$ & $3 $ \\ \hline Electrical Grid Stability Simu & \texttt{Reg} & $ 10000$ & $12$ & $12$ & $0 $ \\ \hline blr real estate prices & \texttt{Reg} & $ 13320$ & $2$ & $2$ & $0 $ \\ \hline Cervical Cancer Behavior Risk & \Clf & $ 72$ & $149$ & $19$ & $14 $ \\ \hline Post-Operative Patient & \Clf & $ 91$ & $32$ & $0$ & $8 $ \\ \hline Breast Cancer Coimbra & \Clf & $ 116$ & $9$ & $9$ & $0 $ \\ \hline Heart failure clinical records & \Clf & $ 299$ & $12$ & $7$ & $5 $ \\ \hline Ionosphere & \Clf & $ 352$ & $34$ & $32$ & $2 $ \\ \hline Congressional Voting Records & \Clf & $ 436$ & $64$ & $0$ & $16 $ \\ \hline Cylinder Bands & \Clf & $ 541$ & $111$ & $1$ & $19 $ \\ \hline Credit Approval & \Clf & $ 691$ & $42$ & $4$ & $8 $ \\ \hline Tic-Tac-Toe Endgame & \Clf & $ 959$ & $36$ & $0$ & $9 $ \\ \hline QSAR biodegradation & \Clf & $ 1056$ & $141$ & $41$ & $15 $ \\ \hline Chess (King-Rook vs. King-Pawn & \Clf & $ 3196$ & $102$ & $0$ & $36 $ \\ \hline Mushroom & \Clf & $ 8125$ & $125$ & $0$ & $21 $ \\ \hline Electrical Grid Stability Simu & \Clf & $ 10000$ & $12$ & $12$ & $0 $ \\ \hline MAGIC Gamma Telescope & \Clf & $ 19021$ & $10$ & $10$ & $0 $ \\ \hline Adult & \Clf & $ 32561$ & $34$ & $6$ & $5 $ \\ \hline Internet Firewall Data & \Clf & $ 65532$ & $11$ & $11$ & $0 $ \\ \hline \end{tabular} \end{table} \subsection{Pre-processing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed uninformative features such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. \paragraph{Target treatment.} The target is centered and standardized via the function $\textbf{{function-T}}(\cdot)$. We remove the observation when the value is missing. \begin{mdframed} $ \begin{array}{l} \textbf{{function-T}}(Y)\\ \quad \left|\begin{array}{ll} Y -> \text{float32}(Y)\\ \textbf{for}\,\, i=1:n\\ \quad \left| \begin{array}{l} {\textbf{if}}\,\, Y_i=={\texttt{NAN}} \\ \qquad\textbf{\texttt{remove}}(x_i,Y_i)\\ \end{array} \right.\\ Y -> \frac{Y-\overline{Y}}{\bar\sigma(Y)}\\ \end{array} \right. \end{array} $ \end{mdframed} \bigskip \paragraph{Features treatment.} The imputation treatment is done during processing. For categorical features, {\texttt{NAN}}{} Data may be considered as a new class. For numerical features, we replace missing values by the mean. Set $n_j=\#\textbf{\texttt{set}}(X_j)$ the number of distinct values taken by the feature $X_j$, We proceed as follows : \begin{itemize} \item[$\bullet$] When $n_j=1$, the feature $X_j$ is irrelevant, we remove it. \item[$\bullet$] When $n_j=2$ (including potentially {\texttt{NAN}}{} class), we perform numerical encoding of binary categorical features. \item[$\bullet$] Numerical features with less than $12$ distinct values are also treated as categorical features ($2<n_j\leq 12$). We apply one-hot-encoding. \item[$\bullet$] Finally, categorical features with $n_j> 12$ are removed \end{itemize} \subsection{Compared methods} \label{sec: ComparedMethod} We ran the benchmark with \textbf{all the methods} (see Table~\ref{tab:methods}) \textbf{available in the scikit-learn library} for classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}) as well as the {\texttt{GBDT}}{} methods. All methods were ran with the default hyperparameters. \begin{table}[H] \caption{Main classes of methods.} \label{tab:methods} \centering \footnotesize \begin{tabular}{|l|l|} \hline Class & \\ of Methods & Methods\\ \hline \texttt{\,MLR $\,$}{} (this paper) & {\texttt{MLR$\textapprox$L}}, {\texttt{Bag-MLR$\textapprox$L}}, {\texttt{Ens-MLR}}, {\texttt{Best-MLR}}, {\texttt{Top5-MLR}} \\ \hline {\texttt{GBDT}} & {\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, {\texttt{XGBoost}}{} \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017} \\ \hline {\texttt{RF}} & {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random} \\ \hline {\texttt{SVM}} & \texttt{Lin-}{\texttt{SVM}}{}, {\texttt{SVM}}{}, $\nu$\texttt{-}{\texttt{SVM}}{} \cite{Chihchung2011}\\ \hline {\texttt{NN}{}} & \texttt{Fast.ai} \cite{Howard2020}, {\texttt{MLP}} \cite{Hinton89connectionistlearning}\\ \hline {\texttt{GLM}} & \texttt{OLS}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}\\ \hline {\texttt{MARS}} & {\texttt{MARS}}{} \cite{Friedman1991}\\ \hline {\texttt{TREE}}& \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse}\\ \hline {\texttt{Baseline}} & Reg: \texttt{Intercept}$\,|\,$ Classif: \texttt{Class probabilities}\\ \hline \end{tabular} \end{table} \section{\texttt{\,MLR $\,$}{} Parameters Analysis} In this section we study the behavior of the \texttt{\,MLR $\,$}{} method and the impact of its key components through extensive evaluation on three datasets, \UCIa, \UCIb{} and \UCIc{}, for which $(n,d)$ are equal to $(103,8)$, $(546,34)$ and $(8760,15)$ respectively. We repeated each experiment over 100 random $train$/$test$ splits. \subsection{Impact of the MLR components.} In this section, we study the impact of the different components in the \texttt{\,MLR $\,$}{} approach on the the ${\texttt{R}^2}$-score on the $test$ and $validation$ sets, computation time, the convergence of the method ({\texttt{Iter}}) and the initialization of the Ridge parameter $\lambda_{init}$. To study the impact of each specific parameter, we set the other ones equal to their default values in Table~\ref{tab:architectures1}. Note that for the following study, we chose a batch size $b_s=\min(n,2^{14})$, unlike in our main experiments where we took $b_s=\min(n,2^{10})$ due to time constraints. Note also that due to access failure to {\texttt{VM}}, computation time was sometimes obtained on a less powerful configuration in Tables \ref{tab:StructDithering}, \ref{tab:Permutation}, \ref{tab:lambdaInit} and \ref{tab:Dithering}. We marked by an asterisk $\boldsymbol{\ast}$ any computation time obtained on the {\texttt{ NVIDIA RTX 2080 MaxQ}}{} configuration. \paragraph{Structured Dithering.} Recall that we added Structured noise $(\ensuremath{\mathbb{I}}_n-\textbf{H} )\xi$ to the target $\textbf{Y}$ with $\xi\sim \ensuremath{\mathcal{N}}(0,\sigma^2\ensuremath{\mathbb{I}})$. Table~\ref{tab:StructDithering} reveals the impact of the structured dithering parameter $\sigma$. Default value ($\sigma = 1$) yields consistently good generalization performance. Of course, it is always possible to tune this hyperparameter around value $1$ for potential improvement of the generalization performances. Higher values of $\sigma$ lead to a significant degradation of ${\texttt{R}^2}$-score as it caused the method to diverge. In our experiments, $\sigma$ was not an hyperparameter as it was always set equal to $1$. Moreover, adding structured dithering has no impact on the value of $\lambda_{init}$ or computational time. \begin{table}[H] \caption{Structured dithering dependence.} \label{tab:StructDithering} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline \UCIa &$\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0 & $ 0.321$ & $30.356$ & $60.650$ & $0.479$ & $219.345$ \\ \hline &0.2 & $ 0.338$ & $30.424$ & $79.830$ & $0.496$ & $219.345 $ \\ \hline &\textbf{1} & $ 0.357$ & $30.423$ & $99.570$ & $0.515$ & $219.345 $ \\ \hline &2 & $ 0.089$ & $1.312$ & $0.250$ & $0.137$ & $219.345 $ \\ \hline &3 & $ 0.068$ & $1.257$ & $0.000$ & $0.116$ & $219.345 $ \\ \hline \hline \UCIb & $\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0 & $ 0.463$ & $32.250$ & $11.200$ & $0.511$ & $774.264 $ \\ \hline &0.2 & $ 0.463$ & $32.408$ & $14.550$ & $0.514$ & $774.264 $ \\ \hline &\textbf{1} & $ 0.460$ & $32.281$ & $46.750$ & $0.525$ & $774.264 $ \\ \hline &2 & $ 0.220$ & $1.276$ & $0.020$ & $0.226$ & $774.264 $ \\ \hline &3 & $ 0.216$ & $1.288$ & $0.000$ & $0.223$ & $774.264 $ \\ \hline \hline \UCIc &$\sigma$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &0 & $ 0.863$ & $89.425$ & $181.300$ & $0.864$ & $10000.001 $ \\ \hline &0.2 & $ 0.863$ & $90.206$ & $188.520$ & $0.864$ & $10000.001 $ \\ \hline &\textbf{1} & $ 0.855$ & $89.968$ & $191.920$ & $0.857$ & $10000.001 $ \\ \hline &2 & $ 0.364$ & $1.876$ & $0.000$ & $0.363$ & $10000.001 $ \\ \hline &3 & $ 0.364$ & $1.891$ & $0.000$ & $0.363$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Permutations.} We studied the impact of the randomness aspect of the \texttt{\,MLR $\,$}{} loss. We compared different sets of permutations drawn at random. The choice of the seed has little impact on the value of the \texttt{\,MLR $\,$}{} loss as soon as $T\geq 2^2$. Table~\ref{tab:Permutation} reveals a significant jump in ${\texttt{R}^2}$-score on the test going from $T=0$ to $T=1$ permutation. Then, increasing the value of $T>1$ may sometimes slightly improve ${\texttt{R}^2}$-score. Meanwhile, a larger number of permutations has a direct negative impact on runtime per iteration and VRAM footprint. Past a certain threshold $2^8$, GPU parallelization no longer prevents the linear dependency on $T$. We escape any trade-off by picking $T=2^4$ permutations in all our experiments. This value is large enough for the \texttt{\,MLR $\,$}{} loss to converge (with regards to $T$), yet still leveraging GPU parallelization. \begin{table}[H] \caption{Permutation dependence. $\boldsymbol{\ast}$: computation time was obtained with a {\texttt{ NVIDIA RTX 2080 MaxQ}}.} \label{tab:Permutation} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline \UCIa & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0 & $ 0.252$ & $3.184$ & $61.050$ & $0.401$ & $31.831 $ \\ \hline & 1 & $ 0.331$ & $3.357$ & $110.040$ & $0.459$ & $285.238 $ \\ \hline & 2 & $ 0.338$ & $3.359$ & $109.960$ & $0.468$ & $215.370 $ \\ \hline & $2^{2}$ & $ 0.343$ & $3.358$ & $109.370$ & $0.473$ & $219.345 $ \\ \hline & $\boldsymbol{2^{4}}$ & $ 0.347$ & $4.012^{\textbf{*}}$ & $116.190$ & $0.484$ & $216.235 $ \\ \hline & $2^{8}$ & $ 0.351$ & $3.371$ & $117.160$ & $0.494$ & $219.345 $ \\ \hline & $2^{10}$ & $ 0.349$ & $3.433$ & $117.650$ & $0.495$ & $219.345 $ \\ \hline \hline \UCIb & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0.0 & $ 0.460$ & $3.253$ & $46.770$ & $0.509$ & $774.264 $ \\ \hline & 1 & $ 0.461$ & $3.452$ & $62.020$ & $0.518$ & $774.264 $ \\ \hline & 2 & $ 0.466$ & $3.461$ & $60.040$ & $0.518$ & $774.264 $ \\ \hline & $2^{2}$ & $ 0.469$ & $3.462$ & $60.720$ & $0.521$ & $774.264 $ \\ \hline & $\boldsymbol{2^{4}}$ & $ 0.473$ & $6.172^{\textbf{*}}$ & $72.800$ & $0.527$ & $774.264 $ \\ \hline & $2^{8}$ & $ 0.477$ & $3.496$ & $81.900$ & $0.532$ & $774.264 $ \\ \hline & $2^{10}$ & $ 0.480$ & $3.551$ & $81.530$ & $0.532$ & $774.264 $ \\ \hline \hline \UCIc & $T$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0 & $ 0.817$ & $8.251$ & $197.830$ & $0.817$ & $10000.001 $ \\ \hline & 1 & $ 0.813$ & $8.606$ & $197.860$ & $0.813$ & $10000.001 $ \\ \hline & 2 & $ 0.813$ & $8.654$ & $197.400$ & $0.814$ & $10000.001 $ \\ \hline & $2^{2}$ & $ 0.813$ & $8.645$ & $197.780$ & $0.814$ & $10000.001 $ \\ \hline & $\boldsymbol{2^{4}}$ & $ 0.814$ & $30.654^{\textbf{*}}$ & $197.100$ & $0.814$ & $10000.001 $ \\ \hline & $2^{8}$ & $ 0.813$ & $10.391$ & $197.230$ & $0.814$ & $10000.001 $ \\ \hline & $2^{10}$ & $ 0.814$ & $17.330$ & $197.070$ & $0.814$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Initialization of Ridge parameter $\lambda_{init}$.} Recall that Ridge regularization is the essential component of the \texttt{\,MLR $\,$}{} method as it provides a closed form representation of the last hidden layer on which we can conveniently apply the follow-up steps: structured dithering and random permutations. Contrary to $T$ and the dither parameter $\sigma$, the choice of the appropriate initial value of $\lambda$ is very impactful and depends on both network architecture and dataset characteristics as shown in Table~\ref{tab:lambdaInit}. When we compare the value $\lambda_{init}$ given by our heuristic (in bold) with the other values chosen in Table~\ref{tab:lambdaInit}, we observe that our heuristic is quite effective, as in average on the 3 datasets, it is always within $3\%$ of the best value in the grid of Table \ref{tab:lambdaInit} in term of ${\texttt{R}^2}$-score on the $test$. As we can see for the \UCIb{} dataset, the optimal value was not within the bounds of the grid $\ensuremath{\mathcal{G}}_{\lambda}$ we chose. Using a larger grid with a bigger granularity would improve the results. Despite access failure to {\texttt{VM}}{} for one specific value of $\lambda_{init}$, our main experiments reveal a small runtime overcost for the initialization step, mostly because all steps including the matrix inversion need to be performed only once and do not require computing the derivation graph. We favored a small simple grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$ to select $\lambda_{init}$. This grid was designed to work well on small size datasets. Of course, it is possible to refine this grid with respect to the dataset size and architecture at hand to achieved even higher generalization performance. Another possible approach could be to tune $\lambda_{init}$ on the $validation$ set. Indeed, we observe in Table \ref{tab:lambdaInit} that the optimal value of $\lambda_{init}$ on the $test$ seems to be close to that obtained on the $validation$ set. \begin{table}[H] \caption{Dependence on $\lambda_{init}$. $\boldsymbol{\ast}$: computation time was obtained with a {\texttt{ NVIDIA RTX 2080 MaxQ}}.} \label{tab:lambdaInit} \centering \begin{tabular}{|c|c|c|c|c|c|} \hline \UCIa &$\lambda_{init}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ \\ \hline \hline & 0 & $ -0.110$ & $0.180$ & $7.790$ & $-0.020 $ \\ \hline &$10^{-3}$ & $ -0.444$ & $2.078$ & $90.270$ & $0.265 $ \\ \hline &$10^{-1}$ & $ 0.097$ & $2.083$ & $70.310$ & $0.254 $ \\ \hline &$10$ & $ 0.320$ & $2.070$ & $116.630$ & $0.466 $ \\ \hline & $\boldsymbol{216.235}$ & $ 0.347$ & $2.902^{\textbf{*}}$ & $116.190$ & $0.484 $ \\ \hline &$10^{3}$ & $ 0.359$ & $2.087$ & $125.020$ & $0.480 $ \\ \hline &$10^{5}$ & $ 0.334$ & $2.103$ & $152.460$ & $0.428 $ \\ \hline &$10^{7}$ & $ 0.263$ & $2.104$ & $188.630$ & $0.339 $ \\ \hline &$10^{9}$ & $ -0.050$ & $2.089$ & $197.890$ & $-0.009 $ \\ \hline \hline \UCIb &$\lambda_{init}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ \\ \hline \hline & 0 & $ -0.276$ & $0.014$ & $0.010$ & $-0.244 $ \\ \hline &$10^{-3}$ & $ -33.053$ & $0.133$ & $2.510$ & $-9.371 $ \\ \hline &$10^{-1}$ & $ -3.768$ & $2.137$ & $36.770$ & $-0.151 $ \\ \hline &$10$ & $ 0.422$ & $2.086$ & $9.530$ & $0.477 $ \\ \hline & $\boldsymbol{774.263}$ & $ 0.473$ & $3.426^{\textbf{*}}$ & $72.800$ & $0.527 $ \\ \hline &$10^{3}$ & $ 0.477$ & $2.094$ & $73.530$ & $0.529 $ \\ \hline &$10^{5}$ & $ 0.486$ & $2.088$ & $132.420$ & $0.522 $ \\ \hline &$10^{7}$ & $ 0.477$ & $2.088$ & $191.320$ & $0.488 $ \\ \hline &$10^{9}$ & $ 0.273$ & $2.086$ & $200.000$ & $0.287 $ \\ \hline \hline \UCIc &$\lambda_{init}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ \\ \hline \hline & 0.0 & $ -0.091$ & $0.052$ & $0.010$ & $-0.088 $ \\ \hline &$10^{-3}$ & $ 0.761$ & $5.042$ & $97.970$ & $0.775 $ \\ \hline &$10^{-1}$ & $ 0.795$ & $5.009$ & $66.370$ & $0.807 $ \\ \hline &$10$ & $ 0.844$ & $4.989$ & $161.160$ & $0.847 $ \\ \hline &$10^{3}$ & $ 0.843$ & $4.974$ & $194.550$ & $0.844 $ \\ \hline & $\boldsymbol{10^4}$ & $ 0.814$ & $19.208^{\textbf{*}}$ & $197.100$ & $0.814 $ \\ \hline &$10^{5}$ & $ 0.774$ & $4.966$ & $197.510$ & $0.775 $ \\ \hline &$10^{7}$ & $ 0.711$ & $4.956$ & $198.600$ & $0.710 $ \\ \hline &$10^{9}$ & $ 0.614$ & $4.942$ & $198.830$ & $0.613 $ \\ \hline \end{tabular} \end{table} \paragraph{Ablation study.} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on the same 3 datasets (\UCIa, \UCIb, \UCIc). We repeated each experiment over 100 random $train$/$test$ splits. All the results presented here correspond to the architecture of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{} with hyperparameters fixed as in Table~\ref{tab:architectures1}. A standard \RNN2 ({\texttt{FFNN}}{} with $2$ wide layers $J=2^{10}$) cannot be trained efficiently on small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its lower overall performance on the complete benchmark. Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}{}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the \texttt{\,MLR $\,$}{} approach. The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets. Furthermore, the improvement yielded by using bagging ($0.062$) is still of the same order of magnitude as the one we got when we applied permutations on top of Ridge to the {\texttt{FFNN}}{} ($0.043$). This means these two ingredients (permutations and Structure Dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \begin{table}[H] \caption{Ablation Study in Regression.} \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Mean ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline \RNN2 & $ -0.081 \pm 0.173 $ & $ -0.046 \pm 0.169 $ \\ \hline {\texttt{FFNN}}{}+ Ridge & $ 0.321 \pm 0.081 $ & $ 0.394 \pm 0.052 $ \\ \hline {\texttt{FFNN}}{}+ Ridge + Struct. Dithering & $ 0.323 \pm 0.075 $ & $ 0.400 \pm 0.048 $ \\ \hline {\texttt{FFNN}}{}+ Ridge + Permut. & $ 0.364 \pm 0.050 $ & $ 0.432 \pm 0.035 $ \\ \hline \texttt{\,MLR $\,$}{} & $ 0.371 \pm 0.024 $ & $ 0.433 \pm 0.000 $ \\ \hline \end{tabular} \end{table} \subsection{Other hyperparameters.} The impact of the other hyperparameters on the \texttt{\,MLR $\,$}{} method is discussed below. \paragraph{Dither.} At each iteration, we draw and add i.i.d. gaussian noise $\ensuremath{\mathcal{N}}(0,\tilde{\sigma}^2\ensuremath{\mathbb{I}})$ on the target $\textbf{Y}$ in the regression setting. In Table~\ref{tab:Dithering}, we see that adding a small amount of noise improves performances. We performed our main experiments with $\tilde{\sigma} = 0.03$ as this value works well with standard {\texttt{FFNN}}{}. But here again, we may improve generalization performance by considering $\tilde{\sigma}$ as an hyperparameter to be tuned. Rather unsurprisingly, applying dithering has no impact on runtime per iteration or on the value of $\lambda_{init}$. \begin{table}[H] \caption{Dithering dependence : label noise scale. $\boldsymbol{\ast}$: computation time was obtained with a {\texttt{ NVIDIA RTX 2080 MaxQ}}.} \label{tab:Dithering} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline \UCIa & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0 & $ 0.347$ & $3.104$ & $116.490$ & $0.483$ & $220.900 $ \\ \hline & 0.01 & $ 0.351$ & $3.110$ & $114.560$ & $0.486$ & $220.900 $ \\ \hline & $\boldsymbol{0.03}$ & $ 0.347$ & $5.560^{\textbf{*}}$ & $116.190$ & $0.484$ & $216.235 $ \\ \hline & 0.1 & $ 0.354$ & $3.111$ & $113.720$ & $0.490$ & $215.104 $ \\ \hline & 0.3 & $ 0.353$ & $3.108$ & $119.300$ & $0.502$ & $216.367 $ \\ \hline \UCIb & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0 & $ 0.475$ & $3.250$ & $76.830$ & $0.527$ & $774.264 $ \\ \hline & 0.01 & $ 0.474$ & $3.258$ & $68.680$ & $0.527$ & $774.264 $ \\ \hline & $\boldsymbol{0.03}$ & $ 0.473$ & $9.709^{\textbf{*}}$ & $72.800$ & $0.527$ & $774.264 $ \\ \hline & 0.1 & $ 0.474$ & $3.258$ & $70.860$ & $0.528$ & $774.264 $ \\ \hline & 0.3 & $ 0.474$ & $3.258$ & $68.620$ & $0.532$ & $774.264 $ \\ \hline \UCIc & $\tilde{\sigma}$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline & 0 & $ 0.813$ & $8.554$ & $197.430$ & $0.814$ & $10000.001 $ \\ \hline & 0.01 & $ 0.814$ & $8.561$ & $197.240$ & $0.814$ & $10000.001 $ \\ \hline & $\boldsymbol{0.03}$ & $ 0.814$ & $29.283^{\textbf{*}}$ & $197.100$ & $0.814$ & $10000.001 $ \\ \hline & 0.1 & $ 0.813$ & $8.561$ & $196.720$ & $0.814$ & $10000.001 $ \\ \hline & 0.3 & $ 0.812$ & $8.567$ & $196.220$ & $0.813$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Width.} Most notably, Table~\ref{tab:Width} reveals that wide architectures (large $J$) usually provide better generalization performance. We recall that for standard {\texttt{NN}{}}{} trained without \texttt{\,MLR $\,$}, wider architectures are more prone to overfitting. Table \ref{tab:Width} also reveals that larger architectures work better for bigger datasets like \UCIc. For small datasets, $J=2^{10}$ provides good generalization performance for smaller runtime. When the width parameter exceeds GPU memory, parallelization is lost and we observe a dramatic increase in computational time. \begin{table}[H] \caption{Width dependence.} \label{tab:Width} \centering \begin{tabular}{|c|c|c|c|c|c|c|} \hline \UCIa &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.184$ & $0.705$ & $162.120$ & $0.284$ & $210.307 $ \\ \hline &$2^{6}$ & $ 0.276$ & $0.751$ & $160.030$ & $0.364$ & $211.555 $ \\ \hline &$2^{8}$ & $ 0.325$ & $0.905$ & $135.400$ & $0.431$ & $205.351 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.344$ & $2.201$ & $113.610$ & $0.484$ & $222.455 $ \\ \hline &$2^{12}$ & $ 0.322$ & $15.796$ & $94.180$ & $0.503$ & $220.900 $ \\ \hline \hline \UCIb &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.367$ & $0.724$ & $184.540$ & $0.379$ & $678.097 $ \\ \hline &$2^{6}$ & $ 0.442$ & $0.743$ & $157.840$ & $0.471$ & $628.464 $ \\ \hline &$2^{8}$ & $ 0.467$ & $0.907$ & $115.510$ & $0.512$ & $774.264 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.470$ & $2.188$ & $71.790$ & $0.527$ & $774.264 $ \\ \hline &$2^{12}$ & $ 0.460$ & $16.987$ & $37.210$ & $0.524$ & $774.264 $ \\ \hline \hline \UCIc &$J$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &$2^{4}$ & $ 0.622$ & $1.008$ & $200.000$ & $0.620$ & $9350.431 $ \\ \hline &$2^{6}$ & $ 0.714$ & $1.134$ & $200.000$ & $0.713$ & $9927.827 $ \\ \hline &$2^{8}$ & $ 0.773$ & $1.955$ & $199.880$ & $0.773$ & $10000.001 $ \\ \hline &$\boldsymbol{2^{10}}$ & $ 0.825$ & $7.062$ & $198.240$ & $0.825$ & $10000.001 $ \\ \hline &$2^{12}$ & $ 0.856$ & $54.121$ & $193.270$ & $0.857$ & $10000.001 $ \\ \hline \end{tabular} \end{table} \paragraph{Batch size.} We added the \UCId{} of size $(n,d)=(43824,33)$ in this experiment in order to measure the impact of batch-size on a larger dataset but this dataset was not included in the benchmark. In view of Table~\ref{tab:Batchsize}, our recommendation is very simple: "\textbf{\textit{As big as possible !}}". For small datasets this means using the entire train-set at each iteration, while GPU memory constraints rule out going beyond $2^{14}$ for large datasets. \begin{table}[H] \centering \caption{Batch size dependence} \label{tab:Batchsize} \resizebox{\columnwidth}{!}{ \begin{tabular}{|c|c|c|c|c|c|c|} \hline \UCIa &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.122$ & $4.375$ & $32.596$ & $0.014$ & $38.452 $ \\ \hline &$2^{4}$ & $ 0.334$ & $5.194$ & $129.673$ & $0.520$ & $82.567 $ \\ \hline &$2^{5}$ & $ 0.349$ & $5.194$ & $107.269$ & $0.517$ & $110.214 $ \\ \hline &$2^{6}$ & $ 0.393$ & $5.352$ & $115.115$ & $0.500$ & $246.869 $ \\ \hline &$\boldsymbol{\min(n,2^{14})=103}$ & $ 0.401$ & $5.238$ & $114.385$ & $0.499$ & $237.899 $ \\ \hline \hline \UCIb &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.014$ & $4.658$ & $38.020$ & $0.003$ & $290.923 $ \\ \hline &$2^{4}$ & $ 0.415$ & $5.046$ & $148.680$ & $0.490$ & $158.198 $ \\ \hline &$2^{5}$ & $ 0.459$ & $5.180$ & $141.260$ & $0.527$ & $204.647 $ \\ \hline &$2^{6}$ & $ 0.474$ & $5.216$ & $128.820$ & $0.545$ & $253.497 $ \\ \hline &$2^{7}$ & $ 0.477$ & $5.277$ & $103.270$ & $0.540$ & $388.678 $ \\ \hline &$2^{8}$ & $ 0.478$ & $5.254$ & $97.010$ & $0.535$ & $774.264 $ \\ \hline &$\boldsymbol{\min(n,2^{14})=546}$ & $ 0.475$ & $5.301$ & $72.470$ & $0.528$ & $774.264 $ \\ \hline \hline \UCIc &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ 0.013$ & $4.536$ & $15.790$ & $0.013$ & $89.257 $ \\ \hline &$2^{4}$ & $ 0.640$ & $5.317$ & $168.790$ & $0.642$ & $107.543 $ \\ \hline &$2^{5}$ & $ 0.673$ & $5.375$ & $176.200$ & $0.675$ & $171.905 $ \\ \hline &$2^{6}$ & $ 0.703$ & $5.360$ & $186.940$ & $0.705$ & $212.625 $ \\ \hline &$2^{7}$ & $ 0.729$ & $5.413$ & $188.540$ & $0.730$ & $537.572 $ \\ \hline &$2^{8}$ & $ 0.750$ & $5.447$ & $189.770$ & $0.751$ & $774.264 $ \\ \hline &$2^{9}$ & $ 0.763$ & $5.460$ & $191.490$ & $0.765$ & $2641.979 $ \\ \hline &$2^{10}$ & $ 0.785$ & $5.781$ & $192.900$ & $0.786$ & $2782.560 $ \\ \hline &$2^{11}$ & $ 0.790$ & $6.908$ & $195.150$ & $0.791$ & $10000.001 $ \\ \hline &$2^{12}$ & $ 0.813$ & $9.842$ & $196.930$ & $0.814$ & $10000.001 $ \\ \hline &$\boldsymbol{\min(n,2^{14})=8760}$ & $ 0.824$ & $13.547$ & $197.800$ & $0.825$ & $10000.001 $ \\ \hline \hline \UCId &$b_s$ & ${\texttt{R}^2}$ & Time & {\texttt{Iter}} & ${\texttt{R}^2}_{val}$ & $\lambda_{init}$ \\ \hline \hline &1 & $ -0.003$ & $4.826$ & $65.470$ & $-0.003$ & $185.268 $ \\ \hline &$2^{4}$ & $ 0.019$ & $5.344$ & $121.380$ & $0.021$ & $628.786 $ \\ \hline &$2^{5}$ & $ 0.050$ & $5.629$ & $157.860$ & $0.052$ & $563.540 $ \\ \hline &$2^{6}$ & $ 0.109$ & $5.659$ & $176.680$ & $0.110$ & $770.180 $ \\ \hline &$2^{7}$ & $ 0.148$ & $5.646$ & $171.810$ & $0.149$ & $705.241 $ \\ \hline &$2^{8}$ & $ 0.188$ & $5.678$ & $179.850$ & $0.190$ & $988.136 $ \\ \hline &$2^{9}$ & $ 0.209$ & $5.771$ & $185.860$ & $0.211$ & $911.264 $ \\ \hline &$2^{10}$ & $ 0.231$ & $6.165$ & $190.310$ & $0.233$ & $1001.640 $ \\ \hline &$2^{11}$ & $ 0.254$ & $7.251$ & $192.960$ & $0.255$ & $1245.079 $ \\ \hline &$2^{12}$ & $ 0.278$ & $10.199$ & $194.410$ & $0.279$ & $1376.753 $ \\ \hline &$2^{13}$ & $ 0.298$ & $20.653$ & $195.740$ & $0.298$ & $2782.560 $ \\ \hline &$\boldsymbol{\min(n,2^{14})=43824}$ & $ 0.316$ & $56.976$ & $193.520$ & $0.317$ & $3793.002 $ \\ \hline \end{tabular} } \end{table} \paragraph{Depth.} As we can see in Table~\ref{tab:Depth}, the optimal choice of the depth parameter seems to be data-dependent and significantly impacts the ${\texttt{R}^2}$-score. This motivated the introduction of the bagging \texttt{\,MLR $\,$}{} models that we described in the main paper. We consider only architectures of depth $L\in\ensuremath{\mathcal{G}}_L=\{1,\,2,\,3,\, 4\}$ which reached state of the art results nonetheless. Going deeper is outside of the scope we set for this study, since it would probably require more careful and manual tuning of the hyperparameters on each dataset. \begin{table}[H] \footnotesize{ \caption{Depth dependence. Mean and standard deviation of ${\texttt{R}^2}$-score over $100$ seeds.} \label{tab:Depth} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|c|c|c|} \hline Dataset & $n$ & $d$ & ${\texttt{MLR$\textapprox$1}}$& ${\texttt{MLR$\textapprox$2}}$& ${\texttt{MLR$\textapprox$3}}$& ${\texttt{MLR$\textapprox$4}}$\\ \hline {Concrete Slump Test -1} & 103 & 8 & $0.940 \pm 0.029$ & $\boldsymbol{0.954 \pm 0.018}$ & $\boldsymbol{0.954 \pm 0.025}$ & $0.935 \pm 0.032$ \\ \hline {Concrete Slump Test -3} & 103 & 8 & $\boldsymbol{0.399 \pm 0.132}$ & $0.313 \pm 0.171$ & $0.274 \pm 0.210$ & $0.226 \pm 0.149$ \\ \hline {Concrete Slump Test -2} & 103 & 8 & $0.455 \pm 0.133$ & $0.453 \pm 0.159$ & $\boldsymbol{0.505 \pm 0.171}$ & $0.425 \pm 0.245$ \\ \hline {Servo} & 168 & 24 & $0.836 \pm 0.031$ & $0.839 \pm 0.046$ & $\boldsymbol{0.854 \pm 0.043}$ & $0.842 \pm 0.049$ \\ \hline {Computer Hardware} & 210 & 7 & $0.981 \pm 0.008$ & $0.984 \pm 0.008$ & $\boldsymbol{0.985 \pm 0.008}$ & $\boldsymbol{0.985 \pm 0.007}$ \\ \hline {Yacht Hydrodynamics} & 308 & 33 & $0.952 \pm 0.021$ & $0.962 \pm 0.020$ & $\boldsymbol{0.965 \pm 0.020}$ & $0.960 \pm 0.021$ \\ \hline {QSAR aquatic toxicity} & 546 & 34 & $0.448 \pm 0.081$ & $0.459 \pm 0.071$ & $0.458 \pm 0.090$ & $\boldsymbol{0.470 \pm 0.087}$ \\ \hline {QSAR Bioconcentration classes} & 779 & 25 & $\boldsymbol{0.672 \pm 0.042}$ & $0.668 \pm 0.049$ & $0.666 \pm 0.051$ & $0.670 \pm 0.051$ \\ \hline {QSAR fish toxicity} & 909 & 18 & $\boldsymbol{0.590 \pm 0.043}$ & $0.586 \pm 0.037$ & $0.582 \pm 0.043$ & $0.579 \pm 0.046$ \\ \hline {insurance} & 1338 & 15 & $\boldsymbol{0.839 \pm 0.024}$ & $0.837 \pm 0.026$ & $0.833 \pm 0.033$ & $0.832 \pm 0.028$ \\ \hline {Communities and Crime} & 1994 & 108 & $0.679 \pm 0.031$ & $0.677 \pm 0.029$ & $\boldsymbol{0.680 \pm 0.030}$ & $\boldsymbol{0.680 \pm 0.027}$ \\ \hline {Abalone R} & 4178 & 11 & $\boldsymbol{0.566 \pm 0.023}$ & $0.543 \pm 0.078$ & $0.523 \pm 0.163$ & $0.538 \pm 0.078$ \\ \hline {squark automotive CLV training} & 8099 & 77 & $\boldsymbol{0.891 \pm 0.006}$ & $0.890 \pm 0.006$ & $0.889 \pm 0.006$ & $0.883 \pm 0.007$ \\ \hline {Seoul Bike Sharing Demand} & 8760 & 15 & $0.850 \pm 0.009$ & $0.878 \pm 0.008$ & $\boldsymbol{0.901 \pm 0.008}$ & $0.893 \pm 0.008$ \\ \hline {Electrical Grid Stability Simu} & 10000 & 12 & $0.937 \pm 0.003$ & $0.958 \pm 0.002$ & $\boldsymbol{0.963 \pm 0.002}$ & $0.955 \pm 0.002$ \\ \hline {blr real estate prices} & 13320 & 2 & $0.514 \pm 0.012$ & $\boldsymbol{0.522 \pm 0.012}$ & $\boldsymbol{0.522 \pm 0.013}$ & ${0.521 \pm 0.013}$ \\ \hline \end{tabular}} } \end{table} \paragraph{Learning rate.} We used ADAM with default parameters except for the learning rate. Indeed, since the width and batch size we picked were outside of the usual ranges, we had to adjust the learning rate accordingly (Table~\ref{tab:architectures1}). We did not attempt to use another optimizer as ADAM worked well. \paragraph{Scalability.} The main limitation is the size of the GPU VRAM with a current maximum of $32$G on the best available configuration. We conducted these experiments on devices with either $8$ or $11$G$-$VRAM. Recall that the cost for the inversion of a $J\times J$ matrix is linear on a GPU thanks to parallelization whereas it is quadratic on a CPU. The runtime per iteration is almost constant since it depends mostly on width, depth, batch-size and number of permutations which are either fix or bounded (for batch-size) \bibliographystyle{plain} \section{The \texttt{\,MLR $\,$}{} loss} \subsection{Synthetic data used in Figure \ref{fig:3pred}} \label{app:syntheticdataMLR} We generate $n=n_{train}+n_{test}$ i.i.d. observations from the model $(x,Y) \in \mathbb{R}^d\times \mathbb{R}$, $d=80$ $s.t.$ $Y = x^\top \beta^* + \epsilon,$ where $\epsilon\sim\mathcal N(0,\sigma)$, $x\sim N(0_d,\Sigma)$ and $\beta^* \in \mathbb{R}^d$ are mutually independent. We use the following parameters to generate the data: $\sigma=100$, $\Sigma = \ensuremath{\mathbb{I}}_d + H $ with $H_{i,j} = 0.8^{\rho}$ and $\rho \sim \mathcal{U}([1,2])$ and the components of $\beta^*=\mathbbm{1}_d$. We standardized the observations $\textbf{x}_i,Y_i$. We use a train set of size $n_{train}=100$ to compute $\texttt{\,MLR $\,$}$ and $CV$. We use $n_{test}=1000$ to evaluate the test performance. \subsection{Proof of Theorem \ref{thm1}} \label{app:proofThm1} Assume $\mathrm{rank}(\textbf{x})=r$. Consider the SVD of $\frac{1}{\sqrt{n}} \textbf{x}$ and denote by $\lambda_1,\ldots, \lambda_r$ the singular values with corresponding left and right eigenvectors $\{\mathbf{u}_j \}_{j=1}^r \in \mathbb{R}^n$ and $\{\mathbf{v}_j \}_{j=1}^r \in \mathbb{R}^d$: \begin{align} \frac{1}{\sqrt{n}} \textbf{x} = \sum_{j=1}^{r} \sqrt{\lambda_j} \mathbf{\textbf{u}}_j \otimes \mathbf{\textbf{v}}_j. \end{align} Define $\textbf{H}_\lambda:=\textbf{x}(\textbf{x}^\top\textbf{x} + \lambda \ensuremath{\mathbb{I}}_d)^{-1}\textbf{x}^\top$. We easily get $$ \textbf{H}_\lambda =\sum_{j=1}^{r} \frac{\lambda_j}{\lambda_j + \lambda/n} \textbf{u}_j \otimes \textbf{u}_j. $$ Compute first the population risk of Ridge model ${\bm{\beta}_\lambda}$. Exploiting the previous display, we have $$ \|\textbf{x}\bm{\beta}^* - \textbf{x} \bm{\beta}_{\lambda} \|_2^2 = \sum_{j=1}^r \frac{(\lambda/n)^2}{(\lambda_j + \lambda/n)^2} \langle \textbf{x}\bm{\beta}^* , \textbf{u}_j\rangle^2 + \sum_{j=1}^r \frac{\lambda_j^2}{(\lambda_j + \lambda/n)^2} \langle \textbf{u}_j,\boldsymbol{\xi} \rangle^2-2\langle (\ensuremath{\mathbb{I}}_n -\textbf{H}_\lambda)\textbf{x}\bm{\beta}^*,\textbf{H}_\lambda\boldsymbol{\xi} \rangle. $$ Taking the expectation $w.r.t.$ $\boldsymbol{\xi}$ and as $\boldsymbol{\xi}$ is centered, we get \begin{align} \label{eq:truerisk1} R(\lambda)= \mathbb{E}_{\xi}\left[\|\textbf{x}\bm{\beta}^* - \textbf{x} \bm{\beta}_{\lambda} \|_2^2\right] = \sum_{j=1}^r \frac{(\lambda/n)^2}{(\lambda_j + \lambda/n)^2} \langle \textbf{x}\bm{\beta}^* , \textbf{u}_j\rangle^2 + \sigma^2 \sum_{j=1}^r \frac{\lambda_j^2}{(\lambda_j + \lambda/n)^2}. \end{align} Next, compute the representations for the empirical risk for the original data set $(\textbf{x},\textbf{Y})$ and artificial data set $(\textbf{x},\textbf{Y}_{\texttt{perm}})$ obtained by random permutation of $\textbf{Y}$. We obtain respectively \begin{align} \label{eq:riskemp1} \|\textbf{Y} - \textbf{x} - \textbf{x} \bm{\beta}_\lambda(\textbf{x},\textbf{Y})\|_2^2 = \|(\ensuremath{\mathbb{I}}_n -\textbf{H}_\lambda)\textbf{Y}\|_2^2 =\sum_{j=1}^r \left( \frac{\lambda/n}{\lambda_j + \lambda/n} \right)^2 \langle \textbf{Y},u_j\rangle^2,\\ \label{eq:riskemp2} \|\textbf{Y}_{\texttt{perm}} - \textbf{x} \bm{\beta}_\lambda(\textbf{x},\textbf{Y}_{\texttt{perm}})\|_2^2 = \|(\ensuremath{\mathbb{I}}_n -\textbf{H}_\lambda)\textbf{Y}_{\texttt{perm}}\|_2^2 =\sum_{j=1}^r \left( \frac{\lambda/n}{\lambda_j + \lambda/n} \right)^2 \langle \textbf{Y}_{\texttt{perm}},u_j\rangle^2. \end{align} As $(\lambda/n)^2=(\lambda_j +\lambda/n)^2-2\lambda_j \lambda/n - \lambda_j^2$, it results the following representation for the \texttt{\,MLR $\,$}{} loss: \begin{align} \label{eq:MLRloss} \texttt{\,MLR $\,$}(\lambda) &= \|\textbf{Y} - \textbf{x} \bm{\beta}_\lambda(\textbf{x},\textbf{Y})\|_2^2- \|\textbf{Y} - \textbf{x} \bm{\beta}_\lambda(\textbf{x},\textbf{Y}_{\texttt{perm}})\|_2^2\notag\\ &= - \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 +\sum_{j=1}^{r} \left(\frac{\lambda/n}{\lambda_j +\lambda/n} \right)^{2} \langle \textbf{Y},\textbf{u}_j \rangle^2+\sum_{j=1}^{r} \frac{2\lambda_j \lambda/n + \lambda_j^2}{(\lambda_j + \lambda/n)^2} \langle \textbf{Y}_{\texttt{perm}},\textbf{u}_j \rangle^2. \end{align} Let's consider now the simple case $\lambda_1 = \cdots = \lambda_r = 1$ corresponding to $\textbf{x}^\top \textbf{x}/n$ being an orthogonal projection of rank $r$. Then, \eqref{eq:truerisk1} and \eqref{eq:MLRloss} become respectively \begin{align} \label{eq:truerisk2} R(\lambda)&= \frac{(\lambda/n)^2}{(1 + \lambda/n)^2} \sum_{j=1}^r \langle \textbf{x}\bm{\beta}^* , \textbf{u}_j\rangle^2 + \sigma^2 \sum_{j=1}^r\frac{1}{(1 + \lambda/n)^2}= \frac{(\lambda/n)^2 }{(1 + \lambda/n)^2}\| \textbf{x}\bm{\beta}^*\|^2 + \frac{1 }{(1 + \lambda/n)^2}\sigma^2 r. \end{align} \begin{align} \label{eq:MLRloss2} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &= \left(\frac{\lambda/n}{1 +\lambda/n} \right)^{2} \| P_{\textbf{x}}(\textbf{Y})\|_2^2+\frac{2 \lambda/n + 1}{(1 + \lambda/n)^2} \| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2. \end{align} Since $\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2$ does not depend on $\lambda$, minimizing $\texttt{\,MLR $\,$}(\lambda)$ is equivalent to minimizing \begin{align} \label{eq:MLRequiv} \left(\frac{\lambda/n}{1 +\lambda/n} \right)^{2} \| P_{\textbf{x}}(\textbf{Y})\|_2^2+\frac{2 \lambda/n + 1}{(1 + \lambda/n)^2} \| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2. \end{align} Comparing the previous display with \eqref{eq:truerisk1}, we observe that $\texttt{\,MLR $\,$}(\lambda)+ \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2$ looks like the population risk $\mathbb{E}_{\xi}\left[\|\textbf{x}\bm{\beta}^* - \textbf{x} \bm{\beta}_{\lambda} \|_2^2\right]$. Next state the following fact proved in section~\ref{sec:ProofPostulat} \begin{postulat} \label{eq:postulat1} \begin{align} \label{eq:KaMLRloss2} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &= \left(\frac{1+\lambda/n+\texttt{a}}{1 +\lambda/n} \right)^{2} \widehat R(\lambda+n\texttt{a})-\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2} \end{align} \end{postulat} Before proving our theorem, define the following quantity $\texttt{a}$ \begin{align*} \texttt{a}:=\frac{\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{\|P_{\textbf{x}}(\textbf{Y})\|_2^2} \end{align*} and state an intermediate result (lemma~\ref{eq:lemma2}- proved in section~\ref{sec:ProofLemme2}) \bigskip \begin{lemma} \label{eq:lemma2} Consider the simple case $\lambda_1 = \cdots = \lambda_r = 1$ corresponding to $\textbf{x}^\top \textbf{x}/n$ being an orthogonal projection of rank $r$ and define \begin{align} \label{eq:empiriquerisk2} \widehat R(\lambda)&= \frac{(\lambda/n)^2 }{(1 + \lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{1 }{(1 + \lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2. \end{align} Then, in the intermediate {\text{SNR}}{} regime $r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$, it comes \begin{eqnarray} \label{eq:diffDesRisque} \widehat R(\lambda+n\texttt{a})&=&\widehat R(\lambda)\left(1+o\left(\frac{a}{(\lambda/n)}\right)\right)\quad \textit{w.h.p.},\\ \label{eq:Deltadesrisque} \widehat R(\lambda))&=&R(\lambda)\left(1+O\left(\epsilon_n\right)\right)\quad \textit{w.h.p.} \end{eqnarray} where $\epsilon_n=\sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|_2^2}{n\sigma^2} }+\sqrt{\frac{r \sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }}$. \end{lemma} Starting from \eqref{eq:KaMLRloss2} and using successively \eqref{eq:diffDesRisque} and \eqref{eq:Deltadesrisque}, we have \textit{w.h.p.} \begin{eqnarray*} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &=& \left(1+\frac{\texttt{a}}{1 +\lambda/n} \right)^{2} \widehat R(\lambda+n\texttt{a})-\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2} \end{eqnarray*} Combining \eqref{eq:diffDesRisque}, \eqref{eq:Deltadesrisque} and \eqref{eq:KaMLRloss2} \begin{eqnarray*} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &=& \left(1+\frac{\texttt{a}}{1 +\lambda/n} \right)^{2}\widehat R(\lambda)\left(1+o\left(\frac{a}{(\lambda/n)}\right)\right)-\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2}\\ &=&\left(1+\frac{\texttt{a}}{1 +\lambda/n} \right)^{2}R(\lambda)\left(1+O(\epsilon_n)+o\left(\frac{a}{(\lambda/n)}\right)\right)-\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2} \end{eqnarray*} Moreover by \eqref{eq:KPermpiY} in lemma~\ref{lemma:1}, we have \begin{align*} \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2& = r\sigma^2\left(1 + O\left(\sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|^2_2}{n\sigma^2}} \right)\right). \end{align*} Then, we get \begin{eqnarray*} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &=&\left(1+\frac{\texttt{a}}{1 +\lambda/n} \right)^{2}R(\lambda)\left(1+O(\epsilon_n)\right)-\frac{\texttt{a} r\sigma^2}{(1 +\lambda/n)^2} \left(1 + O\left(\sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|^2_2}{n\sigma^2}} \right)\right). \end{eqnarray*} In the intermediate {\text{SNR}}{} regime $r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$, by lemma~\ref{lemma:1} (section~\ref{sec:ProofLemme1}) \begin{align} \label{eq:SNRnoise1} \texttt{a}:=\frac{\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{\|P_{\textbf{x}}(\textbf{Y})\|_2^2} = \frac{\sigma^2 r}{\|\textbf{x}\bm{\beta}^*\|_2^2}(1 + o(1)),\quad\text{\textit{w.h.p.}}. \end{align} Then, $r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$ $\Rightarrow$ $\epsilon_n=o(1)$ and $\forall\lambda/n>>\texttt{a}$ \begin{align*} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &= R(\lambda)(1+o(1)). \end{align*} \subsection{Proof of Lemma~\ref{eq:lemma2}} \label{sec:ProofLemme2} Consider the simple case $\lambda_1 = \cdots = \lambda_r = 1$ corresponding to $\textbf{x}^\top \textbf{x}/n$ being an orthogonal projection of rank $r$. Recall \begin{align} \label{eq:2empiriquerisk2} \widehat R(\lambda)&= \frac{(\lambda/n)^2 }{(1 + \lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{1 }{(1 + \lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2. \end{align} \paragraph{Proof of equation \eqref{eq:diffDesRisque}.} We have \begin{eqnarray*} \widehat R(\lambda+n\texttt{a})&=& \|P_{\textbf{x}}(\textbf{Y})\|_2^2\frac{(\lambda/n+\texttt{a})^2 }{(1 + \lambda/n+\texttt{a})^2} + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2\frac{1 }{(1 + \lambda/n+\texttt{a})^2} \end{eqnarray*} Next in the intermediate {\text{SNR}}{} regime $r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$, by lemma~\ref{lemma:1} (section~\ref{sec:ProofLemme1}) \begin{align*} \texttt{a}:=\frac{\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{\|P_{\textbf{x}}(\textbf{Y})\|_2^2} = \frac{\sigma^2 r}{\|\textbf{x}\bm{\beta}^*\|_2^2}(1 + o(1)),\quad\text{\textit{w.h.p.}}. \end{align*} Then, $\forall (\lambda/n)>>\texttt{a}$, we get \begin{eqnarray*} \frac{(\lambda/n+\texttt{a})^2 }{(1 + \lambda/n+\texttt{a})^2}&=&\frac{(\lambda/n)^2}{(1+(\lambda/n))^2}\left[\frac{1+\frac{2a}{(\lambda/n)}+\left(\frac{2a}{(\lambda/n)}\right)^2}{(1+\frac{a}{1+(\lambda/n)})^2}\right]=\frac{(\lambda/n)^2}{(1+(\lambda/n))^2}(1+o\left(\frac{a}{(\lambda/n)}\right),\\ \frac{1 }{(1 + \lambda/n+\texttt{a})^2}&=&\frac{1}{(1+(\lambda/n))^2}\left[\frac{1}{(1+\frac{a}{1+(\lambda/n)})^2}\right]=\frac{1}{(1+(\lambda/n))^2}(1+o\left(\frac{a}{(\lambda/n)}\right). \end{eqnarray*} Therefore, we get the first ingredient to prove our theorem: \begin{eqnarray*} \widehat R(\lambda+n\texttt{a})&=&\widehat R(\lambda)(1+o\left(\frac{a}{(\lambda/n)}\right). \end{eqnarray*} \paragraph{Proof of equation \eqref{eq:Deltadesrisque}.} Compute now \begin{eqnarray*} \widehat R(\lambda)- R(\lambda)&=&\frac{(\lambda/n)^2 }{(1 + \lambda/n)^2}\| \left(\|P_{\textbf{x}}((\textbf{Y})\|_2^2-\textbf{x}\bm{\beta}^*\|^2\right) + \frac{1 }{(1 + \lambda/n)^2}\left(\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2-\sigma^2 r\right). \end{eqnarray*} As by lemma~\ref{lemma:1}, we have \textit{w.h.p.} \begin{align} \label{eq:kKSNRnoise1} \|P_{\textbf{x}}(\textbf{Y})\|_2^2 &=\|\textbf{x}\bm{\beta}^*\|_2^2 \left( 1+ O\left( \sqrt{\frac{r \sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }} \right) \right),\\ \label{eq:kKPermpiY} \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2& = r\sigma^2\left(1 + O\left( \sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|_2^2}{n\sigma^2} }\right)\right). \end{align} Then, we get the second ingredient to prove our theorem. \begin{eqnarray*} \widehat R(\lambda)&=& R(\lambda)\left(1+\left(O\left( \sqrt{\frac{r \sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }} \right) + O\left( \sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|_2^2}{n\sigma^2} }\right) \right)\right)=R(\lambda)\left(1+O\left(\epsilon_n\right)\right), \end{eqnarray*} where $$\epsilon_n:= \sqrt{\frac{r \sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }} + \sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|_2^2}{n\sigma^2} }.$$ \subsection{Fact~\ref{eq:postulat1}} \label{sec:ProofPostulat} Compute the following quantity \begin{eqnarray*} I&:=&\left(\frac{1+\lambda/n+\texttt{a}}{1 +\lambda/n} \right)^{2} \widehat R(\lambda+n\texttt{a})-\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2}\\ &=&\frac{(\lambda/n+\texttt{a})^2 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{1 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 -\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2}\\ &=& \frac{(\lambda/n)^2 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{\texttt{a}^2 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{2(\lambda/n)\texttt{a} }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2\\ &&+ \frac{1 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 -\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2}. \end{eqnarray*} By \eqref{eq:SNRnoise1} we have $\texttt{a}\|P_{\textbf{x}}(\textbf{Y})\|_2^2=\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2$, then \begin{eqnarray*} I&=& \frac{(\lambda/n)^2 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{\texttt{a} }{(1 +\lambda/n)^2}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 + \frac{2(\lambda/n) }{(1 +\lambda/n)^2}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2\\ &&+\frac{1 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 -\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2}\\ &=& \frac{(\lambda/n)^2 }{(1 +\lambda/n)^2}\|P_{\textbf{x}}(\textbf{Y})\|_2^2 + \frac{2(\lambda/n) +1 }{(1 +\lambda/n)^2}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2\\ &=& \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2. \end{eqnarray*} Therefore, we get \begin{align*} \texttt{\,MLR $\,$}(\lambda) + \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2 &= \left(\frac{1+\lambda/n+\texttt{a}}{1 +\lambda/n} \right)^{2} \widehat R(\lambda+n\texttt{a})-\frac{\texttt{a}\| P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{(1 +\lambda/n)^2}. \end{align*} \subsection{Lemma~\ref{lemma:1}} \label{sec:ProofLemme1} \begin{lemma} \label{lemma:1} Under the assumption considered in Theorem~\ref{thm1} and in the intermediate {\text{SNR}}{} regime $ r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$, we have \textit{w.h.p.} \begin{align} \label{eq:Knorm1} \|P_{\textbf{x}}(\textbf{Y})\|_2^2 &=\|\textbf{x}\bm{\beta}^*\|_2^2 \left( 1+ O\left( \sqrt{\frac{r \sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }} \right) \right),\\ \label{eq:KPermpiY} \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2& = r\sigma^2\left(1 + O\left(\sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|^2_2}{n\sigma^2}} \right)\right). \end{align} Therefore, \begin{align} \label{eq:KSNRnoise1} \frac{\|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2}{\|P_{\textbf{x}}(\textbf{Y})\|_2^2} &= \frac{\sigma^2 r}{\|\textbf{x}\bm{\beta}^*\|_2^2}(1 + o(1)). \end{align} \end{lemma} \paragraph{Proof of \ref{eq:Knorm1}.} Since $\boldsymbol{\xi}$ is subGaussian, we have $\|P_{\textbf{x}}(\boldsymbol{\xi})\|_2^2 = r \sigma^2 +O\left(\sqrt{r \sigma^2 }\right)$ \textit{w.h.p.} \cite{Massart2000}. Thus, under the {\text{SNR}}{} condition ($\|\textbf{x}\bm{\beta}^*\|_2^2 \gg r \sigma^2$), we get $$ \frac{\|P_{\textbf{x}}(\boldsymbol{\xi})\|_2^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 } \lesssim \frac{r \sigma^2 }{\|\textbf{x}\bm{\beta}^*\|_2^2} \ll 1,\quad \text{\textit{w.h.p.}} $$ Consequently and as $\langle \textbf{x}\bm{\beta}^*,\boldsymbol{\xi} \rangle$ is subGaussian, it comes \begin{align} \label{eq:norm1} \|P_{\textbf{x}}(\textbf{Y})\|_2^2 &= \|\textbf{x}\bm{\beta}^*\|_2^2 + 2\langle \textbf{x}\bm{\beta}^*,\boldsymbol{\xi} \rangle + \|P_{\textbf{x}}(\boldsymbol{\xi})\|_2^2\notag\\ &=\|\textbf{x}\bm{\beta}^*\|_2^2 \left( 1+ 2\frac{\langle \textbf{x}\bm{\beta}^*,\boldsymbol{\xi} \rangle}{\|\textbf{x}\bm{\beta}^*\|_2^2 } + \frac{\|P_{\textbf{x}}(\boldsymbol{\xi})\|_2^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }\right)\notag\\ &=\|\textbf{x}\bm{\beta}^*\|_2^2 \left( 1+ O\left( \sqrt{\frac{r \sigma^2}{\|\textbf{x}\bm{\beta}^*\|_2^2 }} \right) \right)\quad \text{\textit{w.h.p.}}. \end{align} \paragraph{Proof of \ref{eq:KPermpiY}.} Next we recall that $\textbf{Y}_{\texttt{perm}} = \pi(\textbf{Y}) = \pi(\textbf{x}\bm{\beta}^*) + \pi(\boldsymbol{\xi})$ for some $\pi$ drawn uniformly at random in the set of permutation of $n$ elements. Then $$ \|P_{\textbf{x}}(\textbf{Y}_{\texttt{perm}})\|_2^2=\|P_{\textbf{x}}(\pi(\textbf{Y}))\|_2^2 = \|P_{\textbf{x}}(\pi(\textbf{x}\bm{\beta}^*))\|_2^2 + 2\langle P_{\textbf{x}}(\pi(\textbf{x}\bm{\beta}^*)), P_{\textbf{x}}(\pi(\boldsymbol{\xi})) \rangle + \|P_{\textbf{x}}(\pi(\boldsymbol{\xi})) \|_2^2. $$ \begin{itemize} \item Exploiting again subGaussianity of $\boldsymbol{\xi}$, we get $\|P_{\textbf{x}}(\pi(\boldsymbol{\xi})) \|_2^2 = r \sigma^2 + O(\sqrt{r\sigma^2})$ \textit{w.h.p.}. \item We recall that the n-dimensional vector $\textbf{x}\bm{\beta}^*$ lives in a $r$-dimensional subspace of $\mathbb{R}^n$ with $r\ll n$. Consequently, randomly permuting its components creates a new vector $\pi(\textbf{x}\bm{\beta}^*)$ which is almost orthogonal to $\textbf{x}\bm{\beta}^*$: $$ \frac{\langle \pi(\textbf{x}\bm{\beta}^*), \textbf{x}\bm{\beta}^* \rangle }{\|\textbf{x}\bm{\beta}^*\|_2^2}\lesssim \frac{r}{n}\ll 1,\quad\text{and}\quad \|P_{\textbf{x}}(\pi(\textbf{x}\bm{\beta}^*))\|_2^2 \lesssim \frac{r}{n} \|\textbf{x}\bm{\beta}^*\|_2^2,\quad \text{\textit{w.h.p.}}. $$ \item In the non trivial {\text{SNR}}{} regime $r \sigma^2\ll \|\textbf{x}\bm{\beta}^*\|_2^2\ll n \sigma^2$ where Ridge regularization is useful, the dominating term in the previous display is $\|P_{\textbf{x}}(\pi(\boldsymbol{\xi})) \|_2^2$. \end{itemize} \paragraph{Proof of \ref{eq:KSNRnoise1}.} Consequently, we get \begin{align} \|P_{\textbf{x}}(\pi(\textbf{Y}))\|_2^2 = r\sigma^2\left(1 + O\left(\sqrt{\frac{\|\textbf{x}\bm{\beta}^*\|^2_2}{n\sigma^2}} \right)\right)\quad \text{\textit{w.h.p.}}.\qquad\qquad\qquad\qquad\qquad\square \end{align} \newpage \input{Sections/Appendixdependencestables} \section{Training protocol} \label{sec:appprotocol} \paragraph{Initialization of the \texttt{Tikhonov}{} parameter.} We select $\lambda_{init}$ which maximizes sensitivity of the $\texttt{\,MLR $\,$}{}$ objective to variation of $\lambda$. In practice, the following heuristic proved successful on a wide variety of data sets. We pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}, \end{eqnarray} where \begin{eqnarray*} \hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\lambda^{(k+1)},\boldsymbol{\theta}) - \texttt{\,MLR $\,$}(\lambda^{{(k)}},\boldsymbol{\theta})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray*} Our empirical investigations revealed that this heuristic choice is close to the optimal oracle choice of $\lambda_{init}$ on the test set. From a computational point of view, the overcost of this step is marginal because we only compute he SVD of $\textbf{A}^{L-1}$ once and we do not compute the derivation graph of the $11$ matrix inversions or of the unique forward pass. We recall indeed that the \texttt{Tikhonov}{} parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the {\texttt{DNN}}{} architecture. \paragraph{Comments.} We use the generic value ($T=16$) for the number of random permutations in the computation of the \texttt{\,MLR $\,$}{} loss. This choice yields consistently good results overall. This choice of permutations has little impact on the value of the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. \section{Further discussion of existing works comparing {\texttt{DNN}}{} to other models on {\text{TD}}} \label{app:HPO-bib} We complement here our discussion of existing benchmarks in the introduction. {\text{DL}}{} are often beaten by other types of algorithms on tabular data learning tasks. Very recently, there has been a renewed interest in the subject, with several new methods. See \cite{borisov2021deep} for an extensive review of the state of the art on tabular datasets. The comparison between simple {\texttt{DNN}}{}, {\texttt{NODE}}, {\texttt{TabNet}}, {\texttt{RF}}{} and {\texttt{GBDT}}{} on {\text{TD}}{} was made concomitantly by \cite{kadra2021welltuned}, \cite{SHWARTZZIV202284} and \cite{gorishniy2021revisiting}. Their benchmark are more oriented towards an {\texttt{AutoML}}{} approach than ours, as they all use heavy HPO, and report training times in minutes/hours, even for some small and medium size datasets. The benchmark in \cite{kadra2021welltuned} compares {\texttt{FFNN}}{} to {\texttt{GBDT}}{}, {\texttt{NODE}}, {\texttt{TabNet}}, ASK-{\texttt{GBDT}}{} (Auto-sklearn) also using heavy HPO, on $40$ {\text{TD}}{} (with size ranging from $n=452$ to $416k+$). They reported that, after 30 minutes of HPO time, regularization cocktails for {\texttt{MLP}}{} are statistically significantly better than XGBoost (See Table 3 there). We did not find a similar experiment for {\texttt{CatBoost}}{}. The benchmark in \cite{SHWARTZZIV202284} includes $11$ datasets from OpenML, Kaggle, Pascal, and MSLR, Million song with $n$ ranging from $7k$ to $1M+$. They compared {\texttt{XGBoost}}, {\texttt{NODE}}, {\texttt{TabNet}}, 1D-CNN, DNF-Net \cite{katzir2021netdnf} and ensemble of these methods. These 2 benchmarks give mixed signals on how {\texttt{DNN}}{} compare to other methods with \cite{kadra2021welltuned} being more optimistic than \cite{SHWARTZZIV202284}. \section{Benchmark description} \subsection{Our Benchmark philosophy} Current benchmarks usually heavily focus on the AutoML (\cite{SHWARTZZIV202284,zoller2021benchmark,yao2018taking,he2021automl}) usecase \cite{zimmer-tpami21a, feurer2020auto}, using costly HPO over a small collection of popular large size datasets, which raised some concerns \cite{koch2021reduced,denton2021genealogy}. Creating a pertinent benchmark for Tabular Data ({\text{TD}}{}) is still an ongoing process for ML research community. Because researchers compute budget is limited, arbitrages have to be made between number of datasets, number of methods evaluated, intensity of HPO, dataset size, number of train-test splits. We tried to cover a broad set of usecases where improving {\texttt{DNN}}{} performance compared to other existing methods is relevant, leaving out hours-long training processes relying on HPO to get the optimal performance for each benchmarked method. \subsection{Datasets/preprocessing} \subsubsection{Datasets} Our benchmark includes 44 tabular datasets with 26 regression and 18 classification tasks. Table \ref{tab:dataset-app} contains the exhaustive description of the datasets included in our benchmark. \begin{table}[http!] \caption{Datasets description} \label{tab:dataset-app} \centering \tiny \begin{tabular}{|l||l|c|r|c|c|c|c|c|c|} \hline id & name & task & target & n & p & \#cont. & \#cat. & bag & $min{\texttt{RMSE}}$ \\ & & & index & & & & & exp. & $<0.25$ \\ \hline \hline $0$ & Cervical Cancer Behavior Risk & C & $-1$ & $57$ & $149$ & $19$ & $14$ & & \\ $1$ & Concrete Slump Test & R & $-1$ & $82$ & $9$ & $9$ & $0$ & \checkmark & \checkmark \\ $2$ & Concrete Slump Test & R & $-2$ & $82$ & $9$ & $9$ & $0$ & \checkmark & \checkmark \\ $3$ & Concrete Slump Test & R & $-3$ & $82$ & $9$ & $9$ & $0$ & \checkmark & \checkmark \\ $4$ & Breast Cancer Coimbra & C & $-1$ & $92$ & $9$ & $9$ & $0$ & & \\ $5$ & Algerian Forest Fires Dataset Sidi-Bel Abbes & C & $-1$ & $96$ & $14$ & $10$ & $1$ & & \\ $6$ & Algerian Forest Fires Dataset Bejaia & C & $-1$ & $97$ & $16$ & $12$ & $1$ & & \\ $7$ & restaurant-revenue-prediction & R & $-1$ & $109$ & $330$ & $37$ & $39$ & & \\ $8$ & Servo & R & $-1$ & $133$ & $21$ & $2$ & $4$ & \checkmark & \checkmark \\ $9$ & Computer Hardware & R & $-1$ & $167$ & $7$ & $7$ & $0$ & \checkmark & \checkmark \\ $10$ & Breast Cancer & C & $0$ & $228$ & $42$ & $1$ & $9$ & & \\ $11$ & Heart failure clinical records & C & $-1$ & $239$ & $12$ & $7$ & $5$ & & \\ $12$ & Yacht Hydrodynamics & R & $-1$ & $245$ & $22$ & $4$ & $2$ & \checkmark & \checkmark \\ $13$ & Ionosphere & C & $-1$ & $280$ & $33$ & $32$ & $1$ & & \\ $14$ & Congressional Voting Records & C & $0$ & $348$ & $48$ & $0$ & $16$ & & \\ $15$ & Cylinder Bands & C & $-1$ & $432$ & $111$ & $1$ & $19$ & & \\ $16$ & QSAR aquatic toxicity & R & $-1$ & $436$ & $34$ & $8$ & $3$ & \checkmark & \\ $17$ & Optical Interconnection Network & R & $7$ & $512$ & $26$ & $6$ & $5$ & \checkmark & \checkmark \\ $18$ & Optical Interconnection Network & R & $8$ & $512$ & $26$ & $6$ & $5$ & \checkmark & \checkmark \\ $19$ & Optical Interconnection Network & R & $5$ & $512$ & $26$ & $6$ & $5$ & \checkmark & \checkmark \\ $20$ & Credit Approval & C & $-1$ & $552$ & $31$ & $4$ & $8$ & & \\ $21$ & blood transfusion & C & $-1$ & $598$ & $4$ & $4$ & $0$ & & \\ $22$ & QSAR Bioconcentration classes dataset & R & $-1$ & $623$ & $29$ & $9$ & $5$ & \checkmark & \\ $23$ & wiki4HE & R & $-10$ & $696$ & $284$ & $1$ & $50$ & \checkmark & \\ $24$ & wiki4HE & R & $-11$ & $704$ & $284$ & $1$ & $50$ & \checkmark & \\ $25$ & QSAR fish toxicity & R & $-1$ & $726$ & $18$ & $6$ & $2$ & & \\ $26$ & Tic-Tac-Toe Endgame & C & $-1$ & $766$ & $27$ & $0$ & $9$ & & \\ $27$ & QSAR biodegradation & C & $-1$ & $844$ & $123$ & $38$ & $15$ & & \\ $28$ & mirichoi0218\_insurance & R & $-1$ & $1070$ & $15$ & $3$ & $4$ & & \\ $29$ & Communities and Crime & R & $-1$ & $1595$ & $106$ & $99$ & $2$ & & \\ $30$ & Jasmine & C & $0$ & $2387$ & $144$ & $8$ & $136$ & & \\ $31$ & Abalone & R & $-1$ & $3341$ & $10$ & $7$ & $1$ & \checkmark & \\ $32$ & mercedes-benz-greener-manufacturing & R & $1$ & $3367$ & $379$ & $0$ & $359$ & & \\ $33$ & Sylvine & C & $0$ & $4099$ & $20$ & $20$ & $0$ & & \\ $34$ & christine & C & $0$ & $4333$ & $1628$ & $1599$ & $14$ & & \\ $35$ & arashnic\_marketing-seris-customer-lifetime-value & R & $2$ & $6479$ & $72$ & $7$ & $15$ & & \\ $36$ & Seoul Bike Sharing Demand & R & $1$ & $7008$ & $15$ & $9$ & $3$ & \checkmark & \\ $37$ & Electrical Grid Stability Simulated Data & R & $-2$ & $8000$ & $13$ & $12$ & $1$ & & \checkmark \\ $38$ & snooptosh\_bangalore-real-estate-price & R & $-1$ & $10656$ & $6$ & $2$ & $1$ & & \\ $39$ & MAGIC Gamma Telescope & C & $-1$ & $15216$ & $10$ & $10$ & $0$ & & \\ $40$ & Appliances energy prediction & R & $2$ & $15788$ & $25$ & $25$ & $0$ & & \\ $41$ & Nomao & C & $-1$ & $27572$ & $272$ & $116$ & $45$ & & \\ $42$ & Beijing PM2.5 Data & R & $5$ & $33405$ & $31$ & $10$ & $3$ & & \\ $43$ & Physicochemical Properties of Protein Tertiary Structure & R & $6$ & $36584$ & $9$ & $9$ & $0$ & & \checkmark \\ \hline \end{tabular} \end{table} \begin{table}[http!] \label{tab:architectureinfos} \centering \tiny \begin{tabular}{|l||c|c|c|c|c|} \hline id & name & task & target & source & file name \\ & & & index & & \\ \hline \hline $0$ & Cervical Cancer Behavior Risk & C & $-1$ & archive.ics.uci.edu & sobar-72.csv \\ $1$ & Concrete Slump Test & R & $-1$ & archive.ics.uci.edu & slump\_test.data \\ $2$ & Concrete Slump Test & R & $-2$ & archive.ics.uci.edu & slump\_test.data \\ $3$ & Concrete Slump Test & R & $-3$ & archive.ics.uci.edu & slump\_test.data \\ $4$ & Breast Cancer Coimbra & C & $-1$ & archive.ics.uci.edu & dataR2.csv \\ $5$ & Algerian Forest Fires Dataset Sidi-Bel Abbes & C & $-1$ & archive.ics.uci.edu & Algerian\_forest\_fires\_dataset\_UPDATE.csv \\ $6$ & Algerian Forest Fires Dataset Bejaia & C & $-1$ & archive.ics.uci.edu & Algerian\_forest\_fires\_dataset\_UPDATE.csv \\ $7$ & restaurant-revenue-prediction & R & $-1$ & www.kaggle.com & train.csv.zip \\ $8$ & Servo & R & $-1$ & archive.ics.uci.edu & servo.data \\ $9$ & Computer Hardware & R & $-1$ & archive.ics.uci.edu & machine.data \\ $10$ & Breast Cancer & C & $0$ & archive.ics.uci.edu & breast-cancer.data \\ $11$ & Heart failure clinical records & C & $-1$ & archive.ics.uci.edu & heart\_failure\_clinical\_records\_dataset.csv \\ $12$ & Yacht Hydrodynamics & R & $-1$ & archive.ics.uci.edu & yacht\_hydrodynamics.data \\ $13$ & Ionosphere & C & $-1$ & archive.ics.uci.edu & ionosphere.data \\ $14$ & Congressional Voting Records & C & $0$ & archive.ics.uci.edu & house-votes-84.data \\ $15$ & Cylinder Bands & C & $-1$ & archive.ics.uci.edu & bands.data \\ $16$ & QSAR aquatic toxicity & R & $-1$ & archive.ics.uci.edu & qsar\_aquatic\_toxicity.csv \\ $17$ & Optical Interconnection Network & R & $7$ & archive.ics.uci.edu & optical\_interconnection\_network.csv \\ $18$ & Optical Interconnection Network & R & $8$ & archive.ics.uci.edu & optical\_interconnection\_network.csv \\ $19$ & Optical Interconnection Network & R & $5$ & archive.ics.uci.edu & optical\_interconnection\_network.csv \\ $20$ & Credit Approval & C & $-1$ & archive.ics.uci.edu & crx.data \\ $21$ & blood transfusion & C & $-1$ & www.openml.org & php0iVrYT \\ $22$ & QSAR Bioconcentration classes dataset & R & $-1$ & archive.ics.uci.edu & Grisoni\_et\_al\_2016\_EnvInt88.csv \\ $23$ & wiki4HE & R & $-10$ & archive.ics.uci.edu & wiki4HE.csv \\ $24$ & wiki4HE & R & $-11$ & archive.ics.uci.edu & wiki4HE.csv \\ $25$ & QSAR fish toxicity & R & $-1$ & archive.ics.uci.edu & qsar\_fish\_toxicity.csv \\ $26$ & Tic-Tac-Toe Endgame & C & $-1$ & archive.ics.uci.edu & tic-tac-toe.data \\ $27$ & QSAR biodegradation & C & $-1$ & archive.ics.uci.edu & biodeg.csv \\ $28$ & mirichoi0218\_insurance & R & $-1$ & www.kaggle.com & insurance.csv \\ $29$ & Communities and Crime & R & $-1$ & archive.ics.uci.edu & communities.data \\ $30$ & Jasmine & C & $0$ & www.openml.org & file79b563a1a18.arff \\ $31$ & Abalone & R & $-1$ & archive.ics.uci.edu & abalone.data \\ $32$ & mercedes-benz-greener-manufacturing & R & $1$ & www.kaggle.com & train.csv.zip \\ $33$ & Sylvine & C & $0$ & www.openml.org & file7a97574fa9ae.arff \\ $34$ & christine & C & $0$ & www.openml.org & file764d5d063390.csv \\ $35$ & arashnic\_marketing-seris-customer-lifetime-value & R & $2$ & www.kaggle.com & squark\_automotive\_CLV\_training\_data.csv \\ $36$ & Seoul Bike Sharing Demand & R & $1$ & archive.ics.uci.edu & SeoulBikeData.csv \\ $37$ & Electrical Grid Stability Simulated Data & R & $-2$ & archive.ics.uci.edu & Data\_for\_UCI\_named.csv \\ $38$ & snooptosh\_bangalore-real-estate-price & R & $-1$ & www.kaggle.com & blr\_real\_estate\_prices.csv \\ $39$ & MAGIC Gamma Telescope & C & $-1$ & archive.ics.uci.edu & magic04.data \\ $40$ & Appliances energy prediction & R & $2$ & archive.ics.uci.edu & energydata\_complete.csv \\ $41$ & Nomao & C & $-1$ & www.openml.org & phpDYCOet \\ $42$ & Beijing PM2.5 Data & R & $5$ & archive.ics.uci.edu & PRSA\_data\_2010.1.1-2014.12.31.csv \\ $43$ & Physicochemical Properties of Protein Tertiary Structure & R & $6$ & archive.ics.uci.edu & CASP.csv \\ \hline \end{tabular} \caption{Dataset description} \end{table} \subsubsection{Pre-processing.} \label{app:pre-processing} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little pre-processing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed uninformative features such as sample index. Categorical features with more than 12 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. \paragraph{Target treatment.} The target is centered and standardized via the function $\textbf{{function-T}}(\cdot)$. We remove the observation when the value is missing. \bigskip \paragraph{Features treatment.} The imputation treatment is done during processing. For categorical features, {\texttt{NAN}}{} Data may be considered as a new class. For numerical features, we replace missing values by the mean. Set $n_j=\#\textbf{\texttt{set}}(X_j)$ the number of distinct values taken by the feature $X_j$, We proceed as follows : \begin{itemize} \item[$\bullet$] When $n_j=1$, the feature $X_j$ is irrelevant, we remove it. \item[$\bullet$] When $n_j=2$ (including potentially {\texttt{NAN}}{} class), we perform numerical encoding of binary categorical features. \item[$\bullet$] Numerical features with less than $12$ distinct values are also treated as categorical features ($2<n_j\leq 12$). We apply one-hot-encoding. \item[$\bullet$] Finally, categorical features with $n_j> 12$ are removed. \end{itemize} \subsection{Methods} \label{app:datamodellist} \paragraph{Usual methods.} We evaluate \texttt{AdaCap}{} against a large collection of popular methods ({\texttt{XGB}}{} \cite{Breiman1997_arcing,Friedman2001,Friedman2002}, {\texttt{XGBoost}}{}, {\texttt{CatBoost}}{} \cite{Prokhorenkova2018}, \cite{guestrin2016}, {\texttt{LightGBM}}{} \cite{Ke2017}, {\texttt{RF}}{} and {\texttt{XRF}}{} \cite{breiman2001,barandiaran1998random}, {\texttt{SVM}}{} and kernel-based \cite{Chihchung2011}, {\texttt{MLP}}{} \cite{Hinton89connectionistlearning}, {\texttt{Elastic-Net}}{} \cite{Zou05}, {\texttt{Ridge}}{} \cite{Hoerl1970}, \texttt{Lasso}{} \cite{tibshirani1996}, \texttt{Logistic regression} \cite{cox1958}, {\texttt{MARS}}{} \cite{Friedman1991}, \texttt{CART}, \texttt{XCART} \cite{Breiman1984,gey2005model,Klusowski2020sparse} ). \paragraph{\texttt{Fast}{\texttt{CatBoost}}{} hyperparameter set} {\texttt{CatBoost}} is one of the dominant method on {\text{TD}}, but also one of the slowest in terms of training time. We felt it was appropriate to evaluate a second version of {\texttt{CatBoost}} with a set of hyper-parameters designed to cut training time without decreasing performance too much. Following the official documentation guidelines, we picked the following hyperparameters for \texttt{Fast}{\texttt{CatBoost}}: \begin{itemize} \item "iterations":100, \item "subsample":0.1, \item "max\_bin":32, \item "bootstrap\_type", \item "task\_type":"GPU", \item "depth":3. \end{itemize} \paragraph{{\texttt{FFNN}}{} architectures} See Table~\ref{tab:architectureinfos-app} for the different {\texttt{FFNN}}{} architectures included in our benchmark. \begin{table}[h] \centering \footnotesize \caption{{\texttt{FFNN}}{} architectures included in our benchmark. Legend for Block type: L=Linear; Res=Residual,GL=Gated Linear; GR=Gated Residual} \label{tab:architectureinfos-app} \begin{tabular}{|l||l|c|c|l|c|c|c|c|} \hline Name & \begin{tabular}{@{}c@{}}Block \\ Type\end{tabular} & \# Blocks & \begin{tabular}{@{}c@{}}Block \\ Depth\end{tabular} & Activation & Width & \begin{tabular}{@{}c@{}}Iter/ \\ epochs\end{tabular} & \begin{tabular}{@{}c@{}}Batch \\ Size\end{tabular}& max lr\\ \hline \hline \Fast\MLP & \texttt{Linear} & $2$ & $1$ & {\texttt{ReLU}} & $256$ & $200$ & $\min(n,2048)$ & $1e-2$ \\ {\texttt{MLP}} & \texttt{Linear} & $2$ & $1$ & {\texttt{ReLU}} & $512$ & $500$ & $\min(n,2048)$ & $1e-2$ \\ \texttt{Batch}\MLP& \texttt{Linear} & $2$ & 1 & {\texttt{ReLU}} & $512$ & $20$ & $256$ & $1e-2$ \\ \Fast {\texttt{SNN}}{} & \texttt{Linear} & $2$ & $1$ & {\texttt{ReLU}} & $256$ & $200$ & $\min(n,2048)$ & $1e-2$ \\ {\texttt{SNN}}{} & \texttt{Linear} & $2$ & $1$ & {\texttt{SELU}} & $512$ & $500$ & $\min(n,2048)$ & $1e-2$ \\ \ResBlock & \texttt{ResBlock} & $2$ & $2$ & {\texttt{ReLU}} & $512$ & $500$ & $\min(n,2048)$ & $1e-2$ \\ \texttt{Batch}\ResBlock & \texttt{ResBlock} & $2$ & $2$ & {\texttt{ReLU}} & $512$ & $50$ & $256$ & $1e-2$ \\ \GLU{} \MLP & \texttt{GLU} & $3$ & $1$ & {\texttt{ReLU}}/{\texttt{Sigmoid}}& $512$ & $500$ & $\min(n,2048)$ & $1e-2$ \\ \hline \end{tabular} \end{table} \section{Hardware Details} We ran all benchmark experiments on a cluster node with an Intel Xeon CPU (Gold 6230 20 cores @ 2.1 Ghz) and an Nvidia Tesla V100 GPU. All the other experiments were run using an Nvidia 2080Ti. \section{Experiment results} \subsection{Experiments on Hyper-Parameter Optimization} We timed on a subset of datasets and random seeds the use of HPO \cite{zimmer-tpami21a, feurer2020auto} which is both outside of the considered usecase and irrelevant to \texttt{AdaCap}{} since this method \textbf{does not introduce new hyper-parameters requiring tuning} \section{Supplementary material} \end{document} \subsection{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \label{sec:MLRmethod} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer. and the {\texttt{ReLU}}{} activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 3 essential ingredients of the \texttt{\,MLR $\,$}{} method are Ridge regularization, structured dithering and random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\lambda,\boldsymbol{\theta},\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n} \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}_J$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\lambda,\boldsymbol{\theta},\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\lambda,\boldsymbol{\theta},\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y}=\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})\textbf{Y}. \end{eqnarray} Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\lambda,\boldsymbol{\theta},\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let $\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\lambda,\boldsymbol{\theta}) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term quantifies the amount of memorization of a model by comparing its {\texttt{RMSE}}{} on uninformative labels to the baseline ${\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$, $i.e.$ the performance achieved without fitting the data. Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances. We explain below the role of $(\I_n-\textbf{H}) \xi$ and $(\I_n-\textbf{H}) \xi_t$. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the Ridge instead of the {\texttt{OLS}}, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting $capacity$ of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. More precisely, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the {\texttt{FFNN}}{} is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ \textbf{does not require hyperparameter tuning}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix,SHARMA201331}. \subsection{Model: \textbf{NN}{} and training protocol} \label{sec:Protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as possible (our machine with 11GVRAM allowed for $J=2^{10}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align*} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\lambda,\boldsymbol{\theta}) \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal}. \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, $etc$. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{5 \times k / 11}\;: \; k = 0, \cdots, 11 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\;\text{where}\;\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\lambda,\boldsymbol{\theta}^{(k+1)}) - \texttt{\,MLR $\,$}(\lambda,\boldsymbol{\theta}^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $11$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the Neural Net architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{10}$) and bigger batch size ($b_s = \min(J,n)$) is always better. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{{\texttt{Iter}}}$ and early stopping.} We fix the budget ({\texttt{FixB}} = 5 min) and denote by $n_{{\texttt{Iter}}}$ the possible number of iterations during the alloted time {\texttt{FixB}}. We fix the maximum number of iterations $\max_{{\texttt{Iter}}}$ (depending on the value of $L$). Then, ${\texttt{Iter}} = \min(\max_{{\texttt{Iter}}},n_{{\texttt{Iter}}})$ is the number of iterations that will actually be performed. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take the iteration with the best ${\texttt{R}^2}$-score: ${\texttt{Iter}}^*:=\arg\max\{\texttt{R}^2_k, \ k =1,\cdots,{\texttt{Iter}}\}$ . Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{{\texttt{Iter}}}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{10}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} The generic values ($\tilde{\sigma} = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the {\texttt{FFNN}}{} architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size $b_s$, which are fixed in our method. As a pure DL method, \texttt{\,MLR $\,$}{} method is scalable. Its complexity is the same as training a standard {\texttt{NN}{}}{} \cite{Murugesan2018Embarrassingly}. We refer to the Appendix for a detailed description of the training protocol. \section{Extended state of the art} \label{sec:SOTA} Over the last decade, we have witnessed the spectacular performance of Deep Learning ({\text{DL}}) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that {\text{DL}}{} is irrelevant for tabular data \cite{videolecture}. While the need to handle tabular data arises in many fields ($e.g.$ material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), {\text{DL}}{} for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods \cite{Denil2014narrow,Delgado14a,Mentch2020Rand,Wainberg2016} are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a,Wainberg2016}. By contrast, training {\text{DL}}{} models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large datasets may be costly, or even impossible by the nature of the task at hand\footnote{$e.g.$ decision making on a limited amount of cases during a pandemic.} Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{shavitt2018}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on the preprocessing of categorical features which was an historical limitation of {\text{DL}}{} \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in {\text{DL}}{} libraries (tensorflow, PyTorch, \textit{etc.}). Meanwhile, tree based ensemble methods and Gradient Boosting Decision Trees ({\texttt{GBDT}}{}) are still considered the best option to handle categorical data \cite{Prokhorenkova2018,Anghel2018Bench,Harasymiv2015_gbdt}. Developing a {\text{DL}}{} solution for tabular data is desirable at it can leverage the particular strengths of {\text{DL}}{}, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the {\text{DL}}{} community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data. $\bm{*}$ uses the UCI database which has some well-known flaws \cite{Arora2020meuf,Klambauer2017,Wainberg2016}.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|cc|c|} \hline Method & End-to-end & Works without & Task & \multicolumn{2}{|c|}{ Benchmark } & Consistently outperforms \\ & differentiable & HP tuning & & \# datasets& Range $n$ & {\texttt{GBDT}} \\ \hline {\texttt{TabNN}}{} \cite{ke2019tabnn} & no & no & Reg/Classif &5&14.8K-7.3M & no\\%14.8K-7.29M \hline {\texttt{NODE}}{} \cite{Popov2020Neural} & \checkmark & no & Reg/Classif &6&500K-11M & no\\%Sometimes\\ \hline {\texttt{TabNet}}{} \cite{arik2020tabnet} & self-supervised & no & Reg/Classif & 4&10K-11M & \checkmark\\%Significantly \\ \hline {\texttt{DNDT}}{} \cite{YangMorillo2018} & \checkmark & \checkmark &\Clf &14& 150-1.1M & no\\ \hline {\texttt{NTK}}{} \cite{Arora2020meuf} & \checkmark & no & \Clf &90\bm{*}& 10-130K & no \\ \hline {\texttt{SNN}} {}\cite{Klambauer2017} & \checkmark & no & Reg/Classif &122\bm{*}& 10-130K & no\\ \hline {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} & no & \checkmark & \Clf & 6&9.8K-200K &no\\% rarely \\ \hline {\texttt{RLN}}{} \cite{shavitt2018} & \checkmark & \checkmark& Reg & 9&2.5K& no \\ \hline \texttt{\,MLR $\,$}{} (this work) & \checkmark & \checkmark & Reg/Classif & 32 & 72-65K & Reg:\checkmark\\%Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical {\text{DL}}{} regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{Hanson1988Comparing}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that dropout parameters are data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of {\text{DL}}{} remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. {\texttt{DNDT}}{} \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However {\texttt{DNDT}}{} is not scalable $w.r.t.$ the number of features and does not outperform Random Forests ({\texttt{RF}}) or standard {\texttt{NN}{}}{} on the UCI database. Attention-Mechanism ({\texttt{AM}}) has boosted {\text{DL}}{} performance on a range of {\texttt{NLP}}{} tasks \cite{Bahdanau2014-Attention,bert2019}). It turns out that {\texttt{AM}}{} can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited {\texttt{AM}}{} to develop {\texttt{TabNet}}{}, an interpretable {\text{DL}}{} method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with {\text{DL}}{}. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of {\texttt{RF}}{} or {\texttt{GBDT}}{}. However these architectures cannot be trained end-to-end, which may result in potentially inferior performance. {\texttt{TabNN}}{} \cite{ke2019tabnn} is a hybrid machine learning algorithm using {\texttt{GBDT}}{} and Deep Neural Networks ({\texttt{DNN}}). {\texttt{TabNN}}{} outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over {\texttt{GBDT}}{} seems marginal in their experiments on 6 data sets ranging in size from $15$K up to $7.9$M training samples. More recently, {\texttt{NODE}}{} \cite{Popov2020Neural}, a new {\texttt{DNN}}{} architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. {\texttt{NODE}}{} marginally outperforms ensemble methods ({\texttt{CatBoost}} \cite{Prokhorenkova2018}, {\texttt{XGBoost}} \cite{guestrin2016}) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train {\texttt{DNN}}{} by specific losses with interesting properties. In that regard, Regularization Learning Networks ({\texttt{RLN}}) \cite{shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. {\texttt{RLN}}{} performs significantly better than standard {\texttt{NN}{}}{} but could not beat {\texttt{GBDT}}{}. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel ({\texttt{NTK}}){}\cite{Arora2020meuf}, {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} and Self-Normalized Neural Networks ({\texttt{SNN}}) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We provide more details about these methods in the Appendix. {\color{red} \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. Our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), penalizes memorization over permuted labels and structured noise through the application of a differentiable close-form regularization scheme on the last hidden layer during training. More specifically: - Our method outperforms usual methods (Ensemble, {\texttt{SVM}}, Boosting, Linear Regression, $etc.$ ) including the gold standards {\texttt{RF}}{} and {\texttt{GBDT}}{} for the usual statistics (Mean ${\texttt{R}^2}$, Friedman rank, P90, P95, P98, PMA) on a diverse collection of regression datasets. Our method also comes in a close second for classification tasks. - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot-encoding and standard imputation of missing data. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om \cite{Williams2001using} and {\texttt{RBF}}{} \cite{RasmussenW06} kernels, tree leaves). All the popular {\text{DL}}{} schemes can also be leveraged including learning rate schedulers \cite{smith2015cyclical}, optimizers, weight decay, batch-normalization, drop-out, residual layers and leaky activations \cite{smith2018disciplined}. - The performances of \textbf{NN}{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf {\text{DL}}{} solution or integrate it into the most advanced ML pipelines. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API (\textit{i.e.} it can be directly encapsulated into parameter search routines, bagging meta models, \textit{etc.}). For the sake of replicability, the code to run the benchmarks, the ablation study and the preprocessing applied to each dataset is also provided. The rest of the paper is organized as follows. We describe our approach in Section \ref{sec:MLRmethod}. In Section \ref{sec:exp}, we carry out a detailed ablation study of our method and evaluate its performances on real data. } \section{Introduction} Over the last decade, we have witnessed the spectacular performance of Deep Learning ({\text{DL}}) in the fields of computer vision \cite{Krizhevsky2012_cnn}, audio \cite{Hinton2012} and natural language processing \cite{bert2019}. Until recently, it was also widely believed that {\text{DL}}{} is irrelevant for tabular data \cite{videolecture}. While the needs to handle tabular data arise in many fields ($e.g.$ material science \cite{FENG2019300}, medecine \cite{Rajkomar2018}, online advertising \cite{Zhou2018click,Guo2016}, finance \cite{buehler_deep_2019}), {\text{DL}}{} for tabular data remains understudied and underused. It may seem strange considering that tabular data appears at first more straightforward to handle than image or textual data. Most experiments seem to indicate that tree based ensemble methods (\cite{scikit-learn}) are the most reliable option on tabular data and often work well even without any parameter tuning \cite{Delgado14a}. By contrast, training {\text{DL}}{} models usually requires extensive trial and error, expertise and time to properly tune the hyperparameters \cite{smith2018disciplined}. This comparison is even worse in the small data regime ($n < 10^3$ or even $n<300$). In many fields including material sciences \cite{FENG2019300}, medicine \cite{JTD4418,Rajkomar2018}, environmental studies \cite{Cassotti2015similarity-based}, small datasets are not rare occurrences since collecting samples and assembling large data set may be costly, or even impossible by the nature of the task at hand\footnote{$e.g.$ decision making on a limited amount of cases during a pandemic.} Deep learning mostly relies on transfer learning schemes to tackle small datasets \cite{Oquab_2014_CVPR}, which are almost never an option for tabular datasets \cite{shavitt2018}. This is due to the lack of transferable domain knowledge between tabular features. Another important line of work focuses on preprocessing of categorical features which was an historical limitation of {\text{DL}}{} \cite{qu_product-based_2016, guo_deepfm:_2017, wang_collaborative_2015,cheng_wide_2016,covington_deep_2016,zhang_deep_2019}. In that regard, entity embeddings \cite{Guo2016}, which try to capture relationships between categories, have become standard in {\text{DL}}{} libraries (Keras, PyTorch and FastAI). Meanwhile, tree based ensemble methods are still considered the best option to handle categorical data \cite{Prokhorenkova2018}. Developing a {\text{DL}}{} solution for tabular data is desirable at it can leverage the particular strengths of {\text{DL}}{}, in particular its ability to perform automatic feature engineering and end-to-end training via gradient descent. The recent \texttt{PyTorch Tabular} project \cite{pytorchtab} and the growing number of articles on tabular data in recent years show the increasing interest of the {\text{DL}}{} community in this topic \cite{YangMorillo2018,arik2020tabnet,ZhouFeng2017,MillerHHJK17,FengYuZhou2018,ke2019tabnn,Olson2018moderna,Arora2020meuf,katzir2021netdnf,Klambauer2017,shavitt2018,Haldar2019,Popov2020Neural,pmlr-v97-du19a}. \begin{table}[!hp] \caption{State-of-the-art: Deep Learning for supervised tasks on tabular data.} \label{tab:SotA} \centering \resizebox{\columnwidth}{!}{ \begin{tabular}{|l|c|c|c|lc|c|} \hline Method & End-to-end & HP & Task & \multicolumn{2}{|c|}{ Dataset\textcolor{gray}{benchmark} } & Beat {\texttt{GBDT}} \\ & differentiable & tuning & & Size \textcolor{gray}{number of datasets}????? & \textcolor{gray}{$n$} Range & significantly \\ \hline {\texttt{TabNN}}{} \cite{ke2019tabnn} & no & hard & Reg/Classif &5&14.8K-7.3M & no\\%14.8K-7.29M \hline {\texttt{NODE}}{} \cite{Popov2020Neural} & \checkmark & hard & Reg/Classif &6&500K-11M & no\\%Sometimes\\ \hline {\texttt{TabNet}}{} \cite{arik2020tabnet} & self-supervised & hard & Reg/Classif & 4&10K-11M & yes\\%Significantly \\ \hline {\texttt{DNDT}}{} \cite{YangMorillo2018} & \checkmark & easy &\Clf &14& \textcolor{gray}{150 ou 150K}150-1.1M & no\\ \hline {\texttt{NTK}}{} \cite{Arora2020meuf} & \checkmark & hard & \Clf &90& \textcolor{gray}{10 ou 10K} 10-130K & N.A. \\ \hline {\texttt{SNN}} {}\cite{Klambauer2017} & \checkmark & hard & Reg/Classif &122& \textcolor{gray}{10 ou 10K} 10-130K & N.A.\\ \hline {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} & no & easy & \Clf& 6&9.8K-200K &no\\% rarely \\ \hline {\texttt{RLN}}{} \cite{shavitt2018} & \checkmark & easy& Reg & 9&2.5K& no \\ \hline \texttt{\,MLR $\,$}{} (this work) & \checkmark & easy & Reg/Classif &?&72-65K & yes\\%Significantly\\ \hline \end{tabular} } \end{table} \paragraph{Regularization.} Two classical {\text{DL}}{} regularization strategies, dropout \cite{srivastava14a} and weight decay \cite{Hanson1988Comparing}, have been compared by \cite{ZhangDW16} on tabular data. They found dropout to be better, however dropout may still fail in some tabular data tasks \cite{Haldar2019}. Moreover \cite{SongS0DX0T19,ZhangDW16,Qu2018,guo_deepfm:_2017} seem to indicate that the dropout parameter is data and model dependent. \paragraph{Interpretability.} The "black-box" aspect of {\text{DL}}{} remains a major obstacle to its wider use as interpretability in AI is an important concern \cite{chen2018learning}. Recently, a line of research focuses on the development of novel network architectures with interpretable features. {\texttt{DNDT}}{} \cite{YangMorillo2018} is a specific neural network architecture which can be trained via end-to-end gradient descent. In addition, it can also be rendered as a decision tree for the sake of interpretation. However {\texttt{DNDT}}{} is not scalable $w.r.t.$ the number of features and does not outperform Random Forests ({\texttt{RF}}) or standard {\texttt{NN}{}}{} on the UCI database. Attention-Mechanism ({\texttt{AM}}) has boosted {\text{DL}}{} performance on a range of {\texttt{NLP}}{} tasks (\cite{Bahdanau2014-Attention,bert2019}). It turns out that {\texttt{AM}}{} can also be used for interpretability purpose. Recently \cite{arik2020tabnet} exploited {\texttt{AM}}{} to develop {\texttt{TabNet}}{}, an interpretable {\text{DL}}{} method for tabular data, and claimed it outperforms the gold standard on a limited number of data sets of size $\gtrsim 10K$. A limitation of this approach is the complicated data dependent fine-tuning of the hyperparameters. \paragraph{Hybrid architecture.} Several recent works propose to combine decision trees with {\text{DL}}{}. In that regard, \cite{ZhouFeng2017,MillerHHJK17,FengYuZhou2018} proposed to stack layers of {\texttt{RF}}{} or Gradient Boosted Decision Tree ({\texttt{GBDT}}) ensembles. However these architectures cannot be trained end-to-end, which may result in potentially inferior performance. {\texttt{TabNN}}{} \cite{ke2019tabnn} is a hybrid machine learning algorithm using {\texttt{GBDT}}{} and Deep Neural Networks ({\texttt{DNN}}). {\texttt{TabNN}}{} outperforms standard Feed-Forward Neural Networks ({\texttt{FFNN}}{}) but the improvement over {\texttt{GBDT}}{} seems marginal in their experiments on 6 data sets ranging in size from $15$K up to $7.9$M training samples. More recently, {\texttt{NODE}}{} \cite{Popov2020Neural}, a new {\texttt{DNN}}{} architecture consisting of differentiable oblivious decision trees, can be trained end-to-end via backpropagation. {\texttt{NODE}}{} marginally outperforms ensemble methods ({\texttt{CatBoost}}, {\texttt{XGBoost}}) on 4 out of 6 large size tabular data sets and requires careful hyperparameter optimization. \paragraph{New loss functions.} Our contribution falls in this line of research. It consists in replacing the usual loss used to train {\texttt{DNN}}{} by specific losses with interesting properties. In that regard, Regularization Learning Networks ({\texttt{RLN}}) \cite{shavitt2018} is a new family of neural networks trained with a new loss, named counterfactual loss, together with stochastic gradient descent. {\texttt{RLN}}{} performs significantly better than standard {\texttt{DNN}}{} but could not beat {\texttt{GBDT}}{}. \paragraph{Other approaches.} We can also cite Neural Tangent Kernel ({\texttt{NTK}}){}\cite{Arora2020meuf}, {\texttt{Net-DNF}}{} \cite{katzir2021netdnf} and Self-Normalized Neural Networks ({\texttt{SNN}}) \cite{Klambauer2017}. Table \ref{tab:SotA} summarizes their properties. We also discuss these methods in length in the Appendix. \paragraph{Contributions.} We propose a pure deep learning solution to train a standard {\texttt{FFNN}}{} for tabular data. Our method, \textbf{Muddling labels for Regularization} (\texttt{\,MLR $\,$}), penalizes memorization over permuted labels and random noise through the application of a differentiable close-form regularization scheme on the last hidden layer during training. More specifically: - Our method proved more reliable than usual methods (Ensemble, {\texttt{SVM}}, Boosting, Linear Regression, $etc.$ ) including the gold standards {\texttt{RF}}{} and {\texttt{GBDT}}{}, on our aggregated benchmark (UCI+ Kaggle). It consistently ranked in the top \textcolor{gray}{3 or 5} on all datasets in terms of ${\texttt{R}^2}${} for regression or Accuracy and {\texttt{AUC}}{} for binary classification, whatever the number of samples, of features, the type of features or the domain of the datasets. - The \texttt{\,MLR $\,$}{} method only requires the most basic standardization, one-hot-encoding and standard imputation of missing data to function. \texttt{\,MLR $\,$}{} is fully compatible with all feature engineering schemes ($e.g.$ embeddings, Nystr\"om and {\texttt{RBF}}{} kernels, tree leaves). All the popular {\text{DL}}{} schemes can also be leveraged including learning rate schedulers, optimizers, weight decay, batch-normalization, drop-out, residual layers and leaky activations. - The performances of \textbf{NN}{} are not tied with any of the well-known class of methods. Thus they should be a great addition to the stack of models aggregated by meta-learners. Researchers and practitioners can use \texttt{\,MLR $\,$}{} on its own as an off-the-shelf {\text{DL}}{} solution or integrate it into the most advanced ML pipelines. - The implementation of our method in torch is available as a stand-alone which follows the scikit-learn API (\textit{i.e.} it can be directly encapsulated into parameter search routines, bagging meta models, \textit{etc.}). For the sake of replicability, the code to run the benchmarks, the ablation study and the preprocessing applied to each dataset is also provided. \textcolor{gray}{The rest of the paper is organized as follows. Our method is described in Section \ref{sec:MLRmethod}. In Section \ref{sec:exp}, we carry out a detailed ablation study of our method and evaluate its performances on real data.} \section{The \texttt{\,MLR $\,$}{}-{\texttt{FFNN}}{}} \label{sec:MLRmethod} \subsection{The (\texttt{\,MLR $\,$}{}) method for Regression} Let $\mathcal{D}_{train}=(\textbf{x},\textbf{Y})=\{(\textbf{x}_i,Y_i)\}_{i=1}^n$ be the $train$-set with $\textbf{x}_i\in\mathbb{R}^d$ where $d$ denotes the number of features and $Y_i \in \mathbb{R}$. We consider a simple {\texttt{FFNN}}{} with $L$ layers, $J$ nodes on each hidden layer and the ReLu activation function between each hidden layer. For $n$ observations $\textbf{x}$, we set $\textbf{A}^0=\textbf{x}\in\mathbb{R}^{n\times d}$ and $\textbf{A}^1={\texttt{ReLU}}(\textbf{A}^{0}W^{1} +B^{1}),\,\,W^1\in\mathbb{R}^{d\times J}$ \begin{eqnarray} \label{FFNN} \textbf{A}^{\ell+1}&=&{\texttt{ReLU}}(\textbf{A}^{\ell}W^{\ell+1} +B^{\ell+1}),\quad W^{\ell+1}\in\mathbb{R}^{J\times J},\,\,\forall\ell\in\llbracket1,L-2 \rrbracket,\nonumber\\ \textbf{A}^L&=&\textbf{A}^{L-1}W^L,\quad W^L\in\mathbb{R}^{J\times 1}, \end{eqnarray} where $\forall\ell\in\llbracket1,L-1 \rrbracket$, $B^{\ell} = \mathbbm{1}_n \otimes b^{\ell}$, $b^{\ell}\in\mathbb{R}^{J}$ are the bias terms. The 3 essential ingredients of the \texttt{\,MLR $\,$}{} method are Ridge regularization, structured dithering and random permutations as they promote generalization when we train this {\texttt{FFNN}}{}. We introduce first the Ridge regularization. For $\lambda>0$, we set \begin{eqnarray} \label{W} \textbf{P}&=&\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})=\left[(\textbf{A}^{L-1})^\top\textbf{A}^{L-1}+\lambda \ensuremath{\mathbb{I}}_J\right]^{-1}(\textbf{A}^{L-1})^\top\in\mathbb{R}^{J\times n}\\ \label{H} \textbf{H}&=&\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{A}^{L-1}\textbf{P}\in\mathbb{R}^{n\times n} \end{eqnarray} where the last hidden layer is $\textbf{A}^{L-1}:=\textbf{A}^{L-1}(\boldsymbol{\theta},\textbf{x})$ and $\ensuremath{\mathbb{I}}_J$ denotes the identity matri . Note that $\textbf{H}$ is differentiable w.r.t. $\boldsymbol{\theta} =\{(W^{\ell},b^{\ell})\}_{\ell=0}^L$ and $\lambda$. We apply Ridge regularization\footnote{Ridge model : $f(\boldsymbol{\theta},\lambda,\textbf{x})=\textbf{x}\,\beta_{\lambda}(\textbf{x},\textbf{Y}):=\textbf{x}\,(\textbf{x}^\top\textbf{x}+\lambda\ensuremath{\mathbb{I}})^{-1}\textbf{x}^\top\textbf{Y}$} to the last hidden layer $\textbf{A}^{L-1}$ instead of input $\textbf{x}$: \begin{eqnarray} \label{ridge} f(\boldsymbol{\theta},\lambda,\textbf{x}):=\textbf{A}^{L-1}W^L=\textbf{A}^{L-1}\textbf{P}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})\textbf{Y}. \end{eqnarray} Next we introduce the \textbf{permutations}. For a permutation $\pi$ of $n$ elements, we define the corresponding label permutation operator $\pi$ of $\textbf{Y} = (Y_1,\cdots,Y_n)$ as $ \pi(\textbf{Y})=(Y_{\pi(1)},\cdots,Y_{\pi(n)}). $ Fix $T\geq 1$ and draw $T$ label permutation operators \textbf{uniformly at random} in the set of all possible label permutations : $(\pi^t(\textbf{Y}))_{t=1}^T$. This operation can be seen as a form of data-augmentation on the labels. \begin{mydef}[\texttt{\,MLR $\,$}{} regression loss] \label{MLRlossBigsetting} Set $\textbf{H}=\textbf{H}(\boldsymbol{\theta},\lambda,\textbf{x})$. We draw $i.i.d.$ random vectors $\xi$ and $\left(\xi_t\right)_{t=1}^T$ distributed as $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}}_n)$. Let ${\textbf{Perm}}(\textbf{Y})=\left(\pi^t(\textbf{Y})\right)^T_{t=1}$ be $T$ independently drawn permutations of $\textbf{Y}$. We set $\overline{\textbf{Y}} = mean(\textbf{Y})$ and define the \texttt{\,MLR $\,$}{} loss as \begin{align*} \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) &= {\texttt{RMSE}}\,\left(\textbf{Y}+(\I_n-\textbf{H}) \xi\,;\,\textbf{H}\textbf{Y}\right)\\ &\hspace{1cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) - {\texttt{RMSE}}\,\left(\pi^t(\textbf{Y})+(\I_n-\textbf{H}) \,\xi_t\,;\,\textbf{H}\,\pi^t(\textbf{Y})\right)\right|. \end{align*} \end{mydef} The \texttt{\,MLR $\,$}{} loss contains two antagonistic terms and was first introduced in the linear regression setting \cite{MLR}. The first term is the usual {\texttt{RMSE}}{} while the second term quantifies the amount of memorization of a model by comparing its {\texttt{RMSE}}{} on uninformative labels to the baseline ${\texttt{RMSE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$, $i.e.$ the performance achieved without fitting the data. Using the {\texttt{RMSE}}{} instead of the {\texttt{MSE}}{} in the comparison slightly improves the generalization performances. We explain below the role of $(\I_n-\textbf{H}) \xi$ and $(\I_n-\textbf{H}) \xi_t$. \paragraph{The benefit of close-form regularization.} The replacement of the output layer with Ridge regularizes the network in two ways: $(i)$ the weights on the output layer are a direct function of the last hidden layer $\textbf{A}^{L-1}$. This effect is much stronger than adding a constraint or a penalty directly on $W^L$ the weights of the $L$-th layer in (\ref{FFNN}); $(ii)$ the close-form we choose is the Ridge instead of the {\texttt{OLS}}, which implicitly subjects the weights to a steerable $L_2$ regularization. \paragraph{The generalization effect of random permutations.} Our work is loosely related to \cite{zhang2016understanding} where label permutations are used after the model has been trained as a \textit{qualitative} observational method to exhibit the overfitting capacity of Neural networks. In our approach, we go further as we use random permutations during the training phase to define a \textit{quantitative} measure of the amount of overfitting of a model. More precisely, label permutation is used to produce a control set $(\textbf{x},\pi(\textbf{Y}))$ that can only be fitted through memorization. \texttt{\,MLR $\,$}{} focuses on patterns that appear only in $(\textbf{x},\textbf{Y})$ and not in uncorrelated pairs $(\textbf{x},\pi(\textbf{Y}))$. See the appendix for more details. \paragraph{Structured Dithering.} We describe an additional scheme to prevent memorization. We apply a dithering scheme which adapts to the spectral structure of $\textbf{H}$, the "regularized projector" based on $\textbf{A}^{L-1}$ (the output of the last hidden layer). More specifically, we muddle the target using $(\I_n-\textbf{H}) \xi\,$ which introduces noise of higher variance along the weakly informative eigendirections of $\textbf{H}$. \paragraph{Computational point of view.} The permutations are drawn once before the training and are not updated or changed thereafter. Once the model is trained, these permutations have no further use and are thus discarded. In practice we take $T=16$ for all the datasets in our benchmark. Therefore, $T$ \textbf{does not require hyperparameter tuning}. Moreover, note that the choice of the seed used to generate the permutations has no impact on the values of the \texttt{\,MLR $\,$}{} loss. The additional computational cost of using \texttt{\,MLR $\,$}{} is marginal. We only need to compute a matrix inverse on the output of the last hidden layer $\textbf{A}^{L-1}$. This operation is differentiable and inexpensive as parallelization schemes provide linear complexity on GPU when some memory constraints are met \cite{Murugesan2018Embarrassingly,rajibr2010accelerating,chrzeszczyk2013matrix}. \subsection{Model: \textbf{NN}{} and training protocol} \paragraph{The \textbf{NN}{} Architecture.} We consider the {\texttt{FFNN}}{} described in \eqref{FFNN} with $L$ layers and all the hidden layers of constant width $J$. In our experiments, we always take $J$ as large as physically possible (our machine with 11GVRAM allowed for $J=2^{12}$) and $L\in\ensuremath{\mathcal{G}}_L:=\{1,2,3,4\}$. All these choices are motivated in the ablation study in Section \ref{Sec:exp} below. The \texttt{\,MLR $\,$}{} neural net (\textbf{NN}) is \begin{align*} \label{NN} \textbf{NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)=\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x}) \textbf{Y} \quad\text{with}\quad (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda) \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ as defined in \eqref{W}. The initialization of $\boldsymbol{\theta}$ is as in \cite{Gloriotetal} (See Appendix for more details). \paragraph{Initialization of the Ridge parameter.} The initialization of $\lambda$ is both crucial and non trivial. Choosing $\lambda$ close to $0$ will hinder regularization. Furthermore, a very small value of $\lambda$ will cause numerical instability during the matrix inversion. Conversely, choosing $\lambda$ too big will prevent any learning. Indeed, the gradient with respect to $\lambda$ will vanish in both cases. From our initial calibration, we discovered that there exists no universal value to initialize $\lambda$. The appropriate initial value depends on many factors such as data size, network architecture, difficulty of the task, $etc$. However, we found a very efficient heuristic to pick an appropriate initial value. We want to start training from the point where fitting the data will lead to generalization as much as possible instead of memorization. In this region, the variation of \texttt{\,MLR $\,$}{} with respect to $\lambda$ is maximum. In practice, we pick $\lambda_{init}$ by running a grid-search on the finite difference approximation for the derivative of \texttt{\,MLR $\,$}{} in (\ref{lambdainiti}) on the grid $\ensuremath{\mathcal{G}}_{\lambda}=\left\lbrace \lambda^{(k)} = 10^{-1}\times10^{6 \times k / 40}\;: \; k = 0, \cdots, 39 \right\rbrace$: \begin{eqnarray} \label{lambdainiti} \lambda_{init}=\sqrt{\lambda^{(\hat {k}})\,\lambda^{(\hat {k}+1)}}\,\text{where}\,\hat {k}=\arg\max\left\{ \left(\texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{(k+1)}) - \texttt{\,MLR $\,$}(\boldsymbol{\theta},\lambda^{{(k)}})\right),\, \lambda^{(k)}\in\ensuremath{\mathcal{G}}_{\lambda}\right\}. \end{eqnarray} From a computational point of view, the overcost of this step is marginal because we only compute $\textbf{A}^{L-1}$ once, and we do not compute the derivation graph of the $40$ matrix inversions or of the unique forward pass. The Ridge parameter $\lambda$ is \textbf{not an hyperparameter} of our method; it is trained alongside the weights of the NN architecture. \paragraph{Dither{} \cite{dither}.} We do not apply the \texttt{\,MLR $\,$}{} loss on $\textbf{Y}$ and the permuted labels $\left(\pi^t(\textbf{Y})\right)_{t=1}^T$ but rather on noisy versions of them. We draw $T+1$ $i.i.d.$ $\ensuremath{\mathcal{N}}(\boldsymbol{0}_n,\widetilde\sigma^2\ensuremath{\mathbb{I}}_n)$ noise vectors that are added to $\textbf{Y}$ and $\pi^t(\textbf{Y})$, $1\leq t \leq T$. Here again, $\widetilde\sigma$ is \textbf{not an hyperparameter} as we use the same value $\widetilde\sigma=0.03$ for all the data sets in our benchmark. \paragraph{Training protocol.} Using wider architecture ($J=2^{12}$) and bigger batch size ($b_s = \min(2^{12},n)$) is always better. \textcolor{gray}{See Figures \ref{} and \ref{} in the Appendix}. To train our {\texttt{FFNN}}{}, we use Adam \cite{kingma2014adam} with default parameters except for the learning rate ${\texttt{$\ell_r$}}$ (which depends on the number of layers $L$. See Table~\ref{tab:architectures1}) and we select a $validation$-set of size $n_{val}=20\%\, n$. {\it Choice of $\max_{iter}$ and early stopping.} We fix the budget ({\texttt{FixB}} = 5 min) and the maximum number of iterations $\max_{iter}$ (depending on the value of $L$). We denote by ${\texttt{Iter}}$ the number of iterations that will actually be performed, i.e. the minimum between $n_{iter}$ and the actual number of iterations during the allotted time {\texttt{FixB}}. We read the ${\texttt{R}^2}$-score for each iteration on the $validation$-set and take by the iteration with the best ${\texttt{R}^2}$-score : ${\texttt{Iter}}^*:=\arg\max\{{\texttt{R}^2}_k, \ k =1,\cdots,{\texttt{Iter}}\}$. Finally, $(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}})$ will take its value at iteration ${\texttt{Iter}}^*$. \begin{table}[!hp] \caption{Benchmarked architectures. } \label{tab:architectures1} \footnotesize \centering \begin{tabular}{|c||c|c |c|c|c |c|c|c|c|} \hline Architecture & $L$ & ${\texttt{$\ell_r$}}$ & $\max_{iter}$ & {\texttt{FixB}} & $J$ & $b_s$ & $T$ & \multicolumn{2}{|c|} {$\widetilde\sigma$ } \\ \hline ${\texttt{MLR$\textapprox$1}} $& $1$ & $10^{-2}$ & $200$ & $10'$ & $2^{12}$ & $min(n, J)$ & $16$ & Reg.: $0.03$ & Classif.: $0$ \\ \cline{9-10} ${\texttt{MLR$\textapprox$2}} $& $2$ & $10^{-3}$ & $200$ & $id.$ & $id.$ & $id.$& $id.$ &\multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$3}} $& $3$ & $10^{-3.5}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$}\\ ${\texttt{MLR$\textapprox$4}} $& $4$ & $10^{-4}$ & $400$ & $id.$ & $id.$ & $id.$& $id.$ & \multicolumn{2}{|c|} {$id.$} \\ \hline \end{tabular} \end{table} The generic values ($\tilde{\sigma} = 0.03$ and $T=16$) for the dither{} and the number of permutations hyperparameters yield consistently good results overall. The dither{} parameter admits an optimal value (see Figure ? in the Appendix) which seems to correspond to the standard deviation of the target noise. As soon as $T=16$, the choice of permutations has little impact on the value and the \texttt{\,MLR $\,$}{} loss. In addition, when $T=16$, GPU parallelization is still preserved. Recall that the Ridge parameter $\lambda$ is trained alongside the weights of the {\texttt{FFNN}}{} architecture and the initial value $\lambda_{init}$ is fixed by the heuristic choice (\ref{lambdainiti}). Our investigations reveals that this choice is close to the optimal oracle choice on the test set. We can also see that the runtime overhead cost of replacing a matrix multiplication with a matrix inversion depends only linearly on the width $J$ and the batch size $b_s$, which are fixed in our method. See the Appendix for more details. \paragraph{Our final models.} We propose several models with varying depth based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss. We also create ensemble models combining architectures of different depth. We propose several models based on {\texttt{FFNN}}{} trained with the \texttt{\,MLR $\,$}{} loss:\\ $\bullet$ {\texttt{MLR$\textapprox$L}}: a simple {\texttt{FFNN}}{} of depth $L$ ($1\leq L\leq 4$).\\ $\bullet$ {\texttt{Bag-MLR$\textapprox$L}}: a bagging of 10 {\texttt{FFNN}}{} of depth $L$ ($L=1$ or $L=2$).\\ $\bullet$ {\texttt{Ens-MLR}}{}: an ensemble of 20 {\texttt{FFNN}}{} (the aggregation of {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{} of depth $1$ and $2$ respectively). For the methods based on bagging \cite{breiman1996}, the final prediction is the mean of each \textbf{NN}{} prediction. \subsection{Classification tasks with the \texttt{BCE-MLR}{} loss} The adaptation of the \texttt{\,MLR $\,$}{} method to classification tasks is relatively simple. The {\texttt{FFNN}}{} architecture and the training protocol are essentially unchanged. The usual loss for binary classification task is the {\texttt{BCE}}{} loss that combines a Sigmoid and the Cross Entropy (\texttt{CE}) loss. Set $\texttt{Sig}(\cdot)={\texttt{Sigmoid}}(\cdot)$, then $${\texttt{BCE}}(\textbf{Y}, f(\boldsymbol{\theta},\textbf{x}))=-\frac1n\left[\textbf{Y}^\top\log(\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x})) +(\mathbbm{1}_n-\textbf{Y})^\top\log(\mathbbm{1}_n-\texttt{Sig}(f(\boldsymbol{\theta},\textbf{x}))\right].$$ \begin{mydef}[\texttt{BCE-MLR}{} loss] \label{CElossBigsetting} Let $\xi$ and $\left(\xi_t\right)_{t=1}^T$ be $i.i.d.$ $\ensuremath{\mathcal{N}}(0_n,\ensuremath{\mathbb{I}})$ vectors. Set $\textbf{Y}^* = 2 \textbf{Y} - 1$. We define the \texttt{BCE-MLR}{} loss as \begin{align*} \texttt{BCE-MLR}(\boldsymbol{\theta},\lambda) &= {\texttt{BCE}}\,\left(\textbf{Y};\,\textbf{Y}^*+(\I_n-\textbf{H}) \xi+\textbf{H}\textbf{Y}^*\right) \\ &\hspace{0.25cm}+\frac{1}{T}\sum_{t=1}^T\left|{\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n) -{\texttt{BCE}}\,\left(\pi^t(\textbf{Y}^*) \,;\, \pi^t(\textbf{Y}^*)+(\I_n-\textbf{H}) \xi_t+\textbf{H}\,\pi^t(\textbf{Y}^*)\right)\right| \end{align*} \end{mydef} The quantity ${\texttt{BCE}}\,( \textbf{Y}\,;\, \overline{\textbf{Y}}\mathbbm{1}_n)$ is our baseline. The structured dithering is applied to the prediction rather than the target $\textbf{Y}$ because the {\texttt{BCE}}{} is only defined for binary target $\textbf{Y} \in \{0;1\}^n$. The \texttt{BCE-MLR}{} neural net (\texttt{BCE-MLR-NN}) is \begin{align*} \label{CENN} &\texttt{BCE-MLR-NN}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\bigcdot)={\texttt{Hardmax}}(\textbf{A}^{L-1}(\boldsymbol{\widehat{\theta}},\bigcdot) \,\textbf{P}(\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}},\textbf{x})) \textbf{Y} \in\{0,1\}^{obs.}\noindent\\ &\text{with}\,\, (\boldsymbol{\widehat{\theta}},\widehat{\boldsymbol{\lambda}}) = \underset{\boldsymbol{\theta}, \lambda}{\arg\min} \;\texttt{BCE-MLR}(\boldsymbol{\theta},\lambda), \end{align*} with $\textbf{P}(\cdot,\cdot,\textbf{x})$ defined as in \eqref{W}. We refer to the Appendix for more details. \section{Experiments}\label{sec:exp} We provide both the code to download raw files and apply each steps, and the resulting data matrices. All results are fully reproducible as both random seeds and random states were manually set and saved at every step of our experiments. See supplementary materials for the github repository. \subsection{Setting.} \paragraph{Benchmark description.} To produce this benchmark we aggregated $Value$ tabular regression and classification datasets, including $Value$ from the UCI repository \cite{?} and $Value$ from Kaggle \cite{?}. See the appendix for the exhaustive list. For computational reasons, we have chosen to restrict the number of datasets to $Value$ but perform more $train$/$test$ splitting in order to reduce the variance of our results. We curated the UCI repository and Kaggle through a set of rules detailed in the appendix ($e.g.$ discard empty or duplicate datasets, times series, missing target, non $i.i.d.$ samples, text format, $etc$.). See in the Appendix for more details. \paragraph{Preprocessing.} To avoid biasing the benchmark towards specific methods and to get a result as general as possible, we only applied as little preprocessing as we could, without using any feature augmentation scheme. The goal is not to get the best possible performance on a given dataset but to compare the methods on equal ground. We first removed features with constant values such as sample index. Categorical features with more than 20 modalities were discarded as learning embeddings is out of the scope of this benchmark. We also removed samples with missing target. Next, all missing values are imputed with the mean and the mode for numerical and categorical features respectively. We applied one-hot-encoding for categorical values and standardization for numerical features and target. We repeated our experiments 10 times using a different $80:20$ train/test split of the data and no stratification scheme. \paragraph{Compared methods.} We ran the benchmark with \textbf{all the methods available in the scikit-learn library} for both classification and regression (including {\texttt{RF}}{} and {\texttt{XGB}}). For all our proposed \texttt{\,MLR $\,$}-architectures, we run its standard equivalent in {\text{DL}}{} (denoted as \textt{NN2} for {\texttt{MLR$\textapprox$2}}{} as an example). In this paper, only the results of the 10 best methods will be shown, see the appendix for the exhaustive results. \subsection{Ablation Analysis.} \begin{table}[!hp] \caption{Ablation Study in Regression} \label{tab:ablation} \centering \footnotesize \begin{tabular}{|l||c|c|} \hline Step & Average ${\texttt{R}^2}$ & Bagging ${\texttt{R}^2}$ \\ \hline \hline {\texttt{FFNN}} & -0.081 & -0.046 \\ \hline + Ridge & 0.321 & 0.394 \\ \hline + Ridge + Struct. Dithering & 0.323 & 0.400 \\ \hline + Ridge + Permut. & 0.364 & 0.432 \\ \hline \texttt{\,MLR $\,$}{} & 0.371 & 0.433 \\ \hline \end{tabular} \end{table} We ran our ablation study (Table \ref{tab:ablation}) in the regression setting on 3 datasets with different sample sizes and feature to sample ratios. We repeated each experiment over 10 random train/test splits. All the results presented here correspond to the architecture and hyperparameters of {\texttt{MLR$\textapprox$2}}{} and {\texttt{Bag-MLR2}}{}. A standard {\texttt{FFNN}}{} of $2$ layers with a wide architecture ($J=4096$) cannot be trained efficiently on such small datasets as the {\texttt{FFNN}}{} instantly memorizes the entire dataset. This cannot be alleviated through bagging at all. Note also its poor overall performance on the complete benchmark (Table \ref{tab:perfR2_rank}). Applying Ridge on the last hidden layer allows an extremely overparametrized {\texttt{FFNN}}{} to learn but its generalization performance is still far behind the gold standard {\texttt{RF}}. However, when using bagging with ten such models, we reach very competitive results, underlying the potential of the Ridge ingredient. The random permutations component gives a larger improvement than Structured Dithering. However, when using both ingredients together, a single \textbf{NN}{} can reach or even outperform the gold-standard methods on most datasets (see the following section and the Appendix for details). Furthermore, the improvement yielded by using bagging($0.062$) is still of the same order of magnitude as the one we got when we only applied Ridge to the {\texttt{FFNN}}{} ($0.073$). This means these two ingredients (permutations and struct. dithering) are not just simple variance reduction techniques but actually generate more sophisticated models. \subsection{Overall Performance comparisons.} \begin{table}[!hp] \caption{Performances of ??? methods for the regression task {\texttt{P90}}/{\texttt{P95}}: the number of datasets a model achieves 90\%/95\% or more of the maximum test ${\texttt{R}^2}$-score, divided by the total number of datasets. {\texttt{PMA}}: average percentage of the maximum test ${\texttt{R}^2}$-score.} \label{tab:perfR2_rank} \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|} \hline Method & Friedman Rank & Average ${\texttt{R}^2}$-score & {\texttt{P90}} & {\texttt{P95}} & {\texttt{PMA}} \\ \hline \hline {\texttt{Ens-MLR}}{} & 3.500 & 0.672 & 0.889 & 0.722 & 0.918 \\ \hline {\texttt{Bag-MLR2}}{} & 3.944 & 0.666 & 0.833 & 0.611 & 0.880 \\ \hline {\texttt{Bag-MLR1}}{} & 5.500 & 0.658 & 0.833 & 0.667 & 0.916 \\ \hline {\texttt{MLR$\textapprox$2}} & 7.944 & 0.651 & 0.722 & 0.444 & 0.863 \\ \hline {\texttt{MLR$\textapprox$3}} & 7.333 & 0.648 & 0.667 & 0.444 & 0.830 \\ \hline {\texttt{MLR$\textapprox$1}} & 9.056 & 0.641 & 0.778 & 0.444 & 0.809 \\ \hline {\texttt{RF}} & 7.111 & 0.640 & 0.667 & 0.500 & 0.677 \\ \hline {\texttt{XGB}} & 7.222 & 0.634 & 0.722 & 0.667 & 0.756 \\ \hline {\texttt{XRF}} & 7.556 & 0.632 & 0.722 & 0.500 & 0.677 \\ \hline \texttt{NN2} & 11.722 & 0.597 & 0.556 & 0.389 & 0.616 \\ \hline \end{tabular} } \end{table} \textbf{The \texttt{\,MLR $\,$}{} method clearly outperforms all the compared methods in the regression task.} (Table \ref{tab:perfR2_rank} in the appendix for the list). {\texttt{Ens-MLR}}{} with a mean ${\texttt{R}^2}$-score of $0.672$ on the whole benchmark and Friedman Rank of $3.5$ is far above {\texttt{RF}}{}, with a mean ${\texttt{R}^2}$-score of $0.640$ and Friedman Rank $7.111$ in Table \ref{tab:perfR2_rank}. As revealed by its {\texttt{P90}}{} and {\texttt{P95}}{} statistics at $0.722$ and $0.918$ respectivel , {\texttt{Ens-MLR}}{} actually almost never "loses" to the best method by a lot. This means that {\texttt{Ens-MLR}}{} produces reliable results at a rate that is even above methods like {\texttt{RF}}{} which are often deemed the safest pick. The same conclusion is also valid for {\texttt{Bag-MLR1}}{} and {\texttt{Bag-MLR2}}{}. Standard NN (\texttt{NN2}) with equivalent architecture and MSE loss perform poorly with a Friedman rank of $11.722$. In binary classification, the \texttt{\,MLR $\,$}{} method performance in terms of {\texttt{AUC}}{} compares favorably with {\texttt{RF}}{} for both {\texttt{P95}}{} ($0.923$ against $0.846$) and {\texttt{P98}}{} ($0.769$ against $0.692$) while performances are equivalent for the Average {\texttt{AUC}}{}, the Friedman Rank ({\texttt{F. Rank}}) and the {\texttt{PMA}}. Regarding Accuracy, the \texttt{\,MLR $\,$}{} method performance are better than {\texttt{RF}}{} in terms of Friedman Rank ($4.0$ for \texttt{\,MLR $\,$}{}, $4.231$ for {\texttt{RF}}), and worst for the other metrics. As we observe in Tables \ref{tab:perfR2_rank} and \ref{tab:classif}, the depth $L$ in the {\texttt{MLR$\textapprox$L}}{} method seems to be the only data-dependent hyperparameter. However a simple aggregation of \textbf{NN}{} of different depths performs as well as the \textbf{NN}{} with the most adequate depth for the dataset at hand. \medskip \begin{table}[!hp] \caption{Classification Benchmark {\texttt{AUC}}.} \label{Classification AUC} \centering \footnotesize \begin{tabular}{|l||c|c|c|c|c|} Method & {\texttt{F. Rank}} & Average {\texttt{AUC}} & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline \hline {\texttt{Ens-MLR}}{} & 3.462 & 0.919 & 0.923 & 0.769 & 0.987 \\ \hline {\texttt{Bag-MLR1}} & 4.077 & 0.919 & 0.923 & 0.923 & 0.987 \\ \hline {\texttt{RF}} & 3.462 & 0.917 & 0.846 & 0.692 & 0.984 \\ \hline {\texttt{Bag-MLR2}} & 3.846 & 0.915 & 0.923 & 0.692 & 0.983 \\ \hline {\texttt{MLP}} & 6.385 & 0.913 & 0.923 & 0.615 & 0.981 \\ \hline {\texttt{XRF}} & 5.615 & 0.913 & 0.846 & 0.615 & 0.980 \\ \hline {\texttt{XGB}} & 6.154 & 0.908 & 0.923 & 0.538 & 0.976 \\ \hline {\texttt{Elastic-Net}} & 7.692 & 0.902 & 0.615 & 0.462 & 0.968 \\ \hline Ridge & 7.462 & 0.902 & 0.692 & 0.538 & 0.969 \\ \hline {\texttt{MLR$\textapprox$1}} & 9.308 & 0.899 & 0.846 & 0.462 & 0.966 \\ \hline \end{tabular} \end{table} \begin{table}[!hp] \caption{Classification Benchmark Accuracy.} \label{Classification ACC} \centering \footnotesize \begin{tabular}{|l||c|c|c|c|c|} \hline Method & {\texttt{F. Rank}} & Average \Accuracy & {\texttt{P95}} & {\texttt{P98}} & {\texttt{PMA}} \\ \hline {\texttt{XRF}} & 4.308 & 0.883 & 1.000 & 0.846 & 0.988 \\ \hline {\texttt{RF}} & 4.231 & 0.879 & 0.923 & 0.769 & 0.983 \\ \hline {\texttt{Ens-MLR}}{} & 4.000 & 0.879 & 0.923 & 0.615 & 0.984 \\ \hline {\texttt{Bag-MLR1}} & 4.231 & 0.877 & 0.923 & 0.692 & 0.982 \\ \hline {\texttt{Bag-MLR1}} & 5.077 & 0.877 & 0.923 & 0.692 & 0.982 \\ \hline {\texttt{XGB}} & 4.692 & 0.875 & 0.923 & 0.769 & 0.980 \\ \hline {\texttt{Bagging}} & 8.538 & 0.867 & 0.769 & 0.462 & 0.970 \\ \hline {\texttt{MLR$\textapprox$3}} & 10.000 & 0.864 & 0.692 & 0.538 & 0.967 \\ \hline {\texttt{MLR$\textapprox$1}} & 10.231 & 0.863 & 0.769 & 0.462 & 0.966 \\ \hline {\texttt{MLR$\textapprox$2}} & 8.231 & 0.863 & 0.769 & 0.615 & 0.965 \\ \hline \end{tabular} \end{table} \section{Conclusion} All these findings reveal \texttt{\,MLR $\,$}{} as a remarkably reliable method for tabular datasets, one which consistently produces either state-of-the-art or very competitive results, for a large range of sample sizes, feature to sample ratios, types of features and difficulty across very diverse areas of applications. Furthermore, \texttt{\,MLR $\,$}{} can achieve these steady performances without any intensive tuning. \textcolor{gray}{A COMPLETER avec future directions} \newpage \bibliographystyle{plain}
\section{Introduction}\label{sec:introduction}} \IEEEPARstart{C}{entralized} platforms in the domains of search-engines, mobile applications, social-media, chat, music and retail have been dominating the respective industries over the past decades. Business models where digital services are exchanged for user data have developed into high-revenue industries where a few single entities control the global market within the respective domains \cite{GAFAM}. The resulting concentration of user data in a small number of entities, however, poses problems such as the risk of privacy data leaks~\cite{Wheatley.2016} or an increasing power imbalance in favor of market-dominating parties~\cite{GAFAMpower,GAFAM,Santesteban.2020} which has caused policymakers to enhance data protection for individuals \cite{EUdataregulations2018}. The need for confidential AI goes beyond B2C markets, e.g. where entities within the health sector or IoT based industries are prohibited from collaborating on a shared AI model due to sensitive data. A promising solution that enables the training of machine learning models with improved data security is \textit{Federated Learning} (FL). In FL, complex models such as \textit{Deep Neural Networks} (DNNs) are trained in a parallel and distributed fashion on multiple end devices with the training data remaining local at all times. \textit{Federated Averaging} (\texttt{FedAvg}) \cite{BrendanMcMahan2017} is a widely applied algorithm for FL, where a central authority aggregates a global model from the locally trained models in an iterative process. In theory, FL not only makes previously withheld sensitive data accessible to the machine learning process, but also enables efficient training by taking advantage of the ever-increasing computational power of IoT and mobile devices. Therefore, the technology has the potential to disrupt the contemporary, centralized DNN learning approach towards a decentralized, fair and power-balanced paradigm. Yet, beyond technical issues, two major design problems remain unsolved: (i) The star topology of FL introduces the risk for single point of failure as well as authority abuse and prohibits use-cases where equal power among participants is a mandatory requirement and (ii) the lack of a practical reward system for contributions of participants hinder this technology from scaling beyond small groups of already entrusted entities towards mass adoption. Although there exist many proposals of \textit{Incentivized and Decentralized Federated Learning Frameworks} (FLFs), we have not yet seen any full-fledged production-level FLF. To enhance the development towards production-readiness, we took on the challenging task of comparing state-of-the-art solutions despite their heterogeneity in terms of assumptions, use-cases, design choices, special focus and thoroughness by providing a general and holistic comparison framework. Yet, since deep domain knowledge is required across a wide variety of fields, e.g. in blockchain design pattern, game theory, decentralized deep neural network, and security \& privacy, we aim to explain concepts concisely to make it easier for experts in a specific domain to follow along. Specifically, we undertake a \textit{Systematic Literature Review} (SLR) examining all relevant articles from twelve scientific databases in the domain of computer science. 422~ results were queried, filtered and examined for relevant articles from these databases, resulting in 40~ papers remaining after three filtering steps. To the best of our knowledge, this is the first comprehensive survey on the design of both decentralized and incentivized federated artificial intelligence systems. The contribution of this paper is three-fold: \begin{enumerate} \item The first comprehensive systematic survey study on the combined topic of decentralized and incentivized Federated Learning based on the standardized Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) process, ensuring transparency and reproducibility of the work. \item A novel comparison framework for an in-depth analysis of incentivized and decentralized FL frameworks which goes beyond existing survey papers by (i) pointing out the limitations and assumptions of the chosen game-theoretic approaches, (ii) analyzing the existing solutions based on computational and storage overhead on the blockchain, and (iii) an in-depth analysis of the performed experiments. \item Based on the rating and clustering, we have clarified trade-offs in design choices, identified limitations and derived future research directions of decentralized and incentivized Federated Learning frameworks. \end{enumerate} The remainder of this paper is structured as follows. In Section~\ref{sec:background}, we concisely present the technical background of distributed ledger technology and mechanism design in FL systems. In Section~\ref{sec:related-work}, we provide an overview of existing surveys on this topic and their respective problem statements. In Section~\ref{sec:method}, we outline our detailed research questions and introduce our methodology to answer these by conducting a structured literature review. Furthermore, contemporary shortcomings of FLFs are discussed and the SLR is undertaken. Section~\ref{sec:results} summarizes the findings and answers the research questions with respect to general applications of the FLFs, Blockchain features, incentive mechanisms and experiments. We derive limitations and further research directions in Section~\ref{sec:future_research_directions}. Finally, Section~\ref{sec:conclusion} concludes this literature review. \section{Related Surveys and Motivation of This Paper} \label{sec:related-work} \begin{table}[t] \centering \caption{Comparison of related survey papers.} \resizebox{\columnwidth}{!}{ \label{table:comparison_of_related_survey_papers} \rowcolors{2}{tableoddrow}{tableevenrow} \begin{tabular}{C|CCCC} \rowcolor{tableheader} Ref. & Blockchain & Federated Learning & Incentive Mechanism & Experiment Analysis\\ \hline \cite{SP_Blockchain_IEEE} & \checkmark & \checkmark & \xmark &\xmark\\ \cite{SP_MD_IEEE} & Partially & \checkmark &\xmark &\xmark\\ \cite{SP_MD_ARXIV} & Partially & \checkmark & \checkmark &\xmark\\ \cite{SP_FL_TECHRXIV} &\xmark & \checkmark & \checkmark & \xmark\\ \cite{SP_FL_MD} &\xmark & \checkmark & \checkmark & \xmark\\ \cite{FLBlockchainOpportunitiesChallanges} & Partially & \checkmark & Partially & \xmark \\ \textbf{This work} & \checkmark (\textbf{Detailed}) & \checkmark & \checkmark & \checkmark\\ \end{tabular} } \end{table} We have identified several survey papers in the context of either mechanism design and FL \cite{SP_FL_MD,SP_MD_IEEE,SP_MD_ARXIV} or blockchain and FL \cite{SP_Blockchain_IEEE, SP_MD_ARXIV, SP_FL_TECHRXIV}. \tablename~\ref{table:comparison_of_related_survey_papers} shows the comparison of the related survey papers and our own. Hou \textit{et al.}~ surveyed the state-of-the-art blockchain-enabled FL methods \cite{SP_Blockchain_IEEE}. They focused on how blockchain technologies are leveraged for FL and summarized them based on the types of blockchain (public or private), consensus algorithms, solved issues and target applications. The other related survey papers focus on incentive mechanisms for FL \cite{SP_MD_IEEE, SP_MD_ARXIV, SP_FL_TECHRXIV, SP_FL_MD}. Zhan \textit{et al.}~ survey the incentive mechanism design dedicated to FL \cite{SP_MD_IEEE}. They summarize the state-of-the-art research efforts on the measures of clients' contribution, reputation and resource allocation in FL. Zeng \textit{et al.}~ also survey the incentive mechanism design for FL \cite{SP_MD_ARXIV}. However, the difference is that they focus on incentive mechanisms such as Shapley values, Stackelberg game, auction, context theory and reinforcement learning. Ali \textit{et al.}~ survey incentive mechanisms for FL \cite{SP_FL_TECHRXIV}. In addition to \cite{SP_MD_IEEE} and \cite{SP_MD_ARXIV}, they summarize involved actors (e.g. number of publishers and workers), evaluation datasets as well as advantages and disadvantages of the mechanisms and security considerations. Tu \textit{et al.}~ \cite{SP_FL_MD} provide a comprehensive review for economic and game theoretic approaches to incentivize data owners to participate in FL. In particular, they cluster applications of Stackelberg games, non-cooperative games, sealed-bid auction models, reverse action models as well as contract and matching theory for incentive MD in FL. Nguyen \textit{et al.}~ investigate opportunities and challenges of blockchain-based federated learning in edge computing \cite{FLBlockchainOpportunitiesChallanges}. As revealed from our analysis and summarized in \tablename~\ref{table:comparison_of_related_survey_papers}, the existing survey papers lack a holistic view of decentralized \textit{and} incentivized federated learning which is crucial to spreading the new generation of widely adopted fair and trustworthy FL to the benefit of the data owner. To the best of our knowledge, this paper is the first systematic literature review on the topic of blockchain-enabled decentralized FL with incentive mechanisms. \section{Preliminaries} \label{sec:background} The following sections briefly discuss the fundamentals of Federated Learning, distributed ledger technology, and mechanism design. \subsection{Federated Learning}\label{Federated Learning} Federated Learning is a machine learning technique where multiple actors collaboratively train a joint machine learning model locally and in parallel, such that the individual training data does not leave the device. This decentralized approach to machine learning was first introduced by Google in 2016~\cite{BrendanMcMahan2017} and addresses two key issues of machine learning: (1) The high computational effort for model training is relocated from a single central actor to a network of data-owning training devices. (2) Since the training data remains on the edge devices, previously inaccessible data sets of privacy-concerned actors can be integrated into the training process. Thus, ''data islands'' are prevented. \par The \textit{Federated Averaging} (\texttt{FedAvg}) algorithm~\cite{BrendanMcMahan2017} is a widely adopted optimization algorithm for the FL case, where the calculated gradients for the respective local model training get aggregated and the data stays confidential at all times. The objective is to minimize the empirical risk of the global model $\theta$, such that \begin{equation} \arg\min_{\boldsymbol{\theta}} \sum_{i} \frac{|S_i|}{|S|} f_{i}(\boldsymbol{\theta}) \label{Eq:Optimization} \end{equation} where for each agent $i$, $f_{i}$ represents the loss function, $S_i$ is the set of indexes of data points on each client and $S:=\bigcup_{i} S_i$ is the combined set of indexes of data points of all participants. The most common algorithmic approach to FL problems is Federated Averaging, where the training process is conducted in three communication rounds: \begin{enumerate} \item A central server broadcasts a first model initialization $\theta_{init}$ to a subset of participating clients \footnote{clients, workers and agents are used interchangeably}. \item These clients individually perform iterations of stochastic gradient descent over their local data to improve their respective local models $\theta_{i}$ on each client. \item In order to create a global model $\theta$, all individual models $\theta_{i}$ are then send back to the server, where they are aggregated (e.g. by an averaging operation). This global model is used as the initialization point for the next communication round. \end{enumerate} Optimization algorithms for the FL case are open research \cite{AdvancesAndOpenProblemsInFederatedLearning} and variations of \texttt{FedAvg} exist, e.g. FedBoost~\cite{Fedboost}, FedProx~\cite{FedProx}, FedNova~\cite{FedNova}, FedSTC~\cite{SatTNNLS20} and FetchSGD~\cite{fetchSGD}. Note that the FL setting can range from a few collaborating entities (cross-silo) to a federated system of millions of devices (cross-device). \subsection{Blockchain: A Distributed Ledger Technology} A distributed ledger kept by nodes in a peer-to-peer network is referred to as blockchain, first invented by Satoshi Nakamoto through Bitcoin in 2008\cite{nakamoto2008bitcoin}. Cryptographic connections of information enable resistance to alteration and immutability. A peer-to-peer consensus mechanism governs the network, obviating the requirement for central coordination \cite{8693657}. The introduction of general-purpose blockchains with smart contract capability that supports Turing-completeness \cite{wood2014ethereum} has allowed for the creation of decentralized, immutable, and transparent business logic on top of the blockchain. Due to its intrinsic features, this technology is capable of mitigating open issues in the FL context, namely: \begin{enumerate} \item \textbf{Decentralization.} Workers are subject to a power imbalance and a single point of failure in server-worker topologies. A malicious server might refuse to pay reward payments or exclude employees at will. Furthermore, a server-worker architecture is incompatible with a situation in which numerous entities have a shared and equal stake in the advancement of their respective models. Blockchain technologies' decentralization provides a federal system for entities of equal authority without the need for a central server. \item \textbf{Transparency and Immutability.} Data on the blockchain can only be updated, not erased, because every peer in the system shares the same data. In a FL environment, a clear and immutable reward system ensures worker trust. On the other side, each client is audited, and as a result, can be held accountable for malevolent activity. \item \textbf{Cryptocurrency.} Many general-purpose blockchain systems include cryptocurrency capabilities, such as the ability to incorporate payment schemes within the smart contract's business logic. Workers can be rewarded instantly, automatically, and deterministically based on the FL system's reward mechanism. \end{enumerate} \textbf{Blockchain to ensure equal power.} General purpose blockchain systems \cite{wood2014ethereum,polkadotwhitepaper, HyperledgerFabric} have the potential to mitigate the first issue of FL by ensuring trust through their inherent properties of immutability and transparency of a distributed ledger, thereby enabling decentralized federations to mitigate dependencies on a central authority. \subsection{Incentive Mechanism} \label{sec:mechanism_design} In an environment where it is of utmost importance that pseudo-anonymous clients participate in the FL process, a fair incentive mechanism is required for any realistic setting. However, the question here is how to design a good incentive mechanism. Simply giving a fixed amount of reward to each worker would not work well as any worker can obtain rewards without doing model updates. A key to answer this question is mechanism design (MD), which is a field of economics and attempts implementing a protocol, system, or rule so that a desired situation (e.g. every participant contributes informed truthful model updates) is realized in a strategic setting, assuming that each participant acts rationally in a game theoretic sense \cite{nisan2007introduction}. The purpose of incorporating MD into FL is to incentivize clients to ({\textit{i}})\xspace put actual effort into obtaining real and high quality signals (i.e. training the model on local data) and ({\textit{ii}})\xspace submit truthfully, without the explicit ability to directly monitor the clients' behavior. As also mentioned in the previous section, such incentives can be distributed using blockchain's cryptocurrencies. An appropriately designed mechanism ensures a desired equilibrium when every worker acts rationally and in its own best interest. Such a mechanism has low complexity and is self-organizing, avoiding the need for Trusted Execution Environments (TEE) \cite{TXX} or secure multi-party computation, yet makes assumptions about the degree of information available. The process of designing a FL protocol with MD consists of ({\textit{i}})\xspace designing a mechanism and ({\textit{ii}})\xspace theoretical analysis. The former determines the whole procedure of FL including a reward policy (i.e. how to distribute rewards). A myriad of reward design choices exist: whether rewards should be given to the top contributor (i.e. winner-takes-all) or multiple workers and whether rewards should be unequally distributed based on their contribution or equally distributed. When contribution needs to be measured to determine the amount of prizes, this demands a carefully designed reward strategy based on the quality of contributions. Yet, comparing and evaluating workers gradient-updates of \texttt{FedAvg} remains challenging \cite{9367484}. A game-theoretic analysis is required to ensure that the designed protocol works as planned. Such an approach helps to design a mechanism where the best strategy for all workers leads to a stable equilibrium intended by the system designer. Section~\ref{sec:results_incentive_mechanism} discusses how FLFs apply mechanism design and how contributions are measured. \section{Method of Literature Review} \label{sec:method} The goal of the following systematic literature review is the identification of decentralized collaborative learning solutions where participation is rewarded. The aim of this study is not only to summarize all major publications, but also to extend the research by having a guideline for current and future practitioners. Relevant publications are retrieved, filtered, and selected by a methodical procedure. The procedure is inspired by the \textit{Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA)} methodology~\cite{moher2015preferred}. PRISMA helps authors to improve the reporting of reviews. Within this work, the PRISMA methodology is augmented with the guide for information systems proposed by Okoli~\textit{et al.}~ and Kitchenham~\textit{et al.}~~\cite{okoli2010guide, kitchenham2004procedures}. The guidelines are a structured approach to conduct a systematic literature review. They consist of five core steps: ({\textit{i}})\xspace defining research questions, ({\textit{ii}})\xspace searching for literature, ({\textit{iii}})\xspace screening, ({\textit{iv}})\xspace reviewing, ({\textit{v}})\xspace selecting and documenting relevant publication and extracting relevant information. The corresponding flow diagram of the conducted SLR is illustrated in \figurename~\ref{fig:tikz:prisma-diagram}. \subsection{Research Questions} The review and selection of relevant literature is conducted for extracting, preparing, and summarizing relevant information for future researchers. The scope of relevant information is described and limited by five corresponding research questions. \begin{enumerate \item[RQ1] Overview: ({\textit{i}})\xspace What are possible applications of FLF? ({\textit{ii}})\xspace What problems were solved? ({\textit{iii}})\xspace Across which dimensions are the FLF papers heterogeneous? \item[RQ2] Blockchain: ({\textit{i}})\xspace What is the underlying blockchain architecture? ({\textit{ii}})\xspace How is blockchain applied within the FLF and what operations are performed? ({\textit{iii}})\xspace Is scalability considered? \item[RQ3] Incentive mechanism: ({\textit{i}})\xspace How are incentive mechanisms analyzed? ({\textit{ii}})\xspace How are the contributions of workers measured? \item[RQ4] Federated learning: ({\textit{i}})\xspace Is the performance of the framework reported? ({\textit{ii}})\xspace How comprehensive are the experiments? ({\textit{iii}})\xspace Are non-IID scenarios simulated? ({\textit{iv}})\xspace Are additional privacy methods applied? ({\textit{v}})\xspace Is the framework robust against malicious participants? \item[RQ5] Summary: What are the lessons learned from the review? \end{enumerate} \subsection{Search Process} We conduct a well-defined search process of relevant publications to allow for reproducibility. The main keywords of interest are ``Federated Learning'', ``Blockchain'', and ``Game Theory''. Due to the existence of synonyms (e.g. ``Collaborative Learning'' instead of ``Federated Learning'') and abbreviations (e.g. ``DLT'' instead of ``Blockchain'') the search term is extended by taking these variations into account. The final case-insensitive search term is the following: \begin{hyphenrules}{nohyphenation} \begin{highlightBox}[Search Term] \texttt{("Federated Learning" OR "Federated Artificial Intelligence" OR "Collaborative Learning") AND ("Blockchain" OR "Distributed Ledger" OR "DLT") AND ("Mechanism Design" OR "Incentive" OR "Reward" OR "Game Theory" OR "game-theoretical" OR "Economics")} \end{highlightBox} \end{hyphenrules} We selected 12 of the major computer science publication databases. The search was conducted on November 21, 2021. All search results retrieved at that date were taken as input for further manual inspection. The current results of the query can be obtained by following the hyperlink after each database entry below: \begin{itemize} \item IEEE Xplore Digital Library \href{https://ieeexplore.ieee.org/search/searchresult.jsp?newsearch=true&queryText= \item SpringerLink Database \href{https://link.springer.com/search?query \item ACM Digital Library \href{https://dl.acm.org/action/doSearch?AllField= \item ScienceDirect Database \href{https://www.sciencedirect.com/search?qs \item MDPI\footnote{As MDPI does not allow for nested search terms, we tried possible keyword combinations such as ``Federated Learning'' AND ``Blockchain'' AND ``Mechanism Design''} \href{https://www.mdpi.com/search?advanced=(@(all \item Emerald insight \href{https://www.emerald.com/insight/search?q \item Talor \& Francis \href{https://www.tandfonline.com/action/doSearch?AllField \item Hindawi \href{https://hindawi.com/search/all/ \item SAGE \href{https://journals.sagepub.com/action/doSearch?filterOption=allJournal&AllField \item Inderscience online \href{https://www.inderscienceonline.com/action/doSearch?AllField \item Wiley \href{https://www.wiley.com/en-us/content-search?cq \end{itemize} After applying the search term, we found 422~ publications overall. In addition to this search, the references were screened and 1~ more eligible paper was found and included for analysis. Each publication that we retrieved based on our search was exported or enriched by ({\textit{i}})\xspace document title, ({\textit{ii}})\xspace abstract, ({\textit{iii}})\xspace author names, ({\textit{iv}})\xspace publication year, and ({\textit{v}})\xspace Digital Object Identifier (DOI). \begin{figure}[t] \centering \resizebox{\columnwidth}{!}{% \input{PRISMA_grafik_org} } \caption{PRISMA diagram.} \label{fig:tikz:prisma-diagram} \end{figure} \subsection{Selection Process} The eligibility of the literature corpus that we gathered based on the string was evaluated independently by three researchers. Duplicates were removed and several iterations of manual verification were performed. First, we present the criteria that we applied to include (or exclude) an article for further consideration. Then, we discuss our manual eligibility check. \subsubsection{Inclusion and exclusion criteria}\label{sec:inclusion} The following three criteria must be fulfilled by an article in order for it to be included for further analysis: \begin{enumerate} \item The article must have a direct relation to all of the three search terms ({\textit{i}})\xspace Federated Learning \& ({\textit{ii}})\xspace Blockchain \& ({\textit{iii}})\xspace Mechanism Design or their respective synonyms. \item The article must be of full length to explain proposed architectures and concepts in depth. \item The article must be written in English. \end{enumerate} If the article matched one of the following three criteria, it was excluded from further analysis: \begin{enumerate} \item Articles which do not discuss collaborative learning in the context of both decentralization and incentives. This also covered articles which discuss only two of the three major terms or consider the search terms in a different context. \item Short papers such as poster abstracts because they do not cover enough information to provide a sufficient level of understanding. \item Vague articles which only give an brief overview about the topics, e.g. superficial descriptive articles were excluded. \end{enumerate} \subsubsection{Manual eligibility check} The following manual eligibility checks were performed by the authors: \begin{enumerate} \item Removal of faulty or correction of incorrect lines in the aggregation file that includes all search results. \item Reading the titles and abstracts of the articles. Each article was marked as follows based on our inclusion criteria, see Section~ \ref{sec:inclusion}: \begin{enumerate} \item Include, if the article should be included. \item Exclude, if the article should be excluded. \item Not sure, if the article should be re-checked against the defined criteria and briefly discussed. \end{enumerate} \item The authors compared and discussed their assessments. Disagreements were highlighted and handled as follows: The article was re-checked against the defined criteria and briefly discussed. Sometimes one researcher noticeably misinterpreted the research focus of an article. In that case the article was excluded. In all other cases the article was included. \item Reading parts of or the complete full text in order to get a deeper insight into the research. Then, the article was again voted for inclusion or exclusion. \item The authors compared and discussed their respective selected papers. The same decision levels as described in 2) were used for the comparison. \item The authors read all eligible papers independently and extracted all necessary information. \item Discussion of findings and information exchange. \end{enumerate} If the decision on the eligibility of a paper was not clear after further consideration, the authors decided on including the respective article. All included articles were read and relevant information was extracted. \subsection{Screening Process} In order to cover as much structured information as possible, the analysis of the papers was guided by predefined categories regarding the FL framework (\tablename~\ref{table:FL}), blockchain features (\tablename~\ref{table:blockchain}), incentive mechanism features (\tablename~\ref{table:incentive_mechanism}) and the experiment analysis (\tablename~\ref{table:experiments}). After conducting all steps described above, a total of 40~ articles remain that match the initially defined scope of this structured literature review and are further processed to answer the research questions. \section{Results}\label{sec:results} The following subsections systematically present the results of the literature review by answering the five respective research questions. Each subsection is complemented by an explanatory table that classifies the considered papers according to categories defined in \tablename~\ref{tab:columns_definition}. \begin{table}[t] \centering \caption{Number of papers found and included by publishers.} \label{tab:summary_of_search_results} \rowcolors{2}{tableoddrow}{tableevenrow} \resizebox{\columnwidth}{!}{ \begin{tabular}{C|RR} \rowcolor{tableheader} Publisher & \#Papers Found & \#Papers Included \\ \hline Springer & 167 & 5\\ ScienceDirect & 95 & 1\\ ACM & 30 & 4 \\ IEEE & 29 & 21+2\footnote{2 Survey Papers} \\ Emerald insight & 29 & 0 \\ MDPI & 27 & 3 \\ Hindawi & 20 & 2 \\ Tayler \& Francis & 18 & 1\\ SAGE journals & 5 & 0\\ Inderscience & 2 & 0\\ Wiley & 0 & 0 \\ \hline Total & 422 & 39 \\ \end{tabular} } \end{table} \begin{table}[t] \centering \caption{Notation table.} \label{tab:notation_table} \rowcolors{2}{tableoddrow}{tableevenrow} \begin{tabular}{C|L} \rowcolor{tableheader} Name & Definition \\ \hline n.s. & Not specified \\ n.a. & Not applicable \\ \checkmark & True \\ \xmark & False \\ CS & cross-silo (few clients ) \\ CD & cross-device (many clients )\\ \end{tabular} \end{table} \begin{table*}[t] \centering \caption{Definition of columns in the overview tables.} \label{tab:columns_definition} \rowcolors{2}{tableoddrow}{tableevenrow} \resizebox{\textwidth}{!}{ \begin{tabular}{C|LLL} \rowcolor{tableheader} Table & Column & Definition & Possible Values and Examples \\ \hline \cellcolor{tableoddrow} & Application & The field of application of a FLF & Generic, Internet of Things (IoT), \dots \\ \cellcolor{tableoddrow} & Domains of key contributions & To which domains each paper contribute & System architecture, blockchain, \dots \\ \cellcolor{tableoddrow} & FL setting & Whether a type of FL is given & CS (cross-silo), CD (cross-device)\\ \cellcolor{tableoddrow} & Actors & The key actors in the FLF & Workers, aggregation servers, task publishers, \dots \\ \multirow{-5}{*}{\cellcolor{tableoddrow} FL (\tablename~\ref{table:FL})} & Setup period & Whether information about the setup of a FLF is included (e.g. who deploys a blockchain) & \checkmark / \xmark\\ \hline \cellcolor{tableevenrow} & Operation on BC & Operations taking place on-chain & Aggregation, payment, coordination, storage\\ \cellcolor{tableevenrow} & BC framework & The underlying Blockchain framework applied within the FLF & Agnostic, novel, Ethereum, Corda \dots \\ \cellcolor{tableevenrow} & Consensus mechanism & The consensus mechanism of BC applied in the FLF & PoW, PoS, PBFT, novel, \dots \\ \cellcolor{tableevenrow} & Storage on BC & Information that is stored on the Blockchain. & Gradients/model parameters, reputation scores \dots \\ \cellcolor{tableevenrow} & Storage quantification & Whether the amount of information stored on the BC is analyzed & \checkmark / \xmark \\ \cellcolor{tableevenrow} & Storage off-chain & Whether to store data off-chain, such as Interplanetary File System (IPFS) & \checkmark / \xmark \\ \multirow{-7}{*}{\cellcolor{tableevenrow}BC (\tablename~\ref{table:blockchain})} & Scalability & Whether scalability is considered. & \checkmark / \xmark \\ \hline \cellcolor{tableoddrow} & Simulation & Whether profits, rewards or utilities were evaluated via simulation & \checkmark / \xmark \\ \cellcolor{tableoddrow} & Theoretical analysis & Whether profits, rewards or utilities were theoretically analyzed & \checkmark(Used theory) / \xmark \\ \cellcolor{tableoddrow} & Costs assumed in utility analysis & Cost elements considered for theoretical analysis & Energy consumption, \dots, or \xmark\ if not used \\ \cellcolor{tableoddrow} & Metrics for contribution measurement & Metrics used to validate workers' contribution & Accuracy, data size, \dots or \xmark\ if not used \\ \multirow{-5}{*}{\cellcolor{tableoddrow}IM (\tablename~\ref{table:incentive_mechanism})} & Validator & Entities that validate workers' contribution & Task requesters, smart contracts, \dots \\ \hline \cellcolor{tableevenrow} & ML task & Machine Learning task of the experiment & Classification, regression, \dots \\ \cellcolor{tableevenrow} & Dataset & Datasets on which the experiments are conducted & MNIST, CIFAR10, \dots \\ \cellcolor{tableevenrow} & Number of Clients & Number of clients within the experiments & \\ \cellcolor{tableevenrow} & FL algorithm & FL algorithm applied within the experiments & \texttt{FedAvg},\texttt{FedProx} \dots \\ \cellcolor{tableevenrow} & Privacy protection & Whether additional privacy protection methods are applied within the experiments & \checkmark / \xmark \\ \cellcolor{tableevenrow} & Non-IID data & Whether experiments are conducted under the non-IID condition & \checkmark / \xmark \\ \cellcolor{tableevenrow}& Adversaries & Whether the FNFs robustness is tested with malicious agents & \checkmark / \xmark \\ \cellcolor{tableevenrow} & BC implementation & Whether the blockchain part of the FNF is implemented for conducting experiments & \checkmark / \xmark \\ \multirow{-9}{*}{\cellcolor{tableevenrow}Experiments (\tablename~\ref{table:experiments})} & Performance & Whether the performance within the experiments of the FL model is measured & \checkmark / \xmark \\ \hline \end{tabular} } \end{table*} \subsection{RQ 1: Overview} \begin{table*}[t] \centering \caption{Overview of decentral and incentivized FL frameworks. (\textit{\footnotesize SA: System Architecture, BC: Blockchain, FL: Federated Learning, IM: Incentive Mechanism, CM: Contribution Measurement, SP: Security \& Privacy})} \label{table:FL} \resizebox{\textwidth}{!}{ \input{table_overview} } \end{table*} \subsubsection{RQ 1-1: What are possible applications of FLF?} Although most of the surveyed papers do not target specific applications (28 out of 40) due to generalizability of neural networks, some are dedicated to specific applications, namely \textit{Internet of Things} (IoT) (6 out of 40), \textit{Internet of Vehicles} (IoV) (5 out of 40) and \textit{Finance} (1 out of 40). Applications of FLF in special domains may require additional constraints and characteristics. The heterogeneity of the required properties across those domains lead to vast differences in the design choices of function, operations and storage of blockchain, contribution measurement and privacy requirements. One of the major application scenarios is IoT (e.g. \cite{LW4_FL_IIoT, LW5_FL_HomeAppliances_IoT, MH5_Lei2021}). Sensor-equipped devices collect environmental information and execute model updates thanks to advances in neural engines while edge servers are often assumed to aggregate models that are trained by local sensor devices. For instance, power consumption measured at smart homes can be used for training an AI model of energy demand forecast \cite{MH14_Rathore2019}. Zhao~\textit{et al.}~ propose a FLF for smart home appliance manufacturers to obtain AI models trained with their customers' usage information \cite{LW5_FL_HomeAppliances_IoT}. Some solved issues pertaining to the IoT-based FL \cite{LW4_FL_IIoT, MH10_Qu2021}. Zhang~\textit{et al.}~ propose a FL-based failure device detection method that takes into account the fact that sensor readings are often imbalanced since sensors are, in general, not deployed uniformly in a sensing area \cite{LW4_FL_IIoT}. They propose a modified FedAvg algorithm called centroid distance weighted federated averaging (CDW\_FedAvg) to obtain accurate models when local datasets are imbalanced at the devices. As sensor devices may not have enough resources to solely train neural networks, it is important to determine whether to delegate computationally intensive tasks to edge servers. Qu~\textit{et al.}~ propose an algorithm to determine whether to offload computation to edge servers when communications between IoT devices and edge computers are unreliable \cite{MH10_Qu2021}. FL is beneficial to many scenarios in ITS or IoV, e.g. optimized routing, congestion control and object detection for autonomous driving (\cite{LW8_Privacy_IoV, MH1_Chai2021, MH6_Kansra2022, KT04_Zou2021WCNC, KT06_Wang2021TNSE}). Vehicles collect local information and train local models with collected data. Models are often aggregated by devices called RSUs (Road Side Units) and MECs (Mobile Edge Computers) which are often deployed on the road. In IoV, the Cross-Device (CD) setting is often preferred as mostly the same types of sensors are used to measure road condition, and thus the common neural network model structure is shared by vehicles. As different locations have different road conditions, users need locally-optimized models, and thus scalability is a key issue. Furthermore, we need extra protection for users' location privacy. Zou~\textit{et al.}~ propose a FLF for a knowledge trading marketplace where vehicles can buy and sell models that vary geographically \cite{KT04_Zou2021WCNC}. Chai~\textit{et al.}~ propose multiple blockchains to deal with geographically dependent models \cite{MH1_Chai2021}. Kansra~\textit{et al.}~ integrate data augmentation, a technique to synthetically generate data such as images, into FL to increase model accuracy for ITS such as autonomous driving and road object identification \cite{MH6_Kansra2022}. Wang~\textit{et al.}~ propose a FLF dedicated to the crowdsensing of UAVs (Unmanned Aerial Vehicles) \cite{KT06_Wang2021TNSE}. As UAVs are often equipped with multiple sensors and can be easily deployed to sensing area, a FLF with UAVs has a huge benefit for ITS applications such as traffic monitoring and public surveillance. The other domain we found in the surveyed papers is finance. He \textit{et al.}~ proposed a FLF for commercial banks to better utilize customers' financial information \cite{MH9_He2021}. Financial information such as credit level, risk appetite, solvency, movable and real estate owned are crucial sources to understanding the characteristics of customers of financial services. However, it is too sensitive to directly use them for data mining. Hence, a FLF is a viable framework for financial information management. \subsubsection{RQ 1-2: What problems were solved?} The problems solved by the papers can be categorized into ({\textit{i}})\xspace the single point of failure/trust issue in FL, ({\textit{ii}})\xspace blockchain-related issues, ({\textit{iii}})\xspace lack of clients' motivation, ({\textit{iv}})\xspace how to fairly evaluate clients' contribution, ({\textit{v}})\xspace security and privacy issues. Most of the papers (29 out of 40) propose a system architecture of FLF to solve the problems of single point of failure/trust in the current centralized server-clients architecture. More specifically, this issue is rooted in the structure of the original FL where an aggregation server is collecting local model updates from clients in a centralized manner. The idea to mitigate this issue is to decentralize the processes involved in FL using blockchain technologies. Each paper proposes operations, functions and protocols processed in and outside the smart contract. Furthermore, some solve the issue of scalability in the FLF (e.g. \cite{MH1_Chai2021, MH5_Lei2021}) and blockchain-related issues such as energy waste of consensus algorithms (e.g. \cite{KT08_Qu2021TPDS, KT09_Zhang2021IJHPSA}). We will go into the proposed system architectures and blockchain-related issues in Section~\ref{sec:results_blockchain}. An incentive mechanism is integrated into FLFs to solve the problem of lack of clients' motivation. The basic idea is to give monetary incentives to clients in return for their effort in training a local model. The incentive mechanism is also leveraged to solve the model poisoning attack which is an attack on a model update to deteriorate the quality of a global model by malicious clients' providing bogus local model updates. The idea for demotivating such attacks is to devise an incentive mechanism that penalizes malicious activities. Furthermore, a reputation score based on contribution is also useful to screen potentially malicious clients. Here, we need a contribution measurement metric to fairly evaluate the quality of clients' model updates and detect the attacks. Details about the proposed incentive mechanisms and contribution measurements will be covered in Section~\ref{sec:results_incentive_mechanism}. 20 out of 40 papers propose approaches to solve issues related to security and privacy. With few exceptions (i.e. attacks on reputation~\cite{MH2_Kang2019, MH7_Mugunthan2022} and \cite{KT09_Zhang2021IJHPSA}), both security and privacy issues are rooted in local model updates. The security issue is related to the model poisoning which we mentioned above, while the privacy issue is related to sensitive information that might be leaked from the local updates. We will further summarize the works that solve the security and privacy issues in Section~\ref{sec:results_experiments}. \subsection{RQ 2: Blockchain} \label{sec:result_blockchain} \begin{table*}[t] \centering \caption{Overview of blockchain features.} \label{table:blockchain} \resizebox{\textwidth}{!}{ \input{table_blockchain} } \end{table*} \subsubsection{RQ 2-1: What is the underlying blockchain architecture?} \label{sec:results_blockchain} The Blockchain system and its underlying consensus mechanism is an influential part of the FLFs infrastructure. FLFs are heterogeneous in terms of architecture, operation and storage requirements, contribution calculation, actors and applied cryptography. Customized and tailored blockchain solutions may be required with respect to the underlying use-case. Due to its restrictive scalability in terms of computation and storage, most of the analyzed FLFs apply blockchain as a complementary element in a more complex system, with a few exceptions \cite{LW1_witt2021rewardbased,LW10_refiner, MH11_Desai2021, KT01_Toyoda2019BigData, KT02_Toyoda2020Access}. Blockchain systems themselves are complex distributed systems, heterogeneous across many dimensions, yet can roughly be categorized into public, private and permissioned Blockchains. \begin{enumerate} \item \textbf{Public} Blockchains are open access where participants can deploy contracts pseudoanonymously \item \textbf{Private} Blockchains do not allow access for clients outside the private network and require an entity that controls who is permitted to participate \item \textbf{Permissioned} blockchains are private blockchains with a decentralized committee which controls the onboarding process \end{enumerate} Note that the FLFs that utilize open-source public blockchains such as Ethereum \cite{LW3_Kumar2020, LW4_FL_IIoT, LW6_Rahmadika2020, LW10_refiner, LW12_Rahmadika2021_unlinkable, LW14_5G_Rahmadika2021,MH7_Mugunthan2022, MH11_Desai2021, MH13_Li2020, MH14_Rathore2019, KT07_Ur_Rehman2020INFOCOMW}, Stellar \cite{MH8_Fadaeddini2019} and EOS \cite{KT03_Martinez2019CyberC} were not deployed on the respective public blockchain in the experiments due to the enormous costs this would incur. Hyperledger Fabric \cite{HyperledgerFabric} or Corda \cite{corda} are permissioned blockchains running on private networks, allowing for faster throughput through a limited amount of potential nodes. This makes these frameworks more suitable for applications where blockchain replaces computationally expensive operations such as aggregation or storage of neural network models. The consensus protocol ensures alignment and finality of a version across all distributed nodes without the need for a central coordination entity. While Proof of Work (PoW) is the most common mechanism applied in Bitcoin and Ethereum, it comes at the cost of wasting computational power on bruteforcing algorithmic hash-calculations for the sole purpose of securing the network. Since many operations within the FLF frameworks are computationally expensive, these tasks can be integrated into the consensus mechanism which creates synergy and might be a better use of resources. Examples for consensus mechanisms can be found where the model accuracy is verified (Proof-of-Knowledge \cite{MH1_Chai2021}), reputation scores are checked (Proof-of-Reputation \cite{LW7_Zhang_Reputation}), the model parameters are securely verified (Proof-of-Federated-Learning \cite{KT08_Qu2021TPDS}), the Shapley-Value is calculated for contribution measurement \cite{LW9_FedCoin} or verification of capitalizing on efficient AI hardware (Proof-of-Model-Compression \cite{KT09_Zhang2021IJHPSA}). \subsubsection{RQ 2-2: How is blockchain applied within the FLF and what operations are performed?} Blockchain Technology is applied to mitigate the single point of failure and power imbalance of the server-worker topology of traditional FL through a transparent, immutable and predictable distributed ledger. Embedded cryptocurrencies suit the useful property of a real-time reward payments for predefined actions at the same time. In general, Turing-complete smart-contract enabled blockchains allow for a variety of possible complementary features for the FL training process, namely aggregation, payment, coordination and storage: \begin{enumerate} \item \textbf{Aggregation} The aggregation of model-parameters, can be performed by a smart contract on top of blockchain \cite{LW11_RewardResponseGame, LW2_Weng2021, MH5_Lei2021, MH9_He2021, KT01_Toyoda2019BigData, KT02_Toyoda2020Access}. Since blockchain is assumed to be failure resistant, this strengthens the robustness against possible single-point of failure of an aggregation server. In addition, the deterministic and transparent rules of smart contracts ensure inherent trust with an equal power distribution among participants, while the transparency ensures auditability of contributions. Yet since every node in the blockchain has to compute and store all information, submitting a model to the smart contract for aggregation causes overhead in terms of both computation and storage on the blockchain. Assuming $n$ FL-workers and $m$ Blockchain nodes over $t$ rounds, the blockchain scales with $\mathcal{O}(t*n*m)$ which questions the feasibility of on-chain aggregation. There are two papers that try to reduce data size for on-chain aggregation. Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased} proposed a system where 1-bit compressed soft-logits are stored and aggregated on the blockchain saving communication, storage and computation costs by orders of magnitude. Feng~\textit{et al.}~~\cite{MH5_Lei2021} employ a framework based on two BC layers where the aggregation process is outsourced to a Mobile-Edge-Server . \item \textbf{Coordination} Applying blockchain to coordinate and navigate the FL process allows for decentralization without heavy on-chain overhead. Instead of aggregating the model on-chain, letting the blockchain choose a leader randomly can ensure decentralization \cite{LW5_FL_HomeAppliances_IoT,MH11_Desai2021, MH1_Chai2021, KT11_Xuan2021SCN}. Another way blockchain coordinates the FL process is by enabling the infrastructure for trust-less voting atop of the blockchain. Voting on the next leader (aggregator) \cite{MH8_Fadaeddini2019, MH9_He2021} or on each others contributions \cite{KT01_Toyoda2019BigData,KT02_Toyoda2020Access, KT11_Xuan2021SCN} further democratizes the process. Beyond explicit coordination operations like voting or leader selection, the implicit function of storing crucial information and data for the FL process, \cite{LW10_refiner, MH13_Li2020, KT04_Zou2021WCNC, LW1_witt2021rewardbased} , verifying correctness of updates \cite{MH11_Desai2021, LW5_FL_HomeAppliances_IoT} or keeping the registry of active members \cite{LW1_witt2021rewardbased, LW10_refiner, KT01_Toyoda2019BigData, KT02_Toyoda2020Access, LW2_Weng2021, LW9_FedCoin} is crucial for the FL workflow and implies coordination through blockchain as an always accessible, verifiable, transparent and immutable infrastructure. \item \textbf{Payment} Many general-purpose blockchain systems include cryptocurrency capabilities and therefore allow for the incorporation of instant, automatic and deterministic payment schemes defined by the smart contract's business logic. This advantage was capitalized on by 26 of the 40 FLF we analyzed. Section~\ref{sec:results_incentive_mechanism} discusses the details of applied payment schemes in the context of reward mechanisms and game theory. \item \textbf{Storage} Decentralized and publicly verifiable storage on the blockchain facilitates auditability and trust among participants. Even though expansive, since all blockchain nodes store the same information in a redundant fashion, it might make sense to capitalize on the immutability and transparency feature of blockchain and store information where either a shared access among participants is required or where verifiability of the history is required to hold agents accountable for posterior reward calculations \cite{LW7_Zhang_Reputation}. In particular, machine learning models \cite{LW2_Weng2021, LW8_Privacy_IoV,LW11_RewardResponseGame, MH1_Chai2021, Bao2019FLChain, MH4_Ma2021, MH9_He2021, MH10_Qu2021, MH11_Desai2021, KT01_Toyoda2019BigData, KT02_Toyoda2020Access}, reputation scores \cite{LW7_Zhang_Reputation, LW13_TowardsReputationINFOCOMM}, User-information \cite{LW1_witt2021rewardbased, LW10_refiner, KT01_Toyoda2019BigData, KT02_Toyoda2020Access, LW2_Weng2021, LW9_FedCoin} and Votes \cite{KT01_Toyoda2019BigData, KT02_Toyoda2020Access, LW1_witt2021rewardbased} are stored on-chain of the respective FLF. \end{enumerate} \subsubsection{RQ 2-3: Is the framework scalable?} Especially if the FLF is intended to be used with hundreds to millions of devices, the scalability of the framework is an important characteristic. In particular, ({\textit{i}})\xspace storing large amounts of data such as model-parameters and ({\textit{ii}})\xspace running expansive computations on the blockchain e.g. aggregating millions of parameters, calculate expansive contribution measurements like Shapley Value or privacy-preserving methods hinder the framework to scale beyond a small group of entrusted entities towards mass adoption. To overcome the scalability-bottleneck of storage, some FLF applied an Interplanetary-File-System (IPFS) \cite{ipfs}, where data is stored off-chain in a distributed file system, using the content-address as a unique pointer to each file in a global namespace over all computing devices \cite{LW3_Kumar2020, LW5_FL_HomeAppliances_IoT, LW10_refiner, LW13_TowardsReputationINFOCOMM, MH2_Kang2019, MH7_Mugunthan2022, MH8_Fadaeddini2019, KT03_Martinez2019CyberC, KT07_Ur_Rehman2020INFOCOMW}. Other FLF are based on novel design choices to tackle the scalability-issues: Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased} applied compressed Federated Knowledge Distillation, storing only 1-bit compressed soft-logits on-chain. Chai~\textit{et al.}~~\cite{MH1_Chai2021} design a hierarchical FLF with two blockchain layers to reduce the computational overhead by outsourcing computation and storage to an application specific sub-chain. Similarly, Feng~\textit{et al.}~~\cite{MH5_Lei2021} propose a two-layered design, where the transaction efficiency of the global chain is improved through sharding. Bao~\textit{et al.}~~\cite{Bao2019FLChain} employ an adaption of counting bloom filters (CBF) to speed up blockchain queries in the verification step of their FLF. Desai~\textit{et al.}~~\cite{MH11_Desai2021} combine public and private blockchains, with the former storing reputation scores for accountability and the latter used for heavy computation and storage. Furthermore, the authors apply parameter compression for further scalability improvements. \subsection{RQ 3: Incentive Mechanism} \label{sec:results_incentive_mechanism} \begin{table*}[t] \centering \caption{Overview of incentive mechanisms and contribution measurement.} \label{table:incentive_mechanism} \resizebox{\textwidth}{!}{ \input{table_incentive_mechanism} } \end{table*} We found that 45\% (18 out of 40 papers) of the surveyed papers measured workers' rewards via simulation while 35\% (14 out of 40 papers) of them theoretically analyzed their incentive mechanisms. In the following, we study these 14 papers in terms of how they are theoretically analyzed and how participants' contribution is measured and utilized for their analysis. \subsubsection{RQ 3-1: How are incentive mechanisms analyzed?} In general, there are three steps for theoretical analysis. The first step is to determine what entities' behavior is examined. In FL, such entities could be workers and task requesters. The second step is to model the entities' utilities or profits. They can be often obtained by taking into account the expectation of possible profits and costs. The last step is to analyze the defined utilities or profits. We will see how each step is conducted in the literature. The first step is to determine entities to be analyzed. In most cases, workers are at least chosen as an entity as the idea of giving incentives is to motivate workers. Some papers also choose entities that pay rewards (e.g. task requesters) as we want to make sure that they are also profitable even if they pay rewards to workers. The second step is to define the utilities or profits of entities. A utility is a one-dimension measurable unit that quantifies an entity's value on an outcome and can be positive (e.g. rewards for workers and a value of AI models for task requesters) and negative values (e.g. a computation cost for workers and a total amount of payout for task requesters). Utilities and profits can be derived by subtracting costs from payouts. Although the elements of payouts are relatively straightforward (e.g. rewards for work contribution), defining cost elements often depends on the assumed application scenarios. Typical costs in the surveyed papers are computation, electricity (e.g. \cite{LW11_RewardResponseGame, MH1_Chai2021, MH2_Kang2019, KT01_Toyoda2019BigData, KT02_Toyoda2020Access, KT06_Wang2021TNSE}), data acquisition (e.g. pictures and sensor readings \cite{KT04_Zou2021WCNC, KT05_Hu2021IoTJ, KT06_Wang2021TNSE}) and privacy leakage due to model updates (e.g. \cite{KT05_Hu2021IoTJ, KT06_Wang2021TNSE, KT08_Qu2021TPDS}). Even multiple cost factors can be considered (e.g. \cite{KT04_Zou2021WCNC, KT05_Hu2021IoTJ, KT06_Wang2021TNSE}). The last step is to analyze the defined utilities and profits to ensure the robustness of designed incentive mechanisms and derive the optimal strategies and reward allocation. It is up to us to determine what to analyze with utilities. For example, the most simple yet crucial analysis would be to prove that it is worthwhile for workers to join a FL task by showing that their profits are non-negative. Weng~\textit{et al.}~ and Bao~\textit{et al.}~ modeled requesters' and/or workers' profits with given rewards and costs proved that their profits are non-negative \cite{LW2_Weng2021, Bao2019FLChain}. Utilities can be used to derive task requesters' and workers' optimal strategies by finding a point where utilities are maximized. By proving the existence of such a point, we can derive an equilibrium, which is a condition where entities (e.g. workers) cannot be better off deviating from their optimal strategies. Finding an equilibrium would be a strong proof that a designed mechanism is stable. For instance, if workers can control what data size they use for a task, then the factor of data size should be in workers' utility, and we can derive the optimal data size by maximizing the utility (e.g. by finding first- and second-order conditions) \cite{KT02_Toyoda2020Access}. It is also used to determine optimal prices for tasks. Wang~\textit{et al.}~ propose a Q-learning-based approach to determine the optimal prices so that utilities are maximized via iterative learning processes \cite{KT06_Wang2021TNSE}. Similarly, Zou~\textit{et al.}~ derive the optimal prices for workers with first- and second-order conditions when the value of data, transmission quality and communication delay are the factors to determine their competitiveness and costs \cite{KT04_Zou2021WCNC}. Hu~\textit{et al.}~ propose a two-stage optimization method to determine the optimal values on data and their prices in order by solving an Euler-Lagrange equation of their utilities. These kinds of two-stage optimization game are often formalized as the Stackelberg game. Jiang and Wu~\cite{LW11_RewardResponseGame} and Chai~\textit{et al.}~~\cite{MH1_Chai2021} propose optimal incentive mechanisms with the Stackelberg game, in which two parties sequentially determine their actions according to other party's action. More specifically, a party called leader moves first and the other party called follower moves accordingly. Jian and Wu propose a Stackelberg-game-based incentive mechanism for FL \cite{LW11_RewardResponseGame}. An aggregation server (a leader) first provides a task's deadline and rewards to workers (followers). Workers then determine how much they should train by maximizing their utilities with the information provided by the server. The server then determines the optimal reward by maximizing its utility with the feedback by the workers. Chai~\textit{et al.}~ also propose a Stackelberg game to analyze their incentive mechanism in IoV \cite{MH1_Chai2021}. Aggregation servers (RSUs) are leaders while workers (vehicles) are followers, and aggregation servers first suggest prices and workers determine how much data they should collect and use for training so that both entities' utilities are maximized in order. It is interesting to see that the process of FL with an incentive mechanism can be seen as a contract or contest. Specifically, a task requester proposes a contract with task description and its reward and workers can determine whether or not to sign such a contract and how much resource they will provide \cite{MH2_Kang2019}. A FL process can be also seen as a contest as workers need to work first, which incurs irreversible costs due to computation, whereas their rewards are not guaranteed at the time of model update submission. Toyoda~\textit{et al.}~ give an incentive analysis based on the contest theory~\cite{KT01_Toyoda2019BigData, KT02_Toyoda2020Access}. Workers' utilities are used to derive how much effort workers' should exert to a task under the risk of not gaining prizes, while requesters' utility is used to determine how a prize should be split to workers. \subsubsection{RQ 3-2: How are the contributions of workers measured?} Incentive mechanisms require a measurement of contribution by each client to fairly distribute rewards to workers. However, it is not an easy task as we cannot see their actual work and have to measure workers' contribution only from their model updates. For this, we need to determine (i) metrics for contribution measurement and (ii) validators that measure metrics. The metrics used in the literature can be categorized into absolute and relative ones. The absolute metrics are metrics that can be measured without others' local model updates. For instance, a loss function can be measured from a local model and a global model, and the difference of them can be used as a metric for contribution measurement. Although the majority of absolute metrics are based on accuracy (e.g. \cite{LW3_Kumar2020, LW4_FL_IIoT}) and data size (e.g. \cite{LW6_Rahmadika2020, LW11_RewardResponseGame}), other factors are also proposed such as energy consumption (e.g. \cite{LW7_Zhang_Reputation, MH10_Qu2021}) and computation time \cite{KT12_Liu2021Sensors}. Some combine multiple metrics (e.g. \cite{LW7_Zhang_Reputation, MH13_Li2020}). Absolute metrics are generally straightforward but hard to validate. For instance, as only the model updates are submitted to an aggregation server in FL, no one can judge whether workers honestly claim the data size used for their model updates. In contrast, the relative metrics can be measured by comparing one's output with others' and this somewhat solves such a difficulty. For instance, Zhao~\textit{et al.}~ propose a metric based on the Euclidean distance of workers' model updates \cite{LW5_FL_HomeAppliances_IoT}. Likewise, Witt~\textit{et al.}~ propose that workers are to submit an unlabeled public dataset's labels predicted with their own local models and calculate the correlation of their labels as a metric \cite{LW1_witt2021rewardbased}. This metric is integrated into the computation of reward distribution based on peer truth serum \cite{Radanovic2016PTS} for the FL setting. Voting is another approach to relatively determine workers' contribution. For instance, workers in the next round of FL are to choose best updated models in the previous round using their own local datasets and rank them by voting \cite{KT01_Toyoda2019BigData, KT11_Xuan2021SCN}. The above metrics can be also used to measure workers' reputation. If the same workers are assumed to join different tasks, reputation scores calculated with workers' past contribution can be a reliable factor to determine reward amount. Some works propose the reputation of workers based on their past contribution (e.g. \cite{LW5_FL_HomeAppliances_IoT, LW7_Zhang_Reputation, MH2_Kang2019, MH13_Li2020}). For instance, Kang~\textit{et al.}~ propose to calculate workers' reputation based on direct opinion by a task requester and indirect opinions by other task requesters \cite{MH2_Kang2019}. Even if workers' individual contribution is measured, it does not guarantee that rewards are fairly given to workers. Hence, it is important to determine how rewards should be distributed based on the metrics. The Shapley value is an approach to fairly determine payouts to workers based on their contributions \cite{Shapley1953}. Three papers propose to use the Shapley value for fair reward distribution \cite{LW9_FedCoin, MH9_He2021, MH4_Ma2021}. Liu~\textit{et al.}~ propose to use it with the metric of accuracy \cite{LW9_FedCoin}. He \textit{et al.}~ compared their Shapley-value-based method with three approaches, namely (i) equal distribution, (ii) a method based on individual contribution, and (iii) a method called the labor union game where only the order of submission is taken into account to contribution measurement, and found that the Shapley-value-based method outperforms the others in terms of workers' motivation and fairness \cite{MH9_He2021}. Ma \textit{et al.}~ propose a method to calculate Shapley values even if model updates are masked to preserve workers' privacy \cite{MH4_Ma2021}. The next question we must answer is who validates such metrics. From our study, validators can be classified into (i) aggregation servers (e.g. \cite{LW4_FL_IIoT, LW8_Privacy_IoV, MH1_Chai2021}), (ii) task requesters (e.g. \cite{LW7_Zhang_Reputation, MH2_Kang2019, MH13_Li2020}), (iii) validators whose task is only to measure contribution (\cite{LW10_refiner, MH8_Fadaeddini2019}), (iv) blockchain nodes (e.g. \cite{LW3_Kumar2020, KT08_Qu2021TPDS, KT12_Liu2021Sensors}), (v) workers (e.g. \cite{MH7_Mugunthan2022, KT10_Gao2021ICPP, KT11_Xuan2021SCN}) and (vi) smart contracts (e.g. \cite{LW1_witt2021rewardbased, LW6_Rahmadika2020, MH4_Ma2021}). Some of the works assume that aggregation servers, task requesters or validators are expected to possess datasets to calculate the metrics discussed above. As reviewed in Section \ref{sec:results_blockchain}, some propose custom blockchains dedicated to FL, and the validation process is integrated into its block generation process, making blockchain nodes validators. In some scenarios, aggregation servers, task requesters and blockchain nodes can be validators since local models are collected by them. However, datasets for validation may not be always available. As we have seen above, some metrics can be calculated without validators. Furthermore, metrics based on the correlation of predicted labels do not require any validation dataset and can even be measured in a smart contract \cite{LW1_witt2021rewardbased}. \subsection{RQ 4: Experiments} \label{sec:results_experiments} \begin{table*}[t] \centering \caption{Overview of experiments. \textit{\footnotesize (BCWD = Breast Cancer Wisconsin Data Set, BT = Blockchain Tampering, DGHV = Dijk-Gentry-Halevi-Vaikutanathan Algorithm, DP = Differential Privacy, ECC = Elliptic Curve Cryptography, HE = Homomorphic Enrcryption, HDD = Heart Disease Data Set, KDD = Knowledge Discovery and Data Mining Tools Competition, RP = Random Model Poisoning, RSA = Rivest-Shamir-Adleman Cryptosystem, RT = Reputation Tampering, SA = Secure Aggregation~\cite{MH_SECURE_AGG}, SP = Systematic Model Poisoning, ZKP = Zero-Knowledge Proof, 2PC = 2-Party Computation)}} \label{table:experiments} \resizebox{\textwidth}{!}{ \input{table_experiments} } \end{table*} Conducting experiments is a key element of FLF development for two reasons. Firstly, the implementation of an example testifies to the feasibility of the approach and gives the authors the chance to identify weaknesses of their frameworks, e.g., poor scalability. Secondly, conducting experiments allows the comparison of the proposed approaches with each other, e.g., based on the accuracy of the models on standardized test sets. We screened the papers for experiments, and when present, examined them according to nine criteria (\tablename~\ref{table:experiments}). \subsubsection{RQ 4-1: Is the performance of the framework reported?} The large majority of papers report results of their experiments expressed in either loss, accuracy, or F1 score (84.8\%, 28 out of 33 papers with experiments). The remaining instead focus on the performance of their novel group-based Shapley value calculation for contribution measurement~\cite{MH4_Ma2021}, the user interface~\cite{LW9_FedCoin}, the computational effort and adversarial influence~\cite{MH11_Desai2021}, or game-theoretic quantities such as utility values and rewards~\cite{KT06_Wang2021TNSE}. We note that comparability of the approaches is not given through the conducted experiments, since even when using the same data sets and the same evaluation metrics, different experimental scenarios are investigated. In conclusion, to obtain insightful results, experiments should compare the performance (accuracy and computational effort) of an incentivized, decentralized FL system in a standardized challenging environment (non-IID, adversaries) with either the performance of a traditional centralized FL system or the performance of a locally trained model without FL. Ideally, the effectiveness of incentive mechanism and decentralization efforts are reflected in the FLF performance through a holistic experimental design. \subsubsection{RQ 4-2: How comprehensive are the experiments?} First, it was found that the majority of publications do include experiments. Only seven of 40 papers did not conduct experiments~\cite{LW13_TowardsReputationINFOCOMM,MH6_Kansra2022,MH8_Fadaeddini2019,MH9_He2021,KT01_Toyoda2019BigData, KT02_Toyoda2020Access,KT07_Ur_Rehman2020INFOCOMW}. However, the analysis also shows that only 45\% of the experiments implement the actual blockchain processes (15 out of 33 papers with experiments). Instead the distributed functionality was simulated or its impact estimated. For instance, Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022} focus on the evaluation of the frameworks' contribution scoring procedure by simulating collusion attacks on the FL procedure. The effect of introducing blockchain to the FL framework was accounted for by estimating the per-agent gas consumption. Similarly, Chai~\textit{et al.}~~\cite{MH1_Chai2021} conduct experiments specifically designed to investigate the Stackelberg-game-based incentive mechanism. The authors accomplish this without implementing the blockchain processes. To test the FL functionality of the framework, a ML problem and a dataset must be selected. For the ML application and the dataset used, we observe a high homogeneity. Almost all experiments realize classification problems and use publicly available benchmark datasets. The most common are MNIST (handwritten digits)~\cite{MH_MNIST} and its variations, as well as CIFAR-10 (objects and animals)~\cite{MH_CIFAR}. Only Rathore~\textit{et al.}~~\cite{MH14_Rathore2019} and Li~\textit{et al.}~~\cite{LW8_Privacy_IoV} did not perform classification tasks. Rathore~\textit{et al.}~~\cite{MH14_Rathore2019} performed object detection on the PASCAL VOC 12 dataset~\cite{MH_PASCAL}. Object detection typically combines regression and classification through predicting bounding boxes and labeling them. Li~\textit{et al.}~~\cite{LW8_Privacy_IoV} applied their FLF to autonomous driving and minimized the deviations in steering-wheel rotation between a human-driven and simulation-driven vehicle. This corresponds to a regression task. As to the number of training data holders, the experiments considered between one~\cite{LW8_Privacy_IoV} and 900~\cite{MH12_Zhu2021} clients. In general, one would expect papers specifying cross-silo settings to test with fewer ($<$100~\cite{SP_MD_ARXIV}) and papers specifying cross-device settings to test with more ($>$100) clients. Of the frameworks clearly designed for a cross-device application, it is noticeable that only Kang~\textit{et al.}~~\cite{MH2_Kang2019} and Desai~\textit{et al.}~\cite{MH11_Desai2021} conduct experiments with 100 participants or more. On the contrary, Rahmadika~\textit{et al.}~~\cite{LW12_Rahmadika2021_unlinkable} test with as many as 100 participants, although only designing a cross-silo framework. Regarding the FL algorithm, the classic FedAvg~\cite{BrendanMcMahan2017} is mainly used. Furthermore, in some experiments algorithms are used that mitigate the problem of catastrophic forgetting (Elastic Weight Consolidation (EWC)~\cite{LW3_Kumar2020}), reduce the communication overhead (Federated Knowledge Distillation (FD)~\cite{LW1_witt2021rewardbased}, signSGD~\cite{MH11_Desai2021}), or show more robust convergence for non-IID and other heterogeneous scenarios (FedProx~\cite{LW10_refiner}, Centroid Distance Weighted Federated Averaging (CDW\_FedAvg)~\cite{LW4_FL_IIoT}). Chai~\textit{et al.}~~\cite{MH1_Chai2021} and Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022} design custom FL algorithms. Specifically, Chai~\textit{et al.}~~\cite{MH1_Chai2021} propose a FLF with two aggregation layers in order to promote scalability. In their FL algorithm, nodes in the middle layer aggregate the local model updates of associated nodes in the lowest layer. This semi-global model is then fine-tuned by the middle layer nodes based on data collected by the middle layer nodes themselves. Finally, nodes in the top layer aggregate the fine-tuned-models from the middle layer nodes into a global model which is eventually passed back to the lowest layer nodes. All aggregations are weighted by the training dataset size. Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022} propose a FLF where all clients evaluate and score the differentially encrypted locally trained models of all other clients. These scores are reported to a smart contract which computes an overall score for each local model. Eventually, each client aggregates the global model from all local models, weighted by the overall score. \subsubsection{RQ 4-3: Are non-IID scenarios simulated?} \par In real-world applications of FL, the training data is often not independent and identically distributed (non-IID) between the clients. This effects the performance of the global model and adds an additional layer of complexity with respect to contribution measurement. Hence, how we simulate non-IID scenarios with open datasets is crucial. In 11 publications and for various benchmark datasets, non-IID scenarios were considered. For the example of the MNIST dataset, Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased} simulate different levels of non-IID scenarios following the Dirichlet distribution as it can easily model the skewness of data distribution by varying a single parameter. Martinez~\textit{et al.}~~\cite{KT03_Martinez2019CyberC} split the dataset in overlapping fractions of various size, whereas Kumar~\textit{et al.}~~\cite{LW3_Kumar2020} divide the dataset so that each trainer only possesses data from two of the ten classes. In a less skewed setting, Kumar~\textit{et al.}~ allocate data from at most four classes to each trainer, with each class being possessed by two devices. \subsubsection{RQ 4-4: Are additional privacy methods applied?} \begin{figure} \centering \resizebox*{0.95\linewidth}{!}{% \begin{forest} forked edges, for tree={ grow'=east, draw, rounded corners, text width=2cm, node options={align=center}, } [Privacy-preserving \\concepts in the \\surveyed papers, fill=col5, parent, s sep=1cm [Update \\masking \\\cite{LW10_refiner, MH11_Desai2021, Bao2019FLChain, LW6_Rahmadika2020}, fill=col4 [Multi-Party \\Computation (MPC), for tree={child, fill=col3} [Google's Secure \\Aggregation (SA) \\\cite{MH4_Ma2021, LW9_FedCoin}, for tree={child, fill=col2}] [Yao's garbeled \\ circuits, fill=col2] [Homomorphic \\Encryption (HE)\\\cite{MH9_He2021, MH14_Rathore2019, LW3_Kumar2020}, for tree={child, fill=col2} [Paillier \\\cite{MH12_Zhu2021, LW2_Weng2021}, fill=col1] [RSA, fill=col1] [DGHV\\\cite{LW8_Privacy_IoV}, fill=col1] [Elgamal \\\cite{MH13_Li2020},fill=col1] ] ] [Differential \\Privacy (DP) \\\cite{MH7_Mugunthan2022, LW5_FL_HomeAppliances_IoT, LW3_Kumar2020}, fill=col3] ] [Identity \\protection, fill=col4 [Combination of HE and/or other cryptographic techniques, fill=col3 [\cite{LW8_Privacy_IoV}: Zero-Knowledge \\Proof (ZKP) , for tree={child, fill=col2}] [\cite{LW12_Rahmadika2021_unlinkable}: Ring signature~\& RSA~\& Rabin~\& ECC , for tree={child, fill=col2}] [\cite{LW14_5G_Rahmadika2021}: Pairing-based cryptography~\& ECC , for tree={child, fill=col2}] [\cite{MH1_Chai2021}: Asymmetric cryptography~\& digital signatures , for tree={child, fill=col2}] ] ] ] \end{forest} } \caption{Privacy-preserving concepts employed in survey papers. \textit{\footnotesize (DGHV = Dijk-Gentry-Halevi-Vaikutanathan Algorithm, ECC = Elliptic Curve Cryptography, RSA = Rivest-Shamir-Adleman Cryptosystem. Papers with unspecified methods are added to next highest node.)}} \label{abb:PrivacyClassification} \end{figure} Even though FL's core objective is to maintain confidentiality through a privacy-by-design approach where model parameters are aggregated instead of training data, there remain innumerable attack surfaces \cite{FL_Attacks_Taxonomy}. Therefore, the presented frameworks employ additional privacy-preserving mechanisms which can be divided into two groups. ({\textit{i}})\xspace Mechanisms that encrypt or obfuscate gradients and prevent malicious parties to draw conclusions about the data set. ({\textit{ii}})\xspace Mechanisms that hide the identity of participating parties. A classification of the employed privacy-preserving methods can be seen in \figurename~\ref{abb:PrivacyClassification}. The methods of the first group can be further divided into ({\textit{i}})\xspace approaches that are based on cryptographic secure multi-party computing (MPC), and ({\textit{ii}})\xspace approaches that are based on differential privacy (DP). MPC refers to cryptographic methods by which multiple participants can jointly compute a function without having to reveal their respective input values to the other participants. MPC approaches include three groups of methods~\cite{MH_SECURE_AGG}. ({\textit{i}})\xspace Google's secure aggregation (SA)~\cite{MH_SECURE_AGG} is specifically designed to achieve low communication and computation overhead and to be robust towards device dropout. It has been employed by Liu~\textit{et al.}~~\cite{LW9_FedCoin} and Ma~\textit{et al.}~~\cite{MH4_Ma2021}. Beyond implementing SA, the latter develops a group-based Shapley-value method for contribution measurement, since the native Shapley-value method cannot be applied to masked gradients. ({\textit{ii}})\xspace Yao's garbeled circuits have not been applied to any of the analysed frameworks, but are mentioned here for completeness. ({\textit{iii}})\xspace While Yao's garbeled circuits were developed for 2-party secure computing, homomorphic encryption (HE) allows for higher numbers of participants~\cite{MH_SECURE_AGG}. As shown in \figurename~\ref{abb:PrivacyClassification}, HE has been employed in several works \cite{LW2_Weng2021}, \cite{LW8_Privacy_IoV}, \cite{MH9_He2021}, \cite{MH13_Li2020}, \cite{MH12_Zhu2021}, \cite{MH14_Rathore2019}. For that, different implementations of the homomorphic idea have been chosen, such as the Pallier cryptosystem, the Elgamal cryptosystem, or the Dijk-Gentry-Halevu-Vaikutanathan Algorithm (DGHV). Li~\textit{et al.}~~\cite{MH13_Li2020} choose the Elgamal cryptosystem that is less computationally expensive than other HE approaches. DP refers to a method where noise drawn from a probability density function $p_{noise}(x)$ with expected value $\mathbb{E}(p_{noise}(x))=0$ obfuscates the individual contribution with minimal distortion of the aggregation. DP has been employed by Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022}, Zhao~\textit{et al.}~~\cite{LW5_FL_HomeAppliances_IoT}, and Kumar~\textit{et al.}~~\cite{LW3_Kumar2020}, with the latter combining the use of HE and DP. However, the fewer clients participate in the DP process, the heavier the distortion of the aggregated model, introducing a trade-off between privacy and model accuracy. Zhao~\textit{et al.}~~\cite{LW5_FL_HomeAppliances_IoT} mitigate the loss in accuracy by incorporating a novel normalization technique into their neural networks instead of using traditional batch normalization (e.g. \cite{MH7_Mugunthan2022, LW3_Kumar2020}). Besides MPC and DP, another technique for data set protection is chosen by Qu~\textit{et al.}~~\cite{KT08_Qu2021TPDS}. Instead of the clients sharing masked gradients, the FLF relies on requesters sharing masked datasets in the model verification step. This prevents other workers from copying the models while testing and evaluating them. HE and 2-party computation (2PC) are used. Zhang~\textit{et al.}~~\cite{LW10_refiner}, Desai~\textit{et al.}~~\cite{MH11_Desai2021}, Bao~\textit{et al.}~~\cite{Bao2019FLChain}, and Rahmadika~\textit{et al.}~~\cite{LW6_Rahmadika2020} also rely on the masking of gradients but do not specify the privacy-preserving mechanisms. The second group of frameworks targets the protection of participants' identities through cryptographic mechanisms. For that, Rahmadika~\textit{et al.}~~\cite{LW12_Rahmadika2021_unlinkable} combine ring signatures, HE (RSA), Rabin algorithm, and elliptic curve cryptography (ECC), while Chai~\textit{et al.}~~\cite{MH1_Chai2021} incorporate digital signatures and asymmetric cryptography approaches, and Rahmadika~\textit{et al.}~~\cite{LW14_5G_Rahmadika2021} perform authentication tasks through pairing-based cryptography and ECC. Only one framework implements measures for both masking gradients as well as hiding identities. Li~\textit{et al.}~~\cite{LW8_Privacy_IoV} use DGHV for masking gradients and Zero-Knowledge Proof (ZKP) for identity protection. Finally, He~\textit{et al.}~~\cite{MH9_He2021} specifically address the problem of aligning entities. This problem occurs for vertical federated learning where different parties hold complementary information about the same user. The parties have to find a way of matching these information without disclosing the identity of their users. To solve this problem, He~\textit{et al.}~ employ Encrypted Entity Alignment which is a protocol for privacy-preserving inter-database operations~\cite{MH9_He2021}. \subsubsection{RQ 4-5: Is the framework robust against malicious participants?} The experiments consider and simulate different types of adversaries, where some publications consider multiple types of attacks. Four groups of attack pattern were identified in the publications: random model poisoning, systematic model poisoning, reputation tampering (RT), and blockchain tampering. The most common attack considered in the experiments is random model poisoning. This includes attacks, where local models are trained on a randomly manipulated data set (\cite{LW10_refiner}, \cite{MH2_Kang2019}, \cite{MH7_Mugunthan2022}, \cite{KT10_Gao2021ICPP}) or where random parameter updates are reported (\cite{MH10_Qu2021}, \cite{LW1_witt2021rewardbased}, \cite{MH2_Kang2019}, \cite{LW5_FL_HomeAppliances_IoT}, \cite{MH1_Chai2021}, \cite{MH12_Zhu2021}, \cite{KT09_Zhang2021IJHPSA}). For instance, malicious agents in \cite{LW10_refiner} use a training dataset with intentionally shuffled labels, whereas in \cite{MH12_Zhu2021} the parameter updates are randomly perturbed with Gaussian noise. Kang~\textit{et al.}~~\cite{MH2_Kang2019} analyse the effects of a bad or manipulated data set by providing 8\% of the workers with training data where only a few classes are present, and another 2\% of the workers with mislabeled data. Kang~\textit{et al.}~ quantify the insufficiency of the dataset using the earth mover's distance. The second most commonly simulated type of attack is systematic model poisoning where the attackers manipulate the model through well-planned misbehavior. In \cite{MH11_Desai2021}, a fraction of workers colludes and manipulates their image classification data sets by introducing a so-called trojan pattern: the malicious agent introduces a white cross to a certain fraction of a class, e.g., to 50\% of all dog pictures in an animal classification task and re-labels these data points as horse pictures. This creates a backdoor in the model that cannot be detected by subjecting the model to dog or horse pictures which will be correctly classified. However, pictures with the trojan pattern will be misclassified. Other forms of systematic model poisoning can be found with Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased}, Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022}, Gao~\textit{et al.}~~\cite{KT10_Gao2021ICPP}. The third type of attack that was simulated is reputation tampering (RT). Here, malicious agents intentionally provide colluding agents with perfect reputation or voting scores \cite{MH2_Kang2019,MH7_Mugunthan2022}. The fourth type of attack is blockchain tampering \cite{KT09_Zhang2021IJHPSA}. Here, malicious miners intentionally fork the blockchain and prevail by building a longer branch faster than the honest miners. \subsection{RQ 5: Summary: What are Lessons Learned?} The inherent complexity of FLF leads to heterogeneity of the scientific research across the dimensions ({\textit{i}})\xspace application, ({\textit{ii}})\xspace overall design, ({\textit{iii}})\xspace special focus on open issues and ({\textit{iv}})\xspace details and thoroughness. \textbf{Application} Although the majority of analyzed works offer application independent frameworks (classified as "generic" in Table~\ref{table:FL}) other FLF are applied across IoT, Industrial-IoT (IIoT), IoV and Finance. The heterogeneity of the required properties across those domains causes differences in the design choices of function, operations and storage of blockchain, contribution measurement and privacy requirements. \textbf{Variety of possible design choices} In addition to the domain specific influence on the system architecture, design choices about the FL algorithms, communication protocol, applications of blockchain within the ecosystem, blockchain technology (existing or novel), storage and operation on blockchain, security trade-offs, mechanism design, contribution measurement, etc. add to the complexity and overall variety of such systems. For example, some works apply blockchain as the outer complementary layer \cite{LW7_Zhang_Reputation} while blockchain is the core infrastructure for coordination, storage, aggregation and payment in other FLFs \cite{LW1_witt2021rewardbased, LW10_refiner}. Furthermore, some works developed application specific blockchain systems, while others tried to embed a FLF on top of existing blockchain frameworks such as Ethereum for cheaper and pragmatic deployment. Our survey exposes a similar variety in the choice of the contribution measurement: The spectrum reaches from computationally lightweight correlation of answers on a public dataset \cite{LW1_witt2021rewardbased} as a proxy for contribution as opposed to the Shapley value, a measurement with strong theoretical properties but massive computational overhead \cite{LW9_FedCoin,MH9_He2021}. \textbf{Special Focus} The aforementioned complexity as well as its novelty result in many open issues across a broad spectrum. Many works therefore focus on solving specific issues such as enhanced privacy \cite{LW2_Weng2021, LW8_Privacy_IoV,LW12_Rahmadika2021_unlinkable, MH8_Fadaeddini2019}, novel blockchain systems \cite{LW4_FL_IIoT,LW9_FedCoin}, bandwidth reduction \cite{MH10_Qu2021}, novel contribution measurements \cite{LW1_witt2021rewardbased, LW9_FedCoin, MH10_Qu2021} or game theory (e.g. \cite{MH2_Kang2019, LW11_RewardResponseGame}), as the major contribution which further complicates a holistic comparison of FLF. \textbf{Thoroughness} The analyzed papers also vary heavily in provided detail and thoroughness, ranging from first concepts, lacking details in terms of important specifications such as performance, specific function, operation and storage on blockchain, contribution measurement, robustness, experiments and privacy to theoretically detailed and experimentally tested solutions. None of the analyzed papers are production-ready. \subsubsection{Standards for better comparability} For better reproducibility, implementability and comparability we suggest to consider and define the following elements when designing a FLF. \noindent \textit{System model and architecture:} \begin{itemize} \item Assumed application \item Type of FL (i.e., CD vs CS, horizontal vs vertical) \item Entities (including attackers) \item Setup (e.g., who manages a system, who deploys it) \item Role of blockchain within the FLF (e.g., what part does blockchain replace, what functions/operations) \item Blockchain design (e.g., consensus algorithms, blockchains, smart contracts) \item Non-blockchain design (e.g., off-chain storage, privacy protection, authentication) \item Procedures (e.g., flowcharts and diagrams) \item Theoretical analysis of the incentive mechanism \item Specification of clients' contribution measurement \item Possible attacks (e.g., system security, data privacy) \end{itemize} \noindent \textit{Performance analysis:} \begin{itemize} \item Quantitative performance analysis \item Scalability analysis \item Security analysis of the assumed attacks \end{itemize} \subsection{Summary} \label{sec:summary} Witt \textit{et al.}~ established a generic fully decentralized FL framework utilizing federated knowledge distillation on 1-bit compressed label predictions of a public dataset to train the federation \cite{LW1_witt2021rewardbased}. The adjustment of the peer truth serum mechanism for the FL case allowed for informed-truthful signal elicitation as well as a fair and lightweight profit allocation among participants through a smart contract. Weng \textit{et al.}~ introduced a distributed, secure and fair deep learning framework named DeepChain \cite{LW2_Weng2021}. The introduced application-specific blockchain system in detail and implemented a prototype. Their incentive mechanism is novel yet lacks theoretical analysis. Kumar \textit{et al.}~ proposed a decentralized training framework on Ethereum, applying elastic weight consolidation against catastrophic forgetting and differential privacy as well as homomorphic encryption to enhance privacy. Yet, the framework lacks detail \cite{LW3_Kumar2020}. Zhang \textit{et al.}~ proposed a blockchain-based federated learning system for failure detection in IIoT \cite{LW4_FL_IIoT}. They apply centroid distance weighted federated averaging to get better results in non-iid environments and applied a smart contract based incentive mechanism. The experiments are conducted on real life data of AC machines. Zhao \textit{et al.}~ introduced a privacy preserving blockchain based federated learning for smart home systems. Data from IoT devices get collected with a smart phone before it gets sent to a mobile-edge computing server. They developed a novel normalization technique and reward participation based on the euclidean distance of the gradients. Bao \textit{et al.}~ propose a deposit- and peer-evaluation based FL framework called FLchain with privacy protection through masked gradients \cite{Bao2019FLChain}. The proposed system takes an on-chain strategy, storing all the information in the blockchain and aggregating model updates in the smart contract. Anyone can report misbehaviors to the smart contract, and FLchain checks its claim and penalizes dishonest workers if necessary.The participants gain profit by offering their model on a public marketplace. Martinez \textit{et al.}~ proposed an incentive-aware federated learning platform with blockchain \cite{Martinez2019}. They store gradients off-chain while its hashes are stored in the blockchain to save blockchain size. Reward is determined by data size used for training and given only when a model is improved. However, the data size and quality improved via training are based on ``self-report,'' meaning this method must rely on users' reports. They have implemented smart contracts using Hyperledger Fabric, while stating that they will reimplement it with the EOS blockchain. Toyoda \textit{et al.}~ proposed a competition-based approach to determine the winners of prizes by voting \cite{Toyoda2019, Toyoda2020}. The incentive mechanism is analyzed using contest theory under different risk assumptions (i.e. risk averse or risk neutral). Chai \textit{et al.}~ propose a FL framework with two aggregation layers for the IoV domain \cite{MH1_Chai2021}. The hierarchical structure promotes scalability. The incentive mechanism is designed as multi-player non-cooperative Stackelberg game. Blockchain technology is used to securely share the model weights between the hierarchy levels and to conduct the payment of rewards. Kang \textit{et al.}~ develop a multi-weight subjective logic for computing the participants' reputation scores which are key to their FL framework \cite{MH2_Kang2019}. For that, specific attack detection schemes are utilized for iid and non-iid scenarios (RONI, Fool's-Gold). Furthermore, the authors compare FL approaches that are based on Stackelberg games and contract theory. Ma \textit{et al.}~ develop a method for secure contribution measurement \cite{MH4_Ma2021}. Since the native way of computing Shapely value does not work on masked updates, Shapley values for groups of clients are determined. Furthermore, they integrate their method in a dezentralized FL framework and demonstrate the method's feasibility. Feng \textit{et al.}~ employ a framework based on two BC layers \cite{MH5_Lei2021}. They ensure scalability through BC sharding and device-to-device (D2D) communication. The design of contracts despite incomplete information is realized by information prediction through deep neural networks. \todo{@Kentaroh: This one maybe interesting for IM paragraph/table, since they somehow incoporate data augmentation:} Kansra \textit{et al.}~ integrate data augmentation into their framework to increase model accuracy \cite{MH6_Kansra2022}. At the same time, this additional task is the basis for their incentive mechanism. The participants have to complete two tasks: local model training and augmentation of their data. The augmented data sets are uploaded to the chain, pooled, and relayed to all edge nodes. Clients with better model updates compared to the competing nodes have to perform less data augmentation in the next training round and thereby save computation costs. Mungunthan \textit{et al.}~ propose a privacy-preserving and trust-less framework including a contribution scoring procedure that allows contribution measurement and thereby effective incentive design and prevention of malicious attacks \cite{MH7_Mugunthan2022}. Fadaeddini \textit{et al.}~ employs a Stellar-based framework \cite{MH8_Fadaeddini2019}. The incentive mechanism requires customers to pay higher participation fees if they have engaged in malicious behavior previously. The payment is conducted using an internal currency, malicious behavior is detected by validators who test the submitted models on a not further specified test set. \todo{@Kentaroh: This one maybe interesting for IM paragraph/table, see group chat:} He \textit{et al.}~ propose a flexible framework for horizontal and vertical FL \cite{MH9_He2021}. An incentive mechanism is designed that independently rewards maintaining the blockchain, participating in FL, and contributing high-quality data to FL. For the latter, each participant's contribution is determined in multiple steps, including (1.) a pre-filtering based on the Euclidean distance between the model update and the mean of all model updates, and (2.) the computation of the Shapley value. \todo{@Leon: This one maybe interesting for blockchain paragraph/table, since own Consensus Mechanism:} Qu \textit{et al.}~ introduce decentralized, federated learning to offloading decision making with deep neural networks \cite{MH10_Qu2021}. They develop a consensus mechanism that is more efficient than PoW and in addition prevents poisoning attacks by incorporating the "average reward value" of the local offloading decision model. \todo{@Leon: This one maybe interesting for blockchain paragraph/table, since use of both private and public:} Desai \textit{et al.}~ develop a hybrid blockchain-based FL framework that combines a private and a public blockchain to prevent backdoor attacks\cite{MH11_Desai2021}. By introducing accountability and a penalty mechanism, malicious agents can be detected and punished a posteriori once a backdoor is identified. The two employed blockchain types compensate each others weaknesses: The aggregation calculations are conducted on the lower-latency private blockchain, whereas the public blockchain is used for payment processing and ensures accountability through public parameter storage. Zhu \textit{et al.}~ incorporate secure multi-party aggregation into their framework for privacy-preserving federated learning \cite{MH12_Zhu2021}. Furthermore, they evaluate the performance and privacy-preserving property of their architecture in experiments with up to 900 participants. Li \textit{et al.}~ propose a federated learning framework for crowd computing \cite{MH13_Li2020}. In each FL round, only the best few model updates are considered for aggregation. To identify these, a scoring evaluation mechanism based on model accuracy, training data size, and reputation is developed. Furthermore, Elgamal-based encryption promotes data privacy. Rathore \textit{et al.}~ develop and test a blockchain-based FLF for the IoT domain, where the computationally intense model aggregation and mining tasks are performed by edge servers, whereas the IoT devices only participate in local model training and do not serve as blockchain miners or aggregators \cite{MH14_Rathore2019}. Hu \textit{et al.}~ proposed a blockchain-enabled federated learning for mobile crowdsensing. Sensing data are collected by users and sent to edge servers for training. The edge servers collaboratively train a model with FL. The authors formulated utilities of users and edge servers, which considers payoffs and the cost of sensing and privacy leakage, and derived their optimal strategies by maximizing the utilities. A consortium blockchain is used to enable FL among edge servers. \todo{insert citation here please} Wang \textit{et al.}~ proposed a blockchain-based FL architecture for UAVs to securely exchange local model updates and verify contributions without a central server. They also propose a privacy-preserving algorithm with differential privacy to protect UAVs' privacy of updated local models. A two-tier reinforcement learning-based incentive mechanism is designed to promote UAVs' high-quality model sharing when explicit knowledge of network parameters are not available in practice.\todo{insert citation here please} ur Rehman \textit{et al.}~ proposed a three-tier fine-grained FL architecture. The architecture enables to perform FL on-device, on-edge, and on-cloud. The public Ethereum blockchain is used to manage users' reputation scores.\todo{insert citation here please} Qu \textit{et al.}~ propsoed a new consensus algorithm for blockchain called proof of federated learning (PoFL). Two approaches, namely a reversed game-based trading mechanism and privacy-preserving model verification, are proposed to enable model performance verification without privacy concerns.\todo{insert citation here please} Zhang \textit{et al.}~ introduced Refiner, an incentive-driven FL system on blockchain to enable massive engagement in FL \cite{LW10_refiner}. The system comprises of a registry contract and a task contract, where requesters start a round, Workers train the models and validators audit the workers contribution. Jiang and Wu introduced a reward-response Stackelberg game in blockchain-powered FL \cite{LW11_RewardResponseGame}. They analyzed the game-theoretic properties for both, size-based and accuracy-based contributions of workers while taking client-sided upload times into consideration. Rahmadika \textit{et al.}~ introduced a novel privacy-aware collaborative learning framework for the decentralized cross-silo FL \cite{LW12_Rahmadika2021_unlinkable}. Implemented using the Ethereum Virtual Machine (EVM), their framework allows for unlinkable and untraceable transactions utilizing ring-signatures. The paper conducted a thorough Ethereum-gas analysis of their implementation. A reward system is mentioned yet not specified. Habib ur Rehman \textit{et al.}~ introduced a reputation aware framework for fine-grained FL, where reputation scores are stored on the blockchain \cite{TowardsReputationINFOCOMM}. The framework is introduced only a generic concept, the reputation calculation is not specified in detail and the framework lacks validation through experiments. . \section{Challenges in Comparing FLF} \section{Discussion} \label{sec:discussion} \paragraph{RQ 5} \textit{What are major limitations and research gaps of contemporary works? What are future directions to enable decentral and incentivized collaborative learning for mass adoption?} The preceding analysis of the papers in terms of the FL framework, the use of blockchain, the design of an incentive mechanism, and the conduct of experiments has yielded four findings. ({\textit{i}})\xspace The existing research is characterized by significant \textbf{heterogeneity} in various dimensions. Through our definition of 26 characteristics, we attempt to bring structure to this heterogeneity and better expose the differences and similarities among existing frameworks. ({\textit{ii}})\xspace In some of the categories, competing solutions exist with different tradeoffs. When designing a framework, a choice must be made here, which we seek to support by briefly outlining these tradeoffs below. ({\textit{iii}})\xspace Some recurring approach-related and methodological shortcomings exist, the avoidance of which would further improve future research. ({\textit{iv}})\xspace Beyond better understanding the aforementioned trade-offs, there are a number of unresolved issues waiting to be addressed by future research. \subsection{Heterogeneity of Existing Work} This work identified heterogeneity of FLF in the four dimensions, namely ({\textit{i}})\xspace application, ({\textit{ii}})\xspace overall design, ({\textit{iii}})\xspace special focus on open issues and ({\textit{iv}})\xspace details and thoroughness. In order to overcome this challenge, we categorize the FLF characteristics into general characteristics, blockchain-related characteristics, incentive mechanism-related characteristics, and experiment-related characteristics (Table~\ref{tab:columns_definition}) \textbf{Application} Although the majority of analyzed works offered application independent frameworks (classified as generic in table~\ref{table:FL}) other FLF are applied across IoT, IIoT, IoV and Finance. The heterogeneity of the required properties across those domains lead to vast differences in the design choices of function, operations and storage of blockchain, contribution measurement and privacy requirements. \textbf{Variety of possible design choices} In addition to the domain specific influence on the design choice, design choices about the FL algorithms, communication protocol, applications of blockchain within the ecosystem, blockchain technology (existing or novel), storage and operation on blockchain, security trade-offs, mechanism design, contribution measurement, etc. add to the complexity and overall variety of such systems. For example, some works apply blockchain at its outer complementary layer \cite{} while blockchain being the core infrastructure to coordinate, store, aggregate and payment in other FLFs \cite{LW1_witt2021rewardbased, LW10_refiner}. Furthermore, some works developed application specific blockchain systems, while others try to embed an FLF on top of existing blockchain frameworks such as Ethereum for cheaper and pragmatic deployment. Our survey exposes a similar variety in the choice of the contribution measurement: The spectrum reaches from computationally light-weight correlation of answers on a public dataset \cite{LW1_witt2021rewardbased} as a proxy for contribution as apposed to the Shapley value, a measurement with strong theoretical properties at the cost of massive computational overhead \cite{LW9_FedCoin,MH9_He2021}. \textbf{Special Focus} The aforementioned complexity as well as its novelty result in many open issues across a broad spectrum. Many works therefore focus on solving specific issues such as enhanced privacy \cite{LW2_Weng2021, LW8_Privacy_IoV,LW12_Rahmadika2021_unlinkable, MH8_Fadaeddini2019}, a novel blockchain systems \cite{LW4_FL_IIoT,LW9_FedCoin}, bandwidth reduction \cite{}, novel contribution measurements \cite{LW1_witt2021rewardbased, LW9_FedCoin, MH10_Qu2021} or game theory (e.g. \cite{MH2_Kang2019, LW11_RewardResponseGame}), as the major contribution which further complicates a comparison of the holistically of FLF.\todo{@Kentaroh: Please insert some examples from your papers whith a very specialized focus on a certain issue} \textbf{Thoroughness} The analyzed papers also vary heavily in provided detail and thoroughness, ranging from first concepts, lacking details in terms of important specifications such as performance, specific function, operation and storage on blockchain, contribution measurement, robustness, experiments and privacy to theoretically detailed and experimentally tested solutions. None of the analyzed papers are production-ready. These varieties emphasize the additional layer of complexity when quantifying differences. \subsection{Design choices under trade-offs} The following design choices in developing an FLF are characterized by particularly high-impact tradeoffs. \subsubsection{Blockchain: Decentralization vs Scalability} yet particularly influential on the overall scalability. The scalability is determined by ({\textit{i}})\xspace the function of blockchain in the FLF, ({\textit{ii}})\xspace operations performed onchain, ({\textit{iii}})\xspace blockchain framework and ({\textit{iv}})\xspace the amount of storage onchain. In particular, blockchain becomes a scalability bottleneck \begin{enumerate} \item if it is part of the operating core infrastructure of the FLF (e.g. \cite{LW1_witt2021rewardbased}) and not only a complementary outer layer technology (e.g. \cite{LW7_Zhang_Reputation}) \item if heavy operations such as aggregation or reward calculation is performed on-chain \cite{LW9_FedCoin} \item if the Blockchain framework is public and used outside the realm of the FLF or the consensus mechanism is based on resource-intense Proof of Work \item if heavy amount of information are stored on the blockchain such as model updates \end{enumerate} Blockchain enables trust, immutability and decentralization for the operations and the information stored on it, yet come at the cost of low performance and limited scalability. \subsubsection{Contribution Measurement: Assumption vs Correctness} Measuring workers' contribution is open research and vary heavily in the analyzed literature. Ranging from assuming full information, where the rewards are basically distributed based on the workers report of the amount of data or local accuracy towards report-correlations, reputation and Shapley Value. These metrices range from no calculation (full information case) to accuracy measures based on a test-set to heavy calculations such as Shapley-value. The Shapley value of cooperative game theory is a common method to measure the contribution of an agent in FL due to it's desired properties of efficiency, symmetry, linearity and null-player, yet come at the cost of heavy computational overhead, limiting the scalability of the framework. \todo{Kentaroh can you check this please?} \subsubsection{Privacy Protection: Security vs. Accuracy/Overhead} Despite FL being a data privacy preserving technology by design, research has shown that certain characteristics of the underlying training data sets can be inferred from the global model and that additional privacy preserving measures are recommended. Our review shows that two classes of security concerns are targeted by the publications: leakage of data set characteristics and disclosure of participant identities. Although a substantial number of papers (20 out of 40 publications) addresses one of these concerns, only a single paper adresses both~\cite{LW8_Privacy_IoV}. Moreover, especially preventing data set leakage through DP or MPC inflicts tradeoffs. Differential privacy comes with a trade-off between data security and model accuracy, and secure multi-party computing can establish data security according to high cryptographic standards, but requires more expensive computations and might thus not be applicable with a large number of participants~\cite{MH4_Ma2021}. On the contrary, Bonawitz~\textit{et al.}~~\cite{MH_SECURE_AGG} point out that some MPC algorithms have become more computationally efficient and can be applied with hundreds of users. \subsubsection{Complexity Trade-off} FLF specific blockchain systems claim to solve important shortcomings of existing blockchain frameworks, e.g. replacing the computational overhead of the Proof of Work systems with computational heavy tasks in FLF like model parameter \cite{KT08_Qu2021TPDS} or reputation verification \cite{LW7_Zhang_Reputation} or calculate the contribution measurement \cite{LW9_FedCoin}. Other FLF specific blockchain systems utilize efficient AI hardware \cite{KT09_Zhang2021IJHPSA} or enhance the overall privacy for the FLF processes \cite{LW2_Weng2021} . Yet in the scientific literature widely ignored topic is the incurred deployment and maintenance cost of unproven novel blockchain systems in practice. Introducing a new, highly complex infrastructure unproven of practical introduces security risks and requires a large team of experts to run and maintain such a system in practice. Deployment on already existing blockchain frameworks may mitigate the additional complexity and risks. \subsubsection{Assumptions: Realism vs Pragmatism} \todo{@Kenraroh} \subsection{Common shortcomings} Future researching efforts would be further improved by a stronger focus on the following recurring approach-related and methodological shortcomings that were observed in this systematic literature review. \subsubsection{Unrealistic Assumption} Complete information: Measurement of \todo{@kentaroh} \subsubsection{Limited Scalability consideration} One of the major factors of the applicability of a FLF is its ability to scale beyond small groups towards mass adoption. Out of the 40~ papers, only 6 explicitly mentioned and considered scalability within the design of their respective FLF. \subsubsection{Lack of Specification} As shown in Tables~\ref{table:FL}-\ref{table:experiments}, certain FLF properties are particularly prone to being specified only superficially. These include, in particular, the targeted FL setting, the exact implementation of the blockchain, the metrics of contribution measurements, and the FL algorithm used. To ensure the traceability and usability of the frameworks, careful specification should be made here. \subsubsection{Performance of the FLF} The overall objective of FL is to capitalize on untapped confidential data-silos to increase the performance of a global model to the mutual benefit of all participants. Yet, 11 out of 40 works did not consider the performance of the respective Framework. In order to have a meaningful performance measure, experiments on the FLF have to go beyond Classification (29 out of 32) of simple MNIST/FMNIST (20 out of 29 Classification tasks) towards a broader variety of different ML task such as NLP and user behavior analytics. In order to simulate a realistic environment, various levels of non-iid behavior and has to be taken into consideration into the performance measurement. Yet, out of 34 only 11 works have considered non-iid behaviour. \subsubsection{Mismatch Between Proposed FLF and Experiments} The experiments should demonstrate the feasibility of the framework in the best possible way. In addition to the aforementioned fact that very simple benchmark datasets are often used, the following mismatches stand out. First, the majority of publications (18 out of 33 papers with experiments) do not implement an actual blockchain in their experiments although proposed in their framework. There is a risk that scalability, cost and effort issues are underestimated. Furthermore, inconsistencies between the targeted FL setting (cross-silo, cross-device) and the number of clients in the experiments are observed. Especially, paper that propose cross-device frameworks tend to use or simulate an insufficient number of participating devices. Among the cross-device frameworks, only Kang~\textit{et al.}~~\cite{MH2_Kang2019} and Desai~\textit{et al.}~\cite{MH11_Desai2021} conduct experiments with 100 participants or more (\tablename~\ref{table:experiments}). \subsection{Future Research Suggestions} Future research should not only focus on better understanding the aforementioned trade-offs (e.g., contribution measurement), but should also be concerned with solving the following open research gaps and exploring the following new ideas in the field. 1.) Scalability has to be explored in greater detail. 2.) Trade-off between contribution measurement and the privacy of the user Even a theoretical analysis of the designed incentive mechanisms, as performed by 12 out of 40 papers, might not guarantee the robustness of the mechanisms. Specifically, as workers are humans, they may not follow their optimal strategies derived by analysis. For instance, not all the workers would take into account the cost of energy consumption when determining their strategies. Hence, it would be nice to take into account humans' behavioral bias into theoretical analysis. The prospect theory incorporates such bias into utility and probability calculation \cite{Kahneman1979, Tversky1992} and could be integrated with the FL incentive mechanism. This would result in more realistic workers' behavior as well as requesters' optimal reward allocation. \textcolor{red}{Another open research question is the application of FL to more machine learning tasks beyond supervised learning~\cite{FedProx}. Especially in domains such as natural language processing or user behavior analytics, unsupervised learning tasks rely on more complex neural network architectures. These might require new or adapted model aggregation algorithms that might come with new implications on the incentive design and blockchain integration.} Furthermore, we expect the application area of decentralized and incentivized FL to expand beyond the IoT and IoV domain, e.g., into the biomedical field. More generally, the technology is expected to become relevant to every domain where data is maintained separately but the data holders would benefit of joint ML model training. These novel use cases will bring further domain-specific challenges, e.g., with respect to data privacy requirements. \textcolor{red}{Li~\textit{et al.}~~\cite{FedProx} pointed out the issue of asynchronous communication. Currently, most frameworks assume a constant availability of the devices for participating in the FL task. Some frameworks are even designed to exclude participants from the entire FL process if they do not respond timely. However, more realistic scenarios have to be considered where the devices only pull tasks when their computational workload permits.} \section{Future Research Directions} \label{sec:future_research_directions} We discuss possible future research directions towards mass adoption of FLFs. We raise six promising research directions for blockchain, incentive mechanism and FL. \subsection{Blockchain} \subsubsection{Towards better scalability} One of the major factors of the applicability of a FLF is its ability to scale beyond small groups towards mass adoption. Out of the 40~ papers, only 6 mentioned and considered scalability within the design of their respective FLF. Blockchain offers trust, immutability and decentralization for the operations and the information stored on it, yet is particularly influential on the overall scalability. The scalability is determined by ({\textit{i}})\xspace the function of blockchain in the FLF, ({\textit{ii}})\xspace operations performed onchain, ({\textit{iii}})\xspace blockchain framework and ({\textit{iv}})\xspace the amount of storage onchain. Blockchain becomes a scalability bottleneck \begin{enumerate} \item if it is part of the operating core infrastructure of the FLF (e.g. \cite{LW1_witt2021rewardbased}) and not only a complementary outer layer technology (e.g. \cite{LW7_Zhang_Reputation}) \item if heavy operations such as aggregation or reward calculation are performed on-chain \cite{LW9_FedCoin} \item if the blockchain framework is public and used outside the realm of the FLF or the consensus mechanism is resource-intense (Proof of Work) \item if heavy amount of information are stored on the blockchain such as model updates \end{enumerate} A promising future research direction is the application of Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (ZK-SNARKs)\cite{Pinto2020zkSNARKs} in the FLF context. ZK-SNARKs is a promising cryptographic technology that allows a \textit{prover} to prove to a \textit{verifier} that a computation has has been executed without revealing the program itself. As verification can be fast and easily done on the smart contract, it might improve the scalability of blockchain-enabled FLF dramatically. \subsubsection{Thorough complexity analysis} FLF specific blockchain systems claim to solve important shortcomings of existing blockchain frameworks, e.g. replacing the computational overhead of the Proof of Work systems with computational heavy tasks in FLF like model parameter \cite{KT08_Qu2021TPDS} or reputation verification \cite{LW7_Zhang_Reputation} or calculate the contribution measurement \cite{LW9_FedCoin}. Other FLF specific blockchain systems utilize efficient AI hardware \cite{KT09_Zhang2021IJHPSA} or enhance the overall privacy for the FLF processes \cite{LW2_Weng2021}. Yet a widely ignored topic in the scientific literature is the incurred deployment and maintenance cost of unproven novel blockchain systems in practice. Introducing a new, highly complex infrastructure introduces security risks and requires a large team of experts to run and maintain such a system in practice. Deployment on already existing blockchain frameworks may mitigate the additional complexity and risks but might be less efficient. Developing simple and robust application specific blockchain systems, stress-testing them under realistic assumptions and thoroughly analysing their theoretical properties is an important future research direction towards production-ready FLFs. \subsection{Incentive Mechanisms} \subsubsection{Realistic and computational feasible contribution measurement} Measuring workers' contribution is open research and varies heavily in the analyzed literature. So far, five major contribution measurements are considered in the literature. \begin{enumerate} \item \textbf{Honest Report/Full Information} rewards are calculated on the basis of the clients report of the amount of data, local accuracy or local loss. Yet reward systems based on such simplified assumptions may not be applicable in any real-world scenario as the dominant strategy for an individual-rational agent is dishonest behavior (report the best possible outcome without costly model-training). Applying Trusted Execution Environments might solve the issue, yet might be an infeasible technical requirement for mobile, edge or IoT devices. \item \textbf{Reputation systems} Reward mechanisms based on the clients' reputation or majority voting are an interesting research avenue, promising to relax heavy verification and control mechanics for high reputation clients. How to quantify the reputation in a fair and robust fashion remains open research. \item \textbf{Direct Measures} Direct Measurement such as assessing each client's model update on a public dataset/testset requires ({\textit{i}})\xspace a trusted cetral authority performing such tests and ({\textit{ii}})\xspace limits scalability due to the computational overhead. \item \textbf{Exact Measures} The Shapley value of cooperative game theory is a common method for measuring the contribution of an agent in FL due to it's desired properties of efficiency, symmetry, linearity and null-player, yet comes at the cost of heavy computational overhead (even when optimized \cite{shapleyeval, wang2020principled}) limiting the scalability of the framework and questioning the practicability of this approach. \item \textbf{Correlation based Measures} Without having access to the ground truth, the reward is calculated based upon the correlation of the reported signals of peers. This implicit approach does not require an explicit contribution measurement and therefore avoids computational overhead. \end{enumerate} Correlation based reward mechanisms such as Correlated Agreement (CA) \cite{LIU_CA, CA_HONGTAO} or Peer-Truth Serum \cite{LW1_witt2021rewardbased} are an interesting future research direction because their lightweight computation allows for potential execution atop of blockchain. \subsubsection{Realistic clients' behavior} Theoretical analysis of the designed incentive mechanisms, as performed by 12 out of 40 papers, requires simplifications and assumptions with respect to ({\textit{i}})\xspace information availability ({\textit{ii}})\xspace uniformity in utility functions or ({\textit{iii}})\xspace individual rationality which might not guarantee the robustness of the mechanisms in a real-world scenario. Specifically, as clients are humans, they may not follow their optimal strategies derived by analysis. For instance, not all clients would take the cost of energy consumption into account when determining their strategies. We suggest taking humans' behavioral bias (e.g. prospect theory \cite{Kahneman1979, Tversky1992}) as well as non-quantifiable measures (e.g. utility of privacy) into the theoretical analysis of incentive mechanisms. \subsection{Federated Learning} \subsubsection{Performance evaluation under realistic conditions} While many papers conducted performance evaluation, they often did not consider realistic scenarios: ({\textit{i}})\xspace rather well-known benchmark datasets such as MNNIST and CIFAR-10 are chosen (29 out of 34\footnote{6 papers out of 40 did not run experiments} experiments on classification) and ({\textit{ii}})\xspace the non-IID setting is only applied in 11 out of 34 papers. Furthermore, inconsistencies between the targeted FL setting (i.e. CS, CD) and number of clients in the experiments are observed. In particular, FLFs that assume CD should simulate a large number of clients, however, only Kang~\textit{et al.}~~\cite{MH2_Kang2019} and Desai~\textit{et al.}~\cite{MH11_Desai2021} conducted experiments with 100 participants or more (\tablename~\ref{table:experiments}). To better evaluate FLFs, we suggest using datasets dedicated to FL (e.g. LEAF~\cite{Caldas2018LEAF}) as well as simulating different levels of non-IID data among clients (e.g., Dirichlet distribution \cite{LW1_witt2021rewardbased}). Deployment on clusters of inexpensive computers such as Raspberry Pi \cite{wang2021raspberrypi} might realistically simulate large-scale FL scenarios under the CD assumption. \subsubsection{Beyond supervised FL and Federated Averaging} Another open research domain is the application of FLFs to machine learning tasks beyond supervised learning: tasks such as natural language processing, user behavior analytics or unsupervised learning tasks might rely on more complex neural network architectures. This in turn might require new or adapted model aggregation algorithms that might come with new implications for the incentive design and blockchain integration. In addition, assuming heterogeneity of clients with different hardware and restrictions requires flexibility on the Neural Network choice (e.g., Federated Knowledge Distillation \cite{LW1_witt2021rewardbased}). \subsubsection{Towards lightweight privacy-preserving FL} Despite FL being a data privacy preserving technology by design, research has shown that certain characteristics of the underlying training data sets can be inferred from the global model and that additional privacy preserving measures are recommended. Our review shows that two classes of security concerns are targeted by the publications, namely (i) leakage of data set characteristics and (ii) disclosure of participant identities. Although a substantial number of papers (20 out of 40 publications) address one of these concerns, only a single paper addresses both~\cite{LW8_Privacy_IoV}. Moreover, preventing data set leakage through DP or MPC inflicts trade-offs. Specifically, DP comes with a trade-off between data security and model accuracy, while MPC comes with a trade-off between data security and computation complexity, and it might thus not be applicable with a large number of participants~\cite{MH4_Ma2021}. It is worth noting that the model accuracy of DP cannot be inherently improved due to intentionally added noise. Hence, it would be important to explore lightweight MPC algorithms \cite{MH_SECURE_AGG} to accommodate a large number of clients for privacy-preserving FL. \section{Conclusion and Outlook} \label{sec:conclusion} FL is a promising new AI paradigm, focused on confidential and parallel model training on the edge. In order to apply FL beyond small groups of entrusted entities, a decentralization of power as well as compensation for participating clients has to be incorporated into the Federated Learning Framework. This work traversed and analyzed 12 leading scientific databases for incentivized and decentralized FLFs based on the PRISM methodology, ensuring transparency and reproducibility. 422~ results were found and 40~ works analyzed in-depth after three filtering rounds. We overcame the challenge of heterogeneity of FLFs in terms of use-cases, applied focus, design choice and thoroughness by offering a comprehensive and holistic comparison framework. By exposing limitations of existing FLFs and providing directions for future research, this work aims to enhance the proliferation of incentivized and decentralized FL in practice. \section*{Acknowledgments} \else \section*{Acknowledgment} \fi This work was supported in part by KAKENHI from MEXT/JSPS, Japan, under Grant 18K18162 and in part by the German Federal Ministry of Education and Research (BMBF) through the BIFOLD - Berlin Institute for the Foundations of Learning and Data (ref. 01IS18025A and ref. 01IS18037I) and the European Union’s Horizon 2020 Research and innovation Programme under Grant Agreement No. 957059. \ifCLASSOPTIONcaptionsoff \newpage \fi \end{comment} \bibliographystyle{IEEEtran} \section{Introduction}\label{sec:introduction}} \IEEEPARstart{C}{entralized} platforms in the domains of search-engines, mobile applications, social-media, chat, music and retail have been dominating the respective industries over the past decades. Business models where digital services are exchanged for user data have developed into high-revenue industries where a few single entities control the global market within the respective domains \cite{GAFAM}. The resulting concentration of user data in a small number of entities, however, poses problems such as the risk of privacy data leaks~\cite{Wheatley.2016} or an increasing power imbalance in favor of market-dominating parties~\cite{GAFAMpower,GAFAM,Santesteban.2020} which has caused policymakers to enhance data protection for individuals \cite{EUdataregulations2018}. The need for confidential AI goes beyond B2C markets, e.g. where entities within the health sector or IoT based industries are prohibited from collaborating on a shared AI model due to sensitive data. A promising solution that enables the training of machine learning models with improved data security is \textit{Federated Learning} (FL). In FL, complex models such as \textit{Deep Neural Networks} (DNNs) are trained in a parallel and distributed fashion on multiple end devices with the training data remaining local at all times. \textit{Federated Averaging} (\texttt{FedAvg}) \cite{BrendanMcMahan2017} is a widely applied algorithm for FL, where a central authority aggregates a global model from the locally trained models in an iterative process. In theory, FL not only makes previously withheld sensitive data accessible to the machine learning process, but also enables efficient training by taking advantage of the ever-increasing computational power of IoT and mobile devices. Therefore, the technology has the potential to disrupt the contemporary, centralized DNN learning approach towards a decentralized, fair and power-balanced paradigm. Yet, beyond technical issues, two major design problems remain unsolved: (i) The star topology of FL introduces the risk for single point of failure as well as authority abuse and prohibits use-cases where equal power among participants is a mandatory requirement and (ii) the lack of a practical reward system for contributions of participants hinder this technology from scaling beyond small groups of already entrusted entities towards mass adoption. Although there exist many proposals of \textit{Incentivized and Decentralized Federated Learning Frameworks} (FLFs), we have not yet seen any full-fledged production-level FLF. To enhance the development towards production-readiness, we took on the challenging task of comparing state-of-the-art solutions despite their heterogeneity in terms of assumptions, use-cases, design choices, special focus and thoroughness by providing a general and holistic comparison framework. Yet, since deep domain knowledge is required in a variety of fields, e.g. in blockchain design pattern, game theory, decentralized learning, and security \& privacy, we aim to explain concepts concisely to make it easier for experts in a specific domain to follow along. Specifically, we undertake a \textit{Systematic Literature Review} (SLR) examining all relevant articles from twelve scientific databases in the domain of computer science. 422~ results were queried, filtered and examined for relevant articles from these databases, resulting in 40~ papers remaining after three filtering steps. To the best of our knowledge, this is the first comprehensive survey on the design of both decentralized and incentivized federated AI systems. The contribution of this paper is three-fold: \begin{enumerate} \item The first comprehensive systematic survey study on the combined topic of decentralized and incentivized Federated Learning based on the standardized Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) process, ensuring transparency and reproducibility. \item A novel comparison framework for an in-depth analysis of incentivized and decentralized FL frameworks which goes beyond existing survey papers by (i) pointing out the limitations and assumptions of the chosen game-theoretic approaches, (ii) analyzing the existing solutions based on computational and storage overhead on the blockchain, and (iii) an in-depth analysis of the performed experiments. \item Based on the rating and clustering, we have clarified trade-offs in design choices, identified limitations and derived future research directions of decentralized and incentivized FLFs. \end{enumerate} The remainder of this paper is structured as follows. In Section~\ref{sec:background}, we concisely present the technical background of distributed ledger technology and mechanism design in FL systems. In Section~\ref{sec:method}, we outline our detailed research questions and introduce our methodology to answer these by conducting a structured literature review. Furthermore, contemporary shortcomings of FLFs are discussed and the SLR is undertaken. Section~\ref{sec:results} summarizes the findings and answers the research questions with respect to general applications of the FLFs, Blockchain features, incentive mechanisms and experiments. We derive limitations and further research directions in Section~\ref{sec:future_research_directions}. Finally, Section~\ref{sec:conclusion} concludes this literature review. \section{Preliminaries} \label{sec:background} The following sections briefly discuss the fundamentals of FL, distributed ledger technology, and mechanism design. \subsection{Federated Learning}\label{Federated Learning} Federated Learning is a machine learning technique where multiple actors collaboratively train a joint machine learning model locally and in parallel, such that the individual training data does not leave the device. This decentralized approach to machine learning was first introduced by Google in 2016~\cite{BrendanMcMahan2017} and addresses two key issues of machine learning: (1) The high computational effort for model training is relocated from a single central actor to a network of data-owning training devices. (2) Since the training data remains on the edge devices, previously inaccessible data sets of privacy-concerned actors can be integrated into the training process. Thus, ''data islands'' are prevented. \par The \textit{Federated Averaging} (\texttt{FedAvg}) algorithm~\cite{BrendanMcMahan2017} is a widely adopted optimization algorithm, where the calculated local gradients get aggregated and the data stays confidential at all times. The objective is to minimize the empirical risk of the global model $\theta$, i.e., \begin{equation} \arg\min_{\boldsymbol{\theta}} \sum_{i} \frac{|S_i|}{|S|} f_{i}(\boldsymbol{\theta}) \label{Eq:Optimization} \end{equation} where for each agent $i$, $f_{i}$ represents the loss function, $S_i$ is the set of indexes of data points on each client and $S:=\bigcup_{i} S_i$ is the combined set of indexes of data points of all participants. The most common algorithmic approach to FL problems is Federated Averaging, where the training process is conducted in three communication rounds. First, a central server broadcasts a first model initialization $\theta_{init}$ to a subset of participating clients. Second, these clients individually perform iterations of stochastic gradient descent over their local data to improve their respective local models $\theta_{i}$ on each client. Finally, in order to create a global model $\theta$, all individual models $\theta_{i}$ are then send back to the server, where they are aggregated (e.g. by an averaging operation). This global model is used as the initialization point for the next communication round. Optimization algorithms for the FL case are open research \cite{AdvancesAndOpenProblemsInFederatedLearning} and variations of \texttt{FedAvg} exist, e.g. FedBoost~\cite{Fedboost}, FedProx~\cite{FedProx}, FedNova~\cite{FedNova}, FedSTC~\cite{SatTNNLS20} and FetchSGD~\cite{fetchSGD}. Note that the FL setting can range from a few collaborating entities (cross-silo) to a federated system of millions of devices (cross-device). \subsection{Blockchain: A Distributed Ledger Technology} A distributed ledger kept by nodes in a peer-to-peer network is referred to as blockchain, first invented by Satoshi Nakamoto through Bitcoin in 2008\cite{nakamoto2008bitcoin}. Cryptographic connections of information enable resistance to alteration and immutability. A peer-to-peer consensus mechanism governs the network, obviating the requirement for central coordination \cite{8693657}. The introduction of general-purpose blockchains with smart contract capability that supports Turing-completeness \cite{wood2014ethereum} has allowed for the creation of decentralized, immutable, and transparent business logic on top of the blockchain. Due to its intrinsic features, this technology is capable of mitigating open issues in the FL context, namely: \begin{enumerate} \item \textbf{Decentralization.} Workers are subject to a power imbalance and a single point of failure in server-worker topologies. A malicious server might refuse to pay reward payments or exclude employees at will. Furthermore, a server-worker architecture is incompatible with a situation in which numerous entities have a shared and equal stake in the advancement of their respective models. Blockchain technologies' decentralization provides a federal system for entities of equal authority without the need for a central server. \item \textbf{Transparency and Immutability.} Data on the blockchain can only be updated, not erased, because every peer in the system shares the same data. In a FL environment, a clear and immutable reward system ensures worker trust. On the other side, each client is audited, and as a result, can be held accountable for malevolent activity. \item \textbf{Cryptocurrency.} Many general-purpose blockchain systems include cryptocurrency capabilities, such as the ability to incorporate payment schemes within the smart contract's business logic. Workers can be rewarded instantly, automatically, and deterministically based on the FL system's reward mechanism. \end{enumerate} \textbf{Blockchain to ensure equal power.} General purpose blockchain systems \cite{wood2014ethereum,polkadotwhitepaper, HyperledgerFabric} have the potential to mitigate the first issue of FL by ensuring trust through their inherent properties of immutability and transparency of a distributed ledger, thereby enabling decentralized federations to mitigate dependencies on a central authority. \subsection{Incentive Mechanism} \label{sec:mechanism_design} In an environment where it is of utmost importance that pseudo-anonymous clients participate in the FL process, a fair incentive mechanism is required for any realistic setting. However, the question here is how to design a good incentive mechanism. Simply giving a fixed amount of reward to each worker would not work well as any worker can obtain rewards without doing model updates. A key to answer this question is mechanism design (MD), which is a field of economics and attempts implementing a protocol, system, or rule so that a desired situation (e.g. every participant contributes informed truthful model updates) is realized in a strategic setting, assuming that each participant acts rationally in a game theoretic sense \cite{nisan2007introduction}. The purpose of incorporating MD into FL is to incentivize clients to ({\textit{i}})\xspace put actual effort into obtaining real and high quality signals (i.e. training the model on local data) and ({\textit{ii}})\xspace submit truthfully, without the explicit ability to directly monitor the clients' behavior. As also mentioned in the previous section, such incentives can be distributed using blockchain's cryptocurrencies. An appropriately designed mechanism ensures a desired equilibrium when every worker acts rationally and in its own best interest. Such a mechanism has low complexity and is self-organizing, avoiding the need for Trusted Execution Environments (TEE) \cite{TXX} or secure multi-party computation, yet makes assumptions about the degree of information available. The process of designing a FL protocol with MD consists of ({\textit{i}})\xspace designing a mechanism and ({\textit{ii}})\xspace theoretical analysis. The former determines the whole procedure of FL including a reward policy (i.e. how to distribute rewards). A myriad of reward design choices exist: whether rewards should be given to the top contributor (i.e. winner-takes-all) or multiple workers and whether rewards should be unequally distributed based on their contribution or equally distributed. When contribution needs to be measured to determine the amount of prizes, this demands a carefully designed reward strategy based on the quality of contributions. Yet, comparing and evaluating workers gradient-updates of \texttt{FedAvg} remains challenging \cite{9367484}. A game-theoretic analysis is required to ensure that the designed protocol works as planned. Such an approach helps to design a mechanism where the best strategy for all workers leads to a stable equilibrium intended by the system designer. Section~\ref{sec:results_incentive_mechanism} discusses how FLFs apply mechanism design and how contributions are measured. \section{Method of Literature Review} \label{sec:method} The goal of the following systematic literature review is the identification of decentralized collaborative learning solutions where participation is rewarded. The aim of this study is not only to summarize all major publications, but also to extend the research by having a guideline for current and future practitioners. We refer the reader for a comparison of this paper to related surveys to the Supplementary Materials 1. Relevant publications are retrieved, filtered, and selected by a methodical procedure. The procedure is inspired by the \textit{Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA)} methodology~\cite{moher2015preferred}. PRISMA helps authors to improve the reporting of reviews. Within this work, the PRISMA methodology is augmented with the guide for information systems proposed by Okoli~\textit{et al.}~ and Kitchenham~\textit{et al.}~~\cite{okoli2010guide, kitchenham2004procedures}. The guidelines are a structured approach to conduct a systematic literature review. They consist of five core steps: ({\textit{i}})\xspace defining research questions, ({\textit{ii}})\xspace searching for literature, ({\textit{iii}})\xspace screening, ({\textit{iv}})\xspace reviewing, ({\textit{v}})\xspace selecting and documenting relevant publication and extracting relevant information. The corresponding flow diagram of the conducted SLR is illustrated in \figurename~\ref{fig:tikz:prisma-diagram}. \subsection{Research Questions} The review and selection of relevant literature is conducted for extracting, preparing, and summarizing relevant information for future researchers. The scope of relevant information is described and limited by five corresponding research questions. \begin{enumerate \item[RQ1] Overview: ({\textit{i}})\xspace What are possible applications of FLF? ({\textit{ii}})\xspace What problems were solved? ({\textit{iii}})\xspace Across which dimensions are the FLF papers heterogeneous? \item[RQ2] Blockchain: ({\textit{i}})\xspace What is the underlying blockchain architecture? ({\textit{ii}})\xspace How is blockchain applied within the FLF and what operations are performed? ({\textit{iii}})\xspace Is scalability considered? \item[RQ3] Incentive mechanism: ({\textit{i}})\xspace How are incentive mechanisms analyzed? ({\textit{ii}})\xspace How are the contributions of workers measured? \item[RQ4] Federated learning: ({\textit{i}})\xspace Is the performance of the framework reported? ({\textit{ii}})\xspace How comprehensive are the experiments? ({\textit{iii}})\xspace Are non-IID scenarios simulated? ({\textit{iv}})\xspace Are additional privacy methods applied? ({\textit{v}})\xspace Is the framework robust against malicious participants? \item[RQ5] Summary: What are the lessons learned? \end{enumerate} \subsection{Search Process} We conduct a well-defined search process of relevant publications to allow for reproducibility. The main keywords of interest are ``Federated Learning'', ``Blockchain'', and ``Game Theory''. Due to the existence of synonyms (e.g. ``Collaborative Learning'' instead of ``Federated Learning'') and abbreviations (e.g. ``DLT'' instead of ``Blockchain'') the search term is extended by taking these variations into account. We selected 12 of the major computer science publication databases. The search was conducted on November 21, 2021. All search results retrieved at that date were taken as input for further manual inspection. The current results of the query can be obtained by following the hyperlink after each database entry below: IEEE Xplore Digital Library \href{https://ieeexplore.ieee.org/search/searchresult.jsp?newsearch=true&queryText= SpringerLink Database \href{https://link.springer.com/search?query ACM Digital Library \href{https://dl.acm.org/action/doSearch?AllField= ScienceDirect Database \href{https://www.sciencedirect.com/search?qs MDP \href{https://www.mdpi.com/search?advanced=(@(all Emerald insight \href{https://www.emerald.com/insight/search?q Talor \& Francis \href{https://www.tandfonline.com/action/doSearch?AllField Hindawi \href{https://hindawi.com/search/all/ SAGE \href{https://journals.sagepub.com/action/doSearch?filterOption=allJournal&AllField Inderscience online \href{https://www.inderscienceonline.com/action/doSearch?AllField Wiley \href{https://www.wiley.com/en-us/content-search?cq After applying the search term, we found 422~ publications overall. In addition to this search, the references were screened and 1~ more eligible paper was found and included for analysis. Each publication that we retrieved based on our search was exported or enriched by ({\textit{i}})\xspace document title, ({\textit{ii}})\xspace abstract, ({\textit{iii}})\xspace author names, ({\textit{iv}})\xspace publication year, and ({\textit{v}})\xspace Digital Object Identifier (DOI). \begin{figure}[t] \centering \resizebox{\columnwidth}{!}{% \input{PRISMA_grafik_org} } \caption{PRISMA diagram.} \label{fig:tikz:prisma-diagram} \end{figure} \subsection{Selection Process} The eligibility of the literature corpus that we gathered based on the string was evaluated independently by three researchers. Duplicates were removed and several iterations of manual verification were performed. First, we present the criteria that we applied to include (or exclude) an article for further consideration. Then, we discuss our manual eligibility check. \subsubsection{Inclusion and exclusion criteria}\label{sec:inclusion} The following three criteria must be fulfilled by an article in order for it to be included for further analysis: \begin{enumerate} \item The article must have a direct relation to all of the three search terms ({\textit{i}})\xspace Federated Learning \& ({\textit{ii}})\xspace Blockchain \& ({\textit{iii}})\xspace Mechanism Design or their respective synonyms. \item The article must be of full length to explain proposed architectures and concepts in depth. \item The article must be written in English. \end{enumerate} If the article matched one of the following three criteria, it was excluded from further analysis: (1) Articles which do not discuss collaborative learning in the context of both decentralization and incentives. This also covered articles which discuss only two of the three major terms or consider the search terms in a different context. (2) Short papers such as poster abstracts because they do not cover enough information to provide a sufficient level of understanding. (3) Vague articles which only give an brief overview about the topics, e.g. superficial descriptive articles were excluded. \subsubsection{Manual eligibility check} The following manual eligibility checks were performed by the authors: \begin{enumerate} \item Removal of faulty or correction of incorrect lines in the aggregation file that includes all search results. \item Reading the titles and abstracts of the articles. Each article was marked as follows based on our inclusion criteria, see Section~ \ref{sec:inclusion}: (i) Include, if the article should be included. (ii) Exclude, if the article should be excluded. (iii) Not sure, if the article should be re-checked against the defined criteria and briefly discussed. \item The authors compared and discussed their assessments. Disagreements were highlighted and handled as follows: The article was re-checked against the defined criteria and briefly discussed. Sometimes one researcher noticeably misinterpreted the research focus of an article. In that case the article was excluded. In all other cases the article was included. \item Reading parts of or the complete full text in order to get a deeper insight into the research. Then, the article was again voted for inclusion or exclusion. \item The authors compared and discussed their respective selected papers. The same decision levels as described in 2) were used for the comparison. \item The authors read all eligible papers independently and extracted all necessary information. \item Discussion of findings and information exchange. \end{enumerate} If the decision on the eligibility of a paper was not clear after further consideration, the authors decided on including the respective article. All included articles were read and relevant information was extracted. \subsection{Screening Process} In order to cover as much structured information as possible, the analysis of the papers was guided by predefined categories regarding the FL framework (\tablename~\ref{table:FL}), blockchain features (\tablename~\ref{table:blockchain}), incentive mechanism features (\tablename~\ref{table:incentive_mechanism}) and the experiment analysis (\tablename~\ref{table:experiments}). After conducting all steps described above, a total of 40~ articles remain that match the initially defined scope of this structured literature review and are further processed to answer the research questions. \section{Results}\label{sec:results} The following subsections systematically present the results of the literature review by answering the five respective research questions. Each subsection is complemented by an explanatory table that classifies the considered papers according to categories defined in Table 3 in the Supplementary Materials. \subsection{RQ 1: Overview} \begin{table*}[t] \centering \caption{Overview of decentral and incentivized FL frameworks. (\textit{\footnotesize SA: System Architecture, BC: Blockchain, FL: Federated Learning, IM: Incentive Mechanism, CM: Contribution Measurement, SP: Security \& Privacy, n.s: not specified, CS: cross-silo (few clients), CD: cross-device (many clients)})} \label{table:FL} \resizebox{\textwidth}{!}{ \input{table_overview} } \end{table*} \subsubsection{RQ 1-1: What are possible applications of FLF?} Although most of the surveyed papers do not target specific applications (28 out of 40) due to generalizability of neural networks, some are dedicated to specific applications, namely \textit{Internet of Things} (IoT) (6 out of 40), \textit{Internet of Vehicles} (IoV) (5 out of 40) and \textit{Finance} (1 out of 40). Applications of FLF in special domains may require additional constraints and characteristics. The heterogeneity of the required properties across those domains lead to vast differences in the design choices of function, operations and storage of blockchain, contribution measurement and privacy requirements. One of the major application scenarios is IoT (e.g. \cite{LW4_FL_IIoT, LW5_FL_HomeAppliances_IoT, MH5_Lei2021}). Sensor-equipped devices collect environmental information and execute model updates thanks to advances in neural engines while edge servers are often assumed to aggregate models that are trained by local sensor devices. For instance, power consumption measured at smart homes can be used for training an AI model of energy demand forecast \cite{MH14_Rathore2019}. Zhao~\textit{et al.}~ propose a FLF for smart home appliance manufacturers to obtain AI models trained with their customers' usage information \cite{LW5_FL_HomeAppliances_IoT}. Some solved issues pertaining to the IoT-based FL \cite{LW4_FL_IIoT, MH10_Qu2021}. Zhang~\textit{et al.}~ propose a FL-based failure device detection method that takes into account the fact that sensor readings are often imbalanced since sensors are, in general, not deployed uniformly in a sensing area \cite{LW4_FL_IIoT}. They propose a modified FedAvg algorithm called centroid distance weighted federated averaging (CDW\_FedAvg) to obtain accurate models when local datasets are imbalanced at the devices. As sensor devices may not have enough resources to solely train neural networks, it is important to determine whether to delegate computationally intensive tasks to edge servers. Qu~\textit{et al.}~ propose an algorithm to determine whether to offload computation to edge servers when communications between IoT devices and edge computers are unreliable \cite{MH10_Qu2021}. FL is beneficial to many scenarios in ITS or IoV, e.g. optimized routing, congestion control and object detection for autonomous driving (\cite{LW8_Privacy_IoV, MH1_Chai2021, MH6_Kansra2022, KT04_Zou2021WCNC, KT06_Wang2021TNSE}). Vehicles collect local information and train local models with collected data. Models are often aggregated by devices called RSUs (Road Side Units) and MECs (Mobile Edge Computers) which are often deployed on the road. In IoV, the Cross-Device (CD) setting is often preferred as mostly the same types of sensors are used to measure road condition, and thus the common neural network model structure is shared by vehicles. As different locations have different road conditions, users need locally-optimized models, and thus scalability is a key issue. Furthermore, we need extra protection for users' location privacy. Zou~\textit{et al.}~ propose a FLF for a knowledge trading marketplace where vehicles can buy and sell models that vary geographically \cite{KT04_Zou2021WCNC}. Chai~\textit{et al.}~ propose multiple blockchains to deal with geographically dependent models \cite{MH1_Chai2021}. Kansra~\textit{et al.}~ integrate data augmentation, a technique to synthetically generate data such as images, into FL to increase model accuracy for ITS such as autonomous driving and road object identification \cite{MH6_Kansra2022}. Wang~\textit{et al.}~ propose a FLF dedicated to the crowdsensing of UAVs (Unmanned Aerial Vehicles) \cite{KT06_Wang2021TNSE}. As UAVs are often equipped with multiple sensors and can be easily deployed to sensing area, a FLF with UAVs has a huge benefit for ITS applications such as traffic monitoring and public surveillance. The other domain we found in the surveyed papers is finance. He \textit{et al.}~ proposed a FLF for commercial banks to better utilize customers' financial information \cite{MH9_He2021}. Financial information such as credit level, risk appetite, solvency, movable and real estate owned are crucial sources to understanding the characteristics of customers of financial services. However, it is too sensitive to directly use them for data mining. Hence, a FLF is a viable framework for financial information management. \subsubsection{RQ 1-2: What problems were solved?} The problems solved by the papers can be categorized into ({\textit{i}})\xspace the single point of failure/trust issue in FL, ({\textit{ii}})\xspace blockchain-related issues, ({\textit{iii}})\xspace lack of clients' motivation, ({\textit{iv}})\xspace how to fairly evaluate clients' contribution, ({\textit{v}})\xspace security and privacy issues. Most of the papers (29 out of 40) propose a system architecture of FLF to solve the problems of single point of failure/trust in the current centralized server-clients architecture. More specifically, this issue is rooted in the structure of the original FL where an aggregation server is collecting local model updates from clients in a centralized manner. The idea to mitigate this issue is to decentralize the processes involved in FL using blockchain technologies. Each paper proposes operations, functions and protocols processed in and outside the smart contract. Furthermore, some solve the issue of scalability in the FLF (e.g. \cite{MH1_Chai2021, MH5_Lei2021}) and blockchain-related issues such as energy waste of consensus algorithms (e.g. \cite{KT08_Qu2021TPDS, KT09_Zhang2021IJHPSA}). We will go into the proposed system architectures and blockchain-related issues in Section~\ref{sec:results_blockchain}. An incentive mechanism is integrated into FLFs to solve the problem of lack of clients' motivation. The basic idea is to give monetary incentives to clients in return for their effort in training a local model. The incentive mechanism is also leveraged to solve the model poisoning attack which is an attack on a model update to deteriorate the quality of a global model by malicious clients' providing bogus local model updates. The idea for demotivating such attacks is to devise an incentive mechanism that penalizes malicious activities. Furthermore, a reputation score based on contribution is also useful to screen potentially malicious clients. Here, we need a contribution measurement metric to fairly evaluate the quality of clients' model updates and detect the attacks. Details about the proposed incentive mechanisms and contribution measurements will be covered in Section~\ref{sec:results_incentive_mechanism}. 20 out of 40 papers propose approaches to solve issues related to security and privacy. With few exceptions (i.e. attacks on reputation~\cite{MH2_Kang2019, MH7_Mugunthan2022} and \cite{KT09_Zhang2021IJHPSA}), both security and privacy issues are rooted in local model updates. The security issue is related to the model poisoning which we mentioned above, while the privacy issue is related to sensitive information that might be leaked from the local updates. We will further summarize the works that solve the security and privacy issues in Section~\ref{sec:results_experiments}. \subsection{RQ 2: Blockchain} \label{sec:result_blockchain} \begin{table*}[t] \centering \caption{Overview of blockchain features.} \label{table:blockchain} \resizebox{\textwidth}{!}{ \input{table_blockchain} } \end{table*} \subsubsection{RQ 2-1: What is the underlying blockchain architecture?} \label{sec:results_blockchain} The Blockchain system and its underlying consensus mechanism is an influential part of the FLFs infrastructure. FLFs are heterogeneous in terms of architecture, operation and storage requirements, contribution calculation, actors and applied cryptography. Customized and tailored blockchain solutions may be required with respect to the underlying use-case. Due to its restrictive scalability in terms of computation and storage, most of the analyzed FLFs apply blockchain as a complementary element in a more complex system, with a few exceptions \cite{LW1_witt2021rewardbased,LW10_refiner, MH11_Desai2021, KT01_Toyoda2019BigData, KT02_Toyoda2020Access}. Blockchain systems themselves are complex distributed systems, heterogeneous across many dimensions, yet can roughly be categorized into public, private and permissioned Blockchains. \begin{enumerate} \item \textbf{Public} Blockchains are open access where participants can deploy contracts pseudoanonymously \item \textbf{Private} Blockchains do not allow access for clients outside the private network and require an entity that controls who is permitted to participate \item \textbf{Permissioned} blockchains are private blockchains with a decentralized committee which controls the onboarding process \end{enumerate} Note that the FLFs that utilize open-source public blockchains such as Ethereum \cite{LW3_Kumar2020, LW4_FL_IIoT, LW6_Rahmadika2020, LW10_refiner, LW12_Rahmadika2021_unlinkable, LW14_5G_Rahmadika2021,MH7_Mugunthan2022, MH11_Desai2021, MH13_Li2020, MH14_Rathore2019, KT07_Ur_Rehman2020INFOCOMW}, Stellar \cite{MH8_Fadaeddini2019} and EOS \cite{KT03_Martinez2019CyberC} were not deployed on the respective public blockchain in the experiments due to the enormous costs this would incur. Hyperledger Fabric \cite{HyperledgerFabric} or Corda \cite{corda} are permissioned blockchains running on private networks, allowing for faster throughput through a limited amount of potential nodes. This makes these frameworks more suitable for applications where blockchain replaces computationally expensive operations such as aggregation or storage of neural network models. The consensus protocol ensures alignment and finality of a version across all distributed nodes without the need for a central coordination entity. While Proof of Work (PoW) is the most common mechanism applied in Bitcoin and Ethereum, it comes at the cost of wasting computational power on bruteforcing algorithmic hash-calculations for the sole purpose of securing the network. Since many operations within the FLF frameworks are computationally expensive, these tasks can be integrated into the consensus mechanism which creates synergy and might be a better use of resources. Examples for consensus mechanisms can be found where the model accuracy is verified (Proof-of-Knowledge \cite{MH1_Chai2021}), reputation scores are checked (Proof-of-Reputation \cite{LW7_Zhang_Reputation}), the model parameters are securely verified (Proof-of-Federated-Learning \cite{KT08_Qu2021TPDS}), the Shapley-Value is calculated for contribution measurement \cite{LW9_FedCoin} or verification of capitalizing on efficient AI hardware (Proof-of-Model-Compression \cite{KT09_Zhang2021IJHPSA}). \subsubsection{RQ 2-2: How is blockchain applied within the FLF and what operations are performed?} Blockchain Technology is applied to mitigate the single point of failure and power imbalance of the server-worker topology of traditional FL through a transparent, immutable and predictable distributed ledger. Embedded cryptocurrencies suit the useful property of a real-time reward payments for predefined actions at the same time. In general, Turing-complete smart-contract enabled blockchains allow for a variety of possible complementary features for the FL training process, namely aggregation, payment, coordination and storage: \begin{enumerate} \item \textbf{Aggregation} The aggregation of model-parameters, can be performed by a smart contract on top of blockchain \cite{LW11_RewardResponseGame, LW2_Weng2021, MH5_Lei2021, MH9_He2021, KT01_Toyoda2019BigData, KT02_Toyoda2020Access}. Since blockchain is assumed to be failure resistant, this strengthens the robustness against possible single-point of failure of an aggregation server. In addition, the deterministic and transparent rules of smart contracts ensure inherent trust with an equal power distribution among participants, while the transparency ensures auditability of contributions. Yet since every node in the blockchain has to compute and store all information, submitting a model to the smart contract for aggregation causes overhead in terms of both computation and storage on the blockchain. Assuming $n$ FL-workers and $m$ Blockchain nodes over $t$ rounds, the blockchain scales with $\mathcal{O}(t*n*m)$ which questions the feasibility of on-chain aggregation. There are two papers that try to reduce data size for on-chain aggregation. Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased} proposed a system where 1-bit compressed soft-logits are stored and aggregated on the blockchain saving communication, storage and computation costs by orders of magnitude. Feng~\textit{et al.}~~\cite{MH5_Lei2021} employ a framework based on two BC layers where the aggregation process is outsourced to a Mobile-Edge-Server . \item \textbf{Coordination} Applying blockchain to coordinate and navigate the FL process allows for decentralization without heavy on-chain overhead. Instead of aggregating the model on-chain, letting the blockchain choose a leader randomly can ensure decentralization \cite{LW5_FL_HomeAppliances_IoT,MH11_Desai2021, MH1_Chai2021, KT11_Xuan2021SCN}. Another way blockchain coordinates the FL process is by enabling the infrastructure for trust-less voting atop of the blockchain. Voting on the next leader (aggregator) \cite{MH8_Fadaeddini2019, MH9_He2021} or on each others contributions \cite{KT01_Toyoda2019BigData,KT02_Toyoda2020Access, KT11_Xuan2021SCN} further democratizes the process. Beyond explicit coordination operations like voting or leader selection, the implicit function of storing crucial information and data for the FL process, \cite{LW10_refiner, MH13_Li2020, KT04_Zou2021WCNC, LW1_witt2021rewardbased} , verifying correctness of updates \cite{MH11_Desai2021, LW5_FL_HomeAppliances_IoT} or keeping the registry of active members \cite{LW1_witt2021rewardbased, LW10_refiner, KT01_Toyoda2019BigData, KT02_Toyoda2020Access, LW2_Weng2021, LW9_FedCoin} is crucial for the FL workflow and implies coordination through blockchain as an always accessible, verifiable, transparent and immutable infrastructure. \item \textbf{Payment} Many general-purpose blockchain systems include cryptocurrency capabilities and therefore allow for the incorporation of instant, automatic and deterministic payment schemes defined by the smart contract's business logic. This advantage was capitalized on by 26 of the 40 FLF we analyzed. Section~\ref{sec:results_incentive_mechanism} discusses the details of applied payment schemes in the context of reward mechanisms and game theory. \item \textbf{Storage} Decentralized and publicly verifiable storage on the blockchain facilitates auditability and trust among participants. Even though expansive, since all blockchain nodes store the same information in a redundant fashion, it might make sense to capitalize on the immutability and transparency feature of blockchain and store information where either a shared access among participants is required or where verifiability of the history is required to hold agents accountable for posterior reward calculations \cite{LW7_Zhang_Reputation}. In particular, machine learning models \cite{LW2_Weng2021, LW8_Privacy_IoV,LW11_RewardResponseGame, MH1_Chai2021, Bao2019FLChain, MH4_Ma2021, MH9_He2021, MH10_Qu2021, MH11_Desai2021, KT01_Toyoda2019BigData, KT02_Toyoda2020Access}, reputation scores \cite{LW7_Zhang_Reputation, LW13_TowardsReputationINFOCOMM}, User-information \cite{LW1_witt2021rewardbased, LW10_refiner, KT01_Toyoda2019BigData, KT02_Toyoda2020Access, LW2_Weng2021, LW9_FedCoin} and Votes \cite{KT01_Toyoda2019BigData, KT02_Toyoda2020Access, LW1_witt2021rewardbased} are stored on-chain of the respective FLF. \end{enumerate} \subsubsection{RQ 2-3: Is the framework scalable?} Especially if the FLF is intended to be used with hundreds to millions of devices, the scalability of the framework is an important characteristic. In particular, ({\textit{i}})\xspace storing large amounts of data such as model-parameters and ({\textit{ii}})\xspace running expansive computations on the blockchain e.g. aggregating millions of parameters, calculate expansive contribution measurements like Shapley Value or privacy-preserving methods hinder the framework to scale beyond a small group of entrusted entities towards mass adoption. To overcome the scalability-bottleneck of storage, some FLF applied an Interplanetary-File-System (IPFS) \cite{ipfs}, where data is stored off-chain in a distributed file system, using the content-address as a unique pointer to each file in a global namespace over all computing devices \cite{LW3_Kumar2020, LW5_FL_HomeAppliances_IoT, LW10_refiner, LW13_TowardsReputationINFOCOMM, MH2_Kang2019, MH7_Mugunthan2022, MH8_Fadaeddini2019, KT03_Martinez2019CyberC, KT07_Ur_Rehman2020INFOCOMW}. Other FLF are based on novel design choices to tackle the scalability-issues: Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased} applied compressed Federated Knowledge Distillation, storing only 1-bit compressed soft-logits on-chain. Chai~\textit{et al.}~~\cite{MH1_Chai2021} design a hierarchical FLF with two blockchain layers to reduce the computational overhead by outsourcing computation and storage to an application specific sub-chain. Similarly, Feng~\textit{et al.}~~\cite{MH5_Lei2021} propose a two-layered design, where the transaction efficiency of the global chain is improved through sharding. Bao~\textit{et al.}~~\cite{Bao2019FLChain} employ an adaption of counting bloom filters (CBF) to speed up blockchain queries in the verification step of their FLF. Desai~\textit{et al.}~~\cite{MH11_Desai2021} combine public and private blockchains, with the former storing reputation scores for accountability and the latter used for heavy computation and storage. Furthermore, the authors apply parameter compression for further scalability improvements. \subsection{RQ 3: Incentive Mechanism} \label{sec:results_incentive_mechanism} \begin{table*}[t] \centering \caption{Overview of incentive mechanisms and contribution measurement.} \label{table:incentive_mechanism} \resizebox{\textwidth}{!}{ \input{table_incentive_mechanism} } \end{table*} We found that 45\% (18 out of 40 papers) of the surveyed papers measured workers' rewards via simulation while 35\% (14 out of 40 papers) of them theoretically analyzed their incentive mechanisms. In the following, we study these 14 papers in terms of how they are theoretically analyzed and how participants' contribution is measured and utilized for their analysis. \subsubsection{RQ 3-1: How are incentive mechanisms analyzed?} In general, there are three steps for theoretical analysis. The first step is to determine what entities' behavior is examined. In FL, such entities could be workers and task requesters. The second step is to model the entities' utilities or profits. They can be often obtained by taking into account the expectation of possible profits and costs. The last step is to analyze the defined utilities or profits. We will see how each step is conducted in the literature. The first step is to determine entities to be analyzed. In most cases, workers are at least chosen as an entity as the idea of giving incentives is to motivate workers. Some papers also choose entities that pay rewards (e.g. task requesters) as we want to make sure that they are also profitable even if they pay rewards to workers. The second step is to define the utilities or profits of entities. A utility is a one-dimension measurable unit that quantifies an entity's value on an outcome and can be positive (e.g. rewards for workers and a value of AI models for task requesters) and negative values (e.g. a computation cost for workers and a total amount of payout for task requesters). Utilities and profits can be derived by subtracting costs from payouts. Although the elements of payouts are relatively straightforward (e.g. rewards for work contribution), defining cost elements often depends on the assumed application scenarios. Typical costs in the surveyed papers are computation, electricity (e.g. \cite{LW11_RewardResponseGame, MH1_Chai2021, MH2_Kang2019, KT01_Toyoda2019BigData, KT02_Toyoda2020Access, KT06_Wang2021TNSE}), data acquisition (e.g. pictures and sensor readings \cite{KT04_Zou2021WCNC, KT05_Hu2021IoTJ, KT06_Wang2021TNSE}) and privacy leakage due to model updates (e.g. \cite{KT05_Hu2021IoTJ, KT06_Wang2021TNSE, KT08_Qu2021TPDS}). Even multiple cost factors can be considered (e.g. \cite{KT04_Zou2021WCNC, KT05_Hu2021IoTJ, KT06_Wang2021TNSE}). The last step is to analyze the defined utilities and profits to ensure the robustness of designed incentive mechanisms and derive the optimal strategies and reward allocation. It is up to us to determine what to analyze with utilities. For example, the most simple yet crucial analysis would be to prove that it is worthwhile for workers to join a FL task by showing that their profits are non-negative. Weng~\textit{et al.}~ and Bao~\textit{et al.}~ modeled requesters' and/or workers' profits with given rewards and costs proved that their profits are non-negative \cite{LW2_Weng2021, Bao2019FLChain}. Utilities can be used to derive task requesters' and workers' optimal strategies by finding a point where utilities are maximized. By proving the existence of such a point, we can derive an equilibrium, which is a condition where entities (e.g. workers) cannot be better off deviating from their optimal strategies. Finding an equilibrium would be a strong proof that a designed mechanism is stable. For instance, if workers can control what data size they use for a task, then the factor of data size should be in workers' utility, and we can derive the optimal data size by maximizing the utility (e.g. by finding first- and second-order conditions) \cite{KT02_Toyoda2020Access}. It is also used to determine optimal prices for tasks. Wang~\textit{et al.}~ propose a Q-learning-based approach to determine the optimal prices so that utilities are maximized via iterative learning processes \cite{KT06_Wang2021TNSE}. Similarly, Zou~\textit{et al.}~ derive the optimal prices for workers with first- and second-order conditions when the value of data, transmission quality and communication delay are the factors to determine their competitiveness and costs \cite{KT04_Zou2021WCNC}. Hu~\textit{et al.}~ propose a two-stage optimization method to determine the optimal values on data and their prices in order by solving an Euler-Lagrange equation of their utilities. These kinds of two-stage optimization game are often formalized as the Stackelberg game. Jiang and Wu~\cite{LW11_RewardResponseGame} and Chai~\textit{et al.}~~\cite{MH1_Chai2021} propose optimal incentive mechanisms with the Stackelberg game, in which two parties sequentially determine their actions according to other party's action. More specifically, a party called leader moves first and the other party called follower moves accordingly. Jian and Wu propose a Stackelberg-game-based incentive mechanism for FL \cite{LW11_RewardResponseGame}. An aggregation server (a leader) first provides a task's deadline and rewards to workers (followers). Workers then determine how much they should train by maximizing their utilities with the information provided by the server. The server then determines the optimal reward by maximizing its utility with the feedback by the workers. Chai~\textit{et al.}~ also propose a Stackelberg game to analyze their incentive mechanism in IoV \cite{MH1_Chai2021}. Aggregation servers (RSUs) are leaders while workers (vehicles) are followers, and aggregation servers first suggest prices and workers determine how much data they should collect and use for training so that both entities' utilities are maximized in order. It is interesting to see that the process of FL with an incentive mechanism can be seen as a contract or contest. Specifically, a task requester proposes a contract with task description and its reward and workers can determine whether or not to sign such a contract and how much resource they will provide \cite{MH2_Kang2019}. A FL process can be also seen as a contest as workers need to work first, which incurs irreversible costs due to computation, whereas their rewards are not guaranteed at the time of model update submission. Toyoda~\textit{et al.}~ give an incentive analysis based on the contest theory~\cite{KT01_Toyoda2019BigData, KT02_Toyoda2020Access}. Workers' utilities are used to derive how much effort workers' should exert to a task under the risk of not gaining prizes, while requesters' utility is used to determine how a prize should be split to workers. \subsubsection{RQ 3-2: How are the contributions of workers measured?} Incentive mechanisms require a measurement of contribution by each client to fairly distribute rewards to workers. However, it is not an easy task as we cannot see their actual work and have to measure workers' contribution only from their model updates. For this, we need to determine (i) metrics for contribution measurement and (ii) validators that measure metrics. The metrics used in the literature can be categorized into absolute and relative ones. The absolute metrics are metrics that can be measured without others' local model updates. For instance, a loss function can be measured from a local model and a global model, and the difference of them can be used as a metric for contribution measurement. Although the majority of absolute metrics are based on accuracy (e.g. \cite{LW3_Kumar2020, LW4_FL_IIoT}) and data size (e.g. \cite{LW6_Rahmadika2020, LW11_RewardResponseGame}), other factors are also proposed such as energy consumption (e.g. \cite{LW7_Zhang_Reputation, MH10_Qu2021}) and computation time \cite{KT12_Liu2021Sensors}. Some combine multiple metrics (e.g. \cite{LW7_Zhang_Reputation, MH13_Li2020}). Absolute metrics are generally straightforward but hard to validate. For instance, as only the model updates are submitted to an aggregation server in FL, no one can judge whether workers honestly claim the data size used for their model updates. In contrast, the relative metrics can be measured by comparing one's output with others' and this somewhat solves such a difficulty. For instance, Zhao~\textit{et al.}~ propose a metric based on the Euclidean distance of workers' model updates \cite{LW5_FL_HomeAppliances_IoT}. Likewise, Witt~\textit{et al.}~ propose that workers are to submit an unlabeled public dataset's labels predicted with their own local models and calculate the correlation of their labels as a metric \cite{LW1_witt2021rewardbased}. This metric is integrated into the computation of reward distribution based on peer truth serum \cite{Radanovic2016PTS} for the FL setting. Voting is another approach to relatively determine workers' contribution. For instance, workers in the next round of FL are to choose best updated models in the previous round using their own local datasets and rank them by voting \cite{KT01_Toyoda2019BigData, KT11_Xuan2021SCN}. The above metrics can be also used to measure workers' reputation. If the same workers are assumed to join different tasks, reputation scores calculated with workers' past contribution can be a reliable factor to determine reward amount. Some works propose the reputation of workers based on their past contribution (e.g. \cite{LW5_FL_HomeAppliances_IoT, LW7_Zhang_Reputation, MH2_Kang2019, MH13_Li2020}). For instance, Kang~\textit{et al.}~ propose to calculate workers' reputation based on direct opinion by a task requester and indirect opinions by other task requesters \cite{MH2_Kang2019}. Even if workers' individual contribution is measured, it does not guarantee that rewards are fairly given to workers. Hence, it is important to determine how rewards should be distributed based on the metrics. The Shapley value is an approach to fairly determine payouts to workers based on their contributions \cite{Shapley1953}. Three papers propose to use the Shapley value for fair reward distribution \cite{LW9_FedCoin, MH9_He2021, MH4_Ma2021}. Liu~\textit{et al.}~ propose to use it with the metric of accuracy \cite{LW9_FedCoin}. He \textit{et al.}~ compared their Shapley-value-based method with three approaches, namely (i) equal distribution, (ii) a method based on individual contribution, and (iii) a method called the labor union game where only the order of submission is taken into account to contribution measurement, and found that the Shapley-value-based method outperforms the others in terms of workers' motivation and fairness \cite{MH9_He2021}. Ma \textit{et al.}~ propose a method to calculate Shapley values even if model updates are masked to preserve workers' privacy \cite{MH4_Ma2021}. The next question we must answer is who validates such metrics. From our study, validators can be classified into (i) aggregation servers (e.g. \cite{LW4_FL_IIoT, LW8_Privacy_IoV, MH1_Chai2021}), (ii) task requesters (e.g. \cite{LW7_Zhang_Reputation, MH2_Kang2019, MH13_Li2020}), (iii) validators whose task is only to measure contribution (\cite{LW10_refiner, MH8_Fadaeddini2019}), (iv) blockchain nodes (e.g. \cite{LW3_Kumar2020, KT08_Qu2021TPDS, KT12_Liu2021Sensors}), (v) workers (e.g. \cite{MH7_Mugunthan2022, KT10_Gao2021ICPP, KT11_Xuan2021SCN}) and (vi) smart contracts (e.g. \cite{LW1_witt2021rewardbased, LW6_Rahmadika2020, MH4_Ma2021}). Some of the works assume that aggregation servers, task requesters or validators are expected to possess datasets to calculate the metrics discussed above. As reviewed in Section \ref{sec:results_blockchain}, some propose custom blockchains dedicated to FL, and the validation process is integrated into its block generation process, making blockchain nodes validators. In some scenarios, aggregation servers, task requesters and blockchain nodes can be validators since local models are collected by them. However, datasets for validation may not be always available. As we have seen above, some metrics can be calculated without validators. Furthermore, metrics based on the correlation of predicted labels do not require any validation dataset and can even be measured in a smart contract \cite{LW1_witt2021rewardbased}. \subsection{RQ 4: Experiments} \label{sec:results_experiments} \begin{table*}[t] \centering \caption{Overview of experiments. \textit{\footnotesize (BCWD = Breast Cancer Wisconsin Data Set, BT = Blockchain Tampering, DGHV = Dijk-Gentry-Halevi-Vaikutanathan Algorithm, DP = Differential Privacy, ECC = Elliptic Curve Cryptography, HE = Homomorphic Enrcryption, HDD = Heart Disease Data Set, KDD = Knowledge Discovery and Data Mining Tools Competition, RP = Random Model Poisoning, RSA = Rivest-Shamir-Adleman Cryptosystem, RT = Reputation Tampering, SA = Secure Aggregation~\cite{MH_SECURE_AGG}, SP = Systematic Model Poisoning, ZKP = Zero-Knowledge Proof, 2PC = 2-Party Computation)}} \label{table:experiments} \resizebox{\textwidth}{!}{ \input{table_experiments} } \end{table*} Conducting experiments is a key element of FLF development for two reasons. Firstly, the implementation of an example testifies to the feasibility of the approach and gives the authors the chance to identify weaknesses of their frameworks, e.g., poor scalability. Secondly, conducting experiments allows the comparison of the proposed approaches with each other, e.g., based on the accuracy of the models on standardized test sets. We screened the papers for experiments, and when present, examined them according to nine criteria (\tablename~\ref{table:experiments}). \subsubsection{RQ 4-1: Is the performance of the framework reported?} The large majority of papers report results of their experiments expressed in either loss, accuracy, or F1 score (84.8\%, 28 out of 33 papers with experiments). The remaining instead focus on the performance of their novel group-based Shapley value calculation for contribution measurement~\cite{MH4_Ma2021}, the user interface~\cite{LW9_FedCoin}, the computational effort and adversarial influence~\cite{MH11_Desai2021}, or game-theoretic quantities such as utility values and rewards~\cite{KT06_Wang2021TNSE}. We note that comparability of the approaches is not given through the conducted experiments, since even when using the same data sets and the same evaluation metrics, different experimental scenarios are investigated. In conclusion, to obtain insightful results, experiments should compare the performance (accuracy and computational effort) of an incentivized, decentralized FL system in a standardized challenging environment (non-IID, adversaries) with either the performance of a traditional centralized FL system or the performance of a locally trained model without FL. Ideally, the effectiveness of incentive mechanism and decentralization efforts are reflected in the FLF performance through a holistic experimental design. \subsubsection{RQ 4-2: How comprehensive are the experiments?} First, it was found that the majority of publications do include experiments. Only seven of 40 papers did not conduct experiments~\cite{LW13_TowardsReputationINFOCOMM,MH6_Kansra2022,MH8_Fadaeddini2019,MH9_He2021,KT01_Toyoda2019BigData, KT02_Toyoda2020Access,KT07_Ur_Rehman2020INFOCOMW}. However, the analysis also shows that only 45\% of the experiments implement the actual blockchain processes (15 out of 33 papers with experiments). Instead the distributed functionality was simulated or its impact estimated. For instance, Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022} focus on the evaluation of the frameworks' contribution scoring procedure by simulating collusion attacks on the FL procedure. The effect of introducing blockchain to the FL framework was accounted for by estimating the per-agent gas consumption. Similarly, Chai~\textit{et al.}~~\cite{MH1_Chai2021} conduct experiments specifically designed to investigate the Stackelberg-game-based incentive mechanism. The authors accomplish this without implementing the blockchain processes. To test the FL functionality of the framework, a ML problem and a dataset must be selected. For the ML application and the dataset used, we observe a high homogeneity. Almost all experiments realize classification problems and use publicly available benchmark datasets. The most common are MNIST (handwritten digits)~\cite{MH_MNIST} and its variations, as well as CIFAR-10 (objects and animals)~\cite{MH_CIFAR}. Only Rathore~\textit{et al.}~~\cite{MH14_Rathore2019} and Li~\textit{et al.}~~\cite{LW8_Privacy_IoV} did not perform classification tasks. Rathore~\textit{et al.}~~\cite{MH14_Rathore2019} performed object detection on the PASCAL VOC 12 dataset~\cite{MH_PASCAL}. Object detection typically combines regression and classification through predicting bounding boxes and labeling them. Li~\textit{et al.}~~\cite{LW8_Privacy_IoV} applied their FLF to autonomous driving and minimized the deviations in steering-wheel rotation between a human-driven and simulation-driven vehicle. This corresponds to a regression task. As to the number of training data holders, the experiments considered between one~\cite{LW8_Privacy_IoV} and 900~\cite{MH12_Zhu2021} clients. In general, one would expect papers specifying cross-silo settings to test with fewer ($<$100~\cite{SP_MD_ARXIV}) and papers specifying cross-device settings to test with more ($>$100) clients. Of the frameworks clearly designed for a cross-device application, it is noticeable that only Kang~\textit{et al.}~~\cite{MH2_Kang2019} and Desai~\textit{et al.}~\cite{MH11_Desai2021} conduct experiments with 100 participants or more. On the contrary, Rahmadika~\textit{et al.}~~\cite{LW12_Rahmadika2021_unlinkable} test with as many as 100 participants, although only designing a cross-silo framework. Regarding the FL algorithm, the classic FedAvg~\cite{BrendanMcMahan2017} is mainly used. Furthermore, in some experiments algorithms are used that mitigate the problem of catastrophic forgetting (Elastic Weight Consolidation (EWC)~\cite{LW3_Kumar2020}), reduce the communication overhead (Federated Knowledge Distillation (FD)~\cite{LW1_witt2021rewardbased}, signSGD~\cite{MH11_Desai2021}), or show more robust convergence for non-IID and other heterogeneous scenarios (FedProx~\cite{LW10_refiner}, Centroid Distance Weighted Federated Averaging (CDW\_FedAvg)~\cite{LW4_FL_IIoT}). Chai~\textit{et al.}~~\cite{MH1_Chai2021} and Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022} design custom FL algorithms. Specifically, Chai~\textit{et al.}~~\cite{MH1_Chai2021} propose a FLF with two aggregation layers in order to promote scalability. In their FL algorithm, nodes in the middle layer aggregate the local model updates of associated nodes in the lowest layer. This semi-global model is then fine-tuned by the middle layer nodes based on data collected by the middle layer nodes themselves. Finally, nodes in the top layer aggregate the fine-tuned-models from the middle layer nodes into a global model which is eventually passed back to the lowest layer nodes. All aggregations are weighted by the training dataset size. Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022} propose a FLF where all clients evaluate and score the differentially encrypted locally trained models of all other clients. These scores are reported to a smart contract which computes an overall score for each local model. Eventually, each client aggregates the global model from all local models, weighted by the overall score. \subsubsection{RQ 4-3: Are non-IID scenarios simulated?} \par In real-world applications of FL, the training data is often not independent and identically distributed (non-IID) between the clients. This effects the performance of the global model and adds an additional layer of complexity with respect to contribution measurement. Hence, how we simulate non-IID scenarios with open datasets is crucial. In 11 publications and for various benchmark datasets, non-IID scenarios were considered. For the example of the MNIST dataset, Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased} simulate different levels of non-IID scenarios following the Dirichlet distribution as it can easily model the skewness of data distribution by varying a single parameter. Martinez~\textit{et al.}~~\cite{KT03_Martinez2019CyberC} split the dataset in overlapping fractions of various size, whereas Kumar~\textit{et al.}~~\cite{LW3_Kumar2020} divide the dataset so that each trainer only possesses data from two of the ten classes. In a less skewed setting, Kumar~\textit{et al.}~ allocate data from at most four classes to each trainer, with each class being possessed by two devices. \subsubsection{RQ 4-4: Are additional privacy methods applied?} Even though FL's core objective is to maintain confidentiality through a privacy-by-design approach where model parameters are aggregated instead of training data, there remain innumerable attack surfaces \cite{FL_Attacks_Taxonomy}. Therefore, the presented frameworks employ additional privacy-preserving mechanisms which can be divided into two groups. ({\textit{i}})\xspace Mechanisms that encrypt or obfuscate gradients and prevent malicious parties to draw conclusions about the data set. ({\textit{ii}})\xspace Mechanisms that hide the identity of participating parties. A classification of the employed privacy-preserving methods can be seen in Fig.\ 1 in the Supplementary Materials. The methods of the first group can be further divided into ({\textit{i}})\xspace approaches that are based on cryptographic secure multi-party computing (MPC), and ({\textit{ii}})\xspace approaches that are based on differential privacy (DP). MPC refers to cryptographic methods by which multiple participants can jointly compute a function without having to reveal their respective input values to the other participants. MPC approaches include three groups of methods~\cite{MH_SECURE_AGG}. ({\textit{i}})\xspace Google's secure aggregation (SA)~\cite{MH_SECURE_AGG} is specifically designed to achieve low communication and computation overhead and to be robust towards device dropout. It has been employed by Liu~\textit{et al.}~~\cite{LW9_FedCoin} and Ma~\textit{et al.}~~\cite{MH4_Ma2021}. Beyond implementing SA, the latter develops a group-based Shapley-value method for contribution measurement, since the native Shapley-value method cannot be applied to masked gradients. ({\textit{ii}})\xspace Yao's garbeled circuits have not been applied to any of the analysed frameworks, but are mentioned here for completeness. ({\textit{iii}})\xspace While Yao's garbeled circuits were developed for 2-party secure computing, homomorphic encryption (HE) allows for higher numbers of participants~\cite{MH_SECURE_AGG}. As shown in Fig.\ 1 in the Supplementary Materials, HE has been employed in several works \cite{LW2_Weng2021}, \cite{LW8_Privacy_IoV}, \cite{MH9_He2021}, \cite{MH13_Li2020}, \cite{MH12_Zhu2021}, \cite{MH14_Rathore2019}. For that, different implementations of the homomorphic idea have been chosen, such as the Pallier cryptosystem, the Elgamal cryptosystem, or the Dijk-Gentry-Halevu-Vaikutanathan Algorithm (DGHV). Li~\textit{et al.}~~\cite{MH13_Li2020} choose the Elgamal cryptosystem that is less computationally expensive than other HE approaches. DP refers to a method where noise drawn from a probability density function $p_{noise}(x)$ with expected value $\mathbb{E}(p_{noise}(x))=0$ obfuscates the individual contribution with minimal distortion of the aggregation. DP has been employed by Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022}, Zhao~\textit{et al.}~~\cite{LW5_FL_HomeAppliances_IoT}, and Kumar~\textit{et al.}~~\cite{LW3_Kumar2020}, with the latter combining the use of HE and DP. However, the fewer clients participate in the DP process, the heavier the distortion of the aggregated model, introducing a trade-off between privacy and model accuracy. Zhao~\textit{et al.}~~\cite{LW5_FL_HomeAppliances_IoT} mitigate the loss in accuracy by incorporating a novel normalization technique into their neural networks instead of using traditional batch normalization (e.g. \cite{MH7_Mugunthan2022, LW3_Kumar2020}). Besides MPC and DP, another technique for data set protection is chosen by Qu~\textit{et al.}~~\cite{KT08_Qu2021TPDS}. Instead of the clients sharing masked gradients, the FLF relies on requesters sharing masked datasets in the model verification step. This prevents other workers from copying the models while testing and evaluating them. HE and 2-party computation (2PC) are used. Zhang~\textit{et al.}~~\cite{LW10_refiner}, Desai~\textit{et al.}~~\cite{MH11_Desai2021}, Bao~\textit{et al.}~~\cite{Bao2019FLChain}, and Rahmadika~\textit{et al.}~~\cite{LW6_Rahmadika2020} also rely on the masking of gradients but do not specify the privacy-preserving mechanisms. The second group of frameworks targets the protection of participants' identities through cryptographic mechanisms. For that, Rahmadika~\textit{et al.}~~\cite{LW12_Rahmadika2021_unlinkable} combine ring signatures, HE (RSA), Rabin algorithm, and elliptic curve cryptography (ECC), while Chai~\textit{et al.}~~\cite{MH1_Chai2021} incorporate digital signatures and asymmetric cryptography approaches, and Rahmadika~\textit{et al.}~~\cite{LW14_5G_Rahmadika2021} perform authentication tasks through pairing-based cryptography and ECC. Only one framework implements measures for both masking gradients as well as hiding identities. Li~\textit{et al.}~~\cite{LW8_Privacy_IoV} use DGHV for masking gradients and Zero-Knowledge Proof (ZKP) for identity protection. Finally, He~\textit{et al.}~~\cite{MH9_He2021} specifically address the problem of aligning entities. This problem occurs for vertical federated learning where different parties hold complementary information about the same user. The parties have to find a way of matching these information without disclosing the identity of their users. To solve this problem, He~\textit{et al.}~ employ Encrypted Entity Alignment which is a protocol for privacy-preserving inter-database operations~\cite{MH9_He2021}. \subsubsection{RQ 4-5: Is the framework robust against malicious participants?} The experiments consider and simulate different types of adversaries, where some publications consider multiple types of attacks. Four groups of attack pattern were identified in the publications: random model poisoning, systematic model poisoning, reputation tampering (RT), and blockchain tampering. The most common attack considered in the experiments is random model poisoning. This includes attacks, where local models are trained on a randomly manipulated data set (\cite{LW10_refiner}, \cite{MH2_Kang2019}, \cite{MH7_Mugunthan2022}, \cite{KT10_Gao2021ICPP}) or where random parameter updates are reported (\cite{MH10_Qu2021}, \cite{LW1_witt2021rewardbased}, \cite{MH2_Kang2019}, \cite{LW5_FL_HomeAppliances_IoT}, \cite{MH1_Chai2021}, \cite{MH12_Zhu2021}, \cite{KT09_Zhang2021IJHPSA}). For instance, malicious agents in \cite{LW10_refiner} use a training dataset with intentionally shuffled labels, whereas in \cite{MH12_Zhu2021} the parameter updates are randomly perturbed with Gaussian noise. Kang~\textit{et al.}~~\cite{MH2_Kang2019} analyse the effects of a bad or manipulated data set by providing 8\% of the workers with training data where only a few classes are present, and another 2\% of the workers with mislabeled data. Kang~\textit{et al.}~ quantify the insufficiency of the dataset using the earth mover's distance. The second most commonly simulated type of attack is systematic model poisoning where the attackers manipulate the model through well-planned misbehavior. In \cite{MH11_Desai2021}, a fraction of workers colludes and manipulates their image classification data sets by introducing a so-called trojan pattern: the malicious agent introduces a white cross to a certain fraction of a class, e.g., to 50\% of all dog pictures in an animal classification task and re-labels these data points as horse pictures. This creates a backdoor in the model that cannot be detected by subjecting the model to dog or horse pictures which will be correctly classified. However, pictures with the trojan pattern will be misclassified. Other forms of systematic model poisoning can be found with Witt~\textit{et al.}~~\cite{LW1_witt2021rewardbased}, Mugunthan~\textit{et al.}~~\cite{MH7_Mugunthan2022}, Gao~\textit{et al.}~~\cite{KT10_Gao2021ICPP}. The third type of attack that was simulated is reputation tampering (RT). Here, malicious agents intentionally provide colluding agents with perfect reputation or voting scores \cite{MH2_Kang2019,MH7_Mugunthan2022}. The fourth type of attack is blockchain tampering \cite{KT09_Zhang2021IJHPSA}. Here, malicious miners intentionally fork the blockchain and prevail by building a longer branch faster than the honest miners. \subsection{RQ 5: Summary: What are Lessons Learned?} The inherent complexity of FLF leads to heterogeneity of the scientific research across the dimensions ({\textit{i}})\xspace application, ({\textit{ii}})\xspace overall design, ({\textit{iii}})\xspace special focus on open issues and ({\textit{iv}})\xspace details and thoroughness. \textbf{Application} Although the majority of analyzed works offer application independent frameworks (classified as "generic" in Table~\ref{table:FL}) other FLF are applied across IoT, Industrial-IoT (IIoT), IoV and Finance. The heterogeneity of the required properties across those domains causes differences in the design choices of function, operations and storage of blockchain, contribution measurement and privacy requirements. \textbf{Variety of possible design choices} In addition to the domain specific influence on the system architecture, design choices about the FL algorithms, communication protocol, applications of blockchain within the ecosystem, blockchain technology (existing or novel), storage and operation on blockchain, security trade-offs, mechanism design, contribution measurement, etc. add to the complexity and overall variety of such systems. For example, some works apply blockchain as the outer complementary layer \cite{LW7_Zhang_Reputation} while blockchain is the core infrastructure for coordination, storage, aggregation and payment in other FLFs \cite{LW1_witt2021rewardbased, LW10_refiner}. Furthermore, some works developed application specific blockchain systems, while others tried to embed a FLF on top of existing blockchain frameworks such as Ethereum for cheaper and pragmatic deployment. Our survey exposes a similar variety in the choice of the contribution measurement: The spectrum reaches from computationally lightweight correlation of answers on a public dataset \cite{LW1_witt2021rewardbased} as a proxy for contribution as opposed to the Shapley value, a measurement with strong theoretical properties but massive computational overhead \cite{LW9_FedCoin,MH9_He2021}. \textbf{Special Focus} The aforementioned complexity as well as its novelty result in many open issues across a broad spectrum. Many works therefore focus on solving specific issues such as enhanced privacy \cite{LW2_Weng2021, LW8_Privacy_IoV,LW12_Rahmadika2021_unlinkable, MH8_Fadaeddini2019}, novel blockchain systems \cite{LW4_FL_IIoT,LW9_FedCoin}, bandwidth reduction \cite{MH10_Qu2021}, novel contribution measurements \cite{LW1_witt2021rewardbased, LW9_FedCoin, MH10_Qu2021} or game theory (e.g. \cite{MH2_Kang2019, LW11_RewardResponseGame}), as the major contribution which further complicates a holistic comparison of FLF. \textbf{Thoroughness} The analyzed papers also vary heavily in provided detail and thoroughness, ranging from first concepts, lacking details in terms of important specifications such as performance, specific function, operation and storage on blockchain, contribution measurement, robustness, experiments and privacy to theoretically detailed and experimentally tested solutions. None of the analyzed papers are production-ready. \subsubsection{Standards for better comparability} For better reproducibility, implementability and comparability we suggest to consider and define the following elements when designing a FLF.\\[+6px] \noindent \underline{System model and architecture:} Assumed application, Type of FL (i.e., CD vs CS, horizontal vs vertical), Entities (including attackers), Setup (e.g., who manages a system, who deploys it), Role of blockchain within the FLF (e.g., what part does blockchain replace, what functions/operations), Blockchain design (e.g., consensus algorithms, blockchains, smart contracts), Non-blockchain design (e.g., off-chain storage, privacy protection, authentication), Procedures (e.g., flowcharts and diagrams), Theoretical analysis of the incentive mechanism, Specification of clients' contribution measurement, Possible attacks (e.g., system security, data privacy).\\[+6px] \noindent \underline{Performance analysis:} Quantitative performance analysis, Scalability analysis, Security analysis of the assumed attacks. \section{Future Research Directions} \label{sec:future_research_directions} \subsection{Blockchain} One of the major factors of the applicability of a FLF is its ability to scale beyond small groups towards mass adoption. Out of the 40~ papers, only 6 mentioned and considered scalability within the design of their respective FLF. Blockchain offers trust, immutability and decentralization for the operations and the information stored on it, yet is particularly influential on the overall scalability. The scalability is determined by ({\textit{i}})\xspace the function of blockchain in the FLF, ({\textit{ii}})\xspace operations performed onchain, ({\textit{iii}})\xspace blockchain framework and ({\textit{iv}})\xspace the amount of storage onchain. Blockchain becomes a scalability bottleneck if it is part of the operating core infrastructure of the FLF (e.g. \cite{LW1_witt2021rewardbased}) and not only a complementary outer layer technology (e.g. \cite{LW7_Zhang_Reputation}), or if heavy operations such as aggregation or reward calculation are performed on-chain \cite{LW9_FedCoin}. Furthermore, it may become a bottleneck if the blockchain framework is public and used outside the realm of the FLF or the consensus mechanism is resource-intense (Proof of Work) or if heavy amount of information are stored on the blockchain such as model updates. A promising future research direction is the application of Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (ZK-SNARKs)\cite{Pinto2020zkSNARKs} in the FLF context. ZK-SNARKs is a promising cryptographic technology that allows a \textit{prover} to prove to a \textit{verifier} that a computation has has been executed without revealing the program itself. As verification can be fast and easily done on the smart contract, it might improve the scalability of blockchain-enabled FLF dramatically. FLF specific blockchain systems claim to solve important shortcomings of existing blockchain frameworks, e.g. replacing the computational overhead of the Proof of Work systems with computational heavy tasks in FLF like model parameter \cite{KT08_Qu2021TPDS} or reputation verification \cite{LW7_Zhang_Reputation} or calculate the contribution measurement \cite{LW9_FedCoin}. Other FLF specific blockchain systems utilize efficient AI hardware \cite{KT09_Zhang2021IJHPSA} or enhance the overall privacy for the FLF processes \cite{LW2_Weng2021}. Yet a widely ignored topic in the scientific literature is the incurred deployment and maintenance cost of unproven novel blockchain systems in practice. Introducing a new, highly complex infrastructure introduces security risks and requires a large team of experts to run and maintain such a system in practice. Deployment on already existing blockchain frameworks may mitigate the additional complexity and risks but might be less efficient. Developing simple application specific blockchain systems, stress-testing them under realistic assumptions and analysing their theoretical properties is an important future research direction towards production-ready FLFs. \subsection{Incentive Mechanisms} Measuring workers' contribution is open research and varies heavily in the analyzed literature. So far, five major contribution measurements are considered in the literature.\\[+6px] \textbf{Honest Report/Full Information} rewards are calculated on the basis of the clients report of the amount of data, local accuracy or local loss. Yet reward systems based on such simplified assumptions may not be applicable in any real-world scenario as the dominant strategy for an individual-rational agent is dishonest behavior (report the best possible outcome without costly model-training). Applying Trusted Execution Environments might solve the issue, yet might be an infeasible technical requirement for mobile, edge or IoT devices.\\ \textbf{Reputation systems} Reward mechanisms based on the clients' reputation or majority voting are an interesting research avenue, promising to relax heavy verification and control mechanics for high reputation clients. How to quantify the reputation in a fair and robust fashion remains open research.\\ \textbf{Direct Measures} Direct Measurement such as assessing each client's model update on a public dataset/testset requires ({\textit{i}})\xspace a trusted central authority performing such tests and ({\textit{ii}})\xspace limits scalability due to the computational overhead.\\ \textbf{Exact Measures} The Shapley value of cooperative game theory is a common method for measuring the contribution of an agent in FL due to it's desired properties of efficiency, symmetry, linearity and null-player, yet comes at the cost of heavy computational overhead (even when optimized \cite{shapleyeval, wang2020principled}) limiting the scalability of the framework and questioning the practicability of this approach.\\ \textbf{Correlation based Measures} Without having access to the ground truth, the reward is calculated based upon the correlation of the reported signals of peers. This implicit approach does not require an explicit contribution measurement and therefore avoids computational overhead.\\[+6px] Correlation based reward mechanisms such as Correlated Agreement (CA) \cite{LIU_CA, CA_HONGTAO} or Peer-Truth Serum \cite{LW1_witt2021rewardbased} are an interesting future research direction because their lightweight computation allows for potential execution atop of blockchain. Theoretical analysis of the designed incentive mechanisms, as performed by 12 out of 40 papers, requires simplifications and assumptions with respect to ({\textit{i}})\xspace information availability ({\textit{ii}})\xspace uniformity in utility functions or ({\textit{iii}})\xspace individual rationality which might not guarantee the robustness of the mechanisms in a real-world scenario. Specifically, as clients are humans, they may not follow their optimal strategies derived by analysis. For instance, not all clients would take the cost of energy consumption into account when determining their strategies. We suggest taking humans' behavioral bias (e.g. prospect theory \cite{Kahneman1979, Tversky1992}) as well as non-quantifiable measures (e.g. utility of privacy) into the analysis of incentive mechanisms. \subsection{Federated Learning} While many papers conducted performance evaluation, they often did not consider realistic scenarios: ({\textit{i}})\xspace rather well-known benchmark datasets such as MNNIST and CIFAR-10 are chosen (29 out of 34} experiments on classification) and ({\textit{ii}})\xspace the non-IID setting is only applied in 11 out of 34 papers. Furthermore, inconsistencies between the targeted FL setting (i.e. CS, CD) and number of clients in the experiments are observed. In particular, FLFs that assume CD should simulate a large number of clients, however, only Kang~\textit{et al.}~~\cite{MH2_Kang2019} and Desai~\textit{et al.}~\cite{MH11_Desai2021} conducted experiments with 100 participants or more (\tablename~\ref{table:experiments}). To better evaluate FLFs, we suggest using datasets dedicated to FL (e.g. LEAF~\cite{Caldas2018LEAF}) as well as simulating different levels of non-IID data among clients (e.g., Dirichlet distribution \cite{LW1_witt2021rewardbased}). Deployment on clusters of inexpensive computers such as Raspberry Pi \cite{wang2021raspberrypi} might realistically simulate large-scale FL scenarios under the CD assumption. Another open research domain is the application of FLFs to machine learning tasks beyond supervised learning: tasks such as natural language processing, user behavior analytics or unsupervised learning tasks might rely on more complex neural network architectures. This in turn might require new or adapted model aggregation algorithms that might come with new implications for the incentive design and blockchain integration. In addition, assuming heterogeneity of clients with different hardware and restrictions requires flexibility on the Neural Network choice (e.g., Federated Knowledge Distillation \cite{LW1_witt2021rewardbased}). Despite FL being a data privacy preserving technology by design, research has shown that certain characteristics of the underlying training data sets can be inferred from the global model and that additional privacy preserving measures are recommended. Our review shows that two classes of security concerns are targeted by the publications, namely (i) leakage of data set characteristics and (ii) disclosure of participant identities. Although a substantial number of papers (20 out of 40) address one of these concerns, only a single paper addresses both~\cite{LW8_Privacy_IoV}. Moreover, preventing data set leakage through DP or MPC inflicts trade-offs. Specifically, DP comes with a trade-off between data security and model accuracy, while MPC comes with a trade-off between data security and computation complexity, and it might thus not be applicable with a large number of participants~\cite{MH4_Ma2021}. It is worth noting that the model accuracy of DP cannot be inherently improved due to intentionally added noise. Hence, it would be important to explore lightweight MPC algorithms \cite{MH_SECURE_AGG} to accommodate a large number of clients for privacy-preserving FL. \section{Conclusion and Outlook} \label{sec:conclusion} FL is a promising new AI paradigm, focused on confidential and parallel model training on the edge. In order to apply FL beyond small groups of entrusted entities, a decentralization of power as well as compensation for participating clients has to be incorporated into the Federated Learning Framework. This work traversed and analyzed 12 leading scientific databases for incentivized and decentralized FLFs based on the PRISM methodology, ensuring transparency and reproducibility. 422~ results were found and 40~ works analyzed in-depth after three filtering rounds. We overcame the challenge of heterogeneity of FLFs in terms of use-cases, applied focus, design choice and thoroughness by offering a comprehensive and holistic comparison framework. By exposing limitations of existing FLFs and providing directions for future research, this work aims to enhance the proliferation of incentivized and decentralized FL in practice. \appendices \begin{comment} \ifCLASSOPTIONcompsoc \section*{Acknowledgments} \else \section*{Acknowledgment} \fi This work was supported in part by KAKENHI from MEXT/JSPS, Japan, under Grant 18K18162 and in part by the German Federal Ministry of Education and Research (BMBF) through the BIFOLD - Berlin Institute for the Foundations of Learning and Data (ref. 01IS18025A and ref. 01IS18037I) and the European Union’s Horizon 2020 Research and innovation Programme under Grant Agreement No. 957059. \ifCLASSOPTIONcaptionsoff \newpage \fi \end{comment} \bibliographystyle{IEEEtran} \section{Introduction}\label{sec:introduction}} \section{Related Surveys and Motivation of This Paper} \label{sec:related-work} We have identified several survey papers in the context of either mechanism design and FL \cite{SP_FL_MD,SP_MD_IEEE,SP_MD_ARXIV} or blockchain and FL \cite{SP_Blockchain_IEEE, SP_MD_ARXIV, SP_FL_TECHRXIV}. \tablename~\ref{table:comparison_of_related_survey_papers} shows the comparison of the related survey papers and our own. Hou \textit{et al.}~ surveyed the state-of-the-art blockchain-enabled FL methods \cite{SP_Blockchain_IEEE}. They focused on how blockchain technologies are leveraged for FL and summarized them based on the types of blockchain (public or private), consensus algorithms, solved issues and target applications. The other related survey papers focus on incentive mechanisms for FL \cite{SP_MD_IEEE, SP_MD_ARXIV, SP_FL_TECHRXIV, SP_FL_MD}. Zhan \textit{et al.}~ survey the incentive mechanism design dedicated to FL \cite{SP_MD_IEEE}. They summarize the state-of-the-art research efforts on the measures of clients' contribution, reputation and resource allocation in FL. Zeng \textit{et al.}~ also survey the incentive mechanism design for FL \cite{SP_MD_ARXIV}. However, the difference is that they focus on incentive mechanisms such as Shapley values, Stackelberg game, auction, context theory and reinforcement learning. Ali \textit{et al.}~ survey incentive mechanisms for FL \cite{SP_FL_TECHRXIV}. In addition to \cite{SP_MD_IEEE} and \cite{SP_MD_ARXIV}, they summarize involved actors (e.g. number of publishers and workers), evaluation datasets as well as advantages and disadvantages of the mechanisms and security considerations. Tu \textit{et al.}~ \cite{SP_FL_MD} provide a comprehensive review for economic and game theoretic approaches to incentivize data owners to participate in FL. In particular, they cluster applications of Stackelberg games, non-cooperative games, sealed-bid auction models, reverse action models as well as contract and matching theory for incentive MD in FL. Nguyen \textit{et al.}~ investigate opportunities and challenges of blockchain-based federated learning in edge computing \cite{FLBlockchainOpportunitiesChallanges}. As revealed from our analysis and summarized in \tablename~\ref{table:comparison_of_related_survey_papers}, the existing survey papers lack a holistic view of decentralized \textit{and} incentivized federated learning which is crucial to spreading the new generation of widely adopted fair and trustworthy FL to the benefit of the data owner. To the best of our knowledge, this paper is the first systematic literature review on the topic of blockchain-enabled decentralized FL with incentive mechanisms. \begin{table}[t] \centering \caption{Comparison of related survey papers.} \resizebox{\columnwidth}{!}{ \label{table:comparison_of_related_survey_papers} \rowcolors{2}{tableoddrow}{tableevenrow} \begin{tabular}{C|CCCC} \rowcolor{tableheader} Ref. & Blockchain & Federated Learning & Incentive Mechanism & Experiment Analysis\\ \hline \cite{SP_Blockchain_IEEE} & \checkmark & \checkmark & \xmark &\xmark\\ \cite{SP_MD_IEEE} & Partially & \checkmark &\xmark &\xmark\\ \cite{SP_MD_ARXIV} & Partially & \checkmark & \checkmark &\xmark\\ \cite{SP_FL_TECHRXIV} &\xmark & \checkmark & \checkmark & \xmark\\ \cite{SP_FL_MD} &\xmark & \checkmark & \checkmark & \xmark\\ \cite{FLBlockchainOpportunitiesChallanges} & Partially & \checkmark & Partially & \xmark \\ \textbf{This work} & \checkmark (\textbf{Detailed}) & \checkmark & \checkmark & \checkmark\\ \end{tabular} } \end{table} \section{Number of Papers by Publishers} An overview of the number of papers found and included by publishers can be found in Table \ref{tab:summary_of_search_results}. \begin{table}[t] \centering \caption{Number of papers found and included by publishers.} \label{tab:summary_of_search_results} \rowcolors{2}{tableoddrow}{tableevenrow} \resizebox{\columnwidth}{!}{ \begin{tabular}{C|RR} \rowcolor{tableheader} Publisher & \#Papers Found & \#Papers Included \\ \hline Springer & 167 & 5\\ ScienceDirect & 95 & 1\\ ACM & 30 & 4 \\ IEEE & 29 & 21+2\footnote{2 Survey Papers} \\ Emerald insight & 29 & 0 \\ MDPI & 27 & 3 \\ Hindawi & 20 & 2 \\ Tayler \& Francis & 18 & 1\\ SAGE journals & 5 & 0\\ Inderscience & 2 & 0\\ Wiley & 0 & 0 \\ \hline Total & 422 & 39 \\ \end{tabular} } \end{table} \begin{comment} \begin{table}[t] \centering \caption{Notation table.} \label{tab:notation_table} \rowcolors{2}{tableoddrow}{tableevenrow} \begin{tabular}{C|L} \rowcolor{tableheader} Name & Definition \\ \hline n.s. & Not specified \\ n.a. & Not applicable \\ \checkmark & True \\ \xmark & False \\ CS & cross-silo (few clients ) \\ CD & cross-device (many clients )\\ \end{tabular} \end{table} \end{comment} \section{Definition of Columns in the Overview Tables} Table \ref{tab:columns_definition} defines the categories used in the explanatory tables 1-4 of the main paper. \begin{table*}[t] \centering \caption{Definition of columns in the overview tables.} \label{tab:columns_definition} \rowcolors{2}{tableoddrow}{tableevenrow} \resizebox{\textwidth}{!}{ \begin{tabular}{C|LLL} \rowcolor{tableheader} Table & Column & Definition & Possible Values and Examples \\ \hline \cellcolor{tableoddrow} & Application & The field of application of a FLF & Generic, Internet of Things (IoT), \dots \\ \cellcolor{tableoddrow} & Domains of key contributions & To which domains each paper contribute & System architecture, blockchain, \dots \\ \cellcolor{tableoddrow} & FL setting & Whether a type of FL is given & CS (cross-silo), CD (cross-device)\\ \cellcolor{tableoddrow} & Actors & The key actors in the FLF & Workers, aggregation servers, task publishers, \dots \\ \multirow{-5}{*}{\cellcolor{tableoddrow} FL (\tablename~\ref{table:FL})} & Setup period & Whether information about the setup of a FLF is included (e.g. who deploys a blockchain) & \checkmark / \xmark\\ \hline \cellcolor{tableevenrow} & Operation on BC & Operations taking place on-chain & Aggregation, payment, coordination, storage\\ \cellcolor{tableevenrow} & BC framework & The underlying Blockchain framework applied within the FLF & Agnostic, novel, Ethereum, Corda \dots \\ \cellcolor{tableevenrow} & Consensus mechanism & The consensus mechanism of BC applied in the FLF & PoW, PoS, PBFT, novel, \dots \\ \cellcolor{tableevenrow} & Storage on BC & Information that is stored on the Blockchain. & Gradients/model parameters, reputation scores \dots \\ \cellcolor{tableevenrow} & Storage quantification & Whether the amount of information stored on the BC is analyzed & \checkmark / \xmark \\ \cellcolor{tableevenrow} & Storage off-chain & Whether to store data off-chain, such as Interplanetary File System (IPFS) & \checkmark / \xmark \\ \multirow{-7}{*}{\cellcolor{tableevenrow}BC (\tablename~\ref{table:blockchain})} & Scalability & Whether scalability is considered. & \checkmark / \xmark \\ \hline \cellcolor{tableoddrow} & Simulation & Whether profits, rewards or utilities were evaluated via simulation & \checkmark / \xmark \\ \cellcolor{tableoddrow} & Theoretical analysis & Whether profits, rewards or utilities were theoretically analyzed & \checkmark(Used theory) / \xmark \\ \cellcolor{tableoddrow} & Costs assumed in utility analysis & Cost elements considered for theoretical analysis & Energy consumption, \dots, or \xmark\ if not used \\ \cellcolor{tableoddrow} & Metrics for contribution measurement & Metrics used to validate workers' contribution & Accuracy, data size, \dots or \xmark\ if not used \\ \multirow{-5}{*}{\cellcolor{tableoddrow}IM (\tablename~\ref{table:incentive_mechanism})} & Validator & Entities that validate workers' contribution & Task requesters, smart contracts, \dots \\ \hline \cellcolor{tableevenrow} & ML task & Machine Learning task of the experiment & Classification, regression, \dots \\ \cellcolor{tableevenrow} & Dataset & Datasets on which the experiments are conducted & MNIST, CIFAR10, \dots \\ \cellcolor{tableevenrow} & Number of Clients & Number of clients within the experiments & \\ \cellcolor{tableevenrow} & FL algorithm & FL algorithm applied within the experiments & \texttt{FedAvg},\texttt{FedProx} \dots \\ \cellcolor{tableevenrow} & Privacy protection & Whether additional privacy protection methods are applied within the experiments & \checkmark / \xmark \\ \cellcolor{tableevenrow} & Non-IID data & Whether experiments are conducted under the non-IID condition & \checkmark / \xmark \\ \cellcolor{tableevenrow}& Adversaries & Whether the FNFs robustness is tested with malicious agents & \checkmark / \xmark \\ \cellcolor{tableevenrow} & BC implementation & Whether the blockchain part of the FNF is implemented for conducting experiments & \checkmark / \xmark \\ \multirow{-9}{*}{\cellcolor{tableevenrow}Experiments (\tablename~\ref{table:experiments})} & Performance & Whether the performance within the experiments of the FL model is measured & \checkmark / \xmark \\ \hline \end{tabular} } \end{table*} \section{Privacy-preserving concepts employed in survey papers} Figure \ref{abb:PrivacyClassification} gives an overview of the privacy-preserving concepts employed in survey papers. \begin{figure} \centering \resizebox*{0.95\linewidth}{!}{% \begin{forest} forked edges, for tree={ grow'=east, draw, rounded corners, text width=2cm, node options={align=center}, } [Privacy-preserving \\concepts in the \\surveyed papers, fill=col5, parent, s sep=1cm [Update \\masking \\\cite{LW10_refiner, MH11_Desai2021, Bao2019FLChain, LW6_Rahmadika2020}, fill=col4 [Multi-Party \\Computation (MPC), for tree={child, fill=col3} [Google's Secure \\Aggregation (SA) \\\cite{MH4_Ma2021, LW9_FedCoin}, for tree={child, fill=col2}] [Yao's garbeled \\ circuits, fill=col2] [Homomorphic \\Encryption (HE)\\\cite{MH9_He2021, MH14_Rathore2019, LW3_Kumar2020}, for tree={child, fill=col2} [Paillier \\\cite{MH12_Zhu2021, LW2_Weng2021}, fill=col1] [RSA, fill=col1] [DGHV\\\cite{LW8_Privacy_IoV}, fill=col1] [Elgamal \\\cite{MH13_Li2020},fill=col1] ] ] [Differential \\Privacy (DP) \\\cite{MH7_Mugunthan2022, LW5_FL_HomeAppliances_IoT, LW3_Kumar2020}, fill=col3] ] [Identity \\protection, fill=col4 [Combination of HE and/or other cryptographic techniques, fill=col3 [\cite{LW8_Privacy_IoV}: Zero-Knowledge \\Proof (ZKP) , for tree={child, fill=col2}] [\cite{LW12_Rahmadika2021_unlinkable}: Ring signature~\& RSA~\& Rabin~\& ECC , for tree={child, fill=col2}] [\cite{LW14_5G_Rahmadika2021}: Pairing-based cryptography~\& ECC , for tree={child, fill=col2}] [\cite{MH1_Chai2021}: Asymmetric cryptography~\& digital signatures , for tree={child, fill=col2}] ] ] ] \end{forest} } \caption{Privacy-preserving concepts employed in survey papers. \textit{\footnotesize (DGHV = Dijk-Gentry-Halevi-Vaikutanathan Algorithm, ECC = Elliptic Curve Cryptography, RSA = Rivest-Shamir-Adleman Cryptosystem. Papers with unspecified methods are added to next highest node.)}} \label{abb:PrivacyClassification} \end{figure} \bibliographystyle{IEEEtran}
\section*{Acknowledgment} Acknowledgment: This work was partially supported by National Key Research and Development Project (2021YFB1714400) of China and Guangdong Provincial Key Laboratory (2020B121201001). \subsection{Datasets} \begin{table*}[t] \centering \footnotesize \caption{ Effectiveness Evaluation on TaxiBJ and TaxiNYC }\label{tab:result1} \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|} \hline & \multicolumn{5}{|c|} { \textbf{TaxiBJ} } & \multicolumn{5}{|c|} { \textbf{TaxiNYC} } \\ \hline Model & MSE & RMSE & MAE & MAPE & Improved & MSE & RMSE & MAE & MAPE & Improved \\ \hline HistoricalAverage & $2025.328$ & $45.004$ & $24.475$ & $8.04 \%$ & $\backslash$ &$463.763$ & $21.535$ & $7.121$ & $4.56 \%$ &$\backslash$\\ CopyYesterday & $1998.375$ & $44.703$ & $22.454$ & $8.14 \%$ & $\backslash$ & $1286.035$ & $35.861$ & $10.164$ & $5.78 \%$ &$\backslash$\\ CNN & $554.615$ & $23.550$ & $13.797$ & $8.46 \%$ &$\backslash$ & $280.262$ & $16.741$ & $6.884$ & $8.08 \%$&$\backslash$ \\ ConvLSTM & $370.448$ & $19.247$ & $10.816$ & $5.61 \%$ &$\backslash$ &$147.447$ & $12.143$ & $4.811$ & $5.16 \%$&$\backslash$ \\ ST-ResNet & $349.754$ & $18.702$ & $10.493$ & $5.19 \%$ & $\backslash$&$133.479$ & $11.553$ & $4.535$ & $4.32 \%$ &$\backslash$\\ DMVST-Net & $415.739$ & $20.389$ & $11.832$ & $5.99 \%$ & $\backslash$&$185.601$ & $13.605$ & $4.928$ & $4.49 \%$ &$\backslash$\\ PCRN & $355.511$ & $18.855$ & $10.926$ & $6.24 \%$ & $\backslash$&$181.091$ & $13.457$ & $5.453$ & $6.27 \%$&$\backslash$ \\ CNN-ExpertNet & 342.737& 18.513& 10.356& 5.28\%&\textbf{62\%}& 114.717 & 10.711 & 4.186& 4.50\% &\textbf{144\%} \\ ConvLSTM-ExpertNet & \textbf{328.250}& \textbf{18.117}& \textbf{10.079}& \textbf{4.95}\% & 12\% &\textbf{109.445}& \textbf{10.503}& \textbf{4.104}& \textbf{3.93}\%& 36\% \\ ST-ResNet-ExpertNet & {330.258}& {18.173}& {10.283}& {5.05}\% &6\% &111.445& 10.557& 4.264& 4.04\% &20\% \\ \hline \end{tabular} \end{table*} \begin{table*}[t] \centering \footnotesize \caption{ Effectiveness Evaluation on BikeNYC-I and BikeNYC-II }\label{tab:result2} \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|} \hline & \multicolumn{5}{|c|} { \textbf{BikeNYC-I} } & \multicolumn{5}{|c|} { \textbf{BikeNYC-II} } \\ \hline Model & MSE & RMSE & MAE & MAPE & Improved & MSE & RMSE & MAE & MAPE & Improved \\ \hline HistoricalAverage & ~$245.743$~ & $15.676$ & $4.882$ & $5.45 \%$ & $\backslash$ &~$23.757$~ & ~$4.874$~ & $1.500$ & $3.30 \%$ &$\backslash$\\ CopyYesterday & ~$241.681$~ & $15.546$ & $4.609$ & $5.36 \%$ & $\backslash$ & ~$54.054$~ & ~$7.352$~ & $1.995$ & $3.94 \%$ &$\backslash$\\ CNN & ~$145.549$~ & $12.064$ & $4.088$ & $5.82 \%$ &$\backslash$ & ~$20.351$~ & ~$4.511$~ & $1.574$ & $3.98 \%$&$\backslash$ \\ ConvLSTM & ~$43.765$~ & $6.616$ & $2.412$ & $3.90 \%$ &$\backslash$ &~$10.076$~ & ~$3.174$~ & $1.133$ & $2.90 \%$&$\backslash$ \\ ST-ResNet & ~$37.279$~ & $6.106$ & $2.360$ & $3.72 \%$ & $\backslash$&~$10.182$~ & ~$3.191$~ & $1.169$ & $2.86 \%$ &$\backslash$\\ DMVST-Net & ~$63.849$~ & $7.990$ & $2.833$ & $3.93 \%$ & $\backslash$&~$12.397$~ & ~$3.521$~ & $1.287$ & $2.97 \%$ &$\backslash$\\ PCRN & ~$130.878$~ & $11.440$ & $3.790$ & $4.90 \%$ & $\backslash$&~$10.893$~ &~ $3.300$ ~& $1.185$ & $3.04 \%$&$\backslash$ \\ CNN-ExpertNet & ~36.068~ & 6.006& 2.244& 3.60\%& \textbf{304\%}& ~ 8.577~ & ~2.929~ & 1.100 & 2.42\% &\textbf{137\%} \\ ConvLSTM-ExpertNet & ~\textbf{35.338}~& \textbf{5.945}& \textbf{2.153}& \textbf{3.48}\% & 24\% &~\textbf{8.574} ~&~ \textbf{2.928}~& \textbf{1.061}& \textbf{2.40}\%& 18\% \\ ST-ResNet-ExpertNet & ~36.722~& 6.073& 2.376& 3.67\% &1.52\% &~8.806~& ~2.968~& 1.174& 2.88\% &16\% \\ \hline \end{tabular} \end{table*} \noindent\textbf{TaxiBJ}: Trajectory GPS data is collected in Beijing \cite{zhang2017deep} taxicab from four-time intervals: 01/07/2013 - 30/10/2013, 01/03/2014 - 30/06/2014, 01/03/2015 - 30/06/2015, and 01/11/2015 - 10/04/2016. The map of Beijing is split into $32 \times 32$ uniform regions, and metadata features are also stored in this dataset with temperature, wind speed, weather conditions, and holidays information. \noindent\textbf {TaxiNYC}. TaxiNYC is the taxi in-out flow data created \cite{yao2019revisiting} from 01/01/2015 to 03/01/2015 in NYC-Taxi. We use the holidays and time information as external factors. \noindent\textbf {BikeNYC-I, BikeNYC-II} These datasets are published \cite{yao2019revisiting} and \cite{lin2019deepstn} from time intervals: 07/01/2016 - 08/29/2016 and 4/1/2014-9/30/2014 respectively in NYC-Bike. I and II are used to distinguish the datasets released from different sources. \subsection{Evaluation Metric} We use MSE (Mean Squared Error), RMSE (Root Mean Square Error), MAE (Mean Absolute Error) and MAPE (Mean Absolute Percentage Error) to evaluate our algorithm, which are defined as follows: \begin{align*} \left\{\begin{aligned} MSE &=\frac{1}{N} \sum_{i=1}^{N} \left(\hat{Y}_{t+1}^{i}-Y_{t+1}^{i}\right)^{2} \\ R M S E&= \sqrt{\frac{1}{N} \sum_{i=1}^{N}\left(\hat{Y}_{t+1}^{i}-Y_{t+1}^{i}\right)^{2}}\\ M A E&=\frac{1}{N} \sum_{i}^{n}\left|\hat{Y}_{t+1}^{i}-Y_{t+1}^{i}\right|\\ M A P E& =\frac{1}{N} \sum_{i}^{n}\left|\frac{\hat{Y}_{t+1}^{i}-Y_{t+1}^{i}}{\hat{Y}_{t+1}^{i}}\right| \end{aligned}\right. \end{align*} where $\hat{Y}_{t+1}^{i}$ and $Y_{t+1}^{i}$ mean the prediction value and real value of region $i$ for time interval $t+1$, and where $N$ is a total number of samples. \subsection{Methods for Comparison } \begin{figure*}[t] \centering \includegraphics[width=0.8\linewidth]{image/expert_distribution.pdf} \caption{The ST-ExpertNet $\mathbf{G_s}$ attention visualization with spatial aspect.} \label{fig:attentionspatial} \end{figure*} We compared our model with the following methods and tuned the parameters for all the methods. Then we report the best performance in the validation set. Additionally, to test ST-ExpertNet's general applicability, we apply the architect of CNN, ConvLSTM, and ST-ResNet into our model. Here we follow the experiment setting on the benchmark work \cite{jiang2021dl} in traffic flow prediction, and the detailed implements for each ST-ExpertNet are listed as follows: \begin{itemize} \item[$\bullet$] Historical average (HA): Historical average predicts the future flow by averaging the value of previous flow at the same region in the same relative time interval. \item[$\bullet$] Pure CNN. It is a basic popular deep learning baseline in flow prediction constructed with three CNN layers with 64 filters of the $3\times3$ kernel. The ReLU activation function and BatchNormalization are added between two consecutive layers. Pure CNNs architecture had been deployed, which only set ReLU operations in the final output. \item[$\bullet$] ConvLSTM. The convolutional LSTM \cite{shi2015convolutional} extends the fully connected LSTM (FC-LSTM) \cite{zhao2019long} and maintains the advantage of FC-LSTM. Further, the convolutional operations staid in input-to-state and state-to-state transitions provide opportunities to capture both spatial and temporal dependency. The ConvLSTM layers maintain 32 filters of 3×3 kernel size. Four ConvLSTM layers are used and the ReLU operation is set in the final output. \item[$\bullet$] ST-ResNet \cite{zhang2017deep}: ST-ResNet extends the ResNet \cite{he2016deep} into the framework of traffic prediction. Moreover, the three blocks of ResNet have been designed to process the hour, day, and week patterns, respectively. The length of the sequences on closeness, period and trend are set as $l_c=3$, $l_p=1$, $l_t=1$. Each block in ST-ResNet owns 3 residual units with the 32 filters of 3×3 kernels. \item[$\bullet$] DMVST-Net. DMVST-Net \cite{yao2018deep} combines spatial and temporal information using local CNN and LSTM. The local CNN only capture spatial feature among nearby grids and LSTM only process the recent time intervals. \item[$\bullet$] PCRN. PCRN-CRN \cite{zonoozi2018periodic} focus on capturing the periodic patterns in Spatio-temporal data by using ConvGRU model \cite{ballas2015delving}. The pyramidal architecture by stacking three convolutional RNN layers has been proposed to learn the spatial and temporal features simultaneously. \item[$\bullet$] CNN-ExpertNet. We deploy the CNN into ST-ExpertNet with 10 Expert Networks. For each ExpertNet, we set up the same architecture as pure CNN. \item ConvLSTM-ExpertNet. The architect of ConvLSTM has been adopted in Expert-Net and the number of Expert Networks is set 3. Meanwhile, ExpertNet in ConvLSTM-ExpertNet also owns the same architecture as ConvLSTM. \item[$\bullet$] ST-ResNet-ExpertNet. In order to compare the performance with the original ST-ResNet, we retain the same architect of ST-ResNet and use only three expert networks. Note that the ST-ResNet-ExpertNet indicates that the three ResNet as the same as ST-ResNet but not the three ST-ResNet blocks. For a detailed comparison with ST-ResNet and ST-ResNet-ExpertNet, please see supplementary materials. \end{itemize} For all different architectures of ST-ExpertNet, the $G_s$ and $G_t$ are simply designed as the same structure of pure CNN with 64 filters of $3\times3$ kernel. \subsection{Preprocessing} Here, we scale all flow datasets into $[0,1]$ using the Min-Max normalization method. For MSE and RMSE, the values are re-scaled back to the normal values. Then, we use the one-hot coding method to transfer them into binary vectors for external factors of discrete value in Beijing, such as DayOfWeek, and Weekend/Weekday. For other factors of continuous values in Beijing, like temperature and wind speed, we use the Min-Max normalization method. Finally, external factors in New York are set with holidays and time information. \begin{figure}[h] \centering \includegraphics[width=1\linewidth]{Quade_Test.pdf} \caption{Quade Test analysis result at different setting of CNN-ExpertNet trained on TaxiBJ.}\label{Quade Test} \vspace{-0.5cm} \end{figure} \begin{figure} \centering \includegraphics[width=1\linewidth]{image/expert_vis} \caption{Visualize the attention for different functional expert in TaxiBJ.} \label{fig:expertvis} \end{figure} \subsection{Hyperparameters} For all methods with convolution filter, we set the kernel size with $3\times 3$. There are five additional hyperparameters: the number of experts $K$, the penalty terms $\lambda_{er}$ and $\lambda_{eid}$ for $L_{eid}$ and $L_{er}$, respectively, the length of three dependent sequences $l_{c}, l_{p}, l_{q}$ in our ST-ExpertNet. For the parameters $k ,l_{c}, l_{p}$ and $ l_{q}$, we select the best parameters in $k, l_{c},l_{p}, l_{q} \in \{1,2,3,4,5,6,7,8,9,10\}$. For the penalty term $\lambda_1$ and $\lambda_2$, we choose $\{10^{-5},10^{-4},10^{-3},10^{-2},10^{-1},1\}$. The parameter $T$ in each ST-model is set as 0.8. The uniform distribution approach in Pytorch \cite{paszke2019pytorch} is implemented in learnable parameters. We select $80 \%$ of the data as training data and $20 \%$ of the training data as a validation set, which help to early-stop each model based on the best validation score. The batch size is set as 32 and Adam \cite{kingma2014adam} is used for optimization with learning rate $10^{-3}$. \begin{figure*}[t] \centering \includegraphics[width=1\linewidth]{image/temporal_distribution} \caption{ \textbf{The ST-ExpertNet $\mathbf{G_s}$ attention visualization with temporal aspect.} A. \textnormal{The resident area outflow change within one day in Beijing.} B. \textnormal{The office area expert attention value.} C. \textnormal{The resident area expert attention value.} D. \textnormal{The office area inflow change within one day in Beijing.}} \label{fig:attentiontemporal} \end{figure*} \begin{figure*}[h] \centering \subfloat{\includegraphics[width=0.24\textwidth]{parameters_k_BikeNYC-I.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_k_BikeNYC-II.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_k_TaxiBJ.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_k_TaxiNYC.pdf}} \subfloat{\includegraphics[width=0.24\textwidth]{parameters_er_BikeNYC-I.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_er_BikeNYC-II.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_er_TaxiBJ.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_er_TaxiNYC.pdf}} \subfloat{\includegraphics[width=0.24\textwidth]{parameters_eid_BikeNYC-I.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_eid_BikeNYC-II.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_eid_TaxiBJ.pdf}} \hfill \subfloat{\includegraphics[width=0.24\textwidth]{parameters_eid_TaxiNYC.pdf}} \caption{Parameter analysis. }\label{fig:Parameter_analysis} \end{figure*} \subsection{Result Analysis} We first compare with seven other models in TaxiBJ, TaxiNYC, BikeNYC-I, and BikeNYC-II, as shown in \tableref{tab:result1} and \tableref{tab:result2}. We give three variants of ST-ExpertNet by adopting different architectures: CNN, ConvLSTM and ST-ResNet, which are often deployed in crowd flow prediction task. The results in \tableref{tab:result1} and \tableref{tab:result2} shows that these baseline models have been greatly improved by adapting them into ST-ExpertNet. By observing experimentally, we find that for weak learners, the network is suitable to set up more experts, and each weak learner can learn a basic pattern from input, which may be easier to train and achieve higher improvements than other complicated learners. Further, we discover that data sets will also have influences on different architectures of ST-ExpertNet. For example, CNN-Expert-Net gets 137\%, 144\%, and 304\% improved in NYC, but still has a big gap compared to the state of the arts in TaxiBJ. We consider the reason is that the time span in TaxiBJ is large and the relationship between regions and patterns processes higher nonlinearity, which may be more unpredictable for weak learners. On the contrary, the TaxiNYC and BikeNYC datasets contains less than three months data, which may be suitable for simple models. For ConvLSTM and ST-ResNet in ST-ExpertNet, we see that the model still gets satisfying performance with only a few number of experts. For more detailed information on model running time and parameter scales, please refer to supplementary materials. \subsection{Parameter Analysis} \noindent\textbf{Statistical Analysis} To statistically analyze the discrepancy between experts, the Quade test \cite{quade1979using} is used, which is a non-parametric test to see if $k$ experiment outcomes have identical effects. The null hypothesis of the test assumes an identical distribution for all test cases. In our paper, we set $k$=2 and compute the pairwise p-value for all the experts. Formally, given two expert outputs $Y_1, Y_2 \in \mathbb{R}^{n\times 2 \times h \times w}$, where $n$ denotes the number of samples (batch size), we calculate the p-value between two experts as \begin{align*} p-value=\frac{1}{2\times h\times w}\sum_{c=1}^{2}\sum_{i=0}^{h}\sum_{j=0}^{w} Quade(Y_1^{:,c,h,w},Y_2^{:,c,h,w}). \end{align*} The $Quade$ function outputs the significance level of the Quade test and $c$ denotes the index of in-out flow channel. The final p-value is calculated as the arithmetic mean of significance levels from two experts' regional outputs, and a smaller p-value indicates higher variance between the two experts. \figref{Quade Test} shows the pairwise p-values of the test results for all 10 experts in CNN-ExpertNet under $\lambda_{eid}=0$ and $\lambda_{eid}=0.1$. It is obvious that pairwise p-values are much lower after using \textit{Experts Inter Discrepancy Loss} by setting $\lambda_{eid}=0.1$. It is also noted that the max pairwise p-value under $\lambda_{eid}=0.1$ is less than 0.05, indicating it's statistically significant to show the diversity of experts. \noindent\textbf{Ablation Study} We also conduct the ablation experiment on TaxiBJ and TaxiNYC with $G_s$ and $G_t$ being masked separately. Removing $G_s$ and using the expert's output directly to deploy self-attention in the model can mask $G_s$. For masking $G_t$, simply throwing away $G_t$ will be fine. The experiment includes CNN, ResNet and ConvLSTM as base experts and the result is shown in \tableref{tab:ablation_result} with comparison to the original models. We can observe that $G_s$ and $G_t$ all play a crucial role in both datasets and improve performance significantly. \begin{table}[t] \footnotesize \centering \caption{ Ablation study on TaxiBJ and TaxiNYC. ($\neg$ denotes the mask operation) }\label{tab:ablation_result} \begin{tabular}{|l|c|c|c|c|c|} \hline & \multicolumn{2}{|c|} { \textbf{TaxiBJ} } & \multicolumn{2}{|c|} { \textbf{TaxiNYC} } \\ \hline Model & MSE & MAPE & MSE & MAPE \\ CNN-ExpertNet &{342.737} & {5.28}\%& 114.717 & 4.50\%\\ CNN-ExpertNet$\neg G_s$ &470.824& 6.58\% &131.002& 5.15\%\\ CNN-ExpertNet$\neg G_t$ &444.237& 6.23\% &153.528 & 5.20\% \\ ST-ResNet-ExpertNet &330.258& 5.05\% &111.445 & 4.04\% \\ ST-ResNet-ExpertNet$\neg G_s$ &357.201& 5.34\% &126.173 & 4.17\% \\ ST-ResNet-ExpertNet$\neg G_t$ &343.534& 5.28\% &155.113 & 5.33\% \\ ConvLSTM-ExpertNet &\textbf{328.250} & \textbf{4.95}\% &\textbf{109.445} & \textbf{3.93}\% \\ ConvLSTM-ExpertNet$\neg G_s$ &344.776& 5.87\% &110.318 & 4.24\% \\ ConvLSTM-ExpertNet$\neg G_t$ &331.034& 5.16\% &117.772 & 4.62\% \\ \hline \end{tabular} \end{table} \noindent\textbf{Parameters Search}. We examine the sensitivities of three important hyperparameters: the number of experts $K$, the punishment intensity of $\lambda_{er}$, the punishment intensity of $\lambda_{eid}$ in CNN-ExpertNet training on four datasets. Each experiment will repeat three times, and the mean and variance has been calculated, and depicted in \figref{fig:Parameter_analysis} as the format of bar plot. The best results are marked as red color. For the sake of fairness, the experiment of searching optimal $K$ will firstly run, then, the optimal $K$ will be set as the default number of expert in the experiment of $\lambda_{er}$ and $\lambda_{eid}$. For briefly , we summarize several conclusions from \figref{fig:Parameter_analysis}: \begin{itemize} \item $K$: The number of experts corresponds to the complexity of the data set. For example, we can discover that the order of estimation error for all baselines in \tableref{tab:result1} and \ref{tab:result2} is TaxiBJ $>$ TaxiNYC $>$ BikeNYC-I $>$ BikeNYC-II, and the optimal $K$ are 9, 7, 4, 2 respectively. Therefore, when the performance of ST-ExpertNet is inferior to such as ST-ResNet, or ConvLSTM, slightly enlarging the experts is encouraged. \item $\lambda_{er}:$ From \figref{fig:Parameter_analysis} known, RMSE is not sensitive to $\lambda_{er}$ in contrast to $\lambda_{eid}$. The function of $\lambda_{er}$ is to push the coordinated between the output of expert and spatial gating, and enhance the interpretation of ST-ExpertNet, which means that the irrelevant expert's output can be vanished through $\lambda_{er}$. \item $\lambda_{eid}:$ Intuitively, the more experts, the more entanglement/overlap between experts. Therefore, we can observe that in TaxiBJ TaxiNYC, BikeNYC-I, BikeNYC-II, the optimal $K$ are 9, 7, 4, 2 and the optimal $\lambda_{eid}$ are 0.3, 0.3, 0.1, 0.1, which proves that $\lambda_{eid}$ corresponds to $K$. \end{itemize} \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{image/nogate} \caption{The performance of CNN-ExpertNet and CNN-ExpertNet$\neg$G2 (CNN-ExpertNet without $G_t$) on TaxiNYC dataset.} \label{fig:without_g2} \vspace{-0.4cm} \end{figure} \subsection{Case Study with Gating Network $G_s$ in TaxiBJ} We evaluate $G_s$ 's spatial self-adaption and interpretability by visualizing the attention values for each expert $E_i$. CNN-ExpertNet's inflow spatial attention values at 8:00 am are computed. The top six experts' attention values are visualized and shown on \figref{fig:attentionspatial}. We can observe that the attention of each expert is varied. For instance, expert 5 concentrates on the commuting pattern of Beijing's 2nd, 3rd, and 4th ring roads, China's first fully enclosed, full interchange, no-traffic-light urban express ring road. Compared to expert 5, expert 2 is responsible for the 4th and 5th ring roads in Beijing. Furthermore, expert 3 takes charge of the residential area in the Haidian and Fengtai districts, which contain multiple kinds of places of interest, such as Summer Palace, Xiangshan Park, Beijing Garden Expo Park, etc. Expert 4 mainly charges the Capital Airport Expressway, an expressway connecting downtown Beijing and Beijing Capital International Airport, and contains huge flow values throughout the day. Since multiple patterns may exist in one region simultaneously, expert 1 co-manages the flow state with experts 2 and 5 in some places. Expert 6 mainly controls the suburban area in the southwest area of Beijing, where many villages and town exists, and the model considers this area flow pattern is different from others. Therefore, we can conclude that ST-ExpertNet successfully learns the different flow patterns in our city. We also select two region types from TaxiBJ; one is the office area, and the other is the residential area. There are two conspicuous patterns for the office and residential areas. The inflow pattern for the previous one has morning and evening peaks every day. On the contrary, people often leave their homes and go to work on workdays. Therefore, the outflow of residential in peaking hours tends to be higher than another timestamp. The \figref{fig:attentiontemporal} A and B present the change of flows at the coordinate of (2,31) and (11,23) on 5/20/2015, respectively. It can be seen that in different periods, the regional traffic flow is dominated by a certain expert \figref{fig:attentiontemporal} C presents the office area attention value. We can observe that the duty of $E_5$ is mainly to adjust the flow distribution for the midnight and the morning and evening peak flow output is mainly managed by $E_8$. In \figref{fig:attentiontemporal} D, the residential area pattern is mainly charged by $E_{1}$ and $E_{3}$. The $E_{1}$ controls the midnight pattern, and the $E_{3}$ pays attention to the morning peak pattern. \subsection{Case Study with Gating Network $G_t$ in TaxiNYC} We investigate whether $G_t$ can be extended to learn meaningful temporal patterns and modify the amplitude of time series output in the real-world large scalar dataset. Therefore, the ablation study has been conducted on the TaxiNYC dataset to demonstrate that $G_t$ helps adjust the expert temporal signal. \figref{fig:without_g2} shows an example of the predictions with ST-ExpertNet with $G_t$ and without $G_t$. The ground truth data of the figure is from the inflow of TaxiNYC at coordinate (0,2), where an office area locates. It can be viewed from the graph that on weekdays the inflow peaks in the morning and approaches nearly zero at night, whereas on weekends, the inflow has a much lower peak in the morning and reaches almost zero in the evening. However, we can see from the result that the network without $G_t$ tends to have unstable predictions, especially in the morning and at late night. Besides, it can't handle the temporal information well because every weekend, when there is a sudden shift of predictive pattern from weekdays to weekends, it will have trouble dealing with the late-night prediction. As a comparison, the predictive result of the network with $G_t$ is much more satisfying. The Gating Network $G_t$ learns the temporal pattern and helps the network adjust its output based on the input data, which consists of historical information. When it comes to weekends, $G_t$ will help the network switch to the ``predictive weekend pattern'' to gain a more accurate performance. \subsection{Overview} We here systematically summarized our ST-ExperNet framework shown in \figref{fig:model}. The input of the expert network and gating network is composed of four parts: the historical observation of week, day, hour, and external information, which indicates the recent time intervals, daily periodicity, weekly trend, and metadata (e.g., weather conditions and events) respectively. While different expert networks produce their output, the spatial gating network further localizes them to their responsible patterns via the attention mechanism. The localized outputs of each expert are then aggregated together before the nonlinear transformation of \textit{Tanh}. Inspired by PixelCNN \cite{oord2016conditional}, which uses a gated activation unit to control the magnitude of the output, we introduce the temporal gating network to do the same thing. The output of the temporal gating network will pass through a \textit{Sigmoid} function before doing an element-wise multiplication with the aggregated experts' output. There are two regularization strategies shown in the figure: \textit{Expert Responsibility Loss} and \textit{Expert Inter Discrepancy Loss}. The former intends to force the experts to take responsibility for their sub-tasks by calculating the loss between their sub-task prediction (e.g., the prediction of commuting pattern) and the ground truth of the sub-task, and the latter aims to reduce the overlap of the responsible sub-tasks for every pair of experts. We organize the framework description as follows: The ST-ExpertNet input is introduced in \secref{sec:input}. The detailed implementation of ST-ExpertNet and its regularization are shown in \secref{st-expert} and \secref{regularization} respectively. Finally, we describe the training steps of our framework in \secref{training_step}. \subsection{Multi-Source Information Fusion}\label{sec:input} \figref{fig:model} shows the input of ST-ExpertNet, which consists of four main components that we adopt from \cite{zhang2017deep}:\textit{ closeness, period, trend, and external influence} denoted as $ X_t^c, X_t^p, X_t^{tr}, X_t^{ex}$ respectively. However, unlike traditional operations in \cite{zhang2017deep,zonoozi2018periodic,lin2019deepstn,yao2019revisiting}, which feed these components into different models and hinder a comprehensive understanding of property of the flow patterns, our goal is to maximize the discrepancies between different types of flow patterns and minimize the differences between the same type (Equation \ref{equ:lambda1}), which can help experts to easily identify the regional inter-discrepancy (i.e., if regions (1,3) and (2,4) are highly relevant in the functional region of commuting flow pattern / commuting functional region). Given the set of functional region $\Omega=\{\Omega_1,\Omega_2, \cdots, \Omega_n\}$, where each region $R_i \in \Omega_s$ and $\Omega_s \in \Omega$ presents a type of functional region, e.g., office area. Our goal can be formulized with \begin{small} \begin{align} \max \sum_{\Omega_s \in \Omega}\left(\sum_{(R_i,\ R_j)\in \Omega_s} I(R_i;\ R_j) - \sum_{R_u \in \Omega_s,\ R_v \notin \Omega_s} I(R_u;\ R_v) \right),\label{equ:mutual} \end{align} \end{small} where $I$ denotes the mutual information between a pairwise of regions. Intuitively, the motivation of \equref{equ:mutual} is to minimize the distance between those regions in the same functional region and maximize the discrepancy between the regions in different functional regions. To achieve this goal, we concatenate \textit{ closeness, period, trend, and external} as an entirety and feed it into the experts and gating networks, which can give a comprehensive and distinct feature space for each region. The FC layer shown in \figref{fig:model} denotes the multilayer perceptron layer, which intends to process external information (e.g., weather condition). After reshaping the FC's output as $X^{ex}_{t}\in \mathbb{R}^{n_{w} \times h\times w}$, where $n_w$ is the number of weather information, such as sunny, rainy, cloudy, we have the final ST-ExpertNet input $X_t$ as \begin{align*} &X_t^{tr}=\left\{g_{t^{\prime}} \mid t^{\prime} \in[t-(n_q+1)\times q, t-q]\right\}\\ &X_t^{p}=\left\{g_{t^{\prime}} \mid t^{\prime} \in[t-(n_p+1)\times p, t-p]\right\}\\ &X_t^{c}=\left\{g_{t^{\prime}} \mid t^{\prime} \in[t-(n_c+1), t]\right\}\\ &X_t=Concat([X^{ex}_{t},\ X^{tr}_{t},\ X^p_{t},\ X^c_{t}]) \end{align*}where $n_q,n_p,n_c$ represent the length of time slots of Trend, Period, and Closeness, and $q, p$ are the length of one week and day respectively, for example, suppose $\Delta t=30$min, thus, $q=24h/0.5h=48$ and $p=q\times7$. Here $Concat$ denotes the channel-wise concatenate operator. \subsection{ST-ExpertNet}\label{st-expert} The structure of our ST-ExpertNet consists mainly of three parts: the Expert Layer, Spatial Gating Network, and Temporal Gating Network. In the following part, we will introduce them one by one. \noindent\textbf{The Expert Layer.} According to \secref{sec:Formulation}, our goal is to build a set of expert models, where each expert can take charge of a distinctive flow pattern within the flow tensor. This without any prior consultation holds the same view as the motivation of Mixture of Experts (MoE), which involves decomposing predictive modeling tasks into several subtasks, training the expert models corresponding to each subtask, developing a gating model that learns which expert to trust based on the input variables, and combining all the predictions from each expert together. The Original Mixture-of-Experts (MoE) \cite{jacobs1991adaptive} can be formulated as: \begin{align} \hat{y}=\sum_{i=1}^{n} G(x)_{i}\odot E_{i}(x),\label{equ:output} \end{align} where $x$ denotes the input of MoE and its size is associated with gating network and expert network, $\sum_{i=1}^{n} G(x)_{i}=1$ and $G(x)_{i}$, representing the $i^{th}$ logit of the output of $G(x)$, indicates the proportional contribution for expert $E_{i}$. Here, $E_{i}, i=1, \ldots, n$ are the $n$ expert networks and $G$ represents a gating network that helps to group the results of all experts. More specifically, the gating network $G$ produces a distribution on the $n$ experts based on the input and assigns a weight $G(x)_{i}$ to the output of the $i^{th}$ expert. The weight can also be interpreted as the prior probability that the expert $i$ could generate the desired prediction. The final output of the model is a weighted sum of the outputs of all experts. Subsequently, the spatial and temporal gating network will be introduced. Comparing with MoE, the ST-ExpertNet also consists of a set of $K$ "expert networks", $E_{1}, \cdots, E_{K}$, and two "gating networks" $G_s, G_t$. $G_s$ is to control the spatial structure output and is formally named as \textit{Spatial Gating Networks}. on the other hand, $G_t$ is to adjust the expert temporal signal and formally named as \textit{Temporal Gating Networks}. \figref{fig:model} shows an overview of the ST-ExpertNet architecture. The experts are themselves neural networks, each with their own parameters. \noindent\textbf{Spatial Gating Network.} Different from \equref{equ:output} which generates and sets $G_s$ as the weight parameter of experts, however, the objective of the spatial gating networks $G_s$ is to adjust the prediction of experts in spatial aspect. It can automatically disentangle mixed crowd flows into basic patterns and identify the current dominant pattern of each region. Then, different regions will be assigned to different specialized experts through the attention mechanism according to their dominant flow patterns. In our design, we try to avoid the ambiguous scenario in which expert $i$ outputs tiny values for region $a$, which means that it does not charge this region, but receives high attention values from $G_s$. To comprehensively handle the output with $G_s$ and experts, this paper deploys the attention model by combining $G_s$ and $E$ here to ensure the consistency of the gating and expert network, which can be written as \begin{align} a_i &= \frac{{\rm exp}(G_s(X_t)_{i} \odot E_{i}(X_t))}{{\rm exp}(\sum_{i=1}^{n} G_s(X_t)_{i}\odot E_{i}(X_t))}, \quad i= 1 \cdots n, \label{equ:attention} \end{align} where ${\rm \textit{exp}}$ denotes the exponential operation. Therefore, by adopting attention layer, the spatial gating network final output can be written as \begin{align} e_i = a_i E_{i}(X_t), \label{equ:expert&attention} \end{align} and $e_i$ presents the final output of expert $E_{i}$ \noindent\textbf{Temporal Gating Network.} The task of crowd flow prediction is a problem of both spatial and temporal. Time is also an important factor that affects the flow of different patterns. For instance, on weekdays, the morning outflow of the working pattern in a residential area is significantly larger than on weekends. However, the expert network, due to its self-characteristics, cannot always perceive this change and is likely to also produce high values for the morning outflow of working pattern on weekends. Thus, we consider it to be essential adding a module to help expert networks capture and make a smooth transition over these temporal changes. Inspired by PixelCNN \cite{oord2016conditional} which uses a gated activation unit to control the final time series signal, we here design the temporal gating network $G_t$ to modify the amplitude of time series output of $y_i$. To sum up, the final output of ST-ExpertNet can be written as follows: \begin{align} \hat{Y}_{t+1}=\text{Tanh}(\sum_{i=1}^{K} e_i) \odot \sigma(G_t(X_t)),\label{equ:total_output} \end{align} where $\odot$ denotes an element-wise multiplication operator. The $Tanh$ localizes the input between the range of (-1, 1) and $\sigma$ denotes the Sigmoid function to limit $G_t(x)$' s value into (0, 1). Note that \equref{equ:total_output} is only the general form of ST-ExpertNet's output. For multichannel cases, for example, input with inflow and outflow channels, \equref{equ:total_output} will act on them independently. \subsection{Experts' Regularization }\label{regularization} As aforementioned criteria of \textit{sparsity} and \textit{preciseness}, here we introduce two regularization strategies: \textit{Expert Responsibility Loss} and \textit{Expert Inter Discrepancy Loss}. The former intends to force the experts taking responsibility for their own prediction, and the latter aims to drive the experts learning different flow patterns. \noindent\textbf{Expert Responsibility Loss} An important issue of MoE is that we need to ensure the localization of each expert in their own subtasks. We try to avoid the scenario that $G_s$ assigns the entertaining area which is now hold by entertaining pattern to expert $i$, but expert $i$ refuses to focus on it and try to produce high value in the office area. This will lead to a great inconsistency between the expert's output and the attention mechanism. To solve this problem, a punitive strategy named \textit{experts responsibility loss} has been proposed to restrict and control the high confidence between $G_s(x)_{i}$ and $E_{i}(x)$, and experts should assume responsibility for their own behavior. We set up \textit{expert responsibility loss} as $L_{er}$ intending to minimize the gap between expert output and their responsible ground-true flow. Suppose we have $K$ experts and their output $E(x)$, the general version of the error function is \begin{align} L_{er}=\sum_{i=1}^{K} a_{i}\left(Y_{t+1}- H_i\right)^{2},\label{equ:loss_gen} \end{align} where $Y_{t+1}$ denotes the ground truth flow tensor, and $H_i=\sigma(G_t(x)) \odot \text{Tanh}(E_{i}(X_t))$. In this error function, the weights of each expert are updated based on their own error to the prediction target and thus, decouples from the influence of other experts. If we use a gradient descent method to train the network with \equref{equ:loss_gen}, the network will tend to dedicate a single expert to each basic flow pattern. \equref{equ:loss_gen} works in practice, however, according to \cite{jacobs1991adaptive}, if we further introduce negative log probability and mixture of Gaussian model into the function, it might give better performance. The new formulation of $L_{er}$ is defined as: \begin{small} \begin{align} L_{er}= -\log \sum_{i=1}^{K} a_{i} \exp(-\frac{||Y_{t+1}-H_i ||^{2}}{2} ).\label{equ:loss_er} \end{align} \end{small} To evaluate these two functions, we start by analyzing their deviations with respect to the $i$-th expert. From \equref{equ:loss_gen}, we get \begin{small} \begin{align} \frac{\partial L_{er}}{\partial E_{i}(X_t)}=-2 a_iH_i^{'}\left(Y_{t+1}- H_i\right),\label{equ:d1} \end{align} \end{small} where $H_i^{'}=\sigma(G_t(x))\odot (1-\text{Tanh}^2(E_{i}(X_t)))$, while from \equref{equ:loss_er}, we deduce \begin{footnotesize} \begin{align} \frac{\partial L_{er}}{\partial E_{i}(X_t)}=-H_i^{'}\left[\frac{a_{i} e^{-\frac{1}{2}\left\|Y_{t+1}- H_i\right\|^{2}}}{\sum_{j} a_{j} e^{-\frac{1}{2}\left\|Y_{t+1}- H_i\right\|^{2}}}\right]\left(Y_{t+1}- H_i\right).\label{equ:d2} \end{align} \end{footnotesize} It is obvious from the deviations that both functions update an expert's weights based on their individual error. However, in \equref{equ:d1}, we use term $a_i$ to be the weight update factor of each expert, while in \equref{equ:d2}, the weighting term further considers the ratio of an expert's error value to the total error. This unique feature allows network trained with the new error function to find the most suitable expert for a specific subtask more quickly, especially in early training stages \cite{masoudnia2014mixture}. Therefore, in this paper, we choose \equref{equ:loss_er} to be the Expert Responsibility Loss. \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{image/orthogonal.jpg} \caption{Here shows an example of not punishing the expert discrepancy (upper) and its counterpart (lower). The histogram indicates to what extent an expert charges a flow pattern. $BA$, $CA$, $EA$ and $LA$ refer to the pattern of Business Area, Commuting Area, Entertainment Area and Living Area respectively.} \label{fig:ED} \end{figure} \noindent\textbf{Experts Inter Discrepancy Loss.} Dividing the original task into several subtasks and localizing each expert into their corresponding subspaces are the key idea of MoE. Previous work has also shown that promoting the diversity of experts can improve the performance of the network\cite{krogh1995validation}. Thus, we intend to punish the experts inter discrepancy and try forcing the experts to learn from non-overlapping problem spaces. Inspired by the mathematical theory of the determinant point process\cite{kulesza2012determinantal} and the design of the ADP regularizer \cite{pang2019improving}, we proposed \textit{experts inter discrepancy loss} to increase the gap between experts. The loss can be defined as \begin{align} L_{eid}= - det(V^TV). \end{align} According to the variable definition of \equref{equ:attention} and \equref{equ:expert&attention}, we can unfold $V$ as \begin{align} V=[\bar{g_1}\widetilde{e}_1,\bar{g_2}\widetilde{e}_2, ... ,\bar{g_n}\widetilde{e}_n]. \end{align} Here $\bar{g_i}$ represents the mean value of $i^{th}$ $G_s(x)$ and $\widetilde{e}_i$ refers to the flattened one-dimensional vector of the product of $i^{th}$ $G_s(x)$ and $i^{th}$ $E(x)$ under $L_2$ normalization. For sparsity, we only choose the experts among the top $n$ of attention values. It can be noticed that different from \cite{pang2019improving}'s ADP regularizer where all the columns of $V$ should be normalized vectors, we make an improvement by including the mean value of the corresponding attention to make each column vector has its own ``length''. This design further ensures the sparsity of experts and is more suitable for our model because we hope that each expert can have a similar mean value of attention, which means that every expert has its own subtask instead of leaving a few experts with nothing to do. A theory \cite{Matrixmathematics} has stated that if $A \in \mathbb{R}^{n \times m}$ is a matrix and $rank(A) = m$, we have \begin{align} volume(\delta)= [det(V^TV)]^{1/2}, \end{align} from which $\delta$ denotes the geometrical body spanned by $V$ 's column vector set. Therefore, we can have a geometrical illustration of the expert inter discrepancy loss at \figref{fig:ED}. The volume spanned by the vector set indicates the divergence between experts. We intend to maximize the volume to force each expert to pay attention to different flow patterns of the city. The histogram in \figref{fig:ED} shows that before we punish the expert discrepancy, different experts might make nearly equal contributions to the same flow pattern. However, after applying the punishment, each expert now has its own pattern to charge, and this agrees with our initial motivation. \subsection{Training Steps}\label{training_step} To sum up the previous discussion in Sections \ref{sec:Formulation} and \ref{sec:Methodology}, we solve the problem in \equref{equ:prediction} by proposing the ST-ExpertNet with $K$ experts and 2 gating networks from spatial and temporal aspects, solve the problem in \equref{equ:lambda1} by proposing \textit{experts responsibility loss}, and solve the problem in \equref{equ:lambda2} by proposing \textit{experts inter discrepancy loss}. We need to train $K$ expert models and two gating networks, which take input from multisource information and concatenate them as $X_t$. Our ST-ExpertNet can be trained to predict $y_{t+1}$ by minimizing the mean square error between the predicted flow matrix and the true flow matrix. The total loss function is written as \begin{small} \begin{align} \mathcal{L}(\theta)=(1-\lambda_{er}-\lambda_{eid})\left\|\hat{Y}_{t+1}-Y_{t+1}\right\|_{2}^{2}+ \lambda_{er}L_{er}+\lambda_{eid}L_{eid}, \end{align} \end{small} where $\theta$ are all the learnable parameters in ST-ExpertNet and $\lambda_{er}>0$ and $\lambda_{eid}>0$ denote the intensity of punishment for $L_{er}$ and $L_{eid}$ respectively. To examine the effect of \textit{experts inter discrepancy loss}, we conduct some experiments under different settings of $\lambda_{eid}$ while keeping $\lambda_{er}$ fixed as $10^{-2}$. \subsection{Mixture of Experts} Mixture of experts (MoE) belongs to a type of combining method, which is similar to boosting and negative correlation learning methods. The basic ideas of MoE is to train multiple experts, and each expert is assigned to a different part of the subtask. Therefore, MoE is a good compromise between a single global model or multiple local models, but one of the most important questions for MoE is how to divide a dataset into different parts. Now, MoE can be roughly divided according to whether the data is divided in advance \cite{masoudnia2014mixture}. Based on the implicit problem space partitioning \cite{tang2002input,gutta2000mixture,goodband2006mixture}, the prior information is used to partition the dataset by clustering methods. The key issues for these technologies are the reliability of the prior information and how to balance the data after clustering. To overcome this challenge, a gating approach has been proposed to balance the learning strategy by guiding the experts to learn to handle different subsets of training data \cite{jacobs1991task,hansen1999combining,ubeyli2010differentiation}. There are other kinds of work focuing on adopting different models such as Support Vector Machines (SVMs) \cite{collobert2002parallel}, Gaussian Processes \cite{tresp2001mixtures} and Dirichlet Processes \cite{shahbaba2009nonlinear}, or different expert configurations such as a hierarchical structure \cite{yao2009hierarchical}, infinite numbers of experts \cite{rasmussen2002infinite}, and adding experts sequentially \cite{aljundi2017expert} into the framework. Our work extends the application of MoE systems into the framework of flow prediction in urban computing by dividing the flow tensor space. Further, our design serves as a more explainable and efficient framework which can adopt every ST-models, which aims to improve their performance and interpretation. \subsection{Traffic Flow Prediction} Recently, machine learning is increasingly being used in intelligent transportation system, such as, ordinal classification \cite{yildirim2019eboc}, intrusion detection \cite{bangui2021recent} and classify vehicle images \cite{wen2015rapid}. Among the literature, Traffic flow prediction has become the hottest topic in transportation. Traffic flow owns the characteristics of highly nonlinear time correlation and uncertainty \cite{deri2016big,zhan2016citywide}, which brought huge challenges to traffic flow prediction. The basic assumption is to consider the traffic flow prediction as a time series problem. Among them, the auto-regressive moving average model (ARMA) \cite{said1984testing} as the fundamental time series prediction model has been widely used in traffic flow. The variant methods based on the wavelet neural network \cite{cheng2017traffic} and difference integration \cite{box1970distribution} have been proposed. However, these kinds of models lack the necessary modeling of spatial dependence \cite{zhang2017deep}. To both consider the spatial and temporal factors, the deep learning model is first proposed \cite{zhang2016dnn} by combining the convolutional neural network (CNN) and Deep Neural Networks (DNN). The time series concepts of the hour, day, and week patterns are further defined \cite{zhang2017deep} and the residual network (ResNet) \cite{he2016deep} is used to process them respectively. A multitask adversarial ST-network is later proposed to infer the in-out flows and origin-destination (OD) simultaneously \cite{wang2020multi}. A deep irregular convolutional residual LSTM network is proposed \cite{du2019deep} to model the challenges, such as, hybrid transportation lines, mixed traffic, transfer stations, and some extreme weathers. Multiple architectures have been designed to improve the performance based on the framework \cite{zhang2017deep}, such as using ConvGRU \cite{zonoozi2018periodic}, Long Short-Term Memory (LSTM) \cite{yao2018deep}, ConvLSTM \cite{lin2019deepstn} instead of CNN. Although these models achieved good performances, the criticisms are mainly focused on their lack of considering the discrimination of the flow patterns and try to use a single model to monitor them all. In this paper, we model the flow prediction problem from a new perspective and intend to design a set of experts specialized in different kinds of flow patterns. \subsection{Data Mining in Human Mobility} Recently, a brunch of works focus on mining the inherent patterns from large-scale human mobility datasets. A series of approaches have been proposed for geographical topics (like beach, hiking, and sunset) \cite{yin2011geographical}, city functional region (e.g., areas of historic interests, diplomatic and embassy areas) \cite{yuan2012discovering}, human trip purpose (e.g., shopping, work, eating out) \cite{zhao2020discover}, space-time structure \cite{pozdnoukhov2011space}. Other part of works concentrates on using tensor factorization to explore the urban mobility patterns. The Non-negative Tensor Factorization (NTF) is utilized \cite{fan2014cityspectrum} to decompose the human flow tensor into several basic life patterns. The probabilistic tensor factorization framework \cite{sun2016understanding} is introduced to discover the travel behavior and spatial configuration of the city in Singapore. A regularized non-negative Tucker decomposition approach is applied \cite{wang2014discovering} to reveal the principal patterns from traffic networks evolving over time. These researches demonstrated the mixed state of human mobility and provide good theoretical motivation for using the MoE method, which is skilled in the handling of multiple sources of data. To the best of our knowledge, we are the first to extend the idea of decomposing the mixed-state flow tensor into the flow prediction. \section{Introduction} \input{introduce} \section{ Related work}\label{sec:related} \input{Related_work} \section{Problem Formulation}\label{sec:Formulation} \input{Problem_Formulation} \section{Methodology}\label{sec:Methodology} \input{Model} \section{Experiment}\label{sec:exps} \input{Experiment} \section{Conclusion}\label{sec:concluds} \input{Conclusion} \bibliographystyle{IEEEtran} \section{Introduction} \input{introduce} \section{ Related work} \input{Related_work} \section{Preliminaries}\label{sec:prelim} \input{Preliminary} \section{Problem Formulation}\label{sec:Formulation} \input{Problem_Formulation} \section{Methodology}\label{sec:Methodology} \input{Model} \section{Experiment} \input{Experiment} \section{Conclusion} \input{Conclusion} \bibliographystyle{IEEEtran}
\section{Introduction} Numerous exoplanets have now been observed on orbits that cannot be fully explained by the current theories of star and planet formation, whether that be core accretion \citep{1996PollackEtAl} or the fragmentation of stellar disks \citep{1997Boss, 2002MayerEtAl}. For example, dozens of possibly planetary mass companions have been observed with unexpectedly high eccentricities and semimajor axes, with some orbiting as far as $\gtrapprox$2500 AU from their host star \citep[e.g.][]{2011LuhmanEtAl, 2016DeaconEtAl}. Furthermore, although the abundance of free-floating planets is uncertain \citep{2011SumiEtAl, 2012QuanzEtAl, 2017ClantonGaudi, 2017MrozEtAl, 2019OGLECollab}, several likely candidates have been discovered \citep[e.g.][]{2000Zapatero, 2013DupuyKraus, 2019OGLECollab, 2020MrozEtAl}. Meanwhile, in our own Solar System, should the proposed Planet 9 exist \citep{2016SheppardTrujillo, 2016BatyginBrown, 2019BatyginEtAl, 2020ClementKaib, 2020DowneyMorbidelli}, its orbit is likely to be very wide ($a \sim 400-800$ AU), eccentric ($e \sim 0.2-0.5$), and inclined ($i \sim 15-25 ^{\circ}$) to the plane of the other planets \citep{2019BatyginEtAl, 2020FiengaEtAl}. (However, see also \citet{2017ShankmanEtAl} and \citet{2021NapierEtAl} for a more pessimistic view regarding the likelihood of Planet 9's existence.) Planetary orbits that cannot be explained by core accretion or gravitational fragmentation, as well as free-floating planets, can instead be created by encounters with other bodies \citep[e.g.][]{1998LaughlinAdams, 2002HurleyShara, 2001SmithBonnell, 2006AdamsEtAl, 2012ParkerQuanz, 2015ZhengEtAl, 2016KouwenhovenEtAl, 2019DottiEtAl, 2019LiEtAl, 2020LiEtAl, 2020WangEtAl_architectures}. These dynamical interactions with external bodies have the potential to perturb, destabilise, and destroy planetary orbits -- with the main outcome being that the planet's orbital parameters are changed. Dynamical interactions readily occur in high density environments, where close encounters between systems can be common. This is particularly the case for the substructured and filamentary regions in which most stars and their planets form \citep{2003LadaLada, 2004CartwrightWhitworth, 2014AndreEtAl, 2020DaffernPowellParker}. These star-forming regions tend to be relatively dense compared to the galactic field (which has a stellar density of 0.1 pc$^{-3}$, \citealp{2003KorchaginEtAl}). For example, Taurus has a stellar density of $\approx5$ stars pc$^{-3}$, and the most massive star-forming regions can have $\gtrapprox1000$ stars pc$^{-3}$, with the Orion Nebula Cluster having a central density of $\approx5000$ stars pc$^{-3}$ \citep{2012KingEtAl}. It is unclear what fraction of planet-hosting stars form in such dense environments, and whether our Sun formed in a region of high or low-density. However, there is evidence from isotopic ratios that the Solar System may have formed in a relatively dense cluster of $\sim100$ to $\sim1000$ stars \citep{2010Adams, 2016ParkerDale, 2016LichtenbergEtAl, 2017NicholsonParker, 2019Zwart}. The substructured nature of star-forming regions can also further increase the frequency of dynamical interactions, as areas of substructure have higher local densities than the global density of the region as a whole \citep{2004CartwrightWhitworth, 2009SanchezAlfaro, 2010AndreEtAl, 2012ParkerMeyer, 2014AndreEtAl, 2014KuhnEtAl, 2015JaehnigEtAl, 2019ArzoumanianEtAl, 2020BalloneEtAl}. The dynamical interactions that planets are more likely to experience in star-forming regions can be grouped by mechanism. These mechanisms include the \emph{disruption} of a planet's orbit, where one or more of its semimajor axis, eccentricity, or inclination is altered \citep{2002HurleyShara, 2009SpurzemEtAl, 2012ParkerQuanz}; the \emph{ejection} of a planet from its system to become free-floating, where it is no longer gravitationally bound to a star \citep{2019FujiiHori, 2019VanElterenEtal, 2019CaiEtAl}; the \emph{capture} of a free-floating planet by either a new star or its original star \citep{2012PeretsKouwenhoven, 2015WangEtAl, 2017ParkerEtAl}; and the \emph{theft} of a planet, where it is directly exchanged between stars as they pass each other\footnote{As an aside, a vast amount of literature exists on the exchange of disc material between stars \citep[e.g.][]{Clarke1993,Kenyon2004,Jilkova2015,Li2020,Pfalzner2021}, which is the same physical mechanism that accounts for the theft of a fully-formed planet from a passing star.}, without being free-floating for a significant period of time\footnote{We take a significant period of time to be $10^4$ years, as described in \S\ref{sec:orbit_types}.} \citep{2016LiAdams, 2016MustillEtAl, 2020WangEtAl_swaps}. The result of planet theft and the capture of a free-floating planet is often the same -- a planet orbiting a new star. However, the two mechanisms are themselves distinct and the evolution of the planets that undergo them may also differ significantly. For example, a free-floating planet may experience encounters that change its velocity before its subsequent capture \citep{2015WangEtAl}, something which cannot have happened to a stolen planet. It is therefore unclear whether stolen and captured planets should be expected to share similar orbital properties, or whether they would be distinguishable observationally. The current state-of-the-art in modelling planetary systems in $N$-body simulations of star-forming regions is to effectively run simulations of planetary systems within the global star-forming region simulations; interaction histories between stars are tracked and then used to determine the amount of disruption experienced by multi-planet systems using separate software \citep[e.g.][]{2019CaiEtAl,2019DottiEtAl,Stock20}. The advantage of this approach is a full planetary system can be modelled (instead of just one or two planets) and that the long-term dynamical evolution of the planets can be accurately determined. The disadvantage is that any planet(s) that are ejected from their system cannot re-enter the global simulation of the star-forming region as a free-floating planet. Furthermore, to date, the simulations of the star-forming regions with multi-planet systems assume smooth, relaxed initial conditions. However, planets form almost immediately after the onset of star formation \citep{Brogan15,Andrews18,Alves20,SeguraCox20}, when star-forming regions exhibit a large degree of spatial and kinematic substructure. If the star-forming regions have low densities initially, this substructure can last for many crossing times (i.e.,\,\,several Myr) and so there is merit in examining the effects of substructured star-forming regions on young planetary systems \citep{2012ParkerQuanz,2013CraigKrumholz}. Indeed, \citet{Parker21a} demonstrated that external photoevaporation of protoplanetary discs is slightly hindered in more substructured regions, as the massive stars are on average further away from the majority of disc-bearing stars, even though the median stellar density is the same as in regions with less substructure. In this paper, we perform direct $N$-body simulations of dense, substructured star-forming regions, where half of the stars have Jupiter-mass planets placed at 30 or 50 AU. We adopt these orbital distances to facilitate a direct comparison with our previous work \citep{2012ParkerQuanz} and because a significant number of exoplanets are observed at these separations. The evolution of all of the planets in each simulation are followed for 10 Myr. We test whether the orbital properties and abundances of captured and stolen planets differ significantly from that of each other, as well as that of planets that are still orbiting their parent star. We then compare these results to directly imaged exoplanets and the hypothetical Planet 9. In Section~\ref{sec:Methods} we outline our methods of simulation and analysis as well as our adopted initial conditions, in Section~\ref{sec:ResultsDiscussion} we presents our results and discuss their implications, and we conclude in Section~\ref{sec:Conlcusion}. \section{Methods} \label{sec:Methods In this section we describe the set-up of our simulated star-forming regions and how the results were then analysed. \subsection{Simulation Set-Up} Direct $N$-body simulations were run using the \texttt{kira} $N$-body integrator \citep{1999PortegiesZwart, 2001PortegiesZwart}. These were evolved for 10 Myr, with snapshots of data taken every 0.01 Myr for analysis. We use several sets of initial conditions, all of which contain 1000 stars, $N_{\star}$, and 500 planets, $N_{\rm p}$, which are randomly assigned to the stars. The planets are all Jupter-mass. The planet mass would not be expected to significantly affect our results, especially with respect to the ejection of a planet from its system, as the interaction cross-section is primarily dependant on the stellar mass \citep{2004FregeauEtAl, 2006FregeauEtAl, 2013ParkerReggiani}. For our main collection of simulations, the stars are placed within a 1 pc region and distributed according to the box-fractal method. The box-fractal method was introduced by \cite{2004GoodwinWhitworth}, and is a commonly used method to set up spatial and velocity structure in $N$-body simulations \citep[e.g.][]{2004GoodwinWhitworth, 2010AllisonEtAl, 2012ParkerQuanz, 2014ParkerEtAl, 2020DaffernPowellParker}. The spatial substructure is set up as follows: \begin{enumerate} \item A cube with sides of length $N_{\rm div}=2$ is defined. It is within this cube that the star-forming region is generated. The first `parent' particle is placed at the centre of the cube. \item The cube is divided into sub-cubes, each with length 1. So, in this case, there are $N_{\rm div}^3=8$ sub-cubes. A `child' particle is placed at the centre of each sub-cube. \item The probability that a child particle now becomes a parent itself is $N_{\rm div}^{D-3}$, where $D$ is the fractal dimension. We adopt $D = 1.6$. \item Child particles that do not become parents themselves are removed as well as all of their previous generations of parent particles. Children that do become parents have a small amount of noise added to their distribution to prevent a gridded appearance. \item Each new generation of parent particles is treated in the same way as the initial parent particle, and their sub-cubes are treated as the initial cube. In this way, each new parents' sub-cube is divided into $N_{\rm div}^3=8$ as the process is repeated until there is a generation created that has significantly more particles than is needed. \item Any remaining parent particles are removed so that only the last generation of particles is left. \item The region is pruned so that the particles sit within a spherical boundary, with the chosen diameter of 1 or 5 pc, rather than a cube. \item If there are more particles than the chosen number of stars, in this case $N_{\star} = 1000$, particles are removed at random until $N_{\star}$ is reached. Removing stars at random maintains the chosen fractal dimension as closely as possible. \end{enumerate} The mean number of children that become parents is $N_{\rm div}^{D}$. This means that, when $N_{\rm div} = 2$, fractal dimensions of $D =$ 1.6, 2.0, 2.6, and 3.0 correspond to the mean number of new parents at each stage being close to an integer. This is preferred because it produces the chosen fractal dimension more accurately. Lower fractal dimensions lead to fewer children becoming parents, and therefore more substructure. We adopt a fractal dimension $D = 1.6$ in most of the simulations which corresponds to the maximum amount of substructure possible. In two simulations, we keep the stellar density constant, but change the initial degree of substructure so that $D = 2.0$ (a moderate amount of substructure) or $D=3.0$ (no substructure). To ensure the densities are commensurate with the $D=1.6$ simulations, the radii for the moderately substructured, and zero substructured simulations are 0.5\,pc and 0.25\,pc, respectively (the $D=1.6$ simulations have radii of 1\,pc). To set up the velocity substructure: \begin{enumerate} \item The first parent particle has its velocity drawn from a Gaussian with mean of zero. \item Every particle after that has the velocity of its parent plus an additional random velocity component. This additional component is drawn from the same Gaussian and multiplied by $(\frac{1}{N_{\rm div}})^{g}$, where $g$ is the number of the generation that the particle was produced in. This results in the additional components being smaller on average with each successive generation of particles. \item The velocities are then scaled so that the region has the required virial ratio. \end{enumerate} Setting up the velocity substructure in this way ensures that stars that are closer together have more similar velocities than those that are further apart, as is expected from observations, e.g. the Larson relation \citep{1981Larson}. Our default fractal dimension of 1.6 corresponds to a high amount of substructure, and with an initial radius of 1 pc this leads to an initial median density of order $10^4$ M$_{\odot}$pc$^{-3}$. We also run an additional set of simulations with an initial radius of 5 pc, which corresponds to an initial median density of order $100$ M$_{\odot}$pc$^{-3}$. Our combinations of initial conditions are summarised in Table~\ref{tab:initialConditions}, which shows the initial planetary semimajor axes, $a_p$, and virial ratio, $\alpha = T / |\Omega|$, where $T$ is the total kinetic energy and $\Omega$ is the total potential energy of the region. In this way we investigate the effects of different global motions of the star-forming region with the virial ratio, and different planetary orbits with the semimajor axis. We use two initial virial ratios of $\alpha=0.3$ and $\alpha=1.5$. A virial ratio of $\alpha=0.3$ is used to model the subvirial collapse of a region to form a bound cluster \citep{2014ParkerEtAl, 2015FosterEtAl}. A virial ratio of $\alpha=1.5$ models the supervirial expansion of a region -- corresponding to a region that either formed unbound, or has become unbound e.g. by tidal forces or gas expulsion \citep{1978Tutukov, 1997Goodwin, 2007BaumgardtKroupa}. These two virial ratios are combined with three types of initial planetary orbits: orbiting a star with a semimajor axis of $a_p = 30$ AU, orbiting a star with $a_p = 50$ AU, or free-floating. In the context of the Solar System these two semi-major axes correspond to the semimajor axis of Neptune and the outer edge of the Kuiper belt. The star-forming regions that contain free-floating planets are only simulated with a virial ratio of $\alpha=0.3$ \citep[for simulations with free-floating planets and supervirial initial conditions see][]{2012PeretsKouwenhoven, 2017ParkerEtAl}. All planets that are bound to a star initially have zero eccentricity, $e = 0$, and are orientated randomly with respect to the coordinate system of the simulation i.e. they have random inclinations and random argument of latitude. \begin{table} \centering \caption{Summary of the initial conditions. Column 1 indicates whether the planets are initially bound to a host star or free-floating. Column 2 gives the initial radius of the star-forming region. Column 3 gives the fractal dimension, $D$ of the region. Column 4 gives the median initial stellar density, $\tilde{\rho}$, column 5 gives the initial virial ratio, $\alpha$, of the star-forming region, and finally, column 6 gives the semimajor axis, $a_p$, of each planetary system.} \label{tab:initialConditions} \begin{tabular}{l c c c c c} \hline Planetary Orbit Type & $r$ & $D$ & $\tilde{\rho}$ & $\alpha$ & $a_p$ \\ \hline Bound & 1\,pc & 1.6 & $10^4$\,M$_\odot$\,pc$^{-3}$ & 0.3 & 30\,au \\ & 0.5\,pc & 2.0 & $10^4$\,M$_\odot$\,pc$^{-3}$ & 0.3 & 30\,au \\ & 0.25\,pc & 3.0 & $10^4$\,M$_\odot$\,pc$^{-3}$ & 0.3 & 30\,au \\ & 1\,pc & 1.6 & $10^4$M\,$_\odot$\,pc$^{-3}$ & 0.3 & 50\,au \\ & 1\,pc & 1.6 & $10^4$\,M$_\odot$\,pc$^{-3}$ & 1.5 & 30\,au \\ & 1\,pc & 1.6 & $10^4$\,M$_\odot$\,pc$^{-3}$ & 1.5 & 50\,au \\ & 5\,pc & 1.6 & $10^2$\,M$_\odot$\,pc$^{-3}$ & 0.3 & 30\,au \\ Free-Floating & 1\,pc & 1.6 & $10^4$\,M$_\odot$\,pc$^{-3}$ & 0.3 & - \\ \hline \end{tabular} \end{table} We do not include stellar evolution or primordial stellar binaries in the simulations. The stellar masses are sampled from a Maschberger IMF \citep{2013Maschberger}: \begin{equation} \label{eq:Mimf} m(u) = \mu \left[ \left( u \left(G(m_u) - G(m_l) \right) + G(m_l) \right)^{\frac{1}{1-\beta}} - 1 \right] ^{\frac{1}{1-\alpha}}, \end{equation} where $\mu = 0.2$ M$_\odot$, $u$ is a random number between 0 and 1, $\beta = 1.4$, and $\alpha = 2.3$. $G(m_u)$ and $G(m_l)$ are calculated using Equation \ref{eq:G(m)}, where $m_u$ and $m_l$ correspond to the upper and lower stellar mass limits, respectively: \begin{equation} \label{eq:G(m)} G(m) = \left[ 1 + \left( \frac{m}{\mu} \right)^{1-\alpha} \right]^{1-\beta}. \end{equation} Here, we adopt stellar mass limits of $m_u = 50$ M$_\odot$ and $m_l = 0.1$ M$_\odot$. Twenty realisations of each set of simulation were run and analysed. Each of these simulations are statistically identical, with the same virial ratio and initial semimajor axis, but with different random number seeds used to initialise the positions, velocities, and masses of the stars. \subsection{Analysis} In each simulation the data is output every 0.01 Myr, which is used to determine the orbital properties of the planetary systems. \subsubsection{Identification of planetary systems} Planetary systems are found by identifying planets and stars that are mutual nearest neighbours and have a negative binding energy i.e. are gravitationally bound. Triple systems that include a planet are found in a similar way. In this case, all three bodies must be each other's first and second nearest neighbours, the two closest bodies must be gravitationally bound, and the centre of mass of the two closest bodies must be bound to the third body. If a planet is found to be in a triple system, it is logged as such, treated as a binary for the rest of the analysis, then followed up manually if the system is of particular interest. Planet-planet binaries are found in the same way as star-planet binaries, logged, and followed up manually. \subsubsection{Classification of orbital type} \label{sec:orbit_types} In any given snapshot a planet is classified as either preserved, captured, stolen, or free-floating. A planet is classified as free-floating if it is not found to be bound to another star or planet in that snapshot. A planet that is bound to a star is classified as preserved, captured, or stolen based on its binary history. A planet is preserved if it is still, and was always, bound to its original star in every prior snapshot. A planet is captured if it was free-floating in the previous snapshot, but is now bound to a star, whether that be its original star or a different one. Finally, a planet is classified as stolen if it is bound to a star in the current snapshot, but was bound to a different star in the previous snapshot. In this way, captured and stolen planets are distinguished based on whether they have been free-floating for a significant period of time. Since we use 0.01 Myr snapshot intervals, the maximum amount of time that one of our stolen planets could have been free-floating is $<0.01$ Myr. We believe that this is a reasonable assumption given that this is much shorter than the $\sim0.1$ Myr crossing time of our star-forming regions, and therefore the characteristic timescale over which stellar interactions tend to occur. The number of each type of planetary orbit is calculated in each snapshot. \subsubsection{Orbital parameters} The semimajor axis and eccentricity are calculated as normal for all planetary systems. The absolute inclination, relative to the coordinate system, is calculated for stolen and captured planets. For preserved planets, the change from its original inclination is used. \section{Results and Discussion} \label{sec:ResultsDiscussion} We first present results for planets in high density ($r=1$ pc, $10^4$ M$_{\odot}$pc$^{-3}$) simulations in Sections \ref{sec:number} to \ref{sec:inclination}, before discussing planets in low density ($r=5$ pc, $100$ M$_{\odot}$pc$^{-3}$) simulations in Section \ref{sec:lowden}. \subsection{Number of Stolen and Captured Planets} \label{sec:number} \begin{figure*} \centering \includegraphics[width=\textwidth]{Freqs_All_new.png} \caption{The number of each type of planetary orbit, plotted from the first snapshot at 0.01 Myr to 10 Myr for the higher initial density, $r=1$ pc simulations. Each of the first four columns shows results for one of the four bound-planet initial conditions, with lines plotted separately in different shades of the same colour for each of the 20 realisations. The final column shows the same for initial conditions where all planets are free-floating with $\alpha=0.3$. The number of free-floating, preserved, stolen, and captured planets are shown in shades of red, grey, blue, and yellow, respectively.} \label{fig:Freq_main} \end{figure*} \subsubsection{Over time} Most theft and capture happens at early times, when the region is most dense and the stars and planets are more likely to experience encounters. For most new planetary systems, the planet is stolen or captured onto an orbit that is either inherently unstable, or is easily destroyed by subsequent interactions. In particular, the same high densities that tend to create more stolen and captured systems at early times also increase the likelihood that they will be destroyed. This leads to the initial peak, which is visible in the stolen and captured planet panels of Figure \ref{fig:Freq_main}, as the the number of stolen and captured planets increase sharply before decreasing and levelling off at around $\approx1$ Myr. This is the case for every simulation. After this levelling off at $\approx1$ Myr, an average of $\approx4$\% of planets are either captured or stolen for the remainder of the simulations. This change over time can be seen in the first four columns of Figure \ref{fig:Freq_main}. \subsubsection{Effect of initial conditions} \begin{figure} \centering \includegraphics[width=\columnwidth]{Frequencies_BoxPlot_Combined_new.png} \caption{The number of stolen and captured planets at 10 Myr, for each of the 4 initial conditions where the planets are initially bound to stars in $r=1$ pc star-forming regions. These results are shown as a separate notched boxplot for each of the initial conditions. Each median value is shown as a thick black horizontal line, and the notches are the sloped outer edges which angle outwards from each median line. These notches show the 95\% confidence limits for their corresponding median, where any part of the box plot that does not have a sloped outer edge is not within the 95\% confidence interval. The second rightmost captured planet box plot has a 95\% confidence limit that is lower than the lower interquartile range. This means that the lower notches on this boxplot extend further than the box itself, thereby producing the inverted shape. The whiskers show the full range of values. There is no upper whisker for the rightmost stolen planet boxplot because the highest value is equal to the upper quartile. This is possible for sets of discrete data, and happens here because several of the simulations finish with 13 stolen planets, which is the highest value in that dataset.} \label{fig:Freqs_comp} \end{figure} The average number of stolen and captured planets at 10 Myr, for simulations where the planets are initially bound, is shown in the boxplots of Figure \ref{fig:Freqs_comp}. As might be expected, there are on average more captured planets at 10 Myr when the planets are initially placed on the wider 50 au orbits, as shown in Figure \ref{fig:Freqs_comp}. This is regardless of the initial virial ratio, and is because planets that are initially on wider orbits have a lower binding energy and are more easily ejected from their system during encounters, therefore increasing the number of free-floating planets that are available to be captured. Figure \ref{fig:Freqs_comp} also compares the final numbers of stolen planets across the four sets of bound-planet initial conditions. Unlike with captured planets, the average number of stolen planets is higher when they are initially placed at 30 au, rather than 50 au, for a given initial virial ratio. In fact, for the 30 au initial conditions there are also on average more stolen planets than captured ones. The notches on each box plot in Figure \ref{fig:Freqs_comp}, which are the sloped outer edges that angle outwards from each median line, represent the 95\% confidence limits of their corresponding median value. It can be seen from the second panel of Figure \ref{fig:Freqs_comp} that the 95\% confidence limits for the median number of stolen planets fully overlaps for the 30 AU and 50 AU initial semimajor axes. It should therefore not be concluded that a change in initial semimajor axis affects the final number of stolen planets for the supervirial $\alpha=1.5$ initial conditions. However, it can be concluded that, for the subvirial $\alpha=0.3$ initial conditions, increasing the initial semimajor axis to 50 AU decreases the final number of stolen planets. This is the opposite trend than is seen for captured planets, of which there is a higher number for larger initial semimajor axes. This difference in the final number of stolen planets for the subvirial ($\alpha = 0.3$) initial conditions is likely caused by the increased number of free-floating planets for the 50 AU initial conditions. Although the number of stolen planets is consistent at early times for both the $a_p = 50$\,au and $a_p = 30$\,au initial conditions, the medians begin to differ with 95\% confidence after 0.12 Myr - the same time at which the number of stolen planets begins to decrease in all simulations. It is at this time that the higher number of free-floating planets mean that there are fewer bound planets available to be stolen, and also more free-floating planets which are capable of disrupting a stolen planet's orbit. This is a clear example of captured and stolen planets being affected in not only different, but in this case opposite ways, by certain initial conditions - underscoring that captured and stolen planets are distinct phenomena that are formed through independent mechanisms. These results also highlight the significant effect that a planet's initial semimajor axis can have on its fate, in agreement with previous studies \citep{2012ParkerQuanz, 2013HaoEtAl, 2015ZhengEtAl, 2019CaiEtAl}. \subsubsection{Free-floating initial conditions} The initial peak in the number of captured planets is larger for the initial conditions where the planets are initially free-floating, rather than bound to a star, as shown in the bottom right panel of Figure \ref{fig:Freq_main}. This is simply because there are more free-floating planets available to be captured at early times with these initial conditions. Conversely, however, there are significantly fewer stolen planets in these simulations. The highest number of stolen planets for the free-floating, $\alpha = 0.3$ initial conditions is 2. Several of the 20 simulations reach 2 stolen planets within the first several snapshots, but then subsequently drop to 1 or 0. This is because, in order to be stolen, the planet must first be captured onto an orbit. In this way, the earliest time at which a planet can be stolen is later for simulations with free-floating initial conditions, thereby reducing the initial peak to only $<2$ stars. This is an effect that the number of stolen planets does not recover from, as it is at these earlier times when planetary interactions, including theft, are more likely. This has implications for studies that use free-floating initial conditions to investigate planet capture and theft. For example, \citet{2017ParkerEtAl} used $N$-body simulations with free-floating initial conditions to investigate the origin of Planet 9 in the context of it having formed around a star other than the Sun. The choice of free-floating initial conditions will have reduced the frequency of planet theft, thereby also reducing the total number of planets which are orbiting a new star at the end of the simulations. It may therefore have affected how their conclusion, that the likelihood of Planet 9 having originated from another planetary system is almost zero, compares to that of other similar similar studies such as \citet{2016MustillEtAl} and \citet{2016LiAdams}, who find the chance of Planet 9 having formed via theft to be non-zero. Although, as discussed in \S\ref{sec:a} and shown in Figures \ref{fig:Cfreq_A} and \ref{fig:AvsE}, we find that planets with semimajor axes in Planet 9's predicted orbital range are most likely to have been captured. Nevertheless, it is important to be aware that free-floating initial conditions suppress the formation of stolen planetary systems, compared to corresponding simulations in which the planets are initially bound. We do not discuss free-floating initial conditions further, due to the low number of stolen planets. All further discussion relates to the sets of simulations where the planets are initially bound to host stars. \subsubsection{A note on planet-planet systems} We identify 5 planet-planet systems across all of our simulations. These planets tend to have very rich dynamical histories. For example, one planet in the $\alpha=0.3$, $a_p = 30$\,au simulations has repeated interactions with another star and planet. This leads to it being in a temporary planet-planet system. It is removed and then recaptured by its original star throughout the simulation, and ends the 10 Myr as free-floating, after becoming unbound from its original star a final time. All of these planet-planet systems are short-lived, and are each only identified in one 0.01 Myr snapshot. Such systems would therefore be very unlikely to be observed, and we do not include them in any formal analysis. \subsection{Semimajor Axis} \label{sec:a} \begin{figure} \centering \includegraphics[width=\columnwidth]{CFreqs_A_WithExoplanets_newaxes.png} \caption{Semimajor axis distribution for planets that are bound to a star after 10 Myr, categorised according to the three types of planetary orbit: preserved (grey), captured (yellow), and stolen (blue). We also show the distributions for preserved planets with altered orbits (the black lines), defined as a change in eccentricity of more than $\Delta e = 0.1$ and/or a change in semimajor axis of $\pm$10\,per cent. Results are summed and shown for all 20 realisations of all 4 sets of bound-planet, $r=1$ pc initial conditions, which are shown in separate panels. The semimajor axis distribution for directly detected exoplanets is also shown for comparison as a dotted green line in each panel. For the observed exoplanets, the semimajor axis is used where the data is available, otherwise the projected separation is plotted.} \label{fig:Cfreq_A} \end{figure} \begin{figure*} \centering \includegraphics[width=\textwidth]{AE_allsims_new.png} \caption{Characteristic `firework' plots of the semimajor axis vs eccentricity distribution. Results are shown for planets that are bound to a star after 10 Myr, divided into the three types of planetary orbit: preserved (grey), captured (yellow), and stolen (blue). Each planet is shown as a semi-transparent point. Results are summed and shown for all 20 realisations of all 4 sets of bound-planet, $r=1$ pc initial conditions, which are shown in separate panels.} \label{fig:AvsE} \end{figure*} The semimajor axis distributions for preserved, captured, and stolen planets differ significantly, as shown in Figures \ref{fig:Cfreq_A} and \ref{fig:AvsE}. Of the planetary systems that are bound at 10 Myr, Figure \ref{fig:Cfreq_A} shows that $\sim20\%$ of preserved planets have their semimajor axes disrupted such that it is greater than the initial 30-50 au value. In contrast, between between $\sim60-80 \%$ of captured and stolen planets have semimajor axes greater than this. One of the most noticeable trends in Figures \ref{fig:Cfreq_A} and \ref{fig:AvsE} is that captured planets tend to be on wider orbits than stolen and preserved planets. This is the case for all initial conditions and for both the average and upper limit values of $a$. This is a difference that could be seen observationally and used to distinguish a population of captured planets, as these results suggest that an exoplanet with an observed semimajor axis of $\gtrsim500$ AU has been captured. Comparing this to Planets 9's predicted orbital range of $a \sim 400-800$ AU), eccentricity ($e \sim 0.2-0.5$), and inclination ($i \sim 15-25 ^{\circ}$) \citep{2019BatyginEtAl, 2020FiengaEtAl}, these results suggest that, should Planet 9 exist, it is most likely to have been captured. Captured planets can have these wider orbits because capture tends to happen when the planet and star exit the cluster at the same time and in the same direction \citep{2012PeretsKouwenhoven, 2014ParkerMeyer}. In these cases, the star and planet will tend to be relatively isolated, without other gravitational interactions that may interfere with the new orbit. This means that a more loosely bound orbit will tend to remain bound for longer. The semimajor axis distribution of stolen planets is similar to the semimajor axis distribution of preserved planets. It is possible that using a realistic range of initial semimajor axes would add spread to the distributions, thereby causing them to be more similar, and harder to separate. However, comparing previous studies shows that results are consistent between simulations that use single semimajor axis values, and those that either select the semimajor axes from a distribution or use a wide range. For example, results are consistent when a single semimajor axis of 30 AU is used, and when a range of semimajor axes that have been sampled from a distribution that has a median of 30 AU \citep[e.g.][]{2012ParkerQuanz, 2015ForganEtAl, 2015ZhengEtAl}. Many of the preserved planets have relatively unaltered orbital properties, and as we used a delta function as our initial semimajor axis (all have $a = 30$\,au or $a = 50\,au$, and $e = 0$), the cumulative distribution of the preserved planets (shown in grey) may be dominated by planets that have not experienced an interaction with a passing star(s). To check this, we plot a second (black) line for preserved planets, but limit this to systems whose orbits are altered (defined as the semimajor axis changing by $\pm$10\%, and/or the eccentricity changing by $\Delta e \geq 0.1$, following \citet{2012ParkerQuanz})\footnote{In Appendix~\ref{appendix} we show the results when assuming more drastic properties for the altered orbits, i.e.\,\,the semimajor axis changing by $\pm$50\%, and/or the eccentricity changing by $\Delta e \geq 0.5$.}. Whilst the altered preserved planets (the black line) display a distribution that is closer to the stolen planets (the blue line), it is still much closer to the distribution for all preserved systems (the grey line), suggesting that the distributions of preserved and stolen planets are indeed distinct and different. Figure \ref{fig:Cfreq_A} also shows the semimajor axis distribution for directly imaged exoplanets\footnote{This data was taken from the NASA Exoplanet Archive on 18/02/2021.} (in most cases the projected separation data is used in place of the semimajor axis). We emphasise that the sample of directly imaged exoplanets is likely to be incomplete and affected by statistical biases, and we have no information on whether each planet in the sample formed at its observed separation, or whether some process(es) moved the planets. Despite these caveats we note that there is general agreement between our captured planet semimajor axis distribution and that of directly imaged exoplanets. This is the case for all of the high density initial conditions shown in Figure \ref{fig:Cfreq_A} suggesting that, if directly imaged planets on wide orbits are a result of dynamics, they are likely to be captured rather than stolen or preserved. If this is the case, then we might expect to discover more such planets on extremely wide ($>$1000\,au) orbits, which are present in our simulation data but not yet in the observational data \citep[though see][for efforts towards this parameter space]{Durkan2016}. \\ \\ \subsection{Eccentricity} \begin{figure} \centering \includegraphics[width=\columnwidth]{CFreqs_E_All_new.png} \caption{Eccentricity distribution for planets that are bound to a star after 10 Myr, categorised according to the three types of planetary orbit: preserved (grey), captured (yellow), and stolen (blue). We also show the distributions for preserved planets with altered orbits (the black lines), defined as a change in eccentricity of more than $\Delta e = 0.1$ and/or a change in semimajor axis of $\pm$10\,per cent. The results are summed and shown for all 20 realisations of all 4 sets of bound-planet, $r=1$ pc initial conditions, which are shown in separate panels.} \label{fig:Cfreq_E} \end{figure} Figure \ref{fig:Cfreq_E} shows that the eccentricity distribution for captured and stolen planets is thermal. This is expected for captured planets as a thermal distribution is seen for binary systems that have formed dynamically \citep{1975Heggie}. The eccentricity distribution for the preserved planets (the grey line) is very different to those for the captured and stolen planets (the yellow and blue lines, respectively). The distribution of eccentricities for the preserved planets could be dominated by the systems that have not experienced an encounter, which still have eccentricity values around zero. However, if we again use the definition from \cite{2012ParkerQuanz}, that a planet is disrupted if its semimajor axis is changed by 10\% or its eccentricity is increased above 0.1, we find that where $\sim20 \%$ of preserved planets have their orbits disrupted in terms of semimajor axis, $\sim~40-50 \%$ are disrupted in terms of eccentricity. If we plot the eccentricity distributions of preserved planets with altered orbits (the black line in Fig.~\ref{fig:Cfreq_E}), we can see that they straddle the parameter space between the entire preserved planet population, and the captured and stolen planets. However, this is mainly due to our definition for when an orbit is altered, i.e.\,\,$e>0.1$. The \emph{shape} of the distribution is still markedly different to the distributions of the captured and stolen planets. (Inspection of Figure \ref{fig:AvsE} shows that it is also possible for some stolen and captured planets to have semimajor axes that are indistinguishable from preserved planets that have not had their orbit disrupted.) The results of K-S tests confirm that the eccentricity distributions for captured and stolen planets are all very similar (K-S statistics $<0.1$), to a relatively high confidence (p-values ranging from 0.33 to 0.80). This is the case for all sets of bound-planet, $r=1$ pc initial conditions. The null hypothesis, that the eccentricity distributions for captured and stolen planets are sampled from the same underlying distribution, therefore cannot be rejected for these simulations. Eccentricity can therefore not be used to distinguish captured from stolen planets in observations of exoplanets that have likely formed in dense regions. The eccentricity distribution could, however, be useful for distinguishing the planets in a population that are preserved from those that are new systems, which have formed dynamically through either capture or theft. \subsection{Inclination} \label{sec:inclination} \begin{figure} \centering \includegraphics[width=\columnwidth]{CFreqs_I_All_new.png} \caption{Inclination distribution for planets that are bound to a star after 10 Myr, categorised according to the three types of planetary orbit: preserved (grey), captured (yellow), and stolen (blue). We also show the distributions for preserved planets with altered orbits (the black lines), defined as a change in eccentricity of more than $\Delta e = 0.1$ and/or a change in semimajor axis of $\pm$10\,per cent. The results are summed and shown for all 20 realisations of all 4 sets of bound-planet, $r=1$ pc initial conditions, which are shown in separate panels.} \label{fig:Cfreq_I} \end{figure} In Fig.~\ref{fig:Cfreq_I} we plot the distribution of planets' inclinations for preserved (grey lines), captured (yellow lines) and stolen (blue lines) planets. We also plot the preserved planets whose orbits have been significantly altered (defined as a change in eccentricity of more than $\Delta e = 0.1$ and/or a change in semimajor axis of $\pm$10\,per cent, the grey lines). For the captured and stolen planets, we assume the inclination with respect to the plane, and for the preserved planets we plot the relative change in inclination (as the initial inclination angles were randomly chosen). Figure \ref{fig:Cfreq_I} shows that, as expected, planets are stolen and captured onto orbits with random inclinations. In our simulations, we find $\sim20\,\%$ of preserved planets have their inclinations disrupted by more than $10 \%$. This is comparable to the percentage that are disrupted in terms of their semimajor axis. As would be expected, this shows that, should a planet be observed in a system with a disk or other planets, the relative inclination could be used to determine whether the exoplanet has likely been captured or stolen from another star \citep[as an interaction that would disrupt one planet would likely induce instabilities in the orbits of the other planets, e.g.][]{Malmberg2007} -- a small relative inclination might imply the planets had formed in the same system. \subsection{Effects of Lower Density} \label{sec:lowden} \begin{figure} \centering \includegraphics[scale =0.85]{Freqs_LowDen_Comparison_new.png} \caption{The number of each type of planetary orbit over 10 Myr, plotted from the first snapshot at 0.01 Myr to 10 Myr. The first column shows this for the lower density, $r=5$ pc, $\alpha=0.3$, $a_p = 30$\,au initial conditions. The second columns shows this for the higher density $r=1$ pc, $\alpha=0.3$, $a_p = 30$\,au initial conditions. The number of free-floating, preserved, stolen, and captured planets are shown in shades of red, grey, blue, and yellow, respectively. Each individual simulation is shown in a different hue of the same colour.} \label{fig:Freq_LowDen} \end{figure} \begin{figure*} \centering \includegraphics[width=\textwidth]{CFreq_AndE_LowDensity_Exo_new.png} \caption{Semimajor axis and eccentricity distribution for planets that are bound to a star after 10 Myr, categorised according to the three types of planetary orbit: preserved (grey), captured (yellow), and stolen (blue). Results are summed and shown for all of the lower density $r=5$ pc, $\alpha=0.3$, $a_p = 30$\,au initial conditions and the higher density $r=1$ pc, $\alpha=0.3$, $a_p = 30$\,au initial conditions. The lower density results are shown as solid lines, and the higher density results are shown as slightly transparent dashed lines. The semimajor axis distribution for directly detected exoplanets is also shown for comparison as a dotted green line in the lefthand panel.} \label{fig:LowDensity_CFreq} \end{figure*} For comparison, we have also run a set of simulations using lower density ($100$ M$_{\odot}$pc$^{-3}$) initial conditions, with an initial radius of 5 pc. We compare these lower density $\alpha=0.3$, 30 au simulations to the higher density $\alpha=0.3$, 30 au simulations in Figures \ref{fig:Freq_LowDen} and \ref{fig:LowDensity_CFreq}. Figure \ref{fig:Freq_LowDen} compares the number of each type of planetary orbit over time, in the same way as Figure \ref{fig:Freq_main}. The first difference that can be seen is that the low density initial conditions produce fewer free-floating planets than preserved planets after 10 Myr. This is in contrast to the high density initial conditions which produce more free-floating planets than preserved planets, as more are ejected from their birth system. It can be seen from the bottom panels of Figure \ref{fig:Freq_LowDen} that the lower density initial conditions lead to more captured planets after 10 Myr. This is because, in this less extreme environment, although there are fewer free-floating planets available to be captured, captured systems that do form are more likely to survive. There no significant change to the average number of stolen planets when the density is lowered. However, there is a smaller spread in the number of stolen planets for the low density initial conditions. Both the semimajor axis and eccentricity distributions are affected by the initial density being lowered. This is shown in Figure \ref{fig:LowDensity_CFreq}, where the higher density results are shown as slightly faded dashed lines, and the low density results are shown as solid lines. More stolen planets are able to stay stable on wider orbits for the lower density initial conditions, therefore broadening the stolen planet semimajor axis distribution. For captured planets, the top $\sim5\%$ of the semimajor axis distribution is similar, regardless of density. However, the additional numbers of planets that are captured in the lower density simulations tend to preferentially fill the center of the distribution. This has the effect of making the captured planet semimajor axis distribution more similar to that of the stolen and preserved planets. Nevertheless it is still the case that a planet on an orbit wider than $\sim500$ au is most likely to be captured, regardless of the initial density of the star-forming region. The eccentricity distribution of the stolen planets remains thermal, as shown in the right panel of Figure \ref{fig:LowDensity_CFreq}. However, the eccentricity distribution of the captured planets flattens for the low density simulations. This means that, at these low densities, the eccentricity distribution of the stolen, captured, and preserved planets are all distinct from each other. Eccentricity data could therefore be used to separate populations of stolen, captured, and preserved planets from each other in the exoplanet data, should an estimate of their formation density be available (see \citealt{2020WinterEtAl, 2021AdibekyanEtAl}). \subsection{Effects of Substructure} \label{sec:substruct} We now examine the effects of the initial degree of substructure in the simulations. We do this by keeping the initial stellar density constant, and then compare the frequencies of different types of planetary systems with differing amounts of substructure. In Fig.~\ref{fig:substructure_freqs} we show the numbers of preserved, stolen and captured planets, as well as the numbers of free-floating planets. Changing the fractal dimension has a significant effect of the results. The main result is that the number of stolen and captured planets is higher in the more substructured simulations, and the number of free-floating planets is also much higher (conversely, in the more substructured simulations, the number of preserved planets is lower). All this is despite the stellar densities in these simulations being identical ($\tilde{\rho} = 10^4$\,M$_\odot$\,pc$^{-3}$). In the non-substructured simulations $D = 3.0$), the stellar density actually remains higher throughout the duration of the simulation, so the differences must be due to the evolution of the clumps of substructure. The more substructured simulations have more velocity correlation in the clumps of substructure \citep{2004GoodwinWhitworth,2020DaffernPowellParker}, which facilitates a higher degree of violent relaxation \citep{LyndenBell67}, leading to the collapse of the clumps of substructure. This process enhances the number of exchange interactions, as well as increasing the number of systems that break apart. The more correlated velocities in the substructured simulations also facilitate a higher rate of capture \citep{Kouwenhoven10,2012PeretsKouwenhoven}. Despite the significant differences in the numbers of preserved, free-floating, captured and stolen planets as a function of the amount of substructure, the distributions of the orbital parameters (semimajor axis, eccentricity and inclination) are relatively constant for the different substructure regimes, as shown in Fig.~\ref{fig:substructure_orbits}. \begin{figure*} \centering \includegraphics[scale =1.05]{Freqs_Substructure_Comparison_3panel.png} \caption{The effect of varying the initial degree of substructure on the number of each type of planetary orbit over 10 Myr, plotted from the first snapshot at 0.01 Myr to 10 Myr. The first column shows this for simulations with a high amount of initial substructure, $D=1.6$, with $\alpha=0.3$, $a_p = 30$\,au as the initial conditions (our `default' simulations). The second column shows this for the simulations that have a moderate degree of substructure ($D=2.0$), with $r=0.5$ pc, $\alpha=0.3$, $a_p = 30$\,au as the initial conditions. The third column shows the results for simulations where their is no initial substructure ($D=3.0$), with with $r=0.25$ pc, $\alpha=0.3$, $a_p = 30$\,au as the initial conditions. The radii are set such that the initial stellar densities are all $10^4$\,M$_\odot$\,pc$^{-3}$ in the three sets of simulations. The number of free-floating, preserved, stolen, and captured planets are shown in shades of red, grey, blue, and yellow, respectively. Each individual simulation is shown in a different hue of the same colour.} \label{fig:substructure_freqs} \end{figure*} \begin{figure*} \centering \includegraphics[scale=0.85]{CFreq_AndE_LowDensity_Exo_substructure.png} \caption{Semimajor axis, eccentricity and inclination distributions for planets that are bound to a star after 10 Myr, categorised according to the three types of planetary orbit: preserved (grey), captured (yellow), and stolen (blue). Results are summed and shown for all simulations with differing amounts of substructure; those with a high degree of spatial and kinematic structure ($D=1.6$) are shown by the dashed lines, those with a moderate degree of substructure ($D=2.0$) are shown by the solid lines, and those with no substructure ($D=3.0$) are shown by the dotted lines. The semimajor axis distribution for directly detected exoplanets is also shown for comparison as a dot-dashed green line in the lefthand panel. } \label{fig:substructure_orbits} \end{figure*} \subsection{Comparison to Previous Work} As has already been highlighted by other studies \citep[e.g. that of][when comparing their results to Parker \& Quanz 2012]{2013CraigKrumholz}, differences in the initial conditions and method of simulation can result in large differences in the number of free-floating planets, as well as the numbers of stolen, captured, and preserved planets. In terms of the number of free-floating planets, we find that $\gtrsim$50\% of planets are free-floating at the end of these simulations, depending on the initial conditions. This means that they are of order 10 times more common than stolen and captured planets, and $\sim 1.5 - 2$ times more common than planets that remain bound to their original star. This is higher than the $~10$\% obtained by \citet{2012ParkerQuanz} for simulations where planets are placed at 30 au, and is likely caused by our use of a fractal dimension of 1.6, rather than 2. This leads to initial densities that are $\sim10$ times higher in our high density, $r=1$ pc simulations (of order $10^4$\,M$_\odot$\,pc$^{-3}$, compared to $10^3$\,M$_\odot$\,pc$^{-3}$, in \citealt{2012ParkerQuanz}). Although it is unclear whether many star-forming regions have initial densities of this magnitude \citep{2014Parker}, the purpose of this paper is primarily to investigate the orbital properties of stolen and captured planets in the most extreme star-forming environments. In terms of the frequencies of stolen and captured planets, our $\approx4$\% is an order of magnitude higher than the 0.4\% obtained by \citet{2012ParkerQuanz}, due to their $N$-body simulations having initial densities that are an order of magnitude lower than those used in this paper. Although the frequencies of each type of planet can vary significantly in this way, the orbital ranges and distributions in $a-e$ space are broadly consistent with previous studies. As noted in Section~1, the alternative approach in which planetary simulations are evolved separately but within global simulations of star-forming regions is limited by the fact that planets cannot be come free-floating in the star-forming region (and possibly then (re)captured), nor can these simulations model exchange interactions where planets can be stolen from other stars. As such, a detailed comparison with these studies is not possible, and would also be hamstrung by the lack of long-term evolution of the planets in our simulations. This is a major shortcoming of our approach of modelling the planets within the star-forming regions via a `brute force' method. \section{Conclusions} \label{sec:Conlcusion} We use $N$-body simulations of planets in star-forming regions to investigate the dynamical evolution of the planets within them. Our star-forming regions are highly substructured initially, with a fractal dimension of $D=1.6$, and we model star-forming regions with both sub and supervirial initial conditions (virial ratios of 0.3 and 1.5 respectively). There are 1000 stars in each star-forming region, half of which have planets initially placed at either 30 AU or 50 AU. The dynamical evolution of the star-forming regions is followed for 10 Myr, and we focus on the orbital properties of stolen planets (that have been directly exchanged between stars during an encounter), and how these compare to that of captured free-floating planets and planets that remain bound to their original star. \medskip \noindent Our main results are summarised as follows: \begin{enumerate} \item We find that planet theft and capture should be seen as two distinct mechanisms, and should therefore be treated and analysed as such wherever feasible. Our evidence for this is twofold. First, we find that the number of stolen and captured planets is a strong function of the initial conditions. Second, we find that the orbital distributions of stolen and captured planets are distinct. The evidence of these differences is lost when stolen planets are categorised together with captured ones. \item The orbital properties of stolen, captured, and preserved planets are distinct enough that these characteristics could be used to distinguish their formation channel if an estimate of the initial conditions of their star-forming region are known. Although there is overlap between orbital property distributions, combining semimajor axis and eccentricity data could observationally distinguish populations of stolen, captured, and preserved planets that were born in high density star-forming regions. For planets that have formed in such regions, the semimajor axis distribution can separate captured planets from those that are stolen and preserved, and eccentricity can then separate stolen planets from those that are preserved. If available, inclination data would also be useful in distinguishing planets that have been captured or stolen from another system. This analysis could be performed on populations of planets as a whole to estimate the frequency of each type of planet, or on individual systems to estimate the probability that a planet is stolen, captured, or has remained orbiting in its original system. \item Regardless of the initial conditions, we find that a planet with a semimajor axis of $\gtrsim 500$ au is mostly likely a captured planet. And comparing our orbital property results to Planet 9's predicted orbital range of $a \sim 400-800$ AU and $e \sim 0.2-0.5$ suggests that, should it exist, Planet 9 is most likely to have been captured, rather than stolen. \item The semimajor axis distribution of our captured planets is in some instances similar to the semimajor axis distribution of exoplanets found by direct imaging (although these data are likely to be biased and incomplete). There is debate about the formation mechanism of exoplanets, especially those on wide orbits, and our results suggest that they may be captured, formerly free-floating planets, as has been suggested by previous studies \citep{2012PeretsKouwenhoven}. \item We find that theft and capture are relatively common, with $\sim2\%$ of planets being in stolen systems, and $\sim2\%$ in captured systems at 10 Myr. The likelihood of planet theft and capture should therefore not be seen as negligible, especially for star-forming regions which may have had relatively dense initial conditions, as simulated here. \item Smaller (30 au) initial semimajor axes lead to more stolen planets than captured ones after 10 Myr, whilst larger (50 au) initial semimajor axes lead to more captured planets than stolen ones. This suggests that the outcome of dynamical interactions has a strong dependance on the planet's semimajor axis. \item In simulations where all of the planets are initially free-floating, rather than bound to a star, the incidence of planet theft is negligible. This can give the false impression that planet theft is very rare, and negligible compared to capture, when this is not the case in simulations where the planets are all initially bound to stars. \item The initial degree of spatial and kinematic substructure in a star-forming region is as important as the stellar density parameter in determining how many, and the extent to which, planetary systems are disrupted. Lower densities result in fewer free-floating planets, and fewer stolen planets, but increase the likelihood of planetary capture. Simulations with more substructure lead to more stolen planets, more captured planets, and more free-floating planets (fewer preserved planets), even when the stellar densities are identical. This is caused by the violent relaxation within the clumps of substructure. Varying other parameters, such as the initial virial ratio, have much more modest effects. \end{enumerate} In general, comparing our results to that of other papers illustrates the significant effects that initial conditions can have on young planetary systems. These interactions can be not only destructive, but also lead to the creation of new and unique planetary systems. \section*{Acknowledgements} We thank the anonymous referee for their suggestions and constructive criticism of our manuscript. ECD acknowledges support from the UK Science and Technology Facilities Council in the form of a PhD studentship. RJP acknowledges support from the Royal Society in the form of a Dorothy Hodgkin Fellowship. Part of this work has been carried out within the framework of the National Centre of Competence in Research ``PlanetS'' supported by the Swiss National Science Foundation. SPQ acknowledges the financial support of the SNSF. For the purpose of open access, the authors have applied a Creative Commons Attribution (CC BY) license to any Author Accepted manuscript version arising. \section*{Data Availability} The data underlying this article will be shared on reasonable request to the corresponding author. \bibliographystyle{mnras}
\section{Introduction}\label{sec:intro} The recent interest in asymptotic symmetries \cite{Hawking:2016msc,Hawking:2016sgy} is motivated in large part by the applications to black hole physics. The asymptotic symmetries of particular interest in this paper are the BMS supertranslations and the dual supertranslations. While the supertranslations are associated with a certain class of diffeomorphisms, parametrized by a function on a two-sphere, no such association is known for the dual ones. However, in ref$.$ \cite{Godazgar:2019dkh}, it was noted that the dual symmetries are contained in a complexification of the usual supertranslation charge. The action of this complexified charge on phase space was also investigated there, indicating that this situation is completely analogous to what happens in electromagnetism, \cite{Strominger:2015bla}. This analogy with electromagnetism is further explored in this paper by considering the algebra of the dual and standard supertranslation charges (electric and magnetic charges in electromagnetism) for a particular form of the parameter function on the sphere. Indeed, taking note of the fact that in electromagnetism Dirac string like configurations in the bulk correspond to singular gauge transformations, we are motivated to consider the two-sphere parameter functions which have a simple pole in terms of complex stereographical coordinates on the sphere. Such singular gauge transformations in electromagnetism were considered in \cite{Hosseinzadeh:2018dkh,Freidel:2018fsk} and it was found that the algebra of the electric and magnetic charges at null infinity contained a central term. In this paper we consider pure gravity without matter and show that an analogous central term arises in the algebra of standard and dual supertranslation charges at the future black hole horizon even if there are no bulk NUT charges. We further find that this anomaly in the charge algebra may be canceled by including a holographic Chern-Simons theory on the horizon of the black hole. We give an outline discussion of the electromagnetic case first and construct the Chern-Simons theory here as well, so as to bring out the analogies and differences between the two theories. We find the Chern-Simons theory for electromagnetism to have gauge group $\mathrm{U}(1)\otimes \mathrm{U}(1)$, in agreement with a similar result on future null infinity in \cite{Freidel:2018fsk}. For the case of gravitation, we find the Chern-Simons theory to have gauge group $\mathrm{SL}(2,\mathbb C)$ on the horizon. The implications of this for a quantum theory of gravity, in particular, the relevance of the states of the Chern-Simons theory to black hole physics, is beyond the scope of this work but will be treated elsewhere. In section \ref{sec:bms}, we review the analog of both the standard and dual supertranslations on the black hole horizon in the Bondi gauge. In section \ref{sec:charges}, we introduce the charges associated with the diffeomorphism symmetries. In parallel, we also discuss the dual, magnetic, counterpart of the diffeomorphism symmetries. In section \ref{sec:algebra}, we continue the discussion of charges and allow for the possibility that there could be singularities in the supertranslations. We examine in detail the case of the supertranslation generator having a simple pole when expressed in the usual complex coordinates on the two-sphere of the horizon and show that the algebra of electric (standard) and magnetic (dual) supertranslation charges is anomalous. The central charge is explicitly calculated here. In section \ref{sec:em}, we examine electromagnetic soft hair on the black hole horizon and show that in this case, also, there is an anomaly in the charge algebra when one has both electric and magnetic transformations. We show that this anomaly can be canceled by supposing that the horizon has a Chern-Simons theory living on it. In section \ref{sec:cs}, we repeat this analysis for the gravitational case and find that the Chern-Simons theory that does the job here was formulated earlier in \cite{Witten:1988hc}. We conclude with a brief discussion of our results. \section{BMS transformations}\label{sec:bms} We begin by reviewing the notion of supertranslations on the future horizon of the Schwarzschild black hole. The Schwarzschild metric in terms of the advanced Eddington-Finkelstein coordinate $v$, and the stereographic coordinates $z^A$ ($A=1,2$) which parametrize a unit 2-sphere with metric $\gamma_{AB}$ is given by, \begin{align} ds^2 = g_{ab}dx^adx^b = -\left(1-\frac{2M}{r}\right) dv^2 + 2dvdr + r^2 \gamma_{AB} dz^A dz^B. \end{align} We will work in the Bondi gauge, where $g_{rr} = 0$, $g_{rA}=0$, ${\partial}_r \det\frac{g_{AB}}{r^2}=0$ where $g_{AB}$ is the metric on the two-sphere. The diffeomorphisms that respect the Bondi gauge conditions are generated by the vector field \cite{Hawking:2016msc,Hawking:2016sgy}, \begin{align} \xi^a{\partial}_a = X {\partial}_v - \frac{1}{2}\left(rD_A X^A + D^2 X\right) {\partial}_r + \left(X^A + \frac{1}{r}D^A X\right){\partial}_A , \label{xi} \end{align} where, $D_A$ is the covariant derivative with respect to $\gamma_{AB}$ and the $A,B,\ldots$ indices are raised and lowered using the metric on the unit two-sphere $\gamma_{AB}$. Supertranslations are generated by $X=f$ and $X^A=0$, while superrotations are generated by $X=\frac{u}{2}D_AY^A$, $X^A=Y^A$. Here $f$ parametrizes the diffeomorphism on a two-sphere (either at null infinity or the horizon). In this paper, we will be interested in the charge associated with supertranslations and the related dual supertranslations. The dual gravitational charges are given by twisted fields \cite{Godazgar:2019dkh,Choi:2019sjs} defined through the Levi-Civita tensor $\epsilon _{AB}$ on the two-sphere. Unlike the supertranslation charge, they do not generate diffeomorphisms and may be derived, as recently shown in \cite{Godazgar:2020kqd,Godazgar:2020gqd}, by introducing the topological Holst term to the Einstein action. The most convenient way to view the dual symmetries is through a complexification of supertranslation charge \cite{Godazgar:2019dkh}. It was shown in this last reference that the complexified charge acts on the phase space in a manner consistent with what one would expect for the analogous case of electric and magnetic charges in electromagnetism \cite{Strominger:2015bla}. Specifically, the complex charge on future null infinity is given by \cite{Godazgar:2019dkh} \begin{align} \textbf{Q}^+_f = -\frac{1}{16\pi}\int_Sd\Omega(-4fm_B + fD^2_zC^{zz} + D_{{\bar{z}}}fD_{{\bar{z}}}C^{{\bar{z}}{\bar{z}}}), \end{align} where, $S$ is the two-sphere at future null infinity, $rC_{AB}=\delta g_{AB}$, $\delta g_{AB}$ is the variation of the metric $g_{AB}$ and $m_B$ the Bondi mass aspect. They further find that its action on phase space may be represented by, \begin{align} \{\textbf{Q}^+_f, C_{zz}(u,z,{\bar{z}})\} &= f\partial_uC_{zz} \\ \{\textbf{Q}^+_f, C_{{\bar{z}}{\bar{z}}}(u,z,{\bar{z}})\} &= f\partial_uC_{{\bar{z}}{\bar{z}}} - 2D^2_{{\bar{z}}}f. \end{align} Thus, $Q^+_f$ generates time translation of on the mode, $C_{zz}$ and a supertranslation on the other mode $C_{{\bar{z}}{\bar{z}}}$ in complete analogy with the electromagnetic case discussed in \cite{Strominger:2015bla}. \section{Horizon charges}\label{sec:charges} Let us now construct charges that generate the standard and dual BMS supertranslations on the horizon. Consider a spacelike hypersurface $\Sigma$ that extends from a section of $\mI^+$ to a section of $\mathcal{H}^+$. A charge $Q_f^\Sigma$ associated to $\Sigma$ then splits into two parts, \begin{align} Q_f^\Sigma = Q_f^{{\mH^+}} + Q_f^{\mathcal{I}^+} , \end{align} where $Q_f^{{\mH^+}}$ is defined on a section on the future horizon $\mathcal{H}^+$ and $Q_f^{\mathcal{I}^+}$ is defined on a section on the future null infinity $\mathcal{I}^+$. We refer to the horizon contribution $Q_f^{\mH^+}$ as the horizon charge. The horizon charge can be written as an integral on ${\mH^+}$ so long as the contribution from the future boundary $\mathcal{H}^+_+$ vanishes. In this paper, we take the viewpoint that the black hole ultimately evaporates, and hence this contribution is negligible. If a horizon has a future end-point, in classical general relativity this point must be singular. Following common practice, we assume that this is not an issue and that the quantum theory will ultimately resolve this problem. The horizon charge can therefore be written either as a 3-dimensional integral of a total $v$-derivative over ${\mH^+}$, or a 2-dimensional integral over $\mathcal{H}^+_-$ To each vector field $\xi$ that does not vanish on $\Sigma$, there exists a diffeomorphism (electric) horizon charge $Q_f^{\mH^+}$ associated to the diffeomorphism generated by $\xi$, as well as a dual (magnetic) horizon charge $\widetilde Q_f^{\mH^+}$ that originates from the Holst action \cite{Godazgar:2020kqd}. Variations of such charges can be computed using the covariant phase space formalism in the first-order formulation of gravity \cite{Godazgar:2020kqd,Godazgar:2020gqd}. Taking the vector field $\xi$ to be the supertranslation generator \eqref{xi}, we obtain the standard and dual supertranslation horizon charges, \begin{align} \slashed \delta Q^{\mH^+}_f &= \frac{1}{16\pi M}\int_{\mH^+} dv\,d^2\Theta \sqrt \gamma f(\Theta) D^A D^B \sigma_{AB} ,\\ \slashed \delta \widetilde Q^{\mH^+}_f &= \frac{-1}{32\pi M}\int_{{\partial}{\mH^+}} d^2\Theta\sqrt\gamma (D^B f) \epsilon_A{}^CD^Ah_{BC} , \end{align} where $h_{AB}=\delta g_{AB}$ is the variation of the metric, and $\sigma_{AB}=\frac{1}{2}{\partial}_v h_{AB}$ is its conjugate momentum. It is possible that these variations are non-integrable, and we emphasize this point with the notation $\slashed\delta$, in contrast to integrable variations denoted by $\delta$. \section{Charge algebra}\label{sec:algebra} In this section, we demonstrate that the Dirac bracket algebra between the standard and dual supertranslation charges on the horizon exhibits a central term when the parameter function exhibits a singularity. For this purpose, let us consider a function $f=\frac{1}{z-w}$ with a simple pole at $z=w$ and a smooth function $g$.\footnote{We work with a simple pole for explicit computation, but a similar line of argument can be carried out for logarithms.} Then, the dual charge for smooth $g$ becomes integrable $\QM[g]=\iQM[g]$, but the supertranslation charge acquires a non-integrable piece, \begin{align} \QE &= \iQE - \frac{1}{4M}\int_{-\infty}^\infty dv D_z [D^2-1]^{-1}D^BD^A \sigma_{AB}\bigg|_{z=w} . \end{align} It is straightforward to check that the non-integrable piece has vanishing Dirac brackets with all charges, and therefore can be ignored for our computation of brackets. Natural definitions of the integrable variations are given by \begin{align} \iQE &\equiv \frac{1}{16\pi M}\int_{\mH^+} dv\,d^2\Theta \sqrt \gamma\, (D^BD^Af) \sigma_{AB} \label{iQE} ,\\ \iQM &\equiv \frac{-1}{32\pi M}\int_{\mH^+_-} d^2\Theta \sqrt \gamma\, (D^BD^Af) \epsilon_A{}^Ch_{BC} \label{iQM} . \end{align} It is worth noting that $\iQM$ is related to $\iQE$ by the twisting $h_{AB} \to \epsilon_A{}^C h_{CB}$ \cite{Godazgar:2018dvh,Godazgar:2019dkh,Choi:2019sjs}. These variations are first-order perturbations around the Schwarzschild background. Thus, one can imagine that a full (integrated) charges $Q$ has the expansion \begin{align} Q &= Q_0 + \delta Q + O(h^2) . \end{align} Here $Q_0$ is the charge evaluated on the Schwarzschild metric, which is a constant and hence does not carry degrees of freedom. This implies that at leading order in $h$, the Dirac bracket between the full charges $\QEfull$ and $\QMfull[g]$ is \begin{align} \{ \QEfull, \QMfull[g] \} &= \{ \iQE, \iQM[g] \} + O(h) . \end{align} Since both $\iQE$ and $\iQM[g]$ are linear in $h_{AB}$ and $\sigma_{AB}$ respectively, their Dirac bracket is a constant. This implies that the bracket $\{\iQE,\iQM[g]\}$ contains information about the central term of the full charge algebra. By tedious but straightforward computation, one finds that \begin{align} \left\{\iQE[f=\frac{1}{z-w}], \iQM[g]\right\} &= \frac{-i}{4} D^z D_z^2 g\bigg|_{z=w} . \end{align} This is one of the central results of our paper. \section{Electromagnetism}\label{sec:em} In the previous section, we have shown that the presence of a pole in the supertranslation parameter function leads to a central term in the charge algebra. In this section, we review similar results for electromagnetism, and show that such central term can be removed by adding a Chern-Simons theory on the horizon. We refer the reader to \cite{Hosseinzadeh:2018dkh,Freidel:2018fsk} for related discussions on $\mathcal{I}^+$. In electromagnetism, the asymptotic symmetries are the electric and magnetic large gauge transformations. The soft horizon charges are given by the expressions \begin{align} \eQE &= \int_{{\mH^+}} d\psi\wedge *F ,\qquad \eQM[\sigma] = \int_{{\mH^+}} d\sigma\wedge F , \end{align} where $\psi=\psi(z, {\bar{z}})$ and $\sigma=\sigma(z, {\bar{z}})$ are functions on the sphere. It is straightforward to see that they satisfy the algebra \begin{align} \{\eQE,\eQM[\sigma]\} &= \int_{{\partial}{\mH^+}} d\psi\wedge d\sigma ,\\ \{\eQE,\eQE[\sigma]\} &= 0 ,\quad \{\eQM,\eQM[\sigma]\} = 0 . \end{align} One observes that poles in $\psi$ (or $\sigma$) lead to central terms in the algebra. Central terms in a symmetry algebra imply the existence of anomalies. One way to remove such a term is to add a boundary theory on ${\mH^+}$ that has an asymptotic charge algebra with a central term canceling it. For this purpose, let us consider a $\mathrm{U}(1)\otimes \mathrm{U}(1)$ Chern-Simons theory on ${\mH^+}$, \begin{align} S = \int_{{\mH^+}} a\wedge d\widetilde a , \end{align} where $a$ and $\widetilde a$ are the electric and magnetic $\mathrm{U}(1)$ gauge fields. Under an electric large gauge transformation (LGT), $\delta a=d\phi$ and $\delta \widetilde a=0$, and under a magnetic one $\delta a=0$ and $\delta\widetilde a=d\widetilde\phi$. They are generated by the charges \begin{align} \delta \mathcal{Q}_\phi &= -\int_{{\partial}{\mH^+}} d\phi\wedge \delta \widetilde a ,\\ \delta \widetilde \mathcal{Q}_{\phi} &= \int_{{\partial}{\mH^+}} \delta a\wedge d\phi , \end{align} respectively. The charge algebra is \begin{align} \{ \mathcal{Q}_{\phi},\widetilde\mathcal{Q}_{\varphi}\} &= -\int_{{\partial}{\mH^+}} d\phi\wedge d\varphi ,\\ \qquad \{ \mathcal{Q}_{\phi},\mathcal{Q}_{\varphi}\} &= \{ \widetilde\mathcal{Q}_{\phi},\widetilde\mathcal{Q}_{\varphi}\} = 0 . \end{align} Therefore, one finds the algebra to be exactly parallel to that of standard and dual LGT charges on the horizon. This tells us that putting a $\mathrm{U}(1)\otimes \mathrm{U}(1)$ Chern-Simons theory on the horizon, we can get rid of the central term in the standard and dual LGT algebra. \section{Gravitational Chern-Simons theory}\label{sec:cs} In this section, we will follow Witten's approach to gravity in three dimensions \cite{Witten:1988hc} and consider a gravitational Chern-Simons theory on the horizon. The algebra of the charges in this theory is calculated and the parameters chosen such that the central term here cancels the one found in section \ref{sec:algebra}. In three dimensions, we use $i,j,\ldots$ for spacetime indices and $a,b,\ldots$ for tangent space. The action is given in the canonical form by, \begin{equation} I_{CS} = \frac{k}{4\pi}\int \tr\ \bigl(A\wedge dA + \tfrac{2}{3} A \wedge A \wedge A\bigr). \end{equation} We take the gauge group to be ${\bf G}=\mathrm{SL}(2,\mathbb C)$. The gauge field decomposes as $A_i = e^a_i P_a + {\omega}^a_i J_a$, where the generators $P_a$ and $J_a$ satisfy the commutators \begin{align} [J_a,J_b] = \epsilon_{abc}J^c ,\quad [J_a,P_b] = \epsilon_{abc}P^c ,\quad [P_a,P_b] = \lambda \epsilon_{abc}J^c , \end{align} where the Cartan metric $\eta_{ab}=\diag(-++)$ is used to lower and raise tangent space indices, and $\lambda=-\frac{1}{4M^2}$ is a negative constant. As the names suggest, Witten found that this Chern-Simons theory is equivalent to a first-order Einstein theory after identifying $e^a_i$ and ${\omega}^a_i$ as the vielbein and the spin connection. There exist two Killing forms and therefore one can write two actions in terms of $e^a$ and ${\omega}^a$. The first Killing form is $\langle J_a,P_b \rangle = \eta_{ab}$, with all other components vanishing. It leads to the \textit{electric} action \begin{equation} I_\text{electric} = \frac{k}{2\pi}\int_{{\mH^+}} 2e^a\wedge d\omega_a + \epsilon_{abc} e^a\wedge \omega^a\wedge \omega^c +\, \tfrac{1}{3}\lambda \epsilon_{abc} e^a\wedge e^b\wedge e^c \label{eq:actA} . \end{equation} The second Killing form has non-vanishing components $\langle J_a,J_b \rangle = \eta_{ab}$, $\langle P_a,P_b \rangle = \lambda\eta_{ab}$, and it leads to the \textit{magnetic} action, \begin{equation} I_\text{magnetic} = \frac{\widetilde k}{\pi}\int_{\mH^+} \omega^a\wedge d\omega_a + \tfrac{1}{3}\epsilon_{abc}\omega^a \wedge \omega^b \wedge \omega^c + \lambda e^a \wedge de_a + \lambda\epsilon_{abc}\omega^a\wedge e^b \wedge e^c. \label{eq:actB} \end{equation} $\widetilde{k}$ is arbitrary here but we will see later that it can be expressed in terms of $k$ by demanding that the complexified charges form a closed algebra in the absence of any poles in the function parametrizing the diffeomorphisms. Drawing analogy to four-dimensional gravity, the electric action corresponds to the Einstein-Hilbert action whereas the magnetic action corresponds to the Holst action \cite{Godazgar:2020kqd}. As in four dimensions, we take the electric action to be our gravitational Chern-Simons theory, and use the magnetic action only to derive the dual charge. There are two types of gauge transformations, one labeled by a tangent-space vector $\rho^a$ and the other by a second vector $\tau^a$. The fields transform as $\delta e_i^a = -\partial_i\rho^a - \epsilon^{abc}\omega_{ib} \rho_c$ and $\delta\omega_i^a = -\lambda\epsilon^{abc}e_{i\,b}\rho_c$ under $\rho$, and $\delta e_i^a = -\epsilon^{abc}e_{ib} \tau_c$ and $\delta \omega_i^a = -\partial_i\tau^a - \epsilon^{abc}\omega_{ib} \tau_c$ under $\tau$. The $\tau$-transformations correspond to Lorentz transformations on the tangent space, whereas the $\rho$-transformations correspond to diffeomorphisms $\rho^a = \imath_v e^a$ generated by the spacetime vector field $v$ up to a compensating Lorentz transformation. Using the covariant phase space formalism, one finds the electric and magnetic charges associated with the gauge transformations to be \cite{ACP} \begin{align} Q^E_{\rho,\tau} &= -\frac{k}{\pi} \int_{\partial \Sigma} \ \tau_ae^a+\rho_a\omega^a ,\\ Q^M_{\rho,\tau} &= -\frac{2\widetilde k}{\pi} \int_{\partial \Sigma} \tau_a\omega^a + \lambda\rho_ae^a . \end{align} The domain of integration $\partial \Sigma$ is the collection of closed loops around the singularities.\footnote{ This implies that the charges vanish for smooth parameter functions. However, we are interested in the variation of these charges under the action of another charge with singularities, which may not be zero. } Having computed the magnetic charge, we dispose of the magnetic action and work solely with the electric action. The symplectic structure of the electric theory dictates that the only non-vanishing Dirac bracket of the theory is \begin{align} \{e^a_z(z,{\bar{z}}),w^b_{\bar{z}}(z',{\bar{z}}')\} = -\frac{i\pi}{k}\eta^{ab}\delta^2(z-z') , \end{align} where $z,{\bar{z}}$ are stereographic coordinates of the unit two-sphere. Using the brackets, one finds the following algebra of electric and magnetic charges \cite{ACP}, \begin{align} \{Q^E_{\tau,\rho},Q^E_{\tau',\rho'}\} &= Q^E_{\tau'',\rho''} - \frac{k}{\pi}\int_{{\partial}\Sigma} \left( \rho^a d\tau'_a + \tau^a d\rho'_a \right) ,\\ \{Q^E_{\tau,\rho},Q^M_{\tau',\rho'}\} &= Q^M_{\tau'',\rho''} - \frac{2\widetilde k}{\pi}\int_{{\partial}\Sigma}\left( \tau_a d\tau'^a + \lambda \rho_a d\rho'^a \right) ,\\ \{Q^M_{\tau,\rho},Q^M_{\tau',\rho'}\} &= 4\lambda\frac{\widetilde k^2}{k^2} Q^E_{\tau'',\rho''} - \frac{4\lambda\widetilde k^2}{\pi k}\int_{{\partial}\Sigma} \left( \rho^a d\tau'_a + \tau^a d\rho'_a \right) . \end{align} The composition is given by $\tau''^a=\epsilon^{abc}(\tau'_b\tau_c+\lambda\rho'_b\rho_c)$ and $\rho''^a=\epsilon^{abc}(\tau'_b \rho_c - \tau_b \rho'_c)$. We demand that the central term of this algebra cancels the central term observed in the supertranslation algebra on the Schwarzschild horizon which we computed for $f=\frac{1}{z-w}$. Since supertranslation is a diffeomorphism, it acts as a gauge transformation $\rho^a = \iota_v e^a$ on the horizon Chern-Simons theory with $v=f{\partial}_v+\frac{1}{2M}D^Af{\partial}_A$, up to a Lorentz transformation. We define the compensating Lorentz transformation of supertranslation to be \begin{align} \tau^0 = \frac{(D^2+2)f}{8(2\widetilde k)^{1/2}} ,\quad \tau^1 = i\sqrt\lambda\rho^2 ,\quad \tau^2 = -i\sqrt\lambda\rho^1 . \end{align} Note that all components are real since $\lambda$ is negative. Then algebra of charges with $f=\frac{1}{z-w}$, becomes \begin{align} \{Q^E_{\tau,\rho},Q^E_{\tau',\rho'}\} &= Q^E_{\tau'',\rho''} ,\\ \{Q^E_{\tau,\rho},Q^M_{\tau',\rho'}\} &= Q^M_{\tau'',\rho''} + \frac{i}{4} D^z D_z^2 f' ,\\ \{Q^M_{\tau,\rho},Q^M_{\tau',\rho'}\} &= 4\lambda\frac{\widetilde k^2}{k^2} Q^E_{\tau'',\rho''} . \end{align} The central term obtained here is exactly of the form to cancel the one obtained in section \ref{sec:algebra}. Note that $f'$ in the above is an arbitrary smooth function. It corresponds to the function $g$ introduced in section \ref{sec:algebra}. One can find the relation between $k$ and $\widetilde k$ by considering the complexified charge $\textbf{Q}_{\tau,\rho} = Q^E_{\tau,\rho} + i Q^M_{\tau,\rho}$. Demanding that the charges $\textbf{Q}_{\tau,\rho}$ form a closed algebra in the absence of poles in the parameters fixes $\widetilde k$ in terms of $k$ to be $\widetilde k^2 = -\frac{k^2}{4\lambda} = k^2M^2$. Finally, we find that the algebra of complexified charge including the pole in $f$ reads \begin{align} \{ \textbf{Q}_{\tau,\rho}, \textbf{Q}_{\tau',\rho'} \} &= \textbf{Q}_{2\tau'',2\rho''} + \frac{1}{2}D^zD_z^2 f' . \end{align} \section{Discussions}\label{sec:discussions} In this paper, we have explored the consequences of allowing the function parametrizing diffeomorphisms on the two-sphere of the horizon, having pole-like singularities. An important outcome is that the algebra of the standard and dual supertranslation charges develops a central term. We further showed that this anomaly may be canceled by putting an appropriate Chern-Simons theory on the horizon of the black hole. It was noted that both the gravitational case and the electromagnetic one are analogous in this regard. It is fortunate that the Chern-Simons is a topological theory as it is metric independent. There are two nice properties that follow. The first is that since the horizon is a null surface, the metric is degenerate there. One cannot invert the metric. Had the theory been metric dependent, as most are, it would have been impossible to formulate a theory that is restricted to the null surface. The second also follows from being metric independent. The energy-momentum tensor of a theory is given by varying the action with respect to the metric. Therefore, in the Chern-Simons case, the energy-momentum tensor vanishes and the holographic theory does not disturb the black hole geometry. It is worth noting that in the complexified Chern-Simons theory which incorporates both the electric and magnetic actions, the level $\widetilde k$ of the magnetic action becomes quantized \cite{Witten:1989ip,Carlip:1994ap}. For us this is not relevant, since our Chern-Simons theory is just that of the electric action; the magnetic action is only used to compute the dual charge. The addition of a holographic Chern-Simons theory on the horizon in conjunction with the soft hair makes the structure at the horizon much more complex. The implications for the nature of black hole microstates will be explored in a future publication. Finally, although, in this paper we have focused on the new structures at the horizon of a black hole, we expect similar outcomes at the boundary at future null infinity. This and the possible implications for scattering amplitudes is under current investigations. \begin{acknowledgments} MJP would like to thank the UK STFC for financial support under grant ST/L000415/1. The work of SC is supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 852386). SC also acknowledges financial support from the Samsung Scholarship. \end{acknowledgments}
\section{Introduction} Recent years have witnessed great progress in applying graph theory to study MRI-derived brain networks, to discover novel biomarkers for clinical phenotypes or neurodegenerative diseases (e.g., Alzheimer’s disease or AD) ~\cite{hao2013multimodal,uludaug2014general,calhoun2016multimodal}. Different MRI techniques can be used to reconstruct brain networks corresponding to different aspects of the brain organization or dynamics. For example, functional MRI-derived functional networks provide measures of BOLD relationships over time between brain regions but not the existence of a physical direct link between these regions. By contrast, the diffusion MRI-derived structural network can describe the connectivity of white matter tracts between brain regions, yet does not inform us about whether this tract, or the regions it connects, are “activated” or “not activated” in a specific state. Therefore, these brain networks provide distinct but complementary information, and separately analyzing each of these networks will always be suboptimal. Graph neural networks (GNNs) \cite{kipf2016semi} have gained enormous attention recently. Although some progress~\cite{kawahara2017brainnetcnn,ktena2018metric} has been made by applying GNNs to brain networks, most existing techniques have been developed based on single-modality brain networks. It is well known that a high-level dependency, based on network communications, exists between brain structural and functional networks \cite{rusinek2003regional,bullmore2012economy}, which has motivated many studies \cite{zhang2020deep,huang2016linking,finger2016modeling} to integrate multimodal brain networks by constructing a projection between them using GNNs (e.g.,~\cite{zhang2020deep}). Most existing studies \cite{zhang2020deep,huang2016linking,finger2016modeling} aim to reconstruct functional networks from brain structural counterparts. However, mapping a static object (structural network) to a dynamic one (functional network) is not optimal, even though the structural network may be better suited to serve as the template. Very few studies aim to construct the opposite mapping (i.e., from functional to structural networks); this may be because current GNNs can only encode unsigned graphs (i.e., structural networks in which all edge weights have non-negative values). The brain functional network is a signed graph by definition (including entries that denote negative correlations); as such, network edge weights can have negative values which will destroy the information aggregation mechanism in current GNNs. To tackle this, we propose a new framework to encode signed graphs, and we apply this framework to project and encode brain functional networks to the corresponding structural networks. Our results demonstrate that the extracted latent network representations from this mapping can be used for clinical tasks (regression or classification) with better performance, compared with baseline methods. Our contributions are three-fold: (1) We propose an end-to-end network representation framework to model brain structural networks based on functional ones; this is the first work on this topic to the best of our knowledge. (2) We propose a signed graph encoder to embed the functional brain networks. (3) We draw graph saliency maps for clinical tasks, to enable phenotypic and disease-related biomarker detection and aid in interpretation. \section{Preliminaries of Signed Brain Networks} \label{prelim} A brain network is an attributed and weighted graph $G=\{V, E\}=(A,X)$ with $N$ nodes, where $V=\{v_i\}_{i=1}^{N}$ is the set of graph nodes representing brain regions, and $E=\{e_{i,j}\}$ is the edge set. $X \in \mathcal{R}^{N \times c}$ is the node feature matrix where $x_{i} \in \mathbb{R}^{1 \times c}$ is the $i-$th row of $X$ representing the node feature of $v_{i}$. $A \in \mathbb{R}^{N \times N}$ is the adjacency matrix where $a_{i,j} \in \mathbb{R}$ represents the weights of the edge between $v_{i}$ and $v_{j}$. In signed brain networks (i.e., functional brain networks), $a_{i,j} \in (-\infty, +\infty)$, while in unsigned brain networks (i.e., structural brain networks), $a_{i,j} \in [0, +\infty)$. We use $G^{F}=(A^{F}, X^{F})$ and $G^{S}=(A^{S}, X^{S})$ to represent the functional and structural brain networks, respectively. Given a specific node $v_{i}$ in a signed network, we define their positive and negative neighbors set as $\mathcal{N}^{+}_{i}$ and $\mathcal{N}^{-}_{i}$, respectively. Following the balance theory \cite{cartwright1956structural,derr2018signed,heider1946attitudes,li2020learning}, any node $v_{j}$ belongs to the balanced set (denoted as $\mathbf{\Gamma}$) of $v_{i}$ if the path between $v_{i}$ and $v_{i}$ contains even number of negative edges. Otherwise, $v_{j}$ belongs to the unbalanced set (denoted as $\mathbf{\Upsilon}$) of $v_{i}$. \section{Methodology} We first introduce the proposed multi-head signed graph encoder (SGE). Then, we present an end-to-end framework with the proposed encoder to reconstruct structural networks from functional networks and perform downstream tasks. \begin{figure}[t] \centering \includegraphics[width=1.0\textwidth]{main-figure.pdf} \caption{Pipeline of the DSBN framework, including a signed graph encoder (in red dash blox) scheme with two branches (BUE and PNE encoder heads in yellow and blue box) for functional network embedding, an inner-product decoder for structural network reconstruction and a downstream task branch for classification and regression.} \label{framework} \end{figure} \subsection{Signed Graph Encoder (SGE)} Our SGE consists of a balanced-unbalanced encoder (BUE) head and a positive-negative encoder (PNE) head. Motivated by the balance theory in Section \ref{prelim}, the BUE head encodes the graph node to the latent features with balanced and unbalanced components. Meanwhile, we split the signed graph into a positive sub-graph and a negative counterpart. The PNE head encodes these two sub-graphs to generate the node latent features with positive and negative components. The yellow and blue boxes in Fig. \ref{framework} illustrate the BUE and PNE, respectively. ~\\ \noindent\textbf{Balanced-Unbalanced Encoder (BUE).} We use $T$ to denote the encoder layer number and the $T-th$ layer of the encoder focuses on aggregating the $T-th$ hop neighbors of node $v_{i}$. To improve the generalization of local information aggregation in brain networks, a dynamic and fluctuating adjustment of aggregation weights (i.e., brain network edge weights) is arguably more reasonable and has been advocated during graph learning \cite{zhang2020deep}. To this end, our BUE is designed based on the concept of graph attention \cite{velivckovic2017graph}. \noindent\textbf{\textit{Initial Layer ($T=1$)}} We initialize balanced and unbalanced node latent feature components by: \begin{eqnarray} x_{i}^{\mathbf{\Gamma}(1)} = \sigma (\sum_{j \in \mathcal{N}_{i}^{+}} \alpha_{i,j}^{\mathbf{\Gamma}(1)} x^{(0)}_{j} W^{\mathbf{\Gamma}(1)}), \quad x_{i}^{\mathbf{\Upsilon}(1)} = \sigma (\sum_{j \in \mathcal{N}_{i}^{-}} \alpha_{i,j}^{\mathbf{\Upsilon}(1)} x^{(0)}_{j} W^{\mathbf{\Upsilon}(1)}), \end{eqnarray} where $\sigma$ is a nonlinear activation function. $x^{(0)}=x$ is input node features. $W^{\mathbf{\Gamma}(1)}$ and $ W^{\mathbf{\Upsilon}(1)}$ are trainable weights to generate two latent feature components. $\alpha_{i,j}^{\mathbf{\Gamma}(1)}$ and $\alpha_{i,j}^{\mathbf{\Upsilon}(1)}$ are attention scores of brain nodes from the balanced and unbalanced set respectively. Following the work in \cite{velivckovic2017graph}, we first compute the attention coefficients by: \begin{eqnarray} e_{i,j}^{\mathbf{\Gamma}(1)} = a [x^{(0)}_{i} W^{\mathbf{\Gamma}(1)}, x^{(0)}_{j} W^{\mathbf{\Gamma}(1)}], \quad e_{i,j}^{\mathbf{\Upsilon}(1)} = a [x^{(0)}_{i} W^{\mathbf{\Upsilon}(1)}, x^{(0)}_{j} W^{\mathbf{\Upsilon}(1)}] \end{eqnarray} where $a$ is a trainable attentional weight vector and $[,]$ is a concatenation operator. Based on the attention coefficients, we derive the attention scores by: \begin{eqnarray} \alpha_{i,j}^{\mathbf{\Gamma}(1)} = \frac{exp(e_{i,j}^{\mathbf{\Gamma}(1)})}{\sum_{n \in \mathcal{N}_{i}^{+}} exp(e_{i,n}^{\mathbf{\Gamma}(1)})}, \quad \alpha_{i,j}^{\mathbf{\Upsilon}(1)} = \frac{exp(e_{i,j}^{\mathbf{\Upsilon}(1)})}{\sum_{n \in \mathcal{N}_{i}^{-}} exp(e_{i,n}^{\mathbf{\Upsilon}(1)})} \end{eqnarray} \noindent\textbf{\textit{Following Layers ($T>1$)}} In the subsequent layers ($T>1$), $x_{i}^{\mathbf{\Gamma}(T)}$ and $x_{i}^{\mathbf{\Upsilon}(T)}$ is generated by: \begin{eqnarray} x_{i}^{\mathbf{\Gamma}(T)} &=& \sigma (\sum_{j \in \mathcal{N}_{i}^{+}, k \in \mathcal{N}_{i}^{-}} \alpha_{i,j}^{\mathbf{\Gamma}(T)} x^{\mathbf{\Gamma}(T-1)}_{j} W^{\mathbf{\Gamma}(T)} + \alpha_{i,k}^{\mathbf{\Gamma}(T-1)} x^{\mathbf{\Upsilon}(T-1)}_{k} W^{\mathbf{\Gamma}(T)}) \nonumber \\ x_{i}^{\mathbf{\Upsilon}(T)} &=& \sigma (\sum_{j \in \mathcal{N}_{i}^{+}, k \in \mathcal{N}_{i}^{-}} \alpha_{i,j}^{\mathbf{\Upsilon}(T)} x^{\mathbf{\Upsilon}(T-1)}_{j} W^{\mathbf{\Upsilon}(T)} + \alpha_{i,k}^{\mathbf{\Upsilon}(T-1)} x^{\mathbf{\Gamma}(T-1)}_{k} W^{\mathbf{\Upsilon}(T)}) \end{eqnarray} Similarly, we compute $4$ attention coefficients as \begin{eqnarray} e_{i,j}^{\mathbf{\Gamma}(T)} &=& a [x^{\mathbf{\Gamma}(T-1)}_{i} W^{\mathbf{\Gamma}(T)}, x^{\mathbf{\Gamma}(T-1)}_{j} W^{\mathbf{\Gamma}(T)}] \nonumber \\ e_{i,k}^{\mathbf{\Gamma}(T)} &=& a [x^{\mathbf{\Upsilon}(T-1)}_{i} W^{\mathbf{\Gamma}(T)}, x^{\mathbf{\Upsilon}(T-1)}_{k} W^{\mathbf{\Gamma}(T)}] \nonumber \nonumber \\ e_{i,j}^{\mathbf{\Upsilon}(T)} &=& a [x^{\mathbf{\Upsilon}(T-1)}_{i} W^{\mathbf{\Upsilon}(T)}, x^{\mathbf{\Upsilon}(T-1)}_{j} W^{\mathbf{\Upsilon}(T)}] \nonumber\\ e_{i,k}^{\mathbf{\Upsilon}(T)} &=& a [x^{\mathbf{\Gamma}(T-1)}_{i} W^{\mathbf{\Upsilon}(T)}, x^{\mathbf{\Gamma}(T-1)}_{k} W^{\mathbf{\Upsilon}(T)}] \end{eqnarray} Then the $4$ attention scores, $\alpha_{i,j}^{\mathbf{\Gamma}(T)}=exp(e_{i,j}^{\mathbf{\Gamma}(T)}) / \sum_{\mathbf{\Gamma}(T)}$, $\alpha_{i,k}^{\mathbf{\Gamma}(T)}=exp(e_{i,k}^{\mathbf{\Gamma}(T)}) \\ / \sum_{\mathbf{\Gamma}(T)}$, $\alpha_{i,j}^{\mathbf{\Upsilon}(T)}=exp(e_{i,j}^{\mathbf{\Upsilon}(T)}) / \sum_{\mathbf{\Upsilon}(T)}$ and $\alpha_{i,k}^{\mathbf{\Upsilon}(T)}=exp(e_{i,k}^{\mathbf{\Upsilon}(T)}) / \sum_{\mathbf{\Upsilon}(T)}$, where $\sum_{\mathbf{\Gamma}(T)}=\sum_{n \in \mathcal{N}_{i}} exp(e_{i,n}^{\mathbf{\Gamma}(T)})$ and $\sum_{\mathbf{\Upsilon}(T)}=\sum_{n \in \mathcal{N}_{i}} exp(e_{i,n}^{\mathbf{\Upsilon}(T)})$. After we obtain the two latent components, we concatenate them as the latent features generated by the BUE head by: $x_{i}^{BUE} = [x_{i}^{\mathbf{\Gamma}}, x_{i}^{\mathbf{\Upsilon}}]$. ~\\ \subsubsection{Positive-Negative Encoder (PNE)} We split the adjacency matrix of the functional network into positive and negative sub-network pairs (i.e., $G^{+F} =(A^{+F}, X)$ and $G^{-F} =(A^{-F}, X)$). For each sub-network, we forward it into $T$ graph attention layers \cite{velivckovic2017graph} to generate the positive and negative latent feature components (i.e., $x_{i}^{+}$ and $x_{i}^{-}$). As a result, the latent feature generated by the PNE head can be computed by $x_{i}^{PNE} = [x_{i}^{+}, x_{i}^{-}]$. The final fused latent features generated by our SGE can be computed by: $x_{i} = [x_{i}^{BUE}W, x_{i}^{PNE}W]$, where $W$ is a set of trainable parameters to control feature dimensions. \vspace{-1em} \subsection{Deep Signed Brain Networks (DSBN)} Our DSBN framework is illustrated in Fig. \ref{framework}, which includes (1) a signed graph encoder (SGE) to generate the latent node features from brain functional networks, (2) a decoder to reconstruct brain structural networks from latent node features, and (3) Multilayer Perceptrons (MLP) for downstream tasks. \vspace{-1em} \subsubsection{Structural Network Reconstruction and Downstream Tasks} The structural network edges can be reconstructed by an inner-product decoder\cite{kipf2016variational} as: $\hat{a}_{i,j}^{S} = sigmoid(x_{i}^{\top} \cdot x_{j})$, where the $\cdot$ is an inner-product operator, $\top$ is vector transpose. We use a sum function as a global readout operator to obtain the whole graph representation (i.e., $X_{G} = \sum_{i=1}^{N} x_{i}$). Then, MLP are used to generate the final classification or regression output (i.e., $\hat{y} = MLP(X_{G})$). Moreover, we use parameters in the last MLP layer and node latent features $x_{i}$ to generate the brain network saliency map using the Class Activation Mapping (CAM) approach \cite{pope2019explainability,arslan2018graph} for the classification task. The brain saliency map identifies the top-K most important brain regions associated with each class. ~\\ \noindent\textbf{Loss Functions} We summarize the loss functions here for our framework. \\ \textbf{\textit{Reconstruction Loss}} The ground-truth brain structural network is sparse while the reconstructed structural network is fully connected. To facilitate network reconstruction, in the training stage, we add a small perturbation value ($\delta$) to the edge weights of the ground-truth structural networks (i.e., $\bar{a}^{S}_{i,j} = a^{S}_{i,j} + \delta$) and build up the reconstruction loss as $ \mathcal{L}_{recon} = \frac{1}{|E|} \sum_{i,j} (\hat{a}_{i,j}^{S} - \bar{a}_{i,j}^{S})^{2},$ where $|E|$ is the number of edges. \noindent\textbf{\textit{Supervised Loss}} We deploy our framework on both regression and classification tasks. For the classification task, we use the negative log likelihood loss where $\mathcal{L}_{super} = NLLLoss(\hat{y}, y)$. For the regression task, we use $L_{1}$ loss where $\mathcal{L}_{super} = L_{1}Loss(\hat{y}, y)$. In summary, the overall loss function of the DSBN is $\mathcal{L}_{all} = \eta_{1} \mathcal{L}_{recon} + \eta_{2} \mathcal{L}_{super},$ where $\eta_{1}$, $\eta_{2}$ are loss weights. \section{Experiments} \begin{figure}[t] \centering \includegraphics[width=1.0\textwidth]{reconstruct_map.pdf} \caption{Cross-modality learning results on the OASIS data. \textbf{(A)} is the averaged functional network, \textbf{(B)} and \textbf{(C)} are the mean reconstructed and ground-truth structural networks. \textbf{(D)} is to show that edge weights in the predicted structural network are significantly correlated with the ground truth data and $r=0.917$ with $p=0.0129$} \label{reconstruction} \end{figure} \subsection{Data Description and Preprocessing} Two publicly available datasets were used to evaluate our framework. The first includes data from $1206$ young healthy subjects (mean age $28.19 \pm 7.15$, $657$ women) from the Human Connectome Project \cite{van2013wu} (HCP). The second includes 1326 subjects (mean age $=70.42 \pm 8.95$, $738$ women) from the Open Access Series of Imaging Studies (OASIS) dataset \cite{lamontagne2019oasis}. Details of each dataset may be found on their official websites. CONN~\cite{whitfield2012conn} and FSL~\cite{jenkinson2012fsl} were used to reconstruct the functional and structural networks, respectively. For the HCP data, both networks have a dimension of $82 \times 82$ based on 82 ROIs defined using FreeSurfer (V6.0)~\cite{fischl2012freesurfer}. For the OASIS data, both networks have a dimension of $132 \times 132$ based on the Harvard-Oxford Atlas and AAL Atlas. We deliberately chose different network resolutions for HCP and OASIS, to evaluate whether the performance of our new framework is affected by the network dimension or atlas. \subsection{Implementation Details} The edge weights of the functional networks and structural networks were first normalized to the range of $[-1, 1]$ and $[0, 1]$, respectively. The node features are initialized as the min, $25\%$, median, $75\%$, max values of the fMRI bold signal. We randomly split each dataset into $5$ disjoint sets for $5$-fold cross-validations in the following experiments. The model is trained using the Adam optimizer with a batch size of $128$. The initial learning rate is set to $0.001$ and decayed by $(1-\frac{current \, epoch}{max \, epoch})^{0.9}$. We also regularize the training with an $L_{2}$ weight decay of $1e^{-5}$. We stop the training if the validation loss does not improve for $100$ epochs in an epoch termination condition with a maximum of $500$ epochs, as was done in \cite{lee2019self,shchur2018pitfalls}. The experiments are deployed on one NVIDIA TITAN RTX GPU. \subsection{Brain Structural Network Reconstruction using DSBN} To show the performance of our DSBN on the reconstruction of brain structural networks, we train the model in a task-free manner where no task-specific supervised loss is involved. Since the $\delta$ value is set to $0.05$ when we train the model, we set the reconstructed edge weights to $0$ if the predicted weights are less than $0.05$. The mean absolute error (MAE) values between the edge weights in the ground-truth and reconstructed networks are $0.074 \pm 0.016$ and $0.039 \pm 0.058$ under $5$-fold cross-validation on the OASIS and HCP data, respectively. The reconstruction results on OASIS data are visualized in Fig. \ref{reconstruction}. \begin{table}[t] \centering \caption{Classification accuracy, precision, and F1-scores, with their standard deviation values under 5-fold cross-validation. The best results are highlighted in \textbf{bold} font.} \label{classification} \resizebox{\textwidth}{21mm}{ \begin{tabular}{l|lll|lll} \hline \multicolumn{1}{c|}{Method} & \multicolumn{3}{c|}{OASIS (Disease)} & \multicolumn{3}{c}{HCP (Gender)} \\ \hline & \multicolumn{1}{c|}{Acc.} & \multicolumn{1}{c|}{Prec.} & \multicolumn{1}{c|}{F1} & \multicolumn{1}{c|}{Acc.} & \multicolumn{1}{c|}{Prec.} & \multicolumn{1}{c}{F1} \\ \hline t-BNE & \multicolumn{1}{l|}{$57.84\pm2.14$} & \multicolumn{1}{l|}{$52.26\pm2.39$} & $55.17\pm3.15$ & \multicolumn{1}{l|}{$59.84\pm2.05$} & \multicolumn{1}{l|}{$57.77\pm2.21$} & $55.89\pm1.96$ \\ MK-SVM & \multicolumn{1}{l|}{$54.62\pm3.33$} & \multicolumn{1}{l|}{$49.86\pm3.11$} & $55.27\pm4.15$ & \multicolumn{1}{l|}{$58.21\pm3.75$} & \multicolumn{1}{l|}{$51.51\pm2.84$} & $59.19\pm2.40$ \\ \hline DIFFPOOL & \multicolumn{1}{l|}{$66.29\pm2.60$} & \multicolumn{1}{l|}{$63.87\pm2.14$} & $69.91\pm2.37$ & \multicolumn{1}{l|}{$72.12\pm1.81$} & \multicolumn{1}{l|}{$68.84\pm1.97$} & $74.01\pm2.16$ \\ SAGPOOL & \multicolumn{1}{l|}{$64.53\pm2.06$} & \multicolumn{1}{l|}{$61.76\pm2.99$} & $68.97\pm3.07$ & \multicolumn{1}{l|}{$69.29\pm1.84$} & \multicolumn{1}{l|}{$70.18\pm1.49$} & $67.38\pm1.12$ \\ BrainChey & \multicolumn{1}{l|}{$69.26\pm1.47$} & \multicolumn{1}{l|}{$71.22\pm1.95$} & $70.46\pm2.81$ & \multicolumn{1}{l|}{$74.11\pm2.05$} & \multicolumn{1}{l|}{$76.26\pm1.77$} & $75.08\pm2.60$ \\ BrainNet-CNN & \multicolumn{1}{l|}{$73.37\pm2.14$} & \multicolumn{1}{l|}{$74.06\pm1.59$} & $73.27\pm1.85$ & \multicolumn{1}{l|}{$71.88\pm1.69$} & \multicolumn{1}{l|}{$70.18\pm2.21$} & $70.29\pm2.10$ \\ \hline DSBN w/o BUE & \multicolumn{1}{l|}{$73.04\pm3.03$} & \multicolumn{1}{l|}{$74.74\pm1.96$} & $73.53\pm2.23$ & \multicolumn{1}{l|}{$78.15\pm2.96$} & \multicolumn{1}{l|}{$79.01\pm1.68$} & $80.47\pm2.02$ \\ DSBN w/o PNE & \multicolumn{1}{l|}{$75.38\pm2.52$} & \multicolumn{1}{l|}{$76.26\pm2.96$} & $78.68\pm3.02$ & \multicolumn{1}{l|}{$80.78\pm2.44$} & \multicolumn{1}{l|}{$81.16\pm1.74$} & $82.98\pm2.01$ \\ DSBN w/o Recon. & \multicolumn{1}{l|}{$75.94\pm2.73$} & \multicolumn{1}{l|}{$77.09\pm2.52$} & $75.46\pm2.17$ & \multicolumn{1}{l|}{$79.12\pm2.06$} & \multicolumn{1}{l|}{$80.55\pm2.18$} & $81.19\pm1.96$ \\ DSBN & \multicolumn{1}{l|}{\bm{$78.92\pm1.38$}} & \multicolumn{1}{l|}{\bm{$79.81\pm1.41$}} & \bm{$80.22\pm2.25$} & \multicolumn{1}{l|}{\bm{$82.19\pm2.01$}} & \multicolumn{1}{l|}{\bm{$85.35\pm1.99$}} & \bm{$84.71\pm2.37$} \\ \hline \end{tabular}} \end{table} \begin{table}[t] \centering \caption{Regression Mean Absolute Error (MAE) $\pm$ SD (standard deviation) under 5-fold cross-validation. The best results are highlighted in \textbf{bold} font.} \label{regression} \begin{tabular}{l|l|l} \hline & OASIS (MMSE) & HCP (MMSE) \\ \hline tBNE & \multicolumn{1}{c|}{$2.39 \pm 0.74$} & \multicolumn{1}{c}{$2.17 \pm 0.48$}\\ SAGPOOL & \multicolumn{1}{c|}{$1.86 \pm 0.27$} & \multicolumn{1}{c}{$1.55 \pm 0.33$}\\ DIFFPOOL & \multicolumn{1}{c|}{$1.69 \pm 0.36$} & \multicolumn{1}{c}{$1.63 \pm 0.14$}\\ BrainNet-CNN & \multicolumn{1}{c|}{$1.40 \pm 0.20$} & \multicolumn{1}{c}{$1.29 \pm 0.06$}\\ BrainChey & \multicolumn{1}{c|}{$1.12 \pm 0.19$} & \multicolumn{1}{c}{$1.14 \pm 0.25$}\\\hline DSBN w/o BUE & \multicolumn{1}{c|}{$1.17 \pm 0.22$} & \multicolumn{1}{c}{$1.11 \pm 0.17$}\\ DSBN w/o PNE & \multicolumn{1}{c|}{$1.06 \pm 0.24$} & \multicolumn{1}{c}{$0.86 \pm 0.34$}\\ DSBN w/o Recon. & \multicolumn{1}{c|}{$0.97 \pm 0.11$} & \multicolumn{1}{c}{$1.03 \pm 0.19$}\\ DSBN & \multicolumn{1}{c|}{\bm{$0.87 \pm 0.18$}} & \multicolumn{1}{c}{\bm{$0.69 \pm 0.21$}} \\ \hline \end{tabular} \end{table} \subsection{Disease and Sex Classification Tasks} \textbf{\textit{Experimental Setup.}} $6$ baselines were used for comparison, including $2$ traditional graph embedding models (t-BNE \cite{cao2017t} and MK-SVM \cite{dyrba2015multimodal}), $2$ deep graph convolution models designed for brain network embedding (BrainChey \cite{ktena2018metric} and BrainNet-CNN \cite{kawahara2017brainnetcnn}), and $2$ hierarchical graph neural networks with graph pooling strategies (DIFFPOOL \cite{ying2018hierarchical} and SAGPOOL \cite{lee2019self}) As mentioned above, the baseline methods can only embed unsigned graphs. Therefore, we convert the functional networks to unsigned graphs by using the absolute values of the edge weights. Meanwhile, $3$ variant models of our DSBN, including DSBN w/o BUE encoder, DSBN w/o PNE encoder and DSBN w/o reconstruction decoder, are evaluated for ablation studies. The number of BUE and PNE encoder layers is set to $3$. We search the loss weights (details in \textcolor{blue}{Supplementary}) $\eta_{1}$ and $\eta_{2}$ in the range of $[0.01, 0.1, 0.5, 1]$ and $[0.1, 1, 5]$ respectively, and determine the loss weights as $\eta_{1} = 0.1$, $\eta_{2} = 1$ for AD classification, $\eta_{1} = 0.1$, $\eta_{2} = 1$ for sex classification. The results are reported in terms of classification accuracy, precision and F1-scores, with their \emph{std}. \noindent\textbf{\textit{Results}} Classification results for AD on OASIS and sex on HCP are presented in Table \ref{classification}, which shows that our model achieves the best accuracy for both tasks, among all methods. For example, in the AD classification, our model outperforms the baselines with at least $7.6\%$, $7.8\%$ and $9.4\%$ increases in accuracy, precision and F1 scores, respectively. In general, the deep graph models perform better than the traditional graph embedding methods (\emph{i.e.}, t-BNE and MK-SVM). When we abandon the cross-modality learning (i.e., DSBN w/o Recon.), the performance, though comparable to baselines, decreases significantly. This shows the effectiveness of the cross-modality learning. The performance will also decrease when we remove BUE encoder or PNE encoder, which indicates that both balance and polarity properties are important for embedding functional networks. The brain saliency map is shown in \textcolor{blue}{Supplementary} where we identify $10$ key brain regions associated with AD (from OASIS) and with each sex (in HCP), respectively. The salient regions for females are concentrated in frontal regions of the brain while males have the opposite trend, consistent with the finding ~\cite{carlo1999girls} that women are typically less aggressive than men, and, on average, less physically strong. For AD, most of the salient regions are located in subcortical structures, as well as the bilateral intracalcarine region, the caudate, and planum polare, which have been implicated as potential AD biomarkers~\cite{amoroso2017brain}. \subsection{MMSE Regression} \textbf{\textit{Experimental Setup}} Mini-Mental State Exam (MMSE) is a quantitative measure of cognitive status in adults. In the MMSE regression task, the selected baselines for comparison (except for MK-SVM which is designed only for classification problems) and the structure of our DSBN remain unchanged. The loss weights are set to $\eta_{1}=0.5$ and $\eta_{2}=1$ for both datasets. Details of hyperparameter analysis are provided in the \textcolor{blue}{Supplementary}. The regression results are reported as average Mean Absolute Errors (MAE) with their \emph{std}. \noindent\textbf{\textit{Results}} The MMSE regression results on the HCP and OASIS datasetsare summarized in Table \ref{regression}, which also demonstrates that our model outperforms all baselines. The regression results also indicate the superiority of the cross-modality learning and the importance of both BUE and PNE encoders. \section{Conclusion} We propose a novel multimodal brain network representation learning framework with a signed functional network encoder. The cross-modality network embedding is generated by mapping a functional brain network to its structural counterpart. The embedded network representations contribute to important clinical prediction tasks and the brain saliency map may assist with disease-related biomarker identification. We will explore the bijection between these two networks in the future.
\section{Intrigue}\label{sec:intrigue} The following statement is a simplification of Corollary~\ref{co:stability-weakest}, which follows from the main result of this paper (Theorem~\ref{th:dist}). \begin{Co-non} Let $X$, $Y$ be smooth vector fields on a manifold $M$ with a compact set $A\subset M$ asymptotically stable for both. There is an open set $U\supset A$ such that $X|_{U\ctA}$, $Y|_{U\ctA}$ are homotopic through nowhere-zero vector fields. \end{Co-non} Motivation is given in sections~\ref{sec:introduction} and \ref{sec:results}. Briefly, Corollary~\ref{co:stability-weakest} for \emph{dynamical} systems yields feedback stabilizability ``tests'' for \emph{control} systems generalizing and/or strengthening some in the literature. Theorem~\ref{th:dist} enables further such tests via Theorem~\ref{th:control-homology} or obstruction theory \cite[Part~III]{steenrod1999topology}. The obstruction theory connection is explained but not fleshed out and the author hopes topologically-minded readers might view this as an invitation of sorts. Separate questions are posed in section~\ref{sec:questions}. \section{Introduction}\label{sec:introduction} In control theory one studies ordinary differential equations \begin{equation}\label{eq:cs-intro} \frac{dx}{dt} = f(x,u) \end{equation} depending on a control parameter $u$ where $x$ lives in a smooth manifold $M$ and $f(x,u)\in T_x M$ for all $x$ and $u$. Given a compact subset $A$ of $M$, the \concept{feedback stabilization problem} concerns proving (non)existence and ideally constructing a \concept{feedback law} $x\mapsto u(x)$ of suitable regularity such that $A$ is asymptotically stable for the \concept{closed-loop vector field} $x\mapsto f(x,u(x))$. This paper merely considers proving nonexistence. Noncompact sets $A$ are considered later (Theorems~\ref{th:dist} and \ref{th:control-homology}). In the special case that $A$ is a point and $M$ is a Euclidean space, \concept{Brockett's necessary condition} says in particular that the existence of a $C^1$ feedback law solving the feedback stabilization problem implies that the image of the map $(x,u)\mapsto f(x,u) \in \mathbb{R}^n$ contains a neighborhood of $0$ \cite[Thm~1.(iii)]{brockett1983asymptotic}. (Here $f$ is viewed as $\mathbb{R}^n$-valued via the usual tangent bundle identification $T \mathbb{R}^n \approx \mathbb{R}^n \times \mathbb{R}^n$.) To achieve this, Brockett derived a necessary condition satisfied by a stabilizing closed-loop vector field---a \emph{dynamical} system---and parlayed this into one for \emph{control} systems \eqref{eq:cs-intro}. This technique is used in later work and in this paper, where the main result for dynamics (Theorem~\ref{th:dist}) implies one for control (Theorem~\ref{th:control-homology}). \iffalse According to Brockett, in 1983 it was an oft-repeated conjecture that a reasonable form of ``local controllability'' for \eqref{eq:cs-intro} implies the existence of a smooth feedback law solving the feedback stabilization problem \cite[p.~2]{brockett1983asymptotic}. Here ``local controllability'' implies the ability to steer any initial state $x_{i}$ to any final state $x_{f}$ by a suitable choice of $t\mapsto u(t)$, $t\in \mathbb{R}$. In the special case that $A$ is a single point and $M = \mathbb{R}^n$, Brockett showed this conjecture was false by introducing and using \concept{Brockett's necessary condition}: \fi The monograph by Krasnosel'ski\u{\i} and Zabre\u{\i}ko appeared around the same time as Brockett's paper and has been influential in this area. It contains necessary conditions for asymptotic stability of an equilibrium point of a vector field involving its index \cite[sec.~52]{krasnoselskii1984geometrical}. This result was used in part by Zabczyk to give an alternative proof and extension of Brockett's necessary condition \cite{zabczyk1989some}. Further necessary conditions for feedback stabilizability have since been discovered for the case that $A$ is a point \cite{coron1990necessary,christopherson2022feedback} or a closed submanifold of a Euclidean space \cite{mansouri2007local,mansouri2010topological} or a compact subset of a smooth manifold \cite{kvalheim2021necessary}.\footnote{Exponential \cite{gupta2018linear}, global \cite{byrnes2008brockett,baryshnikov2021topological}, time-varying \cite{coron1992global}, and discontinuous \cite{clarke1997asymptotic} variants of the feedback stabilization problem are not considered in the present paper.} Such necessary conditions yield practical ``tests'' relieving the expenditure of time and resources searching for stabilizing feedback laws that do not exist. These tests are easy to apply in a variety of concrete instances of \eqref{eq:cs-intro}, and the author hopes that the homological tests among these (\cite{coron1990necessary,mansouri2007local,mansouri2010topological}, Theorem~\ref{th:control-homology}) might be usefully numerically automatable \cite{kaczynski2004computational}. The purpose of the present paper is to introduce necessary conditions providing more general and/or stronger tests. This is done in section~\ref{sec:results}. The main result is proved in section~\ref{sec:proof}. A counterexample related to Theorem~\ref{th:dist} is in section~\ref{sec:counterexample}. Some questions are posed in section~\ref{sec:questions}. \iffalse Other stabilizability work includes certain global considerations \cite{bhat2000topological, byrnes2008brockett, baryshnikov2021topological}, or exponential stabilizability \cite{gupta2018linear,christopherson2020variational,christopherson2022feedback}, or time-varying feedback $(t,x)\mapsto u(t,x)$ \cite{coron1992global,coron1992links}, or discontinuous feedback \cite{clarke1997asymptotic}, or discrete-time systems \cite{lin1994design}. These variants have a different character than the local, time-independent version of the stabilizability problem for continuous-time systems considered in this paper and will not be further discussed. For more discussion of the feedback stabilization problem, see \cite{sontag1990feedback, bullolewis2005geometric, coron2007control, brockett2014early, bloch2015nonholonomic, zabczyk2020mathematical, kvalheim2021necessary,christopherson2022feedback,} and the references therein. \fi \section{Results}\label{sec:results} A $C^0$ vector field will be called \concept{uniquely integrable} if it has unique maximal integral curves. Such vector fields generate $C^0$ local flows (see \cite[App.~A.1]{kvalheim2021necessary} for details). Standard examples are $C^\infty$ or $C^1$ or even locally Lipschitz vector fields. To reduce clutter, the notation $\st_\att\coloneqq M\ctA$ and $U_\att\coloneqq U\ctA$ will be used from here on. The result below is a corollary of Theorem~\ref{th:dist} as will be explained. \begin{restatable}[]{Co}{CoStabilityWeakest}\label{co:stability-weakest} Let $X$, $Y$ be uniquely integrable $C^0$ vector fields on a $C^\infty$ manifold $M$ with a compact set $A\subset M$ asymptotically stable for both. There is an open set $U\supset A$ such that $X|_{U_\att}$, $Y|_{U_\att}$ are homotopic through nowhere-zero vector fields. \end{restatable} \begin{Note} $U$ admits an explicit description here and in Theorem~\ref{th:dist} (see Remark~\ref{rem:u-explicit}). \end{Note} When $A$ is a point, Corollary~\ref{co:stability-weakest} specializes to a known result \cite[p.~340]{krasnoselskii1984geometrical}, \cite[p.~7]{zabczyk1989some} shown to imply Brockett's necessary condition in the latter reference. Corollary~\ref{co:stability-weakest} is obtained from the following Theorem~\ref{th:dist} by taking $A$ to be compact and $\mathcal{D} = T \st_\att$. For the statement, ``regular $C^1$ distribution'' is synonymous with ``$C^1$ vector subbundle'', involutivity is in the sense of the Frobenius theorem, and the definition of uniform asymptotic stability can be found in \cite[p.~423]{wilson1969smooth}. When $A$ is compact and asymptotically stable, $A$ is uniformly asymptotically stable with respect to every Riemannian metric on $M$. For an explanation of why \emph{uniform} asymptotic stability is needed when $A$ is noncompact, see \cite[p.~425--426]{wilson1969smooth}. \begin{restatable}[]{Th}{ThmDist}\label{th:dist} Let $X$, $Y$ be uniquely integrable $C^0$ vector fields on a $C^\infty$ Riemannian manifold $M$ with a closed set $A\subset M$ uniformly asymptotically stable for both. Let $\mathcal{D}\subset T \st_\att$ be an involutive $C^1$ regular distribution such that $X|_{\st_\att}$, $Y|_{\st_\att}$ are $\mathcal{D}$-valued. There is an open set $U\supset A$ such that $X|_{U_\att}$, $Y|_{U_\att}$ are homotopic through $(\mathcal{D}\setminus 0)$-valued vector fields. \end{restatable} \begin{Note} The hypothesis that $\mathcal{D}$ is involutive cannot be removed (section~\ref{sec:counterexample}). \end{Note} When $A$ is known to be uniformly asymptotically stable for $Y$, Theorem~\ref{th:dist} can be used to test whether $A$ is also so for $X$ by using obstruction theory \cite[Part~III]{steenrod1999topology}. If $A$ is compact (this can be relaxed) and $\st_\att$ is orientable and the fiber dimension of $\mathcal{D}$ is $(k+1)$, the obstructions to $X|_{U_\att}$, $Y|_{U_\att}$ being homotopic through $(\mathcal{D}\setminus 0)$-valued vector fields lie in certain cohomology groups with coefficients in the homotopy groups of the $k$-sphere \cite[Thm~1.1]{davis1972vector}. Alternatively, Theorem~\ref{th:dist} directly implies the following homological result that can also be used to test if $A$ is uniformly asymptotically stable for $X$ assuming it is so for $Y$. This result will be used to formulate a necessary condition for feedback stabilizability of control systems in Theorem~\ref{th:control-homology}. \begin{Lem}\label{lem:homology-dynamics} Let $X$, $Y$ be uniquely integrable $C^0$ vector fields on a $C^\infty$ Riemannian manifold $M$ with a closed set $A\subset M$ uniformly asymptotically stable for both. Let $\mathcal{D}\subset T \st_\att$ be an involutive $C^1$ regular distribution such that $X|_{\st_\att}$, $Y|_{\st_\att}$ are $\mathcal{D}$-valued. For all sufficiently small open $U\supset A$, the induced graded homomorphisms $$(X|_{U_\att})_*, (Y|_{U_\att})_* \colon H_{\bullet}(U_\att)\to H_{\bullet}(\mathcal{D}|_{U_\att}\setminus 0)$$ on singular homology coincide. \end{Lem} Control systems will now now be defined more formally than in section~\ref{sec:introduction}. The definitions here are somewhat less general than in \cite[sec.~3]{kvalheim2021necessary} (continuity assumptions are added on $E$, $p$, $u$). Brockett's definition \cite{brockett1977control} motivates the following one used in this paper: a \concept{control system} is a tuple $(E, M, p, f)$ of a topological space $E$, a $C^\infty$ Riemannian manifold $M$, a continuous surjection $p\colon E\to M$, and a fiber-preserving map $f\colon E\to M$ (i.e. $q \circ f = p$ where $q\colon T M\to M$ is the tangent bundle projection). The standard example in control theory is $E = M\times \mathbb{R}^m$ for some $m\in \mathbb{N}$ with $p(x,u) = x$. In this paper a \concept{feedback law} $u\colon M \to E$ is a continuous section of $p$ (i.e. $p\circ u = \textnormal{id}_M$) such that the $C^0$ vector field $f\circ u$ is uniquely integrable. Note: $f\circ u$ is indeed a vector field on $M$ since $q\circ f\circ u = p\circ u = \textnormal{id}_M$. Lemma~\ref{lem:homology-dynamics} implies the next result by taking $X = f\circ u$ and using $X_* = f_* \circ u_*$. \begin{Th}\label{th:control-homology} Let $A$ be a closed subset of a $C^\infty$ Riemannian manifold $M$, $\mathcal{D}\subset T \st_\att$ be an involutive $C^1$ regular distribution, and $(E,M,p,f)$ be a control system such that $f(p^{-1}(\st_\att))\subset \mathcal{D}$. Assume there is \emph{some} uniquely integrable $C^0$ vector field $Y$ on $M$ for which $A$ is uniformly asymptotically stable and $Y|_{\st_\att}$ is $\mathcal{D}$-valued. Assume there is a feedback law $u$ such that $A$ is uniformly asymptotically stable for $f\circ u$. For all sufficiently small open sets $U \supset A$, $$Y_*H_{\bullet}(p^{-1}(U_\att)) \subset f_*H_{\bullet}(p^{-1}(U_\att)) \subset H_{\bullet}(\mathcal{D}|_{U_\att} \setminus 0),$$ where $Y_*$, $f_*$ are the induced graded homomorphisms on singular homology. \end{Th} \begin{Rem}\label{rem:coron-mansouri} Theorem~\ref{th:control-homology} generalizes results of Coron \cite[Thm~2]{coron1990necessary} and Mansouri \cite[Thm~4]{mansouri2007local} \cite[Thm~2.3]{mansouri2010topological} in a few ways. E.g. Coron assumes $A$ is a point, Mansouri assumes $A$ is a compact boundaryless submanifold, both assume $M = \mathbb{R}^n$, and both assume $\mathcal{D} = T \st_\att$. These assumptions are not made here. However, the conclusions of Coron's and Mansouri's theorems are more explicit. \end{Rem} Theorem~\ref{th:dist} is not always very informative in spite of Remark~\ref{rem:coron-mansouri}. For example, if $A$ is the image of a periodic orbit with the same orientation for smooth vector fields $X$ and $Y$, the conclusion of Theorem~\ref{th:dist} is satisfied regardless of whether $A$ is attracting or repelling or neither for $X$ or $Y$. Since Theorem~\ref{th:dist} is stronger than Theorem~\ref{th:control-homology}, neither result provides any information on stability in this case. This is related to the fact that the Euler characteristic of a circle is zero (cf. \cite{mansouri2007local,mansouri2010topological,kvalheim2021necessary}). This motivates a search for conclusions stronger than that of Theorem~\ref{th:dist} given vector fields $X$, $Y$ satisfying its hypotheses. For example, can the homotopy of Theorem~\ref{th:dist} be taken through vector fields stabilizing $A$? This question is related to one of Conley and not answered in this paper but see section~\ref{sec:questions} for additional thoughts. Alternatively, if $X$, $Y$ stabilize $A$ and also have additional structure, one can ask if the homotopy of Theorem~\ref{th:dist} can be taken through vector fields preserving this structure. For example, if $X$, $Y$ are gradient vector fields stabilizing $A$, can the homotopy of Theorem~\ref{th:dist} be taken through gradient vector fields? A complete answer is not given here. However, the following proposition provides a disappointing partial answer. In the setting of Theorem~\ref{th:dist} specialized to $\mathcal{D} = T \st_\att$ (e.g. Corollary~\ref{co:stability-weakest}), the answer is ``yes'' but does not yield a stronger conclusion since the proposition says that gradients on an open set are always homotopic through nowhere-zero gradients if they are homotopic through nowhere-zero vector fields. \begin{Prop-non}[Gromov] Let $W$ be an open subset of a $C^\infty$ Riemannian manifold $M$, and let $F, G\colon W\to \mathbb{R}$ be $C^1$ functions such that $\nabla F$, $\nabla G$ are homotopic through nowhere-zero vector fields. Then there is also a $C^1$ homotopy from $F$ to $G$ through functions whose gradients are nowhere-zero. \end{Prop-non} \begin{Note} When $W = U_\att$, the homotopy of the proposition need not be through functions whose gradients ``point toward'' $A$ (cf. \cite[Fig.~4.1]{eliashberg2002intro} and the question about homotopies through stabilizing vector fields above and in section~\ref{sec:questions}). \end{Note} To explain why the proposition is true, smooth approximation techniques \cite{hirsch1976differential} imply that the submersions $F$, $G$ are homotopic through $C^1$ submersions to $C^\infty$ submersions. By taking metric duals the assumptions (and smooth approximation techniques again) imply that the differentials of these $C^\infty$ submersions are $C^\infty$ homotopic through nowhere-zero differential one-forms. Since $W$ is open and submersions satisfy Gromov's $h$-principle for open $\textnormal{Diff}(W)$-invariant differential relations \cite{gromov1969stable} (lucidly explained in \cite[Thm~7.2.3]{eliashberg2002intro}), the $C^\infty$ submersions are $C^\infty$ homotopic through submersions (which have nowhere-zero gradients by definition). \section{Proof of Theorem~\ref{th:dist}}\label{sec:proof} \ThmDist* \begin{Rem}\label{rem:u-explicit} The proof yields an explicit description of one such $U$. Let $B_X, B_Y \subset M$ denote the basins of attraction of $A$ with respect to $X$, $Y$. Then $U$ can be taken to be the largest subset of $B_X\cap B_Y$ such that all forward $X$-orbits with initial condition in $U$ are contained in $B_Y$. Equivalently, $U$ is the basin of attraction of $A$ for $X|_{B_Y}$, so $U$ is open in $B_Y$ and hence also in $M$. \end{Rem} \begin{proof} Without loss of generality $M$ is redefined to be the basin of attraction of $A$ for $Y$. Let $U$ be the basin of attraction for $X$. Let $V_X\colon U\to [0,\infty)$, $V_Y\colon M \to [0,\infty)$ be proper $C^\infty$ Lyapunov functions for $A=V_X^{-1}(0) = V_Y^{-1}(0)$ and $X$, $Y$ \cite[Thm~3.2]{wilson1969smooth}, \cite[sec.~6]{fathi2019smoothing}. Only the restrictions $X|_{\st_\att}$, $Y|_{\st_\att}$ matter now. It may be assumed that $Y|_{\st_\att}\in C^1$ after a straight-line homotopy to the orthogonal projection of $(-\nabla V_Y)|_{\st_\att}$ to $\mathcal{D}$. Let $\Phi_X\in C^0$ and $\Phi_Y \in C^1$ be the local flow and flow of $X|_{\st_\att}$ and $Y|_{\st_\att}$, respectively. The properties of $V_X$ and $V_Y$ \cite[pp.~423--424]{wilson1969smooth} imply that, for each $m\in U_\att$, there is $t_m > 0$ and an open subset $U_m\ni m$ of $U_\att$ such that $\Phi_{X}^{[t_m,\infty)}(z)\cap \Phi_Y^{(-\infty,0]}(z)=\varnothing$ for all $z\in U_m$. Let $(\psi_m)_{m\in U_\att}$ be a $C^\infty$ partition of unity subordinate to the open cover $(U_m)_{m\in U_\att}$ of $U_\att$ and define the $C^\infty$ function $\tau\colon U_\att\to (0,\infty)$ by $\tau(z)\coloneqq \sum_{m\in U_\att} t_m \psi_m(z)$. Then $\tau$, to be used later, satisfies \begin{equation}\label{eq:tau-property} \textnormal{$\Phi_X^{[\tau(m),\infty)}(m)\cap \Phi_Y^{(-\infty,0]}(m) = \varnothing$ for all $m\in U_\att$.} \end{equation} Next, fix any $c\in (0,\infty)$ and define $N\coloneqq V_Y^{-1}(c)$. Then (cf. \cite[Thm~3.2]{wilson1967structure}) \begin{equation}\label{eq:diffeo-to-product} \textnormal{$\Phi_Y|_{\mathbb{R}\times N}\colon \mathbb{R}\times N \approx \st_\att$ is a $C^1$ diffeomorphism pushing forward $Y$ to $1\times 0$}. \end{equation} Since $Y|_{\st_\att}$ takes values in the involutive distribution $\mathcal{D}$, $T\Phi_Y^t(\mathcal{D})= \mathcal{D}$ for all $t\in \mathbb{R}$. Defining the involutive $C^1$ distribution $\mathcal{D}_N\coloneqq \mathcal{D} \cap T N$ on $N$, this and \eqref{eq:diffeo-to-product} imply \begin{equation}\label{eq:diffeo-push-dist} \textnormal{$\Phi_Y|_{\mathbb{R}\times N}\colon \mathbb{R}\times N \approx \st_\att$ pushes forward $T \mathbb{R}\times \mathcal{D}_N$ to $\mathcal{D}$}. \end{equation} By \eqref{eq:diffeo-to-product} and \eqref{eq:diffeo-push-dist} it may be assumed from here on that $\st_\att = \mathbb{R}\times N$, $Y=1\times 0$, and $\mathcal{D} = T \mathbb{R} \times \mathcal{D}_N$. The set of sprays on $N$ is convex \cite{lang1972differential,brocker1982intro}, so a partition of unity can be used to construct a $C^1$ spray $Z_N\colon T N \to T(T N)$ on $N$ that is tangent to $\mathcal{D}_N$.\footnote{Alternatively, the dynamics of an unforced classical mechanical system with configuration space $N$ equipped with a Riemannian kinetic energy metric and nonholonomic constraint distribution $\mathcal{D}_N$ is generated by a spray having this property \cite{bloch1998newton,lewis1998affine}.} Let $Z_\mathbb{R}$ be the Euclidean geodesic spray and $Z$ be the $C^1$ spray $Z\coloneqq Z_\mathbb{R} \times Z_N$ on $\st_\att = \mathbb{R}\times N$. Then the exponential maps of these sprays \cite{lang1972differential, brocker1982intro} satisfy \begin{equation* \begin{split} \exp^Z& \coloneqq \pi \circ \Phi^1_Z = (\pi_{\mathbb{R}}\times \pi_{N})\circ (\Phi^1_{Z_\mathbb{R}}\times \Phi^1_{Z_N}) = (\pi_\mathbb{R}\circ\Phi^1_{Z_\mathbb{R}})\times (\pi_N\circ \Phi^1_{Z_N})\\ &\eqqcolon \exp^{Z_\mathbb{R}}\times \exp^{Z_N}, \end{split} \end{equation*} where $\Phi_Z, \Phi_{Z_\mathbb{R}}, \Phi_{Z_N}$ are the local flows of $Z$, $Z_\mathbb{R}$, $Z_N$ and $\pi\colon T \st_\att\to \st_\att$, $\pi_\mathbb{R}\colon T \mathbb{R}\to \mathbb{R}$, $\pi_N\colon T N\to N$ are the tangent bundle projections. Clearly $(\pi_{\mathbb{R}}, \exp^{Z_\mathbb{R}})\colon T \mathbb{R}\to \mathbb{R}^2$ is a diffeomorphism, and $(\pi_N,\exp^{Z_N})\colon T N\to N^2$ maps a neighborhood of $0_{T N}$ diffeomorphically onto its image by a standard argument (see \cite[p.~121]{brocker1982intro}). It follows that $(\pi,\exp^Z)\colon T\st_\att\to \st_\att^2$ is a $C^1$ diffeomorphism from a neighborhood $U_0$ of $T \mathbb{R}\times 0_{T N}$ onto its open image $U_1$. Moreover, $Z$ is tangent to $\mathcal{D}$ since $Z_N$ is tangent to $\mathcal{D}_N$, so $\exp^Z$ maps the fiber $\mathcal{D}_m$ over each $m\in \st_\att$ into the leaf $\mathcal{F}_m$ through $m$ of the $C^1$ foliation $\{\mathcal{F}_m\}_{m\in \st_\att}$ integrating $\mathcal{D}$ \cite[p.~541]{pugh1997holder}. Additionally, $Z = Z_\mathbb{R}\times Z_N$ implies that $\exp^Z(tY(m)) = \exp^Z_m(t\times 0) = \Phi_Y^t(m)$ for every $m\in \st_\att$. Define $\Phi_{\tilde{X}}$, $\Phi_{\tilde{Y}}$ to be the local flows of $\tilde{X}\coloneqq (0\times X)$, $\tilde{Y}\coloneqq (0\times Y)$ on $\st_\att^2$. By the previous paragraph, $(\pi, \exp^Z)$ maps $\mathcal{D}$ into $S\coloneqq \bigcup_{m\in U_\att}\{m\}\times \mathcal{F}_m$. Since $S\subset U_\att\times \st_\att$ is a leaf of the $C^1$ foliation integrating the involutive $C^1$ distribution $T U_\att\times \mathcal{D}$ \cite[p.~541]{pugh1997holder}, it follows that $S$ is a $C^1$ immersed submanifold such that all $C^1$ maps $Q\to U_\att\times \st_\att$ with image contained in $S$ are $C^1$ as maps into $S$ ($Q$ is arbitrary; cf. \cite[Thm~19.17]{lee2013smooth}). Defining the open subsets $W_0\coloneqq U_0\cap \mathcal{D}|_{U_\att}\subset TU_\att$ and $W_1\coloneqq U_1\cap S\subset U_\att\times \st_\att$, this and the previous paragraph imply that \begin{equation}\label{eq:Exp-diffeo} \textnormal{$\textnormal{Exp}\coloneqq (\pi, \exp^Z)|_{W_0}\colon W_0\to W_1$ is a $C^1$ diffeomorphism.} \end{equation} Defining $\Delta\coloneqq \{(m,m)\colon m\in U_\att\}\subset W_1 \subset S$, \eqref{eq:diffeo-to-product} and the corresponding result for $X$ imply that $ \Phi_{\tilde{Y}}^{(-\infty,0]}(\Delta)$ and $ \bigcup_{m\in U_\att}\Phi_{\tilde{X}}^{[\tau(m),\infty)}(m,m)$ are disjoint closed subsets of $S$, so there is a $C^0$ function $\alpha\colon S \to [0,1]$ equal to $0$ on neighborhoods of the latter subset and $S\setminus W_1$, and equal to $1$ on a neighborhood of $ \Phi_{\tilde{Y}}^{(-\infty,0]}(\Delta)$. Define the $C^\infty$ function $\beta\colon [0,1]\times U_\att\to [0,1]$ by $\beta(t,m)\coloneqq \alpha(\Phi_{\tilde{X}}^{t\tau(m)}(m,m))$. Then \eqref{eq:tau-property} and \eqref{eq:Exp-diffeo} imply that \begin{equation*} \begin{split} H&\colon [0,1]\times U_\att\to \mathcal{D}\setminus 0, \\ H(t,m) &\coloneqq \begin{cases} X(m), & t=0\\ \frac{\beta(t,m)}{t\tau(m)}\textnormal{Exp}^{-1}(\Phi_{\tilde{X}}^{t\tau(m)}(m,m)) + (1-\beta(t,m))Y(m), & 0 < t \leq 1\\ Y(m), & \beta(t,m) = 0. \end{cases} \end{split} \end{equation*} is a well-defined homotopy from $X|_{U_\att}$ to $Y|_{U_\att}$ through $(\mathcal{D}\setminus 0)$-valued vector fields. \end{proof} \section{Counterexample}\label{sec:counterexample} In this section an example is given showing that the hypothesis that $\mathcal{D}$ is involutive cannot be removed from Theorem~\ref{th:dist}, even if $A$ is a compact boundaryless submanifold and everything is analytic and $\mathcal{D}$ is a distribution on $M$ rather than $\st_\att$ (reminder: $\st_\att\coloneqq M\setminus A$ and $U_\att \coloneqq U \setminus A$). Consider the $2$-torus $\mathbb{T}^2$ viewed as the square $[0,2\pi]^2$ with opposite boundary faces identified and angular coordinates $\theta_1, \theta_2 \in \mathbb{R} \mod 2\pi$. Define $M\coloneqq \mathbb{T}^2 \times \mathbb{R}$ with coordinates $(\theta_1,\theta_2,z)$ where $z\in \mathbb{R}$. Define $A\coloneqq \{z=0\}\subset M$ and $\mathcal{D}\coloneqq \ker\left(dz + zd\theta_1 + z\cos\theta_1 d\theta_2 \right)\subset TM$. Note that $\mathcal{D}$ is not involutive. Consider the following $\mathcal{D}$-valued vector fields on $M$: \begin{equation*} \begin{split} X \coloneqq \partial_{\theta_1} - z\partial_z, \qquad Y \coloneqq \cos\theta_1 \partial_{\theta_2} -\sin \theta_1 \partial_{\theta_1} + (\sin\theta_1-\cos^2\theta_1)z\partial_z. \end{split} \end{equation*} For every $c\in \mathbb{R}$, $X|_{\{z=c\}}$ is not homotopic to $Y|_{\{z=c\}}$ through $(\mathcal{D}\setminus 0)$-valued vector fields since this would imply that the vector fields $X_0\coloneqq \partial_{\theta_1}$ and $Y_0\coloneqq \cos\theta_1 \partial_{\theta_2}- \sin\theta_1 \partial_{\theta_1}$ on $\mathbb{T}^2$ are homotopic without passing through zero. But (using the identification $T \mathbb{T}^2\approx \mathbb{T}^2 \times \mathbb{R}^2$ to view $X_0$, $Y_0$ as $\mathbb{R}^2$-valued) the restrictions $$X_0|_{\{\theta_2=0\}}, Y_0|_{\{\theta_2=0\}}\colon \{\theta_2=0\} \approx \mathbb{S}^1 \to \mathbb{R}^2\setminus \{0\}$$ have different winding numbers ($0$ and $-1$) with respect to $0\in \mathbb{R}^2$, and this implies a contradiction. Hence for every neighborhood $U\subset M$ of $A = \{z=0\}$, $X|_{U_\att}$ is not homotopic to $Y|_{U_\att}$ through $(\mathcal{D}\setminus 0)$-valued vector fields. On the other hand, $A$ is asymptotically stable for both $X$ and $Y$. Indeed, letting dots denote derivatives with respect to $t$, the $X$-integral curves $(\theta_1, \theta_2, z)(t)$ satisfy \begin{equation}\label{eq:cex-non-inv-X-int-curves} \begin{split} \dot{\theta}_1 &= 1 \\ \dot{\theta}_2 &= 0\\ \dot{z} &= -z \\ \end{split} \end{equation} and the $Y$-integral curves satisfy \begin{equation}\label{eq:cex-non-inv-Y-int-curves} \begin{split} \dot{\theta}_1 &= -\sin\theta_1 \\ \dot{\theta}_2 &= \cos \theta_1\\ \dot{z} &= (\sin \theta_1 - \cos^2\theta_1)z. \\ \end{split} \end{equation} Since \eqref{eq:cex-non-inv-X-int-curves} implies that $z(t)=e^{-t}z(0)$, $A$ is asymptotically stable for $X$. Next, \eqref{eq:cex-non-inv-Y-int-curves} and linear ODE theory imply that \begin{equation}\label{eq:cex-non-inv-Y-z-traj} \begin{split} z(t) &= e^{\int_0^t \sin \theta_1(s)-\cos^2\theta_1(s)\, ds}z(0) = e^{-\int_0^t \dot{\theta}_1(s)+\cos^2\theta_1(s)\, ds}z(0) \\ & = e^{\left(\theta_1(0)-\theta_1(t) -\int_0^t\cos^2\theta_1(s)\, ds\right)}z(0)\\ & \leq e^{\left(\pi -\int_0^t\cos^2\theta_1(s)\, ds\right)} z(0) \leq e^{\pi} z(0). \end{split} \end{equation} The first inequality holds since \eqref{eq:cex-non-inv-Y-int-curves} implies that $t\mapsto \theta_1(t)$ is either constant or a heteroclinic trajectory from $\pi$ to $0$. The first inequality implies that $A$ is attracting since \eqref{eq:cex-non-inv-Y-int-curves} implies that $\int_0^t\cos^2\theta_1(s)\,ds\to \infty$ as $t\to \infty$ for every initial condition. The second inequality implies that $A$ is Lyapunov stable for $Y$. Hence $A$ is asymptotically stable for both $X$ and $Y$, which implies (since $A$ is compact) that $A$ is uniformly asymptotically stable with respect to every Riemannian metric on $M$. On the other hand, $X|_{U_\att}$ and $Y|_{U_\att}$ are \emph{not} homotopic through $(\mathcal{D}\setminus 0)$-valued vector fields for every neighborhood $U\subset M$ of $A$, as was discussed. Thus, this example establishes the claim that the ``involutive'' hypothesis of Theorem~\ref{th:dist} cannot be removed, even when $A$ ($\approx \mathbb{T}^2$ here) is a compact boundaryless submanifold and everything is analytic and $\mathcal{D}$ is a distribution on all of $M$. \section{Questions}\label{sec:questions} In this section some remaining questions are posed and discussed. Does Corollary~\ref{co:stability-weakest} or, more generally, Theorem~\ref{th:dist} hold under attractivity assumptions weaker than (uniform) asymptotic stability, as considered in \cite{zabczyk1989some}? Can the assumption that trajectories are unique be removed, as in \cite{orsi2003necessary}? Is Theorem~\ref{th:dist} still true if $\mathcal{D}$ is merely assumed to be a generalized subbundle (singular distribution) rather than a vector subbundle (regular distribution) \cite{lewis2014generalised}? Motivated by Theorem~\ref{th:dist}, in the context of the proposition in section~\ref{sec:results}, what can be said if the gradient vector fields take values in a distribution $\mathcal{D}$? And in the context of the discussion motivating the proposition, can anything analogous be said for other special classes of vector fields which might be useful for strengthening the conclusions of Theorem~\ref{th:dist} or Corollary~\ref{co:stability-weakest} under more specific hypotheses? It was asked after Remark~\ref{rem:coron-mansouri} whether the homotopy of Theorem~\ref{th:dist} can be taken through vector fields rendering $A$ uniformly asymptotically stable. It seems to the author that, using the $s$-cobordism theorem due to Barden-Mazur-Stallings \cite{barden1963structure,mazur1963relative,stallings1965on}, some sufficient conditions for this can be given when $\dim M \geq 6$ under certain hypotheses on fundamental groups related to Whitehead torsion \cite{milnor1966whitehead}. However, this would only provide a partial answer to the question. It will now be explained how the question just mentioned relates to one asked by Conley. In his monograph Conley defined what is now called the Conley index and showed that isolated invariant sets related by continuation (defined in \cite{conley1978isolated}) have ``the same'' Conley index. Conley asked to what extent the converse is true \cite[Sec.~IV.8.1.A]{conley1978isolated}. Simple examples show that isolated invariant sets with the same Conley index need not be related by continuation \cite[pp.~1--2]{mrozek2000conley}, as Conley surely knew, but one can still ask whether a converse holds in certain situations. One such situation is when the pair of isolated invariant sets are the same asymptotically stable set but for two different vector fields; a homotopy of these through stabilizing vector fields would induce a continuation of their flows, and this explains the relationship of Conley's question with that of the previous paragraph. Reineck has already investigated Conley's question using techniques related to the $h$-cobordism theorem (special case of the $s$-cobordism theorem) \cite{reineck1992continuation}. Finally, from the view of the present paper, it seems to the author that the ultimate question is the following. Is there a ``universal'' necessary \emph{and} sufficient condition for stabilizability which can be used to actually \emph{construct} smooth stabilizing feedbacks via numerical means? It seems to the author that a negative answer to this question would also be interesting. \section*{Acknowledgments} This work was funded by ONR N000141612817 held by D. E. Koditschek. The author gratefully acknowledges Yu. Baryshnikov, B. A. Christopherson, J. Gould, R. Gupta, D. E. Koditschek, B. S. Mordukhovich, and T. O. Rot for helpful conversations and insights and references. \bibliographystyle{amsalpha}
\section{Introduction}\label{s:intro} The engineering and control of quantum systems in the presence of noise is a crucial step in the development of quantum technology \cite{GardinerZoller, Soare, Levy, GenoniPRL,Myatt,PiiloManiscalco}. In turn, much attention has been devoted to describe the dynamics of open quantum systems for different kind of environments, i.e. different sources of damping and decoherence \cite{B.Petruccione}. It is often challenging to obtain the exact dynamics of an open quantum system and different kinds of approaches have been developed to derive an approximate description at different levels of accuracy. Besides assuming a weak coupling, the approximations usually employed to obtain analytic master (or Langevin) equations \cite{GKS} for the system under investigation include neglecting memory effects (Markovian approximation), using time coarse graining (not accounting for potential contributions coming from the short-time dynamics), and assuming some simplified form for the spectral density of the environment, e.g. a Lorentzian one or an Ohmic one with a large frequency cut-off. \par On the other hand, there are several systems where nontrivial spectral densities appear, e.g. polarons in metals and semi-conductors, photonic crystals and micro-mechanical oscillators, and a question arises on the effect of the interaction with this kind of media on the quantum properties of a given system \cite{Legget,Shnirman,Paavola,Martinazzo}. Moreover, memory effects, backflow of information and short-time dynamics can play a significant role in these scenarios and a non-Markovian approach should be employed \cite{BreuerVacchini,NonMarkov_Rev_Vega,TrapaniBina}. Structured environments have been thoroughly studied and characterized from the point of view of quantum probing, both in the continuous- and discrete-variables regimes \cite{BinaGrasselli,BinaSalari,GebbiaBenedetti}, in the context of bath engineering for controlled systems. In particular, we focus attention on composite systems where the propagation of frequencies in a limited range is forbidden, owing to the spectral properties of their constituents. A customary example is that of photonics crystals made of materials with very different optical properties (e.g. different refraction indices), overall resulting in the creation of photonic band gaps \cite{PriorPlenio,Qiao99,Liu17}. \par In this paper, motivated by some recent experimental implementations within photonic crystal wave guides \cite{Hood, Yu, Javadi}, we address the propagation of Gaussian states of light through a medium characterized by a finite bandwidth $\delta$, i.e. the spectral density $J(\omega)$ of the structured environment is non-vanishing only in a given interval $[\Omega, \Omega + \delta]$. Our analysis shows that these spectral features result in a peculiar short-time dynamics of the system, where the secular terms may be neglected, pure attenuation is strongly suppressed, and the overall dynamics may be described as a Gaussian noise channel with variance depending only on the bandwidth (neither on the natural frequency $\omega_0$ of the mode, nor on the location $\Omega$ of the bandwidth in the spectrum). We then use our results to study the propagation of Gaussian entangled states in media with finite bandwidth. \par The paper is stuctured as follows: in Sec. \ref{s:EME}, we describe our model and present the non-Markovian master equation. Section \ref{s:EDynGS} illustrates the solution of the master equation with an initial Gaussian state. In addition, we review the concept of entaglement of formation for two-mode continuous-variable (CV) Gaussian state. In Sec. \ref{s:ED} we investigate the validity of the secular approximation, and discuss the dynamics of entanglement. Sec. \ref{s:concl}, we draw some conclusive remarks on our work. \section{The interaction model} \label{s:EME} Let us consider a single-mode field at natural frequency $\omega_0$, the system, interacting with an environment that we assume at thermal equilibrium. The interaction Hamiltonian in natural units may be written as \begin{equation}\label{eq:Hgen}\begin{split} H&=\frac{\omega_0}{2}\left( P^2 + X^2 \right)+ \sum_{n} \frac{\omega_n}{2} \left ( P_n^2+X_n^2 \right) -\alpha\, X\otimes \sum_{j} \gamma_j X_j, \end{split} \end{equation} where $\alpha$ (dimensionless) is the overall coupling strength between the system and the environment, $X$ and $P$ are the canonical operators of the system mode, $X_j$ and $P_j$ are operators of the environmental modes. We remind that in terms of the field mode, the quadrature operators are given by $X(\varphi)=(a\, { \rm e}^{-\mathrm{i}\varphi}+a^\dag{\rm e}^{\mathrm{i}\varphi})/\sqrt{2}$, with $X\equiv X(0)$ and $P\equiv X(\pi/2)$. Finally, the quantities $\omega_j$ denote the frequencies of the environmental modes, and $\gamma_j$ are the (dimensional) couplings between the system and the $j$-th environmental mode. At $t=0$ we assume a factorized state $\varrho_0\otimes \mathcal{E}$, where $\varrho_0$ is the initial state of the system and $\mathcal{E}$ the (multimode) equilibrium thermal state of the environment, i.e. $\mathcal{E}={\rm e}^{-\beta H_B}/\mathcal{Z}$, where $\beta=T^{-1}$ is the inverse temperature, $H_B$ the free energy of the environment and $\mathcal{Z}$ the partition function. We use natural units and thus besides $\hbar=1$ we also have the Boltzmann constant $k_B=1$. \par Upon evolving the overall system and tracing out the environmental degrees of freedom we obtain a time-local master equation, which describes the noisy evolution of the system mode \cite{HuPaz,B.Petruccione} \begin{equation}\label{eq:ME} \dot \varrho(t) = -\mathrm{i}\big [ H_0,\varrho(t)\big ]+\mathrm{i}\, r(t)\big[ X^2,\varrho(t)\big] -\mathrm{i}\, \gamma(t)\big[X,\{ P,\varrho(t)\}\big ] -\Delta(t)\big[X,\left[X,\varrho(t)\right]\big] +\Pi (t)\big[X,\left[P,\varrho(t) \right]\big] \,, \end{equation} where $H_0$ is the free Hamiltonian (first term in Eq.~(\ref{eq:Hgen})), and $[\cdot\,,\cdot]$ and $\{\cdot\,,\cdot\}$ denote commutators and anticommutators, respectively. The first term in Eq.~({\ref{eq:ME}}) is due to the unitary part of the time evolution, whereas the second one induces a time-dependent energy-shift. The third term is a damping term and the last two are responsible for diffusion. The different time-dependent coefficients link the non-Markovian features of the dynamics with the spectral structure of the environment and its thermal excitations. Up to second order in $\alpha$ we have \begin{align} \label{eq:CoefficientsME} r (\tau)&= \int_{0}^{\tau}\!\!\! ds \cos(\omega_0\, s)\int_{0}^{\infty}\!\!\!\! d\omega\, J(\omega) \sin(\omega s)\,, \qquad \gamma (\tau)=\int_{0}^{\tau}\!\!\! ds \sin(\omega_0\, s)\int_{0}^{\infty}\!\!\!\! d\omega\, J(\omega) \sin(\omega s)\,,\\ \Delta (\tau)&= \int_{0}^{\tau}\!\!\! ds \cos(\omega_0\, s) \int_{0}^{\infty}\!\!\!\! d\omega \coth \frac{\beta \omega}{2} J(\omega)\cos(\omega s)\,, \notag \qquad \Pi (\tau)= \int_{0}^{\tau}\!\!\! ds \sin(\omega_0\, s) \int_{0}^{\infty}\!\!\!\! d\omega \coth \frac{\beta \omega}{2} J(\omega) \cos(\omega s) \notag\,, \end{align} where $J(\omega)=\alpha^2\sum_j \frac{\gamma_j}{2}\delta(\omega-\omega_j)$ is the spectral density of the environment and $N(\omega)=\big ({\rm e}^{\beta\omega}-1\big )^{-1}$ the average number of thermal excitations for the mode of frequency $\omega$. \par A general solution of the master equation (\ref{eq:ME}) can be found through the quantum characteristic approach \cite{Intra2003} in terms of the canonical variables $\vec{z}=(x\, ,\, p)$, assuming a weak coupling regime which corresponds to fulfill the condition $\alpha\ll 1$: \begin{equation} \chi [\vec{z}\,](t)= {\rm e}^{-\vec{z}^{\,T}\overline{W}(t)\vec{z}} \chi\left[e^{-\frac{\Gamma (t)}{2}}R^{-1}(t)\vec{z}\, \right] (0) \, , \label{eq:QCFt} \end{equation} where \begin{align} \Gamma (t) &= 2\int_{0}^{t} \gamma(\tau) d\tau \label{Gamma} \\ R(t) &\simeq \left( \begin{array}{cc} \cos(\omega_0 t) & \sin(\omega_0 t) \\ -\sin(\omega_0 t) & \cos(\omega_0 t) \end{array} \right) \qquad M(\tau) =\left( \begin{array}{cc} \Delta(\tau) &-\frac{\Pi (\tau)}{2} \\ -\frac{\Pi (\tau)}{2} & 0 \end{array} \right) \\ \overline{W}(t)&={\rm e}^{-\Gamma(t)}\big [ R^{-1}(t) \big ]^T W(t) R^{-1}(t) \qquad W(t) =\int_0^t{\rm e}^{\Gamma(\tau)}R^T(\tau)M(\tau)R(\tau)d\tau \end{align} Since the Hamiltonian (\ref{eq:Hgen}) is at most bilinear in the system quadrature operators, it induces a Gaussian evolution map, i.e. a map which preserves the Gaussian character of any initial Gaussian state. \section{Dynamical evolution of Gaussian states}\label{s:EDynGS} In this Section we review the solution of the master equation for Gaussian states \cite{Intra2003}. In particular, we focus on two-mode Gaussian states (each one interacting with its own environment) in order to analyze the dynamics of entanglement. On the other hand, the conclusions about the features of the channel are general, and apply to signals with any number of modes. \par Let us thus consider a single two-mode Gaussian state, with characteristic function at time $t=0$ $\chi_0(\vec{z})=\exp\{-\frac{1}{2}\vec{z}^{T} \sigma_0\,\vec{z}-i\,\vec{z}^{T}\bar{\mathbf{X}}_{in}\}$. The initial covariance matrix $\sigma_0$ is a $4\times 4$ matrix \begin{equation}\label{eq:CovMatzero} \sigma_0=\left( \begin{array}{cc} \mathbf{A_0} & \mathbf{C_0} \\ \mathbf{C^T_0} & \mathbf{B_0} \\ \end{array} \right), \end{equation} where $\mathbf{A_0}= a\,{\mathbbm I}$, $\mathbf{B_0}=b\,{\mathbbm I}$, $\mathbf{C_0}={\rm Diag}(c_1,c_2)$, with $a$,$b>0$ and $c_1$, $c_2$ real numbers, and $\mathbbm I$ the $2\times 2$ identity matrix. We remind that the system-environment interaction, and thus the time evolution, maintains the Gaussian character \cite{Vasile2009,Berihu22}. The evolved state is a two-mode Gaussian state with mean and covariance matrix described by \begin{align} \bar{\mathbf{X}}_t&=e^{-\Gamma(t)/2}\big [ R(t)\oplus R(t)\big ] \bar{\mathbf{X}}_{in} \label{e1} \\ \label{CovMatT} \sigma_t&=e^{-\Gamma(t)}\big [ R(t)\oplus R(t)\big ] \sigma_0 \big [ R(t)\oplus R(t)\big ]^T+2(\bar{W}(t)\oplus\bar{W} (t)) \, . \end{align} Upon substituting the cexpression of the coefficients obtained in the weak-coupling approximation, into Eqs.~(\ref{e1}) and (\ref{CovMatT}), the covariance matrix at time $t$ may be written as \begin{equation}\label{CovMatT2} \mathbb{\bf \sigma_{t}}= \left( \begin{array}{c | c} \mathbb{\bf A_{t}} &\mathbb{\bf C_{t}} \\ \hline\mathbb{\bf C_{t}}^{T} & \mathbb{\bf A_{t}} \end{array} \right), \end{equation} where \begin{align}\label{At} \mathbb{\bf A_{t}} ={} \mathbb{\bf A_{0}} e^{-\Gamma (t)} + \left( \begin{array}{cc} \Delta_{\Gamma}(t) + \big [\Delta_{\rm co}(t) - \Pi_{\rm si}(t)\big ] &-\big [ \Delta_{\rm si}(t) - \Pi_{\rm co}(t)\big ] \\ -\big [\Delta_{\rm si}(t) - \Pi_{\rm co}(t)\big ] & \Delta_{\Gamma}(t) - \big [ \Delta_{\rm co}(t) - \Pi_{\rm si}(t) \big ] \end{array} \right) \end{align} and \begin{align}\label{Ct} \mathbb{\bf C_{t}} = \left( \begin{array}{cc} c\, e^{-\Gamma (t)}\, \cos(2\omega_0 t) & c\, e^{-\Gamma (t)}\, \sin(2\omega_0 t) \\ c\, e^{-\Gamma (t)}\, \sin(2\omega_0 t) & -c\, e^{-\Gamma (t)}\, \cos(2\omega_0 t) \end{array} \right). \end{align} In order to obtain the compact forms (\ref{At}) and (\ref{Ct}), we have introduced the following expression \begin{equation} \Delta_{\Gamma}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Delta(s)ds \end{equation} and the secular coefficients \begin{subequations} \label{eq:SecCoeff} \begin{align} &\Delta_{co}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Delta(s)\cos[2\omega_0(t-s)]ds \qquad \Delta_{si}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Delta(s)\sin[2\omega_0(t-s)]ds\\ &\Pi_{co}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Pi(s)\cos[2\omega_0(t-s)]ds \qquad \Pi_{si}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Pi(s)\sin[2\omega_0 (t-s)]ds. \end{align}\end{subequations} In situations where the secular terms may be neglected (as we will see, this is our case) the diagonal blocks of the covariance matrix evolve as \begin{align} \mathbb{\bf A_{t}} ={} \mathbb{\bf A_{0}}\, e^{-\Gamma (t)} + \Delta_{\Gamma} (t)\, {\mathbbm I} \,. \label{e3} \end{align} \par Let us now introduce the main ingredient of our analysis, i.e. a specification of the properties of the bosonic reservoirs through the form of the spectral density. In order to describe the presence of a finite bandwidth, i.e. the fact that the propagation of certain frequencies, or a certain range of frequencies, is forbidden, we consider a spectral density of the form $J(\omega) \propto \left[\theta(\omega -\Omega) - \theta (\omega - \Omega - \delta)\right]$. The parameter $\delta$ represents the bandwidth of the distribution, whereas $\Omega$ specifies its location within the spectrum. In the low temperature regime, i.e. $T\ll \Omega^{-1}$, we may safely assume $N(\omega)\approx 0$ and $\coth\frac{\omega}{2T}\approx 1$ in Eq. (\ref{eq:CoefficientsME}), and obtain an analytic expression for the relevant coefficients. In particular, we get a simplified form of the master equation coefficients \begin{align} \Delta (t)&=\delta\, t\\ \gamma(t)&=\frac13 \delta\, \omega_{0}\,\Omega\, t^3 \, , \end{align} from which it is straightforward to obtain the time-integrated functions $\Delta_{\Gamma} (t)$ and $\Gamma (t)$ as \begin{align} \Gamma (t)&=\frac16 \delta\, \omega_{0}\,\Omega\, t^4\\ \Delta_{\Gamma} (t)&=\frac12 \delta\, t^2\,. \end{align} Since the memory effects due to the non-Markovian nature of the environment are taking place over short times, the above results mean that attenuation (damping) is strongly suppressed in the propagation through media with a finite bandwidth. Moreover, if the secular terms may be neglected, the overall diffusion process is governed by Eq. (\ref{e3}) and by the espression of $\Delta_{\Gamma} (t)$. In this case, it may be described as a Gaussian noise channel with variance depending only on the bandwidth $\delta$ and not on the location $\Omega$. \begin{figure}[h!] \center \includegraphics[width=0.4\columnwidth]{EOF1.pdf} \includegraphics[width=0.4\columnwidth]{EOF2.pdf} \caption{(Color online) Comparison between the $E_F$ evaluated with the exact dynamics (solid red line) and the secular approximation (dashed blue line) as a function of time. Parameters are set to $\omega_0=5$, $r=0.002$, $\Omega=1$ and (left panel): $\delta=0.1$, (right panel): $\delta=0.01$.}\label{fig:1} \end{figure} \par \subsection{Entanglement of Formation} A convenient way to quantify entanglement of two-mode CV system is given by the so-called entanglement of formation ($E_F$) \cite{EoF,G:03,EoF2008}, which can be computed analytically starting from the covariance matrix of the system. Using Eq.~\eqref{CovMatT2} and the fact that we are dealing with symmetric states we may write \begin{equation}\label{EoF} E_{F} = (x + \mbox{$\frac12$}) \ln(x +\mbox{$\frac12$}) - (x - \mbox{$\frac12$}) \ln(x - \mbox{$\frac12$}), \end{equation} where $x = (\kappa^{2} + 1/4)/(2 \kappa)$. The quantity $\kappa=\sqrt{(a_n - c_{+})(a_n - c_{-})}$ is the minimum symplectic eigenvalue of the covariance matrix ${\bf \sigma_{t}}$, whereas \begin{align} a_n &= \sqrt{I_1}\\ c_{\pm} &= \sqrt{\frac{I_1^2+I_3^2-I_4 \pm \sqrt{(I_1^2+I_3^2-I_4)^2 - (2 I_1I_3)^2}} {2 I_1}}, \label{c:pm} \end{align} with the ${\bf \sigma_{t}}$ symplectic invariants $I_1 = \det[{\bf A_{t}}]$, $I_3 = \det[{\bf C_{t}}]$ and $I_4 = \det[{\bf \sigma_{t}}]$. \section{Entanglement dynamics}\label{s:ED} Protecting entanglement during evolution and avoiding entangled sudden death \cite{YuLett, YuScience,Xu10,Bellomo07,Bellomo08,Maniscalco08,PraBec2004,Alicki} is a major task in different areas of quantum information science. In this framework, it has been shown \cite{Bellomo} that some beneficial effects may be obtained by engineering structured environment such as a photonic bandgap materials \cite{John90,John94}, and this motivates us to analyze in some details the dependence of the $E_F$ on the parameters of spectral density, and their interplay with the natural frequency of the involved modes. \begin{figure}[h!] \center \includegraphics[width=0.4\columnwidth]{EOF3.pdf} \includegraphics[width=0.4\columnwidth]{EOF4.pdf} \includegraphics[width=0.4\columnwidth]{EOF5.pdf} \includegraphics[width=0.4\columnwidth]{EOF6.pdf} \caption{(Color online) Dynamics of the exact $E_F$ (solid red line) and the secular approximate (dashed blue line) as a function of time. Parameters are set to $\omega_0=0.5$, $\Omega=1$ and (upper left panel) $\delta=0.001$ and $r=1$, (upper right panel) $\delta=0.0001$ and $r=0.6$, (lower left panel) $\delta=0.001$ and $r=1$, (lower right panel) $\delta=0.0001$ and $r=0.5$.}\label{fig:2} \end{figure} \par To address this problem, we consider as initial state of our system the paradigmatic example of the so-called twin-beam (TWB) state, a maximally entangled Gaussian state having covariance matrix coefficients $a=b=\cosh 2r$, $c= \sinh 2 r$ with $r>0$ (see Eq. (\ref{eq:CovMatzero})) and analyze the state propagation in a reservoir with a finite bandwidth spectral density. The first observation is that the $E_F$ is not monotone in time, a clear signature of non-Markovianity \cite{YuLett, YuScience,Maniscalco07,cazza13}. Fig. \ref{fig:1} illustrates the dynamics of the $E_F$, evaluated with and without the secular approximation for large $\omega_{0}$ for two different values of the bandwidth and for the same initial TWB state. As it is apparent from the plot, the secular approximation is working well for short times, whereas for longer times some discrepancies appears. In particular, the exact solution predicts higher entanglement than the approximate one. We also notice that the secular approximation works better for larger values of the bandwidth. The effects of the other parameters are summarized in Fig. \ref{fig:2}. In the upper panels Fig. \ref{fig:2} we show the time evolution of the $E_F$ for two different initial TWB states, a fixed bandwidth, and a smaller natural frequency $\omega_0$ compared to the examples of Fig. \ref{fig:1}. In this case, the secular terms may be again neglected and entanglement is more robust for larger bandwidths. For smaller bandwidths, we see the appearance of This behaviour is confirmed by the lower panels of the same figure, where a smaller bandwidth and a different amount of initial entanglement is considered. \par \section{Conclusions} \label{s:concl} In this work, we have analyzed the entanglement dynamics in optical media characterized by a finite bandwidth. Upon assuming weak coupling and low temperature, we have obtained an exact analytic solution for the time dependent two-mode covariance matrix describing a Gaussian state of our system in the short time non-Markovian limit. Our results show that attenuation (damping) is strongly suppressed whereas the diffusion term depends only on the bandwidth. \par We have investigated the entanglement dynamics as a function of the bandwidth, the natural frequency and the initial amount of entanglement and show that for intermediate values of the bandwidth and not too large initial entanglement, decoherence is not much detrimental and entanglement may persist for a longer time. We have also proved that secular terms may be neglected in the short time non-Markovian limit. Our results are encouraging and show that materials with a photonic bandgap may provide a reliable way to transmit entanglement over long distance. \section*{Acknowledgments} \noindent This work has been supported by Khalifa University through project no. 8474000358 (FSU-2021-018). \section*{Data Avalaibility} The datasets used and/or analysed during the current study available from the corresponding author on reasonable request. \section{Introduction}\label{s:intro} The engineering and control of quantum systems in the presence of noise is a crucial step in the development of quantum technology \cite{GardinerZoller, Soare, Levy, GenoniPRL,Myatt,PiiloManiscalco}. In turn, much attention has been devoted to describe the dynamics of open quantum systems for different kind of environments, i.e. different sources of damping and decoherence \cite{B.Petruccione}. It is often challenging to obtain the exact dynamics of an open quantum system and different kinds of approaches have been developed to derive an approximate description at different levels of accuracy. Besides assuming a weak coupling, the approximations usually employed to obtain analytic master (or Langevin) equations \cite{GKS} for the system under investigation include neglecting memory effects (Markovian approximation), using time coarse graining (not accounting for potential contributions coming from the short-time dynamics), and assuming some simplified form for the spectral density of the environment, e.g. a Lorentzian one or an Ohmic one with a large frequency cut-off. \par On the other hand, there are several systems where nontrivial spectral densities appear, e.g. polarons in metals and semi-conductors, photonic crystals and micro-mechanical oscillators, and a question arises on the effect of the interaction with this kind of media on the quantum properties of a given system \cite{Legget,Shnirman,Paavola,Martinazzo}. Moreover, memory effects, backflow of information and short-time dynamics can play a significant role in these scenarios and a non-Markovian approach should be employed \cite{BreuerVacchini,NonMarkov_Rev_Vega,TrapaniBina}. Structured environments have been thoroughly studied and characterized from the point of view of quantum probing, both in the continuous- and discrete-variables regimes \cite{BinaGrasselli,BinaSalari,GebbiaBenedetti}, in the context of bath engineering for controlled systems. In particular, we focus attention on composite systems where the propagation of frequencies in a limited range is forbidden, owing to the spectral properties of their constituents. A customary example is that of photonics crystals made of materials with very different optical properties (e.g. different refraction indices), overall resulting in the creation of photonic band gaps \cite{PriorPlenio,Qiao99,Liu17}. \par In this paper, motivated by some recent experimental implementations within photonic crystal wave guides \cite{Hood, Yu, Javadi}, we address the propagation of Gaussian states of light through a medium characterized by a finite bandwidth $\delta$, i.e. the spectral density $J(\omega)$ of the structured environment is non-vanishing only in a given interval $[\Omega, \Omega + \delta]$. Our analysis shows that these spectral features result in a peculiar short-time dynamics of the system, where the secular terms may be neglected, pure attenuation is strongly suppressed, and the overall dynamics may be described as a Gaussian noise channel with variance depending only on the bandwidth (neither on the natural frequency $\omega_0$ of the mode, nor on the location $\Omega$ of the bandwidth in the spectrum). We then use our results to study the propagation of Gaussian entangled states in media with finite bandwidth. \par The paper is stuctured as follows: in Sec. \ref{s:EME}, we describe our model and present the non-Markovian master equation. Section \ref{s:EDynGS} illustrates the solution of the master equation with an initial Gaussian state. In addition, we review the concept of entaglement of formation for two-mode continuous-variable (CV) Gaussian state. In Sec. \ref{s:ED} we investigate the validity of the secular approximation, and discuss the dynamics of entanglement. Sec. \ref{s:concl}, we draw some conclusive remarks on our work. \section{The interaction model} \label{s:EME} Let us consider a single-mode field at natural frequency $\omega_0$, the system, interacting with an environment that we assume at thermal equilibrium. The interaction Hamiltonian in natural units may be written as \begin{equation}\label{eq:Hgen}\begin{split} H&=\frac{\omega_0}{2}\left( P^2 + X^2 \right)+ \sum_{n} \frac{\omega_n}{2} \left ( P_n^2+X_n^2 \right) -\alpha\, X\otimes \sum_{j} \gamma_j X_j, \end{split} \end{equation} where $\alpha$ (dimensionless) is the overall coupling strength between the system and the environment, $X$ and $P$ are the canonical operators of the system mode, $X_j$ and $P_j$ are operators of the environmental modes. We remind that in terms of the field mode, the quadrature operators are given by $X(\varphi)=(a\, { \rm e}^{-\mathrm{i}\varphi}+a^\dag{\rm e}^{\mathrm{i}\varphi})/\sqrt{2}$, with $X\equiv X(0)$ and $P\equiv X(\pi/2)$. Finally, the quantities $\omega_j$ denote the frequencies of the environmental modes, and $\gamma_j$ are the (dimensional) couplings between the system and the $j$-th environmental mode. At $t=0$ we assume a factorized state $\varrho_0\otimes \mathcal{E}$, where $\varrho_0$ is the initial state of the system and $\mathcal{E}$ the (multimode) equilibrium thermal state of the environment, i.e. $\mathcal{E}={\rm e}^{-\beta H_B}/\mathcal{Z}$, where $\beta=T^{-1}$ is the inverse temperature, $H_B$ the free energy of the environment and $\mathcal{Z}$ the partition function. We use natural units and thus besides $\hbar=1$ we also have the Boltzmann constant $k_B=1$. \par Upon evolving the overall system and tracing out the environmental degrees of freedom we obtain a time-local master equation, which describes the noisy evolution of the system mode \cite{HuPaz,B.Petruccione} \begin{equation}\label{eq:ME} \dot \varrho(t) = -\mathrm{i}\big [ H_0,\varrho(t)\big ]+\mathrm{i}\, r(t)\big[ X^2,\varrho(t)\big] -\mathrm{i}\, \gamma(t)\big[X,\{ P,\varrho(t)\}\big ] -\Delta(t)\big[X,\left[X,\varrho(t)\right]\big] +\Pi (t)\big[X,\left[P,\varrho(t) \right]\big] \,, \end{equation} where $H_0$ is the free Hamiltonian (first term in Eq.~(\ref{eq:Hgen})), and $[\cdot\,,\cdot]$ and $\{\cdot\,,\cdot\}$ denote commutators and anticommutators, respectively. The first term in Eq.~({\ref{eq:ME}}) is due to the unitary part of the time evolution, whereas the second one induces a time-dependent energy-shift. The third term is a damping term and the last two are responsible for diffusion. The different time-dependent coefficients link the non-Markovian features of the dynamics with the spectral structure of the environment and its thermal excitations. Up to second order in $\alpha$ we have \begin{align} \label{eq:CoefficientsME} r (\tau)&= \int_{0}^{\tau}\!\!\! ds \cos(\omega_0\, s)\int_{0}^{\infty}\!\!\!\! d\omega\, J(\omega) \sin(\omega s)\,, \qquad \gamma (\tau)=\int_{0}^{\tau}\!\!\! ds \sin(\omega_0\, s)\int_{0}^{\infty}\!\!\!\! d\omega\, J(\omega) \sin(\omega s)\,,\\ \Delta (\tau)&= \int_{0}^{\tau}\!\!\! ds \cos(\omega_0\, s) \int_{0}^{\infty}\!\!\!\! d\omega \coth \frac{\beta \omega}{2} J(\omega)\cos(\omega s)\,, \notag \qquad \Pi (\tau)= \int_{0}^{\tau}\!\!\! ds \sin(\omega_0\, s) \int_{0}^{\infty}\!\!\!\! d\omega \coth \frac{\beta \omega}{2} J(\omega) \cos(\omega s) \notag\,, \end{align} where $J(\omega)=\alpha^2\sum_j \frac{\gamma_j}{2}\delta(\omega-\omega_j)$ is the spectral density of the environment and $N(\omega)=\big ({\rm e}^{\beta\omega}-1\big )^{-1}$ the average number of thermal excitations for the mode of frequency $\omega$. \par A general solution of the master equation (\ref{eq:ME}) can be found through the quantum characteristic approach \cite{Intra2003} in terms of the canonical variables $\vec{z}=(x\, ,\, p)$, assuming a weak coupling regime which corresponds to fulfill the condition $\alpha\ll 1$: \begin{equation} \chi [\vec{z}\,](t)= {\rm e}^{-\vec{z}^{\,T}\overline{W}(t)\vec{z}} \chi\left[e^{-\frac{\Gamma (t)}{2}}R^{-1}(t)\vec{z}\, \right] (0) \, , \label{eq:QCFt} \end{equation} where \begin{align} \Gamma (t) &= 2\int_{0}^{t} \gamma(\tau) d\tau \label{Gamma} \\ R(t) &\simeq \left( \begin{array}{cc} \cos(\omega_0 t) & \sin(\omega_0 t) \\ -\sin(\omega_0 t) & \cos(\omega_0 t) \end{array} \right) \qquad M(\tau) =\left( \begin{array}{cc} \Delta(\tau) &-\frac{\Pi (\tau)}{2} \\ -\frac{\Pi (\tau)}{2} & 0 \end{array} \right) \\ \overline{W}(t)&={\rm e}^{-\Gamma(t)}\big [ R^{-1}(t) \big ]^T W(t) R^{-1}(t) \qquad W(t) =\int_0^t{\rm e}^{\Gamma(\tau)}R^T(\tau)M(\tau)R(\tau)d\tau \end{align} Since the Hamiltonian (\ref{eq:Hgen}) is at most bilinear in the system quadrature operators, it induces a Gaussian evolution map, i.e. a map which preserves the Gaussian character of any initial Gaussian state. \section{Dynamical evolution of Gaussian states}\label{s:EDynGS} In this Section we review the solution of the master equation for Gaussian states \cite{Intra2003}. In particular, we focus on two-mode Gaussian states (each one interacting with its own environment) in order to analyze the dynamics of entanglement. On the other hand, the conclusions about the features of the channel are general, and apply to signals with any number of modes. \par Let us thus consider a single two-mode Gaussian state, with characteristic function at time $t=0$ $\chi_0(\vec{z})=\exp\{-\frac{1}{2}\vec{z}^{T} \sigma_0\,\vec{z}-i\,\vec{z}^{T}\bar{\mathbf{X}}_{in}\}$. The initial covariance matrix $\sigma_0$ is a $4\times 4$ matrix \begin{equation}\label{eq:CovMatzero} \sigma_0=\left( \begin{array}{cc} \mathbf{A_0} & \mathbf{C_0} \\ \mathbf{C^T_0} & \mathbf{B_0} \\ \end{array} \right), \end{equation} where $\mathbf{A_0}= a\,{\mathbbm I}$, $\mathbf{B_0}=b\,{\mathbbm I}$, $\mathbf{C_0}={\rm Diag}(c_1,c_2)$, with $a$,$b>0$ and $c_1$, $c_2$ real numbers, and $\mathbbm I$ the $2\times 2$ identity matrix. We remind that the system-environment interaction, and thus the time evolution, maintains the Gaussian character \cite{Vasile2009,Berihu22}. The evolved state is a two-mode Gaussian state with mean and covariance matrix described by \begin{align} \bar{\mathbf{X}}_t&=e^{-\Gamma(t)/2}\big [ R(t)\oplus R(t)\big ] \bar{\mathbf{X}}_{in} \label{e1} \\ \label{CovMatT} \sigma_t&=e^{-\Gamma(t)}\big [ R(t)\oplus R(t)\big ] \sigma_0 \big [ R(t)\oplus R(t)\big ]^T+2(\bar{W}(t)\oplus\bar{W} (t)) \, . \end{align} Upon substituting the cexpression of the coefficients obtained in the weak-coupling approximation, into Eqs.~(\ref{e1}) and (\ref{CovMatT}), the covariance matrix at time $t$ may be written as \begin{equation}\label{CovMatT2} \mathbb{\bf \sigma_{t}}= \left( \begin{array}{c | c} \mathbb{\bf A_{t}} &\mathbb{\bf C_{t}} \\ \hline\mathbb{\bf C_{t}}^{T} & \mathbb{\bf A_{t}} \end{array} \right), \end{equation} where \begin{align}\label{At} \mathbb{\bf A_{t}} ={} \mathbb{\bf A_{0}} e^{-\Gamma (t)} + \left( \begin{array}{cc} \Delta_{\Gamma}(t) + \big [\Delta_{\rm co}(t) - \Pi_{\rm si}(t)\big ] &-\big [ \Delta_{\rm si}(t) - \Pi_{\rm co}(t)\big ] \\ -\big [\Delta_{\rm si}(t) - \Pi_{\rm co}(t)\big ] & \Delta_{\Gamma}(t) - \big [ \Delta_{\rm co}(t) - \Pi_{\rm si}(t) \big ] \end{array} \right) \end{align} and \begin{align}\label{Ct} \mathbb{\bf C_{t}} = \left( \begin{array}{cc} c\, e^{-\Gamma (t)}\, \cos(2\omega_0 t) & c\, e^{-\Gamma (t)}\, \sin(2\omega_0 t) \\ c\, e^{-\Gamma (t)}\, \sin(2\omega_0 t) & -c\, e^{-\Gamma (t)}\, \cos(2\omega_0 t) \end{array} \right). \end{align} In order to obtain the compact forms (\ref{At}) and (\ref{Ct}), we have introduced the following expression \begin{equation} \Delta_{\Gamma}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Delta(s)ds \end{equation} and the secular coefficients \begin{subequations} \label{eq:SecCoeff} \begin{align} &\Delta_{co}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Delta(s)\cos[2\omega_0(t-s)]ds \qquad \Delta_{si}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Delta(s)\sin[2\omega_0(t-s)]ds\\ &\Pi_{co}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Pi(s)\cos[2\omega_0(t-s)]ds \qquad \Pi_{si}(t)=e^{-\Gamma(t)}\int_0^t e^{\Gamma(s)}\Pi(s)\sin[2\omega_0 (t-s)]ds. \end{align}\end{subequations} In situations where the secular terms may be neglected (as we will see, this is our case) the diagonal blocks of the covariance matrix evolve as \begin{align} \mathbb{\bf A_{t}} ={} \mathbb{\bf A_{0}}\, e^{-\Gamma (t)} + \Delta_{\Gamma} (t)\, {\mathbbm I} \,. \label{e3} \end{align} \par Let us now introduce the main ingredient of our analysis, i.e. a specification of the properties of the bosonic reservoirs through the form of the spectral density. In order to describe the presence of a finite bandwidth, i.e. the fact that the propagation of certain frequencies, or a certain range of frequencies, is forbidden, we consider a spectral density of the form $J(\omega) \propto \left[\theta(\omega -\Omega) - \theta (\omega - \Omega - \delta)\right]$. The parameter $\delta$ represents the bandwidth of the distribution, whereas $\Omega$ specifies its location within the spectrum. In the low temperature regime, i.e. $T\ll \Omega^{-1}$, we may safely assume $N(\omega)\approx 0$ and $\coth\frac{\omega}{2T}\approx 1$ in Eq. (\ref{eq:CoefficientsME}), and obtain an analytic expression for the relevant coefficients. In particular, we get a simplified form of the master equation coefficients \begin{align} \Delta (t)&=\delta\, t\\ \gamma(t)&=\frac13 \delta\, \omega_{0}\,\Omega\, t^3 \, , \end{align} from which it is straightforward to obtain the time-integrated functions $\Delta_{\Gamma} (t)$ and $\Gamma (t)$ as \begin{align} \Gamma (t)&=\frac16 \delta\, \omega_{0}\,\Omega\, t^4\\ \Delta_{\Gamma} (t)&=\frac12 \delta\, t^2\,. \end{align} Since the memory effects due to the non-Markovian nature of the environment are taking place over short times, the above results mean that attenuation (damping) is strongly suppressed in the propagation through media with a finite bandwidth. Moreover, if the secular terms may be neglected, the overall diffusion process is governed by Eq. (\ref{e3}) and by the espression of $\Delta_{\Gamma} (t)$. In this case, it may be described as a Gaussian noise channel with variance depending only on the bandwidth $\delta$ and not on the location $\Omega$. \begin{figure}[h!] \center \includegraphics[width=0.4\columnwidth]{EOF1.pdf} \includegraphics[width=0.4\columnwidth]{EOF2.pdf} \caption{(Color online) Comparison between the $E_F$ evaluated with the exact dynamics (solid red line) and the secular approximation (dashed blue line) as a function of time. Parameters are set to $\omega_0=5$, $r=0.002$, $\Omega=1$ and (left panel): $\delta=0.1$, (right panel): $\delta=0.01$.}\label{fig:1} \end{figure} \par \subsection{Entanglement of Formation} A convenient way to quantify entanglement of two-mode CV system is given by the so-called entanglement of formation ($E_F$) \cite{EoF,G:03,EoF2008}, which can be computed analytically starting from the covariance matrix of the system. Using Eq.~\eqref{CovMatT2} and the fact that we are dealing with symmetric states we may write \begin{equation}\label{EoF} E_{F} = (x + \mbox{$\frac12$}) \ln(x +\mbox{$\frac12$}) - (x - \mbox{$\frac12$}) \ln(x - \mbox{$\frac12$}), \end{equation} where $x = (\kappa^{2} + 1/4)/(2 \kappa)$. The quantity $\kappa=\sqrt{(a_n - c_{+})(a_n - c_{-})}$ is the minimum symplectic eigenvalue of the covariance matrix ${\bf \sigma_{t}}$, whereas \begin{align} a_n &= \sqrt{I_1}\\ c_{\pm} &= \sqrt{\frac{I_1^2+I_3^2-I_4 \pm \sqrt{(I_1^2+I_3^2-I_4)^2 - (2 I_1I_3)^2}} {2 I_1}}, \label{c:pm} \end{align} with the ${\bf \sigma_{t}}$ symplectic invariants $I_1 = \det[{\bf A_{t}}]$, $I_3 = \det[{\bf C_{t}}]$ and $I_4 = \det[{\bf \sigma_{t}}]$. \section{Entanglement dynamics}\label{s:ED} Protecting entanglement during evolution and avoiding entangled sudden death \cite{YuLett, YuScience,Xu10,Bellomo07,Bellomo08,Maniscalco08,PraBec2004,Alicki} is a major task in different areas of quantum information science. In this framework, it has been shown \cite{Bellomo} that some beneficial effects may be obtained by engineering structured environment such as a photonic bandgap materials \cite{John90,John94}, and this motivates us to analyze in some details the dependence of the $E_F$ on the parameters of spectral density, and their interplay with the natural frequency of the involved modes. \begin{figure}[h!] \center \includegraphics[width=0.4\columnwidth]{EOF3.pdf} \includegraphics[width=0.4\columnwidth]{EOF4.pdf} \includegraphics[width=0.4\columnwidth]{EOF5.pdf} \includegraphics[width=0.4\columnwidth]{EOF6.pdf} \caption{(Color online) Dynamics of the exact $E_F$ (solid red line) and the secular approximate (dashed blue line) as a function of time. Parameters are set to $\omega_0=0.5$, $\Omega=1$ and (upper left panel) $\delta=0.001$ and $r=1$, (upper right panel) $\delta=0.0001$ and $r=0.6$, (lower left panel) $\delta=0.001$ and $r=1$, (lower right panel) $\delta=0.0001$ and $r=0.5$.}\label{fig:2} \end{figure} \par To address this problem, we consider as initial state of our system the paradigmatic example of the so-called twin-beam (TWB) state, a maximally entangled Gaussian state having covariance matrix coefficients $a=b=\cosh 2r$, $c= \sinh 2 r$ with $r>0$ (see Eq. (\ref{eq:CovMatzero})) and analyze the state propagation in a reservoir with a finite bandwidth spectral density. The first observation is that the $E_F$ is not monotone in time, a clear signature of non-Markovianity \cite{YuLett, YuScience,Maniscalco07,cazza13}. Fig. \ref{fig:1} illustrates the dynamics of the $E_F$, evaluated with and without the secular approximation for large $\omega_{0}$ for two different values of the bandwidth and for the same initial TWB state. As it is apparent from the plot, the secular approximation is working well for short times, whereas for longer times some discrepancies appears. In particular, the exact solution predicts higher entanglement than the approximate one. We also notice that the secular approximation works better for larger values of the bandwidth. The effects of the other parameters are summarized in Fig. \ref{fig:2}. In the upper panels Fig. \ref{fig:2} we show the time evolution of the $E_F$ for two different initial TWB states, a fixed bandwidth, and a smaller natural frequency $\omega_0$ compared to the examples of Fig. \ref{fig:1}. In this case, the secular terms may be again neglected and entanglement is more robust for larger bandwidths. For smaller bandwidths, we see the appearance of This behaviour is confirmed by the lower panels of the same figure, where a smaller bandwidth and a different amount of initial entanglement is considered. \par \section{Conclusions} \label{s:concl} In this work, we have analyzed the entanglement dynamics in optical media characterized by a finite bandwidth. Upon assuming weak coupling and low temperature, we have obtained an exact analytic solution for the time dependent two-mode covariance matrix describing a Gaussian state of our system in the short time non-Markovian limit. Our results show that attenuation (damping) is strongly suppressed whereas the diffusion term depends only on the bandwidth. \par We have investigated the entanglement dynamics as a function of the bandwidth, the natural frequency and the initial amount of entanglement and show that for intermediate values of the bandwidth and not too large initial entanglement, decoherence is not much detrimental and entanglement may persist for a longer time. We have also proved that secular terms may be neglected in the short time non-Markovian limit. Our results are encouraging and show that materials with a photonic bandgap may provide a reliable way to transmit entanglement over long distance. \section*{Acknowledgments} \noindent This work has been supported by Khalifa University through project no. 8474000358 (FSU-2021-018). \section*{Data Avalaibility} The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
\section{Introduction} Bound states in the continuum (BICs) are radiationless modes that are embedded in the part of the spectrum corresponding to radiating modes. First discovered in the context of quantum mechanics \cite{Neuman1929, Stillinger1975}, BICs are now understood as a general wave phenomenon \cite{Hsu2016, Joseph2021}. The existence of photonic BICs was first theoretically predicted in parallel arrays of dielectric gratings and cylinders \cite{Marinica2008} and in photonic crystals of dielectric rods with defects \cite{Bulgakov2008}. This was followed by landmark experimental demonstrations of photonic BICs in an array of waveguides with defects \cite{Plotnik2011} and in a photonic crystal slab \cite{Hsu2013}. This led to an explosion of interest in the study of photonic BICs in various geometries such as layered nanospheres \cite{Monticone2014}, anisotropic waveguides \cite{Gomis-Bresco2017}, 1D photonic crystals with anisotropic defect layers \cite{Timofeev2018, Pankin2020}, epsilon-near-zero metamaterials \cite{Minkov2018}, plasmonic systems \cite{Azzam2018, Sun2021}, all-dielectric and plasmonic metasurfaces \cite{Fan2019, Liang2020}, $PT$-symmetric systems \cite{Longhi2014, Kartashov2018, Song2020}, tailored photonic crystal environments \cite{Cerjan2019, Cerjan2021} and other periodic systems \cite{Bulgakov2014b, Bulgakov2015, Bulgakov2017, Bulgakov2017a}. Several potential applications of photonic BICs have also been suggested \cite{Kodigala2017, Romano2018, Carletti2018, Hayran2021}. The photonic BICs in all these geometries involve localising light in a waveguide \cite{Bulgakov2008, Gomis-Bresco2017} or a resonator \cite{KoshelevReview} by cancelling the coupling of the light to an available radiation channel by exploiting mechanisms such as symmetry protection or destructive interference. Another class of photonic BICs, known as surface BICs (SBICs), exist where the light is localised at an interface between two unlike materials. SBICs have been reported at the interfaces of finite 1D arrays of waveguides \cite{Molina2012, Weimann2013, Corrielli2013, Gallo2014} and photonic crystals \cite{Hsu2013a, Hu2017, Chai2020, Tasolamprou2020}. However, all SBICs reported so far involve discrete lattices or photonic crystals, whose characteristic geometric dimensions restrict the existence of SBICs to specific wavelengths. In this paper we report the existence of SBICs at the interface between two semi-infinite, fully homogeneous media. Specifically, we address the interface between two anisotropic uniaxial materials with opposite signs of birefringence. Interfaces involving birefringent materials are known to support hybrid, full-vector Dyakonov surface waves (DSWs) when certain conditions are met \cite{Dyakonov1988, Averkiev1990, Takayama2008, Osamu2009}. To date, all lossless DSWs are known to occur in structures made of positive birefringent materials, while only generalized states arising in non-Hermitian or truncated structures have been found to exist elsewhere \cite{Mackay2019a,Repan2020,Chermoshentsev2021}. However, here we discovered that material interfaces between media with opposite sign of anisotropy and, importantly, where the anisotropy-symmetry is broken \cite{Averkiev1990,Mukherjee2018}, may also support lossless DSWs. In addition, in such structures radiation channels that couple the states otherwise fully localized at the interface with the continuum arise, thus creating leaky surface states. Nevertheless, we also discovered that, under suitable conditions, the radiation channel of such leaky surface states can be suppressed completely, transforming them into anisotropy-induced BICs \cite{Gomis-Bresco2017}, which, therefore, are lossless SBICs. To the best of our knowledge, this is the first known example of surface bound states in the continuum supported by the interface between two homogeneous media. \section{Theoretical Formulation} \begin{figure}[t!] \centering \includegraphics[width=0.9\linewidth]{Fig_1_v4.png} \caption{(a) Geometry comprising two semi-infinite uniaxial materials with their interface at $x=0$. A schematic of the optic axes layout is shown. (b) Schematic of the refractive indices of the system. The dashed gray line shows the interface. The solid black lines show the ordinary indices which are constant while the dotted black lines indicate the extraordinary indices which vary with optic axis orientation in the range shown by the colored arrows.} \label{fig:1} \end{figure} We address the planar interface located at $x=0$ where the negative and positive $x$-half spaces are occupied by lossless, uniaxial, dielectric materials with negative (material 1) and positive (material 2) birefringence, respectively. We study bound solutions of the full Maxwell equations for this structure in different configurations. Light propagation is along the $y$ direction, so $k_y$ is the propagation constant and $k_0$ the free space wavenumber. The optic axes of materials 1 and 2 lie in the interface plane and make angles $\phi_1$ and $\phi_2$ with the direction of light propagation. The layout is shown in Fig.~\ref{fig:1}(a). The structure is then anisotropy-symmetric when $\phi_1=\phi_2$ while introducing an offset $\Delta=\phi_1-\phi_2$ results in azimuthal, or weakly, anisotropy-symmetry breaking \cite{Mukherjee2018}. The permittivity tensor in material $i$ when $\phi_i=0$ is $\hat{\epsilon} = diag(\epsilon^o_i,\epsilon^e_i,\epsilon^o_i)$, where $\epsilon^o_i$ and $\epsilon^e_i$ are its principal values. The ordinary refractive index is constant and is given by $n^o_i=\sqrt{\epsilon^o_i}$, whereas the extraordinary refractive index varies as a function of the optic axis orientation $n^e_i(\phi)= \sqrt{{\epsilon^e_i}}{(\sin^2\phi_i + \frac{\epsilon^e_i}{\epsilon^o_i}\cos^2\phi_i)^{-1/2}}$. For a given value of the mode effective index $N=k_y/k_0$, four basis waves propagating in a uniaxial material (two ordinary and two extraordinary) can be obtained from an eigenvalue equation \cite{Hodgkinson_Book, Mukherjee2018}. One of each kind propagates in the $+x$ direction while the other propagates in the $-x$ direction. The transverse component of the ordinary, $\kappa^o=k_x^o/k_0$, and extraordinary, $\kappa^e=k_x^e/k_0$ normalized wavevectors, are obtained as the eigenvalues \begin{equation} \begin{split} \kappa^o & = \pm\sqrt{\epsilon^o-N^2}, \\ \kappa^e(\phi) & = \pm\sqrt{\epsilon^e - N^2\left( \sin^2\phi + \frac{\epsilon^e}{\epsilon^o}\cos^2\phi \right)}, \end{split} \label{eigenval} \end{equation} with the corresponding eigenvectors \begin{equation} \vec{F}^o=\begin{bmatrix} \kappa^o\sin{\phi} \\ \epsilon^o\sin{\phi} \\ -\kappa^o\cos{\phi} \\ (\kappa^o)^2\cos{\phi} \end{bmatrix},\ \ \ \vec{F}_e=\begin{bmatrix} (\kappa^o)^2\cos{\phi} \\ \epsilon^o\kappa^e\cos{\phi} \\ \epsilon^o\sin{\phi} \\ -\epsilon^o\kappa^e\sin{\phi} \end{bmatrix}, \end{equation} where the four rows of $\vec{F}_o$ and $\vec{F}_e$ correspond to the tangential electric and magnetic field components $E_y, z_oH_z, E_z$ and $z_0H_y$, where $z_0$ is the vacuum impedance. One ordinary and one extraordinary out of the four waves, have to be selected in each media. For a standard DSW, the effective index is real with $N>n^o,n^e(\phi)$, and the basis waves decaying exponentially perpendicular to the interface are selected. For the leaky DSW, the effective index is complex $N$, with $\Re(N)$ lesser than one of the refractive indices of the system. The basis wave corresponding to that index is defined as the radiation channel via which the mode couples to the continuum where $\Im(N)$ approximates the wave radiation loss. Due to flux considerations, the radiation channel basis wave must grow exponentially away from the interface \cite{Hu2009}. In this letter, leaky DSWs feature $\Re(N)<n^o_1$, thus the ordinary wave in the negative uniaxial media is the radiation channel. Boundary conditions for the tangential field components at the interface between material $1$ and $2$ yield the homogeneous set of linear equations \begin{equation} a_1^{o}\vec{F}_1^{o} + a_1^{e}\vec{F}_1^{e} = a_2^{o}\vec{F}_2^{o} + a_2^{e}\vec{F}_2^{e}, \label{eq:3} \end{equation} where $a_{i}^{o/e}$ is the amplitude of the corresponding basis wave. Writing eq. (\ref{eq:3}) in a matrix form, $\hat{R}\vec{a}=0$, with $\hat{R}= \begin{bmatrix} \vec{F}_1^{o} & \vec{F}_1^{e} & -\vec{F}_2^{o} & - \vec{F}_2^{e} \end{bmatrix}$ and $\vec{a}=\begin{bmatrix} a^o_1 & a^e_1 & a^o_2 & a^e_2\end{bmatrix}^T$, being a $4\times4$ matrix and a $4\times1$ column vector, respectively, the requirement for non-trivial solution, $|\hat{R}|=0$, yields the dispersion equation \begin{equation} \begin{split} 2 \epsilon_{2}^{o} \epsilon_{1}^{o} \kappa^{o}_{1} \kappa^{o}_{1} \left(\kappa^{e}_{1} - \kappa^{o}_{2}\right) \left(\kappa^{e}_{1} - \kappa^{o}_{1}\right) \sin{\phi_{2} } \sin{\phi_{1} } \cos{\phi_{2} } \cos{\phi_{1}} \\ + \kappa^{o}_{2} \kappa^{o}_{1} \left( \kappa^{o}_{1}- \kappa^{o}_{2}\right) \left( \epsilon_{1}^{o} \kappa^{e}_{1} \left(\kappa^{o}_{2}\right)^{2}- \epsilon_{2}^{o} \kappa^{e}_{2} \left(\kappa^{o}_{1}\right)^{2}\right) \cos^{2}{\phi_{2} } \cos^{2}{\phi_{1}}\\ + \epsilon_{2}^{o} \kappa^{o}_{1} \left(\kappa^{e}_{2} - \kappa^{o}_{1}\right) \left(\epsilon_{2}^{o} \left(\kappa^{o}_{1}\right)^{2} - \epsilon_{1}^{o} \kappa^{e}_{1} \kappa^{o}_{2}\right) \sin^{2}{\phi_{2} } \cos^{2}{\phi_{1} } \\ + \epsilon_{1}^{o} \kappa^{o}_{2} \left(\kappa^{e}_{1} - \kappa^{o}_{2}\right) \left( \epsilon_{1}^{o} \left(\kappa^{o}_{2}\right)^{2}- \epsilon_{2}^{o} \kappa^{e}_{2} \kappa^{o}_{1}\right) \sin^{2}{\phi_{1} } \cos^{2}{\phi_{2} } \\ + \epsilon_{2}^{o} \epsilon_{1}^{o} \left(\kappa^{e}_{2} - \kappa^{e}_{1}\right) \left(\epsilon_{2}^{o} \kappa^{o}_{1} - \epsilon_{1}^{o} \kappa^{o}_{2}\right) \sin^{2}{\phi_{2} } \sin^{2}{\phi_{1}}=0. \end{split} \label{eq:4} \end{equation} The transcendental Eq. (\ref{eq:4}) is solved numerically to obtain the effective index $N$ for the range of values $\phi_1$ and $\phi_2$ over which the solution exists, resulting in the narrow range of propagation directions typical in DSWs. Purely real solutions of eq. (\ref{eq:4}) correspond to standard guided DSWs whereas complex solutions of eq. (\ref{eq:4}) correspond to leaky DSWs. SBICs are embedded on the leaky DSWs and exist when $\Im (N)=0$. A necessary but insufficient condition for the existence of surface waves in this geometry is an overlap between the extraordinary indices of the two materials, i.e., in terms of the permittivities: \begin{equation} [\epsilon_1^o>\epsilon_2^o]\ \land \ [\epsilon_1^e<\epsilon_2^e]. \end{equation} \section{Results and Discussion} Without loss of generality, we consider a structure with a negative uniaxial material with $n^{o}_1=\sqrt{\epsilon^o_1}=1.80$ and $n_1^e(\phi_1=90^{\circ})=\sqrt{\epsilon^e_1}=1.40$, and a positive uniaxial material with $n^{o}_2=\sqrt{\epsilon^o_2}=1.25$ and $n_2^e(\phi_2=90^{\circ})=\sqrt{\epsilon^e_2}=2$. A schematic of the refractive indices is shown in Fig. \ref{fig:1}(b). \subsection{Leaky DSWs} Figure \ref{fig:2_leaky}(a) shows the propagation constant of the DSW when the optic axes in the two materials are aligned ($\Delta=0^{\circ}$), corresponding to a structure that maintains anisotropy-symmetry. A surface wave exists in the vicinity of the point where $n_1^e(\phi_1)= n_2^e(\phi_2)$ and cuts off at the points where $\Re(N)=n_1^e(\phi_1)$ and $\Re(N)=n_2^e(\phi_2)$. $\Re(N)$ is greater than $n_1^e(\phi_1)$, $n_2^e(\phi_2)$ and $n_2^o$ and the corresponding three basis waves decay exponentially away from the interface. However, $\Re(N)<n_1^o$, and therefore, the ordinary basis wave in material 1 acts as the radiation channel via which the leaky mode couples to the continuum. Therefore, with $\Delta=0^{\circ}$, and for small values of azimuthal anisotropy-symmetry breaking, the surface wave is a leaky DSW for all values of $\phi_2$ where the solution exists. However, there are no SBICs embedded on the leaky DSW in this configuration. \begin{figure}[t!] \centering \includegraphics[width=0.9\linewidth]{Fig_2_leaky_no_inset-eps-converted-to.pdf} \caption{ (a) Mode propagation constant $\Re(N)$ of DSW (red) as a function of $\phi_2$ when $\Delta=0^{\circ}$ and only leaky DSWs exist. The ordinary (dotted lines) and extraordinary (dashed lines) refractive indices of material 1 and 2 are plotted in gray and brown, respectively. (b) $1/e$ propagation length $L$ (log scale) for the leaky DSW with $\lambda=0.632\ \mu m$. (c) Transverse profile of the field $|E_z|$ at $\phi_2=45^{\circ}$ (blue dot in (a)). The dashed gray line at $x/\lambda=0$ indicates the interface.} \label{fig:2_leaky} \end{figure} Figure \ref{fig:2_leaky}(b) shows the logarithm of $L$, defined as the $1/e$ propagation length for the leaky DSW for wavelength $\lambda=0.632\ \mu m$. While $L$ is larger at larger values of $\phi_2$, its value for the leaky DSW is generally small ($\sim 10\ \mu m$). Figure \ref{fig:2_leaky}(c) shows the field amplitude $E_z$ along the transverse axis $x$ for the leaky DSW at $\phi_2=45^{\circ}$. Though there is radiation away from the DSW, the field is localized at the interface. Since $N$ is complex for leaky DSWs, the $x$-component of the radiation channel's normalized wavevector, $\kappa^o_1$, is also complex, with $\Im(\kappa^o_1)$ and $\Re(\kappa^o_1)$ resulting, respectively, in the exponential growth and the oscillations in the transverse field profile leaking from the DSW, as seen in Fig. \ref{fig:2_leaky}(c). \subsection{Standard guided DSWs} \begin{figure}[t!] \centering \includegraphics[width=0.9\linewidth]{Fig_3_guided_no_inset-eps-converted-to.pdf} \caption{(a) Same as Fig. \ref{fig:2_leaky}(a) but when $\Delta=-70^{\circ}$ and only guided DSWs exist. (b) Magnification of the area in the black box in (a). (c) Transverse profile of the field $|E_z|$ at $\phi_2=67.3^{\circ}$ (blue dot in (b)).} \label{fig:3_guided} \end{figure} Figure \ref{fig:3_guided}(a) shows the surface wave supported by a structure for an amount of azimuthal anisotropy-asymmetry given by $\Delta=-70^{\circ}$. The surface wave solution in this structure cuts off at $N=n_1^o$ on one side and at $N=n_2^e(\phi_2)$ on the other side. Throughout all the range of existence, $N$ is purely real and is greater than all four refractive indices of the structure. Therefore, this structure supports standard, guided DSWs that are made up of four basis waves which decay exponentially away from the interface, as Fig.~\ref{fig:3_guided}(c) shows at $\phi_2=67.3^{\circ}$. As is typical in DSWs, when compared with propagation directions near the DSW cutoff $N=n_1^o$, the field of the DSW remains primarily in material 1, while traversing away from this point towards the cutoff $N=n_2^e(\phi_2)$ results in the majority of the field moving to material 2 \cite{Takayama2008}. The structure exhibits the standard challenge regarding excitation of DSWs, i.e., a narrow range of allowed propagation angles $\phi_2$ (red line in Fig.~\ref{fig:3_guided}(a)). However, this range is much broader when leaky DSWs are considered (red line in Fig.~\ref{fig:2_leaky}(a)). There have been a few reports of the existence of surface waves at interfaces involving negative uniaxial materials, however these proposals contain added constraints such as dissipative media \cite{Mackay2019a}, birefringent metals \cite{Repan2020}, or a finite interface \cite{Chermoshentsev2021}. This is the first report of the existence of a guided DSW at an infinite planar interface between a positive uniaxial material and negative uniaxial material. \subsection{SBIC embedded on leaky branches of DSWs} For a range of values of $\Delta$ between the two previous cases with varying amounts of azimuthal anisotropy-asymmetry, the structure supports both purely guided and leaky DSWs, as shown in Fig. \ref{fig:4_mixed}(a) for $\Delta=-56^{\circ}$. The leaky DSW exists at values of $\phi_2$ where $\Re(N) \leq n_1^o$, with the ordinary wave in material 1 serving as the radiation channel. The transition to purely guided DSWs occurs for higher values of $\phi_2$, where $N$ is greater than all the refractive indices in the system and therefore it is purely real. \begin{figure}[t!] \centering \includegraphics[width=0.9\linewidth]{Fig_4_mixed_no_inset-eps-converted-to.pdf} \caption{(a) Same as Fig. \ref{fig:2_leaky}(a) but for $\Delta=-56^{\circ}$. (b) $1/e$ propagation length $L$ (log scale), of the leaky DSW in (a) for $\lambda=0.632 \ \mu m$. $L$ diverges at the DSW BIC (red dot). (c) Magnification of the area in the black box in (a). The coloured markers in (b) and (c) show the values of $\phi_2$ where we plot the normalized transverse profile $|E_z|$ for a (d) leaky DSW at $\phi_2=64.1^{\circ}$, (e) the BIC at $\phi_2=65.82^{\circ}$, and (f) a leaky DSW at $\phi_2=66.75^{\circ}$.} \label{fig:4_mixed} \end{figure} We study the conditions for cancellation of the radiation channel for the leaky DSW using an auxiliary condition by setting the radiation channel amplitude in eq. (\ref{eq:3}) to zero, $a^o_1=0$, \cite{Gomis-Bresco2017, Mukherjee2021}. The auxiliary condition yields four auxiliary equations, one of which is \begin{equation} \begin{split} \epsilon^o_2 \epsilon^o_1 \kappa^o_2 \left(- \kappa^e_2 + \kappa^e_1\right) \sin^{2}{\left(\phi_{c} \right)} \sin{\left(\phi_{s} \right)} +\\ \epsilon^o_2 \kappa^o_2 \left(\kappa^o_1\right)^{2} \left(- \kappa^e_2 + \kappa^o_2\right) \sin{\left(\phi_{c} \right)} \cos{\left(\phi_{c} \right)} \cos{\left(\phi_{s} \right)}\\ + \epsilon^o_1 \left(\kappa^o_2\right)^{3} \left(\kappa^e_1 - \kappa^o_2\right) \sin{\left(\phi_{s} \right)} \cos^{2}{\left(\phi_{c} \right)}=0. \end{split} \label{auxeq} \end{equation} The SBIC exists only when the solutions of the dispersion equation and all four auxiliary equations coincide, resulting in $\phi_2^{BIC}=65.82^{\circ}$. We calculate $L$, the $1/e$ propagation length from $\Im(N)$ over the range of the leaky DSW (Fig. \ref{fig:4_mixed}(b)), showing that $L$ diverges at the angle found before, $\phi_2^{BIC}$, resulting in a SBIC where the leakage is canceled. Fig. \ref{fig:4_mixed}(e) shows the field profile $|E_z|$ for the SBIC, showing that despite being embedded in the leaky part of the DSW with $\Re(N)<n_1^o$, the field decays exponentially away from the interface. This contrasts with the field profile for two leaky DSWs on either side of the SBIC, shown in Fig. \ref{fig:4_mixed}(d) and (f), at $\phi_2=64.1^{\circ}$ and $\phi_2=66.75^{\circ}$, respectively. Both figures show the characteristic radiation into the substrate via the radiation channel. \subsection{Cut-offs in $\Delta$} The amount of azimuthal anisotropy-asymmetry given by $\Delta$ has a dramatic impact on the properties of the DSW and the existence of SBICs. We explore this effect in Fig. \ref{fig:5}(a), where the solid black lines show the upper and lower bounds of $\Re(N)$ as a function of $\Delta$. \subsubsection{Cutoffs for standard guided DSW} We see that the guided DSW solution only exists for a finite range of values of $\Delta$, those where $\Re(N)>n_1^o=1.8$ (between the two blue dashed lines). As we show in Figs. \ref{fig:3_guided}(a) and \ref{fig:4_mixed}(a), the guided DSW cuts off at the points where $N=n_1^o$ ( $\implies\kappa^o_1=0$) and $N=n_2^e(\phi_2)$ ($\implies\kappa^e_2=0$). Making use of $n_1^o=n_2^e(\phi_2)$, we obtain the cutoff angle $\phi_{2c}$ as \begin{equation} \sin{\phi_{2c}}=\pm\sqrt{\frac{\epsilon_2^e (\epsilon_2^o - \epsilon_1^o)} {\epsilon_1^o (\epsilon_2^o - \epsilon_2^e)}}, \label{eq:5} \end{equation} and then using $\kappa^o_1=0$ and $\kappa^e_2=0$ in the dispersion equation (eq. (\ref{eq:4})), together with equation (\ref{eq:5}), we find the cutoff angle \begin{equation} \sin{\phi_{1c}}=\pm\frac{(\epsilon_1^o - \epsilon_2^e)}{\epsilon_1^o} \sqrt{\frac{(\epsilon_2^o - \epsilon_1^o)} {(\epsilon_1^e - \epsilon_1^o)}}. \label{eq:6} \end{equation} Thus, the cutoff in terms of azimuthal anisotropy-asymmetry can be calculated as $\Delta_{c}=\phi_{1c}-\phi_{2c}$. Since $N$ is a function of $\phi_2$, the sign selected in eq. (\ref{eq:6}), determines whether the leading or trailing edge of $N$ passes through the point $n_1^o=n_2^e(\phi_2)$. The positive (negative) sign gives the value of $\Delta_{cm}$ ($\Delta_{cM}$) where pure guided DSWs start (cease) to occur (dashed blue lines in Fig. \ref{fig:5}(a)). \begin{figure*}[t!] \centering \includegraphics[width=0.8\linewidth]{Fig_5_v3-eps-converted-to.pdf} \caption{(a) Range of $\Re(N)$ as a function of $\Delta$ for the structure studied in Figs. \ref{fig:2_leaky}, \ref{fig:3_guided}, and \ref{fig:4_mixed}. The dashed black line shows the value of $n^o_1=1.8$ below which only leaky DSWs can exist. The dashed blue lines show the point where guided DSWs start ($\Delta_{cm}$) and then cease ($\Delta_{cM}$) to exist. The dashed red line shows the value of $\Delta_{cL}$ where the leaky DSW first appears. (b) Range of $\phi_2$ as a function of $\Delta$. The color indicates the $1/e$ propagation length, $L$ for leaky DSWs for $\lambda=0.632\ \mu m$. The insets shows the line of BICs. (c-d) Same as (a-b) but for $n^o_1=2, n^e_1=1.2$.} \label{fig:5} \end{figure*} \subsubsection{Cutoff for leaky DSW} It is useful to determine another cutoff in terms azimuthal anisotropy-asymmetry, $\Delta_{cL}$, where leaky DSWs start existing (dashed red line in Fig. \ref{fig:5}(a)) since SBICs are embedded in the leaky DSW. Leaky DSWs occur when $\Re(N)< n_1^o$. They start to exist at $N=n_1^o=n_1^e(\phi_1)$ which implies $\kappa^o_1=\kappa^e_1=0$. This condition can only be fulfilled when $\phi_1=0^{\circ}\implies\phi_2= -\Delta$. Applying these conditions to eq. (\ref{eq:4}), we find that $\Delta_{cL}$ obeys the equation \begin{equation} \tan^2{\Delta_{cL}} +\frac{(\epsilon_2^o - \epsilon_1^o)^{3/2}}{\epsilon_2^o \sqrt{\epsilon_2^e - \epsilon_1^o\left( \sin^2{\Delta_{cL}} + \frac{\epsilon_2^e}{\epsilon_2^o}\cos^2{\Delta_{cL}} \right)}}=0, \label{eq:7} \end{equation} which can be readily solved numerically. Equations (\ref{eq:5}-\ref{eq:7}) determine the existence conditions for DSWs in terms of the azimuthal anisotropy-asymmetry $\Delta$. Guided DSWs only exist at negative values of $\Delta$, with $\Delta>\Delta_{cm}$. As $\Delta$ increases, leaky DSWs start to appear at $\Delta>\Delta_{cL}$, co-existing with guided DSWs, and when $\Delta>\Delta_{cM}$, only leaky DSWs exist. In all cases DSWs propagate in a range of values of $\phi_2^{DSW}$, as shown in Fig. \ref{fig:5}(b), where the color shows the $1/e$ propagation distance $L$. The leaky DSW becomes more radiative (low values of $L$) as $\Delta$ is increased. Note that, while $\phi_2^{DSW}$ is narrow for guided DSWs, reaching the larger value $\phi_2^{DSW} \sim 4 ^{\circ}$ for $\Delta=\Delta_{cL}$, it increases for leaky DSWs to $\phi_2^{DSW} \sim 22 ^{\circ}$ near $\Delta=0$. Note that while, by and large, the usually narrow range of allowed propagation angles for standard DSWs to exist is an outstanding challenge for their experimental generation \cite{Osamu2009}, the larger range of propagation directions of leaky DSWs facilitates their excitation. \subsection{Variation of the constitutive parameters} Equation \ref{eq:7} provides the starting point beyond which SBICs, embedded in leaky DSWs, can exist in terms of the azimuthal anisotropy-asymmetry, $\Delta$. Indeed, the structure supports a line of SBICs for $\Delta>\Delta_{cL}$, shown by the blue line in the inset in Fig. \ref{fig:5}(b). As $n^o_1$ increases, guided DSWs disappear entirely when $n^o_1=n^e_2(90 ^{\circ})=2$, resulting in $\phi_{2c}=-\Delta_{cL}=90^{\circ}$, as the index corresponding to the radiation channel becomes the highest refractive index in the system. In this process, the SBICs move towards the cutoff of the DSW and also disappear. It is however possible to recover the line of SBICs by tuning the other constitutive parameters of the system \cite{Mukherjee2019}. This is shown in Figs. \ref{fig:5}(c) and (d), where in addition to $n^o_1=n^e_2(90 ^{\circ})=2$, we set $n_1^e=1.2$. Since $\Re(N)<n^o_1$ for all the range of existence of DSWs and the radiation channel is always accessible, the structure only supports leaky DSWs so that the line of SBICs, shown in the inset in Fig. \ref{fig:5}(d), are the only bound surface modes supported by the system. The leaky DSW mode becomes more radiative at higher values of $\Delta$ as shown in Fig.~\ref{fig:5}(b) and (d). \subsection{Materials} To show the feasibility of experimentally observing the SBICs described above, we first note that DSW modes have been experimentally observed, for example, at the interface of nematic liquid crystals \cite{Li2020}. Thus, we consider the interface between the liquid crystal E7 in the nematic phase and a calcite crystal, arranged so that $\Delta=-50^{\circ}$. We consider two different wavelengths $\lambda_0$: 488 $nm$ and 632 $nm$. At $\lambda_0=488\ nm$, the refractive indices of the materials are $n_{E7}^o=1.5345, n_{E7}^e=1.7754, n_{calcite}^o=1.6674, n_{calcite}^e=1.4904$ \cite{Li2005, Ghosh1999}, and the structure supports both guided and leaky DSWs in the range of optic axis orientation $50.65^{\circ}<\phi_2^{DSW}<51.48^{\circ}$. Within the leaky DSW range, there exists a SBIC at $\phi_2^{BIC}=50.72^{\circ}$. Due to material dispersion, the refractive indices of the materials are slightly different at $\lambda_0=632\ nm$ with $n_{E7}^o=1.5189, n_{E7}^e=1.7304, n_{calcite}^o=1.6557, n_{calcite}^e=1.4849$. As a result, such structure supports leaky DSWs in the range $55.39^{\circ}<\phi_2^{DSW}<56.05^{\circ}$ with an embedded SBIC at $\phi_2^{BIC}=55.95^{\circ}$. Therefore, material dispersion leads to the two situations discussed in Fig.~\ref{fig:5}, with the SBIC occurring at different values of $\phi_2$ for each wavelength. Therefore, on the one hand, one concludes that material dispersion affects the type and location in the parameter space of the surface states supported by the structure, but SBICs do exist. On the other hand, intrinsic material absorption is not relevant in this context, because the considered materials are highly transparent and anyway BICs are exclusively related to the suppression of radiative losses. As comparison, the absorption coefficient for E7 at $\lambda_0=632\ nm$ is $0.03\ cm^{-1}$ \cite{Wu1987}, resulting in a propagation length $L_{E7} \sim 30\ cm$, which is orders of magnitude larger than the propagation length of the leaky DSW due to radiation losses, which typically is in the range $L_{leaky} \sim 10-100\ \mu m$. \section{Conclusions} In summary, we have uncovered the existence of SBICs realized as Dyakonov states in uniaxial anisotropic media, in structures where Dyakonov modes were considered to be impossible. To the best of our knowledge, they are the first example of SBICs supported by the interface between two homogeneous media. The existence loci of the new states is set by the amount of anisotropy-asymmetry and the constitutive parameters of the materials. Here we addressed only azimuthal anisotropy-symmetry breaking and uniaxial media, but the Dyakonov mechanism occurs in more general geometries and types of anisotropy, where we anticipate that richer families of states may exist. Our results open the possibility to create SBICs and Dyakonov-like states in a whole new class of materials and metamaterials, including different types of anisotropic materials, such as hyperbolic materials. Finally, it has to be properly appreciated that the SBICs we found here are anisotropy-induced \cite{Gomis-Bresco2017}. Namely, they are full vector, hybrid surface states situated above the light line and exist without the presence of a trapping potential. Therefore, they do not arise from the interference of resonances, as, e.g., Friedrich–Wintgen BICs do. Rather, the SBICs occur when the ordinarily-polarized wave that constitutes the radiation channel is not needed to fulfill the boundary conditions. This mechanism makes the anisotropic SBICs fundamentally different from all surface BICs known to date \cite{Molina2012, Weimann2013, Corrielli2013, Gallo2014, Hsu2013a, Hu2017}, in particular those where a defect located at the interface acts as a trapping potential. \vspace{.5cm} This work was partially supported by the H2020 Marie Skłodowska-Curie Action GA665884; Grants CEX2019-000910-S and PGC2018-097035-B-I00 funded by MCIN/AEI/10.13039/501100011033/FEDER, Fundació Cellex, Fundació Mir-Puig, and Generalitat de Catalunya (CERCA).
\section{INTRODUCTION} Graph learning is becoming increasingly crucial in multimedia applications like facial expression recognition \cite{face_1}, video action recognition \cite{video_1}, and the recommendation system \cite{recommendation_1} for its good hidden correlation exploiting capability. Among all the directions in graph learning, a fundamental and challenging task, i.e., deep graph clustering, has recently attracted intensive attention \cite{DAEGC,ARGA,SDCN,DFCN,AGCN,AGE,MVGRL,MCGC,DCRN,SCAGC,MGCCN}. According to the learning mechanism, the existing deep graph clustering methods can be roughly categorized into three classes: generative methods \cite{GAE,MGAE,DAEGC,AGC,GALA,MAGCN,AGCN,SDCN,DFCN}, adversarial methods \cite{ARGA,AGAE}, and contrastive methods \cite{MVGRL,AGE,DCRN,MCGC,MGCCN,SCAGC,GDCL}. In early literature, the generative methods and adversarial methods improve clustering performance by learning cluster-oriented node representations and designing fake sample generation-recognition mechanisms, respectively. However, since most of these methods adopt a clustering guided loss function \cite{DEC} to force the generated sample embeddings to have the minimum distortion against the pre-learned clustering centers \cite{DAEGC,MAGCN,AGCN,ARGA,AGAE,SDCN,DFCN}, their clustering performance is highly dependent on good initial cluster centers, thus leading to manual trial-and-error pre-training. As a consequence, the performance consistency, as well as the implementing convenience, is largely decreased. More recently, thanks to the development of contrastive learning, more consistent and discriminative contrastive loss functions are designed to replace the clustering guided loss function for network training. As a result, the manual trial-and-error problem is alleviated, and the clustering performance is improved \cite{MVGRL,AGE,DCRN,MCGC,MGCCN,SCAGC,GDCL}. However, complicated data augmentations and time-consuming graph convolutional operation undermine the efficiency of these methods, making them computational time and space consuming (See Section \ref{costs_sec}). To solve these problems, we propose a Simple Contrastive Graph Clustering (SCGC) method to improve the existing methods from the aspect of network architecture, data augmentation, and objective function. To our network architecture, the backbone is designed with a siamese network whose sub-branch merely consists of the MLP. The neighborhood information aggregation process is conducted independently before network training. In this manner, we filter the high-frequency noise in attributes, thus improving both the clustering performance and training efficiency. (See Section \ref{low_pass_SCM_sec} and Section \ref{costs_sec}). For data augmentation, instead of constructing two different views of the same node with complex modification against graphs, we implement it by designing parameter un-shared siamese encoders and corrupting the node embeddings with Gaussian noise directly. Moreover, we design a neighbor-oriented contrastive objective function to force the cross-view similarity matrix to approximate the self-looped adjacency matrix. By this setting, the network is endowed with the ability to keep the cross-view structural consistency, thus further improving the clustering performance (See Section \ref{low_pass_SCM_sec}). Benefiting from our simple architecture, SCGC is free from pre-training and outperforms the recent contrastive competitors with at least seven times speedup on average. Meanwhile, we save about 59\% GPU memory against other contrastive methods on average (See Section \ref{costs_sec}). The main contributions of this paper are summarized as follows. \begin{table*}[] \small \scalebox{1.23}{ \begin{tabular}{cccc} \hline Method & Data Augmentation & Network Architecture & Objective Function Form \\ \hline AGE \cite{AGE} & No Data Augmentation & Graph Filters+MLP & Cross-Entropy Loss \\ MVGRL \cite{MVGRL} & Graph Diffusion & Un-shared GCNs+ shared MLP & InfoMax Loss \\ MCGC \cite{MCGC} & No Data Augmentation & Graph Filters & InfoNCE Loss \\ DCRN \cite{DCRN} & Attribute Corruption+Graph Diffusion & Auto-Encoder+GCN & MSE Loss to Identity Matrix \\ SCAGC \cite{SCAGC} & Attribute Corruption+Edge Perturbation & Shared GCN & InfoNCE Loss \\ MGCCN \cite{MGCCN} & No Data Augmentation & Shared GCN & InfoNCE Loss \\ SCGC (Ours) & Un-shared MLPs+Embedding Corruption & Graph Filters+Un-shared MLPs & MSE Loss to Adjacent Matrix \\ \hline \end{tabular}} \caption{Differences between our proposed SCGC and other contrastive deep graph clustering methods from perspectives of data augmentation, network architecture, and objective function.} \label{different} \vspace{-2.0em} \end{table*} \begin{itemize} \item We propose a simple yet effective contrastive deep graph clustering method termed SCGC. Benefit from its simplicity, SCGC is free from pre-training and saves both time and space for network training. \item A new data augmentation method, which conducts data perturbation only in the enhanced attribute space, is proposed. This fashion is verified to be compatible with the existing contrastive methods. \item We design a novel neighbor-oriented contrastive loss to keep the structural consistency even across views, thus improving the discriminative capability of our network. \item Extensive experimental results on seven benchmark datasets demonstrate the superiority and efficiency of the proposed method against the existing state-of-the-art deep graph clustering competitors. \end{itemize} \section{RELATED WORK} \subsection{Deep Graph Clustering} Deep graph clustering is a fundamental yet challenging task that aims to reveal the underlying graph structure and divides the nodes into several disjoint groups. According to the learning mechanism, the existing deep graph clustering methods can be roughly categorized into three classes: generative methods \cite{GAE,MGAE,DAEGC,AGC,GALA,MAGCN,AGCN,SDCN,DFCN}, adversarial methods \cite{ARGA,AGAE}, and contrastive methods \cite{MVGRL,AGE,DCRN,MCGC,MGCCN,SCAGC,GDCL}. Our proposed method belongs to the last category. We will review the generative methods and adversarial methods in this section and detail the difference between our proposed method and other contrastive methods in the next section. The pioneer graph clustering algorithm MGAE \cite{MGAE} embeds nodes into the latent space with GAE \cite{GAE} and then performs clustering over the learned node embeddings. Subsequently, DAEGC \cite{DAEGC} and MAGCN \cite{MAGCN} improve the clustering performance of early works with the attention mechanisms \cite{attention,GAT}. Besides, GALA \cite{GALA} and AGC \cite{AGC} enhance the GAE by the symmetric decoder and the high-order graph convolution operation, respectively. In addition, ARGA \cite{ARGA} and AGAE \cite{AGAE} improve the discriminative capability of samples through adversarial mechanisms \cite{GAN,graph_GAN}. Moreover, SDCN \cite{SDCN}, AGCN \cite{AGCN}, and DFCN \cite{DFCN} verify the effectiveness of the attribute-structure fusion mechanisms to improve the clustering performance. Although verified to be effective, since most of these methods adopt a clustering guided loss function \cite{DEC} to force the learned node embeddings to have the minimum distortion against the pre-learned clustering centers, their clustering performance is highly dependent on good initial cluster centers, thus leading to manual trial-and-error pre-training \cite{DAEGC,MAGCN,AGCN,ARGA,AGAE,SDCN,DFCN}. As a consequence, the performance consistency, as well as the implementing convenience, is largely decreased. Unlike them, our proposed method replaces the clustering guided loss function by designing a novel neighbor-oriented contrastive loss function, thus getting rid of trial-and-error pre-training. \vspace{-1.0em} \subsection{Contrastive Deep Graph Clustering} Contrastive learning has achieved great success on images \cite{DIM,SIMCLR,BYOL,BARLOW,GCC,xihong} and graphs \cite{DGI,GraphCL,GRACE,simgrace,GRAPH_BYOL,GBT,graph_mlp} in recent years. Inspired by their success, contrastive deep graph clustering methods \cite{AGE,MVGRL,MCGC,SCAGC,DCRN,IDCRN,GDCL,MGCCN} are increasingly proposed. Three key factors, i.e., data augmentation, network architecture, and objective function, significantly determine the clustering performance of the contrastive methods. According to these factors, we summarize the differences between our proposed SCGC and other contrastive deep graph clustering methods in Table \ref{different}. \noindent{\textbf{Data augmentation.}} The existing data augmentations in contrastive methods aim to build different views of the same vertex by introducing complex operations over graphs. Specifically, MVGRL \cite{MVGRL} and DCRN \cite{DCRN} adopt the graph diffusion matrix as an augmented graph. Besides, SCAGC \cite{SCAGC} perturbs the graph topology by randomly adding or dropping edges. In addition, DCRN and SCAGC conduct augmentations on node attributes by the attribute corruption. Although verified to be effective, these data augmentations are complicated and still entangle the aggregation and transformation during training, thus limiting the efficiency of the contrastive methods. Different from them \cite{MVGRL,SCAGC,DCRN}, our SCGC constructs two augmented views of the same vertex by simply designing parameter un-shared siamese encoders and corrupting embeddings directly instead of introducing any complex operations over graphs. \noindent{\textbf{Network architecture.}} To the network architecture, SCAGC \cite{SCAGC} and MGCCN \cite{MGCCN} both encode nodes with the shared GCN encoders \cite{GCN}. Differently, MVGRL \cite{MVGRL} adopt two-parameter un-shared GCN encoders and the shared MLP as the backbone. In addition, DCRN \cite{DCRN} utilizes auto-encoder \cite{AE_K_MEANS} and GCN encoder to embed augmented views into the latent space. However, previous GCN encoders all entangle the transformation and aggregations operation during training, thus leading to high time costs. To solve this issue, AGE \cite{AGE} decouple these two operations in GCN by a graph Laplacian filter \cite{lapalician-filter} and one MLP. Different from AGE \cite{AGE}, we encode the smoothed node attributes with two separated MLPs, which have the same architecture but un-shared parameters. \noindent{\textbf{Objective function.}} Thirdly, for the objective function, MVGRL \cite{MVGRL} designs the InfoMax loss \cite{DIM} to maximize the cross-view mutual information between the node and the global summary of the graph. Meanwhile, AGE \cite{AGE} designs a pretext task to classify the similar nodes and the dissimilar nodes by the cross-entropy loss. Subsequently, SCAGC \cite{SCAGC}, MCGC \cite{MCGC}, and MGCCN \cite{MGCCN} all adopt the infoNCE loss \cite{infoNCE} to pull together the positive sample pairs while pushing away the negative sample pairs. Concretely, based on similarity, MCGC defines the positive samples as the k-nearest neighbors of the node while regarding other nodes as negative samples. SCAGC designs the contrastive clustering loss to maximize the agreement between representations of the same cluster. MGCCN pulls close the embeddings of the same node in different GCN layers and pushes away the embeddings of different nodes. In addition, DCRN designs the MSE loss to reduce the redundancy in the feature level and sample level. Different from them, we design a novel neighbor-oriented contrastive loss to keep the structural consistency even across views, thus improving the discriminative capability of our network. \begin{figure*} \centering \includegraphics[scale=0.7]{overall_0412.pdf} \caption{Illustration of the Simple Contrastive Graph Clustering (SCGC) algorithm. In our proposed algorithm, we firstly pre-process the node attributes by the low-pass denoising operation. Then, the structural contrastive module encodes the smoothed node attributes with merely two MLPs, and constructs augmented views of node embeddings by designing parameter un-shared siamese encoders and corrupting the node embeddings. Moreover, a novel neighbor-oriented contrastive loss is designed to keep the cross-view structural consistency, thus improving the discriminative capability of the network.} \label{OVERRALL_FIGURE} \end{figure*} \begin{table}[h] \centering \small \scalebox{1.2}{ \begin{tabular}{ll} \toprule \textbf{Notation} & \textbf{Meaning} \\ \midrule $\textbf{X}\in \mathds{R}^{N\times D}$ & Attribute matrix \\ $\textbf{X}_s\in \mathds{R}^{N\times D}$ & Smoothed attribute matrix \\ $\textbf{A}\in \mathds{R}^{N\times N}$ & Original adjacency matrix \\ $\widehat{\textbf{A}}\in \mathds{R}^{N\times N}$ & Adjacency matrix with self-loop \\ $\textbf{I} \in \mathds{R}^{N\times N}$ & Identity matrix \\ $\textbf{D}\in \mathds{R}^{N\times N}$ & Degree matrix \\ $\textbf{L}\in \mathds{R}^{N\times N}$ & Graph Laplacian matrix \\ $\widetilde{\textbf{L}}\in \mathds{R}^{N\times N}$ & Symmetric normalized Laplacian matrix \\ $\textbf{Z}^{v_k} \in \mathds{R}^{N\times d}$ & Node embeddings in $k$-th view \\ $\textbf{S} \in \mathds{R}^{N\times N}$ & Cross-view sample correlation matrix \\ $\textbf{Z} \in \mathds{R}^{N\times d}$ & Clustering-oriented node embeddings \\ \bottomrule \end{tabular} } \caption{Notation summary.} \label{NOTATION_TABLE} \vspace{-2.0em} \end{table} \section{METHODOLOGY} \subsection{Notations and Problem Definition} Let $\mathcal{V}=\{v_1, v_2, \dots, v_N\}$ be a set of $N$ nodes with $C$ classes and $\mathcal{E}$ be a set of edges. In the matrix form, $\textbf{X} \in \mathds{R}^{N\times D}$ and $\textbf{A} \in \mathds{R}^{N\times N}$ denote the attribute matrix and the original adjacency matrix, respectively. Then $\mathcal{G}=\left \{\textbf{X}, \textbf{A} \right \}$ denotes an undirected graph. The degree matrix is formulated as $\textbf{D}=diag(d_1, d_2, \dots ,d_N)\in \mathds{R}^{N\times N}$ and $d_i=\sum_{(v_i,v_j)\in \mathcal{E}}a_{ij}$. The graph Laplacian matrix is defined as $\textbf{L}=\textbf{D}-\textbf{A}$. With the renormalization trick $\widehat{\textbf{A}}=\textbf{A}+\textbf{I}$ in GCN \cite{GCN}, the symmetric normalized graph Laplacian matrix is denoted as $\widetilde{\textbf{L}} = \widehat{\textbf{D}}^{-\frac{1}{2}}\widehat{\textbf{L}}\widehat{\textbf{D}}^{-\frac{1}{2}}$. The notations are summarized in Table \ref{NOTATION_TABLE}. In this paper, we aim to group the nodes into several disjoint groups in an unsupervised manner. Concretely, we embed the nodes into the latent space without labels and then directly perform K-means\cite{KMEANS} over the clustering-oriented node embeddings $\textbf{Z}$. \subsection{Overall Framework} We propose a Simple Contrastive Graph Clustering (SCGC) algorithm. The framework of SCGC is shown in Fig. \ref{OVERRALL_FIGURE}. It mainly consists of two components: low-pass denoising operation and Structural Contrastive Module (SCM). In the following sections, we will detail low-pass denoising operation, SCM, and the objective function. \subsection{Low-pass Denoising Operation} Recent works \cite{AGE,SGC,Deeper_insights} have demonstrated that the Laplacian filter \cite{lapalician-filter} can achieve the same effect as the graph convolution operation \cite{GCN}. Motivated by their success, we introduce a low-pass denoising operation to conduct neighbor information aggregation as an independent pre-processing before training. In this manner, the high-frequency noise in attributes will be filtered out efficiently. Concretely, we adopt a graph Laplacian filter as formulated: \begin{equation} \textbf{H} = \textbf{I}-k \widetilde{\textbf{L}}, \label{FILTER} \end{equation} where $\widetilde{\textbf{L}}$ denotes the symmetric normalized graph Laplacian matrix and $k$ is a real value. For the choice of $k$, we follow AGE \cite{AGE} and set $k=2/3$ in all experiments. Subsequently, we stack up $t$-layers graph Laplacian filters as follows: \begin{equation} \textbf{X}_{s} = \textbf{H}^t\textbf{X}, \label{SMOOTH} \end{equation} where $\textbf{X}_s$ denotes the smoothed attribute matrix. Through this low-pass denoising operation, high-frequency noise in attributes are filtered out, thus improving the clustering performance and training efficiency (See Section \ref{low_pass_SCM_sec} and Section \ref{costs_sec}). \subsection{Structural Contrastive Module} In this section, we design the Structure Contrastive Module (SCM) to keep the structural consistency even across two different views, thus enhancing the discriminative capability of the network. To be specific, we firstly encode the smoothed attributes $\textbf{X}_s$ with the designed parameter un-shared MLP encoders and then normalize the learned node embeddings with ${\ell ^2}$-norm as follows: \begin{equation} \begin{aligned} \textbf{Z}^{v_1} &= \text{MLP}_1(\textbf{X}_s), \textbf{Z}^{v_1} = \frac{\textbf{Z}^{v_1}}{||\textbf{Z}^{v_1}||_2}, \\ \textbf{Z}^{v_2} &= \text{MLP}_2(\textbf{X}_s), \textbf{Z}^{v_2} = \frac{\textbf{Z}^{v_2}}{||\textbf{Z}^{v_2}||_2}, \end{aligned} \label{ENCODER} \end{equation} where $\textbf{Z}^{v_1}$ and $\textbf{Z}^{v_2}$ denote two augmented views of the learned node embeddings. It is worth to mentioning that $\text{MLP}_1$ and $\text{MLP}_2$ have the same architecture but un-shared parameters, thus $\textbf{Z}^{v_1}$ and $\textbf{Z}^{v_2}$ would contain different semantic information during training. In addition, we further keep the difference between the two views by simply adding the random Gaussian noise to $\textbf{Z}^{v_2}$ as formulated: \begin{equation} \textbf{Z}^{v_2} = \textbf{Z}^{v_2}+\textbf{N}, \label{NOISE} \end{equation} where $\textbf{N} \in \mathds{R}^{N \times d}$ is sampled from the Gaussian distribution $\mathcal{N}(0, \sigma)$. In summary, we construct two augmented views $\textbf{Z}^{v_1}$ and $\textbf{Z}^{v_2}$ by designing parameter un-shared encoders and corrupting the node embeddings directly instead of introducing complex operations against graphs, thus improving the training efficiency (See section \ref{costs_sec}). Besides, recent works \cite{MoCL,graph_aug1,AFGRL} have indicated that the complex data augmentations over graphs, like edge adding, edge dropping, and graph diffusion could lead to semantic drift. The similar conclusion is verified through experiments in Section \ref{data_aug_sec}. Subsequently, we design a novel neighbor-oriented contrastive loss to keep cross-view structural consistency. Concretely, we calculate the cross-view sample similarity matrix $\textbf{S} \in \mathds{R}^{N \times N}$ between $\textbf{Z}^{v_1}$ and $\textbf{Z}^{v_2}$ as formulated: \begin{equation} \textbf{S}_{ij}= \textbf{Z}^{v_1}_i \cdot (\textbf{Z}^{v_2}_j)^{\text{T}}, \,\, \forall\,\,i, j \in [1, N], \label{CROSS_VIEW_MATRIX} \end{equation} where $\textbf{S}_{ij}$ denotes the cosine similarity between $i$-th node embedding in the first view and $j$-th node embedding in the second view. Then we force the cross-view sample similarity matrix $\textbf{S}$ to be equal to the the self-looped adjacency matrix $\widehat{\textbf{A}} \in \mathds{R}^{N\times N}$ as formulated: \begin{equation} \begin{aligned} \mathcal{L} &= \frac{1}{N^2}\sum (\textbf{S}-\widehat{\textbf{A}})^2 \\ &= \frac{1}{N^2}(\sum_i\sum_j\mathbbm{1}_{ij}^{1}(\textbf{S}_{ij}-1)^2+\sum_i\sum_j\mathbbm{1}_{ij}^{0}\textbf{S}_{ij}^2), \end{aligned} \label{SAMPLE_LOSS} \end{equation} where $\mathbbm{1}_{ij}^{1}$ denotes if $\widehat{\textbf{A}}_{ij}=1$ and $\mathbbm{1}_{ij}^{0}$ denotes if $\widehat{\textbf{A}}_{ij}=0$. Here, we consider the cross-view neighbors of the same node as the positive samples while regarding other non-neighbor nodes as negative samples. Then we pull together the positive samples while pushing away the negative samples. More precisely, in Eq. \eqref{SAMPLE_LOSS}, the first term forces the nodes to agree with their neighbors even across two different views while the second term minimizes the agreement between the node and its non-neighbors. This neighbor-oriented contrastive objective function enhances the discriminative capability of our network by keeping the cross-view structural consistency, thus improving the clustering performance (See Section \ref{low_pass_SCM_sec}). \subsection{Fusion and Clustering} In this section, we firstly fuse the two augmented views of the node embeddings in a linear manner as formulated: \begin{equation} \textbf{Z} = \frac{1}{2}(\textbf{Z}^{v_1}+\textbf{Z}^{v_2}), \label{FUSION} \end{equation} where $\textbf{Z} \in \mathds{R}^{N \times d}$ denotes the resultant clustering-oriented node embeddings. Then we directly perform K-means algorithm \cite{K-means} over $\textbf{Z}$ and obtain the clustering results. \begin{table*}[!t] \scalebox{0.65}{ \begin{tabular}{c|c|cccccccccccccc} \hline {\color[HTML]{000000} } & {\color[HTML]{000000} } & {\color[HTML]{000000} \textbf{K-Means}} & {\color[HTML]{000000} \textbf{AE}} & {\color[HTML]{000000} \textbf{DEC}} & {\color[HTML]{000000} \textbf{IDEC}} & {\color[HTML]{000000} \textbf{GAE}} & {\color[HTML]{000000} \textbf{DAEGC}} & {\color[HTML]{000000} \textbf{ARGA}} & {\color[HTML]{000000} \textbf{SDCN}} & {\color[HTML]{000000} \textbf{DFCN}} & \textbf{AGE} & {\color[HTML]{000000} \textbf{MVGRL}} & {\color[HTML]{000000} \textbf{SCAGC}} & {\color[HTML]{000000} \textbf{MCGC}} & \textbf{SCGC} \\ \cline{3-16} \multirow{-2}{*}{{\color[HTML]{000000} \textbf{Dataset}}} & \multirow{-2}{*}{{\color[HTML]{000000} \textbf{Metric}}} & \cite{K-means} & \cite{AE_K_MEANS} & \cite{DEC} & \cite{IDEC} & \cite{GAE} & \cite{DAEGC} & \cite{ARGA} & \cite{SDCN} & \cite{DFCN} & \cite{AGE} & \cite{MVGRL} & \cite{SCAGC} & \cite{MCGC} & Ours \\ \hline {\color[HTML]{000000} } & {\color[HTML]{000000} ACC} & {\color[HTML]{000000} 33.80±2.71} & {\color[HTML]{000000} 49.38±0.91} & {\color[HTML]{000000} 46.50±0.26} & {\color[HTML]{000000} 51.61±1.02} & {\color[HTML]{000000} 43.38±2.11} & {\color[HTML]{000000} 70.43±0.36} & {\color[HTML]{000000} 71.04±0.25} & {\color[HTML]{000000} 35.60±2.83} & {\color[HTML]{000000} 36.33±0.49} & {\color[HTML]{0000FF} 73.50±1.83} & {\color[HTML]{000000} 70.47±3.70} & {\color[HTML]{000000} 60.89±1.21} & {\color[HTML]{000000} 42.85±1.13} & {\color[HTML]{FE0000} 73.88±0.88} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} NMI} & {\color[HTML]{000000} 14.98±3.43} & {\color[HTML]{000000} 25.65±0.65} & {\color[HTML]{000000} 23.54±0.34} & {\color[HTML]{000000} 26.31±1.22} & {\color[HTML]{000000} 28.78±2.97} & {\color[HTML]{000000} 52.89±0.69} & {\color[HTML]{000000} 51.06±0.52} & {\color[HTML]{000000} 14.28±1.91} & {\color[HTML]{000000} 19.36±0.87} & {\color[HTML]{FF0000} 57.58±1.42} & {\color[HTML]{000000} 55.57±1.54} & {\color[HTML]{000000} 39.72±0.72} & {\color[HTML]{000000} 24.11±1.00} & {\color[HTML]{0000FF} 56.10±0.72} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} ARI} & {\color[HTML]{000000} 08.60±1.95} & {\color[HTML]{000000} 21.63±0.58} & {\color[HTML]{000000} 15.13±0.42} & {\color[HTML]{000000} 22.07±1.53} & {\color[HTML]{000000} 16.43±1.65} & {\color[HTML]{000000} 49.63±0.43} & {\color[HTML]{000000} 47.71±0.33} & {\color[HTML]{000000} 07.78±3.24} & {\color[HTML]{000000} 04.67±2.10} & {\color[HTML]{0000FF} 50.60±2.14} & {\color[HTML]{000000} 48.70±3.94} & {\color[HTML]{000000} 30.95±1.42} & {\color[HTML]{000000} 14.33±1.26} & {\color[HTML]{FE0000} 51.79±1.59} \\ \multirow{-4}{*}{{\color[HTML]{000000} \textbf{CORA}}} & {\color[HTML]{000000} F1} & {\color[HTML]{000000} 30.26±4.46} & {\color[HTML]{000000} 43.71±1.05} & {\color[HTML]{000000} 39.23±0.17} & {\color[HTML]{000000} 47.17±1.12} & {\color[HTML]{000000} 33.48±3.05} & {\color[HTML]{000000} 68.27±0.57} & {\color[HTML]{000000} 69.27±0.39} & {\color[HTML]{000000} 24.37±1.04} & {\color[HTML]{000000} 26.16±0.50} & {\color[HTML]{0000FF} 69.68±1.59} & {\color[HTML]{000000} 67.15±1.86} & {\color[HTML]{000000} 59.13±1.85} & {\color[HTML]{000000} 35.16±0.91} & {\color[HTML]{FE0000} 70.81±1.96} \\ \hline {\color[HTML]{000000} } & {\color[HTML]{000000} ACC} & {\color[HTML]{000000} 39.32±3.17} & {\color[HTML]{000000} 57.08±0.13} & {\color[HTML]{000000} 55.89±0.20} & {\color[HTML]{000000} 60.49±1.42} & {\color[HTML]{000000} 61.35±0.80} & {\color[HTML]{000000} 64.54±1.39} & {\color[HTML]{000000} 61.07±0.49} & {\color[HTML]{000000} 65.96±0.31} & {\color[HTML]{000000} 69.50±0.20} & {\color[HTML]{0000FF} 69.73±0.24} & {\color[HTML]{000000} 62.83±1.59} & {\color[HTML]{000000} 61.16±0.72} & {\color[HTML]{000000} 64.76±0.07} & {\color[HTML]{FE0000} 71.02±0.77} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} NMI} & {\color[HTML]{000000} 16.94±3.22} & {\color[HTML]{000000} 27.64±0.08} & {\color[HTML]{000000} 28.34±0.30} & {\color[HTML]{000000} 27.17±2.40} & {\color[HTML]{000000} 34.63±0.65} & {\color[HTML]{000000} 36.41±0.86} & {\color[HTML]{000000} 34.40±0.71} & {\color[HTML]{000000} 38.71±0.32} & {\color[HTML]{000000} 43.90±0.20} & {\color[HTML]{0000FF} 44.93±0.53} & {\color[HTML]{000000} 40.69±0.93} & {\color[HTML]{000000} 32.83±1.19} & {\color[HTML]{000000} 39.11±0.06} & {\color[HTML]{FE0000} 45.25±0.45} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} ARI} & {\color[HTML]{000000} 13.43±3.02} & {\color[HTML]{000000} 29.31±0.14} & {\color[HTML]{000000} 28.12±0.36} & {\color[HTML]{000000} 25.70±2.65} & {\color[HTML]{000000} 33.55±1.18} & {\color[HTML]{000000} 37.78±1.24} & {\color[HTML]{000000} 34.32±0.70} & {\color[HTML]{000000} 40.17±0.43} & {\color[HTML]{0000FF} 45.50±0.30} & {\color[HTML]{000000} 45.31±0.41} & {\color[HTML]{000000} 34.18±1.73} & {\color[HTML]{000000} 31.17±0.23} & {\color[HTML]{000000} 37.54±0.12} & {\color[HTML]{FE0000} 46.29±1.13} \\ \multirow{-4}{*}{{\color[HTML]{000000} \textbf{CITESEER}}} & {\color[HTML]{000000} F1} & {\color[HTML]{000000} 36.08±3.53} & {\color[HTML]{000000} 53.80±0.11} & {\color[HTML]{000000} 52.62±0.17} & {\color[HTML]{000000} 61.62±1.39} & {\color[HTML]{000000} 57.36±0.82} & {\color[HTML]{000000} 62.20±1.32} & {\color[HTML]{000000} 58.23±0.31} & {\color[HTML]{000000} 63.62±0.24} & {\color[HTML]{000000} 64.30±0.20} & {\color[HTML]{0000FF} 64.45±0.27} & {\color[HTML]{000000} 59.54±2.17} & {\color[HTML]{000000} 56.82±0.43} & {\color[HTML]{000000} 59.64±0.05} & {\color[HTML]{FE0000} 64.80±1.01} \\ \hline {\color[HTML]{000000} } & {\color[HTML]{000000} ACC} & {\color[HTML]{000000} 27.22±0.76} & {\color[HTML]{000000} 48.25±0.08} & {\color[HTML]{000000} 47.22±0.08} & {\color[HTML]{000000} 47.62±0.08} & {\color[HTML]{000000} 71.57±2.48} & {\color[HTML]{000000} 75.96±0.23} & {\color[HTML]{000000} 69.28±2.30} & {\color[HTML]{000000} 53.44±0.81} & {\color[HTML]{0000FF} 76.82±0.23} & {\color[HTML]{000000} 75.98±0.68} & {\color[HTML]{000000} 41.07±3.12} & {\color[HTML]{000000} 75.25±0.10} & {\color[HTML]{000000} } & {\color[HTML]{FE0000} 77.48±0.37} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} NMI} & {\color[HTML]{000000} 13.23±1.33} & {\color[HTML]{000000} 38.76±0.30} & {\color[HTML]{000000} 37.35±0.05} & {\color[HTML]{000000} 37.83±0.08} & {\color[HTML]{000000} 62.13±2.79} & {\color[HTML]{000000} 65.25±0.45} & {\color[HTML]{000000} 58.36±2.76} & {\color[HTML]{000000} 44.85±0.83} & {\color[HTML]{000000} 66.23±1.21} & {\color[HTML]{000000} 65.38±0.61} & {\color[HTML]{000000} 30.28±3.94} & {\color[HTML]{0000FF} 67.18±0.13} & {\color[HTML]{000000} } & {\color[HTML]{FE0000} 67.67±0.88} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} ARI} & {\color[HTML]{000000} 05.50±0.44} & {\color[HTML]{000000} 20.80±0.47} & {\color[HTML]{000000} 18.59±0.04} & {\color[HTML]{000000} 19.24±0.07} & {\color[HTML]{000000} 48.82±4.57} & {\color[HTML]{000000} 58.12±0.24} & {\color[HTML]{000000} 44.18±4.41} & {\color[HTML]{000000} 31.21±1.23} & {\color[HTML]{0000FF} 58.28±0.74} & {\color[HTML]{000000} 55.89±1.34} & {\color[HTML]{000000} 18.77±2.34} & {\color[HTML]{000000} 56.86±0.23} & {\color[HTML]{000000} } & {\color[HTML]{FE0000} 58.48±0.72} \\ \multirow{-4}{*}{{\color[HTML]{000000} \textbf{AMAP}}} & {\color[HTML]{000000} F1} & {\color[HTML]{000000} 23.96±0.51} & {\color[HTML]{000000} 47.87±0.20} & {\color[HTML]{000000} 46.71±0.12} & {\color[HTML]{000000} 47.20±0.11} & {\color[HTML]{000000} 68.08±1.76} & {\color[HTML]{000000} 69.87±0.54} & {\color[HTML]{000000} 64.30±1.95} & {\color[HTML]{000000} 50.66±1.49} & {\color[HTML]{000000} 71.25±0.31} & {\color[HTML]{000000} 71.74±0.93} & {\color[HTML]{000000} 32.88±5.50} & {\color[HTML]{FF0000} 72.77±0.16} & \multirow{-4}{*}{{\color[HTML]{000000} OOM}} & {\color[HTML]{0000FF} 72.22±0.97} \\ \hline {\color[HTML]{000000} } & {\color[HTML]{000000} ACC} & {\color[HTML]{000000} 40.23±1.19} & {\color[HTML]{000000} 47.79±3.95} & {\color[HTML]{000000} 42.09±2.21} & {\color[HTML]{000000} 39.62±0.87} & {\color[HTML]{000000} 53.59±2.04} & {\color[HTML]{000000} 52.67±0.00} & {\color[HTML]{0000FF} 67.86±0.80} & {\color[HTML]{000000} 53.05±4.63} & {\color[HTML]{000000} 55.73±0.06} & {\color[HTML]{000000} 56.68±0.76} & {\color[HTML]{000000} 37.56±0.32} & {\color[HTML]{000000} 57.25±1.65} & {\color[HTML]{000000} 38.93±0.23} & {\color[HTML]{FE0000} 77.97±0.99} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} NMI} & {\color[HTML]{000000} 26.92±2.39} & {\color[HTML]{000000} 18.03±7.73} & {\color[HTML]{000000} 14.10±1.99} & {\color[HTML]{000000} 12.80±1.74} & {\color[HTML]{000000} 30.59±2.06} & {\color[HTML]{000000} 21.43±0.35} & {\color[HTML]{0000FF} 49.09±0.54} & {\color[HTML]{000000} 25.74±5.71} & {\color[HTML]{000000} 48.77±0.51} & {\color[HTML]{000000} 36.04±1.54} & {\color[HTML]{000000} 29.33±0.70} & {\color[HTML]{000000} 22.18±0.31} & {\color[HTML]{000000} 23.11±0.56} & {\color[HTML]{FE0000} 52.91±0.68} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} ARI} & {\color[HTML]{000000} 09.52±1.42} & {\color[HTML]{000000} 13.75±6.05} & {\color[HTML]{000000} 07.99±1.21} & {\color[HTML]{000000} 07.85±1.31} & {\color[HTML]{000000} 24.15±1.70} & {\color[HTML]{000000} 18.18±0.29} & {\color[HTML]{0000FF} 42.02±1.21} & {\color[HTML]{000000} 21.04±4.97} & {\color[HTML]{000000} 37.76±0.23} & {\color[HTML]{000000} 26.59±1.83} & {\color[HTML]{000000} 13.45±0.03} & {\color[HTML]{000000} 27.29±1.53} & {\color[HTML]{000000} 08.41±0.32} & {\color[HTML]{FE0000} 50.64±1.85} \\ \multirow{-4}{*}{{\color[HTML]{000000} \textbf{BAT}}} & {\color[HTML]{000000} F1} & {\color[HTML]{000000} 34.45±2.10} & {\color[HTML]{000000} 46.80±3.44} & {\color[HTML]{000000} 42.63±2.35} & {\color[HTML]{000000} 40.11±0.99} & {\color[HTML]{000000} 50.83±3.23} & {\color[HTML]{000000} 52.23±0.03} & {\color[HTML]{0000FF} 67.02±1.15} & {\color[HTML]{000000} 46.45±5.90} & {\color[HTML]{000000} 50.90±0.12} & {\color[HTML]{000000} 55.07±0.80} & {\color[HTML]{000000} 29.64±0.49} & {\color[HTML]{000000} 52.53±0.54} & {\color[HTML]{000000} 32.92±0.25} & {\color[HTML]{FE0000} 78.03±0.96} \\ \hline {\color[HTML]{000000} } & {\color[HTML]{000000} ACC} & {\color[HTML]{000000} 32.23±0.56} & {\color[HTML]{000000} 38.85±2.32} & {\color[HTML]{000000} 36.47±1.60} & {\color[HTML]{000000} 35.56±1.34} & {\color[HTML]{000000} 44.61±2.10} & {\color[HTML]{000000} 36.89±0.15} & {\color[HTML]{0000FF} 52.13±0.00} & {\color[HTML]{000000} 39.07±1.51} & {\color[HTML]{000000} 49.37±0.19} & {\color[HTML]{000000} 47.26±0.32} & {\color[HTML]{000000} 32.88±0.71} & {\color[HTML]{000000} 44.61±1.57} & {\color[HTML]{000000} 32.58±0.29} & {\color[HTML]{FF0000} 57.94±0.42} \\ {\color[HTML]{000000} } & NMI & 11.02±1.21 & 06.92±2.80 & 04.96±1.74 & 04.63±0.97 & 15.60±2.30 & 05.57±0.06 & 22.48±1.21 & 08.83±2.54 & {\color[HTML]{0000FF} 32.90±0.41} & 23.74±0.90 & {\color[HTML]{000000} 11.72±1.08} & {\color[HTML]{000000} 07.32±1.97} & {\color[HTML]{000000} 07.04±0.56} & {\color[HTML]{FF0000} 33.91±0.49} \\ {\color[HTML]{000000} } & ARI & 02.20±0.40 & 05.11±2.65 & 03.60±1.87 & 03.19±0.76 & 13.40±1.26 & 05.03±0.08 & 17.29±0.50 & 06.31±1.95 & {\color[HTML]{0000FF} 23.25±0.18} & 16.57±0.46 & {\color[HTML]{000000} 04.68±1.30} & {\color[HTML]{000000} 11.33±1.47} & {\color[HTML]{000000} 01.33±0.14} & {\color[HTML]{FF0000} 27.51±0.59} \\ \multirow{-4}{*}{{\color[HTML]{000000} \textbf{EAT}}} & F1 & 23.49±0.92 & 38.75±2.25 & 34.84±1.28 & 35.52±1.50 & 43.08±3.26 & 34.72±0.16 & {\color[HTML]{0000FF} 52.75±0.07} & {\color[HTML]{000000} 33.42±3.10} & {\color[HTML]{000000} 42.95±0.04} & {\color[HTML]{000000} 45.54±0.40} & {\color[HTML]{000000} 25.35±0.75} & {\color[HTML]{000000} 44.14±0.24} & {\color[HTML]{000000} 27.03±0.16} & {\color[HTML]{FF0000} 57.96±0.46} \\ \hline & ACC & 42.47±0.15 & 46.82±1.14 & 45.61±1.84 & 46.90±0.17 & 48.97±1.52 & 52.29±0.49 & {\color[HTML]{000000} 49.31±0.15} & {\color[HTML]{000000} 52.25±1.91} & {\color[HTML]{000000} 33.61±0.09} & {\color[HTML]{0000FF} 52.37±0.42} & {\color[HTML]{000000} 44.16±1.38} & {\color[HTML]{000000} 50.75±0.64} & {\color[HTML]{000000} 41.93±0.56} & {\color[HTML]{FF0000} 56.58±1.62} \\ & {\color[HTML]{000000} NMI} & {\color[HTML]{000000} 22.39±0.69} & {\color[HTML]{000000} 17.18±1.60} & {\color[HTML]{000000} 16.63±2.39} & {\color[HTML]{000000} 17.84±0.35} & {\color[HTML]{000000} 20.69±0.98} & {\color[HTML]{000000} 21.33±0.44} & {\color[HTML]{0000FF} 25.44±0.31} & {\color[HTML]{000000} 21.61±1.26} & {\color[HTML]{000000} 26.49±0.41} & {\color[HTML]{000000} 23.64±0.66} & {\color[HTML]{000000} 21.53±0.94} & {\color[HTML]{000000} 23.60±1.78} & {\color[HTML]{000000} 16.64±0.41} & {\color[HTML]{FF0000} 28.07±0.71} \\ & {\color[HTML]{000000} ARI} & {\color[HTML]{000000} 15.71±0.76} & {\color[HTML]{000000} 13.59±2.02} & {\color[HTML]{000000} 13.14±1.97} & {\color[HTML]{000000} 16.34±0.40} & {\color[HTML]{000000} 18.33±1.79} & {\color[HTML]{000000} 20.50±0.51} & {\color[HTML]{000000} 16.57±0.31} & {\color[HTML]{000000} 21.63±1.49} & {\color[HTML]{000000} 11.87±0.23} & {\color[HTML]{000000} 20.39±0.70} & {\color[HTML]{000000} 17.12±1.46} & {\color[HTML]{0000FF} 23.33±0.32} & {\color[HTML]{000000} 12.21±0.13} & {\color[HTML]{FE0000} 24.80±1.85} \\ \multirow{-4}{*}{\textbf{UAT}} & {\color[HTML]{000000} F1} & {\color[HTML]{000000} 36.12±0.22} & {\color[HTML]{000000} 45.66±1.49} & {\color[HTML]{000000} 44.22±1.51} & {\color[HTML]{000000} 46.51±0.17} & {\color[HTML]{000000} 47.95±1.52} & {\color[HTML]{0000FF} 50.33±0.64} & {\color[HTML]{000000} 50.26±0.16} & {\color[HTML]{000000} 45.59±3.54} & {\color[HTML]{000000} 25.79±0.29} & {\color[HTML]{000000} 50.15±0.73} & {\color[HTML]{000000} 39.44±2.19} & {\color[HTML]{000000} 47.07±0.73} & {\color[HTML]{000000} 35.78±0.38} & {\color[HTML]{FE0000} 55.52±0.87} \\ \hline {\color[HTML]{000000} } & {\color[HTML]{000000} ACC} & {\color[HTML]{000000} 26.27±1.10} & {\color[HTML]{000000} 33.12±0.19} & {\color[HTML]{000000} 31.92±0.45} & {\color[HTML]{000000} 32.19±0.31} & {\color[HTML]{000000} 29.60±0.81} & {\color[HTML]{000000} 34.35±1.00} & {\color[HTML]{000000} 22.07±0.43} & {\color[HTML]{000000} 26.67±0.40} & {\color[HTML]{000000} 37.51±0.81} & {\color[HTML]{0000FF} 39.62±0.13} & {\color[HTML]{000000} 31.52±2.95} & {\color[HTML]{000000} } & {\color[HTML]{000000} 29.08±0.58} & {\color[HTML]{FE0000} 41.89±0.47} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} NMI} & {\color[HTML]{000000} 34.68±0.84} & {\color[HTML]{000000} 41.53±0.25} & {\color[HTML]{000000} 41.67±0.24} & {\color[HTML]{000000} 41.64±0.28} & {\color[HTML]{000000} 45.82±0.75} & {\color[HTML]{000000} 49.16±0.73} & {\color[HTML]{000000} 41.28±0.25} & {\color[HTML]{000000} 37.38±0.39} & {\color[HTML]{000000} 51.30±0.41} & {\color[HTML]{0000FF} 52.38±0.17} & {\color[HTML]{000000} 48.99±3.95} & {\color[HTML]{000000} } & {\color[HTML]{000000} 36.86±0.56} & {\color[HTML]{FE0000} 53.00±0.29} \\ {\color[HTML]{000000} } & {\color[HTML]{000000} ARI} & {\color[HTML]{000000} 09.35±0.57} & {\color[HTML]{000000} 18.13±0.27} & {\color[HTML]{000000} 16.98±0.29} & {\color[HTML]{000000} 17.17±0.22} & {\color[HTML]{000000} 17.84±0.86} & {\color[HTML]{000000} 22.60±0.47} & {\color[HTML]{000000} 12.38±0.24} & {\color[HTML]{000000} 13.63±0.27} & {\color[HTML]{000000} 24.46±0.48} & {\color[HTML]{FF0000} 24.46±0.23} & {\color[HTML]{000000} 19.11±2.63} & {\color[HTML]{000000} } & {\color[HTML]{000000} 13.15±0.48} & {\color[HTML]{0000FF} 24.23±0.86} \\ \multirow{-4}{*}{{\color[HTML]{000000} \textbf{CORAFULL}}} & {\color[HTML]{000000} F1} & {\color[HTML]{000000} 22.57±1.09} & {\color[HTML]{000000} 28.40±0.30} & {\color[HTML]{000000} 27.71±0.58} & {\color[HTML]{000000} 27.72±0.41} & {\color[HTML]{000000} 25.95±0.75} & {\color[HTML]{000000} 26.96±1.33} & {\color[HTML]{000000} 18.85±0.41} & {\color[HTML]{000000} 22.14±0.43} & {\color[HTML]{0000FF} 31.22±0.87} & {\color[HTML]{000000} 27.95±0.19} & {\color[HTML]{000000} 26.51±2.87} & \multirow{-4}{*}{{\color[HTML]{000000} OOM}} & {\color[HTML]{000000} 22.90±0.52} & {\color[HTML]{FE0000} 32.98±0.73} \\ \hline \end{tabular}} \caption{Performance comparison on seven datasets. All results are reported with mean±std under ten runs. The red and blue values indicate the best and the runner-up results, respectively. OOM indicates Out-Of-Memory during training.} \label{COMPARE_TABLE} \vspace{-1.0em} \end{table*} \begin{algorithm}[h] \small \caption{Simple Contrastive Graph Clustering (SCGC)} \label{ALGORITHM} \flushleft{\textbf{Input}: The input graph $\mathcal{G}=\{\textbf{X},\textbf{A}\}$; The cluster number $C$; The iteration number $I$; The graph Laplacian filter layer number $t$; The Gaussian noise's standard deviation $\sigma$.} \\ \flushleft{\textbf{Output}: The clustering result \textbf{R}.} \begin{algorithmic}[1] \STATE Obtain the smoothed attributes $\textbf{X}_s$ by applying $t$-layers stacked graph Laplacian filters to the attributes $\textbf{X}$ in Eq. \eqref{FILTER}-\eqref{SMOOTH}. \FOR{$i=1$ to $I$} \STATE Encode $\textbf{X}_s$ into two augmented views with parameter un-shared siamese MLP encoders and then normalize them in Eq. \eqref{ENCODER}. \STATE Corrupt node embeddings by adding the Gaussian noise in Eq. \eqref{NOISE}. \STATE Calculate cross-view sample similarity matrix $\textbf{S}$ by Eq. \eqref{CROSS_VIEW_MATRIX}. \STATE Force $\textbf{S}$ to approach the self-looped adjacency $\widehat{\textbf{A}}$ and calculate the neighbor-oriented contrastive loss ${\mathcal{L}}$ in Eq. \eqref{SAMPLE_LOSS}. \STATE Fuse $\textbf{Z}^{v_1}$ and $\textbf{Z}^{v_2}$ to obtain $\textbf{Z}$ in Eq. \eqref{FUSION}. \STATE Update model by minimizing $\mathcal{L}$ with Adam optimizer. \ENDFOR \STATE{Obtain \textbf{R} by performing K-means over $\textbf{Z}$.} \STATE \textbf{return} \textbf{R} \end{algorithmic} \end{algorithm} \subsection{Objective Function} The optimization objective of the proposed method is the neighbor-oriented contrastive loss $\mathcal{L}$ in Eq. \eqref{SAMPLE_LOSS}. We minimize $\mathcal{L}$ with the widely-used Adam optimizer \cite{ADAM} during training. The detailed learning process of our proposed SCGC is shown in Algorithm \ref{ALGORITHM}. \section{EXPERIMENT} \subsection{Dataset} To evaluate the effectiveness and efficiency of our proposed SCGC, we conduct extensive experiments on seven benchmark datasets, including CORA \cite{AGE}, CITESEER \cite{AGE}, Brazil Air-Traffic (BAT) \cite{RETHINK}, Europe Air-Traffic (EAT) \cite{RETHINK}, USA Air-Traffic (UAT) \cite{RETHINK}, Amazon Photo (AMAP) \cite{DCRN}, and CORAFULL \cite{DCRN}. The brief information of these datasets is summarized in Table \ref{DATASET_INFO}. \begin{table}[h] \centering \small \scalebox{1.05}{ \begin{tabular}{@{}cccccc@{}} \toprule \textbf{Dataset} & \textbf{Type} & \textbf{Sample} & \textbf{Dimension} & \textbf{Edge} & \textbf{Class} \\ \midrule \textbf{CORA} & Graph & 2708 & 1433 & 5429 & 7 \\ \textbf{CITESEER} & Graph & 3327 & 3703 & 4732 & 6 \\ \textbf{AMAP} & Graph & 7650 & 745 & 119081 & 8 \\ \textbf{BAT} & Graph & 131 & 81 & 1038 & 4 \\ \textbf{EAT} & Graph & 399 & 203 & 5994 & 4 \\ \textbf{UAT} & Graph & 1190 & 239 & 13599 & 4 \\ \textbf{CORAFULL} & Graph & 19793 & 8710 & 63421 & 70 \\ \bottomrule \end{tabular}} \caption{Statistics summary of seven datasets.} \label{DATASET_INFO} \vspace{-2.0em} \end{table} \subsection{Experiment Setup} All experimental results are obtained from the desktop computer with the Intel Core i7-6800K CPU, one NVIDIA GeForce RTX 3090 GPU, 64GB RAM, and the PyTorch deep learning platform. \subsubsection{\textbf{Training Procedure}} Our network is trained for 400 epochs until convergence by minimizing the contrastive loss in Eq. \eqref{SAMPLE_LOSS} with Adam optimizer \cite{ADAM}. After optimization, we directly perform K-means algorithm \cite{K-means} on the clustering-oriented node embeddings $\textbf{Z}$. To avoid the influence of randomness, we conduct ten runs for all compared methods and report the average values with standard deviations of four metrics. \subsubsection{\textbf{Parameter Settings}} To MCGC \cite{MCGC}, we run their source code on merely the graph datasets in Table \ref{DATASET_INFO} for fairness. For other baselines, we reproduce results by adopting their source code with the original settings. In our proposed method, two MLPs both consist of a single 500-dimensional embedding layer. The learning rate of the optimizer is set to 1e-3 for CORA / BAT / EAT / UAT, 1e-4 for CORAFULL, 5e-5 for CITESEER, and 1e-5 for AMAP, respectively. The layer number $t$ of graph Laplacian filters is set to 2 for CORA / CITESEER / CORAFULL, 3 for BAT / UAT, and 5 for AMAP / EAT. The standard deviation $\sigma$ of random Gaussian noise is set to 0.01. \subsubsection{\textbf{Metrics}} To verify the superiority of our SCGC compared with baselines, the clustering performance is evaluated by four widely used metrics, i.e., ACC, NMI, ARI, and F1 \cite{ZHOU_1,siwei_1,siwei_2}. \subsection{Performance Comparison} To demonstrate the superiority of our proposed Simple Contrastive Graph Clustering (SCGC) algorithm, we compare SCGC with thirteen baselines. Specifically, K-means \cite{K-means} is a classic clustering algorithm. Besides, three representative deep clustering methods, i.e., AE \cite{AE_K_MEANS}, DEC \cite{DEC}, and IDEC \cite{IDEC}, encode nodes with auto-encoders and then perform the clustering algorithm over the learned embeddings. In addition, five classical deep graph clustering methods \cite{GAE,DAEGC,ARGA,SDCN,DFCN} utilize the graph auto-encoder \cite{GAE} to learn the node representation for clustering. Moreover, we test the clustering performance of four state-of-the-art contrastive deep graph clustering methods including AGE \cite{AGE}, MVGRL \cite{MVGRL}, SCAGC \cite{SCAGC}, and MCGC \cite{MCGC}, which design contrastive strategies to improve the discriminative capability of samples. \begin{table*}[!t] \scalebox{1.8}{ \tiny \begin{tabular}{c|ccccc|ccccc} \hline \multirow{3}{*}{\textbf{Method}} & \multicolumn{5}{c|}{\textbf{Classical Methods}} & \multicolumn{5}{c}{\textbf{Contrastive Methods}} \\ & \textbf{AE} & \textbf{DEC} & \textbf{GAE} & \textbf{DAEGC} & \textbf{SDCN} & \textbf{AGE} & \textbf{MVGRL} & \textbf{MCGC} & \textbf{SCAGC} & \textbf{SCGC} \\ & \cite{AE_K_MEANS} & \cite{DEC} & \cite{GAE} & \cite{DAEGC} & \cite{SDCN} & \cite{AGE} & \cite{MVGRL} & \cite{MCGC} & \cite{SCAGC} & Ours \\ \hline \textbf{CORA} & 47.31 & 91.13 & {\ul 7.38} & 12.97 & 11.32 & 46.65 & 14.72 & 118.07 & 54.08 & \textbf{3.86} \\ \textbf{CITESEER} & 74.69 & 223.95 & {\ul 6.69} & 14.70 & 11.00 & 70.63 & 18.31 & 126.06 & 50.00 & \textbf{4.88} \\ \textbf{AMAP} & 94.48 & 264.20 & {\ul 18.64} & 39.62 & 19.28 & 377.49 & 131.38 & OOM & 150.54 & \textbf{8.86} \\ \textbf{BAT} & 7.46 & 21.37 & 3.83 & 4.79 & 11.50 & 2.49 & 3.19 & {\ul 2.28} & 93.79 & \textbf{1.40} \\ \textbf{EAT} & 9.56 & 26.99 & 4.64 & 5.14 & 12.12 & 3.86 & 3.32 & {\ul 2.87} & 47.79 & \textbf{1.61} \\ \textbf{UAT} & 29.57 & 42.30 & 4.75 & 6.44 & 10.64 & 8.95 & {\ul 4.27} & 23.10 & 64.70 & \textbf{1.68} \\ \textbf{Avg.} & 43.85 & 111.66 & {\ul 7.66} & 13.94 & 12.64 & 85.01 & 29.20 & 54.48 & 76.82 & \textbf{3.71} \\ \hline \end{tabular}} \caption{Time cost comparisons of the training process. All results are measured in seconds. The bold and underlined values indicate the best and the runner-up results, respectively. Avg. indicates the average time cost on six datasets. OOM denotes Out-Of-Memory during training.} \label{TIME_TABLE} \vspace{-2.0em} \end{table*} In Table \ref{COMPARE_TABLE}, we report the clustering performance of all compared methods on seven datasets. From these results, we have four observations as follows. 1) Since K-means is directly performed on the raw attributes, thus achieving unpromising results. 2) Our SCGC exceeds the representative deep clustering methods \cite{AE_K_MEANS,DEC,IDEC} since they merely consider the node attributes while overlooking the topological information in graphs. 3) The recent contrastive methods \cite{AGE,MVGRL,MCGC,SCAGC} achieve sub-optimal performance compared with our proposed SCGC. The reason is that we improve the discriminative capability of samples by keep the cross-view structural consistency in the proposed structural contrastive module. 4) Taking the average value of four metrics into account, SCGC consistently outperforms all baselines on seven datasets. For example, on BAT dataset, SCGC exceeds the runner-up ARGA \cite{ARGA} by 10.11\% 3.82\%, 8.62\% 11.01\% increments with respect to ACC, NMI, ARI, and F1. Overall, the aforementioned observations have demonstrated the superiority of our proposed SCGC. In the following section, we will conduct experiments to verify the efficiency of SCGC. \begin{figure}[!t] \centering \includegraphics[scale=0.42]{GPU.png} \caption{GPU memory costs of six methods on four datasets.} \label{GPU_Memory} \end{figure} \subsection{Time Costs \& GPU Memory Costs} \label{costs_sec} Time costs and GPU memory costs are two important indicators for evaluating the efficiency of algorithms. In this section, we conduct expensive experiments to demonstrate the efficiency of SCGC. Firstly, we test the training time of our SCGC and nine baselines on six datasets. Concretely, the baselines contain two deep clustering methods \cite{AE_K_MEANS,DEC}, three classical deep graph clustering methods \cite{GAE,DAEGC,SDCN}, and four contrastive methods \cite{AGE,MVGRL,SCAGC,MCGC}. For fairness, we train all methods for 400 epochs. From the results in Table \ref{TIME_TABLE}, we observe that our method consistently achieves the fastest speed on six datasets. Significantly, SCGC outperforms the recent contrastive deep clustering competitors with at least seven times speedup on average. We summarize two key reasons as follows. 1) The network architecture of SCGC is simple and merely consists of two MLPs. 2) Similar to \cite{AGE,SGC,graph_mlp}, our method decouples the GCN \cite{GCN} and adopts the low-pass denoising operations as an independent pre-processing to conduct neighbor information aggregation, thus simplifying the training process. \begin{table}[!t] \small \scalebox{0.85}{ \begin{tabular}{c|c|cccc} \hline \multirow{2}{*}{\textbf{Dataset}} & \multirow{2}{*}{\textbf{Metric}} & \multirow{2}{*}{\textbf{(w/o) L \& SCM}} & \multirow{2}{*}{\textbf{(w/o) SCM}} & \multirow{2}{*}{\textbf{(w/o) L}} & \multirow{2}{*}{\textbf{L+SCM}} \\ & & & & & \\ \hline \multirow{4}{*}{\textbf{CORA}} & ACC & 33.80±2.71 & 56.42±4.96 & 57.81±0.82 & \textbf{73.88±0.88} \\ & NMI & 14.98±3.43 & 44.51±3.69 & 34.65±1.25 & \textbf{56.10±0.72} \\ & ARI & 08.60±1.95 & 32.70±4.22 & 28.70±1.27 & \textbf{51.79±1.59} \\ & F1 & 30.26±4.46 & 47.75±7.31 & 52.29±0.90 & \textbf{70.81±1.96} \\ \hline \multirow{4}{*}{\textbf{CITESEER}} & ACC & 39.32±3.17 & 57.48±3.94 & 65.59±0.86 & \textbf{71.02±0.77} \\ & NMI & 16.94±3.22 & 37.95±2.30 & 39.03±0.66 & \textbf{45.25±0.45} \\ & ARI & 13.43±3.02 & 34.00±2.76 & 38.66±0.50 & \textbf{46.29±1.13} \\ & F1 & 36.08±3.53 & 44.90±3.97 & 60.75±1.25 & \textbf{64.80±1.01} \\ \hline \multirow{4}{*}{\textbf{AMAP}} & ACC & 27.22±0.76 & 29.58±1.85 & 45.32±1.69 & \textbf{77.48±0.37} \\ & NMI & 13.23±1.33 & 14.87±3.08 & 29.58±2.98 & \textbf{67.67±0.88} \\ & ARI & 05.50±0.44 & 05.47±1.35 & 19.26±2.02 & \textbf{58.48±0.72} \\ & F1 & 23.96±0.51 & 26.01±2.88 & 41.59±0.36 & \textbf{72.22±0.97} \\ \hline \multirow{4}{*}{\textbf{BAT}} & ACC & 40.23±1.19 & 56.11±2.44 & 70.46±0.38 & \textbf{77.97±0.99} \\ & NMI & 26.92±2.39 & 34.79±1.93 & 48.47±0.37 & \textbf{52.91±0.68} \\ & ARI & 9.520±1.42 & 24.13±2.27 & 45.11±0.36 & \textbf{50.64±1.85} \\ & F1 & 34.45±2.10 & 54.35±3.13 & 68.47±0.52 & \textbf{78.03±0.96} \\ \hline \multirow{4}{*}{\textbf{EAT}} & ACC & 32.23±0.56 & 51.03±2.03 & 53.86±1.12 & \textbf{57.94±0.42} \\ & NMI & 11.02±1.21 & 32.27±0.71 & 29.17±1.63 & \textbf{33.91±0.49} \\ & ARI & 02.20±0.40 & 24.03±1.07 & 23.87±2.24 & \textbf{27.51±0.59} \\ & F1 & 23.49±0.92 & 47.99±1.74 & 52.70±0.17 & \textbf{57.96±0.46} \\ \hline \multirow{4}{*}{\textbf{UAT}} & ACC & 42.47±0.15 & 39.79±2.50 & 46.45±0.79 & \textbf{56.58±1.62} \\ & NMI & 22.39±0.69 & 12.99±1.70 & 21.66±0.94 & \textbf{28.07±0.71} \\ & ARI & 15.71±0.76 & 07.04±1.15 & 15.35±0.64 & \textbf{24.80±1.85} \\ & F1 & 36.12±0.22 & 38.09±4.19 & 43.72±1.24 & \textbf{55.52±0.87} \\ \hline \end{tabular}} \caption{Ablation studies of low-pass denoising operation and structural contrastive module. Results are reported with mean±std under ten runs. Bold values are the best results.} \label{structure_ablation} \vspace{-2.8em} \end{table} Secondly, we conduct experiments to test GPU memory costs of SCGC and five baselines including two classical deep graph clustering methods \cite{DAEGC,SDCN} and three contrastive methods \cite{AGE,MVGRL,SCAGC} on four datasets. From the results in Fig. \ref{GPU_Memory}, two conclusions are obtained as follows. 1) SCGC achieves comparable memory costs as the classical deep graph clustering methods including DAEGC \cite{DAEGC} and SDCN \cite{SDCN}. 2) Compared to the contrastive methods \cite{AGE,MVGRL,SCAGC}, our proposed method saves about 59\% GPU memory on average. We summarize two reasons as follows. 1) The siamese MLP encoders in SCGC are light. 2) Our proposed method merely applies data augmentations in the latent space instead of introducing complex space-consuming operations over graphs \cite{MVGRL,SCAGC}. \subsection{Ablation Studies} \subsubsection{\textbf{Effectiveness of Low-pass Denoising Operation \& Structural Contrastive Module}} \label{low_pass_SCM_sec} In this section, we conduct the ablation studies to verify the effectiveness of two components in our network, i.e., low-pass denoising operation and Structural Contrastive Module (SCM). Here, we denote the low-pass denoising operation as L for short. In Table \ref{structure_ablation}, ``L+SCM'' denotes our proposed SCGC. Besides, ``(w/o) L'', ``(w/o) SCM'', and ``(w/o) L \& SCM'' denote SCGC without L, SCM, and both of them, respectively. From these results, we have three observations as follows. 1) The low-pass denoising operation could improve the performance of the baseline by filtering out the high-frequency noise in node attributes. 2) Through our proposed SCM, the discriminative of samples is enhanced, thus achieving better performance compared to the baseline. 3) Our method consistently outperforms other variants by a large margin. Overall, the aforementioned observations have verified the effectiveness of the low-pass denoising operation and structural contrastive module in our proposed SCGC. \begin{figure}[h] \centering \footnotesize \begin{minipage}{0.49\linewidth} \centerline{\includegraphics[width=0.95\textwidth]{ablation_gaussion_share_cora.png}} \vspace{3pt} \centerline{CORA} \vspace{3pt} \centerline{\includegraphics[width=0.95\textwidth]{ablation_gaussion_share_amap.png}} \vspace{3pt} \centerline{AMAP} \vspace{3pt} \centerline{\includegraphics[width=0.95\textwidth]{ablation_gaussion_share_eat.png}} \vspace{3pt} \centerline{EAT} \end{minipage} \begin{minipage}{0.49\linewidth} \centerline{\includegraphics[width=0.95\textwidth]{ablation_gaussion_share_citeseer.png}} \vspace{3pt} \centerline{CITESEER} \vspace{3pt} \centerline{\includegraphics[width=0.95\textwidth]{ablation_gaussion_share_bat.png}} \vspace{3pt} \centerline{BAT} \vspace{3pt} \centerline{\includegraphics[width=0.95\textwidth]{ablation_gaussion_share_uat.png}} \vspace{3pt} \centerline{UAT} \end{minipage} \caption{Ablation studies of un-shared MLPs and Gaussian noise on six datasets.} \label{mlp_noise_ablation} \end{figure} \subsubsection{\textbf{Effectiveness of the proposed Data Augmentation}}\label{data_aug_sec} In our proposed SCGC, we construct augmented views of the same node by designing parameter un-shared siamese MLP encoders and adding Gaussian noise to node embeddings instead of introducing complex operations over graphs. To verify the effectiveness of this new data augmentation fashion, we firstly conduct expensive ablation experiments in Fig. \ref{mlp_noise_ablation}. Here, we denote ``U'', ``G'', and ``U+G'', as the strategy of setting parameter un-shared MLPs, adding Gaussian noise to node embeddings, and both of them, respectively. From these results, we have two findings as follows. 1) These two simple strategies, which both aim to construct two different views of the same node, improve the clustering performance. 2) The combination of these two strategies achieve the best performance. In summary, we have verified the effectiveness of our proposed data augmentation fashion through these experimental results. \begin{table}[!t] \small \scalebox{0.91}{ \begin{tabular}{c|c|cccc} \hline \multirow{2}{*}{\textbf{Dataset}} & \multirow{2}{*}{\textbf{Metric}} & \multirow{2}{*}{\textbf{Drop}} & \multirow{2}{*}{\textbf{Add}} & \multirow{2}{*}{\textbf{Diffusion}} & \multirow{2}{*}{\textbf{Ours}} \\ & & & & & \\ \hline \multirow{4}{*}{\textbf{CORA}} & ACC & 72.03±0.93 & 72.02±0.91 & 72.94±0.75 & \textbf{73.88±0.88} \\ & NMI & 54.85±0.95 & 54.73±1.12 & 55.83±1.14 & \textbf{56.10±0.72} \\ & ARI & 49.71±1.65 & 49.66±1.70 & 51.44±1.40 & \textbf{51.79±1.59} \\ & F1 & 70.07±0.80 & 69.86±0.96 & 69.67±1.71 & \textbf{70.81±1.96} \\ \hline \multirow{4}{*}{\textbf{CITESEER}} & ACC & 67.74±0.51 & 68.31±0.56 & 68.15±0.49 & \textbf{71.02±0.77} \\ & NMI & 42.86±0.59 & 42.94±0.84 & 43.12±0.53 & \textbf{45.25±0.45} \\ & ARI & 43.28±0.65 & 43.69±0.82 & 43.40±0.92 & \textbf{46.29±1.13} \\ & F1 & 63.38±0.3 & 63.54±1.17 & 63.02±1.57 & \textbf{64.80±1.01} \\ \hline \multirow{4}{*}{\textbf{AMAP}} & ACC & 76.94±0.36 & 76.78±0.37 & 77.15±0.56 & \textbf{77.48±0.37} \\ & NMI & 66.82±0.90 & 66.41±1.30 & 67.43±0.85 & \textbf{67.67±0.88} \\ & ARI & 58.07±0.91 & 57.81±0.62 & 58.42±0.98 & \textbf{58.48±0.72} \\ & F1 & 71.65±0.47 & 72.14±1.05 & 71.23±0.75 & \textbf{72.22±0.97} \\ \hline \multirow{4}{*}{\textbf{BAT}} & ACC & 57.25±2.08 & 67.63±1.04 & 69.01±2.47 & \textbf{77.94±0.99} \\ & NMI & 29.23±3.98 & 42.51±1.20 & 44.89±2.23 & \textbf{52.91±0.68} \\ & ARI & 24.28±2.32 & 37.47±1.93 & 39.62±3.27 & \textbf{50.64±1.85} \\ & F1 & 56.46±2.86 & 67.30±0.76 & 68.36±2.81 & \textbf{78.03±0.96} \\ \hline \multirow{4}{*}{\textbf{EAT}} & ACC & 51.03±2.03 & 57.37±0.26 & 54.74±1.43 & \textbf{57.94±0.42} \\ & NMI & 32.27±0.71 & 32.62±0.39 & 29.25±1.50 & \textbf{33.91±0.49} \\ & ARI & 24.03±1.07 & 26.27±0.74 & 24.42±1.58 & \textbf{27.51±0.59} \\ & F1 & 47.99±1.74 & 57.43±0.6 & 53.98±1.82 & \textbf{57.96±0.46} \\ \hline \multirow{4}{*}{\textbf{UAT}} & ACC & 51.54±1.00 & 53.61±0.11 & 55.13±1.20 & \textbf{56.58±1.62} \\ & NMI & 18.81±2.13 & 24.59±1.07 & 25.52±1.80 & \textbf{28.07±0.71} \\ & ARI & 16.69±2.57 & 18.10±0.86 & 22.68±2.06 & \textbf{24.80±1.85} \\ & F1 & 49.89±1.31 & 52.16±1.04 & 54.08±1.31 & \textbf{55.52±0.87} \\ \hline \end{tabular}} \caption{Performance comparisons of different augmentations on six datasets. All results are reported with mean±std under ten runs. The bold values indicate the best results.} \label{augment_ablation} \vspace{-3.0em} \end{table} In addition, we compare our data augmentation fashion with other classical graph data augmentations including edge dropping \cite{SCAGC}, edge adding \cite{SCAGC}, and graph diffusion \cite{MVGRL,DCRN,IDCRN}. Concretely, in Table \ref{augment_ablation}, the data augmentation in SCGC is replaced by randomly dropping 10\% edges (``Drop''), or randomly adding 10\% edges (``Add'') or, graph diffusion (``Diffusion'') with 0.20 teleportation rate. From the results, we have two observations as follows. 1) The clustering performance is harmed by random edge dropping and adding, which may lead to semantic drift \cite{MoCL}. 2) Graph diffusion could achieve comparable performance on CORA and AMAP datasets while can not compare with ours on other datasets. It indicates that graph diffusion might change the underlying semantics of graphs \cite{AFGRL}. Overall, expensive experiments have demonstrated the effectiveness of our proposed data augmentation method. \begin{figure*}[!t] \footnotesize \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{ae_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{ae_amap.png}} \vspace{3pt} \centerline{AE} \end{minipage} \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{dec_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{dec_amap.png}} \vspace{3pt} \centerline{DEC} \end{minipage} \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{gae_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{gae_amap.png}} \vspace{3pt} \centerline{GAE} \end{minipage} \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{daegc_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{daegc_amap.png}} \vspace{3pt} \centerline{DAEGC} \end{minipage} \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{mvgrl_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{mvgrl_amap.png}} \vspace{3pt} \centerline{MVGRL} \end{minipage} \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{sdcn_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{sdcn_amap.png}} \vspace{3pt} \centerline{SDCN} \end{minipage} \begin{minipage}{0.139\linewidth} \centerline{\includegraphics[width=\textwidth]{ours_cora.png}} \vspace{3pt} \centerline{\includegraphics[width=\textwidth]{ours_amap.png}} \vspace{3pt} \centerline{SCGC (Ours)} \end{minipage} \caption{2D visualization on two datasets. The first row and second row correspond to CORA and AMAP, respectively.} \label{t_SNE} \end{figure*} To further verify the effectiveness and compatibility of our proposed data augmentation, we conduct additional experiments to transfer our proposed data augmentation fashion to other contrastive learning methods \cite{MVGRL,GRACE,GCA} in Appendix A.1. \begin{figure}[!t] \centering \small \begin{minipage}{0.49\linewidth} \centerline{\includegraphics[width=1\textwidth]{smooth_citeseer_amap_cora.png}} \end{minipage} \begin{minipage}{0.49\linewidth} \centerline{\includegraphics[width=1\textwidth]{smooth_bat_eat_uat.png}} \end{minipage} \caption{Sensitivity analysis of the layer number $t$ of graph Laplacian filters on six datasets.} \label{Sensitivity_t} \end{figure} \subsection{Sensitivity Analysis of Hyper-parameters} \subsubsection{\textbf{Sensitivity Analysis of hyper-parameter $t$}} We conduct experiments to investigate the influence of the layer number $t$ of graph Laplacian filters on our proposed SCGC. As shown in Fig. \ref{Sensitivity_t}, we have two observations as follows. 1) SCGC could achieve promising performance when $t \in [2, 3]$. 2) Our proposed model becomes insensitive to $t$ when $3 \textless t \le 5$. \subsubsection{\textbf{Sensitivity Analysis of hyper-parameter $\sigma$}} Besides, we investigate the robustness of our proposed method SCGC to hyper-parameter $\sigma$, which controls the Gaussian noise to the node embeddings $\textbf{Z}^{v_2}$. From the results in Fig. \ref{Sensitivity_sigma}, two conclusions are obtained as follows. 1) Our SCGC is robust to $\sigma$ when $\sigma \in [0.001, 0.1]$. 2) The clustering performance decreases drastically when $\sigma \textgreater 0.1$. The reason is that too much noise would lead to node embedding semantic drift. We set $\sigma$ to 0.01 in our model. More experimental results of analyzing the layer number of MLPs in SCGC are presented in Appendix A.2. \begin{figure}[h] \centering \small \begin{minipage}{0.49\linewidth} \centerline{\includegraphics[width=1\textwidth]{citeseer_amap_cora.png}} \end{minipage} \begin{minipage}{0.49\linewidth} \centerline{\includegraphics[width=1\textwidth]{bat_eat_uat.png}} \end{minipage} \caption{Sensitivity analysis of the standard deviation $\sigma$ of Gaussian noise on six datasets.} \label{Sensitivity_sigma} \end{figure} \subsection{Visualization Analysis} To show the superiority of SCGC intuitively, we visualize the distribution of learned embeddings of SCGC and six compared baselines on CORA and AMAP datasets via $t$-SNE algorithm \cite{T_SNE}. As shown in Fig. \ref{t_SNE}, visible results demonstrate that SCGC better reveals the intrinsic clustering structure compared with other baselines. \section{CONCLUSION} In this paper, we propose a contrastive deep graph clustering method termed Simple Contrastive Graph Clustering (SCGC) to improve the existing methods from the perspectives of network architecture, data augmentation, and objective function. As to the architecture, our network mainly includes two parts, i.e., pre-processing and network backbone. Concretely, a simple low-pass denoising operation conducts neighbor information aggregation as an independent pre-processing. Through this operation, we filter out the high-frequency noise in attributes in an efficient manner, thus improving the clustering performance. Besides, only two MLPs are included as the backbone. For data augmentation, we construct different graph views by setting parameter un-shared encoders and corrupting the node embeddings instead of introducing complex operations over graphs. Furthermore, we propose a novel neighbor-oriented contrastive loss to keep cross-view structural consistency, thus enhancing the discriminative capability of the network. Benefiting from the simplicity of SCGC, it is free from pre-training and saves both time and space for network training. Significantly, our algorithm outperforms the recent contrastive deep clustering competitors with at least seven times speedup on average. Extensive experimental results on seven datasets have demonstrated the effectiveness and superiority of SCGC. In the future, it is worth trying to design deep graph clustering methods for large-scale graph data. \bibliographystyle{ACM-Reference-Format}
\section{Introduction}\label{s:introduction} The motion of objects in a video can be detected by methods such as optical flow and used to discover, segment and learn the objects. A key benefit is that optical flow is object-agnostic: because it relies on low-level visual properties, it can extract a signal even before the objects are learned, and can thus be used to \emph{bootstrap} an understanding of objectness % without manual supervision. The potential of motion as a cue is probably best epitomised by the problem of \emph{video segmentation}, where the input is a generic video sequence and the task is to extract the main object or objects in the video. Many video segmentation methods do not assume that a \emph{a specific object or type of objects} is observed; instead, they leverage motion to discover the objects without assuming much prior information about them. In fact, recent state-of-the-art (SoTA) video segmentation methods, such as~\cite{yang2021self-supervised,meunier2022em-driven}, have taken the extreme view of \emph{only} using optical flow, and hence motion, for segmentation, otherwise disregarding the appearance of the objects and arguing that motion patterns are much easier to model and interpret than appearance patterns. \input{figures/notteaser_diag} In this paper, we moderate this view and re-emphasize the importance and usefulness of making the motion and appearance modality \emph{collaborate} in learning and segmenting visual objects, particularly in the unsupervised case. We do so by learning an image-based segmentation network, and use optical-flow self-supervision to train it without manual supervision, tasking the network with anticipating the optical flow given a single image as input. Because motion \emph{cannot} usually be predicted unambiguously from a single image, the network is asked to predict regions where the optical flow vectors are \emph{likely to be arranged according to particularly simple patterns}\,---\,for example, constant or affine. The idea is that such regions, exhibiting coherent flow patterns within, roughly correspond to independent objects. Compared to using only optical flow for segmenting objects, using appearance too has a few clear advantages. The most obvious one is that, while objects do move \emph{occasionally}, they do not necessarily move \emph{all the time}. On the other hand, appearance always provides a cue about the presence of objects,\footnote{With the possible exception of camouflage~\cite{lamdouar2020betrayed}.} providing complementary evidence for them, particularly when motion is lacking. Furthermore, appearance patterns are usually more distinctive than motion patterns and better allow to identify and distinguish different objects. As an added bonus, because the network operates on the appearance modality, any number of pre-training techniques, unsupervised and supervised, can be used to pre-train the segmentation network, boosting performance. For image segmentation, we use a collection of videos for training the network and test it on an independent test set of still images. For video segmentation, however, the network cannot by itself exploit motion information because it operates on individual frames. A simple way of extending the method to use motion cues for inference is given by the video segmentation protocol of~\cite{yang-loquercio2019unsupervised,yang2021self-supervised}. Here, the unsupervised learning process itself is used as a segmentation algorithm: it receives as input the videos (and their pre-computed optical flow) and outputs their segmentation. The difference is that, while our network takes a single still image as input, it is also influenced by the corresponding optical flow via back-propagation.% \footnote{ This is a form of ``internal learning'', similar to the deep prior~\cite{ulyanov20deep}, or fitting an appearance or deformation network to a single image collection as in~\cite{mildenhall20nerf:,kasten21layered}. } Our model achieves a significant boost in unsupervised video segmentation on three benchmark datasets, sometimes with a large 5\% IoU gap over the SoTA, thus proving that appearance provides powerful complementary cues even in the video segmentation task. Moreover, we demonstrate the strong generalization of our model on common unsupervised image segmentation benchmarks and even obtain SoTA performance on two out of four datasets. % \section{Related Work}\label{s:related} Our work aims to combine motion and appearance cues for unsupervised object discovery, in that motion can be used as a cue to learn a general object segmenter for both videos and still images alike. As such, there is a connection to several related areas in literature, which we review next. \paragraph{Unsupervised Video Object Segmentation.} The aim of video object segmentation (VOS) is to densely label objects present in a video. Current VOS benchmarks~\cite{perazzi2016a-benchmark-davis,li2013video-segtrack,ochs2014segmentation-fbms} usually define the problem as foreground-background separation where the most salient objects in the scene typically form the foreground. Recently, there have been efforts to reduce the amount of supervision and two main directions that have gained significant attention are semi-supervised and unsupervised VOS. At test time, semi-supervised VOS requires manual annotations for the objects of interest for an initial frame and the goal is to re-localize (segment) them across the video~\cite{caelles2017one}. Unsupervised VOS aims to discover the object(s) of interest without having the initial targets provided~\cite{faktor2014videonlc,papazoglou2013fast,tokmakov2019motion,jain2017fusionseg,li2018instance,lu2019see}. However, despite what the name suggests, most unsupervised VOS methods in fact use some form of supervised pre-training on external data. % \paragraph{Motion Segmentation.} In videos, the background is usually relatively static whereas objects in the scene have autonomous motion, thus providing a strong `objectness' signal. Many works approach unsupervised video object segmentation as a motion segmentation problem. Brox et~al.~\cite{brox10object} leverage a point trajectory technique (e.g., ~\cite{sundaram10dense}) to base segmentation on the long-term motion of tracked points. Several methods build on this idea and propose a multi-cut approach~\cite{keuper2017higher-order,keuper2015motion,keuper2020motion}. NLC~\cite{faktor2014videonlc} analyzes dominant motion in the optical flow to find the salient object, and uses appearance-based saliency as a fallback. FTS~\cite{papazoglou2013fast} generates object candidates from motion cues and refines them using appearance features. CIS~\cite{yang-loquercio2019unsupervised} proposes an adversarial framework where an inpainter is tasked with guessing the optical flow of a segment based on contextual information, while the generator's task is to create segments with zero mutual information to make the problem as difficult as possible for the inpainter. Layered models~\cite{chang2013topology,jojic1993learning} jointly optimize video segmentation and motion estimation. They are disadvantaged by their complicated and computationally expensive inference procedure. There have been efforts to find efficient approaches~\cite{tsai2016video}. AMD~\cite{liu2021emergence} takes a different approach and uses separate pathways to segment the video frames and to model the motion, which makes inference simple. MG~\cite{yang2021self-supervised}, in contrast, abandons appearance pathway altogether segmenting optical flow via scaled dot-product attention mechanism. Another set of methods use optical flow to provide segmentations by merging pixels that are consistent with various motion models. Our method follows the same approach. \cite{jepson1993mixture} is one of the earliest works that attempts to model flow as a combination of smoothly varying layers. A set of work~\cite{bideau2016s,bideau2018best} segments object translation directions from motion angle field obtained by correcting for estimated rotation of the camera. \cite{torr1998geometric} instead considers a variety of probabilistic motion models selecting appropriate one by a version of Akaike information criterion. Similar to us, \cite{mahendran2018self-supervised} considers affine flow model, however, uses entropy of flow magnitude histograms for loss to deal with noisy flow in real world. \cite{meunier2022em-driven} consider affine and quadratic motion models, however their method uses flows as input which makes it suitable only for videos during inference. \paragraph{Unsupervised Image Segmentation.} In this work we consider the problem of binary segmentation of an image into foreground and background. The earlier works use hand-crafted priors, e.g., color contrast~\cite{cheng2015global,wei2012geodesic}, which do not perform as well as recent deep learning based methods. Deep learning based methods~\cite{zhang2018deep,zeng2019multi,nguyen2019DeepUSPS} typically combine multiple handcrafted heuristics to generate ground truth data and distill it using a deep network. \cite{ji19invariant,Ouali_2020_ECCV} proposed approaches based on mutual information maximization between different views of the input. A recently emerging line of work~\cite{bielski2019emergence,chen2019unsupervised,kanezaki2018unsupervised,benny2020onegan,voynov2021object,melas-kyriazi2022finding} explores generative models to obtain segmentation masks. Many of them~\cite{bielski2019emergence,chen2019unsupervised,kanezaki2018unsupervised,benny2020onegan} are based on the idea of generating foreground and background as separate layers and combine them to obtain a real image. Others~\cite{voynov2021object,melas-kyriazi2022finding} analyze large-scale unsupervised GANs (e.g., BigGAN~\cite{brock2019large}) and find implicit foreground-background structure in them to generate a synthetic annotated training dataset. We show that our method can be used for this task, as it only requires a single image as input at test time, providing an alternative approach to unsupervised object segmentation that performs favorably in comparison to state-of-the-art methods. \paragraph{Unsupervised Object Discovery.} Different from previous methods that aim to segment the most salient object(s) in an image, unsupervised multi-object scene decomposition explores the problem of decomposing a scene into parts, which typically include each individual foreground object and the background. The usual approach is to learn structured object-centric representations, \textit{i}.\textit{e}.~ to model the scene with latent variables (slots) operating on a common representation~\cite{greff2019multiobject,locatello2020object,emami2021Efficient,lin2020space,crawford2019spatially,burgess2019monet,engelcke2019genesis,engelcke2021genesis,jiang2020generative}. While these methods are image-based, extensions to video also exist~\cite{kosiorek2018sequential,Jiang2020SCALOR,crawford2020exploiting,kabra2021simone,zablotskaia2020unsupervised,besbinar2021self,min2021gatsbi,bear2020learning,kipf2021conditional}. These methods often operate in an auto-encoding fashion with inductive bias to separate and segment objects derived from a reconstruction bottleneck~\citep{burgess2019monet}. This bottleneck of often learned reconstruction is architecture and latent-variable-model dependant~\cite{engelcke2020reconstruction}, making it difficult to tune and complicating application. We similarly impose a reconstruction bottleneck on the flow. However, for `reconstruction', we use a simple model grounded in projective geometry with a known closed form solution, which avoids such pitfalls. It is important to note that the unsupervised multi-object segmentation setting appears to be significantly more challenging, with current methods relying on synthetic scenes (e.g., CLEVR~\cite{johnson2017clevr} for images or CATER~\cite{Girdhar2020CATER} for videos) for their performance, while struggling on more realistic data~\cite{karazija2021clevrtex}. \section{Method}\label{s:method} We learn to segment objects in an image by predicting which image regions are likely to move in a simple and distinctive manner. We supervise the model by matching its predictions to the optical flow obtained from video sequences. Formally, let $ I \in \mathbb{R}^{3\times H\times W} = (\mathbb{R}^3)^\Omega $ be an RGB image defined on a lattice $ \Omega = \{1,\dots,H\} \times \{1,\dots,W\}. $ For learning, the image is a frame in a video sequence and we denote with $ F \in (\mathbb{R}^2)^\Omega $ the corresponding optical flow image (which we compute from the video using an off-the-shelf optical flow network such as RAFT~\cite{teed2020raft}). Our goal is to decompose the image into a foreground and a background region by learning to predict a binary mask $m \in \{0,1\}^\Omega$. This can be achieved by learning a segmentation network $\Phi(I) \in [0,1]^\Omega$ that, given the image as input, assigns pixels $u$ to foreground or background in a soft manner, with probabilities: \begin{equation} P(m_u=1|I,\Phi) = [\Phi(I)]_u, ~~~ m_u \in \{0,1\}, ~~~ u \in \Omega. \end{equation} In absence of ground truth mask annotations, one can exploit motion as a cue for learning. We can separate images into meaningful regions according to the motion within each region (principle of common fate~\cite{spelke1990principles,wagemans2012century}). Specifically, each region $m$ is associated with a model $\theta_m$ of the optical flow pattern observed within it. We consider in particular \emph{affine models} $F_u \approx A u + b$ of the flow~\cite{mahendran2018self-supervised,meunier2022em-driven}, where $\theta_m = (A_m,b_m)$ consists of a matrix $A_m\in \mathbb{R}^{2\times 2}$ and a vector $b_m \in \mathbb{R}^2$, and $u\in \Omega$ are the coordinates of a pixel. We assume that the model predicts the flow up to Gaussian noise model with fixed isotropic standard deviation, which results in the simple $L^2$ fitting loss: \begin{equation}\label{e:affine} - \log p(F_u | \theta_m) \propto \|F_u - A_mu-b_m\|^2. \end{equation} Given the flow $F$, we minimize the energy function: \begin{multline} \mathcal{L}(F | \theta, I,\Phi) = - \sum_{u \in \Omega} \sum_{m \in \{0,1\}} \log p(F_u | \theta_m) \cdot p(m|I,\Phi)\\ % % % % % % % % \propto % % \sum_{u \in \Omega} \sum_{m \in \{0,1\}} \|F_u - A_{m}u-b_{m}\|^2 \cdot p(m_u|I,\Phi) \end{multline} Note that, in the expression above, we \emph{do not} know the flow parameters $\theta$ as the network only predicts the regions' extent, not the actual flow pattern. Instead, we \emph{min-out} the parameters in the loss, fitting the flow models $\theta$ \begin{equation}\label{e:loss} \mathcal{L}(F|I,\Phi) = \min_{\theta} \mathcal{L}(F | \theta, I,\Phi). \end{equation} The energy in \cref{e:affine} is quadratic, resulting in a weighted least squares problem that can be efficiently solved in closed form (see supplementary material). Intuitively, as the model takes as input only a single image, its task is to decompose the scene into regions that can generate the best possible fit for the flow model (\cref{e:affine}) without knowing the flow in advance. Therefore, the network is \emph{not} tasked to predict the flow directly, which depends on the specific motion observed in the video and is ambiguous to infer from a single input image. As generally objects move independently of the background, and thus exhibit different flow patterns, our energy function effectively encourages the segmentation of objects through flow prediction. \paragraph{Compactness.} Foreground and background regions have so far been treated symmetrically. In order to distinguish them, we further regularize the foreground region $m=1$ to be spatially compact. We measure compactness as the average squared $L^2$ distance between pixels in the foreground region: \begin{equation}\label{e:compactness} \mathcal{L}_\text{cmp}(\Phi,I) = \sum_{u,v \in \Omega} \|u - v\|^2\cdot P(m_u=1|\Phi,I) \cdot P(m_v=1|\Phi,I). \end{equation} While a naive evaluation of this loss has cost $O(|\Omega|^2)$, in the sup.~mat.~we show how to compute it in cost $O(|\Omega|)$ only. \paragraph{Training Formulation.} Our model is learned from a large collection $\mathcal{T}$ of video frames-optical flow pairs $(I,F)$, minimizing the empirical risk: \begin{equation}\label{e:final_loss} \Phi^* =\operatornamewithlimits{argmin}_\Phi \frac{1}{|\mathcal{T}|}\sum_{(I,F)\in\mathcal{T}} \lambda_a\mathcal{L}(F|I,\Phi) + \lambda_c \mathcal{L}_\text{cmp}(I,\Phi), \end{equation} where $\{\lambda_a$,$\lambda_c\} \in \mathbb{R}$ balances the influence of the two losses. \subsection{Justification and Model Improvements}\label{s:modes} The model above assumes that the observed optical flow $F$ can be modelled in a piecewise-affine fashion: $F_u \approx Au + b$. If objects simply translate (maintaining their distance from the camera), the generated 2D flow is in fact affine (constant, with $A=0$) in the region. The same is true if the object rotates in-plane (in which case $A\not= 0$) and, approximately, if the rotation is out-of-plane and the object is a small planar patch. However, other motions can result in more complex flow patterns that are not captured accurately by the simple affine model. Rather than making the model more complex, we retain the affine approximation and pre-process the flow in a non-linear manner. The pre-processing has the added benefit of reducing the effect of outliers generated by the optical flow predictor. Specifically, we consider the non-linear mapping that compresses the magnitude of the flow vectors. If $G \in (\mathbb{R}^2)^\Omega$ is the unprocessed 2D flow field, we use the normalized flow field: \begin{equation}\label{e:flow_norm_clip} F_u = \operatornamewithlimits{clamp}_{[-\tau,\tau]^2} \frac{G_u}{\max_{v\in\Omega} |G_v|} % \end{equation} \subsection{Two Modes: Video \emph{vs} Image Segmentation} We experiment with two modes of application of our model. The first mode is \emph{unsupervised video segmentation}. As the model operates on single images and not videos, we utilize the \textbf{process} of training the network (not just the resulting network itself) as a means of segmenting moving objects. We do not distinguish between training and testing; rather, the training process takes as input one or more unlabelled videos and their pre-computed optical flow and outputs the video segmentation. The network, which is learned as a byproduct, still only takes single images as input, but the training process utilizes optical flow information from the entire video. We can think of the network as a means for learning appearance and use it to regularize the motion segmentation, which is achieved by the network training process as a whole. The second mode of operation is \emph{image segmentation} mode. Here, the network is first trained using a number of unlabelled videos, and then applied to the task of single-image foreground object segmentation on an \emph{independent} validation or test set of still images. In this mode, therefore, motion is only used as a supervisory signal: when the network is applied at test time, motion is not considered anymore and the network operates purely as an image-based segmenter. This can also be seen as an instance of \emph{cross-modal self-supervision}. \section{Experiments}\label{s:experiments} Our formulation allows us to evaluate our method in two settings: video segmentation and general image/object segmentation. We show that learning a network that \textit{guesses what moves} not only results in state-of-the-art performance in video segmentation, but also generalizes to image segmentation without further training. % Additionally, we experiment with different flow models $\theta$ (\cref{s:e:ablation}), pre-training (\cref{s:e:pretraining}), and unsupervised optical flow estimators (\cref{s:e:flow}). \subsection{Experimental Setup} \paragraph{Architecture.} Our formulation enables us to use any standard image segmentation architecture for the model $\Phi$. This has two main benefits: while training the model needs optical flow (and thus video data), inference however can be performed on single images alone just like any image segmentation method. Second, using a standard architecture allows us to benefit from (self-){}supervised pretraining ensuring better convergence and broader generalization (see \cref{s:e:pretraining}). We experiment with both convolutional and transformer-based architectures, which we discuss later. \paragraph{Datasets.} For the \emph{video segmentation} task, we use three popular datasets: DAVIS2016 (DAVIS16\xspace)~\cite{perazzi2016a-benchmark-davis}, SegTrackV2 (STv2\xspace)~\cite{li2013video-segtrack}, as well as FBMS59\xspace~\cite{ochs2014segmentation-fbms}. DAVIS16\xspace contains 30 training and 20 validation sequences with 3455 frames annotated at 480p resolution for the predominantly moving object. STv2\xspace contains 14 sequences and 976 annotated frames, while FBMS59\xspace has 59 sequences where every 20th frame is annotated (total 720 annotated frames). For the \emph{image segmentation} task, we consider the Caltech-UCSD Birds-200 (CUB) dataset~\cite{welinder2010caltech-ucsd-cub-200} and three saliency detection benchmarks: DUTS~\cite{wang2017learning-duts}, ECSSD~\cite{shi2016hierarchical-ecssd}, and DUT-OMRON~\cite{yang2013saliency-dut-omron}. \paragraph{Metrics.} \input{tables/main_results_table} \input{figures/method_comp} \input{figures/method_comp_st_fbms} We use the Jaccard index ($\mathcal{J}$) to evaluate unsupervised video segmentation, calculated on pixels, taking the mean over the test set. Following the standard practice~\cite{jain2017fusionseg,yang-loquercio2019unsupervised}, we combine multiple foreground objects in FBMS59\xspace and STv2\xspace datasets for comparison with other methods. Evaluation is performed in the original input resolution. For the unsupervised object segmentation task, we report pixel accuracy and the Jaccard index. \paragraph{Optical Flow.} As discussed in \cref{s:method}, our method derives learning signal from optical flow. We estimate optical flow for all frames on DAVIS16\xspace, STv2\xspace, and FBMS59\xspace following the practice of MotionGrouping~\cite{yang2021self-supervised}. Namely, we employ three different approaches, RAFT~\cite{teed2020raft} (supervised), PWC-Net~\cite{sun2018pwcnet} (supervised), and ARFlow~\cite{liu2020learning} (unsupervised), using the original resolution, and gaps between frames of $\{-2, -1, 1, 2\}$ for DAVIS16\xspace and STv2\xspace, and $\{-6, -3, 3, 6\}$ on FBMS59\xspace{}\@. RAFT is supervised on synthetic FlyingChairs~\cite{dosovitskiy2015flownet} dataset. \paragraph{Training Details.} We use MaskFormer~\cite{cheng2021maskformer} as our segmentation network, and use only the segmentation head which is equivalent to their \texttt{PerPixelBaseline+} model. For the backbone, we leverage the Swin-tiny transformer~\cite{liu2021swin}, pre-trained on ImageNet~\cite{russakovsky2015imagenet} in a self-supervised manner~\cite{xie2021moby} to avoid external sources of supervision. The network is trained using AdamW optimiser, with learning rate of $1.5\times10^{-4}$ and gradient clipping when 2-norm exceeds 0.01. We use batch size of 8 for 5k iterations only. We set $\lambda_a$=$3e-2$, $\lambda_c$=$1e-4$ , $\tau$=$0.33$~\eqref{e:final_loss}. The input RGB images and optical flows for loss assessment are interpolated to $128\times224$ resolution using bi-cubic and nearest neighbor interpolation, respectively. Output segmentation logits are up-sampled using bi-linear interpolation to input resolution for training and again to annotation resolution for evaluation. \subsection{Unsupervised Video Segmentation} \Cref{tab:main} shows our model performance on the DAVIS16\xspace, STv2\xspace, and FBMS59\xspace datasets compared against other unsupervised video segmentation approaches. We use RAFT~\cite{teed2020raft} to compute optical flow, as this was adopted by previous methods. Our method achieves state-of-the-art (SoTA) performance even without considering extra post-processing steps. We exceed results of previous methods by as much as 1.4\%, 1.8\%, and 5.7\% on DAVIS16\xspace,~STv2\xspace, and FBMS59\xspace, respectively. % Additionally, CRF post-processing further improves results. \cref{fig:method_comparison} and \cref{fig:method_comparison_2} provide a qualitative overview of our results compared with other methods. Our model provides better segmentation with sharper boundaries than other works despite complex non-rigid motion, parallax effects or lack-of-motion by only using appearance during testing. However, on challenging scenarios, our method still struggles to segment small isolated details or unconnected independent objects, as the compactness loss~\eqref{e:compactness} discourages forming such masks during training. \subsection{Ablation Studies}\label{s:e:ablation} \paragraph{Loss and Normalisation.} \input{tables/loss_ablation_table} Using DAVIS16\xspace, we now study the effectiveness of the individual components by ablating aspects of the loss and flow pre-processing (\cref{tab:loss_ablation}). Normalisation and clipping of the flow magnitude provide significant performance improvements by reducing the effect of outliers in our approximate affine flow motion model. Furthermore, normalisation contributes by centering the distribution of residual errors across the dataset. The latter also helps by stabilizing the range of optical flow values that can vary substantially across different images and videos, much more than RGB values, and which, if unchecked, can make training less stable. \paragraph{Pretraining.}\label{s:e:pretraining} \input{tables/weights_ablation_table} Compared to recent methods for video segmentation~\cite{yang2021self-supervised,meunier2022em-driven}, one of the benefits of our formulation is that we can leverage unsupervised pretraining for the segmentation network (Swin backbone of the MarkFormer). This enables our method to be trained in mere 5k iterations. We investigate the effect of other pretraining strategies on the performance, showing results in \cref{tab:weights_ablation}. Switching to a model pretrained on ImageNet with image-level supervision (\textit{i}.\textit{e}.~ a classification task) slightly improves performance. % We attribute this to the variety of categories in the ImageNet benchmark featuring detachable objects, which might provide a more suitable representation for our network. Similarly, we consider our method without any pre-training. We train the model using same settings for 20k iterations from scratch. This results in competitive performance, matching or exceeding performance of previous methods. \paragraph{Segmentation Model.} Our method is not restricted to a specific segmentation network. We investigate whether the choice of an expressive Transformer-based architecture significantly contributes to the performance. To that end, MaskFormer is replaced with a simple convolutional U-Net architecture~\cite{ronneberger2015u}, as in EM~\cite{meunier2022em-driven}, and trained from scratch to allow for a fair comparison. % The U-Net based model achieves comparable results on FBMS59\xspace~and STv2\xspace~and 71.2 on DAVIS (\cref{tab:main}), outperforming earlier methods even without transformers. \paragraph{Flow Estimation.}\label{s:e:flow} \input{tables/flow_ablation_table} \input{tables/unsup_seg_table} Finally, our method relies on the optical flow estimated by frozen, off-the-shelf networks. So far we have been using RAFT~\cite{teed2020raft}, as such optical flow network was adopted in our baselines. Instead, we consider PWCNet~\cite{sun2018pwcnet} and fully-unsupervised ARFlow~\cite{liu2020learning}. Unlike previous methods (e.g., \cite{yang2021self-supervised}), which perform worse with PWCNet, our methods maintains much of its performance (\cref{tab:flow_ablation}). Finally, we compare our \emph{fully} unsupervised model (which uses self-supervised pretraining and flow) to fully unsupervised state-of-the-art methods. Appearance-Motion Decomposition (AMD)~\cite{liu2021emergence} works end-to-end and directly extracts motion features from pairs of images with a PWCNet-like architecture, while MotionGrouping (MG)~\cite{yang2021self-supervised} and our method use ARFlow~\cite{liu2020learning} for optical flow estimation. In \cref{tab:unsup_flow_results} we show that our method achieves a significant improvement over previous approaches. \input{figures/unsup_seg_viz} \input{figures/unsup_seg_viz_failure} \subsection{Unsupervised Image Segmentation} In the section above we have evaluated the performance of our approach for video segmentation; here we assess the image segmentation performance instead on common image segmentation and saliency benchmarks: CUB, DUTS, DUT-OMRON, and ECSSD. For this experiment, we train our model on all three motion segmentation datasets (DAVIS16\xspace, FBMS59\xspace and STv2\xspace) jointly and apply the resulting network to the segmentation benchmarks without any further finetuning. We use the fully unsupervised version of our model (self-supervised Swin backbone and ARFlow), that learns only from unlabelled videos, to fairly compare to prior work on unsupervised image segmentation. In \Cref{table:unsup_semseg_benchmark} we report the performance of our method, which is close to the current state-of-the-art approaches in unsupervised image segmentation on DUT-OMRON and ECSSD and outperforms then on CUB and DUTS by a significant margin (4.5\% and 6.9\% in IoU, respectively), % demonstrating the generalization ability of our model. We also show results for our model trained with self-supervised Swin backbone and RAFT optical flow, which further improves performance. It is also worth noting that most of the prior work (except \cite{melas-kyriazi2022finding}) relies on dataset-specific training. \input{tables/comparison_amd} On DUTS, we also compare our approach to AMD~\cite{liu2021emergence}, which is the only other unsupervised flow-based method that reports results on saliency detection. For a fair comparison, we evaluate the model trained on DAVIS16\xspace and use ARFlow for unsupervised flow estimation. We adopt the metrics from \cite{liu2021emergence}, reporting the $F_\beta$ score and Mean Average Error (MAE) in \cref{tab:amd_saliency}. Our model achieves state-of-the-art performance despite being trained on a much smaller dataset than AMD, which uses YouTube-VOS~\cite{xu2018youtube}. Finally, we evaluate the model qualitatively in \cref{fig:unsup_seg} on all four benchmarks. We observe our model works well on a diverse set of classes\,---\,humans, animals, birds, inanimate objects and even stationary structures, buildings etc., which are significantly different from the data our model was trained with. \cref{fig:unsup_seg_failure} shows failure cases of our model. Our model struggles with scenes where the salient objects (as annotated by humans) might seem ambiguous, e.g., in the third example annotated are the items held by the people, while our method segments all people as foreground. Another failure case occurs with salient stationary structures, e.g., in the sixth example, the model detects the people in the station rather than the banner and, in the last example, it misses the large building. \section{Conclusions, Limitations and Future Work}\label{s:conclusions} We have proposed a simple approach to exploit the synergies between motion in videos and objectness for segmenting visual objects without supervision. The key idea is using motion anticipation as a learning signal: we train an image segmentation network to predict regions that likely contain simple optical flow patterns, as these have a high chance to correspond to objects. The model can be used for video object segmentation through test-time training as the unsupervised loss informs the image model of the motion. Notably, though, since our model does not use optical flow as input, it can be also directly applied to still images. Our results show that this approach achieves state-of-the-art performance in both video and image segmentation benchmarks. We find that the complexity of the motion model is important to model complicated flow patters that can arise even for rigid objects. Future work should thus consider extensions to more sophisticated motion patterns, accounting for the 3D shape of objects, and to separate multiple objects. \section*{Supplementary Material} In this supplementary material, we provide further details on our training parameters in~\Cref{sup:sec1}. We provide the closed form solution of the fitting of the flow model $\theta$ in \cref{sup:sec2}. ~\cref{sup:sec3} demonstrates how we can compute compactness in $O(|\Omega|)$, instead of the main paper's $O(|\Omega|^2)$ formulation. More qualitative results are presented in \cref{sup:sec4}. \section{Training Hyperparameters}\label{sup:sec1} We further detail the hyperparameters used during the training of MaskFormer\footnote{Implementation from \url{https://github.com/facebookresearch/MaskFormer}.}. In addition to using learning rate of $1.5\times10^{-4}$, a schedule of linear warm-up from $1.0\times10^{-6}$ to $1.5\times10^{-4}$ over 1.5k iteration and polynomial decay afterwards was deployed. We gradually unfreeze the pre-trained Swin backbone. All Transformer layers are initially frozen with the last 2 unfreezing at 500 iterations and the rest at 1000. We do not train the patch embedding projection layers. For experiments using U-Net\footnote{Implementation from \url{https://github.com/milesial/Pytorch-UNet}.}, we use the standard 4-layer version. The batch-size is increased to 16 and learning rate to $7.0\times10^{-4}$. We also clip the gradients only when 2-norm exceeds 5.0. All other settings, including optimizer and learning rate schedules, are kept the same. U-Net is not pre-trained and thus is trained from scratch. \section{Closed Form Solution for Loss using Affine Flow Model}\label{sup:sec2} \newcommand{\Lambda}{\Lambda} Consider one of the two regions $m \in\{0,1\}$ and define $w_u \propto P(m_u=m|I,\Phi)$ the posterior probability for that region, normalized so that $\sum_{u\in\Omega} w_u = 1$ (the scaling factor does not matter for the purpose of finding the minimizer). We can obtain the minimizer $(A^*,b^*)$ and minimum of the energy \begin{equation}\label{e:energy} E(A,b) = \sum_{u \in \Omega} w_u \|F_u - Au-b\|^2 \end{equation} as follows. Define $$ \bar u = \begin{bmatrix} u \\ 1 \end{bmatrix}, ~~~~ M = \begin{bmatrix} A & ~~b \end{bmatrix} \in \mathbb{R}^{2\times 3} $$ so that the energy can be rewritten more compactly as $$ E(M) = \sum_{u \in \Omega} w_u \|F_u - M \bar u\|^2 = \operatorname{tr}\left( \Lambda_{FF} - M \Lambda_{\bar \Omega F} - \Lambda_{F \bar \Omega} M^\top + M \Lambda_{\bar \Omega \bar \Omega} M^\top \right) $$ where $$ \Lambda_{FF} = \sum_{u \in \Omega} w_u F_uF_u^\top,~~ \Lambda_{F\bar \Omega} = \sum_{u \in \Omega} w_u F_u\bar u^\top,~~ \Lambda_{\bar \Omega F} = \Lambda_{F\bar \Omega}^\top,~~ \Lambda_{\bar \Omega \bar \Omega} = \sum_{u \in \Omega} w_u \bar u \bar u^\top. $$ are the (uncentered) second moment matrices of the flow $F_u$ and homogeneous coordinate vectors $\bar u$. By inspection of the trace term, the gradient of the energy is given by: $$ \frac{dE(M)}{dM} = 2\left( \Lambda_{F \bar\Omega} - M \Lambda_{\bar\Omega \bar\Omega} \right) $$ Hence, the optimal regression matrix $M^*$ and corresponding energy value are $$ M^* = \Lambda_{F \bar \Omega} \Lambda_{\bar \Omega \bar \Omega}^{-1},~~~~ E(M^*) = \operatorname{tr}\left( \Lambda_{FF} - M^* \Lambda_{\Omega \bar F} \right). $$ Somewhat more intuitive results can be obtained by centering the moments and resolving for $A$ and $b$ instead of $M$. Specifically, define: $$ \mu_\Omega = \sum_{u\in\Omega} w_u u,~~~ \mu_F = \sum_{u\in\Omega} w_u F_u. $$ The covariance matrices of the vectors are: \begin{multline*} \Sigma_{FF} = \sum_{u \in \Omega} w_u (F_u - \mu_F)(F_u-\mu_F)^\top,~~~ \Sigma_{F \Omega} = \sum_{u \in \Omega} w_u (F_u-\mu_F)(u-\mu_\Omega)^\top,\\ \Sigma_{\Omega F} = \Lambda_{F\Omega}^\top,~~~ \Sigma_{\Omega \Omega} = \sum_{u \in \Omega} w_u (u - \mu_\Omega) (u - \mu_\Omega)^\top. \end{multline*} It is easy to check that \begin{multline*} \Lambda_{FF} = \Sigma_{FF} + \mu_F\mu_F^\top, ~~~ \Lambda_{F\bar \Omega} = \begin{bmatrix} \Sigma_{F\Omega} + \mu_F\mu_\Omega^\top &~~ \mu_F \end{bmatrix}, \\ \Lambda_{\bar\Omega \bar \Omega} = \begin{bmatrix} \Sigma_{\Omega\Omega} + \mu_\Omega\mu_\Omega^\top &~~ \mu_\Omega \\ \mu_\Omega^\top & ~~1 \end{bmatrix}. \end{multline*} From this: \begin{multline*} M^* = \Lambda_{F \bar \Omega} \Lambda_{\bar \Omega \bar \Omega}^{-1} = \begin{bmatrix} \Sigma_{F\Omega} + \mu_{F}\mu_{\Omega}^\top & ~~\mu_{F} \end{bmatrix} \begin{bmatrix} \Sigma_{\Omega\Omega} + \mu_{\Omega}\mu_{\Omega}^\top & ~~\mu_{\Omega}\\ \mu_{\Omega}^\top & ~~1 \\ \end{bmatrix}^{-1} \\ = \begin{bmatrix} \Sigma_{F\Omega} + \mu_{F}\mu_{\Omega}^\top & ~~\mu_{F} \end{bmatrix} \begin{bmatrix} \Sigma_{\Omega\Omega}^{-1} & ~~-\Sigma_{\Omega\Omega}^{-1} \mu_{\Omega}\\ - \mu_{\Omega}^\top\Sigma_{\Omega\Omega}^{-1} & ~~1 + \mu_{\Omega}^\top \Sigma_{\Omega\Omega}^{-1} \mu_{\Omega}\\ \end{bmatrix} \\ = \begin{bmatrix} \Sigma_{F\Omega} \Sigma_{\Omega\Omega}^{-1} & ~~\mu_F - \Sigma_{F\Omega}\Sigma_{\Omega\Omega}^{-1}\ \mu_\Omega \end{bmatrix} = \begin{bmatrix} A^* & ~~b^*\end{bmatrix}. \end{multline*} Hence, the optimal regression coefficients and energy value are also given by: $$ A^* = \Sigma_{F\Omega} \Sigma_{\Omega\Omega}^{-1}, ~~~ b^* = \mu_F - A^* \mu_\Omega, ~~~ E(A^*,b^*) = \operatorname{tr}\left( \Sigma_{FF} - A^* \Sigma_{\Omega F} - b^* \mu_F^\top \right). $$ \section{Compactness Loss}\label{sup:sec3} We measure compactness as the average squared $L^2$ distance between pixels in the foreground region. We define $\mu = \sum_{u \in \Omega} u\cdot P(m_u=1|\Phi,I)$, where $P(m_i=1|\Phi,I)$ is the \textit{spatial} probability distribution function for the foreground mask implying $\sum_{u \in \Omega}P(m_u=1|\Phi,I) = 1$. \begin{center} \resizebox{.95\linewidth}{!}{ \begin{minipage}{\linewidth} \begin{align*} \label{e:compactness} \mathcal{L}_\text{cmp}(\Phi,I) &= \sum_{u,v \in \Omega} \|u - v\|^2\cdot w_{u}w_{v}, \text{where $w_{j} = P(m_j=1|\Phi,I) $} \\ &=\sum_{u,v \in \Omega} w_{u}w_{v}( \|u -\mu \|^2 + \langle u -\mu, \mu-v\rangle + \langle\mu-v, u -\mu\rangle+ \|\mu - v\|^2 ) \\ &=\sum_{u,v \in \Omega} w_{u}w_{v}( 2\|u -\mu \|^2 + 2\langle u -\mu, \mu-v\rangle ) \\ &=2\sum_{u,v \in \Omega} w_{u}w_{v}\|u -\mu \|^2 + 2\sum_{u,v \in \Omega} w_{u}w_{v}( \mu(u - \mu) - v(u - \mu)) \\ &=2\sum_{v \in \Omega} w_{v}\sum_{u \in \Omega}w_{u}\|u -\mu \|^2 + 2\mu\sum_{v \in \Omega} w_{v}\sum_{u \in \Omega}w_{u}(u - \mu) - 2\sum_{v \in \Omega} w_{v}v \sum_{u \in \Omega}w_{u}(u - \mu)) \\ &=2\sum_{u \in \Omega} w_{u}\|u -\mu \|^2 + 2\mu\sum_{u \in \Omega} w_{u}(u - \mu) - 2\mu\sum_{u \in \Omega} w_{u}(u - \mu)) \\ &=2\sum_{u \in \Omega} \|u -\mu \|^2 \cdot P(m_u=1|\Phi,I) \\ &\propto \sum_{u \in \Omega} \|u -\mu \|^2 \cdot P(m_u=1|\Phi,I) \end{align*} \end{minipage} } \end{center} \section{Additional Listing of Results}\label{sup:sec4} Here, we provide a further breakdown of our results. \cref{tab:supp_seq_davis}, \cref{tab:supp_seq_stv2}, and \cref{tab:supp_seq_fbms} show per sequence evaluation results on the video segmentation mode. Videos of the outputs accompany this supplemental material. For unsupervised object detection, we show some additional qualitative results for CUB in \cref{fig:unsup_seg_supp1}, DUT-OMRON in \cref{fig:unsup_seg_supp2}, DUTS in \cref{fig:unsup_seg_supp3}, and ECSSD in \cref{fig:unsup_seg_supp4}. Our model, trained on a combined dataset of DAVIS16\xspace,~FBMS59\xspace~and~STv2\xspace, is robust enough to handle a wide array of classes from the above datasets in varying context. Our model can segment both stationary and non-stationary objects and works well when multiple objects are in the foreground. In \cref{fig:unsup_seg_supp5}, we show a few failure cases for all datasets, where the model struggles mostly with ambiguous foreground objects and, in particular, with close-ups of stationary objects, e.g., signs (ECSSD) and buildings (DUT-OMRON). The model also has issues with boundaries for many objects, \textit{i}.\textit{e}.~ the foreground objects are correctly identified but the model fails to fully segment them. For example, in DUTS, the snake in the first image has a well segmented head, however, the model does not segment its body accurately. \input{tables/supp_uvos_table} \input{figures/supp_unsup_seg} \section*{Acknowledgements} S. C. is supported by a scholarship sponsored by Meta. L.~K. is funded by EPSRC Centre for Doctoral Training in Autonomous Intelligent Machines and Systems EP/S024050/1. C.~R. is supported by Innovate UK (project 71653) on behalf of UK Research and Innovation (UKRI). \clearpage {\small\bibliographystyle{plainnat}
\section{Introduction} Program synthesis is the task of automatically finding a program that satisfies the user intent expressed in the form of some specifications like input-output examples~\citep{Gulwani2017ProgramS}. Recently, there has been an increasing interest in tackling it using neural networks in various domains, including string manipulation~\citep{Gulwani2011AutomatingSP, Gulwani2012SpreadsheetDM, Devlin2017RobustFillNP}, list processing~\citep{Balog2017DeepCoderLT, Zohar2018AutomaticPS} and graphic applications~\citep{Ellis2018LearningTI, Ellis2019WriteEA}. Despite their promising performance, most of their success relies on the well-designed input-output examples, without which the performance of the program synthesis model drops heavily. \hdr{Traditionally, the input-output examples are selected elaborately.} For example, in Karel~\citep{Devlin2017RobustFillNP, Bunel2018LeveragingGA}, the given input-output examples are required to have a high branch coverage ratio on the test program; In list processing, the given input-output examples are guided by constraint propagation~\citep{Balog2017DeepCoderLT} to ensure their effectiveness on the test program. However, providing such input-output examples is unrealistic because it requires the users to be experienced in programming to describe the underlying program with several input-output examples. Worse, the users must be familiar with the distribution of the training dataset to prevent themselves from providing out-of-distribution examples~\citep{Shin2019SyntheticDF}. \hdr{Some researchers have tried to solve this problem by search or random selection to find counterexamples iteratively~\citep{Jha2010OracleguidedCP, Laich2020GuidingPS, Hajipour2020IReEnIR}. However, they do not model the similarity between the input-output examples and programs accurately, and thus the quality of the examples cannot be guaranteed. } In summary, how to generate informative input-output examples without expert experience is still an important problem that remains a challenge. In this paper, we propose a query-based framework to automatically and efficiently generate informative input-output examples from a large space, which means that the underlying program can be easily distinguished with these examples. \hdr{Inspired by the interactive program synthesis, the query-based framework trains a query neural network to generate informative input-output examples by querying the underlying program iteratively. Specifically, we firstly train a query network with programs and then use it to generate informative input-output examples. After that, we use these generated examples to train the program synthesis network.} \hd{This framework consists of two parts: the query network and the synthesis network, and each part is trained separately. The query network is trained to generate the input-output examples in an iterative manner, and then the synthesis network is trained to synthesize the program with the input-output examples generated by the query network.} It has three advantages: (1) There is no demand for well-designed input-output examples in both training and testing, which leads to a good generalization. (2) The query network works in an efficiently generative manner, which can essentially reduce the computation cost while facing problems with large input-output space. (3) The query network serves as a plug-and-play module with high scalability, for it is separated from the program synthesis process entirely. \begin{figure}[t] \begin{center} \includegraphics[width=\textwidth]{figures/framework2.pdf} \end{center} \caption{The query-based framework. The query network generates informative input-output examples by interacting with the user, and then the generated examples are sent to the synthesis network to synthesize the underlying program.} \label{fig:query} \end{figure} To train the query network, \hd{the key idea is to model the query process as a decision tree and find out that the informativeness of the input-output examples is associated with the amount of mutual information (\textit{i}.\textit{e}. the information gain in the decision tree) between the input-output examples and the programs, and thus the query network can be optimized by maximizing the mutual information. The mutual information can be approximated by the InfoNCE loss~\citep{Oord2018RepresentationLW}, which depends on the relevance between the samples. However, due to the many-to-many relationship between the input-output examples and the programs, the relevance is difficult to be measured straightforwardly.} To this end, we introduce the \textit{functional space (F-space)}\hdr{ and define the distance between programs in it}. In F-space, each program can be projected into a vector, and each input-output example corresponds to a set of candidate programs, which can be represented by a normal distribution~\citep{Sun2019InformationGeometricSE}. \hd{ Whenever a new example is queried, the new set of candidate programs is produced by the intersection of the two original sets of programs, and the new distribution is produced by the product of the two original distributions. The more the queried examples, the smaller the size of the program set, the lower the entropy of the distribution. With the InfoNCE loss and F-space, the query network is trained to generate the input-output examples whose F-space distribution can maximize the probability of the corresponding program and minimize the probability of the others. } \hdr{ The distance between two vectors indicates the functional difference between these two programs, so if two programs are projected into the same vector in the F-space, they are supposed to be functionally equivalent. Each input-output example corresponds to a set of program vectors, which can be represented by a normal distribution~\citep{Sun2019InformationGeometricSE} to make the representation continuous and differentiable. } \hdr{With the concept of information theory, we train the query network to generate queried input-output examples that maximize the probability of the corresponding program and minimize the probability of the others, resulting in the maximization of the mutual information between the queries and the corresponding programs.} \hdr{To optimize the query network, \hd{we show the connection between the query strategy and the mutual information}, and adopt the InfoNCE loss~\citep{Oord2018RepresentationLW} to maximize the mutual information during training.} \hd{Once the query network is trained, the training of the synthesis network is no different from what other researchers have done before, except that the input-output examples are generated by the query network.} We evaluate our method on the Karel task and the list processing task \hd{which have large input spaces}. Without utilizing the well-designed input-output examples both in training and testing, we achieve and even outperform the state-of-the-art performance on the Karel task and list processing task, which shows the effectiveness and generalization of our query-based framework. \section{Problem Statement} \label{sec:overview} Intuitively, consider an oracle that contains some kind of symbolic rules (\textit{e}.\textit{g}. programs), our goal is to discover these symbolic rules inside this oracle. To do this, the traditional program synthesis assumes that the oracle can provide some informative signals \hd{(\textit{e}.\textit{g}. input-output examples)} automatically, based on which the synthesizer can find the rules. \hdr{However, this is a strong assumption on the oracle and cannot cover every situation.} \hd{However, this is a strong assumption with high requirements on the oracle that is impractical in many cases.} \hdr{In this work, we consider a more general problem called the query problem, that the informative signals are gained actively by querying the oracle, and the only requirement for the oracle is that it can respond to all kinds of queries (including meaningless ones).} \hd{In this work, we consider a query problem where the informative signals are gained actively by querying the oracle under a much weaker assumption that the behavior of the oracle is deterministic (\textit{i}.\textit{e}. the same input always results in the same output). } \hdr{The crux of this query problem is, how to generate queries that can help us to identify the underlying rules in the oracle efficiently?} \hd{Following the intuition, a reasonable solution for the query problem would be "making the programs distinguishable with as few queries as possible". To make this statement concrete and practical, we introduce the following formulations.} \hdr{For the sake of illustration, consider the program synthesis task, the oracle corresponds to the underlying program $p^*$ that satisfies the user intent, and the $(query, response)$ pairs correspond to the input-output examples $\llbracket{e}\rrbracket = \{(x_k, y_k)\}^K$. To measure different queries, we borrow the terminology "acquisition function" from Bayesian optimization. The acquisition function scores all possible queries and the query algorithm chooses the one with the highest score as the next query. We set the acquisition function to be the mutual information between the queries and the oracle $I(\llbracket{e}\rrbracket; p^*)$, maximizing which brings more information gain. Specifically, given input-output examples queried so far $\llbracket{e}\rrbracket_{t-1}=\{(x_1, y_1), (x_2, y_2), \cdots (x_{t-1}, y_{t-1})\}$, we train the query network to pick the query $x_t$ which obtains the response $y_t$ and can maximize $I(\llbracket{e}\rrbracket\cup\{(x_t, y_t)\};p^*)$. The mutual information is hard to calculate analytically. Thus, to approximate the $I(\llbracket{e}\rrbracket\cup\{(x_t, y_t)\};p^*)$, we adopt the InfoNCE~\citep{Oord2018RepresentationLW} and propose a novel way to model the relationship between programs and input-output examples called \textit{functional space (F-space)}. Before diving into the specific method, we will give a problem formulation to make our problem description more accurate.} \hdr{To lay a theoretical foundation of our query method, we give out the problem formulation as follows.} First, we define the functional equivalence, which is consistent with the definition of the equivalence of functions in mathematics. \begin{definition}[Functional equivalence] \label{def:functional equivalence} Let ${\mathbb{I}}$ be the input example domain containing all valid input examples, ${\mathbb{O}}$ be the output example domain containing all possible output examples, and ${\mathbb{P}}$ be the program domain containing all valid programs under the domain specific language (DSL), each program $p \in {\mathbb{P}}$ can be seen as a function $p: {\mathbb{I}} \rightarrow {\mathbb{O}}$. For two programs $p_i \in {\mathbb{P}}$ and $p_j \in {\mathbb{P}}$, $p_i$ and $p_j$ are functional equivalent if and only if $\forall x \in {\mathbb{I}}, p_i(x) = p_j(x)$. \end{definition} Using the concept of functional equivalence, we can formulate the program synthesis task: \begin{definition}[Program synthesis] Suppose there is an underlying program $p \in {\mathbb{P}}$ and $K$ input-output examples $\llbracket{e}\rrbracket = \{(x_k, y_k)| (x_k, y_k) \in {\mathbb{I}}\times{\mathbb{O}}, k=1\cdots K\}$ generated by it, the program synthesis task aims to find a program $\hat{p}$ which is functional equivalent to $p$ using $\llbracket{e}\rrbracket$. \end{definition} Following the definitions above, we can define the task of the query. \begin{definition}[Query] \label{def:query} Given a program $p \in {\mathbb{P}}$ and a set of history $K$ input-output examples $\llbracket{e}\rrbracket$, the query process firstly generates a query by the query network $f_q$: $x_{K+1} = f_q(\llbracket{e}\rrbracket) \in {\mathbb{I}}$. Then, a corresponding response is given by the program $y_{K+1}=p(x_{K+1}) \in {\mathbb{O}}$. The query and response are added to the history input-output examples: $\llbracket{e}\rrbracket \leftarrow \llbracket{e}\rrbracket \cup \{(x_{K+1}, y_{K+1})\}$ and this process repeats. \end{definition} The query process aims to distinguish the underlying program with as few queries as possible\hd{, based on which we can define the optimal query strategy. \begin{definition}[The optimal query strategy] \label{def:optimal query2} Given a set of programs ${\mathbb{P}}$ and a target program $p^*$, the optimal query strategy $Q$ aims to distinguish the $p^*$ by generating as few input-output examples $\llbracket{e}\rrbracket$ as possible. \end{definition} When the query space is large, it is impractical to find the optimal query strategy by direct search. Thus, we take the query process as the expansion of a decision tree where the leaves are the programs, the nodes are the queries, and the edges are the responses, and then the generation of queries can be guided by the information gain, which is also known as the mutual information: \begin{equation} \label{equ:query and mi} \begin{aligned} \llbracket{e}\rrbracket^* &= \mathop{\arg\max}\limits_{\llbracket{e}\rrbracket} I({\mathbb{P}};\llbracket{e}\rrbracket), \end{aligned} \end{equation} } \section{Methods} \label{sec:methods} \hdr{The query network and the synthesis network are trained separately. The query network is trained to find the query contains that is most informative, and after that, the synthesis network is trained to predict the corresponding program using the queried input-output examples. In the following, first, we introduce the F-space to model the similarity between the input-output examples and programs, and then, we illustrate how to train the query network with F-space.} \hd{ The mutual information is hard to calculate due to the large spaces of queries and programs. To this end, we resort to the InfoNCE loss~\citep{Oord2018RepresentationLW} which estimates the lower bound of the mutual information: \begin{equation} \label{equ:loss} L_{NCE} = -\mathbb{E}[log(\frac{exp(f(\llbracket{e}\rrbracket, p_n))}{\sum_{i=1}^N exp(f(\llbracket{e}\rrbracket, p_i))})], \end{equation} and \begin{equation} I({\mathbb{P}};\llbracket{e}\rrbracket) \geq log(N)-L_{NCE}, \end{equation} where $f(\cdot, \cdot)$ denotes a relevance function. Maximizing the mutual information is equivalent to minimizing $L_{NCE}$. Intuitively, InfoNCE maximizes the relevance between the positive pairs and minimizes the relevance between the negative pairs. Specifically, for a batch of data $\{(\llbracket{e}\rrbracket_n, p_n), p_n\}^N$, we construct positive pairs as $\{(\llbracket{e}\rrbracket_i, p_i)\}$ and negative pairs as $\{(\llbracket{e}\rrbracket_i, p_j)|i\neq j\}$. Traditionally, the relevance is defined as the dot product of the samples, which may be inaccurate for the many-to-many relationship between the input-output examples and the programs. Thus next, we will introduce \textit{functional space (F-space)} to model the relationship properly.} \begin{figure}[t] \begin{center} \includegraphics[scale=.42]{figures/f-space2.pdf} \end{center} \caption{The illustration of F-space. Left: The projection of the input-output examples $\llbracket{e}\rrbracket$ and program $p$; Middle: The subset relationship between $\llbracket{e}\rrbracket_i$ and $\llbracket{e}\rrbracket_j$. Note that this relation is opposite in F-space; Right: The union operation of $\llbracket{e}\rrbracket_i$ and $\llbracket{e}\rrbracket_j$. This operation is also opposite in F-space where an union operation correspond to an intersection operation in F-space.} \label{fig:f-space} \end{figure} \subsection{F-space} \hdr{To model the query process with a neural network, we propose the \textit{functional space (F-space)}.} \begin{definition}[F-space and functional distance] \label{def:f-space} F-space is a $|{\mathbb{I}}|$ dimensional space which consists of all valid programs that can be implemented by program domain ${\mathbb{P}}$. Each program is represented by $|{\mathbb{I}}|$ different output examples ${\bm{v}}=(y_1, y_2, \dots, y_{|{\mathbb{I}}|})$. The distance in F-space can be measured by the number of different output examples: $d({\bm{v}}_i, {\bm{v}}_j) = |diff({\bm{v}}_i, {\bm{v}}_j)|$. \end{definition} Intuitively, F-space $({\mathbb{P}}, d)$ measures the functional differences between programs. Each program can be represented by a vector in F-space, and if different programs are represented by the same vector ${\bm{v}}=(y_1, y_2, \dots, y_{|{\mathbb{I}}|})$, it indicates that these two programs get the same results for all inputs, and they are considered to be functionally equivalent. This is also consistent with Definition~\ref{def:functional equivalence}. In practice, a space with dimension $|{\mathbb{I}}|$ is too large to compute, and thus we utilize the sparsity of F-space and learn an approximate space with dimension reduction by neural networks. Regarding input-output examples, representing them by vectors is not appropriate. Consider a set of input-output examples $\llbracket{e}\rrbracket=\{(x_k, y_k)\}^K$, we cannot find a vector that represents it when $K<|{\mathbb{I}}|$ because there are more than one programs that satisfies these $K$ input-output examples. \hdr{For example, when there is only one input-output example $\llbracket{e}\rrbracket=\{(2, 4)\}$, we cannot distinguish the underlying program $y=2x$ from $y=x^2$.} Formally, we summarize the properties of the representation of input-output examples in F-space as follows: \begin{itemize} \item Each set of input-output examples $\llbracket{e}\rrbracket=\{(x_k, y_k)\}^K$ should be represented by a set of F-space vectors $\llbracket{r}\rrbracket=\{{\bm{v}}_n\}^N$. \item For two sets of input-output examples $\llbracket{e}\rrbracket_i$ and $\llbracket{e}\rrbracket_j$, if $\llbracket{e}\rrbracket_i\subseteq\llbracket{e}\rrbracket_j$, then their F-space representations $\llbracket{r}\rrbracket_i$ and $\llbracket{r}\rrbracket_j$ have the relationship $\llbracket{r}\rrbracket_i\supseteq\llbracket{r}\rrbracket_j$. \item For two sets of input-output examples $\llbracket{e}\rrbracket_i$ and $\llbracket{e}\rrbracket_j$, suppose $\llbracket{e}\rrbracket'=\llbracket{e}\rrbracket_i\cap\llbracket{e}\rrbracket_j$, then in F-space, their corresponding representations have the relationship $\llbracket{r}\rrbracket'=\llbracket{r}\rrbracket_i\cup\llbracket{r}\rrbracket_j$ \item Similarly, if $\llbracket{e}\rrbracket'=\llbracket{e}\rrbracket_i\cup\llbracket{e}\rrbracket_j$, then in F-space, their corresponding representations have the relationship $\llbracket{r}\rrbracket'=\llbracket{r}\rrbracket_i\cap\llbracket{r}\rrbracket_j$ \end{itemize} \hdr{ Representing input-output examples by sets satisfies all these properties already. However, to optimize the representation using neural networks, we need to make it continuous and differentiable. Thus, we model the representation of $\llbracket{e}\rrbracket$ in F-space as a Normal distribution~\citep{Ren2020BetaEF, Sun2019InformationGeometricSE}, and the probability of the distribution indicates the possibility that it is the underlying program to be synthesized given input-output examples $\llbracket{e}\rrbracket$. We illustrate the projection, the subset relationship, and the union/intersection operation of distributions in Figure~\ref{fig:f-space}.} \hd{ Additionally, this representation should be differentiable and thus can be optimized by neural networks. To this end, we model the representation of $\llbracket{e}\rrbracket$ as a Normal distribution~\citep{Ren2020BetaEF, Sun2019InformationGeometricSE}, where the probability of the distribution indicates the possibility that it is the underlying program to be synthesized given input-output examples $\llbracket{e}\rrbracket$. We illustrate the projection, the subset relationship, and the union/intersection operation of distributions in Figure~\ref{fig:f-space}.} Under this representation, the query process becomes the process of reducing the uncertainty of the distribution. \hdr{As described in Section~\ref{sec:overview}, the query process aims to distinguish the underlying program with as few queries as possible. In F-space, the equivalent description is, the training of the query network aims to find F-space using as few queries as possible.} To train the query network, we define several neural operators for the neural network training as follows. \paragraph{Program projection.} To project a program $p$ to a vector ${\bm{v}}$ in F-space, we traditionally use a sequence model as our encoder: \begin{equation} \label{equ:encoder p} {\bm{v}} = Encoder_p(p) . \end{equation} Note that the program synthesis model differs largely on different datasets, so we choose to vary our program encoder according to the specific program synthesis models on different datasets. In practice, our program encoder is the reverse of the program synthesis decoder. \paragraph{Input-output example projection.} Given a single input-output example $\llbracket{e}\rrbracket=\{(x, y)\}$, we can project it into a Normal distribution using the same architecture of the corresponding program synthesis model, except that we add an MLP to output the two parameters of the Normal distribution: ${\bm{\mu}}$ and $log(\bm{\sigma}^2)$. \begin{equation} \label{equ:encoder e} [{\bm{\mu}}, log(\bm{\sigma}^2)] = MLP_e(Encoder_e(\llbracket{e}\rrbracket)) , \end{equation} where $MLP$ means a multi-layer perceptron. \paragraph{Input-output examples intersection.} Given $K$ input-output examples $\llbracket{e}\rrbracket=\{(x_k, y_k)\}^K$, each example $\{(x_k, y_k)\}$ is represented by a Normal distribution $Pr_k = \mathcal{N} ({\bm{\mu}}_k, \bm{\sigma}_k)$ using the projector above. The purpose of the intersection is to aggregate these Normal distributions into a new one, which represents $\llbracket{e}\rrbracket$ in F-space. Under the assumption of independence, the probability of the intersection distribution should be: \begin{equation} Pr_{\llbracket{e}\rrbracket} = \prod_{k=1}^K Pr_k . \end{equation} Fortunately, the product of independent Normal distributions is still a Normal distribution, which means that we can represent it as $[{\bm{\mu}}', log(\bm{\sigma}'^2)]$. In practice, we utilize the attention mechanism with another MLP to let the neural network learn the new Normal distribution~\citep{Ren2020BetaEF}: \begin{equation} \label{equ:intersection} [{\bm{\mu}}', log(\bm{\sigma}'^2)] = \sum_{i=1}^K w_i[{\bm{\mu}}_i, log(\bm{\sigma}_i^2)] , \end{equation} \begin{equation} \label{equ:weight} w_i = \frac{exp(MLP_{attention}([{\bm{\mu}}_i, log(\bm{\sigma}_i^2)]))}{\sum_{j=1}^K exp(MLP_{attention}({\bm{\mu}}_j, log(\bm{\sigma}_j^2)))} . \end{equation} This formulation not only keeps the form of distributions closed but also approximates the mode of the effective support of Normal distributions, which satisfies our requirement on the intersection of distribution~\citep{Sun2019InformationGeometricSE}. \hd{ We give detailed proof on the reasonability of doing this in Appendix~\ref{app:product of normals}. } \paragraph{Inverse projection to query.} Finally, we need to generate a new query from the representation of input-output examples in F-space. Using the projection and the intersection operation mentioned above, we can project the K input-output examples into the representation $[{\bm{\mu}}', log(\bm{\sigma}'^2)]$. To generate query $x_{new}$ from this representation, we introduce a decoder which has a similar architecture to $Encoder_e$ but reversed: \begin{equation} \label{equ:decoder} x_{new} = Decoder([{\bm{\mu}}', log(\bm{\sigma}'^2)]) . \end{equation} With these operators, we can model the relevance between input-output examples and programs as the probability in the distributions in F-space, and rewrite the loss in Equation~\ref{equ:loss} as \begin{equation} L_{NCE} = -\mathbb{E}[log(\frac{exp(\mathcal{N} (p_n;{\bm{\mu}}', \bm{\sigma}'))}{\sum_{i=1}^N exp(\mathcal{N} (p_i;{\bm{\mu}}', \bm{\sigma}')})], \end{equation} Next, we will introduce how to train the neural network. \begin{figure}[t] \begin{center} \includegraphics[scale=.5]{figures/rnn2.pdf} \end{center} \caption{The recurrent training process.} \label{fig:process} \end{figure} \subsection{Training} As mentioned above, the query network is optimized by maximizing the mutual information. \hd{ We observe that taking previous query examples as the condition and only optimizing the query strategy at the current query step is a greedy optimization, which may fail into the local minima more easily. An example is shown in Appendix~\ref{app:recurrent}. Thus, a recurrent training process is adopted to grep the global mutual information on every step instead of the mutual information conditioned on the previous examples. See Figure~\ref{fig:process} and Algorithm~\ref{alg:train}. } \hdr{Furthermore, to generate queries successively, a recurrent training process is used to generate queries progressively. As definition~\ref{def:query} says, each time a query is generated, we feed it into the underlying program and get a response. Then, we add the query and response to the input-output examples and send it to the query network to get the next query. The training process is shown in Figure~\ref{fig:process} and Algorithm~\ref{alg:train} (Appendix~\ref{app:algorithm}).} \hdr{ To optimize the query network, we utilize the technique in information theory to maximize the mutual information between the input-output examples $\llbracket{e}\rrbracket$ and the corresponding program $p$. Specifically, for a batch of data $\{(\llbracket{e}\rrbracket_n, p_n), p_n\}^N$, we construct positive pairs $\{(\llbracket{e}\rrbracket_i, p_i)\}$ and negative pairs $\{(\llbracket{e}\rrbracket_i, p_j)|i\neq j\}$. Then, we use the InfoNCE loss~\citep{Oord2018RepresentationLW} to maximize the lower bound of the mutual information between the input-output examples $\llbracket{e}\rrbracket$ and the corresponding program. \begin{equation} \label{equ:loss} L = -log(\frac{exp(f(\llbracket{e}\rrbracket_i, p_i))}{exp(f(\llbracket{e}\rrbracket_i, p_i)+\sum_{i\neq j}exp(f\llbracket{e}\rrbracket_i, p_j)}), \end{equation} where $f(\cdot, \cdot)$ denotes a relevance function. Intuitively, InfoNCE maximizes the relevance between positive pairs and minimizes the relevance between negative pairs. In F-space, we choose $f(\llbracket{e}\rrbracket_i, p_j)$ to be the possibility of $p_j$ in the $\llbracket{e}\rrbracket_i$'s distribution. That is, suppose the neural network project $\llbracket{e}\rrbracket_i$ to $\mathcal{N} ({\bm{\mu}}, log(\bm{\sigma}^2))$ and $p_j$ to ${\bm{v}}$, then $f(\llbracket{e}\rrbracket_i, p_j) = \mathcal{N} ({\bm{v}}; {\bm{\mu}}, \bm{\sigma}))$, which denotes the probability of ${\bm{v}}$ under the Normal distribution with parameters ${\bm{\mu}}$ and $log(\bm{\sigma}^2)$.} Additionally, like the task of sequence generation, we need an input-output example to act as the start signal $<sos>$. However, different datasets differ largely in program synthesis, which makes the design of a universal start signal difficult. Thus, we design specific start signals for each dataset separately. For example, in Karel, the signal is designed to be an empty map with the robot at the center of the map; In list processing, the signal is just three lists full of \textit{NULL}. More training details such as the network architectures, the processing of datasets, training tricks, can be seen in Appendix~\ref{app:A}. \section{Experiments} We studied three problems in our experiments. (1) The metric that is reasonable in our query-based framework. (2) The performance of the query-based framework. (3) The generalization ability on different tasks of the query-based framework. To do this, first, we demonstrate a comparison among several program synthesis metrics. Then, we present our results of the query on the Karel dataset and the list processing dataset to show our methods' performance and generalization ability. \subsection{metrics} \label{sec:metrics} There are three metrics in neural program synthesis. \begin{itemize} \itemsep0.1em \item \textbf{Semantics}: Given 5 input-output examples, if the predicted program satisfies all these examples, then it is semantically correct. \item \textbf{Generalization}: Given 5 input-output examples and a held-out input-output example, if the predicted program satisfies all 6 examples, then it is generally correct. \item \textbf{Exact match}: If the predicted program is the same as the ground-truth program, then it matches the ground-truth exactly. \end{itemize} Among them, the exact match is the most strict metric and generalization is the second one. In practice, the exact match has its drawback in that the predicted program may be different from the ground-truth program, but they are functionally equivalent. Thus, the performance is measured by generalization on Karel and semantics on list processing traditionally. However, generalization is not appropriate here for two reasons: (1) It can only measure the performance of the program synthesis process instead of the query process. In the query process, the network chooses input-output examples independently, and judging them by the held-out example is meaningless. (2) Even for the program synthesis process without query, generalization is not strict enough. The program that satisfies a small set of input-output examples may fail on a larger set of input-output examples. Thus, the best choice is to use \textit{functional equivalence} as our metric. Unfortunately, the judgment of functional equivalent is a notoriously difficult problem which makes it hard to be applied in evaluation. To alleviate this problem, we generate 95 held-out input-output examples randomly to achieve a higher branch coverage than 1 held-out example, and make the generalization on these examples a proxy of the functional equivalence: \begin{itemize} \itemsep0.1em \item \textbf{Functional equivalence (proxy)}: Given 5 input-output examples and 95 held-out input-output examples, if the predicted program satisfies all 100 examples, then it is functional equivalent to the ground-truth program. \end{itemize} \begin{wraptable}{r}{.53\textwidth} \begin{center} \resizebox{.53\textwidth}{!}{ \begin{tabular}{l|lll} & \multicolumn{1}{c}{\bf Semantics} & \multicolumn{1}{c}{\bf Generalization} &\multicolumn{1}{c}{\bf FE} \\ \hline &&&\\ Branch coverage & 86.57\% & 87.99\% & 97.58\% \\ \end{tabular}} \end{center} \caption{The branch coverage of semantics, generalization and functional equivalence (FE).} \label{table:branch coverage} \end{wraptable} To illustrate the difference between functional equivalence and generalization further, we measured the average branch coverage of these two metrics on Karel's validation set. Given a set of input-output examples, branch coverage evaluates the percentage of program branches that are covered by the examples. The result is shown in Table~\ref{table:branch coverage}. Functional equivalence outperforms generalization by nearly 10\%, which indicates that functional equivalence can represent the correctness of the predicted program much better than generalization. \subsection{Karel task} Karel is an educational programming language used to control a robot living in a 2D grid world~\citep{pattis1981karel}. The domain-specific language (DSL) and other details are included in Appendix~\ref{app:karel}. \paragraph{Settings.} Following Section~\ref{sec:methods}, we split the training process into the training of the query network and the training of the synthesis network. For the query network, we set $Encoder_e$ the same as the one of \cite{Bunel2018LeveragingGA} except for the output layer, and $Encoder_p$ a two-layer LSTM (see details in Appendix~\ref{app:train}). For the synthesis network, all settings stay unchanged as in the original program synthesis method. We report the top-1 results with beam size 100 for \cite{Bunel2018LeveragingGA} and 64 for \cite{Chen2019ExecutionGuidedNP} which is the default setting for validation in the original code. As in Section~\ref{sec:metrics}, exact match and functional equivalence are more appropriate than other metrics in the query task, so we save the checkpoints based on the best exact match instead of the best generalization (for the computation inefficiency of functional equivalence), which may cause differences in our baseline reproduction. We generate the dataset with 5 input-output examples using three different methods: randomly selected (random), baseline models (well-designed), and our method (query). Then, we train the synthesis network on these datasets with two state-of-the-art methods: \cite{Bunel2018LeveragingGA} and \cite{Chen2019ExecutionGuidedNP}. Note that there is a slight difference between the program simulators used by them which will give different responses during the query process, and we choose the one in \cite{Bunel2018LeveragingGA} as ours. \paragraph{\hd{Dataset} Performance.} Table~\ref{table:karel query} presents the performance of the trained synthesis networks, from which we can conclude that (1) The queried dataset performs well on both two training methods, indicating that the query process is totally decoupled with the synthesis process and has a high generality. (2) Our query method gets comparable results with both baseline methods and largely outperforms the random selection method with more than 10\%, which shows its effectiveness. \begin{wrapfigure}{r}{.59\textwidth} \begin{center} \includegraphics[scale=.29]{figures/result_linan2.pdf} \end{center} \caption{The query performance of different methods.} \vspace{-1mm} \label{fig:progressive} \end{wrapfigure} \begin{table}[t] \vspace{-1mm} \caption{The performance of the program synthesis model trained on input-output examples generated by different methods on the Karel task.} \vspace{-5mm} \begin{center} \resizebox{\textwidth}{!}{ \begin{tabular}{l|lll|lll} \multirow{2}*{\bf Metric} & \multicolumn{3}{c|}{\bf \cite{Bunel2018LeveragingGA}} & \multicolumn{3}{c}{\bf \cite{Chen2019ExecutionGuidedNP}}\\ &\multicolumn{1}{c}{\bf Random} &\multicolumn{1}{c}{\bf Well-designed} &\multicolumn{1}{c|}{\bf Query} &\multicolumn{1}{c}{\bf Random} &\multicolumn{1}{c}{\bf Well-designed} &\multicolumn{1}{c}{\bf Query} \\ \hline &&&&&&\\ Exact match & 29.44\% & 41.16\% & 41.12\% & 26.08\% & 37.36\% & 38.68\% \\ Functional equivalence & 33.08\% & 48.52\% & 46.64\% & 32.28\% & 47.60\% & 48.48\% \\ \end{tabular} } \end{center} \label{table:karel query} \end{table} \paragraph{Comparison on query.} We also compared our method with query by committee (QBC)~\cite{DBLP:conf/colt/SeungOS92} as another baseline, shown in Figure~\ref{fig:progressive}. In QBC, we sample queries based on their diversity. That is, we generate program candidates by beam search, and then select the query that can result in the most diverse outputs on these program candidates. The diversity is measured by the output equivalence. Algorithm details can be seen in Appendix~\ref{app:qbc}. There are two strategies based on QBC: Crash-aware, which repeats the algorithm to sample another one if the query crashes; And crash-unaware, which samples queries regardless of the crash problem (see Appendix~\ref{app:karel} for a detailed explanation of crashes). QBC-crash-unaware performs worse than Random because Random is chosen by filtering crashed IOs while QBC-crash-unaware may contain crashes. QBC-crash-aware performs much better than QBC-crash-unaware because it queries the underlying program multiple times to make sure that the query will not result in a crash, which is unfair. Even though, out method still outperforms QBC-crash-aware, which shows its advantage. \paragraph{Training process.} \begin{figure}[t] \begin{center} \includegraphics[scale=.43]{figures/result_5io2.pdf} \end{center} \caption{The training curve of the program synthesis model on Karel.} \label{fig:training curve} \end{figure} \begin{table}[t] \caption{The performance of the program synthesis model trained on input-output examples generated by different methods on the list processing task.} \begin{center} \resizebox{\textwidth}{!}{ \begin{tabular}{l|l|lll|lll} \multirow{2}*{\bf Dataset} &\multirow{2}*{\bf Metric} & \multicolumn{3}{c|}{\bf Searching for semantics} & \multicolumn{3}{c}{\bf Searching for exact match}\\ &&\multicolumn{1}{c}{\bf Random} &\multicolumn{1}{c}{\bf Well-designed} &\multicolumn{1}{c|}{\bf Query} &\multicolumn{1}{c}{\bf Random} &\multicolumn{1}{c}{\bf Well-designed} &\multicolumn{1}{c}{\bf Query} \\ \hline &&&&&&\\ \multirow{2}*{$D_1$} & Exact match & 20.07\% & 32.81\% & 22.26\% & 50.65\% & 81.21\% & 81.56\% \\ & Functional equivalence & 52.03\% & 80.26\% & 68.20\% & 50.65\% & 81.21\% & 81.56\% \\ \hline &&&&&&\\ \multirow{2}*{$D_2$} & Exact match & 9.25\% & 15.72\% & 10.44\% & 22.61\% & 38.51\% & 38.63\% \\ & Functional equivalence & 24.49\% & 39.88\% & 32.94\% & 22.61\% & 38.51\% & 38.63\% \\ \end{tabular} } \end{center} \label{table:list query} \end{table} To do a further study, we plot the training curve in Figure~\ref{fig:training curve}. It is shown that the Query dataset always has a quick start, which indicates that the query method can extract the features of the distinguishable programs effectively and makes them easier to be synthesized. \subsection{List Processing Task} To show the generalization ability of the query method, we conduct another experiment on the list processing task. The list processing task takes 1-3 lists or integers as the input example, and then produces a list or an integer as the output example. More details can be seen in Appendix~\ref{app:list}. \paragraph{Settings.} Following PCCoder~\citep{Zohar2018AutomaticPS}, we generate two datasets with program length 4 as dataset $D_1$ and program length up to 12 as dataset $D_2$. We set the $Encoder_e$ of the query network similar to PCCoder except for an MLP, and use a single layer LSTM as the $Encoder_p$ (see Appendix~\ref{app:train}). The synthesis network and the parameters of complete anytime beam search (CAB)~\citep{Zhang1998CompleteAB} stay the same as PCCoder, except that the maximum time is set to 5 seconds instead of 5,000 seconds for reality. Similar to the Karel task, we generate the dataset with 5 input-output examples with three different methods. Furthermore, we use two end conditions of CAB: The searching ends when all input-output examples are satisfied (searching for semantics), and the searching ends when all statements are true (searching for exact match). \paragraph{Performance.} The results are presented in Table~\ref{table:list query}, from which we can conclude that: (1) Our query method results higher than well-designed input-output examples in searching for the exact match and consistently outperforms the random. (2) When the length of programs increases, the performance decreases largely. This results from the original algorithm of PCCoder that the intermediate variables are difficult to be saved when the ground-truth program is long. However, the query method decreases slower than others, and the gap between the well-designed and the query is closed largely. \section{Related Work} \paragraph{Programming by examples.} Synthesizing a program that satisfies the user intent using the provided input-output examples is a challenging problem that has been studied for years~\citep{Manna1971TowardAP, Lieberman2001YourWI, SolarLezama2006CombinatorialSF, Gulwani2011AutomatingSP, Gulwani2012SpreadsheetDM}. Recently, with the development of Deep Learning, more researchers tend to tackle this problem with neural networks in a variety of tasks, including string transformation~\citep{Devlin2017RobustFillNP}, list processing~\citep{Balog2017DeepCoderLT, Zohar2018AutomaticPS}, graphic generation~\citep{Ellis2018LearningTI, Tian2019LearningTI}, Karel~\citep{Devlin2017NeuralPM, Bunel2018LeveragingGA}, policy abstraction~\citep{Sun2018NeuralPS, Verma2018ProgrammaticallyIR} and so on. Additionally, techniques like program debugger~\citep{Balog2020NeuralPS, Gupta2020SynthesizeEA}, traces~\citep{Chen2019ExecutionGuidedNP, Shin2018ImprovingNP, Ellis2019WriteEA}, property signatures~\citep{Odena2020LearningTR, Odena2021BUSTLEBP} are also used to improve the performance of program synthesis. However, their promising performance relies on the well-designed input-output examples which is a high requirement for users. If the examples provided are of poor quality, the performance will be affected severely. Worse, if out-of-distribution examples are provided, the program synthesis model cannot finish the task as expected~\citep{Shin2019SyntheticDF}. \paragraph{Interactive program synthesis.} Considering the high requirement of input-output examples, \cite{Le2017InteractivePS} build an abstract framework in which the program synthesis system can interact with users to guide the process of synthesis. Following this framework, multiple interactive synthesis systems are studied. Among them, \cite{Mayer2015UserIM}, \cite{Wang2017InteractiveQS}, and \cite{Laich2020GuidingPS} tend to find counter-examples as queries to the users in a random manner. Although they get rid of the restrictions on the users, the quantity of the input-output examples is not guaranteed, which may get the synthesis process into trouble. \cite{Padhi2018FlashProfileAF} select more than one query each time and let the users choose which one to answer. This brings an additional burden on the users, and the users are unaware of which query will improve the program synthesized most. Most recently, \cite{Ji2020QuestionSF} utilizes the minimax branch to select the question where the worst answer gives the best reduction of the program domain. Theoretically, the performance of the selection is guaranteed. However, this method is based on search and hardly be applied to tasks with large input-output space. Worse, the query process and the synthesis process are bound, which results in its poor scalability. In contrast, our method \hd{can be applied to problems with large spaces}, and the query process is decoupled with the synthesis process, which makes its application more flexible. \paragraph{Learning to acquire information.} Similar to our work, \cite{Pu2018SelectingRE} and \cite{DBLP:conf/uai/PuKS17} also study the query problem from an information-theoretic perspective. They show that maximizing the mutual information between the input-output examples and the corresponding program greedily is $1-\frac{1}{e}$ as good as the optimal solution that considers all examples globally. However, they assume that the space of queries can be enumerated, which limits the application of their query algorithm on complex datasets like Karel. By comparison, our work proposes a more general algorithm that can generate queries in a nearly infinite space. Other related work including active learning and black-box testing can be seen in Appendix~\ref{app:related work}. \section{Conclusion} In this work, we propose a query-based framework to finish the program synthesis task more realistically. \hd{To optimize this framework, we show the correlation between the query strategy and the mutual information.} Moreover, we model the relevance between the input-output examples and programs by introducing the F-space, where we represent the input-output examples as the distribution of the programs. Using these techniques, we conduct a series of experiments that shows the effectiveness, generalization, and scalability of our query-based framework. We believe that our methods work not only on the program synthesis tasks, but also on any task that aims to simulate an underlying oracle, including reverse engineering, symbolic regression, scientific discovery, and so on. \subsubsection*{Acknowledgments} This work is partially supported by the National Key Research and Development Program of China (under Grant 2020AAA0103802), the NSF of China (under Grants 61925208, 62102399, 62002338, 61906179, 61732020, U19B2019), Strategic Priority Research Program of Chinese Academy of Science (XDB32050200), Beijing Academy of Artificial Intelligence (BAAI) and Beijing Nova Program of Science and Technology (Z191100001119093), CAS Project for Young Scientists in Basic Research (YSBR-029), Youth Innovation Promotion Association CAS and Xplore Prize.
\section{Introduction} Computer simulations are one of the main methods to understand the nonlinear evolution of gaseous flows in accretion disks and other differentially rotating systems. However, following key local instabilities such as the magnetorotational instability (MRI) \citep{velikhov1959stability, chandrasekhar1960stability, fricke1969stability, balbus1991powerful} requires high resolution, which makes global simulations overly expensive. But the MRI is by no means the only instability of interest. For example, in protoplanetary disks, the Rossby wave instability appears \citep{Lovelace1999}, and radially stratified disks give rise to a variety of further instabilities that may drive turbulence in the disk \citep[e.g.][]{Klahr2014}. In the context of the interstellar medium, differential shear is also considered an important source of turbulence, but one that is challenging to capture accurately in global disk models as a result of the limited resolution available in such calculations. A general difficulty in the numerical treatment of rotationally supported gas flows lies in the ``coldness'' of the gas relative to the rotational bulk motion. The gas velocities in the rest frame of the disk are dominated by the coherent rotational motion and can be far higher than the involved sound speeds, making the flow formally highly supersonic. This causes small timesteps and large advection errors in standard finite-volume hydrodynamical grid codes. On the other hand, standard Lagrangian methods such as smoothed particle hydrodynamics (SPH) are prone to seed spurious instabilities in the disks due to their inherent, comparatively large numerical noise. An interesting alternative lies in the use of a local approximation \citep{hill1878collected} as realized in the shearing box approach, that was first applied in \citet{hawley1995local} to the MRI. The equations describing the evolution of the system are here expressed in a local, Cartesian reference frame that is co-rotating with the local angular velocity $\Omega_0 = \Omega(r_0)$ at a radius $r_0$ in the disk. This is typically combined with imposing periodic boundaries in the azimuthal direction (i.e. one overs only a region $\Delta y = r_0 \Delta \phi$), and a special `shear-periodic' boundary condition in the radial direction (i.e. one only covers a radial region $\Delta r$). The transformation to a non-inertial frame of reference leads to two new source terms compared to the standard ideal magnetohydrodynamical (MHD) equations: The Coriolis force and the centrifugal force. The latter can also be written as an effective gravity force, defined as the difference of the external gravitational force and the centrifugal force. This effective forces cancels for an equilibrium solution with a linear shear flow in the azimuthal direction, corresponding to a plain differential rotation in the disk. Fluid instabilities around this ``cold ground state'' can then be studied with high accuracy with Eulerian methods. The shearing box approximation is only valid as long as the size of the used box, $L_r = \Delta r$, is much smaller than $r_0$. As a result, it does not readily allow for measurements of global disk properties such as the net mass accretion rates, or radial density and temperature profiles \citep{regev2008viability}. Despite these limitations, it has become a very important standard method to analyze the nonlinear saturation of the MRI \citep{hawley1995local}. In particular, due to its much lower computational cost compared to global disk models, it allows the exploration of large parameter spaces, and thus ultimately yields important predictions for full simulations as well. For example, \cite{riols2018magnetorotational, riols2019gravitoturbulent} found that gravoturbulence can act as a dynamo and amplify MHD fields even in the presence of strong resistivity, a result later confirmed by \citet{deng2020global} using global simulations. So far simulations with the shearing box approximation have mostly employed Eulerian codes that require a special mapping of the fluid states at the radial boundary conditions. Examples for such implementations are the finite volume codes {\small ATHENA} \citep{stone2008athena, stone2010implementation}, {\small PLUTO} \citep{mignone2007pluto} and {\small RAMSES} \citep{fromang2006high}, or the finite difference codes {\small PENCIL} \citep{brandenburg2020pencil} and {\small ZEUS} \citep{stone1992zeusa, stone1992zeusb, hawley1995local}. Although Lagrangian methods have often been used for global disk simulations due to their lower advection errors, they have only rarely been used for shearing box simulations, despite the fact that they in principal allow for a translationally invariant implementation of the radial boundary conditions. One reason is that particle-based methods have problems sustaining MRI turbulence without a net magnetic field, as shown by \cite{deng2019local} with the {\small GIZMO} code \citep{hopkins2015new}. However, \citet{wissing2022magnetorotational} demonstrated recently that some SPH implementations are able to sustain the turbulence after all, which is a prerequisite for more complicated shearing box studies. In this work, we present the first implementation of the shearing box approximation in a moving-mesh code, specifically the {\small AREPO} code \citep{springel2010pur, weinberger2020arepo}, which can be viewed as a hybrid method between a static grid code and a Lagrangian particle method. A full implementation of the shearing box approximation consists of the source terms and a treatment of the special radial boundary conditions. In contrast to Eulerian codes, the moving-mesh approach allows a fully translationally invariant implementation of the radial boundary conditions at the discretized level of the equations, so that the radial boundaries are manifestly indistinguishable from interior regions of the flow. Another advantage is that the moving-mesh approach retains its ability to continuously and seamlessly adjust the local resolution, making it particularly suitable for calculations of fragmentation and local gravitational collapse. Interestingly, our results for the ground-state of the shearing-box show that the default version of {\small AREPO} produces comparatively large `grid-noise' errors when the mesh becomes geometrically completely unstructured due to strong local shear. We found that these errors can be eliminated, however, with a novel high-order flux integration that we develop as part of this paper. This paper is structured as follows: In Section~\ref{sec:OverViewArepo} we summarize the most important ingredients of the moving mesh method as currently implemented in {\small AREPO}. In Section~\ref{sec:implementationShearingBox} we present our implementation of the source terms and boundary conditions for the shearing box. We show in Section~\ref{sec:improvedArepo} that the vanilla version of {\small AREPO} leads to significant noise in the ground state, discuss several improvements that reduce this noise and show that they can also improve the results in other problems such as the simulation of a full cold Keplerian disk. In Section~\ref{sec:testProblems} we run several test problems for the shearing box and show that our implementation converges with close to second-order, as expected. Finally, we show in Section~\ref{sec:nonlinearMRI} that {\small AREPO} is able to sustain MRI turbulence for several hundred orbits without a background magnetic field and compare our results to those from \citet{shi2016saturation} obtained with the {\small ATHENA} code. In Section~\ref{sec:discussion} we summarize our results and present our conclusions. \section{Ideal magnetohydrodynamics in Arepo} \label{sec:OverViewArepo} The moving-mesh code {\small AREPO} \citep{springel2010pur, weinberger2020arepo} solves the ideal magnetohydrodynamical (MHD) equations on an unstructured Voronoi mesh using the finite volume method \citep{pakmor2011magnetohydrodynamics, pakmor2013simulations}. The computational mesh is constructed using mesh-generating points that can move with an arbitrary velocity, but which is typically close to the fluid velocity. Due to this movement, the Voronoi mesh changes its structure and topology in time and the method becomes manifestly Galilei-invariant when the mesh motion is tied to the fluid motion itself. The ideal MHD equations in differential form can be expressed as: \begin{equation} \frac{\partial \bm U}{\partial t} + \nabla \cdot \bm F(\bm U) = 0, \label{eq:idealMHDDifferential} \end{equation} which exposes the hyperbolic conservation law for the mass, momentum, energy and integrated magnetic field. $\bm U$ defines here the conserved quantities and $\bm F$ is the flux function. The flux function is defined in a local rest frame by: \begin{equation} \bm U = \begin{pmatrix} \rho \\ \rho \bm v \\ \rho e \\ \bm B\\ \end{pmatrix}, \;\;\;\;\;\; F(\bm U) = \begin{pmatrix} \rho \bm v\\ \rho \bm v \bm v^T + P -\bm B \bm B^T\\ \rho e \bm v + P \bm v -\bm B(\bm v \cdot \bm B)\\ \bm B \bm v^T -\bm v \bm B^T, \end{pmatrix}, \label{eq:idealMHDFlux} \end{equation} where $\rho$, $\bm v$, $e$, $\bm B$, $P$ are the density, velocity, total energy per mass, magnetic field strength and pressure, respectively. The total energy density $e = u + \frac{1}{2} \bm v^2 + \frac{1}{2 \rho} \bm B^2$ consists of the thermal energy per mass $u$, the kinetic energy density $\frac{1}{2} \bm v^2$ and the magnetic field energy density $\frac{1}{2 \rho} \bm B^2$. The pressure $P=p_{\rm gas} + \frac{1}{2}\bm B^2$ has a thermal and a magnetic component. The system of equations is closed by the equation of state (EOS), that expresses $p_{\rm gas}$ as a function of the other thermodynamical quantities. We shall adopt the usual ideal gas EOS, $p_{\rm gas} = (\gamma -1) \rho u$, with an adiabatic index $\gamma$. The ideal MHD equations fulfill the condition $\nabla \cdot \bm B = 0$ for all times if the initial field is divergence free. This property of the continuum equations is unfortunately lost in discretized versions of the equations, unless elaborate constrained transport formulations are used that can retain the divergence free conditions also at the discrete level. In this paper, we will instead use the Dedner scheme \citep{dedner2002hyperbolic} for divergence control as implemented in \cite{pakmor2011magnetohydrodynamics}. It diffuses away local deviations of the divergence constraint and damps them. We note that in many studies with {\small AREPO} the Powell scheme \citep{powell1999solution} as implemented in \cite{pakmor2013simulations} is used instead, but all results except those in Section~\ref{sec:nonlinearMRI} are insensitive to the details of the divergence cleaning. We therefore defer a comparison between the two methods in the context of the shearing box to a future paper. We set the parameter $c_h$ required in the Dedner approach to the maximum signal speed in the system, and choose $c_p=\sqrt{2 c_h r}$ in proportion to the cell radius $r$ (see \cite{pakmor2011magnetohydrodynamics} for details). The ideal MHD equations are discretized on the cells of the dynamic Voronoi mesh. Volume averages of the conserved quantities for a cell $i$ can be calculated by integrating $\bm U$ over the corresponding volume $V_i$: \begin{equation} \bm Q_i = \int_{V_i} \bm U. \end{equation} By integrating equation (\ref{eq:idealMHDDifferential}) over $V_i$ and applying Gauss's law we find for the change of $\bm Q_i$: \begin{equation} \frac{{\rm d} \bm Q_i}{{\rm d} t} = \int_{\partial V_i} \bm F(\bm U) \cdot \hat{n}. \end{equation} $\hat{n}$ is the outward normal on the surface $\partial V_i$ of cell $i$. The temporal evolution of $\bm Q_i$ over one time step of size $\Delta t$ can therefore be written as: \begin{equation} \bm Q_i^{n+1} =\bm Q_i^n + \int_{t_0}^{t_0 + \Delta t} {\rm d}t \int_{\partial V_i} \bm F(\bm U) \cdot \bm \hat{\bm n}. \label{eq:TimeIntegrationGeneral} \end{equation} The time integral is discretized in {\rm AREPO} using a second-order accurate hybrid between a Runge–Kutta method and the MUSCL-Hancock scheme \citep[see][]{pakmor2016improving}. By defining $\bm I(t) = \int_{\partial V_i} \bm F(\bm U) \cdot \bm \hat{\bm n}$, equation (\ref{eq:TimeIntegrationGeneral}) can be approximated by: \begin{equation} \bm Q_i^{n+1} = \bm Q_i^n +\frac{\Delta t}{2} \left[\bm I(t_0) + \bm I(t_0+ \Delta t)\right]. \end{equation} The integral $\bm I(t)$ can be expressed as a sum of integrals $\bm I_{ij}$ over all outer faces of the cell. Such a face integral is then approximated as \begin{equation} \bm I_{ij}(t) =\int_{A_{ij}} \bm F(\bm U) \cdot \hat{\bm n}_{ij} dA_{ij} \approx A_{ij} \bm F[\bm U(\bm f)] \cdot \hat{\bm n}_{ij}, \label{eq:approxIntegralMid} \end{equation} where $ \bm U(\bm f)$ is the state at the geometric centre $\bm f$ of the face, and $A_{ij}$ is the interface between cell $i$ and $j$. The state at the interface is taken as the solution of a Riemann problem with the (linearly extrapolated) state of the cells $i$ and $j$ at this point as input. These extrapolations are calculated based on a slope-limited piece-wise linear spatial reconstruction step in each cell. For the calculation of $\bm I(t+\Delta t)$, an additional first-order time extrapolation of the fluid states by $\Delta t$ is applied. This reconstruction is done using primitive variables for expressing the fluid state: \begin{equation} \bm W = \begin{pmatrix} \rho \\ \bm v \\ p_{\rm gas} \\ \bm B\\ \end{pmatrix}, \end{equation} which can be easily obtained from the conserved quantities. The gradients of the primitive variables are estimated using a least-square fit around every cell \citep[see][for details]{pakmor2016improving} and the reconstruction takes the following form for the left and right state: \begin{equation} \bm W_{L,R}' (t_0 + \Delta t) = \bm W_{L,R} (t_0)+ \at{\frac{\partial \bm W}{\partial \bm r}}{L,R} (\bm f - \bm s_{L,R}) + \at{\frac{\partial \bm W}{\partial t}}{L,R} \Delta t , \label{eq:reconstructionGeneral} \end{equation} where $\bm s$ is the center of mass of each cell. $\frac{\partial \bm W}{\partial t}$ is only required in the second flux calculation and can be obtained from the linearized ideal MHD equations: \begin{equation} \frac{\partial}{\partial t} \begin{pmatrix} \rho \\ \bm v \\ p_{gas} \\ \bm B\\ \end{pmatrix} = \begin{pmatrix} -\bm v \nabla \rho - \rho \nabla v \\ - \frac{\nabla P}{\rho} - \bm v \bm v^T + \bm B \cdot (\nabla \bm B) \\ - \gamma p_{gas} \nabla \cdot\bm v - \bm v \cdot\nabla P\\ \bm B \cdot (\nabla \bm v) - (\nabla \cdot \bm v) \bm B - \bm v \cdot (\nabla \bm B)\\ \end{pmatrix}. \label{eq:linearTimeExtrapolation} \end{equation} As detailed in \cite{pakmor2011magnetohydrodynamics} we first try, in consecutive order, the HLLD Riemann solver \citep{miyoshi2005multi}, the HLL solver \citep{harten1983upstream}, and in case both fail, the Rusanov solver \citep{rusanov1961calculation}. If the mesh itself is moving with velocity $\bm v_{m}$ one has to add the term $\bm U \bm v_{m}^T$ to the flux function. The velocity of a point on the interface can then be calculated as in \citet[][their eqn.~33]{springel2010pur}, to which we refer for more details. It only requires the local geometry of the two neighbouring cells of the interface as well as their velocities. The motion of the mesh generating points is typically kept as close as possible to the velocity of the fluid, but {\small AREPO} also adds small additional velocity corrections to improve the local regularity of the Voronoi mesh. We will refer to the latter as mesh regularisation in the following. As measure for the local mesh quality we use the maximum angle under which any cell face is seen by a mesh generating point, as described in full in \cite{vogelsberger2012moving, weinberger2020arepo}. Unless specified otherwise, we use the parameters $\beta =2$ and $f_{\rm shaping} = 0.5$ as defaults for this method. \begin{figure*} \centering \includegraphics[width=1\linewidth]{cartoonShearingCartesianGrid.png} \caption{The shearing of an initially Cartesian grid by the background flow (\ref{eq:groundState}). We define $T_{\rm period} = \Omega_0 / q$ as the time it takes to evolve the grid into a new Cartesian grid. During this time the geometry of the grid continuously changes while retaining a residual symmetry of the cells (see, e.g., the red colored cells).} \label{fig:cartoonShearingCartesianGrid} \end{figure*} \begin{figure} \centering \includegraphics[width=0.95\linewidth]{illustration_boundary_conditions.png} \caption{Illustration of the mesh construction for the shearing box boundary conditions in the $x$-direction: The inside of the yellow square represents the two-dimensional simulation domain. All cells whose mesh generating points (blue circles) lie in the box are primary cells, the other ones are so-called ghost cells arising as duplicates due to the boundary conditions. During the construction of the mesh, we need to repeatedly find all mesh-generating points that lie within a sphere of some radius $r$ around a mesh-generating point. These are in-circle tests for the circumspheres of triangles, carried out to make sure that the corresponding triangle is a valid Delaunay triangle of the tessellation (see as example the red circle around a cell colored in red). If this sphere intersects an $x$-boundary, we have to calculate an additional search position by shifting the $x$-coordinate by $\pm L_x$ and the y-coordinate by $\mp wt$, see eqn.~(\ref{eq:shearingBoxBoundaryConditions}). For this new position, another in-circle test has to be carried out, which may in turn return both primary points or other shifted ghost points. Note that in our example, the interface between the red and the green cell exists twice in the final tessellation: Once on the left hand side with the red cell as ghost cell, and once on the right side with the green one as ghost cell. It is however sufficient to calculate the corresponding fluxes, together with the boost of eqn.~(\ref{eq:fluxBoostBoundary}), only once. } \label{fig:illustration_boundary_conditions} \end{figure} \section{Implementation of the shearing box approximation} \label{sec:implementationShearingBox} The local shearing box approximation \citep{goldreich1965ii} solves the ideal MHD equations in a frame that is rotating with a frequency $\Omega_0 = \Omega(r_0)$ at radius $r_0$. Upon transformation into the non-inertial rotating system, the equations can be written in Cartesian coordinates $x$, $y$, and $z$, with corresponding units vectors $\bm \hat{e}_x$, $\bm \hat{e}_y$ and $\bm \hat{e}_z$, as: \begin{equation} \frac{\partial \bm U }{\partial t}+ \nabla \cdot \bm F(\bm U) = \bm S_{\rm grav} + \bm S_{\rm cor}. \label{eq:shearingBoxEquation} \end{equation} The left hand side is formally equivalent to equation~(\ref{eq:idealMHDDifferential}), and the flux is still given by (\ref{eq:idealMHDFlux}), but the coordinate transformation leads to two additional source terms for the momentum and energy equations. $\bm S_{\rm grav}$ contains one of the terms, the centrifugal force, as well as the external gravitational force expanded to first order in the $x$- and $z$-directions, while $\bm S_{\rm cor}$ represents the Coriolis force. Explicitly, they are given by: \begin{equation} \bm S_{\rm grav} = \begin{pmatrix} 0 \\ \rho \Omega_0^2 \left(2q x \bm\hat{e}_x - z \bm\hat{e}_z\right) \\ \rho \Omega_0^2 \bm v \cdot \left(2q x \bm\hat{e}_x - z \bm\hat{e}_z\right) \\ 0\\ \end{pmatrix} \end{equation} and \begin{equation} \bm S_{\rm cor} = \begin{pmatrix} 0\\ -2 \rho \Omega_0 \bm\hat{e}_z \times \bm v\\ 0\\ 0, \end{pmatrix}. \label{eq:shearingBoxSourceTerms} \end{equation} The term $\bm S_{\rm grav}$ depends on the shearing parameter \begin{equation} q = - \frac{1}{2} \frac{d \ln \Omega^2}{d \ln r}, \end{equation} which takes on the value $q=3/2$ for a Keplerian rotation curve. In the azimuthal $y$-direction one typically uses standard periodic boundary conditions. In the $z$-direction, one can use periodic boundary conditions in the case of an unstratified box (no gravitational term in the $z$-direction) or inflow-outflow boundary conditions for a stratified box (gravitational field towards the $z=0$ plane). The boundary conditions in the radial direction are more complicated and will be discussed separately below. We note that equation (\ref{eq:shearingBoxEquation}) admits a `ground state' solution with \begin{equation} \bm v_0(x) = (0,-q \Omega_0 x,0), \;\;\; \rho = {\rm const.}, \;\;\; P = {\rm const.}, \label{eq:groundState} \end{equation} in the unstratified case. For a global disk simulation, this is equivalent to the intrinsic radial dependence of the rotational velocity being given by $r\Omega(r)$ everywhere. \subsection{Implementation of the source terms} \label{subsec:sourceTermsImplementation} To implement the source terms we use a second-order accurate Strang splitting scheme, which means we first evolve the system for half a time step using the source terms, then for a full time step using the methods from Section~\ref{sec:OverViewArepo}, and then apply another half step for the source terms. We apply both source terms together and actually rewrite the momentum equation to: \begin{equation} \bm S_{\rm tot, mom} = \begin{pmatrix} 2 (v_y - v_{0,y})\rho \Omega_0 \\ -2 v_x \rho \Omega_0 \\ - \rho \Omega^2 z\\ \end{pmatrix}, \label{eq:shearingBoxsourceTermImplementation} \end{equation} because this term vanishes for the ground state solution. To conserve the total energy accurately we first subtract the kinetic energy from the total energy, apply the momentum source term and then add the new kinetic energy to the total energy. To avoid an unphysical growth of the amplitude of epicycle oscillations (see section \ref{sec:epicycleOsci}), we add a prediction step for the second half step of the source terms. In practice, this means we first apply the source term (\ref{eq:shearingBoxsourceTermImplementation}) for a half time step, calculate the new velocity and use this velocity for the actual update of the momentum. This method is similar to the implementation the of Crank-Nicholson time difference method in \cite{stone2010implementation}, which actually can conserve the amplitude to machine precision. \subsection{Boundary conditions} While we can use the standard implementation of periodic or inflow/outflow boundary conditions in the $y$- and $z$-directions, we have to take care of the background shear flow (\ref{eq:groundState}) in the $x$-direction. This leads to the so-called shearing box boundary conditions: \begin{equation} f(x,y,z,t) = f(x \pm L_x, y \mp w t, z,t); f= (\rho, \rho v_x, \rho v_z, \bm B), \end{equation} \begin{equation} \rho v_y(x,y,z,t) = \rho v_y(x \pm L_x, y \mp w t, z,t) \mp \rho w , \end{equation} \begin{equation} e(x,y,z,t) = e(x \pm L_x, y \mp w t, z,t) \mp \rho v_y v_w + \frac{\rho w^2}{2}, \end{equation} \label{eq:shearingBoxBoundaryConditions} where $L_x$ is the box size in the (radial) $x$-direction, and $w \equiv q \Omega_0 L_x$. To implement standard periodic boundary conditions, {\small AREPO} uses ghost cells. During the mesh construction, all cells closer than a specific radius $r$ to a cell have to be found. If this sphere of influence intersects a box boundary, the search will be continued on the opposite boundary of the box. The cells found there will be built into the local Voronoi mesh as a ghost cell at the original position of the cell shifted by one box length, and the properties of the original cell are copied to the ghost cell. Updates of the conserved quantities of such ghost cells are applied to the original cell \citep[for details of the mesh construction see][]{springel2010pur}. The creation of ghost cells may cause some cell interfaces to be duplicated in the constructed tessellation (in particular also if parallelization subdivides the fiducial global mesh into several logical pieces stored on different processors), but the fluxes are calculated always only once, such that the conserved quantities of both involved cells get updated only once in a manifestly conservative fashion. The radial shearing box boundary conditions can be treated very similarly with some extra modifications. First, if the search sphere overlaps with the box boundary, the centre of the search region does not only have to be shifted by $\pm L_x$ in the $x$-direction, but also by $\mp w t$ in the $y$-direction. When copying the properties of the original cell to the ghost cells, we have to add a velocity boost $\mp w$ to the $y$-component of the velocity, as well as to the velocity of the corresponding mesh generating point. The Riemann solver then returns the state $\bm U(\rho, \bm v, p,\bm B)$, which can then be used to calculate the flux $\bm F(\bm U)$ that is applicable to a real (unboosted) cell at the interface. If we are dealing with a ghost cell instead, the conserved quantities of the corresponding original cell need to updated with a modified flux: \begin{equation} \Delta \bm F = \bm F' (\bm U'(\rho, \bm v \pm w \hat{e}_y, p,\bm B)) \mp \bm U'(\rho, \bm v \pm w \hat{e}_y, \bm B) (w \bm \hat{e}_y)^T - \bm F(\bm U). \end{equation} $\bm U'$ is here the state we obtain by adding the velocity shift $ \pm w \hat{e}_y$ to $\bm U$. Using equation (\ref{eq:idealMHDFlux}) for the flux, this can explicitly be expressed as: \begin{equation} \Delta \bm F = \begin{pmatrix}0\\\ (0,\pm w Q_{1},0)\\ \pm Q_{2,y} w + 1/2 Q_1 w^2\\ (0,\mp w (\bm B \cdot \hat{n}),0)\end{pmatrix} \end{equation} with \begin{equation} \bm F(\bm U) = \begin{pmatrix}Q_1\\ (Q_{2,x},Q_{2,y},Q_{2,z})\\Q_3\\(Q_{4,x}, Q_{4,y}, Q_{4,z}) \end{pmatrix}, \label{eq:fluxBoostBoundary} \end{equation} where $\hat{n}$ is the normal of the interface. Note that this boost shows that in the shearing box approximation the momentum and energy are not conserved. Whereas the mean radial and vertical magnetic field, \begin{equation} \left< B_{x,z} \right> = \frac{\int_{\rm Box} B_{x,z} {\rm d}V}{\int_{\rm Box} {\rm d}V} = {\rm const.} \end{equation} are conserved, the azimuthal field grows linear with the net radial magnetic field flux through the radial boundary (\cite{gressel2007shearingbox}): \begin{equation} \frac{\partial \left < B_y\right>}{\partial t} = -\frac{w}{V}\int_{\partial x} B_x\, {\rm d}x \,{\rm d}y. \end{equation} For $\nabla \cdot \mathbf{B} = 0$, the last conditions also implies that $\left < B_y\right>$ is constant if there is no net radial field. On a moving mesh, cells can also leave the simulation box and reappear on the opposite side. If this happens in the $x$-direction, we also have to modify the $y$-position and velocity component of the cell, as well as its energy. \cref{fig:illustration_boundary_conditions} further illustrates the implementation of the boundary conditions during the mesh construction. We note that this implementation of the boundary conditions does not introduce any special treatment of the boundaries at the level of the flux calculation, and therefore the whole simulation box stays isotropic and translationally invariant. \section{Reducing numerical noise in Arepo} \label{sec:improvedArepo} In this section, we first test the accuracy of the shearing box implementation in {\small AREPO} when the default integration method of the code is used. As this exposes an unwanted level of `grid-noise' that can influence the growth of instabilities and act as a numerical viscosity, we then introduce several improvements to the code that substantially increase the achieved accuracy. \subsection{Simulations of the ground state of the shearing box} \label{subsec:groundStateSimulationOld} A conceptionally simple but nevertheless highly illuminating test case of the basic code performance lies in simulating the ground state (\ref{eq:groundState}) of the shearing box with an isothermal equation of state. This state should be stable (because the shearing motion is stabilized by the centrifugal force), and indeed, static grid codes are able to maintain this state to machine precision on a Cartesian grid. However, the free mesh motion of {\small AREPO} allows for the occurrence of diverse cell geometries, potentially introducing much larger deviations from the ground state. For testing this, we set up a two-dimensional box of size $L_x = L_y = 10$, density $\rho=1$, and an isothermal equation of state with sound speed $c_s = 1$ and $\Omega_0 = 1$. The initial mesh is created by two nested Cartesian grids with $200^2$ mesh-generating points, effectively creating a hexagonal mesh. We add to these positions of the mesh-generating points some random noise with a maximum of 5\% of the lattice constant of the grid, and set the velocity of the cells to the value of the ground state (\ref{eq:groundState}) at the centers of mass of the resulting mesh cells. In \cref{fig:groundStateDensityOld}, we show the time evolution of the computed density field. We see that the code is not able to stably keep the imposed ground state to machine precision, rather a time-dependent stripe pattern forms, apparently due to local noise peaks that are subsequently sheared away by the fluid motion. \begin{figure*} \centering \includegraphics[width=1.0\linewidth]{figure_density_old_method.png} \caption{The density field at different times in a two-dimensional calculation that simulates the ground state of the shearing box with an initially constant density, $\rho = 1$, using the old default version of the {\small AREPO} code, as described in Section~\ref{sec:OverViewArepo}. The simulation seeds small `grid-noise' at the level of $10^{-3}$ which is stretched by the shearing motion into vertically oriented bands. This effect cannot be eliminated by resorting to finer timestepping.} \label{fig:groundStateDensityOld} \end{figure*} Since there are no spatial scales in the problem that need to be resolved in the ground state, the only sources of error are of numerical origin. If they are related to the temporal discretization of the updates of the fluid state, the error in the density field should decrease with the size of the time step. However, if we rerun the simulation with different Courant coefficients (see also eqn.~\ref{eq:timeStepSize}) and compare the $L_1$ errors of the resulting density fields, we find that the error does not decrease with smaller time steps sizes, i.e.~it does not arise from truncation errors of the temporal discretization and will still be present even for arbitrarily small timesteps. This raises the suspicion that the errors are directly related to the unstructured cell geometries used in our calculation. To test for this possibility, we run our code with a static grid, although this requires a special trick to deal with the shearing box boundary conditions because the approach used for this purpose in Eulerian codes is not implemented in our moving-mesh approach. However, we can still compute test simulations of the shearing box with a static mesh by defining buffer zones on both sides of the simulation domain close to the boundaries in the $x$-direction. In every time step, we then simply override the fluid quantities in these regions and reset them to the analytically expected values. In this way, we can effectively restrict the live calculation of the code to the regions in between, allowing us to examine the sources of errors there without having to actually solve the boundary conditions problem for stationary meshes in a clean way. Using this approach, we find that both a stationary Cartesian mesh, as well as a stationary hexagonal mesh (formed from two nested grids of mesh-generating points) are able to keep the ground state to machine precision after all. Furthermore, this ground state is also maintained with this precision if we let the mesh move but {\em prescribe} the motion such that a symmetry of the cells is always maintained (for example, in practice we start from a Cartesian mesh and set the velocities of the mesh generating points to the initial fluid velocity, and then keep them constant). In contrast, if we use asymmetric cell geometries and a prescribed motion, this accuracy immediately breaks down. This leads to the conclusion that the symmetry of the Cartesian/hexagonal grid is a key factor in allowing the code to avoid the creation of local deviations from the ground state. In the next subsection, we will see that this behaviour is ultimately not surprising, because the symmetric cell geometries benefit from a fortuitous cancellation of flux area integration errors on opposite sides of mesh cells. Additional effort beyond the standard integration scheme is needed to achieve the same final accuracy also for general mesh geometries. \subsection{Higher order flux integration} A clear potential source for inaccuracies is the approximation (\ref{eq:approxIntegralMid}) for the area integral of the flux over a cell interface. This approximation is only exact if the flux varies linearly across the interface. However, this condition is, for example, not fulfilled if there is a finite velocity gradient, since in this case, the momentum flux becomes a quadratic function in space, see eqn.~(\ref{eq:idealMHDFlux}). If a linear gradient in density and velocity exists, the maximum polynomial order of the flux function occurs for the energy flux and is forth order in space. This ultimately means that an accurate calculation of the surface integral $I_{ij}$ that is free of truncation errors requires a method that can integrate polynomials of order up to 4 exactly (or order 3 in case of an isothermal EOS, or if density gradients can be neglected). The approximation (\ref{eq:approxIntegralMid}) can be viewed as the simplest low-order case of the general class of Gauss-Legendre integration rules, that can be used in any dimension. In two-dimensional simulations, the integral $I_{ij}$ is a line integral and can be transformed into the form: \begin{equation} I = \int_{-1}^1 f(x)\, {\rm d}x \approx \sum_{i=1}^n f(x_i)\, w_i, \label{eq:1dGaussLegendre} \end{equation} where $f(x)$ represents the flux function in normalized coordinates with $x\in [-1,1]$ marking the position on the interface. The integral can be approximated by a weighted sum of values of $f$ obtained at different evaluations points $x_i$, the so-called Gauss points. For an appropriate choice of $x_i$ and $w_i$, the approximation can be made exact for polynomials up to a certain order $m$, but achieving higher-order $m$ also requires more function evaluations, i.e.~a higher $n$. In Appendix \ref{subsec:gauss2Dims} we give the exact values for $x_i$ and $w_i$ as implemented in our code, but for all test cases in this paper, two points, $n=2$, exact up to third order polynomials, are sufficient. For every $x_i$ we require an additional reconstruction of the states at the interface as well as a call to the Riemann solver. Since those costs are typically significantly smaller than the mesh construction in two dimensions, we adopt this method as the (new) default one in the {\small AREPO} code. In three-dimensional simulations, the interfaces of cells are polygons. Although methods exist that try to find the minimum amount of evaluation points for a specified target accuracy \citep[e.g.][]{mousavi2010generalized}, there exist no general equations for polygons with more than four edges that employ the minimum number of evaluation points needed for a targeted exact polynomial accuracy. We, therefore, split the interface into triangles over which we can integrate the flux accurately using standard Gauss-Legendre integration. The triangles themselves can be easily obtained during the construction of the Voronoi mesh from the Delaunay triangulation. For a third-order accurate method, we have to use 4 points per triangle, which means we require on average more than 15 flux evaluations per surface integral to realize this accuracy for arbitrary cell geometries. While this sounds like a significant cost increase, using simulations of the background shear flow (\ref{eq:groundState}) we found an overhead of only around 110\% for a naive implementation of this method. However, we were able to reduce this overhead to around 30\% by performing the time extrapolation only once per face and not for every evaluation point separately, and by an explicit vectorization of the flux calculation with AVX-2 instructions available on modern CPUs. In Appendix~\ref{subsec:gauss3Dims} we discuss further details of the application of the Gauss-Legendre integration in three dimensional Voronoi meshes. \subsection{Less strict slope limiter} In regions with a smooth flow, the linear reconstruction of equation~(\ref{eq:reconstructionGeneral}) leads to a second-order accurate method in space. But in regions with physical discontinuities, the standard reconstruction scheme can induce under- or overshoots, and thus oscillatory behaviour, unless a non-linear slope limiter is applied to reduce the local gradients such that no new extrema are introduced into the solution. As this reduces the order of the method to first-order accuracy close to discontinuities, it is important to choose a limiting scheme that only reduces the gradient where really required, and by the least amount needed to accurately capture shocks and contact discontinuities, and to prevent numerical instabilities. Thus far, {\small AREPO} by default uses the scheme from \cite{springel2010pur}: The original estimate of the gradient of a quantity $\phi$ is replaced by \begin{equation} \left<{\vec{\nabla}}\phi\right>_i^{'} = \alpha_i \left<\vec{\nabla}\phi\right>_i , \end{equation} where $0 \leq \alpha_i \leq 1$ is the value of the limiter of the given cell. It is computed as \begin{equation} \alpha_i = \min_j(1, \psi_{ij}) , \end{equation} where $\psi_{ij}$ is here defined for every interface of the cell $i$ as \begin{equation} \psi_{ij} = \left\{ \begin{array}{ccc} (\phi_i^{\rm max} - \phi_i)/ \Delta\phi_{ij} & {\rm for} & \Delta\phi_{ij}>0\\ (\phi_i^{\rm min} - \phi_i)/ \Delta\phi_{ij} & {\rm for} & \Delta\phi_{ij}<0\\ 1 & {\rm for} & \Delta\phi_{ij}=0\\ \end{array} \right. \end{equation} and $\Delta\phi_{ij}=\left<{\nabla}\phi\right>_i\cdot(\bm {f}_{ij} - \bm {s}_i)$ is the estimated change between the centroid $\bm {f}_{ij}$ of the face and the centre of cell $i$, while $\phi_i^{\rm max} = \max(\phi_j)$ and $\phi_i^{\rm min} = \min(\phi_j)$ are the maximum and minimum values occurring for $\phi$ among all neighbouring cells of cell $i$, including $i$ itself. However, this scheme can lead to a too restrictive limiting of the gradient of the background shear flow (\ref{eq:groundState}) for an unstructured mesh. This can happen for special cell geometries where the face connecting two cells is displaced quite far from the line connecting the corresponding mesh generating points. As a result, one can end up with $\alpha_i < 1$ even if there is no discontinuity in the flow. But this in turn increases the local truncation error of the solution, introducing unwanted `grid-noise' into the solution. To prevent this, we replace $\bm f_{ij}$ in the above formulation of the slope limiter by the mid point $\frac{1}{2} (\bm s_i + \bm s_j)$ of the center of mass of the cells $i$ and $j$. We found that this formulation prevents post-shock oscillations close to discontinuities in all our test simulations just as well as the original formulation, while it safely avoids being triggered in situations with a uniform linear gradient in combination with a highly irregular Voronoi mesh. \begin{table} \begin{center} \begin{tabular}{ |c|c|c|c| } \hline simulation & initial & improvements & order time \\ name & grid & enabled? & integration \\ \hline CO2 & cart. & no & 2 \\ PO2 & polar & no & 2 \\ CI2 & cart. & yes & 2 \\ PI2 & polar & yes & 2 \\ CI3 & cart. & yes & 3 \\ PI3 & polar & yes & 3 \\ \hline \end{tabular} \end{center} \caption{Overview of the different code configurations used for the isentropic Yee vortex test. The simulations differ in the topology of the initial grid layout (with is either Cartesian or polar), whether or not the improvements (but without higher-order time integration) presented in this paper are enabled, and finally whether a second or third order time-integration is used.} \label{tab:yeeOverview} \end{table} \begin{figure} \centering \includegraphics[width=1.0\linewidth]{Yee_L1.pdf} \caption{$L_1$ norm of the error of the density field for the Yee vortex at simulation time $t = 10$ when evolved with different hydrodynamical schemes, as defined in Table~\ref{tab:yeeOverview}. Our improved version of {\small AREPO} robustly obtains second-order convergence independent of the initial grid geometry, whereas the old default version achieves this only for polar grids over a limited range of resolutions. } \label{fig:YeeConvergence} \end{figure} \subsection{Improved temporal and spatial extrapolation} Equation (\ref{eq:reconstructionGeneral}) does not specify in which frame we perform the spatial reconstruction and temporal extrapolation. The simplest choice would be the lab frame, in this case, $\bm s = \bm s_{\rm old}$ is the centre of mass at the time we calculate the gradient and not the current centre of mass. A more natural choice would be the moving frame of the gas. In this case we use $\bm s = \bm s_{\rm old} + \bm v \Delta t$ as the origin of the spatial reconstruction and set $\bm v = 0$ in equation (\ref{eq:linearTimeExtrapolation}). We realized through our sensitive tests that the current version of {\small AREPO} implemented the reconstruction and extrapolation in the moving frame in a slightly inconsistent way. It transformed into the moving frame of the interface and performed the reconstruction from the current centre of mass. Since the velocity of the cell is close to the velocity of the gas and the velocity of the frame is close to the velocity of the adjacent cells, this generally only leads to small errors. These are however especially strong (and superfluous) in cases where strong mesh regularisation motions are applied, and then can be observed in simulations of the ground state of the shearing box as spurious noise. This noise is now eliminated in our improved version of the code. \subsection{Higher-order Runge-Kutta time integration} \label{subsec:higherOrderRK} The approximation~(\ref{eq:TimeIntegrationGeneral}) for the time integration is in general second order accurate, which means that its error $E_{t,s}$ for a single time step scales a $E_{t,s} \propto \Delta t^{3}$ with timestep size, and the accumulated error for the integration over a fixed time interval scales as $E_{t,i} \propto \Delta t^2$. In many simulations, the total error is typically dominated by the error $E_{x}$ of the spatial discretization, which should be proportional to the square of the local cell size $\Delta x$ in smooth flows. This is because the size of the time step and the local spatial resolution are connected by the stability criterion: \begin{equation} \Delta t = C_{\rm CFL} \frac{\Delta x}{v_{\rm signal}}, \label{eq:timeStepSize} \end{equation} where $v_{\rm signal}$ is the local signal speed and $C_{\rm CFL}$ the Courant factor as a free parameter. This implies that an increase in the spatial resolution reduces also the error of the time integration by a comparable factor, and the whole scheme converges with second order, typically also keeping the time integration error subdominant. \begin{figure*} \centering \includegraphics[width=0.8\linewidth]{figure_800.png} \caption{The density distribution of a cold Keplerian disk evolved with different simulation methods and at different times, as labelled. The method marked `old' corresponds to the default version of {\small AREPO} without the modifications proposed here, while the run marked 'improved' contains all modifications except for the third order time integration. We here use a polar grid for the initial conditions.} \label{fig:Kepler800} \end{figure*} \begin{figure} \centering \includegraphics[width=1\linewidth]{figureZoom_100.png} \caption{A zoom into the density field for a Keplerian disk simulation at time $t=100$. The left hand side shows the disk evolved without the code improvements proposed here while the right hand side includes the modifications. Both simulations were initialized with a polar grid of mesh-generating points. The right simulation has much smaller, spherical, residual density perturbations (note the different stretch of the color tables).} \label{fig:KeplerZoom} \end{figure} \begin{figure*} \centering \includegraphics[width=0.8\linewidth]{kepler_800_cartesian.png} \caption{The same as the lower row of panels in \cref{fig:Kepler800} but for a simulation with an initially Cartesian grid and not a polar grid. Even in this case, our improved simulation code exhibits a drastically reduced noise level in this setup, and thus a much better long-term stability of the cold, rotationally supported disk.} \label{fig:Kepler800Cartesian} \end{figure*} Since there are no spatial scales to resolve in the ground state of the shearing box (see Section~\ref{subsec:groundState}), the error in this case is however dominated by the error in the time integration, and can be observed as noise in the unstructured grid case. To verify this and reduce this noise if desired, we also implemented a formally third order accurate Runge Kutta method for the integration of the ideal MHD equations: \begin{equation} \bm Q_i^{n+1} = \bm Q_i^n +\frac{\Delta t}{6} \left[\bm I(t_0) + 4 \bm I\left(t_0+ \frac{\Delta t}{2}\right)+ \bm I(t_0+ \Delta t)\right]. \label{eq:timeIntegration3rdOrder} \end{equation} This adds an extra mid-timestep evaluation of the integral $\bm I$, for which we use again the linear time extrapolation (\ref{eq:linearTimeExtrapolation}). We note that other parts of the code, for example the source terms, are still only integrated with the second-order accurate method (\ref{eq:TimeIntegrationGeneral}), which means that if those terms are dominating the error, the error will still only decrease with second order in time. \subsection{Testing the accuracy improvements} Although all of the modifications of {\small AREPO} presented in this section were developed specifically to reduce the noise of the background flow in a shearing box, they are also useful for other applications of the code. In this subsection, we will briefly examine some representative examples to highlight this welcome effect. \subsubsection{Yee vortex} \label{subsubsec:YeeVortex} The isentropic Yee vortex test consists of a rotating, quasi-stationary flow with a differentially shearing velocity profile. Since the flow is smooth and free of discontinuities, it can be used to verify second-order convergence for a non-trivial two-dimensional flow. The test was used in \cite{pakmor2016improving} to show that the very first version of {\small AREPO} \citep{springel2010pur} did not manage to guarantee full second-order convergence for this problem due to a comparatively noisy gradient estimation scheme and inaccuracies in time integration. \cite{pakmor2016improving} introduced improvements to both points that have since been used by default in the code. As shown in \cite{pakmor2016improving}, using this updated code the Yee vortex then converges with second order, but this still requires a specially prepared polar grid whereas a start from a cubical grid that is ignorant of the spherical symmetry of the mesh motion still spoils the high convergence rate. We here return to examining this issue and rerun the Yee vortex with and without the improvements presented in the previous subsections. For definiteness, we use both an initially polar grid as well as a Cartesian grid. Also, we run the test simulations with the standard second order accurate time integration (\ref{eq:TimeIntegrationGeneral}) as well as with the improved third order accurate one (\ref{eq:timeIntegration3rdOrder}). The details of the initial conditions can be found in Appendix~\ref{subsec:setupYee}, and in Table~\ref{tab:yeeOverview} we give a schematic overview of the different test runs. To measure the convergence rate we define the $L_1$ error as \begin{equation} L_1= \frac{1}{V} \sum_{i=1}^{N_{\rm cell}} |f_i|, \end{equation} where $|f_i|$ is the deviation of the density of a cell $i$ from the theoretical value at the coordinate of its center of mass. In \cref{fig:YeeConvergence}, we show the error norm as a function of spatial resolution for our different simulation schemes. We confirm that the previous version of the {\small AREPO} code was indeed only able to achieve second order convergence for this problem if an optimized polar grid (PO2) is used for the initial conditions, while a Cartesian grid (CO2) shows substantially higher errors. Interestingly, for very high resolution ($5120^2$~cells) we also find for the polar grid (PO2) a slight decrease in the order of the method. This effect vanishes if we use our improved formulation for the polar grid (PI2 and PI3) because this eliminates spurious activations of the slope limiter. If we start with a Cartesian grid instead, our new formulation (CI2) achieves second-order convergence for low to moderate resolutions, but this becomes worse again for very high resolution. This degradation at very high resolution can be avoided by using our new improved time integration accuracy (CI3), suggesting that for low to moderate resolution the total error is dominated by errors of the spatial discretization, while for very high resolution the total error becomes dominated by the temporal discretization. The reason for this is presumably related to the local mesh regularization that we apply, and a faster change of the local topology of the grid when the resolution is higher. \subsubsection{Keplerian disc} A challenging problem for many hydrodynamical methods is the evolution of a pressure-less gas disc orbiting around a central object on a Keplerian orbit \citep{cullen2010inviscid, hopkins2015new, pakmor2016improving}. In particular, \cite{hopkins2015new} reported that many state-of-the-art SPH and mesh codes show severe problems in this test. However, using their new MFM method they were able to evolve the disk for more than 250 inner orbits ($t=600$). Although the disk showed noise in the density evolution of the order unity, the disk seemed to stay stable. \cite{pakmor2016improving} used the same test to show that {\small AREPO} with his improved gradient estimates was also able to stably evolve the disk until $t=600$. But at this time the disk started to break up at its inner boundary, and during the whole evolution, some noise in the density profile of the disk could be observed. We rerun this test with the improved methods presented in the previous subsections (except for the higher-order time integration), with the exact same initial conditions as \cite{pakmor2016improving} (for details see Appendix~\ref{subsec:setupKepler}) and at a resolution of 320x320 cells. As we show in \cref{fig:Kepler800}, we reproduce their result that the original version of {\small AREPO} is able to evolve the disk for several hundred code units, and that at around $t=600$ the inner boundary of the disk starts to break up, which only becomes worse with time. However, the improved integration method we proposed earlier allows us to evolve the disk for a much longer time. In fact, even at $t=800$ the disk remains stable and only shows a small increase in density at the inner edge of the disk due to a weak influence of the inner boundary condition. In addition, the new scheme at the same time significantly reduces the noise in the density field throughout the disk. In \cref{fig:KeplerZoom} we show a zoom into the density field, including the geometry of the Voronoi mesh at $t= 100$. While in the simulation with the old scheme the initial polar grid is destroyed and the local noise has a relative size of 10\%, the initial grid stays stable in the simulation with the improved scheme. The maximum deviation from the theoretical density field is only around 1\% (observe that the color scale is stretched accordingly) and those deviations do not take the form of local `grid noise', but rather are ring-like structures that are coherent for the whole disk. To further analyze the sensitivity of this simulation problem to the initial grid layout, we rerun simulations with an initial Cartesian grid of size $320 \times 320$ cells, once with the old code and once with our improved method. In \cref{fig:Kepler800Cartesian} we show the density distribution at $t=800$. In the simulation without the improvements proposed in this paper, the disk starts to break up earlier compared to the simulation started with an initial polar grid. In contrast to this, the simulation with the improvements looks very similar to the simulation with an initially polar grid, and thus is insensitive to the initial grid geometry, as desired. \section{Test problems for the shearing box} \label{sec:testProblems} In this section, we analyze the performance of our implementation of the shearing box approximation in several test cases. We consider many of the problems used in \cite{stone2010implementation} to analyze the accuracy of the shearing box implementation in the {\small ATHENA} code, and we employ in several cases similar initial conditions as they did. As in Section~\ref{subsubsec:YeeVortex} we define the $L_1$ error of a quantity $f$ as \begin{equation} L_1 = \frac{1}{V} \sum_{i=1}^{N_{\rm cell}} |f_i|, \label{eq:L1DefintionAverage} \end{equation} where $|f_i|$ is the difference of the value of a cell $i$ from the theoretical value of $f$ at its center of mass. Although the use of a perfect Cartesian grid sometimes leads to better results due to the additional symmetry in the mesh configuration, we deliberately avoid this by adding a random displacement of 2\% of the mean particle spacing to the positions of the mesh-generating points in the initial conditions. The background shear flow, together with mesh regularisation motions introduced by the code, then rapidly create a fully unstructured mesh, which is more representative for the mesh configurations encountered in realistic production runs with {\small AREPO}. To initialize our test simulations, we set the fluid properties of a cell to the value assumed by the continuous fields at the coordinate of the centre of mass of the cell. If not stated otherwise, we impose a global time step for all cells. As default shear parameters we use $q = 3/2$ and $\Omega_0 = 1$, and for all isothermal simulations we use an isothermal sound speed of $c_s = 1$. \subsection{Ground state of the shearing box} \label{subsec:groundState} In Section~\ref{subsec:groundStateSimulationOld} we showed that the default version of {\small AREPO} fails to accurately simulate the ground state of the the shearing box, prompting us to develop several accuracy improvements of the code. We now revisit this problem in this section, but with these improvements enabled. As a first initial step, we use an {\em unstructured static} mesh with buffer zones close to the $x$-direction boundaries so that we can ignore the shear-periodic boundary conditions. In this case, the ground state is now stable up to machine precision, implying that the fluxes are calculated exactly by the higher-order Gauss-Legendre integration we introduced. Next, we allow the mesh to move arbitrarily, so that the geometries of the surfaces of the cells change continuously in time. This change does not have to be a polynomial function in time, which means that the second-order accurate time integration scheme of equation~(\ref{eq:TimeIntegrationGeneral}) is associated with small errors. These can be observed as small noise in the velocity and density fields that lies substantially above machine precision. The noise can be decreased by either using a smaller time step, or by using a higher-order time integration scheme, for example the third-order Runge Kutta method we described in Section~\ref{subsec:higherOrderRK}. To analyze the effect of the time step size and integration scheme, we use a two-dimensional box of size $L_x = L_y = 10$, and set up a Cartesian grid with $200^2$ cells and random displacements of 1\% in the coordinates of the mesh-generating points. The initial conditions are given by the ground state of the shearing box, and we run the simulation until time $t= 1000$. This leads to a dynamic unstructured mesh with a quasi stationary equilibrium between the mesh regularisation motions introduced by the code and the tendency of the local shear to degrade the local mesh regularity. We then use this ``relaxed'' unstructured mesh geometry and reinitialize the fluid variables with the analytical values of the ground state at its centre of mass to start out once more with a perfectly quiet state. Afterwards, we let the system evolve for time $t=1$ and examine how accurately the quiet shear flow of the ground state is maintained. We repeat this last simulation for different time step sizes, imposed here by changing the Courant number. We then measure the average $L_1$ error of the fluid quantities, as well as the maximum $L_1$ error that is realized for any of the cells. In the first row of \cref{fig:groundStateL1Courant}, we show the $L_1$ errors of different hydrodynamic quantities as a function of the Courant number for the second and third-order Runge Kutta schemes. We also fit the expression \begin{equation} L_1 = A_0\, C_{\rm CFL}^{A_1} \label{eq:FitConvergenceOrder} \end{equation} to the measurements. $A_1$ gives us the order of convergence of the corresponding fluid quantity. As expected for a second-order method, all errors decrease with second order for smaller time step sizes. This also shows that the error in this problem is indeed fully dominated by errors in the time integration, not the spatial integration, because the latter is eliminated by our higher order flux integration. The use of the third-order RK method reduces the amplitude of the total error ($A_0$) by about one order of magnitude, but the convergence rates ($A_1$) stay still close to 2 and do not approach the value of 3 we may have expected. To further analyze this discrepancy, we have repeated the test in three dimensions with $L_x = L_y = L_z = 10$ and $50^3$ cells. \begin{figure*} \centering \includegraphics[width=0.42\linewidth]{2ndOrder_2d_final.pdf} \includegraphics[width=0.42\linewidth]{3rdOrder_2d_final.pdf}\\ \includegraphics[width=0.42\linewidth]{2ndOrder_3d_final_angle1p75.pdf} \includegraphics[width=0.42\linewidth]{3rdOrder_final_3d.pdf} \caption{The $L_1$ error norm of different hydrodynamic quantities (as labelled) as a function of the time step size (here parameterized through the Courant number) at time $t=1$ for simulations of the ground state of the shearing box (for details, see Section~\ref{subsec:groundState}). The upper row shows results in two dimensions, the lower one in three dimensions. The panels on the left use the second order accurate time integration of eqn.~(\ref{eq:TimeIntegrationGeneral}), the ones on the right the third order accurate method of eqn.~(\ref{eq:timeIntegration3rdOrder}). In brackets we give the fitted values of the slope $A_1$, see eqn.~(\ref{eq:FitConvergenceOrder}).} \label{fig:groundStateL1Courant} \end{figure*} \begin{figure*} \centering \includegraphics[width=0.72\linewidth]{figure_amplitude_evolution_10.png} \caption{Epicycle oscillations in the velocities $v_x$ and $v_y$ (first and second row panels) compared between analytic solution (solid lines) and numerical measurements (crosses) for a simulation with a resolution of $10^2$ mesh-generating points. The temporal evolution of the epicycle energy (egn. \ref{eq:epicycleOsciEnergy}) in the simulation is shown in the bottom panel.} \label{fig:EpicycleAmplitude10} \end{figure*} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{L1_epicycle.pdf} \caption{$L_1$ norm of the error of the density field, the velocity fields $v_x$ and $v_y$, as well as of the epicycle energy (eqn.~\ref{eq:epicycleOsciEnergy}) for a test simulation of epicycle oscillations. The measurements were performed at time $t=666$, which corresponds to around 103 completed epicycle oscillations.} \label{fig:EpicycleCongergence} \end{figure} \begin{figure} \centering \includegraphics[width=1.0\linewidth]{Energy_HD_Shearing_wave_unstructured.png} \caption{The evolution of the total kinetic energy associated with the movement in the $x$-direction for an incompressible hydrodynamic shearing wave. The black line corresponds to the analytical solution of eqn.~(\ref{eq:HDShearingWaveEkinAnatlytical}) while the colored lines give measurements for simulations with different numerical resolutions, as labelled.} \label{fig:energyHDWaveEvolution} \end{figure} \begin{figure} \centering \includegraphics[width=1.0\linewidth]{L1_convergence_HD_shearing_wave_unstructured.pdf} \caption{The $L_1$ error of the velocity and the kinetic energy density of the motion in the $x$-direction as a function of resolution for the simulation of an incompressible hydrodynamic shearing wave. The $L_1$ error was averaged over the time intervall $0 \leq \Omega_0\,t < 6$. } \label{fig:ConvergenceHDWaveEvolution} \end{figure} In the second row of \cref{fig:groundStateL1Courant} we show the corresponding $L_1$ errors as a function of the Courant number now in the three dimensional case. We again find, as expected, $A_1 \approx 2$ for the second-order RK method, but now we recover a significantly better convergence rate than 2 for the third-order RK time integration. In the latter case, the maximum error decreases slower than the average errors, which means that for small time step sizes relatively large local errors dominate the average error budget. The fact that the third-order RK method does not decrease the error with full third order is a hint that the code likely still contains some inaccuracies that more prominently show up in two dimensions, and less so in three dimensions. One culprit might lie in the estimate of the spatial velocity of an interface, which only takes into account the movement of the two adjacent cells and not the movement of other neighbouring cells, even though they introduce changes in the size of the facets. Finally, we note again that we can completely suppress the errors in the time integration by starting with a perfectly structured mesh like a Cartesian or hexagonal grid, and only allow for a restricted mesh movement with $\vec{v}_{\rm mesh} = (0,-q \Omega_0 x,0)$ that is independent of time. At all subsequent times, the mesh cells then still contain symmetries that cancel truncation errors in the time integration, which typically leads to similar or even better results than for the unstructured mesh cases. Note that this approach still removes the background bulk velocity from the calculation of the size of the time steps, it does have lower and spatially uniform advection errors compared to a Eulerian treatment, and the handling of the boundaries is manifestly translationally invariant. These properties are attractive, and thus such a scheme can be viewed as an interesting hybrid between a freely moving mesh and a static grid code. However, we will not discuss this scheme further in this paper, but it might nevertheless be of interest in cases where a very small level of numerical noise is required. \begin{figure*} \centering \includegraphics[width=0.8\linewidth]{advection_unstructured.png} \caption{Strength of the magnetic field at different times in a simulation of the advection of a magnetic field loop in a shearing box.} \label{fig:advectionFieldLoop} \end{figure*} \subsection{Epicycle oscillations} \label{sec:epicycleOsci} Small perturbations to the velocity of the ground state of the shearing box do not get damped but instead lead to oscillations. In the case of $q=1.5$, they correspond to elliptical orbits in global disk simulations. If one assumes a perturbation $v_x = v_{x0}$ at $t=0$, the evolution of the velocities is given analytically by: \begin{equation} v_x (t) = v_{x0}\cos(\Omega t), \end{equation} \begin{equation} v_y (t) = -v_{x0} \sqrt{\frac{2-q}{2} } \sin(\Omega t). \end{equation} An important conserved quantity for these motions is the so-called epicycle energy \begin{equation} E_{epi} = \frac{\left(v_x^2 + \frac{2}{2-q} v_y^2 \right)}{2} = {\rm const}. \label{eq:epicycleOsciEnergy} \end{equation} Obtaining this conservation numerically requires special care in the implementation of the source terms of the shearing box. To test for this, we add a perturbation $v_{x0} = -0.1 c_s$ to the ground state of a two-dimensional shearing box with $\Omega = 1.5$ and $c_s = 10^{-3}$. We use a box size $L_x = L_y = 10$ and start with a randomly perturbed Cartesian grid. In \cref{fig:EpicycleAmplitude10} we show that even for the low resolution of $10^2$ cells the errors in the epicycle energy do not grow with time. However, if we do not add the predictor step for the second application of the source terms, as described in Section~\ref{subsec:sourceTermsImplementation}, the epicycle energy grows exponentially. In \cref{fig:EpicycleCongergence}, we show that the errors in the velocity as well as in the epicycle energy decrease with second order in the spatial resolution, confirming that epicycle oscillations are accurately treated by our shearing box implementation. \subsection{Evolution of a hydrodynamic shearing wave} To test the implementation of our boundary conditions for non-axisymmetric conditions we simulate the evolution of a hydrodynamic shearing wave \citep{johnson2005linear, balbus2006exact, shen2006three}. The setup follows \cite{stone2010implementation}. We use a two-dimensional box of size $L_x = L_y =1$, an isothermal equation of state with sound speed $c_s = 1.29 \times 10^{-3}$, $\Omega_0 = 10^{-3}$ and initial wave vector $2 \pi \bm k_0 / L_x = (-8,2)$. We choose initial amplitudes $v_{x,0} = 10^{-4} c_s$ and $v_{y,0} = -k_{x,0} /k_{y,0} v_{x,0}$, and a constant background density $\rho = 1$. The shearing box leads to a time-dependence of the wave \citep{shen2006three}: \begin{subequations} \begin{equation} k_x(t) = k_{x0} + q \Omega_0 k_{y0} t, \end{equation} \begin{equation} v_x(t) = v_{x,0} \sqrt{\frac{k_{x,0}^2 + k_{y,0}^2}{k_x^2+k_{y,0}^2}} \cos(k_x(t) x + k_{y,0} y), \end{equation} \begin{equation} v_y(t) = - v_{x,0} \sqrt{\frac{k_{x,0}^2 + k_{y,0}^2}{k_x^2+k_{y,0}^2}} \frac{k_x(t)}{k_y} \cos(k_x(t) x + k_{y,0} y) . \end{equation} \end{subequations} The kinetic energy gets amplified and reaches a maximum at $t= 8 / (3\Omega_0)$. In \cref{fig:energyHDWaveEvolution}, we compare the evolution of the total kinetic energy in the $x$-direction for different resolutions with the analytical value \begin{equation} E_{{\rm kin},x} = \int_{0}^1 {\rm d}x \int_0^1 {\rm d}y \frac{1}{2} \rho v_x^2 = \frac{\rho v_{x,0}^2}{4}\frac{k_{x,0}^2 + k_{y,0}^2}{k_x^2+k_{y,0}^2}. \label{eq:HDShearingWaveEkinAnatlytical} \end{equation} For high resolution ($N=128^2$ and higher), we accurately recover the amplification of the kinetic energy. At later time, the kinetic energy decreases in our simulations due to numerical viscosity, but this effect becomes smaller if we increase the resolution, as expected. If there are only 4 cells per initial wavelength, the numerical viscosity starts to noticeably damp the wave already at the beginning. In \cref{fig:ConvergenceHDWaveEvolution} we show the average $L_1$ error for different fluid quantities as a function of resolution in the time interval $0 < t < 6 /\Omega_0$. As discussed earlier, for low resolution the numerical viscosity is high and we find large deviations from the analytical solution and a slow convergence rate. We then find a regime with seemingly faster than second-order convergence for high resolution, while eventually the errors start to become constant. The latter issue could be explained by the fact that the analytical solution was derived under the assumption of incompressibility, which is not actually compatible with the small density variations observed in our simulations. \subsection{Advection of a weak magnetic field loop} As a first test for the implementation of magnetic fields in the shearing box, we evolve a dynamically unimportant magnetic field loop in a homogeneous medium in the presence of background shear. We use a box with size $L_x =3$ and $L_y = 8$, a background density $\rho = 1$, an isothermal equation of state with sound speed $c_s = 1$, and the parameters $\Omega = 1$ and $q=3/2$ for describing the shearing of the box. The field loop has a radius $r=1$ with magnetic strength $\beta = \frac{2 c_s^2 \rho_0}{B_0^2} = 2 \times 10^6$, so the magnetic pressure is very small compared to the thermal pressure. Besides the background shear flow, we add a velocity $v_x = c_s$ to seed an epicycle oscillation of the field loop. This allows us to also check the implementation of the boundary conditions. We use a uniform resolution of $1800 \times 600$ cells and add random displacements of 1\% of the mean particle spacing to the mesh generating points. In \cref{fig:advectionFieldLoop}, we show the resulting $\beta$ at different times. One can see no traces of the boundary conditions, and the shape of the field loop is well preserved throughout the evolution. \subsection{Evolution of a compressible magnetic shearing wave} Another sensitive MHD test for our shearing box implementation is the evolution of a compressible magnetic shearing wave in three dimensions \citep{johnson2007magnetohydrodynamic, stone2010implementation}. We use a box of size $L_x = L_y = L_z = 0.5$, an initially Cartesian grid with a constant number of cells per dimension, and an isothermal equation of state with sound speed $c_s = 1$. As initial conditions we specify \begin{subequations} \begin{equation} \rho(\bm x) = 1+ 5.48082 10^{-6} \cos(\bm k_0 \cdot \bm x), \end{equation} \begin{equation} \bm v(\bm x) = \begin{pmatrix} -4.5856 \\ 2.29279\\ 2.29279 \end{pmatrix} 10^{-6} \cos(\bm k_0 \cdot \bm x) - \begin{pmatrix}0\\ q \Omega_0 x\\0 \end{pmatrix}, \end{equation} \begin{equation} \bm B(\bm x)/\sqrt{4\pi} = \begin{pmatrix} 5.48082 \\ 10.962\\ 0 \end{pmatrix} 10^{-7} \cos(\bm k_0 \cdot \bm x) + \begin{pmatrix}0.1 \\ 0.2\\0\\ \end{pmatrix}, \end{equation} \end{subequations} with a wavevector $\bm k_0 = (-2,1,1) \times 2\pi / L$. Due to shearing motion, the wavevector $\bm k (t) = \bm k_0 +(q \Omega_0 t,0,0) \times 2\pi /L$ as well as the $y$-component of the average magnetic field $\hat{B}_y(t)/\sqrt{4 \pi} = 0.2 - 0.1 q \Omega_0 t$ evolve as a function of time. To obtain the evolution of the amplitudes of the wave we integrate the system of differential equations given in \citet[][their eqns. 13--16]{johnson2007magnetohydrodynamic}. In \cref{fig:MHDShearingWavedBy} we compare the real part of the amplitude of the $y$-component of the magnetic field in our simulations, defined as \begin{equation} \delta B_y = 2 \int_V (B_y - \hat{B}_y) \cos[\bm k(t) \bm x] {\rm d}\bm x, \end{equation} with the analytic values, as a function of the employed numerical resolution. \begin{figure} \centering \includegraphics[width=1\linewidth]{MHD_shearing_wave_dBy_noised_grid.png} \caption{Evolution of the amplitude of the magnetic field $\delta B_y$ as a function of time in a compressible MHD shearing wave test, for different numerical resolutions, as labelled. } \label{fig:MHDShearingWavedBy} \end{figure} \begin{figure} \centering \includegraphics[width=1.0\linewidth]{L1_error_MHD_shearing_wave.pdf} \caption{The $L_1$ error norm for different fluid quantities averaged over the time period $0< \Omega_0\, t < 2$ in a compressible MHD shearing wave test. The black dashed line shows the slope of $-2$ that we would ideally expect from our code, while the actual measurements as a function of resolution are shown by colored lines, as labelled.} \label{fig:MHDShearingWavedConvergence} \end{figure} The wave gets damped by numerical viscosity and resistivity. Both dissipative effects decrease with increasing resolution, allowing us to follow the evolution of the wave for longer times if the resolution is higher. To more quantitatively analyze the convergence properties of our code, we show in \cref{fig:MHDShearingWavedConvergence} the $L_1$ error of different quantities averaged over the time period $0< \Omega_0\, t< 2$, as a function of resolution. For sufficiently high resolution, we find a close to second-order convergence in all quantities. \begin{figure*} \centering \includegraphics[width=0.95\linewidth]{overview_mri.png} \caption{The temporal evolution of the average magnetic energy density (top left), kinetic energy density (top right), Maxwell and Reynolds stresses (bottom left), and of the normalized magnetic stress (bottom right) for a simulation of the magneto-rotational instability (MRI) without mean field and using standard Dedner divergence cleaning (i.e.~$c_{h0} = 1$). The simulation method shows a sustained quasi-stationary MRI even at moderate numerical resolution. } \label{fig:MRI_data} \end{figure*} \begin{table*} \centering \begin{tabular}{c|c|c|c|c|c} \hline Origin sim. & 100 $\left<\alpha_{\rm tot}\right>$ &100 $\left<\alpha_M\right>$ & 100$\left<\alpha_R\right>$ & $\left< B^2 /(8\pi) \right> /P_0$ & $\left< \rho v^2 /2 \right> /P_0$ \\ \hline \cite{shi2016saturation} & 5.16 & 4.17 & 0.99& 0.1301 & 0.0417\\ This work ($c_{h0} = 0.1$) & 3.21 & 2.56 & 0.65 & 0.066 & 0.027\\ This work ($c_{h0} = 0.2$) & 3.59 & 2.89 & 0.71 & 0.069 & 0.032\\ This work ($c_{h0} = 0.5$) & 4.16 & 3.34 & 0.82 & 0.093 & 0.035\\ This work ($c_{h0} = 1$) & 2.20 & 1.74 & 0.46 & 0.043 & 0.020 \\ This work ($c_{h0} = 2$)& 1.04 & 0.81 & 0.23 & 0.021 & 0.010\\ This work ($c_{h0} = 5$)& 0.42 & 0.33 & 0.09 & 0.011 & 0.005\\ \hline \end{tabular} \caption{A comparison of different time-averaged fluid quantities in simulations of the MRI using a tall box without net field. We give our results for a number of different settings of the Dedner cleaning speed ($c_{h0}$) and compare to the results from \protect\cite{shi2016saturation} (their simulation x1y4z4r32). All simulations use 32 cells per scale height and are based on identical initial conditions. The fluid quantities are averaged over 150 orbits, starting after the first 50 orbits.} \label{tab:MRI_time_average} \end{table*} \section{Nonlinear magneto-rotational instability without net field} \label{sec:nonlinearMRI} Finally, as a first example for an application of our new shearing box implementation to an interesting nonlinear problem we consider a simulation of the magneto-rotational instability (MRI), here without a mean magnetitic field and in an unstratified box. In a standard box size ($L_x = L_z = 1\,H$) previous studies found a non-converged behaviour of the MRI \citep{fromang2007mhd, fromang2007mhd2}. We therefore adopt a tall box set-up ($L_y = L_z = 4H = 4 L_x$) as in \cite{shi2016saturation} who achieved with this configuration convergence with the {\small ATHENA} code \citep{stone2008athena, stone2010implementation}. This test was also used in \cite{deng2019local} to show that with a resolution of 48 particles per scale height $H=c_s /\Omega_0$, the {\small GIZMO} code \citep{hopkins2015new} was not able to sustain the MRI for more than 20 orbits. We use a comparatively low resolution of 32 cells per scale height, an isothermal equation of state with $c_s =1$, and the shearing box parameters $q=3/2$ and $\Omega_0 = 1$. For the initial conditions, we use the ground state of the shearing box (\ref{eq:groundState}) with constant density $\rho = 1$, a purely vertical magnetic field \begin{equation} \bm B= B_0 \sin \left(2\pi x/L_x\right) \hat{e}_z, \end{equation} and we add uniformly distributed random noise of maximum amplitude $0.05\, c_s$ to the initial velocities of all cells in order to seed the MRI. The initial field strength $B_0$ is defined by the parameter $\beta = {2 c_s^2 \rho_0}/{B_0^2}= 400$, and we use the Dedner approach for divergence cleaning. We vary the strength of the cleaning by multiplying the standard variable $c_h$ in the Dedner scheme with a constant prefactor $c_{h0}$. Smaller values mean weaker cleaning, and an effectively lower numerical resistivity. To analyse the simulations we define the volume weighted average of a quantity $X$ as \begin{equation} \left <X \right > = \frac{\int X {\rm d}V}{\int {\rm d}V}, \end{equation} as well as the Maxwell stress \begin{equation} \alpha_{M} = - \frac{B_x B_y }{ P_0} , \end{equation} and the Reynolds stress \begin{equation} \alpha_{R} = \frac{\rho (v_x) (v_y- \overline{v_y}) }{ P_0}, \end{equation} where $\overline{v_y}$ denotes the background mean flow and $P_0 = 1$ is the initial pressure. The saturation of the MRI can be measured in terms of the relative Maxwell stress: \begin{equation} \alpha_{\rm mag} = - \frac{\left <B_x B_y \right >}{ \left < B^2 \right >}, \end{equation} which goes to 0 if the MRI dies out. In \cref{fig:MRI_data} we show the evolution of different fluid quantities relevant for the MRI. After an initial growth of the magnetic energy, we find as expected a saturated state. In Table~\ref{tab:MRI_time_average} we compare several time-averaged quantities with the equivalent simulations form \cite{shi2016saturation}. The measured stresses and energies are all slightly smaller than in {\small ATHENA}, which hints that the Dedner cleaning is more diffusive than the constrained transport scheme used in \cite{shi2016saturation}. For $c_{h0} = 0.5$ we find the strongest stresses in the saturated phase. For higher $c_{h0}$, the stresses decrease due to a larger numerical resistivity. Overall, the results are very positive as they are superior compared to previous studies of the MRI with Lagrangian techniques, and are nearly as good as those obtained with a Eulerian constrained transport method. Given that our method uses a fully dynamic and unstructured mesh, which does not benefit from fortuitous cancellations of truncation errors, this encourages the use of the new method for more complicated physics applications. In a future study we for example plan to further analyse this system by modifying the resolution, the cleaning speed $c_h$, and the initial magnetic field, and it will be especially interesting to study the case of a stratified shearing box as well. \section{Summary and conclusions} In this work, we have focused on the technical realization of the shearing-box approximation in the moving-mesh code {\small AREPO}. The shearing-box is ideal to achieve very high local resolution in rotationally supported disk flows, much higher than can be readily obtained in global disk simulations. This allows, for example, a study of the non-linear behaviour of crucial fluid instabilities in such disks, such as the magneto-rotational instability. While the mesh construction algorithm of {\small AREPO} can be straightforwardly generalized to cope with the special shear-periodic boundary conditions appearing in the radial direction, we found that the default version of the {\small AREPO} code produces an uncomfortably high level of `grid-noise' in the ground-state flow of the shearing box. In previous applications of {\small AREPO}, it had often been noted that the code's accuracy was reduced in situations with strong shear, because here mesh faces turn rapidly, and the distortion and time variation of the geometry of mesh cells are particularly strong. In this sense, the shearing-box is the worst situation one can possibly imagine, because shear appears {\em everywhere}, and {\em all the time}. In this paper, we were thus compelled to identify the origin of these inaccuracies in a clearer way and in more detail than had been understood before. But this then led also the way to overcome these source of noise and develop a significant improvement of the accuracy of the integration scheme of {\small AREPO}. This advance is of particular importance for cold, strongly shearing flows, but it ultimately is also beneficial for all other applications of the code. In particular, we found that for general unstructured Voronoi meshes it can be necessary to integrate the fluxes over mesh faces with more than one Gauss point in order to reduce truncation errors to a level that is achieved by symmetric cells in part through cancellation effects on opposite sides of cells. We have also found that a minor change in the slope limiting scheme of {\small AREPO} is helpful to avoid that the slope limiting can be needlessly triggered in situations with highly distorted cell geometries. Finally, we rectified a minor inconsistency in the time integration scheme when mesh regularization motions are applied by the code. We note that to identify these improvements, examining the ground state of the shearing box in detail, a seemingly trivial state, proved essential. With the newly proposed improvements in place, we have shown that {\small AREPO} is able to very accurately simulate the shearing-box. Also, our improvements are beneficial for other types of simulations where strong shear is present, such as the Yee vortex. An advantage compared to Eulerian schemes is that the local truncation error of our approach is fully uniform within the shearing box, and does not increase towards the radial box boundaries as in Eulerian methods. In fact, the calculation is fully translationally invariant. When replicating multiple copies of the primary simulation domain using the (shear) periodic boundary conditions, and sticking them together at the boundaries to cover a larger domain, one could not tell any more where the original box boundary had been. As a first important application, we have considered the magneto-rotational instability without a background field. {\small AREPO} is able to sustain the MRI even at comparatively low resolution, unlike the Lagrangian MFM approach. Our results show evidence for a somewhat higher numerical resistivity compared to the constrained transport method used by the {\small ATHENA} code. Perhaps different methods for magnetic divergence control can improve on this in the future, but already now {\small AREPO} should be a versatile and flexible tool for studying disks with the shearing-box approximation, in particular due to its ability to seamlessly increase the local resolution in situations with fragmentation and local (gravitational) collapse. We will consider such physics problems in forthcoming applications of the code. \label{sec:discussion} \section*{Acknowledgements} The authors acknowledge helpful discussions with R\"udiger Pakmor. \section*{Data Availability} The data underlying this paper will be shared upon reasonable request to the corresponding author. \bibliographystyle{mnras}
\section{Background} \begin{comment} \begin{figure}[t!] \centerline{\includegraphics[width = 0.5\textwidth]{./figures/lc_tank2.pdf}} \caption {(a)Equivalent LC resonant tank (b)Output at capacitor} \label{fig:lc_tank} \vspace{-0.25cm} \end{figure} \end{comment} In a traditional clocking method, half of the switching power is utilized to charge a capacitive node when the clock transitions from 0-to-1. The other half of switching power is dissipated in the discharge cycle when the clock transitions from 1-to-0. The pulsed series resonance (PSR) technique recycles this dissipated energy by placing an inductor in the discharging path. LC resonant is most widely used among several energy recycling techniques as it precisely replicates conventional CMOS clocking. However, it suffers from a higher slew rate while demonstrating great savings in dynamic power consumption~\cite{Bezzam:2015}~\cite{Islam:2021}. Due to resonance, the free energy swing obtained as a result of recycling energy, is the difference between resonant high output~($V_{OH}$) and resonant low outupt~($V_{OL}$)~\cite{Bezzam:2015} can be expressed as \begin{equation} \label{energy_saved} V_{OH}-V_{OL} = \frac{V_{DD}}{2}(1+e^{-\pi/Q}) - \frac{V_{DD}}{2}(1-e^{-\pi/2Q}) \end{equation} where $Q$ is the quality factor of the inductor, which is given by~$Q=\sqrt{{L}/{(CR^2)}}$. We utilize an external power source to pull the output from $V_{OH}$ to $V_{DD}$. The resonant frequency at which the inductor resonates with the load capacitance can be expressed as $f_{RES}=\dfrac{1}{2\pi\sqrt{LC}}$. \begin{comment} \begin{equation} \label{res_freq} f_{RES}=\dfrac{1}{T_{RES}}=\dfrac{1}{2\pi\sqrt{LC}} \end{equation} \end{comment} In this work, we proposed several pulsed-type resonant FFs with resonant clock trees for PSR operation. Several prior works have focused on low-power FF designs. In~\cite{Stas:2018} an 18T FF was designed to achieve 40\% improvement in energy/cycle compared to primary-secondary FF (PSFF). However, to mitigate voltage degradation caused due to the non-complementary topology, the authors used a poly bias technique~\cite{Cai:2019}, which requires extra design effort. In~\cite{Cai:2019} an 18T single-phase clocked FF was designed for low power operation. It showed 68\% lower power consumption at 0.6V supply but had functionality issues when the voltage was scaled, as reported in~\cite{Shin:2020, You:2021}. For reliability and robust operation, we implement widely used traditional pulsed register-based and true single-phase clock (TSPC)-based FFs~\cite{Rabaey:2010}. \begin{comment} Fig~\ref{fig:lc_tank} shows the equivalent LC resonant tank of the series resonant circuit which helps determine the resonant frequency and the inductor size. The resistance $R_T$ represents the combined resistance of the NMOS transistor($R_r$), parasitic wiring resistance($r_w$) and the resistance of inductor($R_L$). Applying Kirchhoff's voltage law(KVL) in the voltage loop of Fig.~\ref{fig:lc_tank}, we obtain: \begin{equation} R_Ti_L(t)+\int\frac{i_L(t)}{C}dt+L\frac{di_L(t)}{dt}=\frac{V_{DD}}{2} \end{equation} where $i_L$ is the inductor current. For the under-damped case, the required minimum inductance value is given by the condition $L>R_T^2C/4$. Solving the above equation for $i_L(t)$ would result in , \begin{equation} i_L(t)=\frac{V_{DD}}{2\sqrt{\frac{L}{C}}\sqrt{1-\frac{1}{4Q^2}}}\times e^{\frac{-tR_T}{2L}}\times sin(2\pi f_Rt) \end{equation} where the damped oscillation frequency $f_R$ is given by, \begin{equation} f_R=\frac{1}{2\pi}\sqrt{\frac{1}{LC}-\frac{R_T^2}{4L^2}}=f_{RES}\sqrt{1-\frac{1}{4Q^2}} \end{equation} Here, the resonant frequency $f_{RES}=\dfrac{1}{T_{RES}}=\dfrac{1}{2\pi\sqrt{LC}}$, and the quality factor of the inductor $Q=\sqrt{\dfrac{L}{CR^2}}$. Now, the voltage equation at the capacitor load can be obtained by integrating $C$, which would result in, \begin{align} V_c(t)=\frac{V_{DD}}{2}\!&+ \frac{V_{DD}}{2}\times e^{\frac{-tR_T}{2L}}\times cos(2\pi f_Rt)\\\nonumber\hfill &-\frac{1}{2Q}\frac{V_{DD}}{2}\times e^{\frac{-tR_T}{2L}}\times sin(2\pi f_Rt)\hfill \end{align} Fig.~\ref{fig:lc_tank}(b) shows the $V_C$ curve. The difference between resonant voltage high $V_{OH}$ and resonant voltage low $V_{OL}$ depict the free swing generated by energy recycled. \end{comment} \section{ Conclusion } This paper proposed a resonant clock architecture to balance the skew and recycle the power consumed. The proposed architecture with 13TPFF saves 22.7\% power with 92\% lower clock skew than the conventional clock tree architecture. Furthermore, it saves 43\% power with a 91\% skew reduction while using the PRFF compared to conventional PSFF-based CMOS clock tree architecture in 14 nm FinFET technology. \section{Introduction} \begin{comment} 1. microprocessor processor industry facing power importance of power reduction 2. among different power reduction tchq resonance has potentional to save power. 3. what are the issues of current resonance : resonant clock are good save power but only works at single frequencies; bottle nect is skew,coming from slew, not much support from eda tools; analog and digital circuit; multiple domain expetrise; 4. solution for parallel rez is serioes rez and solving fundamental isue of skew by varying the inductor also introduced a new latch 5. key contirbutions \end{comment} Power consumption is one of the major problems faced in the high-performance microprocessor industry~\cite{Fischer:2011, Cunningham:2021,kumardesign}. The need for an increase in performance has steered the operating frequencies higher, resulting in an increased complexity among the microprocessor designs~\cite{Cunningham:2021, kumar2021novel, khan2019migration}. This higher power led designers to constantly come up with innovative techniques to reduce the power while trying to meet all the design constraints that impact the performance~\cite{jeong2018sense,touil2020design,cet2018review,8370498}. A significant portion of dynamic power consumed in a high-frequency design is due to the switching activity in the clock network~\cite{rabaey_2009}. To address this, several low power techniques such as dynamic voltage and frequency scaling (DVFS)~\cite{Nowka:2002}, clock gating~\cite{Tirumalashetty:2007} and LC resonant clocking{~\cite{Rahman:2018,Bezzam:2015,Fuketa:2014,Islam:2018, Lin:2015}, current-mode clocking~\cite{Islam:2017, Guthaus:2014, Islam:2015} are commonly used. Among them, inductor-based LC resonant clocking techniques have great potential to save switching power due to their constant phase and magnitude. \begin{figure}[t!] \centerline{\includegraphics[width = 0.33\textwidth]{./figures/lc_rez.pdf}} \caption {LC resonance topologies to reduce dynamic power consumption (a) series resonance topology can address wide frequency band (b) parallel resonance topology can address very narrow frequency band.} \label{fig:par_vs_ser_rez} \vspace{-0.5cm} \end{figure} There are several LC resonant techniques, such as parallel resonance~\cite{Rahman:2018} (please see Fig.~\ref{fig:par_vs_ser_rez}(a)), intermittent resonance~\cite{Fuketa:2014} and series resonance~\cite{Bezzam:2015, Bezzam:2021}. However, most of the LC resonant techniques suffer from a limitation of narrow frequency band and high skew. Moreover, most of the industry-standard electronic design automation (EDA) tools do not explicitly support integrating LC resonance in the clock tree architecture. Additionally, designing a resonant clock architecture requires the designer to have multiple domain expertise due to the non-linear behavior of inductors. To overcome the narrow frequency band, researchers utilize series resonance techniques~\cite{Bezzam:2015}, as shown in Fig.~\ref{fig:par_vs_ser_rez}(b). This approach uses an inductor placed in the discharge path to store the dissipated energy in the form of a magnetic field. This energy is recycled in the next rising clock edge. To enable a resonant clock architecture, we need resonant flip-flops (FFs) for synchronous circuits. However, they occupy a substantial chip area consuming high power. Researchers proposed many low-power flip-flops, however, not suitable for resonant operations~\cite{Cai:2019,Stas:2018,Tsai:2018}. In this research, we propose several conventional register-based pulsed FFs suitable for series resonance and reduce the overall power consumption in the clock network. Besides power, skew plays a critical role in enabling high-frequency operation. To reduce the skew generated by clock trees, we introduce the first inductor tuning technique to match the series resonance inductor with the load capacitance of the clock tree, which generates pulses with equal resonant frequencies. As the resonant frequency depends on the series inductor and the load capacitance, we generate a constant pulse-width for a wideband (WB) of input clock frequencies. Therefore, calibrating the inductors once for a clock tree architecture enable WB frequency operation. \begin{comment} In order to reduce the skew generated by clock trees, we introduce a method to tune the inductors to resonate with the load capacitance of the clock tree. resonant frequency depends on the series inductor and the load capacitance, we generate a constant resonants This technique would generate pulses with equal frequencies, that would be utilized as the clock inputs of the pulsed registers. The proposed resonant clock architecture saves 43\% power at 5~$GHz$ frequency compared to a conventional clock tree architecture and has a clock skew of 3.92~$ps$ \end{comment} \begin{comment} {\color{purple}The proposed} 13T pulsed register, that has a negative setup time of -25~$ps$ and hold time of 60~$ps$. \end{comment} This paper proposes a clocking architecture to recycle the power dissipated by the synchronous elements using series resonance technology and improve clock skew by adapting the inductor tuning technique. In particular, the main contributions of this work are: \begin{itemize} \item An architecture to recycle the power dissipated by synchronous elements using series resonance. \item A novel pulse generator with dual-rail booster using series resonance. \item A set of pulsed register-based FFs that exploits the behavior of pulsed series resonance. \item An inductor tuning technique to compensate for the skew in the clock tree architecture. \end{itemize} \begin{comment} \subsection{Paper Organization} The rest of the paper is organized as follows. Section II discusses related works in low-power flip-flops and series resonance techniques. Section III presents the proposed resonant clock architecture, the proposed 13T register, and skew reduction technique. In Section IV, we compare the power and skew of the proposed resonant clock architecture with conventional clock architecture. Finally, Section V concludes this work. \end{comment} \section{Proposed Clock Architecture} The proposed architecture comprises a pulse generator, clock drivers utilizing on-chip inductors, and pulsed registers, as shown in Fig.~\ref{fig:proposed_tree}. \begin{figure}[t!] \centerline{\includegraphics[width = 0.45\textwidth]{./figures/clk_tree_psr_revised_final.pdf}} \caption {The proposed wideband resonant clock tree architecture consists of a system clock source as the root, followed by a pulse generator, multiple PSR drivers with on-chip inductors, clock gaters, clock buffers, and finally, various sets of resonant pulsed FFs in the leaf nodes.} \label{fig:proposed_tree} \vspace{-0.25cm} \end{figure} \subsection{Pulse Generator} The pulse generator is depicted in Fig.~\ref{fig:proposed_tree} takes the input from the clock source and generates a pulse with boosted amplitude. The series inductor $L_1$ and the matching capacitance $C_1$ generate a delay of $T_d=\pi\sqrt{L_1C_1}$. The clock and the delayed signal are fed into an XNOR gate to generate a pulse at both clock edges with a pulse width $T_d$. Now, a voltage doubler circuit is employed to invert the generated dual triggered pulse resulting in a boosted signal $V_{SR}$. The voltage doubler circuit uses the pulsed series resonance technique to generate a boosted signal. When the $\overline{V_{sr}}$ is low, the PMOS transistors $M_1$ and $M_3$ are ``ON,'' and the inductor resonates with the load capacitance $C_2$ and the additional PSR capacitance. For large load capacitances, the value of the series inductors is quite small. The inductor in the voltage doubler circuit can be adjusted according to the load of the pulse generator to produce a boosted signal $V_{SR}$. We use a dual-rail booster circuit to reduce the power consumed by the voltage doubler by decreasing the resistance of the pull-up network. \subsection{Pulsed Series Resonance Driver} The boosted signal $V_{SR}$ from the pulse generator stage is provided as the input to multiple PSR drivers to generate a pulse signal $R_{CLK}$. The inductors on the PSR drivers resonate with the capacitance of the tree to generate a pulse signal that is traversed through many levels of transmission-gate clock gaters and clock buffers. Since we provide a boosted $V_{SR}$ signal as the input, we obtain a rail-to-rail swing at the output of the PSR driver, and it improves the robustness of the design. Then, the output signal of the PSR driver $R_{CLK}$ is inverted and supplied to pulsed registers as the clock input signal $Pclk$. \begin{figure}[t!] \centerline{\includegraphics[width = 0.46\textwidth]{./figures/all_registers2.pdf}} \caption {The proposed series resonant pulsed FFs use (a) A PSR to generate pulse signal to drive the register stage, (b) 13T register, (c) pulsed register, (d) TSPC register to implement three pulsed FFs.} \label{fig:all_reg} \vspace{-0.25cm} \end{figure} \begin{comment} \begin{figure}[t!] \centerline{\includegraphics[width = 0.25\textwidth]{./figures/13t_register.pdf}} \caption {The proposed 13T register uses PSR pulsed output as the input clock to fetch the data to the output node $Q$, acts as an edge-triggered flip-flop, and exhibits negative setup time.} \label{fig:9t_reg} \vspace{-0.25cm} \end{figure} \end{comment} \subsection{Proposed Resonant Pulsed Flip-Flops} To utilize the generated $Pclk$ pulse (from the PSR, as shown in Fig.~\ref{fig:all_reg}(a)), we propose a 13T pulsed FF (13TPFF), as shown in Fig.~\ref{fig:all_reg}(b). It takes the input data and inverts it to provide it to the transistors M2 and M3, respectively. The M2 and M3 transistors drain are connected to the storage cells where the data is stored as logic ``1'' or a logic ``0''. If a ``1'' is stored in the register, the value at $S=1$ and $S_B=0$. If a ``0'' is stored, the voltages will be reversed. When $Pclk$ is ``0,'' the transistor M1 is turned off, wherein the FF is in hold/retain state, and the values of $S$ and $S_B$ are unaltered. Consider the case when $Data=1$ and $Pclk=1$, the transistors M2 and M1 turn on connecting the node $S_b$ to ground, which then discharges the node and makes it 0, making $Q=1$ writing a ``1'' into the register. When $Data=0$ and $Pclk=1$, the transistors M3 and M1 turn ``ON" and write a ``0" at node $Q$. The FF has an active-low asynchronous reset. The M4 and M5 transistors are turned ``ON'' and ``OFF,'' respectively, when the $Reset$ signal goes to low resulting in a logic ``1'' at node $S_b$ that writes a ``0'' the output $Q$. Along with a 13TPFF, we also design pulsed energy recovery FFs. The pulsed resonant FF (PRFF) is based on the traditional latch, and the resonant TSPCFF is based on the TSPC register~\cite{Rabaey:2010}. Except, they use pulsed series resonance to take advantage of the input pulse signal $V_{SR}$ to recycle energy. The energy recovery FFs are positive edge-triggered with asynchronous active low $Reset$ signal. The use of conventional registers makes an easy integration of resonance clock trees into existing clock tree architectures. \subsection{Skew Reduction Methodology} Skew is defined as the spatial variation in the arrival time of clock transition at two different locations. There are several reasons for this skew, and one such cause is different loads on clock drivers~\cite{Rabaey:2010}. In Fig. \ref{fig:testbench_clk_tree}, the eight different branches of the clock tree are having eight different capacitances $C_{SR1}$, $C_{SR2}$, and up to $C_{SR8}$ due to on-chip variation (OCV). This capacitance mismatch between different branches of a clock tree will result in different clock arrival times. Each branch of the clock tree represents a separate $LC$ resonant tank. Using the resonant frequency $f_{RES}=1/2\pi\sqrt{LC}$, we match the inductors $L_{SR1}$ to $L_{SR8}$ with the load capacitances $C_{SR1}$ to $C_{SR8}$, respectively, to have equal frequencies. This inductor matching would result in equal frequency signals in all the clock branches, thus, reducing the skew. The resonant frequency independent of the input clock frequency will not be affected by wide frequency band operation. The primary reason is the $delay = T_d$ of the pulse generator circuit is independent of clock pulse width, and it works on the clock edges. For all the clock frequencies less than the resonant frequency $f_{RES}$, we can have the same inductor value that results in reduced skew. Our results in Section~\ref{subsec:clock_tree} also supported this claim. \section{ Results and Discussion } \subsection{Experimental Setup} \begin{comment} \begin{figure*}[ht] \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=0.95\linewidth]{figures/msff_histogram.pdf} \caption{MS flip-flop} \label{fig:monte_simsa} \end{subfigure \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=0.95\linewidth]{figures/pulsed_histogram.pdf} \caption{Pulsed register} \label{fig:monte_simsb} \end{subfigure} \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=0.95\linewidth]{figures/tspc_histogram.pdf} \caption{TSPC register} \label{fig:monte_simsc} \end{subfigure \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=0.95\linewidth]{figures/13t_histogram.pdf} \caption{13T register} \label{fig:monte_simsd} \end{subfigure} \caption{Illustration of Monte-Carlo simulation results for various registers by considering 5000 samples with $\pm 10\%$ length variation. (a) MSFF, (b) PRFF, (c) TSPCFF, and (d) 13TFF. } \label{fig:monte_sims} \end{figure*} \end{comment} \begin{figure*} \captionsetup{aboveskip=-0.00cm,belowskip=-0.250cm} \centering \vspace{-0.5cm} \subfigure[]{\includegraphics[width=0.22\textwidth]{./figures/msff_histogram.pdf}} \subfigure[]{\includegraphics[width=0.22\textwidth]{./figures/pulsed_histogram.pdf}} \subfigure[]{\includegraphics[width=0.22\textwidth]{./figures/tspc_histogram.pdf}} \subfigure[]{\includegraphics[width=0.22\textwidth]{./figures/13t_histogram.pdf}} \caption{Illustration of Monte-Carlo simulation results for various FFs by considering 5000 samples with $\pm 10\%$ length variation. (a) PSFF, (b) PRFF, (c) TSPCFF, and (d) 13TPFF.} \label{fig:monte_sims} \vspace{-0.50cm} \end{figure*} The proposed resonant clock tree architecture, as shown in Fig.~\ref{fig:testbench_clk_tree} is implemented using a standard 14nm FinFET technology. Conventional clock tree architecture is used as a reference model to compare with the proposed architecture. Each tree has eight clock drivers, 4K clock gaters, 8K clock buffers, and 32K FFs. The traditional clock tree makes use of transmission gate PSFFs, whereas the resonant clock tree uses pulsed FFs, as shown in Fig.~\ref{fig:testbench_clk_tree}(a) and Fig.~\ref{fig:testbench_clk_tree}(b), respectively. All the FFs layouts are compatible with a standard cell height of 24 horizontal M2 tracks. All the simulations are performed for frequencies ranging from 1~${GHz}$ to 5~${GHz}$. \begin{comment} The implemented resonant clock tree architecture is shown in Fig.~\ref{fig:testbench_clk_tree}. using SAED14nm FINFET technology. The conventional clock tree architecture is used as a reference model to compare the proposed resonant clock tree architecture. The traditional clock tree makes use of transmission gate master slave flip flop(MSFF); whereas the resonant clock tree uses the proposed pulsed register. For better comparison of power and performance, we test the proposed resonant clock tree using a traditional pulsed register, and a TSPC based pulsed register. \end{comment} \begin{figure}[t!] \centerline{\includegraphics[width = 0.48\textwidth]{./figures/testbench4.pdf}} \caption {Clock tree architectures used for functional simulations, (a) conventional clock tree architecture with eight branches and different loads totaling 32k FFs, (b) resonant clock tree architecture replicating the same number of branches and loads as the conventional one.} \label{fig:testbench_clk_tree} \vspace{-0.25cm} \end{figure} \begin{figure}[t!] \centerline{\includegraphics[width = 0.35\textwidth]{./figures/functionality_tree.pdf}} \caption {Simulation waveforms show a CLK input of 0.5~${GHz}$ is provided to generate a 1~${GHz}$ $Pclk$ clock to assert as a clock input to the pulsed FFs.} \label{fig:functionality_sim} \vspace{-0.25cm} \end{figure} \begin{figure}[t!] \centerline{\includegraphics[width = 0.32\textwidth]{./figures/layout_13T.pdf}} \caption {13TPFF layout is implemented using 14 nm FinFET technology following standard cell height, which improves setup-time constraints compared to PSFF.} \label{fig:layout_13t} \vspace{-0.5cm} \end{figure} \begin{table} \caption{The proposed 13TPFF exhibits better set-up time than the PSFF and better hold-time than TSPCFF and PRFF while consuming more dynamic power and area; however, it consume lower static power than PSFF and enables power saving in overall clock architecture.} \centering \label{tab:reg_comps} \resizebox{\linewidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Types of}\\\textbf{FF}\end{tabular}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Normalised}\\\textbf{area}\end{tabular}} & \multicolumn{3}{c|}{\textbf{Delay ($ps$)}} & \multicolumn{2}{c|}{\textbf{Static power ($pW$)}} & \multicolumn{5}{c|}{\textbf{Dynamic power ($\mu W$)}} \\ \cline{3-12} & & \textbf{C-Q} & \textbf{ts} & \textbf{th} & \textbf{D=0} & \textbf{D=1} & \textbf{1GHz} & \textbf{2GHz} & \textbf{3GHz} & \textbf{4GHz} & \textbf{5GHz} \\ \hline \textbf{PSFF} & 1 & 32.5 & 14 & 2 & 1550 & 593 & 8.3 & 14.1 & 21 & 28 & 35.1 \\ \hline \begin{tabular}[c]{@{}c@{}}\textbf{PRFF}\end{tabular} & 0.59 & 35.1 & -95 & 96 & 278 & 272 & 7.16 & 13.8 & 20.4 & 27.1 & 33.8 \\ \hline \begin{tabular}[c]{@{}c@{}}\textbf{TSPCFF}\end{tabular} & 0.84 & 41.9 & -92 & 93 & 283 & 664 & 12.3 & 20.2 & 28 & 35.9 & 43.7 \\ \hline \begin{tabular}[c]{@{}c@{}}\textbf{13TPFF}\end{tabular} & 1.75 & 37.3 & -25 & 60 & 501 & 538 & 16.2 & 31.1 & 46 & 61 & 76 \\ \hline \end{tabular} } \vspace{-0.5cm} \end{table} \begin{table}[ht] \caption{Our proposed PRFF outperforms all the FFs and consumes 43\% less power than the conventional PSFF with ${11\times}$ improvement in skew, while TSPCFF and 13TPFF consume 26\% and 20.2\% less power than the PSFF, respectively.} \label{tab:tree_power} \centering \resizebox{\linewidth}{!}{% \begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}\textbf{Types of}\\\textbf{flip-flop}\end{tabular}} & \multirow{2}{*}{\textbf{Skew ($ps$) }} & \multicolumn{5}{c|}{\textbf{Total tree power ($mW$)}} \\ \cline{3-7} & & \textbf{1GHz} & \textbf{2GHz} & \textbf{3GHz} & \textbf{4GHz} & \textbf{5GHz} \\ \hline \textbf{PSFF}~ & 51.1~ & 30.8~ & 60.6 & ~89.2 & ~116~ & 138 \\ \hline \textcolor[rgb]{0.125,0.129,0.141}{\textbf{PRFF}} & 4.61 & 17.4 & 34.1 & 50.3 & 65.7 & 78.7 \\ \hline \textcolor[rgb]{0.125,0.129,0.141}{\textbf{TSPCFF}} & 2.05 & 22.2 & 43.6 & 64.6 & 84.4 & 102 \\ \hline \textcolor[rgb]{0.125,0.129,0.141}{\textbf{13TPFF}} & 3.92 & 23.8 & 46.8 & 69.4 & 90.7 & 110 \\ \hline \end{tabular} } \vspace{-0.25cm} \end{table} \subsection{Implementation Results} \subsubsection{Power and Performance Comparison of Registers} For measuring the performance and functionality of the proposed 13TPFF under process variations, we consider 5000 samples of CLK-to-Q ($t_{c-q}$) delay using Monte-Carlo simulation. $\pm 10$\% variation in the length of all devices is considered while performing the simulations. The $t_{c-q}$ delay distributions of PSFF, PRFF, TSPCFF, and 13TPFFs are shown in Fig.~\ref{fig:monte_sims}(a), Fig.~\ref{fig:monte_sims}(b), Fig.~\ref{fig:monte_sims}(c), and Fig.~\ref{fig:monte_sims}(d), respectively. Among all the resonant FFs, the PRFF has lowest mean $t_{c-q}$ of 35 ps with standard deviation of 0.066~$ps$. The normalized layout area, $t_{c-q}$, setup times~$(t_s)$, hold times~$(t_h)$, and power for the FFs are listed in Table~\ref{tab:reg_comps}. Among all the competing FFs, the 13TPFF consumed the highest layout area of 9.62~${um^2}$, which is 1.75$\times$ the area of PSFF whose area is 5.151~${um^2}$, and 2.9$\times$ the area of a PRFF whose area is 3.091~${um^2}$. The proposed 13TPFF has a $t_s$ of -25~$ps$ and a $t_h$ of 60~$ps$ with a clock-to-q delay of 37.3~$ps$. Empirically, pulsed register-based FFs exhibit negative $t_s$, which tremendously impacts resolving $t_s$ related timing issues. The PSFF has a $(t_s)$ of 14~$ps$, $(t_h)$ of 2~$ps$ and $t_{c-q}$ of 32.5~$ps$. The resonant PRFF has a better $(t_s)$ of -95~$ps$ but has a high $(t_h)$ of 96~$ps$ which is similar to the TSPCFF with -92~$ps$ $(t_s)$ and 93~$ps$ $(t_s)$. However, the power consumed by the proposed 13TPFF is 2$\times$ higher than the PSFF. Among all the competing FFs, the PRFF consumes the lowest dynamic static and dynamic powers. \subsubsection{Clock Tree} \label{subsec:clock_tree} The functional simulation for the resonant clock is shown in Fig.~\ref{fig:functionality_sim}. We provide 0.5~${GHz}$ clock as input clock source shown in Fig.~\ref{fig:proposed_tree}. The output of the pulse generator is a boosted signal $V_{SR}$ of 1~${GHz}$ frequency. This $V_{SR}$ signal is then provided to a PSR driver whose output is $R_{CLK}$. This clock signals $IN_{1}$ along with the Data signal generates the output $Q$, as shown Fig.~\ref{fig:all_reg}(b). We compare the power and skew of the proposed clock architecture, as shown in Table~\ref{tab:tree_power} for frequencies ranging from 1~${GHz}$ to 5~${GHz}$. The power consumed by the proposed architecture while using 13TPFFs at 1~${GHz}$ frequency is 23.8~$mW$, compared to a conventional clock tree architecture with PSFF that consumes 30.8~$mW$. The skew generated by the conventional clock tree is 51.1~$ps$. As a result of inductor tuning, the skew generated by the proposed resonant clock architecture is 3.92~$ps$. The proposed architecture saves 22.7\% power using the 13TPFFs compared to conventional tree. The resonant clock tree using TSPCFFs has a skew of 2.1~$ps$ and saves 27.9\% power, whereas the clock with PRFFs has a skew of 4.6~$ps$ and saves 43\% power compared to conventional clock.
\section*{Plain Language Summary} \section{Introduction \label{sec:intro}} The role of clouds in a changing climate poses a key challenge to earth system science today \cite{bony_clouds_2015,siebesma_clouds_2020}. Fundamental processes in cloud dynamics remain insufficiently understood, particularly how convective clouds cluster and interact with their environment. This leads to uncertainties when estimating cloud-radiative feedbacks and precipitation patterns, which modulate the Earth's energy budget and water cycle. Understanding convective organization is therefore crucial for precise predictions of climate sensitivity as well as regional moisture variability and extreme weather events. In the tropics, clouds organize across a wide range of spatial and temporal scales \cite{moncrieff_multiscale_2010}. Diurnally, convective cells, or thunderstorms, often cluster in mesoscale convective systems (MCSs), which are associated with extreme precipitation and the genesis of tropical cyclones \cite{tan_increases_2015,schumacher_formation_2020}. Intraseasonally, variability is dominated by the Madden-Julian Oscillation (MJO), an eastward-propagating zone of strong deep convective activity \cite{madden_description_1972, zhang_madden-julian_2005}. Although the MJO is known to couple to the large-scale circulation and impact weather around the globe, it remains difficult to model \cite{jiang_fifty_2020, demott_atmosphere-ocean_2015}. Due to the multiscale interaction of tropical convection, small-scale processes may be key to understanding large-scale patterns. Indeed, it is increasingly acknowledged that the diurnal variability of sea surface temperature (SST) plays an important role for atmospheric dynamics. Observations draw a clear link between strong diurnal SST oscillations and a diurnal cycle of cumulus convection \cite{johnson_trimodal_1999}. Furthermore, several studies have proposed that the diurnal cycle of SST, by enhancing heat exchange between the ocean and atmosphere, helps trigger the active phase of the MJO \cite{seo_coupled_2014, woolnough_role_2007, zhang_madden-julian_2005}. Neglecting diurnal SST variations in atmospheric modeling may lead to a bias on the order of \SI{10}{\watt\per\square\meter} in monthly-averaged surface heat fluxes \cite{weihs_modeled_2014}. These findings emphasize the relevance of resolving diurnal air-sea interactions when modeling convective organization. However, many numerical studies of tropical convection employ idealized high-resolution simulations that prescribe a constant SST in space and time. A popular modeling framework is \textit{radiative-convective equilibrium} (RCE), where constant solar forcing is balanced by outgoing longwave radiation above a constant, homogeneous SST \cite{tompkins_radiativeconvective_1998}. Under RCE, the moisture field is known to spontaneously self-organize into convective clusters separated by extended dry regions \cite{bretherton_energy-balance_2005}. This mechanism termed \textit{convective self-aggregation} (CSA) has been associated with real-world features such as MCS formation. Yet, CSA is hampered in the realistic limit of fine horizontal model resolution, challenging the realism of CSA \cite{yanase_new_2020}. Recent studies, by imposing a diurnal oscillation of SST, demonstrate the emergence of \textit{diurnal self-aggregation} even at fine spatial resolution \cite{haerter_diurnal_2020, jensen_diurnal_2021}. Likewise, spatial variations in SST have been shown to imprint themselves on the moisture field \cite{muller_self-aggregation_2020, shamekh_how_2020}. These results indicate that SST variability can substantially alter the spatio-temporal patterns of marine tropical convection, thereby calling for the development of higher-fidelity SST representations in atmospheric simulations. To implement a responsive SST, a common choice is to model the upper ocean as a single-layer slab with fixed heat capacity, which absorbs and re-emits heat according to parameterized surface fluxes. Several studies have coupled a slab ocean to cloud-resolving simulations, reporting overall that a responsive SST slows down or even prevents the onset of convective aggregation \cite{hohenegger_coupled_2016, shamekh_self-aggregation_2020, coppin_internal_2017, tompkins_impact_2021, wing_convective_2017}. In this paper, we show that such slab models are inadequate to describe diurnal SST warming realistically, as they fail to capture its wind-dependence by neglecting vertical oceanic heat transfer. SST plays a key role in governing the heat and moisture exchange between the atmosphere and ocean. While observed diurnal amplitudes of surface temperatures are typically largest over land, a diurnal cycle of SST is also common throughout the tropical ocean \cite{kawai_diurnal_2007}. Under strong insolation and calm conditions, a diurnal warm layer forms during the day, raising SST by up to 3-4°C. Some field studies have observed extreme diurnal warming events of 5°C or more, though these often lie in the extra-tropics or coastal regions \cite{gentemann_multi-satellite_2008, minnett_radiometric_2003}. Importantly, the amplitude of diurnal warming is highly sensitive to wind speed. Observations suggest an approximately exponential decay of diurnal warming with increasing wind speed \cite{gentemann_diurnal_2003, borner_modeling_2021}. Understanding the physical processes behind diurnal sea surface warming requires a look beneath the surface. On a calm, clear day after sunrise, the incident solar radiation quickly heats up the upper ocean, creating a stably stratified density profile. This stratification leads to suppressed vertical heat exchange, hence trapping further heat near the surface in a positive feedback loop which can produce strong surface warming. Later, in the early afternoon when the net surface heat flux changes sign, surface cooling causes unstable density stratification which initiates vertical mixing, resulting in a deepening of the diurnal warm layer. At night, convective mixing typically acts to \enquote{reset} the temperature profile. Furthermore, wind stress induces turbulent mixing in the water column, such that diurnal surface warming is, to first order, a competition between insolation-driven thermal stratification and wind-driven mixing. Known as the cool skin effect, the molecular skin layer at the sea surface is typically a few tenths of a degree colder than the water a millimeter deeper. Upper ocean heat transfer has been modeled on various levels of complexity over the last fifty years \cite{kawai_diurnal_2007}, ranging from fully turbulence-resolving models \cite{kondo_wind-driven_1979, mellor_development_1982, large_oceanic_1994, kantha_improved_1994, noh_simulations_1999} to simplified bulk or slab models \cite{price_diurnal_1986, fairall_cool-skin_1996, gentemann_profiles_2009, zeng_prognostic_2005} and empirical models \cite{webster_clouds_1996, kawai_evaluation_2002, price_diurnal_1987, zeng_multiyear_1999, gentemann_diurnal_2003}. The most detailed models numerically solve the equations of motion and thermodynamics that govern momentum, temperature, and salinity; turbulence is either parameterized using Monin-Obukhov similarity theory \cite{kondo_wind-driven_1979, large_oceanic_1994} or computed explicitly using closure schemes at second or higher order \cite{mellor_development_1982, kantha_improved_1994}. Though such ocean models have been coupled to a weather forecasting model \cite{noh_prediction_2011}, they are computationally heavy. Simplified models have been developed in the spirit of subdividing the water column into layers described by bulk dynamical equations. For example, the popular PWP model by \citeauthor{price_diurnal_1986} \citeyear{price_diurnal_1986} considers heat, momentum and salinity budgets in a diurnal mixed layer the depth of which evolves in time based on a Richardson number criterion. The PWP model has been further simplified by \citeauthor{fairall_cool-skin_1996} \citeyear{fairall_cool-skin_1996} into the F96 model, which assumes a linear temperature profile within the diurnal warm layer and further introduces a cool skin layer. Additional refinements have been introduced by \citeauthor{gentemann_profiles_2009} \citeyear{gentemann_profiles_2009} with their POSH model and by \citeauthor{schiller_diagnostic_2005} \citeyear{schiller_diagnostic_2005}. \citeauthor{zeng_prognostic_2005} \citeyear{zeng_prognostic_2005} derive a prognostic equation for skin temperature based on a Monin-Obukhov stability function and a prescribed power-law temperature profile. Lastly, the category of empirical models comprises candidates that specialize on estimating the amplitude of the SST cycle over the course of a day \cite{webster_clouds_1996, price_diurnal_1987, kawai_evaluation_2002} or its hourly evolution \cite{li_impacts_2001, zeng_multiyear_1999, gentemann_diurnal_2003} based on averaged atmospheric data. In this paper, we present an idealized, one-dimensional model of diurnal temperature evolution in the upper few meters of the tropical ocean. Forced by insolation and atmospheric conditions, our model consists of a single partial differential equation that treats vertical heat transport as diffusion combined with an additional temperature relaxation term. This retains conceptual simplicity while mimicking important processes such as wind-driven turbulence, near-surface heat trapping, and skin cooling. Using radiometric sea skin temperature observations, we show that the model is capable of reproducing key features of diurnal surface warming -- in contrast with previously used slab models. Aiming to be as simple as possible yet as complex as necessary to capture the wind-dependence of diurnal SST warming, our model is designed to be suitable as an interactive lower boundary condition for cloud-resolving atmospheric models. \section{Model} \subsection{Idealized approach} Our approach relies on the following basic assumptions. First, we assume that the oceanic, atmospherically-driven diurnal temperature variability is constrained to within a few meters from the sea surface. We thus define the \textit{foundation depth} $z_f$ at which diurnal temperature changes become negligible. Conceptually, this partitions the water column into the \textit{diurnal layer} above $z_f$ and the \textit{foundation layer} below. Second, we assume that we may separate the scales of diurnal warming from the ocean's slow internal temperature variability. The foundation layer may then be considered as an infinite heat reservoir with constant \textit{foundation temperature} $T_f$. Third, we neglect any horizontal inhomogeneities and flows, allowing us to treat the problem as one-dimensional. The goal is thus to determine the evolution of the vertical temperature profile in response to a given time sequence of atmospheric forcing. This requires a description of heat transport within the diurnal layer as well as heat exchange between the diurnal and foundation layers. A schematic sketch of the setup is depicted in Fig. \ref{fig:schematic}. \begin{figure} \centering \noindent\includegraphics[width=.6\textwidth]{figs/schematic_new.pdf} \caption{Schematic of the simplified upper ocean model, illustrating the processes considered.} \label{fig:schematic} \end{figure} \subsection{Main equation} We consider the sea temperature $T(z,t)$ as a function of time $t \geq 0$ and vertical coordinate $z \in (z_f,0]$, where $z=0$ defines the air-sea interface and $z<0$ is below the surface. Given an initial profile $T(z,0)$, foundation temperature $T_f$, and atmospheric forcing $\mathcal{F}(t)$, we propose a single prognostic partial differential equation (PDE) for the time evolution of $T \equiv T(z,t)$: \begin{align} \label{eq:model-pde} \pdv{T}{t} = \underbrace{ \pdv{z} \left( \kappa(z,t) \pdv{T}{z} \right)}_{\text{diffusion}} - \underbrace{\mu \frac{T-T_f}{z-z_f}}_{\text{mixing}} + \underbrace{\frac{1}{\rho_w c_p} \pdv{Q(z,t)}{z}}_{\text{source/sink}} \ . \end{align} Here $\kappa>0$ represents the (time- and depth-dependent) diffusivity, $\mu > 0$ is a constant which we term mixing coefficient, and the constants $\rho_w$ and $c_p$ denote the density and specific heat capacity at constant pressure of sea water, respectively. Finally, $Q$ is the net vertical heat flux at depth $z$, defined positive downwards (into the ocean). Explicit expressions of these quantities in relation to the forcing $\mathcal{F}$ follow below. The three terms on the right-hand side of equation \eqref{eq:model-pde} provide strongly idealized representations of different physical processes. Motivated by the heat equation, the first term describes the vertical heat transport due to turbulent eddies within the diurnal layer. We thus treat turbulence as simple \textit{diffusion}. Apart from wind-induced turbulence, internal processes such as convection may cause additional vertical \textit{mixing} of water masses between the diurnal layer and the foundation layer. This is crudely incorporated by the second term, which relaxes $T$ to the foundation temperature with relaxation time scale $t_\mu = (z-z_f)/\mu$. Here the depth dependence reflects the intuition that water near the foundation depth will mix faster with foundation-layer water compared to water near the surface. Lastly, the third term comprises all \textit{sources} and sinks of heat, both at the air-sea interface and within the diurnal layer. We emphasize that the foundation temperature $T(z_f,t) = T_f \ \forall t$ acts as a Dirichlet boundary condition at $z_f$. At the air-sea interface ($z=0$), the sea temperature evolves according to the net surface heat flux $Q_0(t) \equiv Q(0,t)$ (see section \ref{sec:air-sea}), which closes the energy budget. \subsection{Wind-driven turbulent mixing \label{sec:diffusivity}} Our central aim is to model the wind dependence of diurnal SST warming. Wind stress at the sea surface induces shear instability, causing vertical turbulent heat transport in the upper ocean. This implies that the diffusivity $\kappa(z,t)$ in our model should depend on the wind speed $u(t)$. Since the magnitude of wind stress on a water surface is approximately proportional to the square of the wind speed \cite{smith_coefficients_1988}, we propose to model the diffusivity as \begin{align} \label{eq:diffusivity} \kappa(z,t) := \kappa_\text{mol} + \kappa_0 \varphi(z) \left( \frac{u(t)}{u_0} \right)^2 \ , \end{align} where $\kappa_\text{mol}$ and $\kappa_0$ are coefficients of molecular and vertical eddy diffusion, respectively. Typically, $\kappa_\text{mol} \ll \kappa_0$, i.e. molecular heat conduction is negligible. Note the scaling with the square of the wind speed, which we non-dimensionalize by the reference wind speed $u_0 = \SI{1}{\meter\per\second}$ simply to ensure that $\kappa_0$ has units of diffusivity. The vertical diffusivity profile $\varphi (z)$ approximates how turbulent mixing varies with depth. Here, we limit our study to an idealized linear profile, \begin{align} \label{eq:diffu-profile} \varphi (z) = 1 + \sigma \left( \frac{z}{z_f} - 1 \right) \ , \end{align} parameterized by the surface suppressivity $\sigma \in [0,1]$. If $\sigma>0$, then $\varphi$ increases linearly with depth from $\varphi(0) = 1-\sigma$ at the surface to $\varphi(z_f) = 1$ at the foundation depth. \begin{comment} The vertical diffusivity profile $\varphi (z)$ approximates how turbulent mixing varies with depth. Here, we limit our study to the following idealized profile, \begin{align} \label{eq:diffu-profile} \varphi (z) = \frac{1- \sigma \exp(z/\lambda)}{A} \ , \end{align} parametrized by the suppressivity $\sigma \in [0,1]$ and the trapping depth $\lambda > 0$. The scaling constant $A := 1- \sigma e^{z_f/\lambda}$ is chosen such that $\varphi(z_f)=1$. If $\sigma >0$, then $\varphi$ decreases exponentially towards the sea surface, where $\varphi(0) = 1-\sigma$. \end{comment} Physically, thermal density stratification inhibits turbulent heat transfer, since vertical mixing of a stratified fluid is energetically unfavorable. Additionally, the characteristic size of eddies decreases when approaching the air-sea boundary \cite{pope_turbulent_2000}. Both effects motivate suppressing the diffusivity near the surface, where stratification becomes largest during diurnal heating. Instead of the highly simplified linear profile given in eq. \eqref{eq:diffu-profile}, a nonlinear, dynamic diffusivity profile could incorporate the nature of upper ocean turbulence more realistically. For instance, a state-dependent profile, $\varphi = \varphi(z,T(z,t))$, could reflect the temperature dependence of stratification. A time-dependent diffusivity profile would further allow to parameterize the effect of precipitation which we neglect in the present model. Generally, rain modifies the density structure near the surface by forming a layer of cool freshwater; this can either enhance heat trapping or mixing, depending on the competing effects of salinity and temperature \cite{webster_clouds_1996}. We discuss additional diffusivity profiles in the appendix. \subsection{Air-sea interaction \label{sec:air-sea}} \noindent In our ocean model, the state of the atmosphere is described by the forcing $\mathcal F(t) \equiv (R_{sw,\downarrow}(t), \, u(t), \, T_a(t), \, q_v(t))$, comprising the downward solar, or \enquote{shortwave}, irradiance $R_{sw,\downarrow}$, horizontal wind speed $u$, air temperature $T_a$, and specific humidity $q_v$. These quantities refer to some reference height above the sea surface (usually \SI{10}{m}, where they are typically measured \cite{friehe_parameterization_1976}. The diurnal layer interacts with the atmosphere through the absorption and reflection of shortwave radiation, the absorption and emission of thermal, or \enquote{longwave}, radiation, as well as sensible and latent heat exchange. While shortwave radiation penetrates the sea surface and is absorbed at a range of depths, the other fluxes act within micrometers of the air-sea interface \cite{wong_response_2018}. At the air-sea interface, the net surface heat flux, denoted $Q_0(t)$, that enters the water body is given by \begin{align} \label{eq:flux-net} Q_0(t) = R_\text{sw}(t) + R_\text{lw}(t) + Q_\text{s}(t) + Q_\text{l}(t) \ , \end{align} where $R_\text{sw} \geq 0$ is the shortwave irradiance entering the water body, after subtracting from $R_{\text{sw},\downarrow}$ the fraction that is reflected at the sea surface (see appendix). While the net longwave radiative flux $R_\text{lw}$ and sensible heat flux $Q_\text{s}$ can point into or out of the ocean, the latent heat flux $Q_\text{l}$ is always negative. We use standard bulk formulae to describe the surface heat fluxes \cite{friehe_parameterization_1976, decosmo_air-sea_1996, wells_parametrization_1990}, \begin{subequations} \begin{align} R_\text{lw}(t) &= \sigma_\text{SB} \big( T_a(t)^4 - T(0,t)^4 \big) \label{eq:flux-lw}\,, \\ Q_\text{s}(t) &= \rho_a c_{p,a} C_s u(t) \big(T_a(t)-T(0,t) \big)\,, \\ Q_\text{l}(t) &= \rho_a C_l L_v u(t) \, \big(q_v(t) - q_\text{sat}(T(0,t)) \big) \ , \label{eq:flux-l} \end{align} \end{subequations} given in terms of the Stefan-Boltzmann constant $\sigma_\text{SB}$, the density and specific heat capacity of air, $\rho_a$ and $c_{p,a}$, respectively, as well as the Stanton number $C_s$, Dalton number $C_l$, and latent heat of vaporization $L_v$. We approximate these coefficients by constants based on literature values (see table \ref{tab:constants}), which are roughly valid for wind speeds on the order of 1 to \SI{10}{\meter\per\second} and air-sea temperature differences around \SI{1}{K}, with respect to a reference height of \SI{10}{m} above sea level \cite{wells_parametrization_1990}. Note that Eq. \eqref{eq:flux-lw} simply applies the Stefan-Boltzmann law for black body radiation. Furthermore, the latent heat flux, Eq. \eqref{eq:flux-l}, involves the saturation specific humidity $q_\text{sat}(T)$. The temperature dependence of $q_\text{sat}$ obeys the Clausius-Clapeyron relation, which is approximated by the empirical formula \begin{align} q_\text{sat}(T) \approx \frac{611.2}{\rho_a r_w T} \exp \left( \frac{17.67(T-273.15)}{T-29.65} \right) \, , \end{align} where $r_w$ denotes the gas constant of water vapor and $T$ enters in units of kelvins \cite{alduchov_improved_1996}. We assume that the penetrating shortwave radiation $R_\text{sw}$ is attenuated exponentially as it propagates downward through the water column, \begin{align} \label{eq:Q(z,t)} Q(z,t) = R_\text{sw}(t) \exp \left( \frac{\alpha z}{\cos \phi'} \right) \qquad \text{for } z<0 \ , \end{align} where $\alpha>0$ is the \textit{attenuation coefficient} and $\phi'$ denotes the refracted solar angle. It follows from the sun's angle relative to the surface normal, $\phi \in [0,\pi/2)$, by Snell's refraction law, \begin{align} \phi' = \arcsin \left( \frac{n_a}{n_w}\sin \phi \right) \ , \end{align} where $n_w$ and $n_a$ denote the refractive indices of sea water and air, respectively. To summarize, our idealized model is controlled by three key parameters: (i) the eddy diffusivity $\kappa_0$ governs the magnitude of wind-driven turbulent heat diffusion; (ii) the mixing coefficient $\mu$ sets the time scale of relaxation to the foundation temperature; and (iii) the attenuation coefficient $\alpha$ regulates how deep shortwave radiation penetrates. Realistic values of these parameters are estimated from observational evidence (section \ref{sec:calibration}). We list all model constants and coefficients in Table \ref{tab:constants}. \begin{table} \caption{Model constants and their default values.} \label{tab:constants} \centering \begin{tabular}{l l r r} \hline Quantity & Symbol & Unit & Value \\ \hline Eddy diffusivity & $\kappa_0$ & \SI{}{\square\meter\per\second} & \SI{1.42e-4}{}* \\ Mixing coefficient & $\mu$ & \SI{}{\meter\per\second} & \SI{2.93e-3}{}*\\ Attenuation coefficient & $\alpha$ & \SI{}{\per\meter} & \SI{4.01}{}* \\ Foundation depth & $z_f$ & \SI{}{m} & $-10$ \\ Surface suppressivity & $\sigma$ & -- & 0.8 \\ \hline Molecular diffusivity (water) & $\kappa_\text{mol}$ & \SI{}{\square\meter\per\second} & \SI{1e-7}{} \\ Specific heat (water) & $c_p$ & \SI{}{\joule\per\kelvin\per\kilogram} & \SI{3850}{} \\ Specific heat (air) & $c_{p,a}$ & \SI{}{\joule\per\kelvin\per\kilogram} & \SI{1005}{} \\ Density (water) & $\rho_w$ & \SI{}{\kilogram\per\cubic\meter} & \SI{1027}{} \\ Density (air) & $\rho_a$ & \SI{}{\kilogram\per\cubic\meter} & \SI{1.1}{} \\ Refractive index (water)& $n_w$ & -- & 1.34 \\ Refractive index (air)& $n_a$ & -- & 1.00 \\ Stanton number & $C_\text{s}$ & -- & \SI{1.3e-3}{} \\ Dalton number & $C_\text{l}$ & -- & \SI{1.5e-3}{} \\ Latent heat of vaporization & $L$ & \SI{}{\joule\per\kilogram} & \SI{2.5e6}{} \\ Stefan-Boltzmann const. & $\sigma_\text{SB}$ & \SI{}{\watt\per\square\meter\per\kelvin\tothe{4}} & \SI{5.67e-8}{} \\ Gas constant (water vapor) & $r_w$ & \SI{}{\joule\per\kelvin\per\kilogram} & \SI{461.51}{} \\ \hline Grid spacing at surface & $\Delta z_0$ & \SI{}{m} & 0.1 \\ Number of vertical grid points & $N$ & -- & 40 \\ \hline \multicolumn{2}{l}{* MAP values, see table \ref{tab:posteriors}.} \end{tabular} \end{table} \subsection{Numerical implementation \label{sec:numerical}} \noindent To solve equation \eqref{eq:model-pde}, we discretize the spatial coordinate $z$ and numerically integrate the resulting system of ordinary differential equations in time (see appendix). Balancing computational efficiency with accuracy, we approximate spatial derivatives by second-order accurate finite differences on a non-uniform vertical grid. We set the foundation depth to $z_f=\SI{-10}{m}$, where diurnal temperature variability is mostly negligible \cite{kawai_diurnal_2007}. The grid spacing is set to $\Delta z_0 = \SI{0.1}{m}$ at the sea surface and increases by a stretch factor $\epsilon \approx 1.04$ with each consecutive grid point below, such that a total of $N=40$ grid points cover the diurnal layer $z \in (z_f,0]$ (excluding the boundary point at $z_f$). Specifically, the depth $z_n$ of the $n$-th grid point is given by \begin{align} \label{eq:grid} z_n = - \Delta z_0 \left( \frac{1-\epsilon^n}{1-\epsilon} \right) \ , \qquad n \in \{ 0, \dots, N \} \,, \end{align} with $\epsilon$ set such that $z_N = z_f$. We implement the time integration as an explicit Euler scheme, which is numerically stable if the chosen time step $\Delta t$ satisfies the Courant-Friedrichs-Lewy (CFL) condition, \begin{align} \mathcal{C}_i := \max_n 2\frac{\kappa(z_n, t_i)\Delta t_i}{(\Delta z_n)^2} \leq 1 \ , \qquad n = 0,1,2,\dots,N-1 \ , \end{align} where $n$ and $i$ index the discrete space and time coordinates, respectively. We emphasize that via the time-dependent diffusivity $\kappa$, the CFL condition depends on time, specifically on the current wind speed. To minimize computational cost, we use an adaptive time step $\Delta t_i$ that maintains a maximal CFL number of $\mathcal{C}_i = 0.95$ at each instant of time $t_i$. Consequently, the time step $\Delta t_i$ scales inversely with the square of the wind speed. In order to constrain computation time, we impose a cut-off wind speed $u_\text{max} = \SI{10}{\meter\per\second}$, causing any wind speed $u > u_\text{max}$ to be replaced by $u_\text{max}$ when computing the diffusivity (eq. \eqref{eq:diffusivity}). Comparing the explicit Euler scheme with analogous implementations of the fourth-order Runge-Kutta and implicit Euler methods, we find that the explicit Euler scheme is fastest unless the implicit method is used at very large time step, in which case the solution lacks accuracy. \section{Model calibration \label{sec:calibration}} \noindent Our model parameterizes diurnal warming in terms of three unknown constants: the diffusivity coefficient $\kappa_0$, the mixing coefficient $\mu$, and the attenuation coefficient $\alpha$. In this section, we first analyze the basic effect of these parameters, and then use Bayesian inference to estimate their values based on observational data. \subsection{Parameter sensitivity under idealized forcing \label{sec:ideal-forcing}} \noindent As an initial step, we perform a sensitivity study where we force the model with idealized atmospheric pseudo-data representing a calm and clear tropical day. Setting the foundation temperature to $T_f=\SI{300}{K}$, we let the air temperature $T_a(t)$ oscillate harmonically around $T_f$ with a diurnal amplitude of $\Delta T = \SI{2}{K}$. Similarly, we impose a harmonically oscillating horizontal wind speed with a mean of $\overline{u}= \SI{2}{\meter\per\second}$ and amplitude $\Delta u=\SI{2}{\meter\per\second}$, peaking at midnight (this choice generates favorable conditions for large diurnal warming and nighttime mixing). Such profiles read as: \begin{align} T_a(t) = T_f-\frac{\Delta T}{2} \cos(2\pi t/t_0)\,\,; \qquad u(t)=\overline{u}+\frac{\Delta u}{2} \cos(2\pi t/t_0)\,, \end{align} where $t$ is local sun time (with respect to midnight) and $t_0=\SI{1}{\day}$. Solar irradiance is given by \begin{align} R_{\text{sw},\downarrow}(t) = \begin{cases} - R_\text{max} \cos \left( 2\pi t/t_0\right) & \text{if } \cos \left(2\pi t/t_0\right) < 0 \\ 0 & \text{otherwise,} \end{cases} \end{align} where we set the peak insolation $R_\text{max}=\SI{1000}{\watt\per\square\meter}$. Lastly, we fix the specific humidity at a constant value of $q_v = \SI{15}{\gram\per\kilogram}$. Using the atmospheric pseudo-data described above, we now run two-day-long model simulations, consecutively varying one model parameter of the set $\{ \kappa_0, \mu, \alpha \}$ while fixing the other two at select default values. This analysis provides a basic understanding of how the parameters affect the modeled sea temperature evolution (see Fig. \ref{fig:sensitivity}). \begin{figure} \noindent\includegraphics[width=\textwidth]{figs/fig_sensitivity.pdf} \caption{Model sensitivity under variation of the parameters $\kappa_0$, $\mu$, and $\alpha$. In each sensitivity experiment, we force the model with two days of idealized atmospheric data (see main text), successively varying one parameter while fixing the other two. The top panels depict simulated surface warming $\Delta$SST as a function of time for different values of the eddy diffusivity (left), mixing coefficient (center), and attenuation coefficient (right). The bottom panels show corresponding vertical temperature profiles at 2 a.m. (dashed lines, shifted by \SI{-1}{\kelvin}) and 2 p.m. (solid lines) on the second day of simulation. Values of the varied parameter are given in the respective legend; fixed parameter values are $\kappa_0 = \SI{1e-4}{\square\meter\per\second}$, $\mu=\SI{1e-3}{\meter\per\second}$, and $\alpha=\SI{3}{\per\meter}$. Further model settings are detailed in table \ref{tab:constants}.} \label{fig:sensitivity} \end{figure} Increasing the eddy diffusivity $\kappa_0$ enhances the heat transport from warm to cold water masses within the diurnal layer. A low diffusivity therefore produces strong surface warming with a steep vertical temperature gradient, since trapped near-surface heat only diffuses downward slowly. Conversely, a high diffusivity quickly distributes accumulated heat to deeper water masses, causing less surface warming but more warming at greater depth. The relaxation term, controlled by the mixing coefficient $\mu$, artificially removes heat from the diurnal layer. The magnitude of diurnal warming thus diminishes with increasing $\mu$. The mixing coefficient also affects the depth of the warm layer. If $\mu$ becomes very small ($\mu < \SI{e-4}{\meter\per\second}$), we find that some warming remains in the diurnal layer throughout the night, adding heat on the next day. In other words, setting $\mu$ to a sufficiently large value ensures that the temperature profile can \enquote{reset} at night, preventing a run-away temperature drift. Finally, the attenuation coefficient $\alpha$ determines the depth range in which solar radiation is absorbed. For $\alpha>\SI{1}{\per\meter}$, more than 60\% of radiation is absorbed within \SI{1}{m} of the surface, leading to strong surface warming. On the other hand, when $\alpha \approx \SI{0.1}{\per\meter}$, around two thirds of radiation are absorbed throughout the diurnal layer, while one third is lost in our model since it would be absorbed at depths greater than the foundation temperature $z_f=\SI{-10}{m}$. Combined with the heat removal due to the relaxation term, small values of $\alpha$ correspond to very limited diurnal warming. Overall, all three parameters contribute to modulating both the magnitude and vertical profile of diurnal warming. Under the given atmospheric forcing (clear sky and light winds), we may expect peak diurnal warming of around 2-\SI{3}{K} \cite{minnett_radiometric_2003}. Combining this guidance with our sensitivity study (fig. \ref{fig:sensitivity}) provides a rough estimate of the order of magnitude of realistic parameter values. We note that while the parameters are likely correlated (see below), each of them shapes the time evolution of the temperature profile in a distinct way. \subsection{Observational data \label{sec:obs}} \noindent To infer realistic values for the parameter set $\{\kappa_0,\mu,\alpha\}$, we now conduct a case study where we force the model with real observational data and compare the modeled diurnal warming with the observed signal. Following previous work \cite{minnett_radiometric_2003}, we define diurnal warming, $\Delta$SST, as the temperature difference between the sea skin (that is, the water directly at the surface) and a reference depth $d$, \begin{align} \Delta\text{SST}(t) := T(0,t) - T(d,t) \ . \end{align} Thus, calibrating and validating our model requires an observational data set providing simultaneous measurements of sea skin temperature, sea temperature at depth $d$, solar irradiance, wind speed, air temperature, and air humidity. Additionally, the temporal resolution of the data should be sufficiently high (less than one hour) to capture the dynamics occurring at the diurnal scale. Obtaining such a data set is challenging, mainly because in-situ measurements of sea skin temperature are rare. Here we use cruise data from the Fifth Marine Optical Characterization Experiment (MOCE-5), conducted during October 1999 off the Mexican west coast. The route led along the coast of the Baja California peninsula, both in the open Pacific Ocean and within the Gulf of California, thus including offshore as well as more coastal conditions (see Fig. \ref{fig:dataset}a). \begin{figure} \noindent\includegraphics[width=\textwidth]{figs/fig2-1.pdf} \caption{Observational data set used in this study. a) Travel route of the MOCE-5 cruise in the Pacific Ocean and Gulf of California, colored by the day since the start near San Diego, USA. b) Diurnal warming $\Delta$SST by location, as recorded during the cruise (data points with higher $\Delta$SST are enlarged). c) Time series of observed diurnal warming, $\Delta$SST, showing the individual data points. Gray shaded intervals indicate the training data used for Bayesian inference. Panels d) and e) display the time series of radiometric skin SST (blue), air temperature (red), wind speed (green), and downward shortwave irradiance (orange). Note that we omit data recorded after Oct 16 due to extended temporal gaps in the data set.} \label{fig:dataset} \end{figure} The research vessel \textit{Melville} was equipped with an infrared radiometer of type M-AERI (Marine-Atmospheric Emitted Radiance Interferometer). This instrument provides precise measurements of sea skin temperature by detecting infrared radiation emitted from within micrometers of the ocean surface. Additionally, solar irradiance, wind speed, air temperature, and water temperature at $d=\SI{-3}{m}$ depth were recorded at time intervals of approximately 10 to 12 minutes. Unfortunately, the available data set does not contain air humidity. We therefore assume a constant specific humidity of $\SI{10}{\gram\per\kilogram}$ throughout the time series. Fig. \ref{fig:dataset} illustrates the MOCE-5 cruise data used in this study. Diurnal warming events exceeding \SI{1}{\celsius} are observed on several days, with $\Delta$SST reaching up to 5°C on Oct 13. The data set also includes days without any substantial diurnal warming, such as on Oct 2 and Oct 9. These days seem to correlate with relatively high wind speeds, while the strong warming events in the second week, such as on Oct 10, 13, and 14, coincide with low winds especially during midday. While the MOCE-5 cruise data has a temporal resolution of around 10 minutes, our model requires a time step on the order of seconds to meet the CFL condition. This necessitates interpolating the atmospheric data between data points. We construct an algorithm that performs linear interpolation with an adaptive time step as described above (section \ref{sec:numerical}). \subsection{Bayesian inference \label{sec:bayesian}} \noindent Consider a model $\mathcal{M}(\Theta)$ controlled by the parameter set $\Theta = \{ \kappa_0, \mu, \alpha \}$. Given the data $\mathcal{D}$, the probability that a certain value of $\Theta$ represents the truth follows from Bayes' rule, \begin{align} P(\Theta | \mathcal D) = \frac{P(\mathcal D | \Theta) P(\Theta)}{P(\mathcal D)} \ . \end{align} Here $P(A|B)$ denotes the conditional probability of $A$ given $B$. On the right-hand side, $P(\mathcal D|\Theta)$ is the \textit{likelihood} of observing the data under the assumption that $\Theta$ represents the true model. The \textit{prior} probability $P(\Theta)$ quantifies our knowledge of the parameter set before observing the data. Lastly, the denominator states the probability of the data being true, which is independent of the choice of model and thus merely adds a normalization factor. Hence the \textit{posterior} probability $P(\Theta | \mathcal{D})$ is proportional to the product of the likelihood times the prior probability. In practice, inferring the posterior distribution $P(\Theta | \mathcal{D})$ of the parameters $\Theta$ from the data $\mathcal{D}$ involves three steps: \textit{1)} construct the prior distribution $P(\Theta)$ in parameter space based on previous knowledge or belief; \textit{2)} define a suitable likelihood function $\mathcal L(\Theta) \equiv P(\mathcal D |\Theta)$; and \textit{3)} compute the (un-normalized) posterior distribution by evaluating the product $\mathcal{L}(\Theta)P(\Theta)$. \subsubsection{Choice of prior} \noindent The prior distribution reflects our previous knowledge of the parameters $\{\kappa_0 , \, \mu, \, \alpha \}$. In the literature, common values of oceanic turbulent vertical diffusivity are on the order of $\kappa \sim \SI{e-4}{\square\meter\per\second}$, varying with location and depth \cite{denman_time_1983}. Stating a physical value for the attenuation coefficient $\alpha$ is difficult since, in reality, attenuation of shortwave radiation depends strongly on wavelength and the biochemical composition of the seawater. Empirical values for the diffusive attenuation coefficient of photosynthetically active radiation range from $\sim \SI{e-2}{\per\meter}$ to \SI{10}{\per\meter} \cite{son_diffuse_2015}. However, we note that the model parameters are conceptual, particularly the mixing coefficient $\mu$, such that they do not necessarily represent directly observable physical quantities. The sensitivity study under idealized forcing (section \ref{sec:ideal-forcing}) provides orientation on the physical parameter ranges. Reflecting our limited knowledge, we impose uniform prior distributions for the parameters $\kappa_0$ and $\alpha$ but constrain their range to $\kappa \in [0,\, \SI{5e-4}]$ \SI{}{\square\meter\per\second} and $\alpha \in [0.05,\, 10]$ \SI{}{\per\meter}. The parameter $\mu$ requires more subtle treatment because it acts mainly near the foundation depth, whereas the likelihood function evaluates temperature differences near the surface (see below). Fig. \ref{fig:sensitivity} indicates that excess heat remains in the interior of the diurnal layer if $\mu$ falls below $\sim \SI{1e-4}{\meter\per\second}$. Based on this insight, we define a normally distributed prior for $\mu$ with mean $\SI{6e-3}{\meter\per\second}$ and standard deviation \SI{1.5e-3}{\meter\per\second}. Thus the three-dimensional prior distribution $P(\Theta)$ is uniform and bounded along the $\kappa_0$ and $\alpha$ directions but Gaussian with respect to $\mu$. \subsubsection{Defining the likelihood function} \noindent Our \textit{training data} $\mathcal{D}$ consists of a six-day subset of the diurnal warming time series from the MOCE-5 cruise, as indicated by the gray shading in fig. \ref{fig:dataset}. Specifically, we select days 2-4 and 13-15 of October 1999 as training data, while all other days from 1 to 16 October make up the \textit{validation data}. By this choice, the training data contains warming events of different amplitudes, covering the observed range from a few tenths of a Kelvin up to \SI{5}{K}. Moreover, the two sub-intervals composing $\mathcal{D}$ correspond to different geographical regions (open Pacific vs. Gulf of California), presumably featuring differing environmental conditions. This ensures that the resulting parameter estimates will be valid for a broader range of conditions. The validation data will allow for an analysis of the predictive capabilities of our model. We choose a likelihood function that decays exponentially with the weighted square error between model and data, \begin{align} \label{eq:likelihood} \mathcal{L} \propto \exp \left( - \sum_{j} \frac{\big( \Delta \text{SST}_\mathcal{M}(t_j) - \Delta\text{SST}_\mathcal{D}(t_j) \big)^2}{\Sigma_j^2} \right) \ , \end{align} where the index $j$ runs through all data points in $\mathcal{D}$ and $\Delta\text{SST}_\mathcal{M}$ ($\Delta\text{SST}_\mathcal{D}$) denotes the modeled (observed) diurnal warming at the corresponding time of observation. Specifically, $\Delta\text{SST}_\mathcal{M}(t_j) = T(0,t_j)-T(z_d,t_j)$, with $z_d$ being the depth of the vertical grid point closest to the observational reference depth $d = \SI{-3}{m}$. Furthermore, the standard error $\Sigma_j$ determines the relative weight of the $j$-th data point in the likelihood estimation. In addition to the measurement uncertainty, we factor in the boat speed when determining these weights (see appendix). As the boat mainly moves at night, this effectively increases the weight of daylight data. \subsubsection{Computing the posterior distribution} \noindent To approximate the posterior distribution, we perform Markov chain Monte Carlo (MCMC) sampling using the \texttt{emcee} package in Python \cite{foreman-mackey_emcee_2013}. It is based on the affine-invariant GW10 algorithm proposed by Goodman and Weare \citeyear{goodman_ensemble_2010}. The algorithm explores the parameter space with multiple interdependent walkers whose moves efficiently deal with correlations, yielding fast convergence. At each step of the Markov chain, the likelihood function, Eq. \eqref{eq:likelihood}, is evaluated for each walker at its respective position $\Theta$ in parameter space. Each evaluation requires simulating the model for the duration of the training data, which makes the sampling computationally expensive. For each of 24 walkers we generate $4000$ steps, initialized at the value $\{ \kappa_0, \mu, \alpha \} = \{ \SI{e-4}{\square\meter\per\second}, \, \SI{6e-3}{\meter\per\second}, \, \SI{4}{\per\meter}\}$. Finding an auto-correlation length of around 50 steps, this gives around 80 independent samples. The resulting posterior distribution is illustrated in fig. \ref{fig:posteriors}, showing one- and two-dimensional projections onto the different parameter directions. Note that the posterior distribution with respect to $\mu$ differs clearly from the prior distribution, confirming that the data added information on the parameter $\mu$. From the projected distributions, we compute the maximum, median, and mean value as estimates for each parameter (tab. \ref{tab:posteriors}). The maximum value, or \textit{maximum a posteriori} (MAP) estimate, corresponds to the most likely parameter value and will be used for the subsequent analysis. \begin{figure} \noindent\includegraphics[width=0.75\textwidth]{figs/posteriors_diusst.pdf} \caption{Posterior distribution of the parameter set $\{\kappa_0,\mu,\alpha\}$, as obtained from Bayesian MCMC sampling. Plots on the upper diagonal are 1D projections of parameter space, showing for each parameter the prior (orange) and sampled posterior (black) distribution (vertical axis not to scale). Blue lines indicate the MAP values. The 2D projections of parameter space depict scatter points and smoothed iso-contours of the posterior distribution, illustrating parameter correlations.} \label{fig:posteriors} \end{figure} \begin{table} \caption{Parameter estimates from the sampled posterior distribution.} \label{tab:posteriors} \centering \begin{tabular}{l | c c c | c c c c} & Model & & & Slab & & & \\ \hline Parameter & $\kappa_0$ (\SI{}{\square\meter\per\second}) & $\mu$ (\SI{}{\meter\per\second}) & $\alpha$ (\SI{}{\per\meter}) & $h$ (\SI{}{m}) & $S$ (\SI{}{\watt\per\square\meter})& $\xi_1$ & $\xi_2$ \\ \hline MAP & \SI{1.42e-4}{}& \SI{2.93e-3}{}& 4.01& 1.10& 87.05& \SI{1.31e-4}{}&\SI{1.1e-11}{} \\ Mean & \SI{1.45e-4}{}& \SI{2.89e-3}{}&4.41& 1.14& 87.86& \SI{1.38e-4}{}&\SI{1.4e-10}{} \\ Median & \SI{1.44e-4}{}& \SI{2.88e-3}{}&4.27& 1.14& 87.87& \SI{1.36e-4}{}&\SI{9.3e-11}{} \\ \hline \end{tabular} \end{table} \section{Results and Discussion} \noindent The calibration of our model, based on approximately six days of the observational data set (section \ref{sec:obs}), resulted in most likely values of the model parameters $\kappa$, $\mu$, and $\alpha$. In the following, we investigate how the temperature dynamics of this calibrated model compare to both observations and a reference slab model which is commonly used in atmospheric simulations \cite{hohenegger_coupled_2016, shamekh_self-aggregation_2020, coppin_internal_2017, tompkins_impact_2021}. \begin{figure} \noindent\includegraphics[width=\textwidth]{figs/fig5.png} \caption{Simulation results for the calibrated model, forced with the observational data set. a) Modeled (red) and observed (blue) time series of diurnal warming. Grey shaded intervals indicate the training data used for calibration. The subpanel below depicts wind speed (green, smoothed) for reference. b) Modeled sea temperature $\Delta T = T-T_f$ as a function of depth and time, shown for day 13, 00.00h to day 15, 00.00h (local sun time). The green line indicates wind speed. c) Modeled vertical temperature profiles on day 13 (black) and 14 (orange), plotted at intervals of two hours (shifted by \SI{0.5}{K} per hour). The scale bar indicates a temperature difference of \SI{1}{K} along the x-axis.} \label{fig:sim-result} \end{figure} \subsection{Modeled vs. observed diurnal warming} \noindent Using the settings given in table \ref{tab:constants}, we force the model with the continuous 16-day observational time series of solar irradiance, wind speed, and air temperature. The input data are linearly interpolated between observed data points in order to obtain a sufficiently small time step for numerical simulation (see section \ref{sec:numerical}). We set the constant foundation temperature $T_f$ to the mean observed sea temperature at \SI{3}{m} depth. In order to maintain the observed temperature contrast between air and see, this requires shifting the air temperature data accordingly. Fig. \ref{fig:sim-result} illustrates the results of this simulation. We evaluate the modeled diurnal warming $\Delta$SST as the temperature difference between the surface grid point and the grid point closest to \SI{3}{m} depth, in accordance with the observed $\Delta$SST. Fig. \ref{fig:sim-result}a) compares the time series of modeled and observed diurnal warming. Similar to the observations, the model produces a wide range of diurnal warming amplitudes from \SI{0.2}{K} on day 9 to almost \SI{4}{K} on day 13. We show below that this variation in amplitudes links closely to wind speed. For the whole time series, the modeled and observed $\Delta$SST are correlated with a Pearson correlation coefficient of 0.72 (Fig. \ref{fig:correlations}b). Considering only the training data, the correlation coefficient is 0.82, whereas the value for all data points outside of the training data is 0.65. This evidences that our model has predictive capabilities for situations which the model has not been calibrated to. \subsubsection{Vertical temperature profile} \noindent In addition to diurnal warming at the surface, our model provides the vertical temperature profile between the surface and foundation depth (Figs. \ref{fig:sim-result}b, c). In agreement with observations, heat trapping under calm and clear conditions occurs in the uppermost meter of the ocean \cite{soloviev_observation_1997}. Increased wind speeds lead to a flatter temperature profiles owing to enhanced diffusion. Importantly, the model exhibits a deepening of the warm layer between noon and sunset, similar to observations. The fact that the model produces fairly realistic temperature profiles, even though its parameters were merely calibrated with respect to the temperature difference between the surface and a reference depth, supports the assumption that the estimated parameter values hold for more general tropical ocean settings beyond the given data set. \subsubsection{Limitations} \noindent While the model generally mimics the observed diurnal variability of $\Delta$SST, there are notable discrepancies beyond noisy fluctuations of the data. For example, diurnal warming is clearly overestimated on days 6, 7, 11, and underestimated on days 13, 15. To understand these deviations, it is important to regard the origin of the observations in light of the modeling assumptions. During the MOCE-5 cruise, which covered large distances across approximately ten degrees latitude and longitude, respectively, data were recorded as the vessel cruised at speeds of up to \SI{7}{\meter\per\second}. Part of the cruise took place in the open Pacific Ocean along the west coast of Mexico; the other part led into the coastal waters of the Gulf of California, where conditions were likely different. However, our one-dimensional model requires the assumption that water properties such as diffusivity, optical properties, and foundation temperature are horizontally translation invariant. Thus, the model cannot account for temperature changes due to horizontal flows, as well as changes in foundation temperature. We conjecture that spatial heterogeneity constitute a main source of error between model and observations. Another limitation is that the diffusivity has no memory, since it changes instantly with the current wind speed. In reality, turbulence dissipates at a finite time scale. For example, the model overestimates the amplitude of diurnal warming by more than \SI{1}{K} on days 6 and 7 (Fig. \ref{fig:sim-result}a). Despite strong insolation and low winds before noon on these days, observed diurnal warming does not exceed \SI{1}{K}. This could be due to enhanced levels of turbulent vertical mixing, possibly owing to horizontal currents or rough seas, either advected from a windy region or remnant from a windy episode preceding the observations. Both effects cannot be captured by our simple model, which also neglects wave breaking and Langmuir circulations \cite{noh_large_2004}. The maximum modeled diurnal warming of $\Delta \text{SST} =\SI{3.8}{K}$ corresponds in time with the observed maximum, recorded on day 13 in the inner Gulf of California, near the Midriff Islands. However, the modeled value is significantly lower than the observed maximum of \SI{4.9}{K}. This difference may be attributed to regional effects on water properties, such as high phytoplankton concentrations as well as tidal mixing \cite{alvarez-borrego_phytoplankton_2012}. Phytoplankton influences the absorption of shortwave radiation, promoting near-surface heat trapping. By contrast, the model idealizes the attenuation of shortwave radiation through an exponential extinction law with constant attenuation coefficient $\alpha$, such that any spatio-temporal variability of sea water optics is neglected. We note that we can find a parameter combination $\{\kappa_0, \mu, \alpha \}$ where the maximum on day 13 is modeled accurately, albeit increasing the overall modeling error. With a vertical resolution of \SI{10}{cm} at the surface, our numerical model is too coarse to explicitly resolve the cool skin layer, which forms within millimeters from the air-sea interface. Nonetheless, the model still captures skin cooling at night, indicated by slightly negative values of $\Delta$SST, in agreement with the observations (Fig. \ref{fig:sim-result}). Evaluating surface heat fluxes at the surface grid point, the model considers the cool skin effect in a coarse-grained sense, averaged over the upper \SI{10}{cm} of the water column. \subsection{Comparison with standard slab model} \noindent Since our model is intended for use in studies of atmospheric convection, it is interesting to see how it compares to slab ocean models that have previously been used as an interactive sea surface for cloud-resolving simulations \cite{hohenegger_coupled_2016, shamekh_self-aggregation_2020, coppin_internal_2017, tompkins_impact_2021}. This analysis will show that slab ocean models are insufficient to capture the wind-dependent variability of diurnal SST. \begin{figure} \noindent\includegraphics[width=\textwidth]{figs/fig6.pdf} \caption{Comparison of our calibrated model with the calibrated slab model. a) Time series of diurnal warming $\Delta$SST as modeled by our model (red) and the slab (dark blue) for a select time interval. Light blue points indicate the observations. b) Net surface heat loss to the atmosphere, $Q_\text{net} = R_\text{lw} + Q_\text{l} + Q_\text{s}$ (excluding shortwave radiation), for the model (red) and slab (blue). c) Difference in $Q_\text{net}$ between our model and the slab (orange) as well as our model and a fixed SST at $T_f$ (gray). d) Correlations between the modeled and observed $\Delta$SST for our model (top) and the slab (bottom). The Pearson correlation coefficient is given in each panel. In the top panel, circles (crosses) mark training (validation) data points.} \label{fig:correlations} \end{figure} Specifically, we consider a single-layer slab with temperature dynamics described by \begin{align} \dot T(t) = \frac{Q_\text{0}(t)-S}{\rho_w c_p h} - \xi_1 (T(t)-T_f) - \xi_2 \int_{0}^t (T(t')-T_f) \, \dd t' \ , \end{align} where $T$ denotes the bulk temperature of the slab, $h$ is the slab thickness, $S$ represents a constant heat sink, and the net surface heat flux $Q_\text{0}$ is given by eq. \eqref{eq:flux-net}. The constants $\rho_w$, $c_p$, and $T_f$ are listed in table \ref{tab:constants}. In addition to the heat sink $S$, the slab temperature is controlled by two correction terms: a linear relaxation and an integral correction to prevent temperature drift. Their strenghts are tuned via the parameters $\xi_1$ and $\xi_2$, respectively. Here $t>0$ and $t=0$ is the time of the initial condition. To compare this slab model with our model, we calibrate the parameters $\{h, S, \xi_1, \xi_2 \}$ using Bayesian inference, taking the same data and settings as when calibrating our model (see section \ref{sec:bayesian}). The resulting estimates are given in table \ref{tab:posteriors}. Analogous to the previous procedure, we then run a simulation with the slab model, forced by the atmospheric data set of the MOCE-5 cruise. Unlike our model, the calibrated slab model does not capture the range of observed diurnal warming amplitudes (Fig. \ref{fig:correlations}a). The slab overestimates nighttime cooling and exhibits a maximum warming level just above $\Delta\text{SST}=\SI{1}{K}$. In the slab model, the diurnal warming amplitude is strongly affected by $\xi_1$, the inverse time scale of temperature relaxation. Decreasing $\xi_1$ allows for stronger diurnal warming but also leads to excessive nighttime cooling and a slow retreat of the temperature in the afternoon, thus giving poorer agreement with the observations overall (see appendix). In fact, the shape of the diurnal warming curve produced by a slab with small $\xi_1$ and $\xi_2$ resembles that observed at around \SI{1}{m} depth, e.g., by moored buoys \cite{borner_modeling_2021}. This highlights that slab oceans mimic bulk SST rather than skin SST. However, skin SST is the relevant quantity for atmospheric studies, since the atmosphere only senses the temperature of the sea skin. Interestingly, the MAP values of $h$ and $S$ obtained from Bayesian inference correspond to typically used values. A slab thickness $h \approx \SI{1}{m}$ is often employed to produce a diurnal cycle of several degrees amplitude (without linear corrector). In the tropics, a heat sink of $S \approx \SI{100}{\watt\per\square\meter}$ marks a realistic value to account for net oceanic heat uptake. Here, $S$ is slightly smaller because the correction terms remove heat as well. \subsection{Wind dependence of diurnal warming} \noindent \begin{figure} \noindent\includegraphics[width=\textwidth]{figs/fig7.pdf} \caption{Diurnal warming in the observations (left), our model (center), and the slab model (right), showing all data points of the 16-day time series. a) $\Delta$SST as a function of local sun time, colored by wind speed. b) $\Delta$SST as a function of wind speed, colored by local sun time.} \label{fig:scatterplots} \end{figure} The analysis of our model and the slab model allow us to compare how the diurnal variability of SST depends on wind speed in these models, compared to observations. While our model produces a qualitatively similar behavior to the observations, the slab model cannot capture the observed wind dependence of diurnal warming (Fig. \ref{fig:scatterplots}). Our model differs from the observations in terms of scatter in the data, owing to noisy real-world processes neglected in our simplified model. Nonetheless, the diurnal warming curves share key features such as a wind-dependent spread in amplitudes, peak warming at around 14.00 local sun time, as well as skin cooling of a few tenths of a degree at night. In contrast, the slab model shows little variability in the diurnal amplitude and overestimates skin cooling at strong wind speeds. Fig. \ref{fig:scatterplots}b) highlights the dichotomy between our model and the slab model regarding the wind dependence of $\Delta$SST. Our model exhibits a roughly exponential decay of peak diurnal warming with increasing wind speed. The slab, on the contrary, is less sensitive to wind speed; here peak diurnal warming decreases only marginally as the wind increases. The reason is that the evolution of slab temperature depends on wind speed only via the latent and sensible surface heat flux, whereas in our model wind strongly influences vertical heat transport via the diffusion term. \begin{figure} \centering \noindent\includegraphics[width=.45\textwidth]{figs/fig8.pdf} \caption{Wind dependence of diurnal warming, comparing the observations (light blue circles), our model (red triangles), and the slab model (dark blue squares). The data points represent the mean diurnal warming amplitude (see main text). Solid lines indicate least-squares exponential fits, with parameters given in tab. \ref{tab:expfits}. Wind speeds above \SI{6.5}{\meter\per\second} are not shown due to a small number of raw data points.} \label{fig:winddependence} \end{figure} To provide a more quantitative analysis of the wind dependence of $\Delta$SST, we bin the observational, model, and slab data by wind speed, selecting a bin size of \SI{0.5}{\meter\per\second}. For each bin and data type (observation/model/slab), we calculate hourly averages of $\Delta$SST as a function of local sun time, and take the maximum of these hourly averages as an estimate of the mean diurnal warming amplitude for the given wind speed. The results, along with exponential fits, are shown in fig. \ref{fig:winddependence}. Table \ref{tab:expfits} lists the corresponding values of the fit parameters. Both for the observations and our model, $\Delta$SST decays with a scaling constant of about \SI{2}{\meter\per\second}; for the slab model the scaling contant is \SI{15}{\meter\per\second}. \begin{table} \caption{Exponential fits in fig. \ref{fig:winddependence}.} \label{tab:expfits} \centering \begin{tabular}{l c c} Data & intercept $y_0$ (K) & exponent $a$ (\SI{}{\meter\per\second}) \\ \hline Observations & 4.59 & 1.98 \\ Model & 4.14 & 1.94 \\ Slab & 1.04 & 15.87 \\ \hline \multicolumn{3}{l}{Fit function: $\Delta\text{SST}(u) = y_0 \exp(-u/a)$} \end{tabular} \end{table} \subsection{Impact on the atmosphere} The diurnal evolution of SST impacts the atmosphere by regulating the heat and moisture transfer at the air-sea interface. Over the course of the observational data interval (October 1-16, 1999), we compute the net surface heat flux $Q_\text{net}(t) = R_\text{lw}(t) + Q_\text{l}(t) + Q_\text{s}(t)$ (excluding shortwave radiation) for the simulations with our model and the slab model (fig. \ref{fig:correlations}b; $Q_\text{net}<0$ corresponds to net heat export from ocean to atmosphere). In addition, we compute $Q_\text{net}(t)$ for the given atmospheric forcing under the assumption that SST is fixed at $T(0,t)=T_f$ for all $t$. This analysis shows that the oceanic heat loss to the atmosphere can differ by up to around \SI{50}{\watt\per\square\meter} between our model and the slab (fig. \ref{fig:correlations}c). Logically, $Q_\text{net}$ is more negative for our model when our model produces a larger sea skin temperature compared to the slab, and vice versa. During strong diurnal warming events, the difference $\Delta Q_\text{net}$ is even larger when comparing our model to a fixed SST, exceeding \SI{50}{\watt\per\square\meter} on Oct 13. The time average of $Q_\text{net}$ over the interval 1-16 October is around \SI{-182}{\watt\per\square\meter} for our model, \SI{-178}{\watt\per\square\meter} for fixed SST, and \SI{-176}{\watt\per\square\meter}. In other words, our model enhances the averaged heat flux to the atmosphere by around \SI{4}{\watt\per\square\meter} compared to fixed SST, whereas the slab causes a slight relative decrease in oceanic heat export. This could be due to the slab underestimating surface temperatures at night. Although the differences are small and our results are limited to the present data set, we note that slab models may in fact produce less realistic mean surface fluxes than a fixed SST, especially if nighttime cooling is poorly constrained. In accordance with \citeauthor{weihs_modeled_2014} \citeyear{weihs_modeled_2014}, we expect that including the diurnal cycle of SST enhances surface heat fluxes to the atmosphere by up to \SI{10}{\watt\per\square\meter} due to an increase in mean surface temperature. Our model produces agreeing results for the given case study. To further study how diurnal SST warming impacts the atmospheric convection, our model can be coupled to cloud-resolving models. Recently, we implemented our upper ocean model as an interactive lower boundary condition in the System for Atmospheric Modeling (SAM) model. At each horizontal grid point of the atmospheric model, the surface boundary condition is independently updated at each time step by numerically integrating eq. \eqref{eq:model-euler} to the next time step, based on the local atmospheric forcing $\mathbf{F}$. This produces a responsive, spatially heterogeneous sea surface. According to first tests, the difference in computation time between this setup and a slab ocean is unnoticeable. The influence of our model on the spatio-temporal patterns of convection is subject of future research. \section{Conclusion} \noindent This paper presents a simple one-dimensional model for wind-responsive diurnal SST variability of the tropical ocean. Upper ocean heat transfer involves a plethora of processes, from wave breaking to biological productivity. To first order, however, the diurnal variability of SST is governed by the competing effects of insolation and wind. Slab models with fixed heat capacity, neglecting wind-driven turbulent mixing, thus only consider half of the picture. By introducing a diffusion term that scales with surface wind stress, we propose a simple solution that parameterizes the basic features of upper ocean turbulence. The model may be improved in the future by refining the diffusivity profile, e.g., to include effects of precipitation. Written as a single partial differential equation, the model describes upper ocean heat transfer through three idealized terms, controlled by three tuning parameters: an eddy diffusivity $\kappa_0$, a bulk mixing rate $\mu$ and an attenuation coefficient $\alpha$. $\kappa_0$ accounts for the wind-driven turbulent heat diffusion, $\mu$ determines the relaxation rate towards the foundation temperature and $\alpha$ specifies how deeply solar radiation penetrates into the ocean. First, we used Bayesian inference to estimate the values of these parameters based on an observational data set recorded on the MOCE-5 cruise in the Eastern Pacific. Later, we compared the performance of our model with a standard slab ocean model that has been used as a responsive sea surface in atmospheric simulations. Our results showed that such slab models are unable to capture the wind dependence of diurnal SST warming. By contrast, our model reproduced an exponential dependence of the diurnal warming amplitude on wind speed, in accordance with observations. Note that, in principle, wind-sensitive diurnal warming could also be achieved by a single-layer slab model with variable slab thickness, similar to the concept of \citeauthor{price_diurnal_1986} \citeyear{price_diurnal_1986}. This would limit the problem to two coupled ordinary differential equations, albeit with the need to parameterize the evolution of the diurnal warm layer depth. Due to its numerical simplicity, we envision the model presented in this study to serve as a suitable interactive boundary condition for oceans in cloud-resolving simulations of the tropical atmosphere. This will enable a wind-responsive SST field that evolves under and feeds back into the atmospheric fluid dynamics. Given the scale interaction between the diurnal cycle and large-scale patterns of tropical convection, it becomes increasingly clear that we must consider diurnal SST warming to better understand the mechanisms of cloud organization. Our work thus contributes to bridging the gap between idealized studies of convective aggregation and real-world process understanding. \newpage \section{} command to identify level 1 heads; Math coded inside display math mode \[ ...\] will not be numbered, e.g.,: \[ x^2=y^2 + z^2\] Math coded inside \begin{equation} and \end{equation} will be automatically numbered, e.g.,: \begin{equation} x^2=y^2 + z^2 \end{equation} \begin{eqnarray} x_{1} & = & (x - x_{0}) \cos \Theta \nonumber \\ && + (y - y_{0}) \sin \Theta \nonumber \\ y_{1} & = & -(x - x_{0}) \sin \Theta \nonumber \\ && + (y - y_{0}) \cos \Theta. \end{eqnarray}
\section{Introduction} \IEEEPARstart{G}{enomic sequencing} is the process of analyzing the order of nucleic acids within a DNA molecule (genomic sequence). In many modern sequencing technologies, a large set of short sequence fragments, called \emph{reads}, is produced and represented by a string of characters (usually \textit{A,C,G,T}). In this method, called \emph{shotgun sequencing} \cite{sps5}, each read's location within the sequence is generally unknown. Furthermore, the sequencing machine introduces mutation errors into the reads. Therefore, the sequence assembly from the reads requires a large number of reads and high computational effort. Effective compression of pre-assembly reads data is therefore an essential problem. A large number of read-compression methods are available \cite{sps6, sps9, sps21}, partitioned into two main categories: reference-free and reference-based tools, differing by whether a closely similar reference genome is shared by the encoder and decoder. In some applications, genome reads will be produced at an edge node, e.g. a physician's office, and then sent for processing to a central node, e.g. a cloud database. In such scenarios, the cost of known reference-based and reference-free methods may be too high for the edge node's limited resources, due to the need to store long references and perform costly alignment (in the former), and cluster reads and use powerful compressors (in the latter). Alternatively, in this paper we propose a compression scheme in which the encoder needs to neither store references nor perform heavy processing, while benefiting from a reference available at the central node decoding the reads. Compression with a reference, acting as side information available only at the decoder, is an instance of the well known Slepian-Wolf (SW) coding problem~\cite{sps2}. This source coding problem was first described as an equivalent channel coding problem over a virtual difference channel between the sources by Wyner~\cite{sps30}, and an explicit construction based on the syndromes of error-correcting codes was first introduced in the pioneering work of Pradhan and Ramchandran~\cite{sps10}. Several works offered improved constructions and/or analysis approaches~\cite{sps11,sps18,sps19,sps25,sps24,sps1}. Some works even dealt specifically with genomic data~\cite{sps22,sps23}, but focused on either full-block or streamlined data, and not fragmented reads from randomly chosen and unknown locations. When compressing fragmented reads, the known capability of recovering a read from a similar reference is not sufficient, and additional information is needed for aligning the read within the full reference. The construction proposed in Section~\ref{Sec:CodeConst} of this paper offers both capabilities, using the framework of generalized error-locating (GEL) \cite{sps17} \emph{coset codes}. GEL coset codes were used in the Cassuto-Ziv construction~\cite{sps1} for full-block compression, and the novelty of this present work is in using the GEL's hierarchy of inner codes to combine all the information for read reconstruction into the same codeword: one layer for alignment, one for similarity reconstruction and one for reconstruction validation. In the fourth layer, a batch of reads is encoded with an outer code to provide extremely low failure probability. We begin by assuming that the errors between the sequence, its reads and the reference are modeled by substitution errors alone, and propose an efficient coding scheme for such a scenario. In addition to a general code construction, we propose a practical and systematic construction using algebraic codes, both described in Section~\ref{Sec:CodeConst}. In Section~\ref{Sec:SchemeAnalysis} we analyze the success probability of the code, taking into account the effect of read misalignments within the reference. We continue by extending the scheme to deal with a single deletion introduced to a read in addition to the substitution errors. This model is justified by substitution errors being the dominant error type in many sequencing technologies, while having some deletion errors that are more rare. Toward that extension, we propose in Section~\ref{Sec:DelSemiMetric} a new efficiently computable distance measure, called shift-compensating distance, that is analytically shown to reduce the misalignment probability significantly compared to a commonly-used distance measure. Then, in Section~\ref{Sec:SchemeDelExt}, we modify our coding scheme to support these deletion errors. In Section~\ref{Sec:Latency}, we model the practical aspects of genomic compression through simplified quantitative expressions for latency, full-delivery time, and storage space. We compare the performance of our scheme in this model to the common methods of reference-free and encoder-reference compression. It is apparent that our scheme is advantageous over the known methods in all these three performance measures, thus motivating its use in resource-limited edge nodes. Finally, in Section~\ref{Sec:Future} we introduce further extensions and suggest interesting topics for future work. \begin{figure*}[ht!] \centering \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\linewidth]{figures/DNAstrings1v3} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=\linewidth]{figures/DNAstrings2v4} \end{subfigure} \caption{\textbf{Left:} DNA reads generated as fragments of a genome. \textbf{Right:} read-identifier-based alignment of a single read.} \label{fig:DNAsetup} \end{figure*} \section{Problem Formulation}\label{Sec:ProbForm} \subsection{Problem Setting} A genome data being sequenced in an edge node is represented by a string ${\mathbf X} \in {\mathbf{\Sigma}}^L$. A closely similar reference of this data, represented by ${\mathbf Y}$, is stored in a central node, and is unavailable at the edge node. The differences between ${\mathbf X}$ and ${\mathbf Y}$ are assumed to be caused by genetic diversity \cite{sps13}. A sequencing machine at the edge node is generating a set of $M$ \emph{reads} from ${\mathbf X}$, denoted by $\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}$. Each read ${\boldsymbol x}^{(i)} \in {\mathbf{\Sigma}}^n$ is an \emph{approximate substring} of ${\mathbf X}$, taken from an unknown random location within ${\mathbf X}$, and introduced with \emph{sequencing errors}. Our goal is to encode the reads data $\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}$ to a minimal size, such that the reads can be recovered from the similar reference ${\mathbf Y}$ without loss. The encoder output is communicated to the central node without errors. \subsection{Substitutions Channel Model} \label{SubSec:SubsChannel} We begin by modeling errors using a substitutions-only channel; later in the paper we also address deletion errors. The \emph{genetic diversity} is modeled as ${\mathbf Y} = \mathsf{S}_{q,L}({\mathbf X},p_1)$, for which \begin{align*} \forall j \in \{1,\dots,L\} : P(Y_j|X_j) = \begin{aligned} \begin{cases} 1-p_1 & Y_j = X_j \\ p_1/(q-1) & Y_j \neq X_j \end{cases} \end{aligned} . \end{align*} We now let ${\mathbf X}^{(i)} = X_{k_i},X_{k_i+1},\dots,X_{k_i+n-1}$ be a substring observed by the sequencer, where $k_i$ is a random, unknown \emph{starting index}. A read ${\boldsymbol x}^{(i)}$ with \emph{sequencing errors} is modeled by ${\boldsymbol x}^{(i)} = \mathsf{S}_{q,n}({\mathbf X}^{(i)},p_2)$. Let ${\boldsymbol y}^{(i)} = Y_{k_i},Y_{k_i+1},\dots,Y_{k_i+n-1}$ be the substring of ${\mathbf Y}$ with \emph{proper alignment} to the read ${\boldsymbol x}^{(i)}$. \begin{lemma} \label{Lem:EquivChan} Let $p \triangleq p_1\cdot \left[1-p_2/(q-1)\right] + (1-p_1) \cdot p_2$. Then for a proper alignment we have ${\boldsymbol y}^{(i)} = \mathsf{S}_{q,n}({\boldsymbol x}^{(i)},p)$. \end{lemma} \begin{IEEEproof} It follows that \begin{align*} P(y_j\neq x_j) & = P(Y_{k_j} \neq X_{k_j})\cdot [1-P(x_j \neq X_{k_j} \wedge x_j = Y_{k_j})] \\ & \qquad + P(Y_{k_j} = X_{k_j})\cdot [1-P(x_j = X_{k_j})] \\ & = p_1\cdot \left[1-p_2/(q-1)\right] + (1-p_1) \cdot p_2 = p . \end{align*} \end{IEEEproof} The relations between the genome, reference and reads are illustrated in Figure~\ref{fig:DNAsetup}. The induced equivalent channel in Lemma~\ref{Lem:EquivChan} serves as the \emph{difference channel} between the source (read) and the side information (counterpart within the reference), for which an error-correcting code should be designed~\cite{sps30,sps10}. In our coding scheme, we will add a layer enabling the alignment of each read to the reference in order to find a closely matching segment to reconstruct from. A modification of the scheme to deal with a channel model including a single deletion per read in addition to the substitution errors is developed in Sections~\ref{Sec:DelSemiMetric},\ref{Sec:SchemeDelExt}. We choose in this paper the channel model with a single parameter $p$ for simplicity, while in future work one may consider richer models (e.g. \cite{sps8}), potentially exploiting the dependence between two overlapping reads, whose references pass through the same instantiation of the channel $\mathsf{S}_{q,L}({\mathbf X},p_1)$. \subsection{Pre-Decoding Alignment} \label{SubSec:Alignment} We wish to encode ${\boldsymbol x}^{(i)}$ such that only the information required to reconstruct it from ${\boldsymbol y}^{(i)}$ is transmitted. Nevertheless, the decoder first needs to know the starting index $k_i$. Therefore, the encoder must transmit some additional information enabling the decoder to align the read within the reference, while accounting for the substitution errors. This alignment information is an $\ell$-bit function $f_\ell({\boldsymbol x}^{(i)})$ called \emph{read identifier}. The tradeoffs in setting the value $\ell$ are discussed in Section~\ref{Sec:SchemeAnalysis}. Since only partial information is provided for alignment, additional \emph{improper alignments}, i.e., erroneous starting indices, are likely to be found. This process provides the decoder with a set $\left\lbrace\bar{{\boldsymbol y}}^{(i,j)} | j=1,2,\dots \right\rbrace$ of length-$n$ substrings of ${\mathbf Y}$ as candidates for read alignment. Every $\bar{{\boldsymbol y}}^{(i,j)}\neq{\boldsymbol y}^{(i)}$ can be regarded as having been obtained from ${\boldsymbol x}^{(i)}$ passing through a useless channel with zero mutual information. The alignment process is illustrated in Fig \ref{fig:DNAsetup} (right). Clearly, only the proper alignment is desired for decoding, thus a method for rejecting false candidates is required. This method, described in Section \ref{Sec:CodeConst}, is referred to as \emph{validation}. \section{The Compression Scheme} \label{Sec:CodeConst} For simplicity, from this point on we assume $q=2$, i.e. ${\mathbf{\Sigma}} = \{0,1\}$, but every result can be generalized to any $q$ that is a prime power. Furthermore, cyclic 1-based indexes will be used, i.e., every index $j$ in ${\mathbf X},{\mathbf Y}$ will be taken as $j \cong \left[(j-1) \mod L\right] + 1 \in \{1,\dots,L\}$ to avoid edge effects and for the ease on notation. \vspace*{-1.5ex} \subsection{Read Identifier} A simple \emph{bit sampling} approach is found to be very suitable for read identifiers. Let $1 \leq i_1 < \dots < i_\ell \leq n$ be a predefined set of indices, known to both the encoder and decoder. Now, let $f_\ell({\boldsymbol x}^{(i)}) = x_{i_1},\dots,x_{i_\ell}$ be the read identifier. In this case, an \emph{aligner} at the central node simply correlates this identifier along the reference using the Hamming distance with respect to each starting index, and produces the set \begin{equation} \label{Eq:Candidates} \mathrm{Y}^{(i)} = \left\lbrace \left. \bar{{\boldsymbol y}}^{(i,j)} \right| d_H\left(f_\ell({\boldsymbol x}^{(i)}) , f_{\ell}(\bar{{\boldsymbol y}}^{(i,j)}) \right) \leq \mathsf{T} \right\rbrace_{j=1}^{\mathsf{K}_i}, \end{equation} where $d_{\mathsf{H}}(\cdot,\cdot)$ is the Hamming distance, $\mathsf{T}$ is a predefined threshold, and $\left\lbrace \bar{{\boldsymbol y}}^{(i,j)} = \left[Y_{k_i^{(j)}},\dots,Y_{k_i^{(j)}+n-1}\right] \right\rbrace$ is the set of possible alignments of ${\boldsymbol x}^{(i)}$ within ${\mathbf Y}$. The remainder of the read, i.e., the indices outside of the identifier, is denoted by ${\boldsymbol x}^{(i)}_{{\cal I}}$, where ${\cal I}=\{1,\dots,n\}\setminus\{i_1,\dots,i_\ell\} , |{\cal I}|=n-\ell$. \vspace*{-2ex} \subsection{General Code Construction} \label{subsec:coding_scheme} We wish to encode and transmit reads $\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}$ from ${\mathbf X}$ such that a decoder with access to ${\mathbf Y} = \mathsf{S}_{2,L}({\mathbf X},p_1)$ will perfectly reconstruct them with high probability. Recall from Section~\ref{Sec:ProbForm} that $p$ is the equivalent error probability between a read ${\boldsymbol x}^{(i)}$ to its proper alignment ${\boldsymbol y}^{(i)}$ in ${\mathbf Y}$. \vspace*{-1.5ex} \begin{definition} A $\mathbf(M,n,{\cal R},p,P_\mathsf{s})$-code is a pair $({\cal E},{\cal D})$ of encoder-decoder for a set $\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}$ of length-$n$ reads such that: \begin{enumerate} \item ${\cal E} , {\cal D} $ have access only to $\{{\boldsymbol x}^{(i)}\}_{i=1}^{M} , {\mathbf Y}$, respectively, \item the encoded size satisfies $\left|{\cal E}\left(\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}\right)\right| = (nM) \cdot {\cal R}$, \item the correct decoding probability satisfies \begin{equation*} \Pr \left\lbrace {\cal D} \left[ {\cal E}\left(\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}\right) , {\mathbf Y} \right] = \{{\boldsymbol x}^{(i)}\}_{i=1}^{M} \right\rbrace \geq P_\mathsf{s}. \end{equation*} \end{enumerate} \end{definition} $P_\mathsf{s}$ is a decoding {\em success probability} requirement specified for the coding scheme, and ${\cal R}$ is its (fixed) compression rate. Our general code construction is based on generalized error locating (GEL) codes \cite{sps17}, and specifically on the Cassuto-Ziv code construction~\cite{sps1}, adapted to use as a source code with alignment-validation capabilities. \vspace*{-1ex} \begin{construction} \label{cons:GenCons} Let ${\cal C}_1,{\cal C}_2$ be a pair of binary linear codes with parameters $\left[n-\ell,k_j-\ell,d_j\right], {j=\{1,2\}}$, where $k_1 \geq k_2$. Let $\mathsf{H}_1,\mathsf{H}_2$ be parity-check matrices of these codes, respectively, such that $\mathsf{H}_2$ is obtained from $\mathsf{H}_1$ by concatenating a \emph{validation matrix} $\bar{\mathsf{H}}_2$ of $\tau \triangleq k_1-k_2$ rows that are linearly independent of the rows of $\mathsf{H}_1$. Let $\mathsf{H}_{\mathsf{c}}$ be a \emph{complementary matrix} such that concatenating it with $\mathsf{H}_2$ forms a square \emph{full-rank} matrix $\mathsf{H}$. This structure is illustrated in Fig. \ref{fig:ParStructure}. \vspace*{-5ex} \begin{figure}[H] \centering \includegraphics[width=0.7\linewidth]{figures/ParityStructure2} \caption{Structure and sizes of the construction's inner-code parity-check matrices.} \label{fig:ParStructure} \end{figure} \vspace{-2ex} Finally, let ${\cal C}_\mathsf{o}$ be a $[M,k_{\mathsf{o}},d_{\mathsf{o}}]$ linear \emph{outer code} over $\mathsf{GF}(2^\nu)$, with parity-check matrix ${\mathbf H}_{\mathsf{o}}$, where $\nu = n-\ell-(\rho+\tau)$. The encoding process is introduced in Algorithm~\ref{Alg:Cons1Enc}. Note that the syndrome with respect to $\mathsf{H}_2$ is ${\boldsymbol s}^{(i)} = [{\boldsymbol s}^{(i)}_1,{\boldsymbol s}^{(i)}_2]$, where ${\boldsymbol s}^{(i)}_1, {\boldsymbol s}^{(i)}_2$ correspond to $\mathsf{H}_1,\bar{\mathsf{H}}_2$, respectively. \begin{algorithm}[ht!] \textbf{Input}: $\{{\boldsymbol x}^{(i)}\}_{i=1}^{M}, \mathsf{H}_2,\mathsf{H}_\mathsf{c}, {\mathbf H}_{\mathsf{o}}$\\ \For(\tcp*[h]{Inner Encoding}){$1\leq i \leq M$}{ Extract ${\boldsymbol w}^{(i)} = f_{\ell}({\boldsymbol x}^{(i)})$\\ Calculate ${\boldsymbol s}^{(i)} = \mathsf{H}_2 \left[{\boldsymbol x}^{(i)}_{{\cal I}}\right]^T$, ${\boldsymbol a}^{(i)} = \mathsf{H}_\mathsf{c} \left[{\boldsymbol x}^{(i)}_{{\cal I}}\right]^T$\\ } Form $\underline{{\boldsymbol a}} = \left[{\boldsymbol a}^{(1)},\dots,{\boldsymbol a}^{(M)}\right] \in \left[\mathsf{GF}(2^\nu)\right]^{M}$\\ Calculate ${\mathbf S}={\mathbf H}_{\mathsf{o}} \underline{{\boldsymbol a}}^T$ \tcp*[h]{Outer Encoding}\\ \textbf{Output}: ${\cal E}\left(\{{\boldsymbol x}^{(i)}\}_{i=1}^M\right) = \left\lbrace \{{\boldsymbol w}^{(i)}\}_{i=1}^{M},\{{\boldsymbol s}^{(i)}\}_{i=1}^{M},{\mathbf S} \right\rbrace$ \caption{Construction \ref{cons:GenCons} Encoding} \label{Alg:Cons1Enc} \end{algorithm} The decoding process is introduced in Algorithm~\ref{Alg:Cons1Dec}. Here, ${\cal D}_1({\boldsymbol z},{\boldsymbol s})$ denotes the decoding of ${\boldsymbol z}$ with respect to $\mathsf{H}_1$ within the coset of syndrome ${\boldsymbol s}$. Similarly, ${\cal D}_{\mathsf{o}}({\boldsymbol a},{\mathbf S})$, decodes ${\boldsymbol a}$ with respect to $\mathbf{H}_\mathsf{o}$ to a syndrome ${\mathbf S}$. ${\cal F}_{\mathsf{H}}({\boldsymbol u})$ denotes the linear mapping of ${\boldsymbol u}$ to the single codeword of syndrome ${\boldsymbol u}$ in the code defined by $\mathsf{H}$. $\bigotimes$ denotes an erasure occurring if either zero or more than one alignment were validated. Note that the term \emph{validation} includes cases of \emph{misvalidation}, that is, validation of a vector ${\boldsymbol v} \neq {\boldsymbol x}^{(i)}_{{\cal I}}$, whereas a failed validation, i.e. $\hat{{\boldsymbol s}}^{(i)}_2 \neq {\boldsymbol s}^{(i)}_2$, forms a \emph{rejection} of the candidate. \begin{algorithm}[h!] \SetAlgoLined \textbf{Input}: ${\cal E}\left(\{{\boldsymbol x}^{(i)}\}_{i=1}^M\right), {\mathbf Y}, \mathsf{H}_1,\bar{\mathsf{H}}_2,\mathsf{H}_\mathsf{c}, {\mathbf H}_{\mathsf{o}}$ \\ \For{$1\leq i \leq M$}{ Align ${\boldsymbol w}^{(i)}$ over ${\mathbf Y}$, and form $\mathrm{Y}^{(i)}$ (Eq. \ref{Eq:Candidates})\\ Set $\text{'found'} \gets 0$ \\ \For(\tcp*[h]{Inner Decoding}){$1 \leq j \leq |\mathrm{Y}^{(i)}|$}{ Decode ${\boldsymbol v} = {\cal D}_1({\boldsymbol z}_{{\cal I}}^{(i,j)},{\boldsymbol s}^{(i)}_1)$ \\ Calculate $\hat{{\boldsymbol s}}^{(i)}_2 = \bar{\mathsf{H}}_2 {\boldsymbol v}^T$ \\ \If(\tcp*[h]{Validation}){$\hat{{\boldsymbol s}}^{(i)}_2 = {\boldsymbol s}^{(i)}_2$}{ \eIf{$\text{'found'}=0$}{ Calculate ${\boldsymbol b}^{(i)} = \mathsf{H}_{\mathsf{c}}{\boldsymbol v}^T$, Set $\text{'found'} \gets 1$ \\ }(\tcp*[h]{More Than One Candidate}){ Set ${\boldsymbol b}^{(i)} = \bigotimes$, break } } } \If(\tcp*[h]{No Candidates}){$\text{'found'}=0$}{Set ${\boldsymbol b}^{(i)}=\bigotimes$} } \tcp*[h]{Outer Decoding} \\ Decode $\hat{\underline{{\boldsymbol a}}} = {\cal D}_{\mathsf{o}}(\underline{{\boldsymbol b}},{\mathbf S})$, where $\underline{{\boldsymbol b}} = [{\boldsymbol b}^{(1)},\dots,{\boldsymbol b}^{(M)}]$\\ \For(\tcp*[h]{Inverse Mapping}){$1 \leq i \leq M$}{ Map $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)}={\cal F}_{\mathsf{H}}([{\boldsymbol s}^{(i)},\hat{{\boldsymbol a}}^{(i)}])$ \\ Reconstruct $\hat{{\boldsymbol x}}^{(i)}$ from $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)} , {\boldsymbol w}^{(i)}$ } \textbf{Output}: $\{\hat{{\boldsymbol x}}^{(i)}\}_{i=1}^{M}$ \caption{Construction \ref{cons:GenCons} Decoding} \label{Alg:Cons1Dec} \end{algorithm} \end{construction} \vspace*{-5ex} \begin{proposition} \label{prop:Rate} The rate of Construction~\ref{cons:GenCons} is given by \begin{equation*} {\cal R} = 1-\frac{k_{\mathsf{o}}}{M}\cdot\frac{n-\ell-(\rho+\tau)}{n} = 1-\frac{k_{\mathsf{o}}}{M}\cdot\frac{k_2-\ell}{n}. \end{equation*} \end{proposition} \vspace*{-1ex} \begin{IEEEproof} Every ${\boldsymbol w}^{(i)},{\boldsymbol s}^{(i)}$ contain $\ell,(\rho+\tau)$ bits, respectively. ${\mathbf S}$ contains $M-k_{\mathsf{o}}$ elements, each represented by $\nu$ bits. Hence, \begin{align*} |{\cal E}(\{{\boldsymbol x}^{(i)}\}_{i=1}^M)| & = M\cdot(\ell+\rho+\tau) + (M-k_{\mathsf{o}})\cdot \nu \\ & = M\cdot n - k_{\mathsf{o}}\cdot [n-\ell-(\rho+\tau)] . \end{align*} Dividing by $M\cdot n$ information bits completes the proof. \end{IEEEproof} \begin{proposition} \label{prop:outer_success} Construction~\ref{cons:GenCons} yields a $(M,n,{\cal R},p,P_\mathsf{s})$-code if and only if at the outer-decoder output $\Pr\{\hat{\underline{{\boldsymbol a}}} = \underline{{\boldsymbol a}}\} \geq P_\mathsf{s}$. \end{proposition} \begin{IEEEproof} By the definition of ${\cal F}_{\mathsf{H}}(\cdot)$, we have $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)}= {\boldsymbol x}_{{\cal I}}^{(i)}$ if and only if their syndromes with respect to $\mathsf{H}$ are similar. Furthermore, since ${\boldsymbol w}^{(i)}$ is known to the decoder, the former implies $\hat{{\boldsymbol x}}^{(i)} = {\boldsymbol x}^{(i)}$. Since ${\boldsymbol s}^{(i)}$ is also known to the decoder, it is left to require $\hat{{\boldsymbol a}}^{(i)} = {\boldsymbol a}^{(i)}$ for every $1\leq i \leq M$. \end{IEEEproof} \section{Probabilistic Analysis of the Compression Scheme} \label{Sec:SchemeAnalysis} In this section we analyze the compression scheme proposed in Section~\ref{Sec:CodeConst} when used with $t$-correcting inner codes and MDS outer codes. Since the compression rate of the scheme is fixed by the code parameters, we focus on analyzing the probability that the block of reads is successfully reconstructed by the decoder with no error. Throughout this section, we model the genome as an i.i.d. Bernoulli$(1/2)$ sequence. Extension of the analysis to other genome statistical models can be done based on related studies such as \cite{sps5,sps7}. We denote by $\mathsf{F}_{\mathsf{b}}(n,p,t)$, $\mathsf{f}_{\mathsf{b}}(n,p,t)$ the \textit{cumulative distribution function} (\textit{CDF}) and \textit{probability mass function} (\textit{PMF}) of a binomial random variable with parameters $(n,p)$, evaluated at the value of $t$, respectively. \vspace*{-2ex} \subsection{Inner-Code Analysis} The inner decoder is invoked in Algorithm~\ref{Alg:Cons1Dec} on both the proper alignment of ${\boldsymbol x}^{(i)}$ in ${\mathbf Y}$ (if found) and, possibly, on improperly aligned $\bar{{\boldsymbol y}}^{(i,j)}$ vectors that are not related to ${\boldsymbol x}^{(i)}$. The scheme's performance depends on the inner-decoding outcomes for both types of inputs. \vspace*{-1ex} \begin{definition} Let $\mathrm{Y}^{(i)}$ be the set of possible alignments of some read ${\boldsymbol x}^{(i)}$. The following terms are defined: \begin{itemize}[leftmargin=*] \item $Q_\mathsf{a.s}^\mathsf{(p)}$ - the probability of the proper alignment being found, i.e., ${\boldsymbol y}^{(i)} \in \mathrm{Y}^{(i)}$. \item $Q_\mathsf{a.s}^\mathsf{(i.p)}$ - the probability of a random subsequence of ${\mathbf Y}$ being found as improper alignment, i.e., included in $\mathrm{Y}^{(i)}$. \item $\mathsf{K}_\mathsf{f}^{(i)} = \left|\mathrm{Y}^{(i)} \setminus\{{\boldsymbol y}^{(i)}\} \right|$ - the number of improper alignments. \end{itemize} \end{definition} \vspace*{-2ex} \begin{lemma} \label{Lem:AlignProb} The following expressions hold: \begin{align*} & Q_\mathsf{a.s}^\mathsf{(p)} = \mathsf{F}_{\mathsf{b}}(\ell,p,\mathsf{T}) , Q_\mathsf{a.s}^\mathsf{(i.p)} = \mathsf{F}_{\mathsf{b}}(\ell,1/2,\mathsf{T}) , \\ & \forall i : P(\mathsf{K}_\mathsf{f}^{(i)} = k) = \mathsf{f_b}(L-1,Q_\mathsf{a.s}^\mathsf{(i.p)},k) , \\ & \forall i : \mathbb{E}[\mathsf{K}_\mathsf{f}^{(i)}] \triangleq \overline{\mathsf{K}}_\mathsf{f} = (L-1)\cdot Q_\mathsf{a.s}^\mathsf{(i.p)} . \end{align*} \end{lemma} \begin{IEEEproof} $ Q_\mathsf{a.s}^\mathsf{(p)}, Q_\mathsf{a.s}^\mathsf{(i.p)}$ are immediate from the substitution channel model. Since there are $L-1$ starting indexes for the improper alignment, each being accepted with porbability $Q_\mathsf{a.s}^\mathsf{(i.p)}$, the distribution of $\mathsf{K}_\mathsf{f}^{(i)}$ is binomial. \end{IEEEproof} For the rest of the inner-code analysis, we study the properties of decoding and validating within specific code cosets. \vspace*{-2ex} \begin{definition} \label{Def:Coset} Let ${\cal C}$ be a code with a parity-check matrix $\mathsf{H}$. Then, let ${\cal C}^{[{\boldsymbol s}]}$ be the coset of the code ${\cal C}$ with syndrome ${\boldsymbol s}$, given formally by \vspace*{-1.5ex} \begin{align*} {\cal C}^{[{\boldsymbol s}]} = \left\lbrace {\boldsymbol v} = {\boldsymbol c} + {\boldsymbol u}_{\boldsymbol s} \ | \ {\boldsymbol c} \in {\cal C} \right\rbrace , \end{align*} where ${\boldsymbol u}_{\boldsymbol s}$ is the minimal-weight word ${\boldsymbol u}$ such that $\mathsf{H} {\boldsymbol u}^T = {\boldsymbol s}$. \end{definition} \begin{definition} \label{Def:MivProb} Let ${\boldsymbol v} \in {\cal C}_2^{[{\boldsymbol s}]} \subseteq {\cal C}_1^{[{\boldsymbol s}_1]}$ where ${\boldsymbol s} = [{\boldsymbol s}_1,{\boldsymbol s}_2]$, and let ${\boldsymbol y}$ be a word such that $d_{\mathsf{H}}({\boldsymbol v},{\boldsymbol y}) > \lfloor \frac{d_1-1}{2}\rfloor$. Then $P_{\mathsf{miv}}$, the {\em probability of misvalidating} ${\boldsymbol y}$, is the probability of miscorrecting ${\boldsymbol y}$ with the decoder of ${\cal C}_1$ to some ${\boldsymbol v}'\neq {\boldsymbol v}$, such that $\bar{\mathsf{H}}_2 ({\boldsymbol v}')^T = \bar{\mathsf{H}}_2 {\boldsymbol v}^T = {\boldsymbol s}_2$. \end{definition} \begin{definition} \label{Def:InnerProb} For each alignment candidate $\bar{{\boldsymbol y}}^{(i,j)} \in \mathrm{Y}^{(i)}$ of some read ${\boldsymbol x}^{(i)}_{{\cal I}}$, the following probabilities are defined: \begin{itemize}[leftmargin=*] \item $P_{\mathsf{suc}}$ - for successful inner decoding, that is, ${\boldsymbol v} = {\boldsymbol x}^{(i)}_{{\cal I}}$. \item $P_{\mathsf{f.a}}$ - for falsely accepted inner decoding, that is, ${\cal D}_1$ returns a misvalidated ${\boldsymbol v} \neq {\boldsymbol x}^{(i)}_{{\cal I}}$. \item $P_{\mathsf{rej}}=1-P_{\mathsf{suc}}-P_{\mathsf{f.a}}$ - for detected inner-decoding error. \end{itemize} \end{definition} We further add a superscript $\mathsf{(x)} \in \{\mathsf{(p)},\mathsf{(i.p)}\}$ to the above probabilities, corresponding to whether $\bar{{\boldsymbol y}}^{(i,j)}$ is the proper or improper alignment, respectively. Let $n_{\ell} \triangleq n-\ell$, and $V_n(t)$ denote the volume of a Hamming ball with radius $t$ of length-$n$ words. The next lemmas follow. \begin{lemma} \label{Lem:Pmiv} The following hold for misvalidation probabilities: \begin{align*} P_{\mathsf{miv}}^{(\mathsf{i.p})} = \frac{(2^{k_2-\ell}-1)\cdot V_{n_\ell}(t_1)}{2^{n_\ell}} \simeq \frac{V_{n_\ell}(t_1)} {2^{n-k_2}}, P_{\mathsf{miv}}^{(\mathsf{p})} \lesssim P_{\mathsf{miv}}^{(\mathsf{i.p})}, \end{align*} where the approximated inequality holds formally when the inner codes satisfy a natural property called properness \cite{sps16}. \end{lemma} \begin{IEEEproof} The misvalidation probability of an improper alignment is the probability of a uniformly chosen $n_{\ell}$-vector ${\boldsymbol y}$ being misvalidated. By Definition~\ref{Def:MivProb}, ${\boldsymbol y}$ must be decoded by the decoder of ${\cal C}_1$ to a word of ${\cal C}_2^{[{\boldsymbol s}]} \setminus \{{\boldsymbol v}\}$. Define the set \begin{align} \label{Eq:C1MivCandidates} {\cal C}_2^{[{\boldsymbol s}]}(t_1,{\boldsymbol v}) \triangleq \left\lbrace {\boldsymbol w} \ | \ \exists {\boldsymbol v}' \in {\cal C}_2^{[{\boldsymbol s}]} \setminus \{{\boldsymbol v}\} : d_{\mathsf{H}}({\boldsymbol w},{\boldsymbol v}') \leq t_1 \right\rbrace, \end{align} which gives the equivalent condition for misvalidation: ${\boldsymbol y}\in {\cal C}_2^{[{\boldsymbol s}]}(t_1,{\boldsymbol v})$. The size of this set is $\left| {\cal C}_2^{[{\boldsymbol s}]}(t_1,{\boldsymbol v}) \right| = (|{\cal C}_2|-1)\cdot V_{n_\ell}(t_1) = (2^{k_2-\ell}-1)\cdot V_{n_\ell}(t_1)$, because the balls of radius $t_1$ do not intersect, and the misvalidation probability is thus \begin{align*} P_{\mathsf{miv}}^{(\mathsf{i.p})} = \frac{ \left| {\cal C}_2^{[{\boldsymbol s}]}(t_1,{\boldsymbol v}) \right|}{2^{n_\ell}} = \frac{(2^{k_2-\ell}-1)\cdot V_{n_\ell}(t_1)}{2^{n_\ell}} . \end{align*} For reasonable code parameters we have $2^{k_2-\ell} \gg 1$, and so $2^{k_2-\ell}-1 \simeq 2^{k_2-\ell}$, therefore getting $ P_{\mathsf{miv}}^{(\mathsf{i.p})} \simeq V_{n_\ell}(t_1) / 2^{n-k_2}$. To get the second part $P_{\mathsf{miv}}^{(\mathsf{p})} \lesssim P_{\mathsf{miv}}^{(\mathsf{i.p})}$, it is known that in general, the miscorrection probability decreases as the Hamming distance from some codeword decreases, and this property becomes formal for proper codes\cite{sps16}. \end{IEEEproof} \begin{lemma} \label{Lem:Pinner} The inner decoding probabilities are equal to: \begin{align} \label{Eq:psuc} P_{\mathsf{suc}}^{(\mathsf{p})} & =\mathsf{F}_{\mathsf{b}}(n_{\ell},p,t_1) ,~ P_{\mathsf{suc}}^{(\mathsf{i.p})} = \mathsf{F}_{\mathsf{b}}(n_{\ell},1/2,t_1), \\ \label{Eq:pifa} P_{\mathsf{f.a}}^{(\mathsf{x})} & = (1-P_{\mathsf{suc}}^{(\mathsf{x})})\cdot P_{\mathsf{miv}}^{(\mathsf{x})} , \\ \label{Eq:pirej} P_{\mathsf{rej}}^{(\mathsf{x})} & = (1-P_{\mathsf{suc}}^{(\mathsf{x})})\cdot (1-P_{\mathsf{miv}}^{(\mathsf{x})}). \end{align} \end{lemma} \begin{IEEEproof} A successful decoding is obtained when the number of substitutions does not exceed the correction capability $t_1$ of ${\cal C}_1$, implying~\eqref{Eq:psuc}. A false acceptance of a candidate occurs when the number of substitutions exceed the correction capability, and a misvalidation occurs, implying~\eqref{Eq:pifa}. A rejection occurs as the complement of the former, implying~\eqref{Eq:pirej}. \end{IEEEproof} \begin{corollary} The following approximations hold: \begin{equation} \label{Eq:improperApprox} P_{\mathsf{suc}}^{(\mathsf{i.p})} \simeq 0 \Rightarrow P_{\mathsf{f.a}}^{(\mathsf{i.p})} \simeq P_{\mathsf{miv}}^{(\mathsf{i.p})} , P_{\mathsf{rej}}^{(\mathsf{i.p})} \simeq 1-P_{\mathsf{miv}}^{(\mathsf{i.p})}. \end{equation} \end{corollary} \vspace*{-3ex} \subsection{Outer-Code Analysis} \label{SubSec:OuterChan} In the outer code, the syndromes with respect to $\mathsf{H}_{\mathsf{c}}$ are treated as symbols in $\mathsf{GF}(2^\nu)$ which may be erased depending on the outcome of the inner decoding. Furthermore, a misvalidated inner-decoder output ${\boldsymbol v}$ introduces an erroneous symbol. The outer decoded word $\underline{{\boldsymbol b}}$ can thus be modeled as transmitting $\underline{{\boldsymbol a}}$ through an \emph{outer channel} producing erasures and errors. The probabilities of these events are directly induced by the coding scheme parameters $\{\ell,k_1,\tau,\mathsf{T}\}$. We can now examine the erasure and error probabilities of the outer channel, denoted by $P_{\mathsf{ers}},P_{\mathsf{err}}$, respectively. \vspace*{-1ex} \begin{lemma} \label{Lem:Pouter} Let $P_{\mathsf{p.a}} \triangleq Q_\mathsf{a.s}^\mathsf{(p)}\cdot \left( 1- P_{\mathsf{rej}}^{(\mathsf{p})}\right)$, $P_{\mathsf{p.m}} \triangleq Q_\mathsf{a.s}^\mathsf{(p)}\cdot P_{\mathsf{f.a}}^{(\mathsf{p})} $, denote the probabilities of accepted and misvalidated proper alignment, respectively. Then \begin{align} P_{\mathsf{ers}} = \sum_{k = 0}^{L-1} & \mathsf{f_b}\left(L-1,Q_\mathsf{a.s}^\mathsf{(i.p)},k\right) \cdot \left[1-P_{\mathsf{p.a}}\cdot \left(P_{\mathsf{rej}}^{(\mathsf{i.p})}\right)^k \right. \label{eq:Pers}\\ & \left. - (1-P_{\mathsf{p.a}}) \cdot k \cdot \left(P_{\mathsf{rej}}^{(\mathsf{i.p})}\right)^{k-1} \cdot \left(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}\right)\right], \nonumber \\ P_{\mathsf{err}} = \sum_{k = 0}^{L-1} & \mathsf{f_b}\left(L-1,Q_\mathsf{a.s}^\mathsf{(i.p)},k\right) \cdot \left[ P_{\mathsf{p.m}} \cdot \left(P_{\mathsf{rej}}^{(\mathsf{i.p})}\right)^k \right. \label{eq:Perr}\\ & \left. + (1-P_{\mathsf{p.a}}) \cdot k \cdot \left(P_{\mathsf{rej}}^{(\mathsf{i.p})}\right)^{k-1} \cdot \left(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}\right) \right] \nonumber. \end{align} \end{lemma} \begin{IEEEproof} Denote by $P_{\mathsf{ers}}(k),P_{\mathsf{err}}(k)$ the probabilities of erasure and error given $k$ improper alignments. An erasure occurs in one of two scenarios: 1) no candidates are accepted, with probability \begin{align*} P_{\mathsf{ers}}^{1)}(k) & = Q_\mathsf{a.s}^\mathsf{(p)}\cdot P_{\mathsf{rej}}^{(\mathsf{p})} \cdot (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k + (1-Q_\mathsf{a.s}^\mathsf{(p)})\cdot (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k \\ & = (1-P_{\mathsf{p.a}}) \cdot (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k , \end{align*} 2) more than one candidate are accepted, with probability \begin{align*} P_{\mathsf{ers}}^{2)}& (k) = Q_\mathsf{a.s}^\mathsf{(p)} \left[ (1-P_{\mathsf{rej}}^{(\mathsf{p})}) \left(1-(P_{\mathsf{rej}}^{(\mathsf{p})})^k\right) \right.\\ & \left. + P_{\mathsf{rej}}^{(\mathsf{p})} \left( 1 - (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k - k(P_{\mathsf{rej}}^{(\mathsf{i.p})})^{k-1}(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}) \right) \right] \\ & + (1-Q_\mathsf{a.s}^\mathsf{(p)}) \left( 1 - (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k - k(P_{\mathsf{rej}}^{(\mathsf{i.p})})^{k-1}(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}) \right) \\ & \quad = 1 - (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k -(1-P_{\mathsf{p.a}}) k(P_{\mathsf{rej}}^{(\mathsf{i.p})})^{k-1}(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}). \end{align*} By summing both scenarios we get the expression in the square brackets of~\eqref{eq:Pers}. An error occurs when a single misvalidation is obtained without a successful decoding, with probability \begin{align*} P_{\mathsf{err}}(k) & = Q_\mathsf{a.s}^\mathsf{(p)} \left[P_{\mathsf{f.a}}^{(\mathsf{p})} (P_{\mathsf{rej}}^{(\mathsf{i.p})})^k + P_{\mathsf{rej}}^{(\mathsf{p})} k(P_{\mathsf{rej}}^{(\mathsf{i.p})})^{k-1}(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}) \right] \\ & \quad + (1-Q_\mathsf{a.s}^\mathsf{(p)}) k(P_{\mathsf{rej}}^{(\mathsf{i.p})})^{k-1}(1-P_{\mathsf{rej}}^{(\mathsf{i.p})}) , \end{align*} which can be rearranged as the expression in the square brackets of~\eqref{eq:Perr}. We now marginalize over the number of improper alignments, i.e. $P = \sum_{k=0}^{L-1} P(\mathsf{K}_\mathsf{f}^{(i)} = k) \cdot P(k)$, where $P$ is taken as $P_{\mathsf{ers}}$ and $P_{\mathsf{err}}$. Using Lemma~\ref{Lem:AlignProb} and the expressions above we complete the proof. \end{IEEEproof} Let $P_\mathsf{p.a} \triangleq Q_\mathsf{a.s}^\mathsf{(p)}(1-P_{\mathsf{rej}}^{(\mathsf{p})})$, $P_\mathsf{p.m} \triangleq \QpasP_{\mathsf{miv}}^{(\mathsf{p})}$ be the probabilities of the proper alignment being rejected and being misvalidated, respectively. \vspace*{-3ex} \begin{lemma} \label{Lem:PouterApprox} If $\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})} < 1$, it holds that: \begin{small} \begin{align*} \begin{split} P_{\mathsf{ers}} & \leq P_{\mathsf{p.a}} \left[\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})} (1-B_1) \right] + (1-P_{\mathsf{p.a}}) \left[1-\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})} (1-B_2)\right] , \\ P_{\mathsf{err}} & \leq P_{\mathsf{p.m}} \left[1-\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})} (1-B_1) \right] + (1-P_{\mathsf{p.a}}) \left[\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})} (1-B_2)\right], \end{split} \end{align*} \end{small} where $B_i = {\cal O}\left([\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})}]^2\right) , i=\{1,2\}$, and is thus negligible when $\overline{\mathsf{K}}_\mathsf{f} P_{\mathsf{f.a}}^{(\mathsf{i.p})} \ll 1$. \end{lemma} \vspace*{-1.5ex} \begin{IEEEproof} The proof is given in Appendix~\ref{Ap:PouterApprox}. \end{IEEEproof} We can now derive the required outer redundancy. \vspace*{-3ex} \begin{proposition} \label{prop:OuterRed} Let ${\cal C}_{\mathsf{o}}$ be an \textit{MDS} code, and define the random variable $W={m_1}+2{m_2}$, where ${m_1}$ and ${m_2}$ are the numbers of erasures and errors, respectively. Then, \begin{align} \label{Eq:OuterErr} P(W = u) = \hspace*{-1.5ex}\sum_{\underline{m} \in S(M,u)} \frac{M !}{m_0 ! m_1 ! m_2 !} P_\mathsf{cor}^{m_0}\cdot P_{\mathsf{ers}}^{m_1} \cdot P_{\mathsf{err}}^{m_2} , \end{align} for $P_\mathsf{cor} \triangleq 1-P_{\mathsf{ers}}-P_{\mathsf{err}}$ , $\underline{m} = (m_0,m_1,m_2)$, \begin{equation*} S(M,u) \triangleq \left\lbrace \underline{m} \ \left| \begin{matrix} m_1+2m_2=u \\ m_0 +m_1 + m_2 = M \end{matrix} \right. \right\rbrace, \end{equation*} and the minimal required redundancy $M-k_{\mathsf{o}}$ of ${\cal C}_{\mathsf{o}}$ is given by \vspace*{-3ex} \begin{equation} \label{Eq:RhoOut} \rho_{\mathsf{o}}^* = \min\{w\} \ \ \text{such that} \ \ P\left(W \leq w \right) \geq P_{\mathsf{s}} \ . \end{equation} \end{proposition} \vspace*{-1ex} \begin{IEEEproof} The proof is given in Appendix~\ref{Ap:OuterRed}. \end{IEEEproof} \begin{figure*}[h!] \centering \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=\linewidth]{figures/OuterChanProbFixed.eps} \end{subfigure} \begin{subfigure}{.48\textwidth} \centering \includegraphics[width=\linewidth]{figures/RedProbAnalyitVsSimLogFixed.eps} \end{subfigure} \caption{\textbf{Left:} Binomial CDFs of erasures and errors, and the resulted trinomial CDF of $W$. \textbf{Right}: Simulative and analytical results of the trinomial CCDF of $W$, along with $\rho_{\mathsf{o}}^{*}$ corresponding to $P_\mathsf{f}=10^{-1}$.} \label{Fig:OuterChannel} \end{figure*} The trinomial CDF of $W$, described in~\eqref{Eq:OuterErr} is demonstrated in the left side of Fig.~\ref{Fig:OuterChannel} (in yellow), compared to the binomial CDFs erasures (blue dash-dot line) and errors (red dashed line), for $n=M=255$ and for $P_{\mathsf{ers}}=0.1, P_{\mathsf{err}}=0.01$. Simulative results of the trinomial complementary CDF, is shown in the right side of Fig.~\ref{Fig:OuterChannel} for $n=63,M=15,p=0.01$, compared to the analytical result from~\eqref{Eq:OuterErr}. The minimal redundancy $\rho_{\mathsf{o}}^*$ is demonstrated for $P_\mathsf{f} \triangleq 1-P_\mathsf{s} = 10^{-1}$. An optimization procedure of the scheme parameters $\{k_1,\tau,\ell,\mathsf{T}\}$ for obtaining minimal rate is described in~\cite{sps0}. To see the interaction between the inner and outer codes, and to get the idea of their joint optimization, we plot in Fig.~\ref{Fig:InnerOuterRed} some of the interesting variables defined earlier in the section. We first fix the alignment parameters $\mathsf{T}$,$\ell$ and validation parameter $\tau$. Then we plot, as a function of the inner-code dimension $k_1$, the probabilities $P_{\mathsf{ers}}$ (circle markers) and $P_{\mathsf{err}}$ (square markers), for $p=0.01$. Both of these probabilities are monotonically non-decreasing as the inner code gets weaker. We also plot the required outer redundancy~\eqref{Eq:RhoOut} ($\times$ markers, right y-axis) to achieve $P_{\mathsf{s}}>1-10^{-6}$. The code designer is to choose the combination of $k_1=207$ and $\rho_{\mathsf{o}}^*=20$ that minimizes the compression rate, which is ${\cal R} \simeq 0.339$ in this setup. The plot also reveals a floor value for the erasure probability, attributed to failed proper alignments, which cannot be improved by strengthening the inner code. \begin{figure}[H] \centering \includegraphics[width=\linewidth]{figures/OuterProbabilitiesV2.eps} \caption{Outer channel probabilities and required redundancy as a function of inner-code dimension $k_1$.} \label{Fig:InnerOuterRed} \end{figure} In Fig.~\ref{Fig:RateComp}, we compare the compression rate of the proposed scheme (for $p=0.01,0.005$) to the ubiquitous ORCOM algorithm~\cite{sps34}. For this comparison we use the standard measure of compression ratio in units of bits per base-pair (bpb). Without compression, each $q=4$ base-pair consumes $2$ bits, so the compression rate defined in Proposition~\ref{prop:Rate} is simply the plotted bpb divided by $2$. We use read size of $N = 63$ base pairs for both schemes, which implies an inner-block size of $n=N\log_2(q)=126$ bits in our scheme. For ORCOM, the compression ratios (taken from\cite{sps35}) strongly depend on the sequencing \emph{coverage}~\cite{sps33} (the average number of appearances of a specific symbol from the genome), due to its reliance on internal similarities. Our proposed scheme, in contrast, does not need high coverage, and is shown to achieve comparable rates. Working at low coverages has significant advantages in complexity and latency, as we discuss later in the paper. \begin{figure}[h!] \centering \includegraphics[width=\linewidth]{figures/Rate_DSC_vs_Orcom_V4.eps} \caption{Rate comparison between our scheme (DSC) and ORCOM as a fucntion of coverage.} \label{Fig:RateComp} \end{figure} \vspace*{-2ex} \section{Semi-Metric For Alignment With Deletions} \label{Sec:DelSemiMetric} \begin{figure*}[h!] \centering \includegraphics[width=\linewidth]{figures/OffsetDistPlot.eps} \caption{Illustration of the shift compensating measure and its components, with no substitutions: cumulative distances (left), and their difference (right), with the deletion location minus 1 attaining the maximal difference.} \label{fig:OffsetDist} \end{figure*} To extend the coding scheme to also deal with deletion errors, we need to establish an efficient way to perform alignment (at the decoder) under such errors. With substitutions only, an alignment candidate is considered suitable if its Hamming distance to the read is small (see~\eqref{Eq:Candidates}). We now need an alternative distance measure that supports deletion errors between the reference and the sequenced reads. We focus on the case of a single deletion (and multiple substitutions) per inner block, and discuss extensions to multiple deletions (and to insertions) toward the end of the paper. Note that we can partition any read of given length into multiple inner blocks of any desired size, and therefore by keeping the inner-blocks short, a single deletion remains an interesting case in practice for a wide range of deletion probabilities. \vspace*{-1.5ex} \subsection{Existing Measures} An immediate candidate for such a measure is the {\em Levenshtein distance}~\cite{sps28}, counting the minimal number of edits (deletions, insertions and substitutions) required to obtain one word from another. Nevertheless, this measure suffers from two main issues in our case: (i.) its complex calculation by dynamic-programming algorithms makes it impractical to evaluate each read along every possible offset in the reference, (ii.) allowing unrestricted error patterns, involving any combination of edits, introduces unfitting alignment candidates. Another possible measure is the {\em shifted Hamming distance}~\cite{sps29}, which matches each read index with $r$ adjacent indices in the subsequence considered for alignment. For our purposes, since only deletions (and not insertions) are considered, it is sufficient to use shifts in one direction between the two input subsequences. This can be formalized by \vspace*{-3ex} \begin{align}\label{eq:shftH} \forall {\boldsymbol x} \in \mathbf{\Sigma}^n , {\boldsymbol y} \in \mathbf{\Sigma}^{n+r} : d_{\mathsf{SH}}({\boldsymbol x},{\boldsymbol y}) \triangleq \sum_{i=1}^n \bigwedge_{j=0}^r x_i \oplus y_{i+j} , \end{align} where $\wedge$ denotes a logical `AND' operation, and $\mathbf{\Sigma}^m$ denotes a word of length $m$ from alphabet $\mathbf{\Sigma}$, and the binary operator $\oplus$ returns $0$ for equal symbols and $1$ otherwise. The main issue with this measure is that it allows low distance values from independent shifts between indices, ignoring the special shift structure of index deletion. This causes even random unrelated sequences to be declared close, increasing the number of improper alignments. \subsection{Preliminaries} The following definitions are the basic building blocks for our proposed distance measure. \begin{definition} \textbf{(Cumulative Hamming distance)} \label{Def:CumHamDist} For ${\boldsymbol x} \in \mathbf{\Sigma}^n$, ${\boldsymbol y} \in \mathbf{\Sigma}^{n+r}$, define, for every $0\leq j \leq r$ and every $0\leq t\leq n$, \begin{align*} \phi_j ({\boldsymbol x},{\boldsymbol y} ; t) \triangleq \sum_{i=1}^{t} x_i \oplus y_{i+j} , \vspace*{-1.5ex} \end{align*} where $\oplus$ denotes an addition over $\mathsf{GF}(2)$. When clear from the context, we will denote $\phi_j ({\boldsymbol x},{\boldsymbol y} ; t) = \phi_j(t)$. \end{definition} \begin{definition} Let ${\boldsymbol x} \in \mathbf{\Sigma}^n$, ${\boldsymbol y} \in \mathbf{\Sigma}^{n+r}$. Define, for every $0\leq j \leq r-1$ and every $0 \leq t \leq n$, \begin{align*} \Delta \phi_j ({\boldsymbol x},{\boldsymbol y};t) & \triangleq \phi_{j+1}({\boldsymbol x},{\boldsymbol y};t) - \phi_{j}({\boldsymbol x},{\boldsymbol y};t) \\ & = \sum_{i=1}^{t} [x_i \oplus y_{i+j+1}]-[x_i \oplus y_{i+j}] , \end{align*} where by definition $\Delta \phi_j ({\boldsymbol x},{\boldsymbol y};0) = 0$. Again, when clear from the context, we will denote $\Delta\phi_j ({\boldsymbol x},{\boldsymbol y} ; t) = \Delta\phi_j(t)$. \end{definition} \vspace*{-2.5ex} \subsection{Single-Deletion Shift-Compensating Distance} \vspace*{-0.5ex} We can now introduce the desired measure for underlying Hamming distance between two words, while compensating for a block shift caused by a single deletion occurring in one of them before being transmitted through a substitution channel. \begin{definition}\label{def:shft_comp_measr} \label{Def:SCdist} Let ${\boldsymbol x} \in \mathbf{\Sigma}^n , {\boldsymbol y} \in \mathbf{\Sigma}^{n+1}$, and let \begin{align} \label{Eq:OptOCt} t^* \triangleq \argmax_{0\leq t \leq n} \{\Delta \phi_0 ({\boldsymbol x},{\boldsymbol y};t) \}. \end{align} Then, we define the \textbf{\emph{shift-compensating distance}} by \begin{align*} {\delta_\mathsf{s.c}} ({\boldsymbol x}, {\boldsymbol y}) & \triangleq \phi_1({\boldsymbol x},{\boldsymbol y};n) - \phi_1({\boldsymbol x},{\boldsymbol y};t^*) + \phi_0({\boldsymbol x},{\boldsymbol y};t^*) \\ & = \phi_1({\boldsymbol x},{\boldsymbol y};n) - \max_{0\leq t \leq n} \{\Delta \phi_0 ({\boldsymbol x},{\boldsymbol y};t)\} \\ & = \min_{0\leq t \leq n} \{\phi_1({\boldsymbol x},{\boldsymbol y};n) - \Delta \phi_0 ({\boldsymbol x},{\boldsymbol y};t)\} . \end{align*} \end{definition} Note that ${\delta_\mathsf{s.c}} ({\boldsymbol x}, {\boldsymbol y})\geq 0$, because $\phi_1(t)$ is non-decreasing and $\phi_0(t)$ is non-negative. Let us give some intuition to this measure through a simplified example. Let ${\boldsymbol x}$ be the word obtained from ${\boldsymbol y}$ by a deletion occurring in position ${\imath_{\mathsf{d}}}$. Then, $x_i = y_i$ for every $1\leq i < {\imath_{\mathsf{d}}}$, and $x_i = y_{i+1}$ for every ${\imath_{\mathsf{d}}} \leq i \leq n$. Therefore $\phi_0({\imath_{\mathsf{d}}}-1) = 0$ and $\phi_1(n) - \phi_1({\imath_{\mathsf{d}}}-1) = 0$. It follows that $\phi_1(n) - \Delta \phi_0({\imath_{\mathsf{d}}}-1) = 0$, and so it is clear that $({\imath_{\mathsf{d}}}-1) \in \argmax_{0\leq t \leq n} \{\Delta \phi_0(t) \}$ (otherwise implying a negative ${\delta_\mathsf{s.c}} ({\boldsymbol x}, {\boldsymbol y})$). We conclude that: (i) an index maximizing $\Delta \phi_0$ gives an estimate for the deletion location (up to an ambiguity within a run of the same symbol around the deletion), and (ii) after estimating the deletion location, ${\delta_\mathsf{s.c}}$ gives the combined Hamming distance before and after this estimated location, while shifting the second part of ${\boldsymbol x}$ to compensate for the deletion. These conclusions are illustrated in Fig.~\ref{fig:OffsetDist}, where in the right plot it is evident that $t^*+1 = {\imath_{\mathsf{d}}}$, thus locating the likely deletion position. The shift compensating measure sums the increments of $\phi_0$ (blue) left from ${\imath_{\mathsf{d}}}-1$ and the increments of $\phi_1$ (red) right from ${\imath_{\mathsf{d}}}$, which sum to zero since there are no substitutions. When introducing substitutions, these horizontal segments in $\phi_0,\phi_1$ will include random increases, with an average slope of $p$, attributed to the substitutions. \subsection{Similarity Properties} In this sub-section we formalize the properties of ${\delta_\mathsf{s.c}}$. First, we examine its relation to the underlying Hamming distance. \begin{lemma} \label{Lem:DistEquivalence} Let ${\boldsymbol x} \in \mathbf{\Sigma}^n , {\boldsymbol y} \in \mathbf{\Sigma}^{n+1}$. Let ${\boldsymbol y}^{[t]}$ denote the word obtained from ${\boldsymbol y}$ by a deletion in index $t$, for any $1\leq t \leq n+1$. Then, \vspace*{-3ex} \begin{align}\label{eq:delta_dist} {\delta_\mathsf{s.c}} ({\boldsymbol x},{\boldsymbol y}) = \min_{1\leq t \leq n+1} \left\lbrace d_{\mathsf{H}} ({\boldsymbol x},{\boldsymbol y}^{[t]}) \right\rbrace , \\ t^* = \argmin_{1\leq t \leq n+1} \left\lbrace d_{\mathsf{H}} ({\boldsymbol x},{\boldsymbol y}^{[t]}) \right\rbrace - 1 , \end{align} where $t^*$ is defined in (\ref{Eq:OptOCt}). \end{lemma} \begin{IEEEproof} It holds that \begin{align*} d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol y}^{[t]}) & = \sum_{i=1}^{t-1} x_i \oplus y_i + \sum_{i=t}^{n} x_i \oplus y_{i+1} \\ & = \phi_1({\boldsymbol x},{\boldsymbol y};n) - \Delta\phi_0({\boldsymbol x},{\boldsymbol y};t-1) . \end{align*} Minimizing over $t-1 \in \{0,\dots,n\}$ we get ${\delta_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y})$ by definition, and the minimizing argument is exactly $t^*$. \end{IEEEproof} It is seen in~\eqref{eq:delta_dist} that ${\delta_\mathsf{s.c}}$ is the most natural distance for this error model: it gives the minimal Hamming distance between ${\boldsymbol x}$ and any single-deletion version of ${\boldsymbol y}$. Importantly, it has a linear calculation complexity making it more practical than other alternatives, such as the Levenshtein distance. Next, to analyze the new measure's alignment performance, in particular its ability to reject false alignments (thus reducing the count of improper alignments), we study its distribution when evaluated on a \emph{random} ${\boldsymbol y}$ word unrelated to ${\boldsymbol x}$. We first observe that for two independent random words ${\boldsymbol x} \in \mathbf{\Sigma}^{n}, {\boldsymbol y}\in \mathbf{\Sigma}^{n+1}$, we can write $\Delta \phi_0({\boldsymbol x},{\boldsymbol y};t) = \sum_{i=0}^t \Delta_i , 1\leq t \leq n$, where $\Delta_0 = 0$, and $\{\Delta_i\}_{i=1}^t$ are independent random variables with support $\{-1,0,1\}$ and probabilities $\{0.25,0.5,0.25\}$, respectively. This type of sum forms a \emph{symmetric random walk with null steps}. Furthermore, we observe that in this case $\phi_1({\boldsymbol x},{\boldsymbol y};n)$ is a Binomial random variable with $p=1/2$. Based on these observations, we get the following theorem. \begin{theorem} \label{Th:RandomDistance} Let us denote by $R_{n}$ the random variable of $ {\delta_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y})$ for randomly chosen ${\boldsymbol x} \in \mathbf{\Sigma}^{n}, {\boldsymbol y} \in \mathbf{\Sigma}^{n+1}$. Then, \begin{small} \begin{align*} P & (R_{n} = r) = \\ & \frac{1}{4^n} \sum_{m=0}^{n-r} \sum_{t=m}^{n} \sum_{k=0}^{n-m} \sum_{w = 0}^{k} \sum_{l =0}^{t-1} A_1(t,w,m,l) \smashoperator[lr]{\sum_{v=0}^{n-t-(k-w)}}A_2(v,t,k-w,r-l) , \end{align*} \end{small} where we defined \begin{align*} A_1(t,w,m,l) \triangleq \frac{m}{t}\cdot {t \choose \alpha,\alpha+m,\beta, w - \beta} , \end{align*} \begin{align*} A_2(v,t,k-w,r-l) = \frac{v+1}{\gamma + v + 1} {n-t \choose \gamma, \gamma + v,\eta, k-w-\eta} , \end{align*} for $\alpha \triangleq (t-w-m)/2, \beta \triangleq l-\alpha, \gamma \triangleq (n-t-(k-w)-v)/2 , \eta \triangleq r-l-\gamma $, and ${z \choose u_1,u_2,\dots,u_m} \triangleq \frac{z!}{u_1!u_2!\dots u_m!}$, the multinomial coefficient. \end{theorem} \begin{IEEEproof} The full proof is given in Appendix~\ref{Ap:docRandom}. We include a sketch here. To count the number of sequence pairs that have ${\delta_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y})=r$, we classify the pairs according to several variables appearing as summation indices. The primary variables are $t$ that is the value $t^*$ calculated in~\eqref{Eq:OptOCt}, and $m$ that is $\Delta \phi_0 ({\boldsymbol x},{\boldsymbol y};t^*)$. Given $t,m$, we count the number of random walks of $\Delta_i$ that attain a global maximum of $m$ at time $t$, and for each such walk expand the number of sequence pairs that have distance $r$. The variables $k$ and $w$ count the number of zeros of the random walk in total and until time $t$, respectively. The remaining summation indices are weight variables: $l$ for the subsequence $x_i \oplus y_i$ until time $t$, and $v$ for the subsequence $x_i \oplus y_{i+1}$ thereafter. A full formal proof is given in Appendix~\ref{Ap:docRandom}. \end{IEEEproof} We plot in Fig.~\ref{Fig:SCrandSim} the distribution (CDF) of $R_n$ for $n=18$ obtained by Theorem~\ref{Th:RandomDistance}. To validate the theoretical result, we include in the plot the empirical distribution collected from random sequences. We also show, in comparison, the CDF of the shifted-Hamming distance given in~\eqref{eq:shftH}, demonstrating the significant advantage of ${\delta_\mathsf{s.c}}$ in obtaining low $R_n$ values for unrelated sequences. \begin{figure}[h!] \centering \includegraphics[width=1\linewidth]{figures/RandomSegmentDistanceCDF_V3.eps} \caption{CDF of the proposed S.C measure (analytical and empirical) on unrelated sequences in comparison to the previously proposed shifted Hamming distance (S.H).} \label{Fig:SCrandSim} \end{figure} \subsection{Metric-Like Properties} In this section we show that our distance meets most of the conditions for being a metric. More specifically, we define a \emph{semi-metric}, which has all the properties of a standard metric~\cite{sps37}, short of a single technical property, and prove that our distance meets this definition. Let us denote $\mathbf{\Sigma}_a^b \triangleq \bigcup_{m=a}^b \mathbf{\Sigma}^m$, that is the set of all words with entries from $\mathbf{\Sigma}$ and lengths $m$ satisfying $a\leq m \leq b$. \vspace*{-1.5ex} \begin{definition} \textbf{(Multi-length semi-metric)} \label{Def:SemiMetric} For every $0<a\leq b$, the function $\mathsf{d} : \mathbf{\Sigma}_a^b \times \mathbf{\Sigma}_a^b \rightarrow [0,\infty)$ is called an $[a,b]$-\emph{length semi-metric} if it satisfies: \begin{enumerate} \item $\forall {\boldsymbol x},{\boldsymbol y} \in \mathbf{\Sigma}_a^b : \mathsf{d}({\boldsymbol x},{\boldsymbol y}) = \mathsf{d}({\boldsymbol y},{\boldsymbol x})$ (symmetry). \item $\forall {\boldsymbol x},{\boldsymbol y},{\boldsymbol z} \in \mathbf{\Sigma}_a^b : \mathsf{d}({\boldsymbol x},{\boldsymbol y}) \leq \mathsf{d}({\boldsymbol x},{\boldsymbol z}) + \mathsf{d}({\boldsymbol z},{\boldsymbol y})$ (triangle inequality). \item Let ${\cal Y}_0^m ({\boldsymbol x}) = \left\lbrace {\boldsymbol y} \in \mathbf{\Sigma}^m : \mathsf{d} ({\boldsymbol x},{\boldsymbol y}) = 0 \right\rbrace$. Then for every ${\boldsymbol x} \in \mathbf{\Sigma}^n$ we have ${\cal Y}_0^m({\boldsymbol x}) = S_{|n-m|}({\boldsymbol x})$, as some determisitic set depending only on $|n-m|$ and the word ${\boldsymbol x}$, such that $S_0({\boldsymbol x}) = \{{\boldsymbol x}\}$ (generalized identity of indiscernibles). \end{enumerate} These properties exactly define a standard metric except for the generalization of the known identity of indiscernibles~\cite{sps38}, which will be useful as described after Proposition~\ref{Prop:SCisDist}. \end{definition} We now use ${\delta_\mathsf{s.c}}$ to form a natural symmetric distance, which is proved to be such a semi metric. \begin{definition} Let ${\boldsymbol x},{\boldsymbol y} \in \mathbf{\Sigma}_n^{n+1}$. The \textbf{\emph{shift-compensating distance}} is defined by \begin{align*} d_{\mathsf{o.c}}({\boldsymbol x},{\boldsymbol y}) \triangleq \begin{cases} d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol y}) & , |{\boldsymbol x}|=|{\boldsymbol y}| \\ {\delta_\mathsf{s.c}} ({\boldsymbol x}, {\boldsymbol y}) & , |{\boldsymbol x}| = |{\boldsymbol y}| - 1 \\ {\delta_\mathsf{s.c}} ({\boldsymbol y}, {\boldsymbol x}) & , |{\boldsymbol x}| = |{\boldsymbol y}| + 1 \end{cases} . \end{align*} \end{definition} \begin{proposition} \label{Prop:SCisDist} The distance $d_\mathsf{s.c} (\cdot,\cdot)$ is an $[n,n+1]$-length semi-metric for any $n>0$. \end{proposition} \begin{IEEEproof} We follow the conditions in Definition~\ref{Def:SemiMetric}. We denote by $\mathrm{D}_1({\boldsymbol x}),\mathrm{I}_1({\boldsymbol x})$ the deletion and insertion balls of radius 1 of ${\boldsymbol x}$, respectively. \begin{enumerate} \item Based on Hamming distance properties we have ${\cal Y}_0^n({\boldsymbol x}) = \{{\boldsymbol x}\}$. For some ${\boldsymbol y} \in \mathbf{\Sigma}^{n+1}$, based on Lemma~\ref{Lem:DistEquivalence}, we have ${\delta_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y})=0$ if and only if $\exists t: d_\mathsf{H}({\boldsymbol x},{\boldsymbol y}^{[t]}) = 0$, i.e. ${\boldsymbol x} \in \mathrm{D}_1({\boldsymbol y})$. Since the latter occurs if and only if ${\boldsymbol y} \in \mathrm{I}_1({\boldsymbol x})$, we get ${\cal Y}_0^{n+1}({\boldsymbol x}) = \mathrm{I}_1({\boldsymbol x}) = \mathrm{I}_{|{\boldsymbol y}|-|{\boldsymbol x}|}({\boldsymbol x})$. \item The symmetry $d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol y}) = d_\mathsf{s.c}({\boldsymbol y},{\boldsymbol x})$ is immediate from the definition. \item For the Hamming distance, the triangle inequality holds. For $|{\boldsymbol y}| = |{\boldsymbol x}|+1$ we examine two cases: (i.) Let ${\boldsymbol z}$ be some word such that $|{\boldsymbol z}|=|{\boldsymbol x}|$, then \begin{align*} d_\mathsf{s.c}({\boldsymbol z},{\boldsymbol y}) = \min_{1\leq t\leq n+1} \{d_{\mathsf{H}}({\boldsymbol z},{\boldsymbol y}^{[t]} \} = d_{\mathsf{H}}({\boldsymbol z},{\boldsymbol y}^{[t_1]}), \end{align*} where $t_1$ is the minimizing index, and so \begin{align*} d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol y}) & \leq d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol y}^{[t_1]}) \leq d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol z}) + d_{\mathsf{H}}({\boldsymbol z},{\boldsymbol y}^{[t_1]}) \\ & = d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol z}) + d_\mathsf{s.c}({\boldsymbol z},{\boldsymbol y}) . \end{align*} (ii.) Let ${\boldsymbol z}$ be some word such that $|{\boldsymbol z}| = |{\boldsymbol y}|$. Similar to the former case $d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol z}) = d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol z}^{[t_2]})$. Furthermore, for every $1\leq t \leq n+1$ we have $d_{\mathsf{H}}({\boldsymbol y}^{[t]},{\boldsymbol z}^{[t]}) \leq d_{\mathsf{H}}({\boldsymbol y},{\boldsymbol z})$, since an index is discarded in summation. Therefore, \begin{align*} d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol y}) & \leq d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol y}^{[t_2]}) \leq d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol z}^{[t_2]}) + d_{\mathsf{H}}({\boldsymbol z}^{[t_2]},{\boldsymbol y}^{[t_2]}) \\ & = d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol z}) + d_{\mathsf{H}}({\boldsymbol z}^{[t_2]},{\boldsymbol y}^{[t_2]}) \\ & \leq d_\mathsf{s.c}({\boldsymbol x},{\boldsymbol z}) + d_\mathsf{s.c}({\boldsymbol z},{\boldsymbol y}) . \end{align*} Hence, $\forall {\boldsymbol x},{\boldsymbol y},{\boldsymbol z} \in \mathbf{\Sigma}_n^{n+1}$, the triangle inequality holds. \end{enumerate} \end{IEEEproof} The generalized identity of indiscernibles with ${\cal Y}_0^{n+1}({\boldsymbol x}) = \mathrm{I}_1({\boldsymbol x})$ captures well the fact that multiple length-$(n+1)$ sequences are 1 deletion and 0 substitutions away from a length-$n$ alignment target ${\boldsymbol x}$, having $0$ distance as ${\boldsymbol x}$ itself. \section{Extending The Scheme to Single-Deletion Multiple-Substitutions} \label{Sec:SchemeDelExt} \subsection{Channel Model} In this section we extend the difference channel model to \emph{single-deletion multiple-substitutions} in each read. That is, for each read ${\boldsymbol x}^{(i)}$ there exists an index $k_i$ such that the read is obtained from ${\boldsymbol y}^{(i)} = Y_{k_i},\dots, Y_{k_i+n-1},Y_{k_i+n}$, of length $n+1$, by a single deletion and a certain number of substitutions. Equivalently, there is an integer $j_{\mathsf{d_i}}$ such that \begin{align*} {\boldsymbol x}^{(i)} = \tilde{X}_{k_i}, \dots, \tilde{X}_{k_i+j_{\mathsf{d_i}}-2} , \tilde{X}_{k_i+j_{\mathsf{d_i}}},\dots,\tilde{X}_{k_i+n-1},\tilde{X}_{k_i+n} , \end{align*} where $\tilde{{\mathbf X}}$ is the result of ${\mathbf Y}$ passing through a substitution channel. In this model we have: (i) the $j_{\mathsf{d}}$-th index with respect to the substring, i.e. the $k_i + j_{\mathsf{d}} - 1$ with respect to the sequence, is deleted, and (ii) the last symbol in $\tilde{{\mathbf X}}^{(i)}$, i.e. $X_{k_i+n}$ is observed, keeping the length of the sequencer's output as $n$. This error model represents two equivalent scenarios: (i) the sequencer 'misses' a symbol, while unknowingly keeping on sequencing an extra symbol to keep the length as defined, and (ii) the reference ${\mathbf Y}$ includes an insertion with respect to the sequenced genome due to genomic diversity. These result in the same relation between ${\boldsymbol x}^{(i)}$ and ${\boldsymbol y}^{(i)}$, and in both the \emph{sequencer is unaware whether a deletion occured or not}. \subsection{Alignment with Single-Deletion} \label{SubSec:AlignMod} A modification to the pre-decoding alignment described in Section~\ref{SubSec:Alignment} is required in order to deal with a potential deletion error in every read. This is done by simply replacing the Hamming distance with the proposed shift compensating distance. To deal with the non-consecutive read identifier used for alignment, the calculation of $\phi_j({\boldsymbol x},{\boldsymbol y})$ is easily extended to non-consecutive indices $1\leq i_1 < i_2 < \dots <i_{\ell}$ by \begin{align*} \phi_j^{'}({\boldsymbol x},{\boldsymbol y};t) = \sum_{k=1}^t x_{i_k} \oplus y_{i_k+j} \text{, \ for \ } 0 \leq t \leq \ell . \end{align*} Where consecutive index shifts (not restricted to the subset of indices sent to the decoder) are used only in ${\boldsymbol y}$, thus are available to the decoder. Denoting $\Delta \phi_j^{'} \triangleq \phi_{j+1}^{'} - \phi_{j}^{'}$, ${\delta'_\mathsf{s.c}}$ is now the corresponding modification of Definition~\ref{Def:SCdist}: \begin{equation}\label{eq:identifier_d} {\delta'_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y}) \triangleq \min_{0\leq t \leq \ell} \{\phi_1^{'}({\boldsymbol x},{\boldsymbol y};\ell) - \Delta \phi_0^{'} ({\boldsymbol x},{\boldsymbol y};t)\}. \end{equation} We now show an important property similar to Lemma~\ref{Lem:DistEquivalence}, showing that ${\delta'_\mathsf{s.c}}$ captures the {\em read identifiers'} Hamming distance to the closest single-deletion vector. \begin{lemma} \label{Lem:deloctUB} Let ${\boldsymbol z}\in\mathbf{\Sigma}^{n}$ be the word obtained from ${\boldsymbol y} \in \mathbf{\Sigma}^{n+1}$ by a deletion in some index ${\imath_{\mathsf{d}}}$, and let ${\boldsymbol x}\in\mathbf{\Sigma}^{n}$ be an arbitrary word. Then, \begin{align} \label{Eq:deloctUB} {\delta'_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y}) \leq d_{\mathsf{H}} (f_\ell({\boldsymbol x}),f_\ell({\boldsymbol z})). \end{align} \end{lemma} \begin{IEEEproof} We have \begin{align*} & \phi_1^{'}({\boldsymbol x} ,{\boldsymbol y} ; \ell) - \Delta\phi_{0}^{'}({\boldsymbol x},{\boldsymbol y}; t) \\ & = \sum_{k=1}^{t} x_{i_k} \oplus y_{i_k} + \sum_{k=t+1}^{\ell} x_{i_k} \oplus y_{i_k+1} = d_\mathsf{H} (f_\ell({\boldsymbol x}), f_\ell({\boldsymbol y}^{[i_{t+1}]})). \end{align*} Since ${\delta'_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y})$ is obtained by the minimization of this expression with respect to $t$, we get ${\delta'_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y}) = d_\mathsf{H} (f_\ell({\boldsymbol x}), f_\ell({\boldsymbol y}^{[i_{t^{*}+1}]}))\leq d_\mathsf{H} (f_\ell({\boldsymbol x}), f_\ell({\boldsymbol y}^{[i_{t'+1}]}))=d_\mathsf{H} (f_\ell({\boldsymbol x}), f_\ell({\boldsymbol y}^{[{\imath_{\mathsf{d}}}]}))$, where $t'$ is the unique index such that $i_{t'}< {\imath_{\mathsf{d}}}\leq i_{t'+1}$. From this the statement follows. \end{IEEEproof} \begin{definition} \label{Def:SCmatch} Let ${\boldsymbol x} \in \mathbf{\Sigma}^n$, and let ${\boldsymbol y} \in \mathbf{\Sigma}^{n+1}$ be taken from some offset in ${\mathbf Y}$. We say that ${\boldsymbol y}$ {\em \textbf{matches}} ${\boldsymbol x}$ if ${\delta'_\mathsf{s.c}} ({\boldsymbol x}, {\boldsymbol y})\leq \mathsf{T}$, for some integer distance threshold $\mathsf{T}$. \end{definition} Now, by aligning the read identifier ${\boldsymbol w}^{(i)}$ to ${\mathbf Y}$, each such \emph{match} yields a length-$(n+1)$ candidate $\bar{{\boldsymbol y}}^{(i,j)}$, and all matches form the set $\ \mathrm{Y}^{(i)}$. This view readily captures reads without deletions, which can be modeled as deleting the $(n+1)$-th index of $\bar{{\boldsymbol y}}^{(i,j)}$. \subsection{Generating Sub-Candidates for Each Alignment Candidate} \label{SubSec:SubCandMod} In contrast with the substitutions-only scheme, we now need to account for a deletion in $\bar{{\boldsymbol y}}^{(i,j)}$ before decoding. Toward that, the extended scheme generates a list of sub-candidates $\{\bar{{\boldsymbol y}}^{(i,j)}_s\}$, according to the following procedure. Define $\chi$ to be a global integer tolerance parameter, and denote by $t\in\{0,\ldots,\ell\}$ the value of $t^{*}$ that minimized $\phi_1^{'}- \Delta\phi_{0}^{'}$ in~\eqref{eq:identifier_d} to obtain ${\delta'_\mathsf{s.c}}({\boldsymbol x},\bar{{\boldsymbol y}}^{(i,j)})$. We denote here $[a,b]\triangleq \{a,a+1,\ldots,b\}$, and $(a,b]\triangleq \{a+1,\ldots,b\}$. Then the set $\{\bar{{\boldsymbol y}}^{(i,j)}_s\}$ is defined by all deletion indices $\tau$ that satisfy the following: \begin{align} \tau \in {\cal I}_\chi(t) \triangleq \begin{cases} (i_{t-\chi}, i_{t+\chi+1}] & , \chi < t < \ell - \chi - 1 \\ [1,i_{t+\chi+1}] & , 0\leq t \leq \chi \\ (i_{t-\chi} , n+1] & , \ell - \chi - 1 \leq t \leq \ell \end{cases} , \end{align} that is, all deletions within $2\chi+1$ intervals of the read identifier's indices around $t$, with exceptions at the extremal indices. For $\chi=0 $, i.e. no tolerance, we have ${\cal I}_0(t) = (i_t,i_{t+1}]$, whereas for $\chi \geq \max\{t,\ell-t\}$ we have ${\cal I}_\chi(t) = [1,n+1]$, i.e., $\{\bar{{\boldsymbol y}}^{(i,j)}_s\}=\mathrm{D}_1(\bar{{\boldsymbol y}}^{(i,j)})$, where $\mathrm{D}_1(\cdot)$ denotes the single-deletion ball. It is motivated to use $\chi>0$ because due to substitutions, the true deletion index in $\bar{{\boldsymbol y}}^{(i,j)}$ may fall outside its estimated interval defined by $t$. The value of $\chi$ controls the number of vectors qualifying to recover ${\boldsymbol x}^{(i)}$ by inner-code decoding, and it may be set to best balance successful recovery from the proper alignments with effective rejection of false candidates. \subsection{Inner-code Decoding with Multiple Sub-Candidates} \label{SubSec:InnerMod} Recall from Section~\ref{subsec:coding_scheme} that in the substitutions-only scheme each candidate $\bar{{\boldsymbol y}}^{(i,j)}$ is passed to inner-code decoding and validation. Now with deletions, we need to decode and validate a {\em set of sub-candidates} $\{\bar{{\boldsymbol y}}^{(i,j)}_s\}$. To see how this should be done, we note the following observation. \vspace*{-1.5ex} \begin{observation} \label{obs:ErrRegion} Let ${\boldsymbol z}^{[k]} \in \mathrm{D}_1({\boldsymbol z})$, and let ${\boldsymbol x} = {\boldsymbol z}^{[{\imath_{\mathsf{d}}}]}$. Then, for $e_i \triangleq {\boldsymbol z}_i \oplus {\boldsymbol z}_{i+1}$, \vspace*{-1.5ex} \begin{align*} {\boldsymbol x}_i \oplus {\boldsymbol z}_i^{[k]} = \begin{cases} 0 & , i<\min(k,{\imath_{\mathsf{d}}}) \text{ or } i\geq\max(k,{\imath_{\mathsf{d}}}) \\ e_i & , \text{otherwise} \end{cases}. \end{align*} \end{observation} This means that if ${\imath_{\mathsf{d}}}$ is the actual deletion index and $k$ is the one chosen for some sub-candidate, this mismatch may introduce errors only in the region between those two indices, defined as the \emph{error region}, as illustrated in Fig.~\ref{Fig:DelBallDec}. \begin{figure}[h!] \centering \includegraphics[width=0.65\linewidth]{figures/DeletionBallDecoding.png} \caption{Illustration of the error regions (in red) for different vectors within a deletion ball, where ${\boldsymbol x} = {\boldsymbol z}^{(5)}$. } \label{Fig:DelBallDec} \end{figure} By introducing substitutions to ${\boldsymbol x}$, an i.i.d set $\delta_i \sim \text{Bern}(p)$ is simply added to ${\boldsymbol x}_i \oplus {\boldsymbol z}_i^{[k]}$, where typically $p \ll 1/2$. Hence it is likely that for the proper alignment of ${\boldsymbol x}^{(i)}$ multiple sub-candidates with deletion indices close to ${\imath_{\mathsf{d}}}$ will correctly decode to ${\boldsymbol x}^{(i)}$. This motivates the following treatment of $\{\bar{{\boldsymbol y}}^{(i,j)}_s\}$ in the modified scheme. For every candidate $\bar{{\boldsymbol y}}^{(i,j)} \in \mathrm{Y}^{(i)}$: (i.) Decode and validate every sub-candidate ${\boldsymbol u}\in \{\bar{{\boldsymbol y}}^{(i,j)}_s\}$, (ii.) store any ${\boldsymbol v}$ that was successfully decoded and validated, and the number of its appearances $A({\boldsymbol v})$ along the decoding instances in $\{\bar{{\boldsymbol y}}^{(i,j)}_s\}$, (iii.) apply a majority rule \begin{align} \label{Eq:Majority} \mathsf{Maj}({\cal V}) = \begin{cases} {\boldsymbol v}^* & , \forall {\boldsymbol v} \in {\cal V} \setminus \{{\boldsymbol v}^* \}: A({\boldsymbol v}^*) > A({\boldsymbol v}) \\ \emptyset & , \text{there exist no such } {\boldsymbol v}^* \end{cases} . \end{align} From this point, ${\boldsymbol v}^*$ takes the place of ${\boldsymbol v}$ as defined in the decoding of Construction~\ref{cons:GenCons}, and the rest of the decoding process is unaltered. Note that the encoding process is also unchanged. The modified decoding process is summarized in Algorithm~\ref{Alg:Cons1ModDec}. The derivation of outer channel probabilities can be done similarly to the analysis in Section~\ref{Sec:SchemeAnalysis}. \begin{algorithm}[h!] \SetAlgoLined \textbf{Input}: ${\cal E}\left(\{{\boldsymbol x}^{(i)}\}_{i=1}^M\right), {\mathbf Y}, \mathsf{H}_1,\bar{\mathsf{H}}_2,\mathsf{H}_\mathsf{c}, {\mathbf H}_{\mathsf{o}}$ \\ \For{$1\leq i \leq M$}{ Align ${\boldsymbol w}^{(i)}$ over ${\mathbf Y}$, and form $\mathrm{Y}^{(i)}$\\ Set $\text{'found'} \gets 0$ \\ \For(\tcp*[h]{Inner Decoding}){$1 \leq j \leq |\mathrm{Y}^{(i)}|$}{ Set ${\cal V} = \emptyset$ \\ \For{every ${\boldsymbol u} \in \{\bar{{\boldsymbol y}}^{(i,j)}_s\}$}{ Decode ${\boldsymbol v} = {\cal D}_1({\boldsymbol u}_{{\cal I}},{\boldsymbol s}^{(i)}_1)$ \\ Calculate $\hat{{\boldsymbol s}}^{(i)}_2 = \bar{\mathsf{H}}_2 {\boldsymbol v}^T$ \\ \If(\tcp*[h]{Validation}){$\hat{{\boldsymbol s}}^{(i)}_2 = {\boldsymbol s}^{(i)}_2$}{ ${\cal V} \gets {\cal V} \cup \{{\boldsymbol v}\}$\\ $A({\boldsymbol v}) = A({\boldsymbol v}) + 1$ } } ${\boldsymbol v}^* = \mathsf{Maj}({\cal V})$ (Eq.~\ref{Eq:Majority}) \\ \If(\tcp*[h]{Appropriate candidate}){${\boldsymbol v}^* \neq \emptyset$}{ \eIf{$\text{'found'}=0$}{ Calculate ${\boldsymbol b}^{(i)} = \mathsf{H}_{\mathsf{c}}({\boldsymbol v}^*)^T$\\ Set $\text{'found'} \gets 1$ \\ }(\tcp*[h]{More Than One Candidate}){ Set ${\boldsymbol b}^{(i)} = \bigotimes$, break } } } \If(\tcp*[h]{No Candidates}){$\text{'found'}=0$}{Set ${\boldsymbol b}^{(i)}=\bigotimes$} } \tcp*[h]{Outer Decoding} \\ Decode $\hat{\underline{{\boldsymbol a}}} = {\cal D}_{\mathsf{o}}(\underline{{\boldsymbol b}},{\mathbf S})$, where $\underline{{\boldsymbol b}} = [{\boldsymbol b}^{(1)},\dots,{\boldsymbol b}^{(M)}]$\\ \For(\tcp*[h]{Inverse Mapping}){$1 \leq i \leq M$}{ Map $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)}={\cal F}_{\mathsf{H}}([{\boldsymbol s}^{(i)},\hat{{\boldsymbol a}}^{(i)}])$ \\ Reconstruct $\hat{{\boldsymbol x}}^{(i)}$ from $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)} , {\boldsymbol w}^{(i)}$ } \textbf{Output}: $\{\hat{{\boldsymbol x}}^{(i)}\}_{i=1}^{M}$ \caption{Decoding Construction \ref{cons:GenCons} with Deletions} \label{Alg:Cons1ModDec} \end{algorithm} \vspace{-2.5ex} \subsection{Analysis of Alignment Performance} We now evaluate the probability that a sub-sequence ${\boldsymbol y}$ matches ${\boldsymbol x}$ (Definition~\ref{Def:SCmatch}) for proper and improper alignments. \vspace*{-3ex} \begin{lemma} The probability $\cQ_\mathsf{a.s}^\mathsf{(p)}$ of the proper alignment being found satisfies $ \cQ_\mathsf{a.s}^\mathsf{(p)} \geq \mathsf{F_b}(\ell,p,\mathsf{T}) = Q_\mathsf{a.s}^\mathsf{(p)} $. \end{lemma} \vspace*{-1ex} \begin{IEEEproof} Let $1\leq {\imath_{\mathsf{d}}} \leq n+1$ be the index in which the deletion occurred in ${\boldsymbol y}$. Let ${\boldsymbol z}$ be the word obtained from ${\boldsymbol y}$ by a deletion in ${\imath_{\mathsf{d}}}$ and no substitutions. By Lemma~\ref{Lem:deloctUB} we have \begin{align*} P({\delta'_\mathsf{s.c}}({\boldsymbol x},{\boldsymbol y}) \leq \mathsf{T}) \geq P(d_{\mathsf{H}}(f_\ell({\boldsymbol x}),f_\ell({\boldsymbol z})) \leq \mathsf{T}). \end{align*} By definition, ${\boldsymbol x},{\boldsymbol z}$ are related through the substitution channel alone, hence $P(d_{\mathsf{H}}(f_\ell({\boldsymbol x}),f_\ell({\boldsymbol z})) \leq \mathsf{T}) = \mathsf{F_b}(\ell,p,\mathsf{T})$. \end{IEEEproof} \ \\ In Fig.~\ref{Fig:InnedDecStat} we show simulation results of alignment and inner-decoding success probability of the proper alignment for the original (Algorithm~\ref{Alg:Cons1Dec}) and modified (Algorithm~\ref{Alg:Cons1ModDec}) schemes, as a function of the deletion fraction out of the total number of edits. For both curves, we use the same inner code with parameters $[127-\ell,106-\ell,7]$, $\ell=28$, while only modifying the (sub)-candidate selection and the inner-decoding procedures, as described earlier in the section and in Algorithm~\ref{Alg:Cons1ModDec}. It can be seen clearly that the modified scheme can much better handle deletion errors with significant fractions. \vspace*{-3ex} \begin{figure}[H] \centering \includegraphics[width=1\linewidth]{figures/InnerDecStatsShort.eps} \caption{Simulation results of alignment+inner-decoding success probability of the proper alignment for the original and modified schemes.} \label{Fig:InnedDecStat} \end{figure} \vspace*{-3ex} For a simplified calculation of improper-alignment probability, we neglect sub-sequences overlapping with the proper alignment, as for large $L$ these are rare cases. Then, the analysis of Theorem~\ref{Th:RandomDistance} fully captures the misalignment probability, with the threshold $\mathsf{T}$. \vspace*{-2ex} \begin{lemma} The probability $\cQ_\mathsf{a.s}^\mathsf{(i.p)}$ of an improper alignment being randomly accepted satisfies \begin{align*} \cQ_\mathsf{a.s}^\mathsf{(i.p)} \simeq P(R_{\ell} \leq \mathsf{T}) . \end{align*} \end{lemma} \subsection{Inner Decoding Analysis} \label{SubSec:ModInnerAnalysis} For the inner-decoding probabilities, we define similar probabilities $\cP_{\mathsf{miv}},\cP_{\mathsf{suc}},\cP_{\mathsf{f.a}},\cP_{\mathsf{rej}}$, as in Definitions~\ref{Def:MivProb},~\ref{Def:InnerProb}, but apply them to ${\boldsymbol v}^*$ from Algorithm~\ref{Alg:Cons1ModDec} instead of the original ${\boldsymbol v}$. By doing so, we take into account the majority rule result for each set of sub-candidates. \begin{lemma} The modified misvalidation probabilities satisfy: \begin{align*} \cP_{\mathsf{miv}}^{(\mathsf{i.p})} \leq \frac{V_{n_{\ell}}(t_1)\cdot (n_{\ell}+1)}{2^{n+1-k_2}} = \frac{n_{\ell}+1}{2}\cdot P_{\mathsf{miv}}^{(\mathsf{i.p})} , \cP_{\mathsf{miv}}^{(\mathsf{p})} \lesssim \cP_{\mathsf{miv}}^{(\mathsf{i.p})} . \end{align*} \end{lemma} \begin{IEEEproof} A necessary condition for misvalidation is that in the single-deletion ball around ${\boldsymbol y}\in\mathbf{\Sigma}^{n+1}$ there is a word in ${\cal C}_2^{[*]}(t_1,{\boldsymbol v})$ ($*$ represents some particular coset of ${\cal C}_2$; recall definition from~\eqref{Eq:C1MivCandidates}). Equivalently, ${\boldsymbol y}$ is in the single-insertion ball of at least one vector in ${\cal C}_2^{[*]}(t_1,{\boldsymbol v})$. Hence the number of such ${\boldsymbol y}$ vectors is upper bounded\footnote{The actual number may be smaller due to overlaps between the insertion balls.} by $\left|{\cal C}_2^{[*]}(t_1,{\boldsymbol v}) \right| \cdot \left| \mathrm{I}_1({\boldsymbol v}) \right|$. Normalizing by the number of ${\boldsymbol y}$ vectors $ 2^{n_\ell+1}$ and substituting $\left| \mathrm{I}_1({\boldsymbol v}) \right|=n_\ell+1$ we get the first statement. The second statement follows from the same arguments as in Lemma~\ref{Lem:Pmiv}. \end{IEEEproof} \begin{lemma} The following hold for the modified inner decoding probabilities: \begin{align*} \cP_{\mathsf{suc}}^{(\mathsf{p})} & \simeq \mathsf{F_b}(n_\ell,p,t_1) , \cP_{\mathsf{suc}}^{(\mathsf{i.p})} \simeq \mathsf{F_b}(n_\ell,1/2,t_1) , \\ \cP_{\mathsf{f.a}}^{(\mathsf{x})} & \simeq \left(1-\cP_{\mathsf{suc}}^{(\mathsf{x})}\right)\cdot \cP_{\mathsf{miv}}^{(\mathsf{x})} , \\ \cP_{\mathsf{rej}}^{(\mathsf{x})} & \simeq \left(1-\cP_{\mathsf{suc}}^{(\mathsf{x})}\right)\cdot (1-\cP_{\mathsf{miv}}^{(\mathsf{x})}) . \end{align*} \end{lemma} \begin{IEEEproof} Similar considerations as in Lemma~\ref{Lem:Pinner} are used, with modification of the misvalidation probability to $\cP_{\mathsf{miv}}$. \end{IEEEproof} Calculating the outer channel probabilities can now be done as in Section~\ref{Sec:SchemeAnalysis}, using the modified probabilities. \section{Compression Cost Modeling} \label{Sec:Latency} The main advantage of the proposed compression scheme is its simple encoding operations, which suit deployment on systems where the transmitter-side hardware is limited in resources. To better understand and evaluate this potential advantage, in this section we define a simple model for three central performance figures: total communication and computation costs, latency, full-delivery time and storage cost. The model is extremely simplified, provided for the purpose of high-level comparison of compression methods, and not for comparing specific compression tools. \subsection{Three Processing Steps} A compressor processes $n$-symbol reads from a genome sequence of $L$ symbols. The processing pipeline comprises three steps: 1) sequencing, 2) encoding, and 3) transmission. Sequencing is the operation of accumulating reads output from the sequencer; encoding is the operation of mapping reads to a compressed format; transmission is the operation of sending the encoded reads to the remote site. Following the third step, the reads become available to the receiver (after decompression), and the transmitter may discard the reads. \subsection{Total Compression Costs} Firstly, we want to measure the total costs of communication and computation expended by the compressing node. Let $G$ be the {\em total number of reads} sequenced from the genome sequence. $ c \triangleq nG/L$ is commonly called the {\em sequencing coverage}. The total {\em communication cost} of the compression scheme in units of read transmissions is $G{\cal R}$, where ${\cal R}$ is the compression rate. For the {\em computation cost}, we define $\alpha\geq 1$ as the average number of times a read is accessed by the encoder during runtime. This gives a simple access-based model for the total computation cost (in units of read accesses) of \begin{equation} \label{Eq:computation} c_{\mathsf{tot}} = G\alpha. \end{equation} \subsection{Compression Latency and Delivery Time}\label{Sub:latency} Next, we want to evaluate the compression latency, defined as the time from starting the sequencing until all reads are delivered to the remote node. Each compressor has an {\em input block-size} parameter $C$ counting the number of reads it accumulates before starting compression. Then the duration of the sequencing step is $\ibsizet_{\mathsf{S}}$, where $t_{\mathsf{S}}$ is the time to sequence a single read. The {\em compressed block size} is $b=C{\cal R}$. The duration of the transmission step is $\cbsizet_{\mathsf{T}}$, where $t_{\mathsf{T}}$ is the time to transmit a single (uncompressed) read. The duration of the encoding step can be obtained using the simple access-based model with the parameter $\alpha$ as $C\alphat_{\mathsf{A}}$, where $t_{\mathsf{A}}$ is the time to access a single read in memory. Since these three durations need to happen in series, summing them up gives the compression latency of a single input block \begin{equation} \label{Eq:b_latency} t_{\mathsf{B}} = C(t_{\mathsf{S}} + \alphat_{\mathsf{A}}) + \cbsizet_{\mathsf{T}}. \end{equation} The full-delivery time, measured between starting the sequencing and completing the transmission of the last compressed read, depends on the value of $t_{\mathsf{B}}$, but also on the number of input blocks $G/C$. Since the three processing steps (sequencing, encoding, transmission) can run in parallel to each other (on different blocks), the full-delivery time equals \begin{equation} \label{Eq:latency} t_{\mathsf{tot}} = t_{\mathsf{B}} + (G/C-1) \max(\ibsizet_{\mathsf{S}}, C\alphat_{\mathsf{A}}, \cbsizet_{\mathsf{T}}). \end{equation} The full-delivery time equals the latency of one block (first term), plus the duration of the longest step for $G/C-1$ additional blocks (second term). The durations of the two other steps are embedded in parallel to this interval, thus their times are not added to the full-delivery time -- see example in Fig~\ref{Fig:ParallelTime}. \subsection{Storage Cost} Another potentially scarce resource is the storage space needed to execute the read compression. A compressor uses a size $S$ space (in units of read size) to hold side information populated before sequencing began. A common use of this space is for storing {\em reference genomes}. In addition, space is needed to operate the three processing steps, and its size depends on the block sizes specified in Section~\ref{Sub:latency}. This processing storage cost is additive in the block sizes of the three steps, because an input buffer and a transmission buffer need to be maintained while compressing an encoder buffer. In practice, when the different steps are performed in parallel (as assumed in Section~\ref{Sub:latency}), the buffers may need to be duplicated, but we neglect this factor here. Moreover, when consecutive inner block are processed independently, the different processing stages may be performed in parallel. In this case, the encoding and transmission buffers should be duplicated. We can thus model the total storage cost as \begin{equation} \label{Eq:storage} s_{\mathsf{tot}} = S + \pi(C + b), \end{equation} where $\pi = 1$ when there is no parallel processing of different blocks (i.e. when all reads need to be sequenced before encoding), and $\pi=2$ otherwise. \subsection{Sample Compression Methods} In this sub-section we compare costs for three common methods for DNA compression: \begin{enumerate} \item Reference-free compression with read clustering \item Alignment to a reference at the encoder \item Our proposed scheme \end{enumerate} For each compression method, we give a brief description and pick values for the variables defined above. \subsubsection{Reference-free compression with read clustering} Compressors following this method, e.g.~\cite{sps34,sps39}, have a large input block of $C_1=cL/n = G$. The parameter $\alpha_1$ depends on the compressor used for the individual bins. Finally, no side information is used, hence $S_1 = 0$. \subsubsection{Alignment to a reference at the encoder} Compression with a reference at the encoder, e.g.~\cite{sps40}, aligns each read individually to the reference, and sends a pointer to the alignment location alongside an encoding of the difference between the read and the reference. In this method the input and encoding block sizes are as small as one read, i.e., $C_2=1$. However, the running-time parameter is huge: $\alpha_2=L$, due to the need to slide the read on the entire reference genome. We note that $C_2\alphat_{\mathsf{A}}$ will almost always attain the maximum in~\eqref{Eq:latency}. Finally, we have $S_2=L$ and $\pi=2$. \subsubsection{Our proposed scheme} In the method proposed in this paper we have $C_3 = M$. Each read is accessed exactly twice during encoding: first for inner encoding and second for outer encoding (both of these operations are simple matrix-vector products), hence $\alpha_3=2$. In this method there is not side-information storage cost, i.e. $S_3=0$, and $\pi = 2$. An illustration of the parallel processing of 4 input-blocks is shown in Fig~\ref{Fig:ParallelTime} for the case of $j^* = \mathsf{S}$. \begin{figure}[H] \centering \includegraphics[width=1\linewidth]{figures/TimingSchematic2.eps} \caption{Illustration of parallel processing of 4 input-blocks.} \label{Fig:ParallelTime} \end{figure} An example of latency and storage cost comparison between the different methods is shown in Fig~\ref{Fig:TimingComp} and Fig~\ref{Fig:StorageComp}, respectively, for $t_{\mathsf{S}} = 1, t_{\mathsf{A}} = 0.8, t_{\mathsf{T}} = 0.5 , {\cal R} = 0.3, L = 25\cdot 10^6, c = 50$. Since the reference-based method latency is huge with respect to reference-free method and to our scheme (due to the huge running-time parameter $\alpha_2=L$), it is omitted from Fig~\ref{Fig:TimingComp}, and only the latter are shown as a function of the reference-free running-time parameter $\alpha_1$. \vspace*{-1ex} \begin{figure}[H] \centering \includegraphics[width=1\linewidth]{figures/TimingCompareNewV3.eps} \caption{Latency comparison as a function of $\alpha_1$.} \label{Fig:TimingComp} \end{figure} \vspace*{-3ex} \begin{figure}[H] \centering \includegraphics[width=1\linewidth]{figures/StorageCompare.eps} \caption{Storage cost comparison.} \label{Fig:StorageComp} \end{figure} \vspace*{-2ex} \section{Further Extensions and Future Work} \label{Sec:Future} \subsection{Systematic Algebraic Code Construction} \label{SubSec:AlgCons} In order to practically realize the coding scheme in Construction~\ref{cons:GenCons}, providing the performance analyzed in Section~\ref{Sec:SchemeAnalysis}, we need: (i) practical linear block codes with known correction capability, efficient encoding and decoding algorithms and the ability to form a nested pair, (ii) specific complementary matrix ensuring $\mathsf{H}$ of full-rank, and (iii) efficient realization of the mapping ${\cal F}_{\mathsf{H}}$. In this section we propose a practial systematic construction, based on efficient algebraic codes (providing requirement (i)). We show that the systematic structure immediately provides requirments (ii) and (iii). We first note that forming a nested set using systematic codes is a challenging task, due to the structure forced by the identity matrix within the parity-check matrix. We will now show that by using binary \textit{BCH} algebraic codes, this can be solved. We begin with some important results regarding the syndromes of such codes. For $j\in\{1,2\}$ let ${\cal C}_j = \mathsf{BCH}(n,k_j,2t_j+1)$ be a $[n,k_j]$ binary \textit{BCH} code that can correct up to $t_j$ errors, such that $k_1 \geq k_2$. Let ${\boldsymbol z} = (z_0,z_1,\dots,z_{n-1}) \in {\mathbf{\Sigma}}^n$ be a word with $n = 2^m - 1 $ for some integer $m$. The \emph{algebraic syndrome} is defined as follows~\cite{sps27}. \begin{definition} \label{Def:AlgSyndrome} For every $x \in \mathsf{GF}(2^m)$ let $f_{{\boldsymbol z}}(x) \triangleq \sum_{i=0}^{n-1} z_i x^{i}$. Let $\alpha$ be the primitive element of $\mathsf{GF}(2^m)$. Then, the \textbf{\emph{algebraic syndrome}} of ${\boldsymbol z}$ is defined by \begin{equation*} \underline{{\boldsymbol s}}({\boldsymbol z}) = \left[f_{{\boldsymbol z}}(\alpha),f_{{\boldsymbol z}}(\alpha^2),\dots, f_{{\boldsymbol z}}(\alpha^{2t})\right] . \end{equation*} \end{definition} \begin{observation}\textbf{(Nested syndromes)} Let $\underline{{\boldsymbol s}}_1({\boldsymbol z}),\underline{{\boldsymbol s}}_2({\boldsymbol z})$ be the algebraic syndromes of ${\boldsymbol z}$ with respect to ${\cal C}_1,{\cal C}_2$ respectively. Then, the first $2t_1$ elements of $\underline{{\boldsymbol s}}_2({\boldsymbol z})$ are equal to $\underline{{\boldsymbol s}}_1({\boldsymbol z})$. \end{observation} \begin{lemma} Let ${\boldsymbol s}_j = \mathsf{H}_j {\boldsymbol z}^T \in {\mathbf{\Sigma}}^{n-k_j}$ be the binary syndrome of ${\boldsymbol z}$ with respect to ${\cal C}_j$. Then, it follows that $\underline{{\boldsymbol s}}_j(\textbf{0}{\boldsymbol s}_j) = \underline{{\boldsymbol s}}_j({\boldsymbol z})$, where $\textbf{0}{\boldsymbol s}_j \triangleq [0,\dots,0,{\boldsymbol s}_j]$ of length $n$. \end{lemma} \begin{IEEEproof} Let us look at the follwoing parity-check matrix \begin{align*} \mathsf{H}'_j = \begin{bmatrix} 1 & \alpha^1 & \alpha^2 & \dots & \alpha^n \\ 1 & (\alpha^2)^1 & (\alpha^2)^2 & \dots & (\alpha^2)^n \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & (\alpha^{2t_j})^1 & (\alpha^{2t_j})^2 & \dots & (\alpha^{2t_j})^n \end{bmatrix} , \end{align*} where the elements are taken as their binary representations. It is known that this matrix defines the binary \textit{BCH} code ${\cal C}_j$, except not in a systematic form~\cite{sps27}. Therefore, $\mathsf{H}_j$ and $\mathsf{H}'_j$ induce the same set of linear equations, implying there is a linear transformation matrix $T_j$ such that $\mathsf{H}_j = T_j \mathsf{H}'_j$. Now, by the systematic form of $\mathsf{H}_j$, it is clear that $\mathsf{H}_j {\boldsymbol z}^T = \mathsf{H}_j (\textbf{0}{\boldsymbol s}_j)^T = {\boldsymbol s}_j$. Hence, we get \begin{align} \label{Eq:AlgSyndEqual} \mathsf{H}'_j {\boldsymbol z}^T = T_j \mathsf{H}_j {\boldsymbol z}^T = T_j \mathsf{H}_j (\textbf{0}{\boldsymbol s}_j)^T = \mathsf{H}'_j (\textbf{0}{\boldsymbol s}_j)^T . \end{align} Finally, since the addition of elements in $\mathsf{GF}(2^m)$ is equivalent to bitwise addition (XOR-ing) of their binary representation vectors, it can be seen that the structure of $\mathsf{H}'_j$ is directly related to the algebraic syndrome, as we can write \begin{align*} \mathsf{H}'_j \begin{bmatrix} z_0 \\ z_1 \\ \vdots \\ z_{n-1} \end{bmatrix} = \sum_{i=0}^{n-1} z_i \begin{bmatrix} \alpha^i \\ (\alpha^2)^i \\ \vdots \\ (\alpha^{2t_j})^i \end{bmatrix} = \begin{bmatrix} \sum_{i=0}^{n-1} z_i (\alpha^{1})^i \\ \sum_{i=0}^{n-1} z_i (\alpha^2)^i \\ \vdots \\ \sum_{i=0}^{n-1} z_i (\alpha^{2t_j})^i \end{bmatrix} , \end{align*} in which the $i$-th row exactly correspond to the $i$-th element of the algebraic syndrome, meaning $\mathsf{H}'_j {\boldsymbol z}^T = \underline{{\boldsymbol s}}({\boldsymbol z})$ (in binary representation). Combining with Equation~(\ref{Eq:AlgSyndEqual}), we get $\underline{{\boldsymbol s}}({\boldsymbol z}) = \underline{{\boldsymbol s}}(\mathbf{0}{\boldsymbol s}_j)$, completing the proof. \end{IEEEproof} \begin{remark} Although the binary syndrome ${\boldsymbol s}_1$ is \textbf{not} nested in ${\boldsymbol s}_2$, the nesting property of the algebraic syndromes, along with the abilty to directly evaluate these algebraic syndromes from the binary syndromes enable the systematic construction. \end{remark} We can now introduce the systematic construction. Every following result derived for Construction~\ref{cons:GenCons} is true for this construction as well. \begin{construction} \label{cons:SysCons} Let ${\cal C}_j=\mathsf{BCH}(n-\ell,k_j-\ell,2t_j+1)$ as defined above, shortened from corresponding $(n,k_j,2t_j+1)$-codes. Let $\mathsf{H}_\mathsf{c} = [{I}_{k_2-\ell},\textit{0}]$, where ${I}_{k_2-\ell}$ denotes the identity matrix, and $\textit{0}$ denotes an all-zeros matrix of size $(k_2-\ell) \times (n-\ell)$. This matrix is clearly linearly independent on the parity-check matrix $\mathsf{H}_2$ since it constraints zero entires to the information bits which are unconstrained in a systematic code, thus making $\mathsf{H}$ a full-rank matrix as required. Let ${\cal C}_{\mathsf{o}} = \mathsf{RS}(M,k_{\mathsf{o}})$, where $\mathsf{RS}$ denotes a Reed-Solomon code, which is maximum-distance seperable (MDS) \cite{sps27}, with well-known efficient algebraic decoders for erasures and errors (e.g. Berlekamp-Massey decoder with Foreny syndromes \cite{sps26}). This code can be taken over $\mathsf{GF}(2^{\mu})$, by partitioning $\nu$ into $\nu / \mu$ sections and encoding each section separately. Based on these properties, we can now use these codes as in Construction \ref{cons:GenCons} with small modifications to the decoder: \begin{itemize} \item Calculate $\underline{{\boldsymbol s}}_1(\textbf{0}{\boldsymbol s}_1^{(i)})$, and decode $\bar{{\boldsymbol y}}^{(i,j)}$ using \emph{algebraic decoder} within the coset of this syndrome. \item Instead of calculating the binary $\hat{{\boldsymbol s}}_2^{(i)}$, calculate the algebraic syndrome $\underline{{\boldsymbol s}}_2({\boldsymbol v})$, and compare its last $2(t_2-t_1)$ elements to the same elements in $\underline{{\boldsymbol s}}_2(\textbf{0}{\boldsymbol s}_2^{(i)})$ for validation (the first elements are always equal due to the decoding process). Note that the nesting of $\underline{{\boldsymbol s}}_1(\textbf{0}{\boldsymbol s}_1^{(i)})$ in $\underline{{\boldsymbol s}}_2(\textbf{0}{\boldsymbol s}_2^{(i)})$, achieved by transforming to the algebraic syndromes, enables this systematic decoding-validation process. \item Finally, the mapping ${\cal F}_{\mathsf{H}}([{\boldsymbol s}^{(i)},\hat{{\boldsymbol a}}^{(i)}])$ is realized by encoding $\hat{{\boldsymbol a}}^{(i)}$ using ${\cal C}_2$ to obtain a codeword ${\boldsymbol c}$, and then calculating $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)} = {\boldsymbol c} + \textbf{0}{\boldsymbol s}^{(i)}$. This simple realization is possbile since: (i) the structure of $\mathsf{H}_\mathsf{c}$ promise that $\hat{{\boldsymbol a}}^{(i)}$ is exactly the first $(k_2-\ell)$ bits ('information' bits) in $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)}$, (ii) the systematic code ${\cal C}_2$ keeps the information bits unaltered in ${\boldsymbol c}$, and (iii) the addition of $\textbf{0}{\boldsymbol s}^{(i)}$ shifts ${\boldsymbol c}$ to the single word in the coset of ${\cal C}_2$ with syndrome ${\boldsymbol s}^{(i)}$ with 'information' bits $\hat{{\boldsymbol a}}^{(i)}$, which is exactly $\hat{{\boldsymbol x}}_{{\cal I}}^{(i)}$. \end{itemize} \end{construction} \subsection{Multiple Deletions Compensating Measure} \vspace*{-0.5ex} It is possible to extend the shift compensating distance to deal with multiple deletions. \vspace*{-2ex} \begin{definition} Let ${\boldsymbol x} \in \mathbf{\Sigma}^n , {\boldsymbol y} \in \mathbf{\Sigma}^{n+r}$, and let \vspace*{-3ex} \begin{align*} \underline{t}^* & = \argmax_{\underline{t} \in \mathsf{S}(r,n)} \left\lbrace \sum_{j=0}^{r-1} \Delta\phi_j ({\boldsymbol x},{\boldsymbol y}; t_j) \right\rbrace , \\ \mathsf{S}(r,n) & = \left\lbrace \underline{t} = (t_0, \right. \left. t_1, \dots,t_{r-1}) \in (\mathbb{Z}_0^{+})^r \right| \\ & \qquad \qquad \left. 1\leq t_0 < t_1 < \dots < t_{r-1} \leq n \right\rbrace . \end{align*} The \textbf{shift compensating distance of order $r$} is defined by \vspace*{-3ex} \begin{align*} {\delta_\mathsf{s.c}^{(r)}} ({\boldsymbol x},{\boldsymbol y}) & \triangleq \phi_r({\boldsymbol x},{\boldsymbol y};n) - \sum_{j=0}^{r-1} \Delta\phi_j ({\boldsymbol x},{\boldsymbol y}; t_j^*) . \end{align*} \end{definition} \vspace*{-1ex} It is noted that a greedy approach can be employed, that is for every $1 \leq j \leq n$ \vspace*{-3ex} \begin{align*} \tilde{t}^*_j = \argmax_{t : \ t_{j-1} < t \leq n} \left\lbrace \Delta\phi_j ({\boldsymbol x},{\boldsymbol y},t) \right\rbrace , \end{align*} where $t_0 = 0$. Under reasonable conditions (e.g. small substitution probability, non-consecutive deletions), it is expected that $\underline{\tilde{t}} = \underline{t}$. Such a greedy approach can be highly advantageous over other metrics since it can be computed in linear time. An exact analysis of the conditions for the greedy approach to match the optimal one is outside the scope of this work. \vspace*{-1ex} \begin{definition} Let ${\boldsymbol x},{\boldsymbol y} \in \mathbf{\Sigma}_n^{n+r}$, for some $r\geq0$. Let $\rho \triangleq \left| |{\boldsymbol y}|-|{\boldsymbol x}| \right|$. Then, the shift compensating distance of order $r$ is defined by \vspace*{-4ex} \begin{align*} d_\mathsf{s.c}^{(r)} ({\boldsymbol x},{\boldsymbol y}) \triangleq \begin{cases} d_{\mathsf{H}}({\boldsymbol x},{\boldsymbol y}) & , |{\boldsymbol x}|=|{\boldsymbol y}| \\ {\delta_\mathsf{s.c}^{(\rho)}} ({\boldsymbol x}, {\boldsymbol y}) & , |{\boldsymbol x}| < |{\boldsymbol y}| \\ {\delta_\mathsf{s.c}^{(\rho)}} ({\boldsymbol y}, {\boldsymbol x}) & , |{\boldsymbol x}| > |{\boldsymbol y}| . \end{cases} \end{align*} \end{definition} \subsection{Modifying To Single-Insertion} In this sub-section we briefly describe the slight modifications needed to adapt the single-deletion scheme to a single-insertion scheme. The basis for this adaptation is in the fact that an insertion made in the read is equivalent to a deletion made in the reference. For alignment with insertion in the read it is natural to reverse the roles of the read and reference in the shift compensating distance, i.e. using $\mathsf{d_{s.c}}({\boldsymbol x},{\boldsymbol y}) = {\delta_\mathsf{s.c}}({\boldsymbol y},{\boldsymbol x})$ (when $|{\boldsymbol x}| > |{\boldsymbol y}|$). Nevertheless, since only the read identifier of ${\boldsymbol x}$ is sent to the decoder for alignment, it is in general not possible since the consecutive indexes following the read identifier's indexes are not available. Therefore, another modification must be used. For that, we define \begin{align*} \phi_{-1}({\boldsymbol x},{\boldsymbol y};t) \triangleq \sum_{i=2}^{t+1} x_i \oplus y_{i-1} , \end{align*} directly inherited from Definition~\ref{Def:CumHamDist}. We can now use $\Delta \phi_{-1} ({\boldsymbol x},{\boldsymbol y};t) \triangleq \phi_0({\boldsymbol x},{\boldsymbol y};t) - \phi_{-1}({\boldsymbol x},{\boldsymbol y};t)$ to employ an shift compensating distance, suitable for non-consecutive indexes, as was done in section~\ref{SubSec:AlignMod}. For inner decoding we use the insertion ball $\mathrm{I}_1(\bar{{\boldsymbol y}}^{(i,j)})$ of every candidate $\bar{{\boldsymbol y}}^{(i,j)} \in \mathrm{Y}$, as a substring of ${\mathbf Y}$ of length $n-1$. From this point, the same decoding process as described in Section~\ref{SubSec:InnerMod} is performed. \vspace*{-1.5ex} \subsection{Future Work} \vspace*{-0.5ex} As some interesting topics for future research, we suggest the following unaddressed problems: \begin{enumerate} \item Adapting the scheme to optimally suit more complex statistical models of realistic genomic sequences. \item Developing an efficient algorithm for the calculation of the shift-compensating distance of order $r$, along with semi-metric properties proofs and performance analysis. \item Modifying the scheme to support both single deletion and single insertion errors in different reads. \end{enumerate} \vspace*{-1ex} \section{Conclusions} In this paper we addressed the problem of compressing DNA sequencing reads information, randomly generated from a genome of which a closely similar reference is available at the decoder side. Specifically, we utilized a distributed source coding mechanism, with adaptation enabling an alignment process at the decoder, who lacks the information regarding the position of each reads within the reference. For that, we used read identifiers sent uncoded, and utilized the Cassuto-Ziv generalized error locating code construction, while splitting the inner-code to decoding and validation layers. We further introduced a practical systematic code construction based on algebraic codes. We then analyzed the induced outer channel by defining and examining the decoder's output under each decoding-validation outcome. Next, we modified our scheme to deal with a single deletion error along with substitution errors. For that, we introduced a novel and efficient semi-metric for alignment under a single-deletion multiple-substitutions, and modified the inner decoding process using the deletion ball of each alignment candidate. We then re-analyzed the scheme under this modification. We further supported all complex analysis and computations with simulative results validating our derivations. We ended with modeling and analyzing the practical aspects of compression latency and required storage and demonstrated our scheme's advantage over competing generic reference-free scheme. \vspace*{-1.5ex} \section*{Acknowledgment} The authors would like to thank distinguished Prof. Jacob Ziv for valuable discussions and ideas. \bibliographystyle{IEEEtran}
\section{Introduction} \label{Intro} Let $n$ be a nonnegative integer. A \emph{partition $\pi = (\pi_1, \pi_2, \dots)$ of $n$} is a weakly decreasing list of positive integers whose sum is $n$, and we write $|\pi| = n$ to indicate this. We allow the empty partition as the unique partition of $0$. Each $\pi_i$ is known as a \emph{part} of $\pi$. A standard way to visualize $\pi$ is through its \emph{Ferrers diagram}, which is a collection of left justified rows of boxes, with the $i^\mathrm{th}$ row containing $\pi_i$ boxes. In the present article, it is more convenient to use the notation that expresses the number of parts of each size in a partition. In this notation, we write $\pi = (1^{f_1}, 2^{f_2}, \ldots)$, where $f_i$ is the \emph{frequency} of $i$ or the number of times a part $i$ occurs in $\pi$. Thus, each frequency $f_i$ is a nonnegative integer, and if $f_i = 0$, then $\pi$ has no part of size $i$. When the frequency of a number is 0, it may or may not be omitted in the expression. In the latter notation, it is clear that $|\pi| = \sum_i i \cdot f_i$. Thus $(4,4,2,2,1)$, $(1^1, 2^2, 3^0, 4^2, 6^0)$, and $(1^1, 2^2, 4^2, 5^0)$ all represent the same partition of 13. We let $s(\pi)$ and $l(\pi)$ denote the smallest and largest parts of $\pi$, respectively, and $\mho$ denotes the set of partitions $\pi$ with $|\pi| > 0$. For indeterminates $a$ and $q$, and a positive integer $n$, define $$ (a; q)_n := (1-a)(1-aq) \cdots (1-aq^{n-1}). $$ The central objects of this article are the following series. For positive integers $L$, $s$ and $k$, define \begin{itemize} \item $G_{L,s}(q)$ to be the generating series \begin{equation} G_{L,s}(q) := \sum_{\substack{\pi \in \mho, \\ s(\pi)=s, \\ l(\pi)-s(\pi) \leq L}} q^{|\pi|} - \sum_{\substack{\pi \in \mho, \\ s(\pi) \geq s+1, \\ l(\pi)-s(\pi) \leq L}} q^{|\pi|},\label{GLsq} \end{equation} and \item $H_{L,s,k}(q)$ to be the generating series \begin{equation}\label{eq:hlsk} H_{L,s,k}(q) := \frac{q^s(1-q^k)}{(q^s;q)_{L+1}} - \left(\frac{1}{(q^{s+1};q)_L}-1\right). \end{equation} \end{itemize} A series $\sum_{n \geq 0} a_n q^n$ is said to be \emph{eventually positive} if there exists some $l \in \mathbb{N}$ such that $a_n > 0$ for all $n \geq l$. Berkovich and Uncu conjectured that $H_{L,s,k}(q)$ is a eventually positive for all positive integers triples $L \geq 3$, $s$ and $k \geq s+1$. This conjecture was recently proved independently by Zang and Zeng \cite[Theorem 1.3]{zang} and by the present authors \cite[Section 3]{BR20}. The two proofs are substantially different. While the proof of Zang and Zeng was partly combinatorial and partly analytic, the proof of the present authors was entirely combinatorial. The present authors in fact proved a stronger result. To state this, we need the following notation: \begin{align}\label{eq:defplsgammals} \begin{split} &\bullet\; P_{L,s} = (s+1)(s+2)\ldots(s+L),\\ &\bullet\; \gamma(L,s) = \left(\left(s+1\right)+\left(s+2\right)+\cdots+\left(s+L\right)\right)\\ &\hspace{6.2cm} \cdot \left(P_{L,s}^{\left(P_{L,s}^2-1\right)L+2}+\left(\left(P_{L,s}^2-1\right)L-2\right)P_{L,s}\right),\\ &\bullet\; \Gamma(s) = \gamma(3s+2, s). \end{split} \end{align} The following theorem appears in \cite[Theorem 5]{BR20}. \begin{theorem} \label{Genk} For positive integers $L$, $s$ and $k$, with $L \geq 3$ and $k \geq s+1$, the coefficient of $q^N$ in $H_{L,s,k}(q)$ is positive whenever $N \geq \Gamma(s)$. \end{theorem} We emphasize that Theorem \ref{Genk} is stronger than the conjecture of Berkovich and Uncu about $H_{L,s,k}(q)$ as it explicitly gives the bound for when $H_{L,s,k}(q)$ is positive, and it further states this bound depends only on $s$. Berkovich and Uncu \cite[Theorems 5.1 and 5.2]{BerkovichAlexander2017SEPI} showed that the series $G_{L,s}(q)$ and $H_{L,s,k}(q)$, for $s=1$ and $s=2$ and $L \geq 1$, satisfy the following simple relationship: \begin{equation}\label{s=1} G_{L,s}(q) = \frac{H_{L,s,L}(q)}{1-q^L}. \end{equation} A series $S(q) = \sum_{n \geq 0} a_nq^n $ is said to be \emph{nonnegative} if $a_n \geq 0$ for all $n$. The nonnegativity of the series $S(q)$ is denoted by $S(q) \succeq 0.$ Berkovich and Uncu \cite[Theorem 5.1]{BerkovichAlexander2017SEPI} prove, using \eqref{s=1}, that $G_{L,1}(q) \succeq 0$. Also using \eqref{s=1}, they conjectured Theorem \ref{s=2} below, which pertains to the nonnegativity of $G_{L,2}(q)$. Theorem \ref{s=2} was proved by the present authors \cite[Section 3]{BR20}. \begin{theorem} \label{s=2} For $L=3$, \begin{equation*} G_{L,2}(q)+q^3 + q^9 + q^{15} \succeq 0; \end{equation*} for $L=4$, \begin{equation*} G_{L,2}(q)+q^3 + q^9 \succeq 0; \end{equation*} and for $L \geq 5$, \begin{equation*} G_{L,2}(q)+q^3 \succeq 0. \end{equation*} \end{theorem} In the present article, we explore the nonnegativity properties of $G_{L,s}(q)$ for general positive integers $s$. We begin the study of this series with the next result. \begin{theorem} \label{Generals} For positive integers $L \geq 1$, $$ G_{L,s}(q) = \frac{H_{L,s,L}(q)}{1-q^L}. $$ \end{theorem} We prove Theorem \ref{Generals} in Section \ref{PGLs}, but we emphasize that the proof is essentially the one given by Berkovich and Uncu for the cases $s=1$ and $s=2$, with only minor modifications. We include this proof for completeness. Next we show that for any $L \geq s+1$, the series $G_{L,s}(q)$ is eventually positive, and the bound after which the coefficient of $q^N$ is positive can be written explicitly in terms of $s$ only. Define the quantities \begin{equation} \label{deltas} \begin{aligned} &\delta(s) := e^{3\Gamma(s)},\\ \textnormal{ and }\;\;\; &\delta'(s) := 10s+(s+2)(s+3)(\delta(s)+1). \end{aligned} \end{equation} Obviously $\delta'(s) > \delta(s)$ for all positive $s$. \begin{theorem} \label{GLs} If $s$ and $L \geq s+1$ are positive integers, then the coefficient of $q^n$ in $G_{L,s}(q)$ is positive whenever $n \geq \delta'(s)$, so $G_{L,s}(q)$ eventually positive. \end{theorem} We prove Theorem \ref{GLs} in Section \ref{PGLs}. Then we focus on the case $s=3$ and obtain an extension of Theorem \ref{s=2}; that is, we show that, with the exception of a few small terms, the series $G_{L,s}(q)$ is nonnegative. The next result states this precisely, and its proof is in Section \ref{PGLthree}. \begin{theorem} \label{GLthree} For $L \geq 10$, $$ G_{L,3}(q) +q^4+q^5+q^8+q^{10}+q^{12}+q^{14}+q^{16} \succeq 0.$$ For $5 \leq L \leq 9$, we have the following results. \begin{gather*} G_{9,3}(q)+q^4+q^5+q^8+q^{10}+q^{12}+q^{14}+2q^{16} \succeq 0. \\ G_{8,3}(q)+q^4+q^5+q^8+q^{10}+q^{12}+q^{14}+2q^{16}+q^{20} \succeq 0. \\ G_{7,3}(q)+q^4+q^5+q^8+q^{10}+q^{12}+2q^{14}+q^{16}+q^{20} \succeq 0. \\ G_{6,3}(q)+q^4+q^5+q^8+q^{10}+q^{12}+q^{13}+2q^{14}+2q^{16}+q^{18}+2q^{20}+q^{22} \succeq 0. \\ G_{5,3}(q)+q^4+q^5+q^8+q^{10}+2q^{12}+q^{13}+q^{14}+2q^{16} +q^{17}+q^{18}+3q^{20}\phantom{+q^{22}+q^{24}}\\ \phantom{G_{5,3}(q)+q^4+q^5+q^8+q^{10}+2q^{12}+q^{13}xxxxxxxxxxxxxxxx} +q^{22}+q^{24}+q^{28} \succeq 0. \end{gather*} and for $L=4$, \begin{multline*} G_{4,3}(q)+ q^4 + q^5 + q^8 + q^{10} + q^{11} + 2q^{12} + 2q^{14} + 3q^{16} + q^{17} \\ + 2q^{18} + q^{19} + 4q^{20} + 3q^{22} + q^{23} + 4q^{24} + q^{25} + 4q^{26} + 5q^{28} \\ + q^{29} + 3q^{30} + 6q^{32} + 3q^{34} + 4q^{36} + 2q^{38} + 4q^{40} + 2q^{44} \succeq 0. \end{multline*} \end{theorem} We point out that the bound in Theorem \ref{GLs} is likely far from optimal. Take, for example, the case $s=3$. According to Theorem \ref{GLs}, the coefficient of $q^n$ in $G_{L,3}(q)$ is nonnegative whenever $n \geq \delta'(3)$, where $\delta'(3)$ is is extremely large. However, from Theorem \ref{GLthree}, the coefficient of $q^n$ in $G_{L, 3}(q)$ is nonnegative whenever $n \geq 45$. This suggests that the bound in Theorem \ref{GLs} can be improved greatly. Theorems \ref{Generals}, \ref{GLs} and \ref{GLthree} can also be found in the PhD. thesis of the first author \cite{binner}. \section{Proofs of Theorems \ref{Generals} and \ref{GLs}} \label{PGLs} We begin by proving Theorem \ref{Generals}. \begin{proof}[Proof of Theorem \ref{Generals}] The definition of $G_{L,s}(q)$ in \eqref{GLsq} is given as the difference of two generating series. We begin by finding a rational expression for the first generating series. All the partitions counted by this generating series have smallest part equal to $s$ and largest part at most $L+s$. Hence we obtain for the first generating series the expression \begin{equation} \label{8} \sum_{\substack{\pi \in \mho, \\ s(\pi)=s, \\ l(\pi)-s(\pi) \leq L}} q^{|\pi|} = \frac{q^s}{(1-q^s)(1-q^{s+1}) \cdots (1-q^{L+s})} = \frac{q^s}{(q^s;q)_{L+1}}. \end{equation} For the second generating series in the definition of $G_{L,s}(q)$, we fix the number of parts of the partition to be $n$ and then sum over all $n$. Suppose $\pi$ is a partition with $n$ parts, where each part is at least $s+1$. Then, in the Ferrers diagram of $\pi$, the whole column over the smallest part of $\pi$ is generated by the $q$-factor $$ \frac{q^{(s+1)n}}{1-q^n}. $$ Stripping the columns above the smallest part from the far left of the Ferrers diagram of $\pi$, we are left with a new partition that has at most $n-1$ parts and largest part bounded above by $L$. It is well known (see for example \cite[Proposition 1.1]{Aigner}) that these partitions are generated by the $q$-binomial coefficient $$\left[\myatop{L+n-1}{n-1} \right]_q := \frac{(q;q)_{L+n-1}}{(q;q)_L (q;q)_{n-1}}.$$ Thus, for the second generating series in the definition of $G_{L,s}(q)$, we have $$ \sum_{\substack{\pi \in \mho, \\ s(\pi) \geq s+1, \\ l(\pi)-s(\pi) \leq L}} q^{|\pi|} = \sum_{n=1}^{\infty}\frac{q^{(s+1)n}}{1-q^n} \left[\myatop{L+n-1}{n-1} \right]_q.$$ Simplifying the summands on the right hand side, we find \begin{align*} \frac{1}{1-q^n} \left[\myatop{L+n-1}{n-1} \right]_q &= \frac{1}{1-q^L} \left[\myatop{L+n-1}{n} \right]_q \\ &= \frac{1}{1-q^L} \frac{(q^L;q)_n}{(q;q)_n}. \end{align*} Therefore \begin{align} \sum_{\substack{\pi \in \mho, \\ s(\pi) \geq s+1, \\ l(\pi)-s(\pi) \leq L}} q^{|\pi|} &= \frac{1}{1-q^L} \sum_{n=1}^{\infty} q^{(s+1)n} \frac{(q^L;q)_n}{(q;q)_n}\notag\\ &= \frac{1}{1-q^L} \left( -1 + \sum_{n=0}^{\infty} q^{(s+1)n} \frac{(q^L;q)_n}{(q;q)_n} \right)\notag\\ &= \frac{1}{1-q^L} \left( \frac{1}{(q^{s+1};q)_L} - 1 \right),\label{16} \end{align} where the last step follows from the $q$-binomial theorem (see \cite[$(2.1)$]{BerkovichAlexander2017SEPI}) $$\sum_{n=0}^{\infty} \frac{(a;q)_n}{(q;q)_n} z^n = \frac{(az;q)_{\infty}}{(z;q)_{\infty}}$$ with $a=q^L$ and $z=q^{s+1}$. Substituting \eqref{8} and \eqref{16} into the definition of $G_{L,s}(q)$ gives us \begin{align*} G_{L,s}(q) &= \frac{q^s}{(q^s;q)_{L+1}} - \frac{1}{1-q^L} \left( \frac{1}{(q^{s+1};q)_L} - 1 \right) \\ &= \frac{1}{1-q^L} \left( \frac{q^s (1-q^L)}{(q^s;q)_{L+1}} - \left( \frac{1}{(q^{s+1};q)_L} - 1 \right) \right) \\ &= \frac{1}{1-q^L} H_{L,s,L}(q), \end{align*} as required. \end{proof} Theorem \ref{Generals} expresses $G_{L,s}(q)$ in terms of $H_{L,s,L}(q)$, while Theorem \ref{Genk} gives the explicit bound $\Gamma(s)$ after which coefficients in the series $H_{L,s,L}(q)$ are positive. We use these to show nonnegativity properties of $G_{L,s}(q)$. We first show in Theorem \ref{thm:proofconj5} that there is a bound $M$, which depends only on $L$ and $s$, such that the coefficient of $q^n$ in $G_{L,s}(q)$ is nonnegative whenever $n \geq M$. For positive integers $s$ and $L \geq s+1$, let $H_{L,s,L}(q) = \sum_{n \geq 0} a_{L,n}q^n$ and $G_{L,s}(q) = \sum_{n \geq 0} b_{L,n}q^n$. Then Theorem \ref{Generals} implies \begin{equation} \label{HtoG} b_{L,n} = a_{L,n} + a_{L,n-L} + a_{L,n-2L} + \cdots = \sum_{\substack{m \leq n \\ m \equiv n (\text{mod} L)}} a_{L,m}. \end{equation} We introduce some more notation: \begin{itemize} \item $\eta_1(L,s) = \sum_{n < \Gamma(s)} |a_{L,n}|$; \item $\eta_2(L,s) = \max(\eta_1(L,s), \Gamma(s))$; and \item $\eta_3(L,s) = (L+1) \eta_2(L,s)$. \end{itemize} \begin{theorem} \label{thm:proofconj5} Let $s$ and $L \geq s+1$ be positive integers. Then the coefficient of $q^n$ in $G_{L,s}(q)$ is nonnegative whenever $n \geq \eta_3(L,s)$. \end{theorem} \begin{proof} Suppose $n \geq \eta_3(L,s)$. We can rewrite \eqref{HtoG} as \begin{equation} \label{rewrite} b_{L,n} = \sum_{\substack{\eta_2(L,s) \leq m \leq n \\ m \equiv n (\text{mod} L)}} a_{L,m} + \sum_{\substack{\Gamma(s) \leq m < \eta_2(L,s) \\ m \equiv n (\text{mod} L)}} a_{L,m} + \sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} a_{L,m}. \end{equation} Note that the second sum may be empty. Since $n \geq \eta_3(L, s)$, the first sum on the right hand side of \eqref{rewrite} contains at least $\eta_2(L,s)$ terms, all of which are positive by Theorem \ref{Genk}. Thus \begin{equation} \label{first3} \sum_{\substack{\eta_2(L,s) \leq m \leq n \\ m \equiv n (\text{mod} L)}} a_{L,m} \geq \eta_2(L,s). \end{equation} For the second sum in the right hand side of \eqref{rewrite}, Theorem \ref{Genk} gives \begin{equation} \label{second2} \sum_{\substack{\Gamma(s) \leq m < \eta_2(L,s) \\ m \equiv n (\text{mod} L)}} a_{L,m} \geq 0. \end{equation} For the third sum in the right hand side of \eqref{rewrite}, using the triangle inequality, we obtain $$ \left| \sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} a_{L,m} \right| \leq \sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} |a_{L,m}| \leq \sum_{m < \Gamma(s)} |a_{L,m}| = \eta_1(L,s) \leq \eta_2(L,s), $$ and thus \begin{equation} \label{third} \sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} a_{L,m} \geq -\eta_2(L,s). \end{equation} The result now follows immediately from \eqref{rewrite}, \eqref{first3}, \eqref{second2} and \eqref{third}. \end{proof} The bound $\eta_3(L,s)$ in Theorem \ref{thm:proofconj5} guaranteeing when the coefficients of $G_{L,s}(q)$ are nonnegative depends on both $L$ and $s$. To prove Theorem \ref{GLs}, we need to find a bound that only depends on $s$, and this is our next goal. We again use the connection between $G_{L,s}(q)$ and $H_{L,s,L}(q)$ in Theorem \ref{Generals}; while Theorem \ref{Genk} guarantees the series $H_{L,s,L}(q)$ is eventually positive, we also need a lower bound on the size of the coefficients of $H_{L,s,L}(q)$. This is the content of Theorem \ref{ModiGenk} below, a strengthening of Theorem \ref{Genk} in the case $k=L$. Let \begin{itemize} \item $D_{L,s}$ denote the set of nonempty partitions with parts in the set $\{s+1, \ldots, L+s\}$, and \item $I_{L,s,L}$ be the set of partitions where the smallest part is $s$, all parts are $\leq L+s$, and $L$ does not appear as a part. \end{itemize} From the definition of the series $H_{L,s,L}(q)$ in \eqref{eq:hlsk}, when $L \geq s+1$, elementary partition theory gives the coefficient of $q^N$ in $H_{L,s,L}(q)$ as the difference \begin{equation}\label{eq:comb} |\{\pi \in I_{L,s,L} : |\pi| = N|\}| - |\{\pi \in D_{L,s} : |\pi| = N\}|. \end{equation} Thus to prove nonnegativity of the coefficient of $q^N$ in $H_{L,s,L}(q)$, it suffices to show there exists an injection $\phi$ such that \begin{equation}\label{eq:gamma} \phi: \{\pi \in D_{L,s} : |\pi| = N\} \rightarrow \{\pi \in I_{L,s,L} : |\pi| = N\} \end{equation} Equations \eqref{eq:comb} and \eqref{eq:gamma} are central to proving our theorems below in this section and the next. We also need the following result. \begin{prop}\label{thm:prop1} For given positive integers $a,b$ and $n$ with $\gcd(a,b)=1$, the number of solutions of $ax+by=n$ in nonnegative integer pairs $(x,y)$ is either $\lfloor \frac{n}{ab} \rfloor$ or $\lfloor \frac{n}{ab} \rfloor + 1$. \end{prop} See \cite{AT}. See also \cite[Chapter 5]{niven} for an elementary proof. \begin{theorem} \label{ModiGenk} For positive integers $L \geq 3$ and $s$, with $L \geq s+1$, the coefficient of $q^N$ in $H_{L,s,L}(q)$ is greater than or equal to $\left \lfloor \frac{N-10s}{(s+2)(s+3)} \right \rfloor$ whenever $N \geq \Gamma(s)$. \end{theorem} \begin{proof} The proof of Theorem \ref{Genk}, found in \cite{BR20}, uses the combinatorial interpretation of the coefficients of $H_{L,s,L}(q)$ in \eqref{eq:comb}; the proof there constructs for $N \geq \Gamma(s)$ an injection as in \eqref{eq:gamma} to show nonnegativity of \eqref{eq:comb}. To show positivity of \eqref{eq:comb}, elements of the codomain that are not in the range of $\phi$ are given. The details of these injections and elements are dealt with in different cases and theorems of \cite{BR20} depending on the relative sizes of $L$ and $s$.\footnote{As indicated by Theorem \ref{Genk}, the proof in \cite{BR20} for the positivity of $H_{L,s,k}(q)$ applies for all $k \geq s+1$. In particular, a more general $I_{L,s,k}$ is defined than the one given in \eqref{eq:comb}. Here we are only interested in the case $k=L$.} For example, when $L \geq 2s+3$, there is no partition of the form $(s^{10}, (s+1)^x, (s+2)^y)$ in the range of $\phi$, but such partitions are in the codomain. To achieve the present result, we count the number of such partitions; this will then give the desired lower bound for the difference \eqref{eq:comb} in each case. We then compare the results of all cases. Table \ref{tab:casesbound} lists the cases, the theorem from \cite{BR20} showing positivity of \eqref{eq:comb}, the partitions in the codomain but not the range of $\phi$ showing positivity of \eqref{eq:comb}, and the enumeration of these partitions. \begin{table}[htbp] \centering \caption{The first column describes the case, the second the theorem from \cite{BR20} that proves positivity in this case, the third the partitions in the codomain that are not in the range of $\phi$ in \eqref{eq:gamma}, and the last column contains the number of partitions of the type in Column 3}. \label{tab:casesbound} \begin{tabular}{|c|c|c|c|c|} \hline & Case of $L, s$ & Theorem & Partitions in codomain & min. num,\\ & & of \cite{BR20} & not in range of $\phi$ & of partitions\\ \hline 1 & $L \geq 2s+3$ & 10 & $(s^{10},(s+1)^x,(s+2)^y)$ & \rule{0pt}{18pt} $\left\lfloor \frac{N-10s}{(s+1)(s+2)} \right\rfloor$ \\ [+0.5em] \hline 2 & $s+3 \leq L \leq 2s+2$ & 12 & $(s^{1},(s+1)^x,(s+2)^y)$ & \rule{0pt}{18pt} $\left \lfloor \frac{N-s}{(s+1)(s+2)} \right \rfloor$\\ [+0.5em] \hline 3 & $L = s+1$ & 12 & $(s^{1},(s+2)^x,(s+3)^y)$ &\rule{0pt}{18pt} $\left \lfloor \frac{N-s}{(s+2)(s+3)} \right \rfloor$\\ [+0.5em] \hline 4 & $s$ even, $L=s+2$ & 12 & $(s^{1},(s+1)^x,(s+3)^y)$ & \rule{0pt}{18pt} $\left \lfloor \frac{N-s}{(s+1)(s+3)} \right \rfloor$\\ [+0.5em] \hline 5 & $s$ odd, $L=s+2$, $N$ odd & 12 & $(s^{1},(s+1)^x,(s+3)^y)$ & \rule{0pt}{18pt} $\left \lfloor \frac{2(N-s)}{(s+1)(s+3)} \right \rfloor$\\ [+0.5em] \hline 6 & $s$ odd, $L=s+2$, $N$ even, $s \neq 1$ & 12 & $(s^{2},(s+1)^x,(s+3)^y)$ & \rule{0pt}{18pt} $\left \lfloor \frac{2(N-2s)}{(s+1)(s+3)} \right \rfloor$\\ [+0.5em] \hline 7 & $s =1$, $L=3$, $N$ even & 12 & $(1^{6},2^x,4^y)$ & \rule{0pt}{18pt} $\left \lfloor \frac{(N-6)}{4} \right \rfloor$\\ [+0.5em] \hline \end{tabular} \end{table} To count the number of partitions in Column 3 in Table \ref{tab:casesbound}, in Rows 1-4 a straight forward application of Proposition \ref{thm:prop1} to $n = N - ts$, where $t$ is the number of parts of $s$, and $a$ and $b$ set to be the remaining parts, which are coprime, gives the numbers in Column 4. The remaining rows require a slightly more work. For Row 5, the numbers $s+1$ and $s+3$ have greatest common factor 2, so we can apply Proposition \ref{thm:prop1} to $n=\tfrac{N-s}{2}, a=\tfrac{s+1}{2}$ and $b=\tfrac{s+3}{2}$. The count in Column 4 then follows. The analysis for Rows 6 and 7 are similar. The result is now obtained by observing that all the values in Column 4 exceed $\left \lfloor \frac{N-10s}{(s+2)(s+3)} \right \rfloor$. \end{proof} For a positive integer $m$, let $p(m)$ be the number of partitions of $m$. We need the following result of de Azevedo Pribitkin \cite{Prib}. \begin{theorem}\label{thm:prop2} Let $m$ be a positive integer. Then $p(m) \leq e^{3\sqrt{m}}$. \end{theorem} \begin{proof}[Proof of Theorem \ref{GLs}] As before, let $a_{L,n}$ and $b_{L,n}$ be the coefficient of $q^n$ in $H_{L,s,L}(q)$ and $G_{L,s}(q)$, respectively. Further, recall the definitions of $\Gamma(s), \delta(s),$ and $\delta'(s)$ in \eqref{eq:defplsgammals} and $\eqref{deltas}$. Suppose $n \geq \delta'(s)$. Again from \eqref{HtoG}, we have \begin{equation} \label{rewrite'} b_{L,n} = \sum_{\substack{\delta'(s) \leq m \leq n \\ m \equiv n (\text{mod} L)}} a_{L,m} + \sum_{\substack{\Gamma(s) \leq m < \delta'(s) \\ m \equiv n (\text{mod} L)}} a_{L,m} + \sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} a_{L,m}. \end{equation} For $m \geq \delta'(s)$, we have $m \geq \Gamma(s)$ and $\lfloor \frac{m-10s}{(s+2)(s+3)} \rfloor \geq \delta(s)$, so $a_{L,m} \geq \delta(s)$ by Theorem \ref{ModiGenk}. The first sum in the right hand side of \eqref{rewrite'} contains at least 1 term (the term $m=n$) and each term in the sum is greater than or equal to $\delta(s)$. Thus \begin{equation} \label{first'} \sum_{\substack{\delta'(s) \leq m \leq n \\ m \equiv n (\text{mod} L)}} a_{L,m} \geq \delta(s). \end{equation} For the second sum in the right hand side of \eqref{rewrite'}, from Theorem \ref{Genk} it follows \begin{equation} \label{second'} \sum_{\substack{\Gamma(s) \leq m < \delta'(s) \\ m \equiv n (\text{mod} L)}} a_{L,m} \geq 0. \end{equation} For the third sum on the right hand side of \eqref{rewrite'}, the combinatorial interpretation of $H_{L,s,L}(q)$ in \eqref{eq:comb} gives $a_{L,m} \geq - p(m)$ for any $m \in \mathbb{N}$. By Theorem \ref{thm:prop2}, we then have $$a_{L,m} \geq - p(m) \geq -e^{3\sqrt{m}} \geq -e^{3m}.$$ Therefore \begin{equation} \label{third'} \sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} a_{L,m} \geq -\sum_{\substack{m < \Gamma(s) \\ m \equiv n (\text{mod} L)}} e^{3m} \geq -\sum_{m < \Gamma(s)} e^{3m} > -\delta(s), \end{equation} where the last inequality follows from the familiar formula for finite geometric sums and the definition of $\delta(s)$. The theorem now follows immediately from \eqref{rewrite'}, \eqref{first'}, \eqref{second'} and \eqref{third'}. \end{proof} \section{Proof of Theorem \ref{GLthree}} \label{PGLthree} To prove Theorem \ref{GLthree}, we use the connection between $G_{L,3}(q)$ and $H_{L, 3, L}(q)$ given in Theorem \ref{Generals}. To use this relationship, we need to understand the coefficients of $q^N$ in $H_{L, 3, L}(q)$ for small $N$, so we need a result, in the case $s=3$ and $L \geq s+1$, stronger than Theorem \ref{Genk}. Our strategy for proving the coefficient of $q^N$ in $H_{L,3,L}(q)$ is nonnegative for small $N$ is to show that the coefficient of $q^N$ in $H_{L,3,L}(q)$ is nonnegative when $N$ is larger than a small bound; this is done in Lemmas \ref{Helpful2} - \ref{Five}. Then we use the lemmas along with machine computation and Theorem \ref{Generals} to prove Theorem \ref{GLthree} at the end of the section. Recall the following fundamental result of Sylvester \cite{Sylvester82}. \begin{theorem}[Sylvester's theorem] Let $a$ and $b$ be positive coprime integers. Then the equation $ax+by = n$ has a nonnegative integer solution $(x,y)$ whenever $n \geq (a-1)(b-1)$. \end{theorem} We additionally need the following lemmas. \begin{lemma} \label{4,5,6} Let $n \geq 4$ be a positive integer such that $n \neq 7$. Then the equation $4x+5y+6z=n$ has a solution in nonnegative integer triples $(x,y,z)$. \end{lemma} \begin{lemma} \label{5,6,7} Let $n \geq 5$ be a positive integer such that $n \neq 8,9$. Then the equation $5x+6y+7z=n$ has a solution in nonnegative integer triples $(x,y,z)$. \end{lemma} \begin{lemma} \label{4,5,6,7} Let $n \geq 4$ be a positive integer. Then the equation $4x+5y+6z+7u=n$ has a solution in nonnegative integer tuples $(x,y,z,u)$. \end{lemma} The proofs of these lemmas are all simple applications of Sylvester's theorem. For example, the proof of Lemma \ref{4,5,6} can be obtained by applying Sylvester's theorem to $a=4$ and $b=5$, which establishes the conclusion for all $n \geq 12$, and then each smaller $n$ can be dealt with individually. The proofs of Lemmas \ref{5,6,7} and \ref{4,5,6,7} are similar, so we omit the details. We also need another lemma. \begin{lemma} \label{twosol} Suppose the equation $4x+5y+6z=n$ has a solution $(\alpha, \beta, \gamma)$ in nonnegative integer triples. Then the equation $4x+5y+6z=n+6$ has a solution different from $(\alpha, \beta, \gamma+1)$ whenever $n \geq 4$ and $n \neq 5$. \end{lemma} \begin{proof} First suppose $\alpha \geq 1$. Then $(\alpha-1, \beta+2, \gamma)$ is a required solution. Next suppose $\alpha = 0$. If $\gamma \geq 1$, then $(\alpha+3, \beta, \gamma-1)$ is a required solution. If $\gamma = 0$, then $\beta \geq 2$ because of the restriction on $n$, and $(\alpha+4, \beta-2, \gamma)$ is a required solution. \end{proof} The next lemma shows that the coefficient of $q^N$ in $H_{L,3,L}(q)$ is positive for most values of $L$ and small $N$. Positivity, as opposed to nonnegativity, is needed in this case to prove Theorem \ref{GLthree} at the end of the section. \begin{lemma} \label{Helpful2} For $L \geq 22$ and $N \geq 21$, the coefficient of $q^N$ in $H_{L,3,L}(q)$ is positive. \end{lemma} \begin{proof} Fix $L \geq 22$ and $N \geq 21$. Recall the combinatorial interpretation of the coefficients of $H_{L,3,L}(q)$ in \eqref{eq:comb}. We prove nonnegativity of the coefficients of $H_{L,3,L}(q)$ by constructing an injective map $\phi$ as in \eqref{eq:gamma} for $s=3$. Positivity will then be shown at the end of the proof by displaying an element of the codomain of $\phi$ that is not in its range. Let $\pi = \left(4^{f_4}, \ldots, L^{f_L}, \ldots, (L+3)^{f_{L+3}}\right)$ be a partition of $N$ in $D_{L,3}$ and let $f$ denote $f_L$. Recall that partitions of $N$ in $I_{L, 3, L}$, the codomain of $\phi$, have parts in the set $\{3, \ldots, L+3\}$, the number 3 must occur as a part, and $L$ does not occur as a part. Our proof of injectivity of $\phi$ is as follows. \begin{itemize} \item We define $\phi(\pi)$ in cases chiefly determined by $f$ in $\pi$, with several subcases that depend on the frequencies of other parts of $\pi$. In each case, it will usually be readily apparent that $\phi$ is injective, but we will provide some justification for more complicated cases. \item When we analyze why $\phi$ is injective overall, we will gather cases by the frequency of 3 in the image of $\phi$. Thus each case is labelled twice: first by its case determined by the frequency $f$ of $L$ in $\pi$ (see below, for example, Case 2(c)(ii)($\alpha$)) and second, in parentheses, by the frequency of $3$ in $\phi(\pi)$ (for example, \@ifstar{{\mage (B2)}\xspace}{{\mage B2}\xspace}*). Once the cases are gathered by their frequency of 3 in the image of $\phi$, we analyze, for each fixed $i$, all cases where the frequency of 3 is $i$ in the image of $\phi$, and we argue why $\phi$ is injective collectively in these cases. For example, on Page \pageref{page:pageas} the cases ${\color{magenta} (\mathrm{A}*)}$ are all the cases where the frequency of 3 is 1 in the image of $\phi$. \item We then argue that $\phi$ must be injective overall because distinct cases where in the image of $\phi$ the frequency of 3 in one case is $i$ and the frequency of 3 in the other case is $j$, where $i \neq j$, cannot contain common elements, so two partitions $\pi$ and $\pi'$ pertaining to distinct cases $i$ and $j$ cannot have the same image. \end{itemize} We now define $\phi$. Case 1 {\color{magenta} (}\@ifstar{{\mage (F1)}\xspace}{{\mage F1}\xspace}, \@ifstar{{\mage (K1)}\xspace}{{\mage K1}\xspace}{\color{magenta} )} (this case, exceptionally, has many values for the frequency of 3 in a partition in the image of $\phi$, so it has more than one pink label): $f\geq 1$. Notice $(L-18)i \geq 4$ for all $i \geq 1$, so the equation \begin{equation}\label{eq:spread} (L-18)i = 4x_i + 5y_i +6z_i + 7u_i \end{equation} has a nonnegative integer solution by Lemma \ref{4,5,6,7}. For each $i \geq 1$, fix such a solution $x_i, y_i, z_i$ and $u_i$. Define $$\phi (\pi) = \left(3^{6f}, 4^{f_4+x_f}, 5^{f_5+y_f}, 6^{f_6+z_f}, 7^{f_7+u_f}, \ldots, L^0, \ldots \right). $$ The function $\phi$ is injective in this case. Given a partition $\phi (\pi) = \left(3^{6f}, 4^{a}, 5^{b}, 6^{c}, 7^{d}, \ldots, L^0, \ldots \right)$ in the range $\phi$, we can infer $\pi$ comes from this case (no cases below have the same frequency of 3). From the frequency of 3 in $\phi(\pi)$, we can infer $f$; then, from \eqref{eq:spread}, we can infer $x_f, y_f, z_f$ and $u_f$; finally, from $f$ and $x_f, y_f, z_f$ and $u_f$, we can reconstruct $\pi$. Case 2: $f=0$. We have the following subcases. Recall that the smallest part of $\pi$ is denoted by $s(\pi)$. Case 2(a) \@ifstar{{\mage (B1)}\xspace}{{\mage B1}\xspace}*: $s(\pi) = L+3$. Then $\pi = ((L+3)^{f_{L+3}})$. Define $$\phi(\pi) = \left(3^2, 4^2, 5^1, (L-16), \ldots, (L+3)^{f_{L+3} - 1}\right).$$ Note $L-16 \geq 6$ because $L \geq 22$. Case 2(b) \@ifstar{{\mage (A1)}\xspace}{{\mage A1}\xspace}*: $7 \leq s(\pi) < L+3$. Define $$\phi(\pi) = \left(3^1, (s(\pi)-3)^1, (s(\pi)^{f_{s(\pi)}-1}), \ldots, \right). $$ Note $s(\pi) - 3 \neq L$, so no part of size $L$ is created. Case 2(c): $s(\pi) \leq 6$. We have the following subcases. Case 2(c)(i) \@ifstar{{\mage (C1)}\xspace}{{\mage C1}\xspace}*: $f_4 \geq 1$ and $f_5 \geq 1$. Define $$\phi(\pi) = \left(3^3, 4^{f_4-1},5^{f_5-1}, 6^{f_6}, \ldots \right). $$ Case 2(c)(ii): $f_4=0$ or $f_5 =0$. We have the following subcases. Case 2(c)(ii)($\alpha$) \@ifstar{{\mage (B2)}\xspace}{{\mage B2}\xspace}*: $f_6 \geq 1$. Define $$ \phi(\pi) = (3^2, 4^{f_4}, 5^{f_5}, 6^{f_6-1}, \ldots). $$ Case 2(c)(ii)($\beta$): $f_6=0$. Thus in this subcase either $f_4=f_6=0$ or $f_5=f_6=0$, and since $s(\pi) \leq 6$, precisely one of these two conditions holds. We have further subcases. Case 2(c)(ii)($\beta$)(I): $f_4=f_6=0$. Then $\pi = \left(5^{f_5}, 7^{f_7}, \ldots \right)$. Case 2(c)(ii)($\beta$)(I)(A) \@ifstar{{\mage (E1)}\xspace}{{\mage E1}\xspace}*: $f_5 \geq 3$. Define $$ \phi(\pi)= (3^5, 5^{f_5-3}, 7^{f_7}, \ldots).$$ Case 2(c)(ii)($\beta$)(I)(B): $f_5 =1$. So $\pi = \left(5^1,7^{f_7}, \ldots, \right)$. Let $m_1 \geq 7$ be the least number with a nonzero frequency in $\pi$, which must exist because $N \geq 21$. Case 2(c)(ii)($\beta$)(I)(B)(i) \@ifstar{{\mage (A2)}\xspace}{{\mage A2}\xspace}*: $m_1 \neq 7, 11, 12$. Then $m_1-3 \geq 5$ and $m_1-3 \neq 8,9$. By Lemma \ref{5,6,7} there exist some nonnegative integers $u_{m_1-3}, v_{m_1-3}$ and $w_{m_1-3}$ such that \begin{equation}\label{eq:defatwo} m_1-3 = 5 u_{m_1-3} + 6 v_{m_1-3} + 7 w_{m_1-3}. \end{equation} Define $$\phi(\pi) = \left(3^1, 5^{1+u_{m_1-3}}, 6^{v_{m_1-3}}, 7^{w_{m_1-3}}, m_1^{f_{m_1}-1}, \ldots \right). $$ Our explanation for why $\phi$ is injective in this case is similar to that in Case 1. Suppose that we are given an element in the range of $\phi$ of the form $\phi(\pi) = \left(3^1, 5^{1+A}, 6^{B}, 7^{C}, m_1^{f_{m_1}-1}, \ldots \right)$. Then, using \eqref{eq:defatwo}, we can find $m_1 - 3$ from $A, B$ and $C$, and from there $m_1$ can be recovered. From $m_1$, we can reconstruct the partition $\pi$ uniquely. There are cases below where the reasoning that $\phi$ is injective is similar to this case and Case 1, so we omit the details there. Case 2(c)(ii)($\beta$)(I)(B)(ii): $m_1 = 7$. Case 2(c)(ii)($\beta$)(I)(B)(ii)(a) \@ifstar{{\mage (E2)}\xspace}{{\mage E2}\xspace}*: $f_7 \geq 2$. Then define $$ \phi(\pi) = \left(3^5, 4^1, 5^0, 7^{f_7-2}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(B)(ii)(b): $f_7 =1$. Then $\pi = \left(5^1, 7^1, 8^{f_8}, \ldots \right)$. Let $m_2 \geq 8$ be the least number with a nonzero frequency in $\pi$. Case 2(c)(ii)($\beta$)(I)(B)(ii)(b)(i) \@ifstar{{\mage (B3)}\xspace}{{\mage B3}\xspace}*: $m_2=8$. Define $$ \phi(\pi) = \left(3^2, 4^1, 5^2, 7^0, 8^{f_8-1}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(B)(ii)(b)(ii) \@ifstar{{\mage (B4)}\xspace}{{\mage B4}\xspace}*: $9 \leq m_2 < L+3$. Define $$\phi(\pi) = \left(3^2, 4^1, 5^1, (m_2-3)^1, m_2^{f_{m_2}-1}, \ldots \right).$$ To be clear, our notation indicates that the frequency of $7$ in $\phi(\pi)$ is 0 unless $m_2 = 10$. Case 2(c)(ii)($\beta$)(I)(B)(ii)(b)(iii) \@ifstar{{\mage (B5)}\xspace}{{\mage B5}\xspace}*: $m_2 = L+3$. Then $\pi = \left(5^1, 7^1, \ldots (L+3)^{f_{L+3}} \right)$. Define $$\phi(\pi) = \left(3^2, 4^2, 5^2, 7^0, (L-9)^1, (L+3)^{f_{L+3}-1} \right).$$ Case 2(c)(ii)($\beta$)(I)(B)(iii): $m_1 = 11$. Then $ \pi = \left(5^1, 11^{f_{11}}, \ldots \right)$. We have further subcases. Case 2(c)(ii)($\beta$)(I)(B)(iii)(a) \@ifstar{{\mage (I1)}\xspace}{{\mage I1}\xspace}*: $f_{11} \geq 2$. Define $$\phi(\pi) = \left(3^9, 5^0, 11^{f_{11}-2}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(B)(iii)(b) \@ifstar{{\mage (H1)}\xspace}{{\mage H1}\xspace}*: $f_{11} = 1$. Then $ \pi = \left(5^1, 11^1, 12^{f_{12}}, \ldots \right)$. Let $m_3 \geq 12$ be the least number with a nonzero frequency in $\pi$. Then define $$ \phi(\pi) = \left(3^8, (m_3-8)^1, m_3^{f_{m_3}-1}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(B)(iv): $m_1 = 12$. Then $\pi = \left(5^1, 12^{f_{12}}, \ldots \right)$. We have further subcases. Case 2(c)(ii)($\beta$)(I)(B)(iv)(a) \@ifstar{{\mage (G1)}\xspace}{{\mage G1}\xspace}*: $f_{12} \geq 2$. Define $$\phi(\pi) = \left(3^7, 4^2, 5^0, 12^{f_{12}-2}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(B)(iv)(b): $f_{12} = 1$. Then $ \pi = \left(5^1, 12^1, 13^{f_{13}}, \ldots \right)$. Let $m_4 \geq 13$ be the least number with a nonzero frequency in $\pi$, so $\pi = \left(5^1, 12^1, m_4^{f_{m_4}}, \ldots \right)$. Case 2(c)(ii)($\beta$)(I)(B)(iv)(b)(i) \@ifstar{{\mage (D1)}\xspace}{{\mage D1}\xspace}*: $m_4 = 13$. Define $$\phi(\pi) = \left(3^4, 6^3, 13^{f_{13}-1}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(B)(iv)(b)(ii) \@ifstar{{\mage (I2)}\xspace}{{\mage I2}\xspace}*: $m_4 \geq 14$. Then $m_4-10 \geq 4$, and by Lemma \ref{4,5,6,7} there exist nonnegative integers $X_{m_4-10}, Y_{m_4-10}, Z_{m_4-10}$ and $U_{m_4-10}$ such that $$m_4-10 = 4X_{m_4-10}+5Y_{m_4-10}+6Z_{m_4-10}+7U_{m_4-10}. $$ For each $m_4 \geq 14$, fix a solution to the above equation and define $$ \phi(\pi) = \left(3^9, 4^{X_{m_4-10}}, 5^{Y_{m_4-10}}, 6^{Z_{m_4-10}}, 7^{U_{m_4-10}}, m_4^{f_{m_4}-1}, \ldots, \right). $$ Case 2(c)(ii)($\beta$)(I)(C): $f_5 =2$. Thus $\pi = \left(5^2,7^{f_7}, \ldots, \right)$. Let $m_5 \geq 7$ be the least number with a nonzero frequency in $\pi$. Case 2(c)(ii)($\beta$)(I)(C)(i) \@ifstar{{\mage (A3)}\xspace}{{\mage A3}\xspace}*: $m_5 \neq 10$. Then $m_5 - 3 \geq 4$ and $m_5-3 \neq 7$. By Lemma \ref{4,5,6} there are nonnegative integers $x_{m_5-3}, y_{m_5-3}$ and $z_{m_5-3}$ of the equation $$ m_5-3 = 4x_{m_5-3} + 5y_{m_5-3} + 6z_{m_5-3}. $$ For each $m_5 \geq 7$ such that $m_5 \neq 10$, fix a solution to the above equation and define $$ \phi(\pi) = \left(3^1, 4^{1+{x_{m_5-3}}}, 5^{y_{m_5-3}}, 6^{1+z_{m_5-3}}, m_5^{f_{m_5-1}}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(C)(ii): $m_5 = 10$. Then $\pi = (5^2, 10^{f_{10}}, \ldots) $. Case 2(c)(ii)($\beta$)(I)(C)(ii)(a) \@ifstar{{\mage (J1)}\xspace}{{\mage J1}\xspace}*: $f_{10} \geq 2$. Then define $$ \phi(\pi) = \left(3^{10}, 10^{f_{10}-2}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(C)(ii)(b): $f_{10} =1$. Then $\pi = (5^2, 10^1, 11^{f_{11}}, \ldots)$. Let $m_6 \geq 11$ be the least number with a nonzero frequency in $\pi$. Case 2(c)(ii)($\beta$)(I)(C)(ii)(b)(i) \@ifstar{{\mage (G2)}\xspace}{{\mage G2}\xspace}*: $m_6$ is odd. Then define $$ \phi(\pi) = \left(3^7, \left(\frac{m_6-1}{2} \right)^2, m_6^{f_{m_6}-1}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(I)(C)(ii)(b)(ii) \@ifstar{{\mage (G3)}\xspace}{{\mage G3}\xspace}*: $m_6$ is even. Then define $$ \phi(\pi) = \left(3^7, \left(\frac{m_6}{2}-1 \right)^1, \left(\frac{m_6}{2} \right)^1, m_6^{f_{m_6}-1}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(II): $f_5=f_6=0$. Since $s(\pi) \leq 6$, we have $f_4 \geq 1$. Thus $\pi = \left(4^{f_4}, 7^{f_7}, \ldots \right)$. Case 2(c)(ii)($\beta$)(II)(A) \@ifstar{{\mage (F2)}\xspace}{{\mage F2}\xspace}*: $f_4 \geq 3$. Define $$\phi(\pi) = \left(3^4, 4^{{f_4}-3}, 7^{f_7}, \ldots \right).$$ Case 2(c)(ii)($\beta$)(II)(B): $f_4 = 1$. Thus $\pi = \left(4^1, 7^{f_7}, \ldots \right)$. Let $m_7 \geq 7$ be the least number with a nonzero frequency in $\pi$. Thus $\pi = \left(4^1, m_7^{f_{m_7}}, \ldots \right)$. Case 2(c)(ii)($\beta$)(II)(B)(i) \@ifstar{{\mage (A4)}\xspace}{{\mage A4}\xspace}*: $m_7 \neq 10, 14$. Then $m_7 - 3 \geq 4$ and $m_7-3 \neq 7, 11$. By Lemma \ref{4,5,6} there is a triple $(x_{m_7-3}, y_{m_7-3}, z_{m_7-3})$ such that $$ m_7-3 = 4x_{m_7-3}+5y_{m_7-3}+6z_{m_7-3}.$$ Crucially, to avoid injectivity problems with the Case 2(c)(ii)($\beta$)(I)(C)(i), if $m_7 = m_5+6$, using Lemma \ref{twosol}, we choose a solution such that $(x_{m_7-3}, y_{m_7-3}, z_{m_7-3}) \neq (x_{m_5-3}, y_{m_5-3}, 1+z_{m_5-3})$. Note here that $m_7 \neq 14$, so $m_5 - 3 \neq 5$, which is required to use Lemma \ref{twosol}. Define $$\phi(\pi) = \left(3^1, 4^{1+x_{m_7-3}}, 5^{y_{m_7-3}}, 6^{z_{m_7-3}}, \ldots, m_7^{f_{m_7}-1}, \ldots \right).$$ Case 2(c)(ii)($\beta$)(II)(B)(ii): $m_7 = 10$. Then $\pi = \left(4^1, 10^{f_{10}}, \ldots \right)$. Case 2(c)(ii)($\beta$)(II)(B)(ii)(a) \@ifstar{{\mage (D3)}\xspace}{{\mage D3}\xspace}*: $f_{10} \geq 2$. Define $$\phi(\pi) = \left(3^4, 6^2, 10^{f_{10}-2}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(II)(B)(ii)(b) \@ifstar{{\mage (G4)}\xspace}{{\mage G4}\xspace}*: $f_{10}=1$. Thus $\pi = \left(4^1,10^1,11^{f_{11}}, \ldots \right)$. Let $m_8 \geq 11$ be the least number with a nonzero frequency in $\pi$. Then define $$\phi(\pi) = \left(3^7, (m_8-7)^1, m_8^{f_{m_8}-1}, \ldots \right).$$ Case 2(c)(ii)($\beta$)(II)(B)(iii) \@ifstar{{\mage (F2)}\xspace}{{\mage F2}\xspace}*: $m_7 = 14$. So $\pi = \left(4^1, 14^{f_{14}}, \ldots \right)$. Define $$ \phi(\pi) = \left(3^6, 4^0,14^{f_{14}-1}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(II)(C): $f_4 = 2$. Thus $\pi = \left(4^2, 7^{f_7}, \ldots \right)$. Let $m_9 \geq 7$ be the least number with a nonzero frequency in $\pi$. Case 2(c)(ii)($\beta$)(II)(C)(i) \@ifstar{{\mage (A5)}\xspace}{{\mage A5}\xspace}*: $m_9$ is odd. Define $$ \phi(\pi) = \left(3^1, \left(\frac{m_9+5}{2} \right)^2, m_9^{f_{m_9-1}}, \ldots \right). $$ Case 2(c)(ii)($\beta$)(II)(C)(ii) \@ifstar{{\mage (A6)}\xspace}{{\mage A6}\xspace}*: $m_9$ is even. Define $$ \phi(\pi) = \left(3^1, \left(\frac{m_9}{2} +2\right)^1, \left(\frac{m_9}{2} + 3 \right)^1, m_9^{f_{m_9-1}}, \ldots \right). $$ To prove the injectivity of the map $\phi$, we organize the cases based on the various frequencies of $3$ in $\phi(\pi)$. First we organize the cases where the frequency of $3$ in $\phi(\pi)$ is $1$.\label{page:pageas} \begin{enumerate} \item[\@ifstar{{\mage (A1)}\xspace}{{\mage A1}\xspace}.] Case 2(b): $\phi(\pi) = \left(3^1, (s(\pi)-3)^1, (s(\pi)^{f_{s(\pi)}-1}), \ldots, \right)$, where $s(\pi) \geq 7$. \item[\@ifstar{{\mage (A2)}\xspace}{{\mage A2}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(i): $\phi(\pi) = \left(3^1, 5^{1+A}, 6^{B}, 7^{C}, m_1^{f_{m_1}-1}, \ldots \right)$, where $m_1 \geq 8$, $m_1 \neq 11,12$, and $A,B$ and $C$ are some nonnegative integers such that at least one of these is positive. \item[\@ifstar{{\mage (A3)}\xspace}{{\mage A3}\xspace}.] Case 2(c)(ii)($\beta$)(I)(C)(i): $ \phi(\pi) = \left(3^1, 4^{1+{x_{m_5-3}}}, 5^{y_{m_5-3}}, 6^{1+z_{m_5-3}}, m_5^{f_{m_5-1}}, \ldots \right)$, where $m_5 \geq 7, m_5 \neq 10$, and $4x_{m_5-3}+5y_{m_5-3}+6z_{m_5-3} = m_5-3$. \item[\@ifstar{{\mage (A4)}\xspace}{{\mage A4}\xspace}.] Case 2(c)(ii)($\beta$)(II)(B)(i): $\phi(\pi) = \left(3^1, 4^{1+x_{m_7-3}}, 5^{y_{m_7-3}}, 6^{z_{m_7-3}}, \ldots, m_7^{f_{m_7}-1}, \ldots \right)$, where $m_7 \geq 7, m_7 \neq 10,14$, and $4x_{m_7-3}+5y_{m_7-3}+6z_{m_7-3} = m_7-3$. Moreover, if $m_7 = m_5+6$, then $(x_{m_7-3}, y_{m_7-3}, z_{m_7-3}) \neq (x_{m_5-3}, y_{m_5-3}, 1+z_{m_5-3})$. \item[\@ifstar{{\mage (A5)}\xspace}{{\mage A5}\xspace}.] Case 2(c)(ii)($\beta$)(II)(C)(i): $ \phi(\pi) = \left(3^1, \left(\frac{m_9+5}{2} \right)^2, m_9^{f_{m_9-1}}, \ldots \right)$, where $m_9 \geq 7$ is odd. \item[\@ifstar{{\mage (A6)}\xspace}{{\mage A6}\xspace}.] Case 2(c)(ii)($\beta$)(II)(C)(ii): $ \phi(\pi) = \left(3^1, \left(\frac{m_9}{2} +2\right)^1, \left(\frac{m_9}{2} + 3 \right)^1, m_9^{f_{m_9-1}}, \ldots \right)$, where $m_9 \geq 7$ is even. \end{enumerate} Each case above is individually injective (we can find $\pi$ from $\phi(\pi)$). We explain why the map $\phi$ is injective overall so far, and we do this by confirming that no two distinct cases contain common partitions. In Case \@ifstar{{\mage (A1)}\xspace}{{\mage A1}\xspace}, the second smallest and the third smallest parts differ by at least $3$, and the frequency of the second smallest part is $1$. This distinguishes it from all the other cases. In Case \@ifstar{{\mage (A2)}\xspace}{{\mage A2}\xspace}, the number $4$ is not present as a part, which distinguishes it from Cases \@ifstar{{\mage (A3)}\xspace}{{\mage A3}\xspace} and \@ifstar{{\mage (A4)}\xspace}{{\mage A4}\xspace}, and it contains $5$ as a part, which distinguishes it from Cases \@ifstar{{\mage (A5)}\xspace}{{\mage A5}\xspace} and \@ifstar{{\mage (A6)}\xspace}{{\mage A6}\xspace}. In Cases \@ifstar{{\mage (A3)}\xspace}{{\mage A3}\xspace} and \@ifstar{{\mage (A4)}\xspace}{{\mage A4}\xspace}, the number $4$ is present as a part, which distinguishes it from Cases \@ifstar{{\mage (A5)}\xspace}{{\mage A5}\xspace} and \@ifstar{{\mage (A6)}\xspace}{{\mage A6}\xspace}. Cases \@ifstar{{\mage (A5)}\xspace}{{\mage A5}\xspace} and \@ifstar{{\mage (A6)}\xspace}{{\mage A6}\xspace} are distinguished by the frequency of the second smallest part. What remains is to show that Cases \@ifstar{{\mage (A3)}\xspace}{{\mage A3}\xspace} and \@ifstar{{\mage (A4)}\xspace}{{\mage A4}\xspace} can be distinguished, and we show this by demonstrating the cases have no common element in the image of $\phi$. Suppose, to the contrary, that Cases \@ifstar{{\mage (A3)}\xspace}{{\mage A3}\xspace} and \@ifstar{{\mage (A4)}\xspace}{{\mage A4}\xspace} have a common element. Then $(x_{m_7-3}, y_{m_7-3}, z_{m_7-3}) = (x_{m_5-3}, y_{m_5-3}, 1+z_{m_5-3})$. From the relations $4x_{m_5-3}+5y_{m_5-3}+6z_{m_5-3} = m_5-3$ and $4x_{m_7-3}+5y_{m_7-3}+6z_{m_7-3} = m_7-3$, we obtain $m_7 = m_5+6$. But if $m_7 = m_5+6$, then $(x_{m_7-3}, y_{m_7-3}, z_{m_7-3}) \neq (x_{m_5-3}, y_{m_5-3}, 1+z_{m_5-3})$, giving the required contradiction. We follow the same reasoning below. We collect cases according to the frequency of 3 in partitions in the range of $\phi$. We then explain why all the distinct cases with fixed frequency of 3 have no partitions in common in their range. We leave the verification that each of the different cases for fixed frequency of 3 in the range of $\phi$ are individually injective to the reader. Next we organize the cases where the frequency of $3$ in $\phi(\pi)$ is $2$. \begin{itemize} \item[\@ifstar{{\mage (B1)}\xspace}{{\mage B1}\xspace}.] Case 2(a) : $\phi(\pi) = \left(3^2, 4^2, 5^1, (L-16), \ldots, (L+3)^{f_{L+3} - 1}\right).$ \item[\@ifstar{{\mage (B2)}\xspace}{{\mage B2}\xspace}.] Case 2(c)(ii)($\alpha$): $\phi(\pi)=(3^2,4^{f_4},5^{f_5}, \ldots)$, where $f_4=0$ or $f_5 = 0$. \item[\@ifstar{{\mage (B3)}\xspace}{{\mage B3}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(ii)(b)(i): $ \phi(\pi) = \left(3^2, 4^1, 5^2, 8^{f_8-1},\ldots \right)$, where $f_8 \geq 1$. \item[\@ifstar{{\mage (B4)}\xspace}{{\mage B4}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(ii)(b)(ii): $ \phi(\pi) = \left(3^2, 4^1, 5^1, (m_2-3)^1, m_2^{f_{m_2}-1}, \ldots \right)$, where $9 \geq m_2 < L+3$. \item[\@ifstar{{\mage (B5)}\xspace}{{\mage B5}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(ii)(b)(iii): $\phi(\pi) = \left(3^2, 4^2, 5^2, 7^0, (L-9)^1, (L+3)^{f_{L+3}-1} \right).$ \end{itemize} These cases are distinguished by their frequencies of $4$ and $5$. There is only one case where the frequency of $3$ in $\phi(\pi)$ is $3$: \begin{itemize} \item[\@ifstar{{\mage (C1)}\xspace}{{\mage C1}\xspace}.] Case 2(c)(i): $\phi(\pi) = \left(3^3, 4^{f_4-1},5^{f_5-1}, 6^{f_6}, \ldots \right)$. \end{itemize} So it is distinguishable from other cases. Next we organize the cases in which the frequency of $3$ in $\phi(\pi)$ is $4$. \begin{itemize} \item[\@ifstar{{\mage (D1)}\xspace}{{\mage D1}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(iv)(b)(i): $ \phi(\pi) = \left(3^4, 6^3, 13^{f_{13}-1}, \ldots \right)$, where $f_{13} \geq 1$. \item[\@ifstar{{\mage (D2)}\xspace}{{\mage D2}\xspace}.] Case 2(c)(ii)($\beta$)(II)(A): $\phi(\pi) = \left(3^4, 4^{{f_4}-3}, 7^{f_7}, \ldots \right) $, where $f_4 \geq 3$. \item[\@ifstar{{\mage (D3)}\xspace}{{\mage D3}\xspace}.] Case 2(c)(ii)($\beta$)(II)(B)(ii)(a): $\phi(\pi) = \left(3^4, 6^2, 10^{f_{10}-2}, \ldots \right)$, where $f_{10} \geq 2$. \end{itemize} Thus, when the frequency of $3$ in $\phi(\pi)$ is $4$, these cases are distinguishable by the frequency of 6 in the image. Next we organize the cases in which the frequency of $3$ in $\phi(\pi)$ is $5$. \begin{itemize} \item[\@ifstar{{\mage (E1)}\xspace}{{\mage E1}\xspace}.] Case 2(c)(ii)($\beta$)(I)(A): $ \phi(\pi)= \left(3^5, 5^{f_5-3}, 7^{f_7}, \ldots\right)$, where $f_5 \geq 3$. \item[\@ifstar{{\mage (E2)}\xspace}{{\mage E2}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(ii)(a): $ \phi(\pi) = \left(3^5, 4^1, 7^{f_7-2}, \ldots \right)$, where $f_7 \geq 2$ . \end{itemize} Thus, when the frequency of $3$ in $\phi(\pi)$ is $5$, these cases are distinguishable by the frequency of 4 in the image. Next we organize the cases in which the frequency of $3$ in $\phi(\pi)$ is $6$. \begin{itemize} \item[\@ifstar{{\mage (F1)}\xspace}{{\mage F1}\xspace}.] Case 1 with $f=1$: $\phi (\pi) = \left(3^6, 4^{\alpha}, 5^{\beta}, 6^{\gamma}, 7^{\delta}, \ldots \right)$, where $\alpha, \beta, \gamma$ and $\delta$ are nonnegative integers with at least one positive. \item[\@ifstar{{\mage (F2)}\xspace}{{\mage F2}\xspace}.] Case 2(c)(ii)($\beta$)(II)(B)(iii): $ \phi(\pi) = \left(3^6, 14^{f_{14}-1}, \ldots \right)$, where $f_{14} \geq 1$. \end{itemize} Thus, when the frequency of $3$ in $\phi(\pi)$ is $6$, these cases are distinguishable. Next we organize the cases in which the frequency of $3$ in $\phi(\pi)$ is $7$. \begin{itemize} \item[\@ifstar{{\mage (G1)}\xspace}{{\mage G1}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(iv)(a): $ \phi(\pi) = \left(3^7, 4^2, 12^{f_{12}-2}, \ldots \right)$, where $f_{12} \geq 2$. \item[\@ifstar{{\mage (G2)}\xspace}{{\mage G2}\xspace}.] Case 2(c)(ii)($\beta$)(I)(C)(ii)(b)(i): $ \phi(\pi) = \left(3^7, \left(\frac{m_6-1}{2} \right)^2, m_6^{f_{m_6}-1}, \ldots \right)$, where $m_6 \geq 11$ is odd. \item[\@ifstar{{\mage (G3)}\xspace}{{\mage G3}\xspace}.] Case 2(c)(ii)($\beta$)(I)(C)(ii)(b)(ii): $ \phi(\pi) = \left(3^7, \left(\frac{m_6}{2}-1 \right)^1, \left(\frac{m_6}{2} \right)^1, m_6^{f_{m_6}-1}, \ldots \right)$, where $m_6 \geq 11$ is even. \item[\@ifstar{{\mage (G4)}\xspace}{{\mage G4}\xspace}.] Case 2(c)(ii)($\beta$)(II)(B)(ii)(b): $\phi(\pi) = (3^7, (m_8-7)^1, m_8^{f_{m_8}-1}, \ldots)$, where $m_8 \geq 11$. \end{itemize} Thus, when the frequency of $3$ in $\phi(\pi)$ is $7$, the next parts after $3$ and their frequencies distinguish the various cases. There is only one case in which the frequency of $3$ in $\phi(\pi)$ is $8$: \begin{itemize} \item[\@ifstar{{\mage (H1)}\xspace}{{\mage H1}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(iii)(b): $ \phi(\pi) = \left(3^8, (m_3-8)^1, m_3^{f_{m_3}-1}, \ldots \right)$, where $m_3 \geq 12$ and $f_{m_3} \geq 1$. \end{itemize} Next we organize the cases in which the frequency of $3$ in $\phi(\pi)$ is $9$. \begin{itemize} \item[\@ifstar{{\mage (I1)}\xspace}{{\mage I1}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(iii)(a): $\phi(\pi) = \left(3^9, 11^{f_{11}-2}, \ldots \right)$, where $f_{11} \geq 2$ \item[\@ifstar{{\mage (I2)}\xspace}{{\mage I2}\xspace}.] Case 2(c)(ii)($\beta$)(I)(B)(iv)(b)(ii): $ \phi(\pi) = \left(3^9, 4^{\alpha}, 5^{\beta}, 6^{\gamma}, 7^{\delta}, m_4^{f_{m_4}-1}, \ldots, \right)$, where $\alpha, \beta, \gamma$ and $\delta$ are nonnegative integers such that at least one of these is positive and $m_4 \geq 14$. \end{itemize} Thus, when the frequency of $3$ in $\phi(\pi)$ is $9$, these cases are distinguishable. There is only case in which the frequency of $3$ in $\phi(\pi)$ is $10$. \begin{itemize} \item[\@ifstar{{\mage (J1)}\xspace}{{\mage J1}\xspace}.] Case 2(c)(ii)($\beta$)(I)(C)(ii)(a): $ \phi(\pi) = \left(3^{10}, 10^{f_{10}-2}, \ldots \right)$, where $f_{10} \geq 2$. \end{itemize} Finally, there is only one case in which the frequency of $3$ in $\phi(\pi)$ is $6f$ for some $f \geq 2$. \begin{itemize} \item[\@ifstar{{\mage (K1)}\xspace}{{\mage K1}\xspace}.] Case $1$ with $f \geq 2$. $\phi (\pi) = \left(3^6, 4^{\alpha}, 5^{\beta}, 6^{\gamma}, 7^{\delta}, \ldots \right)$, where $\alpha, \beta, \gamma$ and $\delta$ are some nonnegative integers such that at least one of these is positive. \end{itemize} Hence all the cases are distinguishable, and the map $\phi$ is injective. This shows nonnegativity of the coefficient of $q^N$ in $H_{L,3,L}(q)$ when $L \geq 22$ and $N \geq 21$. To show these coefficients are positive, we find an element of the codomain of $\phi$ that is not in its range. In all cases such an element will have frequency of 3 equalling 4, and these can be compared to \@ifstar{{\mage (D1)}\xspace}{{\mage D1}\xspace}* - \@ifstar{{\mage (D3)}\xspace}{{\mage D3}\xspace}* to ensure they are not in the range of $\phi$. If $N=21$ and $N=22$, the partitions $\pi_{21} = (3^4, 4^1, 5^1)$ and $\pi_{22} = (3^4, 5^2)$ are partitions not in the range but in the codomain of $\phi$. For the remaining cases, we need the following result: for any positive integer $n \geq 6$, the equation \begin{equation*} 6x_6 + 7x_7 + \cdots + 11x_{11} = n \end{equation*} has a solution where $x_6, \ldots, x_{11}$ are nonnegative integers (see \cite[Lemma 8]{BR20} for a proof of a more general result). If $N \geq 23$, then $N-17 \geq 6$, so we can fix a solution with nonnegative integers to the equation \begin{equation*} 6x_6 + 7x_7 + \cdots + 11x_{11} = N - 17. \end{equation*} Then the partition $\pi_N = (3^4, 5^1, 6^{x_6}, \ldots, 11^{x_{11}}, \ldots)$ is not in the range but in the codomain of $\phi$. \end{proof} We are left with the cases $4 \leq L \leq 21$. We deal with $7 \leq L \leq 21$ in Lemma \ref{Two2} below. The proof of this lemma is similar in spirit to the proof of \cite[Theorem 19]{BR20}. \begin{lemma} \label{Two2} Let $7 \leq L \leq 21$ and $N_L= L^2+10L+7$. Then the coefficient of $q^N$ in $H_{L,3,L}(q)$ is nonnegative whenever $N \geq N_L $. \end{lemma} \begin{proof} Again it suffices to show that for fixed $7 \leq L \leq 21$ and $N \geq N_L $, there is an injective map $\phi$ as in \eqref{eq:gamma}. Let $\pi = \left(4^{f_4}, \ldots, L^{f_L}, \ldots, (L+3)^{f_{L+3}}\right)$ be a partition of $N$ in $D_{L,3}$ and let $f = f_L$. We define $\phi(\pi)$ in cases depending on the value of $f$. Case $1$: $f$ is positive and $f \equiv 0$ (mod $3$). Then define $$ \phi(\pi) = \left(3^{\frac{L f}{3}}, 4^{f_4}, \ldots, L^0, \ldots, (L+3)^{f_{L+3}}\right).$$ Case 2: $f \equiv 1$ (mod $3$). Then define $$ \phi(\pi) = \left(3^{L\left(\frac{f-1}{3}\right)+1}, 4^{f_4}, \ldots, (L-3)^{f_{L-3}+1}, \ldots, L^0, \ldots, (L+3)^{f_{L+3}}\right).$$ Case $3$: $f \equiv 2$ (mod $3$). Then define $$ \phi(\pi) = \left(3^{L\left(\frac{f-2}{3}\right)+2}, 4^{f_4}, \ldots, (L-3)^{f_{L-3}+2}, \ldots, L^0, \ldots, (L+3)^{f_{L+3}}\right).$$ Case $4$: $f = 0$. Since $N \geq N_L$ is large enough, either $f_{L+2} \geq 6$ or there exists an $i \neq L+2$ such that $4 \leq i \leq L+3$ and $f_i \geq 3$. Note that the condition on $N$ is in fact tight for this to happen. We have further subcases. Case $4$(i): $f_{L+2} \geq 6$. Then define $$ \phi(\pi) = \left(3^{2L+4}, 4^{f_4}, \ldots L^0, (L+2)^{f_{L+2}-6}, (L+3)^{f_{L+3}}\right). $$ Case $4$(ii): $f_{L+2} \leq 5$, and there exists an $i \neq L+2$ such that $4 \leq i \leq L+3$ and $f_i \geq 3$. Let $i_0$ be the least such number. Note $i_0 \neq L$ since $f = 0$. We have further subcases depending on whether $i_0 = L+1$ or not. Case $4$(ii)(a): $i_0 \neq L+1$. Then define $$ \phi(\pi) = \left(3^{i_0}, 4^{f_4}, \ldots, i_0^{f_{i_0}-3}, \ldots L^0, \ldots, (L+3)^{f_{L+3}}\right).$$ Case $4$(ii)(b): $i_0 = L+1$. Then define $$ \phi(\pi) = \left(3^3, 4^{f_4}, \ldots, (L-2)^{f_{L-2}+3}, L^0, (L+1)^{f_{L+1}-3}, \ldots, (L+3)^{f_{L+3}}\right).$$ It is easy to see that $\phi$ is injective in each case. To see that $\phi$ is injective overall, note that the frequency of $3$ modulo $L$ in the image distinguishes the cases, with the exception of Cases 4(i) and 4(ii)(a) (when $i_0 = 4$): in these two cases the frequency of 3 is 4 modulo $L$, but in Case 4(ii)(a) the frequency is precisely 4, whereas in Case 4(i) the frequency is at least $L + 4$. Thus all cases are distinguishable. Hence the map $\phi$ is injective. \end{proof} We handle the cases $4 \leq L \leq 6$ in the next three lemmas. \begin{lemma} \label{Three} The coefficient of $q^N$ in $H_{6,3,6}(q)$ is nonnegative whenever $N \geq 67$. \end{lemma} \begin{proof} Again it suffices to show that for $L = 6$ and fixed $N \geq 67$, there is an injective map $\phi$ as in \eqref{eq:gamma}. Recall that partitions of $N$ in $I_{6,3,6}$, the codomain of $\phi$, have smallest part $3$, no part equal to $6$, and largest part at most 9. Let $\pi = \left(4^{f_4}, \ldots, 6^{f_6}, \ldots, 9^{f_9}\right)$ be a partitions of $N$ in $D_{6,3}$ and let $f=f_6$. We define $\phi(\pi)$ in cases depending on the value of $f$. Case $1$: $f > 0$. Define $$ \phi(\pi) = \left(3^{2f}, 4^{f_4}, 5^{f_5}, 6^0, 7^{f_7}, 8^{f_8}, 9^{f_9} \right). $$ Case $2$: $f=0$. Then $\pi = (4^{f_4},5^{f_5}, 6^0, 7^{f_7}, 8^{f_8}, 9^{f_9})$. Since $N \geq 67$, there exists $ 4 \leq i \leq 9$ such that $i \neq 6$ and $f_i \geq 3$. Let $i_0$ be the least such number. Note that the condition on $N$ is tight for this to happen. Case $2$(i): $i_0$ is odd. So $i_0$ is $5,7$ or $9$. Define $$ \phi(\pi) = \left(3^{i_0}, \ldots, 6^0, \ldots i_0^{f_{i_0}-3} \ldots \right). $$ Case $2$(ii): $i_0 = 4$. Define $$ \phi(\pi) = \left(3^1, 4^{f_4-3}, 5^{f_5}, 6^0, 7^{f_7}, 8^{f_8}, 9^{f_9+1} \right). $$ Case $2$(iii): $i_0 = 8$. Define $$ \phi(\pi) = \left(3^3, 4^{f_4}, 5^{f_5+3}, 6^0, 7^{f_7}, 8^{f_8-3}, 9^{f_9} \right). $$ It is easy to see that $\phi$ is injective in each case. To see that $\phi$ is injective overall, note that the frequency of $3$ in the image distinguishes the cases. Hence the map $\phi$ is injective. \end{proof} \begin{lemma} \label{Four} The coefficient of $q^N$ in $H_{5,3,5}(q)$ is nonnegative whenever $N \geq 164$. \end{lemma} \begin{proof} Again it suffices to show that for $L = 5$ and fixed $N \geq 164$, there is an injective map $\phi$ as in \eqref{eq:gamma}. Recall that partitions of $N$ in $I_{5,3,5}(q)$, the codomain of $\phi$, have smallest part 3, no part equal to 5, and largest part at most 8. Let $\pi = \left(4^{f_4}, 5^{f_5}, \ldots, 8^{f_8}\right)$ be a partition of $N$ in $D_{5,3}$ and let $f$ denote $f_5$. We define $\phi(\pi)$ in cases depending on the value of $f$. Case $1$: $f$ is a positive number with $f \equiv 0$ (mod $3$). Define $$ \phi(\pi) = \left(3^{\frac{5f}{3}}, 4^{f_4}, 5^0, 6^{f_6}, 7^{f_7}, 8^{f_8} \right). $$ Case $2$: $f>1$ and $f \equiv 1$ (mod $3$). Define $$ \phi(\pi) = \left(3^{5\left(\frac{f-4}{3}\right)+4}, 4^{f_4+2}, 5^0, 6^{f_6}, 7^{f_7}, 8^{f_8} \right). $$ Case $3$: $f \equiv 2$ (mod $3$). Define $$ \phi(\pi) = \left(3^{5\left(\frac{f-2}{3}\right)+1}, 4^{f_4}, 5^0, 6^{f_6}, 7^{f_7+1}, 8^{f_8} \right). $$ We are left with the cases $f=0$ and $f=1$. Case $4$: Suppose $f=0$. Then $\pi = \left(4^{f_4}, 5^0, 6^{f_6}, 7^{f_7}, 8^{f_8} \right)$. Since $N \geq 164$ is large enough, at least one of the following conditions is true: (i) $f_4 \geq 6$; (ii) $f_6 \geq 1$; (iii) $f_7 \geq 3$; or (iv) $f_8 \geq 12$. We deal with each case below. Note that the condition on $N$ is not tight. The bound of $164$ will be required in Case $5$. Case $4$(i): $f_4 \geq 6$. Define $$ \phi(\pi) = \left(3^8, 4^{f_4-6}, 5^0, 6^{f_6}, 7^{f_7},8^{f_8} \right). $$ Case $4$(ii): $f_4 \leq 5$ and $f_6 \geq 1$. Define $$ \phi(\pi) = \left(3^2, 4^{f_4}, 5^0, 6^{f_6-1}, 7^{f_7},8^{f_8} \right). $$ Case $4$(iii): $f_4 \leq 5$, $f_6 = 0$ and $f_7 \geq 3$. Define $$ \phi(\pi) = \left(3^7, 4^{f_4}, 5^0, 7^{f_7-3},8^{f_8} \right). $$ Case $4$(iv): $f_4 \leq 5$, $f_6 = 0$, $f_7 \leq 2$ and $f_8 \geq 12$. Define $$ \phi(\pi) = \left(3^{32}, 4^{f_4}, 5^0, 7^{f_7},8^{f_8-12} \right). $$ Case $5$: $f=1$. Then $\pi = \left(4^{f_4}, 5^1, 6^{f_6}, 7^{f_7}, 8^{f_8} \right)$. Since $N \geq 164$ is large enough, at least one of the following conditions is true: (i) $f_4 \geq 1$; (ii) $f_6 \geq 11$; (iii) $f_7 \geq 7$; or (iv) $f_8 \geq 8$. We deal with each case below. Note that the condition on $N$ is tight here. Case $5$(i): $f_4 \geq 1$. Define $$ \phi(\pi) = \left(3^3, 4^{f_4-1}, 5^0, 6^{f_6}, 7^{f_7},8^{f_8} \right). $$ Case $5$(ii): $f_4 = 0$ and $f_6 \geq 11$. Define $$ \phi(\pi) = \left(3^{13}, 4^8, 5^0, 6^{f_6-11}, 7^{f_7},8^{f_8} \right). $$ Case $5$(iii): $f_4 = 0$, $f_6 \leq 10$ and $f_7 \geq 7$. Define $$ \phi(\pi) = \left(3^{18}, 4^0, 5^0, 6^{f_6}, 7^{f_7-7},8^{f_8} \right). $$ Case $5$(iv): $f_4 = 0$, $f_6 \leq 10$, $f_7 \leq 6$ and $f_8 \geq 8$ . Define $$ \phi(\pi) = \left(3^{23}, 4^0, 5^0, 6^{f_6}, 7^{f_7},8^{f_8-8} \right). $$ It is easy to see that $\phi$ is injective in each case. To see that $\phi$ is injective overall, note that the frequency of $3$ in the image distinguishes the cases. In Cases $1$, $2$ and $3$, the frequency of $3$ is $0, 4$ and $1$ modulo $5$, respectively. In Cases $4$ and $5$, it is always $2$ or $3$ modulo $5$ and different for each subcase. Hence the map $\phi$ is injective. \end{proof} \begin{lemma} \label{Five} The coefficient of $q^N$ in $H_{4,3,4}(q)$ is nonnegative whenever $N \geq 1042$. \end{lemma} \begin{proof} Again it suffices to show that for $L = 4$ and fixed $N \geq 1042$, there is an injective map $\phi$ as in \eqref{eq:gamma}. Recall that partitions of $N$ in $I_{4,3,4}(q)$, the codomain of $\phi$, have smallest part $3$, no part equal to $4$, and largest part at most 7. Let $\pi = (4^{f_4},5^{f_5}, 6^{f_6}, 7^{f_7})$ be a partitions of $N$ in $D_{4,3}$ and let $f = f_4$. We define $\phi(\pi)$ in cases depending on $f$. For $n \geq 10$, Lemma \ref{5,6,7} guarantees that there exists nonnegative integer solutions $(x_n,y_n,z_n)$ of the equation \begin{equation}\label{eq:definvert} n = 5x_n+6y_n+7z_n. \end{equation} For each $n \geq 10$, fix a nonnegative integer solution $(x_n,y_n,z_n)$ to the equation. Case $1$: $10 \leq f < 100$. Define $$ \phi(\pi) = (3^f, 4^0, 5^{f_5+x_f}, 6^{f_6+y_f}, 7^{f_7+z_f}). $$ It is easy to see that $\phi$ is injective in this case: given an element $\phi(\pi)$ whose frequency is between 10 and 100, the frequency of 3 gives $f$, and the values of $x_f, y_f$ and $z_f$ can be found from \eqref{eq:definvert}. The partition $\pi$ can then be reconstructed. Similar arguments can be used to show that $\phi$ is injective in the other cases below. Case $2$: $f \geq 100$. Define $$ \phi(\pi) = (3^{f+30}, 4^0, 5^{f_5+x_{f-90}}, 6^{f_6+y_{f-90}}, 7^{f_7+z_{f-90}}). $$ Case $3$: $0 \leq f \leq 9$. Since $N \geq 1042$ is large enough, at least one of the following conditions is true: (i) $f_5 \geq 62$; (ii) $f_6 \geq 57$; or (iii) $f_7 \geq 53$. We deal with each case below. Note that the condition on $N$ is in fact tight here. Case $3$(i): $f_5 \geq 62$. Define $$ \phi(\pi) = \left(3^{f+100}, 4^0, 5^{f_5-62+x_{f+10}}, 6^{f_6+y_{f+10}}, 7^{f_7+z_{f+10}} \right). $$ Case $3$(ii): $f_5 \leq 61$ and $f_6 \geq 57$. Define $$ \phi(\pi) = \left(3^{f+110}, 4^0, 5^{f_5+x_{f+12}}, 6^{f_6-57+y_{f+12}}, 7^{f_7+z_{f+12}} \right). $$ Case $3$(iii): $f_5 \leq 61$, $f_6 \leq 56$ and $f_7 \geq 53$. Define $$ \phi(\pi) = \left(3^{f+120}, 4^0, 5^{f_5+x_{f+11}}, 6^{f_6+y_{f+11}}, 7^{f_7-53+z_{f+11}} \right). $$ It is easy to see that $\phi$ is injective in each case. To see that $\phi$ is injective overall, note that the frequency of $3$ in the image distinguishes the cases. Hence the map $\phi$ is injective. \end{proof} Lemmas \ref{Helpful2}, \ref{Two2}, \ref{Three}, \ref{Four} and \ref{Five} show that for N larger than a small number, the coefficient of $q^N$ in $H_{L,s,L}(q)$ is nonnegative. With these results, the use of computer searches, and Theorem \ref{Generals} (with $s=3$), we can now prove Theorem \ref{GLthree}. \begin{proof}[Proof of Theorem \ref{GLthree}] Let $H_{L,3,L}(q) = \sum_{N \geq 0} a_{L,N} q^N $ and $G_{L,3}(q) = \sum_{N \geq 0} b_{L,N} q^N$. By Theorem \ref{Generals}, \begin{equation}\label{eq:blnaln} b_{L,N} = a_{L,N} + a_{L,N-L} + a_{L,N-2L} + \cdots. \end{equation} First we focus on the case $L \geq 22$. By Lemma \ref{Helpful2}, the coefficients satisfy $a_{L,N} \geq 1$ whenever $N \geq 21$. For $N \leq 20$, we observe that $a_{L,N}$ is independent of $L$. To see why, the combinatorial interpretation of $a_{L,N}$ in \eqref{eq:comb} gives that, when $L \geq N + 1$, the number $a_{L,N}$ is the difference between the number of partitions of $N$ with smallest part $3$ and the number of partitions of $N$ with smallest part at least $4$; that is, the condition on the largest part of the partitions becomes superfluous. Thus, when $1 \leq N \leq 20$, since $L \geq N + 1$, we have $a_{L, N} = a_{N+1,N}$, and these 20 values can all be found by a computer search. The search finds that $a_{N+1,N}$ is negative only when $N$ is one of $4,5,8,10,12,14$ or $16$, and in each case $a_{N+1,N}$ is exactly $-1$. Thus, for any $N \geq 1$, the right hand side of \eqref{eq:blnaln} contains at most one term equal to -1, while the rest of the terms are positive. It follows from \eqref{eq:blnaln} that $b_{L,N}$ is negative only when $N$ is one of $4,5,8,10,12,14$ or $16$, and in each case $b_{L,N}$ is exactly $-1$. This gives Theorem \ref{GLthree} for $L \geq 22$. The remaining cases are easier. For $7 \leq L \leq 21$, Lemma \ref{Two2} renders the unknown values of $a_{L,N}$ to the cases $N \leq N_L$, a finite set of values that can be searched using a computer. These computations along with \eqref{eq:blnaln} give Theorem \ref{GLthree}. Similarly, for $4 \leq L \leq 6$, the Lemmas \ref{Three}, \ref{Four} and \ref{Five} leave only a finite number of unknown values for $a_{L,N}$ for small $N$, which can all be found using a computer. These values and an application of \eqref{eq:blnaln} complete the proof of Theorem \ref{GLthree}. \end{proof} \begin{remark} The programming for $7 \leq L \leq 21$ and $N \leq N_L$ turned out to be a difficult task in Magma. For example, it is hard to calculate the number of partitions of $250$ with all parts in the set \{4,5, \ldots, 17\} using Magma. The command $Partitions(250, min\_part=4, max\_part =17). cardinality()$ in Sage also does not work (it takes too long and ultimately stops working). We overcame this problem through another related command and some mathematics. In Sage, we noticed that the command $Partitions(n, max\_part =17). cardinality()$ is very fast even for large $n$ (even until $n=1000000$, it is fast!) Thus, we calculate the number of partitions with all parts in the set $\{4,5, \ldots, 17\}$ in terms of the number of partitions $p_{17}(n)$ of $n$ with maximum part at most $17$. We do this by viewing partitions with all parts in the set $\{4,5, \ldots, 17\}$ as partitions with maximum part $17$ and no part $1$, $2$ and $3$. Let $A$, $B$ and $C$ denote the set of partitions of $n$ with maximum part $17$ and also having $1$, $2$ and $3$ as a part, respectively. Then we need to find the cardinality of the set $A^{\complement} \cap B^{\complement} \cap C^{\complement}$. Using inclusion and exclusion principle, we get that the number of partitions of $n$ with all parts in the set $\{4,5, \ldots, 17\}$ is given by $p_{17}(n)-p_{17}(n-1)-p_{17}(n-2)+p_{17}(n-4)+p_{17}(n-5)-p_{17}(n-6)$, and thus can be easily computed. \end{remark} \section{The series $G_{L,s}(q)$ for $s \geq 4$ and other generalizations} For fixed $L$ and $s$, let $p_{L,s}(q)$ be the smallest degree polynomial in $q$ with smallest coefficients such that $G_{L,s}(q) + p_{L, s}(q) \succeq 0$. This paper finds $p_{L,s}(q)$ for $s=3$ and all $L$, while the cases $s=2$ (found in Theorem \ref{s=2}) and $s=1$ (found in \cite{BerkovichAlexander2017SEPI}) were found earlier. One goal is to find $p_{L,s}(q)$ for general $s$ and $L$. Our numerical computations for $s=4$ and $s=5$ do not suggest a nice form for $p_{L,s}(q)$. A simpler problem, though also interesting, is to determine the degree of $p_{L,s}(q)$ for general $L$ and $s$. Furthermore, we suspect that for fixed $s \geq 4$ that $p_{L,s}(q)$ stabilizes; that is, there is an $L_0$ such that $p_{L,s}(q) = p_{L_0, s}(q)$ for all $L \geq L_0$, as in the case for $s=3$ (Theorem \ref{GLthree} gives $L_0 = 10$ when $s=3$). Finding $L_0$ as a function of $s$ is also another open problem. Moreover, series analogous to $G_{L,s}(q)$ for partitions with further restrictions on parts, such as for partitions with only odd parts or for self conjugate partitions, may prove interesting.
\section{Introduction} Much recent work has focused on how AI systems can learn what to do from human feedback~\cite{jeon2020reward}. The most popular approach---and the focus of this paper---is \textit{imitation learning} (IL), in which an agent learns to complete a task by mimicking demonstrations of a human. As demonstrations can be costly to collect, we would like to learn representations that lead to better imitation performance given limited data. Many existing representation learning (RepL) methods in Computer Vision and Reinforcement Learning do exactly this, by extracting effective visual~\cite{chen2020simple} or temporal~\cite{lee2020predictive} information from inputs. A natural hypothesis is that RepL would also add value for IL. We test this hypothesis by investigating the impact of common RepL algorithms on Behavioral Cloning (BC) and Generative Adversarial Imitation Learning (GAIL). We survey a wide variety of RepL methods, and construct a modular framework in which each design decision can be varied independently. As previous work has found that image augmentation alone can outperform more complex representation learning techniques~\cite{laskin2020reinforcement, kostrikov2020image}, we make sure to compare against baselines that use augmentation. To ensure generalizability of our results, we evaluate on ten tasks selected across three benchmarks, including MAGICAL~\cite{toyer2020magical}, Procgen~\cite{cobbe2020leveraging} and the DeepMind Control Suite (DMC)~\cite{tassa2018deepmind}. We find that, on average, RepL methods do significantly outperform vanilla BC, but this benefit can be obtained simply by applying well-tuned image augmentations during BC training. To understand the discrepancy between this result and the success of RepL in computer vision and reinforcement learning, we apply clustering algorithms and attribution methods to qualitatively investigate the learned representations and policies, surfacing a number of intriguing hypotheses for investigation in future work. This paper is, to the best of our knowledge, the first to provide a systematic empirical analysis of different representation learning methods for imitation learning in image-based environments. Concretely, our Empirical Investigation of Representation Learning for Imitation (EIRLI) makes the following contributions: \begin{enumerate}[leftmargin=15pt] \item We identify meaningful axes of variation in representation learning algorithm design, allowing us to construct a modular framework to conceptually analyze these designs. \item We use this framework to build a well documented, modular, and extensible code base, which we release at \href{https://github.com/HumanCompatibleAI/il-representations/}{\texttt{github.com/HumanCompatibleAI/eirli}}. \item We conduct an extensive comparison of popular RepL methods in the imitation learning setting, and show that RepL has limited impact on task performance relative to ordinary image augmentations. By analysing our learned representations and policies, we identify several promising directions for future work at the intersection of representation learning and decision-making. \end{enumerate} \section{Design decisions in representation learning} \label{sec:repl-analysis} \begin{figure} \centering \includegraphics[trim={0.2cm 3.6cm 0.2cm 0.2cm},width=\textwidth]{Figures/ILR_Diagram.pdf} \caption{A framework for the use of representation learning (RepL) in imitation learning. In the pretraining setting, we first train the encoder with RepL, then finetune end-to-end with IL. In the joint training setting, the RepL objective is used as an auxiliary loss throughout IL training.} \label{fig:pipeline_diagram} \end{figure} To apply representation learning (RepL) effectively, it is important to understand the relative impact of different RepL algorithm design choices on downstream task performance. We argue that for many common RepL algorithms, these design choices can be broken down along a common set of axes, which we show in \cref{table:existing-algorithms-vision} and \cref{table:existing-algorithms-rl-summary}. In this section, we elaborate on our conceptual breakdown both as a literature review and as an implementation walkthrough of our RepL framework. We summarize existing RepL for image classification algorithms in Table~\ref{table:existing-algorithms-vision} and a selection of RepL for reinforcement learning algorithms in Table~\ref{table:existing-algorithms-rl-summary}. The full version of the table deconstructing current RepL methods in reinforcement learning can be found in the appendix in Table~\ref{table:existing-algorithms-rl}. \cite{kostrikov2020image} \begin{table*}[t] \caption{Design choices made in representation learning for image recognition. ``Augmentation'', ``Momentum'', and ``Projection'' show whether image augmentation, target encoder momentum, and projection heads were used, respectively. ``Pre/Joint'' shows whether RepL is used as a pretraining step, or is jointly learned with the downstream task (typically as an auxiliary loss).} \label{table:existing-algorithms-vision} \begin{center} \begin{tabular}{@{}lccccccc@{}} \toprule {\bf Algorithm} & {\bf Task} & {\bf Augmentation} & {\bf Momentum} & {\bf Projection} & {\bf Pre/Joint} \\ \midrule VAE~\cite{kingma2013auto} & Reconstruction & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & Pre \\ AugMix~\cite{hendrycks2019augmix} & Consistency & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & Joint \\ FixMatch~\cite{sohn2020fixmatch} & Consistency & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & Joint \\ CPC~\cite{oord2018representation} & Contrastive & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} & Pre \\ MoCo~\cite{he2020momentum} & Contrastive & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & Pre \\ SimCLR~\cite{chen2020simple} & Contrastive & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} & Pre \\ SimCLRv2~\cite{chen2020big} & Contrastive & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} & Pre \\ BYOL~\cite{grill2020bootstrap} & Bootstrap & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & Pre \\ \bottomrule \end{tabular} \vspace{-5mm} \end{center} \end{table*} \setlength{\tabcolsep}{2pt} \begin{table}[H] \caption{Design choices made in a selection of representation learning algorithms for reinforcement learning (full table in the appendix). Act, Aug, Mom, Proj and Comp respectively show whether action conditioning, augmentation, momentum, projection heads, and compression were used. P/J determines whether the representation learning is an initial (P)retraining step, or is (J)ointly learned alongside reinforcement learning. R/C in the Task column refer to Reconstruction/Contrastive. Note that different papers may use different sets of augmentations.} \label{table:existing-algorithms-rl-summary} \begin{center} \begin{tabular}{@{}lcccccccccc@{}} \toprule {\bf Algorithm} & {\bf Task} & {\bf RL alg.} & {\bf Context} & {\bf Target} & {\bf Act} & {\bf Aug} & {\bf Mom} & {\bf Proj} & {\bf Comp} & {\bf P/J} \\ \midrule World models~\cite{ha2018world} & R & CMA-ES & $o_t$ & $o_t, o_{t+1}$ & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & P \\ PlaNet~\cite{hafner2019learning} & R & MPC + CEM & $o_{1:t}$ & $o_{t+1:T}, r_{t+1:T}$& \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & J \\ CURL~\cite{laskin2020curl} & C & SAC & $o_t$ & $o_t$ & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} & J \\ PI-SAC~\cite{lee2020predictive} & C & SAC & $o_t$ & $o_{t+k}, r_{t+k}$ & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & J \\ ATC~\cite{stooke2020decoupling} & C & SAC, PPO & $o_t$ & $o_{t+k}$ & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} & P \\ \bottomrule \end{tabular} \end{center} \end{table} \subsection{Target selection} Most RepL methods can be thought of as proxy tasks in which a dataset of $(x, y)$ pairs is provided and the network must model some aspects of the relationship between $x$ and $y$. Since the learning signal derives from the relationship between $x$ and $y$, the choice of $x$ and $y$ thus has a significant impact on exactly what information is modeled. We refer to the inputs for which representations $z$ are computed as the ``context'' $x$, and the inputs with which they are related are the ``targets'' $y$. Often, the target is a (possibly transformed) version of a context. In image classification, learned representations must capture the label-relevant information in a single input image. It is assumed that most images used for representation learning will not have labels or other task-relevant metadata. Thus, the context and target are typically both set to the original image, after which they may be augmented in different ways. For example, in a Variational Autoencoder (VAE) \cite{kingma2013auto}, an input image (context) is encoded into a vector representation and then decoded back into pixels, which is then compared against the same input image (now interpreted as a target). Once we move to sequential decision-making, the observations have a sequential structure, and there is a notion of actions and a reward function. These can all be leveraged in the construction of the contexts and targets. For example, a \emph{Temporal VAE} is identical to a regular VAE, except that for a context observation $o_t$, we set the target to be a future observation $o_{t+k}$. Now, the input observation $o_t$ (context) is encoded into a vector representation and then decoded back into pixels, which is then compared against the \emph{future} observation $o_{t+k}$ (target). By using a temporal target, we now incentivize representations that contain \emph{predictive} information~\cite{schmidhuber1991reinforcement}. In reinforcement learning, another option is to add the reward $r_t$ to the target to encourage learning representations that are useful for planning. \subsection{Loss type} We divide modern methods for representation learning into four categories: \prg{Reconstruction.} Here, the goal is to reconstruct the target $y$ from the representation $z$. Both the VAE and temporal VAE in the previous section use a reconstructive loss, in which a \emph{decoded image} $d_{\phi}(z)$ is compared against the target $y$, and that reconstruction loss is combined with a regularization term. \prg{Contrast.} Contrastive methods take a series of context--target pairs $(x_1, y_1), (x_2, y_2), \ldots, (x_K, y_K)$ and use the same network to encode both the context and target into latent representations $z_i \sim e(z \mid x_i)$ and $z_i' \sim e(z \mid y_i)$. A contrastive loss then incentivizes $z_i$ and $z_i'$ to be similar to each other, but different from $z_j$ and $z_j'$ for all other pairs $j \neq i$. Typically, the contrastive loss function is chosen to maximize the mutual information $I(z ; y)$, such as with the InfoNCE loss function~\cite{poole2019variational}: \[ \loss{InfoNCE} = \mathbb{E}\left[\log \frac{e^{f\left(x_{i}, y_{i}\right)}}{\frac{1}{K} \sum_{j=1}^{K} e^{f\left(x_{i}, y_{j}\right)}}\right] \] $f$ could, for instance, be a bilinear function $f(x_i, y_i) = z_i^T W z_i'$, where $z_i \sim e(z \mid x_i)$, $z_i' \sim e(z \mid y_i)$, and $W \in \mathbb R^{n \times n}$ is a learned parameter matrix. \prg{Bootstrapping.} This is a simplified variant of contrastive learning. Given a related context $x$ and target $y$, a bootstrapping method predicts a moving-average-encoded target from the encoded context. Bootstrapping does not need a large dataset of negatives to prevent the representation from collapsing to a single point; instead, it prevents collapse by stopping gradients from propagating through the target encoder. \prg{Consistency.} These methods, such as AugMix~\cite{hendrycks2019augmix} and FixMatch~\cite{sohn2020fixmatch}, include auxiliary loss terms that encourage the model to produce similar distributions over $y$ for different transformations of the same input image. \prg{Compression.} A representation $z \sim e_\theta(\cdot \mid x)$ should contain enough information about the input $x$ to solve downstream tasks. Ideally, $e_\theta$ should also extract only the \textit{minimum} amount of information about $x$ that is necessary to perform well. We refer to this as \textit{compression}. As a form of explicit compression, we implement the \emph{conditional entropy bottleneck} (CEB)~\cite{fischer2020conditional}, which approximately minimizes $I(X ; Z \mid Y)$. \subsection{Augmentation} In many algorithm designs, one or both of the context frame and target frame undergo augmentation before being processed by the encoder and decoder networks. In some algorithms, like SimCLR, this augmentation is the main source of noise causing transformed representations of the same input to not be purely identical. In other algorithms, it simply helps promote generalization by sampling from a wider image distribution than would be done naturally. \subsection{Neural network} In the case of a VAE, the neural network consists of two parts. The \emph{encoder} produces the latent representation from the input, while the \emph{decoder} reconstructs the input from the latent representation. We generalize this terminology and \emph{define} the encoder for an arbitrary RepL method to be that part of the neural network that is used to compute the representation, and the decoder to be the rest of the neural network. Under this definition, the downstream tasks (which could include imitation, classification, reinforcement learning, etc.) only require the encoder, not the decoder. Note that the ``decoder'' may not convert the learned representation into some human-interpretable format; it is simply those parts of the neural network that are required by the RepL method but that do not serve to compute the representation. \subsubsection{Encoder} The encoder is the core component of a representation learner: it is responsible for mapping input targets $x$ into $z$ vectors that are used as the learnt representation in downstream tasks. \prg{Recurrent encoders.} In some cases, a ``context'' could be a sequence of frames instead of a single frame, and the encoder could compress that into a single representation of the past. This paper doesn't address recurrent encoders, opting instead to make all encoders operate on single framestacks. \prg{Momentum encoders.} In contrastive tasks, learning a high-quality representation often requires large batch sizes, since the difficulty of the contrastive task scales with the number of negatives. However, batches of the appropriate difficulty can be so large that encoding the negative targets becomes prohibitively compute- and memory-intensive. \citet{he2020momentum} propose reusing negative targets from previous batches to alleviate this cost. One challenge with reusing targets is that the encoder can change too quickly during training, in which case negative targets from previous batches become ``stale''. Thus \citet{he2020momentum} use a separate \textit{target encoder} which is updated slowly enough that targets do not become stale too quickly. Specifically, the target encoder's weights $\theta_t$ are updated to track the main context encoder weights $\theta_c$ using the update rule $\theta_t \leftarrow \alpha \theta_t + (1 - \alpha) \theta_c$. $\alpha$ is referred to as a \textit{momentum} parameter, and is typically set to some value close to 1 (e.g. $\alpha = 0.999$). \subsubsection{Decoder} Decoders are optional neural network layers applied before a loss is calculated, but which are \emph{not} included in the learnt encoder used at transfer time. They take in the $z$ output by the encoder (and optional additional information), and produce an input to the loss function. \prg{Image reconstruction.} The most common historical form of decoder in a RepL algorithm is the image reconstruction decoder, which has historically been used by VAEs and similar model designs to ``decode'' a predicted image from a representation bottleneck. This predicted image is used in calculating a MLE loss against the true image, but is discarded before downstream transfer tasks. \prg{Projection heads.} Projection heads are multi-layer perceptrons that take in the output of the encoder and project it into a new space over which the loss can then be calculated. Recent work has shown these to be useful for contrastive learning~\cite{chen2020simple}. \prg{Action conditioning.} Temporal tasks can be made easier by conditioning on the action $a_t$. However, for an encoder to be used for reinforcement learning or imitation, the representation must not depend on the current action $a_t$. Thus, the encoder is only responsible for learning a $z$ representation of the observation $o_t$, and is combined with a representation of the action within the decoder step. \subsection{Pretraining vs joint training} Another question is how to integrate representation learning with an RL algorithm. In image recognition, representation learning is done as a pretraining step. We experiment with this approach in this work, as well as the strategy of "joint training", where we add the representation learning loss as an \emph{auxiliary loss} while performing reinforcement learning. \section{Experiments} \label{sec:exp} Given our framework, it is straightforward to construct RepL algorithms that differ along any of the axes described in \cref{sec:repl-analysis}. In this section, we create a representative set of such algorithms and evaluate various ways of combining them with imitation learning. Although some RepL methods appear to be effective on some tasks, we find that the difference between using and not using RepL is often much less than the difference between using and not using augmentations for the imitation policy. In \cref{sec:discussion}, we discuss possible reasons why RepL does not have a greater effect, and suggest alternative ways that RepL could be used more fruitfully. \subsection{Experiment setup} \prg{Environments and training data.} We evaluate on ten tasks taken from three benchmark domains: {DMC}{}~\cite{tassa2018deepmind}, Procgen~\cite{cobbe2020leveraging}, and MAGICAL~\cite{toyer2020magical}. Here we briefly explain our choice of tasks and datasets; for more detailed information (e.g.\ dataset sizes and collection methods), refer to \cref{appendix:hyperparams}. From {DMC}{}, we take image-based versions of the cheetah-run, finger-spin, and reacher-easy tasks. All three of these are popular benchmark tasks for deep RL and deep IL, and represent a range of difficulties (reacher-easy being the easiest, and cheetah-run being the hardest). However, they provide limited evaluation of generalisation. We use a common demonstration set for RepL and IL. \begingroup \setlength{\tabcolsep}{6pt} \begin{table*}[t!] \caption{Design decisions for representation learning algorithms used in our experiments.} \label{table:algorithms-main-expt} \begin{center} \begin{tabular}{@{}lccccc@{} \toprule {\bf Algorithm} & {\bf Task} & {\bf Context} & {\bf Target} & {\bf Act} & {\bf Aug} \\ \midrule Temporal CPC & Contrastive & $o_t$ & $o_{t+1}$ & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} \\ SimCLR & Contrastive & $o_t$ & $o_t$ & \textcolor{red}{\ding{55}} & \textcolor{mygreen}{\ding{51}} \\ VAE & Reconstructive & $o_t$ & $o_t$ & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} \\ Dynamics & Reconstructive & $o_t, a_t$ & $o_{t+1}$ & \textcolor{mygreen}{\ding{51}} & \textcolor{red}{\ding{55}} \\ Inverse Dynamics & Reconstructive & $o_t, o_{t+1}$ & $a_t$ & \textcolor{red}{\ding{55}} & \textcolor{red}{\ding{55}} \\ \bottomrule \vspace{-10mm} \end{tabular} \end{center} \end{table*} From Procgen, we choose the ``easy'' variants of the CoinRun, Fruitbot, Jumper and Miner tasks. In Procgen, different random initialisations for a given task can have wildly different appearance and structure, but still admit a common optimal policy. This makes it a much more challenging evaluation of generalization than {DMC}{}. As with {DMC}{}, we use the same demonstration set for RepL and IL. From MAGICAL we choose the MoveToRegion, MoveToCorner, and MatchRegions tasks, which represent a range of difficulty levels (MoveToRegion being the easiest, and MatchRegions being the hardest). For each task, MAGICAL defines a ``demo variant'' for training and a set of ``test variants'' for evaluating robustness to changes in dynamics, appearance, etc. Unlike {DMC}{} and Procgen, our MAGICAL experiments augment the demonstration set with additional demo variant random rollouts for RepL training. This models the setting in which it is cheap to collect additional data for self-supervised learning, but expensive to collect demonstrations. We include more detailed environment setups in Appendix \ref{sec:appendix-experiment}. \prg{Imitation baselines.} Most of our experiments use behavioral cloning (BC)~\cite{pomerleau1991efficient} as the base imitation learning algorithm. Given a dataset $\mathcal D = \{(x_0, a_0), (x_1, a_1), \ldots\}$ of observation--action tuples drawn from a demonstrator, BC optimises the policy $\pi_\theta(a \mid x)$ to maximise the expected log likelihood, \[ \mathcal L(\theta) = \expect{(x,a)\sim\mathcal D}{\log \pi_\theta(a \mid x)}\,. \] We combine BC with representation learning in two ways. First, we use RepL to pretrain all but the final layer of the policy, then fine-tune the policy end-to-end with BC. This appears to be the most popular approach in the vision literature. Second, we use RepL as an auxiliary objective during BC training, so that both imitation and representation learning are performed simultaneously. Importantly, we also do control runs both with and without image augmentations. The deep RL community has repeatedly found that image augmentations can yield a greater improvement than some sophisticated representation learning methods~\cite{laskin2020curl,kostrikov2020image}, and so it is important to distinguish between performance gains due to the choice of RepL objective and performance gains due to the use of augmentations. In addition to BC, we present results with Generative Adversarial Imitation Learning (GAIL)~\cite{ho2016generative} and RepL pretraining. GAIL treats IL as a game between an imitation policy $\pi_\theta(a \mid x)$ and a discriminator $D_\psi(x,a)$ that must distinguish $\pi_\theta$'s behaviour from that of the demonstrator. Using alternating gradient descent, GAIL attempts to find a $\theta$ and $\psi$ that attain the saddle point of \begin{align*} \max_\theta \min_\psi \left\{ - \expect{(x,a)\sim\pi_\theta}{\log D_\psi(x,a)} - \expect{(x,a)\sim\mathcal D}{\log(1 - D_\psi(x,a))} + w_H H(\pi_\theta) \right\}\,. \end{align*} Here $H$ is an entropy penalty weighted by regularisation parameter $w_H \geq 0$. We use augmentations only for the GAIL discriminator, and not the policy (we could not get GAIL to train reliably with policy augmentations). Discriminator regularisation is of particular interest because past work has shown that discriminator augmentations are essential to obtaining reasonable imitation performance when applying GAIL to image-based environments~\cite{zolna2019task}. For our experiments combining GAIL with RepL, we use the learned representation to initialize both the GAIL discriminator and the GAIL policy. \prg{RepL algorithms.} Using our modular representation learning framework, we construct five representation learning algorithms described in \cref{table:algorithms-main-expt}. More detailed descriptions are in \cref{sec:appendix-experiment}. \subsection{Results} Results are shown in \cref{table:pretrain-bc} for BC + RepL pretraining, and \cref{table:joint-bc} for BC + RepL joint training, and \cref{table:pretrain-gail} for GAIL + RepL pretraining. Each cell shows mean $\mathsmaller{\pm}$ standard deviation over at least five random seeds. We treat IL with augmentations (but no RepL) as our baseline. We color cells that have a higher mean return than the baseline, and mark them with an asterisk (*) when the difference is significant at $p<0.05$, as measured by a one-sided Welch's t-test without adjustment for multiple comparisons. We include the loss curves for our BC experiments in \cref{app:loss-curves}. \begingroup \setlength{\tabcolsep}{1pt} \begin{table*}[t!] \caption{Pretraining results for BC. We color cells that have a higher mean return than BC with augmentations, and mark them with an asterisk (*) when the difference is significant at $p<0.05$, as measured by a one-sided Welch's t-test without adjustment for multiple comparisons.} \label{table:pretrain-bc} \begin{center} \begin{small} \begin{tabular}{@{}cccccccccc@{}} \toprule \textbf{Env} & \textbf{Task} & \textbf{Dynamics} & \textbf{InvDyn} & \textbf{SimCLR} & \textbf{TemporalCPC} & \textbf{VAE} & \textbf{BC aug} & \textbf{BC no aug} \\ \midrule {DMC}{} & cheetah-run & 482$\mathsmaller{\pm}$36 & 669$\mathsmaller{\pm}$18 & 687$\mathsmaller{\pm}$17 & 661$\mathsmaller{\pm}$13 & 458$\mathsmaller{\pm}$39 & 690$\mathsmaller{\pm}$17 & 617$\mathsmaller{\pm}$34 & \\ & finger-spin & 718$\mathsmaller{\pm}$17 & \cellcolor[HTML]{fff7df} 748$\mathsmaller{\pm}$17* & 726$\mathsmaller{\pm}$1 & 723$\mathsmaller{\pm}$4 & \cellcolor[HTML]{fff7df} 751$\mathsmaller{\pm}$6* & 730$\mathsmaller{\pm}$9 & \cellcolor[HTML]{fff7df} 940$\mathsmaller{\pm}$4* & \\ & reacher-easy & 774$\mathsmaller{\pm}$24 & \cellcolor[HTML]{fff7df} 890$\mathsmaller{\pm}$14 & \cellcolor[HTML]{fff7df} 907$\mathsmaller{\pm}$9 & \cellcolor[HTML]{fff7df} 893$\mathsmaller{\pm}$13 & \cellcolor[HTML]{fff7df} 880$\mathsmaller{\pm}$20 & 874$\mathsmaller{\pm}$21 & 452$\mathsmaller{\pm}$34 & \\ \midrule Procgen & coinrun-train & 8.1$\mathsmaller{\pm}$0.4 & 8.0$\mathsmaller{\pm}$0.2 & 8.0$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 8.1$\mathsmaller{\pm}$0.3 & \cellcolor[HTML]{fff7df} 8.4$\mathsmaller{\pm}$0.4 & 8.1$\mathsmaller{\pm}$0.3 & \cellcolor[HTML]{fff7df} 8.7$\mathsmaller{\pm}$0.6* & \\ & fruitbot-train & 3.2$\mathsmaller{\pm}$1 & 16.2$\mathsmaller{\pm}$1.2 & 17.5$\mathsmaller{\pm}$1.9 & 15.4$\mathsmaller{\pm}$1.5 & 17.5$\mathsmaller{\pm}$1.5 & 18.3$\mathsmaller{\pm}$1.9 & 11.4$\mathsmaller{\pm}$0.6 & \\ & jumper-train & 8.1$\mathsmaller{\pm}$0.2 & 8.0$\mathsmaller{\pm}$0.4 & 7.9$\mathsmaller{\pm}$0.6 & 7.5$\mathsmaller{\pm}$0.6 & 7.9$\mathsmaller{\pm}$0.6 & 8.1$\mathsmaller{\pm}$1.2 & 7.1$\mathsmaller{\pm}$1.2 & \\ & miner-train & 4.5$\mathsmaller{\pm}$1.2 & 5.9$\mathsmaller{\pm}$0.2 & \cellcolor[HTML]{fff7df} 9.9$\mathsmaller{\pm}$0.4 & 9.5$\mathsmaller{\pm}$2.3 & \cellcolor[HTML]{fff7df} 10.4$\mathsmaller{\pm}$0.3* & 9.8$\mathsmaller{\pm}$0.3 & 8.1$\mathsmaller{\pm}$0.3 & \\ \hline & coinrun-test & 6.3$\mathsmaller{\pm}$0.8 & \cellcolor[HTML]{fff7df} 6.9$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 6.8$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 6.8$\mathsmaller{\pm}$0.4 & \cellcolor[HTML]{fff7df} 7.0$\mathsmaller{\pm}$0.5 & 6.7$\mathsmaller{\pm}$0.4 & 6.5$\mathsmaller{\pm}$0.7 & \\ & fruitbot-test & -3$\mathsmaller{\pm}$0.9 & \cellcolor[HTML]{fff7df} 15.6$\mathsmaller{\pm}$1.1 & 13.4$\mathsmaller{\pm}$1.0 & \cellcolor[HTML]{fff7df} 14.7$\mathsmaller{\pm}$1.0 & 13.2$\mathsmaller{\pm}$1.0 & 13.7$\mathsmaller{\pm}$1.1 & 2.2$\mathsmaller{\pm}$0.6 & \\ & jumper-test & 3.2$\mathsmaller{\pm}$0.4 & 3.9$\mathsmaller{\pm}$0.3 & 3.6$\mathsmaller{\pm}$0.4 & 3.7$\mathsmaller{\pm}$0.5 & 3.4$\mathsmaller{\pm}$0.5 & 3.9$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 4.6$\mathsmaller{\pm}$0.4 & \\ & miner-test & 0.6$\mathsmaller{\pm}$0.1 & 2.6$\mathsmaller{\pm}$0.1 & 2.6$\mathsmaller{\pm}$0.4 & \cellcolor[HTML]{fff7df} 3.1$\mathsmaller{\pm}$0.4 & \cellcolor[HTML]{fff7df} 2.7$\mathsmaller{\pm}$0.3 & 2.7$\mathsmaller{\pm}$0.4 & 0.8$\mathsmaller{\pm}$0.1 & \\ \midrule MAGI- & MatchRegions & 0.42$\mathsmaller{\pm}$0.04 & 0.42$\mathsmaller{\pm}$0.04 & 0.42$\mathsmaller{\pm}$0.03 & 0.41$\mathsmaller{\pm}$0.01 & 0.42$\mathsmaller{\pm}$0.03 & 0.43$\mathsmaller{\pm}$0.02 & 0.28$\mathsmaller{\pm}$0.08 \\ CAL & MoveToCorner & \cellcolor[HTML]{fff7df}0.84$\mathsmaller{\pm}$0.07 & \cellcolor[HTML]{fff7df}0.83$\mathsmaller{\pm}$0.04 & \cellcolor[HTML]{fff7df}0.83$\mathsmaller{\pm}$0.04* & \cellcolor[HTML]{fff7df}0.80$\mathsmaller{\pm}$0.02 & \cellcolor[HTML]{fff7df}0.78$\mathsmaller{\pm}$0.06 & 0.78$\mathsmaller{\pm}$0.05 & 0.72$\mathsmaller{\pm}$0.04 \\ & MoveToRegion & \cellcolor[HTML]{fff7df}0.82$\mathsmaller{\pm}$0.02* & \cellcolor[HTML]{fff7df}0.83$\mathsmaller{\pm}$0.02* & \cellcolor[HTML]{fff7df}0.82$\mathsmaller{\pm}$0.01* & \cellcolor[HTML]{fff7df}0.81$\mathsmaller{\pm}$0.01* & \cellcolor[HTML]{fff7df}0.81$\mathsmaller{\pm}$0.05* & 0.74$\mathsmaller{\pm}$0.02 & \cellcolor[HTML]{fff7df}0.81$\mathsmaller{\pm}$0.04* \\ \bottomrule \end{tabular} \vspace{-5mm} \end{small} \end{center} \end{table*} \endgroup \prg{BC pretraining results.} In the pretraining setting, we see that none of our RepL algorithms consistently yield large improvements across all (or even most) tasks. Indeed, the relative impact of adding representation learning tends to be lower than the impact of adding or removing augmentations. Although adding augmentations to BC usually yields a large improvement, there are a handful of tasks where adding augmentations substantially decreases performance; we remark further on this below. Note that most of our RepL algorithms do seem to yield an improvement in MoveToRegion, suggesting that there may still be value to RepL for a narrower set of tasks and datasets. \prg{BC joint training results.} When using joint training as an auxiliary loss, we similarly see that no one RepL method consistently improves performance across all benchmark tasks. However, in the {DMC}{} tasks, we do see consistent improvement over the baseline for all RepL methods. This suggests that our RepL methods provide benefit in some environments, but are sensitive to the choice of task. \begingroup \setlength{\tabcolsep}{1pt} \begin{table*}[t!] \caption{Joint training results for BC. We color cells that have a higher mean return than BC with augmentations, and mark them with an asterisk (*) when the difference is significant at $p<0.05$, as measured by a one-sided Welch's t-test without adjustment for multiple comparisons.} \label{table:joint-bc} \begin{center} \begin{small} \begin{tabular}{@{}cccccccccc@{}} \toprule \textbf{Env} & \textbf{Task} & \textbf{Dynamics} & \textbf{InvDyn} & \textbf{SimCLR} & \textbf{TemporalCPC} & \textbf{VAE} & \textbf{BC aug} & \textbf{BC no aug} \\ \midrule {DMC}{} & cheetah-run & \cellcolor[HTML]{fff7df} 723$\mathsmaller{\pm}$14* & \cellcolor[HTML]{fff7df} 716$\mathsmaller{\pm}$23* & \cellcolor[HTML]{fff7df} 717$\mathsmaller{\pm}$11* & \cellcolor[HTML]{fff7df} 716$\mathsmaller{\pm}$16* & \cellcolor[HTML]{fff7df} 724$\mathsmaller{\pm}$12* & 690$\mathsmaller{\pm}$17 & 617$\mathsmaller{\pm}$34 & \\ & finger-spin & \cellcolor[HTML]{fff7df} 755$\mathsmaller{\pm}$6* & \cellcolor[HTML]{fff7df} 755$\mathsmaller{\pm}$12* & \cellcolor[HTML]{fff7df} 732$\mathsmaller{\pm}$15 & 725$\mathsmaller{\pm}$12 & \cellcolor[HTML]{fff7df} 755$\mathsmaller{\pm}$3* & 730$\mathsmaller{\pm}$9 & \cellcolor[HTML]{fff7df} 940$\mathsmaller{\pm}$4* & \\ & reacher-easy & \cellcolor[HTML]{fff7df} 898$\mathsmaller{\pm}$19 & \cellcolor[HTML]{fff7df} 903$\mathsmaller{\pm}$10* & \cellcolor[HTML]{fff7df} 889$\mathsmaller{\pm}$14 & \cellcolor[HTML]{fff7df} 912$\mathsmaller{\pm}$18* & \cellcolor[HTML]{fff7df} 903$\mathsmaller{\pm}$8* & 874$\mathsmaller{\pm}$21 & 452$\mathsmaller{\pm}$34 & \\ \midrule Proc- & coinrun-train & 8.0$\mathsmaller{\pm}$0.4 & 7.1$\mathsmaller{\pm}$0.3 & 8.0$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 8.6$\mathsmaller{\pm}$0.5* & 7.9$\mathsmaller{\pm}$0.2 & 8.1$\mathsmaller{\pm}$0.3 & \cellcolor[HTML]{fff7df} 8.7$\mathsmaller{\pm}$0.6* & \\ gen & fruitbot-train & 17.0$\mathsmaller{\pm}$0.7 & 6.6$\mathsmaller{\pm}$1.4 & 13.4$\mathsmaller{\pm}$1.9 & 11.4$\mathsmaller{\pm}$0.7 & 15.4$\mathsmaller{\pm}$1.0 & 18.3$\mathsmaller{\pm}$1.9 & 11.4$\mathsmaller{\pm}$0.6 & \\ & jumper-train & 7.9$\mathsmaller{\pm}$0.5 & 8.1$\mathsmaller{\pm}$0.4 & 8.0$\mathsmaller{\pm}$0.4 & 8.0$\mathsmaller{\pm}$0.3 & \cellcolor[HTML]{fff7df} 8.3$\mathsmaller{\pm}$0.5 & 8.1$\mathsmaller{\pm}$1.2 & 7.1$\mathsmaller{\pm}$1.2 & \\ & miner-train & 8.9$\mathsmaller{\pm}$0.8 & 8.9$\mathsmaller{\pm}$0.7 & 8.7$\mathsmaller{\pm}$0.3 & 7.1$\mathsmaller{\pm}$0.8 & 8.6$\mathsmaller{\pm}$0.7 & 9.8$\mathsmaller{\pm}$0.3 & 8.1$\mathsmaller{\pm}$0.3 & \\ \hline & coinrun-test & 6.4$\mathsmaller{\pm}$0.4 & 6.0$\mathsmaller{\pm}$0.5 & 6.6$\mathsmaller{\pm}$0.3 & 6.2$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 6.9$\mathsmaller{\pm}$0.4 & 6.7$\mathsmaller{\pm}$0.4 & 6.5$\mathsmaller{\pm}$0.7 & \\ & fruitbot-test & 10.9$\mathsmaller{\pm}$0.7 & 3.3$\mathsmaller{\pm}$1.1 & 8.5$\mathsmaller{\pm}$1.5 & 6.4$\mathsmaller{\pm}$1.2 & 10.4$\mathsmaller{\pm}$1.6 & 13.7$\mathsmaller{\pm}$1.1 & 2.2$\mathsmaller{\pm}$0.6 & \\ & jumper-test & 3.4$\mathsmaller{\pm}$0.3 & \cellcolor[HTML]{fff7df} 4.8$\mathsmaller{\pm}$0.2* & 3.8$\mathsmaller{\pm}$0.3 & 3.4$\mathsmaller{\pm}$0.3 & 3.9$\mathsmaller{\pm}$0.7 & 3.9$\mathsmaller{\pm}$0.5 & \cellcolor[HTML]{fff7df} 4.6$\mathsmaller{\pm}$0.4* & \\ & miner-test & 2.0$\mathsmaller{\pm}$0.2 & 1.9$\mathsmaller{\pm}$0.3 & 1.8$\mathsmaller{\pm}$0.3 & 1.0$\mathsmaller{\pm}$0.2 & 2.0$\mathsmaller{\pm}$0.3 & 2.7$\mathsmaller{\pm}$0.4 & 0.8$\mathsmaller{\pm}$0.1 & \\ \midrule MAGI- & MatchRegions & \cellcolor[HTML]{fff7df}0.44$\mathsmaller{\pm}$0.02 & 0.23$\mathsmaller{\pm}$0.08 & 0.41$\mathsmaller{\pm}$0.02 & 0.01$\mathsmaller{\pm}$0.01 & 0.41$\mathsmaller{\pm}$0.03 & 0.43$\mathsmaller{\pm}$0.03 & 0.31$\mathsmaller{\pm}$0.02 \\ CAL & MoveToCorner & 0.78$\mathsmaller{\pm}$0.07 & 0.30$\mathsmaller{\pm}$0.22 & 0.76$\mathsmaller{\pm}$0.05 & 0.02$\mathsmaller{\pm}$0.02 & \cellcolor[HTML]{fff7df}0.82$\mathsmaller{\pm}$0.06 & 0.80$\mathsmaller{\pm}$0.05 & 0.70$\mathsmaller{\pm}$0.09 \\ & MoveToRegion & \cellcolor[HTML]{fff7df}0.76$\mathsmaller{\pm}$0.02 & 0.35$\mathsmaller{\pm}$0.24 & 0.74$\mathsmaller{\pm}$0.01 & 0.47$\mathsmaller{\pm}$0.07 & \cellcolor[HTML]{fff7df}0.77$\mathsmaller{\pm}$0.02 & 0.75$\mathsmaller{\pm}$0.02 & \cellcolor[HTML]{fff7df}0.78$\mathsmaller{\pm}$0.04 \\ \bottomrule \end{tabular} \vspace{-5mm} \end{small} \end{center} \end{table*} \endgroup \prg{Effect of augmentations on BC.} Incorporating augmentations into BC training tended to yield the largest effect of any technique considered in this work, even without an explicit representation learning loss. In roughly half of the environments studied, this had a substantial impact on reward, and reward increased $150\%$ or more in reacher-easy, Fruitbot, and MatchRegions. However, environments seem to be bimodal in their response to augmentations: in a handful of environments (finger-spin, coinrun-train, jumper-test, and MoveToRegion), adding augmentations leads to consistently \emph{worse} performance. This effect is particularly dramatic in finger-spin, which we believe is a result of the fact that relevant objects in the environment always stay fixed. Consequently, translational augmentations don't aid generalization, and rotational augmentations can be confused with true signal (since the angle of the finger determines the ideal action). Because augmentation already yields large benefits, many of the representation learning algorithms do not provide much additional gain on top of BC-Augs, even when they perform substantially better than BC-NoAugs. This result is consistent with the finding by \citet{laskin2020reinforcement} that simply augmenting input frames in reinforcement learning produced performance on par with sophisticated representation learning methods. \prg{GAIL pretraining results.} GAIL pretraining results mirror those for BC pretraining, but with even fewer statistically significant deviations from baseline performance. We see that augmentation can be even more important for GAIL than it is for BC. For instance, GAIL with discriminator augmentations obtains higher return on finger-spin than BC does, but obtains a return of 0 when discriminator augmentations are removed. This is consistent with the observation of \citeauthor{zolna2019task} that strict regularisation is essential to make GAIL perform well in image-based domains~\cite{zolna2019task}. \begingroup \setlength{\tabcolsep}{1pt} \begin{table*}[t!] \caption{Pretraining results for GAIL. We color cells that have a higher mean return than BC with augmentations, and mark them with an asterisk (*) when the difference is significant at $p<0.05$, as measured by a one-sided Welch's t-test without adjustment for multiple comparisons. For the sake of space, we abbreviate TemporalCPC to $t$CPC.} \label{table:pretrain-gail} \begin{center} \begin{small} \begin{tabular}{@{}ccccccccccc@{}} \toprule \textbf{Env} & \textbf{Task} & \textbf{Dynamics} & \textbf{InvDyn} & \textbf{SimCLR} & \textbf{$t$CPC} & \textbf{VAE} & \textbf{GAIL aug} & \textbf{GAIL no aug} \\ \midrule {DMC}{} & cheetah-run & 380$\mathsmaller{\pm}$76 & 320$\mathsmaller{\pm}$61 & 265$\mathsmaller{\pm}$58 & 360$\mathsmaller{\pm}$74 & 375$\mathsmaller{\pm}$33 & 449$\mathsmaller{\pm}$67 & 75$\mathsmaller{\pm}$40 \\ & finger-spin& \cellcolor[HTML]{fff7df}868$\mathsmaller{\pm}$14 & \cellcolor[HTML]{fff7df}886$\mathsmaller{\pm}$8* & 800$\mathsmaller{\pm}$23 & 748$\mathsmaller{\pm}$72 & \cellcolor[HTML]{fff7df}868$\mathsmaller{\pm}$18 & 868$\mathsmaller{\pm}$12 & 0$\mathsmaller{\pm}$0 \\ & reacher-easy & 53$\mathsmaller{\pm}$24 & 73$\mathsmaller{\pm}$51 & 21$\mathsmaller{\pm}$23 & 118$\mathsmaller{\pm}$88 & 122$\mathsmaller{\pm}$89 & 221$\mathsmaller{\pm}$162 & 89$\mathsmaller{\pm}$88 \\ \midrule Proc- & coinrun-train & \cellcolor[HTML]{fff7df}5.9$\mathsmaller{\pm}$0.29* & \cellcolor[HTML]{fff7df}5.85$\mathsmaller{\pm}$0.51* & 2.15$\mathsmaller{\pm}$1.53 & 3.28$\mathsmaller{\pm}$2.62 & \cellcolor[HTML]{fff7df}3.54$\mathsmaller{\pm}$1.22 & 3.31$\mathsmaller{\pm}$0.44 & 2.80$\mathsmaller{\pm}$0.89 \\ gen & fruitbot-train & -2.81$\mathsmaller{\pm}$0.1 & \cellcolor[HTML]{fff7df}-2.37$\mathsmaller{\pm}$0.55 & -2.47$\mathsmaller{\pm}$0.15 & \cellcolor[HTML]{fff7df}-2.38$\mathsmaller{\pm}$0.31 & -2.49$\mathsmaller{\pm}$0.22 & -2.42$\mathsmaller{\pm}$0.42 & -2.63$\mathsmaller{\pm}$0.30 \\ & jumper-train & 3.31$\mathsmaller{\pm}$0.31 & 3.17$\mathsmaller{\pm}$0.40 & 3.36$\mathsmaller{\pm}$0.53 & 2.69$\mathsmaller{\pm}$1.31 & \cellcolor[HTML]{fff7df}3.45$\mathsmaller{\pm}$0.70 & 3.44$\mathsmaller{\pm}$0.52 & \cellcolor[HTML]{fff7df}3.47$\mathsmaller{\pm}$0.53 \\ & miner-train & 0.53$\mathsmaller{\pm}$0.12 & 0.60$\mathsmaller{\pm}$0.11 & 0.53$\mathsmaller{\pm}$0.14 & \cellcolor[HTML]{fff7df}0.84$\mathsmaller{\pm}$0.14* & 0.51$\mathsmaller{\pm}$0.07 & 0.65$\mathsmaller{\pm}$0.10 & \cellcolor[HTML]{fff7df}0.77$\mathsmaller{\pm}$0.18 \\ \hline & coinrun-test & \cellcolor[HTML]{fff7df}6.1$\mathsmaller{\pm}$0.9* & \cellcolor[HTML]{fff7df}5.91$\mathsmaller{\pm}$0.16* & 2.11$\mathsmaller{\pm}$1.61 & 3.35$\mathsmaller{\pm}$2.74 & 3.01$\mathsmaller{\pm}$1.10 & 3.44$\mathsmaller{\pm}$0.68 & 2.77$\mathsmaller{\pm}$0.84 \\ & fruitbot-test & -2.44$\mathsmaller{\pm}$0.49 & -2.65$\mathsmaller{\pm}$0.24 & -2.55$\mathsmaller{\pm}$0.30 & -2.65$\mathsmaller{\pm}$0.14 & -2.85$\mathsmaller{\pm}$0.33 & -2.44$\mathsmaller{\pm}$0.50 & -2.51$\mathsmaller{\pm}$0.44 \\ & jumper-test & 2.56$\mathsmaller{\pm}$0.52 & 2.53$\mathsmaller{\pm}$0.64 & 3.15$\mathsmaller{\pm}$0.45 & 2.35$\mathsmaller{\pm}$0.81 & 2.75$\mathsmaller{\pm}$0.59 & 3.25$\mathsmaller{\pm}$0.42 & 3.15$\mathsmaller{\pm}$0.20 \\ & miner-test & 0.36$\mathsmaller{\pm}$0.04 & 0.57$\mathsmaller{\pm}$0.07 & 0.55$\mathsmaller{\pm}$0.24 & \cellcolor[HTML]{fff7df}0.87$\mathsmaller{\pm}$0.15* & 0.50$\mathsmaller{\pm}$0.17 & 0.65$\mathsmaller{\pm}$0.17 & \cellcolor[HTML]{fff7df}0.66$\mathsmaller{\pm}$0.14 \\ \midrule MAGI- & MatchRegions & 0.42$\mathsmaller{\pm}$0.10 & 0.34$\mathsmaller{\pm}$0.12 & \cellcolor[HTML]{fff7df}0.47$\mathsmaller{\pm}$0.04 & 0.39$\mathsmaller{\pm}$0.12 & 0.30$\mathsmaller{\pm}$0.15 & 0.46$\mathsmaller{\pm}$0.06 & 0.22$\mathsmaller{\pm}$0.12 \\ CAL & MoveToCorner & 0.48$\mathsmaller{\pm}$0.09 & 0.45$\mathsmaller{\pm}$0.10 & \cellcolor[HTML]{fff7df}0.52$\mathsmaller{\pm}$0.07 & \cellcolor[HTML]{fff7df}0.55$\mathsmaller{\pm}$0.15 & \cellcolor[HTML]{fff7df}0.62$\mathsmaller{\pm}$0.11* & 0.49$\mathsmaller{\pm}$0.08 & \cellcolor[HTML]{fff7df}0.55$\mathsmaller{\pm}$0.14 \\ & MoveToRegion & 0.72$\mathsmaller{\pm}$0.07 & 0.74$\mathsmaller{\pm}$0.04 & 0.74$\mathsmaller{\pm}$0.06 & \cellcolor[HTML]{fff7df}0.76$\mathsmaller{\pm}$0.03 & 0.75$\mathsmaller{\pm}$0.07 & 0.75$\mathsmaller{\pm}$0.09 & 0.60$\mathsmaller{\pm}$0.14 \\ \bottomrule \end{tabular} \vspace{-7mm} \end{small} \end{center} \end{table*} \endgroup \section{Discussion \& future work}\label{sec:discussion} \prg{Contrasting image classification and imitation learning datasets.} The use of self-supervised representation learning for pretraining has met with notable success in image classification~\cite{chen2020simple}. By comparison, results from RL literature have been mixed, with some positive results, but also several works~\cite{laskin2020reinforcement,kostrikov2020image} which claim that RepL adds little value relative to image augmentation---a result which we observe in imitation as well. Given this, it's natural to wonder \emph{why} successes from supervised learning have not been reproduced in sequential decision making problems such as RL and imitation. \begin{wrapfigure}{r}{0.7\textwidth} \begin{center} \vspace{-22pt} \includegraphics[width=0.65\textwidth]{Figures/within-vs-between-class-variation.pdf} \vspace{-2mm} \caption{We show a sample of STL-10, MAGICAL, and Procgen images. Images on the same row have the same label (bird, car, etc.) or expert action (up, down, etc.). It can be easier to tell whether two images have the same label in classification than in IL tasks.} \label{fig:clss-vs-seq} \vspace{-5mm} \end{center} \end{wrapfigure} The case of Behavioural Cloning (BC) is particularly illustrative. BC uses the same optimization algorithms, loss types, and network architectures as other forms of image classification, so if RepL is less helpful for BC than for other forms of classification then it must be due to the choice of training and evaluation data. For the sake of illustrating differences in data distributions, \cref{fig:clss-vs-seq} compares the STL-10 dataset---a typical image classification task---with datasets for MAGICAL and Procgen. dm\_control is not pictured because it has a continuous action space, so there was not a natural separation of images by action along the $y$ axis. One notable difference in \cref{fig:clss-vs-seq} is that there is less between-class variation in MAGICAL and Procgen than in STL-10: the choice of action is often influenced by fine-grained, local cues in the environment, rather than the most visually salient axes of variation (background, mean color, etc.). For example, in MAGICAL the sets of states that correspond to the ``forward'' and ``left'' demonstrator actions cover a similar visual range. Indeed, the agent's choice between ``left'' and ``right'' could change if its heading shifted by just a few degrees, even though this visual change would not be obvious to a human. In contrast, STL-10 exhibits substantial between-class variation: it's hard to confuse a the sky-blue background and metal texture of a plane for the natural setting and fur of a deer. Thus, a RepL method that simply captures the most visually salient differences between classes may be much more useful for classification on STL-10 than for control on MAGICAL or Procgen. \begin{figure}[] \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=\textwidth]{Figures/coinrun-VAE-Acts.pdf} \end{subfigure} \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=\textwidth]{Figures/coinrun-VAE-Rews.pdf} \end{subfigure} \begin{subfigure}{0.3\textwidth} \centering \includegraphics[width=\textwidth]{Clusters/STL10-SimCLR-ResNet50-class.pdf} \end{subfigure} \caption{t-SNE embedding of representations from a VAE encoder on CoinRun, labeled with the corresponding actions (left) and discretized returns (middle). Returns are estimated by applying GAE to an expert PPO demonstrator, then discretized by rounding to the nearest whole number to produce a ``label''. We compare these with STL-10 image representations generated by a ResNet50 pretrained with SimCLR, colored by class (right).} \label{fig:cluster-analysis} \vspace{-5mm} \end{figure} \prg{What is the right downstream prediction target?} Both GAIL and BC attempt to learn a policy that predicts expert actions from observations. We've argued that RepL algorithms may be focusing primarily on the most visually salient differences between states, at the expense of the fine-grained features necessary for action prediction. However, it could be that reward- and value-prediction benefit more from a representation that captures mostly coarse-grained visual differences. Moreover, \citeauthor{yang2021representation}~\cite{yang2021representation} have observed that state-based (as opposed to image-based) offline Q-learning \textit{does} benefit from existing RepL techniques, even though state-based BC does not. Together, these facts suggest existing RepL methods might be more helpful when the downstream prediction target is value or reward rather than action. To explore this hypothesis, we visualize how well RepL-learned representations align with action labels, estimated expert returns, and trajectory IDs. In Figure~\ref{fig:cluster-analysis} we show t-SNE projections of observation embeddings taken from seven expert CoinRun demonstrations. The embeddings were generated by a VAE-pretrained encoder. We compare these with t-SNE clusters generated from a ResNet50 with SimCLR on ImageNet, then evaluated on STL-10 (a resized ImageNet subset). Representations from a well-trained encoder should cluster nicely according to the label (e.g. classes, actions) used for the downstream task. We see this with the STL-10 embeddings, which cluster nicely by class. In contrast, we see that our encoders for CoinRun do not produce embeddings that cluster nicely by action. However, they do seem to cluster readily by estimated expert returns. This is likely a consequence of the events that cause states to have high value---such as being close to the far wall with the coin---depend primarily on coarse-grained features of the state. We speculate that this is likely true in MAGICAL, too, where the reward function tends to depend only on salient features like whether the agent is overlapping with any of the colored goal regions. Our negative results for GAIL and RepL provide reason to be cautious about our conjecture that reward functions (and value functions) are more amenable to RepL. A GAIL discriminator is similar to a reward function, but the overall performance of GAIL does not change much when pretraining the discriminator with RepL. On the other hand, it is worth noting that the GAIL discriminator does not in general converge to a valid reward function for the task, so this is not a direct test of the hypothesis that reward learning is more amenable to RepL pretraining than policy learning. We therefore believe it is still worth investigating whether imitation learning algorithms that directly learn reward functions~\cite{fu2017learning} or value functions~\cite{reddy2019sqil} benefit more from RepL than algorithms that learn policies. \prg{The importance of using diverse benchmark tasks.} Our experiment results in \cref{table:joint-bc} showed much greater benefit for RepL on {DMC}{} than on Procgen and MAGICAL. This underscores the importance of evaluating across multiple benchmarks: had we only used {DMC}, we might have erroneously concluded that RepL is typically helpful for BC. The finger-spin (DMC) and CoinRun (Procgen) tasks provide a useful illustration of how differences in performance across tasks can arise. \cref{fig:dmc-vs-procgen} shows example saliency maps~\cite{simonyan2013deep} generated by SimCLR-pretrained encoders in these two tasks. In finger-spin, the SimCLR encoder mostly attends to foreground objects, while in CoinRun it attends to the background. This makes sense: the boundary between the background and terrain is easy to detect and shifts rapidly as the agent moves, so paying attention to the shape of background is quite helpful for distinguishing between frames. Unfortunately, semantically important foreground features in CoinRun, such as obstacles and gold, are less discriminative, which is why we believe SimCLR is not dedicating as much model capacity to them. In contrast, the background in finger-spin changes very little, so SimCLR is forced to attend to foreground objects that change position between frames. More generally, we believe that differences between RepL performance across tasks are due to implicit assumptions that our (unsupervised) RepL algorithms make about what kinds of features are important. For tasks that do not match these assumptions, the representation learning algorithms will do poorly, regardless of how much data is available. In our SimCLR example, information about background shapes crowds out task-relevant cues like the distance between the agent and an obstacle. It is therefore important for future research to (1) consider whether the implicit assumptions underlying a given RepL algorithm are likely to help models acquire useful invariances for the desired tasks; and (2) test on multiple domains to ensure that the claimed improvements are robust across environments. \begin{figure}[] \centering \includegraphics[width=0.9\textwidth]{Figures/dmc-procgen.pdf} \caption{Saliency map generated by an encoder trained using SimCLR. Top row shows input frames, averaged across a three-frame stack of inputs. Bottom row shows saliency map overlayed on top of grayscale images, with darker blue shading indicating greater influence over the network's output. Notice that SimCLR attends mainly to the foreground in DMC, and mainly to the background in CoinRun.} \label{fig:dmc-vs-procgen} \vspace{-5mm} \end{figure} \section{Conclusion} We have seen that, when compared against a well-tuned IL baseline using image augmentations, the impacts of representation learning for imitation are limited. On some benchmark suites it appears that it helps, while on others there is not much impact, suggesting that the effect of RepL is quite benchmark-specific. Our analysis has identified several hypotheses that could help understand \emph{when} and \emph{where} representation learning can be useful. We are excited to see future work investigate these hypotheses, and hope the EIRLI framework can serve as a useful starting point for any such investigations. \begin{ack} The authors would like to thank Michael Chang, Ben Eysenbach, Aravind Srinivas, and Olivia Watkins for feedback on earlier versions of this work. This work was supported in part by the DOE CSGF under grant number DE-SC0020347, along with a grant from the Open Philanthropy Project and computational support from Google. \end{ack} \section{Submissions to the NeurIPS 2021 Track on Datasets and Benchmarks} Please read the instructions below carefully and follow them faithfully. \subsection{Style} Papers must be prepared according to the instructions presented here. Papers may only be up to {\bf nine} pages long, including figures. Additional pages \emph{containing only acknowledgments and references} are allowed. Papers that exceed the page limit will not be reviewed, or in any other way considered for presentation at the conference. Authors are required to use the NeurIPS \LaTeX{} style files obtainable at the NeurIPS website as indicated below. Please make sure you use the current files and not previous versions. Tweaking the style files may be grounds for rejection. \subsection{Retrieval of style files} The style files for the NeurIPS Track on Datasets and Benchmarks and other information are available on the World Wide Web at \begin{center} \url{http://www.neurips.cc/Conferences/2021/CallForDatasetsBenchmarks} \end{center} The file \verb+neurips_data_2021.pdf+ contains these instructions and illustrates the various formatting requirements your submission must satisfy. The only supported style file for NeurIPS 2021 is \verb+neurips_data_2021.sty+, written for \LaTeXe{}. There are no supported style sheets for Microsoft Word, RTF, or other formats. The \LaTeX{} style file contains three optional arguments: \verb+final+, which creates a camera-ready copy, \verb+preprint+, which creates a preprint for submission to, e.g., arXiv, and \verb+nonatbib+, which will not load the \verb+natbib+ package for you in case of package clash. \paragraph{Preprint option} If you wish to post a preprint of your work online, e.g., on arXiv, using the NeurIPS style, please use the \verb+preprint+ option. This will create a version of your work with the text ``Preprint. Work in progress.'' in the footer. This version may be distributed as you see fit. Please \textbf{do not} use the \verb+final+ option, which should \textbf{only} be used for papers accepted to the NeurIPS Track on Datasets and Benchmarks. At submission time, please omit the \verb+final+ and \verb+preprint+ options. This will add line numbers to aid review. Please do \emph{not} refer to these line numbers in your paper as they will be removed during generation of camera-ready copies. Note that submissions to the NeurIPS Track on Datasets and Benchmarks are reviewed in a single-blind fashion and therefore not anonymous. This is because datasets can typically not be shared in a non-anonymous way. If you feel strongly that your work should be submitted anonymously, please use the \verb+anonymous+ option. This will create a version of your work with all author names hidden. The file \verb+neurips_data_021.tex+ may be used as a ``shell'' for writing your paper. All you have to do is replace the author, title, abstract, and text of the paper with your own. The formatting instructions contained in these style files are summarized in Sections \ref{gen_inst}, \ref{headings}, and \ref{others} below. \section{General formatting instructions} \label{gen_inst} The text must be confined within a rectangle 5.5~inches (33~picas) wide and 9~inches (54~picas) long. The left margin is 1.5~inch (9~picas). Use 10~point type with a vertical spacing (leading) of 11~points. Times New Roman is the preferred typeface throughout, and will be selected for you by default. Paragraphs are separated by \nicefrac{1}{2}~line space (5.5 points), with no indentation. The paper title should be 17~point, initial caps/lower case, bold, centered between two horizontal rules. The top rule should be 4~points thick and the bottom rule should be 1~point thick. Allow \nicefrac{1}{4}~inch space above and below the title to rules. All pages should start at 1~inch (6~picas) from the top of the page. Authors' names are set in boldface, and each name is centered above the corresponding address. The lead author's name is to be listed first (left-most), and the co-authors' names (if different address) are set to follow. If there is only one co-author, list both author and co-author side by side. Please pay special attention to the instructions in Section \ref{others} regarding figures, tables, acknowledgments, and references. \section{Headings: first level} \label{headings} All headings should be lower case (except for first word and proper nouns), flush left, and bold. First-level headings should be in 12-point type. \subsection{Headings: second level} Second-level headings should be in 10-point type. \subsubsection{Headings: third level} Third-level headings should be in 10-point type. \paragraph{Paragraphs} There is also a \verb+\paragraph+ command available, which sets the heading in bold, flush left, and inline with the text, with the heading followed by 1\,em of space. \section{Citations, figures, tables, references} \label{others} These instructions apply to everyone. \subsection{Citations within the text} The \verb+natbib+ package will be loaded for you by default. Citations may be author/year or numeric, as long as you maintain internal consistency. As to the format of the references themselves, any style is acceptable as long as it is used consistently. The documentation for \verb+natbib+ may be found at \begin{center} \url{http://mirrors.ctan.org/macros/latex/contrib/natbib/natnotes.pdf} \end{center} Of note is the command \verb+\citet+, which produces citations appropriate for use in inline text. For example, \begin{verbatim} \citet{hasselmo} investigated\dots \end{verbatim} produces \begin{quote} Hasselmo, et al.\ (1995) investigated\dots \end{quote} If you wish to load the \verb+natbib+ package with options, you may add the following before loading the \verb+neurips_2021+ package: \begin{verbatim} \PassOptionsToPackage{options}{natbib} \end{verbatim} If \verb+natbib+ clashes with another package you load, you can add the optional argument \verb+nonatbib+ when loading the style file: \begin{verbatim} \usepackage[nonatbib]{neurips_2021} \end{verbatim} As submission is double blind, refer to your own published work in the third person. That is, use ``In the previous work of Jones et al.\ [4],'' not ``In our previous work [4].'' If you cite your other papers that are not widely available (e.g., a journal paper under review), use anonymous author names in the citation, e.g., an author of the form ``A.\ Anonymous.'' \subsection{Footnotes} Footnotes should be used sparingly. If you do require a footnote, indicate footnotes with a number\footnote{Sample of the first footnote.} in the text. Place the footnotes at the bottom of the page on which they appear. Precede the footnote with a horizontal rule of 2~inches (12~picas). Note that footnotes are properly typeset \emph{after} punctuation marks.\footnote{As in this example.} \subsection{Figures} \begin{figure} \centering \fbox{\rule[-.5cm]{0cm}{4cm} \rule[-.5cm]{4cm}{0cm}} \caption{Sample figure caption.} \end{figure} All artwork must be neat, clean, and legible. Lines should be dark enough for purposes of reproduction. The figure number and caption always appear after the figure. Place one line space before the figure caption and one line space after the figure. The figure caption should be lower case (except for first word and proper nouns); figures are numbered consecutively. You may use color figures. However, it is best for the figure captions and the paper body to be legible if the paper is printed in either black/white or in color. \subsection{Tables} All tables must be centered, neat, clean and legible. The table number and title always appear before the table. See Table~\ref{sample-table}. Place one line space before the table title, one line space after the table title, and one line space after the table. The table title must be lower case (except for first word and proper nouns); tables are numbered consecutively. Note that publication-quality tables \emph{do not contain vertical rules.} We strongly suggest the use of the \verb+booktabs+ package, which allows for typesetting high-quality, professional tables: \begin{center} \url{https://www.ctan.org/pkg/booktabs} \end{center} This package was used to typeset Table~\ref{sample-table}. \begin{table} \caption{Sample table title} \label{sample-table} \centering \begin{tabular}{lll} \toprule \multicolumn{2}{c}{Part} \\ \cmidrule(r){1-2} Name & Description & Size ($\mu$m) \\ \midrule Dendrite & Input terminal & $\sim$100 \\ Axon & Output terminal & $\sim$10 \\ Soma & Cell body & up to $10^6$ \\ \bottomrule \end{tabular} \end{table} \section{Final instructions} Do not change any aspects of the formatting parameters in the style files. In particular, do not modify the width or length of the rectangle the text should fit into, and do not change font sizes (except perhaps in the \textbf{References} section; see below). Please note that pages should be numbered. \section{Preparing PDF files} Please prepare submission files with paper size ``US Letter,'' and not, for example, ``A4.'' Fonts were the main cause of problems in the past years. Your PDF file must only contain Type 1 or Embedded TrueType fonts. Here are a few instructions to achieve this. \begin{itemize} \item You should directly generate PDF files using \verb+pdflatex+. \item You can check which fonts a PDF files uses. In Acrobat Reader, select the menu Files$>$Document Properties$>$Fonts and select Show All Fonts. You can also use the program \verb+pdffonts+ which comes with \verb+xpdf+ and is available out-of-the-box on most Linux machines. \item The IEEE has recommendations for generating PDF files whose fonts are also acceptable for NeurIPS. Please see \url{http://www.emfield.org/icuwb2010/downloads/IEEE-PDF-SpecV32.pdf} \item \verb+xfig+ "patterned" shapes are implemented with bitmap fonts. Use "solid" shapes instead. \item The \verb+\bbold+ package almost always uses bitmap fonts. You should use the equivalent AMS Fonts: \begin{verbatim} \usepackage{amsfonts} \end{verbatim} followed by, e.g., \verb+\mathbb{R}+, \verb+\mathbb{N}+, or \verb+\mathbb{C}+ for $\mathbb{R}$, $\mathbb{N}$ or $\mathbb{C}$. You can also use the following workaround for reals, natural and complex: \begin{verbatim} \newcommand{\RR}{I\!\!R} \newcommand{\Nat}{I\!\!N} \newcommand{\CC}{I\!\!\!\!C} \end{verbatim} Note that \verb+amsfonts+ is automatically loaded by the \verb+amssymb+ package. \end{itemize} If your file contains type 3 fonts or non embedded TrueType fonts, we will ask you to fix it. \subsection{Margins in \LaTeX{}} Most of the margin problems come from figures positioned by hand using \verb+\special+ or other commands. We suggest using the command \verb+\includegraphics+ from the \verb+graphicx+ package. Always specify the figure width as a multiple of the line width as in the example below: \begin{verbatim} \usepackage[pdftex]{graphicx} ... \includegraphics[width=0.8\linewidth]{myfile.pdf} \end{verbatim} See Section 4.4 in the graphics bundle documentation (\url{http://mirrors.ctan.org/macros/latex/required/graphics/grfguide.pdf}) A number of width problems arise when \LaTeX{} cannot properly hyphenate a line. Please give LaTeX hyphenation hints using the \verb+\-+ command when necessary. \subsection{Suppressing line numbers in supplementary materials} If you need to suppress line numbers in the supplementary materials because they interfere with the text, for instance because you are including a data sheet in 2-column format, you can do so by placing the following command before it: \begin{verbatim} \let\linenumbers\nolinenumbers\nolinenumbers \end{verbatim} \begin{ack} Use unnumbered first level headings for the acknowledgments. All acknowledgments go at the end of the paper before the list of references. Moreover, you are required to declare funding (financial activities supporting the submitted work) and competing interests (related financial activities outside the submitted work). More information about this disclosure can be found at: \url{https://neurips.cc/Conferences/2021/PaperInformation/FundingDisclosure}. You can use the \texttt{ack} environment provided in the style file. As opposed to the main NeurIPS track, acknowledgements do not need to be hidden. \end{ack} \section*{References} References follow the acknowledgments. Use unnumbered first-level heading for the references. Any choice of citation style is acceptable as long as you are consistent. It is permissible to reduce the font size to \verb+small+ (9 point) when listing the references. Note that the Reference section does not count towards the page limit. \medskip { \small [1] Alexander, J.A.\ \& Mozer, M.C.\ (1995) Template-based algorithms for connectionist rule extraction. In G.\ Tesauro, D.S.\ Touretzky and T.K.\ Leen (eds.), {\it Advances in Neural Information Processing Systems 7}, pp.\ 609--616. Cambridge, MA: MIT Press. [2] Bower, J.M.\ \& Beeman, D.\ (1995) {\it The Book of GENESIS: Exploring Realistic Neural Models with the GEneral NEural SImulation System.} New York: TELOS/Springer--Verlag. [3] Hasselmo, M.E., Schnell, E.\ \& Barkai, E.\ (1995) Dynamics of learning and recall at excitatory recurrent synapses and cholinergic modulation in rat hippocampal region CA3. {\it Journal of Neuroscience} {\bf 15}(7):5249-5262. } \section*{Checklist} The checklist follows the references. Please read the checklist guidelines carefully for information on how to answer these questions. For each question, change the default \answerTODO{} to \answerYes{}, \answerNo{}, or \answerNA{}. You are strongly encouraged to include a {\bf justification to your answer}, either by referencing the appropriate section of your paper or providing a brief inline description. For example: \begin{itemize} \item Did you include the license to the code and datasets? \answerYes{See Section~\ref{gen_inst}.} \item Did you include the license to the code and datasets? \answerNo{The code and the data are proprietary.} \item Did you include the license to the code and datasets? \answerNA{} \end{itemize} Please do not modify the questions and only use the provided macros for your answers. Note that the Checklist section does not count towards the page limit. In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below. \begin{enumerate} \item For all authors... \begin{enumerate} \item Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope? \answerTODO{} \item Did you describe the limitations of your work? \answerTODO{} \item Did you discuss any potential negative societal impacts of your work? \answerTODO{} \item Have you read the ethics review guidelines and ensured that your paper conforms to them? \answerTODO{} \end{enumerate} \item If you are including theoretical results... \begin{enumerate} \item Did you state the full set of assumptions of all theoretical results? \answerTODO{} \item Did you include complete proofs of all theoretical results? \answerTODO{} \end{enumerate} \item If you ran experiments (e.g. for benchmarks)... \begin{enumerate} \item Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? \answerTODO{} \item Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? \answerTODO{} \item Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? \answerTODO{} \item Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? \answerTODO{} \end{enumerate} \item If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... \begin{enumerate} \item If your work uses existing assets, did you cite the creators? \answerTODO{} \item Did you mention the license of the assets? \answerTODO{} \item Did you include any new assets either in the supplemental material or as a URL? \answerTODO{} \item Did you discuss whether and how consent was obtained from people whose data you're using/curating? \answerTODO{} \item Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? \answerTODO{} \end{enumerate} \item If you used crowdsourcing or conducted research with human subjects... \begin{enumerate} \item Did you include the full text of instructions given to participants and screenshots, if applicable? \answerTODO{} \item Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? \answerTODO{} \item Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? \answerTODO{} \end{enumerate} \end{enumerate}
\section{Introduction} One of the most poorly constrained periods in the history of the universe is the time between the release of the Cosmic Microwave Background (CMB) radiation and the Epoch of Reionization, known as the Cosmic Dark Ages. No luminous sources existed during this epoch, making it exceedingly challenging to observe. However, the Dark Ages is an important transition period in cosmic history: the universe evolved from hydrogen and helium atoms to the large scale structure we see today. Studying the Dark Ages would provide a unique view of the physics of the early universe, when perturbations in the density field remain linear and can be modeled with well-understood physics. The only potential observational probe of this period, however, is through hydrogen’s 21\,cm line. In the standard cosmological picture, the hydrogen gas (and its ``spin temperature'', which characterizes the relative populations of its hyperfine ground state) is colder than the CMB during the Dark Ages and creates a signal that can be seen in absorption relative to the CMB. \citep{Furlanetto-Oh-Briggs, Pritchard-Loeb}. The 21\,cm signal traces the matter power spectrum throughout the Dark Ages, probing fluctuations all the way down to the Jeans scale; the cosmological power of such an observable is tremendous. \citep{Loeb, Furlanetto}. However, there are enormous observational challenges to detecting this signal. Earth’s ionosphere refracts and absorbs low-frequency radio waves and, at the lowest frequencies, is completely opaque. The observable period of the Dark Ages runs from approximately $z = 150$ (when the residual free-electron density in the hydrogen gas drops low enough to decouple it from the CMB) and $z = 50$ (when the first stars might conceivably start forming); this places the signal of interest in the range $10 - 30$\,MHz. Such frequencies are almost impossible to observe from the ground due to the opaque ionosphere and human generated transmissions. There are nights (particularly during the solar minimum) when frequencies less than 30 MHz can be accessed from the ground, but reaching the required observing time ($\gtrsim 1000$ hours of observation; \citealt{Pober_2014}, Pober, \textit{in prep.}) with only a handful of nights per year during solar minimum makes it nearly impossible to observe the Dark Ages from Earth. \textbf{A space-based or a lunar-based radio telescope could enable 21\,cm signal from the Dark Ages to be detected \citep{Koopmans}.} A radio array \textbf{in space or} on the far side of the Moon would allow us to avoid not the Earth’s ionosphere, but also terrestrial radio frequency interference (RFI) thanks to $>100\,\rm{dB}$ attenuation of RFI on the lunar far side. \citep{Farside}. The lunar far side also provides enough space to spread out a large number of antennas, which is required for the sensitivity and spatial resolution for the 21cm power spectrum analysis. However, even a lunar based interferometer will face significant challenges in pursuing a Dark Ages 21\,cm signal detection. Foregrounds emission --- including supernovae remnants, pulsars, radio galaxies, and diffuse emission from the Milky Way --- make it difficult to detect the redshifted 21\,cm signal at any frequency. As foregrounds are several orders of magnitude brighter than the 21 cm signal \citep{Santos}, extreme precision is needed to cleanly separate the two. We can, in principle, differentiate the two because foregrounds are spectrally smooth and featureless, whereas the cosmological signal has features at different wavelengths. A significant body of work has gone into studying foreground removal and/or mitigation for 21\,cm experiments. (see e.g. \citealt{Trott, Mertens, HERA} for examples of the latest techniques used by some of the leading experiments in the field.) However, there is a new potential foreground issue for very low frequency Dark Ages experiments: opacity of the foregrounds. Foregrounds are in front of the 21 cm signal, so if they are optically thick to low frequency radiation, they will obscure it entirely due to free-free absorption. The optical depth of this absorption is frequency-dependent, making it a potential problem for the low-frequency experiments studying the Dark Ages. At the lowest frequencies observed from the ground, a spectral turnover in the diffuse emission is already visible. The the goal of this paper is to use existing ground based data to infer what can be said about the opacity at even lower frequencies relevant to Dark Ages 21\,cm cosmology. To find out which regions of the sky might be optically thick for the highest redshifts of the 21 cm signal, we fit the measurements from LWA1 \citep{Dowell} combined with the 408\,MHz Haslam map \citep{Haslam_1981,Haslam_1982,Remazeilles} with a two-component model from \citet{Cane}. We then calculate the frequency-dependent foreground optical depth point-by-point across the sky. \textbf{Studies of of free-free absorption in the low-frequency radio sky have a long history.} \textbf{The Galactic plane, in particular, is known to be optically thick at frequencies of 20\,MHz and sometimes even higher \citep{Ellis&Hamilton, Cane&Whitham}. At higher Galactic latitudes, the local densities of ionized hydrogen are much lower and free-free absorption does not appear to be significant for frequencies above $\sim2$\,MHz \citep{Reynolds}. However, these older maps are generally low resolution and do not have well understood error properties. (For the most part, they do not report any kind of error bar.) In our analysis, we focus on understanding the error properties of the measurements and report the statistical confidence with which we can say a particular region of sky is optically thick at a given frequency. We choose the LWA1 data because they provide uncertainty maps that enable us to accurately calculate the statistical significance of our results. This emphasis on statistical confidence sets our work apart from previous analyses (although our results are generally quite consistent with those studies).} The outline for the rest of this paper is as follows. In \S\ref{sec:method}, we present both our model used to fit the existing observations and determine the optical depth (\S\ref{sec:canefit}) and the datasets we apply the model to (\S\ref{sec:data}). In \S\ref{sec:results}, we present the maps of the optically thick regions in the sky. In \S\ref{sec:discussion}, we discuss some of the sources of error, and finally in \S\ref{sec:conclusion} we present our conclusions. \section{Method} \label{sec:method} Several studies have led to the creation of ``global sky models'' that seek to model and predict the radio foreground emission as a function of frequency across the entire sky \citep{GSM, GSM2016, Cong, eGSM}. These projects combine information from a large number of radio surveys and must contend with differing sky-coverage, map resolutions, and error-properties. \textbf{Because these global sky models effectively interpolate between existing data sets, their error properties can be quite complicated as well (particularly in terms of frequency-to-frequency correlation).} \textbf{The recent work of \citet{Cong} is particularly relevant to the current study. They develop a radio sky model from 10\,MHz to 1\,MHz which takes into account both free-free absorption and synchrotron self-absorption.} Our project is not so ambitious. Rather than describe (and predict) the radio frequency emission across the entire sky at arbitrary frequencies, we seek to ask a single question: what is the optical depth of the foregrounds to the highly redshifted 21\,cm background? As such, we seek only simple functional fit to the low-frequency radio foreground spectrum (where the optical depth is one of the free parameters of the fit). \textbf{This tailored approach allows us to focus on the statistical confidence, which will prove very important in interpreting the results. As we shall see, the data often prefers a fit that includes a spectral turnover, typically as as high as 10 MHz (e.g. the B pixel in Figure \ref{fig:pixelplot}). By focusing on error propagation, however, we can determine where that preference for a spectral turnover is actually statistically significant.} In this section, we first present the model from \cite{Cane} that we use to achieve this goal in \S\ref{sec:canefit}. Then we discuss the datasets used in the analysis in \S\ref{sec:data}. \subsection{A Model for the Spectrum of Low-Frequency Radio Foreground Emission} \label{sec:canefit} \cite{Cane} provides a simple model for the spectral behavior of the low-frequency radio foregrounds\footnote{The \cite{Cane} paper refers to Galactic emission as a ``background'' given the scientific interests of the time, but in this paper we will refer to it as a foreground.}, describing the average non-thermal foreground spectrum at high latitudes with two components. The non-thermal spectrum is a result of synchrotron radiation of cosmic ray electrons, which are rotating in the Galactic magnetic field. The turnover of the spectrum is caused by free-free absorption of the radiation by ionized hydrogen. The two-component model describes the spectrum as contributions from Galactic and extragalactic sources. The Galactic term leads to both emission and absorption. To confirm the validity of their model, \citet{Cane} measured the radio sky spectrum at many frequencies in the northern and southern hemispheres and combined their results with additional $100$ independent measurements by other observers. Although the model is over 40 years old, it remains an excellent description of the low-frequency radio sky. In more recent years, for example, \citet{Dulk} used it to calibrate the BIRS and WAVES experiments and it is cited as the reference model for the low-frequency sky temperature off the plane of the Galaxy in \citet{TMS} (TMS hereafter, see their equation 5.24). This two component model is described by the following equation: \begin{equation} I(\nu) = I_g(\nu) \frac{1 - exp[-\tau(\nu)]}{\tau(\nu)} + I_{eg}(\nu) exp[-\tau(\nu)], \end{equation} where $I_g(\nu)$ and $I_{eg}(\nu)$ are the Galactic brightness and extragalactic brightness in $W m^{-2} Hz^{-1} sr^{-1} $ respectively, at frequency $\nu$ in MHz, and $\tau(\nu)$ is the frequency-dependent optical depth for absorption. An approximate relation for the optical depth of the free-free absorption by ionized hydrogen is: \begin{equation} \tau(\nu) = 1.64 \times 10^5 T_{e}^{-1.35} \nu^{-2.1} EM, \end{equation} where $T_{e}$ is the electron temperature in K, \textbf{$EM$} is the emission measure in $ cm^{-6} pc$ and $\nu$ is frequency in MHz. This approximation was originally found by \citet{Mezger}. To simplify this relation, we can combine all the frequency independent factors into a single ``optical depth coefficient", $F$, as: \begin{equation} \tau(\nu) = F \nu^{-2.1} \end{equation} \textbf{We note that this approximation is under the assumption that all ionized regions along the line of sight have the same temperature, which may not be correct at the lowest Galactic latitudes.} We can also express frequency dependence of the specific intensity in terms of spectral indices from the Galactic ($\alpha_1$) and extragalactic ($\alpha_2$) sources as: \textbf{$I_g(\nu) = I_{o,g} \nu^{-\alpha_1}$} and $I_{eg}(\nu) = I_{o,eg} \nu^{-\alpha_2}$. We assume that extragalactic parameters $\alpha_2$ and $I_{eg}$ are constant across the entire sky and can be treated as fixed numbers. We take $\alpha_2$ to be $0.8$, based on observations by \citet{Simon} and also the value used in \citet{TMS}. We take $I_{eg}$ to be $5.5\times10^4\,\rm{K}$ as obtained by \cite{Cane}. Our approach is to fit for the remaining three parameters $I_{o,g}$, $\alpha_1$, and $F$ using the data described in \S\ref{sec:data}. We proceed by fitting multifrequency radio sky maps pixel-by-pixel to determine the spatial distribution of the three Galactic parameters in Cane's two-component model using a nonlinear least squares fit. For our nonlinear least squares fit we used the `trf' (Trust Region Reflective) \citep{TRF} algorithm implemented in \texttt{scipy.optimize.curve\_fit} \footnote{\url{https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.least_squares.html}}, which is motivated by solving a system of equations with the first-order optimality condition for a bound-constrained minimization problem. It iteratively solves subproblems, which are adjusted by a special diagonal quadratic term, in the trust region shape, which is determined by the direction of the gradient and the distance from the bounds. The bounds used to find $I_{o,g}$ were $[0.5, 8000]$ $\times 10^{-20} W m^{-2} Hz^{-1} sr^{-1} $, $\alpha_1$ were $[0.1, 2]$ and $F$ were \textbf{$[0, 12000]$}, respectively. This prevents the algorithm from making steps directly into the bounds and allows it to explore the whole space of variables. \textbf{These bounds effectively serve as hard priors on the parameters of our fits, but they span a sufficiently broad range so as to not affect our results.} The algorithm also calculates the covariance of the fitted parameters by minimizing the sum of squared residuals over the input errors of the data points. \subsection{Datasets} \label{sec:data} We use two principal data sets in this work: the LWA1 Low Frequency Sky Survey \citep{Dowell} maps and the all-sky Haslam map at 408\,MHz \citep{Haslam_1981, Haslam_1982,Remazeilles}. We describe each of these datasets in turn. The LWA1 \citep{Taylor, Ellingson} is located in New Mexico, USA, and it consists of 256 dual-polarization dipole antennas. LWA1 was used to conduct the Low Frequency Sky Survey, which spans over the 10–88 MHz frequency range. The dataset contains the NSIDE 256 HEALPix \citep{Healpix} maps of brightness temperature at 35, 38, 40, 45, 50, 60, 70, 74, 80 MHz all with a bandwidth of 957 kHz and spatial resolutions from $4.7^{\circ}$ to $2^{\circ}$, respectively. The angular size of an NSIDE 256 pixel is $0.229$ degrees. In addition, each map has a corresponding uncertainty map that was generated using the mosaicking method by \citet{Dowell}. These uncertainty maps contain the effects of uncertainties in the calibrations and other corrections that were applied to the data. The LWA1 maps were converted from intensity to temperature using the two-dimensional beam area \citep{Dowell}. Critically for our study, they correct for the missing Galactic emission on the largest spatial scales in the interferometric maps using the data from LEDA-64 New Mexico Deployment \citep{Taylor}. They also used forward modelling of LWA1 to determine which spatial scales are missing in the images. LWA1 is an ideal telescope for our study because its primary motivation is to provide a detailed picture of foregrounds for 21 cm cosmology at low frequencies. LWA's combination of observatory latitude, sensitivity and degree of aperture filling make sure that the images can be used for studying the spectral structure of foreground emission. In addition to the LWA1 maps, we also include the 408\,MHz Haslam map \citep{Haslam_1981, Haslam_1982} to better constrain our model at higher frequencies. This total-power radio survey covers the entire sky at $1^{\circ}$ resolution. We chose the desourced and destriped Haslam map at 408 MHz \citep{Remazeilles}, which has removed the brightest sources $\geq 2$\, Jy and provides significant improvement to the original map. As the Haslam map does not provide error bars, we assumed $10\%$ error bars on each pixel, which was used by \citet{Dowell} for the LWA1 Sky Model and was found to be an appropriate level in the forthcoming extended Global Sky Model (eGSM; Adrian Liu, private communication). In addition, we added a zero-level correction, which is a second order correction to the calibrated data describe in \citet{Guzman}. It is described in the equation below: \begin{equation} T_{\nu,0} = T_{CMB} + T_{\nu,Ex} + T_{\nu,ZLC} \end{equation} where $T_{CMB}$ is Cosmic Microwave Background temperature, $T_{\nu,Ex}$ is the extragalactic non-thermal background temperature and $T_{\nu,ZLC}$ is Zero-level correction temperature. The Haslam map is NSIDE 512 HEALPix map, which we downgraded to NSIDE 256 to match the LWA1 maps. Our uncertainty map is also calculated using 10\% of the brightness in each pixel of the lower resolution map of Haslam. \section{Results} \label{sec:results} Using the Eq. 1 we performed a pixel-by-pixel fit to get HEALPix maps of $F$, $I_{o,g}$, $\alpha_1$ at the NSIDE 256 resolution of the LWA1 maps, which are shown on the left in Fig. 1. We plot the corresponding standard deviations at each pixel on the right in Fig. 1. \begin{figure*}[!tbp] \centering \includegraphics[width=0.5\columnwidth]{Plots/new_optical_depth_rotated_dowell_haslam_nside256.pdf}\includegraphics[width=0.5\columnwidth]{Plots/new_optical_depth_error_bars_rotated_dowell_haslam_nside256.pdf} \label{fig:f1} \includegraphics[width=0.5\columnwidth]{Plots/new_I_g_rotated_dowell_haslam_nside256.pdf}\includegraphics[width=0.5\columnwidth]{Plots/new_I_g_error_bars_rotated_dowell_haslam_nside256.pdf} \label{fig:f2} \includegraphics[width=0.5\columnwidth]{Plots/new_alpha_g_rotated_dowell_haslam_nside256.pdf}\includegraphics[width=0.5\columnwidth]{Plots/new_alpha_g_error_bars_rotated_dowell_haslam_nside256.pdf} \label{fig:f3} \caption{ \textit{Left}: HEALPix maps of the values of $F$, $I_{o,g}$ and $\alpha_1$, from top to bottom, from our fits. The letters in the upper left map correspond to pixels whose spectra are plotted in Figure 2. \textit{Right}: The corresponding standard deviations at each pixel for each of our three fit parameters.} \end{figure*} To illustrate how these fits are behaving we selected several pixels which illustrate the different kinds of spectral behavior seen in the data. The pixels we chose are indicated in the upper left panel of Figure 1 with letters. The measured spectrum (blue points) and our fit (red line) is shown in Figure 2. The vertical dashed line shows the frequency at which the optical depth reaches unity (see discussion below) and the shaded gray regions show the 1, 2, and 3$\sigma$ equivalent uncertainties on this value. As we can see all the fits include a spectral turnover but the statistical signifiance is low. \begin{figure*}[!tbp] \centering \includegraphics[scale=0.6]{Plots/new_A_pixel.pdf}\label{fig:f1} \includegraphics[scale=0.6]{Plots/new_B_pixel.pdf}\label{fig:f2} \includegraphics[scale=0.6]{Plots/new_C_pixel.pdf}\label{fig:f3} \includegraphics[scale=0.6]{Plots/new_D_pixel.pdf}\label{fig:f4} \includegraphics[scale=0.6]{Plots/new_E_pixel.pdf}\label{fig:f5} \includegraphics[scale=0.6]{Plots/new_F_pixel.pdf}\label{fig:f6} \caption{ The measured data values (blue points) and fits (red lines) for the six pixels indicated in the upper left panel of Figure 1. The vertical dashed line shows the frequency at which the optical depth reaches unity and the shaded gray regions \textbf{from darkest to lightest} show the 1, 2, and 3$\sigma$ equivalent uncertainties on this value, respectively (see text for details). \textbf{Pixel A shows no evidence for a spectral turnover, and so the shaded grey regions are all effectively at zero and are not visible on the plot. The inset subplots in each panel zoom in on the frequency range $0-100$\,MHz.}} \label{fig:pixelplot} \end{figure*} From the map of the optical depth coefficient, we need to determine which areas of the sky are optically thick to various redshifts of the 21\,cm signal. In order to do that, we find the frequency where the optical depth $\tau = 1$ and expressed Eq. 3 in the following way: \begin{equation} \tau = F \nu^{-2.1} = 1 \end{equation} which we rewrote to find the expression for the frequency at which it becomes optically thick: \begin{equation} \label{eq:F_to_nu} \nu = F^{1/2.1} \end{equation} To determine the uncertainty on the frequency at which a pixel becomes optically thick, we used Monte Carlo simulation. Using the uncertainties we calculated from our fit, we create one million possible optical depth coefficients normally distributed around the best fit value. Each value in the distribution is then converted to frequency using Eq. \ref{eq:F_to_nu}. We then calculated the mean and ``1, 2 and 3 sigma equivalent" widths of that distribution, i.e. the distances from the left and the right off the peak of the distribution which contain $68.2\%$, $95\%$ and $99.7\%$ of the probability, respectively. \textbf{We express our results in terms of the statistical confidence with which we can claim a pixel to be optically thick (to 21\,cm emission from a particular redshift). For example, consider a pixel where, using Eq. \ref{eq:F_to_nu}, we determine that the the sky becomes optically thick at 15\,MHz. Using our Monte Carlo simulations, we then determine the uncertainties on that frequency to be $\pm 3$\,MHz ($1\sigma$-equivalent) and $\pm 8$\,MHz ($2\sigma$-equivalent).\footnote{Note that because we use Monte Carlo simulations to calculate the error distribution, the $2\sigma$-equivalent error need not equal twice the $1\sigma$-equivalent error (as in this example, but is generally true of our results), nor do the errors need to be symmetric around the mean (which is not the case in this example).} We then compare with 9.4\,MHz, the frequency of redshifted 21\,cm emission from $z=150$. In this case, the pixel is said to be optically thick to 21\,cm emission from $z=150$ at greater than $1\sigma$ confidence (but not at greater than $2\sigma$ confidence).} Once we found the turnover frequency and the corresponding error bars, we created HEALPix maps of the sky to show which regions are optically thick for 21 cm signal. As the optical depth is frequency dependent, we needed to pick a specific frequency to determine whether it is optically thick. We chose frequencies corresponding to several redshifts of interest for 21 cm cosmology: $z=50$, 100, and 150. Figure 3 shows which pixels are optical thick at each of these three redshifts and the associated \textbf{confidence}. \begin{figure*}[!tbp] \label{fig:significance_maps} \centering \includegraphics[scale=0.6]{Plots/new_opt_thick_map_150_redshift.pdf}\label{fig:f1} \hfill \includegraphics[scale=0.6]{Plots/new_opt_thick_map_100_redshift.pdf}\label{fig:f2} \includegraphics[scale=0.6]{Plots/new_opt_thick_map_50_redshift.pdf}\label{fig:f3} \caption{Pixels that are optically thick to 21\,cm emission from redshifts 150 (top), 100 (middle) and 50 (bottom). Different colors represent the statistical confidence with which we can claim the pixel is optically thick.} \end{figure*} \begin{table}[] \centering \begin{tabular}{c|c|c|c} \makecell{Percentage of the sky \\ optically thick at \dots} & $z=150$ & $z=100$ & $z=50$ \\ \hline \dots > 1 $\sigma$ confidence & $27.7\%$ & $14.8\%$ & $0.719\%$ \\ \hline \dots > 2 $\sigma$ confidence & $0.984\%$ & $0.697\%$ & $0.052\%$ \\ \hline \dots > 3 $\sigma$ confidence & $0.189\%$ & $0.101\%$ & $0.001\%$ \\ \end{tabular} \caption{: Percentage of the sky optically thick to the 21 cm signal with statistical confidence > $1\sigma$, $2\sigma$ and $3\sigma$ at redshift 150, 100 and 50.} \label{tab:my_label} \end{table} We also calculate what percentage of the whole sky is optically thick to 21 cm signal. The results are presented in Table 1. Because a portion of the sky is masked (i.e. below the horizon for the LWA1), we first calculate the optical thickness ratio in Galactic and extragalactic regions. We calculated percentages of the sky which fall into the two regions in the unmasked and masked parts of the maps. $23\%$ of the masked region falls within 10 degrees of zero Galactic latitude, which we classified as Galactic region. However, only $16\%$ of the unmasked region falls into the Galactic region. To account for that, we calculated what percentage of the unmasked region was optically thick in the Galactic region vs extragalactic region and assumed the same proportions in the masked region to calculate the final optically thick percentage of the whole sky. We then assumed the region of the Southern hemisphere covered by the horizon would have proportional optical thickness Galactic and extragalactic regions. This allowed us to estimate the optical thickness ratio in the whole sky. \section{Discussion} \label{sec:discussion} The numbers in Table 1 are largely encouraging for high redshift 21 cm cosmology, particularly for the lower redshifts of the cosmic Dark Ages. While challenges of foreground removal must still be overcome, the issue of foreground opacity appears of little concern. We do find that $\sim25 \%$ of the sky is optically thick for redshift $z=150$, albeit at low statistical significance. However, this does not appear to be random error. Visual inspection of the data in Figure 3 shows that the LWA1 data do generally show a spectral flattening towards lower frequencies. Whether this effect is real or an artifact of the LWA1 sky survey is difficult to know. We do note that the optical depth coefficient is always low in the regions of the sky corresponding to the horizons of the LWA1 site. The response of the instrument is lower towards the horizon, making these higher noise regions, which we see in the LWA1 error maps. However, the optical depth coefficient maps in the regions are not noisy but instead consistently lower than in the rest of the sky, suggesting there might be a primary beam correction issue that leads to altered frequency dependence at those low elevations. \citet{Dowell} also mentioned that LWA1 data has systemically lower temperatures near South Galactic Pole, which might be due to the limitations of in the dipole response model and the missing spacings corrections. \textbf{If these low-significance results do hold, however, the impact on Dark Ages 21\,cm cosmology will be tangible --- but they certainly do not spell disaster for the field. For projects that envision the Dark Ages 21\,cm signal as the ultimate cosmological observable, where effectively all modes of the density power spectrum can be measured, this will reduce the total number of measurable modes and increase the effect of cosmic variance. We do not provide detailed forecasting here, but even a $\sim25\%$ reduction in the number of measurements is unlikely to qualitatively change what can be done with Dark Ages observations given the tremendous potential of the technique. (We note that CMB experiments like Planck recommend masking $\sim22\%$ of pixels, a very similar fraction of the sky; \citealt{planck}.) The larger effect will likely be on the observational approach. Experiments designed to map the 21\,cm signal can likely just mask optically thick regions from their analysis, akin to many CMB experiments. However, experiments using non-imaging based techniques (e.g. \citealt{parsons_et_al_2012b}) will need to take care to exclude optically thick regions from their analysis, particularly if they have very large fields of view.} For additional data, we initially considered using OVRO-LWA (Owens Valley Long Wavelength Array) sky maps \cite{Eastwood_2018}, which were created using Tikhonov regularized $m$-mode analysis imaging techniques with angular resolution of $\sim15$ arcmin. However, these maps proved difficult to use in practice. Unlike the LWA1 sky survey maps, no zero-level correction was performed. We tried to calculate the offsets of each map ourselves by extrapolating the Haslam map at high Galactic latitudes to LWA frequencies to find offsets relative to each OVRO-LWA map. We also tried a similar approach using the 45\,MHz Guzman map \citep{Guzman}. Ultimately, the results were overly sensitive on the offset correction, which emphasizes the importance of this procedure when using interferometric maps to make statements about spectral behavior of diffuse objects. Further complicating our use of the OVRO-LWA maps were the errors quoted as fixed amount of thermal noise (roughly 800 mJy/beam in each map) across the entire sky. Not only are these errors a factor of 10-20 less than the LWA1 errors, their uniformity across the sky led to unbelievable results of nominally high significance at low elevation angles. Ultimately, lower frequency data can answer these questions, but because of the ionosphere it becomes more difficult to get high-quality maps below 30\,MHz. Lower frequency observations from space and/or the lunar far side may provide the best foreground maps for this kind of analysis. Another issue seen in our analysis (not directly related to the data quality) is that the fit seems to break down in the very center of the Galactic plane. This does not come as a surprise, as the two-component model is appropriate for much of the sky ``except near the galactic plane where higher intensities are encountered" \citep{TMS}. As these are H-II regions, dominated by Bremsstrahlung radiation, our two-component model will not be able to describe it accurately. However, we are not worried about falsely interpreting these pixels because we can be quite confident that the center of the Galaxy is optically thick. In addition, the optical depth coefficient values in this pixels don't have a significant effect on the overall results as they comprise only a small fraction of the sky. \textbf{We also note that we did not consider extragalactic free-free absorption. Given the limitations of the LWA data, we do not expect that we could distinguish this contribution to any spectral turnover from absorption with a Galactic origin even if it was included as another free parameter in our fits. However, higher-precision future studies with lower-frequency data could be used to explore the impact of this effect.} \section{Conclusion} \label{sec:conclusion} We used the LWA1 \citep{Dowell} dataset at 9 frequencies combined with the 408 MHz Haslam map \citep{Haslam_1981, Haslam_1982, Remazeilles} to fit a two-component model from \citet{Cane} and calculate the optical depth of foregrounds at low frequencies. We used a nonlinear least squares fit to find 3 parameters of that model and calculated the turnover frequency of each pixel. We then used Monte Carlo simulation to calculate the error bars of the turnover frequency to find which regions of the sky are optically thick to 21\,cm signal at redshifts 150, 100 and 50, respectively. In conclusion, our results are very encouraging for Dark Ages 21\,cm cosmology as most of the sky is not optically thick at high statistical significance. However, at the highest redshifts ($z=150$), we see low significance evidence that a large portion of sky may be optically thick to the 21 cm signal. Lower-frequency maps are likely the best way to resolve this issue. \section*{Acknowledgements} The authors would like to thank Adrian Liu for several exceptionally helpful conversations related to this project and Avery Kim for providing a HEALPix version of the Guzman 45\,MHz map. We would also like to thank the LWA1 Low Frequency Sky Survey team for publicly releasing their maps, and our anonymous referee for helping to improve the manuscript. This research was conducted using computational resources and services at the Center for Computation and Visualization, Brown University. \section*{Data Availability} The data underlying this article were accessed from LWA1 Low Frequency Sky Survey: \url{http://lda10g.alliance.unm.edu/LWA1LowFrequencySkySurvey/} and the desourced and destriped 408\,MHz Haslam map: \url{https://lambda.gsfc.nasa.gov/product/foreground/fg_2014_haslam_408_info.cfm} The derived data generated in this research will be shared on reasonable request to the corresponding author. \bibliographystyle{mnras} \section{Introduction} One of the most poorly constrained periods in the history of the universe is the time between the release of the Cosmic Microwave Background (CMB) radiation and the Epoch of Reionization, known as the Cosmic Dark Ages. No luminous sources existed during this epoch, making it exceedingly challenging to observe. However, the Dark Ages is an important transition period in cosmic history: the universe evolved from hydrogen and helium atoms to the large scale structure we see today. Studying the Dark Ages would provide a unique view of the physics of the early universe, when perturbations in the density field remain linear and can be modeled with well-understood physics. The only potential observational probe of this period, however, is through hydrogen’s 21\,cm line. In the standard cosmological picture, the hydrogen gas (and its ``spin temperature'', which characterizes the relative populations of its hyperfine ground state) is colder than the CMB during the Dark Ages and creates a signal that can be seen in absorption relative to the CMB. \citep{Furlanetto-Oh-Briggs, Pritchard-Loeb}. The 21\,cm signal traces the matter power spectrum throughout the Dark Ages, probing fluctuations all the way down to the Jeans scale; an all-sky, cosmic variance limited survey of the Dark Ages 21\,cm signal contains approximately one trillion times more modes than the CMB \citep{Loeb_2006, Furlanetto}. However, there are enormous observational challenges to detecting this signal. Earth’s ionosphere refracts and absorbs low-frequency radio waves and, at the lowest frequencies, is completely opaque. The observable period of the Dark Ages runs from approximately $z = 150$ (when the residual free-electron density in the hydrogen gas drops low enough to decouple it from the CMB) and $z = 50$ (when the first stars might conceivably start forming); this places the signal of interest in the range $10 - 30$\,MHz. Such frequencies are almost impossible to observe from the ground due to the opaque ionosphere and human generated transmissions. There are nights (particularly during the solar minimum) when frequencies less than 30 MHz can be accessed from the ground, but reaching the required observing time ($\gtrsim 1000$ hours of observation; \citealt{Pober_2014}, Pober, \textit{in prep.}) with only a handful of nights per year during solar minimum makes it nearly impossible to observe the Dark Ages from Earth. A space-based or a lunar-based radio telescope could enable 21\,cm signal from the Dark Ages to be detected \citep{Koopmans}. A radio array in space or on the far side of the Moon would allow us to avoid not the Earth’s ionosphere, but also terrestrial radio frequency interference (RFI) thanks to $>100\,\rm{dB}$ attenuation of RFI on the lunar far side. \citep{Farside}. The lunar far side also provides enough space to spread out a large number of antennas, which is required for the sensitivity and spatial resolution for the 21\,cm power spectrum analysis. However, even a lunar based interferometer will face significant challenges in pursuing a Dark Ages 21\,cm signal detection. Foregrounds emission --- including supernovae remnants, pulsars, radio galaxies, and diffuse emission from the Milky Way --- make it difficult to detect the redshifted 21\,cm signal at any frequency. As foregrounds are several orders of magnitude brighter than the 21 cm signal \citep{Santos}, extreme precision is needed to cleanly separate the two. We can, in principle, differentiate the two because foregrounds are spectrally smooth and featureless, whereas the cosmological signal has features at different wavelengths. A significant body of work has gone into studying foreground removal and/or mitigation for 21\,cm experiments. (see e.g. \citealt{Trott, Mertens, HERA} for examples of the latest techniques used by some of the leading experiments in the field.) However, there is a new potential foreground issue for very low frequency Dark Ages experiments: opacity of the foregrounds. Foregrounds are in front of the 21 cm signal, so if they are optically thick to low frequency radiation, they will obscure it entirely due to free-free absorption. The optical depth of this absorption is frequency-dependent, making it a potential problem for the low-frequency experiments studying the Dark Ages. The issue of foreground opacity presents both a theoretical and practical challenge for Dark Ages 21\,cm experiments. First, if some fraction of the sky is optically thick, then the number of modes measurable are corresponding diminished. Although an all-sky survey has the potential to provide vastly more information than the CMB, accurate forecasting will require us to know just how many modes we can actually hope to measure. If there are frequencies where nearly the entire sky is optically thick, then the signal from the corresponding redshifts may be entirely unobservable. Practically speaking, the first generation of 21\,cm Dark Ages experiments will aim for a detection of the signal, not the ``be-all and end-all'' survey of cosmology. These experiments will likely target a small fraction of the sky free from bright and/or opaque foregrounds. However, several leading ground-based experiments (e.g. HERA; \citealt{DeBoer_2017}) have eschewed steerable antennas for the sake of mechanical simplicity. Such a drift-scanning experiment is effectively at the whim of what foregrounds exist at the declination that passes through zenith. For a lunar far side 21\,cm experiment, it therefore becomes important to know the \emph{spatial distribution} of opaque foregrounds regions, as that will determine the suitability of potential landing sites and may even make steerable antennas an essential mission requirement (driving up both cost and complexity). At the lowest frequencies observed from the ground, a spectral turnover in the diffuse emission is already visible. The the goal of this paper is to use existing ground based data to infer what can be said about the opacity at even lower frequencies relevant to Dark Ages 21\,cm cosmology. To find out which regions of the sky might be optically thick for the highest redshifts of the 21 cm signal, we fit the measurements from LWA1 \citep{Dowell} combined with the 408\,MHz Haslam map \citep{Haslam_1981,Haslam_1982,Remazeilles} with a two-component model from \citet{Cane}. We then calculate the frequency-dependent foreground optical depth point-by-point across the sky. Studies of free-free absorption in the low-frequency radio sky have a long history. The Galactic plane, in particular, is known to be optically thick at frequencies of 20\,MHz and sometimes even higher \citep{Ellis&Hamilton, Cane&Whitham}. At higher Galactic latitudes, the local densities of ionized hydrogen are much lower and free-free absorption does not appear to be significant for frequencies above $\sim2$\,MHz \citep{Reynolds}. However, these older maps are generally low resolution and do not have well understood error properties. (For the most part, they do not report any kind of error bar.) In our analysis, we focus on understanding the error properties of the measurements and report the statistical confidence with which we can say a particular region of sky is optically thick at a given frequency. We choose the LWA1 data because they provide uncertainty maps that enable us to accurately calculate the statistical significance of our results. This emphasis on statistical confidence sets our work apart from previous analyses (although our results are generally quite consistent with those studies). The outline for the rest of this paper is as follows. In \S\ref{sec:method}, we present both our model used to fit the existing observations and determine the optical depth (\S\ref{sec:canefit}) and the datasets we apply the model to (\S\ref{sec:data}). In \S\ref{sec:results}, we present the maps of the optically thick regions in the sky. In \S\ref{sec:discussion}, we discuss some of the sources of error, and finally in \S\ref{sec:conclusion} we present our conclusions. \section{Method} \label{sec:method} Several studies have led to the creation of ``global sky models'' that seek to model and predict the radio foreground emission as a function of frequency across the entire sky \citep{GSM, GSM2016, Cong, eGSM}. These projects combine information from a large number of radio surveys and must contend with differing sky-coverage, map resolutions, and error-properties. Because these global sky models effectively interpolate between existing data sets, their error properties can be quite complicated as well (particularly in terms of frequency-to-frequency correlation). The recent work of \citet{Cong} is particularly relevant to the current study. They develop a radio sky model from 10\,MHz to 1\,MHz which takes into account free-free absorption using models of the free-electron distribution in the Galaxy. Our project is not so ambitious. Rather than describe (and predict) the radio frequency emission across the entire sky at arbitrary frequencies, we seek to ask a single question: what is the optical depth of the foregrounds to the highly redshifted 21\,cm background? As such, we seek only simple functional fit to the low-frequency radio foreground spectrum (where the optical depth is one of the free parameters of the fit). This tailored approach allows us to focus on the statistical confidence, which will prove very important in interpreting the results. As we shall see, the data often prefers a fit that includes a spectral turnover, typically as as high as 10 MHz (e.g. the B pixel in Figure \ref{fig:pixelplot}). By focusing on error propagation, however, we can determine where that preference for a spectral turnover is actually statistically significant. In this section, we first present the model from \cite{Cane} that we use to achieve this goal in \S\ref{sec:canefit}. Then we discuss the datasets used in the analysis in \S\ref{sec:data}. \subsection{A Model for the Spectrum of Low-Frequency Radio Foreground Emission} \label{sec:canefit} \cite{Cane} provides a simple model for the spectral behavior of the low-frequency radio foregrounds\footnote{The \cite{Cane} paper refers to Galactic emission as a ``background'' given the scientific interests of the time, but in this paper we will refer to it as a foreground.}, describing the average non-thermal foreground spectrum at high latitudes with two components. The non-thermal spectrum is a result of synchrotron radiation of cosmic ray electrons, which are rotating in the Galactic magnetic field. The turnover of the spectrum is caused by free-free absorption of the radiation by ionized hydrogen. The two-component model describes the spectrum as contributions from Galactic and extragalactic sources. The Galactic term leads to both emission and absorption. To confirm the validity of their model, \citet{Cane} measured the radio sky spectrum at many frequencies in the northern and southern hemispheres and combined their results with additional $100$ independent measurements by other observers. Although the model is over 40 years old, it remains an excellent description of the low-frequency radio sky. In more recent years, for example, \citet{Dulk} used it to calibrate the BIRS and WAVES experiments and it is cited as the reference model for the low-frequency sky temperature off the plane of the Galaxy in \citet{TMS} (TMS hereafter, see their equation 5.24). This two component model is described by the following equation: \begin{equation} I(\nu) = I_\mathrm{g}(\nu) \frac{1 - exp[-\tau(\nu)]}{\tau(\nu)} + I_\mathrm{eg}(\nu) exp[-\tau(\nu)], \end{equation} where $I_\mathrm{g}(\nu)$ and $I_\mathrm{eg}(\nu)$ are the Galactic brightness and extragalactic brightness in $\mathrm{W m^{-2} Hz^{-1} sr^{-1}} $ respectively, at frequency $\nu$ in MHz, and $\tau(\nu)$ is the frequency-dependent optical depth for absorption. An approximate relation for the optical depth of the free-free absorption by ionized hydrogen is: \begin{equation} \tau(\nu) = 1.64 \times 10^5 T_{e}^{-1.35} \nu^{-2.1} \mathrm{EM}, \end{equation} where $T_{e}$ is the electron temperature in K, \textbf{$\mathrm{EM}$} is the emission measure in $\mathrm{ cm^{-6} pc}$ and $\nu$ is frequency in MHz. This approximation was originally found by \citet{Mezger}. To simplify this relation, we can combine all the frequency independent factors into a single ``optical depth coefficient'', $F$, as: \begin{equation} \tau(\nu) = F \nu^{-2.1} \end{equation} We note that this approximation is under the assumption that all ionized regions along the line of sight have the same temperature, which may not be correct at the lowest Galactic latitudes. We can also express frequency dependence of the specific intensity in terms of spectral indices from the Galactic ($\alpha_1$) and extragalactic ($\alpha_2$) sources as: \textbf{$I_\mathrm{g}(\nu) = I_\mathrm{o,g} \nu^{-\alpha_1}$} and $I_\mathrm{eg}(\nu) = I_\mathrm{o,eg} \nu^{-\alpha_2}$. We assume that extragalactic parameters $\alpha_2$ and $I_\mathrm{eg}$ are constant across the entire sky and can be treated as fixed numbers. We take $\alpha_2$ to be $0.8$, based on observations by \citet{Simon} and also the value used in \citet{TMS}. We take $I_\mathrm{eg}$ to be $5.5\times10^4\,\rm{K}$ as obtained by \cite{Cane}. Our approach is to fit for the remaining three parameters $I_\mathrm{o,g}$, $\alpha_1$, and $F$ using the data described in \S\ref{sec:data}. We proceed by fitting multifrequency radio sky maps pixel-by-pixel to determine the spatial distribution of the three Galactic parameters in Cane's two-component model using a nonlinear least squares fit. For our nonlinear least squares fit we used the `trf' (Trust Region Reflective) \citep{TRF} algorithm implemented in \texttt{scipy.optimize.curve\_fit} \footnote{\url{https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.least_squares.html}}, which is motivated by solving a system of equations with the first-order optimality condition for a bound-constrained minimization problem. It iteratively solves subproblems, which are adjusted by a special diagonal quadratic term, in the trust region shape, which is determined by the direction of the gradient and the distance from the bounds. The bounds used to find $I_\mathrm{o,g}$ were $[0.5, 8000]$ $\times 10^{-20} \mathrm{W m^{-2} Hz^{-1} sr^{-1}} $, $\alpha_1$ were $[0.1, 2]$ and $F$ were \textbf{$[0, 12000]$}, respectively. This prevents the algorithm from making steps directly into the bounds and allows it to explore the whole space of variables. These bounds effectively serve as hard priors on the parameters of our fits, but they span a sufficiently broad range so as to not affect our results. The algorithm also calculates the covariance of the fitted parameters by minimizing the sum of squared residuals over the input errors of the data points. \subsection{Datasets} \label{sec:data} We use two principal data sets in this work: the LWA1 Low Frequency Sky Survey \citep{Dowell} maps and the all-sky Haslam map at 408\,MHz \citep{Haslam_1981, Haslam_1982,Remazeilles}. We describe each of these datasets in turn. In short, though, our motivation for focusing on these two data sets are (i) their significant sky coverage, (ii) well-understood systematics (including zero-point correction), and (iii) available uncertainty estimates.\footnote{Even though the Haslam map does not provide uncertainties, its role as a key foreground map for CMB studies has led to continued refinement of the data products \citep{Remazeilles} and external studies of its error properties (\citealt{Dowell}, Kim et al., \textit{in prep.})} The LWA1 \citep{Taylor, Ellingson} is located in New Mexico, USA, and it consists of 256 dual-polarization dipole antennas. LWA1 was used to conduct the Low Frequency Sky Survey, which spans over the 10–88 MHz frequency range. The dataset contains the NSIDE 256 HEALPix \citep{Healpix} maps of brightness temperature at 35, 38, 40, 45, 50, 60, 70, 74, 80 MHz all with a bandwidth of 957 kHz and spatial resolutions from $4.7^{\circ}$ to $2^{\circ}$, respectively. The angular size of an NSIDE 256 pixel is $0.229$ degrees. In addition, each map has a corresponding uncertainty map that was generated using the mosaicking method by \citet{Dowell}. These uncertainty maps contain the effects of uncertainties in the calibrations and other corrections that were applied to the data. The LWA1 maps were converted from intensity to temperature using the two-dimensional beam area \citep{Dowell}. Critically for our study, they correct for the missing Galactic emission on the largest spatial scales in the interferometric maps using the data from LEDA-64 New Mexico Deployment \citep{Taylor}. They also used forward modelling of LWA1 to determine which spatial scales are missing in the images. LWA1 is an ideal telescope for our study because its primary motivation is to provide a detailed picture of foregrounds for 21 cm cosmology at low frequencies. LWA's combination of observatory latitude, sensitivity and degree of aperture filling make sure that the images can be used for studying the spectral structure of foreground emission. In addition to the LWA1 maps, we also include the 408\,MHz Haslam map \citep{Haslam_1981, Haslam_1982} to better constrain our model at higher frequencies. This total-power radio survey covers the entire sky at $1^{\circ}$ resolution. We chose the desourced and destriped Haslam map at 408 MHz \citep{Remazeilles}, which has removed the brightest sources $\geq 2$\, Jy and provides significant improvement to the original map. As the Haslam map does not provide error bars, we assumed $10\%$ error bars on each pixel, which was used by \citet{Dowell} for the LWA1 Sky Model and was found to be an appropriate level in the forthcoming extended Global Sky Model (eGSM; Adrian Liu, private communication). In addition, we added a zero-level correction, which is a second order correction to the calibrated data describe in \citet{Guzman}. It is described in the equation below: \begin{equation} T_{\nu,0} = T_\mathrm{CMB} + T_{\nu,\mathrm{Ex}} + T_{\nu,\mathrm{ZLC}} \end{equation} where $T_\mathrm{CMB}$ is Cosmic Microwave Background temperature, $T_{\nu,\mathrm{Ex}}$ is the extragalactic non-thermal background temperature and $T_{\nu,\mathrm{ZLC}}$ is Zero-level correction temperature. The Haslam map is NSIDE 512 HEALPix map, which we downgraded to NSIDE 256 to match the LWA1 maps. Our uncertainty map is also calculated using 10\% of the brightness in each pixel of the lower resolution map of Haslam. \section{Results} \label{sec:results} Using the Eq. 1 we performed a pixel-by-pixel fit to get HEALPix maps of $F$, $I_\mathrm{o,g}$, $\alpha_1$ at the NSIDE 256 resolution of the LWA1 maps, which are shown on the left in Fig. 1. We plot the corresponding standard deviations at each pixel on the right in Fig. 1. \begin{figure*}[!tbp] \centering \includegraphics[width=0.5\columnwidth]{Plots/new_optical_depth_rotated_dowell_haslam_nside256.pdf}\includegraphics[width=0.5\columnwidth]{Plots/new_optical_depth_error_bars_rotated_dowell_haslam_nside256.pdf} \label{fig:f1} \includegraphics[width=0.5\columnwidth]{Plots/new_I_g_rotated_dowell_haslam_nside256.pdf}\includegraphics[width=0.5\columnwidth]{Plots/new_I_g_error_bars_rotated_dowell_haslam_nside256.pdf} \label{fig:f2} \includegraphics[width=0.5\columnwidth]{Plots/new_alpha_g_rotated_dowell_haslam_nside256.pdf}\includegraphics[width=0.5\columnwidth]{Plots/new_alpha_g_error_bars_rotated_dowell_haslam_nside256.pdf} \label{fig:f3} \caption{ \textit{Left}: HEALPix maps of the values of $F$, $I_\mathrm{o,g}$ and $\alpha_1$, from top to bottom, from our fits. The letters in the upper left map correspond to pixels whose spectra are plotted in Figure 2. \textit{Right}: The corresponding standard deviations at each pixel for each of our three fit parameters. All six maps are in Galactic coordinates, with Galactic center at the middle of the maps.} \label{fig:fit_maps} \end{figure*} To illustrate how these fits are behaving we selected several pixels which span a range of environments and are broadly representative of the different kinds of spectral behavior seen in the data. The pixels we chose are indicated in the upper left panel of Figure 1 with letters. Pixels A, B, and E are chosen to be at high Galactic latitudes, far away from known regions of emission. Pixels D and F, on the other hand, are well within the Galactic plane. Pixel C is at high latitudes, but in the North Polar Spur of the Galaxy. The measured spectrum for each of these pixels (blue points) and our fit (red line) is shown in Figure 2. The vertical dashed line shows the frequency at which the optical depth reaches unity (see discussion below) and the shaded gray regions show the 1, 2, and 3$\sigma$ equivalent uncertainties on this value. We see that our model provides a good fit to the data across all the different conditions probed. We discuss the calculation of the confidence intervals below, but we can see several general classes of fits: Pixel A shows no evidence for a spectral turnover; the fit to Pixel B prefers a spectral turnover, but is of very weak ($<1\sigma$) statistical significance; Pixels C, D, and E all show marginal evidence for a spectral turnover ($>1\sigma$ but $<2\sigma$); and Pixel F shows relatively convincing evidence of a turnover ($>2\sigma$ but $<3\sigma$). \begin{figure*}[!tbp] \centering \includegraphics[scale=0.6]{Plots/new_A_pixel.pdf}\label{fig:f1} \includegraphics[scale=0.6]{Plots/new_B_pixel.pdf}\label{fig:f2} \includegraphics[scale=0.6]{Plots/new_C_pixel.pdf}\label{fig:f3} \includegraphics[scale=0.6]{Plots/new_D_pixel.pdf}\label{fig:f4} \includegraphics[scale=0.6]{Plots/new_E_pixel.pdf}\label{fig:f5} \includegraphics[scale=0.6]{Plots/new_F_pixel.pdf}\label{fig:f6} \caption{ The measured data values (blue points) and fits (red lines) for the six pixels indicated in the upper left panel of Figure 1. The vertical dashed line shows the frequency at which the optical depth reaches unity and the shaded gray regions from darkest to lightest show the 1, 2, and 3$\sigma$ equivalent uncertainties on this value, respectively (see text for details).Pixel A shows no evidence for a spectral turnover, and so the shaded grey regions are all effectively at zero and are not visible on the plot. The inset subplots in each panel zoom in on the frequency range $0-100$\,MHz.} \label{fig:pixelplot} \end{figure*} From the map of the optical depth coefficient, we need to determine which areas of the sky are optically thick to various redshifts of the 21\,cm signal. In order to do that, we find the frequency where the optical depth $\tau = 1$ and expressed Eq. 3 in the following way: \begin{equation} \tau = F \nu^{-2.1} = 1 \end{equation} which we rewrote to find the expression for the frequency at which it becomes optically thick: \begin{equation} \label{eq:F_to_nu} \nu = F^{1/2.1} \end{equation} To determine the uncertainty on the frequency at which a pixel becomes optically thick, we used Monte Carlo simulation. Using the uncertainties we calculated from our fit, we create one million possible optical depth coefficients normally distributed around the best fit value. Each value in the distribution is then converted to frequency using Eq. \ref{eq:F_to_nu}. We then calculated the mean and ``1, 2 and 3 sigma equivalent'' widths of that distribution, i.e. the distances from the left and the right off the peak of the distribution which contain $68.2\%$, $95\%$ and $99.7\%$ of the probability, respectively. We express our results in terms of the statistical confidence with which we can claim a pixel to be optically thick (to 21\,cm emission from a particular redshift). For example, consider a pixel where, using Eq. \ref{eq:F_to_nu}, we determine that the the sky becomes optically thick at 15\,MHz. Using our Monte Carlo simulations, we then determine the uncertainties on that frequency to be $\pm 3$\,MHz ($1\sigma$-equivalent) and $\pm 8$\,MHz ($2\sigma$-equivalent).\footnote{Note that because we use Monte Carlo simulations to calculate the error distribution, the $2\sigma$-equivalent error need not equal twice the $1\sigma$-equivalent error (as in this example, but is generally true of our results), nor do the errors need to be symmetric around the mean (which is not the case in this example).} We then compare with 9.4\,MHz, the frequency of redshifted 21\,cm emission from $z=150$. In this case, the pixel is said to be optically thick to 21\,cm emission from $z=150$ at greater than $1\sigma$ confidence (but not at greater than $2\sigma$ confidence). Once we found the turnover frequency and the corresponding error bars, we created HEALPix maps of the sky to show which regions are optically thick for 21\,cm signal. As the optical depth is frequency dependent, we needed to pick a specific frequency to determine whether it is optically thick. We chose frequencies corresponding to several redshifts of interest for 21\,cm cosmology: $z=50$, 100, and 150. Figure 3 shows which pixels are optical thick at each of these three redshifts and the associated confidence. \begin{figure*}[!tbp] \centering \includegraphics[scale=0.6]{Plots/new_opt_thick_map_150_redshift.pdf}\label{fig:f1} \hfill \includegraphics[scale=0.6]{Plots/new_opt_thick_map_100_redshift.pdf}\label{fig:f2} \includegraphics[scale=0.6]{Plots/new_opt_thick_map_50_redshift.pdf}\label{fig:f3} \caption{Pixels that are optically thick to 21\,cm emission from redshifts $z=150$ (top), 100 (middle) and 50 (bottom). Different colors represent the statistical confidence with which we can claim the pixel is optically thick. As with Figure \ref{fig:fit_maps}, all maps are in Galactic coordinates.} \label{fig:significance_maps} \end{figure*} \begin{table}[] \centering \begin{tabular}{c|c|c|c} \makecell{Percentage of the sky \\ optically thick at \dots} & $z=150$ & $z=100$ & $z=50$ \\ \hline \dots > 1 $\sigma$ confidence & $27.7\%$ & $14.8\%$ & $0.719\%$ \\ \hline \dots > 2 $\sigma$ confidence & $0.984\%$ & $0.697\%$ & $0.052\%$ \\ \hline \dots > 3 $\sigma$ confidence & $0.189\%$ & $0.101\%$ & $0.001\%$ \\ \end{tabular} \caption{: Percentage of the sky optically thick to the 21 cm signal with statistical confidence > $1\sigma$, $2\sigma$ and $3\sigma$ at redshift 150, 100 and 50.} \label{tab:my_label} \end{table} We also calculate what percentage of the whole sky is optically thick to 21 cm signal. The results are presented in Table 1. Because a portion of the sky is masked (i.e. below the horizon for the LWA1), we first calculate the optical thickness ratio in Galactic and extragalactic regions. We calculated percentages of the sky which fall into the two regions in the unmasked and masked parts of the maps. $23\%$ of the masked region falls within 10 degrees of zero Galactic latitude, which we classified as Galactic region. However, only $16\%$ of the unmasked region falls into the Galactic region. To account for that, we calculated what percentage of the unmasked region was optically thick in the Galactic region vs extragalactic region and assumed the same proportions in the masked region to calculate the final optically thick percentage of the whole sky. We then assumed the region of the Southern hemisphere covered by the horizon would have proportional optical thickness Galactic and extragalactic regions. This allowed us to estimate the optical thickness ratio in the whole sky. \section{Discussion} \label{sec:discussion} The numbers in Table 1 are largely encouraging for high redshift 21\,cm cosmology, particularly for the lower redshifts of the cosmic Dark Ages. While challenges of foreground removal must still be overcome, the issue of foreground opacity appears of little concern. We do find that $\sim25 \%$ of the sky is optically thick for redshift $z=150$, albeit at low statistical significance. However, this does not appear to be random error. Visual inspection of the data in Figure \ref{fig:pixelplot} shows that the LWA1 data do generally show a spectral flattening towards lower frequencies. Whether this effect is real or an artifact of the LWA1 sky survey is difficult to know. We do note that the optical depth coefficient is always low in the regions of the sky corresponding to the horizons of the LWA1 site. The response of the instrument is lower towards the horizon, making these higher noise regions, which we see in the LWA1 error maps. However, the optical depth coefficient maps in the regions are not noisy but instead consistently lower than in the rest of the sky, suggesting there might be a primary beam correction issue that leads to altered frequency dependence at those low elevations. \citet{Dowell} also mentioned that LWA1 data has systemically lower temperatures near South Galactic Pole, which might be due to the limitations of in the dipole response model and the missing spacings corrections. Our results are generally consistent with older studies like \citet{Ellis&Hamilton}, which find that areas off the Galactic plane are optically thin at all but the lowest frequencies (most of which are not relevant for 21\,cm Cosmology), whereas in the plane of the Galaxy absorption can be significant at frequencies as high as 20\,MHz. A more quantitative comparison with the sky model of \citet{Cong} reveals some interesting discrepancies, however. We use their model to generate maps at 9.9 and 10.1\,MHz and look for pixels that (in specific intensity) are brighter at 10.1\,MHz than at 9.9\,MHz --- i.e., pixels that have a turnover in their spectrum due to free-free absorption at a frequency higher than 10\,MHz. Depending on the specific model parameters used, we find that between 1 and 2\% of pixels meet this criterion. Using our fits, however, we find that over 70\% of pixels have a spectral turnover at frequencies higher than 10\,MHz! The reason for this seemingly significant discrepancy can be found by comparing the methodologies. \citet{Cong} use low-frequency sky maps (including the LWA1 survey we analyze here) to calculate the spectral index of synchrotron emission in the limit of an \emph{absorption free} sky. That is, they explicitly assume there is no effect from free-free absorption at any of the frequencies in the LWA1 sky maps, which they argue is justified based on the \texttt{NE2001} \citep{ne2001a,ne2001b} model of free electron density in the Galaxy. In turn, any spectral turnovers in the \citet{Cong} model come from using the \texttt{NE2001} model to predict the optical depth along various lines of sight through the Galaxy. Our methodology differs in that we fit a spectral model that includes a (potential) turnover directly to the LWA1 data. As we have seen, many pixels in the LWA1 maps exhibit a spectral flattening towards the lowest frequencies, even off the plane of the Galaxy (see e.g. Pixels C and E in Figure \ref{fig:pixelplot}). In effect, our fits interpret this spectral flattening as evidence of a significantly higher optical depth than is predicted by the \citet{Cong} model. We again caution that this result is of low statistical significance given the relatively large uncertainties on the LWA1 data. To estimate the statistical uncertainties on the above statement that 70\% of pixels in our fits have a spectral turnover at frequencies higher than 10\,MHz, we use the calculated error bars on the frequencies where the optical depth equals unity.\footnote{Strictly speaking, the frequency where the optical depth equals one is not the same as the frequency where the spectrum turns over (as can be seen in Figure \ref{fig:pixelplot}, the vertical dashed line does not always land at the peak of the best fit model spectrum). However, calculating robust uncertainties on the turnover frequencies is more computationally demanding to Monte Carlo, since the exact position of the turnover depends on all three of our fit parameters (as opposed to just the optical depth coefficient, $F$, which alone determines the frequency at which the optical depth becomes unity). As a check, we calculate both sets of uncertainties for the representative pixels in Figure \ref{fig:pixelplot} and find that the two generally agree. Using one set of uncertainties as a proxy for the other should therefore be sufficient for the rough estimate presented here.} When including these uncertainties, only $\sim$30\% of pixels have a spectral turnover above 10\,MHz with $1\sigma$ confidence; at $2\sigma$, this number drops to $\sim$1.5\%, consistent with the values calculated from the \citet{Cong} model. Ultimately, we will need better and/or lower-frequency data to determine whether the spectral flattening seen at the lowest frequencies of the LWA1 survey is real and provides evidence of higher-than-expected free-free optical depths through the Galaxy. If these low-significance results do hold, however, the impact on Dark Ages 21\,cm cosmology will be tangible --- but they certainly do not spell disaster for the field. For projects that envision the Dark Ages 21\,cm signal as the ultimate cosmological observable, where effectively all modes of the density power spectrum can be measured, this will reduce the total number of measurable modes and increase the effect of cosmic variance. We do not provide detailed forecasting here, but even a $\sim25\%$ reduction in the number of measurements is unlikely to qualitatively change what can be done with Dark Ages observations given the tremendous potential of the technique. (We note that CMB experiments like Planck recommend masking $\sim22\%$ of pixels, a very similar fraction of the sky; \citealt{planck}.) The larger effect will likely be on the observational approach. Experiments designed to map the 21\,cm signal can likely just mask optically thick regions from their analysis, akin to many CMB experiments. However, since the distribution of (potentially) optically thick regions is not random (c.f. Figure \ref{fig:significance_maps}), landing sites for lunar far side experiments should be carefully considering to minimize the fraction of observable sky that is obscured --- especially if, for simplicity of deployment, zenith-pointing, non-steerable antennas are used. Furthermore, experiments using non-imaging based techniques (e.g. \citealt{parsons_et_al_2012b}) will need to take care to exclude optically thick regions from their analysis, particularly if they have very large fields of view. For additional data, we initially considered using OVRO-LWA (Owens Valley Long Wavelength Array) sky maps \cite{Eastwood_2018}, which were created using Tikhonov regularized $m$-mode analysis imaging techniques with angular resolution of $\sim15$ arcmin. However, these maps proved difficult to use in practice. Unlike the LWA1 sky survey maps, no zero-level correction was performed. We tried to calculate the offsets of each map ourselves by extrapolating the Haslam map at high Galactic latitudes to LWA frequencies to find offsets relative to each OVRO-LWA map. We also tried a similar approach using the 45\,MHz Guzman map \citep{Guzman}. Ultimately, the results were overly sensitive on the offset correction, which emphasizes the importance of this procedure when using interferometric maps to make statements about spectral behavior of diffuse objects. Further complicating our use of the OVRO-LWA maps were the errors quoted as fixed amount of thermal noise (roughly $800\,\mathrm{mJy/beam}$ in each map) across the entire sky. Not only are these errors a factor of 10-20 less than the LWA1 errors, their uniformity across the sky led to unbelievable results of nominally high significance at low elevation angles. Lower frequency data can answer these questions, but because of the ionosphere it becomes more difficult to get high-quality maps below 30\,MHz. Lower frequency observations from space and/or the lunar far side may provide the best foreground maps for this kind of analysis. Another issue seen in our analysis (not directly related to the data quality) is that the fit seems to break down in the very center of the Galactic plane. This does not come as a surprise, as the two-component model is appropriate for much of the sky ``except near the galactic plane where higher intensities are encountered'' \citep{TMS}. As these are H-II regions, dominated by bremsstrahlung radiation, our two-component model will not be able to describe it accurately. However, we are not worried about falsely interpreting these pixels because we can be quite confident that the center of the Galaxy is optically thick. In addition, the optical depth coefficient values in this pixels don't have a significant effect on the overall results as they comprise only a small fraction of the sky. We also note that we did not consider extragalactic free-free absorption. Given the limitations of the LWA1 data, we do not expect that we could distinguish this contribution to any spectral turnover from absorption with a Galactic origin even if it was included as another free parameter in our fits. However, higher-precision future studies with lower-frequency data could be used to explore the impact of this effect. \section{Conclusion} \label{sec:conclusion} We used the LWA1 \citep{Dowell} dataset at 9 frequencies combined with the 408\,MHz Haslam map \citep{Haslam_1981, Haslam_1982, Remazeilles} to fit a two-component model from \citet{Cane} and calculate the optical depth of foregrounds at low frequencies. We used a nonlinear least squares fit to find 3 parameters of that model and calculated the turnover frequency of each pixel. We then used Monte Carlo simulation to calculate the error bars of the turnover frequency to find which regions of the sky are optically thick to 21\,cm signal at redshifts 150, 100 and 50, respectively. In conclusion, our results are very encouraging for Dark Ages 21\,cm cosmology as most of the sky is not optically thick at high statistical significance. However, at the highest redshifts ($z=150$), we see low significance evidence that a large portion of sky may be optically thick to the 21\,cm signal. Lower-frequency maps are likely the best way to resolve this issue. \section*{Acknowledgements} The authors would like to thank Adrian Liu for several exceptionally helpful conversations related to this project, Avery Kim for providing a HEALPix version of the Guzman 45\,MHz map, and Yanping Cong for help installing their ULSA code. We would also like to thank the LWA1 Low Frequency Sky Survey team for publicly releasing their maps, and our anonymous referee for helping to improve the manuscript. This research was conducted using computational resources and services at the Center for Computation and Visualization, Brown University. \section*{Data Availability} The data underlying this article were accessed from LWA1 Low Frequency Sky Survey: \url{http://lda10g.alliance.unm.edu/LWA1LowFrequencySkySurvey/} and the desourced and destriped 408\,MHz Haslam map: \url{https://lambda.gsfc.nasa.gov/product/foreground/fg_2014_haslam_408_info.cfm} The derived data generated in this research will be shared on reasonable request to the corresponding author. \bibliographystyle{mnras}
\section{Introduction} \label{sec:intro} Solidified metals and alloys predominantly exhibit dendritic microstructures with geometrical features that have a direct effect on the thermo-mechanical properties of materials \cite{trivedi1994}. The primary dendritic arm spacing, for instance, may determine to a large extent the ultimate tensile strength \cite{quaresma2000,osorio2002}. Thus, especially for materials exposed to high temperatures and stresses, it is of tremendous importance to predict and control such characteristic length scales emerging during solidification. Dendritic morphologies result from a complex interplay between phenomena on different length scales: from capillarity effects at the atomistic scale of the solid-liquid interface to macroscopic heat and solute transport in the liquid \cite{langer1980,trivedi1994}. Within the past decades, many theoretical approaches have addressed the selection of dendritic patterns at different length scales, primarily focusing on the fundamental phenomena of capillarity and diffusion \cite{ivantsov1947,barbieri1989,benamar1993}. However, convective transport in the liquid phase was also reported to have a great influence on dendritic microstructure selection \cite{mehrabian1970,nguyen1989}. Buoyant flow in the liquid phase is primarily due to the gradients in temperature and solute concentration resulting from crystal growth, combined with the effect of gravity. Experiments in microgravity have been carried out in order to circumvent the effect of gravity-induced buoyancy \cite{glicksmann1994,nguyen2005,nguyen2017}. However, melt flow is inevitable under realistic Earth-based experimental and industrial conditions. Fluid flow adds an extra level of complexity to the relatively well-studied dendritic growth under purely diffusive conditions, but its fundamental understanding remains both paramount and challenging. The consequences of fluid flow on the resulting dendritic microstructures are multiple. The stirring of the liquid phase contributes to a reduction of the solute boundary layer ahead of the growing front, which may extend the range of stable velocities for a planar solid-liquid interface \cite{clarke2017microstructure}. Fluid flow also substantially affects the selection of microstructural length scales, such as primary dendritic spacings \cite{dupoy1992,bataile1994, trivedi2002effect}. In spite of these observations, the understanding of fundamental relationships between processing and microstructures during solidification in the presence of convection remains incomplete. A reason for this knowledge gap is the lack of modeling approaches for quantitative simulations at the relevant length/time scales. This article uses a recently proposed multiscale model to address some of these outstanding gaps. Convective effects on directional solidification (DS) are particularly important in the context of Nickel (Ni) superalloys for aeronautical applications. Indeed, single-crystal turbine blades are typically produced by DS \cite{pollock2006}, and undesirable defects, such as freckles, are closely tied to convective transport of solute species in the liquid \cite{giamei1970nature, pollock1996breakdown, auburtin2000freckle}. In this context, the emergence of in situ imaging techniques for metallic alloys, e.g. the use of time-resolved X-ray radiography, has allowed a substantial advance in the study of gravity-induced flow and its consequences on microstructure selection \cite{bogno2011,shevchenko2013,clarke2015x,reinhart2020}. Among such recent observations, an oscillatory growth regime was observed during DS of CMSX-4, a Ni-based superalloy commonly used for single-crystal turbine blades \cite{reinhart2020}. This unstable growth of the solidification front has been linked to the presence of buoyant flow in the liquid, but the fundamental mechanisms behind these oscillations remain to be explored and explained on a quantitative basis, due to the lack of adequate modeling method~\cite{reinhart2020}. In this article, we reproduce the oscillatory growth during DS of CMSX-4 and bring quantitative clarifications on this nontrivial behavior. In terms of modeling, the phase-field (PF) method, implicitly tracking the solid-liquid interface, has for decades been the computational method of choice to simulate dendritic growth \cite{boettinger2002phase}. Integrating melt flow within PF models has allowed the study of dendrite morphologies under forced \cite{beckermann1999,jeong2001,jeong2003} and natural convection \cite{steinbach2009}, and the exploration of the effect of fluid flow on primary spacing in columnar dendritic arrays \cite{steinbach2009,viardin2020a,viardin2020b}. However, simulation domains have for the most part remained limited in size to a handful of primary dendrites. Recent numerical methods have enabled substantial acceleration, e.g. using parallelization on Graphics Processing Units (GPUs) and/or using the Lattice Boltzmann method \cite{takaki2015,takaki2017,takaki2018}. Still, due to the scale separation between dendritic tips and solute transport, simulations of dendritic growth with fluid flow at experimentally relevant length and time scales with the PF method remain challenging, unless using advanced algorithms and tremendous computational resources \cite{sakane2020two}. In order to address these computational limitations, the multiscale Dendritic Needle Network (DNN) model \cite{tourret2013a,tourret2016} was designed to bridge the scale gap between PF and coarse-grained models. The dendritic structure is described by a hierarchical network of thin parabolic-shaped needles. It was shown to be well suited for modeling spacing selection in binary alloys \cite{bellon2021}. For equiaxed growth, the model was extended to include liquid melt flow in two dimensions (2D) \cite{tourret2019} and recently three dimensions (3D) \cite{isensee2020}. In this article, we present a 2D formulation of the DNN model applied to directional solidification conditions, including convective transport in the melt (Sec.\,\ref{sec:model}). We verify the predictions of the DNN model in terms of primary dendrite arm spacings, by comparing them to results of independent PF simulations and experimental data for aluminum-copper \cite{steinbach2009} (Sec.\,\ref{subsec:verification_al-cu}) and titanium-aluminum \cite{viardin2020a,viardin2020b} (Sec.\,\ref{subsec:verification_ti-al}) alloys. Finally (Sec.\,\ref{sec:nickel}), we simulate the buoyancy-induced oscillatory growth observed in CMSX-4 directional solidification \cite{reinhart2020}, which enables a deeper exploration of its key underlying mechanisms. \section{Model} \label{sec:model} The model used here, and its numerical implementation, are direct extensions of our previous works. Therefore, we only provide a brief introduction to the key concepts and equations of the method, while all further technical details can be found in earlier articles \cite{tourret2016,tourret2019}. \subsection{Sharp-interface model} We consider a binary alloy of nominal solute concentration $c_\infty$ in the dilute limit where the interface solute partition coefficient $k=c_s/c_l$ between equilibrium concentrations of solid ($c_s$) and liquid ($c_l$) phases can be considered constant. The temperature field is assumed to follow the frozen temperature approximation $T=T_0+G(x-V_p t)$, with a reference temperature $T_0$, a constant temperature gradient $G$ and a pulling velocity $V_p$. Here, the reference temperature $T_0$ is chosen as the alloy solidus temperature $T_s$ at its nominal concentration $c_\infty$. For moderate growth velocities, kinetic undercooling can be neglected, such that the equilibrium of the solid-liquid interface can be written via the Gibbs-Thomson relation \cite{tourret2016} \begin{equation} \label{eq:gibbs_thomson} \frac{c_l}{c_l^0} = 1 - (1-k)d_0 f(\theta)\kappa - (1-k)\frac{x-V_p t}{l_T}, \end{equation} where $c^0_l = (T_M-T_L)/|m|=c_\infty/k$ is the liquid equilibrium concentration of a flat interface at $T_0$, $d_0 = \Gamma/\left[|m|(1-k)c_l^0\right]$ is the capillary length at $T_0$ with $\Gamma$ the interface Gibbs-Thomson coefficient, $f(\theta)$ expresses the dependence of the interface stiffness upon its orientation ($\theta$), $\kappa$ is the interface curvature, and the thermal length $l_T = |m|(1-k)c^0_l/G$ corresponds to the freezing range of the alloy. The Gibbs-Thomson equation \eqref{eq:gibbs_thomson} is combined with a statement of solute conservation at the solid-liquid interface that takes the form of the Stefan condition \begin{equation} \label{eq:stefan} (1-k)c_l \bm{v}_n = D\nabla c|_i , \end{equation} where $\bm{v}_n$ is the interface velocity, $D$ is the solute diffusion coefficient in the liquid phase, assuming that diffusion in the solid is negligible, and $\nabla c|_i$ denotes the solute concentration gradient in the liquid at the interface. Finally, the sharp-interface problem is completed by an equation for the transport of solute in the bulk, which may, in the vicinity of the interface, be considered to follow the diffusion equation \begin{equation} \label{eq:diffu} \partial_t c = D\nabla^2 c, \end{equation} but may also incorporate additional (e.g. advective) terms in the bulk liquid further from the interface (See Sec.\,\ref{sec:navierstokes}). \subsection{Reduced solute field} Introducing the reduced solute field $U = (c^0_l-c)/[(1-k)c^0_l]$, the Gibbs-Thomson relation \eqref{eq:gibbs_thomson}, i.e., the interface equilibrium concentration can be written as \begin{equation} \label{eq:gibbs_thomson_U} U_i = d_0 f(\theta)\kappa + \frac{x-V_p t}{l_T}. \end{equation} with the far-field condition $U_i(x\rightarrow+\infty) = 1$. The diffusion equation and Stefan condition for the non-dimensional field $U$ hence become \begin{align} \label{eq:diffusion_U} \partial_t U &= D\nabla^2 U,\\ \label{eq:stefan_U} \left[1-(1-k)U_i\right]\bm{v}_n &= D\partial_n U|_i. \end{align} \subsection{Solvability condition} Several studies \cite{barbieri1989, benamar1993} have shown that at the small scale of the dendritic tip radius $R$, the free boundary problem defined by \eqref{eq:gibbs_thomson_U}-\eqref{eq:stefan_U} only has a solution if the microscopic solvability condition holds, which reads \begin{equation} \label{eq:r2v} R^2 V = \frac{2Dd^*_0}{\sigma} = \frac{1}{1-(1-k)U_t}\frac{2Dd_0}{\sigma}, \end{equation} with $d^*_0$ the capillary length expressed at the tip temperature, $\sigma$ the tip selection parameter, and $U_t = (x_t-V_p t)/l_T$ the equilibrium concentration at the tip position $x_t$, neglecting curvature and kinetic undercooling. \subsection{Flux intensity factor} At a scale much larger than the tip radius $R$, where the curvature of a needle is negligible, but much smaller than the diffusion length $l_D$, we can integrate the Stefan condition \eqref{eq:stefan_U} along a parabolic tip \cite{tourret2016}, leading to \begin{equation} \label{eq:rv2} RV^2 = \frac{2D^2\mathcal{F}^2}{\left[1-(1-k)U_t\right]^2 d_0}. \end{equation} The flux intensity factor (FIF) $\mathcal{F}$ measures the normal solute flux towards the dendrite along the contour $\Gamma_0$ along the interface up to a distance $a$ behind the tip. It is defined as \begin{equation} \mathcal{F} := \frac{1}{4\sqrt{a/d_0}}\int_{\Gamma_0} (\partial_n U)\,dS, \end{equation} where $\partial_n U$ is the flux normal to the interface. In practice, one can choose a more convenient integration domain $\Gamma_i$ (here circular), that encloses the area $\Sigma_i$ around the needle tip \cite{tourret2019,isensee2020}. Using the divergence theorem and assuming a Laplacian solute field in the domain moving with velocity $V$, the integral of the FIF can be calculated by \begin{equation} \label{eq:fif} 4\mathcal{F}\sqrt{a/d_0} = \int_{\Gamma_i} \left(\partial_{n^*} U\right) dS +\frac{V}{D}\int_{\Sigma_i}\left(\partial_x U\right) dA, \end{equation} with $\partial_{n^*} U$ the flux across the $\Gamma_i$ integration contour using an outwards pointing normal vector $\bm{n^*}$, for a needle growing in the $x$-direction \cite{tourret2019,isensee2020}. \subsection{Solute transport} \label{sec:navierstokes} On the large scale of the diffusion length $l_D=D/V$ and above, the dendrites appear as thin needles, their curvature can be neglected, and the Gibbs-Thomson relation \eqref{eq:gibbs_thomson_U} can be approximated by \begin{equation} \label{eq:equilU} U_i = \frac{x-V_p t}{l_T}. \end{equation} At all times, Eq.~\eqref{eq:equilU} is imposed as an internal boundary condition over the entire needle network, as it represents the fact that the solid-liquid interface is at equilibrium. In the bulk liquid we consider solute transport by not only diffusion but also by (buoyancy-driven) convection, by solving the incompressible Navier-Stokes equation \begin{equation} \label{eq:ns} \rho\left[\partial_t\bm{v}+(\bm{v}\cdot\nabla)\bm{v}\right] = \bm{F} - \nabla p + \eta\nabla^2\bm{v} \end{equation} for the fluid velocity $\bm{v}$, where $\rho$ is the fluid density, $p$ is the pressure, $\eta$ is the viscosity and $\bm{F}$ represents external forces. The incompressibility condition reads \begin{equation} \label{eq:poisson} \nabla\cdot\bm{v}=0. \end{equation} Here, we only account for external buoyancy forces due to solute concentration gradients, considering that they are typically dominant over those induced by temperature gradients. Hence, we use the Boussinesq approximation for the buoyancy force term, \begin{equation} \bm{F} = \rho^l_\infty\bm{g}\left[1-\beta_c(c-c_\infty)\right], \end{equation} with a solutal expansion coefficient \begin{equation} \label{eq:solutal_expansion_coefficient} \beta_c = -\frac{1}{\rho^l_\infty}\frac{\partial\rho}{\partial c}\Bigr|_{c=c_\infty}, \end{equation} evaluated at the nominal concentration, where the liquid density is $\rho^l_\infty$. The transport of solute in the liquid with fluid velocity $\bm{v}$ is thus described by the advection-diffusion equation \begin{equation} \label{eq:U} \partial_t U + \nabla\cdot(\bm{v}U) = D\nabla^2 U. \end{equation} \subsection{Implementation} The resulting model consists in solving the incompressible Navier-Stokes problem \eqref{eq:ns}-\eqref{eq:poisson} and the advection-diffusion equation \eqref{eq:U} in the liquid phase. An equilibrium condition on the concentration field, Eq.~\eqref{eq:equilU}, and a null velocity are imposed over a network of parabolic branches. At each time, the tip radius and growth velocity of each individual branch is calculated from Eqs~\eqref{eq:r2v}-\eqref{eq:rv2}, where the FIF is integrated according to Eq.~\eqref{eq:fif}. The numerical resolution of the model and its implementation are presented in detail in \cite{tourret2019}. Essentially, using a finite difference spatial discretization on a staggered grid, the Navier-Stokes equations are solved using a projection method \cite{chorin1968} and an iterative successive over-relaxation method \cite{frankel1950, young1954} is used for the incompressibility condition. The time-stepping is carried out with an explicit Euler method. The code is implemented in the C-based CUDA programming language for Nvidia GPUs, which allows a substantial acceleration via parallelization. \section{Gravity effect on primary spacing selection} \label{sec:verification} \begin{table*}[ht!] \centering \begin{tabular}{lccc} \hline Property & Symbol & Value & Unit\\ \hline Nominal composition & $c_\infty$ & $4$ & $\si{\atpercent}$ \\ Liquidus slope & $m$ & $-1.6$ & $\si{\kelvin\per\atpercent}$ \\ Partition coefficient & $k$ & $0.14$ & \\ Liquid diffusivity & $D_l$ & $\num{3e-9}$ & $\si{\meter^2\per\second}$ \\ Kinematic viscosity & $\nu$ & $\num{5.7e-7}$ & $\si{\meter^2\per\second}$ \\ Solutal expansion coefficient & $\beta_c$ & $\num{-e-2}$ & $\si{\per\atpercent}$ \\ Interfacial energy anisotropy (PF) & $\epsilon$ & $\num{2e-2}$ & \\ Tip selection parameter (DNN) & $\sigma$ & \num{0.153} & \\ \hline Temperature gradient & $G$ & $\num{e4}$ & $\si{\kelvin\per\meter}$ \\ Pulling velocity & $V_p$ & $\num{4e-5}$ & $\si{\meter\per\second}$ \\ \hline Finite difference grid spacing & $h$ & $\numrange{0.8}{1.25}$ & $R_s$ \\ FIF integration radius & $r_i$ & $4$ &$h$ \\ Parabola truncation radius & $r_\text{max}$ & $\num{1}$ & $r_i$ \\ Upwind parameter & $\omega_\text{up}$ & $0.9$ & \\ Successive Over Relaxation parameter & $\omega_\text{SOR}$ & $1.1$ & \\ SOR residual required for convergence & $\overline{r}_\text{SOR}$ & $\num{e-3}$ & \\ Time step safety factor & $K_{\Delta t}$ & $\numrange{0.3}{0.6}$ & \\ \hline \end{tabular} \caption{Material and processing parameters for directional solidification of Al-$\SI{4}{\atpercent}$-Cu from \cite{steinbach2009} and numerical parameters (see ref. \cite{tourret2019} for details).\label{tab:al_cu_0}} \end{table*} For a given alloy under given processing conditions, the primary dendritic spacing, $\lambda_1$, is known to be selected within a broad range \cite{han1994primary, hunt1996numerical, echebarria2010onset, bellon2021}. Below a minimum spacing $\lambda_\text{min}$, dendrites get eliminated through solute interaction with neighbors. Above a maximum spacing $\lambda_\text{max}$, dendritic side-branching occurs and new primary branches emerge. Moreover, the solute transport regime is well acknowledged to greatly influence spacing selection \cite{dupoy1992, bataile1994, trivedi2002effect}. In the first two applications of the DNN model, we study the selection of primary dendritic spacing under different gravity conditions. To do so, we consider two independent studies for Al-Cu \cite{steinbach2009} and Ti-Al \cite{viardin2020b} alloys. Both studies rely on 2D phase-field simulations using a multi-phase field approach coupled to a Navier-Stokes solver, hence providing a fair quantitative comparison with our 2D DNN simulations results. These quantitative comparisons constitute a sound verification -- against the reference PF results -- and validation -- against the corresponding experimental data -- of the DNN method. \subsection{Spacing selection in Al-Cu alloy} \label{subsec:verification_al-cu} Primary spacing selection via elimination ($\lambda_\text{min}$) in directional solidification in a buoyancy-driven flow was addressed with the PF method for Al-$\SI{4}{\atpercent}$-Cu \cite{steinbach2009}. There, the effect of gravity strength was investigated, and the following scaling law was proposed \begin{align} \label{eq:steinbach1} a_0 g &= \lambda^{-7} - \lambda^{-4}\quad&\text{for }g\geq 0\\ \label{eq:steinbach2} a_0 g &= -\lambda^2 + \lambda^{-4}\quad&\text{for }g\leq 0 \end{align} which describes the ratio $\lambda=\lambda_1/\lambda_0$ between the primary dendritic spacing $\lambda_1$ and its value in absence of gravitational forces $\lambda_0$, when gravity and growth are in the same direction ($g>0$) or in opposite directions ($g<0$). A prefactor value $a_0=5$ was found to yield a good agreement to PF results \cite{steinbach2009} and experimental measurements \cite{bataile1994}. \subsubsection{DNN simulations} We carried out DNN simulations of directional solidification using similar alloy and processing parameters as in Ref.~\cite{steinbach2009}. Thermophysical alloy properties, processing conditions, and numerical parameters (see detailed definitions in Ref.~\cite{tourret2019}) are listed in Table \ref{tab:al_cu_0}. Instead of reduced-size PF simulations \cite{steinbach2009}, DNN simulations are performed over entire dendritic arrays of at least 13 (and up to 51) primary dendrites growing together at steady state. The simulations are initialized with several parallel and evenly spaced needles with their tips located at the liquidus temperature. The envelope joining all tips is meant to approximate a planar front. The initial solute distribution is given by $U(x<l_T, y) = x/l_T$ and $U(x>l_T, y) = 1$. The simulations are carried out on a moving domain, meaning that the most advanced needle tip stays at a fixed position within the computational domain. The boundary conditions are periodic in the $y$-direction (laterally). On the top and bottom boundaries (normal to the growth direction $x$), we set free-slip conditions with $v_x = 0$ for the fluid flow, meaning that flow through the boundary is not allowed. The diffusion field on the top boundary is set to a constant value of $U=1$, which corresponds to the nominal concentration $c_\infty=\SI{4}{\atpercent}$Cu. On the bottom boundary, we set no-flux (mirror) conditions with $\partial U/\partial x = 0$. The finite difference grid spacing, $h$, is set between $\SI{4.6}{\micro\meter}$ (for $g=3g_0=\SI{29.43}{\meter\per\second^2}$) and $\SI{7.1}{\micro\meter}$ (for all other $g$), which corresponds to $\num{0.8}\leq h/R_s\leq\num{1.25}$, with $R_s = \SI{5.7}{\micro\meter}$ the theoretical steady state tip radius for $g=0$ \cite{tourret2016,tourret2019}. The contour used to integrate the flux intensity factor is a circle centered on the tip with a radius $r_i=4h$ and the parabolic tips are bound to a maximum radius $r_\text{max}=r_i$ \cite{tourret2016,tourret2019}. The most advanced dendrite tip is fixed at a height of $\SI{0.9}{\milli\meter}$, and the domain is initialized with between 14 and 118 evenly spaced parallel primary dendrites. Due to the competition for solute among the dendrites, individual dendrites progressively get eliminated, i.e., they leave the moving domain. Eventually, a growth state with stable primary dendrite arm spacing is reached when no more elimination events occur. We determined the stability range of primary dendritic spacings from several simulations, varying domain sizes, initial needle distributions (and hence initial $\lambda_1$), and gravity acceleration (direction and strength). From the initial and final distributions of primary dendrites, we extract the maximum unstable spacing and the minimum stable spacing. They provide an estimate of the range in which the minimum spacing with respect to elimination, $\lambda_\text{min}$, is expected. Simulations were performed with different domain sizes (250\,000 to 600\,000 grid points) and simulated times (300 to 1\,500\,s). Using a single Nvidia RTX 2080Ti GPU, computation times for $g\neq0$ ranged from $\num{3}$ to $\num{16}$ days, while simulations at $g=0$ lasted just a few hours. \subsubsection{Results and discussion} \label{sec:alcu_resu} Fig.\,\hyperref[fig:al_cu_combined_0]{1a} shows the final state at $t=\SI{300}{\second}$ of a simulation with $g=\SI{9.81}{\meter\per\second^2}$ pointing in the growth direction of the dendrites. The domain has $N_x\times N_y = 1150\times 510$ grid points, which makes it $L_y=\SI{8.2}{\milli\meter}$ wide and $L_x=\SI{3.6}{\milli\meter}$ high. Of the initially placed $115$ dendrites only $37$ remain after growth competition and elimination. In this simulation, as in several others, the solute flow contributes to the stabilization of some dendrites slightly trailing behind the leading ones, but eventually growing at a velocity $V_p$ without being eliminated. The presence of these metastable spacings are consistent with PF results \cite{steinbach2009}. \begin{figure}[t!] \centering \includegraphics[width=\columnwidth]{al_cu_g+1_1_spacings_combined_4.pdf} \caption{(a) Final state at $t=\SI{300}{\second}$ of a DNN simulation with gravity $g=g_0=\SI{9.81}{\meter\per\second^2}$ pointing upwards, i.e. in the growth direction. Streamlines show the fluid flow above the solid region, with $V_\text{max}=55\,V_p=\SI{2.2e-3}{\meter\per\second}$. (b) Stable and unstable spacing distribution in Al-$\SI{4}{\atpercent}$-Cu, extracted from PF \cite{steinbach2009} and DNN (this work) simulations for different levels of gravity with $g>0$ pointing in growth direction and $g<0$ pointing against growth direction. (c) Scaling laws \eqref{eq:steinbach1}-\eqref{eq:steinbach2} compared to experimental data \cite{bataile1994} and simulations for different values of the prefactor $a_0$. \label{fig:al_cu_combined_0}} \end{figure} Fig.\,\hyperref[fig:al_cu_combined_0]{1b} shows the stable and unstable spacing distribution for each investigated gravity level, in comparison with PF results from Ref.~\cite{steinbach2009}. The minimum spacings $\lambda_\text{min}$ predicted by the DNN exhibits a good agreement with the PF predictions. At $g\geq0$, the DNN-predicted spacings are slightly smaller, but the discrepancy on average $\lambda_\text{min}$ values remains within about 26\% between DNN and PF results. This discrepancy may stem from the fact that PF simulations used a limited domain size (e.g. domain height of $\SI{600}{\micro\meter}$ corresponding to $\SIrange{10}{25}{\percent}$ of the current simulations), commensurate with computational capabilities at the time. The scaling laws derived in Ref.~\cite{steinbach2009} for upwards downwards gravity directions, i.e. Eqs~\eqref{eq:steinbach1}-\eqref{eq:steinbach2}, are compared to PF, DNN, and experimental \cite{bataile1994} results in Fig.\,\hyperref[fig:al_cu_combined_0]{1c}. The spacings for $g\leq0$, in good agreement with PF results, are also in good agreement with the scaling law with the prefactor $a_0=5$ identified in Ref.~\cite{steinbach2009}. For $g\geq0$, our results still follow the expected trend, but the prefactor seems closer to $a_0\approx30$, but since this value severely overestimates spacings at $g\leq0$, $a_0\approx5$ remains a nearly optimal value. \begin{table*}[ht!] \centering \begin{tabular}{lccc} \hline Property & Symbol & Value & Unit\\ \hline Nominal composition & $c_\infty$ & $45$ & $\si{\atpercent}$ \\ Liquidus slope & $m$ & $-11.26$ & $\si{\kelvin\per\atpercent}$ \\ Partition coefficient & $k$ & $0.9$ & \\ Liquid Diffusivity & $D_l$ & $\num{3e-9}$ & $\si{\meter^2\per\second}$ \\ Gibbs-Thomson coefficient & $\Gamma$ & $\num{1.61e-7}$ & $\si{\kelvin\meter}$ \\ Kinematic viscosity & $\nu$ & $\num{1.89e-6}$ & $\si{\meter^2\per\second}$ \\ Solutal expansion coefficient & $\beta_c$ & $\num{4.784e-3}$ & $\si{\per\atpercent}$ \\ Interfacial energy anisotropy (PF) & $\epsilon$ & $\num{1.1e-2}$ & \\ Tip selection parameter (DNN) & $\sigma$ & \num{0.145} & \\ \hline Temperature gradient & $G$ & $\num{1.2e4}$ & $\si{\kelvin\per\meter}$ \\ Pulling velocity & $V_p$ & $\num{2.5e-5}$ & $\si{\meter\per\second}$ \\ \hline Finite difference grid spacing & $h$ & $\num{1.75}$ & $R_s$ \\ FIF integration radius & $r_i$ & $\num{7}$ &$R_s$ \\ Parabola truncation radius & $r_\text{max}$ & $\num{7}$ & $R_s$ \\ Upwind parameter & $\omega_\text{up}$ & $0.9$ & \\ Successive Over Relaxation parameter & $\omega_\text{SOR}$ & $1.1$ & \\ SOR residual required for convergence & $\overline{r}_\text{SOR}$ & $\num{e-3}$ & \\ Time step safety factor & $K_{\Delta t}$ & $\numrange{0.2}{0.6}$ & \\ \hline \end{tabular} \caption{Material and processing parameters for directional solidification of Ti-$\SI{45}{\atpercent}$-Al from \cite{viardin2020b} and numerical parameters (see ref. \cite{tourret2019} for details).\label{tab:ti_al_0}} \end{table*} Experimental measurements \cite{bataile1994}, only available for $g\geq g_0$, are close to the higher values of $\lambda_\text{min}$ assessed by both PF \cite{steinbach2009} and current DNN results. This small discrepancy between experiments and simulations may be attributed to uncertainties in alloy parameters, but also importantly to dimensionality -- comparing 2D simulations with 3D experiments. This effect is not trivial. Indeed, on the one hand, two-dimensional simulations are known to enhance diffusive interaction among dendrites, consequently overestimating 3D spacings even in diffusive conditions \cite{tourret2015}. Yet, on the other hand, convection is expected to reduce the length of diffusive interaction, and hence reduce the spacing. This latter effect is enhanced even further by the fact that fluid velocities, and their consequences on crystal growth, may also be severely overestimated in 2D simulations \cite{jeong2001,isensee2020}. The current results, from both DNN and PF methods, suggest that the second effect, reducing spacings in 2D simulations, may be dominant. \subsection{Spacing selection in Ti-Al alloy} \label{subsec:verification_ti-al} While the previous section was focused on instabilities in columnar growth due to the elimination of dendrites (when $\lambda<\lambda_\text{min}$), the branching instability that locally reduces the primary spacing (when $\lambda>\lambda_\text{max}$) may also be strongly altered by the presence of fluid flow. Experimental observations of solidifying a Ti-$\SI{47.5}{\atpercent}$Al-$\SI{2}{\atpercent}$Cr-$\SI{2}{\atpercent}$Nb alloy \cite{viardin2020a} alongside with PF simulations of directional dendritic growth in Ti-$\SI{45}{\atpercent}$-Al \cite{viardin2020a,viardin2020b} indicate that fluid flow in the melt, specifically under hypergravity conditions, strongly affects spacing selection. Here, we compare DNN prediction with these results and show that the reduction of dendritic spacing is also captured by the side-branching mechanism with the DNN method. \subsubsection{DNN simulations} The considered thermophysical, processing, and numerical parameters are listed in Table \ref{tab:ti_al_0}. In contrast to the previous section, the simulations are initialized with only one primary dendrite in the center of a domain with $h = 1.75\, R_s$, with $R_s=\SI{2.3}{\micro\meter}$, and size $L_x\times L_y = (1.14\times 0.5)\,\si{\milli\meter^2}$, growing in the $x$-direction. Using a moving frame following the tip position, the most advanced needle tip is fixed at a position of $\SI{0.55}{\milli\meter}$ from the bottom of the domain. The domain is periodic in the $y$-direction (horizontally), and at the top and bottom boundary we apply free-slip conditions with $v_x = 0$. The diffusive field is set to $U=1$ at the top boundary, corresponding to the nominal concentration $c_\infty = \SI{45}{\atpercent}$ of the alloy. At the bottom boundary, no-flux conditions with $\partial U/\partial x = 0$ apply. Consistently with the corresponding PF study \cite{viardin2020b}, several such simulation were performed using different levels of gravity from $g=-20\,g_0$ to $g=+15\,g_0$, again with positive $g$ corresponding to gravitational forces in the same direction as the primary dendrite growth and temperature gradient. Another important difference with previous simulations is the presence of side-branching. Using a similar approach as in previous implementations \cite{tourret2013a,tourret2016}, new branches perpendicular to the parent dendrite are periodically generated at a distance $l_\text{sb}$ behind the dendrite tip, every time the tip has grown by a distance $l_\text{sb}$. The side-branching distance $l_\text{sb}$ of every branch is randomized by adding a random distance $\delta l_\text{sb}$ with range $\left[-\Delta l_\text{sb}/2,+\Delta l_\text{sb}/2\right]$ for each branch independently. Both average side-branching distance and random fluctuation are user-input parameters. As long as the distance between side-branches is short enough to induce growth competition among them, this approach was found to be relatively insensitive to selected branching parameters \cite{tourret2013a} and to reproduce scaling laws for experimentally measured dendrite envelopes \cite{tourret2016}. Here, the side-branching frequency was set at $l_\text{sb}/R_s= \num{7+-1.5}$. These simulations were performed on a single Nvidia RTX 2080Ti GPU. With about 36\,000 grid points for each run, simulations with moderate gravity strength ($|g|<10g_0$) were performed in $\num{2}$ to $\num{3.5}$ days, in contrast to PF simulations lasting approximately a month. At higher gravity strength ($|g|>10g_0$), numerical stability required a decrease of the time step, which resulted in those simulations lasting up to two weeks. \subsubsection{Results and discussion} Fig.\,\ref{fig:ti_al_0} illustrates the final states of the DNN simulations at $t=\SI{200}{\second}$ (bottom) in comparison with the PF results from Ref.~\cite{viardin2020b} (top). Tip-splitting events and drifting of the dendrites are not captured by the DNN model, in which the needles have a fixed growth direction and lateral position. The reduction of primary dendritic spacing for gravity conditions $g<-3g_0$ was nonetheless predicted. At $g=-5g_0, -15g_0, -20g_0$ tertiary branches emerge and effectively reduce the spacing. \begin{figure*}[t!] \centering \includegraphics[width=\textwidth]{ti_al_hypergravity_4.pdf} \caption{Final states of PF \cite{viardin2020b} and DNN simulations at $t=\SI{200}{\second}$ of directional dendritic solidification of Ti-$\SI{45}{\atpercent}$-Al in a horizontally periodic domain. The color map represents the concentration of Al solute, while the melt flow is shown with streamlines colored in shades of green representing the velocity amplitude at each gravity level, respectively. The maximum velocities $V_\text{max}$ from left to right are: $\{\num{28.0};\,\num{28.9};\,\num{7.1};\,\num{10.6};\,\num{1.0};\,\text{---};\,\num{2.3};\,\num{7.0}\}\times\SI{e-5}{\meter\per\second}$. \label{fig:ti_al_0}} \end{figure*} The overall flow patterns in PF and DNN match qualitatively. At $g=5g_0$ and $g=15g_0$, the DNN simulations develop a lateral flow near the top boundary that differs noticeably with results from PF simulations. This behavior could be rooted in the slightly larger domain size of the DNN simulations with $L_x\times L_y = (0.5\times 1.14)\,\si{\milli\meter^2}$ opposed to $L_x\times L_y = (0.45\times 1.05)\,\si{\milli\meter^2}$. The reason might also be that lateral flow (DNN) or vortices (PF), once established, are not easily disrupted. In any case, the flow velocities near the top boundary are very low compared to the flow close to the dendrite region, such that we can assume this difference to be insignificant. \section{Oscillatory growth of nickel-based superalloy} \label{sec:nickel} In a recent experimental study, solutal buoyant flow was directly observed via in-situ X-ray radiography during directional solidification of a CMSX-4 superalloy \cite{reinhart2020}. The effect of the melt flow was evidenced by tracking the dendritic tip growth velocities. Depending on the applied cooling rate, tip velocities were observed to exhibit oscillations. This oscillatory behavior remains to be simulated and explained in details. The current DNN model, which considers a model binary alloy in two dimensions, is not expected to entirely reproduce the complex multicomponent solute interactions in a three-dimensional sample. Nevertheless, here we show that using a careful pseudo-binary alloy approximation, DNN simulations reproduce this oscillatory growth behavior. \subsection{Pseudo-binary alloy surrogate} \label{sec:cmsx4} We consider the nominal composition of CMSX-4 as listed in Table \ref{tab:cmsx4_composition}. \begin{table*}[t!] \centering \begin{tabular}{lccccccccccc} \hline Element & Cr & Co & W & Al & Mo & Re & Ti & Hf & Ta & Ni\\ \hline Composition $c/\si{\wtpercent}$ & $\num{6.5}$ & $\num{9.6}$ & $\num{6.4}$ & $\num{5.6}$ & $\num{0.6}$ & $\num{3.0}$ & $\num{1.0}$ & $\num{0.1}$ & $\num{6.5}$ & Balance\\ \hline \end{tabular} \caption{Considered nominal composition of the CMSX-4 superalloy \cite{reinhart2020}. \label{tab:cmsx4_composition} } \end{table*} In order to reproduce the oscillatory growth behavior, the first task is to design a pseudo-binary surrogate for the CMSX-4 superalloy in the considered growth conditions, namely a temperature gradient of $G=\SI{4400}{\kelvin\per\meter}$ and a velocity range between $\SI{7.58}{\micro\meter\per\second}$ and $\SI{31.4}{\micro\meter\per\second}$ in experiments, or up to $\SI{60.6}{\micro\meter\per\second}$ in the DNN simulations. In particular, we aim for a reasonable description of (i) the crystal growth kinetics and (ii) the buoyant flow patterns and velocities. Regarding the growth kinetics, we consider that the description is acceptable if, for the considered velocity range, the dendrite tip radius of the surrogate alloy matches that of the full CMSX-4 alloy, and the velocity for the onset of constitutional undercooling is also reasonably approximated. In terms of fluid flow, we want to consider the alloying elements that play the most prominent role in the buoyant flow and approximate their average solutal expansion coefficient. Starting with the buoyancy consideration, we estimate that the species responsible for the formation of buoyant plumes are the lightest alloying elements, namely aluminum and titanium. Indeed, chromium, cobalt, and molybdenum are close enough from nickel in weight for their influence on buoyancy to be minor. Heavier elements, on the other hand, like tantalum, tungsten, and rhenium, may lead to non-negligible buoyant forces, but with a stabilizing effect as the heavier liquid would sink between the primary dendrites \cite{steinbach2009}. Using the CalPhaD method (software: ThermoCalc, database: TCNI8), we calculated the thermodynamic equilibrium of the full CMSX-4 alloy (excluding minor alloying element hafnium absent from the database) at its liquidus temperature, $T_L\approx1660\,$K. At this temperature, we verified that aluminum and titanium indeed have the highest solutal expansion coefficients (Eq.~\eqref{eq:solutal_expansion_coefficient}) with $\beta_{\rm Al}\approx 1.35\times10^{-2}$/wt\% and $\beta_{\rm Ti}\approx 0.75\times10^{-2}$/wt\%, compared to $\beta_{\rm Cr}\approx 0.21\times10^{-2}$/wt\%, $\beta_{\rm Co}\approx 0.09\times10^{-2}$/wt\%, and $\beta_c<0$ for heavier elements Mo, Re, Ta, and W. These values are consistent and close with those mentioned in the literature \cite{iida1993,schneider1997} From these considerations, we opted for a surrogate \{A+B\} alloy, where the solute B=\{Al+Ti\} combines Al and Ti contributions, while solvent A represents the other elements. Its solutal expansion coefficient is approximated as $\beta_c\approx\num{e-2}$/wt\%. The alloy nominal concentration is taken as $c_\infty=c_\infty^\text{Al}+c_\infty^\text{Ti}=\SI{6.6}{\wtpercent}$. For the diffusion coefficient $D$, partition coefficient $k$, and liquidus slope $m$, we want to use realistic orders of magnitude, relevant to Al and Ti species, such that the operating state of a steady-state growing dendrite, namely its tip radius $R$ and velocity $V$, matches that expected for the full CMSX-4 alloy at the considered $G$. In particular, we aim for a good agreement between pseudo-binary surrogate and full CMSX-4 alloy in terms of predictions of the classical Kurz-Giovanola-Trivedi (KGT) model \cite{kurz1986} extended to multicomponent alloys. We also aim at a good match in terms of onset velocity for constitutional undercooling, such that the considered growth velocity appropriately falls within the dendritic regime. Diffusivities of aluminum and titanium species in liquid nickel were assessed as $D_\text{Al}=\SI{1.86e-7}{\meter^2\per\second}\times\exp\{\SI{-0.66}{\eV}/(k_BT)\}$ (for a Ni$_{87.5}$Al$_{12.5}$ alloy) \cite{levchenko2017composition} and $D_\text{Ti}=\SI{1.70e-7}{\meter^2\per\second}\times\exp\{\SI{-57.43}{\kilo\joule\per\mol}/(R_gT)\}$ \cite{walbruhl2018atomic}, yielding $D_\text{Al}\approx\SI{2.05e-9}{\meter^2\per\second}$ and $D_\text{Ti}\approx\SI{2.92e-9}{\meter^2\per\second}$ at $T=\SI{1700}{\kelvin}$. Aluminum being the major alloying element, we chose $D=\SI{2.0e-9}{\meter^2\per\second}$ as a good approximation. Solute partition coefficients for Al and Ti calculated with CalPhaD for the CMSX-4 alloy at its liquidus temperature are respectively $k_\text{Al}=0.9$ and $k_\text{Ti}=0.46$. In binary Ni-5.6wt\%Al and Ni-1.0wt\%Ti alloys, partition coefficients at their respective liquidus temperatures are $k_\text{Al}=0.90$ and $k_\text{Ti}=0.64$. For the binary surrogate approximation, we used an intermediate value, closer to that of aluminum, with $k=0.8$. \begin{table*}[t] \centering \begin{tabular}{lcrl} \hline Property & Symbol & Value & Unit \\ \hline Nominal composition & $c_\infty$ & $6.6$ & $\si{\wtpercent}$ \\ Liquid Diffusivity & $D_l$ & $\num{2e-9}$ & $\si{\meter^2\per\second}$ \\ Partition coefficient & $k$ & $0.8$ & \\ Liquidus slope & $m$ & $-25$ & $\si{\kelvin\per\wtpercent}$ \\ Solutal expansion coefficient & $\beta_c$ & $\num{e-2}$ & $\si{\per\wtpercent}$ \\ Gibbs-Thomson coefficient & $\Gamma$ & $\num{2.49e-7}$ & $\si{\kelvin\meter}$ \\ Kinematic viscosity & $\nu$ & $\num{5.8e-7}$ & $\si{\meter^2\per\second}$ \\ Interfacial energy anisotropy & $\epsilon$ & $\num{1.2e-2}$ & \\ Tip selection parameter & $\sigma$ & $\num{0.08}$ & \\ \hline Temperature gradient & $G$ & $\num{4.4e3}$ & $\si{\kelvin\per\meter}$ \\ Cooling rate & $\dot T$ & $\{-2; -4; -8.3; -11; -13; -16\}$ & $\si{\kelvin\per\minute}$ \\ \hline FIF integration radius & $r_i$ & $\numrange{5.4}{8.5}$ &$R_s$ \\ Parabola truncation radius & $r_\text{max}$ & $\numrange{5.4}{8.5}$ &$R_s$ \\ Upwind parameter & $\omega_\text{up}$ & $0.9$ & \\ Successive Over Relaxation parameter & $\omega_\text{SOR}$ & $1.1$ & \\ SOR residual required for convergence & $\overline{r}_\text{SOR}$ & $\num{e-3}$ & \\ Time step safety factor & $K_{\Delta t}$ & $\num{0.15}$ & \\ \hline \end{tabular} \caption{Material and processing parameters used int he DNN simulation of the directional solidification of the CMSX-4 surrogate alloy (see Sec.\,\ref{sec:cmsx4} for sources) and numerical parameters (see ref. \cite{tourret2019} for computational details) \label{tab:cmsx4_0}} \end{table*} \begin{table*}[t] \centering \begin{tabular}{lcccc} \hline Cooling Rate $\dot T$ & Grid Spacing $h$ & Domain Size $N_x\times N_y$ & Domain Size $L_x\times L_y$ & Initial PDAS\\ \hline $\SI{-2}{\kelvin\per\minute}$ & $\SI{1.5}{\dnnr}=\SI{10.4}{\micro\meter}$ & $766\times414 $ & $\SI{8}{\milli\meter} \times\SI{4.3}{\milli\meter} $ & $\SI{239}{\micro\meter}$ \\ $\SI{-4}{\kelvin\per\minute}$ & $\SI{2.125}{\dnnr}=\SI{10.4}{\micro\meter}$ & $766\times414 $ & $\SI{8}{\milli\meter} \times\SI{4.3}{\milli\meter} $ & $\SI{239}{\micro\meter}$ \\ $\SI{-8.3}{\kelvin\per\minute}$ & $\SI{1.85}{\dnnr}=\SI{6.3}{\micro\meter}$ & $766\times510 $ & $\SI{4.8}{\milli\meter} \times\SI{3.2}{\milli\meter} $ & $\SI{213}{\micro\meter}$ \\ $\SI{-11}{\kelvin\per\minute}$ & $\SI{1.6}{\dnnr}=\SI{4.7}{\micro\meter}$ & $1022\times638 $ & $ \SI{4.8}{\milli\meter} \times\SI{3}{\milli\meter} $ & $\SIrange[range-units=brackets]{272}{375}{\micro\meter}$ \\ $\SI{-13}{\kelvin\per\minute}$ & $\SI{1.5}{\dnnr}=\SI{4}{\micro\meter}$ & $1022\times638 $ & $\SI{4.1}{\milli\meter} \times\SI{2.6}{\milli\meter} $ & $\SI{235}{\micro\meter}$ \\ $\SI{-16}{\kelvin\per\minute}$ & $\SI{1.35}{\dnnr}=\SI{3.3}{\micro\meter}$ & $1022\times1022 $ & $\SI{3.4}{\milli\meter} \times\SI{3.4}{\milli\meter} $ & $\SI{239}{\micro\meter}$ \\ \hline \end{tabular} \caption{Grid spacings and domain sizes of the DNN simulations at different cooling rates $\dot T$.\label{tab:cmsx4_numerical}} \end{table*} CalPhaD-calculated liquidus slopes respective to Al and Ti in the CMSX-4 alloy are $m_\text{Al}\approx\SI{-13.1}{\kelvin\per\wtpercent}$ and $m_\text{Ti}\approx\SI{-20.3}{\kelvin\per\wtpercent}$. In binary Ni-5.6wt\%Al and Ni-1.0wt\%Ti alloys, liquidus slopes are $m_\text{Al}\approx\SI{-4.92}{\kelvin\per\wtpercent}$ and $m_\text{Ti}\approx\SI{-9.77}{\kelvin\per\wtpercent}$. However, we found that using such values leads to a notable discrepancy between pseudo-binary and full CMSX-4 alloy in terms of KGT-predicted tip radius $R(V)$ and constitutional undercooling velocity $V_c$. Hence, we treated $m$ as an adjustable parameter to better match $R(V)$ and $V_c$. We used a simple extension of the KGT model \cite{kurz1986} to multicomponent alloys \cite{rappaz1989,rappaz1990} by adding up solutal contributions of the different alloying elements (see Supplementary Material). This formulation neglects cross-species interactions \cite{hunziker2001theory}, which is typically acceptable for relatively dilute solute species, and yields predictions of planar interface stability limits consistent with this assumption \cite{coates1968solid}. As depicted in Fig.\,\ref{fig:nickel_based_kgt_0}, resulting KGT calculations lead to a CMSX-4 onset of constitutional undercooling at a velocity $V_c\approx\SI{1.75e-7}{\meter\per\second}$ (see details and parameters in Section~\ref{sm_kgt} of the Supplementary Material). \begin{figure}[t!] \centering \includegraphics[width=\columnwidth]{kgt_cmsx4_binary_2.pdf} \caption{KGT model prediction of dendrite tip radius versus velocity for multicomponent CMSX-4 (Supplementary Material, Table~\ref{tab:parameters}) and binary surrogate alloy (Table~\ref{tab:cmsx4_0}). \label{fig:nickel_based_kgt_0}} \end{figure} In order to match this velocity for the parameters considered here, using the classical binary criterion $V_\text{c}=DGk/\left[m(1-k)c_\infty\right]$ \cite{tiller1953redistribution, mullins1964stability} for the temperature gradient $G=\SI{4400}{\kelvin\per\meter}$ of the experiments \cite{reinhart2020}, we obtain a liquidus slope $m\approx\SI{-25}{\kelvin\per\wtpercent}$. Although this value is higher than CalPhaD-calculated values, it remains within the same order of magnitude, and we decided to use it for the surrogate alloy, since it leads to a good approximation of the full CMSX-4 alloy in the KGT-predicted $R(V)$ curve in the considered velocity range (Fig.\,\ref{fig:nickel_based_kgt_0}). Remaining parameters, namely kinematic viscosity, Gibbs-Thomson coefficient, and interface energy anisotropy were estimated for pure Ni. We considered a kinematic viscosity $\nu=\SI{5.8e-7}{\meter^2\per\second}$ using dynamic viscosity and density values determined experimentally for pure Ni in Refs \cite{sato2005} and \cite{cagran2007}, respectively. For the Gibbs-Thomson coefficient, we used $\Gamma=\gamma_0T_M/L_f=\SI{2.49e-7}{\kelvin\meter}$, considering pure Ni melting temperature $T_M=\SI{1728}{\kelvin}$ and latent heat of fusion $L_f=\SI{2.08e9}{\joule\per\meter^3}$ calculated with CalPhaD (TCNI8), and an interface excess free energy $\gamma_0\approx\SI{0.3}{\joule\per\meter^2}$, consistent with several independent calculations using molecular dynamics (capillary fluctuation method) between $\num{0.271}$ and $\SI{0.364}{\joule\per\meter^2}$\cite{hoyt2003atomistic, jiang2008size, asadi2015two}. The fourfold interface free energy anisotropy was considered $\epsilon=0.012$, which corresponds, for a one-sided model in 2D \cite{barbieri1989}, to a tip selection parameter $\sigma\approx0.08$. Assumptions made here in the construction of a pseudo-binary CSMX-44 surrogate are arguably approximate, specific to the problem that we aim to simulate, and not intended as a general procedure for pseudo-binary approximations of complex multicomponent alloys. Nonetheless, we will see in the following subsections that this simple description is sufficient to reproduce and hence investigate the experimentally-observed oscillatory growth regime. \subsection{DNN simulations} Table \ref{tab:cmsx4_0} summarizes the material, processing and numerical parameters used in the DNN simulations. We simulated the directional solidification of the surrogate alloy for six different cooling rates from $-2$ to $\SI{-16}{\kelvin\per\minute}$. The three lowest cooling rates of $-2$, $-4$, and $\SI{-8.3}{\kelvin\per\minute}$ correspond to the experimental conditions. The grid spacing $h$ was set between 1.35 and 2.125 times the steady tip radius $R_s$, while ensuring that $h \leq D/(10V_s)$ in order to provide an appropriate spatial description of solute gradients. Table \ref{tab:cmsx4_numerical} summarizes the corresponding numerical parameters. The domain was initialized with an array of between 6 and 22 evenly-spaced primary dendrites, with their tips initially located at the liquidus temperature. The growth of the dendritic arrays was simulated for a physical time of between $\SI{2.5}{\minute}$ (for $\dot T=\SI{-16}{\kelvin\per\minute}$) and $\SI{28}{\minute}$ (for $\dot T=\SI{-2}{\kelvin\per\minute}$). In order to assess the effect of primary spacing on the oscillatory growth behavior, we also performed simulations at $\dot T=\SI{-11}{\kelvin\per\minute}$, using different initial spacings of 272, 300, and $\SI{375}{\micro\meter}$. In all simulations, boundary conditions were similar as those used in Sec. \ref{subsec:verification_al-cu} and side-branching was not enabled. All simulations were carried out on a single Nvidia RTX3090 GPU. Simulation times ranged between 6.5~days (for $\SI{28}{\minute}$ at $\SI{-8.3}{\kelvin\per\minute}$) and 24~days (for $\SI{12}{\minute}$ at $\SI{-11}{\kelvin\per\minute}$). As a representative example, the simulation discussed later in Fig.\,\ref{fig:nickel_based_1}, corresponding to $\SI{5}{\minute}$ of cooling at $\SI{-13}{\kelvin\per\minute}$, was performed in 14~days. \subsection{Results and discussion} Fig.\,\ref{fig:nickel_based_0} shows a side-by-side comparison of the experimentally measured \cite{reinhart2020} solidification velocities and the velocities predicted by the DNN model. For each cooling rate, $V(t)$ from experiments and simulations are represented using the same time and velocity scales, with the equivalent pulling velocity ($V_p=|\dot T|/G$) marked with a red horizontal line. Experimental velocities correspond to the tip of one central dendrite (see Fig.~7 and corresponding discussion in Ref.~\cite{reinhart2020}). Simulation results correspond to the velocity of a single arbitrarily-chosen dendrite tip that did not get eliminated throughout the simulation. Similar plots showing $V(t)$ for every single dendrite in each simulation are provided in the Supplementary Material (Fig.~\ref{fig:nickel_based_velocities_R}), showing that the behaviors illustrated in Fig.\,\ref{fig:nickel_based_0} are representative of those across the entire dendritic array. \begin{figure}[b!] \centering \includegraphics[width=\columnwidth]{comparison_exp_sim_3.pdf} \caption{Experimentally measured \cite{reinhart2020} solidification velocities (left) and corresponding DNN predicted velocities (right) at different cooling rates. Gray and black lines respectively correspond to the raw and time-averaged data (using a moving average over $\SI{1}{\second}$). Horizontal red lines represent the steady-state tip velocity, i.e. the equivalent pulling velocity $V_p=|\dot T|/G$. \label{fig:nickel_based_0}} \end{figure} As discussed in Ref.~\cite{reinhart2020}, during directional solidification experiments, velocity oscillations were identified that were sustained over tens of minutes, with an oscillation period of about 80~seconds when cooling at $\SI{-2}{\kelvin\per\minute}$. In other experiments with faster cooling rates, oscillations of comparable period were progressively damped as the cooling rate was increased. In the results from DNN simulations, low cooling rates ($|\dot T|\leq\SI{4}{\kelvin\per\minute}$) lead to growth fluctuations, but they appear quite random, with single sharp spikes. The growth regime progressively transitions to a more periodic behavior at faster cooling rates. The sustained oscillatory growth and its attenuation when increasing the cooling rate is also observed in DNN simulations (Fig.\,\ref{fig:nickel_based_0}), however for a higher cooling rate than in the experiments. Sustained oscillations, experimentally identified at $\dot T=\SI{-2}{\kelvin\per\minute}$, appear in the simulations around $\SI{-13}{\kelvin\per\minute}$, with a period of about 20~second. \begin{figure}[b!] \centering \includegraphics[width=\columnwidth]{cmsx4_surrogate_fluctuations_4.pdf} \caption{Concentration fields of the full simulation domain (top) at $t=\SI{70}{\second}$ and $t=\SI{291}{\second}$ for the cooling rate $\dot T=\SI{-13}{\kelvin\per\minute}$, with enhanced snapshots of the area marked by the green rectangle and its corresponding tip velocity and undercooling during a single oscillation period (below). The four panels are aligned with the corresponding times $t_1$, $t_2$, $t_3$, and $t_4$ in the bottom plots of the tip velocity and undercooling. Arrows indicate the flow direction and the color map and iso-contours represent the solute concentration $U$. \label{fig:nickel_based_1} } \end{figure} Fig.\,\ref{fig:nickel_based_1} illustrates the behavior of the flow pattern when oscillations occur for $\dot T=\SI{-13}{\kelvin\per\minute}$. The dendrite marked by the green rectangle in the full domain on the right side, is shown at four time steps during one oscillation period. Although the alternating flow patterns are complex when approached at the scale of the entire domain, clear trends emerge when looking at the overall flow direction (white arrows) surrounding a given dendrite tip. The dendrite grows at its lowest velocity ($t_1$, $t_4$) when the fluid exhibits a strong upward current, thus locally depleting the region surrounding the tip in solute. The tip velocity is maximal ($t_2$) when the flow has a strong downward component, feeding the tip in solute. At intermediate velocities ($t_3$) the liquid predominantly flows laterally, which is known to lead to a tip growth velocity comparable to that in the absence of convection \cite{tong2001phase, jeong2001, badillo2007growth,sakane2018three}. Overall, the dendrite tip velocity oscillates around the equivalent pulling velocity $V_p$. Meanwhile, dendrites within the array are still interacting with each other via the solute field, such that the tip undercooling oscillates above the theoretical undercooling $\Delta_s$ for a free (i.e. isolated) dendrite. In order to assess the range of cooling rates at which oscillations occur, we estimated the average flow velocity $\overline V$ in the final stage of each simulation. To do so, we extracted the spatial average of the amplitude of the velocity field in the liquid for five different time steps, within one oscillation period (or over $\SI{16}{\second}$ in the late stages of the simulations when oscillations are absent), and used the average of those five values as an approximate velocity over space and time. For completeness, the five snapshots used for each simulations are illustrated in the Supplementary Material (Fig.~\ref{fig:velocit_average}). Results of this analysis, summarized in Table~\ref{tab:cmsx4_averageV}, clearly identify that oscillations occur when the average flow velocity $\overline V$ is close to the equivalent pulling velocity $V_p$. Indeed, when $\overline V/V_p<1$ oscillations are damped, when $1<\overline V/V_p<2$ oscillations are sustained, and for higher $\overline V/V_p$ the growth behavior becomes increasingly more erratic. While the current estimation of $\overline V$ is arguably approximate, this analysis unambiguously demonstrates that oscillations occur when the flow velocity and the growth velocity are of the same order of magnitude. \begin{table}[b] \centering \begin{tabular}{rccccc} \hline & $\dot T$ & $V_p$ & $\overline V$ & $\overline V/V_p$ & Oscillations \\ & $\si{\kelvin\per\minute}$ & $\si{\micro\meter\per\second}$ & $\si{\micro\meter\per\second}$ & & \\ \hline & $-2$ & 7.6 & 167.2 & 22.0 & Spikes \\ & $-4$ & 15.2 & 202.2 & 13.3 & Spikes \\ & $-8.3$ & 31.4 & 119.3 & 3.79 & Intermediate \\ (a) &$-11$ & 41.7 & 25.4 & 0.61 & Damped \\ (b) &$-11$ & 41.7 & 14.6 & 0.35 & Damped \\ (c) &$-11$ & 41.7 & 75.5 & 1.81 & Sustained \\ & $-13$ & 49.2 & 76.8 & 1.56 & Sustained \\ & $-16$ & 60.6 & 0.61 & 0.01 & Damped \\ \end{tabular} \caption{Average flow velocities $\overline V$ (see text and Fig.~\ref{fig:velocit_average} of the Supplementary Material) and equivalent pulling velocity $V_p$ for the different DNN simulations. The three cases labeled (a), (b), and (c) at $\dot T=\SI{-11}{\kelvin\per\minute}$ correspond to the simulations illustrated in Fig.~\ref{fig:nickel_based_2}. \label{tab:cmsx4_averageV} } \end{table} The discrepancy in cooling rate leading to oscillations between experiments and simulations may be attributed to assumptions made in the pseudo-binary approximation of the CMSX-4 alloy (see Sec.\,\ref{sec:cmsx4}), as well as dimensionality, as pointed out already in Sec.\,\ref{sec:alcu_resu}. Indeed, since the flow velocity is overestimated in the 2D simulations \cite{jeong2001,isensee2020}, the range of cooling rates with $\overline V\approx V_p$ occurs at higher $V_p$, i.e. at higher $|\dot T|$. The difference in oscillation period likely stems from the fact that the oscillations appear at a higher cooling rate, and therefore is also due to dimensionality and surrogate alloy approximations. Preliminary observations suggest an increase of oscillation frequency with cooling rate. However, since the range of cooling rate resulting in sustained oscillations is relatively narrow, this difference is limited ($\approx\SI{15}{\percent}$ increase from $\SI{-11}{\kelvin\per\minute}$ to $\SI{-13}{\kelvin\per\minute}$), and one may expect a greater influence of alloy parameters (in particular $\nu$, $D$, and $\beta_c$). Further ongoing parametric studies on a broader range of alloys will clarify the influence of these parameters in the oscillation frequency. \begin{figure*}[t!] \centering \includegraphics[width=\textwidth]{cmsx4_surrogate_fluctuations_v4_needles_2.pdf} \caption{DNN-predicted flow patterns (top) and tip velocities $V$ (bottom) at $\dot T=\SI{-11}{\kelvin\per\minute}$ at $t=\SI{4.5}{\minute}$ with different primary dendrite arm spacing $\lambda_1$. The streamlines represent the fluid flow with maximum velocity $V_\text{max} = \num{102}~V_p = \SI{4.3e-3}{\meter\per\second}$. The illustrated tip velocities correspond to the dendrites indicated by green arrows. The gray and black curves correspond to raw and smoothed data, respectively. The red horizontal lines represent the theoretical steady state tip growth velocity, i.e. the equivalent pulling velocity $V_p$. Plots of the velocities of all needles can be found in Fig.~\ref{fig:nickel_based_velocities_N} of the Supplementary Material.\label{fig:nickel_based_2}} \end{figure*} In addition to its dependence upon cooling rate, we also found that the oscillatory behavior was strongly dependent upon primary dendritic spacing. In Fig.\,\ref{fig:nickel_based_1}, for instance, the oscillatory growth occurs after two initially set primary dendrites (present in the top-left snapshot at $t=\SI{70}{\second}$) were eliminated. In order to assess the influence of spacing, we performed simulations at a cooling rate $\dot T=\SI{-11}{\kelvin\per\minute}$ using different primary spacings within a range where no elimination event occurs, i.e. namely for $\lambda_1=272$, 300, and $\SI{375}{\micro\meter}$. Fig.\,\ref{fig:nickel_based_2} illustrates the resulting concentration fields at $t=\SI{4.5}{\minute}$, as well as the velocity evolution of one needle (marked with a green arrow) in each simulation. The velocities of all needles (provided in Fig.~\ref{fig:nickel_based_velocities_N} of the Supplementary Material) exhibit a similar behavior as the ones highlighted here. For (a) $\lambda=\SI{272}{\micro\meter}$, dendrites are close to one another. Initial transient oscillations are quickly damped and the dendrites finally grow together at the steady-state velocity $V_p=\SI{41.7}{\micro\meter\per\second}$. As the spacing gets larger (b), damping of the oscillations occurs over a longer time during which several oscillation periods are noticeable. Ultimately (c), higher spacings allow stronger convective currents, leading to a sustained oscillatory growth of the dendritic array. Values of the average fluid velocity estimated in these three simulations (see Table~\ref{tab:cmsx4_averageV}), are consistent with our observation that oscillations occur when $\overline V$ is higher yet close to $V_p$, with $\overline V<V_p$ in both damped cases (a) and (b), and $\overline V/V_p\approx1.86$ in the sustained case (c). Our interpretation of the effect of spacing on the occurrence of oscillations is the following. First, for the oscillations to take place, sufficient fluid flow must be allowed between the primary dendrites. Second, since the oscillations of adjacent primary dendrites are out-of-phase with each other, a lateral symmetry-breaking must arise, leading to a two-dimensional composition profile. When the primary spacing is low, fluid flow is strongly limited between the dendrites. This is illustrated in Fig.~\ref{fig:velocities_line_sample} of the Supplementary Material, which represents the vertical ($x$) component of the velocity averaged over the entire liquid region at a given height ($\overline{|V_x|}$) at five different times ($t=246$, 259, 273, 286, and $\SI{300}{\second}$), and clearly shows that the resulting velocity is much higher for the highest spacing case of Fig.~\ref{fig:nickel_based_2}c. When the primary spacing is low, the composition field between the dendrites and ahead of the solidification front also remains relatively close to a one-dimensional profile ahead of a planar front. At higher spacings, lateral composition gradients ($\partial c/\partial y$) can develop, which lead to the symmetry breaking, to the development of a two-dimensional composition field, and to the emergence of oscillations. This is illustrated in Figs~\ref{fig:concentrations_line_sample} and \ref{fig:concentrations_line_sample_horizontal} of the Supplementary Material, respectively showing the composition profile along vertical lines located at the center between two primary dendrites at different times (Fig.~\ref{fig:concentrations_line_sample}), and the composition profile along horizontal lines in the liquid region at $x-x_{tip}=\SI{141}{\micro\meter}$ and $\SI{423}{\micro\meter}$ at five different times (Fig.~\ref{fig:concentrations_line_sample_horizontal}). These plots show that for $\lambda_1=\SI{272}{\micro\meter}$ (Fig.~\ref{fig:nickel_based_2}a) and $\lambda_1=\SI{300}{\micro\meter}$ (Fig.~\ref{fig:nickel_based_2}b) the composition profile is essentially one-dimensional, with $(c-c_\infty)/c_\infty$ remaining below $\SI{0.1}{\percent}$ in the liquid ahead of the dendrite tips, while the composition profile for $\lambda_1=\SI{375}{\micro\meter}$ (Fig.~\ref{fig:nickel_based_2}c) exhibits significantly higher composition gradients in the $y$ direction. The transition from damped to sustained oscillations seems to occur when the primary spacing $\lambda_1$ is between 6 and 8 times $D/V_p$, since at this cooling rate the steady-state diffusion length is $D/V_p\approx\SI{48}{\micro\meter}$. Additional simulations should clarify how this threshold changes within a broader range of alloys and processing parameters --- and whether the diffusion length is the appropriate length scale with which to compare in presence of appreciable convection. It is worth mentioning that Fig.\,\ref{fig:nickel_based_2} illustrates special cases in which the dendritic array is perfectly regular and no elimination occurs. In general cases, as those depicted in Figures~\ref{fig:nickel_based_0} and \ref{fig:nickel_based_1}, a symmetry breaking due to the occurrence of elimination events leads to more complex overall array dynamics. Hence, for low spacings, expected to lead to complete damping of the oscillations, elimination events may lead to an increase of average primary spacing, and consequently to an oscillatory growth behavior. This is illustrated, for instance, in additional simulations, using different initial primary spacings at $\dot T=\SI{-13}{\kelvin\per\minute}$ presented in the Supplementary Material (Fig.~\ref{fig:nickel_based_velocities_N}). In summary, the current results confirmed that a buoyancy-induced oscillatory growth behavior, observed in experiments \cite{reinhart2020}, may occur across a narrow range of cooling rates when the average flow velocity is close to the average growth velocity, and suggested that primary dendritic spacings play a prominent role in the resulting oscillations being sustained or damped. Ongoing investigations should provide a deeper understanding of the mechanism, e.g. establishing relevant scaling laws for the resulting oscillation period and amplitude. Further applications of the model to polycrystalline growth with nucleation \cite{geslin2021dendritic, chen2021dendritic} should also allow the simulation of segregated channels and freckle formation. However, an extension of the current model would remain required to treat potential remelting and fragmentation events in the segregated channels, as well as the buoyant motion of stray crystals. \section{Summary and conclusions} \label{sec:conclusion} We presented a two-dimensional implementation of the dendritic needle network (DNN) model for directional solidification of binary alloys with buoyant melt flow. Results of the model regarding the selection of primary dendritic spacings in Al-$\SI{4}{\atpercent}$-Cu and Ti-$\SI{45}{\atpercent}$-Al alloys under various gravity conditions are consistent with previously reported phase-field and experimental data. Scaling laws for the lower spacing limit $\lambda_\text{min}$ for upward and downward flows were reproduced \cite{steinbach2009}. Spacing reduction via side-branching in DNN simulations reasonably mimic tip-splitting events expected in presence of strong gravity in direction opposite to the growth \cite{viardin2020b}. We simulated the experimentally observed oscillatory growth behavior in nickel-based single-crystal CMSX-4 alloy \cite{reinhart2020}. To do so, we considered a surrogate binary alloy, derived from simple assumptions using CalPhaD calculations and classical solidification theories, namely matching predictions of constitutional undercooling criterion and KGT model. Oscillatory growth velocities were reproduced, however at cooling rates slightly higher than identified in experiments. The discrepancy is mainly attributed to dimensionality, since flow velocities are usually overestimated in two-dimensional simulations \cite{jeong2001,isensee2020}. Our results confirmed that the oscillatory growth behavior is closely linked to the buoyant flow in the liquid phase, that it occurs over a narrow range of cooling rates (i.e. growth velocity) for a given temperature gradient, and that the oscillatory behavior strongly depends on the primary dendritic spacing. In summary, we used a new model to (i) gain new fundamental insights into an important yet still incompletely understood aspect linking materials processing and microstructure, namely during solidification in the presence of fluid flow, and (ii) validate those insights by a direct comparison of modeling predictions and state-of-the-art in situ imaging experiments in a technologically important application – namely directional solidification of a single-crystal Ni-based superalloy. Ongoing and future investigations following on this study include applications of the model to a broader range of experiments (e.g. Ref.~\cite{gibbs2016situ}) as well as three-dimensional applications \cite{isensee2020}. Among other things, the computationally efficient DNN simulations should allow further study of the dependence of dendrite growth kinetics upon the surrounding flow strength and direction \cite{badillo2007growth,sakane2018three}. A deeper investigation into oscillatory growth behaviors during directional solidification, scanning a wider range of alloy and processing parameters, should also shed further light into its underlying mechanisms. The impact of these results goes beyond fundamental considerations of nonlinear physics and oscillatory instabilities. Directional solidification of CMSX4 superalloy is of direct relevance to the production of single crystal turbine blades used in jet turbines. Therefore, the prediction of buoyancy-related defects and the stability of a CMSX4 solidification front is of immediate technological relevance to the casting of high-performance single-crystal components. \section*{Acknowledgements} This study was supported in part by the European Union’s Horizon 2020 research and innovation programme through a Marie Sk\l odowska-Curie Individual Fellowship (Grant Agreement 842795) and by the Spanish Ministry of Science through a Ramón y Cajal Fellowship (Ref. RYC2019-028233-I). We, the authors, also wish to thank Guillaume Reinhart, Alexandre Viardin, and Ingo Steinbach, for providing data and/or figures necessary to compare our results to theirs.
\section{Introduction} In statistical learning theory, one commonly considers a hypothesis space $\mathcal{H}$ and a probability measure $D$ over a space of datapoints $\mathcal{Z}$. Let $\ell\colon \mathcal{H} \times \mathcal{Z} \to \{0, 1\}$ be a loss function taking values in $\{0, 1\}$; \textit{i.e.}, $\ell$ is a binary loss. It is often of interest to bound the generalisation risk $R(h) \coloneqq \mathbbm{E}_{Z \sim D}[\ell(h, Z)]$ of a hypothesis $h \in \mathcal{H}$. Such a bound can be established by computing the empirical mean of the loss on a dataset $S \sim D^N$ and using the following well-known theorem: \begin{theorem}[Chernoff bound for binary random variables; \citealp{langford2005tutorial}, Corollary 3.7] \label{thm:chernoff-bound-binary} Let $X_1, \hdots, X_n$ be i.i.d.~random variables with $X_i \in \{0, 1\}$ and $\mathbbm{E}[X_i] = p$. Let $\overline{X} := \frac{1}{n} \sum_{i=1}^n X_i$. Then, with probability at least $1-\delta$, \begin{equation} p \leq \mathrm{kl}^{-1}\left(\overline{X} \, \middle| \, \frac{1}{n} \log \frac{1}{\delta} \right), \end{equation} where $\mathrm{kl}(q,p) \coloneqq q \log \frac{q}{p} + (1-q) \log \frac{1-q}{1-p}$ and $\mathrm{kl}^{-1}(q \,|\, c) \coloneqq \sup \, \{ p \in [0,1] : \mathrm{kl}(q, p) \leq c \}$. \end{theorem} By choosing $X_i = \ell(h, Z_i)$ to be the loss of hypothesis $h$ on the $i$\textsuperscript{th} datapoint $Z_i$ in $S$, we immediately obtain a high-probability upper bound on the generalisation risk, assuming that $h$ does not depend on $S$. (\textit{I.e.}, if $h$ is the result of training algorithm which uses training data, then $S$ must be held-out data.) \Cref{thm:chernoff-bound-binary} is well-known and, as stated, requires $X_i$ to be Bernoulli random variables. However, if the loss $\ell$ takes values in the unit interval $[0, 1]$ rather than in $\{0, 1\}$, \textit{i.e.} $\ell: \mathcal{H} \times \mathcal{Z} \to [0, 1]$, then we require an extension of \cref{thm:chernoff-bound-binary} to the case of $X_i$ taking values in $[0, 1]$: \begin{theorem}[Chernoff bound for random variables in the unit interval] \label{thm:chernoff-bound-interval} Let $X_1, \hdots, X_n$ be i.i.d.~random variables with $X_i \in [0,1]$ and $\mathbbm{E}[X_i] = p$. Then, using the same notation as in \cref{thm:chernoff-bound-binary}, with probability at least $1-\delta$, \begin{align} p \leq \mathrm{kl}^{-1}\left(\overline{X} \, \middle| \, \frac{1}{n} \log \frac{1}{\delta} \right). \end{align} \end{theorem} Although losses $\ell$ taking values in $[0, 1]$ are commonly encountered, \cref{thm:chernoff-bound-interval} is somewhat less well known than \cref{thm:chernoff-bound-binary}. In this note, we provide a proof of \cref{thm:chernoff-bound-interval} for convenience and future reference. \section{Two-Sided Chernoff Bound} We first recapitulate some well-known bounds based on Hoeffding's extension of the Chernoff bound: \begin{lemma}[Hoeffding's extension]\label{lem:hoeffding} Let $X_1, \hdots, X_n$ be i.i.d.~random variables with $X_i \in [0,1]$ and $\mathbbm{E}[X_i] = p$. Then for any $t \in [0, p]$, \begin{align} \label{eqn:chernoff-up} \mathrm{Pr}(\overline{X} \leq p - t) &\leq \exp(-n\mathrm{kl}(p-t, p)), \end{align} and for any $t \in [0, 1-p]$, \begin{align} \label{eqn:chernoff-down} \mathrm{Pr}(\overline{X} \geq p + t) &\leq \exp(-n\mathrm{kl}(p+t, p)). \end{align} \end{lemma} \begin{proof} The proof is an application of the Chernoff method along with the observation that $z \mapsto e^{\lambda z}$ is convex, which allows us to control the moment-generating function in terms of the moment-generating function of a Bernoulli random variable. A detailed proof of the upper bound in \cref{eqn:chernoff-up} is given in Theorem 5.1 of \cite{mulzer2018five}. \Cref{eqn:chernoff-down} follows by applying the change of variables $X_i \to 1-X_i$ to \cref{eqn:chernoff-up} (see Corollary 4.1 in \cite{mulzer2018five} for an identical change of variables argument in the binary case). \end{proof} We can use \cref{lem:hoeffding} to obtain a \emph{two-sided} bound on the mean $p$. \begin{theorem}[Two-sided Chernoff bound for random variables in the unit interval]\label{thm:chernoff-interval-two-sided} Let $X_1, \hdots, X_n$ be i.i.d.~random variables with $X_i \in [0,1]$ and $\mathbbm{E}[X_i] = p$. Then, with probability at least $1-\delta$, \begin{align} \mathrm{kl}\left(\overline{X},p \right) \le \frac{1}{n} \log \frac{2}{\delta}. \end{align} \end{theorem} \begin{proof} For $c > 0$, let $\overline{\mathrm{kl}} (p, c)$ be the unique real number in $(p, 1]$ such that $\mathrm{kl} (\overline{\mathrm{kl}} (p, c), p) = c$. Similarly, let $\underline{\mathrm{kl}} (p, c)$ be the unique real number in $[0, p)$ such that $\mathrm{kl} (\underline{\mathrm{kl}} (p, c), p) = c$. Then, $\mathrm{kl}(\overline{X} , p) \leq c$ if and only if $\underline{\mathrm{kl}} (p, c) \leq \overline{X} \leq \overline{\mathrm{kl}} (p, c)$. Hence, \begin{equation} \mathrm{Pr}\left(\mathrm{kl}(\overline{X} , p) \leq \frac{1}{n} \log \frac{2}{\delta} \right) = \mathrm{Pr}\left( \underline{\mathrm{kl}} \left(p, \frac{1}{n} \log \frac{2}{\delta} \right) \leq \overline{X} \leq \overline{\mathrm{kl}} \left(p, \frac{1}{n} \log \frac{2}{\delta} \right) \right). \end{equation} But, from \cref{eqn:chernoff-up}, we have \begin{equation} \mathrm{Pr} \left(\underline{\mathrm{kl}} \left(p, \frac{1}{n} \log \frac{2}{\delta} \right) \leq \overline{X} \right) \geq 1 - \exp \left(-n\mathrm{kl}\left( \underline{\mathrm{kl}} \left(p, \frac{1}{n} \log \frac{2}{\delta} \right) , p\right) \right) = 1 - \frac{\delta}{2}. \end{equation} A symmetric argument shows that \begin{equation} \mathrm{Pr}\left(\overline{X} \leq \overline{\mathrm{kl}} \left(p, \frac{1}{n} \log \frac{2}{\delta} \right) \right) \geq 1 - \frac{\delta}{2}. \end{equation} Using a union bound therefore implies that \begin{equation} \mathrm{Pr}\left(\mathrm{kl}(\overline{X} , p) \leq \frac{1}{n} \log \frac{2}{\delta} \right) \geq 1 - \delta, \end{equation} which proves the theorem. \end{proof} This \emph{two-sided} bound on the mean $p$ nearly implies the desired \emph{one-sided} bound from \cref{thm:chernoff-bound-interval}: \begin{equation} \label{eq:implication} \mathrm{kl}\left(\overline{X} \, \middle| \,p \right) \le \frac{1}{n} \log \frac{2}{\delta} \implies p \leq \mathrm{kl}^{-1}\left(\overline{X} \, \middle| \, \frac{1}{n} \log \frac{2}{\delta} \right). \end{equation} Unfortunately, on the right-hand side, \cref{eq:implication} states $2/\delta$ instead of $1/\delta$. \section{One-Sided Chernoff Bound} We can tighten the $2/\delta$ in \cref{eq:implication} to obtain the $1/\delta$ from \cref{thm:chernoff-bound-interval} by directly proving a one-sided bound on the mean $p$. \begin{proof} The main ingredient of the proof of \cref{thm:chernoff-interval-two-sided} is the equivalence $\mathrm{kl}(\overline{X}, p) \leq c$ if and only if $\underline{\mathrm{kl}} (p, c) \leq \overline{X} \leq \overline{\mathrm{kl}} (p, c)$. Since we now desire only an upper bound on $p$, $\mathrm{kl}(\overline{X}, p) \leq c$ is stronger than we need. The key insight is to define a \emph{one-sided} version of $\mathrm{kl}$: \begin{equation} \mathrm{kl}_m(q, p)= \begin{cases} \mathrm{kl}(q, p ),& q\leq p.\\ 0, & q > p. \end{cases} \end{equation} An upper bound on $p$ is then equivalent to an upper bound on $\mathrm{kl}_m(\overline{X}, p)$: \begin{equation} p \le \mathrm{kl}^{-1}\left(\overline{X}\,\middle|\, \frac{1}{n} \log \frac{1}{\delta}\right) \iff \mathrm{kl}_m(\overline{X}, p) \le \frac{1}{n} \log \frac{1}{\delta}. \end{equation} To see this, note that \begin{equation} \sup \left\{ p \in [0,1] : \mathrm{kl}(\overline{X}, p ) \leq \frac{1}{n} \log \frac{1}{\delta} \right\} = \sup \left\{ p \in [0,1] : \mathrm{kl}_m(\overline{X}, p ) \leq \frac{1}{n} \log \frac{1}{\delta} \right\} \end{equation} because, in both suprema, $\overline{X} \le p$ always. The same approach is taken in the proof of the one-sided bound for Bernoulli random variables in \cref{thm:chernoff-bound-binary}, see the proof of Lemma 3.6 in \cite{langford2005tutorial}. Analogously to the proof of \cref{thm:chernoff-interval-two-sided}, the main ingredient of this proof is the equivalence $\mathrm{kl}_m(\overline{X}, p ) \leq c$ if and only if $\underline{\mathrm{kl}}(p,c) \leq \overline{X}$, so we conclude by the fact that the latter holds with probability at least $1 - \delta$: \begin{equation} \mathrm{Pr} \left( \mathrm{kl}_m(\overline{X} , p ) \leq \frac{1}{n} \log \frac{1}{\delta} \right) = \mathrm{Pr} \left( \underline{\mathrm{kl}}\left(p, \frac{1}{n} \log \frac{1}{\delta} \right) \leq \overline{X} \right) \geq 1 - \delta. \end{equation} \end{proof} \bibliographystyle{apalike}
\section{Introduction} Recent years have seen increasing research interest and progress in learning dynamical pattern of a large interacting particle system (IPS). Motivating applications on modeling collective behaviors come from statistical physics~\citep{PhysRevLett.96.104302}, mathematical biology~\citep{Mogilner:1999aa,Topaz:2006aa}, social science~\citep{MotschTadmor2014}, stochastic control~\citep{BuckdahnLiMa2017}, mean-field games~\citep{CarmonaDelarue2018_meanfieldgamsI}, and more recently computational statistics on high-dimensional sampling~\citep{NIPS2017_17ed8abe,LuLuNolen2019} and machine learning for neural networks~\citep{MeiE7665,MeiMisiakiewiczMontanari2019_colt,ChizatBach2018_nips,SIRIGNANO20201820,SirignanoSpiliopoulos2020}. Due to the large number of particles with interactions, such dynamical systems are high-dimensional and often non-linear. In this paper, we consider a general interacting $N$-particle system described by the stochastic differential equations (SDEs) \begin{align}\label{eqn: interact_system} {\rm d} X_t^i = b^*(t, \mu_t^N, X_t^i)\,{\rm d} t + \sigma^*(t, X_t^i) \,{\rm d} W_t^i,\quad 1\leq i\leq N, \end{align} where $(W_t^1)_{t\geq0},\dots,(W_t^N)_{t\geq0}$ are independent Brownian motions on the $d$-dimensional Euclidean space $\mathbb R^d$, $\mu_t^N = N^{-1} \sum_{i=1}^N \delta_{X_t^i}$ is the empirical law of the interacting particles, and the initialization $X^1_0,\dots,X^N_0$ are i.i.d.~$\mathbb R^d$-valued random variables with a common law $\mu_0$, independent of $(W_t^i)_{t\geq0}$. Here in the non-linear diffusion process~\eqref{eqn: interact_system}, the vector field $b^* : \mathbb{R}_+ \times \mathcal{P}(\mathbb R^d) \times \mathbb R^d \to \mathbb{R}^d$ is a distribution-state dependent drift vector field to be estimated and $\sigma^*$ is a known diffusion function (or volatility coefficient) quantifying the magnitude of the self-energy of the particle. For simplicity, we focus on systems with time-homogeneous and space-(one-)periodic drift vector field $b^*(t,\nu,x) =: b^*(\nu,x)$ satisfying $b^*(\nu,x+m) = b^*(\nu,x)$ for every $m\in\mathbb Z^d$, and constant diffusion function $\sigma^*(t, x) \equiv 1$. The periodic model effectively confines the SDEs to a compact state space as the $d$-dimensional torus $\mathbb T^d$, and is commonly adopted in the SDE analysis to avoid boundary issues~\citep{van2016gaussian,pokern2013posterior,nickl2020nonparametric}. Suppose that we observe continuous-time single-trajectory data for each particle $\mathcal{X}_T = \{(X_t^1, \dots, X_t^N):0\leq t\leq T\}$ in a finite time horizon $T > 0$. Our goal is to derive a statistically valid procedure to estimate the vector field $b^*$ in a large IPS based on the data $\mathcal{X}_T$. \subsection{System governed by external-interaction force} In the periodic setting, the values of the process $(X_t^i)$ modulo $\mathbb Z^d$ contain all relevant statistical information, so we can identify the law of $(X_t^i)$ with a uniquely defined probability measure on $\mathbb T^d$ (cf.~Section 2.2 in~\cite{nickl2020nonparametric} for further details). Under such identification, one important class of IPS with a time-homogeneous drift vector field can be represented as \begin{align}\label{eqn:external-interaction_force} b^\ast(\nu, x) = \int_{\mathbb T^d}\tilde{b}^\ast(x, y)\,{\rm d}\nu(y),\quad\mbox{with}\quad \tilde{b}^\ast(x,y) = G^\ast(x) + F^\ast(x-y), \end{align} for $\nu \in \mathcal{P}(\mathbb T^d)$ and continuous $F^\ast, G^\ast : \mathbb T^d \to \mathbb R^d$. In this case, one can interpret $G^\ast$ as an external force to the global system characterizing the drift tendency of particles and $F^\ast$ as an interaction kernel between particles. Then the IPS in~\eqref{eqn: interact_system} can be reformulated as \vspace{-0.5em} \begin{align*} {\rm d} X_t^i = G^\ast(X_t^i) \,{\rm d} t + \frac{1}{N}\sum_{j=1}^N F^\ast(X_t^i - X_t^j) \, {\rm d} t + {\rm d} W_t^i.\\[-5ex] \end{align*} In statistical mechanics, microscopic behaviors of $N$ random particles are usually related to explain some observed macroscopic physical quantities (e.g., temperature distributions) in the sense that the evolution of the empirical law $\mu_t^N$ of the particles converges to a non-random mean-field limit $\mu_t$ as $N \to \infty$ and the probability measure flow $\mu_t(x) := \mu(x,t)$ solves the \emph{McKean-Vlasov equation}~\citep{McKean1966} \begin{equation} \label{eqn:mckean-vlasov_eqn} \partial_t \mu = \Delta \mu + \mbox{div}\bigg(\mu \, \bigg[G + \int_{{\mathbb T}^d} F(\cdot - y) \mu_t({\rm d} y) \bigg] \bigg), \end{equation} which is a non-linear parabolic partial differential equation (PDE). For this special class of IPS, a further goal is to study the identifiability of $(F^\ast,G^\ast)$ and consistency of the derived estimators. \subsection{Related work} It is a classical result that $N$-particle interacting system (\ref{eqn: interact_system}) admits a unique strong solution, when both $b^*$ and $\sigma^*$ are Lipschitz continuous and the solution converges to its mean-field limit McKean-Vlasov stochastic differential equation (MVSDE) both in pathwise and weakly under the same Lipschitz condition~\citep{carmona2016lectures,CarmonaDelarue2018_meanfieldgamsI}. The latter is usually known as propagation of chaos~\citep{Sznitman1991}. Another inspiring work from \cite{lacker2018strong} showed that the convergence can be proved in a much stronger topology ($\tau$-topology), when volatility coefficient $\sigma^*$ involves no interaction term. Several works about learning the interaction kernel of interacting particle system have be done lately. \cite{bongini2017inferring} proposed an estimator by minimizing the discrete error functional, whose convergence rate is usually no faster than $N^{-1/d}$. This reflects the phenomenon of curse-of-dimension. \cite{lu2019nonparametric} constructed the least square estimator for interaction kernel, which enjoys an optimal rate of convergence under mild conditions. These two works were done under a noiseless setting, i.e., the system evolves according to an ordinary differential equation and initial conditions of agents are i.i.d. As for the stochastic system, \cite{li2021identifiability} studied the learnability (identifiability) of interaction kernel by maximum likelihood estimator (MLE) under the coercivity condition, and \cite{lang2021identifiability} provided a complete characterization of learnability. \cite{della2021nonparametric} investigated a nonparametric estimation of the drift coefficient, and the interaction kernel can be separated by applying Fourier transform for deconvolution. The convergence result is provided under a fixed time horizon, meaning that time $T$ is fixed in their asymptotic result. Another nonparametric estimation algorithm based on least squares was proposed by \cite{lang2020learning}. Estimating parameters of interacting systems by maximum likelihood can date back to 1990. \cite{kasonga1990maximum} proved the consistency and asymptotic normality of MLE for linear parametrized interacting systems. As for MVSDE, \cite{wen2016maximum} discussed the consistency of MLE in a broad class of MVSDE, based on a single trajectory $(x_t)_{0\leq t\leq T}$. \cite{liu2020parameter} extended it to path-dependent case with non-Lipschitz coefficients. Both of these works focused on the asymptotic behaviour when $T\to\infty$. \cite{sharrock2021parameter} studied the case with $N$ realizations of MVSDE, and the case of $N$ interacting particle systems, under which consistency of MLE was proved when $N\to\infty$ and an online parameter estimation method was also discussed. \cite{chen2021maximum} showed that MLE has optimal rate of convergence in mean-field limit and long-time dynamics, when assuming linear interactions and no external force. \vspace{-1em} \subsection{Our contributions} We provide a rigorous non-asymptotic analysis of MLE of drift coefficient restricted on a general class of functions with certain smoothness condition. \cite{della2021nonparametric} proposed a kernel based estimation procedure for the same estimation problem. However, unlike our method, the behaviour of estimation based on kernel method rely heavily on tuning the bandwidth and their analysis does not involve uniform laws of dependent variables. Moreover, the MLE framework provides a unified and principled strategy that naturally incorporates finer structures such as~\eqref{eqn:external-interaction_force} in modelling the drift vector field $b^\ast$. In comparison, the kernel method requires further specialized steps for separating interaction force $F^\ast$ from the external force $G^\ast$ after the estimation of $b^\ast$. As a consequence, we do not need to explicitly specify the deconvolution operator ($\mathcal L$ in Assumption~\ref{assump: non-stationary}) and only need to assume its existence in our consistency analysis, making the MLE approach more robust to changes in problem characteristics and less sensitive to parameter tuning. In our study, there are several obstacles while analyzing the MLE, some of which make our analysis technically more involved than that for the kernel method. Firstly, observations in $\mathcal X_T$ are not i.i.d.~because of interaction among particles from the drift $b^\ast(\mu_t^N,\cdot)$. To decouple the dependence, we follow~\cite{della2021nonparametric} by using Girsanov's theorem to construct a new measure, under which the trajectory of particles becomes i.i.d. However, this change of measure will introduce some additional decoupling errors in our analysis of the MLE that is not present in the analysis of the kernel method~\citep{della2021nonparametric}. Dealing with these decoupling errors requires substantial efforts and is technically highly non-trivial. Secondly, we derive a new and specialized maximal inequality (cf.~Lemma~\ref{lem: order_of_ito}) for handling the supreme of an unbounded process involving the It\^o integral that appears in our analysis. The derived maximal inequality is general and interesting in its own right, and can be applied to other problems involving diffusion processes beyond our current setting. Thirdly, a standard union bound argument cannot be applied to deal with the decoupling error (see the discussion after equation~\eqref{eqn: new_basic_ineq} for a precise meaning) in terms of the supreme of a random process expressed as the average of correlated It\^o integrals that naturally appears when analyzing the MLE. To address this issue, we develop a concentration inequality for U-statistics involving It\^o integrals (cf.~Lemma~\ref{lem: U_statistics}), which is then combined with chaining and leads to a new maximal inequality for U-processes (cf.~Lemma~\ref{lem: decoupling_err_Ito}). This refined maximal inequality helps us derive a better rate in our problem than using existing general versions of the inequality. \subsection{Notation} Let $\mathbb Z$ ($\mathbb N$) denote the set of all (non-negative) integers. For any arbitrary functions $f, g: \mathbb T^d\to \mathbb R^d$, the Fourier series $(f)_k$ of $f$ is defined as \begin{align*} (f_i)_k = \int_{\mathbb T^d}f_i(x) e^{-2\pi ik\cdot x}\,{\rm d} x,\quad 1\leq i\leq d, \,k\in\mathbb Z^d, \end{align*} where we let $f = (f_1,\cdots, f_d)^T$ and $(f)_k = ((f_1)_k, \cdots, (f_d)_k)^T$ are $d$-dimensional column vectors. Properties of Fourier analysis on torus can be found in Chapter 3 of \cite{grafakos2008classical}. For $k = (k_1, \cdots, k_d)^T\in\mathbb Z^d$, let $|k| = k_1 + \cdots + k_d$ be the sum of all elements of $k$, and $D^k = \partial_{k_1\cdots k_d}$ is a $|k|$-th order partial derivative. We use $\norm{\cdot}$ for $l_2$-norm of a vector, and $\norm{\cdot}_2$ for $L^2(\mathbb T^d)$-norm of a (vector-valued) function, i.e., $\norm{f}_2^2 = \int_{\mathbb T^d}\norm{f(x)}^2\,{\rm d} x.$ For a Lipschitz function $f$, we denote $\|f\|_{\text{Lip}}$ is the smallest constant $C > 0$ such that $\|f(x)-f(y)\| \leq \|x-y\|$ for all $x, y \in \mathbb T^d$. Let $\norm{\cdot}_{H^1}$ be the Sobolev norm defined as $\norm{f}_{H^1}^2 = \norm{f}_2^2 + \sum_{i=1}^d \norm{\nabla f_i}_2^2.$ In addition, for a function $b(\nu, x)$, we define the norms $\norm{b}_E^2 := \int_0^T\!\!\!\int_{\mathbb T^d}\norm{b(\mu_t, x)}^2\,{\rm d}\mu_t(x){\rm d} t,$ and $\norm{b}_X^2 := N^{-1} \sum_{i=1}^N\int_0^T\norm{b(\mu_t, X_t^i)}^2\,{\rm d} t.$ For $0 < \beta < \infty$, let $\psi_{\beta}$ be the function on $[0,\infty)$ defined by $\psi_{\beta} (x) = e^{x^{\beta}}-1$, and for a real-valued random variable $\xi$, define $\| \xi \|_{\psi_\beta}=\inf \{ C>0: \mathbb{E}[ \psi_{\beta}( | \xi | /C)] \leq 1\}$. For $\beta \in [1,\infty)$, $\|\cdot\|_{\psi_{\beta}}$ is an \emph{Orlicz norm}, while for $\beta \in (0,1)$, $\| \cdot \|_{\psi_{\beta}}$ is not a norm but a quasi-norm, i.e., there exists a constant $C_{\beta}$ depending only on $\beta$ such that $\| \xi_{1} + \xi_{2} \|_{\psi_{\beta}} \leq C_{\beta} ( \| \xi_{1} \|_{\psi_{\beta}} + \| \xi_{2} \|_{\psi_{\beta}})$. Indeed, there is a norm equivalent to $\| \cdot \|_{\psi_{\beta}}$ obtained by linearizing $\psi_{\beta}$ in a neighborhood of the origin; cf. Lemma C.2 in~\cite{chen2019randomized}. For a function class $\mathcal H$, define the shifted class $\mathcal H^* := \mathcal H - h^*$ for some $h^* \in \mathcal H$. The function class $\mathcal H^*$ is \emph{star-shaped} (or equivalently $\mathcal H$ is star-shaped around $h^*$) if for any $h \in \mathcal H$ and $\alpha \in [0,1]$, the function $\alpha h \in \mathcal H^*$; cf. Chapter 13 of~\cite{wainwright2019high}. We use $N(\varepsilon, \mathcal H, \|\cdot\|)$ to denote the $\varepsilon$-covering number for the function class $\mathcal H$ under the metric induced by the norm $\|\cdot\|$. \section{Constrained Maximum Likelihood Estimation} Let $\mathcal C = \mathcal C([0, T], (\mathbb T^d)^N)$ be the set of all continuous functions on $(\mathbb T^d)^N$, and $\{\mathcal F_t: 0\leq t\leq T\}$ be the filtration generated by our observation $\mathcal{X}_T$. According to Girsanov's theorem (Theorem 1.12 in \cite{kutoyants2004statistical}), the log-likelihood ratio function for the continuous time trajectory data $\mathcal X_T$ takes the form as \begin{equation}\label{eqn:radon-nikodyn_derivative_p} \begin{aligned} L_T(b) :\,=\log \frac{\,{\rm d} {\mathbb P}^N_{b}}{\,{\rm d} {\mathbb P}_0^N}=\sum_{i=1}^N\int_0^T\!\!\!\big\langle b(\mu_t^N, X_t^i), {\rm d} X_t^i\big\rangle - \frac{1}{2}\sum_{i=1}^N\int_0^T \!\norm{b(\mu_t^N, X_t^i)}^2\,{\rm d} t, \end{aligned} \end{equation} where $\frac{\,{\rm d} {\mathbb P}^N_{b}}{\,{\rm d} {\mathbb P}_0^N}$ denotes the Radon-Nikodym derivative of the probability measure ${\mathbb P}^N_{b}$ associated with $\mathcal X_T$ from model ${\rm d} X_t^i = b(t, \mu_t^N, X_t^i)\,{\rm d} t + {\rm d} W_t^i$, $1\leq i\leq N$, relative to the base measure ${\mathbb P}_0^N$. When the drift vector field $b^*$ is driven by the external-interaction force in~\eqref{eqn:external-interaction_force}, it is natural to consider the maximum likelihood estimator (MLE) for $b^*$ in the function class \begin{align*} \mathcal H = \bigg\{b: \mathcal P(\mathbb T^d)\times \mathbb T^d \to \mathbb R^d \,\Big|\,\exists\, F, G\in\tilde{\mathcal H}, b(\nu, x) = G(x) + \int_{\mathbb T^d} F(x-y)\,{\rm d} \nu(y)\bigg\}, \end{align*} where $\tilde{\mathcal H}$ is a uniformly bounded function class whose elements map from $\mathbb T^d$ to $\mathbb R^d$ with certain smoothness (cf. Assumption~\ref{ass:smoothness} below). Note that for $b \in \mathcal H$, we can equivalently compute the MLE $\widehat b_N := \mathop{\rm argmax~}_{b\in\mathcal H} L_T(b)$ by first obtaining the MLE of $F^*$ and $G^*$ as in~\eqref{eqn:external-interaction_force} \begin{align} (\widehat F_N, \widehat G_N) &= \mathop{\rm argmax~}_{F, G\in\tilde{\mathcal H}} \tilde{L}_T(F, G), \quad \mbox{subject to} \ \ \int_{\mathbb T^d} F(x)\,{\rm d} x=0, \label{eqn: MLE_FG}\\ \mbox{where} \qquad \tilde{L}_T(F, G) &= -\frac{1}{2}\sum_{i=1}^N\int_0^T\Big|\Big|G(X_t^i) + \frac{1}{N}\sum_{j=1}^N F(X_t^i - X_t^j)\Big|\Big|^2\,{\rm d} t \notag\\ &\qquad\qquad\qquad + \sum_{i=1}^N\int_0^T\Big\langle G(X_t^i) + \frac{1}{N}\sum_{j=1}^N F(X_t^i-X_t^j),\,{\rm d} W_t^i\Big\rangle, \notag \end{align} and then setting \begin{align*} \widehat b_N(\nu, x) = \widehat G_N(x) + \int_{\mathbb T^d}\widehat F_N(x-y)\,{\rm d} \nu(y),\quad\forall\,\nu\in\mathcal P(\mathbb T^d). \end{align*} Note that the solution of~\eqref{eqn: MLE_FG} is unique up to a constant: for any solution $(\widehat F_N, \widehat G_N)$ and a constant $C\neq 0$, $(\widehat F_N + C, \widehat G_N - C)$ is also a solution. Therefore, we impose an additional restriction $\int_{\mathbb T^d} F^\ast(x)\,{\rm d} x = 0$ for the sake of identifiability of the interaction kernel. This also explains the extra constraint $\int_{\mathbb T^d} F(x)\,{\rm d} x=0$ imposed in the estimation procedure~\eqref{eqn: MLE_FG}. \begin{comment} To facilitate our analysis, we may instead focus on an equivalent formulation that operates on the following log-likelihood ratio relative to the true data generating measure $\mathbb P_*^N:\,= \mathbb P_{b^\ast}^N$, \begin{equation}\label{eqn:radon-nikodyn_derivative} \begin{aligned} &L_T^\ast(b) :\,=\log \frac{\,{\rm d} {\mathbb P}^N_{b}}{\,{\rm d} {\mathbb P}_*^N}=\\ &\sum_{i=1}^N\int_0^T\!\!\!\big\langle(b-b^\ast)(\mu_t^N, X_t^i), {\rm d} X_t^i\big\rangle - \frac{1}{2}\sum_{i=1}^N\int_0^T \!\norm{b(\mu_t^N, X_t^i)}^2 \!- \norm{b^\ast(\mu_t^N, X_t^i)}^2{\rm d} t, \end{aligned} \end{equation} and the accompanied \begin{align} \begin{aligned} \tilde{L}_T^\ast(F, G) &= -\frac{1}{2}\sum_{i=1}^N\int_0^T\Big|\Big|(G - G^\ast)(X_t^i) + \frac{1}{N}\sum_{j=1}^N(F-F^\ast)(X_t^i - X_t^j)\Big|\Big|^2\,{\rm d} t\\ &\qquad\qquad\qquad + \sum_{i=1}^N\int_0^T\Big\langle(G-G^\ast)(X_t^i) + \frac{1}{N}\sum_{j=1}^N(F-F^\ast)(X_t^i-X_t^j),\,{\rm d} W_t^i\Big\rangle, \end{aligned} \end{align} \end{comment} \begin{comment} \subsection{Setting} In this paper, we only consider the system whose volatility coefficient $\sigma(t, \mu_t, x)$ is a constant. Without loss of generality, we can assume $\sigma = 1$ in (\ref{eqn: interact_system}). In this case, the stochastic system with $N$ interacting particles on a $d$-dimensional torus $\mathbb T^d\subset \mathbb R^d$ solves \begin{align}\label{eqn: sys} \begin{cases} {\rm d} X_t^i = b^\ast(t, \mu_t^N, X_t^i)\,{\rm d} t + \,{\rm d} W_t^i,\quad 1\leq i\leq N\\ \mathcal L(X_0^1, \cdots, X_0^N) = \mu_0^{\otimes N} \end{cases}. \end{align} Here we use $\mathcal L$ indicate the law of a random variable; $\mu_0$ is the initial distribution of each particle which are independent at time $t=0$. We are interested in a particular class of systems with \begin{subequations} \begin{align} b^\ast(t, \nu, x) &= b^\ast(\nu, x) = \int_{\mathbb T^d}\tilde{b}^\ast(x, y)\,{\rm d}\nu(y)\label{eqn: form_of_b}\\ \tilde{b}^\ast(x,y) &= G^\ast(x) + F^\ast(x-y)\label{eqn: form_of_btilde} \end{align} \end{subequations} for any measure $\nu$, and both $F^\ast$ and $G^\ast$ are continuous. Since $\mathbb T^d$ is compact in $\mathbb R^d$, $F^\ast$ and $G^\ast$ are bounded, indicating the boundedness of $b^\ast$. In this case, the drift coefficient of (\ref{eqn: sys}) can be formulated as \begin{align*} b^\ast(t, \mu_t^N, X_t^i) = G^\ast(X_t^i) + \frac{1}{N}\sum_{j=1}^N F^\ast(X_t^i - X_t^j). \end{align*} One can think that the function $G^\ast$ stands for an external force to the whole system, while $F^\ast$ plays the role of an interaction force between particles. Assume we can observe single-trajectory data \begin{align}\label{eqn: obs} \{X_t = (X_t^1, \cdots, X_t^N):0\leq t\leq T\} \end{align} for all particles. Here time horizon $T > 0$ is fixed. In this paper, we consider the estimation problem of the interaction function $F$, whose MLE will be constructed later based on Girsanov's Theorem. \end{comment} \section{Convergence Rate of Constrained MLE} In this section, we first derive a general rate of convergence for the constrained MLE $\hat{b}_N$ based on the entropy method which will lead to a computable and simple bound when specialized to $\alpha$-smooth H\"older function class. In the latter case, we will show that the constrained MLE achieves the minimax optimal rate in Section~\ref{subsec:rate_smooth_holder_class}. As a consequence, we derive the consistency $\widehat G_N$ and $\widehat F_N$ in Section~\ref{subsec:consistency_G+F} for the external-interaction force model~\eqref{eqn:external-interaction_force}. \begin{assumption}\label{assump: pointwise_measurable} The class $\tilde{\mathcal H}$ is \emph{pointwise measurable}, i.e., it contains a countable subset $\mathcal G$ such that for every $h \in \mathcal H$ there exists a sequence $g_m \in \mathcal G$ such that $g_m \to h$ pointwise. \end{assumption} Assumption~\ref{assump: pointwise_measurable} is made to avoid measurability issues~\citep{wellner2013weak} since it guarantees that the supremum of a suitable empirical process indexed by $\tilde{\mathcal H}$ is a measurable map. Define the \emph{localized} function class \[ {\mathcal H}_u^* = \{f \in {\mathcal H}^* : \|f\|_E \leq u \} \] and let $H(\varepsilon, \mathcal H^\ast_u)$ be the cardinality of the smallest set $S\subset \mathcal H^\ast_u$ such that $\forall\,g\in\mathcal H_u^\ast$ there exists $f\in S$ satisfying $\norm{f-g}_E \leq \varepsilon u$ and $\norm{f-g}_\infty \leq \varepsilon B$. We further define several entropy integrals that control the complexity of our nonparametric estimation problem: \begin{align*} J_1(u) &:= \sqrt{T}B\int_0^\frac{1}{2}\log\big(1 + H(\varepsilon, \mathcal H^\ast_u)\big)\,{\rm d} \varepsilon + u\int_0^\frac{1}{2}\sqrt{\log\big(1 + H(\varepsilon,\mathcal H^\ast_u)\big)}\,{\rm d} \varepsilon, \\ J_2(L) &:= \int_0^{\frac{L}{2}}\log\big(1 + N(\varepsilon, \mathcal H^\ast, \norm{\tilde{\cdot}}_{\textrm{Lip}})\big)\,{\rm d}\varepsilon, \quad J_3(B) := \int_0^\frac{B}{2}\sqrt{\log\big(1 + N(u, \mathcal H^\ast, \norm{\cdot}_\infty)\big)}\,{\rm d} u, \\ J_4(B) &:= \int_0^\frac{B}{2} \big[\log(1 + N(u,\mathcal H^\ast, \norm{\cdot}_\infty))\big]^{\frac{3}{2}}\,{\rm d} u, \quad J_5(r) := \int_0^\frac{r}{2}\sqrt{\log N(s/\sqrt{T}, \mathcal H^\ast, \norm{\cdot}_\infty)}\,{\rm d} s. \end{align*} We assume that $J_1(u), J_2(L), J_3(B), J_4(B), J_5(r)$ are finite for some function class parameters on $\mathcal H^*$ and some localization parameter $u$. \begin{theorem}[Rate of convergence of constrained MLE]\label{thm: converge_of_b} Suppose the function class $\tilde{\mathcal H}$ satisfies Assumption~\ref{assump: pointwise_measurable} such that $\norm{F}_\infty \leq B$ and $\norm{F}_\textrm{Lip} \leq L$ for all $F\in\tilde{\mathcal H}$. Assume there exist positive constants $\delta_N$ and $r_N$ satisfying \begin{align*} \mathbb E_{\overline{\mathbb P}^N}\sup_{g\in\mathcal H^\ast_{\delta_N}}\bigg|\frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle g(\mu_t, X_t^i),\,{\rm d}\overline{W}_t^i\big\rangle\bigg| \leq 2\delta_N^2 \quad \mbox{and} \quad J_5(r_N) \leq \frac{\sqrt{N}r_N^2}{6CB\sqrt{T}}, \end{align*} where $(\overline{W}_t^i)_{t\geq0}$ is the (transformed) Brownian motion defined in~\eqref{eqn:transformed_BM} and $\overline{\mathbb P}^N$ is the associated probability measure. If $b^\ast\in\mathcal H$, then \begin{align}\label{eqn: converge_of_b} \big|\!\big|\widehat b_N - b^\ast\big|\!\big|_E \leq 48\Big(\delta_N + r_N + \sqrt{\frac{\log N}{N}}\Big) \end{align} with probability at least \begin{align}\label{eqn: tail_prob} \begin{aligned} & 1 - \bigg[\kappa_1\exp\bigg\{-\frac{\kappa_2N\delta_N^2}{3}\bigg\} + 3\kappa_1\exp\bigg\{-\frac{\kappa_2N\delta_N^2}{C\log NJ_1(1)}\bigg\}\bigg] - 2\kappa_1\exp\bigg\{-\frac{\kappa_2\log N}{4TK_1|\!|\tilde{b}^\ast|\!|_{\textrm{Lip}}^2}\bigg\}\\ &\quad- 2\kappa_1\exp\bigg\{-\frac{\kappa_2\log N}{CLK_1J_2(L)}\bigg\} - 2\kappa_1\exp\bigg\{-\frac{\kappa_2N(\log N)^2}{CJ_3^2(B)}\bigg\}\\ &\quad - 2\kappa_1\exp\bigg\{-\Big(\frac{\kappa_2\log N}{CJ_4(B)\log\log N}\Big)^{\frac{2}{3}}\bigg\} - \kappa_1\exp\bigg\{-\frac{\kappa_2Nr_N^2}{36C^2B^2T}\bigg\}. \end{aligned} \end{align} Here $\kappa_1, \kappa_2, K_1, C$ are some positive constants. \end{theorem} \begin{remark}There are some interesting remarks for Theorem~\ref{thm: converge_of_b} in order. {\bf (i)} Theorem~\ref{thm: converge_of_b} remains true for drift vector field $b^*$ with anisotropic interaction force, namely $b^\ast(\nu, x) = \int_{\mathbb T^d}\tilde{b}^\ast(x, y)\,{\rm d}\nu(y)$ with $\tilde{b}^\ast = G^*(x) + F^*(x, y)$. In this case, we need to consider functions in $\tilde{\mathcal H}$ map from $\mathbb T^{2d}$ to $\mathbb R^d$. {\bf (ii)} $\delta_N$ corresponds to the Gaussian complexity of function class $\mathcal H^\ast$ in a discrete setting, while $r_N$ is an upper bound of Rademacher complexity of $\mathcal H^\ast$. Intuitively, the estimation problem will be harder if the function class is more complex, and thus $\delta_N$ and $r_N$ should affect the rate of convergence in certain extent. It is quite common that the rate of convergence of nonparametric estimation depends on both $\delta_N$ and $r_N$, see e.g. Corollary 14.15 in \cite{wainwright2019high} as an example. {\bf (iii)} Usually we use chaining method~\citep{wainwright2019high, geer2000empirical} to bound the expectation term in order to derive an explicit form of $\delta_N$. Since we can show the sum of i.i.d.~It\^o integral is sub-exponential, one direct method is to use $\psi_1$-norm to bound the expectation (see Lemma \ref{lem: psi1_chaining}). Another possible way to apply chaining is based on Bernstein-Orlicz norm~\citep{van2013bernstein}. In this case, bracketing number rather than covering number will be needed. \end{remark} Proof of Theorem~\ref{thm: converge_of_b} is quite involved. Our proof builds on a number of recently developed technical tools such as change of measure via Girsanov's theorem for decoupling the IPS, concentration inequalities for unbounded empirical processes and degenerate $U$-processes, localization technique for sum of i.i.d.~It\^o integrals. We shall sketch the main structure of the argument in Section~\ref{subsec:proof_sketch_rate_constrainedMLE} and defer the complete proof details to Appendix. \subsection{Application to H\"older smooth function class} \label{subsec:rate_smooth_holder_class} Consider the case where $\tilde{\mathcal H} = C_1^\alpha\big([0, 1]^d\big)$ with fixed smooth parameter $\alpha$. Here, the $\alpha$-smooth H{\"o}lder function class is the set of all functions $f$ such that \begin{align*} \norm{f}_\alpha := \max_{|k|\leq \lfloor\alpha\rfloor}\sup_{x}\Big|D^kf(x)\Big| + \max_{|k| = \lfloor\alpha\rfloor}\sup_{x\neq y}\frac{\big|D^{k}f(x) - D^{k}f(y)\big|}{\norm{x- y}^{\alpha - \lfloor\alpha\rfloor}} \leq M \end{align*} with some fixed $M > 0$. \begin{assumption}\label{ass:smoothness} $\forall\, F\in\tilde{\mathcal H}$, $\norm{F}_\infty \leq B$, $\norm{F}_\textrm{Lip} \leq L$ and $F$ is $\alpha$-H\"older continuous with $\alpha > 1$. \end{assumption} From Theorem 2.7.1 in \cite{wellner2013weak} we know \begin{align*} \log N(\varepsilon, \tilde{\mathcal H}, \norm{\cdot}_\infty) &\lesssim \varepsilon^{-\frac{d}{\alpha}}. \end{align*} By Theorem~\ref{thm: converge_of_b} we obtain the following rate of convergence in Corollary~\ref{coro: holder_smooth}. The detailed proof is deferred to Appendix. \begin{corollary}[H\"older smooth drift estimation error]\label{coro: holder_smooth} Suppose the function class $\tilde{\mathcal H}$ satisfies Assumption~\ref{ass:smoothness}. If $\alpha > 3d/2$, then there are positive constants $C$ and $C'$ such that \begin{align}\label{eqn:minimax_smooth_holder_class} \big|\!\big| \widehat b_N - b^\ast\big|\!\big|_E \lesssim N^{-\frac{\alpha}{d + 2\alpha}} \end{align} with probability at least $1 - C\exp\big\{-C'(\frac{\log N}{\log\log N})^{2/3}\big\}$. \end{corollary} Note that rate of convergence for the MLE derived in~\eqref{eqn:minimax_smooth_holder_class} attains the minimax rate of estimating the drift term in IPS~\citep{della2021nonparametric}. When $\alpha \leq 3d/2$, the term $J_4(B)$ in our general result Theorem~\ref{thm: converge_of_b} (also cf. Lemma \ref{lem: decoupling_err_Ito} for definition) is not finite. However, we still can derive a rate of convergence for $\hat{b}_N$ by refining the definition of $J_4$ as the one in \cite{van2014uniform} to avoid the integrability issue. The price we pay is that the tail probability converges to zero more slowly, which would translate to a sub-optimal rate of convergence of $\widehat b_N$. \subsection{Estimating interaction kernel in Vlasov model} \label{subsec:consistency_G+F} In this section, we specialize our theory to the external-interaction force system, and study the convergence behaviour of interaction kernel $F^\ast$. This is an inverse problem and can be done in a similar argument as in \cite{della2021nonparametric} by Fourier transform. \cite{della2021nonparametric} \emph{explicitly} use Fourier transform to construct an estimator based on deconvolving a kernel density estimator for $\mu_t$ from an estimator for $F^*\ast \mu_t$, where $\ast$ denotes the function convolution operator. In comparison, we \emph{implicitly} use Fourier transform to derive a stability estimate for translating an error bound on $\widehat b_N$ to that on $\widehat F_N$ in the analysis. More specifically, recall that \begin{align}\label{eqn: invariance} \widehat b_N(\mu_t, x) - b^\ast(\mu_t, x)= \widehat G_N(x) - G^\ast(x) + \int_{\mathbb T^d}\big(\widehat F_N(x-y) - F^\ast(x-y)\big)\,{\rm d}\mu_t(y). \end{align} Let $L^2([0,T])$ denote the space of all square-integrable functions on $[0,T]$ and view $\mu(x,t)=\mu_t(x)$ as a function of $(x,t)$. For any linear operator $\mathcal L:\,L^2([0,T]) \to \mathbb R$, $f\mapsto \mathcal L f := \int_0^T f(t)w(t)\,{\rm d} t$, where $w$ is a bounded measurable function on $[0, T]$ such that $\int_0^T w(t)\,{\rm d} t = 0$, we obtain by applying $\mathcal L$ to both sides of~\eqref{eqn: invariance}, \begin{align}\label{eqn: Lb = F*Lu} \mathcal L \big[(\widehat b_N-b^\ast)(\mu, x)\big] = \mathcal L\big[(\widehat F_N- F^\ast)\ast \mu(x)\big] = \big((\widehat F_N - F^\ast)\ast \mathcal L\mu\big)(x), \end{align} where we have used the property that $\mathcal Lg=0$ for any $t$-independent function $g$. Since the goal is to relate $\|\widehat F_N - F^\ast\|_2$ to $\|\widehat b_N - b^\ast\|_E$, we may apply Fourier transform to both sides of~\eqref{eqn: Lb = F*Lu} to deconvolute $\widehat F_N- b^\ast$ and $\mathcal L\mu$, leading to \begin{align}\label{eqn: deconvolution} \Big(\mathcal L \big[(\widehat b_N-b^\ast)(\mu, \cdot)\big]\Big)_k = (\widehat F_N - F^\ast)_k\cdot (\mathcal L\mu)_k,\quad \forall\,k\in\mathbb Z^d. \end{align} Note that by the definition of $\mathcal L$, we have $(\mathcal L\mu)_0 = \mathcal L \int_{\mathbb T^d} \mu(x) = \mathcal L 1=0$, so equation~\eqref{eqn: deconvolution} only determines the Fourier coefficient of $(\widehat F_N - F^\ast)_k$ for $k\neq 0$. However, $(\widehat F_N - F^\ast)_0$ can be uniquely determined by our additional identifiability constraint $\int_{\mathbb T^d}\widehat F_N(x)\,{\rm d} x = \int_{\mathbb T^d}F^\ast(x)\,{\rm d} x=0$. To ensure that $\widehat F_N - F^\ast$ remains small when $\widehat b_N$ is close to $b^\ast$, we need the following assumption motivated by identity~\eqref{eqn: deconvolution}. \begin{assumption}\label{assump: non-stationary} There exists a bounded measurable function $w(t)$ on $[0, T]$ such that $\int_0^T w(t)\,{\rm d} t =0$ and $(\mathcal L \mu)_k=\int_0^T(\mu_t)_k\,w(t)\,{\rm d} t \neq 0$ for all nonzero $k\in\mathbb Z^d$. \end{assumption} Assumption~\ref{assump: non-stationary} guarantees the identifiability of interaction force $F^\ast$ (and therefore external force $G^\ast$) from the drift vector field $b^\ast$, and requires the system to be away from stationarity. To see this, consider the ideal setting where we exactly know the true $b^\ast$ and $\{\mu_t: 0\leq t\leq T\}$, and want to uniquely recover $F^\ast$ from~\eqref{eqn:external-interaction_force}. Suppose system~\eqref{eqn: interact_system} already attains stationarity, i.e. $\mu_t = \mu^\ast$ for all $t\in[0,T]$ with $\mu^\ast$ denoting the stationary distribution of the system which solves equation~\eqref{eqn:mckean-vlasov_eqn} with $\partial_t\mu=0$. Then it is impossible to separate out the time-homogeneous interaction term $F^\ast\ast \mu^\ast$ from the drift vector field \begin{align*} b^\ast(\mu^\ast,x) = G^\ast(x) + \int_{\mathbb T^d} F^\ast(x-y)\,{\rm d}\mu^\ast(y), \end{align*} since for any function $g:\,\mathbb T^d\to\mathbb R$, the new pair $(G',\,F') = (G^\ast-g\ast \mu^\ast,\, F^\ast+g)$ induces the same drift $b^\ast$. However, this setting violates Assumption~\ref{assump: non-stationary} since $(\mathcal L\mu)_k = 0$ for all $k\in\mathbb Z^d$. In other words, the interaction force $F^\ast$ can only be recovered from the transient behaviour of the system, and Assumption~\ref{assump: non-stationary} is one mathematical description implying the system to be away from stationarity. The linearly dependence structure~\eqref{eqn: deconvolution} in the frequency domain suggests that the estimation error of $\widehat F_N$ depends on the accuracy of $\widehat b_N$ and the behaviour of $(\mathcal L \mu)_k$. It is common that an inverse problem related to a convolution equation, such as equation~\eqref{eqn: Lb = F*Lu}, tends to be numerically unstable, since it will be ill-posed when the Fourier coefficients $\{(\mathcal L\mu)_k\}_{k=1}^\infty$ of $\mathcal L\mu$ decay too fast~\citep{isakov2006inverse}. By quantifying the stability of solution to~\eqref{eqn: Lb = F*Lu} around the true interaction $F^\ast$, we arrive at the following corollary. \begin{corollary}[Interaction kernel estimation error]\label{cor: rate_of_interaction} Let $\eta_N$ be the smallest integer satisfying $\eta_N(\delta_N + r_N + \frac{\log N}{N})\leq C_1 \inf_{0 < \norm{k} < \eta_N}\norm{(\mathcal L\mu)_k}$. If $F^\ast$ and $G^\ast$ belong to $\tilde{\mathcal H}$ and both have finite $H_1$-norms, then \begin{align*} \big|\!\big|\widehat F_N - F^\ast\big|\!\big|_2 \leq C_2 \,\eta_N^{-1} \end{align*} holds with at least probability given by~\eqref{eqn: tail_prob}. Here constants $(C_1,,C_2)$ are independent of $N$. \end{corollary} \begin{remark} In the proof of Corollary~\ref{cor: rate_of_interaction}, we only used the condition that the Sobolev norm $\|F^\ast\|_{H^1}$ is finite. If we further use the condition that $F^\ast$ is $\alpha$-H\"{o}lder continuous with $\alpha>1$, then the error bound can be improved to $\eta_N^{-\alpha}$ where $\eta_N^\alpha(\delta_N + r_N + \frac{\log N}{N})\lesssim \inf_{0<\norm{k} < \eta_N}\norm{(\mathcal L\mu)_k}$. In particular, if Assumption~\ref{assump: non-stationary} holds, then Corollary~\ref{cor: rate_of_interaction} implies $\widehat F_N$ to be a consistent estimator of $F^\ast$ as $N\to\infty$. \end{remark} \section{Proof of Theorem~\ref{thm: converge_of_b}}\label{subsec:proof_sketch_rate_constrainedMLE} If $\big|\!\big|\widehat \Delta_N\big|\!\big|_E \leq \delta_N$, then Theorem~\ref{thm: converge_of_b} is trivially true. So we assume $\big|\!\big|\widehat \Delta_N\big|\!\big|_E > \delta_N$. \noindent \underline{\bf Step 1: decoupling.} The first technical difficulty is to decouple the interaction effect between particles that would cause the dependence of particle trajectories. Let ${\mathbb P}^N$ be the probability measure on $(\mathcal C, \{\mathcal F_t\}_{t=0}^T)$ induced by solution of the true data generating mechanism~\eqref{eqn: interact_system}. Motivated by the change of measure argument in \cite{lacker2018strong} and \cite{della2021nonparametric}, we construct a new measure $\overline{\mathbb P}^N$ on $(\mathcal C, \{\mathcal F\}_{t=0}^T)$, under which $(X^i_t)_{t=0}^T$ and $(X^j_t)_{t=0}^T$ are independent for all $1\leq i\neq j\leq N$. This is possible thanks to Girsanov's Theorem. Specifically, define a process $\{Z_t\}_{t=0}^T$ as \begin{align*} Z_t = \exp\bigg\{\sum_{i=1}^N\bigg[\int_0^t\!\big\langle b^\ast(\mu_s, X_s^i) - b^\ast(\mu_s^N, X_s^i),{\rm d} W_s^i\big\rangle\! - \!\frac{1}{2}\int_0^t\!||b^\ast(\mu_s, X_s^i) - b^\ast(\mu_s^N, X_s^i)||^2{\rm d} s\bigg]\bigg\}, \end{align*} and let $\,{\rm d} \overline{\mathbb P}^N = Z_T\,{\rm d}\mathbb P^N$. By Girsanov's Theorem, \begin{align}\label{eqn:transformed_BM} \overline{W}_t^i := W_t^i - \int_0^t b^\ast(\mu_s, X_s^i) - b^\ast(\mu_s^N, X_s^i)\,{\rm d} s,\quad 0\leq t\leq T \end{align} are i.i.d.~Brownian motions on $\mathbb T^d$ under $\overline{\mathbb P}^N$. With the transformation~\eqref{eqn:transformed_BM}, the original IPS (\ref{eqn: interact_system}) turns into a system of \emph{independent} SDEs given by \begin{align}\label{eqn: mean_field_SDE} {\rm d} X_t^i = b^\ast(\mu_t, X_t^i)\,{\rm d} t + \,{\rm d}\overline{W}_t^i \end{align} with i.i.d.~initialization $\mathcal{L}(X_0^1,\dots,X_0^N) = \otimes_{i=1}^N \mu_0$. Our subsequent strategy for analyzing the log-likelihood ratio is to control the probability of some "bad events" under $\overline{\mathbb P}^N$, and then to use the following Lemma~\ref{lem:converting_lemma} to convert it back to the probability under $\mathbb P^N$. The proof of Lemma~\ref{lem:converting_lemma} can be found in Theorem 18 in \cite{della2021nonparametric}. \begin{lemma}[Change of measure equivalence]\label{lem:converting_lemma} There are positive constants $\kappa_1$ and $\kappa_2$ such that for any $\mathcal F_T$-measurable event $\mathcal B$, \begin{align*} \mathbb P^N(\mathcal B) \leq \kappa_1\overline{\mathbb P}^N(\mathcal B)^{\kappa_2}. \end{align*} \end{lemma} \noindent \underline{\bf Step 2: basic inequality.} By definition of $\widehat b_N$, we have $L_T(\widehat b_N) \geq L_T(b^\ast)$ and thus \begin{align*} & \sum_{i=1}^N\int_0^T\big\langle (\widehat b_N - b^\ast)( \mu_t^N, X_t^i), \, b^\ast(\mu_t, X_t^i)\,{\rm d} t + {\rm d}\overline{W}_t^i\big\rangle \\ &\qquad\qquad\qquad\qquad-\frac{1}{2}\sum_{i=1}^N\int_0^T \Big\{||\widehat b_N(\mu_t^N, X_t^i)||^2 - ||b^\ast(\mu_t^N, X_t^i)||^2 \Big\}\,{\rm d} t \geq 0. \end{align*} Denote $\widehat\Delta_N = \widehat b_N - b^\ast$, we can derive the basic inequality \begin{align}\label{eqn: basic_ineq} \begin{aligned} \frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle\widehat \Delta_N( \mu_t^N, X_t^i),\,{\rm d} \overline{W}_t^i\big\rangle &\geq \frac{1}{2N}\sum_{i=1}^N\int_0^T||\widehat b_N(\mu_t^N, X_t^i) - b^\ast(\mu_t, X_t^i)||^2\,{\rm d} t\\ &\qquad- \frac{1}{2N}\sum_{i=1}^N\int_0^T||b^\ast(\mu_t^N, X_t^i) - b^\ast(\mu_t, X_t^i)||^2\,{\rm d} t. \end{aligned} \end{align} Furthermore, by noticing that \begin{align*} &\quad\,\,\, \widehat b_N(\mu_t^N, X_t^i) - b^\ast(\mu_t, X_t^i)\\ &= \Big[\widehat\Delta_N(\mu_t^N, X_t^i) - \widehat\Delta_N(\mu_t, X_t^i)\Big] + \Big[b^\ast(\mu_t^N, X_t^i) - b^\ast(\mu_t, X_t^i)\Big] + \Big[\widehat b_N(\mu_t, X_t^i) - b^\ast(\mu_t, X_t^i)\Big], \end{align*} we can obtain by using the Cauchy-Schwartz inequality and basic inequality~\eqref{eqn: basic_ineq} that \begin{align}\label{eqn: new_basic_ineq} \begin{aligned} \frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle\widehat\Delta_N(\mu_t, X_t^i),\,{\rm d} \overline{W}_t^i\big\rangle &\geq \frac{1}{6N}\sum_{i=1}^N\int_0^T\big|\big|\widehat\Delta_N(\mu_t, X_t^i)\big|\big|^2\,{\rm d} t\\ &\quad - \frac{1}{N}\sum_{i=1}^N\int_0^T\big|\big|b^\ast( \mu_t^N, X_t^i) - b^\ast(\mu_t, X_t^i)\big|\big|^2\,{\rm d} t\\ &\quad - \frac{1}{2N}\sum_{i=1}^N\int_0^T\big|\big|\widehat\Delta_N(\mu_t^N, X_t^i) - \widehat\Delta_N(\mu_t, X_t^i)\big|\big|^2\,{\rm d} t\\ &\quad - \frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle\widehat\Delta_N(\mu_t^N, X_t^i) - \widehat\Delta_N(\mu_t, X_t^i),\,{\rm d}\overline{W}_t^i\big\rangle. \end{aligned} \end{align} We will call the last three terms on the right hand side of the above display as \emph{decoupling errors} since they characterize the degree of dependence among the particle trajectories due to the presence of empirical law $\mu_t^N$ in the drift term $b^\ast$ of SDE~\eqref{eqn: interact_system}. To bound the left-hand side of~\eqref{eqn: new_basic_ineq}, we need the following Lemma~\ref{lem: order_of_ito}. \begin{lemma}[Localization]\label{lem: order_of_ito} For the star-shaped set $\mathcal H^\ast$, define \begin{align*} \mathcal A(u) = \bigg\{\exists\, g\in\mathcal H^\ast, \norm{g}_E \geq u: \bigg|\frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle g(\mu_t, X_t^i),\,{\rm d} \overline{W}_t^i\big\rangle\bigg| \geq 4u\norm{g}_E\bigg\}, \end{align*} and critical radius $\delta_N$ as the smallest number $u > 0$ such that \begin{align*} \mathbb E_{\overline{\mathbb P}^N}\sup_{g\in\mathcal H^\ast_{u}}\bigg|\frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle g(\mu_t, X_t^i),\,{\rm d}\overline{W}_t^i\big\rangle\bigg| \leq 2u^2. \end{align*} Recall $H(\varepsilon, \mathcal H^\ast_u)$ is the cardinality of the smallest set $S\subset \mathcal H^\ast_u$, such that $\forall\,g\in\mathcal H_u^\ast$, there exists $f\in S$ satisfying $\norm{f-g}_E \leq \varepsilon u$ and $\norm{f-g}_\infty \leq \varepsilon B$. Then, for every $u\geq \delta_N$ we have \begin{align*} \overline{\mathbb P}^N\big(\mathcal A(u)\big) \leq \exp\bigg\{-\frac{N\delta_N^2}{3}\bigg\} + 3\exp\bigg\{-\frac{Nu\delta_N}{C\log NJ_1(1)}\bigg\}. \end{align*} \end{lemma} Thus, on the event $\mathcal A(\delta_N)^c$ where $\delta_N$ is the critical radius of our nonparametric estimation problem, we have \begin{equation}\label{eqn:final_basic_inequality} \frac{1}{6N}\sum_{i=1}^N\int_0^T\big|\big|\widehat\Delta_N(\mu_t, X_t^i)\big|\big|^2\,{\rm d} t \leq 4 \delta_N \|\hat\Delta_N\|_E + T_1 + 0.5 T_2 + T_3, \end{equation} where the three error terms \begin{eqnarray*} T_1 &=& \frac{1}{N}\sum_{i=1}^N\int_0^T\big|\big|b^\ast( \mu_t^N, X_t^i) - b^\ast(\mu_t, X_t^i)\big|\big|^2\,{\rm d} t, \\ T_2 &=& \sup_{g \in \mathcal H^*} \frac{1}{N}\sum_{i=1}^N\int_0^T\big|\big|g( \mu_t^N, X_t^i) - g(\mu_t, X_t^i)\big|\big|^2\,{\rm d} t, \\ T_3 &=& \frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle\widehat\Delta_N(\mu_t^N, X_t^i) - \widehat\Delta_N(\mu_t, X_t^i),\,{\rm d}\overline{W}_t^i\big\rangle. \end{eqnarray*} are expected to decay to zero as $N\to\infty$ since $\mu_t^N$ is expected to be close to $\mu_t$. However, a rigorous analysis of these three error terms requires substantial efforts due to their complicated structures and the need of a uniform control over $\mathcal H^*$, which will be sketched below. \noindent \underline{\bf Step 3: bound $T_1$.} To bound $T_1$, we use the following lemma. Recall that $|\!|f|\!|_{\textrm{Lip}}$ denotes the Lipschitz constant of $f$. \begin{lemma}[Decoupling error bound]\label{lem: decoupling_err} For any $u > 0$, $N\geq 2$ and $g\in\mathcal H^\ast$, we have \begin{align*} \overline{\mathbb P}^N\bigg(\frac{1}{N}\sum_{i=1}^N\int_0^T\big|\!\big|g(\mu_t, X_t^i) - g(\mu_t^N, X_t^i)\big|\!\big|^2\,{\rm d} t > u^2\bigg) \leq 2e^{-\frac{Nu^2}{4TK_1|\!|\tilde{g}|\!|^2_{\textrm{Lip}}}}. \end{align*} \end{lemma} Applying Lemma~\ref{lem: decoupling_err} with $g = b^*$ and $u^2 = \log(N)/N$, we can conclude that $T_1 \leq \frac{\log N}{N}$ holds with probability at least $1-2\exp\big(-{\log{n} \over 4 T K_1 \|\tilde{b^\ast}\|^2_{\textrm{Lip}}}\big)$. Lemma~\ref{lem: decoupling_err} tells us that the decoupling error is sub-Gaussian with parameter of order $O(N^{-1})$, although the summands are not independent. In fact, we can decompose \begin{align*} g(\mu_t^N, X_t^i) - g(\mu_t, X_t^i) &= \frac{1}{N}\bigg[\tilde{g}(X_t^i, X_t^i) - \int_{\mathbb T^d}\tilde{g}(X_t^i, y)\,{\rm d}\mu_t(y)\bigg]\\ &\qquad\quad + \frac{1}{N}\sum_{j=1, j\neq i}^N\bigg[\tilde{g}(X_t^i, X_t^j) - \int_{\mathbb T^d}\tilde{g}(X_t^i, y)\,{\rm d}\mu_t(y)\bigg]. \end{align*} Notice that the second term above is a summation of $(N-1)$ i.i.d.~centered random variables under $\overline{\mathbb P}^N$ conditioning on $X_t^i$. This is where the sub-Gaussianity comes from. Intuitively, the second decoupling error $T_2$ (or third line of~\eqref{eqn: new_basic_ineq}) should have the same order $O(N^{-1})$ by some discretization or chaining arguments. This will be done in Lemma \ref{lem: maximal_ineq_decoupling_err}. \noindent \underline{\bf Step 4: bound $T_2$.} To bound $T_2$, we use the following lemma. \begin{lemma}[Uniform laws of dependent variables]\label{lem: maximal_ineq_decoupling_err} We have \begin{align*} \overline{\mathbb P}^N\bigg(\sup_{g\in\mathcal H^\ast}\frac{1}{N}\sum_{i=1}^N\int_0^T\norm{g(\mu_t, X_t^i) - g(\mu_t^N, X_t^i)}^2\,{\rm d} t > u\bigg) \leq 2e^{-\frac{Nu}{CLK_1J_2(L)}} \end{align*} for some constant $C > 0$. \end{lemma} \begin{remark} In order for $J_2(L)$ to be finite, we need functions in $\mathcal H^\ast$ to have higher-order smoothness than just being Lipschitz continuous, so that the covering number with respect to $\norm{\tilde{\cdot}}_\textrm{Lip}$ is finite. \end{remark} \noindent \underline{\bf Step 5: bound $T_3$.} The last decoupling error $T_3$ in~\eqref{eqn:final_basic_inequality} (or last line of~\eqref{eqn: new_basic_ineq}) is much more involved to control. This is because the Ito integral is expected to only have the order of the square root of its quadratic variation. Notice that for each $g(\nu, x) = \int_{\mathbb T^d}\tilde{g}(x, y)\,{\rm d}\nu(y)$, we have \begin{align}\label{eqn: decompose_Ito_term} \begin{aligned} &\quad\,\frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle g(\mu_t^N, X_t^i) - g(\mu_t, X_t^i),\,{\rm d}\overline{W}_t^i\big\rangle\\ &= \frac{1}{N^2}\sum_{i=1}^N\int_0^T\big\langle\xi_{i,i}^g(t),\,{\rm d}\overline{W}_t^i\big\rangle + \frac{1}{N^2}\sum_{1\leq i\neq j\leq N} \int_0^T\big\langle\xi_{i,j}^g(t),\,{\rm d}\overline{W}_t^i\big\rangle =: V_N(g) + U_N(g), \end{aligned} \end{align} where we used the shorthand $\xi_{i,j}^g(t) = \tilde{g}(X_t^i, X_t^j) - \int_{\mathbb T^d}\tilde{g}(X_t^i, y)\,{\rm d}\mu_t(y)$ for notation simplicity. The first term $V_N(g)$ in (\ref{eqn: decompose_Ito_term}) is a sum of i.i.d.~random variable, which is expected to have order $O(N^{-\frac{3}{2}})$. The second term $U_N(g)$ can be viewed as a U-statistics (after proper symmetrization), with kernel function $g^\dagger(\overline{W}^i, \overline{W}^j) := \int_0^T\big\langle\xi_{i,j}^g(t),\,{\rm d}\overline{W}_t^i\big\rangle$. It is easy to verify that $\mathbb E_{\overline{\mathbb P}^N}\big[g^\dagger(\overline{W}^i, \overline{W}^j)\,|\,\overline{W}^i\big] = \mathbb E_{\overline{\mathbb P}^N}\big[g^\dagger(\overline{W}^i, \overline{W}^j)\,|\,\overline{W}^j\big] = 0.$ So $g^\dagger$ is degenerate (Definition 3.5.1 in \cite{de1999decoupling}), indicating that the U-statistics should have order around $O(N^{-1})$ asymptotically (see Chapter 3 of \cite{lee1990u}). Above discussions can be rigorously stated as Lemma \ref{lem: diagonal_elements} and Lemma \ref{lem: U_statistics} under a non-asymptotic setting. Then the last term $T_3$ in~\eqref{eqn:final_basic_inequality} can be bounded by the following lemma. \begin{lemma}[Uniform laws of dependent It\^o integrals]\label{lem: decoupling_err_Ito} We have \begin{align*} \sup_{g\in\mathcal H^\ast}\frac{1}{N}\sum_{i=1}^N\int_0^T\big\langle g(\mu_t^N, X_t^i) - g(\mu_t, X_t^i),\,{\rm d}\overline{W}_t^i\big\rangle \leq \frac{2\log N}{N} \end{align*} with probability at least \begin{align*} 1 - 2\exp\bigg\{-\frac{N(\log N)^2}{CJ_3^2(B)}\bigg\} - 2\exp\bigg\{-\Big(\frac{\log N}{CJ_4(B)\log\log N}\Big)^{\frac{2}{3}}\bigg\}. \end{align*} \end{lemma} \noindent \underline{\bf Step 6: conclude.} To finish the bound for the estimation error under the $\|\cdot\|_E$ norm, we need the following norm equivalence between $\|\cdot\|_E$ and its empirical version $\|\cdot\|_X$. \begin{lemma}[Equivalence of norms]\label{lem: equivalence_norm} There is a constant $C > 0$ such that \begin{align*} \overline{\mathbb P}^N\bigg(\sup_{g\in\mathcal H^\ast}\Big|\norm{g}_X^2 - \norm{g}_E^2\Big| > \frac{1}{2}\norm{g}_E^2 + \frac{u^2}{2}\bigg) < \exp\bigg\{-\frac{Nu^2}{36C^2B^2T}\bigg\} \end{align*} for all $u \geq r_N$. Here $r_N > 0$ is a constant satisfying $J_5(r_N) \leq \frac{\sqrt{N}r_N^2}{6CB\sqrt{T}}.$ \end{lemma} Return to the proof. Since $\big|\!\big|\widehat \Delta_N\big|\!\big|_E > \delta_N$, we can obtain by combining all pieces with~\eqref{eqn:final_basic_inequality} that \begin{align*} 4\delta_N\big|\!\big|\widehat\Delta_N\big|\!\big|_E \stackrel{\textrm{(i)}}{\geq}\frac{1}{6}\big|\!\big|\widehat\Delta_N\big|\!\big|_X^2 - \frac{\log N}{N} - \frac{\log N}{2N} - \frac{2\log N}{N} \stackrel{\textrm{(ii)}}{\geq} \frac{1}{12}\big|\!\big|\widehat \Delta_N\big|\!\big|_E^2 - \frac{r_N^2}{2} - \frac{7\log N}{N} \end{align*} with at least probability given in~\eqref{eqn: tail_prob}. Here, (i) is by Lemma \ref{lem: order_of_ito} (taking $u=\delta_N$), Lemma \ref{lem: decoupling_err} (taking $u^2 = \frac{\log N}{N}$), Lemma \ref{lem: maximal_ineq_decoupling_err} (taking $u = \frac{\log N}{N}$), and Lemma \ref{lem: decoupling_err_Ito}, and (ii) is by Lemma \ref{lem: equivalence_norm} (taking $u = r_N$). This implies the desired bound~\eqref{eqn: converge_of_b}. \begin{comment} ==============(below to modify)================= \begin{remark} Even though $\mathcal H^\ast$ is a uniformly bounded function class, the Ito integral will still be an unbounded random variable. In order to derive a fast rate, we shall use localization to prove the sum of i.i.d.~Ito integral is sub-exponential, rather than prove the sub-Gaussianity directly with respect to $\norm{\cdot}_\infty$. \end{remark} \begin{remark} It is easy to show that $\norm{X}_{\psi_1} \lesssim \nu + \alpha$ for any sub-exponential r.v. $X$ with parameters $(\nu, \alpha)$. Therefore, the classic chaining argument of a empirical process with sub-exponential increments usually requires the control on both $L_\infty$-norm and $L_2$-norm (corresponding to $\norm{\cdot}_E$ in our paper), see e.g. \cite{viens2007supremum} and \cite{baraud2010bernstein}. Unlike the Dudley's entropy bound of maximal inequality of sub-Gaussian process, the first term in $J_1(u)$ will be the leading term in sub-exponential case. \end{remark} \end{comment} \acks{Xiaohui Chen was partially supported by NSF CAREER Award DMS-1752614. Yun Yang was partially supported by NSF DMS-1907316.}
\section{Introduction} Gravitational microlensing is a powerful technique for studying the populations of compact objects in the Milky Way. Crucially, it permits the study of bodies that emit little or no light. All that is required is the chance alignment of a foreground lens with mass $M$ and a more distance background source. In the case of perfect lens-source alignment an image of the source in a Einstein ring is formed with angular radius \citep{Chwolson1924,Einstein1936} \begin{equation} \theta_{\rm E} = \sqrt{\frac{4GM}{c^{2}}\pi_{\text{rel}}}, \end{equation} is formed. Here, $G$ is the gravitational constant, $c$ is the speed of light and $\pi_{\text{rel}}$ is the relative lens-source parallax ($\pi_{\text{lens}}-\pi_{\text{source}}$). In the case of imperfect lens-source alignment, two images of the source are formed. As the lens passes between the source and observer the source images change brightness and position giving rise to transient photometric \citep[e.g.][]{Refdal1964,Paczynski1986} and astrometric microlensing effects \citep[e.g.][]{Walker1995,DoSa,Belokurov2002}. In contrast to other methods, such as X-ray binary studies \citep[e.g.][]{Shao2020} and gravitational wave searches \citep[e.g.][]{Abbott2020}, it remains the only one sensitive to isolated stellar-mass black holes. The all-sky averaged microlensing optical depth, or probability that a microlensing event occurs at any instant, is low $\approx 10^{-7}$ \citep[e.g.,][]{EB,Specht2020}. Therefore, microlensing searches require long-term monitoring of a large number of stars with time-series photometry. In the 1980s and 1990s, the advent of large sky surveys made it possible to propose and develop gravitational microlensing as a tool for finding dark compact objects \citep{Paczynski1986, Griest1991, Paczynski1996}. Since then, it has been applied in various searches of stellar-mass black holes~\citep[e.g.,][]{Ma02, Be02, Wyrzykowski2016}. Particularly, \cite{Wyrzykowski2020} have shown that the use of gravitational microlensing can overcome biases that other observing methods exhibit towards objects in specific evolutionary phases. Moreover, they argue that the apparent mass gap between the lightest known black holes ($\approx 5M_\odot$) and the heaviest known neutron stars of ($\approx 2 M_\odot$) can be explained with those biases. This was further explored in \citet{Mroz2021a} and \citet{Mroz2021b}, where a continuous remnant mass function derived from the analysis of OGLE-III events is presented. Finally, gravitational microlensing can be used for studying the putative population of primordial black holes~\citep{Ca16}, and exploring the viability of the remaining mass window $> 20M_{\odot}$~\citep{Gr16,Ka16, GB2018a, GB2018b}. While the majority of photometric microlensing events are currently detected towards the Galactic bulge, they are predominantly found by monitoring surveys in the optical wavelengths \citep[e.g.][]{Udalski2015, KMTnet2016}. This limits the search region for events to an annulus around the bulge where the interstellar extinction along the line of sight is low enough to detect events in the optical, yet the background source density is high enough for lensing to be likely \citep[e.g.][]{Wyrzykowski2015, Mroz2019}. The innermost regions of the bulge, where the microlensing event rate is high~\citep{Gould1995,EB}, are obscured by dust in the optical. This means that populations of massive black holes expected to reside in the Galactic plane are currently off limits to optical microlensing surveys \citep{Jonker2021}. Monitoring sources in the near-infrared (NIR), however, overcomes the limitation of avoiding the Galactic plane and allows us to see through the dust. The United Kingdom Infrared Telescope (UKIRT) microlensing survey \citep{Shvartzvald2017} first surveyed the inner regions of the bulge in the NIR. UKIRT monitored an $\approx10$ square degree patch of sky between J$2015$-J$2016$ close to the Galactic plane ($b\approx0^{\circ}$) and reported five highly extincted events missed by optical surveys. Leveraging the high event rate in the NIR \citet{Navarro2017} pioneered the use of $K_{s}-$band photometry from the VISTA Variables in the Via Lactea (VVV) survey \citep{Minniti2010} and found $182$ events in the innermost regions of the bulge. Next \citet{Navarro2018Longitude,NavarroLatitude,NavarroForesaken} extended the search for events in the VVV along a longitude strip along $b\approx0^{\circ}$ and a latitude strip along $l\approx-1^{\circ}$ finding $\approx 600$ events. \cite{NavarroFarDisk} also reported events with a source in the far disk. Due to a search method that mainly relied on visual inspection of light curves Navarro only searched only a small section of the entire VVV footprint. Building on Navarro et. al's work, \cite{Husseiniova2021} developed a scalable machine learning algorithm to extract microlensing events over the entire VVV survey. \cite{Husseiniova2021} found $1959$ events with this method and highlighted the need for a Bayesian analysis to characterise their often sparsely sampled signals. Finally, astrometry from the VVV in combination with Gaia data \citep{GDR22018} was used to search for predictable microlensing events \citep{Refdal1964} towards the Galactic bulge \citep{McGill2019b}. In a standard microlensing event \citep{Paczynski1986}, the only measurable parameter with physical significance is the timescale $\tE$. This is related to the lens mass $M$ through \begin{equation} \tE = \frac{\sqrt{\kappa\pi_{\rm rel} M}} {\murel} = \frac{\theta_{\rm E}} {\murel} \label{tE} \end{equation} where $\kappa\approx8.14\text{mas}/M_{\sun}$ and $\pi_{\rm rel}$ and $\murel$ are the lens-source relative parallax and proper motion respectively~\citep{Gould2000, Rybicki2018}. As there is typically no information about the parameters $\pi_{\text{rel}}$ and $\mu_{\text{rel}}$, mass measurement in a lensing event proves a difficult task. Although it is estimated that black holes should be responsible for 0.8\% of lensing events (and stellar remnants in general for 20\%) \citep{Gould2000b}, there are still no confirmed black hole detections from microlensing so far. A highly probable candidate has been reported very recently by \citet{Sahu2022} and \citet{Lam2022}, but its nature remains uncertain. There are several effects observable for atypical lensing events that allow for introducing additional information tied to physical parameters of the lens \citep{Evans2003}. One such effect is the parallax deviation. The standard \citet{Paczynski1986} microlensing lightcurve assumes that the relative motions between observer, lens and source are all uniform and linear; this gives rise to a lightcurve symmetric about the peak. However, the Earth-based observer revolves around the Sun causing an acceleration effect \citep{Alcock1995}. These parallax effects break the symmetry of the lightcurve, leading to mild asymmetries~\citep[e.g.,][]{Ma02,Be02,Po05,Wyrzykowski2016} or even spectacular multiple peak behaviour~\citep[e.g.,][]{Sm02, Kruszynska2021}. Fitting a lensing model with parallax allows us to measure the microlensing parallax vector $\boldsymbol{\pi}_{\rm E}$, defined in~\citet{Gould2004} to have a value of \begin{equation} |\boldsymbol{\pi}_{\text{\rm E}}|=\piE = \sqrt{\frac{\pi_{\rm rel}}{\kappa M}} = \frac{\pi_{\rm rel}}{\theta_{\rm E}} \label{piE}, \end{equation} and the direction of the relative motion of the lens with respect to the source. Measurement of the $\pi_{\text{\rm E}}$ value is a powerful way to impose additional constraints on the mass of the lens, leaving two observables and three unknowns in eqs~(\ref{tE}) and (\ref{piE}). The direction of relative motion also allows for putting additional constrains on the kinematics of the lens. The measurement of $\theta_{\rm E}$ would allow to solve the problem of determining the lens mass entirely; some possible methods are described in \citet{Lee2017}. With current observational possibilities, so far it has only been possible for several rare events -- namely, image resolution with interferometry for extremely bright events \citep{Dong2019, Cassan2021}, or astrometry for known, extremely nearby lenses \citep{Sahu2017, Zurlo2018}. In the case of astrometric lensing, the light center of images of the source gets deflected away from the position of the lens, and measurement of those deflections can be directly tied to $\theta_{\rm E}$ \citep{DoSa}. \citet{Lam2020} have demonstrated that among events with the highest astrometric deviations ($\gtrsim$0.2 mas), the majority should be caused by dark remnants and especially black holes, both because of their high mass and lack of blending with lens light, which lowers the observed signal. A detection of astrometric deviation caused by an unknown, dark lens has been done for the first time, with HST imaging over six years, very recently by \citet{Sahu2022} and \citet{Lam2022} -- but there is still significant tension in the mass measurements and, in conclusion, the true nature of this object (black hole/neutron star). The angular Einstein radius can also be derived by resolving the lens and the source years after the maximum approach (or before it - for predicted events) and measuring the relative lens-source motion, as $\theta_{\rm E} = \murel \tE$ \citep[e.g.][]{Kozlowski2007, McGill2018, McGill2019}. However, it requires a very long ($\approx$10 years) coverage of observations, and is only possible for a luminous lens, which makes this method not feasible in the search for dark remnants. Alternatively, one can use distributions of motions and distances in the Galaxy, together with the $t_{\rm E}, \vec{\pi_{\rm E}}$ measurements, to statistically infer the probability distributions of lens mass and distance. This is the approach outlined in \cite{Wyrzykowski2015} and \cite{Wyrzykowski2020}, which we adapt in this work with some modifications. In this paper, we examine the \cite{Husseiniova2021} sample of 1959 microlensing events with an annual microlensing parallax model. For the first time, we apply a nested sampling algorithm to automatically and fully characterise the posterior distributions of parameters of the annual microlensing parallax signal. We then use this model in combination with VVV astrometry to identify candidate events caused by dark lenses. First, we briefly outline the reduction of VVV photometric and astrometric data used in this study. We then detail the annual parallax microlensing model and explain how we fit it to the VVV photometry. Next, we detail how we obtain an astrometric solution of the source from the VVV astrometric time-series data, and use it together with the photometric model results to determine whether an event was caused by a dark lens building on the work of \cite{Wyrzykowski2015} and \cite{Wyrzykowski2020}. Finally, we present our analysis of a set of dark lens candidates and discuss implications for future NIR microlensing surveys of the Galactic bulge with the Roman Space Telescope (RST). \section{VVV photometry and astrometry} The VVV survey and its temporal and spatial extension the VVVX survey comprise nearly a decade of near-infrared observations of the Galactic bulge and southern Galactic plane. Both surveys utilise the VISTA Infrared Camera (VIRCAM) on the Visible and Infrared Survey Telescope for Astronomy (VISTA), for which \citet{sutherland15} provide more detail. Observations are initially processed by the Cambridge Astronomical Survey Unit (CASU) VISTA data flow system described by \citet{vdfs}. Our analysis is based solely on those covering the region $|l|<10,~ -10<b<5$, i.e. the region of the Galactic bulge covered by both the VVV and VVVX surveys for which we have the highest density and longest temporal baseline of observations. The selected observations were processed by the prototype VVV Infrared Astrometric Catalogue version 2 (VIRAC2, see \citealt{virac} for details of version 1) pipeline to produce calibrated astrometric and photometric time series of individual stars. Full details of the VIRAC2 pipeline and catalogue is outside the scope of this paper, and will be provided by Smith et al. (in prep). To briefly summarise: Object detection in each observation is performed using a modified version of the DoPHOT package \citep{dophot1,dophot2}, which provides psf fitting based flux and centroid measurements; Astrometric calibration of the observations is then performed through the fitting of Chebyshev polynomials mapping array positions of stars also present in the Gaia catalogue (originally DR2 \citet{GDR22018}, more recently eDR3 \citet{GEDR32021}) to their Gaia positions propagated to the epoch of the VVV/VVVX observation using their 5-parameter Gaia astrometry; A novel, iterative star identification algorithm is then used to track detections of individual stars between epochs. By this point in the pipeline we have a reasonably complete and clean list of stars and their calibrated astrometric time series, but their photometric time series are instrumental only. To rectify this, we employ a calibration method inspired by the "uber-calibration" approach of \citet{ubercal}. We take advantage of the overlaps in VIRCAM observations necessary to provide continuous spatial coverage to globally optimise a set of survey zero-points (one per bandpass), a set of per-bandpass per-detector per-observation photometric offsets (which take into account changes in mirror reflectivity, weather conditions, and other time-variable effects), and a per-bandpass per-detector illumination map (which takes into account local pixel scale, defective chip regions, and other highly localised effects). Since temporally variable photometric offsets are unaccounted for on scales smaller than a detector, we identified coherent structures in the offsets of individual observations of stars from their survey-average photometry, which we suspect are caused by atmospheric effects. To try to correct for these, and hence reduce their contribution to light curve scatter, we employ a further calibration stage which fits Chebyshev polynomials mapping single-epoch photometry to survey-average photometry\footnote{Details of this final photometric calibration refinement stage are available at \href{https://github.com/leigh2/coherent_residual_mapper}{github.com/leigh2/coherent\_residual\_mapper}.}. \begin{table} \centering \begin{tabular}{lll} \hline parameter & prior & unit \\ \hline $t_{\rm E}$ & uniform(0,1000) & days \\ $u_0$ & uniform(-2, 2) & $\theta_{\rm E}$ \\ $f_{\text{s}}$ & uniform(0,1.1) & - \\ $t_{0}$ & uniform($t_{\text{min}}$, $t_{\text{max}}$) & days \\ $m_{0}$ & uniform($m_{50}$ - 0.5, $m_{50}$ + 0.5) & $K_{s}$-band mag \\ $\pi_{\text{EN}}$ & uniform(-3,3) & $\theta_{\rm E}$ \\ $\pi_{\text{EE}}$ & uniform(-3,3) & $\theta_{\rm E}$ \\ \end{tabular} \caption{Priors used in the modelling of events. $t_{\text{min}}$ and $t_{\text{max}}$ are the minimum and maximum epochs for which brightness of the event was measured in VVV, and $m_{50}$ is median magnitude during the entire coverage. Priors used for $t_{\rm E}$, $u_0$, $f_{\text{s}}$, and $t_{0}$ $m_0$ were the same for the parallax and non-parallax models, while $\pi_{\text{EN}}$ and $\pi_{\text{EE}}$ were used only in the parallax model. Our prior for $f_{\text{s}}$ allows for small amount of negative blending which is possible due to systematics in the DoPHOT \citep{dophot1,dophot2} processing pipeline \citep{Smith2007} used in the VVV data reduction.} \label{table:priors} \end{table} \section{Methods} \subsection{Light curve modelling} \label{sec:LCmodelling} In this paper, we fit two different point source, point lens microlensing models to the light curve data. The first assumes the standard \cite{Paczynski1986} rectilinear lens-source trajectory parameterisation \begin{equation} \boldsymbol{u}_{\text{lin}}(t) = \boldsymbol{u_{0}} + \frac{t-t_{0}}{t_{\rm E}}\boldsymbol{ \hat{\mu}}_{\text{rel}}. \label{linear_traj} \end{equation} Here, $\boldsymbol{u_{0}}$ is the normalised lens-source angular separation vector with direction towards the source position, $t_{0}$ is the time of lens-source closest approach, $t_{\rm E}$ is the Einstein timescale, and $\boldsymbol{\hat{\mu}}_{\text{rel}}$ is the unit vector in the direction of the relative lens-source proper motion. The second is an annual parallax model, which additionally takes into account the observer's acceleration around the Sun. We use the \cite{Gould2004} geocentric conventions and parameterisation. In this, the lens-source normalised separation is given by the sum of $\boldsymbol{u}_{\text{lin}}$ and an offset term, \begin{equation} \boldsymbol{u}_{\text{par}}(t) = \boldsymbol{u}_{\text{lin}}(t) + \boldsymbol{\pi}(t; \boldsymbol{\pi}_{\rm E}). \label{par_traj} \end{equation} Here, $\boldsymbol{\pi}_{\text{\rm E}}= \pi_{\text{EE}}\hat{\boldsymbol{\rm E}} + \pi_{\text{EN}}\hat{\boldsymbol{n}}$ is the microlensing parallax vector with components $\pi_{\text{EE}}$ and $\pi_{\text{EN}}$ in the local north ($\boldsymbol{\hat{n}}$) and east ($\boldsymbol{\hat{\rm E}}$) directions. The Sun's positional offset terms needed for $\boldsymbol{\pi}(t; \boldsymbol{\pi_{\rm E}})$'s computation \citep[detailed in][]{Gould2004} were retrieved using the astropy PYTHON package \citep{Astropy2013, Astropy2018}, which uses values computed from NASA JPL’s Horizons Ephemeris\footnote{\url{https://ssd.jpl.nasa.gov/horizons/}}. We expanded the \cite{Gould2004} parallax trajectory approximation around the posterior median $t_{0}$ of the previous rectilinear fit obtained in \cite{Husseiniova2021} for each event. For a given trajectory model $\boldsymbol{u}_{\mathcal{M}}(t)$ and under the point source, point lens assumption the amplification of the unresolved source images is \citep[e.g.][]{Paczynski1986}, \begin{equation} A_{\mathcal{M}}(t) = \frac{u_{\mathcal{M}}^{2}(t)+2}{u_{\mathcal{M}}(t)\sqrt{u_{\mathcal{M}}^{2}(t)+4}}. \label{pspl_amp} \end{equation} Here $u_{\mathcal{M}}^{2}(t)=|\boldsymbol{u}_{\mathcal{M}}(t)|$ is the magnitude of the normalised lens-source separation vector. Assuming some non-zero amount of blended light not from the source (from the lens or otherwise), the observed magnitude of the lens-source blend is \begin{equation} m_{\mathcal{M}}(t;\boldsymbol{\theta}) = m_{0} - 2.5\log_{10}\left[f_{\text{s}}A_{\mathcal{M}}(t) + (1 - f_{\text{s}})\right]. \end{equation} where the blending parameter $f_{\text{s}}$ is the fraction of light that is contributed by the source, and $\boldsymbol{\theta}$ is the vector of model parameters. The standard rectilinear model has five parameters, namely $\boldsymbol{\theta}=[t_{\text{\rm E}}, u_{0}, t_{0}, m_{0}, f_{\text{s}}]$. The inclusion of parallax gives a seven parameter model $\boldsymbol{\theta}=[t_{\text{\rm E}}, u_{0}, t_{0}, m_{0}, f_{\text{s}}, \pi_{\text{EE}}, \pi_{\text{EN}}]$. Here, $u_{0}=|\boldsymbol{u_{0}}|$ is the magnitude of the minimum lens-source normalised separation vector. Let $D_{i}=\{t_{i},m_{i}, \sigma_{m_{i}}\}$ be a data point, comprising a time of observation $t_{i}$, observed magnitude $m_{i}$, and magnitude error bar $\sigma_{m_{i}}$. Let a light curve for a given event be denoted as $\mathcal{D}=\{ D_{i} \}_{i=1}^{n}$ and be the set of $n$ data points. Under the assumption that $t_{i}$ is known perfectly for each $D_{i}$ and the data are scattered with independent Gaussian noise with variance $\sigma^{2}_{m_{i}}$, the log likelihood for a light curve given a particular model ${\mathcal{M}}$ is, \begin{equation} \ln p(\mathcal{D}|\boldsymbol{\theta},\mathcal{M}) = -\frac{1}{2}\boldsymbol{r}^{T}\textbf{\textsf{K}}^{-1}\boldsymbol{r}-\frac{1}{2}|\textbf{\textsf{K}}| - \frac{n}{2}\ln2\pi. \label{eq:log_like} \end{equation} Here $\textbf{\textsf{K}}=\text{diag}(\sigma^{2}_{m_{1}},..,\sigma^{2}_{m_{n}})$ is an $n\times n$ diagonal covariance matrix, and $\boldsymbol{r} = \left[m_{1}-m_{\mathcal{M}}(t_{1};\boldsymbol{\theta}),...,m_{n}-m_{\mathcal{M}}(t_{n};\boldsymbol{\theta})\right]^T$ is a vector of length $n$ and is the residual between the model and data. With the likelihood for the two models in hand, the posterior distribution of the model parameters is given by Bayes theorem as \begin{equation} p({\boldsymbol\theta}|\mathcal{D}, \mathcal{M}) = \frac{p(\mathcal{D} |{\boldsymbol\theta}, \mathcal{M})p(\boldsymbol{\theta}| \mathcal{M})}{p(\mathcal{D}|\mathcal{M})} \label{eq:bayes} \end{equation} Here, $p(\boldsymbol\theta| \mathcal{M})$ is the prior distribution of the model parameters, while \begin{equation} p(\mathcal{D}|\mathcal{M}) = \int_{\Omega_{\boldsymbol{\theta}}} p(\mathcal{D}|\boldsymbol{\theta},\mathcal{M})p(\boldsymbol{\theta}| \mathcal{M})d\boldsymbol{\theta}, \label{eq:evidence} \end{equation} is the Bayesian evidence, or the probability of the data given the model, while $\Omega_{\boldsymbol{\theta}}$ is the space of all possible parameter values. In this study, our strategy for both models is to choose weakly informative priors for all parameters that constrain their values to reasonable areas of the parameter space. The priors are listed in Table \ref{table:priors}. The prior factorises over all the model parameter for both models. To characterize the parameter posterior distributions, we use nested sampling. We choose this sampling method motivated by its advantage over traditional Monte Carlo Markov Chain (MCMC) approaches \citep[e.g.][]{Foreman-Mackey2013} when handling multi-modal distributions. This is important for microlensing events found in the VVV because of the typically sparse sampling of the microlensing signals, which can result in multi-modality for microlensing parameters even in the rectilinear trajectory model \citep[see e.g. Figure 12 of ][]{Husseiniova2021}. Crucially, nested sampling also allows the characterisation of the (at least two-fold) degeneracy in the parallax trajectory model. With the addition of the parallax deviation, the positive and negative $u_{0}$ solutions are no longer completely indistinguishable but yield a pair of related solutions. Physically, we do not know on which side the source passes the lens, so positive $+u_{0}$ and negative $-u_{0}$ solutions arise, yielding roughly opposite $\vec{\pi_{\rm E}}$ directions~\citep{Sm03}. Moreover, some events are subject to further jerk-parallax degeneracies and have four different solutions, as described in detail in \cite{Gould2004}. In previous analyses of microlensing parallax events, MCMC has been used to characterise the parameter posterior distributions \citep[e.g.][]{Wyrzykowski2016, Wyrzykowski2020,Golovich2020}. For example, the parallax lensing event Gaia18cbf has been recently analysed by \cite{Kruszynska2021}, who found three possible solutions using \textit{Gaia} data alone, and two possible solutions with follow-up. In most studies \citep{Wyrzykowski2016, Wyrzykowski2020, Kruszynska2021}, the modes of the posterior are sampled and analysed separately, yielding alternative solutions for lens mass and distance. A possible disadvantage is not returning the relative probability of those solutions and only using $\chi^2$ as an indicator of weak preference towards one of the solutions. Additionally, human supervision is needed to set relative boundaries between MCMC solutions, which requires significant time and effort to analyse larger candidate samples. Alternatively, \cite{Golovich2020} chose to only sample the $u_0>0$ solutions. In contrast to previous work, nested sampling has the advantage of allowing us to characterise all posterior modes and propagate all uncertainty downstream in our analysis. A proof of concept in application to a binary microlensing event can be seen in \cite{Sharan2019}. Without the need to apply arbitrary cuts in order to separate solutions, we are able to fully automate the modelling and greatly reduce the time and effort needed to provide results for parallax and non-parallax models for all sources, while still sampling the entire parameter space. Given the relatively large size of the sample (1959 events), this is a significant improvement. Finally, nested sampling also has the advantage of being able to compute an estimate for the Bayesian evidence in eq.~(\ref{eq:evidence}). This quantity provides a metric that we use to compare the fit of the linear and parallax trajectory models, which naturally penalises the increased complexity and flexibility of the parallax trajectory model to fit the data. We fit all $1959$ events from the \cite{Husseiniova2021} sample to the linear and parallax trajectory model using the dynamic nested sampling algorithm \citep{Higson2019} implemented by \citet[][the {\tt dynesty} code]{DYNESTY}. We use random walk sampling \citep{Skilling2006} with multiple bounding ellipsoids, and with $1\,000$ initial live points. We adopt a stopping criteria in the remaining fractional evidence of $0.01$, and allocate $100$ per cent of weight on computing the posterior distributions. For the final 4 selected candidates, to ensure good accuracy in the following lens mass-distance inference, we perform a re-run with higher resolution, with $5\, 000$ initial live points and a stopping criterion in the remaining fractional evidence of $0.001$. \subsection{Dark lens probability \label{DarkLensCode}} To estimate the lens mass and distance, we need to compute the posterior distribution of microlensing parameters, given the lightcurve and the proper motion of the source. We employed the method described in \cite{Wyrzykowski2016} and \cite{Mroz2021a}, which we briefly summarize here. The underlying Galactic model has both a bulge and disc lens population. The deflectors can lie in a double exponential thin or thick discs or in the bulge itself. The intrinsic velocity distributions are all Gaussians with fixed dispersions and means. The mass function of the lenses is a power-law. In \cite{Mroz2021a}, the source distance is fixed to 8 kpc. Here, we allow a distribution of source distances. This is motivated by the nature of our near-infrared data, which allows us to partially see through the central regions of the Galaxy. The new modification allows for the possibility of source stars belonging to different stellar populations, either in the Galactic bulge or outside it in the disc. The {\tt Dark Lens} code assumes that the entire blended flux is being contributed by the lens. We do not consider the scenario where a third (background) star is also partially contributing to the observed flux. This assumption imposes stronger cuts on the prospective dark remnant candidates, and results in a lower estimate on the dark lens probability. As we do not know the distance to the lensing objects, which can lie anywhere in the Galaxy along the line of sight to the source, there is some uncertainty about the impact of extinction on the flux from the lens. We constrain the probabilities assuming this extinction to lie between zero and the extinction at the distance of 8 kpc in the source direction. This gives an upper and lower limit respectively to the probability of the lens being a dark remnant. For the lower limit, we use the extinction maps for the VVV to obtain values appropriate for the K$_s$-band for the healpix containing the candidates. For each event, the code uses the microlensing model parameters with their scatter, the proper motion of the source and assumed distance of the source in order to derive the probability density for mass and distance of the lens. For each combination of parameters, we obtain a probability density in the mass-distance space. Moreover, for each combination of the lens mass, distance and blending parameter, we compute the expected brightness of a Main Sequence star and compare it with the observed amount of light computed from the baseline magnitude and the blending parameter. The integral of the probability density for the dark lens divided by the total integral of the probability density in the blending space defines the dark remnant probability for an event. \begin{figure} \includegraphics[width=\columnwidth]{unchanged_fits_updated.png} \includegraphics[width=\columnwidth]{changing_fits_updated.png} \caption{Upper: Masked (dashed) and unmasked (dotted) fits of 2D proper motions for 18 sources for which the proper motions are not changed significantly between fits (are within 1$\sigma$ of each other). Each colour corresponds to a different source. Lower: The same, but for the 3 sources for which the proper motions do change significantly between fits.} \label{fig:unchanged_fits} \end{figure} \begin{figure*} \includegraphics[width=1.8\columnwidth]{9130982036040_dual_corner_rerun.png} \caption{Main figure: Corner plot of posterior distributions of lensing parameters for the parallax and non-parallax models for event VVV-2013-BLG-0324. Top right: Lightcurve of the lensing event VVV-2013-BLG-0324. Boundaries of shaded regions represent the 10th and 90th percentiles for the non-parallax and parallax models. Residuals are plotted with respect to the median of the non-parallax model.} \label{fig:event1_corner_LC} \end{figure*} \begin{figure*} \includegraphics[width=2\columnwidth]{lens_mass_distance_all_rerun.png} \caption{Analysis of the possible physical parameters of the lens in all events. Each subplot consists of a probability density plot for the mass and distance of the lens (top) and a comparison of the light expected from a luminous main sequence lens located at this mass and distance and the blend light observed in the event (bottom). The white lines mark the boundary between a dark remnant and a main sequence star in case of no extinction (solid) and extinction equal to that at 8 kpc (dashed). The subplot for VVV-2012-BLG-0440 also includes two red dotted lines marking that boundary for extinction at the median lens distance for each (disk and bulge) solution.} \label{fig:mass_distance} \end{figure*} \section{The Candidates} \subsection{Events with strong parallax signal} \label{initial_selection} For each of the 1959 microlensing events in \citet{Husseiniova2021}, we calculate the Bayes factor: \begin{align} K = \frac{p(\mathcal{D}|\mathcal{M}_{\rm par})}{p(\mathcal{D}|\mathcal{M}_{\rm lin})} \end{align} to select those for which the parallax model is strongly preferred. Here, $M_{\rm par}$ denotes the parallax model and $M_{\rm lin}$ the non-parallax model. To obtain $P(D|M)$, we use the log-likelihoods directly provided within the nested sampling results from {\tt dynesty}. After applying the cut of $K>100$, we are left with 176 events. The lightcurves of these events, together with their fits provided by both non-parallax and parallax modelling, were then inspected visually by three of the authors. They were scored as -1 (no), 0 (unsure) or 1 (yes). Events typically voted as -1 contained incomplete data, where the model usually contained very sharp brightness changes in gaps between datapoints that were impossible to verify. Events voted as 0 were considered consistent with the parallax model but still had low cadence of observations, gaps in critical regions of the lightcurve or very high scatter, making it hard to constrain the model. Events voted as 1 were the ones with a well-defined parallax lensing model for the lightcurve. With a threshold of total score $\geq$ 0, we select the final set of 21 events for further analysis. Though the rejected subset might still contain interesting events, it is impossible to obtain useful information about them due to the limitations of the dataset. We remark that selecting events with clear parallax signal does introduce a bias in favour of nearby and low-mass lenses. \citet{Lam2020} demonstrated that events caused by BHs naturally reside within the large $t_{\rm E}$ and low $\pi_{\rm E}$ region of the parameter space, and proposed a selection criterion of $t_{\rm E} > 120$ days and $\pi_{\rm E} < 0.08$. A non-detection of parallax effect in the lightcurve can therefore also be used as an indicator of a high lens mass \citep[e.g.][]{Karolinski2020}. However, without the additional information from accurately measuring ${\boldsymbol \pi}_{\rm E}$, it is difficult to constrain the lens mass-distance distribution and prospects for determining the nature of the lens are limited. \subsection{VVV astrometric solution \label{VIRAC2astrometry}} Here, we describe how to extract the positions and proper motions of the source from the VVV astrometry for our 21 candidates. We obtain astrometric time-series 2D data points for candidates from the preliminary VIRAC2 data. It is not feasible to use \textit{Gaia} data, as it is very incomplete in the heavily obscured regions towards the Galactic bulge covered by our sample. The standard pipeline performs 5-parameter ($\alpha_0, \delta_0, \mu_{\alpha*}, \mu_{\delta}, \pi$) fits to the time-series positional data. Our main requirement is a reasonable measurement of the source proper motion ($\mu_{\alpha*}, \mu_{\delta}$). However, the true parallax of the stars in our sample is likely to be significantly smaller than the astrometric uncertainties. To avoid overfitting to noise, we refit the time series astrometry using a 4-parameter ($\alpha_0, \delta_0, \mu_{\alpha*}, \mu_{\delta}$) straight line fit. Both the high source densities in Galactic plane fields in the near-infrared and the variable nature of ground-based observation quality can impede associations of individual detections with unique stars. To cope with erroneous data points, the astrometry fitting algorithm measures residuals using 5-fold cross validation, rejects outlying data points at the level of 5$\sigma$, and then refits using all remaining data points. Care is taken to avoid the impact of astrometric lensing on our fitting of the proper motions of the sources, although such signals will generally be subtle. Our main point of concern is that the data points at the maximum approach of the lens and the source, where the motion from a changing astrometric deflection is the most influential, are amplified and therefore might dominate the proper motion due to their generally improved astrometric precision. To investigate this, we compare `masked' and `unmasked' fits. The masked fits are obtained having rejecting all data points that had epochs corresponding to $u <3$ (the $u$ value used in this criterion was the median of $u$ values obtained from the parallax model samples). The unmasked fits uses all data points available. As shown in Fig.~\ref{fig:unchanged_fits}, the majority of sources in our sample have similar results for the masked and unmasked fits. However, 3 candidates show significant (>1$\sigma$) differences between the two. The changing astrometric solutions are not in themselves an indication of a lensing signal. The 3 sources with changed solutions all have baseline magnitudes $K_{\rm s} > 16$. By contrast, only 2 of the 21 sources have a baseline $K_{\rm s}$ band magnitude above 16 and exhibited no significant change between astrometric solutions. Moreover, the error bars on the 'masked' fits for those sources are large. The change in fits could be either caused by lensing effects or by the high errors on the low-magnitude points remaining after the masking procedure, making it impossible to accurately fit the proper motions. Another potential explanation is the effect of blending with the lens or background sources. In case of significant blending, the observed positions and proper motions are a weighted (by fluxes) average of positions and proper motions of two or more luminous objects. However, when the source is amplified, the weights of this average change; at that time, the observed proper motion is closer to that of the source. Two of the three events in this group have very low blending parameters ($f_{\text{s}} = 0.08^{+0.04}_{-0.03}$ and $f_{\text{s}} = 0.20^{+0.16}_{-0.07}$), which is consistent with this hypothesis. If the assumption that all light is coming from either the source or the luminous lens were true, this would allow for using time-series astrometry to obtain a simultaneous fit of proper motions of the source and the lens. Using the measured relative proper motion $\mu_{\rm rel}$ in combination with $\tE$ obtained from the lightcurve would give $\theta_{\rm E}$ and completely solve the event, including the lens mass. However, all 3 events are situated in very crowded regions, close to the Galactic Centre. To carry out such an analysis, we must identify and account for all the objects influencing the observed position, including the lens and the background stars. This is in principle possible with high-resolution imaging. In the end, we decided to use the unmasked, non-parallax fits for all events as input into the {\tt Dark Lens} code described in \ref{DarkLensCode}. To ensure that we are still including the possibility of astrometric signal appearing, we tried simultaneous fitting of astrometry and photometry for those 3 objects. The attempts at simultaneous fitting did not lead to conclusive results with the low accuracy of VVV astrometric data being the limiting factor. Additionally, as shown recently by \citet{Sahu2022} and \citet{Lam2022}, even in case of highly accurate data there are very significant tensions between fit results favouring astrometric and photometric data. This leaves the necessity to conduct follow-up observations to completely exclude the possibility of impact of astrometric signal on the fits. \subsection{High dark lens probability events} With the astrometry in hand, we provide the outputs from the {\tt Dark Lens} code -- the mass, distance and dark lens probabilities -- for all 21 candidates in Table~\ref{table:allcandidates}. This table is also available in the online supplementary material. Additionally, we provide full astrometry and photometry for those events in Table \ref{table:samplephotometry} which is available in the online supplementary material. We find 8 candidates for which the probability of the lens (upper limit, or the case of zero extinction) being a dark remnant was calculated to be $>50\%$. None of those events have been identified by OGLE, and only one (VVV-2012-BLG-0440) occurs in the \citet{Navarro2017} sample. We then examined each candidate individually. For events with low $f_{\text{s}}$, the recovered astrometric solutions are not reliable. The inferred proper motions of the source are then heavily influenced by the proper motion of the blend (the lens or a background star). For this reason, we rejected 4 of those 8 dark remnant candidates: VVV-2015-BLG-0149, VVV-2012-BLG-0245, VVV-2012-BLG-0176, VVV-2012-BLG-0255. For the first two, the blending parameter values are rather well-constrained and very low, indicating that a large majority of the flux is contributed by the blend ($f_{\text{s}} = 0.08^{+0.04}_{-0.03}$ and $f_{\text{s}} = 0.20^{+0.16}_{-0.07}$ respectively). For the latter two, the distributions of $f_{\text{s}}$ are very wide and flat, spanning the entire parameter space of physically possible solutions ($f_{\text{s}} = 0.66^{+0.27}_{-0.32}$ and $f_{\text{s}} = 0.67^{+0.29}_{-0.33}$ respectively). We limit the final, high-probability dark remnant candidates to the remaining 4 events. We re-run the modelling for those candidates with higher resolution settings. All of them have $f_{\text{bl,median}} > 0.8$. One (VVV-2012-BLG-0440) has a bi-modal Gaussian-like distribution of the blending parameter. The remaining 3 all have a distribution of $f_{\text{s}}$ that is well-constrained and consistent with 1. \begingroup \renewcommand{\arraystretch}{1.4} \begin{table*} \caption{Results of running the analysis described in section \ref{DarkLensCode} on 21 selected events. Inferences on $f_{\text{s}}$, the lens mass, lens distance, and dark lens probability are shown. Median values with $84$th-$50$th percentile indicated as a superscript and $16$th-$50$th percentile indicated as a subscript are reported. The lower and upper bounds on the dark lens probability correspond to assumed extinction to the lens equal to that at 8 kpc for the position of the event on the sky and no extinction to the lens, respectively. Right ascension (RA) and declination (DEC) are from results of VIRAC \citep{virac} version $2$. Positions are on the International Celestial Reference Frame at epoch $2015.5$ Julian years, and were calculated using reference stars from Gaia Data Release 2. The $f_{\text{s}}$ inference from modelling the lightcurve is reported to indicate which solutions should be treated with caution because of high blending. Events highlighted in bold are analysed in detail, and values shown for them correspond to high-resolution re-runs (see last paragraph in Subsection \ref{sec:LCmodelling}).} \begin{tabular}{|l|c|c|c|c|c|c|} \hline Event ID & \multicolumn{1}{l|}{RA [deg] } & \multicolumn{1}{l|}{DEC [deg]} & \multicolumn{1}{l|}{$f_{\text{s}}$} & \multicolumn{1}{l|}{$M_{L}$ [$M_{\odot}$]} & \multicolumn{1}{l|}{$D_{L}$ [kpc]} & \multicolumn{1}{l|}{Dark lens probability [lower-upper]} \\ \hline VVV-2012-BLG-0245 & $271.0681752$ & $-19.3583881$ & $0.20^{+0.14}_{-0.07}$ & $0.50^{+0.28}_{-0.20}$ & $1.49^{+0.54}_{-0.50}$ & $0.940-0.947$ \\ VVV-2012-BLG-0255 & $269.0084262$ & $-21.994012$ & $0.67^{+0.29}_{-0.33}$ & $0.08^{+0.17}_{-0.06}$ & $0.65^{+0.96}_{-0.35}$ & $0.644-0.675$ \\ VVV-2014-BLG-0227 & $271.5624003$ & $-24.4531952$ & $0.08^{+0.05}_{-0.02}$ & $0.16^{+0.65}_{-0.13}$ & $0.96^{+0.62}_{-0.48}$ & $0.452-0.477$ \\ VVV-2012-BLG-0615 & $265.1067589$ & $-24.7612246$ & $0.89^{+0.14}_{-0.16}$ & $0.25^{+0.25}_{-0.12}$ & $3.30^{+1.19}_{-1.05}$ & $0.179-0.186$ \\ \textbf{VVV-2013-BLG-0460} & $\mathbf{269.9306299}$ & $\mathbf{-25.4220515}$ & $\mathbf{0.91^{+0.12}_{-0.21}}$ & $\mathbf{1.63^{+1.15}_{-0.70}}$ & $\mathbf{5.26^{+1.46}_{-1.36}}$ & $\mathbf{0.857-0.912}$ \\ \textbf{VVV-2013-BLG-0324} & $\mathbf{267.6871261}$ & $\mathbf{-26.8092714}$ & $\mathbf{0.98^{+0.08}_{-0.11}}$ & $\mathbf{1.46^{+1.13}_{-0.71}}$ & $\mathbf{0.78^{+0.51}_{-0.35}}$ & $\mathbf{0.991-0.995}$ \\ VVV-2015-BLG-0149 & $269.7239395$ & $-27.8991351$ & $0.08^{+0.04}_{-0.03}$ & $0.14^{+0.21}_{-0.08}$ & $0.30^{+0.18}_{-0.13}$ & $0.477-0.511$ \\ VVV-2013-BLG-0114 & $265.6348722$ & $-29.5219913$ & $0.73^{+0.25}_{-0.32}$ & $0.05^{+0.08}_{-0.03}$ & $1.15^{+0.77}_{-0.60}$ & $0.258-0.304$ \\ VVV-2012-BLG-0543 & $263.7554844$ & $-30.0823798$ & $0.69^{+0.28}_{-0.30}$ & $0.07^{+0.10}_{-0.04}$ & $1.91^{+1.19}_{-0.93}$ & $0.034-0.038$ \\ VVV-2012-BLG-0570 & $263.8670587$ & $-31.8542696$ & $0.46^{+0.30}_{-0.20}$ & $0.03^{+0.07}_{-0.02}$ & $2.86^{+1.83}_{-1.60}$ & $0.024-0.037$ \\ VVV-2013-BLG-0452 & $270.9247559$ & $-32.2202497$ & $0.15^{+0.04}_{-0.04}$ & $0.03^{+0.05}_{-0.02}$ & $0.53^{+0.42}_{-0.29}$ & $0.058-0.061$ \\ VVV-2013-BLG-0423 & $267.6273383$ & $-32.2718324$ & $0.84^{+0.16}_{-0.20}$ & $0.06^{+0.08}_{-0.03}$ & $0.85^{+0.76}_{-0.47}$ & $0.213-0.245$ \\ VVV-2012-BLG-0472 & $263.4082397$ & $-33.4860459$ & $0.24^{+0.18}_{-0.11}$ & $0.01^{+0.02}_{-0.01}$ & $0.98^{+0.83}_{-0.50}$ & $0.006-0.008$ \\ \textbf{VVV-2012-BLG-0440} & $\mathbf{262.0432834}$ & $\mathbf{-34.580735}$ & $\mathbf{0.81^{+0.09}_{-0.31}}$ & $\mathbf{0.73^{+0.52}_{-0.39}}$ & $\mathbf{3.70^{+3.69}_{-1.19}}$ & $\mathbf{0.216-0.555}$ \\ VVV-2012-BLG-0176 & $269.0632744$ & $-34.6781268$ & $0.66^{+0.27}_{-0.32}$ & $0.12^{+0.20}_{-0.09}$ & $1.07^{+0.63}_{-0.52}$ & $0.578-0.584$ \\ VVV-2013-BLG-0370 & $260.1191353$ & $-36.0826258$ & $0.76^{+0.22}_{-0.30}$ & $0.42^{+0.40}_{-0.28}$ & $3.52^{+2.34}_{-1.47}$ & $0.025-0.077$ \\ VVV-2013-DSC-0437 & $259.6928235$ & $-39.3839553$ & $0.46^{+0.31}_{-0.21}$ & $0.02^{+0.02}_{-0.01}$ & $0.84^{+0.57}_{-0.45}$ & $0.059-0.067$ \\ VVV-2015-DSC-0007 & $247.6672882$ & $-45.6782516$ & $0.62^{+0.29}_{-0.30}$ & $0.04^{+0.06}_{-0.03}$ & $1.75^{+1.16}_{-0.71}$ & $0.006-0.008$ \\ VVV-2013-DSC-0136 & $234.5936454$ & $-56.4009834$ & $0.69^{+0.25}_{-0.24}$ & $0.02^{+0.03}_{-0.01}$ & $1.23^{+0.98}_{-0.69}$ & $0.041-0.048$ \\ VVV-2013-DSC-0135 & $225.7477887$ & $-60.3183439$ & $0.85^{+0.17}_{-0.26}$ & $0.02^{+0.03}_{-0.01}$ & $1.50^{+1.54}_{-0.84}$ & $0.283-0.291$ \\ \textbf{VVV-2013-DSC-0541} & $\mathbf{193.5259103}$ & $\mathbf{-62.1339938}$ & $\mathbf{0.85^{+0.17}_{-0.21}}$ & $\mathbf{2.07^{+3.60}_{-1.27}}$ & $\mathbf{2.80^{+2.05}_{-1.52}}$ & $\mathbf{0.689-0.751}$ \\ \hline \end{tabular} \label{table:allcandidates} \end{table*} \endgroup \subsection{Best candidates} \begin{figure*} \includegraphics[width=1.8\columnwidth]{8991743038229_dual_corner_rerun.png} \caption{As Fig.~\ref{fig:event1_corner_LC}, but for event VVV-2013-BLG-0460.} \label{fig:event2_corner_LC} \end{figure*} \begin{figure*} \includegraphics[width=1.8\columnwidth]{11853370004856_dual_corner_rerun.png} \caption{ As Fig.~\ref{fig:event1_corner_LC}, but for event VVV-2013-DSC-0541.} \label{fig:event3_corner_LC} \end{figure*} \begin{figure*} \includegraphics[width=1.8\columnwidth]{9864101014402_dual_corner_rerun.png} \caption{As Fig.~\ref{fig:event1_corner_LC}, but for event VVV-2012-BLG-0440.} \label{fig:event4_corner_LC} \end{figure*} We now describe in detail the 4 remaining events. We discuss their most probable nature, show the limitations of the analysis that has been done so far and propose follow-up observations where needed. \subsubsection{VVV-2013-BLG-0324} Fig.~\ref{fig:event1_corner_LC} presents the lightcurves for the parallax and non-parallax models for this event, together with the corner plots for the fitted parameters. The blending parameter in the parallax model is estimated to be $f_{\text{s}} = 0.98^{+0.08}_{-0.11}$. So, there is no significant contribution to the observed light by the lens. The results of recovering the lens mass and distance distribution are presented in Fig.~\ref{fig:mass_distance}. The proper motions used for this analysis were $\mu_{\alpha} = 12.34 \pm 2.76 \textnormal{ mas/yr}$, $\mu_{\delta} = -0.46 \pm 2.47 \textnormal{ mas/yr}$. The lens is a very nearby ($D_{\rm L} = 0.78^{+0.51}_{-0.35}$ kpc) dark remnant -- most probably a neutron star ($M_{\rm L} = 1.46^{+1.13}_{-0.71} \ M_{\odot}$), though possibly a high-mass white dwarf or mass-gap object. The upper and lower estimates of dark lens probability are 0.995 and 0.991 respectively. This analysis was performed using the entire astrometric dataset. However, this source was one of the 3 whose proper motions changed after excluding the amplified points, as discussed in Section~\ref{VIRAC2astrometry}. There remains the possibility of astrometric lensing affecting our proper motion measurements, though this can be ruled out by astrometric follow-up of the source. With high-precision measurements of the position of the source long after the event took place, we would be able to confirm our values for the source. The alternative is also exciting. If there was a significant difference, we would have detected astrometric lensing through the proper motion anomaly. Knowing the true proper motion of the source, we could model the astrometric deviation in VVV data, as well as the photometry. Simultaneous astrometric and photometric modelling would enable us to measure $\theta_{\rm E}$ and solve the event completely, including the proper motion and mass of the lens. \subsubsection{VVV-2013-BLG-0460} In Fig.~\ref{fig:event2_corner_LC}, we present the results of the parallax and non-parallax models for this event. The blending parameter in the parallax model is estimated to be $f_{\text{s}} = 0.91^{+0.12}_{-0.21}$, indicating no significant contribution to the observed light by the lens. The results of recovering the lens mass and distance distribution are shown in Fig.~\ref{fig:mass_distance}. The proper motions used for input to {\tt Dark Lens} were $\mu_{\alpha} = -2.69 \pm 0.60 \textnormal{ mas/yr}$, $\mu_{\delta} = -0.31 \pm 0.58 \textnormal{ mas/yr}$. In this event, the lens is located at $D_{\rm L} = 5.26^{+1.46}_{-1.36}$ kpc. It is a dark remnant with a mass of $M_{\rm L} = 1.63^{+1.15}_{-0.70} \ M_{\odot}$ -- similarly to VVV-2013-BLG-0324, it is most likely to be a neutron star (though possibly a high-mass white dwarf or mass-gap object). The upper and lower estimates of dark lens probability are 0.912 and 0.857 respectively. However, the lens mass-distance distribution in Fig.~\ref{fig:mass_distance} is wide and includes the possibility of the lens residing either in the disc or the bulge. A possible worry with this object is its proper motion is relatively uncertain. Astrometric follow-up of this object would also be desirable to limit the solution to a smaller volume of the parameter space. \subsubsection{VVV-2013-DSC-0541} Although this event made it to the final sample based on its lightcurve and the dark lens probability, its true nature is not clearcut. The cornerplot for the parallax solution in Fig.~\ref{fig:event3_corner_LC} is untypical for a bona fide microlensing event, with an unusually long, loosely constrained timescale $\tE$. Distributions of $u_0$, $t_0$ are also exceptionally wide. The gaps between observation epochs are filled with multiple rises and falls; however, the lightcurve could also potentially be fitted with a very steep rise and slower fall characteristic of some types of intrinsic variables. Alternative explanations include a nova or a Be star. An argument in favour of the nova hypothesis is the near-IR colours of the source, which are typical for novae \citep[$j - h = 0.466$, $h - k = 0.242$;][]{Saito2013}. However, the lightcurve of the object shows a slow rise over a long timescale ($\Delta K_{\rm s} = 0.2$ mag over $\sim$ 100 days), compared to typical nova outbursts having timescales of hours/days for a 4-15 mag rise ~\citep{Str10}. The incompleteness of data, especially during the putative outburst peak and early decline, prevents us from making a more detailed analysis. Since the amplitude covered by the data is low, it is hard to discuss colour changes. ASAS-SN \citep[All-Sky Automated Survey for Supernovae,][]{Ko17} photometry of this source after the return to baseline (in the assumed microlensing scenario) shows further short-period variability at a level of $\sim$1 mag in the time window between 57500-59500 MJD. The lightcurves of Be stars can exhibit variability across a range of timescales from hours to decades. Periodicity on shorter timescales of hours to days is typically attributed to stellar pulsations, whilst outbursts and quasi-periodic oscillations are found on intermediate timescales of days to months, though durations of years do sometimes occur~\citep{LB17}. The presence of emission lines in the spectrum is the defining characteristic of this class of object class~\citep{Zo97}. They are believed to originate when either a rapidly rotating B star forms a decretion disc or when there is ongoing mass transfer from a companion through an accretion disc~\citep[see e.g.,][for more discussion]{Be}. Spectroscopic follow-up looking for emission lines can clarify the classification of this source. Given its inconclusive nature, we do not reject the possibility of this event being microlensing. The blending parameter in the parallax model is estimated to be $f_{\text{s}} = 0.85^{+0.17}_{-0.21}$, indicating no significant contribution to the observed light by the lens. The proper motions used for the analysis were $\mu_{\alpha} = -6.93 \pm 0.37 \textnormal{ mas/yr}$, $\mu_{\delta} = -0.60 \pm 0.41 \textnormal{ mas/yr}$. If the microlensing hypothesis is true, it is a relatively nearby, ($D_{\rm L} = 2.80^{+2.05}_{-1.52}$ kpc), rather high-mass ($M_{\rm L} = 2.07^{+3.60}_{-1.27} \ M_{\odot}$) remnant. The most likely mass corresponds to a neutron star or a mass-gap object, however the errorbars are large and include other possibilities as well. The upper and lower estimates of dark lens probability are 0.751 and 0.689 respectively. \subsubsection{VVV-2012-BLG-0440} This event was originally discovered by \citet{Navarro2017}. Fig.~\ref{fig:event4_corner_LC} shows the results of the parallax and non-parallax models for this event. The blending parameter in the parallax model is $f_{\text{s}} = 0.73^{+0.20}_{-0.30}$. The distribution of $f_{\text{s}}$ is clearly bimodal, with the preferred solution indicating no significant contribution to the observed light by the lens, though the subsidiary mode has the lens contributing the majority of observed light. The results of recovering the lens mass and distance distribution are presented in Fig.~\ref{fig:mass_distance}. The proper motions used for this analysis were $\mu_{\alpha} = -3.44 \pm 0.48 \textnormal{ mas/yr}$, $\mu_{\delta} = -4.85 \pm 0.50 \textnormal{ mas/yr}$. The recovered values are $D_{\rm L} = 3.70^{+3.67}_{-1.19}$ kpc and $M_{\rm L} = 0.73^{+0.52}_{-0.39} \ M_{\odot}$, with the upper and lower estimates of dark lens probability being 0.555 and 0.216 respectively. This makes the lens a white dwarf candidate, though it could also possibly be a dim main-sequence star. There are two distinct solutions: one centred on a higher-mass remnant in the disk and the other on a lower-mass one in the bulge. After separating them with a cut at $D_L = 6.5$, we obtain the resulting lens mass and distance: $D_{\rm L, disk} = 3.38^{+1.10}_{-1.01}$ kpc and $M_{\rm L, disk} = 0.83^{+0.49}_{-0.35} \ M_{\odot}$ for the disk solution; $D_{\rm L, bulge} = 7.77^{+0.27}_{-0.41}$ kpc and $M_{\rm L, bulge} = 0.31^{+0.25}_{-0.15} \ M_{\odot}$ for the bulge solution. The disk solution is strongly preferred, as the disk : bulge ratio of the total weight of samples in each subset is 4.3 : 1. As the source position is very close to the Galactic Centre, the extinction at 8 kpc is high. Due to many samples situated near the dark remnant -- main sequence border, and the uncertainty in drawing this boundary caused by a wide range of possible extinction values, there is a large difference between the upper and lower estimates of dark lens probability. As a way of dealing with this, we also plot two additional lines in Fig.~\ref{fig:mass_distance} as rough estimates of the boundary for extinction at the median distances for the disk ($D_{\rm L \ med, disk} = 3.38$) and bulge ($D_{\rm L \ med, bulge} = 7.77$) solutions, obtained by linear approximation. The highly blended solution cannot lead to reliable results. Specifically, if blending is very high, this is contradictory with the assumption that the proper motion fit obtained in Section~\ref{VIRAC2astrometry} is a good estimate of the true proper motion of the source. Redoing the analysis including only the low-blending samples with a cut of $f_{\text{s}} > 0.75$, we find that the bimodality of solutions shown in Fig.~\ref{fig:mass_distance} is not a consequence of blending. The removed high-blending samples have relatively very low weights and were not significantly impacting the solution. Restricting the input to only low-blending samples returns the same mass and distance distributions ($D_{\rm L} = 3.71^{+3.69}_{-1.19}$ kpc and $M_{\rm L} = 0.72^{+0.52}_{-0.38} \ M_{\odot}$). The lens mass -- distance and blend light -- lens light plots also remain visually unchanged, so we do not show them for low-blending samples separately. With the data available, we are not able to distinguish between the low blending case (that leads to the bimodal disk/bulge solution described above in detail), or the high blending case (in which we cannot study the event more closely, because we do not have reliable estimates of the source proper motion). The solution to this problem is to conduct high resolution follow-up observations aiming to either resolve the source and the luminous lens in the high blending case or confirm the low blending assumption with a non-detection of light from the lens at an expected threshold. Both of those results would be scientifically interesting, as one would give more evidence for the lens being a dark stellar remnant, and in the other, the lens-source relative proper motion $\mu_{\rm rel}$ could be measured and the event completely solved. \section{Conclusions} We carried out a search for dark lenses in the VISTA Variables in the Via Lactea (VVV) survey. Our tool of choice is parallax microlensing, in which the annual motion of the Earth is detectable via a distortion of the standard lightcurve. Measurement of the microlensing parallax imposes additional constraints on the mass of the lens, beyond standard microlensing. We report the results of using the nested sampling method to automatically fit simple and parallax microlensing models to a sample of 1959 candidate events. These were previously identified by \citet{Husseiniova2021} in a systematic search through 700 million VVV lightcurves. Given the low cadence and noise properties of the VVV, the use of nested sampling is not just desirable but essential to probe the degeneracies in the model fits. We use likelihoods of those fits to automatically identify candidates for parallax lensing events. By applying this method, we greatly reduce the time needed for conducting such an analysis. We apply reliable statistical measures for candidate selection, eliminate the need for human supervision, and automatically recover multimodal solutions and their relative likelihoods. This emphasises the advantage of our approach compared to the applications of Markov Chain Monte Carlo (MCMC) methods routinely used in previous works. We make the codes and data used in this search publicly available to use in future studies. This yields 176 events for which the Bayes factor strongly prefers the microlensing parallax model over standard microlensing. We then select a smaller subsample of 21 of the most promising events for further analysis. Here, a very modest amount of human intervention is required, though this is ameliorated by use of multiple assessors to judge the candidates. For these 21 events, we extract the position and proper motions of the source by refitting the VVV time series of positional data. This necessitates care to minimise contamination from the effects of astrometric microlensing itself. (Simultaneous microlensing fits to both the VVV astrometry and photometry were explored but the data quality were insufficient to yield definitive results.) With the source proper motions in hand, we use a model of the Galaxy with deflector populations in both Bulge and disc to derive the probability of the mass and distance of the lens given the microlensing model data. By computing the brightness of a main sequence star at the lens distance and comparing to the blending parameters of the photometric fit, we can estimate the probability of a dark lens~\citep{Wyrzykowski2016,Mroz2021a}. This gives us probability density plots for the lens mass and distance as well as the blend light and lens light. In the end, we obtain 4 candidates for parallax microlensing events caused by dark stellar remnants. The best candidate is a nearby ($D_{\rm L} = 0.78^{+0.51}_{-0.35}$ kpc) stellar remnant with a mass of $M_{\rm L} = 1.46^{+1.13}_{-0.71} \ M_{\odot}$. The second best is located at $D_{\rm L} = 5.26^{+1.46}_{-1.36}$ kpc and has a mass of $M_{\rm L} = 1.63^{+1.15}_{-0.70} \ M_{\odot}$. Both of those candidates are most probably neutron stars, though high mass white dwarfs remain still possible. For the remaining 2 candidates, limitations in the data prevent us from being more categorical in our assessments. One may be a relatively nearby ($D_{\rm L} = 2.80^{+2.05}_{-1.52}$ kpc), high-mass ($M_{\rm L} = 2.07^{+3.60}_{-1.27} \ M_{\odot}$) remnant. However, the blue colour and persistent baseline variability of the source -- as well as the inferences of microlensing parameters including the very wide distributions and an unusually long timescale -- suggest a Be star is also a viable possibility. The other is confidently a parallax microlensing event, but the lens may be dark or luminous. This is because the extinction at the source location close to the Galactic Centre is both high and uncertain. Follow-up observations can confirm the dark lens nature of our best candidates and recover their mass and distance more accurately. For example, NIR follow-up of these events with the {\it Hubble Space Telescope} (HST) can pin down the source of the blending, and perhaps even resolve the lens and source if they have had enough time to separate. The VVV data have low cadence relative to surveys dedicated to microlensing. This has limited our analysis and hence the certainty of our candidates. Future observatories and missions observing in the near infrared, in particular {\it The Vera C. Rubin Observatory} and {\it The Roman Space Telescope}, will provide much more precise photometry and astrometry and allow for identifying many more candidates in those regions of the Galaxy. To give an idea of the possibilities, we discuss a hypothetical event resembling our most promising candidate, as seen by {\it Roman}. We create mock photometric and astrometric data for this object, choosing the more preferred of the degenerate solutions ($u_0>0$). We take the median values of each parameter from the photometric parameter set ($t_{\text{\rm E}}, u_{0}, t_{0}, m_{0}, f_{\text{s}}, \pi_{\text{EE}}, \pi_{\text{EN}}$) for all $u_0>0$ samples as input values. We then calculate the remaining parameters needed to simulate astrometry. We use the median lens mass from all $u_0>0$ samples (1.4773 $M_{\odot}$) in the output of the {\tt Dark Lens} code to calculate the input value of $\theta_{\rm E}$ (from Equation \ref{tE}; $\theta_{\rm E} = \kappa M \pi_{\rm E}$). We also use the proper motions of the source obtained from the fits to VIRAC2 time-series data. We assume that the parallax deviation is to be attributed fully to the motion of the lens, and simulate a straight-line motion for the source. Finally, we take the reference position -- the position the source would be in at $t=t_{0}$, if there was no lensing -- to be (0,0). With this set of parameters, we simulate the photometry and astrometry of this event, and apply the typical {\it Roman} cadence \citep[][]{Gaudi2019}\footnote{\url{https://roman.gsfc.nasa.gov/galactic_bulge_time_domain_survey.html}}. {\it Roman} will observe fields in the Galactic Bulge in 72-day seasons; for the entire duration of each season, the cadence will be 15 minutes. There will be six seasons in total - three seasons, each separated by 1/2 year, at the beginning and similarly, three at the end of the mission, which will have a nominal length of 5 years. To fix the timescales so that the three first seasons happen during amplification, we take MJD = 56300 as a starting date for this observing pattern. The precision of those observations as a function of magnitude is not yet known, and will be analysed during the operations of the mission. We take the expected astrometric accuracy as 1 mas and photometric accuracy as 10 milli-mag~\citep[following][]{Penny2019, WFIRST2019, Gaudi2019}. These are values appropriate for $\approx$ 21 mag stars (in W149/$H_{AB}$ bands), which is very dim in comparison to our source ($K_s = 16.8$ at baseline). This implies {\it Roman} will be able to detect and study far more events than available to us now. We add Gaussian noise to astrometric position and magnitude at each epoch to create our mock dataset. \begin{figure*} \includegraphics[width=1.8\columnwidth]{mock_RST_tracks.png} \caption{Photometry and astrometry of the event VVV-2013-BLG-0324 as it would be seen by the future {\it Roman Space Telescope} mission (assuming one of our solutions). The angular Einstein radius $\theta_{\rm E}$ of the event in this simulation is 6.4 mas. Main figure: simulated lightcurve of the event. Top right: simulated astrometric track of the light center in the event. Dashed black lines represent the simulated true lightcurve and astrometric track, low-alpha dots with errorbars represent the mock {\it Roman} datapoints, and solid magenta lines represent 100 randomly chosen samples from the posterior distributions.} \label{fig:rst_astrom_photom} \end{figure*} \begin{figure*} \includegraphics[width=1.8\columnwidth]{mock_RST_corner_05_2sig.png} \caption{Corner plot of posterior distributions of photometric and astrometric lensing parameters resulting from modelling the mock data shown in Figure \ref{fig:rst_astrom_photom}. Contours indicate 1$\sigma$ and 2$\sigma$ levels. Green lines indicate true input values used for the simulation.} \label{fig:rst_fits} \end{figure*} We then perform a simultaneous fit to photometric and astrometric data, similarly to \citet{Rybicki2018}. Unlike \citet{Rybicki2018}, we also fit for the unknown reference position ($\Delta\alpha_{0}, \Delta\delta_{0}$). In our parametrisation, we use the geocentric parameter set ($t_{\text{\rm E}}, u_{0}, t_{0}, m_{0}, f_{\text{s}}, \pi_{\text{EE}}, \pi_{\text{EN}}$), with additional astrometric parameters ($\mu_{\text{SE}}, \mu_{\text{SN}}, \theta_{\text{E}}, \Delta\alpha_{0}, \Delta\delta_{0}$), for consistency with our methods described in 3.1. The nested sampling settings and priors were the same as in Table \ref{table:priors}, with the addition of priors for the astrometric parameters. We do not include separate fitting for astrometric deviations from straight-line motion of the source, which would introduce additional shifts at a $\leq 0.125$ mas level to the datapoints for a typical source situated in the Galactic Bulge. We present the results of this experiment in the following two figures: we show the simulated and fitted lightcurve and astrometric track in Fig.~\ref{fig:rst_astrom_photom}, and the posterior distributions in Fig.~\ref{fig:rst_fits}. \begin{table} \centering \begin{tabular}{lll} \hline parameter & prior & unit \\ \hline $\mu_{\text{SE}}$ & uniform(-15,15) & mas/yr \\ $\mu_{\text{SN}}$ & uniform(-15,15) & mas/yr \\ $\theta_{\text{E}}$ & uniform(0,10) & mas \\ $\Delta\alpha_{0}$ & uniform($\Delta\alpha_{\text{min}}$, $\Delta\alpha_{\text{max}}$) & mas \\ $\Delta\delta_{0}$ & uniform($\Delta\delta_{\text{min}}$, $\Delta\delta_{\text{max}}$) & mas \\ \end{tabular} \caption{Priors for additional astrometric parameters used in the modelling of the mock data. $\Delta\alpha_{\text{min}},\Delta\delta_{\text{min}}$ and $\Delta\alpha_{\text{max}},\Delta\delta_{\text{max}}$ are the minimum and maximum values found in the dataset.} \label{table:priors2} \end{table} We are able to accurately recover the true solution, breaking the degeneracy that is found in photometric microlensing alone. From the recovered distributions of $\theta_E = 6.382^{+0.040}_{-0.039}$, and $\pi_E = 0.53291 ^{+0.0066}_{-0.0068}$, we directly calculate the lens mass to be $M_{lens} = 1.4715 ^{+0.0095}_{-0.0096} M_{\odot}$, which is consistent with the input value of 1.4773 $M_{\odot}$ (all reported values are median values from all resulting samples, with 84th-50th percentile indicated as a superscript and 50th-16th percentile indicated as a subscript). The lens mass measurement, unlike the mass inference using the {\tt Dark Lens} code shown in this work, can now be done without any assumptions about the distance and velocity distribution for the lens, and from the astrometric and photometric data alone. We conclude that possibilities that will become available in the next decade will allow for studying a much larger sample of events, and conducting a much more advanced analysis. With simultaneous measurements of $\boldsymbol{\pi}_{\rm E}$ and $\theta_{\rm E}$, it will be possible to recover lens masses and proper motions in a straightforward way, and with a precision by far exceeding that of methods available today. \section*{Acknowledgements} We would like to thank Roberto Saito for help with understanding the nature of VVV-2013-DSC-0541. We would like to thank K. A. Rybicki for helpful discussions on the future {\it Roman} mission. We received a helpful report from the referee (Nicholas Rattenbury). \section*{Data Availability} The electronic table of parallax microlensing events with associated photometry and astrometry is published with this article as online supplementary material. The codes used for modelling photometry and astrometry of microlensing events are publicly available at \url{https://github.com/zofiakaczmarek/nested_ulens_parallax}. \bibliographystyle{mnras}
\section{Introduction} \label{sec:intro} The precise measurement of top quark interactions has been a cornerstone of the new physics search program at the Large Hadron Collider~(LHC). New physics effects can manifest themselves in the couplings of the top quark, and can be potentially probed via direct or indirect collider searches. While the ability of high energy colliders to probe new physics through strong top quark production has been well-established, electroweak top processes are only now being discovered for the first time. Future runs of the LHC will provide access to not only the cross section, but also the kinematics of such processes. This can give us a better handle on the electroweak couplings of the top quark. Non-standard top quark couplings have been widely explored in the literature~(c.f.~Refs.~\cite{PECCEI1991305, Zhang:1994fb, Dawson:1995wa, Zhang:2012cd} and references therein). A model-agnostic way to ask about potential deviations from the SM is to use effective field theory (EFT). The Standard Model effective field theory~(SMEFT)~\cite{WEINBERG1979327, BUCHMULLER1986621, Leung:1984ni, Brivio:2017vri} has become a standard tool for assessing the sensitivity of future LHC analyses to new physics, in a way that is independent of assumptions on the details of BSM states. The first basis of non-redundant dimension-6 operators, known as the Warsaw basis, was introduced in Ref.~\cite{Grzadkowski:2010es}. Building upon robust theoretical developments in SMEFT~\cite{Grzadkowski:2010es, Zhang:2013xya, Zhang:2014rja, Lehman:2014jma, Hartmann:2015oia, Ghezzi:2015vva, Gauld:2015lmb, Mimasu:2015nqa, Zhang:2016omx, BessidskaiaBylund:2016jvp, Maltoni:2016yxb, Alioli:2018ljm, Murphy:2020rsh, Li:2020gnx, Li:2020xlh}, a comprehensive exploration of the phenomenological aspects of higher dimension operators has been performed. Non-standard interactions in the Higgs and top sectors encoded by SMEFT operators have been actively scrutinized in the context of current LHC data and with regards to its future sensitivity~\cite{Degrande:2010kt, Degrande:2012gr, Rontsch:2014cca, Degrande:2014tta, Rontsch:2015una, Hartmann:2015aia, Englert:2015hrx, Azatov:2015oxa, Schulze:2016qas, Degrande:2016dqg, BessidskaiaBylund:2016jvp, Maltoni:2016yxb, Cirigliano:2016nyn, Alioli:2017jdo, Aguilar-Saavedra:2018ksv, Hartland:2019bjb, Banerjee:2020vtm, Araz:2020zyh}, often in conjunction with measurements at the Tevatron~\cite{D0:2012jgw} and electroweak precision tests at LEP~\cite{ALEPH:2005ab}~(c.f. Refs.~\cite{Ellis:2014dva, Ellis:2014jta, BuarqueFranzosi:2015jrv, Buckley:2016cfg, Cirigliano:2016nyn, deBlas:2016ojx, Biekoetter:2018ypq, Ellis:2018gqa, Ellis:2020unq, Ethier:2021bye}). In this work, we focus on the associated production of top quarks with a $Z$ boson at the high luminosity LHC~(HL-LHC: $\sqrt{s}=13~\mathrm{TeV}$, $\mathcal{L}=3~\mathrm{ab^{-1}}$) in the SMEFT framework with dimension 6 operators that affect electroweak top couplings. We consider production of top quark pairs, $pp \to t\bar{t}Z$, as well as single top quark-$Z$ associated production $pp \to tZj$. Both of these channels can be instrumental in probing the neutral current interactions of the top, but have so far remained limited by statistics. The inclusive cross-section for $pp \to t\bar{t}Z$ has been measured by the ATLAS and CMS collaborations using LHC Run-II data collected at $\mathcal{L}\sim 36~\mathrm{fb^{-1}}$ not very long ago~\cite{ATLAS:2019fwo, CMS:2017ugv}, and differential measurements in $t\bar{t}Z$~\cite{CMS:2019too} have only recently begun. Likewise, the CMS collaboration reported the first $tZj$ observation in Ref.~\cite{CMS:2018sgc} using the Run-II dataset corresponding to $\mathcal{L} \sim 77~\mathrm{fb^{-1}}$, and differential cross-section measurements appeared for the first time in Ref.~\cite{CMS:2021ugv}. Differential information for both $t\bar{t}Z$ and $tZj$ is expected to become readily accessible at the HL-LHC. Eventually, the HL-LHC will be an ideal testing ground to explore these rare top electroweak processes. Complementing the rate measurements with differential cross-sections will allow us to probe top electroweak coupings with much better precision than at present~\cite{Degrande:2018fog}. Because the effects of heavy new physics grow with energy, the tails of the distributions are the best places to probe new physics. It is thus crucial that kinematics are maximally leveraged in order to gain the best possible sensitivity to new physics. Furthermore, the $t\bar{t}Z$ and $tZj$ processes feature complicated topologies with many final-state objects. It is thus also interesting to go beyond traditional analyses in order to maximally constrain new physics. We consider both standard cut-and-count techniques as well as novel approaches based on machine learning which allow us to more efficiently optimize our analyses. Rather than parameterizing the link between amplitudes and experimental data with transfer functions, e.g.~as with the matrix element method, we apply machine learning-based algorithms directly to detector-level events to better approximate a full experimental analysis. This paper is organized as follows. In Section~\ref{sec:SMEFT}, we discuss the SMEFT framework with a focus on the top electroweak sector. Current constraints on $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$ are also discussed. We review the sensitivity of $pp \to t\bar{t}Z$ to $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$ in Section~\ref{sec:pp_ttz_intro}. Here, we also define relevant kinematic observables and examine their sensitivity to the SMEFT operators. In Section~\ref{sec:pp_tzj_intro}, we perform a detailed collider analysis to extract the projected sensitivity of the HL-LHC in probing $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$ through direct searches in the leptonic $pp \to tZj$ channel. We summarize our results in Section~\ref{sec:conclusions}. \section{SMEFT Framework} \label{sec:SMEFT} Here, we discuss the Standard Model Effective Field Theory~(SMEFT) framework~\cite{WEINBERG1979327, BUCHMULLER1986621, Leung:1984ni} with a main focus on electroweak interactions in the top sector. If new BSM physics is present at a heavy mass scale $\Lambda$ far above the electroweak scale $v = 246~\mathrm{GeV}$, its implications at lower scales can be parameterized through higher dimensional effective operators suppressed by appropriate powers of $\Lambda$. These higher dimensional operators provide a model-independent way of parameterizing deviations from the Standard Model (SM). Considering the SM to be the low energy limit of the full theory, the effective SMEFT Lagrangian can be written by augmenting the SM Lagrangian with these new physics operators, \begin{equation} \mathcal{L}_{SMEFT} = \mathcal{L}_{SM} + \sum_{i} \frac{\mathcal{C}_{i}}{\Lambda^{2}} \mathcal{O}_{i}^{(6)} + \mathcal{O}\left(\Lambda^{-4}\right). \label{eqn:Lag_SMEFT} \end{equation} Here $\{\mathcal{O}_{i}^{(6)}\}$ represents the set of operators respecting the symmetries of the SM with mass dimension $d = 6$. New physics effects from operators with mass dimension $d \geq 8$ are subdominant and have been ignored in this work. In Eq.~\ref{eqn:Lag_SMEFT}, $\mathcal{C}_{i}$ are the Wilson coefficients. They are free parameters by definition and are constrained by experimental measurements. Typically, the set of $d = 6$ operators $\{\mathcal{O}_{i}^{(6)}\}$ results in the following modifications to any measured observable $\mathcal{X}$, \begin{equation} \mathcal{X} = \mathcal{X}_{SM} + \sum_{i}\mathcal{X}^{\prime}_{i}\frac{\mathcal{C}_{i}^{(6)}}{\Lambda^{2}} + \sum_{i,j} \mathcal{X}^{\prime\prime}_{i}\frac{\mathcal{C}_{i}^{(6)}\mathcal{C}_{j}^{(6)}}{\Lambda^{4}}, \end{equation} where the term linear in $\mathcal{C}_{i}$ encodes interference between SM and $\mathcal{O}_{i}^{(6)}$, while the last term represents non-linear pure SMEFT effects. There are 59 independent $d = 6$ SMEFT operators for one generation of fermions, assuming baryon number conservation. We will restrict ourselves to operators involving third-generation quarks. In the Warsaw basis~\cite{Grzadkowski:2010es}, then, 31 of these operators involve the top quark. Restricting to the CP-conserving scenario, 11 such operators can be constructed from four heavy quark fields which include the left-handed quark $SU(2)_{L}$ doublet $Q_{3}$, right-handed top $U_{3}$, and/or right-handed bottom $SU(2)_{L}$ singlet $D_{3}$. These four-heavy-quark operators are mainly constrained by measurements in processes involving $t\bar{t}t\bar{t}$ and $t\bar{t}b\bar{b}$ final states~\cite{DHondt:2018cww}. Furthermore, apart from four-heavy-quark operators, 9 operators involve two heavy quarks along with bosonic fields~\cite{Grzadkowski:2010es,Aguilar-Saavedra:2018ksv,Hartland:2019bjb}. Of these, the top chromomagnetic dipole operator $\mathcal{O}_{tG} = \left( \bar{Q}_3 \sigma^{\mu\nu} T^{A} U_3 \right) \tilde{H} G_{\mu\nu}^a$~\footnote{We adopt the operator notation of Ref.~\cite{Grzadkowski:2010es}.}, modifies the coupling of the top with gluons, and can be constrained by processes such as $t\bar{t}$, $t\bar{t}W$, $t\bar{t}Z$, $t\bar{t}H$, $tZ$, $tW$ and single Higgs production in the gluon fusion channel~$gg \to h$; $\mathcal{O}_{tH} = (H^{\dagger}H)(\bar{Q}_{3}U_{3}\tilde{H})$ modifies the tree-level Higgs-top coupling, and is constrained by $t\bar{t}H$ measurements and $gg \to H$ production; linear combinations of $\mathcal{O}_{HQ}^{(1)} = \left( H^\dagger i \dvec{D}_\mu H \right) \bar{Q}_3 \gamma^\mu Q_3$ and $\mathcal{O}_{HQ}^{(3)} = \left( H^\dagger i \dvec{D}_\mu^{I} H \right) \bar{Q}_3 \tau^{I} \gamma^\mu Q_3$ are constrained by $Zb\bar{b}$ measurements at LEP and electroweak top processes respectively~\cite{Ellis:2020unq}; $\mathcal{O}_{Htb} = i(\tilde{H}^{\dagger}D_{\mu}H)(U_{3}\gamma^{\mu}D_{3})$ can be constrained by measurements of top decay and $h\to b\bar{b}$ measurements~\cite{Alioli:2017ces}; and $\mathcal{O}_{bW} = (\bar{Q}_{3}\sigma^{\mu\nu}D_{3})\tau^{I}HW_{\mu\nu}^{I}$ can be constrained by single top production. Then, each of the operators $\mathcal{O}_{Htb}$ and $\mathcal{O}_{bW}$ mainly contributes at $\mathcal{O}(\Lambda^{-4})$ since the interference of these operators with the SM vanishes in the limit $m_{b} \to 0$~\cite{Buckley:2015lku, Hartland:2019bjb}. The remaining three operators with two quarks and bosonic fields are, \begin{eqnarray} \mathcal{O}_{tW} &=& \left( \bar{Q}_3 \sigma^{\mu\nu} U_3 \right) \tau^a \tilde{H} W_{\mu\nu}^a \\ \mathcal{O}_{tB} &=& \left( \bar{Q}_3 \sigma^{\mu\nu} U_3 \right) \tilde{H} B_{\mu\nu} \\ \mathcal{O}_{Ht} &=& \left( H^\dagger i \dvec{D}_\mu H \right) \bar{U}_3 \gamma^\mu U_3 \end{eqnarray} $\mathcal{O}_{tW}$ modifies the charged current coupling of the top quark, and can be probed through $W$ helicity fraction measurements and electroweak top processes~\cite{Ellis:2020unq}, while $\mathcal{O}_{tb}$ and $\mathcal{O}_{Ht}$ are substantially less constrained. The latter two operators modify the neutral current interactions of the top quark, and can only be constrained by $t\bar{t}Z/\gamma$ and $tZ(j)$. As discussed previously, measurements in these processes have remained statistically limited until now, and differential measurements have started to appear only recently. The upcoming differential data is expected to improve the sensitivity to $\mathcal{O}_{tW}$ and $\mathcal{O}_{tB}$, but not as much for $\mathcal{O}_{Ht}$ since the scattering amplitudes do not exhibit any energy growth with $\mathcal{O}_{Ht}$~\cite{Degrande:2018fog}. Motivated by future LHC measurements in electroweak top processes, then, our focus in this work is the electroweak top dipole operators $\mathcal{O}_{tW}$ and $\mathcal{O}_{tB}$. The current limits from a global fit of Higgs, electroweak and top data are $-0.12 < \mathcal{C}_{tW} < 0.51$ and $-4.5 < \mathcal{C}_{tB} < 1.2$ at $95\%$ CL individually~\cite{Ellis:2020unq}. To separate out the effects of neutral current interactions, we will work in a basis where our operators of interest are $\mathcal{O}_{tW}$ and the combination \begin{equation} \mathcal{O}_{tZ} = -\sin\theta_{W} \mathcal{O}_{tB} + \cos\theta_{W} \mathcal{O}_{tW} \end{equation} where, $\theta_{W}$ is the Weinberg angle. Both $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$ can contribute to $tZj$ and $t\bar{t}Z$ processes at the production level. Our goal is to explore the projected sensitivities for $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$ through searches in $t\bar{t}Z$ and $tZj$ at the HL-LHC using a combination of rate and differential cross-section measurements. With the exception of some recent studies~\cite{Ethier:2021bye,CMS:2019too}, most global fits as well as direct probes for $\mathcal{O}_{tZ}$ have relied on rate measurements alone. The differential cross-sections for $p_{T,Z}$ and $\cos\theta^{\star}$, where $\theta^{\star}$ is the angle between the $Z$ boson and the negatively charged lepton in the center of mass frame of the $Z$ boson, have been measured in the $t\bar{t}Z$ channel for the first time by the CMS experiment using LHC Run-II data collected at $\mathcal{L} \sim 77~\mathrm{fb^{-1}}$~\cite{CMS:2019too}. With the inclusion of differential information, $\mathcal{C}_{tZ}$ has been constrained up to $-1.1 \lesssim \mathcal{C}_{tZ} \lesssim 1.1$ at $95\%$ CL, which is a considerable improvement over the previous CMS~($\mathcal{L} \sim 36~\mathrm{fb^{-1}}$) bound $-2.6 \lesssim \mathcal{C}_{tZ} \lesssim 2.6$ at $95\%$ CL~\cite{CMS:2017ugv}. We now proceed to analyze the prospects for HL-LHC measurements to improve upon these existing limits. \section{Electroweak top production} \label{sec:electroweak_top} As discussed previously, we perform a detailed collider analysis to study the sensitivity of top electroweak processes at the HL-LHC to the SMEFT operators $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$, focusing on $t\bar{t}Z$ and $tZj$ production. These processes allow for the testing of neutral top electroweak couplings that are not accessible through top decay, i.e.~$\mathcal{O}_{tZ}$, while $\mathcal{O}_{tW}$ can affect both production and decay. For $t\bar{t}Z$, we study the $3\ell\ + 2b\ + \geq 2 j$ channel, while for $tZj$, we focus on the $3\ell + 1b + 1/2 j$ final state. Our choice for the aforesaid final states is largely motivated by the absence of major background contributions from QCD processes and non-prompt leptons which are relatively difficult to simulate. These final states also offer sufficient statistics at the HL-LHC to make use of kinematic information. For each final state, our general approach is to maximize the ability of an HL-LHC search to discriminate SM electroweak top production and backgrounds from SMEFT contributions. We make use of three different methods for each channel: (1) a traditional cut-and-count analysis, where we optimize manually on a selection of kinematic variables; (2) a deep neural network (DNN) approach, with a multi-layer perceptron trained on a larger set of kinematic quantities; and (3) likelihood ratio inference using MadMiner~\cite{Brehmer:2019xox}. Throughout our analysis, we make use of signal and background events that are simulated at leading order~(LO) with \texttt{MadGraph5\_aMC@NLO}~\cite{Alwall:2014hca} in the 5-flavor scheme with the \texttt{NNPDF2.3QED}~\cite{2013290} parton distribution function. We choose a fixed EFT renormalization scale $\mu_{EFT} \sim \left(m_{t}+m_{Z}\right)/4$~\cite{Degrande:2018fog, Demartin:2015uha} and generate events at center-of-mass energy $\sqrt{s}=13$~TeV. \texttt{Pythia~8}~\cite{Sjostrand:2007gs} is used to simulate showering and hadronization effects and \texttt{Delphes-3.5.0}~\cite{deFavereau:2013fsa} is utilized for fast detector simulation with the default HL-LHC card~\cite{delphes_card}. The pre-selection cuts \begin{eqnarray} p_{T_\ell} > 10~{\rm GeV}, p_{T_b} > 25~{\rm GeV}, p_{T_j} > 25~{\rm GeV}, \nonumber \\ |\eta_{\ell}| < 4.0, |\eta_{b}| < 4.0, |\eta_{j}| < 4.0 \quad. \label{eqn:obj_selection_ttz} \end{eqnarray} are applied to all final state objects. In the cut-and-count and DNN analyses, we maximize the NP signal significance, \begin{equation} \begin{aligned} \sigma_{s}^{NP} = \frac{|S_{SMEFT} - S_{SM}|}{\sqrt{S_{SM}}}. \label{eq:cb_significance} \end{aligned} \end{equation} Here, $S_{SMEFT}$ represents the yield in the signal region including the SMEFT contributions to the signal processes while $S_{SM}$ represents the number of events expected from SM processes alone. That is, $S_{SMEFT}$ includes pure SM contributions, interference between SMEFT operators and SM, and non-linear pure SMEFT terms. In the MadMiner analyses, we calculate the significance in the $\mathcal{O}_{tW}, \mathcal{O}_{tZ}$ plane from the inferred likelihood ratio directly. We note that the inclusion of $\mathcal{O}(\Lambda^{-4})$ pure SMEFT terms is relatively more important for the $t\bar{t}Z$ channel where the interference term $\mathcal{O}(\Lambda^{-2})$ undergoes accidental suppression due to cancellation between the $gg \to t\bar{t}Z$ and $q\bar{q} \to t\bar{t}Z$ production channels~\cite{BessidskaiaBylund:2016jvp}. We now turn to the application of these approaches to the final states that are relevant for constraining top neutral current couplings. \subsection{$pp \to t\bar{t}Z + tWZ \to 3\ell +2b\ + \geq 2j$} \label{sec:pp_ttz_intro} We select events with exactly three isolated leptons~($l = e,\mu$), two $b$ tagged jets and at least two light jets~($j$) in the final state satisfying the cuts of Eq.~\ref{eqn:obj_selection_ttz}. We further impose $p_{T,\ell_{1}} > 40~$GeV and $p_{T,\ell_{2}}>20~$GeV, where $\ell_{1}$ and $\ell_{2}$ are the leading and sub-leading leptons. We reconstruct the $Z$ boson by requiring at least one same flavor opposite sign~(SFOS) lepton pair with invariant mass $m_{Z}\pm 10~$GeV. In cases where all three isolated leptons are of the same flavor, two such SFOS pairs could be obtained. In such instances, the pair with invariant mass closest to $m_{Z}$ is associated with the $Z$ boson. We next pursue the reconstruction of the semileptonic $t\bar{t}$ system. The full reconstruction of the semileptonic $t\bar{t}$ system is challenging due to the unknown longitudinal momentum of the neutrino $\nu$ produced from the leptonic top $t_{\ell}$, as well as combinatorial ambiguities between $b$ tagged jets and light jets. The non-SFOS lepton~($\ell_{W}$) is associated with the leptonically decaying top~($t_{\ell}$). We then compute the longitudinal momentum~($\slashed{p}_{z}$) of $\nu$ by constraining the invariant mass of $\ell_{W}$ and $\nu$ with the on-shell $W$ boson mass $m_{W}$. This leads to either two solutions or no solutions for $\slashed{p}_{z}$. We reject events with no solutions. In events with two solutions, we choose the one which minimizes ${(m_{\ell_{W}\nu} - m_{W})}^{2}$. Having identified $\slashed{p}_{z}$, the only missing piece in the reconstruction of $t_{\ell}$ is the choice of the $b$ tagged jet $b_{t_{\ell}}$. Before identifying $b_{t_{\ell}}$, however, we discuss the hadronically decaying top $t_{h}$, which decays via $t_{h} \to (W \to jj) b$. The pair of light jets associated with $t_{h}$ is identified by minimizing ${(m_{jj} - m_{W})}^{2}$. We refer to this light jet pair as $\{j_{1t},j_{2t}\}$ where $p_{T,j_{1t}} > p_{T,j_{2t}}$. Finally, we pair the $b$ tagged jets with $t_{\ell}$ and $t_{h}$ by minimizing \begin{equation} \left(m_{l_{t}\nu_{t}b_{i}} - m_{t}\right)^{2} + \left(m_{j_{1t}j_{2t}b_{k}} - m_{t}\right)^{2}, \end{equation} where, $i,k = 1,2$ with $i\neq k$ and $m_{t}$ is the mass of the top quark $m_{t} = 173.3~$GeV~\cite{Zyla:2020zbs}. We refer to the $b$ tagged jet associated with the hadronic top as $b_{t_{h}}$. The dominant source of background is SM $t\bar{t}Z$. Sub-dominant contributions can arise from $WZ+\mathrm{jets}$, $tWZ$, $t\bar{t}h$, $t\bar{t}\gamma$, $t\bar{t}W$, $t\bar{t}VV$~($V=W,Z$) and $t\bar{t}t\bar{t}$. We ignore contributions from $t\bar{t}W$, $t\bar{t}VV$ and $t\bar{t}t\bar{t}$ due to their smaller rates at the HL-LHC. Among the remaining background processes, $tWZ$, $t\bar{t}h$ and $t\bar{t}\gamma$ can be modified by $\mathcal{O}_{tZ}$ as well as $\mathcal{O}_{tW}$. However, the event rates for $t\bar{t}h$ and $t\bar{t}\gamma$ are roughly two orders of magnitude smaller compared to that for $t\bar{t}Z$. Therefore, in the cut-based and multivariate DNN analysis, new physics effects in $t\bar{t}\gamma$ and $t\bar{t}h$ are ignored. We include new physics modifications from $\mathcal{O}_{tW}$ and $\mathcal{O}_{tZ}$ in the $t\bar{t}Z$ and $tWZ$ processes only. In order to distinguish the SMEFT signal from SM background, we consider an extensive list of kinematic observables, \begin{equation} \begin{split} p_{T,\alpha}, \eta_{\alpha}, \phi_{\alpha} \{\alpha = \alpha_{Z}, \alpha_{t_{\ell}}, \alpha_{t_{h}}, t_{\ell}, t_{h}, Z \}\\ \{\alpha_{Z} = \ell_{1},\ell_{2};~\alpha_{t_{\ell}} = \ell_{W},\nu_{t},b_{t_{\ell}};~\alpha_{t_{h}}= j_{1t}, j_{2t}, b_{t_{h}}\} \\ \Delta\phi_{\beta \epsilon}, \Delta \eta_{\beta\epsilon} \{\beta, \epsilon = \alpha_{Z}, \alpha_{t_{\ell}}, \alpha_{t_{h}}, t_{\ell}, t_{h}, Z; \beta \neq \epsilon \} \\ \theta^{\star t\bar{t}Z}_{\alpha_{Z}}, \theta^{\star t\bar{t}Z}_{t_{\ell}}, \theta^{\star t\bar{t}Z}_{t_{h}}, \theta^{\star t\bar{t}}_{t_{\ell}}, \theta^{\star t\bar{t}}_{t_{h}}, \\ p_{T, t_{\ell}Z}, p_{T, t_{h}Z}, p_{T, t_{\ell}t_{h}}, p_{T, t_{\ell}t_{h}Z}, H_{T} \\ m_{t_{\ell}}, m_{t_{h}}, m_{Z}, m_{t_{\ell}Z}, m_{t_{h}Z}, m_{t_{\ell}t_{h}}, m_{t_{\ell}t_{h}Z}, m_{T,l_{W}} \\ \Delta R_{\ell\ell}^{\mathrm{min}}, \Delta R_{\ell\ell}^{\mathrm{max}}, \Delta R_{\ell b}^{\mathrm{min}}, \Delta R_{\ell b}^{\mathrm{max}}, \end{split} \label{eqn:ttz_observables} \end{equation} where, $\alpha_{Z}$, $\alpha_{t_{\ell}}$, and $\alpha_{t_{h}}$ denote the final state objects that reconstruct the $Z$ boson, $t_{\ell}$, and $t_{h}$, respectively. In Eq.~(\ref{eqn:ttz_observables}), $p_{T,i}$, $\eta_{i}$ and $\phi_{i}$ represent the transverse momentum, pseudorapidity and azimuthal angle of object $i$, respectively; $\Delta \phi_{ij}$ and $\Delta \eta_{ij}$ corresponds to the difference between azimuthal angles and pseudorapidities, respectively, for objects $i$ and $j$; $\theta^{\star m}_{n}$ is the angle between particle $n$ and the beam direction in the center of mass frame of particle $m$; $m_{T,\ell_{W}}$ is the transverse mass of $\ell_{W}$; $H_{T}$ is the scalar sum of the transverse momenta of all visible final state objects; $\Delta R_{\ell\ell}^{\mathrm{min(max)}}$ is the minimum~(maximum) $\Delta R = \sqrt{\Delta \eta^{2} + \Delta \phi^{2}}$ separation between any two leptons; and $\Delta R_{\ell b}^{\mathrm{min(max)}}$ is the minimum~(maximum) $\Delta R$ separation between a lepton and $b$ jet. The other notations have their usual meaning. \begin{table*}[!htb] \centering \begin{tabular}{|c||c|c|c|c|} \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=2.0$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 250~GeV & 300~GeV & 2.75 & 3.1 \\ \hline SMEFT $t\bar{t}Z$ & 2664 & 2611 & 2609 & 2608 \\ SMEFT $tWZ$ & 151 & 149 & 148 & 148 \\ $t\bar{t}Z$ & 1853 & 1800 & 1796 & 1795 \\ $tWZ$ & 118 & 115 & 115 & 115\\ $WZ$ & 153 & 147 & 147 & 147\\ $t\bar{t}h$ & 14.1 & 12.8 & 12.8 & 12.8 \\ $t\bar{t}\gamma$ & 19.7 & 18.9 & 18.9 & 18.9\\ \hline Significance & 18.17 & 18.47 & 18.51 & 18.51 \\\hline \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=1.5$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & - & 300~GeV & 2.0 & 2.8 \\ \hline SMEFT $t\bar{t}Z$ & 2369 & 2302 & 2227 & 2189 \\ SMEFT $tWZ$ & 138 & 135 & 131 & 128 \\ $t\bar{t}Z$ & 1892 & 1827 & 1756 & 1721 \\ $tWZ$ & 120 & 116 & 113 & 111\\ $WZ$ & 153 & 147 & 139 & 139 \\ $t\bar{t}h$ & 14.7 & 13.1 & 12.8 & 12.6 \\ $t\bar{t}\gamma$ & 19.9 & 19.1 & 18.5 & 18.2 \\ \hline Significance & 10.55 & 10.72 & 10.83 & 10.84 \\ \hline \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=1.0$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 500~GeV & 350~GeV & 2.5 & - \\ \hline SMEFT $t\bar{t}Z$ & 947 & 912 & 906 & 906 \\ SMEFT $tWZ$ & 69.7 & 67.2 & 66.9 & 66.9 \\ $t\bar{t}Z$ & 781 & 748 & 742 & 742 \\ $tWZ$ & 65.1 & 62.6 & 62.2 & 62.2\\ $WZ$ & 117 & 106 & 104 & 104 \\ $t\bar{t}h$ & 3.2 & 2.7 & 2.7 & 2.7 \\ $t\bar{t}\gamma$ & 8.1 & 7.7 & 7.7 & 7.7 \\ \hline Significance & 5.47 & 5.54 & 5.57 & 5.57\\ \hline \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=0.5$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 500~GeV & 350~GeV & 0.75 & 1.9 \\ \hline SMEFT $t\bar{t}Z$ & 830 & 794 & 368 & 325 \\ SMEFT $tWZ$ & 66.4 & 64.1 & 27.6 & 24.5 \\ $t\bar{t}Z$ & 781 & 748 & 337 & 289 \\ $tWZ$ & 65 & 63 & 26 & 23 \\ $WZ$ & 117 & 106 & 43.8 & 38.4 \\ $t\bar{t}h$ & 3.2 & 2.7 & 1.0 & 0.8 \\ $t\bar{t}\gamma$ & 8.1 & 7.7 & 3.8 & 3.4 \\ \hline Significance & 1.61 & 1.55 & 1.61 & 1.99 \\ \hline \hline \end{tabular} \begin{tabular}{|c||c|c|c|c|} \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=-2.0$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & - & 300~GeV & 2.0 & - \\ \hline SMEFT $t\bar{t}Z$ & 2781 & 2710 & 2622 & 2622 \\ SMEFT $tWZ$ & 148 & 146 & 142 & 142 \\ $t\bar{t}Z$ & 1892 & 1827 & 1756 & 1756 \\ $tWZ$ & 120 & 116 & 113 & 113\\ $WZ$ & 153 & 147 & 139 & 139\\ $t\bar{t}h$ & 14.8 & 13.1 & 12.8 & 12.8 \\ $t\bar{t}\gamma$ & 19.9 & 19.1 & 18.5 & 18.5\\ \hline Significance & 19.55 & 19.82 & 19.82 & 19.82 \\ \hline \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=-1.5$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 250~GeV & 300~GeV & - & - \\ \hline SMEFT $t\bar{t}Z$ & 2350 & 2292 & 2292 & 2292 \\ SMEFT $tWZ$ & 135 & 133 & 132 & 132 \\ $t\bar{t}Z$ & 1853 & 1800 & 1800 & 1800 \\ $tWZ$ & 118 & 115 & 115 & 115 \\ $WZ$ & 153 & 147 & 147 & 147\\ $t\bar{t}h$ & 14.1 & 12.8 & 12.8 & 12.8 \\ $t\bar{t}\gamma$ & 19.7 & 18.9 & 18.9 & 18.9 \\ \hline Significance & 11.06 & 11.12 & 11.12 & 11.12 \\ \hline \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=-1.0$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 400~GeV & 500~GeV & 2.25 & - \\ \hline SMEFT $t\bar{t}Z$ & 1382 & 920 & 909 & 908 \\ SMEFT $tWZ$ & 95.0 & 68.2 & 67.3 & 67.3 \\ $t\bar{t}Z$ & 1195 & 770 & 757 & 757 \\ $tWZ$ & 89.4 & 63.7 & 63.0 & 63.0 \\ $WZ$ & 136 & 76.1 & 73.4 & 73.4 \\ $t\bar{t}h$ & 5.8 & 2.6 & 2.6 & 2.6 \\ $t\bar{t}\gamma$ & 12.3 & 7.4 & 7.3 & 7.3 \\ \hline Significance & 5.08 & 5.09 & 5.17 & 5.17 \\ \hline \hline \multicolumn{5}{|c|}{$\mathcal{C}_{tZ}=-0.5$}\\\hline Optimized & $m_{t_{h}Z}~$ $>$ & $H_{T}~$ $>$ & $\Delta R_{\ell\ell}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 350~GeV & 650~GeV & 2 & 0.4 \\ \hline SMEFT $t\bar{t}Z$ & 1489 & 419 & 411 & 215 \\ SMEFT $tWZ$ & 103 & 38.1 & 37.1 & 17.5 \\ $t\bar{t}Z$ & 1442 & 392 & 381 & 185 \\ $tWZ$ & 101.8 & 36.5 & 35.7 & 16.9 \\ $WZ$ & 150 & 32.7 & 32.7 & 21.8 \\ $t\bar{t}h$ & 8.4 & 0.82 & 0.81 & 0.26 \\ $t\bar{t}\gamma$ & 15.1 & 3.7 & 3.6 & 1.6\\ \hline Significance & 1.16 & 1.32 & 1.47 & 2.04 \\\hline \hline \end{tabular} \caption{Optimized selection cuts on $m_{t_{h}Z}$, $H_{T}$, $\Delta R_{\ell\ell}^{\mathrm{min}}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$, applied successively, to maximize the NP signal significance $\sigma_{S}^{NP}$ of cut-based collider analysis in the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j $ channel to explore the projected sensitivity to $\mathcal{O}_{tZ}$ at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The optimized cuts, signal and background yields, and $\sigma_{s}$ values are shown for $\{\mathcal{C}_{tZ} = \pm 2.0, \pm 1.5, \pm 1.0, \pm 0.5\}$. No cuts are applied on $m_{t_{h}Z}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$ in the signal regions that are optimized for $\mathcal{C}_{tZ}=1.5,-2.0$, and $\mathcal{C}_{tZ}=1.0, -1.0, -1.5$, respectively.} \label{tab:ttz_OtZ_cut_flow} \end{table*} Before turning to the cut-based analysis to estimate the projected sensitivity for $\mathcal{O}_{tZ}$ at the HL-LHC, we discuss some of the distributions of these kinematic variables. In Fig.~\ref{fig:ttz_OtZ_distributions}, we present the distributions for $m_{t_{h}Z}$, $H_{T}$, $\Delta R_{\ell\ell}^{\mathrm{min}}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$ at the detector level, for SMEFT $t\bar{t}Z$ and $tWZ$ with $\mathcal{C}_{tZ}=2.0$, and their pure SM counterparts. The subset of these four observables resulted in the maximal value of $\sigma_{S}^{NP}$ among several other combinations of observables from Eq.~(\ref{eqn:ttz_observables}) considered for the cut-based analysis. In the bottom panel of the respective figures, we show the ratio of new physics to SM scenario SMEFT/SM. We observe that the ratio SMEFT/SM exceeds $\gtrsim 1$ in the tails of the $m_{t_{h}Z}$ and $H_{T}$ distributions, in accordance with the general expectation that the effects of higher dimension operators should grow with energy. At $H_{T} \sim 1~$TeV, the NP contributions from $\mathcal{C}_{tZ}=2.0$ in $t\bar{t}Z$ and $tWZ$ can be larger than their SM counterparts by $\mathcal{O}(50\%)$. On the other hand, the ratio SMEFT/SM is mostly above 1 for both $t\bar{t}Z$ and $tWZ$ at lower values of $\Delta \phi_{\ell_{W}t_{\ell}}$ and $\Delta R_{\ell\ell}^{\mathrm{min}}$, owing to the inverse relationship between the opening angles and boosts of the intermediate-state particles. We particularly highlight the distribution of $\Delta R_{\ell\ell}^{\mathrm{min}}$ due to its negative correlation with the transverse momentum of the $Z$ boson $p_{T,Z}$ which is one of the most sensitive observables to constrain $\mathcal{C}_{tZ}$~\cite{Rontsch:2014cca, CMS-PAS-FTR-18-036}. The ratio SMEFT/SM increases with larger $p_{T,Z}$. At relatively large $p_{T,Z}$, the leptons from $Z$ decay are highly collimated leading to small $\Delta R$ separation, and thus dominantly constitute the lower bins of the $\Delta R_{\ell\ell}^{\mathrm{min}}$ distribution. \begin{figure*}[!t] \centering \includegraphics[scale=0.28]{figures/ttz_OtZ_mthZ.pdf}\hspace{2.0cm}\includegraphics[scale=0.28]{figures/ttz_OtZ_dR_min_ll.pdf}\\ \includegraphics[scale=0.28]{figures/ttz_OtZ_HT.pdf}\hspace{2.0cm}\includegraphics[scale=0.28]{figures/ttz_OtZ_deta_lwtl.pdf} \caption{\textit{Top panels:} Distributions for the invariant masses of the hadronically decaying top and $Z$ boson $m_{t_{h}Z}$~(left), and minimum $\Delta R$ separation between a pair of leptons $\Delta R_{\ell\ell}^{\mathrm{min}}$~(right). \textit{Bottom panels:} Distributions for the scalar sum of the transverse momenta of all visible final state objects $H_{T}$~(left), and the azimuthal angle difference $\Delta \phi_{\ell_{W}t_{\ell}}$ between the leptonically decaying top and $\ell_{W}$~(right). The distributions correspond to SMEFT $t\bar{t}Z$~(black solid) and $tWZ$~(blue solid) with $\mathcal{C}_{tZ}=2.0$, SM $t\bar{t}Z$~(black dashed), $tWZ$~(blue dashed) and $t\bar{t}h$~(red dashed). The results are shown at detector level for the LHC with $\sqrt{s}=13~$TeV.} \label{fig:ttz_OtZ_distributions} \end{figure*} We proceed to make selection cuts on the aforesaid observables, $m_{t_{h}Z}$, $H_{T}$, $\Delta R_{\ell\ell}^{\mathrm{min}}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$, which maximize $\sigma_{S}^{NP}$ in Eq.~(\ref{eq:cb_significance}). This cut-based optimization is performed separately for each of 8 signal benchmarks corresponding to different values of $\{\mathcal{C}_{tZ} = \pm 2.0, \pm 1.5, \pm 1.0$, $\pm 0.5\}$. The optimized selection cuts, cut-flow of signal and background rates, and signal significance values $\sigma_{s}^{NP}$, are presented in Table~\ref{tab:ttz_OtZ_cut_flow}. We observe that the optimized signal regions prefer strong cuts on $m_{t_{h}Z}$ and $H_{T}$ $viz$ $m_{t_{h}Z} > 500~$GeV~($400~$GeV) and $H_{T} > 350~$GeV~(500~GeV) at $\mathcal{C}_{tZ}$=1.0~(-1.0), which concurs with the observations in Fig.~\ref{fig:ttz_OtZ_distributions} where we observe an enhancement in the ratio SMEFT/SM at large values of these observables. Similarly, many of the optimized signal regions prefer lower $\Delta R_{\ell\ell}^{\mathrm{min}}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$. This aspect is more apparent at relatively smaller values of $\mathcal{C}_{tZ}=+0.5, -0.5$ where the large $H_{T}$ and $m_{t_{h}Z}$ regions feature a weaker SMEFT-induced enhancement. For $\mathcal{C}_{tZ} = 0.5$, we obtain a signal significance of $1.99$ which increases to $5.57$ at $\mathcal{C}_{tZ}=1.0$. For negative values of $\mathcal{C}_{tZ}$, $\sigma_{S}^{NP}$ improves from 2.04 at $\mathcal{C}_{tZ}=-0.5$ to 5.17 at $\mathcal{C}_{tZ}=-1.0$. This variation of $\sigma_{S}^{NP}$ with $\mathcal{C}_{tZ}$ is summarized in the left panel of Fig.~\ref{fig:ttz_limits} as blue solid line. We observe that $\mathcal{O}_{tZ}$ can be probed up to $-0.49 \lesssim \mathcal{C}_{tZ} \lesssim 0.51$ at the HL-LHC at the $2\sigma$ level through searches in the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ channel. \begin{table}[!htb] \centering\scalebox{0.7}{ \begin{tabular}{|c||c|c|c|} \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tW}=0.72$}\\\hline Optimized & $H_{T}$ & $\Delta R_{\ell b}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & - & 3.5 & 3.1 \\ \hline SMEFT $t\bar{t}Z$ & 2430 & 2429 & 2428 \\ SMEFT $tWZ$ & 144 & 144 & 144 \\ $t\bar{t}Z$ & 1893 & 1892 & 1892 \\ $tWZ$ & 123 & 122 & 122 \\ $WZ$ & 153 & 150 & 150 \\ $t\bar{t}h$ & 14.8 & 14.8 & 14.8 \\ $t\bar{t}\gamma$ & 19.9 & 19.9 & 19.9\\ \hline Significance & 11.90 & 11.91 & 11.92 \\\hline \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tW}=0.48$}\\\hline Optimized & $H_{T} >$ & $\Delta R_{\ell b}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & $250~$GeV & 2.75 & - \\ \hline SMEFT $t\bar{t}Z$ & 2210 & 2201 & 2201 \\ SMEFT $tWZ$ & 131 & 129 & 129 \\ $t\bar{t}Z$ & 1889 & 1881 & 1881 \\ $tWZ$ & 122 & 121 & 121 \\ $WZ$ & 150 & 136 & 136 \\ $t\bar{t}h$ & 14.6 & 14.6 & 14.6 \\ $t\bar{t}\gamma$ & 19.8 & 19.8 & 19.8\\ \hline Significance & 7.04 & 7.06 & 7.06 \\\hline \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tW}=0.24$}\\\hline Optimized & $H_{T}$ $>$ & $\Delta R_{\ell b}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ cuts & 250~GeV & - & 1.6 \\ \hline SMEFT $t\bar{t}Z$ & 2050 & 2050 & 1678 \\ SMEFT $tWZ$ & 124 & 124 & 101 \\ $t\bar{t}Z$ & 1889 & 1889 & 1528 \\ $tWZ$ & 122 & 122 & 99.5 \\ $WZ$ & 150 & 150 & 117 \\ $t\bar{t}h$ & 14.6 & 14.6 & 11.3 \\ $t\bar{t}\gamma$ & 19.8 & 19.8 & 15.9\\ \hline Significance & 3.48 & 3.48 & 3.62\\\hline \hline \end{tabular} \begin{tabular}{|c|c|c|} \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tW}=-0.72$}\\\hline $H_{T}$ & $\Delta R_{\ell b}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ - & 2.5 & 3.1 \\ \hline 1530 & 1509 & 1508 \\ 133 & 129 & 128 \\ 1893 & 1871 & 1870 \\ 123 & 119 & 119 \\ 153 & 139 & 139 \\ 14.8 & 14.7 & 14.7 \\ 19.9 & 19.7 & 19.7\\ \hline 7.52 & 7.57 & 7.58\\\hline \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tW}=-0.48$}\\\hline $H_{T}$ $>$ & $\Delta R_{\ell b}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ 250~GeV & 3.0 & - \\ \hline 1650 & 1647 & 1647 \\ 128 & 127 & 127 \\ 1889 & 1887 & 1887 \\ 122 & 122 & 122 \\ 150 & 150 & 142 \\ 14.6 & 14.6 & 14.6 \\ 19.8 & 19.8 & 19.8\\ \hline 4.98 & 5.01 & 5.01\\\hline \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tW}=-0.24$}\\\hline $H_{T}$ & $\Delta R_{\ell b}^{\mathrm{min}}$ $<$ & $\Delta \phi_{\ell_{W}t_{\ell}}$ $<$ \\ - & 2.25 & 2.8 \\ \hline 1767 & 1710 & 1675 \\ 120 & 112 & 110\\ 1893 & 1838 & 1802 \\ 123 & 115 & 113 \\ 153 & 131 & 131 \\ 14.7 & 14.6 & 14.3 \\ 19.9 & 19.5 & 19.2 \\ \hline 2.77 & 2.88 & 2.90 \\\hline \hline \end{tabular}} \caption{Optimized selection cuts on $H_{T}$, $\Delta R_{\ell b}^{\mathrm{min}}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$, applied successively, to maximize the signal significance $\sigma_{S}^{NP}$ from cut-based collider analysis in the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j $ channel to estimate the projected sensitivity for $\mathcal{O}_{tW}$ at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The optimized cuts, signal and background yields, and $\sigma_{S}^{NP}$ values are shown for $\{\mathcal{C}_{tW} = \pm 0.72, \pm 0.48, \pm 0.24\}$. No cuts are applied on $H_{T}$ for $\mathcal{C}_{tW}=0.72, -0.72, -0.24$, on $\Delta R_{\ell b}^{min}$ for $\mathcal{C}_{tW} = 0.24$, and on $\Delta \phi_{\ell_{W}t_{\ell}}$ for $\mathcal{C}_{tW} = 0.48, -0.48$.} \label{tab:ttz_OtW_cut_flow} \end{table} \begin{figure*}[!htb] \centering \includegraphics[scale=0.23]{figures/ttz_OtW_HT.pdf}\includegraphics[scale=0.23]{figures/ttz_OtW_dR_min_lb.pdf}\includegraphics[scale=0.23]{figures/ttz_OtW_deta_lwtl.pdf} \caption{Distributions for the scalar sum of the transverse momenta of all visible final state objects $H_{T}$~(left), minimum $\Delta R$ separation between a lepton and $b$ jet pair $\Delta R_{\ell b}^{\mathrm{min}}$~(center), and difference of azimuthal angles for the leptonically decaying top and $\ell_{W}$ $\Delta \phi_{\ell_{W}t_{\ell}}$~(right), for SMEFT $t\bar{t}Z$~(black solid) and $tWZ$~(blue solid) with $\mathcal{C}_{tW}=0.72$, SM $t\bar{t}Z$~(black dashed), $tWZ$~(blue dashed) and $t\bar{t}h$~(red dashed). The results are presented at the detector level for the LHC with $\sqrt{s}=13~$TeV.} \label{fig:ttz_OtW_distributions} \end{figure*} While $\mathcal{O}_{tZ}$ leads to new physics contributions only at the production level, $\mathcal{O}_{tW}$ can induce modifications of both top production and decay by virtue of its modification to the $tWb$ vertex. We perform a separate cut-based analysis to estimate the projected sensitivity for $\mathcal{O}_{tW}$ at the HL-LHC. For this analysis, we consider several subsets of observables from Eqn.~(\ref{eqn:ttz_observables}) for cut-based optimization. Among them, the subset of $\{H_{T},~\Delta R_{\ell b}^{\mathrm{min}},~\Delta \phi_{\ell_{W}t_{\ell}}\}$, leads to the strongest sensitivity. In Fig.~\ref{fig:ttz_OtW_distributions}, we present their distributions, at the detector level, for SMEFT $t\bar{t}Z$ and $tWZ$ at $\mathcal{C}_{tW}=0.72$, and SM $t\bar{t}Z$, $tWZ$ and $t\bar{t}h$. Unlike the $\mathcal{C}_{tZ}$ scenario, the ratio SMEFT/SM for $t\bar{t}Z$ in Fig.~\ref{fig:ttz_OtW_distributions} remains roughly close to $1$, demonstrating a reduced sensitivity to $\mathcal{C}_{tW}$, except in the highly boosted $H_{T}$ regime, $H_{T} > 1100~\mathrm{GeV}$, which is marred by large statistical uncertainty. We consider 6 different signal benchmarks corresponding to $\{\mathcal{C}_{tW}=\pm 0.72, \pm 0.48, \pm 0.24\}$. The optimized cuts on $H_{T}$, $\Delta R_{\ell b}^{\mathrm{min}}$ and $\Delta \phi_{\ell_{W}t_{\ell}}$, signal and background yields, and $\sigma_{S}^{NP}$ values are presented in Table~\ref{tab:ttz_OtW_cut_flow}. We obtain $\sigma_{S}^{NP} = 11.92~(7.62)$ for $\mathcal{C}_{tW} = 0.72~(-0.72)$, which decreases to 3.64~(2.90) at $\mathcal{C}_{tW}=0.24~(-0.24)$. From the cut flows in Table~\ref{tab:ttz_OtW_cut_flow}, we see that the kinematic cuts do not significantly increase the significance. This follows from the reduced dependence of the kinematic distributions in Fig.~\ref{fig:ttz_OtW_distributions} on the EFT operator, and we do not expect large gains beyond a rate-only measurement. Using the results from Table~\ref{tab:ttz_OtW_cut_flow}, we interpolate the variation of $\sigma_{S}^{NP}$ as a function of $\mathcal{C}_{tW}$, as illustrated in the left panel of Fig.~\ref{fig:ttz_limits} as red solid line. We observe that the HL-LHC would be able to probe $\mathcal{C}_{tW}$ up to $-0.19 \lesssim \mathcal{C}_{tW} \lesssim 0.16$ at $2\sigma$ uncertainty through searches in the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j $ channel. We also find other subsets of observables that lead to roughly comparable sensitivity $viz.$ $\{H_{T},p_{T,Z},p_{T,W},\Delta R_{\ell b}^{\mathrm{min}}\}$, $\{p_{T,Z}/p_{T,W}, m_{t_{h}t_{\ell}Z}, \Delta R_{\ell b}^{\mathrm{min}},\Delta \phi_{\ell_{W}t_{\ell}}\}$. \begin{table}[!htb] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{$\mathcal{C}_{tZ}$} & \multicolumn{2}{c|}{SMEFT} & \multicolumn{5}{c|}{Background} & \multirow{2}{*}{$\alpha$} & \multirow{2}{*}{$\sigma_{S}^{NP}$} \\ \cline{2-8} & $t\bar{t}Z$ & $tWZ$ & $t\bar{t}Z$ & $tWZ$ & $WZ$ & $t\bar{t}h$ & $t\bar{t}\gamma$ & & \\ \hline 2.0 & 1557 & 84.5 & 942 & 58.6 & 73.6 & 1.9 & 7.7 & 0.60 & 19.23\\ 1.5 & 979 & 56.9 & 673 & 44.5 & 51.8 & 0.9 & 5.9 & 0.64 & 11.22 \\ 1.0 & 1185 & 68.8 & 984 & 63.6 & 81.8 & 2.3 & 8.7 & 0.60 & 6.10\\ 0.5 & 640 & 40.3 & 582 & 41.9 & 57.2 & 3.5 & 5.5 & 0.60 & 2.15 \\ -0.5 & 1038 & 63.7 & 963 & 61.8 & 81.8 & 7.0 & 9.8 & 0.56 & 2.3 \\ -1.0 & 906 & 56.3 & 743 & 51.2 & 68.2 & 1.5 & 6.2 & 0.62 & 5.69 \\ -1.5 & 1594 & 93.7 & 1179 & 77.6 & 111.8 & 3.6 & 11.0 & 0.56 & 11.61 \\ -2.0 & 2016 & 111 & 1258 & 82.9 & 114.5 & 4.3 & 11.8 & 0.55 & 20.18 \\ \hline \end{tabular} \caption{Signal significance $\sigma_{S}$ from DNN analysis in $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j $ channel for $\{\mathcal{C}_{tZ} = \pm 2.0, \pm 1.5, \pm 1.0, \pm 0.5\}$ at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The signal rates for SMEFT $t\bar{t}Z$ and $tWZ$ processes, background rates for SM $t\bar{t}Z$, $tWZ$, $t\bar{t}\gamma$, $t\bar{t}h$ and $WZ+\mathrm{jets}$ are presented. The optimal DNN score $\alpha$ and corresponding signal significance~$\sigma_{S}^{NP}$ are also shown.} \label{tab:ttz_OtZ_DNN} \end{table} \begin{table}[!htb] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{$\mathcal{C}_{tW}$} & \multicolumn{2}{c|}{SMEFT} & \multicolumn{5}{c|}{Background} & \multirow{2}{*}{$\alpha$} & \multirow{2}{*}{$\sigma_{S}^{NP}$} \\ \cline{2-8} & $t\bar{t}Z$ & $tWZ$ & $t\bar{t}Z$ & $tWZ$ & $WZ$ & $t\bar{t}h$ & $t\bar{t}\gamma$ & & \\ \hline 0.72 & 2348 & 132 & 1818 & 111 & 142 & 14.0 & 18.6 & 0.23 & 12.0\\ 0.48 & 2088 & 115 & 1771 & 106 & 142 & 13.8 & 18.2 & 0.26 & 7.19\\ 0.24 & 1957 & 110 & 1790 & 108 & 141 & 13.9 & 18.3 & 0.25 & 3.73\\ -0.24 & 1763 & 120 & 1888 & 122 & 150 & 14.7 & 19.9 & 0.20 & 2.72\\ -0.48 & 1651 & 126 & 1890 & 122 & 153 & 14.7 & 19.9 & 0.11 & 5.01\\ -0.72 & 1527 & 132 & 1890 & 122 & 153 & 14.7 & 19.9 & 0.06 & 7.52\\ \hline \end{tabular} \caption{Signal significance $\sigma_{S}$ from DNN analysis in $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j $ channel for $\{\mathcal{C}_{tW} = \pm 0.72, \pm 0.48, \pm 0.24\}$ at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The signal rates for SMEFT $t\bar{t}Z$ and $tWZ$, background rates for SM $t\bar{t}Z$, $tWZ$, $t\bar{t}\gamma$, $t\bar{t}h$ and $WZ+\mathrm{jets}$ are presented. The optimal DNN score $\alpha$ and corresponding signal significance~$\sigma_{S}^{NP}$ are also shown.} \label{tab:ttz_OtW_DNN} \end{table} While the cut-based approach is simple to apply and easily interpretable using the individual features of the selected observables, it is less effective in exploring any correlations which might exist among the observables. Furthermore, it becomes progressively more cumbersome as the dimensionality of input features is increased. Therefore, in order to comprehensively explore the sensitivity for $\mathcal{O}_{tZ}$ and $\mathcal{O}_{tW}$, we also perform a machine-learning based multivariate analysis using a Deep Neural Network~(DNN), using the same signal benchmarks as for the cut-based approach. While the cut-based analysis only takes into account the differences in the shape of a few selected distributions, the neural networks can exploit the shape information of a much larger number of input features while also taking into account the NP deviations in their correlations. For each signal benchmark, we construct a fully connected DNN using Keras, which takes as input the 150 observables of Eq.~(\ref{eqn:ttz_observables}). Each DNN has between 4 and 8 hidden layers; the number of layers and the number of nodes in each layer are optimized for each benchmark. We use the Rectified Linear Unit~(ReLU) activation function in each layer except for the final one, where the Sigmoid activation function is used instead in order to provide an output classifying an event as SM-like (0) or SMEFT-like (1). Training is performed on a subset of our event sample using Adam optimization to minimize binary cross-entropy loss over 200 epochs, with a learning rate of $10^{-5}$ and a batch size of 64. In order to avoid overtraining, we apply early stopping using a validation set. The training data for the DNN is comprised of $t\bar{t}Z$ and $tWZ$ events with at least one SMEFT vertex, and SM $t\bar{t}Z$, $tWZ$ and $WZ+\mathrm{jets}$ events. The network is trained to distinguish the pure EFT $t\bar{t}Z$ and $tWZ$ events from the SM processes. The test data is comprised of SMEFT $t\bar{t}Z$ and $tWZ$ events~(sensitive to pure SM, interference terms, and NP squared terms), and SM $t\bar{t}Z$, $tWZ$, $t\bar{t}\gamma$, $t\bar{t}h$ and $WZ+\mathrm{jets}$ events. SM $t\bar{t}h$ and $t\bar{t}\gamma$ events are not included in the training data due to their relatively lower cross sections. We identify events with DNN output values above a cutoff $\alpha$ as signal-like, and those with output scores below $\alpha$ as background. After each network is trained, we choose the value of $\alpha$ that maximizes $\sigma_{S}^{NP}$. The resulting signal and background yields are listed in Tables~\ref{tab:ttz_OtZ_DNN} and \ref{tab:ttz_OtW_DNN}. In the case of $\mathcal{O}_{tZ}$, the multivariate DNN analysis improves the projected sensitivity by $\sim \mathcal{O}(5\text{-}10)\%$ compared to cut-based optimization. For example, $\sigma_{S}^{NP}$ for $\mathcal{C}_{tZ} = 0.5$~(-0.5) improves from 1.9~(2.0) with the cut-based analysis to 2.1~(2.3) with the DNN. For $\mathcal{O}_{tW}$, the differences between the cut-based and DNN results are smaller. We interpolate $\sigma_{S}^{NP}$ as a function of $\mathcal{C}_{tZ}$~($\mathcal{C}_{tW}$) using the results in Table~\ref{tab:ttz_OtZ_DNN}~(Table~\ref{tab:ttz_OtW_DNN}), and present them in the left panel of Fig.~\ref{fig:ttz_limits} as blue~(red) solid lines. The projected sensitivity for $\mathcal{O}_{tZ}$ reaches up to $-0.45 \lesssim \mathcal{C}_{tZ} \lesssim 0.48$ at $2\sigma$ uncertainty, thus, registering $\mathcal{O}(7\%)$ improvement over the cut-based results. In the case of $\mathcal{O}_{tW}$, the projected sensitivity reaches up to $-0.19 \lesssim \mathcal{C}_{tW} \lesssim 0.15$ which is almost comparable to the results from the cut-based analysis. Next, we assess the most important input observables in the dataset using the Python-based \texttt{ELI5} tool~\cite{eli5}. Specifically, we calculate the permutation feature importance by measuring the decrements in model score when the data for each feature is randomly shuffled among events. We compute the permutation importance scores of input observables in all of the DNN models trained on our signal benchmarks. Although the relative weight of observables exhibits variation across different signal benchmarks, the subset of the most sensitive observables remains almost unchanged. We list 35 such observables which typically feature in the list of leading permutation scores for all signal benchmarks: \begin{equation} \begin{split} &m_{t_{\ell}t_{h}}, m_{t_{\ell/h}Z}, m_{t_{\ell}t_{h}Z}, H_{T}, p_{T,\ell_{1/2}}, p_{T,\ell_{W}}, p_{T,b_{h}}, \\ &p_{T,Z}, p_{T,t_{\ell/h}}, p_{T,t_{\ell/h}Z}, p_{T,t_{\ell}t_{h}}, \Delta R_{\ell\ell}^{\mathrm{max}}, \Delta R_{\ell\ell}^{\mathrm{min}}, \Delta R_{\ell b}^{\mathrm{min}}, \\ &\phi_{\ell_{W}}, \phi_{t_{\ell}}, \Delta \phi_{\ell_{W}t_{\ell}}, \Delta \phi_{\ell_{W}\ell_{1}}, \Delta \phi_{\nu\ell_{1}}, \Delta \phi_{\nu b_{2}},\\ &\Delta \phi_{b_{\ell}\ell_{1}}, \Delta \phi_{b_{\ell}\ell_{2}}, \Delta \phi_{j_{2}\ell_{1}}, \Delta \phi_{b_{h}\ell_{2}}, \Delta \phi_{\ell_{1}t_{\ell}},\\ &\eta_{\ell_{1}}, \Delta \eta_{t_{\ell}Z}, \Delta \eta_{\nu Z}, \Delta \eta_{\ell_{W}\ell_{2}}, \Delta \eta_{b_{\ell}\ell_{2}}, \Delta \eta_{\ell_{2}Z}. \end{split} \end{equation} Training DNN models with only these 35 input observables results in sensitivities that are comparable to those from models trained using all 150 observables listed in Eq.~(\ref{eqn:ttz_observables}). \begin{figure*}[!htb] \centering \includegraphics[scale=0.24]{figures/Summary-ttz.pdf}\includegraphics[scale=0.24]{figures/p_value_OtZ_a_madminer.pdf}\includegraphics[scale=0.24]{figures/p_value_OtW_a_madminer.pdf} \caption{\textit{Left panel:} Projected sensitivity for $\mathcal{O}_{tZ}$~(top panel) and $\mathcal{O}_{tW}$~(bottom panel) from searches in $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$~(red) channels at the HL-LHC. The solid and dashed lines represent the projections from cut-based and DNN analysis, respectively. \textit{Central panel:} Projected sensitivity for $\mathcal{O}_{tZ}$ through searches in $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$~(blue) channel using MadMiner. The blue and red solid lines denote the variation of p-values as a function of $\mathcal{C}_{tZ}$ when new physics effects are included at both production and decay level, and only at production, respectively. \textit{Right panel:} Similar to central panel but with $\mathcal{C}_{tW}$ instead of $\mathcal{C}_{tZ}$. The results are presented for $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$.} \label{fig:ttz_limits} \end{figure*} We note that pure EFT $t\bar{t}Z$ and $tWZ$ events used in the training dataset have been generated in the \texttt{MG5\_aMC@NLO} framework by setting the squared coupling order $NP^{2} >0$, and particle decay chains cannot be specified together with squared coupling orders. As a result, the pure EFT events used for training the DNN model include NP effects at the production level only and lack spin-correlation effects in top decays. However, in the scenario with non-zero $\mathcal{C}_{tW}$, the SMEFT $t\bar{t}Z$ and $tWZ$ events in the test dataset include NP contributions both for production and top decay, along with top spin-correlation effects in the final state objects. The consequences of this disparity are expected to be more pronounced for $t\bar{t}Z$~(compared with $tWZ$) which also happens to be the most dominant signal. This difference between the training and test datasets could be responsible for the meagre improvement in the projected sensitivity from a multivariate DNN analysis over the traditional cut-based approach. On the other hand, $\mathcal{O}_{tZ}$ affects $t\bar{t}Z$ and $tWZ$ at the production level only. Therefore, when we examine the projected sensitivity to $\mathcal{O}_{tZ}$, the only source of disparity between the training and test datasets is top spin correlation effects. Overall, the inconsistency between the training and test datasets is expected to be less severe in the case of $\mathcal{O}_{tZ}$ than for $\mathcal{O}_{tW}$. In order to ensure that we are not losing sensitivity to NP operators in the DNN analysis from the missing correlation effects in the training data, we also estimate the projected sensitivities through a likelihood-based approach which takes into account new physics effects both at production and decay along with $t\bar{t}$ spin-correlation effects. To achieve this, we use the \texttt{MadMiner} tool which employs machine-learning based event information extraction techniques to obtain the event likelihood ratio as a function of the SMEFT parameters~\cite{Brehmer:2018hga, Brehmer:2019xox}. The event likelihood ratio $r(x|\theta,\theta_{SM}) = p(x|\theta)/p(x|\theta_{SM})$, where $p(x|\theta)$ is the probability of observables $x$ given theory parameters $\theta = \{\mathcal{C}_{tZ}, \mathcal{C}_{tW}\}$~($\theta_{SM}=\{0,0\}$), is the most powerful test statistic to discriminate the hypothesis $\theta$ from $\theta_{SM}$~\cite{Brehmer:2018hga}. However, at the detector level, $r(x|\theta,\theta_{SM})$ is an intractable function due to conditioning from several latent variables $z$ such as parton showering, hadronization and detector response. On the other hand, the joint likelihood ratio $r(x,z|\theta,\theta_{SM})$ can be computed for every Monte Carlo~(MC) simulated event at the detector level~\cite{Brehmer:2018hga, Brehmer:2019xox}. In addition, the joint score $t(x,z|\theta_{0}) = \triangledown_{\theta}(p(x,z|\theta))\big|_{\theta_{0}}$, the gradient of the joint likelihood ratio at reference positions $\theta_0$ in theory parameter space, can also be computed from MC simulation and used to help estimate the true likelihood ratio $r(x|\theta,\theta_{SM})$. \texttt{MadMiner} uses matrix element information from MC event samples and shape information in reconstructed observables to train a neural network using an appropriate loss functional that depends on $r(x,z|\theta,\theta_{SM})$ and/or $t(x,z|\theta_{0})$. The loss function is defined such that its minimizing function is the intractable event likelihood ratio $r(x|\theta)$ and the trained NN is an estimator of $r(x|\theta)$~\cite{Brehmer:2018hga}. This estimated likelihood ratio is sensitive to both linear and non-linear NP effects. In the presence of SMEFT operators $\theta_{i}$, the matrix squared element at the parton level $|\mathcal{M}|^{2}$ is given by, \begin{equation} \begin{split} |\mathcal{M}|^{2} = &~1 \cdot |\mathcal{M}|_{SM}^{2}(x,\theta_{SM}) + \sum_{i} \theta_{i}^{2} \cdot |\mathcal{M}|_{BSM}^{2}(x,\theta_{i}) \\ & + \sum_{i} 2~\theta_{i} \cdot \mathrm{Re} |\mathcal{M}|_{SM}^{\dagger}(x,\theta_{SM})~|\mathcal{M}|_{BSM}(x,\theta_{i}) \\ & + \sum_{i,j}^{i\neq j} 2~\theta_{i}~\theta_{j}\cdot \mathrm{Re}|\mathcal{M}|_{BSM}^{\dagger}(x,\theta_{i})~|\mathcal{M}|_{BSM}(x,\theta_{j}), \label{eq:matrix_squared_element} \end{split} \end{equation} where, $|\mathcal{M}|_{SM}^{2}(x,\theta_{SM})$ represents the matrix squared element for the SM, while $|\mathcal{M}|_{BSM}^{2}(x,\theta_{i})$ represents the matrix squared element for pure SMEFT interactions corresponding to $\theta_{i}$. Eq.~(\ref{eq:matrix_squared_element}) can be factorized through a morphing technique into the product of an analytic function $w_{c}(\theta)$ that is exclusively dependent on $\theta$ and a phase space dependent function $f_{c}(x)$, summed over $c$ components,~\cite{Brehmer:2018hga,Brehmer:2019xox} \begin{equation} \begin{split} |\mathcal{M}|^{2} = & \sum_{c} ~w_{c}(\theta) \cdot f_{c}(x). \end{split} \end{equation} Here, the $f_{c}(x)$ are not necessarily positive or normalized distributions. The number of components $c$ is equal to the number of elements in Eq.~(\ref{eq:matrix_squared_element}), which also defines the number of signal benchmarks that form the morphing basis. Once the parton level event weights~(or matrix squared elements) are computed at these $c$ signal benchmarks, the ``morphing setup" can evaluate the event weights at any given $\theta$. In the present study, $\theta_{i}$ has two components, $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$. Thereby, the morphing basis would include 6 components~(or signal benchmarks with different $\theta$) if new physics effects are considered at the production level only. Since $\mathcal{C}_{tW}$ also affects top decay, the morphing basis consists of 12 benchmarks. Accordingly, we generate event samples for $t\bar{t}h$, $tWZ$, $t\bar{t}\gamma$ and $t\bar{t}h$ processes at 12 different benchmark values of $\theta$. \texttt{MadMiner} utilizes the event weights for these 12 benchmarks to interpolate the event weights in the $\{\mathcal{C}_{tZ},\mathcal{C}_{tW}\}$ plane through the morphing setup. We consider squared and quartic ansatz for $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$, respectively, in the morphing technique. The squared ansatz for $\mathcal{C}_{tZ}$ is prompted by its contribution at the production level only while $\mathcal{C}_{tW}$ contributes both at production and decay level actuating the quartic ansatz. We generate $10^{6}$ events for each of the aforesaid processes and reconstruct all of the observables in Eq.~(\ref{eqn:ttz_observables}). We consider a fully connected neural network with 3 hidden layers each containing 100 nodes. Training is performed using the \texttt{ALICES} algorithm~\cite{Stoye:2018ovl} over 120 epochs. The ALICES loss functional depends on both the joint likelihood ratio $r(x,z|\theta,\theta_{SM})$ and the joint score $t(x,z|\theta_{0})$ to maximize the inclusion of information that can be obtained from the MC event samples simulated at the detector level. The relative weights of the terms in the \texttt{ALICES} loss functional that depend on the joint score and the joint likelihood ratio is parametrized by the hyperparameter $\alpha$, which we set equal to 1. We employ a batch size of 128, the tanh activation function, and Adam optimization, with a learning rate that exponentially decays from $10^{-4}$ to $10^{-5}$. \begin{figure}[!t] \centering \includegraphics[scale=0.30]{figures/ttz_2d_comp_ALICES.pdf} \caption{Projected sensitivity using MadMiner in the $\{\mathcal{C}_{tZ},\mathcal{C}_{tW}\}$ plane from searches in the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j $ channel at the 13~TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$.} \label{fig:ttz_madminer_projection} \end{figure} In Fig.~\ref{fig:ttz_madminer_projection}, we present the projection contours in the $\{\mathcal{C}_{tZ},\mathcal{C}_{tW}\}$ plane from searches in the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ channel at the HL-LHC using \texttt{MadMiner}. The estimated likelihood ratio is used to draw the 2d contour in Fig.~\ref{fig:ttz_madminer_projection} as a function of $\theta = \{\mathcal{C}_{tZ},\mathcal{C}_{tW}\}$. In order to set 1d limits along the direction of $\mathcal{C}_{tZ}$ or $\mathcal{C}_{tW}$, we profile the estimated event likelihood ratio over the other theory parameter. We present the 1d projection limits for $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$ in the central and right panels of Fig.~\ref{fig:ttz_limits}, respectively. The projected sensitivity for $\mathcal{C}_{tZ}$ reaches up to $-0.41\lesssim \mathcal{C}_{tZ} \lesssim 0.47$ at $95\%$ CL. We note that the \texttt{MadMiner} analysis showcases a marginal improvement over the projected limits from the DNN analysis~($-0.45\lesssim \mathcal{C}_{tZ} \lesssim 0.48$ at $2\sigma$) and roughly $(5-10)\%$ improvement over the cut-based results~($-0.49\lesssim \mathcal{C}_{tZ} \lesssim 0.51$ at $2\sigma$). As discussed previously, the differential distributions in the $pp \to t\bar{t}Z + tWZ$ channel at the HL-LHC display a sizeable sensitivity to $\mathcal{C}_{tZ}$. Correspondingly, their inclusion in addition to the rate measurements help in boosting new physics sensitivity. The cut-and-count analysis leads to an improvement of roughly $1.5\%$ and $25\%$ in $\sigma_s^{NP}$ for $\mathcal{C}_{tZ} = 2.0$ and 0.5, respectively, compared to pure rate measurements. Typically, we would expect the machine learning techniques to be more efficient in unveiling BSM effects in correlated multi-dimensional feature space than conventional cut-and-count methods. For example, the DNN methodology leads to roughly $5\%$~($35\%$) improvement in the projected sensitivity over rate measurements for $\mathcal{C}_{tZ}=2.0~(0.5)$. On the contrary, the cut-and-count optimization and machine learning techniques lead to only $\lesssim 5\%$ enhancement in signal significance over rate-only measurements for the various $\mathcal{C}_{tW}$ benchmarks. This behavior is expected since the differential measurements in the $pp \to t\bar{t}Z+tWZ \to 3\ell + 2b\ + \geq 2j$ channel displays only minuscule sensitivity to $\mathcal{C}_{tW}$. Furthermore, in the $\mathcal{C}_{tW}$ scenario, all three analysis techniques considered in the present study lead to similar sensitivities, \texttt{MadMiner:} $-0.19 \lesssim \mathcal{C}_{tW} \lesssim 0.16$ at $95\%$ CL, DNN: $-0.19 \lesssim \mathcal{C}_{tW} \lesssim 0.15$ at $2\sigma$, and cut-based: $-0.18 \lesssim \mathcal{C}_{tW} \lesssim 0.18$ at $2\sigma$. \subsection{$pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$} \label{sec:pp_tzj_intro} \begin{figure*}[!ht] \centering \includegraphics[scale=0.23]{figures/tzj_OtZ_HT.pdf}\includegraphics[scale=0.23]{figures/tzj_OtZ_pt_z.pdf}\includegraphics[scale=0.23]{figures/tzj_OtZ_dRmin_top_l.pdf} \caption{Distributions for the scalar sum of the transverse momenta of all visible final state objects $H_{T}$~(left), transverse momentum of the $Z$ boson $p_{T,Z}$~(center), and minimum $\Delta R$ separation between the top and lepton pair $\Delta R_{t\ell}^{\mathrm{min}}$~(right). The distributions correspond to SMEFT $tZj$~(red solid), $t\bar{t}Z$~(black solid) and $tWZ$~(blue solid) processes with $\mathcal{C}_{tZ}=2.0$. SM distributions for $tZj$~(red dashed), $t\bar{t}Z$~(black dashed), $tWZ$~(blue dashed) and $WZ+\mathrm{jets}$~(green dashed) are also shown. The distributions are presented at the detector level assuming $\sqrt{s}=13~$TeV at the LHC.} \label{fig:tzj_OtZ_distributions} \end{figure*} \begin{figure*}[!ht] \centering \includegraphics[scale=0.27]{figures/tzj_OtW_HT.pdf}\hspace{2.0cm}\includegraphics[scale=0.27]{figures/tzj_OtW_dRmin_top_l.pdf}\\ \includegraphics[scale=0.27]{figures/tzj_OtW_pt_z.pdf}\hspace{2.0cm}\includegraphics[scale=0.27]{figures/tzj_OtW_deta_bj.pdf} \caption{\textit{Top panels:} Distributions for the scalar sum of the transverse momenta of all visible final state objects $H_{T}$~(left), and minimum $\Delta R$ separation between the top and lepton pair $\Delta R_{t\ell}^{\mathrm{min}}$~(right). \textit{Bottom panels:} Distributions for transverse momentum of the $Z$ boson $p_{T,Z}$~(left), and difference between pseudorapidities of the $b$ tagged jet from top decay and the recoil jet $\Delta\eta_{bj_{r}}$~(right). The distributions correspond to SMEFT $tZj$~(red), $t\bar{t}Z$~(black solid) and $tWZ$~(blue solid) with $\mathcal{C}_{tW}=0.72$, SM $tZj$~(red dashed), $t\bar{t}Z$~(black dashed), $tWZ$~(blue dashed) and $WZ+\mathrm{jets}$~(green dashed). The results are shown at detector level for the LHC with $\sqrt{s}=13~$TeV.} \label{fig:tzj_OtW_distributions} \end{figure*} In this section we focus on the leptonic decay mode for $tZj$: $pp \to tZj \to (t \to \ell\nu b)(Z \to \ell\ell)j$. Other top electroweak processes, notably $t\bar{t}Z$ and $tWZ$ production, can also contribute to this final state. These processes would be affected by $\mathcal{O}_{tZ}$ and $\mathcal{O}_{tW}$, and we consider new physics modifications from SMEFT operators to them as part of our signal. The dominant background sources are SM $tZj$, $WZ +\ \mathrm{jets}$, $t\bar{t}Z$ and $tWZ$, while sub-dominant contributions can arise from $t\bar{t}\gamma$, $t\bar{t}h$ and $VVV~(V=W,Z)$. We ignore new physics modifications to $t\bar{t}\gamma$ and $t\bar{t}h$ since their relative production rates are considerably smaller compared to $tZj$ and $t\bar{t}Z$. We select events containing exactly three isolated leptons, one $b$ tagged jet, and one or two light jets. The individual particles are required to pass the selection criteria in Eq.~(\ref{eqn:obj_selection_ttz}). Additionally, the leading~(sub-leading) lepton is required to have $p_{T} > 40$~GeV~(25~GeV). We follow the strategy adopted in Sec.~\ref{sec:pp_ttz_intro} to reconstruct the $Z$ boson and identify the lepton $\ell_{W}$ associated with top decay. The unknown $\slashed{p}_{z}$ is computed by constraining the invariant mass of $\ell_{W}$ and the unobservable $\nu$ with the on-shell $W$ boson mass. Events which lead to zero solutions for $\slashed{p}_{z}$ are rejected. In cases with two solutions, we choose the solution that minimizes ${(m_{l_{t}\nu b} - m_{t})}^{2}$. The last missing piece of our event topology is the light jet $j_{r}$ that recoils against the $tZ$ system. We identify the leading jet that is not $b$ tagged as this jet. We reconstruct various kinematic observables in the laboratory frame, and center of mass frames of the $W$, $t$ and $tZj_{r}$, to discriminate the new physics signal from background. The observables are listed below: \begin{equation} \begin{aligned} \theta^{\star W}_{\alpha_W} \{\alpha_W = \ell_{W}, \nu\}, \theta^{\star t}_{\beta} \{\beta = \ell_{W},\nu,b\},\\ \theta^{\star tzj_{r}}_{\epsilon} \{\epsilon = \ell_{1},\ell_{2},\ell_{W},\nu,b,j_{r},t\},\\ p_{T,\zeta}, \eta_{\zeta}, \phi_{\zeta}, E_{\zeta}~\{\zeta = \epsilon,Z,tZ,tZj_{r}\}, \\ m_{k}~\{k = Z,t,tZ,tZj_{r}\}, m_{\ell_{1}\ell_2 \ell_{W}}, m_{jj}^{\mathrm{max}},\\ \Delta \phi_{\xi\rho}~\{\xi=\ell_{1},\ell_{2},Z; \rho=\ell_{W},b,j_{r}\}, \Delta \phi_{\ell_{W}j_{r}},\\ \Delta \phi_{\ell_{W} Z}^{tZj_{r}},\Delta \phi_{\ell\ell}^{\mathrm{max}}~\{\ell = \ell_{1},\ell_{2},\ell_{W}\}, \Delta R_{\ell b}^{\mathrm{min}}, \Delta R_{t\ell}^{\mathrm{min}}\\ m_{T,l_{W}},m_{T,tZ},p_{T, jj}^{\mathrm{max}},p_{T,jb}, p_{T,bj_{r}}, H_{T}. \label{eqn:tzj_observables} \end{aligned} \end{equation} Here, $\alpha_{W}$ and $\beta$ denote the decay products of the $W$ and top respectively, $\ell_{1}$ and $\ell_{2}$ form the SFOS lepton pair that constitutes the $Z$ boson, $\theta^{\star i}_{k}$ is the angle between particle $k$ and the beam direction in the rest frame of particle $i$, $m_{\ell_{1}\ell_{2}\ell_{W}}$ is the invariant mass of the three leptons in the final state, and $\Delta \phi_{mn}^{tZj_{r}}$ represents the azimuthal angle difference between $m$ and $n$ in the rest frame of $tZj_{r}$. The other variables in Eq.~\ref{eqn:tzj_observables} have their usual meanings. \begin{table}[!htb] \centering\scalebox{0.7}{ \begin{tabular}{|c||c|c|c|} \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=2.0$}\\\cline{2-4} Optimized & $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & - & 200~GeV & 3.0 \\ \hline SMEFT $tZj$ & 3362 & 393 & 385 \\ SMEFT $t\bar{t}Z$ & 3955 & 1204 & 1192 \\ SMEFT $tWZ$ & 446 & 113 & 111 \\ $tZj$ & 3190 & 278 & 270\\ $t\bar{t}Z$ & 2924 & 664 & 654 \\ $tWZ$ & 383 & 70.9 & 69.5\\ $WZ$ & 6482 & 731 & 707 \\ $t\bar{t}\gamma$ & 21.2 & 3.0 & 3.0\\ \hline Significance & 11.10 & 16.68 & 16.83 \\\hline \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=1.5$}\\ \cline{2-4} Optimized & $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & - & 250~GeV & 2.5 \\ \hline SMEFT $tZj$ & 3312 & 197 & 183 \\ SMEFT $t\bar{t}Z$ & 3515 & 587 & 562 \\ SMEFT $tWZ$ & 415 & 59.9 & 57.0 \\ $tZj$ & 3190 & 145 & 133\\ $t\bar{t}Z$ & 2924 & 375 & 356 \\ $tWZ$ & 383 & 40.4 & 38.2\\ $WZ$ & 6482 & 380 & 344\\ $t\bar{t}\gamma$ & 21.2 & 1.6 & 1.5\\ \hline Significance & 6.53 & 9.24 & 9.30 \\\hline \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=1.0$}\\ \cline{2-4} Optimized & $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & 450~GeV & 250~GeV & 2.75 \\ \hline SMEFT $tZj$ & 613 & 165 & 158 \\ SMEFT $t\bar{t}Z$ & 921 & 455 & 436 \\ SMEFT $tWZ$ & 118 & 45.3 & 43.3 \\ $tZj$ & 584 & 139 & 132\\ $t\bar{t}Z$ & 783 & 348 & 331 \\ $tWZ$ & 108 & 38.4 & 36.4 \\ $WZ$ & 1497 & 367 & 337 \\ $t\bar{t}\gamma$ & 4.0 & 1.5 & 1.4\\ \hline Significance & 3.24 & 4.68 & 5.00 \\\hline \hline & \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=0.5$}\\ \cline{2-4} Optimized & $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & 450~GeV & 250~GeV & 0.75 \\ \hline SMEFT $tZj$ & 578 & 138 & 55 \\ SMEFT $t\bar{t}Z$ & 815 & 380 & 167 \\ SMEFT $tWZ$ & 109 & 41.2 & 17.6 \\ $tZj$ & 584 & 139 & 49.2 \\ $t\bar{t}Z$ & 783 & 348 & 146 \\ $tWZ$ & 108 & 38.5 & 16.8\\ $WZ$ & 1497 & 367 & 120\\ $t\bar{t}\gamma$ & 4.0 & 1.5 & 0.6 \\ \hline Significance & 0.49 & 1.06 & 1.51 \\\hline \hline \end{tabular} \begin{tabular}{|c|c|c|} \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=-2.0$}\\\hline $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ 350~GeV & 250~GeV & 2.0 \\ \hline 1410 & 250 & 220 \\ 2329 & 771 & 693 \\ 256 & 76.9 & 68.6 \\ 1205 & 145 & 119\\ 1519 & 375 & 330 \\ 197 & 40.4 & 34.9\\ 2776 & 380 & 300 \\ 8.9 & 1.6 & 1.4\\ \hline 14.22 & 17.51 & 17.76 \\\hline \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=-1.5$}\\\hline $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ 350~GeV & 200~GeV & 2.5 \\ \hline 1324 & 351 & 325 \\ 1997 & 973 & 927 \\ 231 & 95.6 & 90.2 \\ 1205 & 273 & 249\\ 1519 & 653 & 616 \\ 197 & 69.8 & 65.5\\ 2776 & 727 & 655 \\ 8.9 & 3.0 & 2.9 \\ \hline 8.35 & 10.20 & 10.33 \\\hline \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=-1.0$}\\\hline $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta \eta_{bj_{r}}$ $<$ \\ 350~GeV & 200~GeV & 4.75 \\ \hline 1260 & 313 & 289 \\ 1696 & 774 & 771 \\ 207 & 80.6 & 80.1 \\ 1205 & 274 & 251 \\ 1519 & 653 & 648 \\ 197 & 69.8 & 69.2 \\ 2776 & 727 & 704\\ 8.9 & 3.0 & 2.9 \\ \hline 3.20 & 4.11 & 4.20 \\\hline \hline \multicolumn{3}{|c|}{$\mathcal{C}_{tZ}=-0.5$}\\\hline $H_{T}~$ $>$ & $p_{T,Z}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ 450~GeV & 250~GeV & 0.75 \\ \hline 597 & 142 & 55 \\ 801 & 370 & 154 \\ 112 & 40.2 & 16.3 \\ 584 & 139 & 48.6\\ 783 & 348 & 136 \\ 108 & 38.4 & 16.0 \\ 1497 & 367 & 116 \\ 4.0 & 1.5 & 0.6 \\ \hline 0.64 & 0.90 & 1.38 \\\hline \hline \end{tabular}} \caption{Optimized selection cuts on $H_{T}$, $p_{T,Z}$ and $\Delta R_{t\ell}^{\mathrm{min}}$, applied successively, to maximize the signal significance $\sigma_{s}^{NP}$ for SMEFT signal benchmarks with $\{\mathcal{C}_{tZ} = \pm 2.0, \pm 1.5, \pm 1.0, \pm 0.5\}$ through searches in $pp \to tZj+ t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j $ channel at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The optimized cuts, signal and background yields, and $\sigma_{s}^{NP}$ values are shown. No cuts are applied on $H_{T}$ in the signal regions optimized for $\mathcal{C}_{tZ}=2.0$ and 1.5.} \label{tab:tzj_OtZ_cut_flow} \end{table} \begin{table}[!htb] \centering\scalebox{0.85}{ \begin{tabular}{|c||c|c|} \hline & \multicolumn{2}{|c|}{$\mathcal{C}_{tW}=0.72$}\\\cline{2-3} Optimized & $H_{T}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & - & 3.0 \\ \hline SMEFT $tZj$ & 3743 & 3578 \\ SMEFT $t\bar{t}Z$ & 3697 & 3596 \\ SMEFT $tWZ$ & 436 & 423 \\ $tZj$ & 3185 & 3030 \\ $t\bar{t}Z$ & 2935 & 2848\\ $tWZ$ & 377 & 364 \\ $WZ$ & 6483 & 6132 \\ $t\bar{t}\gamma$ & 21.2 & 20.4 \\ \hline Significance & 12.1 & 12.2 \\\hline \hline & \multicolumn{2}{|c|}{$\mathcal{C}_{tW}=0.48$}\\\cline{2-3} Optimized & $H_{T}~$ $>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & 200~GeV & 3.75 \\ \hline SMEFT $tZj$ & 3352 & 3331 \\ SMEFT $t\bar{t}Z$ & 3414 & 3400 \\ SMEFT $tWZ$ & 393 & 391 \\ $tZj$ & 3038 & 3016 \\ $t\bar{t}Z$ & 2881 & 2867 \\ $tWZ$ & 368 & 366 \\ $WZ$ & 6166 & 6096 \\ $t\bar{t}\gamma$ & 20.1 & 20.0 \\ \hline Significance & 7.81 & 7.85 \\\hline \hline & \multicolumn{2}{|c|}{$\mathcal{C}_{tW}=0.24$}\\\cline{2-3} Optimized & $H_{T}~>$ & $\Delta R_{t\ell}^{\mathrm{min}}$ $<$ \\ cuts & 150~GeV & 3.25 \\ \hline SMEFT $tZj$ & 3377 & 3292 \\ SMEFT $t\bar{t}Z$ & 3212 & 3163 \\ SMEFT $tWZ$ & 387 & 381\\ $tZj$ & 3184 & 3099\\ $t\bar{t}Z$ & 2935 & 2888\\ $tWZ$ & 377 & 370 \\ $WZ$ & 6479 & 6278 \\ $t\bar{t}\gamma$ & 21.2 & 20.8 \\ \hline Significance & 4.21 & 4.24 \\\hline \hline \end{tabular} \begin{tabular}{|c|c|} \hline \multicolumn{2}{|c|}{$\mathcal{C}_{tW}=-0.72$}\\\hline $H_{T}~$ & $\Delta \eta_{bj_r}$ $<$ \\ 150~GeV & 4.0 \\ \hline 2972 & 2322 \\ 2330 & 2297 \\ 397 & 389 \\ 3184 & 2515 \\ 2935 & 2889 \\ 377 & 371\\ 6479 & 5825 \\ 21.2 & 20.9\\ \hline 6.98 & 7.10 \\\hline \hline \multicolumn{2}{|c|}{$\mathcal{C}_{tW}=-0.48$}\\\hline $H_{T}~>$ & $\Delta \eta_{bj_r}$ $<$ \\ 150~GeV & 5.0 \\ \hline 3002 & 2768 \\ 2541 & 2533 \\ 388 & 386 \\ 3184 & 2950 \\ 2935 & 2925 \\ 378 & 376 \\ 6479 & 6284 \\ 21.2 & 21.1 \\ \hline 4.96 & 5.03 \\\hline \hline \multicolumn{2}{|c|}{$\mathcal{C}_{tW}=-0.24$}\\\hline $H_{T}~$ $>$ & $\Delta \eta_{bj_{r}}$ $<$ \\ 150~GeV & 2.5 \\ \hline 3105 & 1364 \\ 2706 & 2410 \\ 378 & 338 \\ 3184 & 1406 \\ 2935 & 2627 \\ 377 & 339 \\ 6479 & 4314 \\ 21.2 & 18.9 \\ \hline 2.69 & 2.78 \\\hline \hline \end{tabular}} \caption{Optimized selection cuts on $H_{T}$, and $\Delta R_{t\ell}^{\mathrm{min}}$ or $\Delta \eta_{bj_{r}}$, applied successively, to maximize the signal significance $\sigma_{s}$ for SMEFT signal benchmarks with $\{\mathcal{C}_{tW} = \pm 0.72, \pm 0.48, \pm 0.24, \pm 0.12\}$ through searches in $pp \to tZj+ t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j $ channel at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The optimized cuts, signal and background yields, and $\sigma_{s}$ values are shown. No cuts are applied on $H_{T}$ in the signal region optimized for $\mathcal{C}_{tW} = 0.72$.} \label{tab:tzj_OtW_cut_flow} \end{table} We first perform a cut-based analysis to estimate the projected sensitivity for $\mathcal{C}_{tZ}$ by optimizing the selection cuts on $H_{T}$, $p_{T,Z}$ and $\Delta R_{tl}^{\mathrm{min}}$. Several other observable subsets from Eq.~(\ref{eqn:tzj_observables}) are also considered for the cut-based analysis; however, the combination of $\{H_{T},~p_{T,Z},~\Delta R_{tl}^{\mathrm{min}}\}$ leads to the best sensitivity. The optimization is performed for the 8 signal benchmarks considered in Sec.~\ref{sec:pp_ttz_intro}. We illustrate the distributions for $H_{T}$, $p_{T,Z}$ and $\Delta R_{tl}^{\mathrm{min}}$ at the detector level in Fig.~\ref{fig:tzj_OtZ_distributions}. The red, black and blue solid lines represent SMEFT $tZj$, $t\bar{t}Z$ and $tWZ$ events, respectively, for $\mathcal{C}_{tZ} = 2.0$, while the dashed lines represent the respective SM processes. The distributions for the $WZ+\mathrm{jets}$ background are presented as green dashed lines. In the bottom panel of the respective figures, the ratio SMEFT/SM is displayed. We observe that this ratio increases in the tails of the $H_{T}$ and $p_{T,Z}$ distributions for $tZj$, $t\bar{t}Z$, as well as for $tWZ$. Based on the distributions for $H_{T}$ and $p_{T,Z}$ in Fig.~\ref{fig:tzj_OtZ_distributions}, the significance is likely to be enhanced in the boosted $Z$ regime. In addition, since the top quark recoils against the $Z$ boson, a boosted $Z$ would also imply a boosted top and $j_{r}$ system. Consequently, since the azimuthal angle difference between the decay products of the top is inversely correlated with its boost, going to low $\Delta R_{t\ell}^{\mathrm{min}}$ would also be effective in discriminating the SMEFT signal; generally, we expect that the final state lepton with the smallest $\Delta R$ separation from the top would be $\ell_{W}$. This effect leads to the ratio SMEFT/SM becoming greater than 1 in Fig.~\ref{fig:tzj_OtZ_distributions} for $\Delta R_{t\ell}^{\mathrm{min}} \lesssim 0.7$. We further note that for $p_{T,Z} \gtrsim 500~$GeV, the SMEFT contributions are larger than SM by at least a factor of 2. However, this high $p_{T}$ region is also marred by relatively larger statistical fluctuations as illustrated by the error bars in the bottom panel of the respective figure. In Table~\ref{tab:tzj_OtZ_cut_flow}, we present optimized cuts on $H_{T}$, $p_{T,Z}$, and $\Delta R_{tl}^{\mathrm{min}}$ that maximize $\sigma_{S}^{NP}$ in the present search channel for $\mathcal{C}_{tZ} = \pm 2.0, \pm 1.5, \pm 1.0,$ and $\pm 0.5$. As discussed previously, the optimized signal regions feature a strong lower cut on $H_{T}$ and/or $p_{T,Z}$, as well as an upper cut on $\Delta R_{t\ell}^{\mathrm{min}}$. We observe that $\sigma_{S}^{NP} = 1.51$~(1.38) for $\mathcal{C}_{tZ} = 0.5$~(-0.5), improving to 9.30~(10.33) for $\mathcal{C}_{tZ} = 1.5$~(-1.5). The variation of $\sigma_{S}^{NP}$ with $\mathcal{C}_{tZ}$ is presented in Fig.~\ref{fig:tzj_limits} as the blue solid line. We observe that the projected $2\sigma$ sensitivity for $\mathcal{O}_{tZ}$ from searches in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel at the HL-LHC reaches up to $-0.65 \lesssim \mathcal{C}_{tZ} \lesssim 0.58$. A similar strategy is followed to estimate the sensitivity for $\mathcal{O}_{tW}$. Here again, we consider 6 signal benchmarks similar to that in Sec.~\ref{sec:pp_ttz_intro}. The cut-based optimization is performed for several subsets of observables from Eq.~(\ref{eqn:tzj_observables}). The strongest sensitivity is obtained for the subset $\{H_{T}, \Delta R_{t\ell}^{\mathrm{min}}, \Delta \eta_{bj_{r}}\}$. Comparable sensitivity is observed for the subset $\{p_{T,Z}, \Delta R_{t\ell}^{\mathrm{min}}, \Delta \eta_{bj_{r}}\}$. We illustrate their distributions at the detector-level for SMEFT $tZj, t\bar{t}Z$ and $tWZ$ with $\mathcal{C}_{tW}=0.72$, and their SM counterparts, in Fig.~\ref{fig:tzj_OtW_distributions}. The color codes are adopted from Fig.~\ref{fig:tzj_OtZ_distributions}. As before, the SMEFT/SM ratio remains $\sim 1$ throughout for $t\bar{t}Z$. On the other hand, both $tZj$ and $tWZ$ have their kinematics affected by the new physics, with SMEFT/SM $\gtrsim 1$ in the tails of the $H_{T}$ and $p_{T,Z}$ distributions, as well as at smaller values of $\Delta R_{t\ell}^{min}$. Simultaneously, the tail of the $\Delta \eta_{bj_{r}}$ distribution for $WZ+\mathrm{jets}$ falls slowly when compared to that for $t\bar{t}Z$, suggesting that the rapidity gap between the $b$ jet and the recoiling light flavor jet can be used to reduce the $WZ+\mathrm{jets}$ background. We optimize the selection cuts on our selected observables in order to maximize the signal significance. The cut flows for our final selections are shown in Table~\ref{tab:tzj_OtW_cut_flow}. We note that after adjusting cuts on the other observables, notably $H_T$, the $Z$ transverse momentum does not provide any additional sensitivity. Thus, we omit $p_{T,Z}$ from Table~\ref{tab:tzj_OtW_cut_flow} and display the sensitivity after cuts on $H_T$, $\Delta R^{\mathrm{min}}_{t\ell}$ and $\Delta \eta_{b j_r}$. As for the $3\ell + 2b\ + \geq 2j$ channel in the previous subsection, kinematic cuts alone provide limited increase in sensitivity to $\mathcal{O}_{tW}$. Having performed the cut-based optimization, we next turn our attention to a multivariate DNN analysis. To begin, we follow a strategy similar to that in Sec.~\ref{sec:pp_ttz_intro} with similar training hyperparameters. The training dataset is constituted of pure EFT $tZj$ and $t\bar{t}Z$ events, as well as SM $tZj$, $t\bar{t}Z$, and $WZ+\mathrm{jets}$ events. Pure EFT $tWZ$ events are not included in the training dataset due to sub-dominant rates. The pure EFT events are assigned a score of 1 while SM events are given a score of 0. We train the DNN as a classification model. The test dataset includes SMEFT $tZj$, $t\bar{t}Z$, $tWZ$, and SM $tZj$, $t\bar{t}Z$, $tWZ$, $WZ+\mathrm{jets}$ and $t\bar{t}\gamma$. As before, in the training dataset new physics effects are included only at the production level, and not in decay. However, new physics modifications are included in both production and top decay in the test dataset. The goal of the DNN model is to improve the difference between SMEFT events and their respective SM counterparts. The projected sensitivity obtained through this strategy is more or less comparable to that from cut-based optimization in the same channel~(Tables~\ref{tab:tzj_OtZ_cut_flow} and~\ref{tab:tzj_OtW_cut_flow}). The lack of improvement in the performance of the DNN when compared to the cut-based analysis could be partly ascribed to the imperfections in the training dataset as discussed in Sec.~\ref{sec:pp_ttz_intro}. Secondly, the DNN has to simultaneously learn the distinct features emerging from the presence of EFT operators in two different signal processes $viz$ $tZj$ and $t\bar{t}Z$, the two of which comprise the dominant contribution to the NP signal. Using this observation to our advantage, we follow a slightly different approach in the DNN analysis. Instead of training a single network, we train two distinct DNNs, \begin{itemize} \item{$NN_{tZj}$}: trained to discriminate SMEFT $tZj$ events from SM backgrounds; training dataset includes pure EFT $tZj$, and SM $tZj$, $t\bar{t}Z$ and $WZ+\mathrm{jets}$ events. We note that it does not include pure EFT $t\bar{t}Z$ events. \item{$NN_{t\bar{t}Z}$}: trained to discriminate SMEFT $t\bar{t}Z$ events from SM backgrounds; the model is trained on pure EFT $t\bar{t}Z$ events, and SM $tZj$, $t\bar{t}Z$ and $WZ+\mathrm{jets}$ events only. \end{itemize} To quantify the gain in using networks targeting the influence of $tZj$ ad $t\bar{t}Z$ separately, we compute the F1 score, \begin{equation} \mathrm{F1} = \frac{2\cdot(R*P)}{R+P} \end{equation} where the recall $R$ is the fraction of signal events that are predicted by the model to be signal-like, and the precision $P$ is the fraction of true signal events among all events that are predicted to be signal-like. A higher F1 score indicates better classifier performance. For the purpose of illustrating the benefit of multiple networks, we calculate the recall and precision of each network using a cutoff of 0.5, i.e.~taking events with a score of $\geq 0.5\ (< 0.5)$ to be classified as signal (background) by a given network. With this definition, the F1 scores for $NN_{tZj}$ and $NN_{t\bar{t}Z}$ are in the range of $\sim 0.2~$-$~0.3$ and $\sim 0.3~$-$~0.4$ across all signal benchmarks corresponding to different values of $\mathcal{C}_{tZ}$. By comparison, when training a single DNN to separate all SMEFT events from SM backgrounds, the F1 scores are smaller, typically in the range of $\sim 0.1~$-$~0.2$. This demonstrates the improvement that can be obtained with networks dedicated to capturing the effect of SMEFT operators in separate processes. Then, the trained DNN models $NN_{tZj}$ and $NN_{t\bar{t}Z}$ are applied to the test dataset comprised of SMEFT $tZj$, $t\bar{t}Z$, $tWZ$ events, and all SM backgrounds $viz$ $tZj$, $t\bar{t}Z$, $tWZ$, $WZ+\mathrm{jets}$ and $t\bar{t}\gamma$. Rather than specifying a particular DNN score cutoff as for the F1 score comparison above, for our final analysis we identify the DNN scores $\alpha^{\prime} = \{\alpha_{tZj}, \alpha_{t\bar{t}Z}\}$ which maximize the signal significance $\sigma_{S}^{NP\star}$, \begin{equation} \sigma_{S}^{NP\star}(\alpha^{\prime}) = \frac{S_{SMEFT}^{\star}(\alpha^{\prime}) - S_{SM}^{\star}(\alpha^{\prime})}{\sqrt{B^{\star}(\alpha^{\prime})}}, \label{eq:tzj_DNN_significance} \end{equation} where \begin{equation} \begin{split} S_{SMEFT}^{\star}(\alpha^{\prime}) = \sum_{i} S_{SMEFT}^{i \star}(\alpha^{\prime}), \\ S_{SM}^{\star}(\alpha^{\prime}) = \sum_{i} S_{SM}^{i \star}(\alpha^{\prime}),~ B^{\star}(\alpha^{\prime}) = \sum_{k} S_{SM}^{k \star}(\alpha^{\prime}); \\ \{i=tZj,t\bar{t}Z,tWZ\},\{k=i,t\bar{t}\gamma, WZ+\mathrm{jets}\}. \label{eq:tzj_DNN_1} \end{split} \end{equation} In Eq.~(\ref{eq:tzj_DNN_1}), $S_{SMEFT}^{i \star}(\alpha^{\prime})$ and $S_{SM}^{k \star}(\alpha^{\prime})$ are computed in the following way, \begin{equation} \begin{split} S_{SMEFT}^{i \star}(\alpha^{\prime}) = {NN}_{tZj}^{\alpha_{tZj}}(S_{SMEFT}^{i\star}) + {NN}_{t\bar{t}Z}^{\alpha_{t\bar{t}Z}}(S_{SMEFT}^{i\star}) \\ S_{SM}^{k \star}(\alpha) = {NN}_{tZk}^{\alpha_{tZj}}(S_{SM}^{k\star})+{NN}_{t\bar{t}Z}^{\alpha_{t\bar{t}Z}}(S_{SM}^{k\star}), \label{eq:tzj_DNN_2} \end{split} \end{equation} where, ${NN}_{tZj}^{\alpha_{tZj}}(S_{SMEFT}^{i\star})$ and ${NN}_{tZj}^{\alpha_{tZj}}(S_{SM}^{k\star})$ represent the number of events at the HL-LHC for the SMEFT process $i$~($i=tZj$, $t\bar{t}Z$, $tWZ$) and SM process $k$~($k=i,t\bar{t}\gamma, WZ+\mathrm{jets}$), respectively, with DNN output score greater than $\alpha_{tZj}$ after being passed through $NN_{tZj}$. Similarly, ${NN}_{t\bar{t}Z}^{\alpha_{t\bar{t}Z}}(S_{SMEFT}^{i\star})$ and ${NN}_{t\bar{t}Z}^{\alpha_{t\bar{t}Z}}(S_{SM}^{k\star})$ denote the respective event rates with DNN score greater than $\alpha_{t\bar{t}Z}$ when subjected to $NN_{t\bar{t}Z}$. The SMEFT signal yield for process $i$, $S_{SMEFT}^{i\star}(\alpha^{\prime} = \{\alpha_{tZj}, \alpha_{t\bar{t}Z}\})$~(c.f. Eq.~(\ref{eq:tzj_DNN_2})), is computed by adding the event rates for SMEFT process $i$ with DNN score $\geq \alpha_{tZj}$ and $\geq \alpha_{t\bar{t}Z}$ when subjected to $NN_{tZj}$ and $NN_{t\bar{t}Z}$, respectively. This is equivalent to summing the contributions from two signal regions, each of which is trained with distinct neural networks, $NN_{tZj}$ and $NN_{t\bar{t}Z}$. The total signal yields for the SM processes $k$ are also computed in a similar manner. We then employ Eq.~(\ref{eq:tzj_DNN_significance}) to compute the signal significance $\sigma_{S}^{NP\star}$. In Table~\ref{tab:tzj_OtZ_DNN}, we present the event rates $S^{i\star}_{SMEFT}$ and $S^{k\star}_{SM}$ at the HL-LHC for the optimized DNN score $\alpha^{\prime}$ that maximizes the signal significance $\sigma_{S}^{NP\star}$ for 8 signal benchmarks for $\mathcal{C}_{tZ}$ considered in Sec.~\ref{sec:pp_ttz_intro}. Separate $NN_{tZj}$ and $NN_{t\bar{t}Z}$ models are trained at each of these benchmarks. We follow an analogous strategy for $\mathcal{C}_{tW}$ where we consider 6 signal benchmarks similar to that in Sec.~\ref{sec:pp_ttz_intro}. The optimized signal and background event rates along with signal significance values are presented in Table~\ref{tab:tzj_OtW_DNN}. \begin{table}[!t] \centering\scalebox{0.83}{ \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{$\mathcal{C}_{tZ}$} & \multirow{2}{*}{$NN$} & \multicolumn{3}{c|}{$S_{SMEFT}^{\star}~(\alpha)$} & \multicolumn{5}{c|}{$S_{SM}^{\star}(\alpha)$} & \multirow{2}{*}{$\alpha^{\prime}$} & \multirow{2}{*}{$\sigma_{S}^{NP\star}$} \\ \cline{3-10} & & $tZj$ & $t\bar{t}Z$ & $tWZ$ & $tZj$ & $t\bar{t}Z$ & $tWZ$ & $WZ$ & $t\bar{t}\gamma$ & & \\ \hline \multirow{2}{*}{2.0} & $NN_{tZj}$ & 287 & 140 & 16.0 & 177 & 65.8 & 9.9 & 244 & 0.4 & 0.63 & \multirow{2}{*}{18.3} \\ & $NN_{t\bar{t}Z}$ & 143 & 1557 & 153 & 97.8 & 926 & 107.6 & 838 & 5.1 & 0.46 & \\ \hline \multirow{2}{*}{1.5} & $NN_{tZj}$ & 171 & 66.2 & 9.0 & 114 & 42.0 & 6.3 & 165 & 0.2 & 0.7 & \multirow{2}{*}{9.94} \\ & $NN_{t\bar{t}Z}$ & 200 & 1810 & 191 & 167 & 1380 & 162 & 1316 & 8.1 & 0.4 & \\ \hline \multirow{2}{*}{1.0} & $NN_{tZj}$ & 184 & 79.0 & 9.5 & 156 & 56.9 & 8.7 & 220 & 0.33 & 0.65 & \multirow{2}{*}{5.12} \\ & $NN_{t\bar{t}Z}$ & 86.1 & 892 & 92.1 & 72.6 & 733 & 85.3 & 678 & 3.8 & 0.49 & \\ \hline \multirow{2}{*}{0.5} & $NN_{tZj}$ & 201 & 67.2 & 8.7 & 184 & 55.7 & 7.6 & 264 & 0.2 & 0.64 & \multirow{2}{*}{1.66} \\ & $NN_{t\bar{t}Z}$ & 63.8 & 794 & 91.0 & 62.6 & 750.5 & 87.2 & 784.7 & 4.5 & 0.49 & \\ \hline \multirow{2}{*}{-0.5} & $NN_{tZj}$ & 619 & 214 & 27.5 & 601 & 202 & 26.7 & 819 & 1.3 & 0.47 & \multirow{2}{*}{1.44} \\ & $NN_{t\bar{t}Z}$ & 280 & 1770 & 209 & 274 & 1700 & 208 & 1907 & 9.9 & 0.37 & \\ \hline \multirow{2}{*}{-1.0} & $NN_{tZj}$ & 3272 & 3195 & 391 & 3189 & 2914 & 380 & 6420 & 21.1 & 0.01 & \multirow{2}{*}{4.87} \\ & $NN_{t\bar{t}Z}$ & 417 & 2202 & 254 & 388 & 1965 & 242 & 2385 & 11.9 & 0.32 & \\ \hline \multirow{2}{*}{-1.5} & $NN_{tZj}$ & 282 & 153 & 17.2 & 203 & 94.7 & 12.1 & 255 & 0.5 & 0.59 & \multirow{2}{*}{11.21} \\ & $NN_{t\bar{t}Z}$ & 152 & 1272 & 130 & 119 & 906 & 103 & 884 & 4.1 & 0.45 & \\ \hline \multirow{2}{*}{-2.0} & $NN_{tZj}$ & 3464 & 4075 & 449 & 3192 & 2927 & 383 & 6483 & 21.2 & 0.0 & \multirow{2}{*}{19.47} \\ & $NN_{t\bar{t}Z}$ & 982 & 3584 & 386 & 818 & 2521 & 322 & 3634 & 17.0 & 0.2 & \\ \hline \end{tabular}} \caption{Signal significance $\sigma_{S}^{NP\star}(\alpha)$ from DNN analysis in $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j $ channel for $\{\mathcal{C}_{tZ} = \pm 2.0, \pm 1.5, \pm 1.0, \pm 0.5\}$ at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The signal rates for SMEFT $tZj$, $t\bar{t}Z$ and $tWZ$ processes, background rates for SM $tZj$, $t\bar{t}Z$, $tWZ$, $t\bar{t}\gamma$ and $WZ+\mathrm{jets}$, and the optimal DNN scores are presented.} \label{tab:tzj_OtZ_DNN} \end{table} \begin{figure*}[!t] \centering \includegraphics[scale=0.24]{figures/Summary-tzj.pdf}\includegraphics[scale=0.24]{figures/p_value_tZj_OtZ_madminer.pdf}\includegraphics[scale=0.24]{figures/p_value_tZj_OtW_madminer.pdf} \caption{\textit{Left panel:} Projected sensitivity for $\mathcal{O}_{tZ}$~(top panel) and $\mathcal{O}_{tW}$~(bottom panel) from searches in $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$~(red) channels at the HL-LHC. The solid and dashed lines represent the projections from cut-based and DNN analysis, respectively. \textit{Central panel:} Projected sensitivity for $\mathcal{O}_{tZ}$ via searches in $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel, from MadMiner. The vertical axis shows the p-values of the estimated negative log-likelihood ratio. The black-dashed line denotes a p-value of 0.05. \textit{Right panel:} Projected sensitivity for $\mathcal{O}_{tW}$ through searches in $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel, from MadMiner. The color code is similar to that of the central panel. Results are presented for $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$.} \label{fig:tzj_limits} \end{figure*} \begin{table}[!htb] \centering\scalebox{0.83}{ \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \multirow{2}{*}{$\mathcal{C}_{tW}$} & \multirow{2}{*}{$NN$} & \multicolumn{3}{c|}{$S_{SMEFT}^{\star}~(\alpha)$} & \multicolumn{5}{c|}{$S_{SM}^{\star}(\alpha)$} & \multirow{2}{*}{$\alpha^{\prime}$} & \multirow{2}{*}{$\sigma_{S}^{NP\star}$} \\ \cline{3-10} & & $tZj$ & $t\bar{t}Z$ & $tWZ$ & $tZj$ & $t\bar{t}Z$ & $tWZ$ & $WZ$ & $t\bar{t}\gamma$ & & \\ \hline \multirow{2}{*}{0.72} & $NN_{tZj}$ & 3610 & 1840 & 245 & 3075 & 1471 & 211 & 5161 & 10.7 & 0.2 & \multirow{2}{*}{14.2} \\ & $NN_{t\bar{t}Z}$ & 831 & 3252 & 379 & 661 & 2568 & 328 & 3327 & 17.9 & 0.2 & \\ \hline \multirow{2}{*}{0.48} & $NN_{tZj}$ & 3506 & 3467 & 402 & 3178 & 2934 & 377 & 6479 & 21.2 & 0.02 & \multirow{2}{*}{10.99} \\ & $NN_{t\bar{t}Z}$ & 3512 & 3469 & 403 & 3185 & 2935 & 377 & 6484 & 21.2 & 0.0 & \\ \hline \multirow{2}{*}{0.24} & $NN_{tZj}$ & 3345 & 3171 & 383 & 3150 & 2891 & 373 & 6398 & 20.9 & 0.06 & \multirow{2}{*}{5.93} \\ & $NN_{t\bar{t}Z}$ & 1889 & 3115 & 374 & 1757 & 2842 & 365 & 5183 & 20.4 & 0.05 & \\ \hline \multirow{2}{*}{-0.24} & $NN_{tZj}$ & 3022 & 1424 & 223 & 3097 & 1555 & 222 & 5252 & 11.6 & 0.2 & \multirow{2}{*}{3.38} \\ & $NN_{t\bar{t}Z}$ & 925 & 2510 & 347 & 965 & 2719 & 348 & 4015 & 19.3 & 0.15 & \\ \hline \multirow{2}{*}{-0.48} & $NN_{tZj}$ & 3002 & 2536 & 387 & 3182 & 2931 & 21.2 & 6473 & 21.2 & 0.04 & \multirow{2}{*}{6.7} \\ & $NN_{t\bar{t}Z}$ & 1538 & 2451 & 372 & 1625 & 2822 & 363 & 5042 & 20.0 & 0.06 & \\ \hline \multirow{2}{*}{-0.72} & $NN_{tZj}$ & 2829 & 2025 & 348 & 3025 & 2556 & 332 & 5848 & 18.6 & 0.1 & \multirow{2}{*}{9.31} \\ & $NN_{t\bar{t}Z}$ & 1707 & 2266 & 386 & 1811 & 2854 & 366 & 5208 & 20.4 & 0.04 & \\ \hline \end{tabular}} \caption{Signal significance $\sigma_{S}$ from DNN analysis in $pp \to tZj+ t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j $ channel for $\{\mathcal{C}_{tW} = \pm 0.72, \pm 0.48, \pm 0.24\}$ at $\sqrt{s}=13~$TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$. The signal rates for SMEFT $tZj$, $t\bar{t}Z$ and $tWZ$ processes, background rates for SM $tZj$, $t\bar{t}Z$, $tWZ$, $t\bar{t}\gamma$ and $WZ+\mathrm{jets}$ are presented. The optimal DNN score $\alpha$ and corresponding signal significance~$\sigma_{S}^{NP}$ are also shown.} \label{tab:tzj_OtW_DNN} \end{table} With the DNN analysis, we observe a signal significance of $\sigma_{S}^{NP\star}=18.3~$(19.47) at $2\sigma$ for $\mathcal{C}_{tZ}=2.0~(-2.0)$ which is $\sim 10\%$ higher compared to that from cut-based optimization~($\sigma_{S^{NP}} = 16.8$~(17.76)). The margin of improvement reduces as we move towards smaller values of $\mathcal{C}_{tZ}$. For example, at $\mathcal{C}_{tZ}=0.5~(-0.5)$, the DNN leads to $\sigma_{S}^{NP\star} = 1.66~(1.44)$ which is roughly $5\%$ higher than their cut-based counterparts~($\sigma_{S}^{NP} = 1.51~(1.38)$). The improvement from the DNN is more apparent in the scenario where $\mathcal{O}_{tW}$ is the NP operator. For $\mathcal{C}_{tW}=0.72~(-0.72)$, we observe $\sigma_{S}^{NP\star} = 14.2~(9.31)$ which is roughly $\gtrsim 10\%$ higher than the cut-based results. Even at smaller values of $\mathcal{C}_{tW} = 0.24~(-0.24)$, we observe an improvement of $\gtrsim 20\%$ over the cut-based results. We interpolate $\sigma_{S}^{NP\star}$ as a function of $\mathcal{C}_{tZ}$ using the results from Table~\ref{tab:tzj_OtZ_DNN}. The results are illustrated in the left panel of Fig.~\ref{fig:tzj_limits} as blue dashed lines. In the same figure, we illustrate the obtainable significance $\sigma_{S}^{NP\star}$ as a function of $\mathcal{C}_{tW}$ as red dashed lines. Our results indicate that $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$ could be probed up to $-0.61 \lesssim \mathcal{C}_{tZ} \lesssim 0.55$ and $-0.16\lesssim \mathcal{C}_{tW} \lesssim 0.12$ at $2\sigma$, respectively, through searches in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2 j$ channel at the HL-LHC. Before concluding the present section, we also employ \texttt{MadMiner} to estimate the projected sensitivities for $\mathcal{O}_{tZ}$ and $\mathcal{O}_{tW}$ through searches in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel at the HL-LHC. Unlike the DNN training dataset, where new physics effects from $\mathcal{O}_{tW}$ are considered only at the production level, the MC event samples for $tZj$, $t\bar{t}Z$, and $tWZ$, used in \texttt{MadMiner}, include new physics modifications to top decay as well. We include $10^{6}$ event samples for each of these processes as well as the $WZ+\mathrm{jets}$ background, and reconstruct all kinematic observables in Eq.~(\ref{eqn:tzj_observables}). Similar to the analysis in Sec.~\ref{sec:pp_ttz_intro}, we assume a quartic ansatz for $\mathcal{C}_{tW}$ and a squared ansatz for $\mathcal{C}_{tZ}$ in the morphing setup. The network structure is also similar to that in Sec.~\ref{sec:pp_ttz_intro}. In the present case, we perform the training using the \texttt{RASCAL} algorithm~\cite{Brehmer:2018eca} over 150 epochs. The hyperparameter for the \texttt{RASCAL} loss function is set to 1. We consider the \texttt{RASCAL} algorithm in the present section since it leads to better projected sensitivities compared to that from \texttt{ALICES} algorithm. Similar to \texttt{ALICES}, the \texttt{RASCAL} loss functional is defined using the joint likelihood ratio $r(x,z|\theta,\theta_{SM})$ as well as the joint scores $t(x,z|\theta_{0})$, and its minimizing function is the intractable event likelihood ratio $r(x|\theta,\theta_{SM})$. The other network hyperparameters are selected as in Sec.~\ref{sec:pp_ttz_intro}. We present the projection contours from searches in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel at the HL-LHC using \texttt{MadMiner} in the $\{\mathcal{C}_{tZ},\mathcal{C}_{tW}\}$ plane in Fig.~\ref{fig:tzj_2d_madminer}. The sensitivities at $68\%$, $95\%$ and $99\%$ CL are illustrated as red, blue and grey shaded regions, respectively. Since the estimated likelihood ratio is a function of both $\theta = \{\mathcal{C}_{tW}, \mathcal{C}_{tZ}\}$, in order to set 1d limits for $\mathcal{C}_{tW}$ or $\mathcal{C}_{tZ}$, we profile over the other. We present the distribution of p-values as a function of $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$ in central and right panels of Fig.~\ref{fig:tzj_limits}, respectively. We observe that $\mathcal{C}_{tZ}$ could be probed up to $-0.59 \lesssim \mathcal{C}_{tZ} \lesssim 0.55$ while the projected sensitivity for $\mathcal{O}_{tW}$ reaches up to $-0.14 \lesssim \mathcal{C}_{tW} \lesssim 0.11$ at $95\%$ CL. \begin{figure}[!t] \centering \includegraphics[scale=0.3]{figures/tzj_2d_comp_RASCAL.pdf} \caption{Projected sensitivity in the $\{\mathcal{C}_{tZ},\mathcal{C}_{tW}\}$ plane from searches in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j $ channel at the 13~TeV LHC with $\mathcal{L}=3~{\rm ab^{-1}}$.} \label{fig:tzj_2d_madminer} \end{figure} The 1d projection limits for $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$ from searches in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel at the HL-LHC using the cut-and-count methodology and machine learning techniques are summarized in the bottom panels of the subfigures in Fig.~\ref{fig:summary_plot}. In the $\mathcal{C}_{tZ}$ scenario, the optimized selection cuts on $p_{T,Z}$, $H_{T}$ and $\Delta R_{t\ell}^{min}$~($vid$ Table~\ref{tab:tzj_OtZ_cut_flow}), lead to a considerable improvement~($\gtrsim 15\%$) in signal significance over rate-only measurements for all signal benchmarks considered in the present study. As discussed previously, the cut-based study yields a projected sensitivity of $-0.65 \lesssim \mathcal{C}_{tZ} \lesssim 0.58$ at $2\sigma$ uncertainty. The DNN and \texttt{MadMiner} analyses lead to a further improvement of roughly $5\%$ in the projected sensitivities. The aforesaid observations are indicative of the potent sensitivity of differential measurements in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel to $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$, and emphasize the necessity of including them along with rate measurements at the high luminosity run of the LHC. Our results also illustrate that the machine learning techniques are relatively more efficient in extracting the new physics information from differential measurements in the signal channel considered in this section. \begin{figure}[!htb] \centering \includegraphics[scale=0.37]{figures/Summary-1D-limits_2.pdf} \caption{Projected sensitivity for $\mathcal{C}_{tW}$~(\textit{upper panel}) and $\mathcal{C}_{tZ}$~(\textit{lower panel}) from searches inI the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ and $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channels at $\sqrt{s}=13~\mathrm{TeV}$ LHC with $\mathcal{L}=3~\mathrm{ab^{-1}}$, using cut-and-count analysis, DNN analysis and \texttt{MadMiner}.} \label{fig:summary_plot} \end{figure} For comparison, we also summarize the analogous limits arising from the $t\bar{t}Z$ analyses of Sec.~\ref{sec:pp_ttz_intro} in the top panels of Fig.~\ref{fig:summary_plot}. Notably, the sensitivity to $\mathcal{O}_{tW}$ only improves with the use of kinematic information for the $tZj$ channel. The reason that $t\bar{t}Z$ production is less sensitive to this operator is that the dominant diagrams for this process, consisting of top pair production with a single electroweak vertex for $Z$ emission, are unaffected by $\mathcal{O}_{tW}$. Thus, $\mathcal{O}_{tW}$ only affects $t\bar{t}Z$ through its influence on the top quark decay. For $tZj$, by contrast, $\mathcal{O}_{tW}$ affects production as well as decay, so its effects show up in all of the kinematic distributions more readily. \section{Conclusions} \label{sec:conclusions} While top production in association with electroweak bosons is beginning to be observed experimentally, the HL-LHC offers the possibility of measuring these processes with sufficient statistics to leverage kinematic information in the final state. New physics can affect top electroweak production even if any BSM states are too heavy to observe directly. In this work, we analyzed the projected sensitivities for the dimension 6 SMEFT electroweak dipole operators $\mathcal{O}_{tZ}$ and $\mathcal{O}_{tW}$ at leading order at the HL-LHC through searches in $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ and $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channels. We considered a comprehensive set of observables in both channels, and combined rate information with differential cross-section measurements to boost the projected sensitivities. Both conventional cut-and-count techniques and machine-learning based multivariate analysis techniques have been used. In the latter category, we adopted Deep Neural Networks and \texttt{MadMiner}. We considered new physics contributions from $\mathcal{O}_{tZ}$ at the production level, and from $\mathcal{O}_{tW}$ at the production level as well as top decay. Furthermore, non-linear pure SMEFT $\mathcal{O}(\Lambda^{-4})$ contributions in addition to $\mathcal{O}(\Lambda^{-2})$ interference contributions have been considered. We optimized a cut-based analysis using different subsets of observables, identifying those which lead to the strongest sensitivity. We also identified the most important observables that steer the sensitivity to $\mathcal{C}_{tZ}$ and $\mathcal{C}_{tW}$ obtained through a multivariate DNN technique. In the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ channel, sensitivity to $\mathcal{C}_{tZ}$ improved with the utilization of kinematic measurements on top of rate information for all signal benchmarks considered in this work. In the aforesaid channel, $\mathcal{C}_{tZ}$ can be probed at the HL-LHC up to $-0.49 \leq \mathcal{C}_{tZ} \leq 0.51$ at $2\sigma$ using cut-and-count techniques. The potential reach for $\mathcal{C}_{tZ}$ improves further upon adopting the ML-based techniques $viz$ DNN and \texttt{MadMiner}. The strongest sensitivity is obtained with \texttt{MadMiner}, which can probe $\mathcal{C}_{tZ}$ up to $-0.41 \leq \mathcal{C}_{tZ} \leq 0.47$ at $95\%$ CL. In the case of $\mathcal{C}_{tW}$, the projected sensitivity does not increase significantly after the inclusion of kinematic information due to the smaller sensitivity of $t\bar{t}Z$ to $\mathcal{C}_{tW}$. The $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel exhibits a relatively weaker sensitivity to $\mathcal{C}_{tZ}$. Using cut-based techniques, the projected sensitivity to $\mathcal{C}_{tZ}$ at the HL-LHC stands at $-0.65 \leq \mathcal{C}_{tZ} \leq 0.58$ at $2\sigma$. The DNN and \texttt{MadMiner} analyses lead to $\sim 5\%$ improvement in the projected limits, $-0.61 \leq \mathcal{C}_{tZ} \leq 0.55$~(DNN) and $-0.59 \leq \mathcal{C}_{tZ} \leq 0.55$~(\texttt{MadMiner}). Compared to $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ channel, relatively stronger limits are found on $\mathcal{C}_{tW}$ in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel. Here, the inclusion of kinematic information leads to a noticeable improvement in the projected sensitivity to $\mathcal{C}_{tW}$ with the use of deep learning. While the cut-based technique resulted in only a marginal improvement over rate-only measurements, both the DNN and \texttt{MadMiner} analyses led to a $\gtrsim 10\%$ improvement. The strongest sensitivity to $\mathcal{C}_{tW}$ is exhibited by \texttt{MadMiner} in the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel wherein $\mathcal{C}_{tW}$ can be probed up to $-0.14 \leq \mathcal{C}_{tW} \leq 0.11$ at $95\%$ CL at the HL-LHC. Among the two channels considered in this work, the $pp \to t\bar{t}Z + tWZ \to 3\ell + 2b\ + \geq 2j$ channel has a stronger sensitivity to $\mathcal{C}_{tZ}$ while the $pp \to tZj + t\bar{t}Z + tWZ \to 3\ell + 1b + 1/2j$ channel is more sensitive to $\mathcal{C}_{tW}$, with both ultimately displaying considerable improvements upon the inclusion of differential measurements. The inclusion of next to leading order effects in the signal and background processes while developing search strategies may help to further improve the projected reach since both production rates and differential distributions in $t\bar{t}Z$ and $tZj$ are susceptible to modifications from higher order effects~\cite{Degrande:2018fog,Goldouzian:2020ekx}. Furthermore, combination with other relevant decay channels for $t\bar{t}Z$ and $tZj$ at the HL-LHC may lead to potential improvements. The high statistics afforded by the HL-LHC will enable detailed study of kinematics in a variety of processes which are currently relatively rare, notably those involving electroweak couplings. Machine learning techniques can enhance our ability to maximize the sensitivity to new physics from complex final states. This work demonstrates the application of such methods to top production in association with neutral gauge bosons, finding success in improved limits on higher-dimensional operators that parametrize new physics. It is likely that there are further opportunities to exploit kinematic information in electroweak physics at the HL-LHC. \section{Acknowledgements} We thank Giacomo Magni and Juan Rojo for helpful discussions. R.K.B. and A.I. thank the U.S. Department of Energy for the financial support, under grant number DE-SC0016013. Some of the computing for this project was performed at the High Performance Computing Center at Oklahoma State University, supported in part through the National Science Foundation grant OAC-1531128.
\section{Introduction} \label{sec:introduction} Weak gravitational lensing, or weak lensing, is the slight deflection of the light from distant objects by the gravitational effect of nearby objects. Weak lensing leads to a mild change in the object's shape, size and flux, and it is a powerful probe of the dark matter distribution of the Universe due to its sensitivity to the gravitational potential along the line of sight \citep{Hu:2001fb, 2010GReGr..42.2177H, 2013PhR...530...87W}. To date, the most promising way of measuring weak lensing is to measure its coherent effects on the galaxy shape, i.e., the weak lensing shear. Weak lensing can be caused by a nearby massive galaxy or cluster, i.e., as measured using galaxy-galaxy lensing \citep[e.g.,][]{2014MNRAS.437.2111V, 2015MNRAS.454.1161Z, 2018PhRvD..98d2005P}; or by the large-scale structure of the Universe, as measured using cosmic shear \citep[e.g.,][]{2020PASJ...72...16H, 2021A&A...645A.104A, 2021arXiv210513543A}. The coherent galaxy shape distortions caused by weak lensing are \edit{currently} measured using millions, \edit{in the future even billions,} of galaxies in large astronomical surveys. The ``Stage III'' cosmological surveys \citep{Albrecht:2006um} that started in the previous decade provided weak lensing observation that moved the field forward substantially; these include the Dark Energy Survey \citep[DES;][]{des_review}, the Kilo-Degree Survey \citep[KiDS;][]{deJong:2017bkf}, and the Hyper Suprime-Cam survey \citep[HSC;][]{2018PASJ...70S...4A}. In the near future, ``Stage IV'' surveys will begin to observe at greater depth and/or area than the previous generation; the Stage IV surveys include the Vera C. Rubin Observatory Legacy Survey of Space and Time \citep[LSST;][]{Ivezic:2008fe, 2009arXiv0912.0201L}, the \textit{Nancy Grace Roman} Space Telescope High Latitude Imaging Survey \citep{2015arXiv150303757S, 2019arXiv190205569A} and \textit{Euclid} \citep{Euclid_overview}. These new surveys will provide greater statistical precision in the measurements, and therefore demand greater control of systematic uncertainties in weak lensing. The Point Spread Function (PSF) is the function that describes the \edit{atmospheric turbulence}, telescope optics, and some detector effects \citep{2000PASP..112.1360A, 2013A&A...551A.119P} \edit{on a point source image}. PSF modeling algorithms reconstruct the PSF \edit{at the position of the} stars, and interpolate the model to arbitrary positions \edit{on the image, e.g., \textsc{PSFEx} \citep{2011ASPC..442..435B}, or to positions on the sky, e.g., \textsc{Piff} (PSF in Full FOV; \citealt{2021MNRAS.501.1282J})}. The raw light profile of the galaxies \edit{is convolved with the PSF}, changing their observed shapes and sizes. Since measuring weak lensing signals relies heavily on measuring the coherent galaxy shape distortions, modeling the PSF correctly is fundamental for controlling weak lensing systematics. Failure of the PSF model to represent the true PSF causes systematic errors in the inferred galaxy shapes and weak lensing shears. Previous studies have developed a formalism that cleanly describes how the errors in modeling PSF second moments, i.e., the shape and size, affect the galaxy shape measurement and weak lensing shear inference \citep[e.g.,][]{Hirata:2003cv, PaulinHenriksson:2007mw, 2010MNRAS.404..350R,2016MNRAS.460.2245J}. There is also a formalism that describes how the PSF second moment errors further propagate to the weak lensing observables (shear-shear correlations), using the ``$\rho$-statistics'' \citep{2010MNRAS.404..350R, 2016MNRAS.460.2245J}. However, the aforementioned formalism, which is commonly used for quantifying the quality of PSF modeling, does not consider the impact on weak lensing shear caused by errors in the higher moments, i.e., moments with order higher than the second, of the PSF model. In \citet{2020A&A...636A..78S}, excess multiplicative and additive shear bias is found in addition to the predictions of the second moment formalism, for \textit{Euclid}'s PSF. A previous study by \citet{2021arXiv210705644Z} (\edit{hereafter} ZM21) explored this topic by carrying out shape measurement experiments, with the radial kurtosis of the PSF intentionally mis-modeled, while preserving the PSF second moments. \edit{They} found that errors in the PSF radial kurtosis can induce a multiplicative bias in the inferred weak lensing shear. \edit{They also} found that for parametric galaxy models based on the COSMOS survey, and for PSF radial kurtosis errors as in the HSC public data release 1 \citep[PDR1;][]{2018PASJ...70S...8A} PSF models from \textsc{PSFEx} \citep{2011ASPC..442..435B}, the PSF radial kurtosis error can cause a redshift-dependent multiplicative shear bias at the level of the LSST Y10 requirement \citep{2018arXiv180901669T}, thus motivating further research on this topic. In this paper, we want to extend the understanding from ZM21 in several ways: (a) include a wider range of PSF higher moments, which might induce both multiplicative and additive shear biases; (b) propagate the biases into the common weak lensing data vector, the two-point correlation function (2PCF) \edit{$\xi_{\pm}$}, and to cosmological parameter estimates; (c) include \textsc{Piff}, which might provide some estimate of how algorithm-dependent the errors in PSF higher moments are, and might serve as a better example of an algorithm that will be used for LSST. \edit{We introduce background material, including the weak lensing shear, PSF higher moments, and shapelet decomposition in Section~\ref{sec:background}. In Section~\ref{sec:data}, we describe the HSC datasets in this work for measuring the PSF higher moments, and show the results of the PSF modeling quality on the second and higher moments for two PSF models, \textsc{PSFEx} and \textsc{Piff}. In Section~\ref{sec:simulation}, we describe the methodology of single galaxy simulations, including simulation workflow, galaxy and PSF profiles, and how we change the PSF higher moments with the aid of shapelet decomposition. We also show the results based on these single galaxy simulations. In Section~\ref{sec:analyses}, we combine the results from Section~\ref{sec:data} and \ref{sec:simulation} to further propagate the systematics induced by PSF higher moment errors to the weak lensing 2PCF, and its associated cosmology analyses by Fisher forecasting. In Section~\ref{sec:conclusions}, we discuss the implications of our results for weak lensing with future imaging surveys. } \section{Background} \label{sec:background} In this section, we describe the background of this paper. \edit{In Section~\ref{sec:background:wl}, we introduce the formalism to quantify the weak lensing shear.} In Section~\ref{sec:background:mom_measure_mtd}, we introduce the method for measuring the higher moments of PSFs. We then introduce the radial shapelet decomposition, used as a basis in which we expand any given PSF light profile, in Section~\ref{sec:background:shapelet}. \subsection{Weak Lensing} \label{sec:background:wl} Weak gravitational lensing, or weak lensing, is the coherent gravitational distortion on background (source) galaxy flux, size, and shape by foreground (lens) objects. The lens can be any massive object, e.g., a galaxy cluster, or the cosmic large-scale structure. Weak lensing is a powerful observable because of its sensitivity to the matter distribution along the line of sight \citep{Hu:2001fb,2010GReGr..42.2177H,2013PhR...530...87W}. In this paper, we are interested in the cosmic shear, which is the coherent distortion of the source galaxy shapes by the large-scale structure of the Universe, resulting in a nonzero two-point correlation function of galaxy shapes. The distortion of the galaxies by the weak lensing shear is \edit{determined by the reduced shear $g = g_1 + i g_2$, which is a combination of the shear and the convergence \citep{Mandelbaum:2017jpr}}. $g_1$ describes the shear along the x- or y-axes, while $g_2$ describes the shear along \edit{an angle $\pi/4$ defined by growing counterclockwise from} the x-axis \edit{on the image}. Here the x-y axes are aligned with the local (RA, Dec) axes on the sky. For a cosmological weak lensing analysis, it is useful to measure the weak lensing two-point correlation function \citep{1991ApJ...380....1M}, also referred to as the 2PCF. We can calculate the shear along a chosen angular vector $\boldsymbol{\theta}$ connecting two galaxies, with polar angle $\phi$, by $g_t = -\mathcal{R}(g e^{-2i\phi})$, and $\pi/4$ to $\boldsymbol{\theta}$ by $g_\times = -\mathcal{I}(g e^{-2i\phi})$. The shear 2PCF is computed by \begin{equation} \label{eq:2pcf_def} \xi_\pm (\theta) = \langle g_t g_t \rangle (\theta) \pm \langle g_\times g_\times \rangle (\theta). \end{equation} Since the weak lensing shear is isotropic (statistically speaking), the $\xi_\pm (\theta)$ is integrated over the polar angle \edit{$\phi$} and presented as a function of the angular distance $\theta=|\boldsymbol{\theta}|$. The weak lensing shear 2PCF as measured \edit{through} $\xi_\pm$ is sensitive to the coherent change in galaxy shapes due to large-scale structure \citep{2002A&A...396....1S}, though it is contaminated by intrinsic alignments \citep[e.g.,][]{2000ApJ...545..561C, 2000MNRAS.319..649H, 2015PhR...558....1T, 2015SSRv..193....1J}, i.e., the correlated galaxy alignments due to local effects such as tidal fields. Estimating shear accurately is a key step in any cosmological analysis of weak lensing data. Shear biases are commonly modeled as two terms, the multiplicative bias $m$ and the additive bias $c$ \citep{2006MNRAS.368.1323H,Massey:2006ha}, which enter the estimated shear as \begin{equation} \label{eq:shear_biases_def} \hat{g} = (1+m)g + c, \end{equation} where $\hat{g}$ denotes the estimated shear. Systematic biases in the estimated shear must not exceed a certain portion of the statistical error to avoid substantial biases in the reported constraints on the cosmological parameters compared to those that would ideally be recovered. \edit{We are particularly interested in a redshift-dependent multiplicative bias; as suggested in \citet{2013MNRAS.429..661M}, a redshift-dependent multiplicative bias can bias the inferred dark energy equation of state parameter from weak lensing. This is motivated since ZM21 found that the shear response to the PSF higher moment errors depends on the galaxy properties, which means that the galaxy ensemble in each tomographic bin will respond differently to the same PSF higher moment error. In \citet{2018arXiv180901669T}, the redshift-dependent multiplicative bias is parameterized by $m_0$ in \begin{equation}\label{eq:m0} m(z) = m_0 \left(\frac{2z - z_\text{max}}{z_\text{max}}\right) + \bar{m}, \end{equation} \edit{where $\bar{m}$ is a non-zero average multiplicative bias over redshift.} Error budget requirements are placed on the upper bound of the absolute value of multiplicative biases for weak lensing surveys \citep{2016MNRAS.460.2245J, 2018PASJ...70S..25M}. Taking LSST Y10 as an example \citep{2018arXiv180901669T}, the requirement on the redshift-dependent multiplicative bias, which is the difference in $m$ across the full source redshift range, is 0.003. This motivates detailed studies on the connection between weak lensing shear systematics and other factors, including the PSF higher-moment modeling error (ZM21 and this work).} \edit{Note that we only discuss the PSF-induced multiplicative shear biases in this work, without other sources of redshift-dependent multiplicative biases \citep[e.g.,][]{2022MNRAS.509.3371M}.} \subsection{Moment Measurement} \label{sec:background:mom_measure_mtd} In this section, we introduce the methods for measuring higher moments of the PSF. Firstly, we define the adaptive second moment $\mathbf{M}$ for a light profile, \begin{equation} \label{eq:second_moment} M_{pq} = \frac{\int \mathrm{d}x \, \mathrm{d}y \, x^p \, y^q \, \omega(x,y) \, I(x,y)}{\int \mathrm{d}x \, \mathrm{d}y \, \omega(x,y) \, I(x,y) }, \end{equation} \edit{where $(p,q) = (2,0)$, $(1,1)$, or $(0,2)$.} Here $I(x,y)$ is the image intensity, where $\mathbf{x} = (x,y)$ is the image coordinate with origin at the centroid of $I(x,y)$. $\omega(x,y)$ in Eq.~\eqref{eq:second_moment} is the adaptive Gaussian weight, which has the same second moments as the light profile $I(x,y)$ \citep{Hirata:2003cv}, defined by \begin{equation} \label{eq:def_weight_function} \omega(\mathbf{x}) = \text{exp}[-\mathbf{x}^T \mathbf{M}^{-1} \mathbf{x}]. \end{equation} The second moment size $\sigma$ and shape $e_1$ and $e_2$ can then be calculated from the second moments $\mathbf{M}$ using \begin{align} \label{eq:def_sigma} \sigma &= \left[\text{det}(\mathbf{M})\right]^{\frac{1}{4}}\\\label{eq:def_e1} e_1 &= \frac{M_{20} - M_{02}}{M_{20}+ M_{02}}\\\label{eq:def_e2} e_2 &= \frac{2 M_{11}}{M_{20} + M_{02}}. \end{align} Here $\text{det}(\mathbf{M}) = M_{02} M_{20} - M_{11}^2$ is the determinant of the second moment matrix. From Eqs.~\eqref{eq:def_sigma}--\eqref{eq:def_e2}, we can solve for the weighted second moments $M_{ij}$ given the weighted shape $(e_1, e_2)$ and size $\sigma$, which are measured using the \textsc{HSM} module\footnote{\url{https://galsim-developers.github.io/GalSim/_build/html/hsm.html}} \citep{Hirata:2003cv,Mandelbaum:2005wv} in \textsc{GalSim} \citep{Rowe:2014cza}. Based on the second moments, we also define a standardized coordinate system $(u,v)$ in Eq.~\eqref{eq:standard_coord}; this is the coordinate system where the profile $I(u,v)$ has zero second moment shape $e_1=e_2=0$, defined in Eqs.~\eqref{eq:def_e1}--\eqref{eq:def_e2}, and second moment size $\sigma = 1$, defined in Eq.~\eqref{eq:def_sigma}. The standardized coordinate system can be determined via a linear transformation of the image coordinate system as follows: \begin{equation} \begin{pmatrix} u\\ v \end{pmatrix} = \mathbf{M}^{-\frac{1}{2}} \begin{pmatrix} x\\ y \end{pmatrix}= \begin{pmatrix} M_{20} & M_{11} \\ M_{11} & M_{02} \end{pmatrix}^{-\frac{1}{2}} \begin{pmatrix} x\\ y \end{pmatrix}. \label{eq:standard_coord} \end{equation} The standardized adaptive higher moment, $M_{pq}$, is then defined by \begin{equation} \label{eq:moment_define} M_{pq} = \frac{\int \mathrm{d}x \, \mathrm{d}y \, [u(x,y)]^p \, [v(x,y)]^q \, \omega(x,y) \, I(x,y)}{\int \mathrm{d}x \, \mathrm{d}y \, \omega(x,y) \, I(x,y) }. \end{equation} For the $n$\textsuperscript{th} moments, $p$ takes any value between $0$ to $n$, and $q=n-p$. \edit{We choose to measure PSF higher moments in the standardized coordinate system $(u,v)$ instead of $(x,y)$, as such quantities are scale and shape independent, assuming the PSF is well-sampled. The weight $\omega$ is applied to suppress image noise at large radii during the measurement process. The denominator is the normalizing factor, such that the higher moments will not depend on the amplitudes of the weight and the image.} \begin{figure} \centering \includegraphics[width=0.98\columnwidth]{plot/shapelet_basis.pdf} \caption{The first 15 unique real and imaginary parts of the shapelet basis functions in Eq.~\eqref{eq:def_shapelet_basis}. We plot the first 5 orders of this basis, i.e., $p+q=0$ through $4$. The color scale for each base covers $[-A,A]$, where $A$ is the maximum of the absolute value of that basis function. } \label{fig:laguerre_basis} \end{figure} Throughout this paper, we define the biases on the moment $M_{pq}$ as \begin{equation} \label{eq:bias_define} B[M_{pq}] = M_{pq,\text{model}} - M_{pq,\text{true}}, \end{equation} where $M_{pq,\text{model}}$ is the moment of the model PSF, and $M_{pq,\text{true}}$ is the moment of the true PSF. Note that we refer to the standardized higher moments as the ``higher moments'' throughout this paper. \subsection{Shapelet Decomposition} \label{sec:background:shapelet} The shapelet decomposition is an expansion of a two-dimensional image with the eigenfunctions of the 2D quantum harmonic oscillator as the basis functions. This basis function is also referred to as the Laguerre Function with Gaussian weight. This method \edit{was} used to expand the galaxy and PSF profile in \citet{2005MNRAS.363..197M} and used to measure weak lensing shear in \citet{2007MNRAS.380..229M}. For detailed explanations of shapelet expansions, see also \citet{Bernstein:2001nz}. In this study, we use the shapelet decomposition implemented in \textsc{GalSim}\footnote{\url{https://github.com/GalSim-developers/GalSim}} \citep{Rowe:2014cza}. The shapelets basis functions are parameterized by a single parameter: the length scale $L$. After determining the value of $L$ for the image, the image can be decomposed into a series of shapelet coefficients $b_{jk}$, indexed by $j$ and $k$. We also defined two more indices, i.e., the order $N = j+k$ and the spin number $m = j-k$. The PSF image $I(r,\theta)$ can be expanded by the basis functions of the shapelet coefficients $b_{jk}$, \begin{equation} \label{eq:shapelet_expansion} I(r, \theta) = \frac{1}{L ^ 2} \sum_{jk} b_{jk} \, \psi_{jk}\left(\frac{r}{L}, \theta\right), \end{equation} where $\psi_{jk}\left(\frac{r}{L}, \theta\right)$ is the Laguerre Function with Gaussian weight, i.e., the radial shapelet basis \edit{in a polar coordinate system with radius $r$ and polar angle $\theta$}, \begin{equation} \label{eq:def_shapelet_basis} \psi_{jk}(r,\theta) = \frac{-1^q}{\sqrt{\pi}} \sqrt{\frac{j!}{k!}} \, r^m \, e^{im\theta} \, e^{-\frac{r^2}{2}} \, \mathbf{L}_j^{(m)}(r^2). \end{equation} The $\mathbf{L}_k^{(m)}(r^2)$ is the Laguerre Polynomial. Fig.~\ref{fig:laguerre_basis} shows the first 15 basis images of $\psi_{pq}$ that we used to decompose the PSF. For a given order $N$, there are $2N+1$ shapelet basis functions. Due to conjugate pairings, $N$ of the shapelet coefficients $b_{jk}$ are identical to $b_{kj}$. Therefore, to expand a real image, we have $N+1$ distinct shapelet basis functions for order $N$ \edit{that satisfy $j\geq k$}. To determine the length scale $L$, we carried out the following experiment: We decomposed the PSF with different length scales $L$; kept the 40 leading $b_{jk}$s of the shapelet series; reconstructed the image using the first forty $b_{jk}$; and measured the residual of this reconstruction. We \edit{found} that to minimize the absolute value of the residual of the reconstruction, the length scale $L$ should be set to the weighted second moment $\sigma$ of the PSF defined in Eq.~\eqref{eq:def_sigma}. \edit{This rule was found to be true on both the Gaussian and Kolmogorov profiles.} We therefore adopted this approach throughout this work. \section{Data} \label{sec:data} \begin{figure*} \centering \includegraphics[width=1.8\columnwidth]{plot/mean_residual.pdf} \caption{Box plot showing the PSF moment biases from the $2^{\text{nd}}$ to the $6^{\text{th}}$ moments, with the whiskers showing the $2\sigma$ range (from 3rd to 97th percentile), the boxes showing the interquartile range, and the bars showing the median. The \textsc{PSFEx} and \textsc{Piff} results are shown side-by-side. The y-axis is symmetrical log-scaled, with the linear region shown in grey. Although \textsc{PSFEx} and \textsc{Piff} were used to model two different HSC datasets, we observe a comparable order of magnitude in PSF model residuals for the two methods. However, \textsc{Piff}'s median residuals on $M_{40}$, $M_{04}$, $M_{60}$ and $M_{06}$ are a few times larger than those of \textsc{PSFEx}. These are the main contributing higher moments to the shear biases, thus motivating further development of \textsc{Piff}. } \label{fig:box_plots} \end{figure*} In this section, we introduce the data from the Hyper Suprime-Cam survey \citep[HSC;][]{2018PASJ...70S...4A} to study how well current PSF models recover PSF higher moments. We inspected two datasets, one for \textsc{PSFEx} and one for \textsc{Piff}. For both datasets, we used the coadded images of bright stars as the true effective PSF, and compared them with the PSF model at the bright stars' positions. The \textsc{PSFEx} and \textsc{Piff} star catalogs are described in Sections~\ref{sec:data:psfex} and~\ref{sec:data:piff}, respectively. \edit{ We describe the measurement results of the PSF higher moments error in Section~\ref{sec:data:hsc_measure}. } \subsection{\textsc{PSFEx} Dataset} \label{sec:data:psfex} The dataset for \textsc{PSFEx} is the star catalog of the first HSC public data release \citep[PDR1;][]{2018PASJ...70S...8A}. The \textsc{PSFEx} model in this study was generated by the HSC pipeline \citep{2018PASJ...70S...5B} with a modified version of \textsc{PSFEx} \citep{2011ASPC..442..435B}; see Section~3.3 of \citet{2018PASJ...70S...5B} for more details. We used all six fields in the PDR1 survey to inspect the PSF higher moments, instead of just the \code{GAMA\_15H} field as in ZM21. Our star selection process for the \textsc{PSFEx} is detailed in Section~3.4.1 in ZM21, so we only summarize it briefly here. We adopted the ``basic flag cuts'' from Table~3 of \citet{2018PASJ...70S..25M}, with \code{iclassification\_extendedness} set to 0 to identify non-extended objects. These flag cuts eliminate objects that are contaminated or affected by exposure edges, bad pixels, saturation or cosmic rays, and reduce the number of selected stars to $1.1 \times 10^7$. We adopted a signal-to-noise ratio (SNR) cut $\text{SNR} > 1000$ to reduce noise in the PSF higher moments measurement, which further reduced the sample size to $3.1 \times 10^5$. \edit{The SNR cut was determined so that the statistical uncertainty in the PSF radial fourth moments of the star images is $<0.1\%$ (ZM21), avoiding a scenario where the higher moments are dominated by the image noise. The i-band magnitudes of the selected stars are between 18 to 20, a regime in which the correction for the brighter-fatter effect \citep{2018PASJ...70S...5B} is highly effective as shown in Section~4.2 of \citet{2018PASJ...70S..25M}.} ZM21 identified the need for a cut \code{iblendedness\_abs\_flux}$ > 0.001$ to address the fact that the moment measurements of blended objects are biased. In this work, that cut reduced the sample size to $2.6 \times 10^5$. Finally, we also excluded stars with a close neighbor within $2$ arcmin of their centroids using a k-d tree. At the end of the selection process, we had $2.4 \times 10^5$ stars, around four times the amount in ZM21 since we used all six HSC fields. The number density of the \textsc{PSFEx} star dataset is $0.62$ arcmin$^{-2}$. Examples of moment residual maps for \textsc{PSFEx} are shown in Appendix~\ref{ap:moment_example}. \subsection{\textsc{Piff} Dataset} \label{sec:data:piff} We measured the performance of \textsc{Piff} \citep{2021MNRAS.501.1282J} on the HSC data in order to compare with \textsc{PSFEx}. \textsc{Piff} was used as the PSF modeling algorithm for the DES Y3 dataset and performed better than previous DES PSF models, especially at modeling continuous trends across multiple detectors \citep{2021MNRAS.501.1282J}. \textsc{Piff} has been run on the HSC Release Candidate 2 (RC2)\footnote{Detailed description of the RC2 dataset can be found in \url{https://dmtn-091.lsst.io/v/DM-15448/}.}, which consists of two HSC SSP-Wide tracts and one HSC SSP-UltraDeep tract. \edit{The version of \textsc{Piff} we used models PSFs in the image coordinate system, instead of in the WCS coordinates, with pixel scale equal to the native pixel scale ($0.168$~arcsec). The PSF was interpolated with a second order polynomial. } The RC2 dataset is reprocessed biweekly using the latest version of Rubin's LSST science pipelines \citep{2017ASPC..512..279J}. We inspected the PSF modeling quality on the two wide-field tracts, which correspond to \edit{an area of} $\sim 6$~deg$^2$ (each tract of the HSC data is roughly $3$~\deg$^2$). The star selection differs from that used for the \textsc{PSFEx} dataset: we used the \edit{pre-selected} \edit{\textsc{Piff}} candidate stars with SNR$>1000$, without the need for the blending flux and close-neighbor cut. By this criterion, we had in total 11366 stars and PSF models to compare. The number density of the \textsc{Piff} dataset is $0.55$ arcmin$^{-1}$, about 13 per cent lower than that for \textsc{PSFEx}. Examples of moment residual maps for \textsc{Piff} are shown in Appendix~\ref{ap:moment_example}. \subsection{Measuring PSF Higher Moment Error} \label{sec:data:hsc_measure} \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{plot/full_correlation_psfex.pdf} \includegraphics[width=1.0\columnwidth]{plot/full_correlation_piff.pdf} \caption{The correlation matrix of \textsc{PSFEx} (upper) and \textsc{Piff} (lower) moments from the 2\textsuperscript{nd} to the 4\textsuperscript{th} moments, where ``t'' denotes the true values of the moments and ``r'' denotes the moment residuals.} \label{fig:correlation_matrix} \end{figure} We used the postage stamp images of the selected stars as measures of the true PSF. We obtained the PSF models evaluated at the position of the stars, as the model PSF. We used coadded star images, for which the PSF models are a weighted coaddition of the PSF model in each exposure \citep{2018PASJ...70S...5B}. We measured the 22 higher moments, defined in Eq.~\eqref{eq:moment_define}, from the $3^{\text{rd}}$ to the $6^{\text{th}}$ order with the method described in Section~\ref{sec:background:mom_measure_mtd}. We also measured the weighted second moments with the \textsc{HSM} \citep{Mandelbaum:2005wv} module of \textsc{GalSim}. We measured the moment biases $B[M_{pq}]$ by subtracting the \edit{star} PSF moments $M_{pq,\text{true}}$ from the model PSF moments $M_{pq, \text{model}}$, as in Eq.~\eqref{eq:bias_define}. In Fig.~\ref{fig:box_plots}, combining the measurements of the PSF higher moments for all of the selected stars in these datasets, we show the distributions of the \textsc{PSFEx} and \textsc{Piff} moment errors $B[M_{pq}]$ with box plots side by side. The whiskers of the plot show the $2\sigma$ ranges of the distributions, the boxes show the interquartile ranges, and the bars show the median. We can see from the box plots that the two PSF models have similar PSF second moment residuals, and the PSF sizes are positively biased in both models, as observed for \textsc{PSFEx} in \citet{2018PASJ...70S..25M}. We calculated the ``bias fluctuation'' field $\widetilde{B}[M_{pq}](\mathbf{x})$ by \begin{equation} \label{eq:bias_fluctuation} \widetilde{B}[M_{pq}](\mathbf{x}) = B[M_{pq}](\mathbf{x}) - \langle B[M_{pq}](\mathbf{x}) \rangle. \end{equation} We then used the two-point correlation function (2PCF) to measure the cross-correlation of the bias fluctuations $\widetilde{B}[M_{pq}](\mathbf{x})$ and $\widetilde{B}[M_{uv}](\mathbf{x})$, \begin{equation} \label{eq:moment_2pcf} \xi^{pq,uv}(\theta) = \langle \widetilde{B}[M_{pq}](\mathbf{x}) \widetilde{B}[M_{uv}](\mathbf{x} + \theta) \rangle. \end{equation} When $p=u$ and $q=v$, Eq.~\eqref{eq:moment_2pcf} becomes the auto-correlation function of $\widetilde{B}[M_{pq}](\mathbf{x})$. We measured the 2PCFs of the PSF higher moment errors using \textsc{TreeCorr}\footnote{\url{https://github.com/rmjarvis/TreeCorr}} \citep{2004MNRAS.352..338J}. Because of the relatively small area of the \textsc{Piff} dataset, we only measured its one-point statistics (mean, covariance matrix, etc.), not its two-point statistics. Therefore, we can only compare \textsc{Piff} with \textsc{PSFEx} at the early analysis stage, rather than propagating to the weak lensing data vector contamination and biases in cosmological parameter estimates. \edit{The version of} \textsc{Piff} \edit{used for this work} produces similar order-of-magnitude PSF moment residuals as \textsc{PSFEx} from the 2\textsuperscript{nd} to the 6\textsuperscript{th} moments. However, its median residuals on $M_{40}$, $M_{04}$, $M_{60}$ and $M_{06}$ are several times larger than those for \textsc{PSFEx}, which is important because those are the primary moments contributing to the shear bias. This finding is not surprising because the implementation of \textsc{Piff} integrated with Rubin's LSST Science Pipelines has not been thoroughly tuned, and in particular, none of its testing has focused on its optimization for accurate recovery of PSF higher moments. The results for \textsc{Piff} in Fig.~\ref{fig:box_plots} motivate further algorithm development and tuning, by providing additional metrics toward which to optimize in addition to the 2\textsuperscript{nd} moments. \edit{In Appendix~\ref{ap:moment_example:rc2}, we show an apples-to-apples comparison between \textsc{Piff} and \textsc{PSFEx} on the RC2 dataset; the results further motivate the optimization of \textsc{Piff} toward minimizing PSF higher moment residuals. } In Fig.~\ref{fig:correlation_matrix}, we show the correlation matrix between the true PSF moments and their residuals for \textsc{PSFEx} (upper) and \textsc{Piff} (lower panel). We see a chequered-flag pattern in the correlation matrices. The true moments with the same parity for both $p$ and $q$ are usually positively correlated, and likewise for the residuals. This results in a chequered pattern within the same order $n = p+q$ -- the ($p,q$) and the ($p\pm 2, q \mp 2$) moments are correlated -- as well as a bigger chequered pattern across the orders -- between $n$ and $n\pm 2$ orders, though the latter cannot be seen in our plots, since we are only showing $n=3$ and $n=4$ moments. There is an even larger scale pattern: the true moments and residuals for a given $(p,q)$ are typically anti-correlated with each other due to the impact of noise on the true moments. We also observe a significant anti-correlation between ``t$\sigma$'' and ``r04''/ ``r40'' for \textsc{PSFEx}. This indicates that $M_{04}$ and $M_{40}$ are preferentially overestimated in areas of the survey with good seeing. This result is consistent with the findings of ZM21, but it is not seen in the \textsc{Piff} results \edit{because it does not perform oversampling for good-seeing images}. However, the correlation matrix of \textsc{Piff} shows stronger anti-correlations between the true and the residual moments, which suggests that the model is relatively unresponsive to the true values. \edit{There are some caveats regarding the results presented in this section: (a) Due to the way that HSC PDR1 reserves PSF stars randomly for each exposure, 97\% of the stars in the PDR1 dataset were used to generate PSF models in more than one exposure before the coadding process \cite{2018PASJ...70S...5B}, so we are potentially underestimating the systematic uncertainties from the PSF interpolation process. (b) The results in this paper may overestimate $B[M_{04}]$ and $B[M_{40}]$ compared to the real HSC cosmic shear catalog, as the anti-correlation between $B[M_{04}]$ and $B[M_{40}]$ and seeing suggested that \textsc{PSFEx} severely overestimated $B[M_{04}]$ and $B[M_{40}]$ in good-seeing parts of the survey, which were eliminated from the shear catalog \citep{2018PASJ...70S..25M}.} \section{Image simulation} \label{sec:simulation} In this section, we introduce the image simulations used in this study. The main purpose of the image simulation is to understand the shear response to the PSF higher moments modeling error, of which the methods and results are presented in this section. We will briefly cover the parts that are similar to the image simulation process in Section~3.3 of ZM21 and focus on the details that are different from the previous paper. The general simulation workflow is introduced in Section~\ref{sec:simulation:workflow}, the galaxy profiles in Section~\ref{sec:simulation:galaxy}. In Section~\ref{sec:simulation:mom_method}, we introduce our method of manipulating PSF higher moments by changing the coefficients of the shapelet decomposition, and the PSF profiles used in this work in Section~\ref{sec:simulation:psf}. We show the results of the shear response to the PSF higher moment errors with image simulations in Section~\ref{sec:simulation:results}. \subsection{Simulation Workflows} \label{sec:simulation:workflow} \begin{figure} \includegraphics[width = 1.05\columnwidth]{plot/Workflows.pdf} \caption{The workflow of the image simulation for one parametric galaxy and PSF model with one of the higher moment biased compared to the true PSF. The top part shows this workflow, while the bottom orange box shows the process that generates the true and model PSF. } \label{fig:process_workflow} \end{figure} Fig.~\ref{fig:process_workflow} introduces the general image simulation workflow. The top part of the figure shows the steps of the image simulation process for one parametric galaxy and PSF. We started with a galaxy profile and its 90-\deg rotated pair \citep{Massey:2006ha}, an approach we used to reduce simulation volume by nullifying shape noise, for which the parameters will be introduced in Section~\ref{sec:simulation:galaxy}. The two galaxy profiles were convolved with the true effective PSF, introduced in detail in Section~\ref{sec:simulation:psf}; it includes the convolution with a pixel response function ($0.2$ arcsec). The convolved profiles were then sampled at the centers of pixels, generating the postage stamp images. \edit{ The image set for the rotated galaxy pair was} fed into the shear measurement algorithm, which is the re-Gaussianization \citep{Hirata:2003cv} method implemented in the HSM module \citep{Mandelbaum:2005wv} in \textsc{GalSim} \citep{Rowe:2014cza}. We do not use Metacalibration \citep{Sheldon:2017szh, Huff:2017qxu} as ZM21 showed that systematic biases in shear due to PSF modeling errors do not strongly depend on shear estimation methods. We used the average of the measured shears for the galaxy and its 90-\deg rotated pair as the shear estimate for a given PSF. Finally, the difference between the two shear estimates $\Delta\hat{g}$, measured by the true PSF and the model PSF, provides the shear bias associated with the PSF higher moment bias $B[M_{pq}]$. The additive shear response to the higher moment error $M_{pq}$ was estimated at $g=0$ by \begin{equation} \label{eq:shear_response} \frac{\partial c_{pq}}{\partial M_{pq}} = \frac{\Delta \hat{g}}{B[M_{pq}]}. \end{equation} To estimate the multiplicative shear bias generated by the PSF higher moment errors, we introduced another shear $g' = g + 0.01$. Its estimated values $\hat{g}'$ for the true and model PSF, and their difference $\Delta \hat{g}'$, were used to estimate the multiplicative biases as \begin{equation} \label{eq:m_pq_estimate} \frac{\partial m_{pq}}{\partial M_{pq}} = \frac{\Delta \hat{g}' -\Delta \hat{g}}{0.01B[M_{pq}]}. \end{equation} There are some general settings in our image simulations. We used \textsc{GalSim} \citep{Rowe:2014cza} to render the simulated images, all of which are noise-free postage stamp images with a pixel scale of $0.2$ arcsec, similar to the pixel scale of the Rubin Observatory LSST Camera (LSSTCam). \subsection{Galaxy Profile} \label{sec:simulation:galaxy} \begin{table*} \begin{tabular}{ccccccc} \hline Index & Galaxy Type & Galaxy Parameters & $(g_1, g_2)$ & PSF Parameters & $B[M_{pq}]$ \\\hline 1 & Gaussian & $\sigma_{\text{gal}} = 0.17$ arcsec & $(0, 0)$ & $\sigma_{\text{PSF}} = 0.24$ arcsec & $ -0.01 \sim 0.01$ \\ 2 & Gaussian & $\sigma_{\text{gal}} = 0.17$ arcsec & $(0 \sim 0.01, 0 \sim 0.01)$ & $\sigma_{\text{PSF}} = 0.24$ arcsec & $0.005$ \\ 3 & Gaussian & $\sigma_{\text{gal}} = 0.1 \sim 0.9$ arcsec & (0.0, 0.0) & $\sigma_{\text{PSF}} = 0.3$ arcsec & 0.005\\ 4 & Sérsic, n=3 & $R_{\text{gal}} = 0.1 \sim 0.9$ arcsec & (0.0, 0.0) & $\sigma_{\text{PSF}} = 0.3$ arcsec & 0.005\\ 5 & Gaussian & $\sigma_{\text{gal}} = 0.1 \sim 0.9$ arcsec & $(0 \sim 0.01, 0 \sim 0.01)$ & $\sigma_{\text{PSF}} = 0.3$ arcsec & 0.005\\ 6 & Sérsic, n=3 & $R_{\text{gal}} = 0.1 \sim 0.9$ arcsec & $(0 \sim 0.01, 0 \sim 0.01)$ & $\sigma_{\text{PSF}} = 0.3$ arcsec & 0.005\\ 7 & Bulge+Disc & $R_{h,b}, R_{h,d}, B/T, e_b, e_d$ in Table~\ref{tab:bpd_parameter} & $(0 \sim 0.01, 0 \sim 0.01)$ & FWHM$ = 0.6$ arcsec & 0.005\\\hline \end{tabular} \caption{The specification of galaxies, PSFs, and higher-moments error applied to the PSFs for the single galaxy image simulations in this paper. The $M_{pq}$ in the last column stands for all viable moments from $3^{\text{rd}}$ to $6^{\text{th}}$ order. All base PSFs in the single galaxy simulations are Gaussian PSFs, except for the last row with Kolmogorov PSFs. Note that the PSF $\sigma$ values in the table describe the pixel-convolved true and model PSFs, not the base PSFs. } \label{tab:single_parameters} \end{table*} Two types of galaxy profiles were used in this study. The simpler galaxies were simulated as elliptical Gaussian light profiles. Gaussian galaxies were used in preliminary tests to develop basic intuition about the shear biases induced by errors in the PSF higher moments. The more complex galaxy model was a bulge+disc galaxy, consisting of a bulge and a disc component. The bulge+disc model was used for more sophisticated tests that attempt to represent a more realistic galaxy population as in the cosmoDC2 catalog \citep{2019ApJS..245...26K}. The Gaussian profiles were parameterized by their size $\sigma$ and ellipticity $(e_1, e_2)$. We used them for initial tests to understand the relationship between shear bias and PSF higher moment bias (linear or non-linear?), the type of induced shear bias (multiplicative or additive?), and to determine which PSF higher moments actually contribute to weak lensing shear biases. The galaxy and PSF parameters for these preliminary single galaxy simulations are shown in Table~\ref{tab:single_parameters}, with results shown in Section~\ref{sec:simulation:results}. All base PSFs used in these initial simulations were Gaussian profiles, except for the last row, which is a Kolmogorov PSF. A more sophisticated galaxy profile we used is the bulge+disc galaxy, a classic model used by many studies \citep[e.g.,][]{2006MNRAS.371....2A,2011ApJS..196...11S}. The bulges and disks in this work have common centroids. The bulge component was a de Vaucouleurs profile \citep{1948AnAp...11..247D}, a S\'ersic profile \citep{1963BAAA....6...41S} with $n = 4$, which means the surface brightness is proportional to $\exp(-R^{1/4})$, where $R$ is the distance from the centroid in units of its scale radius. The disk component was a\edit{n} exponential profile, i.e., the surface brightness is proportional to $\exp(-R)$\edit{, or the $n=1$ S\'ersic profile}. Both components have independent size and shape parameters. The luminosity profile of the components of the bulge+disc galaxy was governed by two parameters: total luminosity and the bulge fraction ($B/T$). The bulge+disc simulations allowed us to estimate the shear response to error in the PSF higher moments as a function of galaxy properties, which is an important input to the catalog-level simulations later in Section~\ref{sec:analyses:mock}. \begin{figure} \centering \includegraphics[width=0.98\columnwidth]{plot/moment_basis.pdf} \caption{The moment \edit{responses} for a Gaussian PSF. We only show the second to fourth moments here, with index $(p,q)$ in Eq.~\eqref{eq:moment_define} labelled in each box. We use $e_1, e_2$, and $\sigma$ to represent the second moments. The color scale for each base covers $[-A,A]$, where $A$ is the maximum of the absolute value of the basis function. } \label{fig:moment_basis} \end{figure} \subsection{Moment-Shapelet Relation} \label{sec:simulation:mom_method} Before introducing the PSF profile, we need a way to generate light profiles that differ in higher moments, introduced in Section~\ref{sec:background:mom_measure_mtd}, from the base PSF in ways that we can specify. Unfortunately, we do not know an analytical expression for a basis that has a one-to-one mapping with the higher moments. However, since the shapelet basis and the unknown \edit{moment response} can be used to describe the same linear space, we can reconstruct the unknown basis through linear combinations of the known shapelet basis, described in Section~\ref{sec:background:shapelet}. To do so, we defined the Jacobian matrix \begin{equation} \label{eq:jaco_def} T_{pq,jk} := \frac{\partial M_{pq}}{\partial b_{jk}}, \end{equation} which is the generalized gradient of the moments $M_{pq}$ with respect to the shapelet coefficients $b_{jk}$ defined in Eq.~\eqref{eq:shapelet_expansion}. We ranked the shapelet coefficients and PSF higher moments according to the orders in Fig.~\ref{fig:laguerre_basis} and Fig.~\ref{fig:moment_basis} We then directly estimated the change in moment $\Delta M_{pq}$ given the change in all shapelet coefficients $b_{jk}$, \begin{equation} \label{eq:linear_eq_1} \sum_{j,k} \frac{\partial M_{pq}}{\partial b_{jk}} \Delta b_{jk} = \Delta M_{pq}. \end{equation} Since $b_{jk}$ converges to zero at large $j+k$ for Gaussian-like profiles including ground-based PSFs, we were able to truncate the shapelet expansion at some finite order, making $\Delta b_{jk}$ and $T_{pq,jk}$ finite-sized vectors and matrices. To numerically measure $T_{pq,jk}$ of the PSF with higher moment $M_{pq}$, we first decomposed the PSF into a set of shapelet coefficients $b_{jk}$. Then we perturbed $b'_{jk} = b_{jk} + \Delta b_{jk}$, and measured the higher moment $M'_{pq}$ after the perturbation. The Jacobian element was then estimated by \begin{equation} \label{eq:jaco_cal} T_{pq,jk} = \frac{M'_{pq} - M_{pq}}{\Delta b_{jk}}. \end{equation} In Appendix~\ref{ap:shapelet_moment}, we show a visualization of the Jacobian matrix that describes how PSF moments can be modified through changes in the shapelets coefficients. In the next section, we introduce the PSF profiles in this paper, and describe how we use the Jacobian $T_{pq,jk}$ defined in this section to precisely change the PSF higher moments. \subsection{PSF Profile} \label{sec:simulation:psf} In the image simulations, we created the true and model PSF based on a ``base PSF''. We considered two base PSFs: Gaussian and Kolmogorov. Note that the base PSFs do not include the pixel response function, but the model and true PSFs do include it. The process to create the true and model PSF is shown in the orange box in Fig.~\ref{fig:process_workflow}. To change the PSF moments using the technique described above, we first rendered an image of the base PSF including convolution with the pixel response function, and expanded that image by the shapelet decomposition implemented in \textsc{GalSim} \citep{Rowe:2014cza}. We carried out the shapelet decomposition up to order $10$, which corresponds to determining $66$ shapelet basis coefficients. To test that the shapelets decomposition is effectively representing the higher moments of the PSF profile, we confirmed that the fractional kurtosis error measured using the adaptive moments of the shapelets-reconstructed PSF compared to the original image is $10^{-5}$ for Kolmogorov and $10^{-9}$ for Gaussian, which is an acceptable precision for this study. The kurtosis is a good quantity for comparing higher moments, since (a) it is a combination of three moments ($M_{04}$, $M_{22}$, and $M_{40}$); (b) many other higher moments are zeros, and are not suitable for comparing fractional differences. After representing the true PSF as an order $10$ shapelet series, we calculated the Jacobian $\boldsymbol{T}$ that links the $66$ shapelet coefficients with the PSF higher moments. The Jacobian is defined by Eq.~\eqref{eq:jaco_def} and estimated by Eq.~\eqref{eq:jaco_cal}. In this study, we investigated the higher moments from $3^{\text{rd}}$ to $6^{\text{th}}$ order, corresponding to $22$ moments. Together with the three second moments, the Jacobian is a $25 \times 66$ matrix. As an example, the Jacobian for the first 15 moments and first 15 shapelet modes is shown in Fig.~\ref{fig:Tij}. Before describing how to use $\boldsymbol{T}$ to construct images with precisely modified higher moments, we first define our notation. The true and model PSF are represented as vectors of shapelet expansion coefficients $\mathbf{b}$ and $\mathbf{b'}$. The corresponding moment vectors are $\mathbf{M}$ and $\mathbf{M'}$. Ideally, we only change one higher moment of the PSF at a time, by solving for $\mathbf{\Delta b}$ in Eq.~\eqref{eq:linear_eq_1}. However, because of the non-linearity of the moment-shapelet relationship, the higher moments will not change exactly according to $B[\mathbf{M}]$ when we add $\mathbf{b}$ and $\mathbf{\Delta b}$. Therefore, we introduced multiple iterations until the target moment biases $B[\mathbf{M}]$ are achieved, specified in Algorithm~\ref{alg:change_moment}. We defined $\mathbf{\Delta M}$ as the difference between our target moment vector and the current moment vector, which is the quantity we want to minimize. We used the L$^2$ norm to quantify the magnitude of $\mathbf{\Delta M}$, i.e., $||\mathbf{\Delta M}||_2 = \sqrt{\mathbf{\Delta M}^T \cdot \mathbf{\Delta M}}$. \begin{algorithm} \SetAlgoLined Initialize: $\mathbf{b}$, $\boldsymbol{T}$\; Target moment bias: $B[\mathbf{M}]$\; Target final moment vector: $\mathbf{M'} \leftarrow \mathbf{M} + B[\mathbf{M}]$\; $\mathbf{\Delta M} \leftarrow B[\mathbf{M}]$\; \While{$||\mathbf{\Delta M}||_2 > t_0$}{ Solve $\boldsymbol{T} \mathbf{\Delta b} = \mathbf{\Delta M}$ for $\mathbf{\Delta b}$ \; Generate new model PSF: $\mathbf{\tilde{b}} =\mathbf{b} + \mathbf{\Delta b} $, measure its moments vector $\mathbf{\widetilde{M}}$ \; Update the $\mathbf{\Delta M}$: $\mathbf{\Delta M} \leftarrow \mathbf{M'} - \mathbf{\widetilde{M}} $ \; Update Jacobian: $\boldsymbol{T} \leftarrow \frac{\partial \mathbf{\widetilde{M}}}{\partial \mathbf{\tilde{b}}}$ } \caption{Moment Change} \label{alg:change_moment} \end{algorithm} We used this algorithm to ensure that the moments of the new PSF model approach the target moments $\mathbf{M} + B[\mathbf{M}]$, so the new PSF model has moment biases that differ from those of the true PSF by $B[\mathbf{M}]$. We set the default threshold $t_0$ for the error in moment change to be $10^{-6}$, and the algorithm usually took less than 5 iterations to converge for Gaussian and Kolmogorov PSFs. Note that we included the second moments in the moment bias vector $B[\mathbf{M}]$ and set them to zero. In this way, we \edit{actively verified} that the model and true effective PSF have the same second moments. Introducing one component of $B[\mathbf{M}]$ at a time enabled us to inspect the \edit{moment response} from second to sixth order by taking the difference between the images before and after one moment is slightly biased, in Fig.~\ref{fig:moment_basis}. This also enabled us to quantify the impact on weak lensing shear associated with errors in the PSF model for a specific moment. \subsection{Shear Response to PSF Higher Moments} \label{sec:simulation:results} \begin{figure*} \centering \includegraphics[width=1.7\columnwidth]{plot/shear_response.pdf} \caption{The additive shear bias generated by errors in the 3\textsuperscript{rd} and 4\textsuperscript{th} moments of the PSF. Both the galaxy and PSF have constant sizes. The shear biases for odd moments are well-fitted by a quadratic function, while those for even moments are linear. The quadratic fits are shown as lines, while individual simulation results are shown by dots. The quadratic terms for the 4\textsuperscript{th} moments are $\approx 0$, so the fitting functions appear to be linear. As indicated in the y-axis labels, the order-of-magnitude difference in the additive shear biases between the 3\textsuperscript{rd} and 4\textsuperscript{th} moments is $10^3$. } \label{fig:shear_response} \end{figure*} \begin{figure*} \centering \includegraphics[width=1.7\columnwidth]{plot/additive_size_ratio.pdf} \includegraphics[width=1.75\columnwidth]{plot/multiplicative_size_ratio.pdf} \caption{Additive (top) and multiplicative (bottom) bias responses to errors in the 3\textsuperscript{rd} and 4\textsuperscript{th} PSF moments as a function of the ratio of the galaxy and PSF half light radii $R_{h}^{\text{gal}}/R_{h}^{\text{PSF}}$. We show results for both Gaussian galaxies and S\'ersic galaxies with $n = 3.0$, both with a Gaussian PSF. The size ratio is the primary factor determining the response, and the S\'ersic index of the galaxy is an important secondary parameter. As indicated in the y-axis labels, the order-of-magnitude differences in the additive (multiplicative) shear biases between the 3\textsuperscript{rd} and 4\textsuperscript{th} moments are $10^3$ ($10^2$). } \label{fig:size_ratio_bias} \end{figure*} In this section, we show the results of the image simulation and shear measurement experiments described in Sections~\ref{sec:simulation:workflow} to \ref{sec:simulation:psf}, using Gaussian PSFs and 90-\deg rotated galaxy pairs. Using the single galaxy simulations, we can learn the following: (a) the form of the shear response to PSF higher moment errors -- are they linear, quadratic, or even more complicated; and (b) the pattern of shear biases associated with PSF higher moment errors, including magnitude of the biases and symmetry in the response to particular moments. Item (b) is particularly useful as it permits dimensionality reduction to focus on only the key PSF moments in later experiments. ZM21 found only multiplicative biases associated with the radial kurtosis error of the PSF model. In this study, we cannot assume that all biases will be multiplicative, since we introduced other moment errors. In Fig.~\ref{fig:shear_response}, we show the additive shear biases due to $B[M_{pq}]$ in the $3^{\text{rd}}$ and $4^{\text{th}}$ moments of the PSF model, with $(p,q)$ shown on top of each sub-plot. The galaxy and PSF parameters are given in row~1 of Table~\ref{tab:single_parameters}. Fig.~\ref{fig:shear_response} shows that the $4^{\text{th}}$ moments induce shear biases that are linear in the moment residuals, while $3^{\text{rd}}$ moments induce shear biases that are non-linear in the moment residuals across the range of higher moment residuals seen in real data. We found that these curves can fit with a quadratic form. The shear response to the even moments is 2-3 orders of magnitude higher than to the odd moments, at a fixed $B[M_{pq}]$. We also note that the shear responses to conjugate higher moments, such as $M_{12}$ and $M_{21}$, have opposite signs. This is expected since the two moments are related through a 90-\deg rotation, causing an opposite effect on the shear. The symmetries in the shear responses to PSF higher moment errors are further discussed in Appendix~\ref{sec:app:symmetry}. To reduce the size of the figure, we omitted the 5\textsuperscript{th} and 6\textsuperscript{th} moments, but they exhibit the same trends as the 3\textsuperscript{rd} and 4\textsuperscript{th} moments in terms of parity symmetry and different order of magnitude between shear biases for odd and even moments. \begin{table} \begin{center} \begin{tabular}{ccc} \hline Moment & $\frac{ m_{pq}}{ B[M_{pq}]}$ & $\frac{c_{pq}}{ B[M_{pq}]}$ \\\hline (0,3) & ($0.009, 0.001$) & ($0.000, 0.000$) \\ (1,2) & ($-0.005, 0.000$) & ($0.000,0.000$) \\ (2,1) & ($0.004,0.005$) & ($0.000,0.000$) \\ (3,0) & ($0.002,0.000$) & ($0.000,0.000$) \\ (0,4) & ($2.223,1.550$) & ($-0.255,0.002$) \\ (1,3) & ($-0.216,-0.166$) & ($-0.005,0.376$) \\ (2,2) & ($1.940,5.367$) & ($0.000,0.000$) \\ (3,1) & ($0.193,0.219$) & ($-0.002,0.377$) \\ (4,0) & ($2.248,1.543$) & ($0.255,-0.002$) \\ (0,5) & ($0.002,0.000$) & ($0.000,0.000$) \\ (1,4) & ($0.001,0.000$) & ($0.000,0.000$) \\ (2,3) & ($0.003,0.005$) & ($0.000,0.000$) \\ (3,2) & ($-0.001,0.005$) & ($0.000,0.000$) \\ (4,1) & ($0.001,0.002$) & ($0.000,0.000$) \\ (5,0) & ($0.000,0.000$) & ($0.000,0.000$) \\ (6,0) & ($-0.360,-0.078$) & ($0.110,-0.007$) \\ (5,1) & ($0.477,0.480$) & ($-0.003,-0.206$) \\ (4,2) & ($0.072,-1.266$) & ($0.105,0.028$) \\ (3,3) & ($0.029,0.012$) & ($0.064,-0.413$) \\ (2,4) & ($0.060,-1.95$) & (-$0.105,-0.028$) \\ (1,5) & ($-0.479,0.478$) & ($-0.002,-0.206$) \\ (0,6) & ($-0.358,-0.071$) & ($-0.110,0.008$) \\ \hline \end{tabular} \end{center} \caption{Table of multiplicative and additive shear biases per unit of PSF higher moment residuals, $m_{pq}/ B[M_{pq}]$ and $c_{pq}/B[M_{pq}]$ , for the 3\textsuperscript{rd} to 6\textsuperscript{th} moments. Since the shear biases respond nonlinearly to the odd moment errors, values in this table are computed with the average PSF higher moment error of \textsc{PSFEx}, shown in Section~\ref{sec:data:hsc_measure}. } \label{tab:mul_add_single} \end{table} Next, to measure both additive and multiplicative shear biases, we used the same galaxy and PSF sizes as in Fig.~\ref{fig:shear_response}, but we varied the lensing shear applied to the galaxies (specified in row~2 of Table~\ref{tab:single_parameters}). In Table~\ref{tab:mul_add_single}, we show the multiplicative and additive shear biases per unit of PSF higher moments biases $m_{pq}/ B[M_{pq}]$ and $c_{pq}/ B[M_{pq}]$ for the 3\textsuperscript{rd} to 6\textsuperscript{th} moments, at the average PSF higher moment biases. Similar to Fig.~\ref{fig:shear_response}, the shear responses to the odd moments are at least two orders of magnitude smaller than the responses to the even moments. All even moments generate multiplicative shear biases, and they also strongly determine the additive biases. Notice that since the shear responds nonlinearly to the odd moments, the values for those moments in Table~\ref{tab:mul_add_single} depend on the PSF moment residuals. \edit{Based on the results from Section~\ref{sec:data:hsc_measure}, we can simply estimate the order of magnitude of $m$ and $c$ for a typical galaxy as being on the order of $10^{-3}$ to $10^{-2}$. A more precise estimate of the systematic biases for ensembles of galaxies will be provided in Section~\ref{sec:analyses:mock}.} ZM21 showed that the galaxy-to-PSF size ratio is the most important factor that determines the shear response to the errors in modeling the PSF radial kurtosis. Here we checked the sensitivity of the additive and multiplicative shear biases induced by individual PSF higher moment errors to that size ratio. We explored this relationship by simulating Gaussian and S\'ersic galaxies with various sizes, specified in rows~3 to~6 in Table~\ref{tab:single_parameters}. In Fig.~\ref{fig:size_ratio_bias}, we show the additive (multiplicative) shear biases in the upper (lower) panel, as a function of the galaxy-to-PSF size ratio measured by the half light radii $R_{h}^{\text{gal}}/R_{h}^{\text{PSF}}$. We can see that the size ratio plays an important role, but the S\'ersic index also affects the shear responses significantly, especially for large size ratios. This is consistent with the findings in ZM21. In the next section, we will combine the findings in this section and in Section~\ref{sec:data} to estimate the systematic error in weak lensing observable and cosmology analyses associated with PSF higher moment errors. \section{Weak Lensing and Cosmology Analyses} \label{sec:analyses} In this section, we discuss the propagation of errors in shear to the weak lensing 2PCF, and further into cosmology. We first provide a general derivation of our approach in Section~\ref{sec:analyses:general}, and then describe an important practical issue -- reducing the number of moments -- in Section~\ref{sec:analyses:reduction}. We introduce the mock galaxy catalog we use for estimating systematics, the cosmoDC2 catalog \citep{Korytov:2019xus}, in Section~\ref{sec:analyses:mock}. We further propagate the weak lensing shear systematics to cosmological parameter analysis using Fisher forecasts as described in Section~\ref{sec:analyses:fisher}. \subsection{General Error Propagation} \label{sec:analyses:general} Our discussion of how errors in the PSF higher moments affect the weak lensing 2PCF is based on two assumptions: (a) Each PSF higher moment may produce additive shear biases $c_{pq}$ and multiplicative biases $m_{pq}$ on the observed shear, $\hat{\gamma} = (1+m_{pq}) \gamma +c_{pq}$. (b) The total multiplicative and additive bias $m_{\text{total}}$ and $c_{\text{total}}$ produced by simultaneous errors in multiple higher moments of the PSF can be expressed as the sum of the individual multiplicative and additive biases $m_{pq}$, \begin{align} \label{eq:add_property_1} m_{\text{total}} & \approx \sum_p \sum_q m_{pq}\\\label{eq:add_property_2} c_{\text{total}} & \approx \sum_p \sum_q c_{pq}, \end{align} with uncertainties that are negligible for this work. The assumption (a) was illustrated in Section~\ref{sec:simulation:results}, and (b) was confirmed with an image simulation test, where 100 galaxies sampled from cosmoDC2 were assigned random PSF higher-moments residuals. That test showed that the absolute value of the differences between the two sides of Eqs.~\eqref{eq:add_property_1} and~\eqref{eq:add_property_2} for individual galaxies are $\le 10\%$. We have explicitly confirmed that for ensemble shear estimation, the error due to assumptions of linearity is further reduced to $\le 2$\%. For the multiplicative biases, since $m_{pq} \ll 1$, we can ignore the high-order correlations, and just focus on the first order expansion of the observed 2PCF of weak lensing shear. Additive biases can be written as the sum of their averages and fluctuations, $c_{pq}(\mathbf{x}) = c_{0, pq} + \tilde{c}_{pq}(\mathbf{x})$. Combining the additive and multiplicative terms, we get the full expression for the observed weak lensing 2PCF \edit{between bins $i$ and $j$}, \begin{align} \label{eq:additive_deriv} \langle \hat{\gamma}^i \hat{\gamma}^j \rangle = & (1 + m_{\text{total}}(z_i) + m_{\text{total}}(z_j)) \langle \gamma^i \gamma^j\rangle\\\nonumber & + \sum_{pq} \sum_{uv} \langle \tilde{ c}_{pq} \tilde{c}_{uv}\rangle + c_{0,pq} c_{0,uv}, \end{align} \edit{where $m_{\text{total}}(z_i)$ is the multiplicative bias defined in Eq.~\eqref{eq:m0}. Throughout this work, we ignored the spatial variation of the multiplicative bias, which as shown by \cite{2020OJAp....3E..14K} can enter the shear power spectrum at a lower level than the mean multiplicative bias. } As shown in Eq.~\eqref{eq:additive_deriv}, the additive shear bias terms have two effects. First, the observed 2PCF is shifted by a constant $c_{0,pq} c_{0,uv}$. Second, it is also shifted by the scale-dependent auto-correlation function of the zero-mean additive bias field $\langle \tilde{c}(\mathbf{x}) \tilde{c}(\mathbf{x+\theta})\rangle$. We explore the impact of these changes in subsequent sections. \subsection{Dimensionality Reduction for PSF Higher Moments} \label{sec:analyses:reduction} There are 22 correlated PSF moments from $3^{\text{rd}}$ to $6^{\text{th}}$ order, and the high dimensionality of this dataset can pose challenges in understanding the main issues determining the weak lensing systematic biases. Therefore, dimensionality reduction to only the PSF higher moments that induce substantial shear biases is an important first step. Since this task is based on a rough estimate of the importance of individual PSF higher moments, we used simple models for this: both the galaxy and PSF in the dimensionality reduction process are Gaussian profiles. \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{plot/multiplicative_preliminary.pdf} \caption{An estimate of the weak lensing shear multiplicative biases, aimed at understanding which PSF higher moments are most important in generating multiplicative biases. This plot is based on ensemble shear biases for a simulated COSMOS galaxy sample, given the average error on individual higher moments of the PSF model in HSC PDR1. The orange areas are the even moments and the white areas are the odd moments. Both components of the multiplicative bias show the same set of 7 moments that contribute significantly. The y-axis is symmetrical log-scaled, with the grey area being the linear region. } \label{fig:multi_prelim} \end{figure} Eq.~\eqref{eq:additive_deriv} shows that multiplicative bias affects the weak lensing 2PCF through its total $m_{\text{total}}$, which is a summation over all $m_{pq}$. We used the methods described in Section~\ref{sec:simulation:workflow} to calculate $\partial m_{pq} / \partial M_{pq} (\sigma_\text{gal})$ as a function of the galaxy's second moment $\sigma_\text{gal}$. To roughly estimate $m_{pq}$, we used the $\sigma_\text{gal}$ of 44386 COSMOS galaxies with magnitude $< 25.2$, and galaxy resolution factor $R_2 > 0.3$ (later defined in Eq.~\ref{eq:resolution_factor}) as the input galaxy sizes. The second moments were computed after convolving with the Hubble PSF, but before convolving with our Gaussian PSF. The Gaussian PSF size was fixed at a Full Width at Half Maximum (or FWHM) of $0.78~\text{arcsec}$. Assuming the shear bias is proportional to the PSF moment bias, the multiplicative bias should be proportional to the moment bias as well. Therefore, we estimated the multiplicative bias \edit{$\langle m_{pq} \rangle$ associated with $B[M_{pq}]$ as} \begin{equation} \label{eq:multiplicative_approx} \langle m_{pq} \rangle = \left(\frac{1}{N}\sum_{i=1}^N \frac{\partial m_{pq}}{\partial M_{pq}} (\sigma_{\text{gal},i}) \right)\, \langle B[M_{pq}] \rangle, \end{equation} where the COSMOS galaxies are indexed by $i$, and $\langle B[M_{pq}] \rangle$ is the average moment bias of $M_{pq}$ in the HSC data, as described in Section~\ref{sec:data:hsc_measure}. The method to estimate $\partial m_{pq}/ \partial M_{pq}$ was described in Section~\ref{sec:simulation:workflow}. We ranked the magnitude of the values of $\langle m_{pq} \rangle$ to estimate the importance of individual PSF moments. The importance is expected to be different for $g_1$ and $g_2$, given different spatial patterns are involved in different moments. The resulting multiplicative biases from this simplified simulation are shown in Fig.~\ref{fig:multi_prelim}. Both the $m_{\text{total},1} $ and $m_{\text{total},2} $ results indicate that PSF higher moments with both $p$ and $q$ even (seven in total) determine the multiplicative shear bias. The total multiplicative biases are $m_{\text{total},1} = 0.0017$ and $m_{\text{total},2} = 0.0019$, dominated by the contributions of 7 PSF higher moments. \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{plot/total_additive.pdf} \caption{ The total additive bias on the weak lensing 2PCF $\xi_\pm$ for the simulated galaxies used for dimensionality reduction. The expected shear-shear correlation functions $\xi_\pm$ for our fiducial cosmological parameters (across all redshift bins combined) are shown as dashed lines. While $\Delta \xi_+$ is positive on all scales shown, $\Delta \xi_-$ is consistent with zero. } \label{fig:two_groups} \end{figure} The additive biases are more complicated as shown in Eq.~\eqref{eq:additive_deriv}, since we must calculate the weak lensing 2PCF $\xi_{+/-}$ to understand the importance of the moments. We designed the preliminary tests for the additive biases as follows: We used the PSF higher moments and their errors as a function of position in the HSC PDR1 from Section~\ref{sec:data}, and for the positions of bright stars in the PDR1 fields, we simulated a synthetic Gaussian galaxy with the average size and shape of the population from COSMOS catalog. We then measured the shear biases of the Gaussian galaxies with the PSF higher moments biases at these positions. We obtained the biases on the shear 2PCF directly from the shear bias at position $\mathbf{x}$, estimated by \begin{equation} \label{eq:additive_approx} c_{pq} (\mathbf{x}) = \frac{\partial c_{pq}}{\partial M_{pq}} B[M_{pq}] (\mathbf{x}). \end{equation} As shown in Fig.~\ref{fig:two_groups}, the additive bias on $\xi_+$ has a magnitude $\sim 10^{-7}$ on tens of arcmin scales, which corresponds to a $\sim 1$ per cent additive systematics contribution at small scales, and a few per cent at large scales, which is significant enough to potentially affect cosmological inference. The sharp decrease at $\theta \sim 100$ arcmin suggests that physical effects associated with the HSC field of view (FOV) are the cause of structural PSF systematic biases. However, $\Delta \xi_-$ is effectively zero. \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{plot/moment_ranking_c1.pdf} \includegraphics[width=1.0\columnwidth]{plot/moment_ranking_c2.pdf} \includegraphics[width=1.0\columnwidth]{plot/two_groups.pdf} \caption{The estimate of the additive shear biases given the \textsc{PSFEx} modeling quality in the HSC PDR1. The upper and middle panels show the rankings of the cumulative contribution to the $\Delta \langle g_1 g_1 \rangle$ and $\Delta \langle g_2 g_2 \rangle$ (respectively) from $2$ to $200$ arcmin, from both the front-to-back and back-to-front methods described in Section~\ref{sec:analyses:reduction}. The light yellow region indicates the `$g_1$ group' moments that are most relevant to the $\Delta \langle g_1 g_1 \rangle$ term, and the pink region indicates the `$g_2$ group' moments that are most relevant to the $\Delta \langle g_2 g_2 \rangle$ term. The bottom panel shows the additive biases on $\langle g_1 g_1 \rangle$ and $\langle g_2 g_2 \rangle$ from all PSF higher moments, compared to just the `$g_1$ group' and the `$g_2$ group' -- confirming that these two groups dominate the additive shear biases. } \label{fig:add_prelim} \end{figure} Since each term in the additive biases on the 2PCF is associated with two different PSF moments (Eq.~\ref{eq:additive_deriv}), the ranking of importance for the PSF moments is more complex in this case. We designed two different ranking system: (a) the \textbf{front-to-back} approach and (b) the \textbf{back-to-front} approach. In the \textbf{front-to-back} approach, we calculated the contribution of each $\langle c_{pq} c_{uv} \rangle$ term to the total additive bias $\Delta \langle g g \rangle$, by integrating over $\theta$ from $1$ to $200$ arcmin. We ranked the contribution of a given moment $M_{pq}$ by the total reduction in additive bias if we removed all terms that involve $M_{pq}$. After removing the highest-contributing PSF moment, we performed the same calculation and removed the next highest-contributing moment, until only one moment remains. Similarly, for the \textbf{back-to-front} approach, we removed the least-contributing PSF moment first, after performing the same contribution calculation described above. We then removed the next least-contributing moment, until we were left with only one moment. These two approaches provided two rankings of the PSF moments that contribute from most to least to the weak lensing additive shear bias. We expect to obtain a reasonably consistent set of PSF moments from these two approaches. If the two results were to disagree, the conservative approach would be to use the inclusive set of moments considered important by either method. We ranked the moments separately for $\langle g_1 g_1 \rangle$ and $\langle g_2 g_2 \rangle$. In Fig.~\ref{fig:add_prelim}, we show the results of executing the dimensionality reduction process for additive shear bias outlined in Section~\ref{sec:analyses:reduction}. In the upper and middle panel, we show the ranking of the PSF moments' contribution to $\langle g_1 g_1 \rangle$ and $\langle g_2 g_2 \rangle$. We show both the ``front-to-back method'' and ``back-to-front method'', described in Section~\ref{sec:analyses:reduction}. The relative rankings given by the two methods are slightly different, but the methods agreed about which moments we should discard. The moments that contribute the most strongly are four of the five $4^{\text{th}}$ moments: (4,0), (3,1), (1,3), (0,4), and all seven $6^{\text{th}}$ moments. We further separated those 11 moments into two groups depending on which shear component they affect ($g_1$ or $g_2$). The moments in the $g_1$ ($g_2$) group are those with even (odd) values for both $p$ and $q$. In the bottom panel, we show the additive biases on $\langle g_1 g_1 \rangle$ and $\langle g_2 g_2 \rangle$ contributed by all PSF higher moments, compared to just the contributions of the `$g_1$ group' and the `$g_2$ group'. The plot shows that the `$g_1$ group' and `$g_2$ group' moments dominate the total additive shear biases, and therefore we can focus on just these higher moments. After the dimensionality reduction of PSF higher moments, we only propagate the errors on the reduced moment set to the lensing signal in the analysis in subsequent sections. In other words, from this point on we only consider errors in 7 (11) PSF higher moments for the multiplicative (additive) biases. \subsection{Mock Catalog Simulations} \label{sec:analyses:mock} To connect PSF higher moment errors with weak lensing systematics, we need a realistic galaxy catalog with galaxy properties and positional information. For this purpose, we used the cosmoDC2 catalog \citep{2019ApJS..245...26K}, as it is designed to match the galaxy population LSST is going to observe, with multiple validation tests against real datasets \citep{2021arXiv211003769K}, and has sufficient area ($\sim$440 \deg$^2$) for our purposes. We accessed the cosmoDC2 catalog using \textsc{GCRCatalogs}\footnote{\url{https://github.com/LSSTDESC/gcr-catalogs}} \citep{2018ApJS..234...36M}. We estimated the multiplicative and additive shear biases for each individual galaxy in cosmoDC2 using two pieces of information: shear response to PSF higher moment errors, and a synthetic catalog of PSF higher moment errors, both described below. \subsubsection{Shear Response} \label{sec:analyses:shear_response} The shear response to errors in PSF higher moments, $\partial \hat{g} / \partial M_{pq}$, depends on the galaxy and PSF properties. We used a bulge+disc decomposition model for the galaxy, and determined the shear response as described in Section~\ref{sec:simulation}. To reduce the computational expense, we carried out simulations for a grid of bulge+disc model parameters that cover the majority of the cosmoDC2 galaxies, discarding $\lesssim 1$~per cent (large galaxies that do not contribute significant shear bias) outside of the grid. The free parameters in the grid are the half-light radius of the bulge $R_{h,b}$, the half-light radius of the disc $R_{h,d}$, and the bulge fraction $B/T$, and the grid is linear in all three dimensions. We used the same bulge and disc shapes for all galaxies\footnote{Our tests showed that using the same ellipticity for all galaxies generates $<$1 per cent error on the prediction of the ensemble shear biases, while saving tremendous computational time.}. We set the size and shape of the Kolmogorov PSF to be constant. The pixel size is $0.2$ arcsec, like that of the Rubin Observatory LSST Camera. The range of bulge+disc parameters in the image simulation is in Table~\ref{tab:bpd_parameter}. \begin{table} \begin{tabular}{ccc} \hline Parameter & Range\\\hline Bulge $R_{h,b}$ & $0.1 \sim 1.0~\text{arcsec}, \text{interval} = 0.1~\text{arcsec}$\\ Disc $R_{h,d}$ & $0.2 \sim 2.0~\text{arcsec}, \text{interval} = 0.2~\text{arcsec}$\\ Bulge-to-total ratio $B/T$ & $0.0 \sim 1.0, \text{interval} = 0.2$\\ Bulge shape & $e_1 = \pm 0.05, e_2 = \pm 0.05$\\ Disc shape & $e_1 = \pm 0.16, e_2 = \pm 0.16$\\ PSF FWHM & $0.6~\text{arcsec}$\\\hline \end{tabular} \caption{The parameters used in the bulge+disc image simulation. The top three rows define the parameter grid used for the simulation, while the bottom three rows are fixed parameters. We use the average absolute values of ellipticity for the bulges and disks. The $\pm$ signs indicate that the ellipticities of the galaxies in the 90-\deg rotated pairs have opposite signs. The PSF FWHM shown is the size for the effective true and model PSFs. } \label{tab:bpd_parameter} \end{table} After estimating a multiplicative and additive shear response to PSF higher moment errors $B[M_{pq}]$ at each grid point, we then used multi-dimensional linear interpolation from \textsc{SciPy}\footnote{\url{https://www.scipy.org/}} to estimate the multiplicative and additive shear biases for galaxies in cosmoDC2 using this grid. The \textsc{SciPy} routine performs a piece-wise interpolation in the 3-D parameter space\footnote{Our tests compared predictions for the ensemble shear bias of a sample of 100 simulated galaxies as estimated with the linear interpolation and with direct image simulations. We found no significant numerical difference between the two methods. }. \subsubsection{PSF Moment Biases} \label{sec:analyses:moment_generation} Given the position for each galaxy in cosmoDC2, we need to assign PSF higher moment biases that reflect the average PSF higher moment biases and their correlation functions in the \textsc{PSFEx} dataset. Since cosmoDC2 is larger in area than any of the six HSC fields, it is impossible to directly cover the cosmoDC2 area with HSC fields. Therefore, we generated a synthetic PSF moment residual field $B[M_{pq}](x)$ with the same statistical properties as the \textsc{PSFEx} dataset, specifically the average moment residuals and auto- and cross-correlation functions. The averages of the residuals are important for determining the multiplicative shear biases, and the correlation functions are important for the additive biases (see Section~\ref{sec:analyses}). As is described in Section~\ref{sec:data:hsc_measure}, the biases of PSF moments $M_{pq}$ and $M_{uv}$ are described by the average of the moment biases: $\langle B[M_{pq}] \rangle$, $\langle B[M_{uv}] \rangle$, and the correlation function of the fluctuation $\xi^{pq,uv}(\theta)$. For the PSF moments that are of interest, we fit the correlation functions in the \textsc{PSFEx} dataset to parametric models and Hankel transformed them to get the angular power spectrum using \textsc{SkyLens}\footnote{\url{https://github.com/sukhdeep2/Skylens\_public/tree/imaster\_paper/}} \citep{2021MNRAS.508.1632S}, by computing \begin{equation} \label{eq:hankel_trans} C_\ell^{pq, uv} = 2 \pi \int \mathrm{d} \theta \, \theta \, \xi^{pq,uv}(\theta) \, J_0(\ell, \theta), \end{equation} where $J_0(\ell, \theta)$ is the Bessel function of order 0. Assuming the residual field is a Gaussian field, we generated the n-d correlated Gaussian field using these $n (n+1) /2$ angular power spectra. We used the python package \textsc{Healpy}\footnote{\url{https://github.com/healpy/healpy}} \citep{Zonca2019}, a python wrapper of the \textsc{HEALPix} software\footnote{\url{http://healpix.sourceforge.net}} \citep{2005ApJ...622..759G}, to generate a synthetic spherical harmonic decomposition $a_{\ell m}$ with $\ell_{\text{max}} = 3072$ and $-\ell \leq m \leq \ell$. With the $a_{\ell m}$, we generated an n-d Gaussian Random Field (GRF) evaluated at the centers of \textsc{HEALPix} pixels with $N_{\text{side}} = 2048$, which corresponds to a pixel size of $1.7$ arcmin. The details of the GRF generation process are described in Appendix~\ref{ap:grf}. We then added the average moment biases for the \textsc{PSFEx} dataset to the GRF fluctuations to generate the total PSF higher moment bias fields. The PSF moment biases of any cosmoDC2 galaxy are the values for the \textsc{HEALPix} pixel that the galaxy sits in. The disadvantage of this method is that we cannot accurately evaluate $\langle\tilde{c}_{pq}(\mathbf{x}) \tilde{c}_{uv}(\mathbf{x+\theta})\rangle$ for angular bins below the \textsc{HEALPix} pixel size, i.e., $\theta \lesssim 1.7$ arcmin, though those scales make a negligible contribution to biases in cosmological parameters. \subsubsection{Galaxy Selection and Weak Lensing Measurement} \label{sec:analyses:selection} The process outlined in the previous sections provided the galaxy responses $\partial \hat{g} / \partial M_{pq}$ and the correlated PSF higher moment biases $B[M_{pq}](\mathbf{x})$ for each galaxy in the cosmoDC2 catalog. However, not all of galaxies in this catalog will be used for lensing science in LSST. Similar to the practice in ZM21, we cut on how well-resolved a galaxy is based on its resolution factor $R_2$, which is calculated by \begin{equation} \label{eq:resolution_factor} R_2 = 1- \frac{T_P}{T_I}, \end{equation} where $T_P$ and $T_I$ are the trace of the second moment matrix for the PSF and the galaxy, respectively. The galaxy is well resolved when $R_2 \rightarrow 1$, and poorly resolved when $R_2 \rightarrow 0$. Consistent with the approach used by the HSC survey \citep{2018PASJ...70S..25M}, we only retained galaxies with $R_2 > 0.3$, eliminating $\sim$9 per cent of the sample\footnote{Since we did not simulate each cosmoDC2 galaxy, we estimated their resolution factors by interpolation from the galaxies on the grid.}. We excluded galaxies fainter than an i-band magnitude of $25.3$ for similar magnitude distribution as the LSST-`gold' samples \citep{2009arXiv0912.0201L}, and those outside the bounds of our grid of size values in Table~\ref{tab:bpd_parameter}. The lower limit of the size cut did not exclude any galaxies after the resolution factor cut, and the upper limit excluded $\sim 1 $ per cent of the galaxies. After the cuts, the total number density of the catalog is $31.8$ arcmin$^{-1}$. The bias on the 2PCF of the weak lensing shear $\Delta \xi_{+/-}$ was measured by \begin{equation} \label{eq:bias_2pcf} \Delta \xi_{+/-}^{ij}(\theta) = \langle \hat{g}^i(x) \hat{g}^j(x+\theta) \rangle - \langle g^i(x) g^j(x+\theta) \rangle, \end{equation} where $i$ and $j$ are the tomographic bin index. In our measurement, we split the galaxies based on their true redshifts into three tomographic bins, centred at $0.5$, $1.06$, and $1.85$. The ensemble biases on the weak lensing 2PCFs $\Delta \xi_{+/-}^{ij}(\theta)$ were measured using \textsc{TreeCorr} \citep{2004MNRAS.352..338J}. In the next section, we use Fisher forecasts to understand the impact of these shear biases on cosmological parameter constraints. \subsubsection{Systematics on Shear 2PCF} \label{sec:analyses:mock_results} In Fig.~\ref{fig:redshift_mul}, we show the total multiplicative biases of the cosmoDC2 galaxies in redshift bins after including all relevant PSF higher moment errors. We used a quadratic function to fit the 10 data points, and overplot the best-fitting curve as the dashed line. As suggested by \citet{2013MNRAS.429..661M}, a linear form for the redshift dependence of the multiplicative biases affects the estimate of the dark energy equation of state using weak lensing. The linear coefficient of our best-fitting $m(z)$ suggests that $m_0$ in Eq.~\eqref{eq:m0} is 0.0015, which is about half of the error budget in the LSST Y10 requirement \citep{2018arXiv180901669T}. Since the linear term of $m(z)$ can potentially cause significant cosmological parameter biases, and the impact of the quadratic term is unclear, we carried out a Fisher forecast for the impact of the redshift-dependent multiplicative biases, \edit{defined in Eq.~\eqref{eq:m0}}, on the inferred cosmological parameters, using the full quadratic $m(z)$. \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{plot/mz_dc2.pdf} \caption{The redshift-dependent multiplicative shear biases for cosmoDC2 galaxies, due to PSF higher moment residuals comparable to those in HSC PDR1, in 10 redshift bins. We fit the data points to a quadratic function, shown as the dashed line. } \label{fig:redshift_mul} \end{figure} For the additive biases, we measured the difference in the weak lensing 2PCF, i.e., $\Delta \xi_+ = \sum_{pq} \sum_{uv} \langle \tilde{ c}_{pq}(\mathbf{x}) \tilde{c}_{uv}(\mathbf{x+\theta})\rangle + c_{0,pq} c_{0,uv}$, derived in Eq.~\eqref{eq:additive_deriv}. In Fig.~\ref{fig:additive_tomographic}, we show the additive biases $ \Delta \xi_{\pm}$, with galaxies split into three tomographic bins. Similar to the preliminary test, the additive biases on $\xi_+$ are positive, with magnitudes increasing at higher redshifts. $\Delta \xi_-$ is consistent with zero everywhere. We parameterized $\Delta \xi_+$ as a double-exponential function, $\Delta \xi_+ = a_1 e^{-s_1 \theta} + a_2 e^{-s_2 \theta}$, as shown in orange. \begin{figure} \centering \includegraphics[width=1.0\columnwidth]{plot/additive_dc2.pdf} \caption{The additive biases on the weak lensing 2PCF $\xi_{\pm}$ for the cosmoDC2 galaxies when subjected to PSF higher moment residuals comparable to those in HSC PDR1. The galaxies are split into three tomographic bins based on their true redshifts, centred at $z=0.5$, $1.06$, and $1.85$. The tomographic bin combination is labeled by the central redshifts of the corresponding pair of bins at the center of each panel. The y-axis uses a symmetric-log scale, with linear scale $= 3.0 \times 10^{-7}$; the linear region is shaded grey. $\Delta \xi_-$ is still consistent with zero, as for the preliminary results. We fit $\Delta \xi_+$ with a double-exponential function, shown as orange lines. } \label{fig:additive_tomographic} \end{figure} In the next section, we propagate the estimated multiplicative and additive on the shear 2PCF, parameterized by the double-exponential function, to the cosmological parameter analysis using Fisher forecasts. \subsection{Fisher Forecast} \label{sec:analyses:fisher} The goal of assessing the impact of PSF higher moment errors is to quantify their impact on a cosmological analysis using weak lensing shear, assuming that they are not explicitly accounted for in the analysis through modeling and marginalization. Since we only need an approximate estimate of the magnitude of induced cosmological parameter biases, we carried out a Fisher forecast on shear-shear data with 5 tomographic bins for the full LSST dataset (Y10). In practice, we computed the Fisher information matrix elements $I_{ij}$ using the following equation: \begin{equation} I_{ij} = \frac{\partial C_{\ell}}{\partial p_i}^T \text{Cov}^{-1} \frac{\partial C_{\ell}}{\partial p_j} + \delta_{ij} (\sigma_i \sigma_j)^{-1}, \end{equation} where $i$ and $j$ are indices of the vector of parameters $\mathbf{p}$ (including both cosmological and nuisance parameters), $C_{\ell}$ is the angular power spectrum of the cosmic shear, and Cov$^{-1}$ is the inverse covariance matrix. The prior on each parameter $p_i$ was added to its diagonal element in the Fisher information matrix as $1/\sigma_i^2$, where $\sigma_i$ is the standard deviation of the Gaussian prior. We used the DESC Science Requirements Document (SRD) covariance matrix \citep{2018arXiv180901669T}. The forward model in this forecast includes 7 cosmological parameters ($\Omega_m$ the matter density, $\Omega_b$ the baryonic matter density, $h$ the Hubble parameter, $n_s$ the spectral index, the power spectrum normalization parametrized as $\sigma_8$ and the dark energy equation of state parameters $w_0$ and $w_a$), 4 intrinsic alignment (IA) parameters of the non-linear alignment model \citep[NLA;][]{2017MNRAS.470.2100K}, i.e., the IA amplitude $A_0$, redshift-dependent power-law index $\eta_l$, redshift-dependent power-law index at redshift $z > 2$ $\eta_h$, and luminosity dependent parameter $\beta$. The Fisher forecast code and setup was adapted from and explained more thoroughly in Almoubayyed, et al., {\em in prep}. The fiducial values and priors of all parameters are shown in Table~\ref{tab:cosmology_parameters}. \begin{table} \centering \begin{tabular}{cccccc} \hline Parameter & Value & Prior $\sigma$ & Parameter & Value & $\sigma$ \\\hline $\Omega_m$ & 0.3156 & 0.2 & $A_0$ & 5.0 & 2.0 \\ $\sigma_8$ & 0.831 & 0.14 & $\eta_l$ & 0.0 & 2.0 \\ $\Omega_b$ & 0.049 & 0.006 & $\eta_h$ & 0.0 & 2.0 \\ $h$ & 0.6727 & 0.063 & $\beta$ & 0.0 & 2.0\\ $n_s$ & 0.9645 & 0.9645 & & & \\ $w_a$ & 0.0 & 2.0 & & & \\ $w_0$ & -1.0 & 0.8 & & &\\\hline \end{tabular} \caption{The fiducial values of and priors on the cosmological and intrinsic alignment parameters we use as the baseline of the Fisher forecasting. } \label{tab:cosmology_parameters} \end{table} Derivatives of the angular power spectrum with respect to these parameters were taken using \texttt{numdifftools} \citep{numdifftools} with an absolute step-size of 0.01, which was validated to be stable through a convergence test in Almoubayyed, et al., {\em in prep}, and for the cosmological parameters, was also shown to be stable in \citet{2021arXiv210100298B}. The $C_{\ell}$ values were computed in 20 $\ell$ bins, consistent with the binning used in the DESC SRD, using the Core Cosmology Library \citep{CCL}. The additive shear 2PCF biases for the tomographic weak lensing signal for redshift bins $i$ and $j$ measured in cosmoDC2 were parameterized by \begin{equation} \label{eq:fitting_function} \Delta \xi_+^{ij} (\theta) = a_1^{ij} e^{-s_1^{ij} \theta} + a_2^{ij} e^{-s_2^{ij} \theta}, \end{equation} where the parameters $a_1^{ij}$, $a_2^{ij}$, $s_1^{ij}$, and $s_2^{ij}$ are linear functions of $z_i + z_j$, the sum of the mean redshifts of the tomographic bins being correlated. This fitting function was empirically selected based upon visual inspection, and all fractional fitting residuals are within $3\%$ of the true values. \edit{Using the fitting function in Eq.~\eqref{eq:fitting_function} enables us to calculate the 2PCF additive biases for any tomographic binning.} The model for the additive biases associated with PSF higher moment errors has in total 8 parameters. The multiplicative biases were modeled for each tomographic bin, using a quadratic function to fit $m(z)$. Our model for the 2PCF with multiplicative biases is \begin{equation} \label{eq:multiplicative_tomo} \hat{\xi}_+^{ij} = (1+m^i(z_i) + m^j(z_j))\xi_+^{ij}, \end{equation} where $\hat{\xi}_+^{ij}$ and $\xi_+^{ij}$ are the observed and true cosmic shear 2PCFs. Since the multiplicative shear biases for individual bins were determined from a quadratic fitting formula, only 3 parameters are needed to model the multiplicative biases. The 2PCF additive biases for the 15 tomographic bin-pairs were calculated using the best-fitting parameters for the linear functions of $z_i + z_j$. Next, they were Hankel transformed to obtain biases in the angular power spectra, $\Delta C_\ell$. The forecasted biases on the cosmological and intrinsic alignment parameters $p_i$ were calculated using \citep{10.1111/j.1365-2966.2005.09782.x} \begin{equation} \label{eq:param_bias} B[p_i] = \sum_j (I^{-1})_{ij} \frac{\partial C_{\ell}}{\partial p_j}^T \text{Cov}^{-1} \Delta C_{\ell}. \end{equation} We compared the bias $B[p_i]$ on each parameter with its forecasted 1$\sigma$ uncertainties from the Fisher matrix formalism in order to determine the relative importance of the systematic biases on cosmological parameter constraints due to PSF higher moment errors, if not corrected or removed. \begin{figure} \includegraphics[width=1.0\columnwidth]{plot/cosmology_parameters.pdf} \caption{The $1\sigma$ constraint contours from the Fisher forecast for the fiducial (black) and shifted by additive shear biases (orange) cosmological parameters for LSST Y10. The centroids of the forecasts are shown by the ``x''. If not accounted for in the analysis, the additive shear biases caused by errors in the PSF higher moments at the level produced by \textsc{PSFEx} for HSC PDR1 are predicted to shift the inferred cosmological parameters by $\sim 1\sigma$, at the LSST Y10 level. } \label{fig:xi_fitting} \end{figure} In Fig.~\ref{fig:xi_fitting}, we show the cosmological parameter shifts induced by failure to account for the additive shear biases caused by PSF higher moment residuals when interpreting cosmic shear measurements at the level of LSST Y10 \citep{2018arXiv180901669T}. In this forecast, we marginalized over the intrinsic alignment parameters $A_0$, $\beta$, $\eta_l$, and $\eta_h$. The shifts in cosmological parameters $B[p_i]$ caused by errors in the PSF higher moments correspond to $\sim 60$ to $\sim 100$ per cent of their $1\sigma$ uncertainties. Next, we applied redshift-dependent multiplicative biases $m(z)$, shown in Fig.~\ref{fig:redshift_mul}, to the cosmic shear $\xi_\pm$ in the Fisher forecasts. For LSST Y10 \citep{2018arXiv180901669T}, we found that these multiplicative biases only shift the cosmological parameters by a few per cent of their $1\sigma$ uncertainties. As discussed in Section~\ref{sec:analyses:mock_results}, the linear coefficient of $m(z)$ suggests that we have $m_0 = 0.0015$ in Eq.~\eqref{eq:m0}, which corresponds to around $50$ per cent of the systematic error budget for this parameter. This prediction overestimates the impact of the redshift-dependent multiplicative biases on the cosmological parameter estimates compared to our Fisher forecasts. The most likely reason for this finding is that our $m(z)$ is dominated by the quadratic term rather than the linear term, and therefore the redshift-dependent multiplicative shear bias is less degenerate with structure growth than the linear shear bias in Eq.~\eqref{eq:m0}. We repeated the Fisher forecast analysis for LSST Y1, incorporating differences in its redshift distribution and covariance matrix. The LSST Y1 forecast yielded a larger $\sigma$ for all of the parameters $p_i$. For the additive biases, our analysis predicted that the average $|B[p_i]|/\sigma$ for LSST Y1 is 0.21, compared to 0.73 for LSST Y10, over the parameters that the cosmic shear constrains, i.e., $\Omega_m$, $w_0$, $w_a$, and $\sigma_8$. For the multiplicative biases, our analysis predicted that this average $|B[p_i]|/\sigma$ for LSST Y1 is 0.039, compared to 0.062 for LSST Y10. In general, the PSF higher moment errors affect the results for LSST Y1 less so than LSST Y10, but they still must be accounted for in the Y1 analysis, if the PSF modeling is not improved. In summary, our Fisher forecast analysis showed that the PSF higher moment errors of \textsc{PSFEx} as applied to HSC PDR1 (if not reduced in magnitude or marginalized over in the analysis) can cause up to a $1\sigma$ shift in the cosmological parameter estimates in an LSST Y10 cosmic shear analysis. This result is dominated by additive biases; the multiplicative biases only shift the estimated cosmological parameters by $\sim 0.1\sigma$ according to the Fisher forecast. \section{Conclusions and Future Work} \label{sec:conclusions} In this paper, we have presented the results of a comprehensive study of the weak lensing shear biases associated with errors in modeling the PSF higher moments (beyond second moments) for ground-based telescopes, following the previous path-finding paper that identified the potential for non-negligible weak lensing systematics due to this effect for LSST (ZM21). We have quantified the additive and multiplicative shear biases due to errors in the 3\textsuperscript{rd} to 6\textsuperscript{th} moments of the PSF, including 22 moments in total, including estimating the typical magnitude of these errors when using current PSF modeling algorithms, and propagating them to the impact on cosmological parameter estimation. To carry out this study, we developed an iterative algorithm that uses a shapelet expansion to modify individual PSF moments in our image simulations while preserving the other moments. Using this approach, we measured the multiplicative and additive shear responses, $\partial m_{pq} / \partial M_{pq}$ and $\partial c_{pq} / \partial M_{pq}$, to the individual PSF moment errors. We identified trends in these quantities with the galaxy-to-PSF size ratio and the S\'ersic index of the galaxy. The behavior of the shear responses can be summarized as follows: \begin{enumerate} \item Given the typical magnitude of modeling errors in PSF higher moments, the amplitude of the shear biases due to errors in the odd moments of the PSF is 2-3 magnitude smaller than those caused by the even moments, which means that they can be ignored. \item For the even moments, the multiplicative and additive shear biases are linear functions of the moment biases $B[M_{pq}]$, and the responses primarily depend on the galaxy-to-PSF size ratio and S\'ersic index. \item Other galaxy parameters, e.g., bulge fraction $B/T$ and galaxy shapes, play a more minor role in determining the shear biases due to PSF higher moment errors. \end{enumerate} As an example of the current state of the art, we have measured the modeling quality of the PSF higher moments with two different PSF modeling algorithms (\textsc{PSFEx} and \textsc{Piff}) applied to the HSC survey dataset. We used high-SNR star images as the true PSF, and the interpolated PSF model at the stars' position as the model PSF. To focus on the impact of errors in the PSF higher moments, we measured the true and model PSF higher moments in a regularized coordinate system, where $e_1 = e_2 = 0$, and the second moment $\sigma$ values are the same for the model and true PSF. Overall, the PSF modeling quality is comparable for these methods. Our findings suggest there is value in further tuning and optimizing the PSF modeling performance for the 4\textsuperscript{th} and 6\textsubscript{th} moments for future versions of \textsc{Piff}. To reduce the dimensionality of the higher moment data vector and develop a basic understanding of the impact of the PSF higher moments on weak lensing, we began with preliminary tests. We put an artificial Gaussian galaxy at each HSC bright star position to determine the leading PSF higher moments that affect shear measurement. Through these tests, we put 6 (5) moments into `$g_1$ group' (`$g_2$ group'), which generate additive biases on $g_1$ ($g_2$). These 11 moments also include the 7 leading moments that generate multiplicative shear biases. We then used the mock galaxy catalog cosmoDC2 to propagate PSF modeling errors to the weak lensing shear 2PCF. We used Gaussian Random Field to generate realizations of PSF higher moments error of the 11 aforementioned leading moments, based on their means and correlation functions measured in the HSC \textsc{PSFEx} dataset. We adopted the bulge+disc model that cosmoDC2 provides, and interpolated the shear bias for each galaxy based on their bulge size, disk size, and B/T ratio. We subdivided the cosmoDC2 galaxies into three tomographic bins to measure redshift-dependent shear biases, and found that PSF higher moment errors only generate non-zero biases in $\xi_+$. \edit{Both the multiplicative and additive biases are redshift dependent, as they all depend on the galaxy property distributions at that redshift.} Finally, we have propagated the PSF higher moments error to systematic biases in inferred cosmological parameters using Fisher forecasting. We find that additive shear biases due to PSF higher moment errors can cause a $1\sigma$ systematic shift on key cosmological parameters, such as $\Omega_m$, $\sigma_8$ and $w_0$, at the LSST Y10 level -- implying that either PSF higher moment errors must be reduced from current levels for LSST Y10, or this effect must be explicitly modeled in the cosmological parameter analysis. In contrast, the multiplicative shear biases only cause cosmological parameter shifts of at most $0.1\sigma$. The forecast shows that the impact of the PSF higher moment errors on LSST Y1 is smaller than that on LSST Y10, but the effect is still not negligible even for Y1. \edit{This work motivates several future studies:} \begin{itemize} \item The results of this paper imply that future surveys, including LSST and the High Latitude Survey of the Roman Space Telescope, need to design null tests to ensure that the additive shear biases due to PSF higher moment errors do not cause an unacceptable level of contamination of the weak lensing shear data vectors. Requirements on PSF higher moment modeling quality, and/or mitigation methods, are needed for these surveys to recover credible cosmological constraints from the weak lensing shear data. \item \edit{Modeling the PSF higher moment residuals is needed in the cosmological analyses. By cross correlating PSF higher moments residual with the estimated shear, one can measure the systematics in 2PCF associated with the PSF higher moments error, and marginalize over it in the cosmological analyses. However, the high dimensionality of this source of systematic uncertainty remains challenging, even though this work has reduced the dimensionality by a factor of 2, encouraging future development.} \edit{\item This work also motivates the inspection of PSF higher moment modeling quality to drive the further development of new PSF modeling algorithms. This includes inspecting whether the reconstruction, interpolation, as well as the coadding process can generate errors in the PSF higher moments. Careful attention to this issue could greatly simplify the points mentioned above about modeling the impact of this systematic in future surveys.} \edit{Because of the size dependence we find in both the additive and multiplicative biases, we recommend further development in redshift-dependent additive and multiplicative biases PSF systematics modeling in the cosmological analyses for the cosmic shear.} \end{itemize} \section*{Contributors} TZ developed the simulation and measurement software, carried out analysis on the results, and led the writing of the manuscript. HA developed the code for the Fisher Information matrix and relevant parameter inference, and contributed writing for Section 3.5. RM proposed the project, advised on the motivation, experimental design and analysis, and edited the manuscript. JEM advised and provided early access to HSC data processed using \textsc{Piff}. MJ provided feedback throughout the project regarding interpretations of results, suggestions for validation tests, providing textual edition on the manuscript, and guidance on software implementation. AK provided ideas behind the symmetry and formalism in PSF higher moments, and feedback throughout the project. MAS provided feedback throughout the project, mostly in the form of questions asked regarding intermediate results and the design of the tests performed. He provided feedback and numerous suggestions on the manuscript, including changes to Figures 3 and B2, Algorithm 1, and made several minor edits. AG provided feedback and fundamental structural suggestions to the manuscript. \subsection*{Acknowledgments} This paper has undergone internal review in the LSST Dark Energy Science Collaboration by Axel Guinot, Henk Hoekstra, and Francois Lanusse, we thank them for their constructive comments and reviews. We thank Aaron Roodman, Ares Hernandez, Xiangchong Li, Mustapha Ishak, and Douglas Clowe for the helpful comments and discussion. TZ and RM are supported in part by the Department of Energy grant DE-SC0010118 and in part by a grant from the Simons Foundation (Simons Investigator in Astrophysics, Award ID 620789). The DESC acknowledges ongoing support from the Institut National de Physique Nucl\'eaire et de Physique des Particules in France; the Science \& Technology Facilities Council in the United Kingdom; and the Department of Energy, the National Science Foundation, and the LSST Corporation in the United States. DESC uses resources of the IN2P3 Computing Center (CC-IN2P3--Lyon/Villeurbanne - France) funded by the Centre National de la Recherche Scientifique; the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S.\ Department of Energy under Contract No.\ DE-AC02-05CH11231; STFC DiRAC HPC Facilities, funded by UK BIS National E-infrastructure capital grants; and the UK particle physics grid, supported by the GridPP Collaboration. This work was performed in part under DOE Contract DE-AC02-76SF00515. Based in part on data collected at the Subaru Telescope and retrieved from the HSC data archive system, which is operated by Subaru Telescope and Astronomy Data Center at National Astronomical Observatory of Japan. The Hyper Suprime-Cam Subaru Strategic Program (HSC-SSP) is led by the astronomical communities of Japan and Taiwan, and Princeton University. The instrumentation and software were developed by the National Astronomical Observatory of Japan (NAOJ), the Kavli Institute for the Physics and Mathematics of the Universe (Kavli IPMU), the University of Tokyo, the High Energy Accelerator Research Organization (KEK), the Academia Sinica Institute for Astronomy and Astrophysics in Taiwan (ASIAA), and Princeton University. The survey was made possible by funding contributed by the Ministry of Education, Culture, Sports, Science and Technology (MEXT), the Japan Society for the Promotion of Science (JSPS), (Japan Science and Technology Agency (JST), the Toray Science Foundation, NAOJ, Kavli IPMU, KEK, ASIAA, and Princeton University. This paper makes use of software developed for the Vera C. Rubin Observatory. We thank the Vera C. Rubin Observatory for making their code available as free software at http://dm.lsst.org. The Pan-STARRS1 Surveys (PS1) have been made possible through contributions of the Institute for Astronomy, the University of Hawaii, the Pan-STARRS Project Office, the Max-Planck Society and its participating institutes, the Max Planck Institute for Astronomy, Heidelberg and the Max Planck Institute for Extraterrestrial Physics, Garching, The Johns Hopkins University, Durham University, the University of Edinburgh, Queen’s University Belfast, the Harvard-Smithsonian Center for Astrophysics, the Las Cumbres Observatory Global Telescope Network Incorporated, the National Central University of Taiwan, the Space Telescope Science Institute, the National Aeronautics and Space Administration under Grant No. NNX08AR22G issued through the Planetary Science Division of the NASA Science Mission Directorate, the National Science Foundation under Grant No. AST-1238877, the University of Maryland, and Eotvos Lorand University (ELTE) and the Los Alamos National Laboratory. We thank the developers of \textsc{GalSim}, \textsc{ngmix}, and \textsc{TreeCorr} for making their software openly accessible. Some of the results in this paper have been derived using the \textsc{Healpy} and \textsc{HEALPix} package. \section*{Data Availability} The HSC-SSP data in this paper is publicly available at \url{https://hsc-release.mtk.nao.ac.jp/doc/index.php/tools-2/}. The COSMOS catalog is available at \url{https://zenodo.org/record/3242143#.YF2bHK9KiUk}. The cosmoDC2 catalog is available at the LSST DESC Data Portal \url{https://data.lsstdesc.org/}. Simulation and analysis code is publicly available\footnote{\url{https://github.com/LSSTDESC/PSFHOME}}. \section{Real Data Higher moment}
\section{Hyperdimensional Computing} \label{sec:HDC} Hyperdimensional Computing (HDC) is a computation model that relies on very high dimensionality and randomness. Inspired by neuroscience, it seeks to mimic and exploit important characteristics of the animal brain while balancing accuracy, efficiency and robustness~\cite{kanerva2009hyperdimensional}. The central idea is to represent inputs $x \in \mathcal{X}$ by projecting them onto a hyperspace $\mathcal{H}=\{0, 1\}^d$, with $d \approx 10{,}000$ dimensions. This mapping $\phi: \mathcal{X}\to\mathcal{H}$ is called \textit{encoding}, and the resulting representations $\phi(x)$ are named \textit{hypervectors}. The intuitive principle that guides the design of encoding functions is that similar objects in input space need to be mapped to similar hypervectors in hyperspace. We use the normalized Hamming distance as a measure of distance between hypervectors, which takes the form: \begin{align*} \delta:\mathcal{H}\times\mathcal{H}\to\{\sigma\in\mathbb{R} \mid 0\leq\sigma \leq 1\} \end{align*} We then define the hypervector \textit{similarity} to be $1 - \delta$. All cognitive tasks in HDC are ultimately based on similarity. Predictions or decisions are inferred from a model which is created by transforming and combining information using HDC arithmetic. \subsection{Operations} \label{sec:operations} The arithmetic in HDC is based on a simple set of two element-wise, dimension-independent, operations in addition to a permutation operator~\cite{kanerva2009hyperdimensional}. The three operations, \textit{binding}, \textit{bundling}, and \textit{permuting} are illustrated in Figure~\ref{fig:operations}. \paragraph{Binding} The binding operation is used to ``associate'' information. The function $\otimes: \mathcal{H} \times \mathcal{H} \to \mathcal{H}$ multiplies two input hypervectors to produces a third vector dissimilar to both the operands. The binding operator is commutative and distributive over bundling and serves at its own inverse, i.e., $A\otimes (A\otimes B) = B$. The binding operation is efficiently implemented as element-wise XOR. \paragraph{Bundling} The bundling operation is used to represent a set of information. The function $\oplus: \mathcal{H}\times\mathcal{H}\to\mathcal{H}$ performs addition on its inputs to produce an output hypervector that is similar to its operands. Bundling is implemented as an element-wise majority operation. The output then represents the mean-vector of its inputs. \paragraph{Permuting} The permutation operator is often used to establish an order, that is, to differentiate permutations of a sequence. The function takes the form $\Pi: \mathcal{H} \to \mathcal{H}$, whose output hypervector is dissimilar to the input. The exact input can be retrieved with the inverse operation. The operator performs multiplication with a permutation matrix and the most common is a cyclic shift. With $\Pi^i(A)$ we denote a cyclic shift of the elements of $A$ by $i$ coordinates. \begin{figure}[h] \centering \input{content/images/operations} \caption{\label{fig:operations} \textit{Binding}, \textit{bundling}, and \textit{cyclic shift} permutation operations illustrated on binary hypervectors $A$ and $B$ where the superscript denotes the element index of the hypervector. The logical gates in the bundling operation are \textit{majority gates}.} \end{figure} \medskip Much of HDC's ability to learn comes from the fact that the very high dimension of the $\mathcal{H}$-space allows combining information with these operations while preserving the information of the operands with high probability, due to the existence of a huge number of quasi-orthogonal vectors in the space. For a more theoretical analysis of these properties see the work by Thomas et al.~\cite{thomas2021theoretical}. \subsection{Classification} \label{sec:HDCclassification} Once the encoding function $\phi$ is defined, the training of a classification model with HDC is quite intuitive. An overview of the standard HDC classification framework is illustrated in Figure~\ref{fig:HDCClassification}. For each class $i\in\{1,\dots,k\}$ in the training set, we construct a hypervector $M_i$ as follows: \begin{align*} M_i = \bigoplus_{j :\ell(x_j )=i} \phi(x_j ) \end{align*} where each $x_j \in {\mathcal X}$ is a training sample and $\ell(x_j ) \in \{1,\dots,k\}$ its respective label. The $\bigoplus$ symbol represents the bundling of hypervectors. The hypervector $M_i$ has the smallest average distance to the hypervectors obtained by encoding the training samples of class $i$. For this reason, each of these hypervectors is used as a ``prototype'' of its respective class and is referred to as a \textit{class-vector}. A trained HDC classification model is therefore denoted by $\mathcal{M} = \{M_i , \dots ,M_k\}$, and simply consists of a class-vector for each class. \begin{figure}[ht] \centering \input{content/images/classification} \caption{\label{fig:HDCClassification} Overview of the Hyperdimensional Computing classification framework. Solid lines indicate training steps, dashed lines indicate inference steps.} \end{figure} Given an unlabeled input $\hat{x}\in \mathcal{X}$, i.e., a test sample, and a trained model $\mathcal{M}$, we simply compare $\phi(\hat{x})$, the \textit{query-vector}, with each class-vector and infer that the label of $\hat{x}$ is the one that corresponds to the most similar class-vector: \begin{align*} \ell^{\star}(\hat{x}) = \underset{i\in\{1,\dots,k\}}{\arg\min} \;\delta\left(\phi(\hat{x}), M_i \right) \end{align*} where $\ell^{\star}(\hat{x}) \in \{1, \dots, k\}$ is the predicted class for $\hat{x}$. \subsection{Regression} \label{sec:HDCregression} In a regression setting, the model $\mathcal{M}$ consists of a single hypervector, which memorizes training samples with their associated label. This is different from the classification setting where a sample's class is implicitly stored as the index of the class-vector. The label of each sample in a regression setting is a real number $\ell(x) \in \mathbb{R}$. To encode a label, an invertible encoding function $\phi_{\ell}$, which maps real numbers to hypervectors, needs to be introduced. The invertibility property is needed to allow labels to be determined during inference. The function's output is a finite subset $\mathbf{L} = \{L_1, \dots, L_k\}$ of all hypervectors in $\mathcal{H}$ whose generation is discussed in Section~\ref{sec:level-creation}. The hypervectors in $\mathbf{L}$ are linearly correlated such that the closer the real numbers they represent, the more similar the hypervectors are. A model is then obtained as follows: \begin{align*} \mathcal{M} = \bigoplus_i \phi(x_i) \otimes \phi_{\ell}(\ell(x_i)) \end{align*} A prediction can be made given a trained model $\mathcal{M}$ and an unlabeled input $\hat{x} \in \mathcal{X}$. First the approximate label hypervector is obtained by binding the model with the encoded sample $\mathcal{M} \otimes \phi(\hat{x}) \approx \phi_{\ell}(\ell(\hat{x}))$ which exploits the self-inverse property of binding. The remaining terms add noise, making it approximately equal~\cite{kanerva2009hyperdimensional, thomas2021theoretical}. The precise label hypervector is then the most similar label hypervector $L_l$, where: \begin{align*} l = \underset{i\in\{1, \dots, k\}}{\arg\min} \;\delta\left(\mathcal{M} \otimes \phi(\hat{x}), L_i \right) \end{align*} Finally, the label is obtained by decoding the label hypervector using the inverse of the label encoding function: \begin{align*} \ell^{\star}(\hat{x}) = \phi_{\ell}^{-1}(L_l) \end{align*} The encoding functions $\phi$ and $\phi_{\ell}$, used in both classification and regression, are domain specific and use the HDC operations to encode complex information (e.g., a word) by combining simpler, atomic pieces of information (e.g., the letters of a word). An example encoding for words is discussed in Section~\ref{sec:randomHVS}. The first important decision in designing an HDC encoding is how to represent atomic information as hypervectors. These hypervectors represent the smallest pieces of meaningful information and are referred to as \textit{basis-hypervectors}. These sets are the central subject in this paper. Our main goal is to show that a special set of basis-hypervectors (described in Section~\ref{sec:circularHVs}) is more appropriate for dealing with circular data. \section{Basis-Hypervectors} \label{sec:basisHVs} In this section we describe the two existing basis-hypervector sets. These are stochastically created hypervector sets used to encode the smallest units of meaningful information. Their main feature is the pairwise distance as illustrated in Figure~\ref{fig:similarity-map}. This section serves as background for Section~\ref{sec:circularHVs}, where we present another basis set never before applied to learning. \begin{figure}[h] \centering \scalebox{0.75}{\subimport*{content/images/}{similarity-map.pgf}} \caption{\label{fig:similarity-map} Pairwise similarity of each $i$-th and $j$-th hypervector within a basis-hypervector set of size 12. Comparing between random, level and circular basis-hypervectors.} \end{figure} \subsection{Encoding symbols} \label{sec:randomHVS} Early applications in HDC were learning from sequences of symbols such as text data~\cite{rahimi2016robust}. The units of information, in this case characters, were mapped (one-to-one) to hypervectors $\mathbf{R}=\{R_1, \dots, R_m\}$ sampled \textit{uniformly} at random from the hyperspace $\mathcal{H}$, called \textit{random-hypervectors}. From this, a word $w = \{\alpha_1 ,\dots, \alpha_n\}$ is typically encoded as: \begin{align*} \phi(w) = \bigoplus_{i=1}^n \Pi^{i} \big(\phi_{\mathbf{R}}(\alpha_i )\big) \end{align*} where $\phi_{\mathbf{R}}(\alpha_i ) \in \mathbf{R}$ maps the character $\alpha_i$ to its corresponding random-hypervector $R_i$, and $\Pi$ is the permutation operation which ensures that information about the location of each character in the word is preserved. In general, any sequence or set comprised of symbolic or categorical data can be encoded using random-hypervectors. Because of the high dimensionality of $\mathcal{H}$, each pair of symbols $R_i$ and $R_j$ in $\mathbf{R}$ (with $i \ne j$) is quasi-orthogonal with high probability~\cite{kanerva1988sparse}. In other words, there is no correlation between the hypervectors in the $\mathbf{R}$ basis set. While this seems suitable for encoding letters, which to some extent represent unrelated information, clearly it is not as adequate for other kinds of unitary information, such as real numbers. \subsection{Encoding real numbers} \label{sec:levelHVS} Many domains use real numbers to represent information such as distance, time, energy and velocity. Representing these values in $\mathcal{H}$-space requires a mapping to a discrete set of hypervectors $\mathbf{L} = \{L_1 , \dots, L_m \}$. A real number is mapped to a hypervector with the encoding function $\phi_{\mathbf{L}}$. Let $[a,b]$ denote the interval $\{x \in \mathbb{R} \mid a \leq x \leq b\}$ we want to represent. The first step is to place $m$ points $\{\xi_1 ,\dots, \xi_m \}$ evenly over the interval $[a, b]$, where: \begin{align*} \xi_i = a + (i - 1) \frac{b - a}{m - 1} \end{align*} Any real number $x$ is then represented in the hyperspace by $\phi_{\mathbf{L}}(x) = L_l$, where: \begin{align*} l = \underset{i\in\{1,\dots,m\}}{\arg\min} \; \lvert x - \xi_i \rvert \end{align*} The central question here is how to construct the set of hypervectors $\mathbf{L}$. One might again consider using vectors uniformly sampled from the $\mathcal{H}$-space. Although not entirely wrong, encoding a real interval this way fails to capture an important relationship between the points on the interval. There is clearly a stronger relation between neighboring points (e.g., $\xi_1$ and $\xi_2$) when compared to $\xi_1$ and $\xi_m$, due to the different distance between these points. As indicated by our results presented in Section~\ref{sec:experiments}, encoding strategies capable of capturing such relationships (see also Section~\ref{sec:circularHVs}) lead to more powerful models. In the next section we present the way this relationship between hypervectors has thus far been achieved. In addition, we propose an improved method that we argue has more representational power. \section{Encoding Circular Data} \label{sec:circularHVs} \label{sec:circularData} As described above, symbols and real numbers can be represented in the hyperspace with random and level-hypervector basis sets, respectively. However, not every type of data falls into these two categories. Consider, for instance, angular data in $\Theta=[0,2\pi]$. The distance $\rho \in [0,1]$ between two angles $\alpha$ and $\beta$ in $\Theta$ is defined as~\cite{lund1999least}: \begin{align*} \rho(\alpha,\beta) = \frac{1}{2}\left(1-\cos(\alpha-\beta)\right) \end{align*} If we use level-hypervectors to encode the $\Theta$-interval, the distances between the hypervectors would not be proportional to the distance between the angles. Notice that the endpoints of an interval represented with level-hypervectors are completely dissimilar, while a circle has no endpoints. Angles are widely used to represent information in meteorology~\cite{holzmann2006hidden}, ecology~\cite{tracey2005set,kempter2012quantifying}, medicine~\cite{gao2006application,gao2014jhu,ahmidi2017dataset}, astronomy~\cite{cabella2009statistical,marinucci2011random} and engineering~\cite{chirikjian2000engineering}. Moreover, many natural and social phenomena have circular-linear correlation on some time scale. Consider for example the seasonal temperature variations over a year or the behavior of fish with respect to the tides in a day. In these cases, it makes sense to represent the time intervals (e.g., Jan 1st - Dec 31st) as cyclic intervals~\cite{lund1999least,kempter2012quantifying}. Given the multitude of applications using circular data, unsurprisingly there has been great scientific effort to adapt statistical and learning methodologies to handle it appropriately~\cite{lee2010circular}. This gave rise to a branch of statistical methodology known as \textit{directional statistics}~\cite{mardia2000directional,pewsey2021recent}. Despite all this effort, to the best of our knowledge, our work is the first to address the adaptation in the context of HDC learning. \subsection{Circular-hypervectors} \label{sec:creatingCircularHVs} An algorithm for creating a set of hypervectors whose distances are proportional to that of a set of equidistant points on a circle has recently been proposed by Heddes et al.~\cite{heddes2022hyperdimensional}. They used the set, called \textit{circular-hypervectors}, to create a dynamic hashing system, where the circular structure helps with evenly distributing requests across a changing population of servers~\cite{karger1997consistent}. We propose to adapt and generalize their algorithm to create a basis set of hypervectors suitable for learning from circular data using HDC. We want to build a set of hypervectors $\mathbf{C}=\{C_1, \dots, C_m\}$\footnote{We assume $m$ to be even to simplify discussions. Sets of odd cardinality can be generated as subsets $\{C_1, C_3, C_5, \dots, C_{2m - 1} \}$ of a set of size $2m$.} such that for all $C_i$ and $C_j$ in $\mathbf{C}$ their distance $\delta$ in $\mathcal{H}$ is proportional to the distance between the angles they represent: \begin{align*} \mathbb{E}\left[\delta(C_i, C_j)\right] = \frac{1}{2}\,\rho\left((i-1)\frac{2\pi}{m},(j-1)\frac{2\pi}{m}\right) \end{align*} This relationship is in terms of expected value to improve the information content as discussed in Section~\ref{sec:level-creation}. \begin{figure}[H] \centering \input{content/images/circle-generation} \caption{\label{fig:create-circle-hv} Diagram of the creation of circular-hypervectors. Phase 1 shows the level-hypervectors and the transformations between them. Phase 2 shows the use of transformations for the second half of the circle. The dashed transformation is shown to complete the circle but is not needed since $C_1$ is already known.} \end{figure} The creation of circular-hypervectors, shown in Figure~\ref{fig:create-circle-hv}, is divided into two phases, one for each half of the circle. The first half is simply a set of $m/2 + 1$ level-hypervectors: \begin{align*} C_i = L_i \text{ for } i \in \left\{1, \dots, m/2 + 1\right\} \end{align*} where $C_1$ and $C_{m/2 + 1}$ are quasi-orthogonal, ensuring that the opposite side of the circle is completely dissimilar. The second half is created by applying the transitions between the levels of the first half, in order, to the last circular-hypervector: \begin{align} \label{eq:circle-phase2} C_i = C_{i-1} \otimes T_{i - m/2 - 1}, \text{ for } i \in \left\{m/2 + 2, \dots, m\right\} \end{align} where the transition $T_i = C_{i} \otimes C_{i + 1}$ are the flipped bits between levels $i$ and $i + 1$. The combined transitions $\{T_1, \dots, T_{m/2}\}$ are equal to the transition from $C_1$ to $C_{m/2 + 1}$ such that: \begin{align*} C_{m/2 + 1} = C_{1} \otimes \bigotimes_{i = 1}^{m/2} T_i \end{align*} Since binding is its own inverse, the transitions bound to $C_{i-1}$ in Equation~\ref{eq:circle-phase2} make the new hypervector $C_{i}$ closer to $C_1$. Moreover, the transitions $\{T_1, \dots, T_{m/2}\}$ occur in any half of the circle, ensuring that the hypervector at the opposite side from any point is always quasi-orthogonal to it. \subsection{Controlling the trade-off between correlation preservation and information content} \label{sec:IncreasingRandomness} The discussion in Section~\ref{sec:imporance-orthogonality} illustrated the benefit of relaxing the distance between generated hypervectors, resulting in greater information content. Another concern is that, while level and circular-hypervectors have the ability to translate important correlations into hyperspace, from the perspective of information content this diminishes their representational power: by forcing the vectors to be correlated, the probability distribution over the possible outcomes becomes more concentrated, decreasing the entropy. We argue that more powerful models can be created if this constraint, i.e., the correlation, is relaxed as well. The random-hypervectors are the most capable at representation as they are sampled uniformly, without any restriction. However, for this very reason they are unable to map existing correlations in the input space to the hyperspace. The level and circular sets preserve correlation but are restricted in information content. The ideal basis set is then expected to have a balance between its ability to preserve correlation and its information content. To address this trade-off, we introduce a hyperparameter $r \in [0, 1]$ that interpolates between a level or circular-hypervector set, and the random set. As can be seen in Figure~\ref{fig:r-value-circle}, the $r$-hyperparameter changes the amount of correlation between neighboring nodes. Intermediate values of $r$ thus enable higher information content while locally the relative correlation is preserved. \begin{figure}[H] \centering \input{content/images/r-circular-impact} \caption{\label{fig:r-value-circle} Effect of the $r$-hyperparameter on the similarities between each node and the bottom reference node in a circular set of 10 hypervectors.} \end{figure} To interpolate we concatenate multiple level-hypervector sets created with Algorithm~\ref{alg:level_hvs}. The last hypervector of one set becomes the first hypervector of the next set. The number of transitions $n$ per level-hypervector set is given by: \begin{align*} n = r + (1 - r)(m - 1) \end{align*} where $m$ is the total number of hypervectors in the concatenated set. Each level in the concatenated set is obtained by using the threshold value: \begin{align*} \tau_l = 1 - \frac{(l - 1)\; \mathrm{mod}\; n}{n} \end{align*} When $r=1$, each level set contains only two hypervectors, (i.e., one transition) resulting in a set identical to a random-hypervector set. For circular-hypervectors the change only applies to phase 1 (see Section~\ref{sec:creatingCircularHVs}). \section{Conclusion} \label{sec:conclusion} We study basis-hypervectors: stochastically created vectors used to represent atomic information in HDC. Taking inspiration from information theory, we propose a methodology to create level-hypervectors with greater representational power. Furthermore, we introduce a method to handle circular data in HDC. This method, which uses the improved level-hypervectors, is the first approach to learning from circular data in HDC. We believe that these contributions have the potential to benefit HDC in general, as they improve the accuracy of models based on circular and real data, present in most learning applications. \section{Experiments} \label{sec:experiments} We evaluate circular-hypervectors in classification and regression settings where they are compared to random and level-hypervectors. The $r$-hyperparameter is evaluated by observing its effect on the same two settings. \subsection{Classification} \label{sec:classificationResults} To evaluate the performance of circular-hypervectors in a classification setting, we use the JHU-ISI Gesture and Skill Assessment Working Set (JIGSAWS) dataset~\cite{gao2014jhu,ahmidi2017dataset}. The dataset contains videos accompanied by 76-dimensional kinematic data of three different surgical tasks, performed by eight different surgeons, operating the \textit{da Vinci} robot. As our goal is to show whether circular-hypervectors are more appropriate for dealing with circular data, we use a subset of the dataset containing circular data. Specifically, we use the 18 kinematic variables that represent the rotation matrices of the left master tool manipulator and patient-side manipulator. Each sample has a label which indicates the surgical activity called ``gestures.'' There are 15 gestures, each representing intentional surgical actions such as ``orienting needle,'' ``pushing needle through tissue'' and ``transferring needle from left to right.'' The task is to classify which gesture is being performed. For this, we used the standard classification framework presented in Section~\ref{sec:HDCclassification}. A sample is encoded as $\textstyle \bigoplus_{i = 1}^{18} K_i \otimes V_i$ where the key $K_i$ is a random-hypervector that represents the index $i$, and the value $V_i$ is encoded as a random, level or circular-hypervector, depending on the experiment. For each of the three surgical tasks, \textit{Knot Tying}, \textit{Needle Passing} and \textit{Suturing}, a model was trained on the data from surgeon "D", one of the most experienced in the experiment. \begin{table} \caption{Classification accuracy results. The circular hypervectors have $r=0.1$.} \label{tab:classification-acc} \begin{tabular}{lccc} \toprule Dataset & Random & Level & Circular\\ \midrule Knot Tying & 76.6\% & 75.9\% & \textbf{84.0\%}\\ Needle Passing & 76.0\% & 76.0\% & \textbf{83.6\%}\\ Suturing & 73.0\% & 60.4\% & \textbf{78.7\%}\\ \bottomrule \end{tabular} \end{table} The results comparing the classification accuracy of each basis-hypervector set for each surgical task are shown in Table~\ref{tab:classification-acc}. The circular-hypervectors perform an average of 7.2\% better than random-hypervectors, which in-turn slightly outperform level-hypervectors. The training and evaluation running time are nearly equivalent among all basis sets because the one-time differentiating cost of generating the basis set is negligible compared to the training time. \subsection{Regression} \label{sec:regressionResults} In addition to classification, we evaluate the performance of circular-hypervectors on two regression tasks. The first contains temperature data measured in Beijing, from March 2013 till February 2017 at the Aotizhongxin station~\cite{zhang2017cautionary}, available on the UCI Machine Learning Repository~\cite{Dua:2019}. We hypothesize that the circular-hypervectors are more appropriate for representing the day of the year and the hour of the day in this setting because they are both proxies of angular values: the angle of the earth in its orbit around the sun and the earth around its axis, respectively. Since both of these values are highly correlated with the outside temperature, we expect an HDC model that preserves the angular correlation to be better at forecasting the temperature. Each model was trained on the first 70\% of the data using the regression framework described in Section~\ref{sec:HDCregression}. The samples are encoded as $Y \otimes D \otimes H$ with the year $Y$, day $D$, and hour $H$ hypervectors. The year hypervector is a level-hypervector, enabling the model to capture macro trends in temperature, such as global warming. The day and hour hypervectors change between random, level, and circular depending on the experiment. The label is the temperature at a given time, encoded as a level-hypervector. After the models are trained, one for each type of basis-hypervector, their performance is measured by calculating the mean squared error on predictions of the last 30\% of the dataset. The second dataset contains power level measurements from the Mars Express satellite, provided by the European Space Agency~\cite{dressler2019mars}. The power level of the satellite fluctuates based on its orbit and the on-board energy consumption~\cite{lucas2017machine}. A more accurate model for available power means that the safety margins can be reduced, therefore allowing more energy to be dedicated towards scientific operations. A training sample consists of the elapsed fraction of Mars' orbit around the sun, called the mean anomaly. The encoding of the mean anomaly changes based on the experiment between random, level, and circular-hypervectors. The label is the power level at a given time, encoded as a level-hypervector. The data is randomly split between 70\% training and 30\% testing. The performance of each basis set is determined on the test split using the mean squared error metric. \begin{figure}[h] \centering \scalebox{0.70}{\subimport*{content/images/}{regression-mse.pgf}} \caption{\label{fig:regression-mse} Regression normalized mean squared error results for each basis hypervector type. Normalized against the performance of random hypervectors. The circular hypervectors have $r=0.01$.} \end{figure} The results for both regression tasks are presented in Table~\ref{tab:regression-mse}. Circular-hypervectors reduce the error by 67.7\% and 84.4\% on average compared to level-hypervectors and random-hypervectors, respectively. These results, in combination with those for classification, illustrate how domain knowledge about the circular nature of the data can account for a significant improvement in performance. The efficiency of HDC ensures that most embedded systems can afford HDC models within their computation budget. This makes circular-hypervectors ideally suited for embedded and IoT application that are rich in circular data, such as robotics, where actuators and joints generate much angular data. \begin{table} \caption{Regression mean squared error results. The circular hypervectors have $r=0.01$.} \label{tab:regression-mse} \begin{tabular}{lccc} \toprule Dataset & Random & Level & Circular\\ \midrule Beijing & 441.1 & 126.8 & \textbf{21.9}\\ Mars Express & 1294.1 & 715.6 & \textbf{339.1}\\ \bottomrule \end{tabular} \end{table} \subsection{R-value} \label{sec:exp-r-value} We evaluate the $r$-hyperparameter by observing the performance of the classification and regression tasks described above as we vary the $r$-value between 0 and 1, interpolating between circular and random-hypervectors. In order to aggregate the effects in one plot we use the normalized mean squared error metric for the regression tasks and the normalized accuracy error, defined as $\frac{1 - \alpha}{1 - \bar{\alpha}}$ where $\alpha$ is the accuracy and $\bar{\alpha}$ the reference accuracy. The reference for all tasks is set to the performance of random-hypervectors, equivalent to the endpoint of the interpolation. \begin{figure}[h] \centering \scalebox{0.7}{\subimport*{content/images/}{r-value.pgf}} \caption{\label{fig:r-value} Error of the circular-hypervector basis set with varying $r$-hyperparameter, normalized against the random-hypervector set performance per dataset.} \end{figure} The normalized error plot shown in Figure~\ref{fig:r-value} indicates that better performance can be achieved when $r > 0$, as is inline with the theoretical analysis presented in Section~\ref{sec:imporance-orthogonality}. After improving initially, as $r$ gets closer to 1, the performance approaches that of the random-hypervectors. These results indicate the importance of considering the information content of a basis-hypervector set as we propose in our work. In addition, it shows the value of the proposed $r$-parameter to control the trade-off between representation power and the ability to preserve correlations in the hyperspace mapping. \section{Introduction} \section{Introduction} \label{sec:intro} For some time now, machine learning has largely dictated not just academic research and industrial applications, but aspects of modern society in general. Such aspects range from the widespread recommendation systems, which influence the way we consume products, news and entertainment, to social networks that impact the way we behave and relate. Given such broad importance, the demand for devices capable of learning has spread to resource constrained platforms such as embedded systems and internet of things (IoT) devices~\cite{kaelbling1993learning,branco2019machine}. Such scenarios present obstacles to established methods, designed primarily to operate on powerful servers. The most notable class of such methods is Deep Learning, which has achieved superhuman performance on certain tasks~\cite{schmidhuber2015deep}. Although initially inspired by the remarkably efficient animal brain, Deep Learning owes much of its high energy and computational cost to neurally implausible design choices~\cite{crick1989recent,marblestone2016toward,whittington2019theories}. The dilemma is that these choices, especially error back-propagation and large depth, are also key drivers of its success~\cite{lecun2015deep}. In this context, the search for alternatives has received significant attention from the scientific community~\cite{james2017historical,deneve2017brain,kanerva1988sparse}. One emerging alternative is \textit{Hyperdimensional Computing} (HDC)~\cite{kanerva2009hyperdimensional}. Like Deep Learning, HDC is also inspired by neuroscience, but the central observation is that large circuits are fundamental to the brain's computation. Therefore, information in HDC is represented using \textit{hypervectors}, typically 10,000-bit words where each bit is \textit{independently and identically distributed} (i.i.d). The i.i.d relationship between bits, also known as holographic information representation, provides inherent robustness since each bit carries exactly the same amount of information. Furthermore, the arithmetic in HDC, as detailed in Section~\ref{sec:HDC}, is generally dimension-independent, which opens up the opportunity for massive parallelism, providing the efficiency sought in HDC. HDC has already proven to be useful in several applications, including both learning problems, such as classification~\cite{ge2020classification} and regression~\cite{hersche2020integrating}, and classical problems, such as consistent hashing~\cite{heddes2022hyperdimensional}. Regardless of the application, the most fundamental step in HDC is mapping objects in the input space to the hyperspace, a process called \textit{encoding}. Useful encoding functions have already been proposed for several different types of data, such as time series~\cite{rahimi2016hyperdimensional}, text~\cite{rahimi2016robust}, images~\cite{manabat2019performance} and graphs~\cite{nunes2022hyperdimensional}. All these encodings have one thing in common: they start by encoding simple information (e.g. pixel values, vertices and edges, letters, amplitudes of a signal), which are then combined to represent something complex. In this work we study \textit{basis-hypervectors}, the encoding of these atomic pieces of information. Basis-hypervectors are a cornerstone of HDC and directly effect the accuracy of learned HDC models, as will be evident from the results in Section~\ref{sec:experiments}. Nevertheless, to the best of our knowledge, this is the first work with a primary focus on the study of basis-hypervectors. We start with a comparative study of the two existing types of basis-hypervectors, \textit{random} and \textit{level-hypervectors}, used respectively to represent uncorrelated and linearly-correlated data. Inspired by information theory, our first contribution is an improved method to create level-hypervectors. Based on the improved level-hypervectors, our main contribution is a basis-hypervector set for \textit{circular data} in a learning setting. Circular data are derived from the measurement of directions, usually expressed as an angle from a fixed reference direction. In addition, it is common to convert time measurements, such as the hours of a day, to angles. As we will discuss in more detail in Section~\ref{sec:circularData}, circular data is present in many fields of research, including astronomy, medicine, engineering, biology, geology and meteorology~\cite{fisher1995statistical,lee2010circular,mardia2000directional}. Embedded systems and IoT also deal with a wide variety of circular data, such as in robotics where the joints generate angular data~\cite{gao2014jhu}, and satellites that fly in elliptical orbits~\cite{lucas2017machine}. The importance is such that the study and interpretation of this type of data gave rise to a subdiscipline of statistics called \textit{directional statistics} (also known as circular or spherical statistics)~\cite{mardia2000directional,pewsey2021recent}. Despite this great relevance, our work is the first to address learning from circular data in HDC. To assess the practical impact of these contributions, we conducted experiments with publicly available datasets that contain circular data relevant to real-world applications. We compared the proposed basis set with the two existing ones in both regression and classification tasks. We obtained an improvement of 7.2\% in the classification of 15 types of surgical gestures. In regression, the error is reduced by 67.7\% in temperature and power level prediction tasks. \section{Generating level-hypervectors} \label{sec:level-creation} A method for representing real numbers with linearly correlated hypervectors was first described by Rahimi et al.~\cite{rahimi2016hyperdimensional} and Widdows and Cohen~\cite{widdows2015reasoning}. These sets are widely used in HDC and are generally referred to as \textit{level-hypervectors}. The generation of a level-hypervector set $\mathbf{L}=\{L_1, \dots, L_m \}$ starts by assigning a uniform random vector to $L_1$. Each subsequent vector is obtained by flipping $d/2/m$ bits. During the process, flipped bits are never unflipped. Therefore, the vectors $L_1$ and $L_m$, representing the endpoints of the interval, share \textit{exactly} $d/2$ bits, making them \textit{precisely} orthogonal. We argue that if the precise distance constraint is relaxed, a set with greater representation power can be created. We substantiate this claim in the next section. \subsection{The importance of \textit{quasi}-orthogonality} \label{sec:imporance-orthogonality} From an information theory perspective, the amount of information conveyed in the outcome of a random trial is a function of the probability of that outcome. More formally, for a given random variable with possible outcomes $\varepsilon_1,\dots,\varepsilon_n$, which occur with probability $\mathbb{P}(\varepsilon_1),\dots,\mathbb{P}(\varepsilon_n)$, the \textit{Shannon information content} $\mathscr{I}$ of an outcome $\varepsilon_i$ is defined as~\cite{mackay2003information}: \begin{align*} \mathscr{I}(\varepsilon_i) = \log_2\frac{1}{\mathbb{P}(\varepsilon_i)} \end{align*} If we think of a random-hypervector set as a random sample, the probability of each realization is extremely low. Thus the entropy, or information content, is very high. This is one of the main theoretical foundations of HDC. Note that random-hypervectors are independently and uniformly sampled, resulting in \textit{quasi}-orthogonal vectors. These vectors are simple to create, but more importantly, they have greater representational power than \textit{precisely}-orthogonal vectors. In mathematical terms, while the number of orthogonal vectors in $\mathcal{H}$ is $d$, the number of quasi-orthogonal vectors is almost $2^d$~\cite{kanerva1988sparse}. Given that each set is sampled uniformly, a much larger sample space implies a much lower probability of occurrence per outcome. By the definition above, this results in greater information content. \subsection{Level-hypervectors revisited: applying the notion of ``quasi''} The existing method for generating a level-hypervector set does not incorporate an important property of the random-hypervector set. As we discussed in the previous section, the key to the representational power of random-hypervectors---and more generally of HDC---comes from the relaxed notion of distance: quasi-orthogonality. In contrast, the level-hypervectors created with the existing method, as described above, have a fixed distance between each pair of hypervectors. This limits the number of possible outcomes of their generation which, in view of what has been discussed, is equivalent to constraining the representation power of the basis-hypervector set. Instead, we want the distance between two hypervectors $L_i$ and $L_j$ in $\mathbf{L}$, with $i < j$, to be proportional to $j-i$ \textit{in expectation}. If we denote by $\Delta^{i,j}$ the desired value for $\mathbb{E}\left[\delta(L_i, L_j)\right]$, then: \begin{align*} \Delta^{i,j} = \frac{j-i}{2(m-1)} \end{align*} An intuitive idea, that we describe to clarify the problem, is to allow multiple flips per position and perform a number of flips $\digamma^{i,j}$ that results in an expected distance $\Delta^{i,j}$. One could use a Markov Chain as illustrated in Figure~\ref{fig:markov-chain} to model the bit flipping process. Each state $S(t)$ represents a distance $\delta$ from $L_i$. The process always starts from $S(0) = 0$. At each following step one bit is flipped at a random position, moving either one bit away from $L_i$ (represented by solid arrows) or go back one bit (dashed arrows). The probability of moving away from $L_i$ in $S(t)$ is: \begin{align*} \mathbb{P}\left[S(t+1) = S(t) + 1\right] = \frac{d - S(t)}{d} \end{align*} Observe that $\digamma^{i,j}$ is the expected number of steps taken until absorption in the $\Delta^{i,j}$ state. \begin{figure} \centering \input{content/images/mc} \caption{Markov Chain of a bit flipping process} \label{fig:markov-chain} \end{figure} Let $u(k)$ denote the expected absorption time starting from state $k$. By considering each starting state and conditioning on each possible outcome, we get the following linear recurrence relation: \begin{align*} u(k) = \begin{cases} 1+u(1) &\;\text{ if }\;k=0\\ 1+\frac{(d-k)u(k+1)+ku(k-1)}{d} &\;\text{ if }\;0 < k < \Delta^{i,j}\\ 0 &\;\text{ if }\;k=\Delta^{i,j} \end{cases} \end{align*} For a given dimension $d$, this is a solvable tridiagonal linear system~\cite{stone1973efficient}. The number of bits $\digamma^{i,j}$ we need to invert to obtain $L_j$ from $L_i$, such that $\mathbb{E}\left[\delta(L_i, L_j)\right] = \Delta^{i,j}$ is exactly $u(0)$, obtained from solving the system. This method generates what are called scatter codes~\cite{smith1990random} which map the input space nonlinearly to the similarities in $\mathcal{H}$-space. In the next section we propose a practical algorithm, simple to implement and use in HDC applications with a linear mapping. \subsection{A new method for generating level-hypervectors} \label{sec:newMethod} Presented below, Algorithm~\ref{alg:level_hvs} starts by assigning two uniformly random hypervectors to $L_1$ and $L_m$, in addition to a $d$-dimensional vector $\Phi$ whose elements are sampled uniformly from [0,1]. Then, for each remaining level $L_l$ an interpolation threshold value $\tau_l$ is set and $\Phi$ acts as a filter to determine the origin of each bit, either from $L_1$ or $L_m$. This differs from the method by~\citet{rachkovskiy2005sparse}, which deterministically concatenates fractions of $L_1$ and $L_m$. Proposition~\ref{prop:level_hvs} establishes that the obtained set of level-hypervectors meets the previously motivated property, that is, for any $j>i$, the expected distance between any $L_i$ and $L_j$, is $\Delta^{i,j}$. \begin{algorithm} \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{Two integers $m$ and $d$.} \Output{A set of $m$ $d$-dimensional level-hypervectors $\mathbf{L} = \{L_1, \ldots, L_m\}$} $L_1 \gets$ uniform\_sample($\{0,1\}^d$)\\ $L_m \gets$ uniform\_sample($\{0,1\}^d$)\\ $\Phi \gets$ uniform\_sample($[0,1]^d$)\\ \For{each remaining level $l \in \{2, \ldots, m-1\}$} { $\tau_l \gets \frac{m - l}{m - 1}$\\ \For{each dimension $\partial \in \{1, \dots, d\}$} { \If{$\Phi^{(\partial)} < \tau_l$}{ $L_l^{(\partial)} \gets L_1^{(\partial)}$ } \Else{ $L_l^{(\partial)} \gets L_m^{(\partial)}$ } } } \Return $\{L_1, \ldots, L_m\}$ \caption{Creation of a level-hypervector set using interpolation filters.} \label{alg:level_hvs} \end{algorithm} \begin{proposition}[] \label{prop:level_hvs} Let $\mathbf{L} = \{L_1 ,\dots\,L_m \}$ denote a set of hypervectors generated by Algorithm~\ref{alg:level_hvs}. For all $i$ and $j>i$ in $\{1,\dots,m\}$, we have $\mathbb{E}\left[\delta(L_i, L_j)\right] = \Delta^{i,j}$. \label{thm:alg1} \end{proposition} \begin{proof} First, from the definition of the normalized Hamming distance, we have: \begin{align*} \delta \left(L_i, L_j\right) = \frac{1}{d}\sum_{\partial=1}^d \mathbbm{1}\left(L_i^{\partial} \ne L_j^{\partial}\right) \end{align*} where $\mathbbm{1}$ is the indicator function. By applying the linearity of expectation property, the i.i.d. property for all dimensions of $L_i$, and considering that the expectation of an indicator function equals the probability of the event, we get: \begin{align} \mathbb{E}\left[\delta(L_i, L_j)\right] = \mathbb{P}\left(L_i^{\bar{\partial}} \ne L_j^{\bar{\partial}}\right) \end{align} where $\bar{\partial} \in \{1,\dots,d\}$ indicates that the probability is dimension independent. Then, from Algorithm~\ref{alg:level_hvs} we have: \begin{align*} \mathbb{P}(L_i^{\bar{\partial}}=L_j^{\bar{\partial}}) = \mathbb{P}(\Phi^{\bar{\partial}}<\tau_{i})\left(\genfrac{}{}{0pt}{}{\mathbb{P}(\Phi^{\bar{\partial}}<\tau_{j}|\Phi^{\bar{\partial}}<\tau_{i})\mathbb{P}(L_1^{\bar{\partial}}=L_1^{\bar{\partial}})}{+\mathbb{P}(\Phi^{\bar{\partial}}\geq\tau_{j}|\Phi^{\bar{\partial}}<\tau_{i})\mathbb{P}(L_1^{\bar{\partial}}=L_m^{\bar{\partial}}) }\right)\\ +\mathbb{P}(\Phi^{\bar{\partial}}\geq\tau_{i})\left(\genfrac{}{}{0pt}{}{\mathbb{P}(\Phi^{\bar{\partial}}\geq\tau_{j}|\Phi^{\bar{\partial}}\geq\tau_{i})\mathbb{P}(L_1^{\bar{\partial}}=L_1^{\bar{\partial}})}{+\mathbb{P}(\Phi^{\bar{\partial}}<\tau_{j}|\Phi^{\bar{\partial}}\geq\tau_{i})\mathbb{P}(L_1^{\bar{\partial}}=L_m^{\bar{\partial}})}\right) \end{align*} Given that $\Phi^{\bar{\partial}}$ is uniform in $[0,1]$ and $\tau_i=\frac{m-i}{m-1}$ according to the algorithm, we can calculate this probability to be: \begin{align} \mathbb{P}\left(L_i^{\bar{\partial}}=L_j^{\bar{\partial}}\right) = 1 - \frac{j-i}{2(m-1)} \end{align} Considering that the event is binary, from Equations 1 and 2, we get: $\mathbb{E}\left[\delta\left(L_i, L_j\right)\right] = \Delta^{i,j}$. \end{proof}
\section{Floquet perturbation treatment} In this section, we will derive a strongly-driven Floquet perturbation theory for analyzing the scar stability. A concrete series up to the second order is firstly presented for intuition. Then, we would obtain the formal structure to all higher-orders and show the spectral pairing rigidity for FBS. \subsection{Preliminary: Factoring out perturbations}\label{sec:factor} The Floquet driving in Eq.~(1) of the main text has the form \begin{align} U_F = \hat{U}_2 \hat{U}_1 = e^{-i\hat{H}_2T/2\hbar} e^{-i (\hat{h}_1 + \lambda \hat{h'})}, \end{align} where $ \hat{h}_1+\lambda \hat{h'} = \hat{H}_1 T/2\hbar $. For later analysis, it will be convenient to factor out the perturbation related to $ \lambda \hat{h'} $ through the Baker-Campbell-Hausdorff (BCH) formula, \begin{align} \hat{U}_F &= \left( e^{-i\hat{H}_2T/2\hbar} e^{-i\hat{h}_1} \right) \left( e^{i\hat{h}_1} e^{-i(\hat{h}_1+\lambda \hat{h}')} \right) \equiv \hat{U}_0 \hat{U}', \\ \nonumber \hat{U}' &= e^{i\hat{h}_1} e^{-i(\hat{h}_1+\lambda \hat{h}')} = e^{(i\hat{h}_1 - i(\hat{h}_1+\lambda \hat{h}') ) + \frac{1}{2} [i\hat{h}_1, -i(\hat{h}_1 + \lambda \hat{h}')] + \frac{1}{12} [i\hat{h}_1, [i\hat{h}_1, -i(\hat{h}_1 + \lambda \hat{h}')]] + \frac{1}{12} [-i(\hat{h}_1 + \lambda \hat{h}'), [-i(\hat{h}_1 + \lambda \hat{h}'), i\hat{h}_1] ] + \dots } \\ \label{eq:temp1} &= e^{i\lambda (-\hat{h}' + \frac{-i}{2} [\hat{h}_1, \hat{h}'] + \frac{1}{6} [\hat{h}_1, [\hat{h}_1, \hat{h}']] + \dots) + O(\lambda^2)}. \end{align} In our case, both $ \hat{h}_1 $ and $ \hat{h}' $ consist of bilinear terms, so their mutual commutators to any orders are also of bilinear forms. Meanwhile, on the exponential part of Eq.~\eqref{eq:temp1}, all remaining terms involve commutators between $ i\hat{h}_1 $ and $ -i(\hat{h}_1+\lambda \hat{h}'d) $, and hence are at least of the order $ \lambda^1 $. Therefore, we can group all terms into an effective perturbing static Hamiltonian \begin{align}\label{eq:temp2} & \hat{U}' = e^{i\hat{h}_1} e^{-i(\hat{h}_1+\lambda \hat{h}')} = e^{i\lambda \hat{H}'}, \qquad \hat{H}' = \sum_{\boldsymbol{r}\mu, \boldsymbol{r}'\mu'} J_{\boldsymbol{r}\mu, \boldsymbol{r}'\mu'} \hat{\psi}^\dagger_{\boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r}'\mu'} = \hat{H}'_d + \hat{H}'_{nd}\\ & \hat{H}_d = \sum_{\boldsymbol{r}\mu} J_{\boldsymbol{r}\mu, \boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r}\mu}^\dagger \hat{\psi}_{\boldsymbol{r}\mu} = \sum_{\boldsymbol{r}\mu} J_{\boldsymbol{r}\mu, \boldsymbol{r}\mu} \hat{n}_{\boldsymbol{r}\mu}, \qquad \hat{H}_{nd} = \sum_{\boldsymbol{r}\mu} J_{\boldsymbol{r}\mu\ne \boldsymbol{r}'\mu'} \hat{\psi}_{\boldsymbol{r}\mu}^\dagger \hat{\psi}_{\boldsymbol{r}\mu} \end{align} For our purposes, we would further factor out the onsite energy offsets in $ \hat{H}'_d $, as these terms can be grouped into $ \hat{U}_0 $: \begin{align} \hat{U}_0 e^{i\lambda \hat{H}'_d} = \hat{U}_2e^{-i\hat{h}_1} e^{i\lambda \sum_{\boldsymbol{r}\mu} J_{\boldsymbol{r}\mu, \boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r}\mu}^\dagger \hat{\psi}_{\boldsymbol{r}\mu} } e^{i\hat{h}_1} e^{-i\hat{h}_1} = \hat{U}_2 e^{i\lambda \sum_{\boldsymbol{r}\mu} J_{\boldsymbol{r}\mu, \boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r},\mu+1}^\dagger \hat{\psi}_{\boldsymbol{r}\mu+1} } e^{-i\hat{h}_1} = \hat{\tilde{U}}_0. \end{align} Here, we use the fact that under the unperturbed $ \hat{h}_1 $, $ e^{-i\hat{h}_1} \hat{\psi}_{\boldsymbol{r}\mu} e^{i\hat{h}_1} = \hat{\psi}_{\boldsymbol{r},\mu+1} $, and that onsite terms $ \sim n_{\boldsymbol{r}\mu} $ commute with the Hubbard interaction and chemical potentials in $ \hat{U}_2 $. Then, $ \hat{\tilde{U}}_0 $ is related to $ \hat{U}_0 $ by a renormalized chemical potential $ \theta_\mu \rightarrow \theta_\mu - \lambda J_{\boldsymbol{r}\mu-1, \boldsymbol{r}\mu-1} $. To factor out onsite terms, we can perform an iteration: \begin{enumerate} \item The perturbing Hamiltonian $ \hat{H}' $ can be obtained from Eq.~\eqref{eq:temp2}, and then one could obtain the diagonal terms $ \hat{H}_d' $. \item Factor out onsite terms up to $ \lambda^1 $ by $ \hat{U}' = e^{i\lambda \hat{H}_d'} \left( e^{-i\lambda \hat{H}_d'}e^{i\lambda (\hat{H}_d' + \hat{H}_{nd})} \right) = e^{i\lambda \hat{H}_d'} e^{i\lambda \hat{H}_{nd}' + i\lambda^2 (\hat{H}_{d}^{(2)} + \hat{H}_{nd}^{(2)})} $. Here we have used the BCH formula in the last step, where $ \lambda \hat{H}_d' $ in the exponential part are canceled, and the remaining terms other than $ \lambda \hat{H}'_{nd} $ would involve commutators between $ \lambda \hat{H}_{d}' $ and $ \lambda\hat{H}_{nd}' $ and therefore are at least of the order $ \lambda^2 $. \item Iterating the process in step 2 for $ n $ times will result in $ \hat{U}' = e^{i \left(\lambda \hat{H}_d + \sum_{m=2}^{n-1} \lambda^m \hat{H}_d^{(m)} \right)} e^{i \left(\lambda \hat{H}_{nd}' + \sum_{m=2}^{n-1} \lambda^m \hat{H}_{nd}^{(m)} + \lambda^n(\hat{H}_d^{(n)} + \hat{H}_{nd}^{(n)}) \right) } $. That means one can factor out the diagonal energy offset terms up to arbitrary accuracy. \end{enumerate} In summary, for a bilinear type of Hamiltonian, one can transform the perturbation in Eq.~(1) of the main text concerning $ \hat{H}_1 $ such that the Floquet unitary reads $ \hat{U}_F = \hat{U}_0 \hat{U}' $. Here, $ \hat{U}_0 $ is the unperturbed Eq.~(1) with $ \lambda = 0 $ and onsite chemical potentials renormalized. $ \hat{U}' = e^{i\lambda \hat{H}'} $ contains all the perturbations with $ \hat{H}' = \sum_{\boldsymbol{r}\mu \ne \boldsymbol{r}\mu} J_{\boldsymbol{r}\mu, \boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r}\mu}^\dagger \hat{\psi}_{\boldsymbol{r}'\mu'} $. \subsection{Formalism and explicit results up to the second order} Consider a Floquet operator involving a strongly-driven but exactly solvable part $ U_0 $, and a perturbation $ U_1 $, \begin{align}\label{eq:expansionu1} U_F = U_0U', \qquad U_0|\omega_n\rangle = e^{i\omega_n} |\omega_n\rangle, \quad U' = e^{i\lambda H'} = \sum_{\alpha=0}^\infty \frac{(i\lambda)^\alpha}{\alpha!} (H')^\alpha \end{align} Note that $ U_0 $ could be far from an identity operator unlike conventional high-frequency expansions around static limits. Now, to solve the eigenproblem perturbatively, \begin{align} U_F |\tilde{\omega}_n\rangle = e^{i\tilde{\omega}_n} |\tilde{\omega}_n \rangle, \end{align} we expand the quasienergy and Floquet eigenstates into series \begin{align}\label{eq:es} e^{i\tilde\omega_n} = e^{i\omega_n} \exp\left( i \sum_{\alpha=1}^\infty \lambda^\alpha \omega_n^{(\alpha)} \right) , \qquad\qquad |\tilde{\omega}_n\rangle &= \dots e^{i\lambda^3 S_3} e^{i\lambda^2 S_2} e^{i\lambda S_1}|\omega_n\rangle, \end{align} such that $ e^{i\lambda^\alpha S_\alpha} $ should diagonalize $ U_F $ up to the order of $ \lambda^\alpha $. Note that unlike previous perturbation treatments~\cite{Else2016_2} expressing $ (\alpha+1) $-th order results by $ \alpha $-th order ones, we would aim at obtaining series of any orders in terms of the zeroth-order solutions $ \omega_n, |\omega_n\rangle $. This is necessary for quantitative evaluations like spectral pairing rigidity, as only the zeroth-order results are exactly solvable. To $ \lambda^1 $ order, \begin{align}\nonumber \langle \omega_m | e^{-i\lambda S_1} U_0 e^{i\lambda H'} e^{i\lambda S_1} |\omega_n \rangle = &\, Q^{(1)}_n \left( \langle \omega_m |U_0|\omega_n\rangle + i\lambda \langle \omega_m | ( U_0 H' + [U_0,S_1]) |\omega_n\rangle \right) + O(\lambda^2) \\ \nonumber = &\, Q^{(1)}_n \left( e^{i\omega_m}\delta_{mn} + i\lambda ( e^{i\omega_m} [H']_{mn} + (e^{i\omega_m} - e^{i\omega_n} ) [S_1]_{mn}) \right) + O(\lambda^2).\\ \label{eq:pert1} = &\, Q^{(1)}_n e^{i\omega_m}\left( \delta_{mn} + i\lambda ( [H']_{mn} + (1 - e^{i\omega_{nm}} ) [S_1]_{mn}) \right) + O(\lambda^2). \end{align} where $ \omega_{nm} = \omega_n - \omega_m $ and matrix elements i.e. $ [S_1]_{mn} = \langle \omega_m |S_1|\omega_n\rangle $. The normalization constant $ Q^{(1)}_n $ makes sure that the diagonal term ($ m=n $) on the right-hand-side for perturbed eigenvalue, after keeping terms only up to $ \lambda^1 $, is still unitary. To diagonalize $ U_F $ up to $ \lambda^1 $, choose \begin{align}\label{eq:s1} [S_1]_{mn} = \frac{ [H']_{mn} }{e^{i\omega_{nm}}-1}, \quad (m\ne n); \qquad\qquad [S_1]_{nn}= 0. \end{align} Then, compare the diagonal term in Eq.~\eqref{eq:pert1} with Eq.~\eqref{eq:es}, we have a similar result as in static case \begin{align} \omega_n^{(1)} = [H']_{nn}. \end{align} A qualitative difference from static perturbation can be observed in the $ \lambda^2 $ order, \begin{align}\nonumber & \langle \omega_m |e^{-i\lambda S_1} e^{-i\lambda^2S_2} U_0 e^{i\lambda H'} e^{i\lambda^2 S_2} e^{i\lambda S_1} |\omega_n\rangle \\ \label{eq:detail2} =&\, Q_n^{(2)} \left( e^{i\omega_n}(1+i\lambda[H']_{nn})\delta_{mn} + \lambda^2 \langle \omega_m | [ -\frac{1}{2}(U_0S_1^2 + S_1^2U_0) + i[U_0, S_2] - \frac{1}{2} U_0 (H')^2 + [S_1, U_0H'] + S_1U_0S_1 ] |\omega_n\rangle \right) + O(\lambda^3). \end{align} To diagonalize it, we similarly require the $ \lambda^2 $ term for off-diagonal elements $ m\ne n $ to vanish, \begin{align} \nonumber 0= & \, \lambda^2 \left( -\frac{[S_1^2]_{mn}}{2} (e^{i\omega_m} + e^{i\omega_n}) + i[S_2]_{mn} (e^{i\omega_m} - e^{i\omega_n} ) - \frac{[(H')^2]_{mn}}{2} e^{i\omega_m} - [H'S_1]_{mn} e^{i\omega_m} + \sum_l [S_1]_{ml}[H']_{ln} e^{i\omega_l} + \sum_l [S_1]_{ml}[S_1]_{ln} e^{i\omega_l} \right) , \end{align} A straightforward calculation simplifies it to \begin{align}\nonumber i[S_2]_{mn}(e^{i\omega_{nm}}-1) &= \sum_l \frac{[H']_{ml} [H']_{ln}}{(e^{i\omega_{lm}}-1) (e^{i\omega_{nl}}-1)} \left( -\frac{1+e^{i\omega_{nm}}}{2} -\frac{(e^{i\omega_{lm}}-1) (e^{i\omega_{nl}}-1)}{2} -(e^{i\omega_{lm}}-1) +e^{i\omega_{lm}} (e^{i\omega_{nl}}-1) + e^{i\omega_{lm}} \right) \\ \label{eq:detail3} &= \sum_l \frac{[H']_{ml} [H']_{ln}}{(e^{i\omega_{lm}}-1) (e^{i\omega_{nl}}-1)} \frac{e^{i\omega_{nl}} - e^{i\omega_{lm}}}{2} \end{align} Therefore, we can similarly choose \begin{align} [S_2]_{mn} &= \frac{-i}{e^{i\omega_{nm}}-1} \sum_l \frac{[H']_{ml} [H']_{ln}}{ (e^{i\omega_{lm}}-1) (e^{i\omega_{nl}}-1) } \frac{e^{i\omega_{nl}} -e^{i\omega_{lm}} }{2} , \quad (m\ne n); \qquad\qquad [S_2]_{mm} = 0, \end{align} Then, the diagonal term of Eq.~\eqref{eq:detail2}, where $ \lambda^2 $ terms corresponding to the right-hand-side of Eq.~\eqref{eq:detail3} with $ m=n $, gives the second order correction to quasienergy \begin{align}\label{eq:2ndorder} {\color{blue} \omega_n^{(2)} } &= - \sum_{l\ne n} \left| \frac{[H']_{nl}}{ (e^{i\omega_{ln}}-1) } \right|^2 \sin\omega_{ln} = {\color{blue} - \frac{1}{2} \sum_{l\ne n} | [H']_{nl} |^2 \cot \frac{\omega_{ln}}{2} } \end{align} We can benchmark the results by considering high frequency limits where all $ \omega_{nl} $'s are very small. Then, we can expand $ \cot(\omega_{nl}/2)\approx 2/\omega_{nl} $, so $\omega_n^{(2)} = \sum_{l\ne n} |[H']_{nl}|^2/\omega_{nl}$, which recovers the familiar static perturbation result. It is worth noting that in the Floquet case, level differences $ \omega_{ln} $ contribute a periodic $ 2 \pi $ correction $ \cot(\omega_{ln}/2) $ in contrast to the $ 1/\omega_{ln} $ factor for static cases without periodicity. Such a difference is crucial for the spectral pairing rigidity only possible in Floquet systems. In sum, up to the second order, the perturbed quasienergy reads \begin{align}\label{eq:pert2} {\color{blue} e^{\tilde{\omega}_n} \approx e^{i\omega_n} \exp\left( i\lambda[H']_{nn} - i \frac{\lambda^2}{2} \sum_{l\ne n} |[H']_{nl}|^2 \cot\frac{\omega_{ln}}{2} \right), } \end{align} For completeness, we also write the dressed eigenstates \begin{align}\nonumber |\tilde{\omega}_n\rangle & \approx (1+i\lambda^2 S_2) (1+i\lambda S_1 -\frac{\lambda^2}{2}S_1^2) |\omega_n\rangle\\ \nonumber &= |\omega_n\rangle + i\lambda \sum_{m\ne n} [S_1]_{mn} |\omega_m\rangle + \lambda^2 \left( \sum_m \sum_{l\ne m, n} -\frac{[S_1]_{ml} [S_1]_{ln}}{2} + i[S_2]_{mn} \right) |\omega_m\rangle. \\ \label{eq:perturbedfbseigs} &= |\omega_n\rangle + i\lambda \sum_{m\ne n} \frac{[H']_{mn}}{e^{i\omega_{mn}} -1} |\omega_m\rangle - \frac{\lambda^2}{2} \left( \sum_m \sum_{l\ne m,n} [S_1]_{ml} [S_1]_{ln} + \sum_{m\ne n} \sum_{l\ne m,n} \frac{e^{i\omega_{ml}} - e^{i\omega_{ln}}}{e^{i\omega_{mn}} -1} [S_1]_{ml} [S_1]_{ln} \right) |\omega_m\rangle \end{align} up to a normalization factor. Here $ [S_1]_{mn} $ etc are given by Eq.~\eqref{eq:s1} \subsection{Scar spectral pairing rigidity up to the second order} Now, we apply the previously developed strong-drive Floquet perturbation theory to analyze the scar spectral pairings. Recall Eq.~(3) (4) in the main text for the eigenstates at $ \lambda=0 $, which we will take as eigenstates for $ U_0 $, \begin{align}\tag{2} \left| \boldsymbol{k}, \ell, \{n_{\boldsymbol{r}\mu}\} \right\rangle &=\, \frac{1}{\sqrt3} \sum_{m=0,1,2} e^{-i(\frac{2\pi m}{3}\ell -\alpha_m)} |\boldsymbol{k}, \{n_{\boldsymbol{r},\mu+m \text{ mod } 3} \} \rangle,\\ \tag{3} E\left(\ell, \{n_{\boldsymbol{r}\mu}\}\right) &= \frac{2\pi}{3} \ell + \phi_2 \sum_{\boldsymbol{r}\mu} n_{\boldsymbol{r} \mu} (n_{\boldsymbol{r}\mu} - 1), \qquad \ell = 0, \pm 1. \end{align} Each level labeled by $ |\boldsymbol{k},\ell,\{n_{\boldsymbol{r}\mu}\}\rangle $ corresponds to the zeroth order $ |\omega_n\rangle $ here, and quasienergy $ e^{iE(\ell,\{n_{\boldsymbol{r}\mu}\})} $ is denoted $ e^{i\omega_n} $. Among them, the special set of scars are defined in Eq.~(4) of the main text, \begin{align}\tag{4} |\boldsymbol{k}, \ell, N_b \rangle = \frac{1}{\sqrt{3}} \sum_{m=0,1,2} e^{-i(\frac{2\pi m}{3}\ell - \alpha_m)} |\boldsymbol{k},\{n_{\boldsymbol{r}\mu} = \delta_{\boldsymbol{r},\boldsymbol{0}} \delta_{\mu,m}N_b \} \rangle,\qquad E_{\text{scar}}(\ell) = \frac{2\pi\ell}{3}+\phi_2 N_b(N_b-1),\qquad \ell = 0, \pm1. \end{align} In this subsection, we would aim at proving that all the three scars $ \ell=0,\pm $ in each $ \boldsymbol{k} $ sector will receive the same quasienergy corrections in Eq.~\eqref{eq:pert2}, with the perturbing Hamiltonian $ H' = \sum_{\boldsymbol{r} \mu \ne \boldsymbol{r}'\mu'} J_{\boldsymbol{r}\mu, \boldsymbol{r}'\mu'} \hat{\psi}^\dagger_{\boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r}' \mu'} $ being a generic bilinear hopping one respecting translation invariance. First, as onsite chemical potential terms are all factored out into $ U_0 $ (see subsection~\ref{sec:factor}), the first order corrections $ E_\ell^{(1)} \propto \langle \boldsymbol{k},\ell, N_b| H' | \boldsymbol{k}, \ell, N_b\rangle = 0 $ vanish --- in $ |\boldsymbol{k}, \ell, N_b\rangle $ (for $ N_b>1 $) all particles are allocated onto a single site and no hopping happens. Next, for the second order corrections, we write explicitly \begin{align} E_\ell^{(2)} = -\frac{1}{2} \sum_{\{n'_{\boldsymbol{r}\mu}\}, \ell'} |\langle \boldsymbol{k},\ell, N_b | H' | \boldsymbol{k}, \ell', \{n'_{\boldsymbol{r}\mu}\} \rangle |^2 \cot \left( \frac{E(\ell', \{n'_{\boldsymbol{r}\mu}\}) - E_{\text{scar}}(\ell)}{2} \right). \end{align} As the perturbing Hamiltonian only involves hopping terms, the non-vanishing matrix elements have $ \{n_{\boldsymbol{r}\mu}'\} $ with $ (N_b-1) $ particles on one site, and $ 1 $ particle on another. Written in the main text notation, $ \{n_{\boldsymbol{r}\mu}'\} \in Q_a = \{(q^{(a)}_1,N^{(a)}_1)=(1,N_b-1), (q^{(a)}_2,N^{(a)}_2)=(1,1), (q^{(a)}_3,N^{(a)}_3)=(3L^2-2,0) \} $. Thus, $ E(\ell', \{n'_{\boldsymbol{r}\mu}\}) = 2\pi\ell'/3 + \phi_2\sum_j q^{(a)}_jN^{(a)}_j(N^{(a)}_j-1) = 2\pi\ell'/3 + \phi_2(N_b-1)(N_b-2) $, and all \begin{align} E(\ell',\{n_{\boldsymbol{r}\mu}\}) - E_{\text{scar}}(\ell) = - (2\pi(\ell-\ell')/3 + 2\phi_2). \end{align} Further, within the manifold $ \{n_{\boldsymbol{r}\mu}'\} \in Q_a $, \begin{align} \langle \boldsymbol{k},\ell, N_b | H' | \boldsymbol{k}, \ell', \{n'_{\boldsymbol{r}\mu}\} \rangle &= \frac{1}{3}\sum_{m,m'=0}^2 \langle \boldsymbol{k}, \{n_{\boldsymbol{r}\mu} = \delta_{\boldsymbol{r},\boldsymbol{0}} \delta_{\mu,m} N_b\}| H' | \boldsymbol{k}, \{n'_{\boldsymbol{r}\mu+m'} \}\rangle e^{i\frac{2\pi}{3}(m\ell - m'\ell')} e^{-i(\alpha_m - \tilde\alpha_{m'})}, \end{align} the site with $ N_b $ particles for $ \{n_{\boldsymbol{r}\mu}\} $ must be the same as the site with $ (N_b-1) $ particles for $ \{n_{\boldsymbol{r}\mu}'\} $, see Fig.~\ref{fig:n5n41} for example. \begin{figure} [h] \includegraphics[width=7cm]{n5n41}\\ \caption{\label{fig:n5n41}Exemplary non-vanishing matrix elements in the second order perturbation for scar states $ |\boldsymbol{k},\ell,N_b\rangle $. The non-vanishing matrix elements would have $ m' = m + \Delta m $ mod $ 3 $, where $ \Delta m = 2 $ for all $ m, m' $.} \end{figure} That means a non-vanishing term would have $ \langle \boldsymbol{k}, \{n_{\boldsymbol{r}\mu} = \delta_{\boldsymbol{r},\boldsymbol{0}} \delta_{\mu,m} N_b\}| H' | \boldsymbol{k}, \{n'_{\boldsymbol{r}\mu+m'} \}\rangle \propto \delta_{m', m+\Delta m} $, with a fixed $ \Delta m $ (mod 3) for all $ m, m' $. Then, \begin{align}\nonumber |\langle \boldsymbol{k},\ell, N_b | H' | \boldsymbol{k}, \ell', \{n'_{\boldsymbol{r}\mu}\} \rangle |^2 &= \left|\frac{1}{3} e^{-i\frac{2\pi \Delta m}{3}\ell'} \sum_{m=0}^2 \langle \boldsymbol{k}, \{n_{\boldsymbol{r}\mu} = \delta_{\boldsymbol{r},\boldsymbol{0}} \delta_{\mu,m} N_b\}| H' | \boldsymbol{k}, \{n'_{\boldsymbol{r}\mu+m+\Delta m} \}\rangle e^{i\frac{2\pi}{3}m(\ell - \ell')} e^{-i(\alpha_m - \tilde\alpha_{m'})} \right|^2. \end{align} In sum, the second order quasi-energy correction \begin{align} E_\ell^{(2)} &= \frac{1}{18} \sum_{ \{n_{\boldsymbol{r}\mu}'\},\ell'} \left| \sum_{m=0}^2 \langle \boldsymbol{k}, \{n_{\boldsymbol{r}\mu} = \delta_{\boldsymbol{r},\boldsymbol{0}} \delta_{\mu,m} N_b\}| H' | \boldsymbol{k}, \{n'_{\boldsymbol{r}\mu+m+\Delta m} \}\rangle e^{i\frac{2\pi}{3}m{\color{red}(\ell - \ell')}} e^{-i(\alpha_m - \tilde\alpha_{m'})} \right|^2 \cot\left( \frac{\pi{\color{red}(\ell-\ell')}}{3} + \phi_2 \right) \end{align} indeed only depend on the difference $ (\ell - \ell') $, but not individual $ \ell $ and $ \ell' $. Thus, we can generically write $ E_{\ell_1}^{(2)} \equiv \sum_{\ell'} \varepsilon(\ell_1-\ell') = \sum_{\ell'} \varepsilon(\ell_2 - (\ell'-\ell_1+\ell_2)) = \sum_{\ell''} \varepsilon(\ell_2-\ell'') = E_{\ell_2}^{(2)} $, proving the spectral pairing rigidity up to the second order. \subsection{Numerical verification} Now we verify the previous analysis numerically. First, we test the model in Eq.~(1) of the main text. Quasienergy for the 3 scar states, obtained according to maximal momentum space IPRs as in Fig.~3 of the main text, is shown in Fig.~\ref{fig:smpairing} (a). At the anchor point $ \lambda\rightarrow0 $, mutual spacing for FBS's approaches $ 2\pi/3 $ giving the $ 3T $-periodic oscillations. Then, under perturbations $ \lambda $, each individual FBS indeed receive an energy correction dominated by $ \sim\lambda^2 $ as expected. However, the key feature is that all three FBS's receive identical quasienergy corrections, as shown by Fig.~\ref{fig:smpairing} (b), leading to a rigid $ 2\pi/3 $ spectral pairing between pairs of FBS's schematically illustrated in Fig.~\ref{fig:smpairing} (c). \begin{figure} [th] \parbox[b]{6cm}{ \includegraphics[width=5.5cm]{E_scar}\\ (a) Quasienergy for largest IPR eigenstates } \parbox[b]{6cm}{ \includegraphics[width=5.5cm]{dE_scar}\\ (b) Deviations and spectral pairing rigidity } \parbox[b]{5.5cm}{ \includegraphics[width=4.5cm]{dE_scar_schematic}\\ (c) Spectral pairing for FBS's } \caption{\label{fig:smpairing} Test of spectral pairing for the main text model. (a) Based on the data of Fig.~(3) in the main text, we obtain the quasi-energy of the 3 eigenstates with largest IPR's. Below the transition $ \lambda\approx0.135 $ indicated by the green dashed line, they correspond to the FBS's, while for $ \lambda >0.135 $ all eigenstates have similarly vanishing IPR's. We take $ \lambda=0.005 $ as a reference point for $ \lambda\rightarrow0 $ limits (corresponding to gray horizontal lines), and measure quasienergy deviations $ \Delta E_n \equiv E_n(0.005) -E_n( \lambda) $. (b) The spectral deviations of each FBS. We see that {\em individual} scar quasienergy $ \Delta E_n $ indeed exhibits a $ \sim\lambda^2 $ deviation of Fermi-Golden rule type. However, different scars demonstrate almost identical deviations $ \Delta E_{n_1} - \Delta E_{n_2} \rightarrow 0 $, such that their mutual spacing of $ 2\pi/3 $ in (a) is preserved, leading to a stable $ 2\pi T/ (2\pi/3) = 3T $ periodic DTC oscillations. (c) Schematic illustrate for scar spectral pairings. All data is for the $ \boldsymbol{k}=\boldsymbol{0} $ sector, and other $ \boldsymbol{k} $ sectors demonstrate essentially the same characters. $ L=3 $, and parameters are the same as Fig.~1 in the main text.} \end{figure} Further, we test the spectral pairing rigidity against more generic perturbations using the second order perturbation results in Eq.~\eqref{eq:2ndorder}. Here we generalize $ H' $ to involve all possible hoppings up to nearest neighbors, where each bond can possess different hopping matrix elements as shown by Fig.~\ref{fig:2nd} (a). These bonds possess random strengths $ J_n\in[0,1] $ and also carry random fluxes $ \Theta_n\in[0,2\pi] $. Each set of $ \{(J_n,\Theta_n) |n=1,\dots,6)\} $ consists of a sample. From the results in Fig.~\ref{fig:2nd} (b) for different sets of samples, it is clear that each scar quasienergy can receive notable second order corrections $ \omega_n^{(2)} $ as given by Eq.~\eqref{eq:2ndorder}. However, all 3 scars receive equal amount of corrections $ |\omega_{n+1}^{(2)} - \omega_{n}^{(2)}| \rightarrow0 $ (up to numerical errors), such that their mutual spectral pairing remain rigidly $ 2\pi/3 $ just like that for $ U_0 $, reproducing again the scheme in Fig.~\ref{fig:smpairing} (c). \begin{figure} [thb] \parbox[b]{3cm}{ \includegraphics[width=2cm]{gen_pert_bonds}\\ (a) Random bonds } \parbox[b]{10cm}{ \includegraphics[width=7.5cm]{gen_pert_2nd}\\ (a) Second order quasienergy corrections (in units of $ \lambda^2 $) } \caption{\label{fig:2nd}Generalized model allowing for random bond parameters (preserving translation symmetry) up to nearest neighbor hoppings. Floquet operator takes the form in Eq.~\eqref{eq:expansionu1}, where $ N_b=5, L=3 $, $ U_0 $ is for the main text model at the anchor point $ \phi_1=2\pi/(3\sqrt{3}), \lambda=0 $, and the perturbation $ U'=e^{i\lambda H'} $ . (a) Random hopping parameters for $ H' $. (b) Results for the $ \boldsymbol{k}=\boldsymbol{0} $ sector. Each sample means one set of parameters in (a). To compare with Fig.~\ref{fig:smpairing}, note the rescaling for each point, $ \omega_n^{(2)} \sim \Delta E_n/\lambda^2 $, where $ \omega_n^{(2)} $ is given by Eq.~\eqref{eq:2ndorder}. } \end{figure} \subsection{Higher orders} Formally, as can be seen from Eq.~\eqref{eq:pert2} and Eqs.~\eqref{eq:expansionu1} -- \eqref{eq:es}, the perturbed quasi-energy at the $ \alpha $-th order takes the most generic form satisfying Floquet quasienergy periodicity as \begin{align}\label{eq:pertalpha} \omega_n^{(\alpha)} = \sum_\beta \left.\sum_{l_1\dots l_{\alpha-1}}\right.' g_\beta( [H']_{nl_1} [H']_{l_1l_2} \dots [H']_{l_{\alpha-2} l_{\alpha-1} } [H']_{l_{\alpha-1}n}) h_\beta(e^{i\omega_{nl_1}}, e^{i\omega_{l_1l_2}}, \dots, e^{i\omega_{l_{\alpha-1}n}}), \end{align} where $ \beta=1,2,\dots $ denotes a set of functions. The major difference between the second and higher orders is that one would encounter, i.e. $ l_1 $ and $ l_2 $ denoting unperturbed eigenstates within the same degenerate manifold. To be concrete, we give the explicit third order result \begin{align}\label{eq:energy3} \omega_n^{(3)} &= \frac{1}{3!} \sum_{l_1\ne l_2\ne n} [H']_{nl_1} [H']_{l_1l_2} [H']_{l_2n} \left[ \frac{1}{2} \frac{\cos(\omega_{l_1n}/2)}{\sin(\omega_{l_2l_1}/2) \sin(\omega_{nl_2}/2)} + \frac{1}{2} \frac{\cos(\omega_{nl_2}/2)}{\sin(\omega_{l_1n}/2) \sin(\omega_{l_2l_1}/2)} - \frac{\cos(\omega_{l_2l_1}/2)}{\sin(\omega_{l_1n}/2) \sin(\omega_{nl_2}/2)} \right] \end{align} Here, two different levels denoted by $ l_1, l_2 $ could be different configurations in the same degenerate manifold $ \ell, Q_a = \{(q^{(a)}_1,N^{(a)}_1)=(1,N_b-1), (q^{(a)}_2,N^{(a)}_2)=(1,1), (q^{(a)}_3,N^{(a)}_3)=(3L^2-2,0)\} $, so the two different levels $ l_1, l_2 $ both have unperturbed quasienergy $ 2\pi\ell/3 + \sum_j q_j N_j(N_j-1) = 2\pi\ell/3 + (N_b-1)(N_b-2) $. As such, we need to first perform a degenerate level perturbation for non-scar eigenstates within each subspace $ \ell, Q_a $. \begin{figure} [h] \includegraphics[width=7.5cm]{n41AB} \caption{\label{fig:n41AB} Non-vanishing submatrix elements within the $ Q_a = \{(q^{(a)}_j, N^{(a)}_j) = (1,N_b-1), (1,1), (3L^2-2,0)\} $ degenerate manifolds. Similar to the case in Fig.~\ref{fig:n5n41}, the site with majority particle $ N_b-1 $ forces the matrix element to only depend on the relative $ \ell - \ell = 0 $ --- so there is no dependence on $ \ell $ for degenerate sub-space corrections.} \end{figure} Importantly, the submatrix spanned by $ \{ |\boldsymbol{k}, \ell, \{n_{\boldsymbol{r}\mu}\}\rangle | \{n_{\boldsymbol{r}\mu}\in Q_a\}\} $ would contribute a degeneracy-lifting energy {\em independent} of $ \ell $. This is due to the same reason as before: the site with $ N_b-1 $ particles must be the same in order for the hopping matrix element to be non-vanishing. One can choose the gauge that the unperturbed eigenstates within $ Q_a $ have the $ (N_b-1) $-particle site being the same for each $ m $ in different $ \{n_{\boldsymbol{r}\mu}\} $, as shown in Fig.~\ref{fig:n41AB}. Then, the degenerate space corrections in different $ \ell $ sectors are the same. That means for degenerate eigenstates within the manifold $ Q_a = \{(q_j^{(a)}, N_j^{(a)})|j=1,2,\dots,M\} $, one only needs to replace Eq.~(2), (3) in the main text with \begin{align}\tag{$ 2' $} & |\boldsymbol{k},\ell, \{ \{n_{\boldsymbol{r}\mu}\} \in Q_a \}, \gamma\rangle = \sum_{\{n_{\boldsymbol{r}\mu}\} \in Q_a} A_{\{n_{\boldsymbol{r}\mu}\}}^{(\gamma)} |\boldsymbol{k}, \ell, \{n_{\boldsymbol{r}\mu}\} \rangle = \frac{1}{\sqrt3} \sum_{m=0,1,2} e^{-i\frac{2\pi m}{3}\ell} \left( \sum_{\{n_{\boldsymbol{r}\mu}\} \in Q_a} A_{\{n_{\boldsymbol{r}\mu}\}}^{(\gamma)} e^{i\alpha_m} |\boldsymbol{k}, \{n_{\boldsymbol{r}\mu}\} \rangle \right) \\ \tag{$ 3' $} &E\left(\ell,\{ \{n_{\boldsymbol{r}\mu}\} \in Q_a\},\gamma\right) = \frac{2\pi}{3} \ell + \phi_2 \sum_{j=1}^M q_j N_j(N_j-1)+ E_\gamma(\{n_{\boldsymbol{r}\mu}\}\in Q_a). \end{align} Due to the absence of $ \ell $ in the submatrix within degenerate $ Q_a $ manifold, the quasienergies in each $ \ell $ sector are lifted by the $ \ell $-independent $ E_\gamma $, and the coefficients $ A_{\{n_{\boldsymbol{r}\mu}\}}^{(\gamma)} $ are also independent of $ \ell $. Now, as all degeneracies are lifted, and the resulting levels still has the structure of identical plethoras of $ \ell=0,\pm1 $, we can use the previous analysis to prove spectral pairing rigidity. Specifically, in Eq.~\eqref{eq:pertalpha}, when we change the scar level \begin{align}\label{eq:shift} n\sim (\ell, N_b) \quad \rightarrow \quad n'\sim (\ell\pm1, N_b) \end{align} the right-hand-side should remain the same. Specifically, we note that quantum numbers $ \ell=0,\pm1 $ is only defined modulo 3. That means summing over $ \sum_{\ell=-1,0,1} $ is equivalent to $ \sum_{\ell+1=0,1,2} = \sum_{\ell+1=0,1,-1} $ and $ \sum_{\ell-1=-2,-1,0}=\sum_{1,-1,0} $. Then, Eq.~\eqref{eq:shift} would be compensated by a simultaneous change of the dummy index in Eq.~\eqref{eq:pertalpha} \begin{align} l_1\sim (\ell_1,\{n_{\boldsymbol{r}\mu}\}_1) \quad\rightarrow\quad l_1'\sim(\ell_1\pm1, \{n_{\boldsymbol{r}\mu}\}_1), \qquad\qquad l_{\alpha-1}\sim (\ell_{\alpha-1},\{n_{\boldsymbol{r}\mu}\}_{\alpha-1}) \quad\rightarrow\quad l_1'\sim(\ell_{\alpha-1}\pm1, \{n_{\boldsymbol{r}\mu}\}_{\alpha-1}), \end{align} while all the remaining indices are unaffected. In summary, we have proved that for perturbations $ H' $ of a generic bilinear form conserving translation symmetries, all scar levels $ |\boldsymbol{k},\ell,N_b\rangle $ will receive the same amount of energy correction in the perturbation series, leading to the spectral pairing rigidity $ |\Delta E|=2\pi/3 $ for FBS's. \section{Entanglement entropy at the anchor point $ \lambda\rightarrow0 $} To compute the entanglement entropy, we first rewrite Eq.~(4) in the main text in the real space representation \begin{align} |\boldsymbol{k}, \ell, N_b \rangle = \frac{1}{\sqrt{3}} \sum_{m=0,1,2} e^{-i(\frac{2\pi m}{3}\ell - \alpha_m)} \frac{1}{L}\sum_{m_1,m_2=1}^L e^{-(2\pi i/L) (k_1m_1 + k_2m_2)} \frac{ (\hat{\psi}_{m_1\boldsymbol{e}_1 + m_2\boldsymbol{e}_2,m}^\dagger )^{N_b}}{\sqrt{N_b!}} |0\rangle \end{align} The full density matrix for each FBS is defined as $ \rho = |\boldsymbol{k},\ell,N_b\rangle \langle \boldsymbol{k}, \ell, N_b| $, and in the real space representation \begin{align}\label{eq:denmat} \rho &= \frac{1}{3L^2}\sum_{m,m'=0,1,2} e^{i(\frac{2\pi(m-m')}{3}\ell - (\alpha_m - \alpha_{m'}))} \sum_{m_1,m_2,m_1',m_2'=1}^L e^{\frac{2\pi i}{L}(k_1(m_1-m_1') + k_2(m_2-m_2')) } \left( \frac{ (\hat{\psi}_{m_1\boldsymbol{e}_1 + m_2\boldsymbol{e}_2,m}^\dagger )^{N_b}}{\sqrt{N_b!}} |0\rangle \langle 0 | \frac{ (\hat{\psi}_{m_1'\boldsymbol{e}_1 + m_2'\boldsymbol{e}_2,m'} )^{N_b}}{\sqrt{N_b!}} \right) \end{align} Then, we obtain the reduced density matrix by enclosing $ N_s $ subsystem unit cells ($ 3N_s $ sites), dubbed region $ A $, among totally $ 3L^2 $ sites. The remaining part is denoted as $ B $. Due to the form of Eq.~\eqref{eq:denmat}, $ \rho_A $ only involves tracing over configurations of $ 0 $ or $ N_b $ bosons in region $ B $, \begin{align}\nonumber \rho_A = \text{Tr}_B (\rho) &= \langle 0_B| \rho |0_B\rangle + \sum_{m''_1,m''_2, m''\in B} \langle 0_B| \frac{ (\hat{\psi}_{m''_1\boldsymbol{e}_1 + m''_2\boldsymbol{e}_2,m''} )^{N_b}}{\sqrt{N_b!}} \rho \frac{ (\hat{\psi}_{m''_1\boldsymbol{e}_1 + m''_2\boldsymbol{e}_2,m''}^\dagger )^{N_b}}{\sqrt{N_b!}} |0_B \rangle \\ \nonumber &= \frac{1}{3L^2} \sum_{\scriptsize \begin{array}{l} m_1,m_2,m,\\ m_1',m_2',m' \end{array}\in A} e^{i(\frac{2\pi(m-m')}{3}\ell - (\alpha_m - \alpha_{m'}))} e^{\frac{2\pi i}{L}(k_1(m_1-m_1') + k_2(m_2-m_2')) } \left( \frac{ (\hat{\psi}_{m_1\boldsymbol{e}_1 + m_2\boldsymbol{e}_2,m}^\dagger )^{N_b}}{\sqrt{N_b!}} |0_A \rangle \langle 0_A | \frac{ (\hat{\psi}_{m_1'\boldsymbol{e}_1 + m_2'\boldsymbol{e}_2,m'} )^{N_b}}{\sqrt{N_b!}} \right) \\ &\quad + \frac{3L^2-3N_s}{3L^2} |0_A\rangle \langle 0_A|. \end{align} Here, the first term would allow for arbitrary indices $ (m_1,m_2,m), (m_1',m_1',m')\in A $ because they all correspond to zero particles in region $ B $. For the second term, there must be $ (m_1,m_2,m) = (m_1',m_2',m') $ equaling to the trace indices $ (m_1'',m_2'',m'')\in B $, so all the phase factors vanish, and there are $ 3L^2 - 3N_s $ sites in region $ B $ giving rise to the prefactor. Denote \begin{align} F_{m_1, m_2, m} = e^{-i( \frac{2\pi m }{3}\ell - \alpha_{m})} e^{-\frac{2\pi i}{L} (k_1 m_1 + k_2 m_2)}, \qquad |F\rangle = (F_{0,0,0}, F_{0,0,1}, F_{0,0,2}, F_{0,1,0},\dots, F_{L_x^{(A)}, L_y^{(A)}, 2} )^T, \end{align} the reduced density operator, written in the matrix form, has \begin{align}\label{eq:detail4} \rho_A &= \frac{1}{3L^2} \begin{pmatrix} \begin{pmatrix} |F\rangle \langle F| \end{pmatrix}_{3N_s\times 3N_s} & 0 \\ 0 & 3L^2 - 3N_s \end{pmatrix} \end{align} Apparently, there are only 2 nonzero eigenvalues. The first one is for the $ (3N_s\times 3N_s) $ matrix whose eigenvector is $ (1/\sqrt{3N_s})|F\rangle $ (note $ \langle F|F\rangle = 3N_s $) corresponding to the eigenvalue $ N_s/L^2 $. The second one is the $ 1\times 1 $ part obviously corresponding to eigenvalue $ (L^2-N_s)/L^2 $. That yields the entanglement entropy \begin{align} S_{\text{ent}} = -\text{Tr}\left(\rho_A \ln \rho_A \right) = -\gamma\ln\gamma - (1-\gamma)\ln(1-\gamma), \qquad \gamma\equiv \frac{N_s}{L^2}. \end{align} Therefore, for the choices of region $ A $ in the main text Fig.~2 (b), we have $ S_{\text{ent}} = \ln2 \approx 0.6931 $ for $ L=2 (\gamma=1/2) $, and $ S_{\text{ent}} = (4/9)\ln(4/9) + (5/9)\ln(5/9) \approx 0.6870 $ for $ L=3 (\gamma=4/9) $. They lead to slight differences of $ S_{\text{ent}} $ at $ \lambda\rightarrow0 $ due to different subsystem portions $ \gamma=N_s/L^2 $. However, the reference scar vanishing point $ \lambda_0\approx0.135 $ is unlikely to be dominated by such differences, as significant deviations of $ S_{\text{ent}} $ already takes place there compared with $ S_{\text{ent}} $ at $ \lambda\rightarrow0 $. This is also confirmed by the IPR scaling in Fig.~3 (d) of main texts (irrelevant of subsystem size) that also gives $ \lambda_0\approx0.135 $. \section{More details for experimental proposals} This section gives a more detailed account for the experimental proposals. They are most relevant to the kagome lattice platform at Berkeley~\cite{Thomas2017,Barter2020,Leung2020,Brown2021,Jo2012}, while similar schemes can be generalized into other lattices. The laser system we consider consists of 6 beams, with 3 being red ($ \lambda_R=1064 $nm) and 3 green ($ \lambda_G=532 $nm). They are directed along the same plane, where each set of monochromatic laser beams form $ 120^{\circ} $ angles with respect to each other, as in Fig.~\ref{fig:tri_kagome} (a). The laser system exhibits good tunability in forming different lattices in a unified setting, including the (trimerized) kagome, honeycomb, stripe, and Su-Schrieffer-Heeger types of lattices. We would discuss two exemplary choices of experimental setup in the following. \subsection{Scheme I: Trimerized kagome lattice (TKL)} The TKL setting in Ref.~\cite{Barter2020} uses all 6 bichromatic lasers beams, where green beams are polarized in-plane, while red ones are along $ z $. The lattice potential is given by \begin{align}\nonumber V(x,y) &= V_R(x,y) + V_G(x,y),\\ \nonumber V_R(x,y) &= - V_0^{(R)} \left|\sum_{j=1}^3 e^{\frac{2\pi i}{\lambda_R} ((x-x_0)\cos\Phi_j + (y-y_0)\sin\Phi_j)} \right|^2 , \\ \nonumber V_G(x,y) &= V_0^{(G)} \left( + \left| \sum_{j=1}^3 \cos(\Phi_j+\pi/2)e^{\frac{2\pi i }{\lambda_G} (x\cos\Phi_j + y\sin\Phi_j)} \right|^2 + \left| \sum_{j=1}^3 \sin(\Phi_j+\pi/2)e^{\frac{2\pi i }{\lambda_G} (x\cos\Phi_j + y\sin\Phi_j)} \right|^2 \right) , \\ & (\Phi_1,\Phi_2,\Phi_3) = \left( -\frac{\pi}{2}, \frac{\pi}{6}, \frac{5\pi}{6} \right). \end{align} \begin{figure} [h] \parbox[b]{2.5cm}{ \includegraphics[width=2.5cm]{tri_kagome}\\ \quad\\\quad\\ (a) Lasers } \parbox[b]{5.9cm}{ \includegraphics[width=5.5cm]{tri_kagome_pot}\\ (b) $ V_0^{(R)} = V_{0}^{(G)} $ } \parbox[b]{5.9cm}{ \includegraphics[width=5.3cm]{tri_kagome_pot_2}\\ (b) $ V_0^{(R)} = 0.8 V_{0}^{(G)} $ } \caption{\label{fig:tri_kagome}Schemes for the driven trimerized kagome lattice, where $ x_0 \approx 405 \text{nm}, y_0=0 $. The extent of trimerization can be tuned continuously by the relative strength between red and green laser beams.} \end{figure} TKLs correspond to our main text model, and the associated driving protocols are \begin{itemize} \item Shake the lattice circularly in order to endow a $ \pi/2 $ flux per triangle. This shaking is kept on throughout the whole period. \item Drive the lattice potential strength periodically, such that the Hamiltonian switches between hopping-dominant terms for $ \hat{H}_1 $ and Hubbard interaction (plus possible sublattice energy offset) dominant terms for $ \hat{H}_2 $. Then, the Hamiltonians (in ideal situations) take the form as in Eq.~(1) of the main text. \item For specific parameter control, one can fix the duration $ t_1 $ for the first half of a period according to $ \phi_1 = Jt_1/\hbar \approx 2\pi/3\sqrt3 $, where $ J $ is the hopping strength of strong bonds. Then, $ \lambda = J'/J $, with $ J' $ the hopping strength for weak bonds. Similarly, the ``interaction strength" for the Floquet parameter $ \phi_2 = Ut_2/\hbar $ can be controlled by the duration $ t_2 $ in the second half of a period, where $ U $ is the Hubbard interaction strength. One driving period $ T = t_1 + t_2 $ here. \end{itemize} \subsection{Scheme II: Shaken honeycomb lattice} The honeycomb lattice~\cite{Brown2021} only requires monochromatic lasers, while for our purposes the lattice should be dimerized as described later. Here, we propose to use the green laser beams to generate a honeycomb lattice, while the red beams would be used later to engineer the initial state. So the green beams here should be polarized along $ z $, giving \begin{align} V(x,y) = V_G'(x,y) = +V_0 \left|\sum_{j=1}^3 e^{\frac{2\pi i}{\lambda_G} (x\cos\Phi_j + y\sin\Phi_j)} \right|^2 , \qquad (\Phi_1,\Phi_2,\Phi_3) = \left( -\frac{\pi}{2}, \frac{\pi}{6}, \frac{5\pi}{6} \right). \end{align} The lattice potentials are illustrated in Fig.~\ref{fig:dim_honeycomb}. The corresponding driving protocols here are \begin{enumerate} \item One can smoothly control the extent of dimerization, shown in Fig.~\ref{fig:dim_honeycomb} (c) (d), by shaking linearly the whole lattice at all time~\cite{Quelle2017}. \item Similar to the trimerized kagome lattice, we can add a driving in terms of laser intensity to produce the relatively slow Floquet driving, where the first and second step of a Floquet driving produce the Hamiltonians \begin{align}\label{eq:hn1} \text{Hopping to three neighbors with unequal strength: \qquad} &\frac{\hat{H}_1T}{2\hbar} = \phi_1\sum_{\boldsymbol{r}} \hat{\psi}^\dagger_{\boldsymbol{r}} ( \hat{\psi}_{\boldsymbol{r}+\boldsymbol{d}_1} + \lambda (\hat{\psi}_{\boldsymbol{r}+\boldsymbol{d}_2} + \hat{\psi}_{\boldsymbol{r}+\boldsymbol{d}_3} ) ) \\\label{eq:hn2} \text{Onsite interactions and possible sublattice energy offsets:\qquad} & \frac{\hat{H}_2T}{2\hbar} = \phi_2 \sum_{\boldsymbol{r}} n_{\boldsymbol{r}}(n_{\boldsymbol{r}}-1) + \theta_{\boldsymbol{r}} n_{\boldsymbol{r}} \end{align} \end{enumerate} \begin{figure} [h] \parbox[b]{3cm}{\includegraphics[width=3cm]{honeycomb}\\ \qquad\\ \quad \\ (a) Lasers and shaking scheme} \parbox[b]{5.5cm}{\includegraphics[width=5.5cm]{honeycomb_pot}\\ (b) Potential contours} \parbox[b]{2.5cm}{\includegraphics[width=2.5cm]{honeycomb_dim}\\ (c) Honeycomb lattice with dimerized hopping strength} \parbox[b]{6cm}{ Three nearest neighbor bonds $ \boldsymbol{d}_1 = \boldsymbol{e}_x, \boldsymbol{d}_2 = -\frac{1}{2}\boldsymbol{e}_x + \frac{\sqrt3}{2}\boldsymbol{e}_y, \boldsymbol{d}_3 = -\frac{1}{2}\boldsymbol{e}_x - \frac{\sqrt3}{2}\boldsymbol{e}_y $ \\ $ \gamma_m \rightarrow \gamma_m J_0 \left( \frac{m\omega \boldsymbol{d}_m\cdot \boldsymbol{e}_y}{\hbar} \right) $\\ Strong bond $ 1 $ not affected, weak bonds $ \rightarrow0 $ when shaking frequency $ \frac{m\omega\sqrt3}{2\hbar} \rightarrow 2.405 $ \\ \includegraphics[width=4cm]{honeycomb_bessel} } \caption{\label{fig:dim_honeycomb} The dimerized honeycomb lattice. The extent of dimerization is achieved by tuning the shaking frequencies. $ J_0(x) $ is the Bessel function of the first kind.} \end{figure} \subsection{Initial state preparation} Now, we show the scheme to realize initial states of depositing particles in one sublattice. That can be achieved by taking advantage of the highly tunable kagome optical lattice platform, for both the trimerized kagome and dimerized honeycomb settings, as illustrated in Fig.~\ref{fig:ini}. \begin{figure} [h] \parbox{6cm}{ \includegraphics[width=6cm]{tri_kagome_ini}\\ (a) Trimerized kagome case} \parbox{6cm}{ \includegraphics[width=6cm]{honeycomb_ini} \\ (b) Dimerized honeycomb case} \caption{\label{fig:ini}Laser schemes to prepare for initial states. (a) For the trimerized kagome lattice case, the scheme is realized by slightly modifying the setting in Fig.~\ref{fig:tri_kagome} by tuning the relative phase of the red beam, such that $ x_0 \approx 0.5nm $ and the minima of the red laser potential matches one sublattice site. After loading the atoms to one sublattice as in (a), one could quench $ x_0\rightarrow 0.405nm $ and recover the scheme in Fig.~\ref{fig:tri_kagome}. (b) For the dimerized honeycomb case, in addition to the scheme in Fig.~\ref{fig:dim_honeycomb} using purely green beams, one could further apply the red beams polarized along $ z $ forming triangular lattices. Matching the potential minima to one of the honeycomb site would produce the plotted potentials for preparing initial states. } \end{figure} \subsection{Detection of sublattice particle number by band mapping} The projection measurement of particle number in individual sublattice sites of a non-primitive unit cell of an optical lattice can be performed in three steps. First, the lattice depth is suddenly increased to quench tunneling between lattice sites and project the subsystem in each site to approximately a number Fock state. Then, the superlattice potential is adiabatically deformed, say by changing the relative position of the two underlying sublattices that add up to create the trimerized kagome lattice or the dimerized honeycomb lattice, to energetically detune all subllatice sites. If the detuning is sufficiently large and all the sublattice sites are decoupled, then each energy band of the system is predominantly associated with one sublattice site only. Finally, band mapping, a standard technique where the lattice potential is addiabatically turned off to map quasimomentum to free-particle momentum, is performed. Band population can thus be measured in time-of-flight imaging. Sublattice-site particle number measurement performed with a similar but slightly different technique can be found in \cite{Taie2015}. \subsection{Simulations of results} To simulate concrete experimental situation with large lattices and filling fractions, we resort to a semiclassical numerical method, the truncated Wigner approximation (TWA)~\cite{Polkovnikov2010}. Roughly speaking, this method goes beyond a mean field analysis by sampling over different initial states \begin{align} W[\Phi_{\boldsymbol{r}\mu}^{(0)}] = \frac{1}{2\pi\sigma^2} e^{-|\Phi_{\boldsymbol{r}\mu}^{(0)} - \sqrt{n_{\boldsymbol{r}\mu}^{(0)}}|^2/2\sigma^2} \end{align} where quantum operators $ \hat{\psi}_{\boldsymbol{r}\mu} $ are replaced by their mean field values $ \psi_{\boldsymbol{r}\mu} $, and their could deviation from the initial state values $ \{n_{\boldsymbol{r}\mu}^{(0)} \} $ in different samplings. The fluctuation $ \sigma=1/2 $ means there is on average one half excessive particles per site $ \langle \delta n_{\boldsymbol{r}\mu} \rangle = \int_{-\infty}^\infty |\Phi_{\boldsymbol{r}\mu}^{(0)} - \sqrt{n^{(0)}_{\boldsymbol{r}\mu}} |^2 W[\Phi_{\boldsymbol{r}\mu}^{(0)}] d(Re\Phi_{\boldsymbol{r}\mu}) d(Im\Phi_{\boldsymbol{r}\mu}) = 2\sigma^2 = 1/2 $, which will be canceled by the symmetrization process for transforming operators into Weyl symbols, i.e. $ \hat{n}_{\boldsymbol{r}\mu} = \frac{1}{2}(\hat{\psi}_{\boldsymbol{r}\mu}^\dagger \hat{\psi}_{\boldsymbol{r}\mu} + \hat{\psi}_{\boldsymbol{r}\mu} \hat{\psi}_{\boldsymbol{r}\mu}^\dagger ) - 1/2 \rightarrow |\Phi_{\boldsymbol{r}\mu}|^2 - 1/2 $~\cite{Polkovnikov2010}. Meanwhile, the evolutions are still prescribed by classical differential equations, which can be obtained by first using the Heisenberg's equation of motion $ i\partial_t \hat{\psi}_{\boldsymbol{r}\mu} = [\hat{\psi}_{\boldsymbol{r}\mu},H] $ and then replacing $ \hat{\psi}_{\boldsymbol{r}\mu} $ with Weyl symbols (complex numbers) $ \Phi_{\boldsymbol{r},\mu} $. For instance, the main text model of trimerized kagome lattice in Eq.~(1) prescribes the equations of motion in each period $ T $ as \begin{align} t\in[0,T/2): \qquad & \qquad \partial_t\Phi_{\boldsymbol{r}\mu} = J \sum_{\nu\ne\mu} f_{\mu\nu} ( \Phi_{\boldsymbol{r}\nu} + \lambda \Phi_{\boldsymbol{r}-\boldsymbol{e}_\nu + \boldsymbol{e}_\mu, \nu} ) ,\\ t\in[T/2,T): \qquad & \qquad i\partial_t \Phi_{\boldsymbol{r}\mu} = 2U |\Phi_{\boldsymbol{r}\mu}|^2 \Phi_{\boldsymbol{r}\mu} \end{align} Here the parameter $ J, U $ are related to those in Eq.~(1) by $ JT/2\hbar = \phi_1, UT/2\hbar = \phi_2 $. This way, the semiclassical results are expected to capture the quantum fluctuations during early time of evolution, which is most relevant to experimental observations. As a side remark, we notice that if only a pure mean field simulation is adopted (no initial state sampling), one would observe a deceptive infinite time DTC oscillation without decay at all for a rather wide range of initial states. That contradicts exact diagonalization and analytical results, and the generic thermalizing nature confirmed by level spacing statistics. Therefore, it is of vital importance to incorporate fluctuations at least for the initial states so as to simulate a realistic situation at early time. \begin{figure} [h] \parbox[b]{5.5cm}{\includegraphics[width=5.5cm]{tkl_twa} (a) Numerical results} \parbox[b]{3.5cm}{\includegraphics[width=3.cm]{tkl1} \\ (experimentally accessible) (b) No separation} \parbox[b]{3.5cm}{\includegraphics[width=3.cm]{tkl2} \\\qquad \\ (c) Separation by 1 cell } \parbox[b]{3.5cm}{\includegraphics[width=3.cm]{tkl3} \\ \qquad \\ (d) Separation by 2 cells} \caption{\label{fig:twa_tkl}TWA simulation of scar enforced DTC dynamics in trimerized kagome lattice. We simulate a lattice containing $ 12\times 12 $ unit cells under periodic boundary conditions. Each populated site denoted by colored dots in (b) -- (d) contains 5 bosons as the initial state. Evolutions from these states are simulated in (a) for the corresponding colors. Two sublattices are denoted as $ \mu=0 $ and $ \mu=1 $ following the convention in main text. $ n_0 $ is the total particle number in sublattice $ 0 $, and $ N_b $ the total number of bosons in all sites. Parameters for the model written in Eq.~\eqref{eq:hn1} and \eqref{eq:hn2} are $ \phi_1 = \pi/2, \phi_2 = 1.1, \theta_{\boldsymbol{r}}=0, \lambda=0.05 $. Simulations contain 3000 initial state Monte-Carlo samples for each site and error bars denote the standard deviation when all data are group into 10 bins.} \end{figure} \begin{figure} [h] \parbox[b]{5.5cm}{\includegraphics[width=5.5cm]{hn_twa} (a) Numerical results} \parbox[b]{3.5cm}{\includegraphics[width=3.cm]{hn1} \\ \qquad \\ (b) No separation} \parbox[b]{3.5cm}{\includegraphics[width=3.cm]{hn2} \\ (experimentally accessible) (c) Separation by 1 cell } \parbox[b]{3.5cm}{\includegraphics[width=3.cm]{hn3} \\ \qquad \\ (d) Separation by 2 cells} \caption{\label{fig:twa_dhl} Similar simulations as in Fig.~\ref{fig:twa_tkl} for the dimerized honeycomb lattice. System size is again $ 12\times 12 $ unit cells, and each initially populated site in (b) -- (d) contains 5 bosons. $ n_0 $ means the total particle number in sublattice $ \mu=0 $ and $ N_b $ is the total boson number. Parameters for the model written in Eq.~\eqref{eq:hn1} and \eqref{eq:hn2} are $ \phi_1 = \pi/2, \phi_2 = 1.1, \theta_{\boldsymbol{r}}=0, \lambda=0.05 $. Simulations contain 3000 initial state Monte-Carlo samples for each site and error bars denote the standard deviation when all data are group into 10 bins.} \end{figure} The results for sublattice density dynamics is shown in Fig.~\ref{fig:twa_tkl} and \ref{fig:twa_dhl}, where we compare the DTC decay rates starting from different initial states. It is clear that with larger spatial separations for the initially populated sites lead to prolonged oscillations due to longer time needed for FBS localized at different unit cells to interact with each other.
\section{Introduction} \label{sec:introduction} Recent years have seen rapid progress in quantum simulation technology, with increasing capacity to directly probe the out-of-equilbrium properties of many-body quantum systems. These advances have led to immense theoretical and experimental interest in the thermalization of closed, interacting quantum many-body systems towards translationally invariant equilibrium states~\cite{Deutsch91, Srednicki94, Rigol2008, alessio2016_chaos, kaufman2016_thermalization, Brydges2019_renyi}. A breakthrough has been the key realization that the late time dynamics in such systems can be understood via an emergent, effectively classical hydrodynamic description. This includes the diffusive transport of local densities in systems with global conserved charges~\cite{chaikin_lubensky_1995,Mukerjee06,Lux14,Bohrdt16}, as well as the dynamics of entanglement~\cite{nahum2017_entanglement,jonay2018_coarse,knap2018_scrambling, rakovszky2019_renyi,rakovszky2019_entanglement} and quantum information~\cite{nahum2018_operator,Keyserlingk2018,khemani2018_operator, Rakovszky18,nahum2018_griffith,Parker19}. The remarkable emergence of classical hydrodynamics from a closed quantum time evolution is currently also being explored in many-body systems featuring more exotic conservation laws---or \textit{constraints}---such as gauge theories and fractonic quantum matter~\cite{nandkishore2019_fractons,pretko2020_fracton, chamon2005_glass,haah2011_code,yoshida2013_fractal,vijay2015_topo, Vijay16,pretko2018_elasticity,pretko2017_subdim, pretko2018_gaugprinciple,pretko_witten,williamson2019_fractonic}. Crucially, constraints generally have a qualitative impact on the thermalization process of many-body systems towards equilibrium. While in some instances the presence of fractonic constraints can be as severe as precluding thermalization altogether~\cite{Sala19,khemani20192d,Rakovszky20,scherg2021_kinetic}, in many others they lead to novel subdiffusive universality classes of (emergent) hydrodynamic relaxation of the non-equilibrium evolution at late times~\cite{gromov2020_fractonhydro,feldmeier2020anomalous, morningstar2020_kinetic,zhang_2020,Iaconis19, feldmeier2021_fractondimer,moudgalya2021_spectral,Guardado20, Singh2021_subdiff,iaconis2021_multipole,glorioso2021_breakdown, grosvenor2021_hydro,osborne2022_fracton,feldmeier2021_critical,burchards2022_coupled}. In this work, we study the emergence of another classical process in the dynamics of interacting quantum many-body systems: the tracer motion of tagged particles. While at first sight the notion of a tagged particle appears to be at odds with the indistinguishability of quantum particles in many-body systems, here we show how the effects of kinetic constraints can nonetheless lead to the emergence of such tracer motion. For this purpose we focus on the dynamics of one-dimensional systems with a conserved pattern of effective spins or charges throughout much of this work, see \fig{fig:1} for an illustration. This setup is similar to certain nearest-neighbor simple exclusion processes in classical two-component systems, where tracer motion describes the local component imbalance~\cite{spohn2012_large}. Similar constraints have recently also been discussed in the context of fractonic quantum systems in terms of ``Statistically Localized Integrals of Motion'' (SLIOMs)~\cite{Rakovszky20}, which can be interpreted as an effective conserved pattern. More generally, we investigate the dynamics of local spin correlations in one-dimensional systems featuring a conserved number of spinful particles. The setup is similar to the $tJ$ -- model, which consists of spinful fermions with the condition of no double occupancies. In our case, the usual Heisenberg spin exchange is substituted by constrained spin interactions: We require that some or even all multipole moments of the spin pattern formed by the particles are conserved. For much of this work we focus on random unitary circuits that satisfy these constraints. We will therefore call the systems studied in this work `$tJ$ -- like'. We find that the anomalously slow tracer diffusion of hard core particles in one dimension plays a vital role in describing their dynamical spin correlations. The mapping between spin correlations and tracer dynamics becomes exact for systems with an exactly conserved spin pattern, where the tracer motion gives rise to a subdiffusive dynamical exponent $z=4$. Such systems are similar in structure to the $tJ_z$ -- model, where spin interactions diagonal in the $z$-basis preserve the spin pattern. We thus call such systems `$tJ_z$ -- like'. This framework yields a unifying picture to understand the dynamics of constrained lattice models studied in recent works that can be mapped---either directly or effectively---to a $tJ_z$ -- like structure~\cite{Tomasi19,yang2020_strict,Rakovszky20,feldmeier2021_fractondimer, Singh2021_subdiff}. We use this picture to derive the full long-time profile of the dynamical spin correlations in a random unitary $tJ_z$ -- circuit model and a random XNOR circuit~\cite{Singh2021_subdiff}. Although our main focus is on the dynamics of generic systems, we demonstrate that the tracer picture is applicable also to certain integrable quantum systems. These feature an effective conserved spin pattern but their dynamics \emph{per se} is insensitive to this pattern. As examples we consider the integrable $J_z\rightarrow 0$ limit of the $tJ_z$ -- model and the folded XXZ chain~\cite{Zadnik2021_fxxz1,Zadnik2021_fxxz2,pozsgay2021_fxxz, bidzhiev2022_fxxz}. Through the tracer picture we are able to reproduce their spin diffusion constants at infinite temperature and predict the full profile of their spin correlations at late time, in agreement with our numerical simulations. \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig1.pdf} \caption{\textbf{Tracer diffusion in constrained quantum systems.} \textbf{a)} We consider one-dimensional systems with a pattern of effective excitations (blue and red squares) which is conserved during the time evolution. Infinite temperature dynamical correlation functions in such an ensemble map directly on the tracer probability distribution of hard core random walkers. The fundamental objects of tracer diffusion are the effective excitations of the conserved pattern. \textbf{b)} Solving the tracer problem provides us with quantitatively accurate descriptions of transport in a number of generic random unitary circuit models as well as integrable quantum systems. The effective conserved patterns can assume a complex structure as in the quasi one-dimensional dimer model studied in Ref.~\cite{feldmeier2021_fractondimer}.} \label{fig:1} \end{figure} We then consider models in which only a finite number of moments of the spin pattern are conserved. The resulting spin correlations are given by a convolution of the tracer motion and the internal dynamics of the pattern. As a consequence, we find that the tracer-motion universality is robust to breaking the pattern conservation if all moments up to at least the quadrupole moment of the pattern are conserved. In addition, for dipole-conserving spin interactions we uncover a competition between two hydrodynamic processes that both have dynamical exponent $z=4$ but that exhibit different scaling functions. The long-time profile of the spin correlations is then described by a non-universal mixture of these two scaling functions. We argue that this intriguing situation is reminiscent to phase coexistence at a first order transition between a Gaussian and a non-Gaussian hydrodynamic phase. The remainder of this paper is structured as follows: In Sec.~\ref{sec:models} we introduce the $tJ$ -- like models studied in this work and derive a general expression for their spin correlations at late times. We apply these results to specific random unitary circuit examples in Sec.~\ref{sec:generic}, treating in detail the random XNOR model~\cite{Singh2021_subdiff}. We consider two integrable models in Sec.~\ref{sec:integrable} and discuss cases where only a finite number of multipole moments of the pattern are conserved in Sec.~\ref{sec:multipole}. \section{Models and spin correlations} \label{sec:models} We introduce a novel class of $tJ$ -- like many-body systems of spinful particles in one dimension with constrained spin interaction terms. The constraints are such that either the entire spin pattern or a finite number of multipole moments of the pattern are conserved. We derive a general expression for the infinite temperature dynamical spin correlations at late times in such systems. \subsection{Constrained $tJ$ -- like systems} We are interested in conservation laws inherent to models of the form \begin{equation} \label{eq:1.1} \begin{split} &\hat{H}^{}_m = -t \sum_{x=-L/2}^{L/2-1} \sum_{\sigma} (\hat{\tilde{c}}^\dagger_{x+1,\sigma}\hat{\tilde{c}}_{x,\sigma} + h.c.) + \hat{H}^{}_{S,m} \\ & \qquad \qquad [\hat{H}^{}_{S,m},\sum_x x^n \hat{S}^z_x] = 0 \quad \forall \; n\leq m. \end{split} \end{equation} \eq{eq:1.1} describes a constant number of spinful fermions with nearest-neighbor hopping on a one-dimenional lattice, with the usual $tJ$ -- constraint of no double occupancies (indicated by the tilde over the fermion operators; the fermionic nature of the particles is not essential here). A spin pattern is then formed by the fermions in a squeezed space where all empty sites are removed. The spin interaction $\hat{H}_{S,m}$ between the fermions is generalized to not only conserve the total magnetization but potentially higher moments of this spin pattern (all up to the $m$th moment) as well. Examples for $\hat{H}_{S,m}$ include \begin{equation} \label{eq:1.2} \begin{split} &\hat{H}^{}_{S,0} = J \sum_x \hat{\bs{S}}_{x} \cdot \hat{\bs{S}}_{x+1} + ... \\ &\hat{H}^{}_{S,1} = J \sum_x (\hat{S}^+_{x}\hat{S}^-_{x+1}\hat{S}^-_{x+2}\hat{S}^+_{x+3} + h.c.) + ... \\ &... \\ &\hat{H}^{}_{S,\infty } = J \sum_x \hat{S}^z_{x}\hat{S}^z_{x+1}+ ..., \end{split} \end{equation} where `...' refers to diagonal terms in the $z-$basis or to longer-range off-diagonal terms that fulfill the conservation law of \eq{eq:1.1}. We note that $\hat{H}^{}_0 = \hat{H}^{}_{tJ}$ is a conventional $tJ$ -- model while $\hat{H}^{}_\infty = \hat{H}^{}_{tJ_z}$ is a $tJ_z$ -- model in which the entire spin pattern is a constant of motion. Lattice spin models such as \eq{eq:1.2} provide a novel way of interpolating between these two limiting cases; one can construct such models recursively~\cite{feldmeier2020anomalous}. The Hamiltonians of \eqs{eq:1.1}{eq:1.2} serve as our starting motivation and we can qualitatively determine their universal late-time dynamics at high energies by considering \textit{generic} many-body systems with the same Hilbert space structure and conserved quantities. To introduce a model-independent notation we expand any state $\ket{\psi}$ with a fixed number $N_f$ of particles as $\ket{\psi} = \sum_{\bs{x},\bs{\sigma}} \psi(\bs{x},\bs{\sigma})\ket{\bs{x},\bs{\sigma}}$ in terms of the basis states \begin{equation} \label{eq:1.3} \ket{\bs{x},\bs{\sigma}}, \quad x_1 < ... < x^{}_{N_f}, \;\, \sigma_i \in \{\pm 1\}. \end{equation} Here, $\bs{x}$ labels the positions of the particles on the chain from left to right and $\bs{\sigma}$ their respective spins in the $z-$basis. The time evolution represented by the unitary $\hat{U}_m(t)$ should then fulfill \begin{equation} \label{eq:1.4} [\hat{U}_m(t),\sum_{j=1}^{N_f} j^n \hat{\sigma}_j] = 0 \quad \forall n \leq m, \end{equation} and can be Hamiltonian, such as in \eq{eq:1.1}, or generic, such as in random unitary quantum circuits or classical stochastic lattice gases; either case is expected to exhibit the same universal dynamical behavior. We emphasize that the conservation of moments in \eq{eq:1.4} applies to the squeezed-space variables of the pattern, which are related to the original spins non-locally. In particular, the moments $\sum_x x^n \hat{S}^z_x$ in the original spin space are \textit{not} conserved due to the hopping part of \eq{eq:1.1}. We will make use of the non-local property \eq{eq:1.4} throughout our work and show that various constrained models studied recently are part of this effective description. \subsection{Generic structure of dynamical spin correlations} We derive a general expression for the dynamical spin correlations in a system described by \eqs{eq:1.3}{eq:1.4} under the assumption of chaotic, thermalizing dynamics at infinite temperature. Integrable dynamics will be considered in Sec.~\ref{sec:integrable}. We will assume open boundary conditions in a system of length $L$ containing a fixed number of $N_f$ particles, i.e. density $\rho=N_f/L$. The spin operator $\hat{S}^z_r$ at site $r$ can then be expressed in terms of the pattern spin operators $\hat{\sigma}_j$ via \begin{equation} \label{eq:2.1} \hat{S}^z_r = \sum_{j=1}^{N_f} \, \delta_{\hat{x}_j,r}^{} \, \hat{\sigma}_j. \end{equation} The time evolution $\hat{U}_m(t)$ applied to a basis state $\ket{\bs{x},\bs{\sigma}}$ is given by \begin{equation} \label{eq:2.2} \hat{U}_m(t)\ket{\bs{x},\bs{\sigma}}=\sum_{\bs{x}^\prime,\bs{\sigma}^\prime}a(\bs{x}^\prime\bs{\sigma}^\prime|\bs{x}\bs{\sigma};t)\ket{\bs{x}^\prime,\bs{\sigma}^\prime}, \end{equation} with the matrix elements $a(\bs{x}^\prime\bs{\sigma}^\prime|\bs{x}\bs{\sigma};t)$ normalized to $\sum_{\bs{x}^\prime,\bs{\sigma}^\prime} |a(\bs{x}^\prime\bs{\sigma}^\prime|\bs{x}\bs{\sigma};t)|^2=1$. Using \eqs{eq:2.1}{eq:2.2}, the dynamical spin correlations read \begin{equation} \label{eq:2.3} \begin{split} &C(r,t) := \braket{\hat{S}^z_{r}(t)\hat{S}^z_{0}(0)} = \\ &\quad = \frac{1}{\mathcal{N}} \sum_{\substack{\bs{x},\bs{\sigma},i \\ \bs{x}^\prime,\bs{\sigma}^\prime,j}} \sigma^\prime_j \sigma_i \, \delta_{x^\prime_j,r}\delta_{x_i,0} \, |a(\bs{x}^\prime\bs{\sigma}^\prime|\bs{x}\bs{\sigma};t)|^2, \end{split} \end{equation} where the normalization $\mathcal{N} = \mathcal{N}_n \mathcal{N}_s$ is given by the number of different particle position $\mathcal{N}_n = \binom{L}{N_f}$ on the lattice and the number of different spin patterns $\mathcal{N}_s = 2^{N_f}$. The expectation value $\braket{\cdot}$ is taken with respect to an `infinite temperature' ensemble over all basis states. Under $\hat{U}_m(t)$, both the number of particles as well as the total magnetization of the spin pattern are conserved and we expect both of their local densities to contribute a hydrodynamic mode at long length scales and late times. In general, the precise transport coefficients of the particle mode and the spin pattern mode are determined by a mode-coupled Ansatz and the details of the microscopic time evolution. Nonetheless, we expect that \textit{qualitatively}, we can describe the hydrodynamic behavior of the two modes independently at late times in thermalizing systems. We therefore make the approximation to set \begin{equation} \label{eq:2.4} |a(\bs{x}^\prime\bs{\sigma}^\prime|\bs{x}\bs{\sigma};t)|^2 \simeq p_{n}(\bs{x}^\prime|\bs{x};t) \, p_{s}(\bs{\sigma}^\prime|\bs{\sigma};t) \end{equation} in \eq{eq:2.3}, where we introduced the particle and spin path distributions $p_{n}(\bs{x}^\prime|\bs{x};t)$ and $p_{s}(\bs{\sigma}^\prime|\bs{\sigma};t)$; they fulfill $\sum_{\bs{x}^\prime}p_{n}(\bs{x}^\prime|\bs{x};t) = 1 = \sum_{\bs{\sigma}^\prime}p_{s}(\bs{\sigma}^\prime|\bs{\sigma};t)$. The spin correlations of \eq{eq:2.3} are thus determined by the following two expressions which describe spin pattern dynamics and particle dynamics, respectively: \begin{equation} \label{eq:2.5} \begin{split} F(j-i,t) &:= \frac{1}{\mathcal{N}_s}\sum_{\bs{\sigma},\bs{\sigma}^\prime} \sigma^\prime_j \sigma_i \, p_{s}(\bs{\sigma}^\prime|\bs{\sigma};t) \\ K(j-i,r;t) &:= \frac{1}{\mathcal{N}_n}\sum_{\bs{x},\bs{x}^\prime} \delta_{x^\prime_j,r}\delta_{x_i,0} \, p_{n}(\bs{x}^\prime|\bs{x};t) = \\ &= P(j,r|i,0;t) \, P(i,0). \end{split} \end{equation} In the last step we introduced the probability $P(i,0)$ to find the $i$th particle (counted from the left) at site $x=0$, as well as the probability $P(j,r|i,0;t)$ to find the $j$th particle at site $x=r$ at time $t$ given that particle $i$ was located at site $x=0$ at time $0$. We can rewrite the latter probability as \begin{equation} \label{eq:2.6} P(j,r|i,0;t) = \sum_{\ell} P(j,r|i,\ell;0)\, P(i,\ell|i,0;t). \end{equation} We notice that $P(j,r|i,\ell;0)$ in \eq{eq:2.6} is simply the probability to find particle $j$ at $r$ given that particle $i$ is at $\ell$ at the same time. It has the exact expression ($\theta(\cdot)$ is the Heaviside theta function) \begin{equation} \label{eq:2.7} \begin{split} &P(j,r|i,\ell;0) = \,\delta_{i-j,0} \, \delta_{r-\ell,0} \, + \\ & \quad + \theta(j-i-1)\theta(r-\ell-1)\frac{ \binom{r-\ell-1}{j-i-1} \binom{L-r+\ell-1}{N-j+i-1} }{ \binom{L}{N} } + \\ & \quad + \theta(i-j-1)\theta(\ell-r-1)\frac{ \binom{\ell-r-1}{i-j-1} \binom{L-\ell+r-1}{N-i+j-1} }{ \binom{L}{N} } \\ &\stackrel{|i-j|\gg 1}{\approx} \frac{1}{\sqrt{\pi \, \bigl(\frac{1}{\rho^2}-\frac{1}{\rho}\bigr)\, |j-i|}}\exp\Biggl\{ -\frac{\bigl[r-\ell-\frac{j-i}{\rho}\bigr]^2}{\bigl(\frac{1}{\rho^2}-\frac{1}{\rho}\bigr)\,|j-i|} \Biggr\}, \end{split} \end{equation} where in the last line we made an approximation for large $|i-j|\gg 1$, leading to a Gaussian centered around $r-\ell-\frac{j-i}{\rho}=0$ with width proportional to $\sqrt{|i-j|}$.\footnote{The last line of \eq{eq:2.7} actually follows in a grand canonical setting with average density $\rho$ of particles. Nonetheless, the location of the center and the scaling of the width remain valid for fixed particle number.} For the second expression on the right hand side of \eq{eq:2.6} we define \begin{equation} \label{eq:2.8} P(i,\ell|i,0;t) =: G_{tr}(\ell,t), \end{equation} since $P(i,\ell|i,0;t)$ traces the motion of particle $i$, which we assume to be in the bulk of the spin pattern. $G_{tr}(\ell,t)$ thus corresponds to the time dependent tracer probability distribution of a bulk particle. Using \eqs{eq:2.7}{eq:2.8} in \eqs{eq:2.5}{eq:2.6} we obtain \begin{equation} \label{eq:2.9} \begin{split} K(j-i,r;t) &= P(i,0) \,\int d\ell \, P(j,r|i,\ell;0) \, G_{tr}(\ell,t) \simeq \\ &\simeq P(i,0) \, G_{tr}\Bigl(r-\frac{j-i}{\rho},t\Bigr). \end{split} \end{equation} The last line follows since $G_{tr}(\ell,t)$ is in general a probability distribution whose width increases in time while the width of $P(j,r|i,\ell;0)$ is a constant of order $\sqrt{|j-i|}$. Therefore, at late times $G_{tr}(\ell,t)$ is much broader and we can substitute the approximation $P(j,r|i,\ell;0) \simeq \delta(r-\ell-\frac{j-i}{\rho})$ into \eq{eq:2.9}. Finally, inserting \eq{eq:2.9} and \eq{eq:2.5} into \eq{eq:2.3} we find \begin{equation} \label{eq:2.10} C(r,t) = \int d j \, F(j,t) \, G_{tr}(r-j/\rho,t) = [\tilde{F} \, \star \, G_{tr} ](r,t), \end{equation} with $\tilde{F}(j,t) = \rho \, F(\rho j,t)$. The dynamical spin correlations $C(r,t)$ at late times are thus given quite generally as a convolution between the internal dynamics of the spin pattern and the tracer distribution of a distinguishable particle on the lattice. Since $G_{tr}(\ell,t)$ follows the trajectory of the $i$th particle (with some $i$ in the bulk) counted from the left, the relevant tracer problem is one of hard core interacting particles that can never swap relative positions. We note that in reciprocal space \eq{eq:2.10} represents two independent decay processes of long wavelength $k$-modes. \section{Random unitary circuits with conserved pattern} \label{sec:generic} We use the result of \eq{eq:2.10} to study a number of $tJ_z$ -- like models with a spin pattern that is a constant of motion. We remark that the results of this section should apply very generally to models featuring recently introduced ``Statistically Localized Integrals of Motion'' (SLIOMs)~\cite{Rakovszky20}, which can be interpreted as a conserved pattern. If the entire pattern is constant, the spin dynamics becomes trivial, $F(j,t)=\delta(j)$ for all times in \eq{eq:2.10} and thus \begin{equation} \label{eq:3.0.0} C(r,t) \simeq G_{tr}(r,t) \end{equation} maps directly to a tracer problem. Due to the trivial pattern dynamics, our initial approximation \eq{eq:2.4} simply becomes $|a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma};t)|^2 \simeq p_n(\bs{x}^\prime|\bs{x};t)$, i.e., the matrix elements of the time evolution can be considered approximately independent of the underlying spin pattern when inserted into \eq{eq:2.3}. In fact, with a conserved pattern the correlations of \eq{eq:2.3} can be recast as \begin{equation} \label{eq:3.0.1} \begin{split} C(r,t) = G_{\mathrm{tr}}(r,t) + R(r,t), \end{split} \end{equation} where $R(r,t)$ is the difference between the \textit{exact} correlations and the tracer distribution. It reads explicitly \begin{equation} \label{eq:3.0.2} \begin{split} &R(r,t) = \frac{1}{\mathcal{N}} \sum_{\substack{\bs{x},\bs{x}^\prime, \bs{\sigma} \\ i\neq j}} \sigma_j\sigma_i \, \delta^{}_{x^\prime_j,r}\, \delta^{}_{x_i,0} |a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma};t)|^2, \end{split} \end{equation} and captures contributions to $C(r,t)$ due to spins $j\neq i$ moving to site $r$ at time $t$, given that spin $i$ started at site $x=0$ initially. Due to the summation over the spin values $\sigma_j$, $R(r,t)$ acquires both a positive and negative contribution from $\sigma_j$ and $-\sigma_j$, respectively. We then expect generically that contributions to $R(r,t)$ from spins $j$ with $|j-i| \gg 1$ vanish approximately due to cancellation of positive and negative contributions, justifying \eq{eq:3.0.0}. In this section, we will consider generic systems where $R(r,t)=0$ exactly upon averaging over the random time evolution, and in Sec.~\ref{sec:integrable} integrable quantum systems in which $R(r,t)=0$ exactly since the time evolution is indeed independent of the underlying pattern, hence in both cases $|a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma};t)|^2 = p_n(\bs{x}^\prime|\bs{x};t)$. In either case, since $C(r,t)=G_{\mathrm{tr}}(r,t)$ exactly, we will be able to use existing results from the theory of tracer dynamics to obtain full long-time spin correlation profiles. Here, we first consider systems subject to a random time evolution, such as a classical stochastic lattice gas or random unitary quantum circuits. Averaging over the random evolution (denoted by $\overline{\cdot\cdot\cdot}$) we are interested in the associated averaged correlations $\overline{C(r,t)}$. For certain models that we consider, $\overline{R(r,t)}=0$ (see below) and thus the mapping to tracer dynamics is exact upon averaging over the random evolution, $\overline{C(r,t)}=G_{\mathrm{tr}}(r,t)$. The resulting tracer problem we have to solve is one of particles hopping randomly on a one-dimensional lattice subject to a hard core exclusion principle. The hard core property is a direct consequence of the pattern conservation. Of particular interest to us is the nearest neighbor simple exclusion process in one dimension, for which the long time tracer distribution function is known to be~\cite{harris1965_diffusion,levitt1973_dynamics,alexander1978_tracer,vanBeijeren1983_diffusion}: \begin{equation} \label{eq:3.1.1} G_{\mathrm{tr}}(\ell,t)\rightarrow G^{(nI)}_{\mathrm{tr}}(\ell,t) := \frac{1}{(16Dt\pi^2)^{1/4}}\exp\Bigl\{ - \frac{\ell^2}{4\sqrt{Dt}} \Bigr\}, \end{equation} where the superscript $(nI)$ indicates that we are considering generic, \textit{non-integrable} systems. $G^{(nI)}_{\mathrm{tr}}(\ell,t)$ takes the form of a Gaussian that broadens subdiffusively slowly, \begin{equation} \label{eq:3.1.2} \begin{split} \braket{\Delta \ell(t)^2} = 2\sqrt{Dt}. \end{split} \end{equation} The generalized diffusion constant $D$ is determined via the density $\rho$ of particles on the chain and the bare hopping rate $\Gamma$ per time step of an inividual particle, \begin{equation} \label{eq:3.1.3} D = \frac{\Gamma}{\pi}\bigl(\rho^{-1}-1\bigr)^2. \end{equation} We consider two examples in detail in the following, the random $tJ_z$ -- model and the random XNOR model, for which \eqs{eq:3.1.1}{eq:3.1.3} will provide us with the exact long time spin correlations after identifying conserved spin patterns in the appropriate variables. \subsection{Random circuit $tJ_z$ -- model} \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig2.pdf} \caption{\textbf{Random $tJ_z$ -- circuit.} \textbf{(a)} In the random $tJ_z$ -- circuit we consider a three-state local Hilbert space and two-site local random unitary gates. The local gates connect states with spins hopping between neighboring lattice sites. \textbf{(b)} The mean squared displacement (MSD) associated to the spin correlations $C(r,t)$ agrees with the tracer prediction of \eq{eq:3.2.5} for particle density $\rho=2/3$ and single particle hopping rate $\Gamma = 1$. \textbf{(c)} The form of the correlations $C(r,t)$ at time $t=7000$ of the circuit evolution. It assumes a Gaussian shape as expected from the tracer distribution. We obtain these numerical results by sampling the discrete stochastic Markov process of \eq{eq:3.2.3}. The data was averaged over $1000$ randomly chosen product initial states of the Markov process in a system of length $L=5000$.} \label{fig:2} \end{figure} Our first example is a direct implementation of a random version of the $tJ_z$ -- model. We consider a chain with local Hilbert space spanned by the states $\ket{q}=\ket{-1}$, $\ket{0}$, $\ket{1}$. Each basis state can be written as $\ket{\bs{q}}=\ket{\bs{x},\bs{\sigma}}$ and we demand that the pattern $\bs{\sigma}$ of $\pm 1$-spins be a constant of motion. We then consider a random unitary time evolution given by \begin{equation} \label{eq:3.2.1} \hat{U}(t) = \prod_{\ell=1}^{tL} \hat{U}_{\ell}, \end{equation} where individual two-site gates $\hat{U}_\ell$ are arranged spatially as shown in \fig{fig:2}. Each of the $\hat{U}_{\ell}$ is given by \begin{equation} \label{eq:3.2.2} \hat{U}_{\ell} = \sum_{s} \hat{P}_s \hat{U}_s \hat{P}_s, \end{equation} where $s$ labels the symmetry sectors of the two-site local Hilbert space that are connected under the constraint of keeping $\bs{\sigma}$ constant. Specifically, there are five sectors that contain only a single local configuration, $\{\ket{-1 -1}\}$, $\{\ket{-1 1}\}$, $\{\ket{1 -1}\}$, $\{\ket{1 1}\}$, and $\{\ket{0 0}\}$, as well as two sectors that contain two states each, $\{\ket{0,1},\ket{1,0}\}$, $\{\ket{0,-1},\ket{-1,0}\}$. $\hat{P}_s$ is a projector onto these connected sectors. The unitary operators $\hat{U}_s$ acting within each sector are then chosen randomly from the Haar measure. Averaging the time evolution over the random gates, the associated circuit-averaged probabilities required to compute the spin correlations $\overline{C(r,t)}$ are given by a classical discrete Markov process. Specifically, we follow Ref.~\cite{Singh2021_subdiff} in introducing the notation $|\bs{x},\bs{\sigma}) := \ket{\bs{x},\bs{\sigma}}\bra{\bs{x},\bs{\sigma}}$ for the projector onto the state $\ket{\bs{x},\bs{\sigma}}$, as well as an associated inner product $(\hat{A}|\hat{B}) := \mathrm{Tr}\bigl[ \hat{A}\hat{B}^\dagger \bigr]$ for operators. The matrix elements for the time evolution are then given by~\cite{Singh2021_subdiff} \begin{equation} \label{eq:3.2.3} \overline{|a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma};t)|^2} = (\bs{x}^\prime,\bs{\sigma}|\hat{\mathcal{T}}^t|\bs{x},\bs{\sigma}), \end{equation} with a transfer matrix $\hat{\mathcal{T}}$ given by \begin{equation} \label{eq:3.2.4} \begin{split} \hat{\mathcal{T}} &= \bigotimes_{\ell=1}^{L} \hat{\mathcal{T}}_\ell \\ \hat{\mathcal{T}}_\ell &= \sum_s \frac{1}{d_s} \sum_{s_1,s_2 \in s} |s_1)(s_2|, \end{split} \end{equation} where $d_s$ is the size of the local two-site symmetry sector $s$. We see that \eqs{eq:3.2.3}{eq:3.2.4} describe the averaged probabilities $\overline{|a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma};t)|^2}$ in terms of a stochastic lattice gas: For each applied gate a particle hops with probability $1/2$ to an empty neighboring site and stays at its position if the neighboring site is occupied by another particle. In particular, $\overline{|a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma};t)|^2} = \overline{|a(\bs{x}^\prime|\bs{x};t)|^2}$ is \textit{independent} of the spin pattern $\bs{\sigma}$. Thus, the contribution $\overline{R(x,t)}$ of equation \eq{eq:3.0.2} vanishes due to cancellation of positive and negative spin contributions. The long-time mean squared displacement of the tracer process is in turn exactly described by the simple nearest-neighbor exclusion process through \eqss{eq:3.1.1}{eq:3.1.3}. In our case, the density of particles is given by $\rho=2/3$ at infinite temperature. Furthermore, for a single time step consisting of two layers as shown in \figc{fig:2}{a} there are two attempted moves at rate $1/2$ per particle, such that we can effectively set $\Gamma = 1$. This yields $D=1/4\pi$ for the random circuit $tJ_z$ -- model, see also \fig{fig:1}. The theory of tracer diffusion of hard core particles in one dimension thus predicts a mean squared displacement \begin{equation} \label{eq:3.2.5} \sigma^2(t):= \sum_r r^2 \, \overline{C(r,t)} = \sqrt{t/\pi} \end{equation} at long times $t$ with a Gaussian shape of the averaged correlations $\overline{C(r,t)}$. The mean squared displacement thus grows subdiffusively $\sim \sqrt{t}$ as opposed to conventional diffusive growth $\sim t$. We confirm this prediction by numerically sampling the stochastic Markov process \eq{eq:3.2.3} which yields the spin correlations in \figc{fig:2}{b+c}. \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig3.pdf} \caption{\textbf{Random XNOR circuit.} In the random XNOR circuit we consider a two-state local Hilbert space and four-site local random unitary gates. The allowed moves under these gates connect local configurations by exchanging nearest neighbor states, conditioned on the two surrounding sites being in the same state.} \label{fig:3} \end{figure} \subsection{Random circuit XNOR model} We consider a second example of generic unitary quantum dynamics where we can use the tracer formulae \eqss{eq:3.1.1}{eq:3.1.3} to derive the long-time behavior of local spin correlations, the random XNOR circuit~\cite{Singh2021_subdiff}. The model is an effective spin $S=1/2$ system with Hilbert space spanned by the local states $\ket{\uparrow},\ket{\downarrow}$. The local unitaries $\hat{U}_{\ell}$ that generate the time evolution are \textit{four-site} gates that conserve both the total magnetization $\hat{M} = \sum_x \hat{S}^z_x$ as well as the number of Ising domain walls $\hat{D}=\sum_x (\hat{S}^z_{x+1}-\hat{S}^z_x)^2$. Therefore, $\hat{U}_{\ell}$ can exchange the central two spins only if the outer two spins have the same value, see \fig{fig:3}. Writing $\hat{U}_{\ell} = \sum_s \hat{P}_s \hat{U}_s \hat{P}_s$ as in \eq{eq:3.2.2}, the only symmetry sectors $s$ that contain more than a single state are $\{\ket{\uparrow,\uparrow,\downarrow,\uparrow},\ket{\uparrow,\downarrow,\uparrow,\uparrow}\}$ and $\{\ket{\downarrow,\uparrow,\downarrow,\downarrow},\ket{\downarrow,\downarrow,\uparrow,\downarrow}\}$. We refer to this system as the random XNOR model following Ref.~\cite{Singh2021_subdiff}, which established that spin correlations in this model show subdiffusive transport with $z=4$. While the dynamical exponent is in agreement with the tracer picture, the $tJ_z$ -- like existence of a conserved pattern is not immediately apparent in the random XNOR model. We first describe the mapping to such a conserved pattern using the original spin variables $S^z_x \in \{\uparrow,\downarrow\}$, see also Refs.~\cite{dias2000_exact,Tomasi19}. We then construct an equivalent mapping using domain wall variables $\hat{S}^z_{x+1}-\hat{S}^z_x$, see also Refs.~\cite{menon1997_dimers,yang2020_strict,pozsgay2021_fxxz}. Combining both pictures, we will be able to explain the full form of the spin correlations $\overline{C(r,t)}$ at long times. \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.8\linewidth]{fig4.pdf} \caption[\textbf{Conserved charge pattern in the random XNOR circuit.}]{\textbf{Conserved charge pattern in the random XNOR circuit.} \textbf{a)} Mapping between original spin-$1/2$ degrees of freedom and an effective conserved superspin pattern. Going from left to right, two neighboring aligned spins are mapped to a corresponding superspin $\Uparrow$ or $\Downarrow$, while two neighboring domain walls map to a vacant site $0$. The pattern of non-zero superspins is conserved under random XNOR dynamics. In the domain wall picture (empty and filled circles), the mobile vacancies correspond to domain wall pairs (\dwpair). Furthermore, in the domain wall picture the objects that form a conserved pattern are given by single bonds of aligned spins (\alsingle) as well as single domain walls paired up with a neighboring aligned bond (\dwalpair). This domain wall conserved pattern is obtained by removing all mobile domain wall pairs (\dwpair) see also \fig{fig:5}. \textbf{b)+c)} Elementary XNOR moves within the above mapping. In superspin language, vacancies $0$ and superspins $\Uparrow/\Downarrow$ exchange positions. In domain wall language, a mobile domain wall pair exchanges positions with one of the objects contributing to the domain wall pattern (i.e. \alsingle or \dwalpair).} \label{fig:4} \end{figure} \subsubsection{Conserved pattern: spin picture} Let us consider a state $\ket{\bs{s}}$ with $s_x \in \{\uparrow,\downarrow\}$ in a system of length $L$. We map this state (bijectively up to boundary terms) to a state $\ket{\bs{\tau}}$ of effective `superspin' degrees of freedom $\tau_i \in \{\Uparrow, 0 , \Downarrow\}$ on a chain of length $\tilde{L}(\bs{s})$ which explicitly depends on the state $\ket{\bs{s}}$ in the original spin-$1/2$ picture, see also Refs.~\cite{dias2000_exact,Tomasi19}. We start at the left end $x=-L/2$ of the original chain and consider the bond between the first two spins $s_{-L/2},s_{-L/2+1}$. There are two possibilities: \begin{enumerate} \item If $s_{-L/2}=s_{-L/2+1}$, we add $\tau = \Uparrow$ and $\tau=\Downarrow$ to the superspin configuration, for $s_{-L/2}=\uparrow$ and $s_{-L/2}=\downarrow$, respectively. \item If $s_{-L/2}\neq s_{-L/2+1}$, consider the next bond between $s_{-L/2+1},s_{-L/2+2}$: If $s_{-L/2+1}=s_{-L/2+2}$, we again accordingly add $\tau = \Uparrow$ or $\tau = \Downarrow$ to the superspin configuration for $s_{-L/2+1}=\uparrow$ and $s_{-L/2+1}=\downarrow$, respectively. On the other hand, if also $s_{-L/2+1} \neq s_{-L/2+2}$, we add the superspin $\tau = 0$. \end{enumerate} The above steps determine the first element (from the left) of the superspin configuration. The next superspin is determined by moving to the next bond between two spins and repeating the above steps. This process is reiterated until all bonds in the original picture have been accounted for, yielding $\ket{\bs{\tau}}=\ket{\bs{\tau}(\bs{s})}$. An example of this mapping is illustrated in \figc{fig:4}{a}. With the superspin description $\ket{\bs{\tau}}$ we are back to a $tJ$ -- like Hilbert space structure. Under the random XNOR dynamics described above (see also \fig{fig:4}) the number and the pattern of non-zero superspins are indeed conserved: On the one hand, every bond of aligned spins contributes a non-zero superspin and the total number of aligned nearest neighbor spins is constant due to domain wall conservation. On the other hand, two opposite superspins located next to each other, e.g. $\ket{...\Uparrow \Downarrow ...}$, translate into a local configuration of four spins, $\ket{...\uparrow\uparrow\downarrow\downarrow ...}$, on which the XNOR gates of \fig{fig:3} can only act trivially. Hence, $\Uparrow$ and $\Downarrow$ can never exchange relative positions. If we write $\ket{\bs{\tau}}=\ket{\bs{x},\bs{\sigma}}$ as before, the pattern $\bs{\sigma}$ is conserved. Through this mapping we are led back to the random circuit $tJ_z$ -- constraints considered in the previous section, accounting for the dynamical exponent $z=4$. In addition, we also analyze in the following how the conserved superspin pattern translates \textit{quantitatively} into the correlations of the original spin variables. To this end, we define the quantities \begin{equation} \label{eq:3.3.1} \hat{\kappa}_x := \frac{1}{2} ( \hat{S}^z_x + \hat{S}^z_{x+1} ) \end{equation} within the spin-$1/2$ picture, which detect whether the bond between the spins at $x,x+1$ contributes a non-zero superspin to $\ket{\bs{\tau}}$. The dynamic correlation function $\overline{\braket{\hat{\kappa}_{2r}(t)\hat{\kappa}_0(0)}}$ then probes how a non-zero superspin excitation initially located between sites $0,1$ spreads to the bond between $2r,2r+1$. Crucially, according to the random XNOR gates depicted in \fig{fig:4}, the non-zero superspins $\Uparrow,\Downarrow$ \textit{only move by steps of length two} with respect to the original lattice. At the same time they move only by a distance $r$ within the compressed superspin pattern $\bs{\tau}$. Since the superspin description reduces to the random $tJ_z$ -- model analyzed above we can write \begin{equation} \label{eq:3.3.2} \overline{\braket{\hat{\kappa}_{2r}(t)\hat{\kappa}_0(0)}} = \frac{1}{2} G_{\mathrm{tr}}^{(nI)}(r,t). \end{equation} Here, the prefactor $1/2$ corresponds to the probability of finding a non-zero superspin between sites $0,1$. The hopping rate of superspins entering \eq{eq:3.3.2} through \eq{eq:3.1.3} can again effectively be set to $\Gamma=1$ for the circuit geometry of \fig{fig:3}. On the other hand, care needs to be taken to determine the density $\rho$ of non-zero superspins, as the infinite temperature average in the original spin variables $s_x$ \textit{does not} transfer directly to an infinite temperature average in the superspin picture. We will derive this density below in the domain wall picture, see \eq{eq:3.3.14}; for now we quote only the obtained result $\rho = 3/4$ entering \eq{eq:3.3.2}. Inserting the definition \eq{eq:3.3.1} of $\hat{\kappa}_x$ back into \eq{eq:3.3.2} we obtain \begin{equation} \label{eq:3.3.3} \begin{split} & \frac{1}{2} G_{\mathrm{tr}}^{(nI)}(r,t) = \frac{1}{4}\Bigl( \overline{\braket{\hat{S}^z_{2r-1}(t)\hat{S}^z_{0}(0)}} + \\ & \qquad \qquad + 2\overline{\braket{\hat{S}^z_{2r}(t)\hat{S}^z_{0}(0)}} + \overline{\braket{\hat{S}^z_{2r+1}(t)\hat{S}^z_{0}(0)}} \Bigr), \end{split} \end{equation} where we made use of translational invariance in the bulk. We could have performed an equivalent calculation for the correlation $\overline{\braket{\hat{\kappa}_{2r+1}(t)\hat{\kappa}_0(0)}}$ and thus \begin{equation} \label{eq:3.3.4} \begin{split} & \frac{1}{2} G_{\mathrm{tr}}^{(nI)}(r,t) = \frac{1}{4}\Bigl( \overline{\braket{\hat{S}^z_{2r}(t)\hat{S}^z_{0}(0)}} + \\ & \qquad \qquad + 2\overline{\braket{\hat{S}^z_{2r+1}(t)\hat{S}^z_{0}(0)}} + \overline{\braket{\hat{S}^z_{2r+2}(t)\hat{S}^z_{0}(0)}} \Bigr), \end{split} \end{equation} which will be relevant for resolving the $A/B$-sublattice structure further below. From \eq{eq:3.3.3} we then obtain the mean squared displacement at long times, \begin{equation} \label{eq:3.3.5} \begin{split} &\sigma^2(t) = \sum_r r^2 \overline{\braket{\hat{S}^z_{r}(t)\hat{S}^z_{0}(0)}} \\ & \xrightarrow{t \gg 1} \frac{1}{2} \sum_r (2r)^2 \Bigl\{ \overline{\braket{\hat{S}^z_{2r-1}(t)\hat{S}^z_{0}(0)}} + \\ & \qquad\qquad + 2 \overline{\braket{\hat{S}^z_{2r}(t)\hat{S}^z_{0}(0)}} + \overline{\braket{\hat{S}^z_{2r+1}(t)\hat{S}^z_{0}(0)}} \Bigr\} = \\ &= \sum_r (2r)^2 G_{\mathrm{tr}}^{(nI)}(r,t) = \sum_r r^2 G_{\mathrm{tr}}^{(nI)}(r,16t) = \frac{8}{3\sqrt{\pi}} \sqrt{t}, \end{split} \end{equation} where we used \eqs{eq:3.1.2}{eq:3.1.3} with $\rho=3/4$ and $\Gamma=1$. We can absorb the factor of $16$ in $G_{\mathrm{tr}}^{(nI)}(r,16t)$ into the effective (sub)diffusion constant to obtain $D=16/9\pi$, see also \fig{fig:1}. Again the dynamics is subdiffusive with $z=4$. To verify this prediction we simulate the circuit of \fig{fig:3} numerically, again using the mapping to a classical Markov process. The derivation of the associated transfer matrix $\hat{\mathcal{T}}$ proceeds in full analogy to the $tJ_z$ -- case. \figc{fig:6}{b} demonstrates the validity of \eq{eq:3.3.5}. In addition, \eq{eq:3.3.3} predicts a Gaussian enveloping shape of the charge correlations, which we numerically verify in \figc{fig:6}{a}. Intriguingly however, \eq{eq:3.3.3} in principle allows for additional sublattice structure. We indeed find sizeable staggered oscillations on top of the Gaussian in \figc{fig:6}{a}. These oscillations do not decay at large times and thus hint at additional structure in the model. In order to explain and quantitatively describe these short-distance oscillations, we will switch to a domain wall picture in the following. \subsubsection{Conserved pattern: domain wall picture} \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig5.pdf} \caption[\textbf{Sublattice symmetry.}]{\textbf{Sublattice symmetry.} In the domain wall picture, we obtain a conserved pattern by removing all mobile domain wall pairs (illustrated as \dwpair). The resulting pattern is formed by single aligned bonds (\alsingle) and pairs of a single domain wall with an aligned bond to its right (\dwalpair). The pattern is subject to an exclusion constraint of nearest neighbor domain walls, i.e. every filled circle necessarily has at least two empty circle neighbors (one to the left and one to the right). The sublattice charge of all charged domain walls $\hat{\tilde{\kappa}}$ that are not part of a mobile pair is then conserved. This is due to the mobile pairs having a spatial extension of length two, such that single domain walls exchanging their position with such pairs only move by steps of length two at a time, hence preserving their sublattice. They also preserve their charge value since the domain wall charges are perfectly anticorrelated globally.} \label{fig:5} \end{figure} An alternative description of the Hilbert space structure can be given in terms of the domain wall charge variables \begin{equation} \label{eq:3.3.6} \hat{\tilde{\kappa}}_x := \frac{1}{2}(\hat{S}^z_{x+1}-\hat{S}_x^z), \end{equation} which ascribes a sign depending on whether the local configuration is $\ket{...\downarrow\uparrow...}$ or $\ket{...\uparrow\downarrow...}$. After fixing the leftmost spin, a complete description of a spin configuration is also given in terms of the locations of its domain walls, $(\tilde{\kappa}_x)^2$, regardless of their sign. We can construct a domain wall version of the conserved charge pattern, see also Refs.~\cite{menon1997_dimers,yang2020_strict,pozsgay2021_fxxz}: Starting from the left of the system, neighboring domain walls are paired up into mobile pairs \dwpair, see \figc{fig:4}{a}. The remaining single domain walls are paired up with their corresponding right neighbor bond that connects two aligned spins, \dwalpair. Defined in this way, the dynamics in the system is generated by mobile domain wall pairs (\dwpair) moving through the system, exchanging positions with single bonds of aligned spins (\alsingle) and with the pairs of domain walls and aligned bonds (\dwalpair). The elementary dynamical processes are depicted in \figc{fig:4}{b+c}. By removing all mobile domain wall pairs, see e.g. \fig{fig:5}, we obtain a conserved pattern in the domain wall description formed by single aligned bonds \alsingle and the pairs \dwalpair of domain wall and aligned bond. The conserved pattern thus exhibits a blockade of nearest neighbor domain walls. The number of conserved patterns with such a blockade grows as a Fibonacci sequence in system size. This Fibonacci number then also corresponds to the number of disconnected subsectors in the Hilbert space~\cite{Tomasi19,yang2020_strict}. \begin{figure*}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig6.pdf} \caption{\textbf{Random XNOR model: Numerical results.} \textbf{a)} Spatial shape of the spin correlation function at time $t=10^4$ of the random circuit shown in \fig{fig:3}. The black dashed line corresponds to the Gaussian of the tracer probability distribution predicted by \eq{eq:3.3.19}. \textbf{b)} The mean squared displacement $\sigma^2(t)$ of the spin correlations agrees with the late time prediction of \eq{eq:3.3.5}. \textbf{c)} The absolute value $\bigl|C(r,t)-G_{\mathrm{tr}}^{(nI)}(x,16t)\bigr|$ of the oscillations on top of the Gaussian shape as seen in a). The black dashed line corresponds to the prediction of \eq{eq:3.3.19}. The results demonstrate the quantitative accuracy of the tracer description. The data was averaged over $12800$ random initial states of the associated stochastic Markov process in a system of length $L=5000$.} \label{fig:6} \end{figure*} Due to the two-site spatial extension of the domain wall pairs, the total $A/B$ sublattice charge of all domain walls $\hat{\tilde{\kappa}}_x$ that are not part of a mobile pair is a conserved quantity, see \fig{fig:5}. Formally, we can express \begin{equation} \label{eq:3.3.7} \hat{\tilde{\kappa}}_x=\hat{\tilde{\kappa}}^{(single)}_x+\hat{\tilde{\kappa}}^{(pair)}_x, \end{equation} where $\hat{\tilde{\kappa}}^{(single)}_x$ is the domain wall charge operator for \textit{single} domain walls while $\hat{\tilde{\kappa}}^{(pair)}_x$ is the operator for domain walls that are part of mobile \textit{pairs}. The two sublattice charges \begin{equation} \label{eq:3.3.8} \hat{\mathcal{Q}}_{A/B} = \sum_{x \in A/B} \hat{\tilde{\kappa}}^{(single)}_x = \mathrm{const.} \end{equation} are conserved quantities. The operator $\hat{\tilde{\kappa}}_x$ thus separates into a part that has overlap with the sublattice conservation laws of \eq{eq:3.3.8} and a part not associated to any such conservation law ($\sum_{x \in A/B} \hat{\tilde{\kappa}}^{(pair)}_x \neq \mathrm{const.}$). The domain wall charge correlation function on the even sublattice at late times will thus be dominated by the transport associated to the conserved quantity $\hat{\mathcal{Q}}_A$, i.e. \begin{equation} \label{eq:3.3.9} \overline{\braket{\hat{\tilde{\kappa}}_{2r}(t)\hat{\tilde{\kappa}}_0(0)}} \stackrel{t \gg 1}{=} \overline{\braket{\hat{\tilde{\kappa}}^{(single)}_{2r}(t)\hat{\tilde{\kappa}}^{(single)}_0(0)}}. \end{equation} Corrections to \eq{eq:3.3.9} are expected to decay quickly (generically exponentially fast) in time. Since the single domain wall charges are part of a conserved pattern as described above their dynamical correlations are again given by the tracer distribution, \begin{equation} \label{eq:3.3.10} \overline{\braket{\hat{\tilde{\kappa}}_{2r}(t)\hat{\tilde{\kappa}}_0(0)}} \stackrel{t \gg 1}{=} C_0 \, G_{\mathrm{tr}}^{(nI)}(r,t), \end{equation} with constant prefactor $C_0$ to be determined. The density $\rho$ and the hopping rate $\Gamma$ entering \eq{eq:3.3.10} are the same as in the spin picture above. To compute $C_0$ we equate \eqs{eq:3.3.9}{eq:3.3.10} and take the sum over $r$, \begin{equation} \label{eq:3.3.11} C_0 = \sum_r \braket{\hat{\tilde{\kappa}}^{(single)}_{2r}\hat{\tilde{\kappa}}^{(single)}_0}, \end{equation} resulting in a simple \textit{static} (notice the absence of the circuit average) correlation function at infinite temperature. We can express \eq{eq:3.3.11} as \begin{equation} \label{eq:3.3.12} C_0 = \Braket{\bigl(\hat{\tilde{\kappa}}^{(single)}_0\bigr)^2} \sum_r \Braket{\hat{\tilde{\kappa}}^{(single)}_{2r}}^\prime, \end{equation} where $\braket{\cdot}^\prime$ denotes a modified infinite temperature average with a single positive domain wall \textit{fixed} to sit at site $0$. The factor $\Braket{\bigl(\hat{\tilde{\kappa}}^{(single)}_0\bigr)^2}$ is determined within the mapping to a conserved pattern from \fig{fig:4}: $\Braket{\bigl(\hat{\tilde{\kappa}}^{(single)}_0\bigr)^2} = \#(\dwalpair)/L$ corresponds to the density of single domain walls paired up with a neighboring aligned spin bond. Using that the overall density of domain walls is $1/2$ and that by symmetry $\#(\dwalpair)/L = \#(\dwpair)/L$, we obtain \begin{equation} \label{eq:3.3.13} \begin{split} \frac{L}{2} &= 2\cdot \#(\dwpair) + \#(\dwalpair) = 3\cdot \#(\dwalpair) \\ &\rightarrow \Braket{\bigl(\hat{\tilde{\kappa}}^{(single)}_0\bigr)^2} = \#(\dwalpair)/L = 1/6. \end{split} \end{equation} With this result we can also compute the density $\rho$ of hard core particles (corresponding to the density of non-zero superspins of the previous section) that we used in \eq{eq:3.3.5}: \begin{equation} \label{eq:3.3.14} \rho = 1 - \frac{\#(\dwpair)}{\#(\dwpair)+\#(\alsingle)} = 1 - \frac{L/6}{L/6+L/2} = 3/4. \end{equation} The remaining correlation function $\Braket{\hat{\tilde{\kappa}}^{(single)}_{2r}}^\prime$ in \eq{eq:3.3.12} refers only to single domain walls and can thus be computed within the ensemble of possible conserved domain wall patterns, see \fig{fig:5}. Making use of this property we derive the exact value of this correlation function in Appendix~\ref{sec:App1} and quote here our final result \begin{equation} \label{eq:3.3.15} C_0 = \frac{1}{12}\bigl(\varphi-1\bigr) \end{equation} for the constant $C_0$, where $\varphi=(1+\sqrt{5})/2$ is the golden ratio. Then, inserting the definition \eq{eq:3.3.6} in \eq{eq:3.3.10} yields \begin{equation} \label{eq:3.3.16} \begin{split} & C_0\, G_{\mathrm{tr}}^{(nI)}(r,t) = \frac{1}{4}\Bigl( 2\overline{\braket{\hat{S}^z_{2r}(t)\hat{S}^z_{0}(0)}} \\ & \qquad \qquad -\overline{\braket{\hat{S}^z_{2r-1}(t)\hat{S}^z_{0}(0)}} - \overline{\braket{\hat{S}^z_{2r+1}(t)\hat{S}^z_{0}(0)}} \Bigr). \end{split} \end{equation} Performing the equivalent derivation for the correlations $\overline{\braket{\hat{\tilde{\kappa}}_{2r+1}(t)\hat{\tilde{\kappa}}_0(0)}}$ gives us the additional relation \begin{equation} \label{eq:3.3.17} \begin{split} & -C_0\, G_{\mathrm{tr}}^{(nI)}(r,t) = \frac{1}{4}\Bigl( 2\overline{\braket{\hat{S}^z_{2r+1}(t)\hat{S}^z_{0}(0)}} \\ & \qquad \qquad -\overline{\braket{\hat{S}^z_{2r}(t)\hat{S}^z_{0}(0)}} - \overline{\braket{\hat{S}^z_{2r+2}(t)\hat{S}^z_{0}(0)}} \Bigr). \end{split} \end{equation} Adding \eqs{eq:3.3.3}{eq:3.3.16} as well as \eqs{eq:3.3.4}{eq:3.3.17} finally yields the long time correlations \begin{equation} \label{eq:3.3.18} \begin{split} \overline{\braket{\hat{S}^z_{2r}(t)\hat{S}^z_{0}(0)}} = \frac{1}{2}(1+2C_0)\, G_{\mathrm{tr}}^{(nI)}(r,t) \\ \overline{\braket{\hat{S}^z_{2r+1}(t)\hat{S}^z_{0}(0)}} = \frac{1}{2}(1-2C_0)\, G_{\mathrm{tr}}^{(nI)}(r,t), \end{split} \end{equation} which we can rewrite as \begin{equation} \label{eq:3.3.19} \overline{C(r,t)} = \overline{\braket{\hat{S}^z_{r}(t)\hat{S}^z_{0}(0)}} = [1+2C_0(-1)^r]\, G_{\mathrm{tr}}^{(nI)}(r,16t). \end{equation} \eq{eq:3.3.19} explains the staggered oscillations observed numerically in \figc{fig:6}{a}. To check that our quantitative description (i.e. the constant $C_0$ of \eq{eq:3.3.15}) is accurate, we show in \figc{fig:6}{c} that the quantity $\bigl|\overline{C(r,t)}-G_{\mathrm{tr}}^{(nI)}(x,16t)\bigr|$ agrees with the prediction of \eq{eq:3.3.19}. We emphasize that the staggering of the correlations decribed by \eq{eq:3.3.19} persists up to infinite time. \subsection{Random circuit dimer model} We mention only briefly a third example of $tJ_z$ -- like dynamics in a dimer model on a bilayer square lattice geometry as introduced in Ref.~\cite{feldmeier2021_fractondimer}. The system has a short direction along which periodic boundaries are chosen, making the geometry quasi one-dimensional, and the time evolution is generated by local plaquette flips of parallel dimers, \begin{equation} \label{eq:3.5.1} \hat{H} = -J\sum_{p} \left(\ket{\plaqv}\bra{\plaqh} + h.c. \right). \end{equation} The model is equivalent to a model of closed directed loops and site-local charges on a square lattice cylinder with short circumference. The existence of a conserved charge pattern and its role in inducing a dynamical exponent $z=4$ due to the emergence of a hard core tracer problem has been discussed already in Ref.~\cite{feldmeier2021_fractondimer}. Intuitively, the site-local charges in the model are dimers that go in between the two layers, positive or negative depending on which sublattice they occupy. When a charge is enclosed by a loop, it cannot escape the loop under the dynamics of \eq{eq:3.5.1}. In the presence of a finite density of loops that wind across the circumference of the cylinder (with the same chirality), a conserved pattern is formed by the summing up charges always in between two such loops, see \fig{fig:1} and Ref.~\cite{feldmeier2021_fractondimer} for details. The tracer prediction of $z=4$ and the Gaussian shape of the dynamical charge correlations have been verified numerically in Ref.~\cite{feldmeier2021_fractondimer}. Only the precise values of effective (sub)diffusion constants are unknown since the mapping to a conserved pattern is an effective one. \section{Integrable quantum systems with conserved pattern} \label{sec:integrable} The presence of a conserved charge pattern can also be of use in \textit{integrable} $tJ_z$ -- like quantum systems and, in certain cases, provides an alternative route to determine the long time profile and diffusion constant of their spin correlations at infinite temperature. The associated tracer motion relevant for the correlations $C(r,t)$ from \eq{eq:2.10} is one with \textit{ballistically} instead of diffusively moving particles. As single particles move ballistically, the many-body tracer distribution will be diffusive. A similar situation was considered in Refs.~\cite{medenjak2017_diffusion,Klobas2018_exact}, where the spin diffusion constant of an interacting deterministic classical cellular automaton with invariant spin pattern and pattern-independent dynamics was computed exactly. According to \eq{eq:2.10}, this spin diffusion is directly associated with a Gaussian tracer distribution with the same diffusion constant, \begin{equation} \label{eq:3.4.1} G_{tr}(\ell,t) \rightarrow G_{tr}^{(I)}(\ell,t) = \frac{1}{\sqrt{4\pi Dt}} \exp\Bigl\{-\frac{\ell^2}{4Dt} \Bigr\}. \end{equation} The superscript $(I)$ indicates an integrable process which implies a broadening of $G_{tr}$ as $\sim\sqrt{t}$ (instead of $\sim t^{1/4}$ which we have obtained for generic systems in Sec.~\ref{sec:generic}). Using the result of Ref.~\cite{medenjak2017_diffusion}, the diffusion constant $D$ of \eq{eq:3.4.1} is determined by the density $\rho$ of particles along the chain as well as their effective velocity $v_{\mathrm{eff}}$, \begin{equation} \label{eq:3.4.2} \begin{split} \braket{\Delta x^2} = 2Dt \\ D = \frac{v_{\mathrm{eff}}}{2}(\rho^{-1}-1). \end{split} \end{equation} In the discrete time cellular automaton considered in Ref.~\cite{medenjak2017_diffusion}, all particles have a fixed velocity of $v_{\mathrm{eff}}=2$. \subsection{Integrable $tJ_z$ -- model} The above connection can be put to direct use in the integrable $J_z\rightarrow 0$ limit of the $tJ_z$ -- model~\cite{KOTRLA90}, \begin{equation} \label{eq:3.4.3} \hat{H}_{t} = -\sum_{x,\sigma} ( \hat{\tilde{c}}^\dagger_{x+1,\sigma}\hat{\tilde{c}}^{}_{x,\sigma} + h.c. ), \end{equation} which features only the hopping of spinful fermions with forbidden double occupancy. The matrix elements $a(\bs{x}^\prime\bs{\sigma}|\bs{x}\bs{\sigma},t) = a(\bs{x}^\prime|\bs{x},t)$ of the time evolution obtained from \eq{eq:3.4.3} do not depend on the pattern $\bs{\sigma}$, so $R(r,t)=0$ in \eq{eq:3.0.2}, and the mapping to a tracer problem is exact at all times. At infinite temperature, the density of particles is $\rho=2/3$ and we can determine the effective velocity $v_{\mathrm{eff}}$ by noting that $\hat{H}_t$ can be mapped to a problem of spinless free fermions~\cite{KOTRLA90}, \begin{equation} \label{eq:3.4.4} \hat{H}_{t} = -\sum_k \cos(k) \hat{f}^\dagger_k\hat{f}^{}_k. \end{equation} We give an intuitive argument for why this is possible: Since the dynamics is oblivious to the conserved spin pattern, for a given inital basis state we can simply \textit{i)} `write down' the invariant spin pattern for bookkeeping purposes, \textit{ii)} remove the fermions' spins, \textit{iii)} perform the time evolution with a Hamiltonian of spinless fermion hopping (of same hopping strength), and then \textit{iv)} reintroduce the pattern afterwards. Steps \textit{i)} and \textit{iv)} in this mapping are of course highly non-local. At infinite temperature we then expect all momentum modes of \eq{eq:3.4.4} to be occupied with equal probability. While Ref.~\cite{medenjak2017_diffusion} derived \eq{eq:3.4.2} for an automaton in which every particle has the same absolute velocity, here we need to consider a distribution of different momentum modes. We expect that the mean displacement of the equivalent tracer process depends only on the average of the absolute velocity and thus predict the effective velocity for \eq{eq:3.4.2} to be given by the average absolute group velocity of \eq{eq:3.4.4}: \begin{equation} \label{eq:3.4.5} v_{\mathrm{eff}} = \frac{1}{2\pi}\int_{-\pi}^{\pi} dk \, | \partial_k \cos(k) | = \frac{2}{\pi}. \end{equation} This leads to the infinite temperature spin diffusion constant \begin{equation} \label{eq:3.4.6} D_t = \frac{1}{2\pi} \end{equation} for the quantum model $\hat{H}_t$ of \eq{eq:3.4.3}. \eq{eq:3.4.2} also yields the diffusion constant at infinite temperature but with fixed density $\rho \neq 2/3$ or chemical potential $\mu$ such that $\beta\mu = \mathrm{const.}$ as $\beta\rightarrow\infty$. \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig7.pdf} \caption{\textbf{Folded XXZ chain.} Profile of the dynamical spin correlation function for the folded XXZ chain of \eq{eq:3.4.8} (blue curve, $\Delta \rightarrow \infty$) at time $t=18$ in a system of length $L=30$. The black dashed line shows the prediction of \eq{eq:3.4.10}, there are no fit parameters. The red line shows the profile obtained for the XXZ chain \eq{eq:3.4.7} at anisotropy $\Delta=4$, illustrating good agreement with \eq{eq:3.4.10} at intermediate times, even for moderate values of anisotropy.} \label{fig:7} \end{figure} \subsection{Folded XXZ spin chain} As a second example we consider an integrable version of the random XNOR model, the folded XXZ chain. It is obtained from the integrable XXZ model \begin{equation} \label{eq:3.4.7} \hat{H}_{\mathrm{XXZ}} = - \sum_i \frac{1}{2}(\hat{S}^+_i\hat{S}^-_{i+1} + \hat{S}^-_i\hat{S}^+_{i+1}) + \Delta \hat{S}^z_i\hat{S}^z_{i+1} \end{equation} in the limit of large anisotropy $\Delta \rightarrow \infty$, which using a Schrieffer-Wolff transformation yields \begin{equation} \label{eq:3.4.8} \hat{H}_{\mathrm{fXXZ}} = - \sum_i (\frac{1}{4}+\hat{S}^z_{i-1}\hat{S}^z_{i+2})(\hat{S}^+_i\hat{S}^-_{i+1}+\hat{S}^-_i\hat{S}^+_{i+1}). \end{equation} $\hat{H}_{\mathrm{fXXZ}}$ remains integrable and many of its thermodynamic and dynamic properties have been analyzed in recent works~\cite{Zadnik2021_fxxz1,Zadnik2021_fxxz2,pozsgay2021_fxxz, bidzhiev2022_fxxz}. We note that $\hat{H}_{\mathrm{fXXZ}}$ consists of four-site spin- and domain wall-conserving terms and thus features the same effective conserved pattern of superspins as the random XNOR model above. In particular, it can be demonstrated that in the superspin picture, the folded XXZ chain becomes equivalent to the integrable limit of the $tJ_z$ -- model from \eq{eq:3.4.3}, $\hat{H}_{\mathrm{fXXZ}} \rightarrow \hat{H}_t$~\cite{dias2000_exact}. As a consequence, the spin diffusion constant $D_{\mathrm{fXXZ}}$ of the folded XXZ chain can be obtained from the diffusion constant $D$ of superspins determined by the Hamiltonian $\hat{H}_t$ of \eq{eq:3.4.3}. In order to relate the two, we recall that the infinite temperature average in the original spin picture implies a density $\rho=3/4$ of superspins in the associated integrable $tJ_z$ -- model. Furthermore, in the original lattice superspins always move by two sites. The variance $\braket{\Delta x^2}=2D_{\mathrm{fXXZ}}t$ of the original spin correlation profile is thus determined by \begin{equation} \label{eq:3.4.9} \begin{split} \frac{2D_{\mathrm{fXXZ}}\,t}{4} &= \frac{\braket{\Delta x^2}}{4} = 2 D t \\ \rightarrow D_{\mathrm{fXXZ}} &= \frac{4}{3\pi}, \end{split} \end{equation} where we have used that $D=1/3\pi$ for $\rho=3/4$ and $v_{\mathrm{eff}}=2/\pi$ in \eq{eq:3.4.2}. The value of $D_{\mathrm{fXXZ}}$ in \eq{eq:3.4.9} is in agreement with previous analytical results~\cite{gopalakrishnan2019_kinetic}, obtained using generalized hydrodynamics~\cite{castro2016_ghd,bertini2016_ghd}, as well as numerical results for the XXZ chain~\cite{karrasch2014_realtime,karrasch2017_hubbard}. In addition, following the analysis of the sublattice domain wall charge in the XNOR model, see \fig{fig:5}, we predict the full long time profile of the dynamical spin correlations for the folded XXZ chain to be \begin{equation} \label{eq:3.4.10} C(r,t) = [1+2C_0(-1)^r]\,G_{tr}^{(I)}(r,t). \end{equation} Here, $G_{tr}^{(I)}(r,t)$ is from \eq{eq:3.4.1} with $D=D_{\mathrm{fXXZ}}$. In particular, the long time profile features characteristic staggered oscillations of strength $2C_0$ with $C_0$ from \eq{eq:3.3.15}. These oscillations also lead to a distinct contribution to the spin conductivity $\sigma(k,\omega)=\frac{\beta}{2}\braket{j(k,\omega)j(-k,-\omega)}$, with spin current $j(k,\omega)$. Using the continuity equation $\partial_t S^z_x(t) + \partial_x j(x,t)= 0$, we relate $\sigma(k,\omega)=\frac{\beta\omega^2}{2k^2}C(k,\omega)$ and obtain \begin{equation} \label{eq:3.4.11} \sigma(k=\pi,\omega\rightarrow 0) = \frac{C_0\beta}{2} D_{\mathrm{fXXZ}}. \end{equation} The finite momentum conductivity of the folded XXZ chain thus exhibits a finite contribution at $k=\pi$. We verify \eq{eq:3.4.10} numerically for the folded XXZ chain of \eq{eq:3.4.8} in systems of finite size and at intermediate time scale in \fig{fig:7}. We consider a chain of size $L=30$ spins by making use of the conserved pattern and employing sparse matrix evolution. The infinite temperature average for the spin correlations was approximated by averaging over $10^5$ randomly chosen product initial states for the time evolution. We find good agreement with \eq{eq:3.4.10} already at a time $t=18$ in \fig{fig:7}. Furthermore, we note that the anisotropic XXZ chain of \eq{eq:3.4.7} has recently been implemented in quantum simulation experiments~\cite{Jepsen2020_xxz}. In a simple perturbative argument, the Hamiltonian $\hat{H}_{\mathrm{fXXZ}}$ should provide a good estimate for the time evolution of $\hat{H}_{\mathrm{XXZ}}$ up to times $t \sim \Delta^2$ in the anisotropy. Signatures of \eq{eq:3.4.10} should thus be visible at intermediate times already at moderate anisotropy strength. We demonstrate this numerically in \fig{fig:7} by time-evolving an infinite temperature density matrix perturbed by a spin excitation in the center of the chain. We use matrix product state methods with a bond dimension $\chi=1200$ for the time evolution with the anisotropic XXZ Hamiltonian of \eq{eq:3.4.7}~\cite{hauschild2018_tenpy}. We find good agreement with the folded limit and the expression in \eq{eq:3.4.10} already for $\Delta=4$ at a time $t=18$ in \fig{fig:7}. We conclude this section with the following remark: As discussed previously, the folded XXZ Hamiltonian $\hat{H}_{\mathrm{fXXZ}}$ maps to the integrable limit $\hat{H}_t$ of the $tJ_z$ -- model in the superspin picture. Similarly, one can apply the reverse of this mapping to the $tJ_z$ -- like deterministic cellular automaton studied in Refs.~\cite{medenjak2017_diffusion,Klobas2018_exact}, which is effectively a local automaton for the superspins. Under the reverse mapping we then obtain an automaton for spin-$1/2$ variables that is able to mimic the long-time dynamics of the folded XXZ chain. A different cellular automaton mimicking the folded XXZ dynamics, which exhibits different left- and right-mover velocities, has recently been studied in Ref.~\cite{Pozsgay2021_intaut}. In our prescription outlined above the automaton obtained from Ref.~\cite{medenjak2017_diffusion} by inverting the mapping from superspins to spin-$1/2$ is non-local in the spin-$1/2$ variables and features symmetric left- and right-movers of equal speed instead. \section{Broken pattern conservation} \label{sec:multipole} In this section, we return to random unitary circuit models but relax the condition of an exactly conserved spin pattern. In particular, we consider constrained `$tJ_m$ -- like' models in which only a certain number $m$ of moments of the spin pattern remains constant, see \eqs{eq:1.1}{eq:1.3}. Remarkably, breaking the pattern conservation does not immediately imply conventional diffusion but the resulting dynamics sensitively depends on the number of conserved moments. To see this, we note that the pattern-internal spin dynamics in the presence of $m$ conserved multipole moments is governed by the following hydrodynamic equation for the coarse-grained spin density $\braket{\hat{\sigma}_x(t)}$~\cite{gromov2020_fractonhydro,feldmeier2020anomalous}, \begin{equation} \label{eq:4.0.1} \partial_t \braket{\hat{\sigma}_x} + (-1)^{m} D_s\, \partial_x^{2m+2} \braket{\hat{\sigma}_x} = 0. \end{equation} \eq{eq:4.0.1} describes (sub)diffusive dynamics with dynamical exponent $z=2m+2$ and its fundamental solution, which corresponds to the spin part of \eq{eq:2.5} via linear response, reads in momentum space: \begin{equation} \label{eq:4.0.2} F(k,t) = \frac{1}{\sqrt{2\pi}} \, \exp(-D_s \, k^{2m+2} t), \end{equation} normalized such that $\int dx\, F(x,t) = 1$. Using \eq{eq:4.0.2} in \eq{eq:2.10} we obtain the spin correlations in momentum space, \begin{equation} \label{eq:4.0.3} \begin{split} &C(k,t) = G_{tr}(k,t)\, F(k,t) = \\ &=\frac{1}{2\pi} \exp\Bigl\{-D_s \, k^{2m+2} t - \sqrt{Dt}\, k^2\Bigr\}, \end{split} \end{equation} which we will analyze for different values of $m$ in the following. While $m=0$ leads to conventional diffusion, $m\geq 2$ preserves the tracer mapping at long times. The case $m=1$ turns out to be special, with a competition between two processes that have the same dynamical exponent but different scaling functions. \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig8.pdf} \caption{\textbf{Moment-conserving random circuit evolution.} \textbf{a)} We consider $tJ_m$ -- like random circuits with spin terms that conserve a given number $m$ of multipole moments (in the depicted example the dipole moment $m=1$) of the spin pattern. The spin terms are applied with some probability $\gamma$, the particle hopping terms with probability $1-\gamma$. \textbf{b)} The dynamics of random circuits with multipole moment conserving spin pattern depends on the number $m$ of conserved moments. If only the total spin of the pattern is conserved ($m=0$), the mean-squared displacement $\sigma^2(t)\sim t$ follows conventional diffusion. If all moments up to the quadrupole moment ($m=2$) or higher are conserved, $\sigma^2(t)\sim \sqrt{t}$ remains dominated by anomalously slow hard core tracer motion.} \label{fig:8} \end{figure} \begin{figure*}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.99\linewidth]{fig10.pdf} \caption{\textbf{Hydrodynamic phase mixing.} \textbf{a)} The profile of the spin correlations at different times for a probability $\gamma \neq 0$ of random circuit updates that conserve the dipole-moment of the spin pattern. \textit{Inset}: A scaling collapse of the profiles determines the dynamical exponent $z=4$. \textbf{b)} The scaling function associated to some $0\leq \gamma \leq 1$ is neither the Gaussian, that is associated to hard core tracer diffusion, nor the fundamental solution of the dipole-conserving hydrodynamic equation \eq{eq:4.0.1}. It is instead given by a convolution of the two. Here, the scaling functions are normalized such that their value at $r=0$ is equal to one. \textbf{c)} Logarithm of the Fourier transform $C(k,t)$ of the real space correlations $C(r,t)$. The momentum axis has been rescaled independently for different $\gamma$, defined in such a way that all curves coincide at $t^{1/4}k=1$, $|\log \overline{C(k,t)}|=1$. This allows us to directly compare the relative strengths of the $(kt^{1/4})^2$-- and $(kt^{1/4})^4$-- contributions to $|\log \overline{C(k,t)}|$ for different $\gamma$. We see that increasing the probability $\gamma$ of dipole-conserving spin updates leads to an increasing weight of the $(t^{1/4}k)^4$-term in \eq{eq:4.2.3}. Inset: On a double logarithmic scale the crossover from $(kt^{1/4})^2$-- to $(kt^{1/4})^4$-- behavior becomes visible.} \label{fig:10} \end{figure*} \subsection{$m=0$: Diffusion} For $m=0$, under rescaling space and time in \eq{eq:4.0.3} according to $k \rightarrow k/\lambda$, $t \rightarrow \lambda^z t = \lambda^2 t$, we obtain \begin{equation} \label{eq:4.1.1} \begin{split} C(k,t) \sim &\exp\Bigl\{-D_sk^2t - \sqrt{Dt}\, k^2/\lambda\Bigr\} \\ &\xrightarrow{\lambda \rightarrow \infty} \exp\Bigl\{-D_sk^2t \Bigr\}. \end{split} \end{equation} This implies that the dynamical exponent is $z=2$. Therefore, if only the total spin of the pattern is conserved the correlations $C(k,t)$ are described by conventional diffusion as expected. We verify this result numerically in $tJ$ -- like random unitary circuits with charge-conserving two-spin gates, see \figc{fig:8}{a}. The mean squared displacement $\sigma^2(t)$ of the resulting real space correlations $\overline{C(r,t)}$ indeed scales diffusively $\sigma^2(t)\sim t$ at long times as shown in \figc{fig:8}{b}. \subsection{$m\geq 2$: Tracer diffusion} On the other hand, rescaling $k \rightarrow k/\lambda$, $t \rightarrow \lambda^z t = \lambda^4 t$ for $m\geq 2$ in \eq{eq:4.0.3} yields \begin{equation} \begin{split} C(k,t) \sim &\exp\Bigl\{-D_sk^{2m+2}t/\lambda^{2m-2} - \sqrt{Dt}\, k^2 \Bigr\} \\ &\xrightarrow{\lambda \rightarrow \infty} \exp\Bigl\{- \sqrt{Dt}\, k^2 \Bigr\}, \end{split} \end{equation} and the dynamical exponent is $z=4$. Thus, if all moments of the spin pattern up to at least the quadrupole moment are conserved the long-time correlations remain dominated by the anomalously slow tracer motion of \eq{eq:3.1.1}. Again, we verify this numerically by computing the mean-squared displacement $\sigma^2(t) = \sum_r r^2 \, \overline{C(r,t)}$ of a random time evolution with $m-$pole conserving spin interactions, see \figc{fig:8}{b}. In practice, we have to make sure to avoid localization of the spin pattern dynamics due to a strong fragmentation of the Hilbert space into disconnected subsectors, which can occur for all $m\geq 1$~\cite{Sala19,khemani20192d,Rakovszky20}. This is achieved by choosing spin-gates of sufficient range, which ensures ergodicity of the spin dynamics. As expected, the system is described by $z=4$ subdiffusive tracer dynamics in the case of quadrupole conservation $m=2$, i.e. $\sigma^2(t) \sim \sqrt{t}$, see \figc{fig:8}{b}. \subsection{$m=1$: Hydrodynamic phase coexistence} For the special case of $m=1$, both terms in the exponent of $C(k,t)$ are equally relevant under the rescaling $k \rightarrow k/\lambda$, $t \rightarrow \lambda^4 t$, \begin{equation} C(k,t) \xrightarrow{\lambda \rightarrow \infty} \exp\Bigl\{-D_sk^{4}t - \sqrt{Dt}\, k^2 \Bigr\}. \end{equation} The correlation function $C(k,t)$ is thus subject to a competition between two inequivalent dynamical processes that both have $z=4$ but that have different forms of their respective scaling function. Notably, although $C(k,t)=C(kt^{1/4})$ is a function of $kt^{1/4}$, it can not be written in terms of some universal scaling function $\mathcal{K}(\cdot)$ that is independent of microscopic details. Instead, \begin{equation} C(k,t) = \mathcal{K}\Bigl(k(Dt)^{1/4},D_s/\sqrt{D}\Bigr), \end{equation} i.e. the form of $C(kt^{1/4})$ depends non-trivially on the ratio $D_s/\sqrt{D}$ which determines the mixture of the two universal processes. Specifically, we can express \begin{equation} \label{eq:4.2.3} \log C(k,t) = - (D_s+\sqrt{D}) \Bigl[ \mu\, (kt^{1/4})^4 + (1-\mu)\, (kt^{1/4})^2\Bigr], \end{equation} where $\mu=\mu(D_s/\sqrt{D})=\frac{D_s}{\sqrt{D}}(1+\frac{D_s}{\sqrt{D}})^{-1}$ and $0\leq \mu \leq 1$. The specific mixture, and thus the long time and length scale profile of the spin correlations, is sensitive to microscopic details of the time evolution, reminiscent of UV-IR-mixing~\cite{you2020_uvir,seiberg2020_uvir,gorantla2021_uvir,you2021_uvir,hart2021_experimental,sala2021_dynamics,hart2022_hidden}. This results in a continuously varying hydrodynamic universality class controlled by the microscopic mixing parameter $\mu$. Here, we identify a hydrodynamic universality class with both the dynamical exponent and the scaling function. We confirm these theoretical considerations numerically in \fig{fig:10}, where we consider a random unitary time evolution with dipole-conserving dynamics within the spin pattern, see \figc{fig:8}{a}. To ensure ergodicity, we use dipole-conserving spin updates ranging over eight sites. For any given probability $\gamma$ at which non-trivial spin pattern rearrangements occur the dynamical exponent is $z=4$, as demonstrated by the scaling collapse of $\overline{C(r,t)}$ evaluated at different times in \figc{fig:10}{a}. However, varying this probability $\gamma$ effectively controls the ratio $D_s/\sqrt{D}$ and leads to different scaling functions as shown in \figc{fig:10}{b}. In particular, the limiting distributions are a Gaussian for $\gamma=0$ and the dipole-conserving hydrodynamic scaling function of \eq{eq:4.0.2} (for $m=1$) as $\gamma \rightarrow 1$. In addition, we numerically compute the Fourier transform $C(k,t)$ of the correlation profile to verify the prediction of \eq{eq:4.2.3}. \figc{fig:10}{c} shows that increasing the rate $\gamma$ of the spin dynamics leads to an increasing contribution of the $(kt^{1/4})^4-$term to $\log C(k,t)$. The arbitrary mixing of two distinct dynamical scaling functions as in \eq{eq:4.2.3} can be viewed as phase coexistence of two hydrodynamic phases, in analogy with more conventional phase coexistence occuring at first order equilibrium transitions. To make this analogy more tangible, let us imagine a situation in which the dynamics of the spin pattern is given by \begin{equation} \label{eq:4.2.4} F_\alpha(k,t) = \frac{1}{\sqrt{2\pi}} \, \exp(-D_s \, |k|^{\alpha} t), \end{equation} now with some general exponent $0<\alpha<\infty$ whose value is governed by some underlying model (e.g. through the power-law decay of a long-ranged spin term in the constrained $tJ$ -- like models). Using that $C_\alpha(k,t)=F_\alpha(k,t)G_{tr}(k,t)$, we obtain the dynamical exponent $z$ as a function of $\alpha$: \begin{equation} \label{eq:4.2.5} z(\alpha) = \begin{cases} \alpha, \text{ for } \alpha<4 \\ 4, \text{ for } \alpha \geq 4 \end{cases}. \end{equation} In particular, $\alpha>4$ corresponds to Gaussian tracer motion while $\alpha <4$ is associated with non-Gaussian scaling functions. In addition, for $\alpha \neq 4$ we can always write the real space correlations $C_\alpha(r,t)$ as \begin{equation} \label{eq:4.2.6} C_\alpha(r,t) = (Dt)^{-1/4} \mathcal{F}_\alpha \bigl(r(Dt)^{-1/4}\bigr), \end{equation} with a normalized universal scaling function $\int dx\, \mathcal{F}_\alpha(x) = 1$. If we thus consider $\alpha=4$ to separate a Gaussian and a non-Gaussian dynamical phase, we can accordingly define an order parameter that quantifies the non-Gaussianity of the scaling function for a given $\alpha$ via \begin{equation} \label{eq:4.2.7} \begin{split} &h(\alpha) := \min_{\lambda > 0} \int dx\, \Bigl( \lambda\,\mathcal{F}_\alpha(\lambda x) - \frac{1}{\sqrt{\pi}}\exp(-x^2) \Bigr)^2 = \\ &= \begin{cases}\frac{1}{2\pi}\min\limits_{\lambda>0} \int dk\, \Bigl( e^{-(|k|/\lambda)^\alpha}-e^{-k^2/4} \Bigr)^2, \quad \alpha < 4 \\ 0, \quad \alpha > 4 \end{cases}. \end{split} \end{equation} We have evaluated $h(\alpha)$ numerically in \fig{fig:11}, where we see a clear discontinuity at $\alpha=4$. The central property $\Delta h(\alpha=4) > 0$ can also be demonstrated analytically. In particular, the variance of the $\alpha \rightarrow 4^-$ scaling function vanishes, as opposed to a Gaussian~\cite{feldmeier2020anomalous}. This jump in the order parameter suggests that we can indeed interpret the point $\alpha=4$ as a first order dynamical transition, with \eq{eq:4.2.3} describing the Gaussian/non-Gaussian phase mixture. \begin{figure}[t] \centering \includegraphics[trim={0cm 0cm 0cm 0cm},clip,width=0.95\linewidth]{fig11.pdf} \caption{\textbf{Hydrodynamic order parameter.} The order parameter $h(\alpha)$ of \eq{eq:4.2.7} quantifies the deviation of the charge correlation profile from a Gaussian. $\alpha$ labels the exponent of the spin pattern's internal dynamics, see \eq{eq:4.2.4}. There is a clear discontinuity at $\alpha=4$, where long-time dynamical correlations switch between Gaussian tracer motion and a non-Gaussian dipole-conserving profile. As a consequence, $\alpha = 4$ can be interpreted as a first order dynamical transition, which allows for phase coexistence of distinct hydrodynamic universality classes.} \label{fig:11} \end{figure} \section{Conclusion \& Outlook} In this work, we investigated the emergent hydrodynamics of $tJ$ -- like many-body systems in one dimension with constrained spin interactions. We found that for chaotic, thermalizing systems the dynamical spin correlation function at infinite temperature is given by a convolution of the dynamics of the underlying spin pattern and the tracer motion of hard core particles. In $tJ_z$ -- like systems all multipole moments of the spin pattern are constants of motion and spin correlations are given by tracer dynamics alone. This allowed us to demonstrate the emergence of subdiffusion with dynamical exponent $z=4$ in several random circuit lattice models that feature a (effective) constant spin pattern. Using results from the theory of tracer motion we provided expressions for the full long-time profile of dynamical spin correlations in these models. It will be interesting to see in the future whether additional one-dimensional systems fall under this dynamical universality class. We also remark that although we mostly focused on situations with a conserved $\sigma_i = \pm 1$ spin pattern, our results generalize to patterns of higher effective spin $\sigma_i = -|S|,...,|S|$. In such an instance, all odd power spin density correlations of the form \begin{equation} \label{eq:6.1} \Braket{ \bigl(\hat{S}^z_x(t)\bigr)^{2n+1} \bigl(\hat{S}^z_0(0)\bigr)^{2n+1} }, \end{equation} with integer $n$, reduce to the same tracer process up to a global prefactor. We emphasize that our results apply to infinite temperature correlations. Whether extensions to finite temperatures are possible depends sensitively on whether the average charge of the pattern vanishes also at finite temperatures for a given model. We further established a connection to integrable $tJ_z$ -- like quantum systems which feature conserved spin patterns and a time evolution that is independent of the pattern. By mapping to a tracer problem of ballistically moving particles, we were able to reproduce the spin diffusion constant of the folded XXZ chain and provided its full long-time correlation profile. The characteristic staggered oscillations of the resulting correlation profile can be verified in quantum simulation experiments on XXZ chains already at moderate anisotropy. We further point out a connection to anomalous current correlations recently reported for the XXZ chain, the XNOR circuit, and for a deterministic classical automaton, Refs.~\cite{gopalakrishnan2022_anomalous,krajnik2022_anomalous}. Ref.~\cite{gopalakrishnan2022_anomalous} provides a picture in which such correlations are effectively due to the tracer motion of a single domain wall. We expect that the same arguments, and thus the presence of anomalous correlations, apply in any system with a conserved pattern, which includes Ref.~\cite{krajnik2022_anomalous}. Moreover, it is interesting to study non-integrable Hamiltonian quantum systems with conserved patterns, e.g. via the $tJ_z$ -- model at finite $J_z$ or via adding diagonal interactions to the folded XXZ model. For example, a stochastic spin chain closely related to the folded XXZ model is the so-called Ising-Kawasaki model~\cite{grynberg,vinet}, taken in a particular limit: the Hamiltonian $H_{\rm fXXZ}$ is supplemented by nearest-neighbor (NN) and next-nearest-neighbor (NNN) Ising terms. The name derives from the fact that the quantum Hamiltonian is obtained from the Markov operator of a classical Ising chain undergoing Kawasaki magnetization-conserving dynamics. The NNN Ising coupling does not commute with $H_{\mathrm{fXXZ}}$, leading to integrability breaking in many sectors~\cite{yang2020_strict} while preserving the pattern conservation described above. Such systems should fall under the same universality class as the generic random circuits considered in this work and we expect them to exhibit $z=4$ subdiffusive hard core tracer dynamics. A version of the folded XXZ model in which integrability is broken by noise was recently studied in Ref.~\cite{deNardis2021_subdiff}, concluding $z=4$ as well. In addition, we investigated the dynamics of generic systems in which only a finite number of multipole moments of the spin pattern remains conserved. We found that the characteristics of tracer dynamics survive if at least the multipole moments up to and including the quadrupole moment are constant. Intriguingly, if only the moments up to the dipole are conserved there emerges a special scenario in which spin correlations are subject to a competition between two hydrodynamic processes with dynamic exponent $z=4$ but different scaling functions. The resulting shape of the long-time correlations are then susceptible to microscopic details of the time evolution and we find the situation to be reminiscent of the coexistence of different hydrodynamic phases at a first order transition. How such a scenario may qualitatively arise in systems other than the ones considered here is an interesting open question for future research.\\ \textbf{\textit{Acknowledgments.}}-- We thank Alvise Bastianello, Sarang Gopalakrishnan, Oliver Hart, Gabriel Longpr\'e, Frank Pollmann, Tibor Rakovszky, Pablo Sala, Stéphane Vinet and Philip Zechmann for insightful discussions. We acknowledge support from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy-EXC-2111-390814868, TRR80 and DFG grant No. KN1254/2-1, No. KN1254/1-2, the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 851161), as well as the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus. We thank the Nanosystems Initiative Munich (NIM) funded by the German Excellence Initiative and the Leibniz Supercomputing Centre for access to their computational resources. W.W.-K. was funded by a Discovery Grant from NSERC, a Canada Research Chair, and a grant from the Fondation Courtois. Matrix product state simulations were performed using the TeNPy package~\cite{hauschild2018_tenpy}. \textbf{\textit{Data and materials availability.}}-- Data analysis and simulation codes are available on Zenodo upon reasonable request~\cite{zenodo}.
\section{Introduction} \label{sec:intro} Flow based methods \citep{papamakarios2021normalizing} have proven to be effective techniques to model complex probability densities. They compete with the state of the art on density estimation \citep{huang2018neural,durkan2019neural,jaini2020tails}, generative modeling \citep{chen2019residual,kingma2018glow}, and variational inference \citep{kingma2016improved,agrawal2020advances} tasks. These methods start with a random variable $X$ having a simple and tractable distribution $\mu$, and apply a learnable transport map $f_\theta$ to build another random variable $Y = f_\theta(X)$ with a more expressive \emph{pushforward} probability measure $(f_\theta)_\ast \mu$ \citep{papamakarios2021normalizing}. In contrast to the implicit distributions \citep{huszar2017variational} produced by generative adversarial networks (GANs), flow based methods restrict the transport map $f_\theta$ to be invertible and to have efficiently-computable Jacobian determinants. As a result, probability density functions can be tractably computed through direct application of a change of variables \begin{align} \label{eq:change-of-variable} p_{Y}(y) = p_{X}(f_\theta^{-1}(y)) \left\lvert \det \left.\frac{d f_\theta^{-1}(z)}{dz} \right\vert_{z=y} \right\rvert \end{align} While recent developments \citep{chen2019residual,huang2018neural,durkan2019neural} have focused primarily on the transport map $f_\theta$, the base distribution $\mu$ has received comparatively less investigation. The most common choice for the base distribution is standard Gaussian $\mu = \mathcal{N}(0,\matr{I})$. However, in \Cref{thm:distn_class_closed}, we show this choice results in significant restrictions to the expressivity of the model, limiting its utility for data that exhibits fat-tailed (or heavy-tailed) structure. Prior work addressing heavy-tailed flows \citep{jaini2020tails} are limited to tail-isotropic base distributions --- in \Cref{prop:isotropic-pushforward}, we also prove flows built on these base distributions are unable to accurately model multivariate anisotropic fat-tailed structure. \begin{figure*}[htbp] \centering \includegraphics{Figures/pancake.pdf} \vspace{-5mm} \caption{ Variational inference against a tail-anisotropic target distribution $\mathcal{N}(0,1) \otimes \text{StudentT}(\nu=1)$ (top left). Only ATAF (bottom right) is able to correctly reproduce the tail-anisotropy (fat-tailed along $x$-axis, Gaussian along $y$-axis). In contrast, ADVI's (top right) Gaussian base distribution and TAF's (bottom left) tail-isotropic $\prod_{i=1}^2 \text{StudentT}(\nu)$ base distribution can only model tail-isotropic distributions (\Cref{prop:isotropic-pushforward}) which erroneously imposes power-law tails with the same rate of decay along both the $x$ and $y$ axes. \vspace{-5mm} } \label{fig:pancake} \end{figure*} Our work here aims to identify and address these deficiencies. To understand the impact of the base distribution $\mu$ in flow-based models, we develop and apply theory for fat-tailed random variables and their transformations under Lipschitz-continuous functions. Our approach leverages the theory of concentration functions \citep[Chapter 1.2]{ledoux2001concentration} to significantly sharpen and extend prior results \citep[Theorem 4]{jaini2019sum} by precisely describing the tail parameters of the pushforward distribution $(f_\theta)_\ast \mu$ under both Lipschitz-continuous (\Cref{thm:distn_class_closed}) and polynomial (\Cref{corr:closure_polynomials}) transport maps. In the multivariate setting, we develop a theory of direction-dependent tail parameters (\Cref{def:mv-tail-param}), and show that tail-isotropic base distributions yield tail-isotropic pushforward measures (\Cref{prop:isotropic-pushforward}). As a consequence of \Cref{prop:isotropic-pushforward}, prior methods \citep{jaini2020tails} are limited in that they are unable to capture \emph{tail-anisotropy}. This motivates the construction of \emph{anisotropic tail adaptive flows} (ATAF, \Cref{def:ataf}) as a means to alleviate this issue (\Cref{remark:anisotropic}) and improve modeling of tail-anisotropic distributions. Our experiments show ATAF exhibits correct tail behaviour in synthetic target distributions exhibiting fat-tails (\Cref{fig:cauchy_normal_student}) and tail-anisotropy (\Cref{fig:pancake}). On realistic targets, we find that ATAF can yield improvements in variational inference (VI) by capturing potential tail-anisotropy (\Cref{sec:experiments}). \vspace{-3mm} \subsection*{Related Work} \vspace{-1mm} \paragraph{Fat-tails in variational inference.} Recent work in variational autoencoders (VAEs) have considered relaxing Gaussian assumptions to heavier-tailed distributions \citep{mathieu2019disentangling,chen2019residual,boenninghoff2020variational,abiri2020variational}. In \citep{mathieu2019disentangling}, a StudentT prior distribution $p(z)$ is considered over the latent code $z$ in a VAE with Gaussian encoder $q(z \mid x)$. They argue that the anisotropy of a StudentT product distribution leads to more disentangled representations as compared to the standard choice of Normal distributions. A similar modification is performed in \citep{chen2020use}, for a coupled VAE (see \citep{cao2019coupled}). It showed improvements in the marginal likelihoods of reconstructed images. In addition, \citet{boenninghoff2020variational} consider a mixture of StudentTs for the prior $p(z)$. To position our work in context, note that the encoder $q(z \mid x)$ may be viewed as a variational approximation to the posterior $p(z \mid x)$ defined by the decoder model $p(x \mid z)$ and the prior $p(z)$. Our work differs from \citep{mathieu2019disentangling,chen2020use,boenninghoff2020variational} in that we consider fat-tailed variational approximations $q(z \mid x)$ rather than priors $p(z)$. Although \citep{abiri2020variational} also considers a StudentT approximate posterior, our work involves a more general variational family which use normalizing flows. Similarly, although \citep{wang2018variational} also deals with fat-tails in variational inference, their goal is to improve $\alpha$-divergence VI by controlling the moments of importance sampling ratios (which may be heavy-tailed). Our work here adopts Kullback-Leibler divergence and is concerned with enriching the variational family to include anisotropic fat-tailed distributions. More directly comparable recent work \citep{ding2011t,futami2017expectation} studies the $t$-exponential family variational approximation which includes StudentTs and other heavier-tailed densities. Critically, the selection of their parameter $t$ (directly related to the StudentT's degrees of freedom $\nu$), and the issue of tail anisotropy, are not discussed. \vspace{-1mm} \paragraph{Flow based methods.} Normalizing flows and other flow based methods have a rich history within variational inference \citep{kingma2016improved,rezende2015variational,agrawal2020advances,webb2019improving}. Consistent with our experience (\Cref{fig:blr-anisotropic}), \citep{webb2019improving} documents normalizing flows can offer improvements over ADVI and NUTS across thirteen different Bayesian linear regression models from \citep{gelman2006data}. \citet{agrawal2020advances} shows that normalizing flows compose nicely with other advances in black-box VI (e.g., stick the landing, importance weighting). However, none of these works treat the issue of fat-tailed targets and inappropriate tail decay. To our knowledge, only TAFs \citep{jaini2020tails} explicitly consider flows with tails heavier than Gaussians. Our work here can be viewed as a direct improvement of \citet{jaini2020tails}, and we make extensive comparison to this work throughout the body of this paper. At a high level, we provide a theory for fat-tails which is sensitive to the rate of tail decay and develop a framework to characterize and address the tail-isotropic limitations plaguing TAFs. \vspace{-2mm} \section{Flow-based methods for fat-tailed variational inference} \vspace{-2mm} \subsection{Flow-based VI methods} The objective of VI is to approximate a target distribution $\pi(x)$ by searching over a \emph{variational family} $\mathcal{Q} = \{q_\phi : \phi \in \Phi\}$ of probability distributions $q_\phi$. While alternatives exist \citep{li2016variational,wang2018variational}, VI typically seeks to find $q_\phi$ ``close'' to $\pi$ as measured by Kullback-Leibler divergence $D\infdivx{q_\phi}{\pi}$. To ensure tractability without sacrificing generality, in practice \citep{wingate2013automated,ranganath2014black} a Monte-Carlo approximation of the evidence lower bound (ELBO) is maximized: \begin{align*} \text{ELBO}(\phi) &= \int q_\phi(x) \log \frac{\bar\pi(x)}{q_\phi(x)} dx\\ & \approx \frac{1}{n} \sum_{i=1}^n \log \frac{\bar\pi(x_i)}{q_\phi(x_i)},\; x_i \overset{\text{iid}}{\sim} q_\phi,\; \bar{\pi} \propto \pi \end{align*} To summarize, this procedure enables tractable black-box VI by replacing $\pi$ with $\bar\pi \propto \pi$ and approximating expectations with respect to $q_\phi$ (which are tractable only in simple variational families) through Monte-Carlo approximation. In Bayesian inference and probabilistic programming applications, the target posterior $\pi(x) = p(x \mid y) = \frac{p(x, y)}{p(y)}$ is typically intractable but $\bar\pi(x) = p(x,y)$ is computable (i.e. represented by the probabilistic program's generative / forward execution). \begin{table*} \centering \begin{tabular}{ccc} \toprule Model & Autoregressive transform & Suff. conditions for Lipschitz \\ \midrule NICE\citep{dinh2014nice} & $z_j + \mu_j \cdot \mathds{1}_{k \not \in [j]}$ & $\mu_j$ Lipschitz \\ MAF\citep{papamakarios2017masked} & $\sigma_j z_j + (1 - \sigma_j) \mu_j$ & $\sigma_j$ bounded \\ IAF\citep{kingma2016improved} & $z_j \cdot \exp(\lambda_j) + \mu_j$ & $\lambda_j$ bounded, $\mu_j$ Lipschitz \\ Real-NVP\citep{dinh2016density} & $\exp(\lambda_j \cdot \mathds{1}_{k \not\in[j]}) \cdot z_j + \mu_j \cdot \mathds{1}_{k \not \in [j]}$ & $\lambda_j$ bounded, $\mu_j$ Lipschitz \\ Glow\citep{kingma2018glow} & $\sigma_j \cdot z_j + \mu_j \cdot \mathds{1}_{k \not\in [j]}$ & $\sigma_j$ bounded, $\mu_j$ Lipschitz \\ NAF\citep{huang2018neural} & $\sigma^{-1}(w^\top \cdot \sigma(\sigma_j z_j + \mu_j))$ & Always \par (logistic mixture CDF) \\ NSF\citep{durkan2019neural} & $z_j \mathds{1}_{z_j \not\in [-B,B]} + M_j(z_j;z_{<j}) \mathds{1}_{x_j \in [-B,B]}$ & Always \par (linear outside $[-B,B]$) \\ FFJORD\citep{grathwohl2018ffjord} & n/a (not autoregressive) & Always \par (required for invertibility) \\ ResFlow\citep{chen2019residual} & n/a (not autoregressive) & Always \par (required for invertibility) \\ \bottomrule \end{tabular} \caption{Some popular / recently developed flows, the autoregressive transform used in the flow (if applicable), and sufficient conditions conditions for Lipschitz-continuity. A subset of this table was first presented in \citep{jaini2020tails}. $M(\cdot)$ denotes monotonic rational quadratic splines \citep{durkan2019neural}. \vspace{-5mm} } \label{tab:flows} \end{table*} While it is possible to construct a variational family $\mathcal{Q}$ tailored to a specific task, we are interested in VI methods which are more broadly applicable and convenient to use: $\mathcal{Q}$ should be automatically constructed from introspection of a given probabilistic model/program. Automatic differentiation variational inference (ADVI) \citep{kucukelbir2017automatic} is an early implementation of automatic VI and it is still the default in certain probabilistic programming languages \citep{carpenter2017stan}. ADVI uses a Gaussian base distribution $\mu$ and a transport map $f_\theta = f \circ \Phi_\text{Affine}$ comprised of an invertible affine transform composed with a deterministic transformation $f$ from $\mathbb{R}$ to the target distribution's support (e.g., $\exp : \mathbb{R} \to \mathbb{R}_{\geq 0}$, $\text{sigmoid} : \mathbb{R} \to [0,1]$). As Gaussians are closed under affine transformations, ADVI's representational capacity is limited to deterministic transformations of Gaussians. Hence it cannot represent complex multi-modal distributions. To address this, more recent work \citep{kingma2016improved,webb2019improving} replaces the affine map $\Phi_\text{Affine}$ with a flow $\Phi_{\text{Flow}}$ typically parameterized by an invertible neural network: \begin{definition} \label[definition]{def:advi} ADVI (with normalizing flows) comprise the variational family $\mathcal{Q}_\text{ADVI}~\coloneqq~\{ (f~\circ~\Phi_\text{Flow})_\ast \mu \}$ where $\mu = \text{Normal}(0_d, I_d)$, $\Phi_\text{Flow}$ is an invertible flow transform (e.g., \Cref{tab:flows}) and $f$ is a deterministic bijection between constrained supports \citep{kucukelbir2017automatic}. \end{definition} As first noted in \citep{jaini2020tails}, the pushforward of a light-tailed Gaussian base distribution under a Lipschitz-continuous flow will remain light-tailed and provide poor approximation to fat-tailed targets. Despite this, many major probabilistic programming packages still make a default choice of Gaussian base distribution (\texttt{AutoNormalizingFlow}/\texttt{AutoIAFNormal} in Pyro \citep{bingham2019pyro}, \texttt{method=variational} in Stan \citep{carpenter2017stan}, \texttt{NormalizingFlowGroup} in PyMC \citep{patil2010pymc}). To address this issue, tail-adaptive flows \citep{jaini2020tails} use a base distribution $\mu_\nu = \prod_{i=1}^d \text{StudentT}(\nu)$ where a single degrees-of-freedom $\nu \in \mathbb{R}$ is used across all $d$ dimensions. More precisely, \begin{definition} \label[definition]{def:taf} Tail adaptive flows (TAF) comprise the variational family $\mathcal{Q}_\text{TAF} \coloneqq \{ (f \circ \Phi_\text{Flow})_\ast \mu_\nu \}$ where $\mu_\nu = \prod_{i=1}^d \text{StudentT}(\nu)$ with $\nu$ shared across all $d$ dimensions, $\Phi_{\text{Flow}}$ is an invertible flow, and $f$ is a bijection between constrained supports \citep{kucukelbir2017automatic}. During training, the shared degrees of freedom $\nu$ is treated as an additional variational parameter. \end{definition} \vspace{-2mm} \subsection{Fat-tailed variational inference} \vspace{-1mm} Fat-tailed variational inference (FTVI) considers the setting where the target $\pi(x)$ is fat-tailed. Such distributions commonly arise during a standard ``robustification'' approach where light-tailed noise distributions are replaced with fat-tailed ones \citep{tipping2005variational}. They also appear when weakly informative prior distributions are used in Bayesian hierarchical models \citep{gelman2006prior}. To formalize these notions of fat-tailed versus light-tailed distributions, a quantitative classification for tails is required. While prior work classified distribution tails according to quantiles and the existence of moment generating functions \citep[Section 3]{jaini2020tails}, here we propose a more natural and finer-grained classification based upon the theory of concentration functions \citep[Chapter 1.2]{ledoux2001concentration} which is sensitive to the rate of tail decay. \begin{definition}[Classification of tails] \label[definition]{def:tail-classification} For each $\alpha,p > 0$, we let \vspace{-1mm} \begin{itemize}[leftmargin=*] \item $\mathcal{E}_\alpha^p$ denote the set of \emph{exponential-type} random variables $X$ with $\mathbb{P}(|X| \geq x) = \Theta(e^{-\alpha x^p})$; \vspace{-1mm} \item $\mathcal{L}_\alpha^p$ denote the set of \emph{logarithmic-type} random variables $X$ with $\mathbb{P}(|X| \geq x) = \Theta(e^{-\alpha(\log x)^p})$. \end{itemize} \vspace{-1mm} In both cases, we call $p$ the \emph{class index} and $\alpha$ the \emph{tail parameter} for $X$. Note that every $\mathcal{E}_\alpha^p$ and $\mathcal{L}_\beta^q$ are disjoint, that is, $\mathcal{E}_\alpha^p \cap \mathcal{L}_\beta^q = \emptyset$ for all $\alpha,\beta,p,q > 0$. For brevity, we define the ascending families $\overline{\mathcal{E}_\alpha^p}$ and $\overline{\mathcal{L}_\alpha^p}$ analogously as before except with $\Theta(\cdot)$ replaced by $\mathcal{O}(\cdot)$. Similarly, we denote the class of distributions with exponential-type tails with class index at least $p$ by $\overline{\mathcal{E}^p} = \cup_{\alpha \in \mathbb{R}_+} \overline{\mathcal{E}_\alpha^p}$, and similarly for $\overline{\mathcal{L}^p}$. \end{definition} For example, $\overline{\mathcal{E}_\alpha^2}$ corresponds to $\alpha^{-1/2}$-sub-Gaussian random variables, $\overline{\mathcal{E}_\alpha^1}$ corresponds to sub-exponentials, and (of particular relevance to this paper) $\mathcal{L}^1_\alpha$ corresponds to the class of power-law distributions. \vspace{-2mm} \section{Tail behavior of Lipschitz flows} \vspace{-1mm} This section states our main theoretical contributions; proofs are deferred to \Cref{sec:proofs}. We sharpen previous impossibility results approximating fat-tailed targets using light-tailed base distributions \citep[Theorem 4]{jaini2020tails} by characterizing the effects of Lipschitz-continuous transport maps on not only the tail class but also the class index and tail parameter (\Cref{def:tail-classification}). Furthermore, we extend the theory to include polynomial flows \citep{jaini2019sum}. For the multivariate setting, we define the tail-parameter function (\Cref{def:mv-tail-param}) to help formalize the notion of tail-isotropic distributions and prove a fundamental limitation that tail-isotropic pushforwards remain tail-isotropic (\Cref{prop:isotropic-pushforward}). Most of our results are developed within the context of Lipschitz-continuous transport maps $f_\theta$. In practice, many flow-based methods exhibit Lipschitz-continuity in their transport map either by design \citep{grathwohl2018ffjord,chen2019residual}, or as a consequence of choice of architecture and activation function (\Cref{tab:flows}). The following assumption encapsulates this premise. \begin{assumption}\label[assumption]{assump:lipschitz} $f_\theta$ is invertible, and both $f_\theta$ and $f^{-1}_\theta$ are $L$-Lipschitz continuous (e.g., sufficient conditions in \Cref{tab:flows} are satisfied). \end{assumption} It is worth noting that domains other than $\mathbb{R}^d$ may require an additional bijection between supports (e.g. $\exp : \mathbb{R} \to \mathbb{R}_+$) which could violate \cref{assump:lipschitz}. \vspace{-2mm} \subsection{Closure of tail classes} \label{ssec:failure} \vspace{-1mm} Our first set of results pertain to closure of the tail classes in \Cref{def:tail-classification} under Lipschitz-continuous transport maps. While earlier work \citep{jaini2020tails} demonstrated closure of exponential-type distributions $\cup_{p > 0} \overline{\mathcal{E}^p}$ under flows satisfying \Cref{assump:lipschitz}, our results in Theorem \ref{thm:distn_class_closed}, and Corollaries \ref{corr:heavy_to_light} and \ref{corr:closure_polynomials} sharpen these observations, showing that (1) Lipschitz transport maps cannot decrease the class index $p$ for exponential-type random variables, but can alter the tail parameter $\alpha$; and (2) under additional assumptions, cannot change either class index $p$ or the tail parameter $\alpha$ for logarithmic-type random variables. \begin{theorem}[Lipschitz maps of tail classes] \label{thm:distn_class_closed} Under \Cref{assump:lipschitz}, the distribution classes $\overline{\mathcal{E}^p}$ and $\overline{\mathcal{L}^p_\alpha}$ (with $p,\alpha > 0$) are closed under every flow transformation in \Cref{tab:flows}. \end{theorem} Informally, \Cref{thm:distn_class_closed} asserts that light-tailed base distributions cannot be transformed via Lipschitz transport maps into fat-tailed target distributions. Note this does not violate universality theorems for certain flows \citep{huang2018neural} as these results only apply in the infinite-dimensional limit. Indeed, certain exponential-type families (such as Gaussian mixtures) are dense in the class of \emph{all} distributions, including those that are fat-tailed. Note that $\overline{\mathcal{L}^p_\alpha} \supset \mathcal{E}^q_\beta$ for all $p,q,\alpha,\beta$, so \Cref{thm:distn_class_closed} by itself does not preclude transformations of fat-tailed base distributions to light-tailed targets. Under additional assumptions on $f_\theta$, we further establish a partial converse that a fat-tailed base distribution's tail parameter is unaffected after pushfoward hence heavy-to-light transformations are impossible. Note here there is no ascending union over tail parameters (i.e., $\mathcal{L}^p_\alpha$ instead of $\overline{\mathcal{L}^p_\alpha}$). \begin{corollary}[Closure of $\mathcal{L}^p_\alpha$] \label[corollary]{corr:heavy_to_light} If in addition $f_\theta$ is smooth with no critical points on the interior or boundary of its domain, then $\mathcal{L}_\alpha^p$ is closed. \end{corollary} This implies that simply fixing a fat-tailed base distribution \emph{a priori} is insufficient; the tail-parameter(s) of the base distribution must be explicitly optimized alongside the other variational parameters during training. While these additional assumptions may seem restrictive, note that many flow transforms explicitly enforce smoothness and monotonicity \citep{wehenkel2019unconstrained,huang2018neural,durkan2019neural} and hence satisfy the premises. In fact, we can show a version of \Cref{thm:distn_class_closed} ensuring closure of exponential-type distributions under polynomial transport maps which do not satisfy \Cref{assump:lipschitz}. This is significant because it extends the closure results to include polynomial flows such as sum-of-squares flows \citep{jaini2019sum}. \begin{corollary}[Closure under polynomial maps] \label[corollary]{corr:closure_polynomials} For any $\alpha, \beta, p, q \in \mathbb{R}_+$, there does not exist a finite-degree polynomial map from $\mathcal{E}_\alpha^p$ into $\mathcal{L}_\beta^q$. \end{corollary} \vspace{-2mm} \subsection{Multivariate fat-tails and anisotropic tail adaptive flows} \vspace{-1mm} Next, we restrict attention to power-law tails $\mathcal{L}^1_\alpha$ and develop a multivariate fat-tailed theory and notions of isotropic/anisotropic tail indices. Using our theory, we prove that both ADVI and TAF are fundamentally limited because they are only capable of fitting tail-isotropic target measures (\Cref{prop:isotropic-pushforward}). We consider anisotropic tail adaptive flows (ATAF): a density modeling method which can represent tail-anisotropic distributions (\Cref{remark:anisotropic}). For example, consider the target distribution shown earlier in \Cref{fig:pancake} formed as the product of $\mathcal{N}(0,1)$ and $\text{StudentT}(\nu=1)$ distributions. The marginal/conditional distribution along a horizontal slice (e.g., the distribution of $\braket{X,e_0}$) is fat-tailed, while along a vertical slice (e.g., $\braket{X,e_1}$) it is Gaussian. Another extreme example of tail-anisotropy where the tail parameter for $\braket{X,v}$ is different in every direction $v \in \mathcal{S}^{1}$ is given in \Cref{fig:radial-fat-tail}. Here $\mathcal{S}^{d-1}$ denotes the $(d-1)$-sphere in $d$ dimensions. Noting that the tail parameter depends on the choice of direction, we are motivated to consider the following direction-dependent definition of multivariate tail parameters. \begin{definition} \label[definition]{def:mv-tail-param} For a $d$-dimensional random vector $X$, its \emph{tail parameter function} $\alpha_X : \mathcal{S}^{d-1} \to \bar{\mathbb{R}}_+$ is defined as $\alpha_X(v) = -\lim_{x \to \infty} \log \mathbb{P}(\braket{v,X} \geq x) / \log x$ when the limit exists, and $\alpha_X(v) = +\infty$ otherwise. In other words, $\alpha_X(v)$ maps directions $v$ into the tail parameter of the corresponding one-dimensional projection $\braket{v,X}$. The random vector $X$ is \emph{tail-isotropic} if $\alpha_X(v) \equiv c$ is constant and \emph{tail-anisotropic} if $\alpha_X(v)$ is not constant but bounded. \end{definition} \begin{figure*}[htbp] \centering \includegraphics{Figures/radial-fat-tail.pdf}% \vspace{-7mm} \caption{ Illustration of the direction-dependent tail-parameter function (bottom) on a tail-anisotropic distribution (top) with PDF $\mathrm{d} P(r,\theta) = r^{-\alpha(\theta)} r \mathrm{d} r \mathrm{d}\theta$ and tail parameter $\alpha(\theta) = 2 + \cos(2\theta)$. While prior fat-tailed theory based on $\|X\|_2 = \sup_{\|v\|_2 = 1} \braket{X,v}$ is only sensitive to the largest tail parameter $\max_{\theta \in [0, 2\pi]} \alpha(\theta) = 3.0$, our direction-dependent tail parameter function (bottom, red line) and its values along the standard basis axes ($\alpha(0)$ and $\alpha(\pi/2)$) capture \emph{tail-anisotropy}. \vspace{-5mm} } \label{fig:radial-fat-tail} \end{figure*} Of course, one can construct pathological densities where this definition is not effective (see \Cref{eg:spiral}), but it will suffice for our purposes. It is illustrative to contrast with the theory presented for TAF \citep{jaini2020tails} where only the tail exponent of $\|X\|_2$ is considered. For $X = (X_1, \ldots, X_d)$ with $X_i \in \mathcal{L}^1_{\alpha_i}$, by Fatou-Lebesgue and \Cref{lem:sum-rule} \begin{align*} &\mathbb{P}[\|X\|_2 \geq t] = \mathbb{P}\left[\sup_{z \in \mathcal{S}^{d-1}} \braket{X,z} \geq t\right]\\ &\quad \geq \sup_{z \in \mathcal{S}^{d-1}} \mathbb{P}[\braket{X,z} \geq t] = \max_{1 \leq i \leq d} \nu_i = \max_{0 \leq i \leq d-1} \alpha_X(e_i) \end{align*} Therefore, considering only the tail exponent of $\|X\|_2$ is equivalent to summarizing $\alpha_X(\cdot)$ by an upper bound. Given the absence of the tail parameters for other directions (i.e., $\alpha_X(v) \neq \sup_{\|v\|=1} \alpha_X(v)$) in the theory for TAF \citep{jaini2020tails}, it should be unsurprising that both their multivariate theory as well as their experiments only consider tail-isotropic distributions obtained either as an elliptically-contoured distribution with fat-tailed radial distribution or $\prod_{i=1}^d \text{StudentT}(\nu)$ (tail-isotropic by \Cref{lem:sum-rule}). Our next proposition shows that this presents a significant limitation when the target distribution is tail-anisotropic. \begin{proposition}[Pushforwards of tail-isotropic distributions] \label[proposition]{prop:isotropic-pushforward} Let $\mu$ be tail isotropic with non-integer parameter $\nu$ and suppose $f_\theta$ satisfies \Cref{assump:lipschitz}. Then $(f_\theta)_\ast \mu$ is tail isotropic with parameter $\nu$. \end{proposition} To work around this limitation without relaxing \Cref{assump:lipschitz}, it is evident that tail-anisotropic base distributions $\mu$ must be considered. Perhaps the most straightforward modification to incorporate a tail-anisotropic base distribution replaces TAF's isotropic base distribution $\prod_{i=1}^d \text{StudentT}(\nu)$ with $\prod_{i=1}^d \text{StudentT}(\nu_i)$. Note that $\nu$ is no longer shared across dimensions, enabling $d$ different tail parameters to be represented: \begin{definition}\label[definition]{def:ataf} Anisotropic Tail-Adaptive Flows (ATAF) comprise the variational family $\mathcal{Q}_\text{ATAF}~\coloneqq~\{ (f \circ \Phi_\text{Flow})_\ast \mu_\nu \},$ where $\mu_\nu = \prod_{i=1}^d \text{StudentT}(\nu_i)$, each $\nu_i$ is \emph{distinct}, and $f$ is a bijection between constrained supports \citep{kucukelbir2017automatic}. Analogous to \cite{jaini2020tails}, ATAF's implementation treats $\nu_i$ identically to the other parameters in the flow and jointly optimizes over them. \end{definition} \begin{remark}\label[remark]{remark:anisotropic} Anisotropic tail-adaptive flows can represent tail-anisotropic distributions with up to $d$ different tail parameters while simultaneously satisfying \Cref{assump:lipschitz}. For example, if $\Phi_\text{Flow} = \text{Identity}$ and $\mu_\nu = \prod_{i=1}^d \text{StudentT}(i)$ then the pushforward $(\Phi_\text{Flow})_\ast \mu_\nu = \mu_\nu$ is tail-anisotropic. \end{remark} Naturally, there are other parameterizations of the tail parameters $\nu_i$ that may be more effective depending on the application. For example, in high dimensions, one might prefer not to allow for $d$ unique indices, but perhaps only fewer. On the other hand, by using only $d$ tail parameters, an approximation error will necessarily be incurred when more than $d$ different tail parameters are present. \Cref{fig:radial-fat-tail} presents a worst-case scenario where the target distribution has a continuum of tail parameters. In theory, this density could itself be used as an underlying base distribution, although we have not found this to be a good option in practice. The key takeaway is that to capture several different tails in the target density, one must consider a base distribution that incorporates sufficiently many \emph{distinct} tail parameters. Concerning the choice of StudentT families, we remark that since $\text{StudentT}(\nu) \Rightarrow \mathcal{N}(0,1)$ as $\nu \to \infty$, ATAF should still provide reasonably good approximations to target distributions in $\overline{\mathcal{E}^2}$ by taking $\nu$ sufficiently large. This can be seen in practice in \Cref{sec:normal-normal-location-mixture}. \vspace{-2mm} \section{Experiments} \label{sec:experiments} \vspace{-1mm} Here we validate ATAF's ability to improve a range of probabilistic modeling tasks. Prior work \citep{jaini2020tails} demonstrated improved density modelling when fat tails are considered, and our experiments are complementary by evaluating TAFs and ATAFs for variational inference tasks as well as demonstrating the effect of tail-anisotropy for modelling real-world financial returns and insurance claims datasets. We implement using the \texttt{REDACTED FOR REVIEW} probabilistic programming language[REDACTED] and the \texttt{REDACTED FOR REVIEW} library for normalizing flows[REDACTED], and we have open-sourced code for reproducing experiments[REDACTED, reviewers please see supplementary materials for code]. Additional details for the experiments are detailed in \Cref{sec:additional-exp-details}. \begin{figure*}[htbp] \centering \vspace{-0.2cm} \includegraphics{Figures/blr_aniso.pdf} \vspace{-0.3cm} \caption{ Bayesian linear regression's tail-anisotropic posterior (top left) exhibits a fat-tailed conditional in $\sigma$ (as evidenced by the convex power-law decay in the top middle panel) and a Gaussian conditional in $\beta$ (concave graph in top right panel). While all methods appear to provide a good approximation of the bulk (left column), \Cref{prop:isotropic-pushforward} implies Gaussian (Gaussian, second row) or isotropic StudentT product (TAF, third row) base distribution yields Gaussian or power-law tails respectively for \emph{both} $\sigma$ and $\beta$. In contrast, ATAF (bottom row) illustrates \Cref{remark:anisotropic} by simultaneously modeling a power-law tail on $\sigma$ and Gaussian tail on $\beta$. } \label{fig:blr-anisotropic} \end{figure*} \begin{table*}[htbp] \centering \begin{subfigure}[t]{0.49\textwidth} \centering \begin{tabular}{rcc} \toprule & ELBO & $\log p(y)$ \\ \midrule ADVI & $\mathbf{2873.90} \pm 6.95$ & $2969.73 \pm 1.73$ \\ TAF & $2839.64 \pm 9.10$ & $2973.85 \pm 0.87$ \\ ATAF & $2842.75 \pm 8.83$ & $\mathbf{2976.75} \pm 0.66$ \\ \hline NUTS & n/a & $3724.59 \pm 0.036$ \\ \bottomrule \end{tabular} \caption{diamonds} \label{tab:diamonds} \end{subfigure} \begin{subfigure}[t]{0.49\textwidth} \centering \begin{tabular}{rcc} \toprule & ELBO & $\log p(y)$ \\ \midrule ADVI & $-72.13 \pm 6.89$ & $-53.25 \pm 3.44$ \\ TAF & $-64.64 \pm 4.88$ & $-52.51 \pm 4.41$ \\ ATAF & $\mathbf{-58.63} \pm 4.75$ & $\mathbf{-51.01} \pm 3.71$ \\ \hline NUTS & n/a & $-47.78 \pm 0.093$ \\ \bottomrule \end{tabular} \caption{Eight schools} \label{tab:eight_schools} \end{subfigure} \vspace{-2mm} \caption{Monte-Carlo ELBO and importance weighted Monte-Carlo marginal likelihood $p(y) = \mathbb{E}_{x \sim q_\theta} \frac{p(x,y)}{q_\theta(x)}$ (higher is better, $\pm$ standard errors) estimates from VI on real-world datasets. To understand the variational approximation gap, we include marginal likelihoods based on ``golden samples'' from \texttt{posteriordb} \citep{ghposteriordb} computed using No-U-Turn-Sampling (NUTS) \citep{hoffman2014no,carpenter2017stan}. } \label{fig:eight_schools} \vspace{-4mm} \end{table*} \begin{table*}[htbp] \centering \begin{tabular}{rcc} \toprule & Fama-French 5 Industry Daily & CMS 2008-2010 DE-SynPUF \\ \midrule ADVI & $-5.018 \pm 0.056$ & $-1.883 \pm 0.012$ \\ TAF & $-4.703 \pm 0.023$ & $-1.659 \pm 0.004$ \\ ATAF & $\mathbf{-4.699} \pm 0.024$ & $\mathbf{-1.603} \pm 0.034$ \\ \bottomrule \end{tabular} \vspace{-2mm} \caption{ Log-likelihoods (higher is better, $\pm$ standard errors) achieved on density modeling tasks involving financial returns \citep{fama2015five} and insurance claims \citep{cms} data. \vspace{-5mm} } \label{tab:density-estimation} \end{table*} \subsection{Bayesian linear regression} Consider one-dimensional Bayesian linear regression (BLR) with conjugate priors, defined by priors and likelihood \begin{gather*} \sigma^2 \sim \text{Inv-Gamma}(a_0, b_0)\\ \beta \mid \sigma^2 \sim \mathcal{N}(0, \sigma^2),\qquad y \mid X, \beta, \sigma \sim \mathcal{N}(X \beta, \sigma^2) \end{gather*} where $a_0$, $b_0$ are hyperparameters and the task is to approximate the posterior distribution $p(\beta,\sigma^2 \mid X, y)$. Owing to conjugacy, the posterior distribution can be explicitly computed. Indeed, $p(\beta,\sigma^2 \mid X, y) = \rho(\sigma^2)\rho(\beta \mid \sigma)$ where $\rho(\beta \mid \sigma) = \mathcal{N}(\Sigma_n(X^\top X \hat\beta), \sigma^2 \Sigma_n)$, $\Sigma_n = (X^\top X + \sigma^{-2})^{-1}$, $\hat\beta = (X^\top X)^{-1} X^\top y$, and \[ \rho(\sigma^2) = \text{Inv-Gamma}\bigg( a_0 + \frac{n}{2}, b_0 + \frac{1}{2}(y^\top y - \mu_n^\top \Sigma_n \mu_n)\bigg \] This calculation reveals that the posterior distribution is tail-anisotropic: for fixed $c$ we have that $p(\sigma^2, \beta=c \mid X, y) \propto \rho(\sigma^2) \in \mathcal{L}^1_{\alpha_n}$ as a function of $\sigma$ (with $\alpha_n$ a function of $n$) and $p(\sigma^2=c, \beta \mid X, y) \propto \rho(\beta \mid c) \in \overline{\mathcal{E}^2}$ as a function of $\beta$. As a result of \Cref{prop:isotropic-pushforward}, we expect ADVI and TAF to erroneously impose Gaussian and power-law tails respectively for both $\beta$ and $\sigma^2$ as neither method can produce a tail-anisotropic pushforward. This intuition is confirmed in \Cref{fig:blr-anisotropic}, where we see that only ATAF is the only method capable of modeling the tail-anisotropy present. Conducting Bayesian linear regression is among the standard tasks requested of a probabilistic programming language, yet still displays tail-anisotropy. To accurately capture large quantiles, this tail-anisotropy should not be ignored, necessitating a method such as ATAF. \subsection{Diamond price prediction using non-conjugate Bayesian regression} \label{ssec:diamonds} Without conjugacy, the BLR posterior is intractable and there is no reason \emph{a priori} to expect tail-anisotropy. Regardless, this presents a realistic and practical scenario for evaluating ATAF's ability to improve VI. For this experiment, we consider BLR on the \texttt{diamonds} dataset \citep{wickham2011ggplot2} included in \texttt{posteriordb} \citep{ghposteriordb}. This dataset contains a covariate matrix $X \in \mathbb{R}^{5000 \times 24}$ consisting of $5000$ diamonds each with $24$ features as well as an outcome variable $y \in \mathbb{R}^{5000}$ representing each diamond's price. The probabilistic model for this inference task is specified in Stan code provided by \citep{ghposteriordb} and is reproduced for convenience \begin{gather*} \alpha \sim \text{StudentT}(\nu=3, \text{loc}=8, \text{scale}=10)\\ \sigma \sim \text{HalfStudentT}(\nu=3, \text{loc}=0, \text{scale}=10)\\ \beta \sim \mathcal{N}(0, \matr{I}_{24}),\qquad y \sim \mathcal{N}(\alpha + X \beta, \sigma) \end{gather*} For each VI method, we performed 100 trials each consisting of 5000 descent steps on the Monte-Carlo ELBO estimated using 1000 samples and report the results in \Cref{tab:diamonds}. We report both the final Monte-Carlo ELBO as well as a Monte-Carlo importance-weighted approximation to the log marginal likelihood $\log p(y) = \log \mathbb{E}_{x \sim q_\theta} \frac{p(x,y)}{q_\theta(y)}$ both estimated using 1000 samples. \subsection{Eight schools SAT score modelling with fat-tailed scale mixtures} \label{ssec:eight_schools} The eight-schools model \citep{rubin1981estimation,gelman2013bayesian} is a classical Bayesian hierarchical model used originally to consider the relationship between standardized test scores and coaching programs in place at eight schools. A variation utilizing half Cauchy non-informative priors \citep{gelman2006prior} provides a real-world inference problem involving fat-tailed distributions, and is formally specified by the probabilistic model \begin{gather*} \tau \sim \text{HalfCauchy}(\text{loc}=0, \text{scale}=5)\\ \mu \sim \mathcal{N}(0, 5),\qquad \theta \sim \mathcal{N}(\mu, \tau),\qquad y \sim \mathcal{N}(\theta, \sigma) \end{gather*} Given test scores and standard errors $\{(y_i, \sigma_i)\}_{i=1}^8$, we are interested in the posterior distribution over treatment effects $\theta_1,\ldots,\theta_d$. The experimental parameters are identical to \Cref{ssec:diamonds} and results are reported in \Cref{tab:eight_schools}. \subsection{Financial and actuarial applications} To examine the advantage of tail-anisotropic modelling in practice, we considered two benchmark datasets from financial (daily log returns for five industry indices during 1926--2021, \cite{fama2015five}) and actuarial (per-patient inpatient and outpatient cumulative Medicare/Medicid (CMS) claims during 2008--2010, \cite{cms}) applications where practitioners actively seek to model fat-tails and account for black-swan events. Identical flow architectures and optimizers were used in both cases, with log-likelihoods presented in \Cref{tab:density-estimation}. Both datasets exhibited superior fits after allowing for heavier tails, with a further improved fit using ATAF for the CMS claims dataset. \section{Conclusion} \label{sec:conclusion} In this work, we have sharpened existing theory for approximating fat-tailed distributions with normalizing flows, and formalized tail-(an)isotropy through a direction-dependent tail parameter. With this, we have shown that many prior flow-based methods are inherently limited by tail-isotropy. With this in mind, we proposed a simple flow-based method capable of modeling tail-anisotropic targets. As we have seen, anisotropic FTVI is already applicable in fairly elementary examples such as Bayesian linear regression and ATAFs provide one of the first methods for using the representational capacity of flow-based methods while simultaneously producing tail-anisotropic distributions. A number of open problems still remain, including the study of other parameterizations of the tail behaviour of the base distribution. Even so, going forward, it seems prudent that density estimators, especially those used in black-box settings, consider accounting for tail-anisotropy using a method such as ATAF
\subsection{Data recording and reduction.} The observations of Ter5A were recorded with the GUPPI backend on Oct 14th 2014 and the VEGAS backend on Jun 21st 2020 in a 800-MHz band centered at 1500\,MHz (L-band, session 141014) or 2000\,MHz (S-band, session 200621) in coherent dedispersion mode with time resolution of 10.24\,$\mu$s. The signal was dedispersed in each of 512 1.56-MHz channels with the average DM of the cluster, $\mathrm{DM}=238.0$\,pc cm$^{-3}$. The raw data were folded modulo topocentric pulse spin period and integrated within every 20\,s with \texttt{dspsr} software. The folded archives contained four Stokes parameters, 512 frequency channels, and 512 spin phase bins (corresponding to $t_\mathrm{res}=22.6$\,$\mu$s). The initial ephemerides for folding were obtained using observations spanning 2010-2014 \cite{Bilous2019}. For the 2020 session, ephemerides were iteratively refined using pulse times of arrivals (TOAs) away from eclipses for seven sessions in 2019-2020. TOAs were determined using single-frequency profile templates constructed from the average uneclipsed profile in the sessions with brightest S/N. Pulsar spin period, period derivative and DM were updates using all seven observations, fitting for arbitrary phase offset between L- and S- TOAs. Subsequently, the epoch of the ascending node, DM and projected semimajor axis were updated on per-session basis using simple BT binary orbit. We performed full-Stokes calibration of the folded archives using standard techniques. Prior to each observation, a pulsed calibration signal was recorded which was used together with quasar B1442+101 as unpolarized flux calibrator to correct for the instrumental response of the receiver system. Polarization calibration for L-band was conducted using predetermined Mueller matrix solutions, which described the cross-coupling between orthogonal polarizations in the receivers (van Straten 2004). The Mueller matrix was determined using the PSRCHIVE task \texttt{pcm} based on observations of PSR B0450+55. For polarization calibration in S-band we assumed that the feed is ideal and consists of two orthogonally polarized receptors. Such technique was previously used for S-band observations of another MSP \cite{Bilous2015} and it proved to be adequate when comparing to more rigorous polarization calibration with predetermined Mueller matrix solutions. DM was measured with tempo2 using single-frequency template on a variety of timescales ranging from 10\,s to 4\,min if a subintergation had sufficient S/N of pulsed emission in each of 4 subbands. RM was measured with rmfit on 20-s subintegrations with 256 subbands. \subsection{RM variation and linear depolarization} In the quiescent phase, Ter5A's radio emission has a considerable level of fractional linear polarization (see Figure~\ref{fig:observed_conversion} ``normal'' pulse profile), which allows measuring RM via Faraday rotation. In an observation carried on 2014 with 800 MHz bandwidth centered at 1.5 GHz, irregular fast RM changes are observed (Figure~\ref{fig:obs_overview}). Various single-integration (20~s) RM outliers are seen in different orbital phases. And at orbital phase 1.9, i.e. $\sim 120^\circ$ away from the inferior conjunction, the RM suddenly increases by $\sim 100$ {{rad\,m$^{-2}$}} in less than 20~s and lasts for $\sim6$\% of the orbit. No significant dispersion measure (DM) variation $>0.01$\,{pc\,cm$^{-3}$}\ is detected during the RM variation, giving a lower limit of magnetic field of $\langle B\rangle= 12~\mathrm{mG}\, (\Delta\mathrm{RM}/100~\mathrm{rad}\,\mathrm{m}^{-2})/(\Delta\mathrm{DM}/0.01~\mathrm{pc}\,\mathrm{cm}^{-3})>12~\mathrm{mG}$ at orbital phase 1.9 where the pulsar is not behind the companion. The large change in RM happening in less than $\Delta t\sim20$\,s suggests either turbulent activities at extremely short timescale, or, more likely, a small-scale structure in electron column density or magnetic field, with spatial scale $\Delta L \lesssim v\Delta t=0.01R_\odot$, where $v\approx800$\,km\,s$^{-1}$ is the orbital velocity assuming the neutron star mass of $1.4M_\odot$. Multiple regions of excess DM are observed at various orbital phases, around which the linear polarization disappears. This is expected from the underlying fast RM variation. To obtain enough S/N, each data point is the sum of 20~s of pulses. If the pulses have passed through an RM gradient of $\Delta \mathrm{RM}$ in the 20s, the linear polarization will drop to $L_\mathrm{obs}/L_\mathrm{emi}=\sin(\Delta RM \lambda^2)/(\Delta RM \lambda^2)$ of the original level. At 1.5~GHz, an RM gradient of $\sim100$~{{rad\,m$^{-2}$}} in the integrated pulses will reduce the linear polarization to 20\% of the original level. Therefore, RM changes greater than 100~{{rad\,m$^{-2}$}} in one sub-integration time will leads to depolarization of the observed linear polarization. This has nicely explained why RM variation of $\sim 100-200$~{{rad\,m$^{-2}$}} is most commonly seen in this system, while larger value is expected from the DM variation and the frequency resolution should enable RM measurement all the way to $10^4$~{{rad\,m$^{-2}$}}. The linear polarization will drop faster if there is random RM variation in the integrated pulses. With a standard deviation of $\sigma_\mathrm{RM}$, the linear fraction will drop as $L_\mathrm{obs}/L_\mathrm{emi}=\exp{(-2\sigma_\mathrm{RM}^2\lambda^4)}$\cite{1966Burn}. Therefore, the linear polarization will disappear if $\sigma_\mathrm{RM}\gtrsim 25~${{rad\,m$^{-2}$}}. Near orbital phase 0.9, the $\Delta$ DM rapidly increases to $\sim0.3\,\mathrm{pc}\,\mathrm{cm}^{-3}$, suggesting a quick change of $\Delta\mathrm{RM}>3000\,\mathrm{rad/cm}^2$ given the lower limit of $\langle B\rangle$ at phase 1.9, which will certainly lead to the observed depolarization of linear polarization. In this case, if single FRB-like pulses can be detected from this system, orders larger RM variations, at least 3000~{rad\,m$^{-2}$}, will likely be seen. Apart from summation of pulses of different RMs, summation of scattered light passing through paths of different RMs will also lead to depolarization. This has been used to explain the decrease of polarization fraction in lower frequency for several FRBs\cite{2022Feng,2022Yang}. Estimated from the scintillation time of Ter5A\cite{Bilous2019}, the separation of scattered light at the distance of the companion due to the interstellar medium scattering should be of the order of 10~m, which will unlikely cause depolarization. However, strong plasma lensed pulses have been observed in this system\cite{Bilous2019}, suggesting small scale DM variation in the companion wind, which can also cause scattering. The separation of the scattered light $\Delta x_\mathrm{sct}$ can be estimated from the scattering time $\tau$ with $\Delta x_\mathrm{sct}=\sqrt{2ac\tau}=0.01R_\odot\sqrt{\tau/0.1~\mathrm{ms}}$. Therefore, if some pulses have scattering time longer than 0.1~ms, the separation of the scattered light will be similar to the distance the pulsar have moved in the 20~s integration time, and hence some single pulses may also experience depolarization, similar to FRBs. \subsection{Faraday conversion in cold plasma} In the S-band observation, when the pulsar is behind the companion, the DM increases by 0.2\,{pc\,cm$^{-3}$} and the circular polarization appears to have a sign reversal at 2~GHz. The changes in the circular polarization indicates that the radio flux has gone through a Faraday conversion caused by the plasma and magnetic field of the companion. In the cold plasma, assume wave propagates along $z$ direction, the polarization vector $\vec{\mr{P}}=(Q,U,V)$ change follows: \begin{equation} \frac{d\vec{\mr{P}}}{dz}=\vec{\Omega}\times\vec{\mr{P}} \label{eq:dpdz} \end{equation} where $\vec{\Omega}=(\rho_Q,\rho_U,\rho_V)$. $\rho_V$ is the Faraday rotation rate: \begin{equation} \rho_V=-\frac{2\pi}{c}\frac{f_p^2f_B}{f^2}\hat{B}_z \label{eq:rhvc} \end{equation} and $\rho_Q,\rho_U$ is the Faraday conversion rate: \begin{align} \rho_L=\rho_Q+i\rho_U=-\frac{\pi}{c}\frac{f_p^2f_B^2}{f^3} (\hat{B}_x+i\hat{B}_y)^2 \label{eq:rhoL} \end{align} where $\hat{B}\equiv\vec{B}/B$; $f_p=\sqrt{n_e e^2/\pi m_e}=9.0\,\mathrm{kHz}(n_e/\mathrm{cm}^{-3})^{1/2}$ is the plasma frequency, $f_B$ is the cyclotron frequency $f_B=eB/2\pi m_e c=2.8\,\mathrm{MHz}(B/\mathrm{G})$. This procedure can be visualized as a rotation of polarization vector around the natural axis in the direction of $\vec{\Omega}$ in the Poincare sphere. Define \begin{equation} \tilde{z} \equiv 2 \frac{f}{f_B} \hat{B}_z = 2 \frac{f}{f_B} \sin\alpha \label{eq:tz} \end{equation} where $\alpha$ is the pitch angle between the wave vector and the magnetic field. When $\tilde{z} \gg1$, i.e. $\rho_V\gg \rho_L$, the natural axis $\vec{n}=\vec{\Omega}/|\vec{\Omega}|$ is pointing towards the $V$ direction, resulting in only $Q$, $U$ rotation -- an effect known as Faraday rotation. Faraday conversion happens when the conversion rate is similar or higher than Faraday rotation rate, i.e. $\tilde{z} \lesssim 1$. In this case, the natural axis $\Omega$ is pointing close to the linear axis, and the wave modes become quasi-linear, resulting in circular/linear conversion. As can be seen from Equation~\ref{eq:rhvc},\ref{eq:rhoL}, the Faraday rotation rate is proportional to $f^{-2}$, while the Faraday conversion rate is proportional to $f^{-3}$ for cold plasma. In order for the Faraday conversion to happen, i.e. $\tilde{z}\lesssim 1$, $f_B\gtrsim 2f\sin\alpha$ (Equation~\ref{eq:tz}), \begin{equation} B\gtrsim 1400 G \left(\frac{f}{2 \mathrm{GHz}}\right) \cos\alpha \label{eq:Bjudge} \end{equation} For a random pitch angle of $\alpha$, an extremely large magnetic field is required for the Faraday conversion to happen. The phase difference between two linear eigenmodes $\theta_f$ (Faraday conversion angle) is: \begin{align} \theta_f&=\int \rho_L dz \approx \frac{\pi}{c}\langle\frac{f_p^2f_B^2}{2 f^3}\rangle L \\ &\sim 10^6 \langle\left(\frac{\Delta\mathrm{DM}}{0.1\mathrm{pc}\, \mathrm{cm}^{-3}}\right) \left(\frac{B}{1000\,G}\right) \rangle \left(\frac{f}{2\,\mathrm{GHz}}\right)^{-3} \end{align} Given the observed DM excess of $\sim$ 0.1\,{pc\,cm$^{-3}$}, the conversion angle is $\gg1$~rad. Therefore, if $f_B\sim f$, the circular polarization will oscillate fast against frequency, resulting in depolarized circular polarization with our frequency resolution. Moreover, it will be fine-tuning to require it to persist stable $180\degree$ conversion angle across $40\degree$ of the orbital phase. Therefore, this scenario is inconsistent with the observation (Figure~\ref{fig:observed_conversion}). To avoid the fast change of conversion angle, we require $f\gg f_B$. In this case, the Faraday conversion will happen when the magnetic field is almost perpendicular to the LOS, i.e. $\hat{B}_z=\cos\alpha \ll1$ in Equation~\ref{eq:Bjudge}. This would happen when there is magnetic reversal. Consider a field reversal happening at $z=0$, we can Taylor expand $\rho_V=\rho_V^\prime z$. Choose the $x$-axis to be the direction of perpendicular magnetic field at the reversal, the angular frequency of the rotation can be simplified as $\Omega=(\rho_L, 0, \rho_V^\prime z)$. Define \begin{align} \xi &\equiv\frac{\rho_L^2}{ \rho_V^\prime}\approx\frac{\pi L}{2c} \frac{f_p^2 f_B^3}{f^4} \label{eq:xi} \end{align} where $L$ is the spatial scale where the magnetic field changes direction (i.e. $|\Delta B_z|\sim |B|$). $\hat{B}_x$ is omitted in the expression because $\hat{B}_x\sim 1$ near field reversal. Near field reversal $\rho_L^\prime/\rho_L \ll \rho_V^\prime/\rho_V$, so Equation~\ref{eq:dpdz} can be simplified as \begin{equation} \frac{d\vec{\mr{P}}}{\xi d\tilde{z}}=(1,0,\tilde{z})\times\vec{\mr{P}} \end{equation} Assume $\rho_Q$, $\rho_V^\prime$ can be considered as constants near the field reversal for $-\tilde{z}_0<\tilde{z}<\tilde{z}_0$, where $\tilde{z}_0\gg 1$. Then the conversion angle $\theta_f(\xi)$ depends only on $\xi$ \cite{Gruzinov2019}. \begin{equation} \theta_f(\xi)=\arccos (2\exp(-\pi\xi/2)-1) \end{equation} With $\xi\ll 1$, $\theta_f\sim \sqrt{2\pi\xi}$, while when $\xi\gg 1$, the circular polarization would flip sign. As shown in Figure~\ref{fig:observed_conversion}, the sign of circular polarization of the pulsar flux has reversed near the orbital phase 0.25, suggesting $\xi\gg 1$ near the superior conjunction where pulsar is behind the companion. The sign reversal can persist for more than 10\% of the orbital phase, corresponding to a spatial scale of $L\sim 0.6 R_\odot$ at the distance of the companion. This spatial scale is of the same order as the size of the companion, therefore, we attribute the sign reversal to the large scale structure of the companion. For a companion with a poloidal field, e.g. a dipole field, any LOS passing through the magnetosphere will experience a field reversal (Figure~\ref{fig:demo}), usually near the magnetic pole. We can estimate the required field strength from Equation~\ref{eq:xi}. The dispersion measure (DM) changes by $\sim0.1\mathrm{pc}\,\mathrm{cm}^{-3}$ during the conversion, giving a mean density of $n_e\approx N_e/a=5\times 10^6$\,cm$^{-3}$; where $a=0.85 R_\odot$ is the orbital separation. It corresponds to plasma frequency $f_p=0.02$\,GHz. We use the spatial scale $L$, where the conversion persists, as an approximate for the scale where magnetic field changes direction. Therefore we require the average $B\gtrsim 10$\,G in the companion's magnetosphere. The nature of the 0.089 $M_\odot$ companion is unknown, however, whether it is an M dwarf or white dwarf, it is common to have a large surface magnetic field\cite{19Shulyak_mdb}. Moreover, a magnetic field of the order of 10\,G at the contact discontinuity is expected from the pressure equilibrium with the pulsar wind. The companion has been seen to eclipse the pulsar for a whole orbit, requiring a large pressure in the companion wind to withhold the pulsar wind. The pressure in the pulsar wind at the distance of the companion can be estimated from the spin down energy $P_\mathrm{pw}=\pi I \dot{P}/P^3 a^2 c$, where I$\sim10^{45}$\,g\,cm$^2$ is the pulsar's moment of inertia, $\dot{P}$ is the period derivative, and $c$ is the speed of light. The observed period derivative of Ter5A is $\dot{P}= -1.5 \times 10^{-20}$\,s/s which is dominated by the acceleration in the globular cluster. Given the location of the pulsar in the Terzan 5 cluster, the maximum contribution of the $\dot{P}$ from the cluster dynamic is $\approx2\times 10^{-19}$~s\,s$^{-1}$, and both the mean and median value estimated from all the reasonable cluster models are greater than half of this value \cite{Phinney1992}. Taking the cluster contribution to be $\dot{P}\sim 10^{-19}$\,s\,s$^{-1}$, the pressure of the pulsar wind at the distance companion is $P_\mathrm{pw}\sim 2$\,erg\,cm$^{-3}$. To balance the pulsar wind with magnetic pressure $P_\mathrm{pw}=B_\mathrm{cp}^2/8\pi$, a field strength of $B_\mathrm{cp}\sim7$\,G in the contact discontinuity would be expected. Therefore, it is reasonable to expect the magnetic field in companion magnetosphere to be greater than this value, and hence satisfy the condition for the Faraday conversion scenario detailed above. \subsection{Modeling the IV spectrum} As shown in Figure~\ref{fig:observed_conversion}, the change of circular polarization at the top of the band ($\sim2.3$\,GHz) roughly resembles the normal $V$ profile with an opposite sign. However, in the lower half of the band ($\lesssim 2$\,GHz), in additional to the flip of the sign, the V profile is shifted systematically towards the positive value. Selecting orbital phases far from the superior conjunction, where stable RM has been measured, we can measure the normal linear polarization $L$ of the pulsar, and hence can calculate the total polarization $P=\sqrt{L^2+V^2}$ (shown in orange line in left panel d at Figure~\ref{fig:observed_conversion}). Around the spin phase 0.35, the circular polarization fraction near superior conjunction exceeds the total polarization fraction in the normal profile, and this trend becomes more obvious as the frequency decreases. At 1.7~GHz, the total polarization fraction $P/I$ at spin phase 0.35 is only 15\% in the normal profile; however, near the superior conjunction $V/I$ is around 50\% at the same spin phase, suggesting $P\ge50$\%, i.e. the total polarization fraction has changed. As shown in Equation~\ref{eq:dpdz}, the total polarization fraction $P$ is a conserved quantity in both Faraday rotation and Faraday conversion. The change of total polarization fraction against frequency, accompanied by the decrease of flux, is best explained by circularly polarized attenuation. Therefore, the radiative transfer equation (Equation~\ref{eq:dpdz}) becomes \begin{gather} \frac{d\vec{\mr{S}}}{ds}= - R \vec{\mr{S}} \\ R= \begin{pmatrix} \eta & 0 & 0 & \eta_V \\ 0 & \eta & \rho_V & 0 \\ 0 & -\rho_V & \eta & \rho_Q \\ \eta_V & 0 & -\rho_Q & \eta \end{pmatrix} \nonumber \label{eq:transfer} \end{gather} where $\vec{\mr{S}}=(I,Q,U,V)$; $\eta$, $\eta_V$ are the isotropic, and circular absorption. The circular absorption happening during the adiabatic field reversal are largely cancelled. For the circular absorption happening before/after the conversion, the integrated form will be: \begin{gather} \begin{pmatrix} I^\prime\\V^\prime \end{pmatrix}=e^{-\tau} \begin{pmatrix} \cosh{\tau_v} & -\sinh{\tau_v} \\ -\sinh{\tau_v} & \cosh{\tau_v} \end{pmatrix} \begin{pmatrix} I \\ c\,V \end{pmatrix} \label{eq:fit} \end{gather} where $\tau=\eta L$, $\tau_v=\eta_v L$ are the optical depth, $c=\cos\theta_f$ is the conversion angle. The optical depth should be frequency dependent, there we parameterize them as $\tau=A (f/f_0)^{-\alpha}$, $\tau_v=A_v (f/f_0)^{-\alpha_v}$, where $f_0=2$\,GHz. Near the superior structure, the mode tracking is visually complete at the top of the band, therefore we fix $c=-1$ for all of the frequencies. Using the $I$, $V$ at the normal phase as template $I$, $V$, we fit for the $I^\prime, V^\prime$ near the superior structure by varying $A, \alpha, A_v, \alpha_v$. The best fit parameters are $A=1.08\pm0.01, \alpha=-3.5\pm0.1, A_v=-0.21\pm 0.01, \alpha_v=-3.7\pm0.4$, where the errorbars are 1 $\sigma$ error. The fitted curves are shown in Figure~\ref{fig:observed_conversion} panel d right column as solid lines. \subsection{Synchrotron-cyclotron absorption} Given the large magnetic field required for the Faraday conversion, the synchrotron-cyclotron absorption is able to account for the circularly polarized absorption and varying absorption index at different orbital phase. In the classic synchrotron limit, assume the relativistic electron following an isotropic powerlaw distribution $n_r(\gamma)\propto\gamma^{-p}$ for $\gamma_\mathrm{min}<\frac{3}{2} f_B \sin \alpha <\gamma_\mathrm{max}$, the isotropic and circular absorption index $\eta,\eta_v$ can be estimated with \cite{1969Sazonov}: \begin{align} \eta=&\frac{0.08}{R_\odot^{-1}} \frac{n_r}{[\mathrm{cm}^{-3}]}\frac{(p-1)}{\gamma_\mathrm{min}^{1-p}}\nonumber \\ &\Gamma(\frac{3p+2}{12})\Gamma(\frac{3p+22}{12}) \Big(\frac{3f_B\sin\alpha}{f}\Big)^{p/2+1} \frac{[\mathrm{GHz}]}{f} \nonumber \\ \eta_V=&\frac{0.03}{R_\odot^{-1}} \frac{n_r}{[\mathrm{cm}^{-3}]}\frac{(p-1)}{\gamma_\mathrm{min}^{1-p}} \\ &\frac{p+3}{p+1}\Gamma(\frac{3p+7}{12})\Gamma(\frac{3p+11}{12}) \Big(\frac{3f_B\sin\alpha}{f}\Big)^{p/2+3/2} \frac{[\mathrm{GHz}]}{f} \nonumber \end{align} Therefore $\tau_v=\eta_V L\propto f^{-p/2-5/2}$ has steeper spectrum compared to the isotropic optical depth $\tau=\eta L\propto f^{-p/2-2}$. The ratio $\eta_v/\eta \approx 0.6 \sqrt{f_B\sin\alpha/f}$. In the methods, we have fitted $\tau=A (f/f_0)^{-\alpha}$, $\tau_v=A_v (f/f_0)^{-\alpha_v}$ for the pulsar flux. Near the superior conjunction, the fitted $\alpha,\alpha_v$ are consistent with $p=3\pm0.2$. The ratio $\tau_v/\tau=A_v/A\approx0.2$ at 2\,GHz requires $B\sin\alpha\sim100$\,G. Assume $\gamma_\mathrm{min}=2$ and $L=0.6R_\odot$, the required relativistic electron density for the eclipse is $n_r=20$\,cm$^{-3}$ near superior conjunction. The required magnetic field $B\sim100$\,G is consistent with the required $10 \mathrm{G}\lesssim B<700$ G from the observed Faraday conversion. The relativistic electrons also inevitably introduce linear absorption $\eta_L$ and Faraday conversion $\rho_L^r$, however, given $n_r\ll n_e$ and $f_B<f$, these two terms will be much smaller than the Faraday rotation and conversion introduced by cold plasma (Equation~\ref{eq:rhvc},\ref{eq:rhoL}) and hence their effect will not be visible. \subsection{Constraining the orbital inclination angle} The stable conversion indicates that the LOS is passing through the magnetosphere of the companion, where a dipole field is expected. A wide-band observation would provide constraints on the excess DM at different orbital phase. In this way we could model the magnetic strength variation against orbital phase, and by comparing with the dipole magnetic field, we would be able to constrain the orbital inclination angle. For a dipole field, \begin{equation} |B|=|M|\frac{(1+3\cos^2\theta)^{1/2}}{r^3} \end{equation} Here $|M|=B_0r_0^3$ is the dipole moment, and $B_0$ is the surface field at the equator, $r_0$ is the radius of the companion. Despite the weak dependence (less than a factor of two) on polar angle $\theta$, the change of $|B|$ mainly depends on $r^{-3}$. For a binary orbit at an inclination angle $i$ (where $i=90\degree$ is edge on), and an orbital phase $\Psi=2\pi(\Phi-0.25)$ (when $\Psi=0$ the pulsar is behind the companion), the LOS has the shortest radial distance to companion $r_\mathrm{min}=d \sqrt{1-\sin^2 i \cos^2 \Phi}$ (happening at a distance $R$ from the pulsar $R=d\sin i \cos \Phi$), where d is orbital separation. When the orbit is close to edge on $i\sim 90\degree$, $r_\mathrm{min}\sim d \sin \phi $, the field strength changes fast against orbital phase $B\propto r^{-3}\propto \sin^{-3} \Phi$, while for a face-on orbit $i\sim0\degree$, the field strength is independent of the orbital phase. Therefore, the relative field strength against orbital phase mainly depends on the inclination angle with mild dependence on the polar angle. Extended Data Figure~\ref{fig:Boverphi} shows the relative field strength against orbital phase at different inclination angle when the magnetic pole aligned with the orbital axis. Comparing $i=85\degree$ to $i=75\degree$, the relative strength of $B_{0.35}/B_{0.25}$ reduced by an order. Therefore, measuring the field strength against orbital phase will provide a great constraint on the inclination angle. We defer the detailed modeling to a future paper. \subsection{Observation prediction} In the scenario of Faraday conversion in the slow field reversal, for the majority of the paths, the wave is going through Faraday rotation. We can estimate the RM given the estimated magnetic field: \begin{equation} \frac{<\Delta\mathrm{RM}>}{[\mathrm{rad}~m^{-2}]}\sim \frac{<\Delta\mathrm{DM}>}{[\mathrm{pc/cm}^{-3}]}\frac{B}{[\mu G]} \end{equation} Given the $\Delta \mathrm{DM}$ of around 0.2\,pc/cm$^3$, the $\Delta \mathrm{RM}$ would be $10^6$~{{rad\,m$^{-2}$}} for 10-G magnetic field. The large RM would lead to a delay $\tau_F$ between the two circular polarization, which may show up in the stokes V profile: \begin{equation} <\tau_F>=\frac{4<f_{B_\parallel}>}{f}<\tau_p> \end{equation} where $\tau_p$ is the dispersive delay, which is $\sim0.2$\,ms. The $\tau_F$ would be $\sim10\,\mu$s for 10-G field. For B strength of $10-100$\,G, this may lead to a suppression of stokes in the phase profile where V switches sign and have order 1 modulation in the timescale of $\sim 100\,\mu$s. Observations of single pulses near superior conjunction will be the smoking gun to verify the magnetic strength. Plasma lensing events have been seen in Ter5A \cite{Bilous2019}, where single pulses can occasionally be magnified significantly. We will be able to measure the RM value of the single pulses given enough frequency resolution. Moreover, the presence of a large magnetic field will result in the left and right circular polarization of the pulse being magnified at different frequency\cite{Li2019}. The lensing profile will be offset by a cyclotron frequency $f_c=2.8\,\mathrm{MHz}(B/\mathrm{G})$, which is $\sim30$\,MHz for $B=10$\,G and $\sim0.3$\,GHz for $B=100$\,G, and hence should be measurable. Last but not least, the observation suggests that the parameter quantifying Faraday conversion $\xi\gg1$ at 2\,GHz (Equation~\ref{eq:xi}) and hence $|B|\gtrsim 10$\,G near the superior conjunction. It also suggests $f_B\ll f$ for most of the path, and hence $|B|\ll700$\,G. Since $\xi\propto f^{-4}$ has strong dependence on frequency, the transition from full conversion to negligible conversion will happen quickly. Given $B\ll700$\,G, and the conversion would stops happening with $\xi\ll1$, the transition from full conversion to negligible conversion must happen between 2\,GHz to 20\,GHz (referred to as transition frequency $f_T$). $\xi\propto f_B^3\propto B^3$ is very sensitive to the magnetic field strength. At different orbital phase, the LOS is passing through different part of the magnetosphere, therefore, we expect the transition frequency $f_T$ to decrease as the pulsar moves away from the superior conjunction. We have observed $f_T=2$~GHz at around orbital phase 0.35, where $V$ starts to change sign. At higher frequency we will be able to observe $f_T$ closer to $\Phi=0.25$. Therefore, at higher frequency, there will be a narrower window in the orbital phase where $V$ changes sign. To demonstrate the model and the prediction, we configured a toy model with a magnetized companion with a dipole moment of $2\times 10^{32}$ $\mathrm{G}\, \mathrm{cm}^3$ (300~G surface field at the equator, 0.12~$R_\odot$ companion radius). With orbital inclination angle $i=75^\circ$, and an electron density estimated with $n_e\approx\Delta\mathrm{DM}/a\approx5\times 10^{6}\mathrm{cm}^{-3}$, where $a$ is the orbital separation, we can reproduce the Faraday conversion behavior of the pulsar against orbital phase for 2.3~GHz and show the behavior of $V$ at higher frequency (Extended Data Fig~\ref{fig:Voverf}). \end{methods} \clearpage \subsubsection*{Data availability} Data are available at request. \subsubsection*{Code availability} \noindent \textsc{DSPSR} (\url{http://dspsr.sourceforge.net}) \noindent \textsc{PSRCHIVE} (\url{http://psrchive.sourceforge.net}) \begin{addendum} \item AVB is supported by the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013)/ERC Grant Agreement No. 617199 (`ALERT') and by Vici research programme `ARGO' with project number 639.043.815, financed by the Dutch Research Council (NWO). YPY is supported by NSFC grant No. 12003028 and the China Manned Spaced Project (CMS-CSST-2021-B11). SMR is a CIFAR Fellow and is supported by the NSF Physics Frontiers Center awards 1430284 and 2020265. The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc. The Green Bank Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities, Inc. \item[Author Contributions] DZL modelled and interpreted the data, and prepared the majority of the manuscript. AVB performed data pre-processing, calibration and intermediate measurements. SMR led the data acquisition and discovered the variability of circularly polarized emission. RM and YPY helped to revise the draft and provided valuable comments. \item[Competing Interests] The authors declare no competing financial interests. \item[Correspondence] Requests for materials should be addressed to D.~Z.~Li (E-mail:<EMAIL>)\\ \end{addendum}
\section{Gaussian formalism for the model with a harmonic detector}\label{sec:gaussian} We denote the vector of bosonic mode operators by \begin{equation}\begin{aligned} \hat{\vec{\Psi}}=(\hat{a}_0,\hat{a}_1,\hat{a}_2,\cdots,\hat{a}_N,\hat{a}^\dagger_0,\hat{a}^\dagger_1,\hat{a}^\dagger_2,\cdots,\hat{a}^\dagger_N)^T, \end{aligned}\end{equation} that satisfies the commutation relation \begin{equation}\begin{aligned} [\hat{\Psi}_i,\hat{\Psi}_j]=\mathbf{\Omega}_{ij}, \end{aligned}\end{equation} where \begin{equation}\begin{aligned} \mathbf{\Omega} = \begin{bmatrix} \mathbf{0} & \mathbb{1}\\ -\mathbb{1} & \mathbf{0} \end{bmatrix} = -\mathbf{\Omega}^T \end{aligned}\end{equation} is the symplectic form. If the Hamiltonian can be written in the form of \begin{equation}\begin{aligned} \hat{H} = \hat{\vec{\Psi}}^T\mathbf{F}(t)\hat{\vec{\Psi}}, \end{aligned}\end{equation} it then preserves the Gaussianity of states~\cite{PhysRevA.37.3028}. The Heisenberg equations of motion can be written as \begin{equation}\begin{aligned} \dfrac{{\rm {d}}}{{\rm {d}} t}\hat{\vec{\Psi}} = -{\rm {i}} \mathbf{\Omega}\Fbold^\mathrm{sym}(t)\hat{\vec{\Psi}}, \end{aligned}\end{equation} where $\Fbold^\mathrm{sym}=\mathbf{F}+\mathbf{F}^T$. If we define the propagator $\mathbf{S}(t)$ via the relation \begin{equation}\begin{aligned} \hat{\vec{\Psi}}(t) = \mathbf{S}(t)\hat{\vec{\Psi}}(0), \end{aligned}\end{equation} it then satisfies the first order linear differential equation \begin{equation}\begin{aligned} \dfrac{{\rm {d}}}{{\rm {d}} t}\mathbf{S}(t) = -{\rm {i}} \mathbf{\Omega}\Fbold^\mathrm{sym}(t)\mathbf{S}(t) \end{aligned}\end{equation} with the initial condition $\mathbf{S}(0)=\mathbb{1}$. The evolution of the covariance matrix \begin{equation}\begin{aligned} \sigma_{ij} = \langle\hat{\Psi}_i\hat{\Psi}_j\rangle - \langle\hat{\Psi}_i\rangle\langle\hat{\Psi}_j\rangle \end{aligned}\end{equation} is given by \begin{equation}\begin{aligned} \bm{\sigma}(t) = \mathbf{S}(t)\bm{\sigma}(0)\mathbf{S}^T. \end{aligned}\end{equation} $\bm{\sigma}$ together with $\langle\hat{\vec{\Psi}}\rangle$ will completely specify a Gaussian state. \section{Derivation of the world line}\label{app:wl} We derive here the world line for an observer with time-dependent proper acceleration $a(\tau)$ in 1+1D Minkowski spacetime with metric $\eta_{\mu\nu}=\mathrm{diag}(+1,-1)$. We parametrize the world line by the proper time $x^{\mu}(\tau) = (t(\tau),x(\tau))$ and denote \begin{equation}\begin{aligned} u^\mu(\tau) =& \dfrac{{\rm {d}}}{{\rm {d}} \tau}x^{\mu}(\tau) = (u^t(\tau),u^x(\tau)),\\ a^\mu(\tau) =& \dfrac{{\rm {d}}}{{\rm {d}}\tau}u^\mu(\tau) = (a^t(\tau),a^x(\tau)). \end{aligned}\end{equation} From the definition of these quantities, we get \begin{equation}\begin{aligned} u^\mu u_\mu =& 1 = (u^t)^2 - (u^x)^2,\\ a^\mu u_\mu =& 0 = a^t u^t - a^x u^x,\\ a^\mu a_\mu =& -a(\tau)^2 = (a^t)^2 - (a^x)^2. \end{aligned}\end{equation} It follows that \begin{equation}\begin{aligned} a^x = \dfrac{{\rm {d}} u^x}{{\rm {d}} \tau} = a(\tau)\sqrt{1+(u^x)^2}. \end{aligned}\end{equation} Integrating from $\tau'=0$ to $\tau'=\tau$ gives \begin{equation}\begin{aligned} u^x(\tau) =& \sinh[\xi(\tau)],\\ \xi(\tau) =& \sinh^{-1}[u^x(\tau=0)] + \int_0^{\tau}{\rm {d}}\tau'a(\tau'). \end{aligned}\end{equation} Integrating again gives the position. For the time, a similar treatment applies. We finally obtain: \begin{equation}\begin{aligned}\label{eq:wlapp} x(\tau) =& x_0 + \int_0^\tau {\rm {d}} \tau' \sinh[\xi(\tau')],\\ t(\tau) =& t_0 + \int_0^\tau{\rm {d}} \tau'\cosh[\xi(\tau')], \end{aligned}\end{equation} which reduces to the world-line equations in the main text for an observer initially at rest. Note that for a constant acceleration, this gives the well-known Rindler observer's world line. \section{implementation with circuit QED}\label{app:cqed} We present a potential implementation of the proposed relativistic model on circuit QED platforms inspired by \cite{del_rey_simulating_2012}, which consists of a Josephson artificial atom with bosonic mode operator $\hat{b}$ (simulating the harmonic oscillator described in the main text) coupled to a microwave cavity in the strong-coupling regime. Denoting the microwave cavity mode operator by $\hat{a}$, the noninteracting Hamiltonian of the system is \begin{equation}\begin{aligned} \hat{H}_0(\tau) = \omega_0\hat{a}^\dagger\hat{a}+\epsilon\hat{b}^\dagger\hat{b}+\eta \zeta(\tau)\hat{b}^\dagger\hat{b}\, , \end{aligned}\end{equation} where $\omega_0$ is the cavity bare frequency, $\epsilon$ is the energy of the artificial atom, and we assumed that the Josephson junction has negligible nonlinearity. This can be achieved for example by replacing a single Josephson junction with a sufficiently long chain of junctions. The opposite extreme case, where the Josephson atom is a two-level system (qubit), yields similar results, as revealed by corresponding simulations reported in Section~\ref{sec:qubit}. $\zeta(\tau)$ is a driving function that takes the following form~\footnote{Note that our driving term is different from that in~\cite{del_rey_simulating_2012}, as they considered simulating a quantum field in free space, while in the present work, the simulated quantum field is confined within a cavity with Dirichlet boundary conditions, resulting in different mode functions. }: \begin{equation}\begin{aligned} \zeta(\tau)&=\dfrac{{\rm {d}}}{{\rm {d}}\tau} F(\tau)\, ,\\ F(\tau)&=F_+(\tau)+F_-(\tau)\, , \end{aligned}\end{equation} where \begin{equation}\begin{aligned}\label{eq:drive} F_{\pm}&=\cos[\omega_{\pm}\tau\mp\theta_{\mp}(\tau)]-\cos[\omega_{\pm}\tau\mp\theta_{\pm}(\tau)]\, . \end{aligned}\end{equation} Assuming that the phases $\theta_\pm(\tau)$ are modulated slowly compared to the driving frequencies $\omega_\pm$, as will indeed be the case in what follows, the driving function $\zeta(\tau)$ can be well approximated by \begin{equation}\begin{aligned} \zeta(\tau) \simeq& -\omega_+\sin[\omega_+\tau-\theta_-(\tau)] \\ &+ \omega_+\sin[\omega_+\tau -\theta_+(\tau)] \\ &- \omega_- \sin[\omega_-\tau+\theta_+(\tau)]\\ &+ \omega_-\sin[\omega_-\tau+\theta_-(\tau)]. \end{aligned}\end{equation} The interaction Hamiltonian in the Schrödinger picture is $\hat{H}_I=g(\hat{b}^\dagger+\hat{b})(\hat{a}+\hat{a}^\dagger)$. Passing to the interaction picture with respect to $\hat{H}_0(\tau)$ and assuming $\eta\ll 1$ in the driving term, we get \begin{equation}\begin{aligned} \hat{H}_I(\tau) =& g[\hat{b}^\dagger{\rm {e}}^{{\rm {i}} \epsilon\tau}\mathcal{G}(\tau)+\mathrm{H.c.}](\hat{a}{\rm {e}}^{-{\rm {i}}\omega_0\tau}+\mathrm{H.c.})\,,\\ \mathcal{G}(\tau)=&{\rm {e}}^{{\rm {i}}\eta F(\tau)}\simeq 1 + {\rm {i}} \eta F(\tau)\, . \end{aligned}\end{equation} To simulate a harmonic oscillator with proper frequency $\Omega$ and world line $x^{\mu}(\tau) = (t(\tau),x(\tau))$ coupled to the $n$th mode of a massless scalar field of frequency $\omega_n=k_n$ as considered in the main text, we now choose $\omega_{\pm} = \epsilon \pm \omega_0 -\Omega$ as the driving frequencies and $\theta_{\pm}(\tau) = \omega_n t(\tau)\pm k_n x(\tau)$ as the phase modulations. In the regime where $\epsilon$, $\omega_0$, $|\epsilon\pm\omega_0|\gg g$, the interaction Hamiltonian becomes (keeping only slowly rotating terms) \begin{equation}\begin{aligned}\label{eq:cqedHeff} \hat{H}_I(\tau)\simeq& g\eta \sin[k_n x(\tau)]\times\\ &\hat{b}(\hat{a}{\rm {e}}^{-{\rm {i}}[\Omega\tau+\omega_n t(\tau)]}+\hat{a}^\dagger{\rm {e}}^{-{\rm {i}}[\Omega\tau-\omega_n t(\tau)]})+\mathrm{H.c.}\, , \end{aligned}\end{equation} which takes the form of the interaction Hamiltonian in the main text for a single mode of the quantum field. Note that since we always consider a single-mode coherent state as the field initial state in the main text, the main contribution to the dynamics of the harmonic oscillator comes uniquely from this mode, as one can verify using perturbation theory~\cite{martin-martinez_processing_2013}. We also checked numerically that a single-mode approximation for the quantum field is enough for obtaining accurate results for the simulations presented in the main text. Nonetheless, it is possible to simulate the full many-mode Hamiltonian by using multiple modes in the circuit QED microwave cavity. As considered in \cite{del_rey_simulating_2012}, the energy scales $\epsilon$ and $\omega_0$ for circuit QED are in the GHz regime, while $g$, $\Omega$ and $\omega_n$ can be on much slower time scales, such as in the MHz regime. The modulation rate of the phases $\dot{\theta}_\pm(\tau)$ can be expressed in terms of the simulated time-dependent acceleration $a(\tau)$ as [using the world line in Eq.~\eqref{eq:wlapp}] \begin{equation}\begin{aligned}\label{eq:phaseder} \dot{\theta}_\pm (\tau) &= \dfrac{{\rm {d}}}{{\rm {d}}\tau}[\omega_n t(\tau)\pm k_n x(\tau)]\\ &= \omega_n \cosh[\xi(\tau)] \pm k_n \sinh[\xi(\tau)]\\ &= \omega_n \cosh\left[\int_0^\tau{\rm {d}} \tau' a(\tau')\right] \pm k_n \sinh\left[\int_0^\tau{\rm {d}} \tau' a(\tau')\right]\, . \end{aligned}\end{equation} Let us consider a typical world line studied in the main text, for example with $a_0=2$, $\Delta a/a_0=0.1$, $T=2$ and $\omega_n=\Omega$ [the values used in Fig. 2(f) of the main text] in the units fixed by $\Omega$. Then, we have $\dot{\theta}_{\pm}(\tau)\lesssim 10\Omega$, meaning that the phases in the driving \eqref{eq:drive} need to be modulated at roughly the same timescale as $\Omega$, in the MHz band, which is much slower than the circuit QED timescales and should be experimentally feasible. Finally, let us consider a concrete example of typical parameter values of the analog circuit QED system. Let the parameters of the system be $\omega_0=\SI{1}{\GHz}$, $\epsilon=\SI{1.1}{\GHz}$, $\Omega=\SI{1}{MHz}$, $g=10/\sqrt{3\pi}\,\si{\MHz}\simeq \SI{3.3}{\MHz}$, $\eta=0.01$. The driving frequencies are then $\omega_+=\SI{2.099}{\GHz}$ and $\omega_-=\SI{0.099}{\GHz}$. This simulates the harmonic detector coupled to the $n=3$ mode of the quantum field (with $\Omega=\omega_n=k_n$ and $\lambda=0.1$) as considered in the main text. To simulate the acceleration sequence described in the main text in the case of $a_0=2$, $\Delta a/a_0=0.1$ and $T=2$, the required phase modulations $\theta_\pm(\tau)$ as well as their rates $\dot\theta(\tau)$, given by Eq.~\eqref{eq:phaseder}, are plotted in Fig.~\ref{fig:phases}. \begin{figure}[htbp] \centering \includegraphics[width=0.9\linewidth]{phases.pdf} \caption{The phase modulations $\theta_\pm(\tau)$ (left panel) and the corresponding rates $\dot\theta_\pm(\tau)$ that provide the desired simulation of the accelerated motion, where $\Omega=\SI{1}{\MHz}$. Note that modulation rates are in the regime of $\dot\theta_\pm(\tau)\lesssim 10\Omega=\SI{10}{\MHz}$.} \label{fig:phases} \end{figure} \section{Results with a qubit instead of a harmonic oscillator}\label{sec:qubit} We report here the simulation results when we replace the harmonic detector with a qubit (two-level atom initially in its ground state) for the same parameters considered in the main text. To model the configuration with the qubit, we have to replace the bosonic mode operator $\hat{b}$ with the Pauli operator $\hat{\sigma}^{-}$ in the Hamiltonian. Since the Gaussian formalism can no longer be applied, we assumed a single-mode approximation for the quantum field (considering only the mode that is initially in the coherent state and in resonance with the proper frequency of the qubit), which matches the exact form of the single-mode circuit-QED Hamiltonian in Eq.~\eqref{eq:cqedHeff}. The feature vector now contains the expectation values of the operators that are respectively analogous to the bosonic occupation number and the quadratures, namely $\hat{\sigma}^{+}\hat{\sigma}^{-}$, $(\hat{\sigma}^{-}+\hat{\sigma}^{+})/\sqrt{2}$ and ${\rm {i}}(\hat{\sigma}^{+}-\hat{\sigma}^{-})\sqrt{2}$. This is equivalent to measuring the Pauli operators $\hat{\sigma}^{z}$, $\hat{\sigma}^{x}$ and $\hat{\sigma}^{y}$ respectively. The equivalent of Fig. 2(d) and (e) in the main text are presented in Fig.~\ref{fig:qubit}(a) and (b) for the qubit model. We recover results similar to the case of the harmonic detector. Note that the Newtonian model has a slightly improved, yet still very poor performance, which can be ascribed to the additional nonlinearity provided by the qubit. These results clearly show that the details of the spectrum of the detector are not crucial for the expressive power of the relativistic quantum dynamics. \begin{figure}[htbp] \centering \includegraphics[width=0.9\linewidth]{qubit_fig_res.pdf} \caption{Performances of the reservoir-computing model considered in the main text, but with a qubit replacing the harmonic oscillator. Same parameters as Fig. 2(d) and (e) in the main text respectively, showing very similar results.} \label{fig:qubit} \end{figure} \newpage
\section{Introduction} Relativistic quantum information theory studies the interplay between quantum information processing and relativistic effects, and has attracted much attention in recent years. Many of the studies use either the Bogoliubov transformation or particle detector models, such as Unruh-DeWitt (UDW) detectors \cite{Unruh1979evaporation, DeWitt1979}, to examine, for example, the quantum teleportation protocol \cite{PhysRevLett.91.180404, Landulfo2009suddendeath}, relativistic quantum communication channels \cite{Cliche2010channel, jonsson2017quantum, Landulfo2016magnus1, Simidzija2020transmit}, and entanglement degradation \cite{FuentesAliceFalls, AlsingDiracFields}. In particular the so-called \textit{entanglement harvesting protocol} is an operation where multiple initially uncorrelated particle detectors extract entanglement from the vacuum of a quantum field via local interaction \cite{Valentini1991nonlocalcorr, reznik2003entanglement, reznik2005violating}. Entanglement harvesting exploits the fact that vacuum states of a quantum field are entangled \cite{summers1985bell, summers1987bell}, and so even causally disconnected detectors can be correlated. Extensive research shows that the extracted entanglement is sensitive to spacetime properties \cite{pozas2015harvesting, smith2016topology, kukita2017harvesting, henderson2018harvesting, ng2018AdS, cong2020horizon, FinnShockwave} and the state of motion of the detectors \cite{salton2015acceleration,FooSuperpositionTrajectory,Liu:2021dnl}. Our particular interest lies in the impact of black holes on harvested correlations between detectors. The first investigation of the harvesting protocol in a black hole spacetime was done by Henderson \textit{et al.} \cite{henderson2018harvesting}. It was shown that there is an \textit{entanglement shadow} -- a region where two static detectors hovering outside a Ba\~{n}ados-Teitelboim-Zanelli (BTZ) black hole cannot harvest entanglement. This region is located near the black hole at sufficiently large angular separations of the detectors relative to the origin; it arises due to combination increased local Hawking temperature near the black hole and gravitational redshift suppression of non-local correlations. Other types of black holes have also been examined, including static detectors in Schwarzschild and Vaidya spacetimes \cite{Tjoa2020vaidya}, topological black holes \cite{Campos-hyperbolicBH}, geons \cite{Henderson:2022oyd}, co-rotating detectors around a rotating BTZ black hole \cite{robbins2020entanglement}, and freely falling detectors in Schwarzschild spacetime \cite{Ken.Freefall.PhysRevD.104.025001}. While most of studies of the harvesting protocol focus on extraction of entanglement, little has done for other correlations such as mutual information. Quantum mutual information quantifies the total amount of classical and quantum correlations including entanglement, and a few investigations of mutual information harvesting have been carried out~\cite{simidzija2018harvesting, GallockEntangledDetectors, SahuSabotage, pozas2015harvesting}. Unlike entanglement, mutual information does not vanish anywhere outside the event horizon, at least in $(1+1)$-dimensional settings \cite{Tjoa2020vaidya, Ken.Freefall.PhysRevD.104.025001}. However a detailed study of how Hawking radiation and gravitational redshift influence the harvesting protocol for mutual information has not yet been carried out. Our purpose here is to address this issue by examining the harvesting protocol for mutual information in the presence of a black hole. For simplicity, we consider the nonrotating BTZ black hole spacetime and, as with other studies \cite{henderson2018harvesting}, consider identical UDW detectors that are static outside of the horizon and do not communicate with each other \cite{TjoaSignal}. This setup allows us to investigate effects that are purely due to the black hole, such as redshift and the Hawking effect. We obtain two key results. First, although the amount of harvested correlation is reduced by these effects as detectors get close to a black hole and vanishes at the event horizon, the `shadow' for mutual information is absent. Since entanglement cannot be harvested near a black hole, the extracted correlation is either classical or nondistillable entanglement. Second, the death of mutual information at the event horizon is due to Hawking radiation and not gravitational redshift. Our paper is organized as follows. In Sec. \ref{subsec:BTZ spacetime} we introduce the BTZ spacetime and the conformally coupled scalar field defined on this background. The final density matrix of UDW detectors after they interact with the quantum field is given in Sec. \ref{subsec:UDW detectors}. The mutual information can be written in terms of elements in this density matrix. Then we show how mutual information is affected by the black hole in Sec. \ref{sec: results}, followed by conclusion in Sec. \ref{sec: conclusion}. Throughout this paper, we use the units $\hbar = c=1$ and the signature $(-,+,+)$. Also, $\mathsf{x}\coloneqq x^\mu$ denotes an event in coordinates $x^\mu$. \section{UDW detectors in BTZ spacetime} \label{sec:UDW detectors in BTZ spacetime} \subsection{BTZ spacetime and quantum fields} \label{subsec:BTZ spacetime} The BTZ spacetime \cite{BTZ1, BTZ2} is a $(2+1)$-dimensional black hole spacetime with a negative constant curvature. Its line-element in static coordinates is given by \begin{subequations} \begin{align} \text{d} s^2 &= - f(r) \text{d} t^2 + \dfrac{ \text{d} r^2 }{f(r)} + r^2 \text{d} \phi^2\,,\\ f(r) &= \dfrac{r^2}{\ell^2} -M\,, \end{align} \end{subequations} with $t\in \mathbb{R}, r\in (0,\infty)$, and $\phi \in [0, 2\pi)$. The dimensionless quantity $M$ is the mass of the BTZ black hole and $\ell$ is known as the AdS length, which determines the negative curvature of the spacetime. The event horizon $r\ts{h}$ of a nonrotating BTZ black hole can be obtained from the roots of $f(r)=0$, which is \begin{align} r\ts{h} &= \ell \sqrt{M}\,. \end{align} We will examine correlations between two detectors in terms of their proper distance. For $r_2 > r_1 \geq r\ts{h}$, the proper distance, $d(r_1, r_2)$, between two spacetime points $(t,r_1,\phi)$ and $(t,r_2,\phi)$ is given by \begin{align} d(r_1, r_2) &= \ell \ln \kako{ \dfrac{r_2 + \sqrt{ r_2^2 - r\ts{h}^2 }} {r_1 + \sqrt{ r_1^2 - r\ts{h}^2 }} }. \label{eq:proper distance} \end{align} We will consider the case where detector A is closer to the event horizon, namely $r\ts{B}>r\ts{A}>r\ts{h}$, and fix the proper separation between the detectors $d\ts{AB}\coloneqq d(r\ts{A}, r\ts{B})$. We also write $d_j\coloneqq d(r\ts{h}, r_j)$, $j\in \{ \text{A}, \text{B} \}$ for simplicity. The Hawking temperature $T\ts{H}$ of a BTZ black hole is known to be\footnote{Note that $T\ts{H} \propto \sqrt{M}$ in contrast to the $T\ts{H} \propto 1/{M}$ behaviour for a Schwarzschild black hole. } $T\ts{H}=r\ts{h}/2\pi \ell^2$ and the local temperature $T_j$ at radial position $r=r_j$ is given by \begin{align} T_j &= \dfrac{T\ts{H}}{ \gamma_j }\,, \label{eq:local temperature} \end{align} where \begin{align} \gamma_j &= \dfrac{ \sqrt{ r_j^2 - r\ts{h}^2 } }{ \ell } ~~~~~(r_j\geq r\ts{h}) \label{eq:redshift} \end{align} is the redshift factor. For $r\ts{B}>r\ts{A}>r\ts{h}$, the redshift factors for detectors A and B can be written in terms of the proper distances: \begin{subequations} \begin{align} \gamma\ts{A} &= \dfrac{r\ts{h}}{\ell} \sinh \dfrac{d\ts{A}}{\ell}\,, \\ \gamma\ts{B} &= \dfrac{r\ts{h}}{\ell} \sinh \dfrac{d\ts{AB} + d\ts{A}}{ \ell }\,. \end{align} \label{eq:redshift and distance} \end{subequations} More precisely, the temperature \eqref{eq:local temperature} is known as the Kubo-Martin-Schwinger (KMS) temperature at $r=r_j$. We now introduce a conformally coupled quantum scalar field $\hat \phi(\mathsf{x})$ in the BTZ spacetime. Choosing the Hartle-Hawking vacuum $\ket{0}$, the Wightman function $W\ts{BTZ}(\mathsf{x}, \mathsf{x}')\coloneqq \bra{0} \hat \phi(\mathsf{x}) \hat \phi(\mathsf{x}') \ket{0}$ can be constructed from the image sum of the Wightman function in the AdS$_3$ spacetime, $W\ts{AdS}(\mathsf{x},\mathsf{x}')$ \cite{LifschytzBTZ}. Let $\Gamma:(t,r,\phi) \to (t,r,\phi+2\pi)$ represent the identification of a point $\mathsf{x}$ in AdS$_3$ spacetime. Then $W\ts{BTZ}$ is known to be \begin{align} &W\ts{BTZ}(\mathsf{x}, \mathsf{x}') = \sum_{n=-\infty}^\infty W\ts{AdS}(\mathsf{x}, \Gamma^n \mathsf{x}') \notag \\ &= \dfrac{1}{ 4\pi \sqrt{2}\ell } \sum_{n=-\infty}^\infty \kagikako{ \dfrac{1}{ \sqrt{ \sigma_\epsilon (\mathsf{x}, \Gamma^n \mathsf{x}') } } - \dfrac{\zeta}{ \sqrt{ \sigma_\epsilon (\mathsf{x}, \Gamma^n \mathsf{x}')+2 } } }, \label{eq:BTZ Wightman} \end{align} where \begin{align} \sigma_\epsilon (\mathsf{x}, \Gamma^n \mathsf{x}') &= \dfrac{r r' }{ r\ts{h}^2} \cosh \kagikako{ \dfrac{r\ts{h}}{\ell} (\Delta \phi - 2\pi n ) } -1 \label{sigma} \\ &-\dfrac{ \sqrt{ (r^2-r\ts{h}^2) (r^{\prime 2}-r\ts{h}^2) } }{ r\ts{h}^2 } \cosh \kako{ \dfrac{r\ts{h}}{\ell^2} \Delta t - \mathsf{i} \epsilon \nonumber } \end{align} with $\Delta \phi\coloneqq \phi-\phi'$, $\Delta t\coloneqq t-t'$, and $\epsilon$ is the ultra-violet regulator. $\zeta \in \{ -1, 0, 1 \}$ specifies the boundary condition for the field at the spatial infinity: Neumann $\zeta=-1$, transparent $\zeta=0$, and Dirichlet $\zeta=1$. We will choose $\zeta=1$ throughout this article. We also note that $n=0$ term in the Wightman function is called the AdS-Rindler term \cite{Henderson2019anti-hawking,Campos-RobinBC,Robbins-Anti-Hawking} , which corresponds to a uniformly accelerating detector in AdS$_3$ spacetime \cite{Jennings:2010vk}; the remaining ($n\neq 0$) terms are known as the BTZ terms, which yield the black hole contribution. \subsection{UDW detectors} \label{subsec:UDW detectors} A UDW detector is a two-level quantum system consisting of ground and excited states with energy gap $\Omega$, and can be considered as a qubit. Let us prepare two pointlike UDW detectors A and B. Each of them has their own proper time $\tau_j\,(j\in \{ \text{A}, \text{B} \})$ and will interact with the local quantum field $\hat \phi(\mathsf{x})$ through the following interaction Hamiltonian \begin{align} \hat H_j^{ \tau_j } ( \tau_j ) &= \lambda_j \chi_j(\tau_j) \hat \mu_j(\tau_j) \otimes \hat \phi(\mathsf{x}_j(\tau_j)),\,j\in \{ \text{A}, \text{B} \} \end{align} in the interaction picture, where $\lambda_j$ is the coupling strength and $\chi_j(\tau_j)$ is the switching function describing the interaction duration of detector-$j$. The operator $\hat \mu_j(\tau_j) $ is the so-called monopole moment, which describes the dynamics of a detector and is given by \begin{align} \hat \mu_j(\tau_j) &= \ket{e_j} \bra{g_j} e^{ \mathsf{i} \Omega_j \tau_j } + \ket{g_j} \bra{e_j} e^{ -\mathsf{i} \Omega_j \tau_j }, \end{align} where $\ket{g_j}, \ket{e_j}$, and $\Omega_j$ are respectively the ground, excited states of detector-$j$ and the energy gap between them. $\hat \phi(\mathsf{x}_j(\tau_j))$ is the pullback of the field operator along detector-$j$'s trajectory. We put the superscript on the Hamiltonian $\hat H_j^{ \tau_j } ( \tau_j )$ to indicate that it is the generator of time-translation with respect to the proper time $\tau_j$. In what follows, we assume that the detectors have the same coupling strength $\lambda$ and energy gap $\Omega$. Let us write the total interaction Hamiltonian as a generator of time-translation with respect to the common time $t$ in the BTZ spacetime: \begin{align} \hat H\ts{I}^t(t) &= \dfrac{\text{d} \tau\ts{A}}{\text{d} t} \hat H\ts{A}^{ \tau\ts{A} }\big( \tau\ts{A}(t) \big) + \dfrac{\text{d} \tau\ts{B}}{\text{d} t} \hat H\ts{B}^{ \tau\ts{B} }\big( \tau\ts{B}(t) \big) \,, \end{align} so that the time-evolution operator $\hat U\ts{I}$ is given by a time-ordering symbol $\mathcal{T}_t$ with respect to $t$ \cite{EMM.Relativistic.quantum.optics,Tales2020GRQO}: \begin{align} \hat U\ts{I} &= \mathcal{T}_t \exp \kako{ -\mathsf{i} \int_{\mathbb{R}} \text{d} t\,\hat H\ts{I}^t(t) } . \end{align} We now assume that the coupling strength $\lambda$ is small and apply the Dyson series expansion to $\hat U\ts{I}$: \begin{subequations} \begin{align} \hat U\ts{I} &= \mathds{1} + \hat U^{(1)} + \hat U^{(2)} + \mathcal{O}(\lambda^3)\,,\\ \hat U^{(1)} &= -\mathsf{i} \int_{-\infty}^\infty \text{d} t\,\hat H\ts{I}^t(t)\,,\\ \hat U^{(2)} &= - \int_{-\infty}^\infty \text{d} t_1 \int_{-\infty}^{t_1} \text{d} t_2\, \hat H\ts{I}^t(t_1) \hat H\ts{I}^t(t_2)\,. \end{align} \end{subequations} We further assume that the detectors and the field are initially in their ground states and uncorrelated. The initial state $\rho_0$ of the total system is then \begin{align} \rho_0 &= \ket{g\ts{A}} \bra{g\ts{A}} \otimes \ket{g\ts{B}} \bra{g\ts{B}} \otimes \ket{0}\bra{0}\,, \end{align} where $\ket{0}$ is the vacuum state of the field. After the interaction, the final total density matrix $\rho\ts{tot}$ reads \begin{align} \rho\ts{tot} &= \hat U\ts{I} \rho_0 \hat U\ts{I}^\dag \notag \\ &= \rho_0 + \rho^{(1,1)} + \rho^{(2,0)} + \rho^{(0,2)} + \mathcal{O}(\lambda^4), \end{align} where $\rho^{(i,j)}=\hat U^{(i)} \rho_0 \hat U^{(j)\dagger}$ and used the fact that all the odd-power terms of $\lambda$ vanish \cite{pozas2015harvesting}. The final density matrix $\rho\ts{AB}=\Tr_\phi[\rho\ts{tot}]$ of the detectors in the basis $\{ \ket{g\ts{A} g\ts{B}} , \ket{g\ts{A} e\ts{B}}, \ket{e\ts{A} g\ts{B}}, \ket{e\ts{A} e\ts{B}} \}$ is known to be \begin{align} \rho\ts{AB} &= \left[ \begin{array}{cccc} 1-\mathcal{L}\ts{AA}-\mathcal{L}\ts{BB} &0 &0 &\mathcal{M}^* \\ 0 &\mathcal{L}\ts{BB} &\mathcal{L}\ts{AB}^* &0 \\ 0 &\mathcal{L}\ts{AB} &\mathcal{L}\ts{AA} &0 \\ \mathcal{M} &0 &0 &0 \end{array} \right] + \mathcal{O}(\lambda^4)\,. \end{align} where \begin{align} \mathcal{L}_{ij} &= \lambda^2 \int_{\mathbb{R}} \text{d} \tau_i \int_{\mathbb{R}} \text{d} \tau_j'\, \chi_i(\tau_i) \chi_j(\tau_j') e^{ -\mathsf{i} \Omega (\tau_i - \tau_j') } \notag \\ &\qquad\qquad\qquad \qquad\times W\ts{BTZ}\big( \mathsf{x}_i(\tau_i), \mathsf{x}_j(\tau_j') \big)\,, \\ \mathcal{M} &= -\lambda^2 \int_{\mathbb{R}} \text{d} \tau\ts{A} \int_{\mathbb{R}} \text{d} \tau\ts{B}\, \chi\ts{A}(\tau\ts{A}) \chi\ts{B}(\tau\ts{B}) e^{ \mathsf{i} \Omega (\tau\ts{A} + \tau\ts{B}) } \notag \\ &\hspace{5mm}\times \big[ \Theta \big( t(\tau\ts{A}) - t(\tau\ts{B}) \big) W\ts{BTZ} \big( \mathsf{x}\ts{A}(\tau\ts{A}), \mathsf{x}\ts{B}(\tau\ts{B}) \big) \notag \\ &\hspace{1cm} + \Theta \big( t(\tau\ts{B}) - t(\tau\ts{A}) \big) W\ts{BTZ} \big( \mathsf{x}\ts{B}(\tau\ts{B}), \mathsf{x}\ts{A}(\tau\ts{A}) \big) \big]\,, \end{align} where $\Theta(t)$ is the Heaviside step function. The off-diagonal elements $\mathcal{M}$ and $\mathcal{L}\ts{AB}$ are responsible for entanglement and mutual information, respectively. It is worth knowing that the elements satisfy $\mathcal{L}\ts{AA}\mathcal{L}\ts{BB}\geq |\mathcal{L}\ts{AB}|^2$ \cite{smith2016topology}. The total classical and quantum correlations are given by \begin{align} I\ts{AB} &= \mathcal{L}_+ \ln \mathcal{L}_+ + \mathcal{L}_- \ln \mathcal{L}_- \notag \\ &\hspace{5mm}- \mathcal{L}\ts{AA} \ln \mathcal{L}\ts{AA} - \mathcal{L}\ts{BB} \ln \mathcal{L}\ts{BB} + \mathcal{O}(\lambda^4) \,, \end{align} which is the mutual information $I\ts{AB}$ between detectors A and B, where \begin{align} \mathcal{L}_\pm &\coloneqq \dfrac{1}{2} \kako{ \mathcal{L}\ts{AA} + \mathcal{L}\ts{BB} \pm \sqrt{ (\mathcal{L}\ts{AA}-\mathcal{L}\ts{BB})^2 + 4 |\mathcal{L}\ts{AB}|^2 } }. \end{align} Note that $I\ts{AB}=0$ if $\mathcal{L}\ts{AB}=0$, and from the condition, $\mathcal{L}\ts{AA}\mathcal{L}\ts{BB}\geq |\mathcal{L}\ts{AB}|^2$, we have $\mathcal{L}\ts{AA}\mathcal{L}\ts{BB}=0 \Rightarrow |\mathcal{L}\ts{AB}|=0 \Rightarrow I\ts{AB}=0$. We will use a Gaussian switching function with a typical interaction duration $\sigma$, \begin{align} \chi_j(\tau_j) &= e^{ -\tau_j^2/2\sigma^2 }, \end{align} in which case $\mathcal{L}_{ij}$ can be reduced to single integrals as shown in Appendix \ref{app:Derivation of Lij}. \begin{figure*}[tp] \centering \includegraphics[width=\linewidth]{MIOmegadhaplots.pdf}\\ \caption{ ~(a) 3D plot of mutual information $I\ts{AB}/\tilde{\lambda}^2$ as a function of energy gap $\Omega \sigma$ and proper distance $d\ts{A}/\sigma$. Here, $\ell/\sigma=10, M=10^{-2}$, and $d\ts{AB}/\sigma=7$. (b) Some slices of (a) with constant $d\ts{A}/\sigma=10,1$, and 0.1. (c) Slices of (a) with constant $\Omega \sigma=1, 0.5$, and 0.1. } \label{fig:MIOmegadhaplots} \end{figure*} \section{Results} \label{sec: results} In this section we investigate how a black hole affects the extraction of mutual information. Detectors A and B are both static outside the black hole and aligned along an axis through its centre (so that $\Delta\phi = 0$ in \eqref{sigma}), and they switch at the same time. To see the effects purely coming from the black hole, we always fix the proper separation, $d\ts{AB}$, between A and B in such a way that the contribution from communication is negligible. In what follows we write quantities in units of the Gaussian width $\sigma$. For example, $\tilde{\lambda}\coloneqq \lambda \sqrt{\sigma}$ denotes a dimensionless coupling constant. Let us first analyze the dependence on the energy gap $\Omega$ and the proper distance $d\ts{A}$ between detector A and the event horizon in Fig.~\ref{fig:MIOmegadhaplots}. We fix $\ell/\sigma=10, M=10^{-2}$ and $d\ts{AB}/\sigma=7$, and treat mutual information as a function of $\Omega$ and $d\ts{A}$: $I\ts{AB}=I\ts{AB}(\Omega, d\ts{A})$. Figures~\ref{fig:MIOmegadhaplots}(b) and (c) depict slices of (a) with constant $d\ts{A}/\sigma$ and $\Omega \sigma$, respectively. From Figs. \ref{fig:MIOmegadhaplots}(a) and (b), one finds that there exists an optimal value of $\Omega$ to extract correlation for each $d\ts{A}$. Figure~\ref{fig:MIOmegadhaplots}(c) displays the dependence of mutual information on $d\ts{A}$. From Eqs.~\eqref{eq:local temperature} and \eqref{eq:redshift and distance}, the change in mutual information in this figure is caused by both particle production and redshift effects. Overall, as the detectors together move away from the black hole at constant proper separation, the mutual information initially grows very quickly, reaches a maximum, and then flattens to a constant which is the case of the detectors in AdS$_3$ spacetime. Recall that a black hole inhibits static detectors from harvesting entanglement when one of them is close to the event horizon due to extreme Hawking radiation and redshift~\cite{henderson2018harvesting}. This region near the event horizon is called the `entanglement shadow'. In contrast to this we see in Fig.~\ref{fig:MIOmegadhaplots}(c) that mutual information gets very close to zero as the horizon is approached, but only vanishes if $d\ts{A}/\sigma=0$. Thus harvested correlation in the entanglement shadow contains either classical correlation or nondistillable entanglement. These results are commensurate with previous studies in $(1+1)$ dimensions~\cite{Tjoa2020vaidya, Ken.Freefall.PhysRevD.104.025001}, in which mutual information had no shadow region for all $\Omega \sigma$. As suggested in Ref.~\cite{henderson2018harvesting}, we expect that the decline of correlation near the event horizon and its death at $d\ts{A}/\sigma=0$ are caused by the gravitational redshift and extreme Hawking radiation. From now on, we examine how these two effects contribute by treating detector A's redshift factor $\gamma\ts{A}$ and KMS temperature $T\ts{A}$ as independent variables, and write mutual information as a function of them: $I\ts{AB}=I\ts{AB}(T\ts{A}, \gamma\ts{A})$. We will show that the decline of mutual information is caused by both high temperature and large redshift, but the death is purely due to an extreme temperature effect. Our strategy is to use $I\ts{AB}=I\ts{AB}(T\ts{A}, \gamma\ts{A})$ and fix either $T\ts{A}$ or $\gamma\ts{A}$ so that one can see respectively the influence of $\gamma\ts{A}$ and $T\ts{A}$. To this end, one needs to write the event horizon $r\ts{h}$ and the proper distance $d\ts{A}$ in terms of $T\ts{A}$ and $\gamma\ts{A}$: \begin{align} r\ts{h} &= 2\pi \ell^2 T\ts{A} \gamma\ts{A}\,, \\ d\ts{A} &= \ell \ln \dfrac{ 1 + \sqrt{ 1+ (2\pi \ell T\ts{A})^2 } }{ 2\pi \ell T\ts{A} }\,. \end{align} Thus the scenario where $T\ts{A}=const$ is different from that of $\gamma\ts{A}=const$ as illustrated in Fig.~\ref{fig:AdSRindlervsBTZ}. Fixing $T\ts{A}$ and varying $\gamma\ts{A}$ corresponds to a situation in Fig.~\ref{fig:AdSRindlervsBTZ}(a-i) where the size of the black hole varies with $\gamma\ts{A}$ and the proper distance $d\ts{A}$ does not change. Note that the local temperature detected by detector B, $T\ts{B}$, is also fixed. Meanwhile, setting $\gamma\ts{A}$ a constant and varying $T\ts{A}$ means both $r\ts{h}$ and $d\ts{A}$ change with $T\ts{A}$ as shown in Fig.~\ref{fig:AdSRindlervsBTZ}(b-i). \begin{figure*}[tp] \centering \includegraphics[width=\linewidth]{AdSRindlervsBTZ2.pdf}\\ \caption{ ~AdS-Rindler and BTZ contributions in $\mathcal{L}_{ij}$. All figures have $\ell/\sigma=10, d\ts{A}/\sigma=7$, and $\Omega\sigma=1$. (a-i)-(a-iii): Varying $\gamma\ts{A}$ while $T\ts{A}\sigma=1$ is fixed. For both $\mathcal{L}\ts{AA}$ and $\mathcal{L}\ts{AB}$, the AdS-Rindler part ($n=0$) is independent of $\gamma\ts{A}$ and the BTZ part ($n\neq 0$) is nonzero only for $\gamma\ts{A}\ll 1$. Because of the AdS-Rindler contribution, the total $\mathcal{L}_{ij}$ is nonzero for all $\gamma\ts{A}$. (b-i)-(b-iii): Varying $T\ts{A}$ with fixed $\gamma\ts{A}=1/10$. For $\mathcal{L}\ts{AB}$, both AdS-Rindler and BTZ terms vanish at high temperature. } \label{fig:AdSRindlervsBTZ} \end{figure*} \begin{figure*}[tp] \centering \includegraphics[width=\linewidth]{MITempandRedshiftFig.pdf}\\ \caption{ ~(a) 3D plot of mutual information $I\ts{AB}/\tilde{\lambda}^2$ as a function of local temperature $T\ts{A}$ and redshift factor $\gamma\ts{A}$ of detector A. Here, $\ell/\sigma=10, \Omega\sigma=1$, and $d\ts{AB}/\sigma=7$. (b) Slices of (a) at constant $\gamma\ts{A}$ in a logarithmic scale. The curves in the lower temperature show the scenario where static detectors in AdS$_3$ spacetime without radiation, and the higher temperature regime represents how Unruh and/or Hawking radiations ``attack'' the detectors. (c) Slices of (a) at constant $T\ts{A}\sigma$ in a logarithmic scale. The contribution coming from the black hole can be seen in $\gamma\ts{A}\ll 1$ regime. As $\gamma\ts{A}\to \infty$, the Hawking effect becomes negligible and only Unruh effect survives. } \label{fig:MItempRedshift} \end{figure*} Using the setup given above, let us take a look at the AdS-Rindler ($n=0$) and BTZ ($n\neq 0$) contributions in the response function $\mathcal{L}\ts{AA}/\tilde{\lambda}^2$ and the off-diagonal element $\mathcal{L}\ts{AB}/\tilde{\lambda}^2$. Figures~\ref{fig:AdSRindlervsBTZ}(a-ii) and (a-iii) are $\mathcal{L}\ts{AA}/\tilde{\lambda}^2$ and $\mathcal{L}\ts{AB}/\tilde{\lambda}^2$ when the local KMS temperature of detector-A is fixed. One can observe that the AdS-Rindler term in $\mathcal{L}\ts{AA}$ and $\mathcal{L}\ts{AB}$ is independent of $\gamma\ts{A}$, whereas the BTZ part is nonvanishing only when $\gamma\ts{A}\ll 1$. Hence, $\mathcal{L}_{ij}=\mathcal{L}_{ij}^{(n=0)} + \mathcal{L}_{ij}^{(n\neq 0)}$ is nonzero for all $\gamma\ts{A}$, indicating that mutual information will not vanish because of the gravitational redshift. On the other hand, Figs.~\ref{fig:AdSRindlervsBTZ}(b) depict the matrix elements $\mathcal{L}_{ij}$ when the redshift factor $\gamma\ts{A}$ is fixed. We first note that the response function $\mathcal{L}\ts{AA}$ of detector A [Fig.~\ref{fig:AdSRindlervsBTZ}(b-ii)] decreases as the temperature increases. In a nutshell, one expects the contrary: that a detector's response function increases as the local temperature increases. However, this turns out to be not necessarily true; even a carefully switched detector with an infinite interaction duration experiences ``cool down'' as temperature increases. More precisely, writing $\mathcal{F}(\Omega) = \mathcal{L}\ts{DD}/\tilde{\lambda}^2$, the conditions \begin{align}\label{weakAH} &\frac{\text{d}\mathcal{F}(\Omega)}{\text{d} T\ts{KMS}}<0 \quad \textrm{weak}\\ & \frac{\partial T\ts{EDR}}{\partial T\ts{KMS}} < 0 \quad \textrm{strong} \label{strongAH} \end{align} in the presence of a black hole are respectively referred to as the weak and strong anti-Hawking effects \cite{Henderson2019anti-hawking} (see also \cite{Campos-hyperbolicBH, Campos-RobinBC, Robbins-Anti-Hawking, Conroy-extremealBH}), where \begin{align} T\ts{EDR}=-\frac{\Omega}{\ln\mathcal{R}} \end{align} with \begin{align} \mathcal{R}=\frac{\mathcal{F}(\Omega)}{\mathcal{F}(-\Omega)}\,, \end{align} being the excitation-to-de-excitation ratio of the detector. For an accelerating detector in a flat spacetime these effects are respectively referred to as weak and strong anti-Unruh phenomena \cite{Brenna2016anti-unruh, Garay2016anti-unruh}, and will not be present in a situation where an inertial detector is in a thermal bath. Since there is a range in temperature in which $\mathcal{L}\ts{AA}/\tilde{\lambda}^2$ decreases, the detector exhibits the weak anti-Hawking effect and the redshift is not involved. Also note that (under the Dirichlet boundary condition) this originates from the BTZ part of the Wightman function, as demonstrated in \cite{Henderson2019anti-hawking}. Figure~\ref{fig:AdSRindlervsBTZ}(b-iii) shows that the off-diagonal term $\mathcal{L}\ts{AB}/\tilde{\lambda}^2$ asymptotes to 0 as $T\ts{A}\sigma\to \infty$. This suggests that it is extreme temperature that inhibits detectors from harvesting mutual information. Hence, the fact that the detectors cannot extract correlations when one of them is at the event horizon [Figs.~\ref{fig:MIOmegadhaplots}(a), (c)] is purely due to the extremity of the local Hawking radiation there, which is a combination of increasing black hole mass with decreasing $d\ts{A}$ so as to ensure constant redshift. Finally, we plot mutual information $I\ts{AB}$ as a function of detector A's local temperature, $T\ts{A}$, and the redshift factor, $\gamma\ts{A}$, in Fig.~\ref{fig:MItempRedshift}(a). Here we fix $\ell/\sigma=10$, $d\ts{AB}/\sigma=7$, and $\Omega \sigma=1$. One can observe from Fig. \ref{fig:MItempRedshift}(a) that the detectors easily harvest mutual information when the temperature $T\ts{A}$ and redshift $\gamma\ts{A}$ are both small. This corresponds to a case where two detectors are located far away ($d\ts{A}/\sigma \gg 1$) from a tiny black hole ($r\ts{h}/\sigma \ll 1$). On the other hand, high temperature or large redshift factor, which corresponds to $r\ts{h}/\sigma \gg 1$ and $d\ts{A}/\sigma \ll 1$, suppress the extraction of correlation. Figure~\ref{fig:MItempRedshift}(b) depicts slices of figure~\ref{fig:MItempRedshift}(a) with constant $\gamma\ts{A}$ in a logarithmic scale to analyze the relationship of mutual information with the Hawking effect. As the figure indicates, the colder the temperature, the more the correlation harvested, whereas $I\ts{AB}/\tilde{\lambda}^2 \to 0$ as the temperature gets large. This indicates that the radiation from the black hole acts as noise that inhibits extraction of correlation by the detectors, and this is true no matter what the value of redshift is. Conversely, Fig.~\ref{fig:MItempRedshift}(c) exhibits the influence of redshift $\gamma\ts{A}$ while the temperature $T\ts{A}$ is fixed. In contrast to Fig.~\ref{fig:MItempRedshift}(b), mutual information does not go to 0 as $\gamma\ts{A}\to \infty$. Instead, it asymptotes to a finite value that is characterized by the temperature $T\ts{A}$. As we saw in Fig.~\ref{fig:AdSRindlervsBTZ}(a-ii) and (a-iii), the BTZ part of $\mathcal{L}_{ij}$ vanishes at large $\gamma\ts{A}$, leading us to conclude that the asymptotic values in Fig.~\ref{fig:MItempRedshift}(c) coincide with mutual information harvested by \textit{accelerating} detectors in AdS$_3$ spacetime with corresponding accelerations that give local temperature $T\ts{A}$. From these figures, we conclude that the death of mutual information in a black hole spacetime is purely due to Hawking radiation. \section{Conclusion} \label{sec: conclusion} Based on the fact that a vacuum state of a quantum field is entangled and that such correlations contain information about the background spacetime, correlation harvesting protocols are of great interest in relativistic quantum information theory. In this paper, we investigated the harvesting protocol for mutual information with two static UDW detectors in a nonrotating BTZ black hole spacetime. As shown in Refs.~\cite{henderson2018harvesting, Tjoa2020vaidya, Ken.Freefall.PhysRevD.104.025001, robbins2020entanglement}, there exists a region, the so-called entanglement shadow, near a black hole where static detectors cannot extract entanglement from the vacuum. It was suggested that the entanglement shadow is a consequence of the Hawking effect and gravitational redshift \cite{henderson2018harvesting}. Inspired by these results, we have examined the effect of Hawking radiation and gravitational redshift on harvested mutual information $I\ts{AB}$ between detectors A and B by considering $I\ts{AB}$ as a function of local temperature $T\ts{A}$ and redshift factor $\gamma\ts{A}$ of detector A: $I\ts{AB}=I\ts{AB}(T\ts{A}, \gamma\ts{A})$. We find that the black hole has a significant effect on the mutual information extracted, with high temperature and extreme redshift preventing the detectors from extracting correlation. We first confirmed that, unlike entanglement, there is no `mutual information shadow' in agreement with Refs. \cite{Tjoa2020vaidya, Ken.Freefall.PhysRevD.104.025001}. Mutual information vanishes only when one of the detectors reaches the event horizon, and this is true for any value of energy gap $\Omega$. We then showed that, by looking at the effects of redshift and Hawking radiation separately, extreme Hawking radiation (and not gravitational redshift) is responsible for the death of mutual information . That is, as the local temperature increases while fixing $\gamma\ts{A}$, we found $I\ts{AB}\to 0$. Remarkably, the death of mutual information at extreme temperature is in contrast to what was found in flat spacetime \cite{simidzija2018harvesting}. Two inertial detectors interacting with a thermal field state in Minkowski spacetime struggle to extract entanglement but easily harvest mutual information as the field temperature increases. Since this result holds for any spacetime dimension, switching functions, and detector shapes \cite{simidzija2018harvesting}, the striking distinction between our result from theirs may come from (i) the existence of curvature, and/or (ii) the effects of acceleration. Concerning (i), the background spacetime has no curvature in \cite{simidzija2018harvesting} whereas the BTZ spacetime has constant negative curvature. One can check the relevance of curvature by putting inertial detectors in AdS$_3$ spacetime, which we do not investigate in this paper. Concerning (ii), our static detectors in BTZ spacetime are constantly accelerating away from a black hole, whereas the previous study considered inertial detectors \cite{simidzija2018harvesting}. A single detector can exhibit the anti-Unruh effect when accelerating, but not if it is inertial in a thermal bath \cite{Garay2016anti-unruh}. In the context of entanglement harvesting, detectors accelerating in a vacuum state and inertial in a thermal state can be distinguished \cite{salton2015acceleration,Liu:2021dnl}. It would be interesting to compare mutual information in scenarios with and without acceleration in the same spacetime. \section*{Acknowledgments} This work was supported in part by the Natural Sciences and Engineering Research Council of Canada and by Asian Office of Aerospace Research and Development Grant No. FA2386-19-1-4077. \begin{widetext}
\section{Inclusive and Exclusive NC 1$\pi^0$ Cross-Sections on Argon} \subsection{Methodology} The prescription for calculating the cross section is provided in Eq.~(\ref{eqn:xsec}) where the components are defined as follows: $N^\text{obs}_{NC1\pi^0}$, $N_\text{cosmic}$, and $N_{bkg}$ denote the number of selected data events, the number of background events arising from cosmic rays traversing the detector, and the number of expected beam-correlated background events, respectively; $\epsilon_{NC1\pi^0}$ denotes the efficiency of selecting NC1$\pi^0$ events; $\Phi$ denotes the integrated flux; and $N_{\text{targets}}$ denotes the number of argon atoms in the fiducial volume of the analysis. \begin{equation} \label{eqn:xsec} \sigma_{NC1\pi^{0}} = \frac{N^\text{obs}_{NC1\pi^{0}}-N_{\text{cosmic}}-N_{bkg}}{\epsilon_{NC1\pi^{0}}\Phi N_{\text{targets}}}. \end{equation} This calculation is performed independently using each of the 2$\gamma1p$ and 2$\gamma0p$ selections to measure an exclusive cross section. These measurements are denoted as the NC$\pi^{0}$+1p and NC$\pi^{0}$+0p cross sections, respectively; in each case one or zero protons is explicitly required in the signal definition (described in detail below). Additionally, the calculation is performed using the combined 2$\gamma(0+1)p$ selection to measure a semi-inclusive cross section, NC$\pi^{0}$, with no requirement on the number of protons in the signal definition. Note that this semi-inclusive measurement is efficiency-corrected to include 2+ proton final states that are not included in the final selected events. As noted in Section \ref{sec:systematics}, the simulation is run multiple times to encompass the effect of varying underlying sources of systematic uncertainty. The calculation of each cross section is performed separately in each of these systematic ``universes'' to guarantee that all correlations between components of the cross section are handled correctly. This is done using tools from the MINERvA Analysis Toolkit \cite{MINERvA:2021ddh}. Both selections, as well as their combination, correspond to approximately, but not identically, the same POT, provided in Table~\ref{tab:summary_tab} (due to differences in the computational processing of the two samples). To extract the semi-inclusive cross section from the combined 2$\gamma(0+1)p$ selection, the relevant 2$\gamma0p$ distributions are scaled down by the ratio between the POT of the 2$\gamma1p$ data sample (smaller POT) and the POT of the 2$\gamma0p$ data sample and then are added to the 2$\gamma1p$ distributions. This operation is performed for $N^\text{obs}_{NC1\pi^0}$, $N_\text{cosmic}$, $N_{bkg}$, and the numerator of the efficiency. $N^\text{obs}_{NC1\pi^0}$ and $N_\text{cosmic}$ are measured in data and therefore there is no systematic uncertainty attributed to them. These values are reported in Table~\ref{tab:summary_tab}. $N_{bkg}$ is extracted from the simulation, and we note that many of the key backgrounds in this analysis are shared with MicroBooNE's search for NC $\Delta$ radiative decay \cite{MicroBooNE:2021zai}. The dominant contributions to the uncertainty on the background event rate for each analysis are from FSI related to inelastic nucleon scattering, pion and nucleon absorption, and pion charge-exchange. The axial and vector mass parameters, $m_A$ and $m_V$, respectively, in the charged current resonant form factors are also sources of significant uncertainties; this is consistent with expectation because of the large background due to charged-current interactions in which a $\pi^0$ is produced. The efficiency of the selection is constructed using as the numerator the number of signal events passing all reconstruction cuts and analysis BDTs in simulation and as the denominator the total number of signal events preceding the application of any cuts or analysis BDTs. The difference in signal definition between the semi-inclusive measurement and each of the two exclusive measurements is contained in the efficiency denominator. The exclusive measurements and the semi-inclusive measurement each use a distinct efficiency denominator, reflecting the total number of simulated events truly satisfying the corresponding signal definition. In each of the exclusive measurements, the signal definition is taken to be NC1$\pi^{0}$ with exactly zero or one final-state proton with a kinetic energy above 50 MeV. In the semi-inclusive measurement, the signal definition is taken to be NC1$\pi^{0}$, notably allowing for any number of protons in the final state. The efficiency for each analysis is reported in Table~\ref{tab:summary_tab}. The integrated flux is calculated separately for all four neutrino species ($\nu_{\mu}$, $\bar{\nu}_{\mu}$, $\nu_{e}$, $\bar{\nu}_{e}$), and the sum of these integrated fluxes is used to normalize each cross section measurement. This choice was made because of the inability to identify the species of the incident neutrino based on the neutral current final state. The integrated flux is varied within each flux systematic ``universe'', and the correlations between each varied flux and the corresponding variations in the predicted background and efficiency are taken into account when extracting the cross sections. The number of argon atoms used is calculated as $N_{\text{targets}} = \rho V N_A/M_{Ar}$, where $V = 5.64\times10^{7} \text{cm}^3$ is the fiducial volume of the analysis, $\rho = 1.3954$~g/cm$^3$ is the density of argon at the temperature in the cryostat, and $M_{Ar} = 39.948$~g/mol is the molar mass of argon. A 1\% uncertainty is assigned to the number of targets to reflect variation in the argon density through temperature and pressure fluctuations. \begin{table*}[ht!] \caption{Summary table of all inputs to the cross section calculation, reported as $\sigma \pm\text{sys}\pm \text{stat}$ uncertainty. Note that while the individual errors on the components are given here, the full uncertainty on the cross section is calculated properly assuming full correlations.} \begin{adjustwidth}{-1.25cm}{-1cm} \centering \setlength{\tabcolsep}{2pt} \begin{tabular}{|l|c|c|c|c|} \hline\hline \textbf{} & \textbf{NC$\pi^0$ (semi-inclusive)} & \textbf{NC$\pi^0+1 p$ (exclusive)} & \textbf{NC$\pi^0+0 p$ (exclusive)} \\ \hline\hline \textbf{Samples Used} & {$2\gamma(0+1)p$ Selection } & $2\gamma1p$ Selection & $2\gamma0p$ Selection \\ \hline\hline N$_\text{targets}$ [$10^{30}$ Ar atoms] & \multicolumn{3}{c|}{1.187 $\pm$ 0.119 $\pm$ 0.00} \\ Flux [$10^{-10}$ $\nu$/POT/cm$^{2}$] & \multicolumn{3}{c|}{7.876 $\pm$ 0.902 $\pm$ 0.00} \\ \cline{2-4} POT of sample [$10^{20}$ POT] & 5.84 $\pm$ 0.12 $\pm$ 0.00 & 5.84 $\pm$ 0.12 $\pm$ 0.0 & 5.89 $\pm$ 0.12 $\pm$ 0.00 \\ Efficiency & 0.089 $\pm$ 0.003 $\pm$ 0.001 & 0.107 $\pm$ 0.006 $\pm$ 0.002 & 0.060 $\pm$ 0.003 $\pm$ 0.001 \\ Selected data [evts] & 1125.9 $\pm$ 0.0 $\pm$ 33.5 & 634.0 $\pm$ 0.0 $\pm$ 25.2 & 496.0 $\pm$ 0.0 $\pm$ 22.3 \\ Cosmic data [evts] & 177.0 $\pm$ 0.0 $\pm$ 8.9 & 96.1 $\pm$ 0.0 $\pm$ 6.5 & 81.5 $\pm$ 0.0 $\pm$ 6.1 \\ Background [evts] & 345.8 $\pm$ 51.1 $\pm$ 9.0 & 279.6 $\pm$ 43.5 $\pm$ 7.2 & 208.3 $\pm$ 33.5 $\pm$ 7.0 \\ Background-subtracted rate [evts] & 603.2 $\pm$ 51.1 $\pm$ 35.8 & 258.3 $\pm$ 43.5 $\pm$ 27.0 & 206.1 $\pm$ 33.5 $\pm$ 24.1 \\ \hline $\sigma_{NC1\pi^0}$ [$10^{-38}$cm$^2$/Ar] & 1.243 $\pm$ 0.185 $\pm$ 0.076 & 0.444 $\pm$ 0.098 $\pm$ 0.047 & 0.624 $\pm$ 0.131 $\pm$ 0.075 \\ \hline\hline \end{tabular} \end{adjustwidth} \label{tab:summary_tab} \end{table*} \subsection{Results and Interpretation} The calculation of each cross section from its components follows from Eq.~(\ref{eqn:xsec}) and is summarized in Table~\ref{tab:summary_tab}. The resulting cross sections are shown in Fig.~\ref{fig:xsec_comparison}, compared to the simulated cross sections from several neutrino event generators including \textsc{genie}, \textsc{NuWro} \cite{Golan:2012rfa}, and \textsc{neut} \cite{Hayato:2002sd}. The \textsc{genie} curve shown is generated using the MicroBooNE cross-section ``tune'' \cite{MicroBooNE:2021ccs}, which does not modify the \textsc{genie} v3.0.6 central value prediction (because the tune did not adjust the NC interaction model), but does define the uncertainty on the prediction. We observe a consistent deficit in data compared to \textsc{genie} for the combined semi-inclusive measurement and for each of the individual NC$\pi^{0}$+1p and NC$\pi^{0}$+0p exclusive measurements. Overall, the \textsc{neut} predictions most closely match the reported measurements across semi-inclusive and exclusive final states. Additionally we note that while \textsc{NuWro} is generally consistent with the other generators in its semi-inclusive and exclusive 1p predictions, its exclusive 0p prediction is higher compared to \textsc{neut} and \textsc{genie} predictions. The extracted semi-inclusive NC$\pi^{0}$ cross section is 1.24 $\pm$ 0.19 (syst) $\pm$ 0.08 (stat) [$10^{-38}$cm$^2$/Ar] which is 26\% lower than the \textsc{genie} prediction of 1.68 [$10^{-38}$cm$^2$/Ar]. The corresponding breakdown of uncertainty for each of the measurement channels is shown in Fig.~\ref{fig:xsec_uncertainty}. In all cases the flux, \textsc{genie}, and statistical uncertainties are dominant. The dominant contributions to the \textsc{genie} uncertainties enter into the cross section via the background subtraction and, as noted above, arise from the modeling of final-state interactions and the axial and vector mass parameters governing CC resonant pion production. \begin{figure}[h] \centering \includegraphics[width=0.49\textwidth]{\xsecPlotDir/NOV_SIMPLE_combined_2g1p_2g0p_simple_XS.pdf} \caption{Measured semi-inclusive NC$\pi^0$, exclusive NC$\pi^0$+1p, and exclusive NC$\pi^0$+0p cross sections, each compared to the corresponding \textsc{genie} v3 (G18\_10a\_02\_11) cross section and its uncertainty (shaded red bands) as well as other contemporary neutrino generators.} \label{fig:xsec_comparison} \end{figure} \begin{figure}[h] \centering \includegraphics[width=0.49\textwidth]{\xsecPlotDir/errorSummary_xsec_panels.pdf} \caption{Error budget for the semi-inclusive NC$\pi^0$, exclusive NC$\pi^0$+1p, and exclusive NC$\pi^0$+0p cross section measurements.} \label{fig:xsec_uncertainty} \end{figure} To further understand this measurement, it is instructive to compare it to previous experimental measurements of NC$\pi^0$ production. We compare our measurement to that performed by MiniBooNE which operated in the same beamline as MicroBooNE but which utilized a different detector material (mineral oil, CH$_2$) as the neutrino scattering target. In MiniBooNE's NC $\pi^0$ analysis, they measured NC interactions wherein only one $\pi^0$ and no additional mesons exited the target nucleus (no requirement on the number or identity of outgoing nucleons was made). A final flux-averaged cross section of 4.76 $\pm$ 0.76 $\pm$ 0.05 [$10^{-40}$cm$^2$/nucleon] was reported \cite{MiniBooNE:2009dxl}. We can compare this result to our semi-inclusive result by comparing each to the same neutrino generator. This is shown in Fig.~\ref{fig:compare_uB} where we compare both to the default \textsc{GENIE} v3.0.6 on argon and mineral oil respectively. We observe that while this result on argon lies slightly below the expected central value, both our result and MiniBooNE's agree with \textsc{GENIE} v3.0.6 within assigned uncertainties. \begin{figure}[h] \centering \includegraphics[width=0.49\textwidth]{\xsecPlotDir/compare_uB_v_MB.pdf} \caption{Comparison of this semi-inclusive result on argon (left) as well as that from MiniBooNE on mineral oil CH$_2$ (right), to the same \textsc{GENIE} v3.0.6. While the published MiniBooNE result was originally compared to a prediction made using the \textsc{NUANCE} v3 generator \cite{Casper:2002sd}, we have instead generated a prediction using GENIE to aid in a comparison between the two experimental results. MiniBooNE's statistical uncertainty is small and only the systematic error bar is visible. Shaded error bands show \textsc{GENIE} uncertainty only.} \label{fig:compare_uB} \end{figure} \section{Analysis Overview} This measurement uses data corresponding to a BNB exposure of $5.89\times10^{20}$~protons on target (POT), collected during the period 2016--2018 and referred to as ``Runs 1--3'' in many of the subsequent figures. Neutrino-argon interactions are simulated using a custom tune \cite{MicroBooNE:2021ccs} of the \textsc{genie} neutrino event generator v3.0.6 \cite{Andreopoulos:2009rq,GENIE:2021zuu} (based on model set G18\_10a\_02\_11a) adopted by the MicroBooNE Collaboration. This tune specifically targets CC quasi-elastic (QE) and CC multi-nucleon interaction models and overall has very little direct effect on this NC-focused analysis. \textsc{genie} v3 uses the Berger-Sehgal~\cite{Rein:1980wg,Berger:2007rq} model for resonant production of $\pi^0$ and includes improved agreement with an expanded data set for the $A$-dependence of final state interactions (FSI), updated form factors \cite{Graczyk:2008}, updated diagrams for pion production processes \cite{Berger:2007rq,Kuzmin:2004,Nowak:2009}, and a new tune to neutrino-proton and neutrino-deuterium cross-section data \cite{GENIE:2021zuu}. The MicroBooNE Monte Carlo (MC) prediction further makes use of \textsc{geant4} v4\_10\_3\_03c \cite{GEANT4:2002zbu} for particle propagation and re-interactions within the detector and a custom detector response model all implemented within the LArSoft framework~\cite{Snider_2017}. The MicroBooNE data and MC reconstruction chain begins by reading out and processing the ionization charge signals detected on the 8,192 wires that make up the three anode planes of the MicroBooNE LArTPC. The procedure includes noise removal \cite{MicroBooNE:2017qiu} and signal processing as described in \cite{MicroBooNE:2018swd} and \cite{MicroBooNE:2018vro}. Localized regions of interest referred to as ``hits'' are then identified and fit to Gaussian pulses. The collection of these hits and their characteristics such as readout time, wire channel number, and integrated charge are then used as input to the Pandora pattern recognition framework for further processing \cite{Marshall:2015rfa}. The Pandora framework clusters and matches hits across three 2D projected views of the MicroBooNE active TPC volume to form 3D reconstructed objects. These objects are then classified as track-like or shower-like based on a multivariate classifier score and aggregated into candidate neutrino interactions. Pandora also reconstructs a candidate neutrino interaction vertex based on the position and orientation of the reconstructed tracks and showers which represents the most likely position of the neutrino interaction. Being a surface detector, MicroBooNE is subject to a constant stream of high-energy cosmic rays impinging on the detector that substantially outnumber the neutrino interactions and form the largest background to candidate neutrino interactions. To incorporate the effect of cosmic-ray contamination in the simulation, cosmic ray data recorded \textit{in situ} at MicroBooNE, when the beam is not present, are used as overlays (at the wire signal waveform level) to simulated neutrino interactions. During the 2.3 ms that it takes to ``drift'' ionization charge associated with neutrino interaction final states across the maximum 2.56 m drift distance, $\mathcal{O}(10)$ cosmic rays are expected to enter the detector. In order to reduce this cosmic-ray contamination, scintillation light recorded by the MicroBooNE photo-detector system is matched to candidate neutrino interactions during reconstruction and is also required to occur in time with the 1.6~$\mu$s long BNB neutrino spill. To select a high-purity sample of BNB neutrino NC $1\pi^0$ interactions, a series of topological, pre-selection, and boosted decision tree (BDT)-based selections are applied. This results in two mutually exclusive final selection topologies: $2\gamma1p$, which targets two photons and one proton in the final state, and $2\gamma0p$, which targets two photons and zero protons in the final state. The different selection stages are described below, along with the details of the systematic uncertainty evaluation. \subsection{Topological Selection and Pre-Selection} The event selection begins with topology-based criteria for candidate neutrino interactions identified by Pandora and targets two mutually exclusive topological definitions: (a) two showers and one track ($2\gamma 1p$), and (b) two showers and zero tracks ($2\gamma 0p$). The two showers correspond to the photons expected from $\pi^0$ decay. The presence of a track corresponds to a reconstructed proton exiting the nucleus while the zero-track case suggests either a low-energy proton that is not reconstructed or no charged hadrons at all exiting the nucleus. Once events with the desired signal topologies are identified, a series of loose ``pre-selection'' requirements is applied to reduce obvious backgrounds or mis-reconstructed events. These pre-selection requirements include shower energy thresholds of 30~MeV for the leading shower and 20~MeV for the subleading shower in both topologies. The pre-selection also requires that the reconstructed neutrino interaction point be contained in a fiducial volume, defined as at least 5~cm away from any TPC wall, in order to help reduce the number of selected events with tracks that exit the detector. For the 2$\gamma$1p topology, the non-zero conversion distance of photons is explicitly used by requiring that each shower has a reconstructed start point of at least 1~cm from the reconstructed neutrino interaction vertex. Typically the reconstructed neutrino interaction vertex is identified as the start of the reconstructed proton candidate track. In order to remove a very small number of poorly reconstructed events in which the candidate track is not consistent with the hypothesis of originating from the candidate neutrino interaction vertex, a requirement is placed to ensure the track start point is always within 10~cm of the reconstructed neutrino interaction vertex. The efficiency of selecting NC $1\pi^0$ + 0 (1)p events using these pre-selection requirements is 82.1\% (63.6\%). Note that the efficiency of the 1p selection is lower because of the additional requirements placed on the track reconstruction. \subsection{Boosted Decision Tree-Based Selection} After applying the pre-selection requirements, the remaining signal and background are further differentiated and separated using two tailored BDTs trained on simulation. The gradient boosting algorithm XGBoost \cite{Chen:2016:XST:2939672.2939785} is used to train each of the BDTs. They take as input various reconstructed kinematic, geometric, and calorimetric variables both for the signal (defined as an NC interaction with identically one $\pi^0$ in the final state) and for the background interactions. Because the two tailored BDTs target different topologies, notably including one track in the case of $2\gamma1p$ and zero tracks in the case of $2\gamma0p$, the signal definitions used for the two BDTs are slightly different. NC $\pi^0$ events with exactly one proton with true kinetic energy above 20~MeV are used as the training signal for the $2\gamma1p$ BDT while NC $\pi^0$ events with no protons with true kinetic energy above 20 MeV are used as the training signal for the $2\gamma0p$ BDT. We note that the 20 MeV threshold used in the BDT training is lower than the 50 MeV proton kinetic energy threshold used later during cross-section extraction, as during training we are aiming to push the threshold as low as possible. Each BDT is trained on ten reconstructed variables. Due to the existence of a proton candidate track in the $2\gamma1p$ sample, these ten variables differ for each BDT. They are listed below.\\ \noindent \textbf{Variables used in both $\bm{2\gamma1p}$ and $ \bm{2\gamma0p}$ BDTs:} \begin{itemize} \item Leading and subleading shower impact parameters: The perpendicular distance between the back-projection of the reconstructed shower and the candidate neutrino interaction point which is a metric of how well each shower ``points'' back to the reconstructed neutrino interaction point. \item Leading and subleading shower conversion distances: Defined as the distance between the reconstructed start of the shower and reconstructed neutrino interaction point. \item Reconstructed energy of the leading shower. \end{itemize} \noindent \textbf{Variables used in only the $\bm{2\gamma1p}$ BDT:} \begin{itemize} \item Reconstructed track length. \item Reconstructed track vertical angle: Defined as the arctangent of the track direction in the vertical plane with respect to the beam axis. \item Distance from track end to TPC wall: Calculated as the shortest distance to the closest TPC wall. \item Reconstructed mean energy deposition per unit length ($dE/dx$) of the track. \item Ratio of $dE/dx$ of the first half of track to that of the second half of the track: A metric for identifying stopping proton tracks that contain a Bragg peak. \end{itemize} \noindent \textbf{Variables used in only the $\bm{2\gamma0p}$ BDT:} \begin{itemize} \item Reconstructed energy of the subleading shower. \item Leading and subleading shower geometric length per unit energy: The ratio of each shower's geometric length to its reconstructed energy. The geometric length is an estimate of the 3D extent of the electromagnetic shower. \item Pandora ``neutrino score'': A multivariate classifier in the Pandora reconstruction suite which scores all reconstructed neutrino candidates based on their geometric and kinematic features as to how likely a candidate is due to a neutrino interaction or cosmic in origin. \item Reconstructed leading shower vertical angle: Direction in the vertical plane with respect to the beam axis. \end{itemize} By construction BDT scores lie on the interval of [0, 1]. After training, the resulting BDT score distributions, tested on a statistically independent simulation and data set, are shown in Fig.~\ref{fig:bdt_responses}. The simulation and data points agree across the full range of BDT classifier score within systematic and statistical uncertainties (the definition of these systematic uncertainties is described in detail in Sec.~\ref{sec:systematics}). The bimodal distribution of the $2\gamma1p$ BDT response indicates greater separation power between signal and background compared to that for $2\gamma0p$ because the addition of the reconstructed track gives access to an entirely separate handle on background rejection. For this and subsequent MC simulation comparisons to data, the simulation predictions are broken down into the following eight categories, based on \textsc{genie} truth-level information: \begin{itemize} \item NC 1$\pi^0$: All neutral current interactions that produce one exiting $\pi^0$ regardless of incoming neutrino flavor. This is our targeted signal selection, and it is further split into two sub-categories, ``NC 1$\pi^0$ Coherent'' and ``NC 1$\pi^0$ Non-Coherent'' contributions, based on their interaction types. \item NC $\Delta \rightarrow N\gamma$: Leading Standard Model source of NC single-photon production below 1~GeV originating from radiative decay of the $\Delta(1232)$ baryon. \item CC $\nu_\mu 1 \pi^0$: All $\nu_\mu$ CC interactions that have one true exiting $\pi^0$. \item CC $\nu_e/\overline{\nu}_{e}$ Intrinsic: All CC $\nu_e$ or $\overline{\nu}_{e}$ interactions regardless of whether or not a $\pi^0$ was emitted. \item BNB Other: All remaining BNB neutrino interactions that take place in the active TPC volume of MicroBooNE and are not covered by the above five categories. \item Dirt (Outside TPC): All BNB neutrino interactions that take place outside the MicroBooNE active TPC but have final states that enter and interact inside the active TPC detector. This can originate from scattering off liquid argon in the cryostat vessel outside the active TPC volume or from interactions in the concrete and ``dirt'' surrounding the cryostat itself. \item Cosmic Data: Coincident cosmic ray interactions that take place during a BNB spill but without any true neutrino interaction present. \end{itemize} The final NC $1\pi^0$-enriched samples are selected by placing a requirement on the BDT score distribution that maximizes the product of NC $1\pi^0$ signal efficiency and purity. This corresponds to a threshold on the BDT scores of $>0.854$ and $>0.950$ for $2\gamma1p$ and $2\gamma0p$, respectively. The final distributions are provided and discussed in Sec.~\ref{finaldistr}. \begin{figure}[h] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_combined_datamc_Data2g1pFiltered_2gamma1pNC1pi0BDTResponse_stage_1WineCheese_v1BDTO_Wline.pdf} \vspace{-1cm} \caption{$2\gamma 1p$} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_2g0p_combined_datamc_Data2g0pFiltered_2gamma0pNC1pi0BDTResponse_stage_1WineCheese_v1BDTO_Wline.pdf} \vspace{-1cm} \caption{$2\gamma 0p$} \end{subfigure} \caption{The BDT classifier score for (a) $2\gamma 1p$ and (b) $2\gamma 0p$ targeted selections. Higher scores indicate more NC $1\pi^0$ signal-like events, and lower scores indicate more background-like events. The red vertical lines indicate the threshold positions, keeping all events to the right, for the final selections. The distribution above 0.95 is omitted for $2\gamma1p$ because there are no events in this region.} \label{fig:bdt_responses} \end{figure} \subsection{Systematic Uncertainty Evaluation} \label{sec:systematics} Systematic uncertainties on the MC simulation prediction include contributions from uncertainties in the neutrino flux, the cross-section modeling, hadron re-interactions, detector effects, and the effect of finite statistics used in the background predictions (both simulations and cosmic ray data). The flux systematic uncertainties incorporate hadron production uncertainties where the Booster proton beam hits the beryllium target, uncertainties on pion and nucleon scattering in the target and surrounding aluminum magnetic focusing horn of the BNB, and mismodeling of the horn current. Following \cite{MicroBooNE:2019nio}, these are implemented by reweighting the flux prediction according to neutrino type, parentage, and energy, and studying the propagated effects on the final event distributions. The cross-section uncertainties incorporate modeling uncertainties on the \textsc{genie} prediction~\cite{MicroBooNE:2021ccs,Andreopoulos:2009rq,GENIE:2021zuu}, evaluated by \textsc{genie} reweighting tools. The default \textsc{genie} uncertainties on NC resonant production arising from NC resonant vector and axial mass parameters of $m_V = 0.840 \pm 0.084 $ GeV and $m_A = 1.120 \pm 0.224 $ GeV, respectively, were assumed. \textsc{genie} uses an effective cascade empirical model for hadronic final-state interactions, called \emph{hA2018}, which allows for reweighting to estimate the effect on final distributions. For more information on cross-section uncertainties in MicroBooNE, please see \cite{MicroBooNE:2021ccs}. The hadron-argon reinteraction uncertainties are associated with the propagation of hadrons through the detector, as modeled in \textsc{geant4} \cite{GEANT4:2002zbu}. Both charged pions and proton reinteractions during propagation were considered and their impact estimated using the \textsc{geant4reweight} tool \cite{Calcutt:2021zck}. The detector modeling and response uncertainties are evaluated using MicroBooNE's novel data-driven technique for assessing and propagating LArTPC detector-related systematic uncertainties \cite{MicroBooNE:2021roa}. This approach uses \textit{in situ} measurements of distortions in the TPC wire readout waveform signals -- caused by detector effects such as electron diffusion, electron drift lifetime, electric field, and the electronics response -- to parameterize these effects at the TPC wire level. This provides a detector model-agnostic way to study and evaluate their effects on the high level variables and, subsequently, the final event distributions. Additional detector systematics corresponding to variations in the charge recombination model, the scintillation light yield, and space charge effects~\cite{MicroBooNE:2019koz,MicroBooNE:2020kca} are separately evaluated and also included. \subsection{Shower Energy Calibration} Electromagnetic shower reconstruction in LArTPCs is known to be a lossy process primarily due to mis-clustering and thresholding effects. Current reconstruction algorithms often miss small, low-energy hits in an electromagnetic shower when clustering objects, and some of the hits that are reconstructed may fall below the energy threshold. On average, these effects are expected to yield shower energy losses of approximately 20\% \cite{caratelli2018}. This can be seen in Fig.~\ref{fig:shower_energy_correction} where the reconstructed shower energy falls systematically below the true shower energy in simulation. By performing a linear fit to the most probable values of reconstructed shower energy in bins of true shower energy, shown as the pink straight line in Fig.~\ref{fig:shower_energy_correction}, a correction factor is extracted which brings the reconstructed values closer to expectation. This fit results in an energy correction that is applied to all reconstructed showers, \begin{equation}\label{eqn:ncpi0_energy_corr_factor} E_{\textrm{corr}} = (1.21 \pm 0.03)E_{\textrm{reco}} + (9.88 \pm 4.86) \ \textrm{MeV}, \end{equation} and represents a correction of approximately 20\%, as expected. \begin{figure} \includegraphics[width=0.48\textwidth]{Plots/Selection/plot_max_run1.pdf} \caption{Reconstructed shower energy vs. true shower energy for a sample of simulated true NC $1\pi^0$ events. Only showers with a reconstructed energy of at least $20$~MeV are considered.} \label{fig:shower_energy_correction} \end{figure} \subsection{Final Selected Spectra} \label{finaldistr} \begin{figure}[h!] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Validation/ncpi0BDT_Wuboone.pdf} \label{fig:ncpi0_eff_mom} \caption{$\pi^0$ momentum dependence} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Validation/NCPi0ProtonBDT2_Wuboone.pdf} \label{fig:ncpi0_eff_pro} \caption{Proton kinetic energy dependence} \end{subfigure} \caption{Efficiencies of the final $2\gamma1p$, $2\gamma0p$ and combined $2\gamma(0+1)p$ selections as a function of (a) true $\pi^0$ momentum and (b) true leading exiting proton kinetic energy. Events in which there are no exiting protons are included in the first bin. As can be seen, a threshold of $\approx$ 50 MeV proton kinetic energy is where events start to shift between the $2\gamma0p$ and $2\gamma1p$ selections. } \label{fig:ncpi0_eff} \end{figure} After applying the BDT requirements, 1130 selected data events remain with 634 and 496 falling into the $2\gamma1p$ and $2\gamma0p$ selections, respectively. For the $2\gamma 1p$ selection, the BDT score requirement efficiency is 69.9\% and the purity is 63.5\% while for the $2\gamma 0p$ selection, the efficiency and purity are 54.8\% and 59.6\%, respectively. The $2\gamma 1p$ and $2\gamma 0p$ BDT selection efficiencies and purities are both calculated relative to a NC 1$\pi^0$ final state, allowing for any number of protons. The efficiencies at each stage of the analysis are provided in Table~\ref{tab:efficiencies}, and the total efficiency for each selection is shown as a function of (a) true $\pi^0$ momentum and (b) true proton kinetic energy in Fig.~\ref{fig:ncpi0_eff}. Overall, the $1p$ selection is more efficient and of higher signal purity relative to the $0p$ selection due to the existence of a reconstructed particle track which greatly helps to tag the neutrino interaction point and reject backgrounds. This track information, particularly track calorimetry, provides an additional handle on the neutrino interaction mode; a proton-like track is highly indicative of an NC $1\pi^0$ interaction whereas CC interactions generally have a muon track in the final state. \begin{figure}[h] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[trim={0 1.5cm 0 0},clip,width = \textwidth]{Plots/Selection/pigLEE_combined_datamc_Data2g1pFiltered_Reconstructedpi0InvariantMassGeVc2_stage_2WineCheese_v1_WFIT_EDIT.pdf} \caption{$2\gamma 1p$} \label{fig:ncpi0_invar_2g1p} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[trim={0 1.5cm 0 0},clip, width = \textwidth]{Plots/Selection/pigLEE_2g0p_combined_datamc_Data2g0pFiltered_Reconstructedpi0InvariantMassGeVc2_stage_2WineCheese_v1_WFIT_EDIT.pdf} \caption{$2\gamma 0p$} \label{fig:ncpi0_invar_2g0p} \end{subfigure} \caption{The reconstructed diphoton invariant mass for both the (a) $2\gamma1p$ and (b) $2\gamma0p$ final selected data. The result of fitting a Gaussian plus linear function to the data is shown in cyan.} \label{fig:ncpi0_invar} \end{figure} \begin{table}[h!] \caption{NC $1\pi^0$ efficiencies for the $2\gamma1p$ and $2\gamma0p$ selections. The topological and combined efficiencies are evaluated relative to all true NC $1\pi^0$ events inside the active TPC. The pre-selection and BDT selection efficiencies are evaluated relative to their respective preceding selection stage. The final efficiencies are the combined total efficiency for each selection. } \begin{tabular}{lrrr} \hline\hline Selection Stage & $2\gamma1p$ eff. & $2\gamma0p$ eff. \\ \hline Topological & 10.5\% & 6.60\% \\ Pre-selection & 59.4\% & 77.3\% \\ BDT Selection & 69.9\% & 54.8\% \\ \hline Final Efficiencies & 4.36\% & 2.81\% \\ \hline\hline \end{tabular} \label{tab:efficiencies} \end{table} The resulting distributions as a function of the reconstructed two-photon invariant mass are shown in Fig.~\ref{fig:ncpi0_invar}. The invariant mass is reconstructed from the energy and direction of the two photon candidate showers as \begin{equation} M_{\gamma \gamma}^2 = 2 E_{\gamma 1} E_{\gamma 2} (1- \cos \theta_{\gamma\gamma}), \label{eq:invariant_mass} \end{equation} where $\cos \theta_{\gamma\gamma}$ is the opening angle between the two showers. For the $2\gamma1p$ case where a track has been identified as a candidate proton, the directions of the showers and thus the opening angle between them are calculated by constructing the direction between the candidate neutrino interaction point and the shower start point. For the $2\gamma0p$ selection, however, no such candidate track exists. Instead, the shower direction and opening angle are entirely estimated from the geometric shape of the showers themselves. A Gaussian-plus-linear fit is performed to each observed distribution in data to extract the reconstructed $\pi^0$ invariant mass while taking into account the non-$\pi^0$ background contamination. For the $2\gamma 1p$ event sample, this fit gives a Gaussian mean of 138.9$\pm$2.1~MeV/$c^2$ with a width of 31.7$\pm$2.4~MeV/$c^2$. For the $2\gamma 0p$ event sample, the corresponding fit gives a Gaussian mean of 143.3$\pm$3.2~MeV/$c^2$ with a width of 47.9$\pm$4.9~MeV/$c^2$. As a goodness-of-fit test, the resulting $\chi^2$ per degree of freedom is 1.20 and 1.45 for the $2\gamma 1p$ and $2\gamma 0p$ fits, respectively. These both show agreement with the expected invariant mass of the $\pi^0$ of $134.9770\pm0.0005$ MeV/$c^2$ \cite{ParticleDataGroup:2020ssz} giving confidence and validation of the calorimetric energy reconstruction of the showers. Additional distributions showing the reconstructed $\pi^0$ momentum as well as the reconstructed angle of the outgoing $\pi^0$ with respect to the incoming neutrino beam are provided in Fig.~\ref{fig:ncpi0_costheta}. \begin{figure*}[h!t] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_combined_datamc_Data2g1pFiltered_Reconstructedpi0MomentumGeVc_stage_2WineCheese_v1.pdf} \vspace{-1cm} \caption{$2\gamma 1p$: Reconstructed $\pi^0$ momentum} \label{fig:ncpi0_mom_2g1p} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_2g0p_combined_datamc_Data2g0pFiltered_Reconstructedpi0MomentumGeVc_stage_2WineCheese_v1.pdf} \vspace{-1cm} \caption{$2\gamma 0p$: Reconstructed $\pi^0$ momentum} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_combined_datamc_Data2g1pFiltered_Reconstructedcostheta_pi0_stage_2WineCheese_v1.pdf} \vspace{-1cm} \caption{$2\gamma 1p$: Reconstructed cosine of $\pi^0$ angle} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_2g0p_combined_datamc_Data2g0pFiltered_Reconstructedcostheta_pi0_stage_2WineCheese_v1.pdf} \vspace{-1cm} \caption{$2\gamma 0p$: Reconstructed cosine of $\pi^0$ angle} \end{subfigure} \caption{The reconstructed $\pi^0$ momentum ((a) and (b)) and reconstructed $\pi^0$ angle with respect to the neutrino beam ((c) and (d)) for both the $2\gamma1p$ ((a) and (c)) and $2\gamma0p$ ((b) and (d)) final selected data. The prediction shows agreement with the observed data within assigned uncertainties for the ranges shown, although a systematic deficit is observed in the total event rates as is discussed in Sec.~\ref{sec:deficit}.} \label{fig:ncpi0_costheta} \end{figure*} Two additional reconstructed distributions of interest are highlighted. First, the reconstructed cosine of the center-of-mass (CM) decay angle is shown in Fig.~\ref{fig:ncpi0_costhetacm}. This is defined as the angle between the lab-frame $\pi^0$ momentum direction and the decay axis of the two daughter photons in the CM frame, \begin{equation} \cos\theta_\text{CM} = \frac{E_{\pi^0}}{|P_{\pi^0}|}\frac{|E_{\gamma1} - E_{\gamma2}|}{E_{\gamma1} + E_{\gamma2}}. \label{eq:cos_theta} \end{equation} \noindent This quantity should be an isotropic flat distribution for true $\pi^0 \rightarrow \gamma\gamma$ signal events, and any deviation from this can highlight regions of inefficiency in reconstruction or selection. As can be seen in Fig.~\ref{fig:ncpi0_costhetacm}, for both $2\gamma1p$ and $2\gamma0p$ selections, the distributions taper off at high $\cos \theta_\text{CM}$ which corresponds to increasingly asymmetric $\pi^0$ decays. When reconstructing asymmetric $\pi^0$ decay events, it is more likely that the subleading photon shower is missed due to its low energy. Note, however, that the observed data show the same trend as the simulation within uncertainty. Figure~\ref{fig:ncpi0_conv} additionally highlights the reconstructed photon conversion distance for all showers in the final $2\gamma1p$ selection. Well-reconstructed showers with conversion distances as far as 100~cm from the candidate neutrino interaction are observed. This helps validate the assumption that the reconstructed showers are indeed likely to be true photons as $\mathcal{O}$(100)~MeV photons are expected to have a mean free path in argon of $\approx 20$~cm. Note that, as the $2\gamma0p$ selection does not have any visible hadronic activity for tagging the interaction point, the corresponding conversion distance is significantly harder to estimate. \begin{figure}[h] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_combined_datamc_Data2g1pFiltered_Reconstructedcostheta_CM_stage_2WineCheese_v1} \vspace{-1cm} \caption{$2\gamma 1p$} \end{subfigure} \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_2g0p_combined_datamc_Data2g0pFiltered_Reconstructedcostheta_CM_stage_2WineCheese_v1.pdf} \vspace{-1cm} \caption{$2\gamma 0p$} \end{subfigure} \caption{The reconstructed cosine of the center-of-mass angle for the (a) $2\gamma1p$ and (b) $2\gamma0p$ final selected data.} \label{fig:ncpi0_costhetacm} \end{figure} \begin{figure}[h!] \centering \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Selection/pigLEE_combined_datamc_Data2g1pFiltered_ReconstructedShowerConversionDistancecm_stage_2WineCheese_v1.pdf} \end{subfigure} \caption{The reconstructed conversion distance of both photons in the $2\gamma1p$ final selection. There are well-reconstructed showers with conversion distances as far as 100~cm from the candidate neutrino interaction.} \label{fig:ncpi0_conv} \end{figure} Finally, Fig.~\ref{fig:ncpi0_evds} shows two example event displays of selected events in data for both the $2\gamma 1p$ and $2\gamma 0p$ topologies. Each event shows two well-reconstructed showers pointing back to a common interaction point with properties consistent with those being photons from a $\pi^0$ decay. \begin{figure} \centering \begin{subfigure}{0.44\textwidth} \includegraphics[width=\textwidth]{Plots/Selection/2g1p_evd_15318_159_7958_fixed.pdf} \caption{$2\gamma 1p$} \label{fig:2g1p_evd} \end{subfigure} \begin{subfigure}{0.44\textwidth} \includegraphics[width=\textwidth]{Plots/Selection/2g0p_evd_5564_142_7127.pdf} \caption{$2\gamma 0p$} \label{fig:2g0p_evd} \end{subfigure} \caption{Event displays of candidate NC $1\pi^0$ events found in the MicroBooNE data using (a) the $2\gamma 1p$ selection and (b) the $2\gamma 0p$ selection, on the MicroBooNE TPC collection plane. The horizontal axis here corresponds to the increasing wires, with an associated distance in cm. The vertical axis represents the TPC drift time. The aspect ratio of this plot is set such that the length scale shown for the horizontal axis is the same for the vertical axis.} \label{fig:ncpi0_evds} \end{figure} \section{Summary} In summary, we report the highest statistics measurement to date of neutrino neutral current single pion production on argon, including the first exclusive measurements of this process ever made in argon. These cross sections are measured using the MicroBooNE detector exposed to the Fermilab Booster Neutrino Beamline, which has $\langle E_{\nu} \rangle <1$ GeV. As presented within this paper, kinematic distributions of the $\pi^0$ momentum and angle relative to the beam direction provide some sensitivity to contributions to this process from coherent and non-coherent pion production and suggest that, given the currently analyzed MicroBooNE data statistics, the nominal \textsc{genie} neutrino event generator used for MicroBooNE Monte Carlo modeling describes the observed distributions within uncertainties. This has provided an important validation check justifying the use of this sample as a powerful constraint for backgrounds to single-photon searches in MicroBooNE, \textit{e.g.}~in \cite{MicroBooNE:2021zai}. Using a total of 1,130 observed NC $\pi^0$ events, a flux-averaged cross section has been extracted for neutrinos with a mean energy of 804 MeV and has been found to correspond to $1.243\pm0.185$ (syst) $\pm0.076$ (stat), $0.444\pm0.098\pm0.047$, and $0.624\pm0.131\pm0.075$ $[10^{-38}\textrm{cm}^2/\textrm{Ar}]$ for the semi-inclusive NC$\pi^0$, exclusive NC$\pi^0$+1p, and exclusive NC$\pi^0$+0p processes compared to $1.678$, $0.722$, and $0.774$ $[10^{-38}\textrm{cm}^2/\textrm{Ar}]$ in the default \textsc{genie} prediction used by MicroBooNE. Comparison to other generators including \textsc{neut} and \textsc{NuWro} show reasonable agreement with the \textsc{neut} predictions found to be slightly more consistent with the MicroBooNE data-extracted cross-section for all three exclusive and semi-inclusive processes. \section{Introduction} Neutrino-nucleus cross-sections have been the subject of intense study both experimentally and within the theory community in recent years due to their role in interpreting neutrino oscillation measurements and searches for other rare processes in neutrino scattering \cite{Benhar:2015wva}. While neutrino oscillation experiments primarily rely on measuring the rate of charged current (CC) interactions, it is also important that we build a solid understanding of inclusive and exclusive neutral current (NC) neutrino interactions. NC neutrino interactions are of particular importance to $\nu_e$ and \nuebar{} measurements in the energy range of a few hundred MeV. This is especially true for detectors that cannot perfectly differentiate between photon- and electron-induced electromagnetic showers, and therefore where NC $\pi^0$ production can be misidentified as $\nu_e$ or \nuebar{} CC scattering. Misidentification of photons as electrons complicates the interpretation of $\nu_e$ appearance measurements aiming to measure subtle signals. These include ~sterile neutrino oscillation searches with the upcoming Short Baseline Neutrino (SBN) experimental program \cite{SBNproposal} and CP violation measurements and mass hierarchy determination with the future Deep Underground Neutrino Experiment (DUNE) \cite{DUNE:2020ypp}. Furthermore, NC $\pi^0$ events can contribute as background to searches for rare neutrino scattering processes such as NC $\Delta$ resonance production followed by $\Delta$ radiative decay, or NC coherent single-photon production at energies below 1~GeV \cite{MicroBooNE:2021zai}. This is primarily a consequence of the limited geometric acceptance of some detectors, whereby one of the photons from a $\pi^0$ decay can escape the active volume of the detector. Depending on a detector's ability to resolve electromagnetic shower substructure, NC $\pi^0$ events can further contribute as background to searches for new physics beyond the Standard Model (BSM), such as $e^+e^-$ production predicted by a number of BSM models \cite{Bertuzzo:2018itn,Ballett:2018ynz,Abdullahi:2020nyr,Dutta:2020scq,Abdallah:2020vgg}. Finally, NC measurements themselves can provide a unique channel for probing new physics. For example, searches for non-unitarity in the three-neutrino paradigm or searches for active to sterile neutrino oscillations are possible via NC rate disappearance measurements \cite{Cianci:2017okw,Furmanski:2020smg}. Such searches can provide complementary information to non-unitarity or light sterile neutrino oscillation parameters otherwise accessible only through CC measurements. Using a liquid argon time projection chamber (LArTPC) as its active detector, MicroBooNE \cite{MicroBooNE:2016pwy} shares the same technology and neutrino target nucleus as the upcoming SBN and future DUNE experiments. MicroBooNE's 85 metric ton active volume LArTPC is situated 468.5~m away from the proton beam target in the muon-neutrino-dominated Booster Neutrino Beam (BNB) at Fermilab~\cite{BNBflux} which is also used by SBN. The resulting neutrino beam has a mean energy $\langle E_\nu\rangle = 0.8$~GeV and is composed of $93.7\%~\nu_\mu$, $5.8\%~\bar{\nu}_\mu$, and $0.5\%~\nu_e/\bar{\nu}_e$. MicroBooNE's cross-section measurements on argon are therefore timely and directly relevant to these future (SBN and DUNE) programs. We present the first measurement of neutrino-induced NC single-$\pi^0$ ($1\pi^0$) production on argon with a mean neutrino energy in the 1~GeV regime, which is also the highest-statistics measurement of this interaction channel on argon to date. This measurement is relevant to the physics programs of experiments that operate in the few-GeV regime (SBN~\cite{SBNproposal}, DUNE~\cite{DUNE:2020ypp}, NO$\nu$A~\cite{MINERvA:2016iqn,NOvA:2019bdw}, T2K~\cite{T2Kflux}, and Hyper-K~\cite{Hyper-KamiokandeProto-:2015xww}), especially those which share argon as a target material. Additionally, this measurement has been used to provide an indirect constraint to the rate of NC $1\pi^0$ backgrounds in MicroBooNE's recent search for a single-photon excess \cite{MicroBooNE:2021zai}. The only previous results for NC $1\pi^0$ scattering on argon are from the ArgoNeuT collaboration using the NuMI beam which has a much higher mean neutrino beam energy of 9.6 GeV for $\nu_\mu$ and of 3.6 GeV for $\overline{\nu}_\mu$ \cite{ArgoNeuT:2015ldo}. The interaction final states that are measured in this analysis are defined as \begin{eqnarray} \label{reaction} \nu + \mathcal{A} \rightarrow \nu + \mathcal{A'} + \pi^0 + X, \end{eqnarray} where $\mathcal{A}$ represents the struck (argon) nucleus, $\mathcal{A'}$ represents the residual nucleus, and $X$ represents exactly one or zero protons plus any number of neutrons, but no other hadrons or leptons. The protons are identifiable in the MicroBooNE LArTPC by their distinct ionizing tracks while the $\pi^0$ is identifiable through the presence of two distinct electromagnetic showers, one for each photon from the $\pi^0\rightarrow\gamma\gamma$ decay, with kinematic properties such that they reconstruct to approximately the $\pi^0$ invariant mass. These one proton and zero proton samples are used first to perform a rate validation check and subsequently in three distinct cross-section measurements. By leveraging the capability of LArTPCs to detect and identify protons we perform the world's first exclusive NC$\pi^0$+0p and NC$\pi^0$+1p cross-section extractions and additionally measure the cross-section for NC$\pi^0$ interactions semi-inclusively using both the one proton and zero proton samples combined. Each of these cross-section extractions utilizes a distinct signal definition. The signal definitions for the two exclusive measurements place a threshold on true proton kinetic energy of greater than 50 MeV, while the semi-inclusive measurement allows for any number of protons. The signal definitions for all three measurements also require that there are no other hadrons or leptons in the final state (as noted above). MeV-scale photons, which may arise from nuclear de-excitation processes within the struck nucleus, are allowed in the final state. Finally, the signal definitions allow for interactions of all flavors of neutrinos that are present: $\nu_\mu$, $\bar{\nu}_\mu$, $\nu_e$, and $\bar{\nu}_e$. These definitions are comparable to other historical NC $\pi^0$ measurements which typically require one and only one $\pi^0$ meson and little hadronic activity in the detector \cite{Barish:1974fe,Derrick:1980xw,Lee:1976wr,GargamelleNeutrinoPropane:1977hya,MiniBooNE:2008mmr,MiniBooNE2011,MiniBooNE:2009dxl,SciBooNE:2010NCpi0,K2K:2004qpv}. This differs from the more inclusive approach of the ArgoNeuT experiment motivated both by its higher energy beam as well as the need to mitigate the low statistics of its data sample \cite{ArgoNeuT:2015ldo}. Making use of the MicroBooNE LArTPC's power in examining hadronic final state multiplicities and kinematic properties with high resolution, the flux-averaged cross-sections extracted in this analysis extend our understanding of this important interaction channel. The simultaneous measurement of exclusive and semi-inclusive cross-sections in particular provides additional information for the tuning of NC $1\pi^0$ production cross sections and nuclear final state interactions in neutrino-argon scattering models. \section{NC $\pi^0$ Rate Validation } \label{sec:deficit} NC $1\pi^0$ events contribute as a dominant background to NC single-photon production measurements carried out or planned by MicroBooNE such as searches for NC $\Delta$ radiative decay \cite{MicroBooNE:2021zai}, NC coherent single-photon production, or more rare $e^{+}e^{-}$ pair production motivated in BSM theories. In addition to using these selected events as a calibration sample for understanding and validating shower reconstruction performance, they are also used to validate the observed overall rate of this process as currently modeled with \textsc{genie}. Assuming \textsc{genie} provides a sufficient description of the observed data, this sample can and has been used to provide an \textit{in situ} constraint on NC $1\pi^0$ mis-identified backgrounds, \textit{e.g.}~as in \cite{MicroBooNE:2021zai}. Alternatively, these measurements can be used to motivate \textsc{genie} tuning. As shown in Fig.~\ref{fig:ncpi0_costheta}, both the $2\gamma1p$ and the $2\gamma0p$ selections see an overall deficit in data relative to the MC prediction. This is more pronounced in the $2\gamma1p$ selection where the ratio of the number of selected data events to the number of selected simulated events is 0.79. As it is also known that the \textsc{genie} branching fraction of coherent NC $1\pi^{0}$ production on argon is significantly lower than expectation extrapolated from MiniBooNE's $\pi^{0}$ measurement on mineral oil~\cite{MiniBooNE:2008mmr}, the possibility of a correction to \textsc{genie} predictions on both non-coherent and coherent NC $1\pi^0$ production is explicitly examined. The MC predictions are fitted to data allowing both coherent and non-coherent NC $1\pi^{0}$ rates to vary. Both normalization-only and normalization plus shape variations to the coherent and non-coherent rates are explored; all yield similar conclusions. This section describes the normalization plus shape variation fit in detail. The normalization plus shape variation fit is performed as a function of reconstructed $\pi^0$ momentum for both 2$\gamma1p$ and $2\gamma0p$ selections, using [0, 0.075, 0.15, 0.225, 0.3, 0.375, 0.45, 0.525, 0.6, 0.675, and 0.9] GeV/c bin limits. In the fit, MC predicted coherent NC $1\pi^0$ events are scaled by a normalization factor $N_{coh}$, and MC predicted non-coherent NC $1\pi^0$ events are scaled on an event-by-event basis depending on their corresponding true $\pi^0$ momentum according to $(a+b|\vec{p}^{~true}_{\pi^{0}}|)$, where the true $\pi^0$ momentum is given in [GeV/c]. This form of scaling is chosen for non-coherent NC $1\pi^0$ as the simplest correction to the decline in data-to-MC ratio as reconstructed $1\pi^0$ momentum increases, seen in Fig.~\ref{fig:ncpi0_mom_2g1p}. This linear scaling as a function of $\pi^0$ momentum was chosen because it was the simplest implementation that was consistent with the observed data-to-MC deficit, as observed in Fig.~\ref{fig:ncpi0_mom_2g1p}. At each set of fitting parameters ($N_{coh}$, $a$, $b$), a $\chi^2$ is evaluated between the scaled prediction for this parameter set and the observed data using the Combined-Neyman-Pearson $\chi^2$ \cite{Ji:2019yca}. The $\chi^2$ calculation makes use of a covariance matrix including statistical and systematic uncertainties and correlations corresponding to the scaled prediction. Flux, cross section, detector and \textsc{geant4} systematic uncertainties are included in the fit including bin-to-bin systematic correlations. As the goal of the fit is to extract the normalization and scaling parameters of the coherent and non-coherent NC $1\pi^{0}$ rates, the cross-section normalization uncertainties of coherent and non-coherent NC $1\pi^{0}$ are not included. Note that the cross-section normalization uncertainties of coherent and non-coherent NC $1\pi^{0}$ are only removed for the purposes of this fit and not for the cross section extraction described in the following section. The data-extracted best-fit parameters correspond to $N_{coh}=2.6$ for the NC coherent $\pi^0$ normalization factor, and $a=0.98$ and $b=-1.0$~[c/GeV] for the scaling parameters of the non-coherent NC $1\pi^0$ events with a $\chi^2$ per degree of freedom ($dof$) of 8.46/17. The $\chi^2/dof$ at the \textsc{genie} central value (CV) prediction is 13.74/20 yielding a $\Delta\chi^2$ between the \textsc{genie} CV and the best-fit point of 5.28 for 3 $dof$. Although the goodness-of-fit $\chi^2/dof$ values for both scenarios are acceptable due to the generally large uncertainties, the momentum-dependent shift is preferred over the \textsc{genie} CV at the 1.43$\sigma$ level. The 1D marginalized $\Delta\chi^2$ distributions in Fig.~\ref{fig:marginalized_chi} also confirm that the \textsc{genie} CV prediction agrees with data within uncertainty. The data and MC comparisons of the reconstructed $\pi^0$ momentum distributions scaled to the best-fit parameters are provided in Fig.~\ref{fig:momentum_BF} and, compared to those corresponding to the \textsc{genie} CV, show better agreement with data after the fit. \begin{figure}[h!] \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Validation/Marginalized_chi_distribution_uboone.pdf} \end{subfigure} \caption{The distribution of marginalized $\Delta\chi^2$, as a function of flat normalization factor for (a) coherent NC 1$\pi^0$ momentum-independent scaling factor, (b) non-coherent NC 1$\pi^0$ momentum-independent scaling factor, and (c) coefficient of momentum-dependent scaling factor for NC non-coherent 1$\pi^0$, marginalized over the other two parameters. The red arrows indicate parameter values expected for the \textsc{genie} central value prediction. The 1$\sigma$, 90\% and 99\% C.L.~lines are based on the assumption that the distribution follows a $\chi^2$ distribution with 1 degree of freedom. } \label{fig:marginalized_chi} \end{figure} \begin{figure}[h!] \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Validation/Data_MC_comparison_2g1p_uboone.pdf} \caption{$2\gamma1p$} \end{subfigure}% \begin{subfigure}{0.49\textwidth} \includegraphics[width = \textwidth]{Plots/Validation/Data_MC_comparison_2g0p_uboone.pdf} \caption{$2\gamma0p$} \end{subfigure} \caption{The data-MC comparison for (a) $2\gamma1p$ and (b) $2\gamma0p$ selections, as a function of reconstructed $\pi^0$ momentum. Monte Carlo predictions at the central value and at the best-fit point ($\text{N}_{coh} = 2.6$, $a=0.98$, $b=-1.0$~[c/GeV]) are both shown, with prediction and corresponding systematic error evaluated at the \textsc{genie} central value in salmon, and at the best-fit in blue. Note that the systematic uncertainties on the plot include MC intrinsic statistical error and all the systematic errors (flux, cross-section and detector), with the exception of cross section normalization uncertainties on coherent and non-coherent NC 1$\pi^0$.} \label{fig:momentum_BF} \end{figure} While the data suggest that \textsc{genie} may over-estimate NC non-coherent $1\pi^0$ production and under-estimate NC coherent $1\pi^0$ production, the results demonstrate that the \textsc{genie} prediction of NC $1\pi^{0}$s is accurate within uncertainty. This validates the approach of using the measured NC $1\pi^{0}$ event rate as a powerful \textit{in situ} constraint of \textsc{genie}-predicted NC $1\pi^0$ backgrounds as in \cite{MicroBooNE:2021zai}. On the other hand, it is natural to extract a data-driven NC 1$\pi^{0}$ cross-section on argon using these selections, and compare to a number of neutrino event generators, including \textsc{genie}. This is described below.
\section{Introduction} \par Several Human-Robot Collaboration (HRC) scenarios require the realization of reliable motion tracking algorithms for the human. A common approach relies on the use of wearable sensing technologies to achieve the kinematic reconstruction. A reliable reconstruction becomes challenging in the absence of position sensors when using only proprioceptive measurements. This paper contributes towards the development of whole body joint state estimation and floating base estimation using only distributed inertial and force-torque sensing by cascading a Inverse Kinematics (IK) approach with a contact-aided filtering on matrix Lie groups.\looseness=-1 \par In the literature, sensor fusion of measurements from distributed Inertial Measurement Units (IMUs) has been used to estimate human motion assuming bio-mechanical models for the human body and coarsely known location of these sensors in the highly articulated kinematic chain of the model. \cite{miezal2016inertial} compares Extended Kalman Filter (EKF)-based and optimization-based sensor fusion methods for inertial body tracking accounting for robustness to model calibration errors and absence of magnetometer measurements for yaw corrections. The authors further extend their work to ground contact estimation and improve lower-body kinematics estimation in \cite{miezal2017real}. A human moving in space is usually modeled as a floating base system which implies the necessity to consider the evolution of the configuration space of internal joint angles and base pose over a differentiable manifold. \cite{joukov2017human} and \cite{sy2019estimating} both exploit the theory of Kalman filtering over matrix Lie groups for motion estimation by explicitly considering the non-Euclidean geometry of the state space, demonstrating significant improvements over other state representations while maintaining the required computational efficiency for real-time applications. \looseness=-1 \cite{von2017sparse} and \cite{sy2019estimating} both propose human motion tracking with reduced IMU counts while exploiting the complex geometry of the underlying configuration space of the human model and integrating additional physical constraints. The former aims for a full body motion reconstruction while the latter only focuses on the lower body kinematics. Recently, \cite{rapetti2020model} proposed a model-based approach referred to as Dynamical Optimization-based IK, combining dynamical systems’ theory with the IK optimization, for human motion estimation and demonstrated full-motion reconstruction on a human model with 48-DoFs and a 66-DoFs in real-time. However, most of the methods described above either rely on position sensors for full-body estimation or only perform partial kinematics estimation, such as lower body kinematics. \looseness=-1 \begin{figure}[!t] \centering \includegraphics[scale=0.15, width =0.32\textwidth]{figures/inPlac1-color.pdf} \caption{Reconstruction of walking-in-place motion using the proposed method.} \vspace{-2em} \label{fig:walk-in-place} \end{figure} \par In this paper, we present an approach for whole-body kinematics estimation in the absence of position sensors by extending the joint state estimation from the Dynamical IK \cite{rapetti2020model} with a floating base estimation using a Center of Pressure (CoP) based contact detection and an EKF on Lie groups through a cascading architecture. This decomposition is done to handle the floating base estimation within a prediction-correction framework and be able to incorporate contact-aided kinematic measurements without the need for imposing additional constraints in the IK, while remaining computationally light-weight when applied to systems with high degrees of freedom, such as an articulated human model. The validation of the proposed method is demonstrated by reconstructing walking-in-place (Figure \ref{fig:walk-in-place}) and free-walking motions performed by a human subject wearing a sensorized suit and shoes.\looseness=-1 This paper is organized as follows. Section \ref{sec:BACKGROUND} introduces the mathematical notation. Section \ref{sec:ESTIMATION} describes the problem of human motion estimation in the absence of position sensors and describes the overall architecture of the proposed approach. Sections \ref{sec:DYN-IK}, \ref{sec:CONTACT_DETECTION}, and \ref{sec:EKF} each describe the main blocks of the proposed architecture: Dynamical IK, contact detection and the EKF on Lie groups respectively. This is followed by experimental evaluation of the proposed method in Section \ref{sec:RESULTS} and concluding remarks in Section \ref{sec:CONCLUSION}. \looseness=-1 \section{Conclusion} \label{sec:CONCLUSION} In this paper, we presented an approach for whole body kinematics estimation of a human using distributed inertial and force-torque sensing, in the absence of position sensors. This is done by extending a Dynamical IK approach for joint state estimation with floating base estimation using contact-aided filtering on Lie groups. The proposed method was validated qualitatively for flat surface walking and in-place walking motions in comparison with trajectories obtained from Vive motion tracking system. \looseness=-1 There is definitely room for many improvements to the proposed algorithm especially concerning the prediction model and thresholding based contact inference. Nevertheless, the methodology allows for a modular and effective approach for full body estimation by exploiting filtering on Lie groups in cascade with inverse kinematics. Further, the method is directly applicable also to robots with similar sensing capabilities thereby allowing for a unified kinematic estimation approach for both humans and robots. Future work aims to extend the EKF with a more reliable prediction model that is learned from data along with relevant learned measurement models that will allow removing the dependence on using absolute orientation measurements which are usually affected by magnetometer drifts. \vspace{-0.5em} \section{Mathematical Background} \label{sec:BACKGROUND} \par \subsection{Notations and definitions} \subsubsection{Coordinate Systems and Kinematics} \begin{itemize} \item ${C[D]}$ denotes a frame with origin $\Pos{}{C}$ and orientation of coordinate frame ${D}$; \item $\Pos{A}{B}\in \R^3$ and $\Rot{A}{B}\in \SO{3}$ are the position and orientation of a frame $B$ with respect to the frame $A$; \item given $\Pos{A}{C}$ and $\Pos{B}{C}$, $\Pos{A}{C} = \Rot{A}{B} \Pos{B}{C} + \Pos{A}{B}= \Transform{A}{B} \PosBar{B}{C}$, where $\Transform{A}{B} \in \SE{3}$ is the homogeneous transformation and $\PosBar{B}{C} = \begin{bmatrix}\Pos{B}{C}^T & \ 1\end{bmatrix}^T \in \R^4$ is the homogeneous representation of $\Pos{B}{C}$; \item $\twistMixedTriv{A}{B} = \oDot{A}{B} = \frac{d}{dt}(\Pos{A}{B}) \in \R^3$ denotes the linear part of a mixed-trivialized velocity \cite[Section 5.2]{traversaro2019multibody} between the frame $B$ and the frame $A$ expressed in the frame ${B[A]}$. $\omegaRightTriv{A}{B} \in \R^3$ denotes the angular velocity between the frame ${B}$ and the frame ${A}$ expressed in ${A}$; \looseness=-1 \item ${A}$ denotes an absolute or an inertial frame; ${B}$, ${LF}$, and ${RF}$ indicate the frames attached to base link, left foot and right foot respectively; \looseness=-1 \end{itemize} \subsubsection{Lie Groups} We refer the readers to \cite[Section II]{ramadoss2021diligentkio} for a detailed description on the notation used for Lie groups. \looseness=-1 \subsubsection{Miscellaneous} \begin{itemize} \item $\I{n}$ and $\Zero{n}$ denote the $n \times n$ identity and zero matrices; \item Given $\uVec, \vVec \in \R^3$ the \emph{hat operator} for $\SO{3}$ is $S(.): \R^3 \to \so{3}$, where $\so{3}$ is the set of skew-symmetric matrices and $S(\uVec) \; \vVec = \uVec \times \vVec$; $\times$ is the cross product operator in $\R^3$. \looseness=-1 \end{itemize} \section{Center of Pressure based Contact Detection} \label{sec:CONTACT_DETECTION} The contact-aided floating base estimation relies on the contact states of candidate points chosen from the vertices of a rectangular approximation of the foot sole, as shown in the Figure \ref{fig:foot-geometery}. The contact wrench acting on the foot is decomposed into contact normal forces acting at these vertices. A Schmitt Trigger-based thresholding of these normal forces is then used to infer if a vertex is in contact with the environment. \looseness=-1 The contact normal force decomposition follows the approach presented in \cite[Appendix A]{dafarra2020predictive} based on the local center of pressure of the foot. A coordinate frame $C$ is placed at the center of the sole surface, with the $x$-axis pointing forward and parallel to the side with length $l$, while $z$-axis points upwards and perpendicular to the surface of the foot-sole. \looseness=-1 \begin{figure}[!t] \centering \centering \includegraphics[scale=0.2]{figures/rect-foot.pdf} \caption{Rectangular approximation of the foot geometry with length $l$ and width $d$. $F$, $S$ and $C$ denote the foot, sole and sole-center frames.} \vspace{-2em} \label{fig:foot-geometery} \end{figure} Given length $l$ and width $d$ of the rectangular sole, the coordinates of the vertices in the frame $C$ are $\mathbf{d}_1 = (\frac{l}{2}, \frac{d}{2}, 0), \mathbf{d}_2 = (\frac{l}{2}, -\frac{d}{2}, 0), \mathbf{d}_3 = (-\frac{l}{2}, \frac{d}{2}, 0),$ and $\mathbf{d}_4 = (-\frac{l}{2}, -\frac{d}{2}, 0)$. \looseness=-1 A contact wrench $\wrenchExt{} = \begin{bmatrix}{\forceExt{}}^T & {\torqueExt{}}^T \end{bmatrix}^T \in \R^6$ acting on frame $C$ is related to the 3D forces $\force{}_i \in \R^3,\ i = \{1,2, 3, 4\}$ at the vertices through the following conditions, \begin{gather} \begin{aligned} & \force{}_1 + \force{}_2 + \force{}_3 + \force{}_4 = \forceExt{}, \\ & \sum \mathbf{d}_i \times \force{}_i = \torqueExt{}. \end{aligned} \end{gather} From the equations above, the contact normal forces can be extracted to correspond to the total contact normal force and the contact tangential torques applied along $x$- and $y$-axes. \begin{align} \label{eq:chap:human-motion:cop-normal-force} & {f_1}_z + {f_2}_z + {f_3}_z + {f_4}_z = f^\mathbf{x}_z, \\ \label{eq:chap:human-motion:cop-tau-x} & \frac{d}{2}({f_1}_z + {f_3}_z) - \frac{d}{2}({f_2}_z + {f_4}_z) = \tau^\mathbf{x}_x, \\ \label{eq:chap:human-motion:cop-tau-y} & \frac{l}{2}({f_3}_z + {f_4}_z) - \frac{l}{2}({f_1}_z + {f_2}_z) = \tau^\mathbf{x}_y. \end{align} The Center of Pressure (CoP) in the frame $C$ is given by, \begin{align} & \text{CoP}_x = - \frac{\tau^\mathbf{x}_y}{f^\mathbf{x}_z},\quad \text{CoP}_y = \frac{\tau^\mathbf{x}_x}{f^\mathbf{x}_z}. \end{align} On expressing the contact normal forces as a function of ${f_4}_z$ and imposing a positivity constraint on the contact normal forces, ${f_i}_z \geq 0$, we can define $\alpha_i = {{f_i}_z}/{f^\mathbf{x}_z}$ as the ratio of the normal force at the vertex to the total contact normal force, leading to the inequalities, \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:alpha4-ineq} \begin{matrix} \alpha_4 \geq 0, & \alpha_4 \geq - \frac{\text{CoP}_y}{d} - \frac{\text{CoP}_x}{l}, \\[1em] \alpha_4 \leq \frac{1}{2} - \frac{\text{CoP}_x}{l}, & \alpha_4 \leq \frac{1}{2} - \frac{\text{CoP}_y}{d}. \end{matrix} \end{aligned}$ } \end{gather} With the choice of $\alpha_4$ to equal the average of the CoP bounds, we have a suitable solution for the ratios of contact normal force decomposition, \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:alpha4-ineq} \begin{split} & \alpha_4 = \frac{\left( \max\left(0, - \frac{\text{CoP}_y}{d} - \frac{\text{CoP}_x}{l} \right) + \min\left(\frac{1}{2} - \frac{\text{CoP}_y}{d}, \frac{1}{2} - \frac{\text{CoP}_x}{l} \right) \right)}{2}, \\ & \alpha_1 = \alpha_4 + \frac{\text{CoP}_x}{l} + \frac{\text{CoP}_y}{d}, \\ & \alpha_2 = -\alpha_4 + \frac{1}{2} - \frac{\text{CoP}_y}{d}, \\ & \alpha_3 = -\alpha_4 + \frac{1}{2} - \frac{\text{CoP}_x}{l}. \end{split} \end{aligned}$ } \end{gather} With this choice of ratios, $\alpha_i$ all equal to $1/4$ when the CoP lies in the center of the foot and the ratios are adjusted appropriately as the CoP moves around the rectangular surface of the approximated foot. Such a decomposition and a chosen threshold value for vertex contact detection allow the inference of the contact status of candidate points. \section{Experiments and Results} \label{sec:RESULTS} In this section, we present the results from the experimental evaluation of the proposed estimation algorithm for reconstructing the whole body kinematic motion of the human performing walking-in-place and free walking motions. \subsection{Experimental Setup} The experiments were conducted with a human subject wearing sensorized suit and shoes developed by \emph{iFeel Tech}\footnote{\url{https://ifeeltech.eu/}} which are part of a whole-body wearable technology aimed at real-time human motion tracking and articular stress analysis. Each shoe worn by the human is equipped with 6-axis force-torque sensors at its front and rear part of the sole and streams a ground reaction wrench measurement at $60 \si{Hz}$. The sensorized suit consists of 10 \emph{iFeel nodes} distributed as follows: 2 nodes on each arm (upper arm, fore arm), 2 nodes on each leg (upper leg, lower leg), one each on the Pelvis and stern and 2 nodes on the foot as part of the shoes. Each iFeel node has a Bosch BNO055 IMU that streams measurements at $60 \si{Hz}$. \looseness=-1 For the articulated rigid-body human model, we use the URDF model relevant to the subject available from the \emph{human-gazebo}\footnote{\url{https://github.com/robotology/human-gazebo}} project. A subset of 29 Degrees of Freedom (DoFs), from a total of 48 DoFs, related to the limb and torso kinematics is used to reconstruct a coarse full-body motion. \looseness=-1 For a validation of the estimated floating base pose, we perform a comparison with a base trajectory obtained from two different methods. The first method simply uses a \emph{Vive}\footnote{\url{https://www.vive.com/us/accessory/tracker3/}} motion tracker that is mounted on the base link of the human subject (\emph{Pelvis}) in order to track the base pose trajectory. Another base trajectory is obtained from a base line algorithm, referred to as HSP, which relies solely on the dynamical IK, circumventing the connection with the proposed EKF. This approach uses the known floor position as a pseudo-target measurement within the IK whenever a foot contact is detected, thereby constraining the whole body motion to achieve legged odometry. \looseness=-1 The data from the \emph{iFeel} suit and shoes along with the tracker pose are logged at a frequency of $50 \si{Hz}$ during the experiments and is played back in real-time to run the Whole Body Kinematics (WBK) estimation and the baseline algorithm (HSP) at $50 \si{Hz}$. The output trajectories are then saved in Matlab data format and aligned to the same reference frame for plotting the results. The trajectories are aligned using $\A \X = \Y \B$ calibration method to find an unknown transformation between the tracker and Pelvis and another between the world frames. \looseness=-1 \subsection{Experiments} For the experiments, the subject initially stays in an extended arm configuration, usually referred to as \emph{TPose} configuration before performing the actual motion. A calibration procedure is performed during \emph{TPose} to align the measurements from different IMUs to a common reference frame for the estimation. We make use of only absolute orientation measurements from the IMUs as inputs to the dynamical IK block. The differential inverse kinematics is solved using a QP solver with the consideration of joint limits for the legs tuned to allow for physically feasible motion. The rectangular foot geometry is set using the dimensions of the sensorized shoes. Known constant floor height is passed as a measurement to the EKF every time a candidate point on the foot is detected to be in contact. When all the candidate points on the foot are in contact, a contact orientation reflecting the flat planar contact surface is passed as measurement by setting the tilt angles to zero. The estimated base pose is not fed back to the Dynamical IK block. This allows the joint state estimation to be invariant of the floating base pose and depends only on the orientation measurements and relative kinematics. The accuracy in aligning the estimated trajectories with the Vive tracker trajectory is low due to missing data in the latter, and for this reason we pertain to a qualitative comparison for discussion. \looseness=-1 \subsubsection{In-Place Walking Motion} Figure \ref{fig:walk-in-place} shows one snapshot from the walking-in-place trajectory performed by the human and the estimated trajectory at that time instant. The overall base motion is fairly reconstructed in comparison with the Vive tracker trajectory as seen in Figure \ref{fig:plots}. The baseline algorithm HSP is seen to suffer considerably more from drifts in the forward direction $\mathbf{x}$ and along the base height $\mathbf{z}$ leading to resemble a stair-case walking motion. WBK suffers from low position drifts owing to the contact-aided measurements such as terrain height and contact plane updates. WBK is seen to be sensitive to the covariance of the base gyroscope measurements leading to varying degree of errors in the roll and heading angles of the base orientation. A considerable tuning effort is required to obtain reliable pose estimates from the EKF. \looseness=-1 \begin{figure*}[t!] \centering \includegraphics[height=72mm, width=0.9\textwidth]{figures/walk1-color.pdf} \caption{Snapshots from a free-walking experiment performed by the subject (top) and corresponding motion reconstruction from the proposed WBK estimation (bottom). Blue arrows represent contact normal forces for points in contact with the environment, while red points indicate loss of contact, and the black dot represents the local center of pressure which retains the last seen position when exiting the support polygon.} \vspace{-1.25em} \label{fig:walk} \end{figure*} \begin{figure}[!t] \centering \includegraphics[width=0.5\textwidth]{figures/plots.pdf} \caption{Evolution of base pose trajectories estimated by proposed WBK (blue dashed), base line HSP (red dotted), and that measured from Vive trackers (black solid) for a walking-in-place (left) and free walking motions (right). \looseness=-1} \vspace{-1.25em} \label{fig:plots} \end{figure} \begin{figure}[!t] \centering \includegraphics[scale=0.15, width=0.3\textwidth]{figures/walk/CoPEvolution.pdf} \caption{XY-position of the global CoP trajectory computed using WBK estimated base pose along with estimated position of contact points on the feet at first instants of full planar foot with the ground.} \vspace{-2em} \label{fig:cop} \end{figure} \subsubsection{Free Walking Motion} Figure \ref{fig:walk} shows snapshots from the walking trajectory performed by the human and the estimated trajectory at those time instants. The overall walking motion seems to reasonably reconstructed and from Figure \ref{fig:plots}, it can be seen that WBK performs comparably with the HSP algorithm for a walking motion. HSP gains $5 \si{\centi\meter}$ on the base height for a $12 \si{\second}$ walking over a flat surface, while WBK maintains the nominal base height during walking with deviations less than $1 \si{\centi\meter}.$ WBK is seen to suffer more in the forward walking and heading directions, eventhough it can be seen from Figure \ref{fig:cop} that the evolution of the global CoP computed from the estimated base pose is consistent with the walking motion. The CoP moves from the heel to toe for a forward walking motion and changes sharply during turns while always remaining bounded between the feet polygons obtained from the estimated positions of candidate contact points on the feet. The rectangular shape of the feet is not preserved by the estimated positions on the XY-plane eventhough the contact-aided measurement updates are enforced. This is because the knowledge of the rectangular feet is not exploited in the EKF and the contact position states are completely decoupled from the feet orientation states and are related only to the base orientation. The filter can be constrained to obtain better estimates by introducing this information. \looseness=-1 \section{Lie Group Extended Kalman Filter} \label{sec:EKF} We employ an EKF over matrix Lie groups with right-invariant, left-invariant, and non-invariant observations using contact information and joint configuration. This block acts replaces the sub-module of the state integrator block that integrates the base link velocity to obtain the base pose. \looseness=-1 \subsection{State Representation} The EKF block maintains its own internal state and the results of the Dynamical IK block are considered as measurements passed to the filter. We wish to estimate the position $\Pos{A}{B}$, orientation $\Rot{A}{B}$, linear velocity $\oDot{A}{B}$, and angular velocity $\omegaLeftTriv{A}{B}$ of the base link $B$ in the inertial frame $A$. Additionally we also consider the position of candidate contact points on the feet $\Pos{A}{{F_{1,\dots,n_f}}}$ and orientation of the feet $\Rot{A}{F}$, where $F = \{{LF}, {RF} \}$ in the state. The information about each foot incorporated into the internal state of the EKF consists of four vertex positions of the foot ($n_f = 4$) along with a rotation of the foot. For the sake of readability, we introduce some shorthand notation for this section. The tuple of state variables $(\Pos{A}{B},\Rot{A}{B}, \oDot{A}{B}, \Pos{A}{{F_{1,\dots,n_f}}})$ or $(\mathbf{p}, \mathbf{R}, \mathbf{v}, \mathbf{d}_{F_{1 \dots n_f}})$ are encapsulated within $\SEk{N+2}{3}$ matrix Lie group \cite{hartley2020contact}. The left-trivialized angular velocity of the base link $\omegaLeftTriv{A}{B}$ denoted as $\omega$ forms a translation group $\T{3}$, while feet rotations $\Rot{A}{F}$ or $\mathbf{Z}_F$ evolve over the group of rotations $\SO{3}$. Together, a state space element $\X \in \mathcal{M}$ is represented by a composite matrix Lie group, $\SEk{N+2}{3} \times \T{3} \times \SO{3}^2$. We simplify the derivation in the remainder of this section by considering only one foot with only one contact point per foot and dropping the suffix $F_{1, \dots, {n_f}}$ and $F$ for the feet positions $\mathbf{d}_{F_{1 \dots n_f}}$ and orientation $\mathbf{Z}_F$ respectively. \\ A state space element $\X \in \mathcal{M}$ keeping only one foot contact point and one foot orientation is then given by, \looseness=-1 \begin{gather} \scalebox{0.82} \setcounter{MaxMatrixCols}{20} $\begin{aligned}[b] \label{eq:chap:human-motion:ekf-state-repr} \X_1 = \begin{bmatrix} \mathbf{R} & \mathbf{p} & \mathbf{v} & \mathbf{d} \\ \Zeros{1}{3} & 1 & 0 & 0 \\ \Zeros{1}{3} & 0 & 1 & 0 \\ \Zeros{1}{3} & 0 & 0 & 1 \end{bmatrix}, \X_2 = \begin{bmatrix} \I{3} & \omega \\ \Zeros{1}{3} & 1 \end{bmatrix}, \X = \text{blkdiag}(\X_1, \X_2, \Z). \end{aligned}$ \end{gather} In tuple representation, we can denote the state space element as, $\X \triangleq (\mathbf{p}, \mathbf{R}, \mathbf{v}, \mathbf{d},\omega, \mathbf{Z})_\mathcal{M}$. The hat operator $\ghat{\mathcal{M}}{\epsilon}: \R^{9+3{n_f}+3+3} \to \mathfrak{m}$ with $n_f = 1$ and $N = 1$ that transports a vector $\epsilon$ to the Lie algebra $\mathfrak{m}$ is defined as as, \begin{gather*} \scalebox{0.88} \setcounter{MaxMatrixCols}{20} $\begin{aligned}[b] \label{eq:chap:human-motion:ekf-state-hat} & \ghat{\SEk{N+2}{3}}{\epsilon_1} = \begin{bmatrix} S(\epsilon_\mathbf{R}) & \epsilon_\mathbf{p} & \epsilon_\mathbf{v} & \epsilon_\mathbf{d} \\ \Zeros{1}{3} & 0 & 0 & 0 \\ \Zeros{1}{3} & 0 & 0 & 0 \\ \Zeros{1}{3} & 0 & 0 & 0 \end{bmatrix}, \quad \ghat{\T{3}}{\epsilon_2} = \begin{bmatrix} \Zero{3} & \epsilon_\omega \\ \Zeros{1}{3} & 0 \end{bmatrix}, \end{aligned}$ \end{gather*} \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned}[b] \ghat{\mathcal{M}}{\epsilon} = \text{blkdiag}\left(\ghat{\SEk{N+2}{3}}{\epsilon_1},\ \ghat{\T{3}}{\epsilon_2},\ S(\epsilon_\mathbf{Z})\right), \end{aligned}$ \end{gather} with, $\epsilon_1 = \text{vec}(\epsilon_\mathbf{p}, \epsilon_\mathbf{R}, \epsilon_\mathbf{v}, \epsilon_\mathbf{d})$ and the vector $\epsilon \triangleq \text{vec}(\epsilon_1, \epsilon_\omega, \epsilon_\mathbf{Z})$. \looseness=-1 The exponential mapping of the state space expressed in a tuple representation is given by, \looseness=-1 \begin{equation} \label{eq:chap:human-motion:ekf-state-exp-map} \begin{split} \gexphat{\mathcal{M}}\left(\epsilon\right) &= \big(\J\left(\epsilon_\mathbf{R}\right)\ \epsilon_\mathbf{p},\ \Exp\left(\epsilon_\mathbf{R}\right),\ \J\left(\epsilon_\mathbf{R}\right)\ \epsilon_\mathbf{v}, \\ & \quad \ \ \ \J\left(\epsilon_{\mathbf{Z}}\right)\ \epsilon_{\mathbf{d}},\ \epsilon_\omega,\ \Exp\left(\epsilon_{\mathbf{Z}}\right)\big)_{\mathcal{M}}. \end{split} \end{equation} where, $\Exp(.) \triangleq\ \gexphat{\SO{3}}(.)$ is the exponential map of $\SO{3}$ and $\J(.) \triangleq \gljac{\SO{3}}(.)$ is the left Jacobian of $\SO{3}$ \cite{sola2018micro}. The adjoint matrix of the considered state space $\mathcal{M}$ is given as, \looseness=-1 \begin{gather} \scalebox{0.8} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-state-adj} \begin{split} \gadj{\X_1} = \begin{bmatrix} \Rot{}{} & S(\mathbf{p}) \Rot{}{} & \Zero{3} & \Zero{3} \\ \Zero{3} & \Rot{}{} & \Zero{3} & \Zero{3} \\ \Zero{3} & S(\mathbf{v}) \Rot{}{} & \Rot{}{} & \Zero{3} \\ \Zero{3} & S(\mathbf{d}) \Rot{}{} & \Zero{3} & \Rot{}{} \end{bmatrix}, \quad \gadj{\X} = \text{blkdiag}(\gadj{\X_1},\ \I{3},\ \Z). \end{split} \end{aligned}$ } \end{gather} The left Jacobian of the matrix Lie group $\mathcal{M}$ is obtained as a block-diagonal form of the left Jacobians of the constituting matrix Lie groups given as $\gljac{\mathcal{M}}(\epsilon) = \text{blkdiag} \left( \gljac{\SEk{N+2}{3}}\left(\epsilon_1\right), \; \I{3},\ \J\left(\epsilon_{\mathbf{Z}}\right) \right).$ The closed-form expression for the left Jacobian $\gljac{\SEk{N+2}{3}}(.)$ can be found in \cite[Section 2.6]{luo2020geometry}. The left Jacobian for the translation group of angular velocity is the identity matrix. \vspace{-0.9em} \subsection{System Dynamics} The continuous system dynamics evolving on the group with state $\X \in \mathcal{M}$ is given by the dynamical system, $\frac{d}{dt} \X = f(\X, \mathbf{u}) + \X \ghat{\mathcal{M}}{\textbf{w}}$, where $f$ is the deterministic dynamics, $\mathbf{u} \in \R^m$ is the exogenous control input and $\textbf{w} \in \mathbb{R}^p$ is a continuous white noise, with covariance $\mathbf{Q}$. The system dynamics is formulated using rigid body kinematics with constant motion models for the base link along with rigid contact models for the contact points and the foot orientations. The continuous system dynamics is then given by, \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-dyn} \begin{split} \mathbf{\dot{p}} = \mathbf{v}, & \qquad \mathbf{\dot{R}} = \mathbf{R} \; S(\omega), \\ \mathbf{\dot{v}} = \mathbf{R} \; (-\noiseLinVel{B}), & \qquad \mathbf{\dot{d}} = \mathbf{R}\; (-{\Rot{B}{F}}(\encoders)\ \noiseLinVel{F}), \\ \dot{\omega} = -\noiseAngVel{B}, & \qquad \mathbf{\dot{Z}} = \mathbf{Z} \; S(-\noiseAngVel{F}), \end{split} \end{aligned}$ } \end{gather} with the left trivialized noise vector defined as, \begin{gather*} \scalebox{0.85} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-left-triv-noise} & \mathbf{w} \footnotesize{ \;= \text{vec}\big( \Zeros{3}{1}, \; \Zeros{3}{1}, \; -\noiseLinVel{B}, \; -{\Rot{B}{F}}(\encoders)\;\noiseLinVel{F}, \; -\noiseAngVel{B},\; -\noiseAngVel{F}\big) }, \end{aligned}$ } \end{gather*} and the prediction noise covariance matrix $\mathbf{Q}_c = \expectation{\mathbf{w} \mathbf{w}^T}$. Here, we have used ${\Rot{B}{F}}(\encoders)$ which denotes the rotation of the foot frame with respect to the base link computed through the forward kinematics map using the joint position inputs. The system dynamics defined in Eq. \eqref{eq:chap:human-motion:ekf-sys-dyn} does not obey the group-affine property \cite[Theorem 1]{barrau2016invariant}. \looseness=-1 \subsubsection{Linearized Error Dynamics} A right invariant error, $\eta^R = \mathbf{\hat{X}} \X^{-1}$ is chosen leading to the error dynamics, \begin{gather} \scalebox{0.825} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-errordynamics} \begin{split} &\frac{d}{dt}(\mathbf{\hat{p}} - \mathbf{\hat{R}}\mathbf{R}^T\;\mathbf{p}) = S(\mathbf{\hat{p}}) \mathbf{\hat{R}}\; \epsilon_\omega + \epsilon_\mathbf{v}, \\ &\frac{d}{dt}(\mathbf{\hat{R}}\;\mathbf{R}^T) = S(\mathbf{\hat{R}}\; \epsilon_\omega), \\ &\frac{d}{dt}(\mathbf{\hat{v}} - \mathbf{\hat{R}}\mathbf{R}^T\;\mathbf{v}) = S(\mathbf{\hat{v}}) \mathbf{\hat{R}}\; \epsilon_\omega - \mathbf{\hat{R}}\;\noiseLinVel{B}, \\ &\frac{d}{dt}(\mathbf{\hat{d}} - \mathbf{\hat{R}}\mathbf{R}^T\;\mathbf{d}) = S(\mathbf{\hat{d}}) \mathbf{\hat{R}}\; \epsilon_\omega - \mathbf{\hat{R}}\;\Rot{B}{F}(\encoders)\;\noiseLinVel{F}, \\ &\frac{d}{dt}(\hat{\omega} - \omega) = -\noiseAngVel{B},\\ &\frac{d}{dt}(\mathbf{\hat{Z}}\mathbf{Z}^T) = - S(\mathbf{\hat{Z}}\; \noiseAngVel{F}). \end{split} \end{aligned}$ } \end{gather} Using the log-linearity property, the linearized error dynamics and covariance propagation equation then become, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-lin-err-prop} \begin{split} &\dot{\epsilon} = \mathbf{F}_c\ \epsilon + \gadj{\mathbf{\hat{X}}}\ \mathbf{w}, \\ & \dot{\mathbf{P}} = \mathbf{F}_c\; \mathbf{P} + \mathbf{P}\; \mathbf{F}_c^T + \mathbf{\hat{Q}}_c , \end{split} \end{aligned}$ } \end{gather} where the continuous-time, linearized error propagation matrix $\mathbf{F}_c$ and the prediction noise covariance matrix $\mathbf{\hat{Q}}_c$ are given as, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-err-prop-matrices} \begin{split} &\mathbf{F}_c\ = \begin{bmatrix} \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & S(\mathbf{\hat{p}}) \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & S(\mathbf{\hat{v}}) \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & S(\mathbf{\hat{d}}) \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} \\ \end{bmatrix}, \mathbf{\hat{Q}}_c = \gadj{\mathbf{\hat{X}}}\;\mathbf{Q}_c\;\gadj{\mathbf{\hat{X}}}^T. \end{split} \end{aligned}$ } \end{gather} A discretization of Eq. \eqref{eq:chap:human-motion:ekf-sys-dyn} using a zero-order hold with sampling time $\Delta T$ leads to discrete dynamics, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-disc-dyn} \begin{split} \mathbf{\hat{p}}_\knext = \; \mathbf{\hat{p}}_\kcurr + \; \mathbf{\hat{v}}_{\kcurr} \; \Delta T, & \quad \quad \mathbf{\hat{R}}_{\knext} = \; \mathbf{\hat{R}}_{\kcurr} \; \gexphat{\SO{3}}\big( \hat{\omega}_k \; \Delta T \big), \\ \mathbf{\hat{v}}_{\knext} = \; \mathbf{\hat{v}}_{\kcurr}, & \quad \quad \quad \quad \mathbf{\hat{d}}_{\knext} = \; \mathbf{\hat{d}}_{\kcurr},\\ \hat{\omega}_{\knext} = \; \hat{\omega}_{\kcurr}, & \quad \quad \quad \quad \mathbf{\hat{Z}}_{\knext} = \; \mathbf{\hat{Z}}_{\kcurr}. \end{split} \end{aligned}$ } \end{gather} A first-order approximation for the Ricatti equations leads to, \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-disc-cov-prop} \begin{split} &\mathbf{P}_{\knext} = \mathbf{F}_{\kcurr} \; \mathbf{P}_{\kcurr}\; \mathbf{F}_{\kcurr}^T + \mathbf{Q}_{\kcurr}, \\ &\mathbf{F}_{\kcurr} = \exp(\mathbf{F}_c \Delta T) \approx \I{p} + \mathbf{F}_c \Delta T,\\ &\mathbf{Q}_{\kcurr} = \mathbf{F}_{\kcurr}\; \mathbf{\hat{Q}}_c\; \mathbf{F}_{\kcurr}^T\; \Delta T. \end{split} \end{aligned}$ } \end{gather} \subsection{Right Invariant Observations} We consider measurements having a right-invariant observation structure, $\mathbf{z}_{\kcurr} = \X_{\kcurr}^{-1}\ \mathbf{b}\ +\ \mathbf{n}_{\kcurr} \in \R^q$ which lead to a time-invariant measurement model Jacobian \cite{barrau2016invariant} and follows the filter update, \looseness=-1 $\mathbf{\hat{X}}_{\kcurr}^{+} = \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left(\mathbf{\hat{X}}_{\kcurr}\ \mathbf{z}_{\kcurr} - \mathbf{b}\right) \right)\ \mathbf{\hat{X}}_{\kcurr},$ where, $\mathbf{K}_\kcurr$ is the Kalman gain and $\mathbf{n}_{\kcurr}$ is the noise associated with the observation and $\mathbf{b}$ is a constant vector. A reduced dimensional gain $\mathbf{K}_\kcurr^r$ can be computed by applying an auxiliary matrix $\Pi$ that selects only the non-zero elements from the full innovation vector in such a way that, $\mathbf{K}_\kcurr \left(\mathbf{\hat{X}}_{\kcurr}\ \mathbf{z}_{\kcurr} - \mathbf{b}\right) = \mathbf{K}_\kcurr^r \Pi \mathbf{\hat{X}}_{\kcurr}\ \mathbf{z}_{\kcurr}.$ The measurement model Jacobian is obtained through a log-linear, first-order approximation of the non-linear error update, \looseness=-1 \begin{gather*} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \eta^{R+}_{\kcurr} = \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left( \eta^{R}_{\kcurr}\ \mathbf{b}\ -\ \mathbf{b} + \mathbf{\hat{X}}_{\kcurr}\mathbf{n}_{\kcurr} \ \right) \right) \eta^{R}_{\kcurr}. \end{aligned}$ } \end{gather*} \subsubsection{Relative candidate contact point position} The joint positions $\encoders = \jointPos + \encoderNoise$ obtained from the integration of estimated joint velocities are assumed to be affected by white Gaussian noise $\encoderNoise$ and are used to determine the relative candidate contact point positions $h_p(\encoders)$ with respect to the base link using forward kinematics. The measurement model $h_p(\X)$, right-invariant observation $\mathbf{z}_p$, constant vector $\mathbf{b}_p$, measurement model Jacobian $\mathbf{H}_p$, auxiliary matrix $\Pi_p$ and measurement noise covariance matrix $\mathbf{N}_p$ associated with the relative position measurements are given as, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-relposmeas} \begin{split} &h_p(\X) = \mathbf{\hat{R}}^T(\mathbf{\hat{d}} - \mathbf{\hat{p}}) + \relativeJacobianLeftTrivLinIn{F}{B}(\encoders) \; \encoderNoise \in \mathbb{R}^3, \\ & \mathbf{z}_p^T = \begin{bmatrix} h_p^T(\encoders) & 1 & 0 & -1 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_p^T = \begin{bmatrix} \Zeros{1}{3} & 1 & 0 & -1 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_p = \begin{bmatrix} -\I{3} & \Zero{3} & \Zero{3} & \I3 & \Zero{3} & \Zero{3} \end{bmatrix}, \Pi_p = \begin{bmatrix} \I{3} & \Zeros{3}{10} \end{bmatrix}\\ & \mathbf{N}_p = \mathbf{\hat{R}} \; \relativeJacobianLeftTrivLinIn{F}{B}(\encoders) \; \text{Cov}(\encoderNoise) \; \relativeJacobianLeftTrivLinIn{F}{B}^T(\encoders) \; \mathbf{\hat{R}}^T. \end{split} \end{aligned}$ } \end{gather} \subsubsection{Zero-velocity Update (ZUPT) aided Left Trivialized Base Velocity} With a rigid contact assumption, the null velocity of the stance foot can be associated with the base velocity. The left-trivialized base velocity measurement computed through the joint velocity measurements and the configuration dependent Jacobian of the contact point is used as a right-invariant observation for the filter. The linear part of the base velocity measurement in the form of $\X_{\kcurr}^{-1}\ \mathbf{b}\ +\ \mathbf{n}_{\kcurr}$, associated with the state variable $\mathbf{v}$ is then described by the quantities, \looseness=-1 \begin{gather} \scalebox{0.8} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-ZUPTlin} &h_v(\encoders, \encoderSpeeds) = - \big(\gadj{\Transform{F}{B}}^{-1} \; \relativeJacobianLeftTrivIn{B}{F}(\encoders) \; \encoderSpeeds\big)_{\text{lin}} \in \mathbb{R}^3, \\ & \mathbf{z}_v^T = \begin{bmatrix} h_v(\encoders, \encoderSpeeds) & 0 & -1 & 0 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_v^T = \begin{bmatrix} \Zeros{1}{3} & 0 & -1 & 0 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_v = \begin{bmatrix} \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \Pi_v = \begin{bmatrix} \I{3} & \Zeros{3}{10} \end{bmatrix}, \mathbf{N}_v = \mathbf{\hat{R}}\text{Cov}(\fkNoiseLinVel{B})\mathbf{\hat{R}}^T, \end{aligned}$ } \end{gather} where, $\gadj{\Transform{F}{B}} \in \R^{6 \times 6}$ is the adjoint transformation transporting the 6D rigid body velocities from the base frame $B$ to the foot frame $F$. Similarly, the angular part of the left-trivialized base velocity measurement related to the state variable $\omega$ is described by the following quantities for filter update, \looseness=-1 \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-ZUPTang} \begin{split} &h_\omega(\encoders, \encoderSpeeds) = - \big(\gadj{\Transform{F}{B}}^{-1} \; \relativeJacobianLeftTrivIn{B}{F}(\encoders) \; \encoderSpeeds\big)_{\text{ang}} \in \mathbb{R}^3, \\ & \mathbf{z}_\omega^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & h_\omega(\encoders, \encoderSpeeds) & -1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_\omega^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & \Zeros{1}{3} & -1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_\omega = \begin{bmatrix} \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \Pi_\omega = \begin{bmatrix} \Zeros{3}{6} & \I{3} & \Zeros{3}{4} \end{bmatrix}, \mathbf{N}_\omega = \text{Cov}(\fkNoiseAngVel{B}). \end{split} \end{aligned}$ } \end{gather} We have used $\fkNoiseLinVel{B}$ and $\fkNoiseAngVel{B}$ to denote an additive forward kinematic noise affecting the velocity computations. \subsection{Left Invariant Observations} We also consider measurements having a left-invariant observation structure, $\mathbf{z}_{\kcurr} = \X_{\kcurr}\ \mathbf{b}\ +\ \mathbf{n}_{\kcurr}$ which lead to a time-invariant measurement model Jacobian obtained through a first-order approximation of the error update equation, \begin{gather*} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \eta^{L+}_{\kcurr} = \eta^{L}_{\kcurr}\ \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left( \left(\eta^{L}_{\kcurr}\right)^{-1}\mathbf{b}\ -\ \mathbf{b} + \mathbf{\hat{X}}^{-1}_{\kcurr}\mathbf{n}_{\kcurr} \ \right) \right). \end{aligned}$ } \end{gather*} The filter is then updated by applying the correction through $ \mathbf{\hat{X}}_{\kcurr}^{+} = \mathbf{\hat{X}}_{\kcurr}\ \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left(\mathbf{\hat{X}}^{-1}_{\kcurr}\ \mathbf{z}_{\kcurr} - \mathbf{b}\right) \right)$. However, since we have considered right-invariant error $\eta^R$ in our filter design, in order to incorporate the updates from the left-invariant observations, it is necessary to transform the right invariant error to be expressed as the left-invariant error \cite{hartley2020contact} which can be done using the adjoint map as $\epsilon^R =\ \gadj{\mathbf{\hat{X}}}\ \epsilon^L$ and $\epsilon^L =\ \gadj{{\mathbf{\hat{X}}^{-1}}}\ \epsilon^R$. This implies a switching between the covariance of right- and left-invariant errors as, \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-cov-switch} \begin{split} & \mathbf{P}^L = \gadj{{\mathbf{\hat{X}}^{-1}}}\ \mathbf{P}^R\ \gadj{{\mathbf{\hat{X}}^{-1}}}^T, \\ & \mathbf{P}^R = \gadj{\mathbf{\hat{X}}}\ \mathbf{P}^L\ \gadj{\mathbf{\hat{X}}}^T. \end{split} \end{aligned}$ } \end{gather} \subsubsection{Base Collocated Gyroscope} The gyroscope measurements from the pelvis IMU is used to formulate a left-invariant observation, assuming that they are not affected by any time-varying biases but only by additive white noise $\noiseGyro{B}$. Considering that the IMU is rigidly attached to the pelvis link and the rotation $\Rot{B}{{B_{\text{IMU}}}}$ between the pelvis link and the pelvis IMU is known, we can compute the left-invariant observations leading to the quantities relevant for filter update as, \looseness=-1 \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-basegyro} \begin{split} &h_g(\tilde{\omega}) = \Rot{B}{{B_{\text{IMU}}}} \yGyro{A}{{B_{\text{IMU}}}} \in \mathbb{R}^3, \\ & \mathbf{z}_g^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & h_g(\tilde{\omega}) & 1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_g^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & \Zeros{1}{3} & 1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_g = \begin{bmatrix} \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \Pi_g = \begin{bmatrix} \Zeros{3}{6} & \I{3} & \Zeros{3}{4} \end{bmatrix}, \mathbf{N}_g = \text{Cov}(\noiseGyro{B}) . \end{split} \end{aligned}$ } \end{gather} Since, the linearized error update follows standard EKF equations, the gain $\mathbf{K}_\kcurr$ and covariance update can be computed as, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \begin{split} & \mathbf{S}_\kcurr = \mathbf{H}\ \mathbf{P}_{\kcurr}\ \mathbf{H}^T\ +\ \mathbf{\hat{N}}_\kcurr, \\ & \mathbf{K}_\kcurr = \mathbf{P}_{\kcurr}\ \mathbf{H}^T\ \left(\mathbf{S}_\kcurr\right)^{-1}, \\ & \mathbf{P}_{\kcurr}^{+} = \left(\I{p} - \mathbf{K}_\kcurr\ \mathbf{H}\right)\ \mathbf{P}_{\kcurr}. \end{split} \end{aligned}$ } \end{gather} \subsection{Non Invariant Observations} Non-invariant observations considered to be evolving over a distinct matrix Lie group $G^\prime$ are in the form $\Y_\knext = h (\X_\knext) \;\gexphat{G^\prime}(\mathbf{n}_\knext)$ \cite{bourmaud2013discrete}. The right invariant error leads to the innovation term, \looseness=-1 $ \mathbf{\tilde{z}} = \glogvee{G^\prime}\big(h^{-1}(\mathbf{\hat{X}})\; h(\gexp{\mathcal{M}}(-\epsilon) \mathbf{\hat{X}})\big), $ and the measurement model Jacobian as, $\mathbf{H} = -\frac{\partial}{\partial \epsilon}\; \glogvee{G^\prime}\big(h^{-1}(\mathbf{\hat{X}})\; h(\gexp{\mathcal{M}}(-\epsilon)\;\mathbf{\hat{X}})\big)\bigg|_{\epsilon = 0}.$ \subsubsection{Relative foot link rotation} The joint positions $\encoders$ obtained from the integration of estimated joint velocities $\encoderSpeeds$ is passed through the forward kinematics map to determine the relative foot orientations $h_R(\encoders)$. \looseness=-1 \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:eq:chap:human-motion:ekf-relrotmeas} \begin{split} &h_R(\X) = \mathbf{\hat{R}}^T\;\mathbf{\hat{Z}}\; \gexphat{\SO{3}}\big(\relativeJacobianLeftTrivAngIn{B}{F}(\encoders) \; \encoderNoise\big) \in \SO{3}, \\ & \mathbf{H}_R = \begin{bmatrix} \Zero{3} & -\mathbf{\hat{Z}}^T & \Zero{3} & \Zero{3} & \Zero{3} & \mathbf{\hat{Z}}^T \end{bmatrix}, \\ & \mathbf{N}_R = \; \relativeJacobianLeftTrivAng{B}{F}(\encoders) \; \text{Cov}(\encoderNoise) \; {\relativeJacobianLeftTrivAng{B}{F}}^T(\encoders). \end{split} \end{aligned}$ } \end{gather} \subsubsection{Terrain Height Update} For candidate points that are actively in contact with the environment, the height measurement from a known map affected by noise $\mathbf{w}_\mathbf{d}$ is used to update the filter states. High covariance values are associated with $(d_x, d_y)$ coordinates while map covariance values is set for the height $d_z$. The measurement update equations for non-invariant observation can be written as, \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:eq:chap:human-motion:ekf-relrotmeas} \begin{split} &h_d(\X) =\mathbf{d} + \mathbf{w}_\mathbf{d} \in \T{3}, \\ & \mathbf{H}_d = \begin{bmatrix} \Zero{3} & S(\mathbf{\hat{d}}) & \Zero{3} & -\I{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \mathbf{N}_d = \; \text{Cov}(\mathbf{w}_d). \end{split} \end{aligned}$ } \end{gather} \subsubsection{Contact Plane Orientation Update} In cases where, the foot is in planar rigid contact with the environment, we enable a contact plane orientation update. We relate the contact plane orientation measurement affected by noise $\mathbf{w}_c$ directly to the foot orientation $\Z$. The filter update quantities associated with this measurement can be summarized as, \looseness=-1 \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:eq:chap:human-motion:ekf-relrotmeas} \begin{split} &h_c(\X) = \mathbf{\hat{Z}}\; \gexphat{\SO{3}}(\mathbf{w}_c) \in \SO{3}, \\ & \mathbf{H}_c = \begin{bmatrix} \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \mathbf{\hat{Z}}^T \end{bmatrix}, \\ & \mathbf{N}_c = \; \text{Cov}(\mathbf{w}_c). \end{split} \end{aligned}$ } \end{gather} The state update in the tangent space becomes $\mathbf{m}^{-}_\knext = \mathbf{K}_\knext\; \mathbf{\tilde{z}}_\knext $, which is used for the state reparametrization $\mathbf{\hat{X}}_\knext = \gexphat{\mathcal{M}}\big(\mathbf{m}^{-}_\knext\big) \mathbf{\hat{X}}_\kpred$. The state covariance is updated as $\mathbf{P}_\knext = \J^l_\mathcal{M}(\mathbf{m}^{-}_\knext)\;(\I{p} - \mathbf{K}_\knext\;\mathbf{H}_\knext)\mathbf{P}_\kpred\;\J^l_\mathcal{M}(\mathbf{m}^{-}_\knext)^T$. \section{Dynamical Inverse Kinematics} \label{sec:DYN-IK} The overall structure of Dynamical IK consists of three main steps, where at first the measured velocity $\mathbf{v}(t)$ is corrected using a forward kinematics error $\mathbf{r}(t)$ to produce an updated velocity vector $\mathbf{v}^{*}(t)$ which is then passed through the inverse differential kinematics module to compute the system velocity $\nu(t)$. Finally, the velocity $\nu(t)$ is integrated to obtain the system configuration $\mathbf{q}(t)$. These three steps establish a closed-loop regulator on the model-based forward kinematics, thereby, driving the estimated system configuration to the true configuration reflected by the target measurements. Due to space constraints, we kindly refer the reader to the original paper \cite{rapetti2020model} for more details about Dynamical IK. The base state integrated from the dynamical IK block is discarded in favor of the EKF block for base state estimation, while the joint state estimates from the dynamical IK are used as inputs to the EKF. \looseness=-1 \looseness=-1 \section{Problem Statement} \label{sec:ESTIMATION} This section describes the problem of motion estimation for a human equipped with a sensorized suit of distributed IMUs and shoes with embedded force-torque sensors. The human is modeled as an articulated multi-rigid body system. \looseness=-1 The internal configuration of an articulated mechanical system is usually estimated through inverse kinematics with the help of task space or target measurements. Consider a set of $n_p$ frames $P =\{P_1, P_2, \dots, P_{N_p}\}$ associated with target position measurements $\Pos{A}{{P_i}}(t) \in \R^3$ and target linear velocity measurements $\oDot{A}{P_i}(t) \in \R^3$. Similarly, consider a set of $n_o$ frames $O = \{O_1, O_2, \dots, O_{N_o}\}$ associated with target orientations $\Rot{A}{{O_j}}(t) \in \SO{3}$ and target angular velocity measurements $\omegaRightTriv{A}{O_j}(t) \in \R^3$. Given the kinematic description of the model, IK is used to find the state configuration $(\mathbf{q}(t), \nu(t))$, \looseness=-1 \begin{gather} \scalebox{0.91} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{chap:human-motion:ik-problem} \begin{cases} \Pos{A}{{P_i}}(t) = h^p_{P_i}(\mathbf{q}(t)), & \forall\ i = 1, \dots, n_p \\ \Rot{A}{{O_j}}(t) = h^o_{O_j}(\mathbf{q}(t)), & \forall\ j = 1, \dots, n_o \\ \oDot{A}{{P_i}}(t) = \mathbf{J}^\text{lin}_{P_i}(\mathbf{q}(t)) \nu(t), & \forall\ i = 1, \dots, n_p \\ \omegaRightTriv{A}{{O_j}}(t) = \mathbf{J}^\text{ang}_{O_j}(\mathbf{q}(t)) \nu(t), & \forall\ j = 1, \dots, n_o \\ \A^\mathbf{q}\ \jointPos(t) \leq \mathbf{b}^\mathbf{q}, \\ \A^\nu\ \jointVel(t) \leq \mathbf{b}^\nu, \end{cases} \end{aligned}$ } \end{gather} where, $\mathbf{q}(t) \triangleq \mathbf{q}^B(t)$ and $\nu(t) \triangleq \nu^{B}(t)$ is the position and velocity of the mechanical system, $h^p_{P_i}(\mathbf{q}(t))$ and $h^o_{O_j}(\mathbf{q}(t))$ are the position and orientation selection functions from the forward kinematics of frames $P_i$ and $O_j$ respectively, while $\mathbf{J}^\text{lin}_{P_i}(\mathbf{q}(t))$ and $\mathbf{J}^\text{ang}_{O_j}(\mathbf{q}(t))$ are the linear and angular part of the Jacobian matrix mapping system velocity to target velocities. $\A^\mathbf{q}$ and $\mathbf{b}^\mathbf{q}$ are constant parameters representing the limits for joint configuration $\jointPos(t)$, and $\A^\nu$ and $\mathbf{b}^\nu$ represent the limits for joints velocity $\jointVel(t)$. We account for target measurements provided by sparsely distributed IMUs across the body. Consider IMUs $S_i$ attached to links $L_i$ of the body. The target orientations $\Rot{A}{{L_i}}$ can be expressed using the absolute orientation measurements $\yRot{{A_{S_i}}}{{S_i}}$ from the IMU as $\Rot{A}{{L_i}} = \Rot{A}{{A_{S_i}}} \ \yRot{{A_{S_i}}}{{S_i}} \ \Rot{{S_i}}{{L_i}}$ and the target angular velocities can be expressed using the gyroscope measurements as $\omegaRightTriv{A}{{L_i}} = \Rot{A}{{L_i}} \yGyro{A}{{L_i}}$, where $\Rot{{S_i}}{{L_i}}$ defines the rotation of the sensor link's frame with respect to sensor frame and $\Rot{A}{{A_{S_i}}}$ is a calibration matrix used to express the measurements of sensor $S_i$ in a common reference frame $A$. The matrices $\Rot{{S_i}}{{L_i}}$ and $\Rot{A}{{A_{S_i}}}$ are assumed to be known from a prior calibration procedure. \looseness=-1 The set of target measurements can be collected in a pose target tuple $\mathbf{x}(t)$ and a velocity target vector $\mathbf{v}(t)$, \begin{gather} \scalebox{0.91} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:tuple-collection} \mathbf{x}(t) \triangleq \begin{pmatrix} \Pos{A}{{B}}(t) \\ \Rot{A}{{B}}(t) \\ \Rot{A}{{L_1}}(t) \\ \vdots \\ \Rot{A}{{L_{n_L}}}(t) \end{pmatrix}, \quad \mathbf{v}(t) \triangleq \begin{bmatrix} \oDot{A}{{B}}(t) \\ \omegaRightTriv{A}{{B}}(t) \\ \omegaRightTriv{A}{{L_1}}(t) \\ \vdots \\ \omegaRightTriv{A}{{L_{n_L}}}(t) \end{bmatrix}. \end{aligned}$ } \end{gather} It must be noted that the base position $\Pos{A}{{B}}(t)$ and linear velocity $\oDot{A}{{B}}(t)$ are not directly measured but are passed as quantities estimated from the previous time-instant. Similar to Eq. \eqref{eq:tuple-collection}, the forward kinematics map and the Jacobians necessary for the differential kinematics can be stacked as, \looseness=-1 \begin{gather} \scalebox{0.91} \setcounter{MaxMatrixCols}{20} $\begin{aligned} h(\mathbf{q}(t)) \triangleq \begin{pmatrix} h^p_{P_1}(\mathbf{q}(t)) \\ \vdots \\ h^p_{P_{n_p}}(\mathbf{q}(t)) \\ h^o_{O_1}(\mathbf{q}(t)) \\ \vdots \\ h^o_{O_{n_o}}(\mathbf{q}(t)) \end{pmatrix}, \quad \mathbf{J}(\mathbf{q}(t)) \triangleq \begin{bmatrix} \mathbf{J}^\text{lin}_{P_1}(\mathbf{q}(t)) \\ \vdots \\ \mathbf{J}^\text{lin}_{P_{n_p}}(\mathbf{q}(t)) \\ \mathbf{J}^\text{ang}_{O_1}(\mathbf{q}(t)) \\ \vdots \\ \mathbf{J}^\text{ang}_{O_{n_o}}(\mathbf{q}(t)) \end{bmatrix}, \end{aligned}$ } \end{gather} leading to the set of equations, \begin{equation} \label{chap:human-motion:state-configuration} \begin{split} &\mathbf{x}(t) = h(\mathbf{q}(t)) \\ &\mathbf{v}(t) = \mathbf{J}(\mathbf{q}(t)) \nu(t). \end{split} \end{equation} The problem of motion estimation then requires to solve for the floating base pose $\Transform{A}{B}$ and velocity $\twistMixedTriv{A}{B}$ of the human along with the internal joints configuration $\jointPos$, and velocity $\jointVel$ using a set of absolute target orientations $\Rot{A}{{L_i}}$ and target angular velocities $\omegaRightTriv{A}{{L_i}}$ obtained from each of the sparsely distributed IMUs along with contact-aided kinematic corrections using contact wrench measurements obtained from the sensorized shoes and a known human model. \looseness=-1 \subsection{Proposed Architecture} \begin{figure*}[t!] \centering \includegraphics[width=0.8\textwidth, height=75mm]{figures/dynik-ekf-blk-diag-corrected-new.pdf} \caption{Overall system architecture. Distributed IMU measurements are passed through the sub-blocks of dynamical IK to obtain joint states, while contact wrench measurements are used by the contact detector to obtain contact states. The outputs of these blocks are then passed to the base estimator along with the base gyroscope measurement for obtaining the base pose estimates.} \vspace{-1.5em} \label{fig:sys_architecture} \end{figure*} We propose a system architecture composed of three macro-blocks to tackle the human motion estimation problem, as shown in Figure \ref{fig:sys_architecture}. Firstly, a \emph{dynamical optimization based IK} block is used to compute the joint configuration from the target measurements of the distributed IMUs with the knowledge of the human model. The dynamical optimization approach aims to drive the state configuration $(\mathbf{q}(t), \nu(t))$ such that the forward and differential kinematics of the system converge to the reference target measurements in multiple time steps. \looseness=-1 Meanwhile, a \emph{contact detection} block infers ground contact using wrench measurements from the sensorized shoes. A rectangular approximation is used for the foot geometry to infer the contact state of candidate contact points on the foot based on the local center of pressure (CoP). \looseness=-1 Finally, the outputs of these two blocks are passed to an EKF block. The EKF is formulated as a filter over matrix Lie groups \cite{bourmaud2013discrete, barrau2016invariant} employing right-invariant, left-invariant, and non-invariant observations in order to estimate the floating base pose and velocity along with the position of the candidate contact points with respect to an inertial frame. The EKF block is activated after the dynamical IK block has converged below a certain error threshold for a reliable state initialization, which is crucial for filter convergence. The estimated base state may or may not be subsequently fed back to the IK block. \looseness=-1 \input{tex/DynIK} \input{tex/ContactDetection} \input{tex/EKF} \section{Introduction} \par Several Human-Robot Collaboration (HRC) scenarios require the realization of reliable motion tracking algorithms for the human. A common approach relies on the use of wearable sensing technologies to achieve the kinematic reconstruction. A reliable reconstruction becomes challenging in the absence of position sensors when using only proprioceptive measurements. This paper contributes towards the development of whole body joint state estimation and floating base estimation using only distributed inertial and force-torque sensing by cascading a Inverse Kinematics (IK) approach with a contact-aided filtering on matrix Lie groups.\looseness=-1 \par In the literature, sensor fusion of measurements from distributed Inertial Measurement Units (IMUs) has been used to estimate human motion assuming bio-mechanical models for the human body and coarsely known location of these sensors in the highly articulated kinematic chain of the model. \cite{miezal2016inertial} compares Extended Kalman Filter (EKF)-based and optimization-based sensor fusion methods for inertial body tracking accounting for robustness to model calibration errors and absence of magnetometer measurements for yaw corrections. The authors further extend their work to ground contact estimation and improve lower-body kinematics estimation in \cite{miezal2017real}. A human moving in space is usually modeled as a floating base system which implies the necessity to consider the evolution of the configuration space of internal joint angles and base pose over a differentiable manifold. \cite{joukov2017human} and \cite{sy2019estimating} both exploit the theory of Kalman filtering over matrix Lie groups for motion estimation by explicitly considering the non-Euclidean geometry of the state space, demonstrating significant improvements over other state representations while maintaining the required computational efficiency for real-time applications. \looseness=-1 \cite{von2017sparse} and \cite{sy2019estimating} both propose human motion tracking with reduced IMU counts while exploiting the complex geometry of the underlying configuration space of the human model and integrating additional physical constraints. The former aims for a full body motion reconstruction while the latter only focuses on the lower body kinematics. Recently, \cite{rapetti2020model} proposed a model-based approach referred to as Dynamical Optimization-based IK, combining dynamical systems’ theory with the IK optimization, for human motion estimation and demonstrated full-motion reconstruction on a human model with 48-DoFs and a 66-DoFs in real-time. However, most of the methods described above either rely on position sensors for full-body estimation or only perform partial kinematics estimation, such as lower body kinematics. \looseness=-1 \begin{figure}[!t] \centering \includegraphics[scale=0.15, width =0.32\textwidth]{figures/inPlac1-color.pdf} \caption{Reconstruction of walking-in-place motion using the proposed method.} \vspace{-2em} \label{fig:walk-in-place} \end{figure} \par In this paper, we present an approach for whole-body kinematics estimation in the absence of position sensors by extending the joint state estimation from the Dynamical IK \cite{rapetti2020model} with a floating base estimation using a Center of Pressure (CoP) based contact detection and an EKF on Lie groups through a cascading architecture. This decomposition is done to handle the floating base estimation within a prediction-correction framework and be able to incorporate contact-aided kinematic measurements without the need for imposing additional constraints in the IK, while remaining computationally light-weight when applied to systems with high degrees of freedom, such as an articulated human model. The validation of the proposed method is demonstrated by reconstructing walking-in-place (Figure \ref{fig:walk-in-place}) and free-walking motions performed by a human subject wearing a sensorized suit and shoes.\looseness=-1 This paper is organized as follows. Section \ref{sec:BACKGROUND} introduces the mathematical notation. Section \ref{sec:ESTIMATION} describes the problem of human motion estimation in the absence of position sensors and describes the overall architecture of the proposed approach. Sections \ref{sec:DYN-IK}, \ref{sec:CONTACT_DETECTION}, and \ref{sec:EKF} each describe the main blocks of the proposed architecture: Dynamical IK, contact detection and the EKF on Lie groups respectively. This is followed by experimental evaluation of the proposed method in Section \ref{sec:RESULTS} and concluding remarks in Section \ref{sec:CONCLUSION}. \looseness=-1 \section{Conclusion} \label{sec:CONCLUSION} In this paper, we presented an approach for whole body kinematics estimation of a human using distributed inertial and force-torque sensing, in the absence of position sensors. This is done by extending a Dynamical IK approach for joint state estimation with floating base estimation using contact-aided filtering on Lie groups. The proposed method was validated qualitatively for flat surface walking and in-place walking motions in comparison with trajectories obtained from Vive motion tracking system. \looseness=-1 There is definitely room for many improvements to the proposed algorithm especially concerning the prediction model and thresholding based contact inference. Nevertheless, the methodology allows for a modular and effective approach for full body estimation by exploiting filtering on Lie groups in cascade with inverse kinematics. Further, the method is directly applicable also to robots with similar sensing capabilities thereby allowing for a unified kinematic estimation approach for both humans and robots. Future work aims to extend the EKF with a more reliable prediction model that is learned from data along with relevant learned measurement models that will allow removing the dependence on using absolute orientation measurements which are usually affected by magnetometer drifts. \vspace{-0.5em} \section{Mathematical Background} \label{sec:BACKGROUND} \par \subsection{Notations and definitions} \subsubsection{Coordinate Systems and Kinematics} \begin{itemize} \item ${C[D]}$ denotes a frame with origin $\Pos{}{C}$ and orientation of coordinate frame ${D}$; \item $\Pos{A}{B}\in \R^3$ and $\Rot{A}{B}\in \SO{3}$ are the position and orientation of a frame $B$ with respect to the frame $A$; \item given $\Pos{A}{C}$ and $\Pos{B}{C}$, $\Pos{A}{C} = \Rot{A}{B} \Pos{B}{C} + \Pos{A}{B}= \Transform{A}{B} \PosBar{B}{C}$, where $\Transform{A}{B} \in \SE{3}$ is the homogeneous transformation and $\PosBar{B}{C} = \begin{bmatrix}\Pos{B}{C}^T & \ 1\end{bmatrix}^T \in \R^4$ is the homogeneous representation of $\Pos{B}{C}$; \item $\twistMixedTriv{A}{B} = \oDot{A}{B} = \frac{d}{dt}(\Pos{A}{B}) \in \R^3$ denotes the linear part of a mixed-trivialized velocity \cite[Section 5.2]{traversaro2019multibody} between the frame $B$ and the frame $A$ expressed in the frame ${B[A]}$. $\omegaRightTriv{A}{B} \in \R^3$ denotes the angular velocity between the frame ${B}$ and the frame ${A}$ expressed in ${A}$; \looseness=-1 \item ${A}$ denotes an absolute or an inertial frame; ${B}$, ${LF}$, and ${RF}$ indicate the frames attached to base link, left foot and right foot respectively; \looseness=-1 \end{itemize} \subsubsection{Lie Groups} We refer the readers to \cite[Section II]{ramadoss2021diligentkio} for a detailed description on the notation used for Lie groups. \looseness=-1 \subsubsection{Miscellaneous} \begin{itemize} \item $\I{n}$ and $\Zero{n}$ denote the $n \times n$ identity and zero matrices; \item Given $\uVec, \vVec \in \R^3$ the \emph{hat operator} for $\SO{3}$ is $S(.): \R^3 \to \so{3}$, where $\so{3}$ is the set of skew-symmetric matrices and $S(\uVec) \; \vVec = \uVec \times \vVec$; $\times$ is the cross product operator in $\R^3$. \looseness=-1 \end{itemize} \section{Center of Pressure based Contact Detection} \label{sec:CONTACT_DETECTION} The contact-aided floating base estimation relies on the contact states of candidate points chosen from the vertices of a rectangular approximation of the foot sole, as shown in the Figure \ref{fig:foot-geometery}. The contact wrench acting on the foot is decomposed into contact normal forces acting at these vertices. A Schmitt Trigger-based thresholding of these normal forces is then used to infer if a vertex is in contact with the environment. \looseness=-1 The contact normal force decomposition follows the approach presented in \cite[Appendix A]{dafarra2020predictive} based on the local center of pressure of the foot. A coordinate frame $C$ is placed at the center of the sole surface, with the $x$-axis pointing forward and parallel to the side with length $l$, while $z$-axis points upwards and perpendicular to the surface of the foot-sole. \looseness=-1 \begin{figure}[!t] \centering \centering \includegraphics[scale=0.2]{figures/rect-foot.pdf} \caption{Rectangular approximation of the foot geometry with length $l$ and width $d$. $F$, $S$ and $C$ denote the foot, sole and sole-center frames.} \vspace{-2em} \label{fig:foot-geometery} \end{figure} Given length $l$ and width $d$ of the rectangular sole, the coordinates of the vertices in the frame $C$ are $\mathbf{d}_1 = (\frac{l}{2}, \frac{d}{2}, 0), \mathbf{d}_2 = (\frac{l}{2}, -\frac{d}{2}, 0), \mathbf{d}_3 = (-\frac{l}{2}, \frac{d}{2}, 0),$ and $\mathbf{d}_4 = (-\frac{l}{2}, -\frac{d}{2}, 0)$. \looseness=-1 A contact wrench $\wrenchExt{} = \begin{bmatrix}{\forceExt{}}^T & {\torqueExt{}}^T \end{bmatrix}^T \in \R^6$ acting on frame $C$ is related to the 3D forces $\force{}_i \in \R^3,\ i = \{1,2, 3, 4\}$ at the vertices through the following conditions, \begin{gather} \begin{aligned} & \force{}_1 + \force{}_2 + \force{}_3 + \force{}_4 = \forceExt{}, \\ & \sum \mathbf{d}_i \times \force{}_i = \torqueExt{}. \end{aligned} \end{gather} From the equations above, the contact normal forces can be extracted to correspond to the total contact normal force and the contact tangential torques applied along $x$- and $y$-axes. \begin{align} \label{eq:chap:human-motion:cop-normal-force} & {f_1}_z + {f_2}_z + {f_3}_z + {f_4}_z = f^\mathbf{x}_z, \\ \label{eq:chap:human-motion:cop-tau-x} & \frac{d}{2}({f_1}_z + {f_3}_z) - \frac{d}{2}({f_2}_z + {f_4}_z) = \tau^\mathbf{x}_x, \\ \label{eq:chap:human-motion:cop-tau-y} & \frac{l}{2}({f_3}_z + {f_4}_z) - \frac{l}{2}({f_1}_z + {f_2}_z) = \tau^\mathbf{x}_y. \end{align} The Center of Pressure (CoP) in the frame $C$ is given by, \begin{align} & \text{CoP}_x = - \frac{\tau^\mathbf{x}_y}{f^\mathbf{x}_z},\quad \text{CoP}_y = \frac{\tau^\mathbf{x}_x}{f^\mathbf{x}_z}. \end{align} On expressing the contact normal forces as a function of ${f_4}_z$ and imposing a positivity constraint on the contact normal forces, ${f_i}_z \geq 0$, we can define $\alpha_i = {{f_i}_z}/{f^\mathbf{x}_z}$ as the ratio of the normal force at the vertex to the total contact normal force, leading to the inequalities, \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:alpha4-ineq} \begin{matrix} \alpha_4 \geq 0, & \alpha_4 \geq - \frac{\text{CoP}_y}{d} - \frac{\text{CoP}_x}{l}, \\[1em] \alpha_4 \leq \frac{1}{2} - \frac{\text{CoP}_x}{l}, & \alpha_4 \leq \frac{1}{2} - \frac{\text{CoP}_y}{d}. \end{matrix} \end{aligned}$ } \end{gather} With the choice of $\alpha_4$ to equal the average of the CoP bounds, we have a suitable solution for the ratios of contact normal force decomposition, \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:alpha4-ineq} \begin{split} & \alpha_4 = \frac{\left( \max\left(0, - \frac{\text{CoP}_y}{d} - \frac{\text{CoP}_x}{l} \right) + \min\left(\frac{1}{2} - \frac{\text{CoP}_y}{d}, \frac{1}{2} - \frac{\text{CoP}_x}{l} \right) \right)}{2}, \\ & \alpha_1 = \alpha_4 + \frac{\text{CoP}_x}{l} + \frac{\text{CoP}_y}{d}, \\ & \alpha_2 = -\alpha_4 + \frac{1}{2} - \frac{\text{CoP}_y}{d}, \\ & \alpha_3 = -\alpha_4 + \frac{1}{2} - \frac{\text{CoP}_x}{l}. \end{split} \end{aligned}$ } \end{gather} With this choice of ratios, $\alpha_i$ all equal to $1/4$ when the CoP lies in the center of the foot and the ratios are adjusted appropriately as the CoP moves around the rectangular surface of the approximated foot. Such a decomposition and a chosen threshold value for vertex contact detection allow the inference of the contact status of candidate points. \section{Experiments and Results} \label{sec:RESULTS} In this section, we present the results from the experimental evaluation of the proposed estimation algorithm for reconstructing the whole body kinematic motion of the human performing walking-in-place and free walking motions. \subsection{Experimental Setup} The experiments were conducted with a human subject wearing sensorized suit and shoes developed by \emph{iFeel Tech}\footnote{\url{https://ifeeltech.eu/}} which are part of a whole-body wearable technology aimed at real-time human motion tracking and articular stress analysis. Each shoe worn by the human is equipped with 6-axis force-torque sensors at its front and rear part of the sole and streams a ground reaction wrench measurement at $60 \si{Hz}$. The sensorized suit consists of 10 \emph{iFeel nodes} distributed as follows: 2 nodes on each arm (upper arm, fore arm), 2 nodes on each leg (upper leg, lower leg), one each on the Pelvis and stern and 2 nodes on the foot as part of the shoes. Each iFeel node has a Bosch BNO055 IMU that streams measurements at $60 \si{Hz}$. \looseness=-1 For the articulated rigid-body human model, we use the URDF model relevant to the subject available from the \emph{human-gazebo}\footnote{\url{https://github.com/robotology/human-gazebo}} project. A subset of 29 Degrees of Freedom (DoFs), from a total of 48 DoFs, related to the limb and torso kinematics is used to reconstruct a coarse full-body motion. \looseness=-1 For a validation of the estimated floating base pose, we perform a comparison with a base trajectory obtained from two different methods. The first method simply uses a \emph{Vive}\footnote{\url{https://www.vive.com/us/accessory/tracker3/}} motion tracker that is mounted on the base link of the human subject (\emph{Pelvis}) in order to track the base pose trajectory. Another base trajectory is obtained from a base line algorithm, referred to as HSP, which relies solely on the dynamical IK, circumventing the connection with the proposed EKF. This approach uses the known floor position as a pseudo-target measurement within the IK whenever a foot contact is detected, thereby constraining the whole body motion to achieve legged odometry. \looseness=-1 The data from the \emph{iFeel} suit and shoes along with the tracker pose are logged at a frequency of $50 \si{Hz}$ during the experiments and is played back in real-time to run the Whole Body Kinematics (WBK) estimation and the baseline algorithm (HSP) at $50 \si{Hz}$. The output trajectories are then saved in Matlab data format and aligned to the same reference frame for plotting the results. The trajectories are aligned using $\A \X = \Y \B$ calibration method to find an unknown transformation between the tracker and Pelvis and another between the world frames. \looseness=-1 \subsection{Experiments} For the experiments, the subject initially stays in an extended arm configuration, usually referred to as \emph{TPose} configuration before performing the actual motion. A calibration procedure is performed during \emph{TPose} to align the measurements from different IMUs to a common reference frame for the estimation. We make use of only absolute orientation measurements from the IMUs as inputs to the dynamical IK block. The differential inverse kinematics is solved using a QP solver with the consideration of joint limits for the legs tuned to allow for physically feasible motion. The rectangular foot geometry is set using the dimensions of the sensorized shoes. Known constant floor height is passed as a measurement to the EKF every time a candidate point on the foot is detected to be in contact. When all the candidate points on the foot are in contact, a contact orientation reflecting the flat planar contact surface is passed as measurement by setting the tilt angles to zero. The estimated base pose is not fed back to the Dynamical IK block. This allows the joint state estimation to be invariant of the floating base pose and depends only on the orientation measurements and relative kinematics. The accuracy in aligning the estimated trajectories with the Vive tracker trajectory is low due to missing data in the latter, and for this reason we pertain to a qualitative comparison for discussion. \looseness=-1 \subsubsection{In-Place Walking Motion} Figure \ref{fig:walk-in-place} shows one snapshot from the walking-in-place trajectory performed by the human and the estimated trajectory at that time instant. The overall base motion is fairly reconstructed in comparison with the Vive tracker trajectory as seen in Figure \ref{fig:plots}. The baseline algorithm HSP is seen to suffer considerably more from drifts in the forward direction $\mathbf{x}$ and along the base height $\mathbf{z}$ leading to resemble a stair-case walking motion. WBK suffers from low position drifts owing to the contact-aided measurements such as terrain height and contact plane updates. WBK is seen to be sensitive to the covariance of the base gyroscope measurements leading to varying degree of errors in the roll and heading angles of the base orientation. A considerable tuning effort is required to obtain reliable pose estimates from the EKF. \looseness=-1 \begin{figure*}[t!] \centering \includegraphics[height=72mm, width=0.9\textwidth]{figures/walk1-color.pdf} \caption{Snapshots from a free-walking experiment performed by the subject (top) and corresponding motion reconstruction from the proposed WBK estimation (bottom). Blue arrows represent contact normal forces for points in contact with the environment, while red points indicate loss of contact, and the black dot represents the local center of pressure which retains the last seen position when exiting the support polygon.} \vspace{-1.25em} \label{fig:walk} \end{figure*} \begin{figure}[!t] \centering \includegraphics[width=0.5\textwidth]{figures/plots.pdf} \caption{Evolution of base pose trajectories estimated by proposed WBK (blue dashed), base line HSP (red dotted), and that measured from Vive trackers (black solid) for a walking-in-place (left) and free walking motions (right). \looseness=-1} \vspace{-1.25em} \label{fig:plots} \end{figure} \begin{figure}[!t] \centering \includegraphics[scale=0.15, width=0.3\textwidth]{figures/walk/CoPEvolution.pdf} \caption{XY-position of the global CoP trajectory computed using WBK estimated base pose along with estimated position of contact points on the feet at first instants of full planar foot with the ground.} \vspace{-2em} \label{fig:cop} \end{figure} \subsubsection{Free Walking Motion} Figure \ref{fig:walk} shows snapshots from the walking trajectory performed by the human and the estimated trajectory at those time instants. The overall walking motion seems to reasonably reconstructed and from Figure \ref{fig:plots}, it can be seen that WBK performs comparably with the HSP algorithm for a walking motion. HSP gains $5 \si{\centi\meter}$ on the base height for a $12 \si{\second}$ walking over a flat surface, while WBK maintains the nominal base height during walking with deviations less than $1 \si{\centi\meter}.$ WBK is seen to suffer more in the forward walking and heading directions, eventhough it can be seen from Figure \ref{fig:cop} that the evolution of the global CoP computed from the estimated base pose is consistent with the walking motion. The CoP moves from the heel to toe for a forward walking motion and changes sharply during turns while always remaining bounded between the feet polygons obtained from the estimated positions of candidate contact points on the feet. The rectangular shape of the feet is not preserved by the estimated positions on the XY-plane eventhough the contact-aided measurement updates are enforced. This is because the knowledge of the rectangular feet is not exploited in the EKF and the contact position states are completely decoupled from the feet orientation states and are related only to the base orientation. The filter can be constrained to obtain better estimates by introducing this information. \looseness=-1 \section{Lie Group Extended Kalman Filter} \label{sec:EKF} We employ an EKF over matrix Lie groups with right-invariant, left-invariant, and non-invariant observations using contact information and joint configuration. This block acts replaces the sub-module of the state integrator block that integrates the base link velocity to obtain the base pose. \looseness=-1 \subsection{State Representation} The EKF block maintains its own internal state and the results of the Dynamical IK block are considered as measurements passed to the filter. We wish to estimate the position $\Pos{A}{B}$, orientation $\Rot{A}{B}$, linear velocity $\oDot{A}{B}$, and angular velocity $\omegaLeftTriv{A}{B}$ of the base link $B$ in the inertial frame $A$. Additionally we also consider the position of candidate contact points on the feet $\Pos{A}{{F_{1,\dots,n_f}}}$ and orientation of the feet $\Rot{A}{F}$, where $F = \{{LF}, {RF} \}$ in the state. The information about each foot incorporated into the internal state of the EKF consists of four vertex positions of the foot ($n_f = 4$) along with a rotation of the foot. For the sake of readability, we introduce some shorthand notation for this section. The tuple of state variables $(\Pos{A}{B},\Rot{A}{B}, \oDot{A}{B}, \Pos{A}{{F_{1,\dots,n_f}}})$ or $(\mathbf{p}, \mathbf{R}, \mathbf{v}, \mathbf{d}_{F_{1 \dots n_f}})$ are encapsulated within $\SEk{N+2}{3}$ matrix Lie group \cite{hartley2020contact}. The left-trivialized angular velocity of the base link $\omegaLeftTriv{A}{B}$ denoted as $\omega$ forms a translation group $\T{3}$, while feet rotations $\Rot{A}{F}$ or $\mathbf{Z}_F$ evolve over the group of rotations $\SO{3}$. Together, a state space element $\X \in \mathcal{M}$ is represented by a composite matrix Lie group, $\SEk{N+2}{3} \times \T{3} \times \SO{3}^2$. We simplify the derivation in the remainder of this section by considering only one foot with only one contact point per foot and dropping the suffix $F_{1, \dots, {n_f}}$ and $F$ for the feet positions $\mathbf{d}_{F_{1 \dots n_f}}$ and orientation $\mathbf{Z}_F$ respectively. \\ A state space element $\X \in \mathcal{M}$ keeping only one foot contact point and one foot orientation is then given by, \looseness=-1 \begin{gather} \scalebox{0.82} \setcounter{MaxMatrixCols}{20} $\begin{aligned}[b] \label{eq:chap:human-motion:ekf-state-repr} \X_1 = \begin{bmatrix} \mathbf{R} & \mathbf{p} & \mathbf{v} & \mathbf{d} \\ \Zeros{1}{3} & 1 & 0 & 0 \\ \Zeros{1}{3} & 0 & 1 & 0 \\ \Zeros{1}{3} & 0 & 0 & 1 \end{bmatrix}, \X_2 = \begin{bmatrix} \I{3} & \omega \\ \Zeros{1}{3} & 1 \end{bmatrix}, \X = \text{blkdiag}(\X_1, \X_2, \Z). \end{aligned}$ \end{gather} In tuple representation, we can denote the state space element as, $\X \triangleq (\mathbf{p}, \mathbf{R}, \mathbf{v}, \mathbf{d},\omega, \mathbf{Z})_\mathcal{M}$. The hat operator $\ghat{\mathcal{M}}{\epsilon}: \R^{9+3{n_f}+3+3} \to \mathfrak{m}$ with $n_f = 1$ and $N = 1$ that transports a vector $\epsilon$ to the Lie algebra $\mathfrak{m}$ is defined as as, \begin{gather*} \scalebox{0.88} \setcounter{MaxMatrixCols}{20} $\begin{aligned}[b] \label{eq:chap:human-motion:ekf-state-hat} & \ghat{\SEk{N+2}{3}}{\epsilon_1} = \begin{bmatrix} S(\epsilon_\mathbf{R}) & \epsilon_\mathbf{p} & \epsilon_\mathbf{v} & \epsilon_\mathbf{d} \\ \Zeros{1}{3} & 0 & 0 & 0 \\ \Zeros{1}{3} & 0 & 0 & 0 \\ \Zeros{1}{3} & 0 & 0 & 0 \end{bmatrix}, \quad \ghat{\T{3}}{\epsilon_2} = \begin{bmatrix} \Zero{3} & \epsilon_\omega \\ \Zeros{1}{3} & 0 \end{bmatrix}, \end{aligned}$ \end{gather*} \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned}[b] \ghat{\mathcal{M}}{\epsilon} = \text{blkdiag}\left(\ghat{\SEk{N+2}{3}}{\epsilon_1},\ \ghat{\T{3}}{\epsilon_2},\ S(\epsilon_\mathbf{Z})\right), \end{aligned}$ \end{gather} with, $\epsilon_1 = \text{vec}(\epsilon_\mathbf{p}, \epsilon_\mathbf{R}, \epsilon_\mathbf{v}, \epsilon_\mathbf{d})$ and the vector $\epsilon \triangleq \text{vec}(\epsilon_1, \epsilon_\omega, \epsilon_\mathbf{Z})$. \looseness=-1 The exponential mapping of the state space expressed in a tuple representation is given by, \looseness=-1 \begin{equation} \label{eq:chap:human-motion:ekf-state-exp-map} \begin{split} \gexphat{\mathcal{M}}\left(\epsilon\right) &= \big(\J\left(\epsilon_\mathbf{R}\right)\ \epsilon_\mathbf{p},\ \Exp\left(\epsilon_\mathbf{R}\right),\ \J\left(\epsilon_\mathbf{R}\right)\ \epsilon_\mathbf{v}, \\ & \quad \ \ \ \J\left(\epsilon_{\mathbf{Z}}\right)\ \epsilon_{\mathbf{d}},\ \epsilon_\omega,\ \Exp\left(\epsilon_{\mathbf{Z}}\right)\big)_{\mathcal{M}}. \end{split} \end{equation} where, $\Exp(.) \triangleq\ \gexphat{\SO{3}}(.)$ is the exponential map of $\SO{3}$ and $\J(.) \triangleq \gljac{\SO{3}}(.)$ is the left Jacobian of $\SO{3}$ \cite{sola2018micro}. The adjoint matrix of the considered state space $\mathcal{M}$ is given as, \looseness=-1 \begin{gather} \scalebox{0.8} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-state-adj} \begin{split} \gadj{\X_1} = \begin{bmatrix} \Rot{}{} & S(\mathbf{p}) \Rot{}{} & \Zero{3} & \Zero{3} \\ \Zero{3} & \Rot{}{} & \Zero{3} & \Zero{3} \\ \Zero{3} & S(\mathbf{v}) \Rot{}{} & \Rot{}{} & \Zero{3} \\ \Zero{3} & S(\mathbf{d}) \Rot{}{} & \Zero{3} & \Rot{}{} \end{bmatrix}, \quad \gadj{\X} = \text{blkdiag}(\gadj{\X_1},\ \I{3},\ \Z). \end{split} \end{aligned}$ } \end{gather} The left Jacobian of the matrix Lie group $\mathcal{M}$ is obtained as a block-diagonal form of the left Jacobians of the constituting matrix Lie groups given as $\gljac{\mathcal{M}}(\epsilon) = \text{blkdiag} \left( \gljac{\SEk{N+2}{3}}\left(\epsilon_1\right), \; \I{3},\ \J\left(\epsilon_{\mathbf{Z}}\right) \right).$ The closed-form expression for the left Jacobian $\gljac{\SEk{N+2}{3}}(.)$ can be found in \cite[Section 2.6]{luo2020geometry}. The left Jacobian for the translation group of angular velocity is the identity matrix. \vspace{-0.9em} \subsection{System Dynamics} The continuous system dynamics evolving on the group with state $\X \in \mathcal{M}$ is given by the dynamical system, $\frac{d}{dt} \X = f(\X, \mathbf{u}) + \X \ghat{\mathcal{M}}{\textbf{w}}$, where $f$ is the deterministic dynamics, $\mathbf{u} \in \R^m$ is the exogenous control input and $\textbf{w} \in \mathbb{R}^p$ is a continuous white noise, with covariance $\mathbf{Q}$. The system dynamics is formulated using rigid body kinematics with constant motion models for the base link along with rigid contact models for the contact points and the foot orientations. The continuous system dynamics is then given by, \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-dyn} \begin{split} \mathbf{\dot{p}} = \mathbf{v}, & \qquad \mathbf{\dot{R}} = \mathbf{R} \; S(\omega), \\ \mathbf{\dot{v}} = \mathbf{R} \; (-\noiseLinVel{B}), & \qquad \mathbf{\dot{d}} = \mathbf{R}\; (-{\Rot{B}{F}}(\encoders)\ \noiseLinVel{F}), \\ \dot{\omega} = -\noiseAngVel{B}, & \qquad \mathbf{\dot{Z}} = \mathbf{Z} \; S(-\noiseAngVel{F}), \end{split} \end{aligned}$ } \end{gather} with the left trivialized noise vector defined as, \begin{gather*} \scalebox{0.85} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-left-triv-noise} & \mathbf{w} \footnotesize{ \;= \text{vec}\big( \Zeros{3}{1}, \; \Zeros{3}{1}, \; -\noiseLinVel{B}, \; -{\Rot{B}{F}}(\encoders)\;\noiseLinVel{F}, \; -\noiseAngVel{B},\; -\noiseAngVel{F}\big) }, \end{aligned}$ } \end{gather*} and the prediction noise covariance matrix $\mathbf{Q}_c = \expectation{\mathbf{w} \mathbf{w}^T}$. Here, we have used ${\Rot{B}{F}}(\encoders)$ which denotes the rotation of the foot frame with respect to the base link computed through the forward kinematics map using the joint position inputs. The system dynamics defined in Eq. \eqref{eq:chap:human-motion:ekf-sys-dyn} does not obey the group-affine property \cite[Theorem 1]{barrau2016invariant}. \looseness=-1 \subsubsection{Linearized Error Dynamics} A right invariant error, $\eta^R = \mathbf{\hat{X}} \X^{-1}$ is chosen leading to the error dynamics, \begin{gather} \scalebox{0.825} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-errordynamics} \begin{split} &\frac{d}{dt}(\mathbf{\hat{p}} - \mathbf{\hat{R}}\mathbf{R}^T\;\mathbf{p}) = S(\mathbf{\hat{p}}) \mathbf{\hat{R}}\; \epsilon_\omega + \epsilon_\mathbf{v}, \\ &\frac{d}{dt}(\mathbf{\hat{R}}\;\mathbf{R}^T) = S(\mathbf{\hat{R}}\; \epsilon_\omega), \\ &\frac{d}{dt}(\mathbf{\hat{v}} - \mathbf{\hat{R}}\mathbf{R}^T\;\mathbf{v}) = S(\mathbf{\hat{v}}) \mathbf{\hat{R}}\; \epsilon_\omega - \mathbf{\hat{R}}\;\noiseLinVel{B}, \\ &\frac{d}{dt}(\mathbf{\hat{d}} - \mathbf{\hat{R}}\mathbf{R}^T\;\mathbf{d}) = S(\mathbf{\hat{d}}) \mathbf{\hat{R}}\; \epsilon_\omega - \mathbf{\hat{R}}\;\Rot{B}{F}(\encoders)\;\noiseLinVel{F}, \\ &\frac{d}{dt}(\hat{\omega} - \omega) = -\noiseAngVel{B},\\ &\frac{d}{dt}(\mathbf{\hat{Z}}\mathbf{Z}^T) = - S(\mathbf{\hat{Z}}\; \noiseAngVel{F}). \end{split} \end{aligned}$ } \end{gather} Using the log-linearity property, the linearized error dynamics and covariance propagation equation then become, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-sys-lin-err-prop} \begin{split} &\dot{\epsilon} = \mathbf{F}_c\ \epsilon + \gadj{\mathbf{\hat{X}}}\ \mathbf{w}, \\ & \dot{\mathbf{P}} = \mathbf{F}_c\; \mathbf{P} + \mathbf{P}\; \mathbf{F}_c^T + \mathbf{\hat{Q}}_c , \end{split} \end{aligned}$ } \end{gather} where the continuous-time, linearized error propagation matrix $\mathbf{F}_c$ and the prediction noise covariance matrix $\mathbf{\hat{Q}}_c$ are given as, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-err-prop-matrices} \begin{split} &\mathbf{F}_c\ = \begin{bmatrix} \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & S(\mathbf{\hat{p}}) \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & S(\mathbf{\hat{v}}) \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & S(\mathbf{\hat{d}}) \mathbf{\hat{R}} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} \\ \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} \\ \end{bmatrix}, \mathbf{\hat{Q}}_c = \gadj{\mathbf{\hat{X}}}\;\mathbf{Q}_c\;\gadj{\mathbf{\hat{X}}}^T. \end{split} \end{aligned}$ } \end{gather} A discretization of Eq. \eqref{eq:chap:human-motion:ekf-sys-dyn} using a zero-order hold with sampling time $\Delta T$ leads to discrete dynamics, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-disc-dyn} \begin{split} \mathbf{\hat{p}}_\knext = \; \mathbf{\hat{p}}_\kcurr + \; \mathbf{\hat{v}}_{\kcurr} \; \Delta T, & \quad \quad \mathbf{\hat{R}}_{\knext} = \; \mathbf{\hat{R}}_{\kcurr} \; \gexphat{\SO{3}}\big( \hat{\omega}_k \; \Delta T \big), \\ \mathbf{\hat{v}}_{\knext} = \; \mathbf{\hat{v}}_{\kcurr}, & \quad \quad \quad \quad \mathbf{\hat{d}}_{\knext} = \; \mathbf{\hat{d}}_{\kcurr},\\ \hat{\omega}_{\knext} = \; \hat{\omega}_{\kcurr}, & \quad \quad \quad \quad \mathbf{\hat{Z}}_{\knext} = \; \mathbf{\hat{Z}}_{\kcurr}. \end{split} \end{aligned}$ } \end{gather} A first-order approximation for the Ricatti equations leads to, \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-disc-cov-prop} \begin{split} &\mathbf{P}_{\knext} = \mathbf{F}_{\kcurr} \; \mathbf{P}_{\kcurr}\; \mathbf{F}_{\kcurr}^T + \mathbf{Q}_{\kcurr}, \\ &\mathbf{F}_{\kcurr} = \exp(\mathbf{F}_c \Delta T) \approx \I{p} + \mathbf{F}_c \Delta T,\\ &\mathbf{Q}_{\kcurr} = \mathbf{F}_{\kcurr}\; \mathbf{\hat{Q}}_c\; \mathbf{F}_{\kcurr}^T\; \Delta T. \end{split} \end{aligned}$ } \end{gather} \subsection{Right Invariant Observations} We consider measurements having a right-invariant observation structure, $\mathbf{z}_{\kcurr} = \X_{\kcurr}^{-1}\ \mathbf{b}\ +\ \mathbf{n}_{\kcurr} \in \R^q$ which lead to a time-invariant measurement model Jacobian \cite{barrau2016invariant} and follows the filter update, \looseness=-1 $\mathbf{\hat{X}}_{\kcurr}^{+} = \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left(\mathbf{\hat{X}}_{\kcurr}\ \mathbf{z}_{\kcurr} - \mathbf{b}\right) \right)\ \mathbf{\hat{X}}_{\kcurr},$ where, $\mathbf{K}_\kcurr$ is the Kalman gain and $\mathbf{n}_{\kcurr}$ is the noise associated with the observation and $\mathbf{b}$ is a constant vector. A reduced dimensional gain $\mathbf{K}_\kcurr^r$ can be computed by applying an auxiliary matrix $\Pi$ that selects only the non-zero elements from the full innovation vector in such a way that, $\mathbf{K}_\kcurr \left(\mathbf{\hat{X}}_{\kcurr}\ \mathbf{z}_{\kcurr} - \mathbf{b}\right) = \mathbf{K}_\kcurr^r \Pi \mathbf{\hat{X}}_{\kcurr}\ \mathbf{z}_{\kcurr}.$ The measurement model Jacobian is obtained through a log-linear, first-order approximation of the non-linear error update, \looseness=-1 \begin{gather*} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \eta^{R+}_{\kcurr} = \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left( \eta^{R}_{\kcurr}\ \mathbf{b}\ -\ \mathbf{b} + \mathbf{\hat{X}}_{\kcurr}\mathbf{n}_{\kcurr} \ \right) \right) \eta^{R}_{\kcurr}. \end{aligned}$ } \end{gather*} \subsubsection{Relative candidate contact point position} The joint positions $\encoders = \jointPos + \encoderNoise$ obtained from the integration of estimated joint velocities are assumed to be affected by white Gaussian noise $\encoderNoise$ and are used to determine the relative candidate contact point positions $h_p(\encoders)$ with respect to the base link using forward kinematics. The measurement model $h_p(\X)$, right-invariant observation $\mathbf{z}_p$, constant vector $\mathbf{b}_p$, measurement model Jacobian $\mathbf{H}_p$, auxiliary matrix $\Pi_p$ and measurement noise covariance matrix $\mathbf{N}_p$ associated with the relative position measurements are given as, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-relposmeas} \begin{split} &h_p(\X) = \mathbf{\hat{R}}^T(\mathbf{\hat{d}} - \mathbf{\hat{p}}) + \relativeJacobianLeftTrivLinIn{F}{B}(\encoders) \; \encoderNoise \in \mathbb{R}^3, \\ & \mathbf{z}_p^T = \begin{bmatrix} h_p^T(\encoders) & 1 & 0 & -1 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_p^T = \begin{bmatrix} \Zeros{1}{3} & 1 & 0 & -1 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_p = \begin{bmatrix} -\I{3} & \Zero{3} & \Zero{3} & \I3 & \Zero{3} & \Zero{3} \end{bmatrix}, \Pi_p = \begin{bmatrix} \I{3} & \Zeros{3}{10} \end{bmatrix}\\ & \mathbf{N}_p = \mathbf{\hat{R}} \; \relativeJacobianLeftTrivLinIn{F}{B}(\encoders) \; \text{Cov}(\encoderNoise) \; \relativeJacobianLeftTrivLinIn{F}{B}^T(\encoders) \; \mathbf{\hat{R}}^T. \end{split} \end{aligned}$ } \end{gather} \subsubsection{Zero-velocity Update (ZUPT) aided Left Trivialized Base Velocity} With a rigid contact assumption, the null velocity of the stance foot can be associated with the base velocity. The left-trivialized base velocity measurement computed through the joint velocity measurements and the configuration dependent Jacobian of the contact point is used as a right-invariant observation for the filter. The linear part of the base velocity measurement in the form of $\X_{\kcurr}^{-1}\ \mathbf{b}\ +\ \mathbf{n}_{\kcurr}$, associated with the state variable $\mathbf{v}$ is then described by the quantities, \looseness=-1 \begin{gather} \scalebox{0.8} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-ZUPTlin} &h_v(\encoders, \encoderSpeeds) = - \big(\gadj{\Transform{F}{B}}^{-1} \; \relativeJacobianLeftTrivIn{B}{F}(\encoders) \; \encoderSpeeds\big)_{\text{lin}} \in \mathbb{R}^3, \\ & \mathbf{z}_v^T = \begin{bmatrix} h_v(\encoders, \encoderSpeeds) & 0 & -1 & 0 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_v^T = \begin{bmatrix} \Zeros{1}{3} & 0 & -1 & 0 & \Zeros{1}{3} & 0 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_v = \begin{bmatrix} \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \Pi_v = \begin{bmatrix} \I{3} & \Zeros{3}{10} \end{bmatrix}, \mathbf{N}_v = \mathbf{\hat{R}}\text{Cov}(\fkNoiseLinVel{B})\mathbf{\hat{R}}^T, \end{aligned}$ } \end{gather} where, $\gadj{\Transform{F}{B}} \in \R^{6 \times 6}$ is the adjoint transformation transporting the 6D rigid body velocities from the base frame $B$ to the foot frame $F$. Similarly, the angular part of the left-trivialized base velocity measurement related to the state variable $\omega$ is described by the following quantities for filter update, \looseness=-1 \begin{gather} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-ZUPTang} \begin{split} &h_\omega(\encoders, \encoderSpeeds) = - \big(\gadj{\Transform{F}{B}}^{-1} \; \relativeJacobianLeftTrivIn{B}{F}(\encoders) \; \encoderSpeeds\big)_{\text{ang}} \in \mathbb{R}^3, \\ & \mathbf{z}_\omega^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & h_\omega(\encoders, \encoderSpeeds) & -1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_\omega^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & \Zeros{1}{3} & -1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_\omega = \begin{bmatrix} \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \Pi_\omega = \begin{bmatrix} \Zeros{3}{6} & \I{3} & \Zeros{3}{4} \end{bmatrix}, \mathbf{N}_\omega = \text{Cov}(\fkNoiseAngVel{B}). \end{split} \end{aligned}$ } \end{gather} We have used $\fkNoiseLinVel{B}$ and $\fkNoiseAngVel{B}$ to denote an additive forward kinematic noise affecting the velocity computations. \subsection{Left Invariant Observations} We also consider measurements having a left-invariant observation structure, $\mathbf{z}_{\kcurr} = \X_{\kcurr}\ \mathbf{b}\ +\ \mathbf{n}_{\kcurr}$ which lead to a time-invariant measurement model Jacobian obtained through a first-order approximation of the error update equation, \begin{gather*} \scalebox{0.9} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \eta^{L+}_{\kcurr} = \eta^{L}_{\kcurr}\ \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left( \left(\eta^{L}_{\kcurr}\right)^{-1}\mathbf{b}\ -\ \mathbf{b} + \mathbf{\hat{X}}^{-1}_{\kcurr}\mathbf{n}_{\kcurr} \ \right) \right). \end{aligned}$ } \end{gather*} The filter is then updated by applying the correction through $ \mathbf{\hat{X}}_{\kcurr}^{+} = \mathbf{\hat{X}}_{\kcurr}\ \gexphat{\mathcal{M}} \left(\mathbf{K}_\kcurr \left(\mathbf{\hat{X}}^{-1}_{\kcurr}\ \mathbf{z}_{\kcurr} - \mathbf{b}\right) \right)$. However, since we have considered right-invariant error $\eta^R$ in our filter design, in order to incorporate the updates from the left-invariant observations, it is necessary to transform the right invariant error to be expressed as the left-invariant error \cite{hartley2020contact} which can be done using the adjoint map as $\epsilon^R =\ \gadj{\mathbf{\hat{X}}}\ \epsilon^L$ and $\epsilon^L =\ \gadj{{\mathbf{\hat{X}}^{-1}}}\ \epsilon^R$. This implies a switching between the covariance of right- and left-invariant errors as, \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-cov-switch} \begin{split} & \mathbf{P}^L = \gadj{{\mathbf{\hat{X}}^{-1}}}\ \mathbf{P}^R\ \gadj{{\mathbf{\hat{X}}^{-1}}}^T, \\ & \mathbf{P}^R = \gadj{\mathbf{\hat{X}}}\ \mathbf{P}^L\ \gadj{\mathbf{\hat{X}}}^T. \end{split} \end{aligned}$ } \end{gather} \subsubsection{Base Collocated Gyroscope} The gyroscope measurements from the pelvis IMU is used to formulate a left-invariant observation, assuming that they are not affected by any time-varying biases but only by additive white noise $\noiseGyro{B}$. Considering that the IMU is rigidly attached to the pelvis link and the rotation $\Rot{B}{{B_{\text{IMU}}}}$ between the pelvis link and the pelvis IMU is known, we can compute the left-invariant observations leading to the quantities relevant for filter update as, \looseness=-1 \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:chap:human-motion:ekf-basegyro} \begin{split} &h_g(\tilde{\omega}) = \Rot{B}{{B_{\text{IMU}}}} \yGyro{A}{{B_{\text{IMU}}}} \in \mathbb{R}^3, \\ & \mathbf{z}_g^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & h_g(\tilde{\omega}) & 1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{b}_g^T = \begin{bmatrix} \Zeros{1}{3} & 0 & 0 & 0 & \Zeros{1}{3} & 1 & \Zeros{1}{3} \end{bmatrix},\\ & \mathbf{H}_g = \begin{bmatrix} \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \I{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \Pi_g = \begin{bmatrix} \Zeros{3}{6} & \I{3} & \Zeros{3}{4} \end{bmatrix}, \mathbf{N}_g = \text{Cov}(\noiseGyro{B}) . \end{split} \end{aligned}$ } \end{gather} Since, the linearized error update follows standard EKF equations, the gain $\mathbf{K}_\kcurr$ and covariance update can be computed as, \looseness=-1 \begin{gather} \scalebox{0.85} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \begin{split} & \mathbf{S}_\kcurr = \mathbf{H}\ \mathbf{P}_{\kcurr}\ \mathbf{H}^T\ +\ \mathbf{\hat{N}}_\kcurr, \\ & \mathbf{K}_\kcurr = \mathbf{P}_{\kcurr}\ \mathbf{H}^T\ \left(\mathbf{S}_\kcurr\right)^{-1}, \\ & \mathbf{P}_{\kcurr}^{+} = \left(\I{p} - \mathbf{K}_\kcurr\ \mathbf{H}\right)\ \mathbf{P}_{\kcurr}. \end{split} \end{aligned}$ } \end{gather} \subsection{Non Invariant Observations} Non-invariant observations considered to be evolving over a distinct matrix Lie group $G^\prime$ are in the form $\Y_\knext = h (\X_\knext) \;\gexphat{G^\prime}(\mathbf{n}_\knext)$ \cite{bourmaud2013discrete}. The right invariant error leads to the innovation term, \looseness=-1 $ \mathbf{\tilde{z}} = \glogvee{G^\prime}\big(h^{-1}(\mathbf{\hat{X}})\; h(\gexp{\mathcal{M}}(-\epsilon) \mathbf{\hat{X}})\big), $ and the measurement model Jacobian as, $\mathbf{H} = -\frac{\partial}{\partial \epsilon}\; \glogvee{G^\prime}\big(h^{-1}(\mathbf{\hat{X}})\; h(\gexp{\mathcal{M}}(-\epsilon)\;\mathbf{\hat{X}})\big)\bigg|_{\epsilon = 0}.$ \subsubsection{Relative foot link rotation} The joint positions $\encoders$ obtained from the integration of estimated joint velocities $\encoderSpeeds$ is passed through the forward kinematics map to determine the relative foot orientations $h_R(\encoders)$. \looseness=-1 \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:eq:chap:human-motion:ekf-relrotmeas} \begin{split} &h_R(\X) = \mathbf{\hat{R}}^T\;\mathbf{\hat{Z}}\; \gexphat{\SO{3}}\big(\relativeJacobianLeftTrivAngIn{B}{F}(\encoders) \; \encoderNoise\big) \in \SO{3}, \\ & \mathbf{H}_R = \begin{bmatrix} \Zero{3} & -\mathbf{\hat{Z}}^T & \Zero{3} & \Zero{3} & \Zero{3} & \mathbf{\hat{Z}}^T \end{bmatrix}, \\ & \mathbf{N}_R = \; \relativeJacobianLeftTrivAng{B}{F}(\encoders) \; \text{Cov}(\encoderNoise) \; {\relativeJacobianLeftTrivAng{B}{F}}^T(\encoders). \end{split} \end{aligned}$ } \end{gather} \subsubsection{Terrain Height Update} For candidate points that are actively in contact with the environment, the height measurement from a known map affected by noise $\mathbf{w}_\mathbf{d}$ is used to update the filter states. High covariance values are associated with $(d_x, d_y)$ coordinates while map covariance values is set for the height $d_z$. The measurement update equations for non-invariant observation can be written as, \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:eq:chap:human-motion:ekf-relrotmeas} \begin{split} &h_d(\X) =\mathbf{d} + \mathbf{w}_\mathbf{d} \in \T{3}, \\ & \mathbf{H}_d = \begin{bmatrix} \Zero{3} & S(\mathbf{\hat{d}}) & \Zero{3} & -\I{3} & \Zero{3} & \Zero{3} \end{bmatrix}, \\ & \mathbf{N}_d = \; \text{Cov}(\mathbf{w}_d). \end{split} \end{aligned}$ } \end{gather} \subsubsection{Contact Plane Orientation Update} In cases where, the foot is in planar rigid contact with the environment, we enable a contact plane orientation update. We relate the contact plane orientation measurement affected by noise $\mathbf{w}_c$ directly to the foot orientation $\Z$. The filter update quantities associated with this measurement can be summarized as, \looseness=-1 \begin{gather} \scalebox{0.92} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:eq:chap:human-motion:ekf-relrotmeas} \begin{split} &h_c(\X) = \mathbf{\hat{Z}}\; \gexphat{\SO{3}}(\mathbf{w}_c) \in \SO{3}, \\ & \mathbf{H}_c = \begin{bmatrix} \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \Zero{3} & \mathbf{\hat{Z}}^T \end{bmatrix}, \\ & \mathbf{N}_c = \; \text{Cov}(\mathbf{w}_c). \end{split} \end{aligned}$ } \end{gather} The state update in the tangent space becomes $\mathbf{m}^{-}_\knext = \mathbf{K}_\knext\; \mathbf{\tilde{z}}_\knext $, which is used for the state reparametrization $\mathbf{\hat{X}}_\knext = \gexphat{\mathcal{M}}\big(\mathbf{m}^{-}_\knext\big) \mathbf{\hat{X}}_\kpred$. The state covariance is updated as $\mathbf{P}_\knext = \J^l_\mathcal{M}(\mathbf{m}^{-}_\knext)\;(\I{p} - \mathbf{K}_\knext\;\mathbf{H}_\knext)\mathbf{P}_\kpred\;\J^l_\mathcal{M}(\mathbf{m}^{-}_\knext)^T$. \section{Dynamical Inverse Kinematics} \label{sec:DYN-IK} The overall structure of Dynamical IK consists of three main steps, where at first the measured velocity $\mathbf{v}(t)$ is corrected using a forward kinematics error $\mathbf{r}(t)$ to produce an updated velocity vector $\mathbf{v}^{*}(t)$ which is then passed through the inverse differential kinematics module to compute the system velocity $\nu(t)$. Finally, the velocity $\nu(t)$ is integrated to obtain the system configuration $\mathbf{q}(t)$. These three steps establish a closed-loop regulator on the model-based forward kinematics, thereby, driving the estimated system configuration to the true configuration reflected by the target measurements. Due to space constraints, we kindly refer the reader to the original paper \cite{rapetti2020model} for more details about Dynamical IK. The base state integrated from the dynamical IK block is discarded in favor of the EKF block for base state estimation, while the joint state estimates from the dynamical IK are used as inputs to the EKF. \looseness=-1 \looseness=-1 \section{Problem Statement} \label{sec:ESTIMATION} This section describes the problem of motion estimation for a human equipped with a sensorized suit of distributed IMUs and shoes with embedded force-torque sensors. The human is modeled as an articulated multi-rigid body system. \looseness=-1 The internal configuration of an articulated mechanical system is usually estimated through inverse kinematics with the help of task space or target measurements. Consider a set of $n_p$ frames $P =\{P_1, P_2, \dots, P_{N_p}\}$ associated with target position measurements $\Pos{A}{{P_i}}(t) \in \R^3$ and target linear velocity measurements $\oDot{A}{P_i}(t) \in \R^3$. Similarly, consider a set of $n_o$ frames $O = \{O_1, O_2, \dots, O_{N_o}\}$ associated with target orientations $\Rot{A}{{O_j}}(t) \in \SO{3}$ and target angular velocity measurements $\omegaRightTriv{A}{O_j}(t) \in \R^3$. Given the kinematic description of the model, IK is used to find the state configuration $(\mathbf{q}(t), \nu(t))$, \looseness=-1 \begin{gather} \scalebox{0.91} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{chap:human-motion:ik-problem} \begin{cases} \Pos{A}{{P_i}}(t) = h^p_{P_i}(\mathbf{q}(t)), & \forall\ i = 1, \dots, n_p \\ \Rot{A}{{O_j}}(t) = h^o_{O_j}(\mathbf{q}(t)), & \forall\ j = 1, \dots, n_o \\ \oDot{A}{{P_i}}(t) = \mathbf{J}^\text{lin}_{P_i}(\mathbf{q}(t)) \nu(t), & \forall\ i = 1, \dots, n_p \\ \omegaRightTriv{A}{{O_j}}(t) = \mathbf{J}^\text{ang}_{O_j}(\mathbf{q}(t)) \nu(t), & \forall\ j = 1, \dots, n_o \\ \A^\mathbf{q}\ \jointPos(t) \leq \mathbf{b}^\mathbf{q}, \\ \A^\nu\ \jointVel(t) \leq \mathbf{b}^\nu, \end{cases} \end{aligned}$ } \end{gather} where, $\mathbf{q}(t) \triangleq \mathbf{q}^B(t)$ and $\nu(t) \triangleq \nu^{B}(t)$ is the position and velocity of the mechanical system, $h^p_{P_i}(\mathbf{q}(t))$ and $h^o_{O_j}(\mathbf{q}(t))$ are the position and orientation selection functions from the forward kinematics of frames $P_i$ and $O_j$ respectively, while $\mathbf{J}^\text{lin}_{P_i}(\mathbf{q}(t))$ and $\mathbf{J}^\text{ang}_{O_j}(\mathbf{q}(t))$ are the linear and angular part of the Jacobian matrix mapping system velocity to target velocities. $\A^\mathbf{q}$ and $\mathbf{b}^\mathbf{q}$ are constant parameters representing the limits for joint configuration $\jointPos(t)$, and $\A^\nu$ and $\mathbf{b}^\nu$ represent the limits for joints velocity $\jointVel(t)$. We account for target measurements provided by sparsely distributed IMUs across the body. Consider IMUs $S_i$ attached to links $L_i$ of the body. The target orientations $\Rot{A}{{L_i}}$ can be expressed using the absolute orientation measurements $\yRot{{A_{S_i}}}{{S_i}}$ from the IMU as $\Rot{A}{{L_i}} = \Rot{A}{{A_{S_i}}} \ \yRot{{A_{S_i}}}{{S_i}} \ \Rot{{S_i}}{{L_i}}$ and the target angular velocities can be expressed using the gyroscope measurements as $\omegaRightTriv{A}{{L_i}} = \Rot{A}{{L_i}} \yGyro{A}{{L_i}}$, where $\Rot{{S_i}}{{L_i}}$ defines the rotation of the sensor link's frame with respect to sensor frame and $\Rot{A}{{A_{S_i}}}$ is a calibration matrix used to express the measurements of sensor $S_i$ in a common reference frame $A$. The matrices $\Rot{{S_i}}{{L_i}}$ and $\Rot{A}{{A_{S_i}}}$ are assumed to be known from a prior calibration procedure. \looseness=-1 The set of target measurements can be collected in a pose target tuple $\mathbf{x}(t)$ and a velocity target vector $\mathbf{v}(t)$, \begin{gather} \scalebox{0.91} \setcounter{MaxMatrixCols}{20} $\begin{aligned} \label{eq:tuple-collection} \mathbf{x}(t) \triangleq \begin{pmatrix} \Pos{A}{{B}}(t) \\ \Rot{A}{{B}}(t) \\ \Rot{A}{{L_1}}(t) \\ \vdots \\ \Rot{A}{{L_{n_L}}}(t) \end{pmatrix}, \quad \mathbf{v}(t) \triangleq \begin{bmatrix} \oDot{A}{{B}}(t) \\ \omegaRightTriv{A}{{B}}(t) \\ \omegaRightTriv{A}{{L_1}}(t) \\ \vdots \\ \omegaRightTriv{A}{{L_{n_L}}}(t) \end{bmatrix}. \end{aligned}$ } \end{gather} It must be noted that the base position $\Pos{A}{{B}}(t)$ and linear velocity $\oDot{A}{{B}}(t)$ are not directly measured but are passed as quantities estimated from the previous time-instant. Similar to Eq. \eqref{eq:tuple-collection}, the forward kinematics map and the Jacobians necessary for the differential kinematics can be stacked as, \looseness=-1 \begin{gather} \scalebox{0.91} \setcounter{MaxMatrixCols}{20} $\begin{aligned} h(\mathbf{q}(t)) \triangleq \begin{pmatrix} h^p_{P_1}(\mathbf{q}(t)) \\ \vdots \\ h^p_{P_{n_p}}(\mathbf{q}(t)) \\ h^o_{O_1}(\mathbf{q}(t)) \\ \vdots \\ h^o_{O_{n_o}}(\mathbf{q}(t)) \end{pmatrix}, \quad \mathbf{J}(\mathbf{q}(t)) \triangleq \begin{bmatrix} \mathbf{J}^\text{lin}_{P_1}(\mathbf{q}(t)) \\ \vdots \\ \mathbf{J}^\text{lin}_{P_{n_p}}(\mathbf{q}(t)) \\ \mathbf{J}^\text{ang}_{O_1}(\mathbf{q}(t)) \\ \vdots \\ \mathbf{J}^\text{ang}_{O_{n_o}}(\mathbf{q}(t)) \end{bmatrix}, \end{aligned}$ } \end{gather} leading to the set of equations, \begin{equation} \label{chap:human-motion:state-configuration} \begin{split} &\mathbf{x}(t) = h(\mathbf{q}(t)) \\ &\mathbf{v}(t) = \mathbf{J}(\mathbf{q}(t)) \nu(t). \end{split} \end{equation} The problem of motion estimation then requires to solve for the floating base pose $\Transform{A}{B}$ and velocity $\twistMixedTriv{A}{B}$ of the human along with the internal joints configuration $\jointPos$, and velocity $\jointVel$ using a set of absolute target orientations $\Rot{A}{{L_i}}$ and target angular velocities $\omegaRightTriv{A}{{L_i}}$ obtained from each of the sparsely distributed IMUs along with contact-aided kinematic corrections using contact wrench measurements obtained from the sensorized shoes and a known human model. \looseness=-1 \subsection{Proposed Architecture} \begin{figure*}[t!] \centering \includegraphics[width=0.8\textwidth, height=75mm]{figures/dynik-ekf-blk-diag-corrected-new.pdf} \caption{Overall system architecture. Distributed IMU measurements are passed through the sub-blocks of dynamical IK to obtain joint states, while contact wrench measurements are used by the contact detector to obtain contact states. The outputs of these blocks are then passed to the base estimator along with the base gyroscope measurement for obtaining the base pose estimates.} \vspace{-1.5em} \label{fig:sys_architecture} \end{figure*} We propose a system architecture composed of three macro-blocks to tackle the human motion estimation problem, as shown in Figure \ref{fig:sys_architecture}. Firstly, a \emph{dynamical optimization based IK} block is used to compute the joint configuration from the target measurements of the distributed IMUs with the knowledge of the human model. The dynamical optimization approach aims to drive the state configuration $(\mathbf{q}(t), \nu(t))$ such that the forward and differential kinematics of the system converge to the reference target measurements in multiple time steps. \looseness=-1 Meanwhile, a \emph{contact detection} block infers ground contact using wrench measurements from the sensorized shoes. A rectangular approximation is used for the foot geometry to infer the contact state of candidate contact points on the foot based on the local center of pressure (CoP). \looseness=-1 Finally, the outputs of these two blocks are passed to an EKF block. The EKF is formulated as a filter over matrix Lie groups \cite{bourmaud2013discrete, barrau2016invariant} employing right-invariant, left-invariant, and non-invariant observations in order to estimate the floating base pose and velocity along with the position of the candidate contact points with respect to an inertial frame. The EKF block is activated after the dynamical IK block has converged below a certain error threshold for a reliable state initialization, which is crucial for filter convergence. The estimated base state may or may not be subsequently fed back to the IK block. \looseness=-1 \input{tex/DynIK} \input{tex/ContactDetection} \input{tex/EKF}
\section{Introduction} In order to understand the formation and evolution of stars, an important quantity is the stellar initial mass function (IMF), the relative numbers of stars as a function of their mass at the time of their formation. As yet, the IMF remains only loosely constrained observationally. A common assumption is that the IMF is universal -- the same in all environments and throughout cosmic time. In this paper, we examine five observables that vary over cosmological distances and which strongly depend on the high-mass region of the IMF. One of our goals is to identify the extent to which these observables can be used to test the assumption of a universal IMF at the high-mass end. In particular, we study the consequences of non-universal IMFs for various astrophysical quantities, finding larger uncertainties in the star formation rate and the core-collapse supernova rate. The concept of an IMF was introduced by \citet{1955ApJ...121..161S}, who proposed a single power law $\frac{dN}{dM} \propto M^{\alpha}\,$ where $N$ is the number of stars formed with mass $M$; in what is now known as the Salpeter IMF, he took $\alpha = - 2.35$. With the assumption of a single power law, the exponent $\alpha$ can be measured to within approximately 10\%~\citep{2003ApJ...593..258B}. Unfortunately, there are fundamental questions about the parametrization that should be used in describing the IMF. Perhaps most notably, it was recognized at the end of the 20th century that low mass stars did not tend to fall on the power-law distribution predicted by Salpeter. This gave rise to IMF models with low-mass suppressions, such as the broken power law of \citet{2001MNRAS.322..231K} and the log-normal distribution of \citet{2003PASP..115..763C}. Recent evidence suggests that the IMF may even have an intrinsic dependence on the local environment~\citep{2010Natur.468..940V, FM2013, 2012Natur.484..485C, Ferreras2012, LaBarbera2019, Harayama2008, 2011MNRAS.415.1647G}. Variations to the low-mass end of the IMF have been studied extensively in the literature~\citep{2010Natur.468..940V, 2003PASP..115..763C, 2013hst..prop13449G}. Instead, following recent evidence~\citep{2011MNRAS.415.1647G}, we focus on observables sensitive to the high-mass end of the IMF which may also be non-universal. Star-forming regions can be distinguished by a variety of properties of the collapsing gas and dust, including angular momentum, metallicity, density, temperature, and dust content. The universality of the IMF therefore boils down to an assumption that all of these properties play little to no role in the masses of the formed stars. Whether this is theoretically justified remains unclear. As described in \citet{Offner2014} (and references therein), perturbations in the density of a star-forming gas cloud can, under reasonable assumptions, generate a power-law spectrum of core and clump masses, where cores and clumps refer to gravitationally collapsing gas clouds that are likely to form at least one star. In contrast to this power-law distribution, at low masses, turbulence in the star-forming cloud can naturally produce a spectrum of masses which disfavors lower mass stars relative to the power-law predictions. In particular, \citet{1997MNRAS.288..145P} showed that turbulence could give rise to a log-normal mass distribution among low mass cores/clumps, similar to the IMF described by \citet{2003PASP..115..763C}. While this theoretical explanation would seem to leave very little room for non-universality in the IMF, the mass function described here is for cores and clumps, not stars. In relating this mass function to the stellar IMF, numerous assumptions must be made about the formation of protostars out of collapsing gas \citep{Offner2014}. The validity of many of these assumptions, especially in extreme environments, is largely an open question, suggesting that even within this theoretical framework, there may be room to consider non-universality without requiring a new paradigm. The question of whether the IMF is indeed universal has been investigated many times. For example, despite most observations being consistent with a universal IMF, authors have regularly suggested a non-universal IMF as a way to explain other astrophysical tensions~\citep{1998MNRAS.301..569L}. Further, over the last two decades, hints of a tension between universal IMFs and observations have developed, particularly in early-type elliptical galaxies~\citep{2010Natur.468..940V, FM2013, 2012Natur.484..485C, Ferreras2012, LaBarbera2019} and in environments which experience extreme properties~\citep{Harayama2008, 2011MNRAS.415.1647G}. Theoretical models, such as the Integrated Galaxy-wide IMF~\citep{2017MNRAS.464.3812F} and the cosmic-ray-regulated star formation discussed in \citet{Fontanot_2018}, can offer justifications for some of these observations and pose additional predictions. On the other hand, due to the inherent difficulty in measuring the IMF, many authors reject these observational claims, leaving the question of whether the IMF is indeed universal largely unanswered (see e.g., \citet{Hopkins2018}, and references within for a recent review of the range of perspectives). A large part of the uncertainty in whether the IMF is universal can be traced to the difficulty in unambiguously measuring it. Locally, where it is possible to resolve individual stars, one can estimate the IMF by comparing observed stellar populations to the populations that are predicted to form if different IMF models are assumed~\citep{2013seg..book..419C, KE2012}. While accurate, this approach can only be used in star-forming regions nearby enough to resolve individual stars, and requires assumptions about the history of star formation in that region. On the other hand, for more distant galaxies, where it is impossible to see inside star-forming regions or where it is difficult to resolve individual stars, some proxy for the star formation rate (SFR) must be used. The most common approach is to use the luminosity as a measure of the rate of star formation (for example \citet{1998ARA&A..36..189K}), but this causes observations of the IMF to depend heavily on the calibration factor between luminosity and SFR. While it is possible to calculate this calibration factor numerically, it requires an assumption about the IMF. Unfortunately, this circular dependence encountered when calculating the IMF of distant galaxies is rather ubiquitous, making an independent measurement of the IMF challenging. While it is difficult to directly measure the IMF, it may be possible to find indirect ways to probe the effects of a non-universal IMF. Previous works, such as \citet{2017MNRAS.464.3812F,Fontanot_2018} approach this problem as well, but use different models of varying IMF and probe different astrophysical observables than we do here. In this paper, we examine five observables that vary over cosmological distances and which depend on the IMF: the star formation rate density (SFRD), the extragalactic background light (EBL), the core-collapse supernova (CCSN) rate density, the type Ia supernova (SNIa) rate, and the diffuse supernova neutrino background (DSNB). For each, we explore how they change when using a non-universal IMF compared to a universal one, and discuss whether they are discriminable with current or future data. For simplicity, we focus on the change induced by a varying IMF and ignore many other uncertainties directly related to each observable. These additional uncertainties will, in practice, make it more difficult to observe the IMF induced changes. Our goal is simply to learn whether astrophysical observations of distant objects could, in principle, provide indirect evidence for a non-universal IMF. The rest of this paper is structured as follows. In Sec.~\ref{sec:varIMF}, we describe the two IMF models we consider throughout the paper. In Sec.~\ref{implications}, we look at how these IMF models affect the five quantities described in the previous paragraph: the star formation rate density (SFRD), the extragalactic background light (EBL), the core-collapse supernova (CCSN) rate density, the type Ia supernova (SNIa) rate, and the diffuse supernova neutrino background (DSNB). Finally, we conclude in Sec.~\ref{sec:conclusion}. \section{Initial Mass Function Models} \label{sec:varIMF} In a star-forming region, the stellar IMF describes the distribution of masses with which stars form. A common approach to describing this IMF is through a probability distribution $\xi(M)$. That is \begin{equation} \frac{dN}{dM} = \xi(M)N_{\rm tot}\,, \end{equation} where $N$ is the number of stars formed with mass $M$, typically measured in units of ${\rm M}_\odot$, and $N_{\rm tot}$ is the total number of stars formed. Under this convention, $\xi(M)$ is normalized such that $\int{\xi(M)dM} = 1$, when integrating over all possible stellar masses. In Salpeter's seminal work~\citep{1955ApJ...121..161S}, the IMF was described as a power law of the form \begin{equation} \xi(M) \propto M^{\alpha}\,, \end{equation} where $\alpha=-2.35$ was observed for stars in a mass range $0.4$ to $1.0 \,{\rm M}_\odot$. Since then, the range of masses over which the IMF could be determined has vastly increased, but the practice of describing the IMF through a power-law slope has remained. However, as IMFs have been studied, the single straight power law of Salpeter has given way to IMFs with more features. For example, commonly used IMFs include the piecewise power law established by \citet{2001MNRAS.322..231K} (a variant of which was used in for example \citet{2003ApJ...593..258B}) and the \citet{2003PASP..115..763C} IMF which has a log-normal distribution for stars below approximately $1\,{\rm M}_\odot$ and a power law for stars greater than $1\,{\rm M}_\odot$. These two IMFs are plotted in Fig.~\ref{fig:IMF}. As long as a universal IMF is assumed, the high-mass behavior of the IMF is approximately a power law with $\alpha \approx -2.35$, consistent with a Salpeter IMF~\citep{2003ApJ...593..258B}.\footnote{Note that the typical break points for Kroupa and Chabrier are $0.5\,{\rm M}_\odot$ and $1\,{\rm M}_\odot$ respectively. Because the log-normal mass function smoothly turns over, they end up giving a similar distribution of stellar masses.} \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/IMF.pdf} \caption{\textbf{Initial mass functions:} This figure compares the non-universal IMFs we use in this paper (blue shaded region) to the canonical IMFs used in the literature: \citet{2001MNRAS.322..231K} (green dotted) and \citet{2003PASP..115..763C} (red dash-dotted). We note the similarity of the two canonical cases relative to the wide range of non-universal IMFs we consider; we will use a proxy we name the \textit{Salpeter-like} IMF (purple solid line) as our benchmark for the canonical cases. Each IMF is normalized so that the integral over mass equals 1. The Kroupa IMF follows a broken power law, with slope $\alpha = -1.3$ for $M<0.5\,{\rm M}_\odot$ and $\alpha = -2.3$ for $M>0.5\,{\rm M}_\odot$. The Chabrier IMF also behaves differently at low mass versus high mass stars, with the low mass stars ($M< 1\,{\rm M}_\odot$) following a log-normal behavior while high mass stars follow a power law with slope $\alpha = -2.35$. In all cases we use broken power-law IMFs, defined piecewise with a break at 0.5 ${\rm M}_\odot$. \textit{Non-universal IMF} (blue-shaded region): For masses $M<0.5\,{\rm M}_\odot, \alpha=-1.3$ and for $M>0.5\,{\rm M}_\odot, \alpha$ can take values in the range -1.8 to -2.35, shown here in the blue shaded region. \textit{Benchmark universal Salpeter-like IMF} (purple solid curve): consists of a shallow power law like that in the Kroupa IMF at low masses and a Salpeter $\alpha = -2.35$ IMF at high masses. Throughout this paper, we will use this case as a benchmark against which to test the effects of allowing the IMF to vary. } \label{fig:IMF} \end{figure} However, while it is broadly accepted that a power-law Salpeter IMF does not hold true at low masses, questions regarding the range of environments over which the Salpeter power law is valid for stars with mass greater than $0.5\,{\rm M}_\odot$ remain significantly disputed. One of the most well-motivated regimes in which deviations from a Salpeter IMF at higher stellar masses could occur is the set of conditions in which Population III stars grow. For example, a top-heavy IMF at early times, which favors a higher average mass for Pop III stars, seems to be preferred by observations~\citep{Sharda2021}. One possible mechanism that could justify this behavior is described in \citet{Sharda2021}, where a change in metallicity can shift the peak mass from approximately $0.5\,{\rm M}_\odot$ for solar metallicities to around $50\,{\rm M}_\odot$ at metallicities of Pop III stars. Furthermore, Pop III stars may exhibit energy production mechanisms inaccessible in Pop I and Pop II stars, as would be the case for Dark Stars (stars made of hydrogen and helium but powered by dark matter)~\citep{freese2016}. In that case, it would be quite surprising if the IMF were to be consistent across all three populations. In addition, there has been a growing body of evidence that seems to suggest that while the IMF behaves as a power law at high masses, the slope may depend substantially on environmental factors. Various authors identify multiple factors as possible sources of these deviations away from Salpeter. In addition to metallicity, these include: velocity dispersion~\citep{Ferreras2012, FM2013}; radius and surface mass density~\citep{LaBarbera2019}; and high turbulence~\citep{chabrier2014}. In this paper, we focus on a non-universal IMF that varies with the SFR of a star-forming region. Specifically, we explore a relationship that was identified in data from the spectroscopic GAMA survey~\citep{2011MNRAS.413..971D}, as analyzed in \citet{2011MNRAS.415.1647G}. The GAMA survey was undertaken by the Anglo-Australian telescope, which had measured the spectra of 120,000 galaxies at the time \citet{2011MNRAS.415.1647G} did their analysis. It has now taken the spectra of approximately 300,000 galaxies. The analysis in \citet{2011MNRAS.415.1647G} used the emission strength of the H$\alpha$ line as a proxy to calculate the SFR of a galaxy, and then binned galaxies based on that SFR. Using a set of simulated galaxies, a power-law IMF was fit to the observed galaxies in each SFR bin, with the exponent $\alpha$ free to vary. Using these binned galaxies, they found a clear preference for a non-universal IMF, and that the variation could be described by the function, $\alpha_G \approx 0.36 \log\langle \mathrm{SFR}\rangle - 2.6.$ Here, the average SFR, $\langle \mathrm{SFR} \rangle$, is measured in units of ${\rm M}_\odot \, \mathrm{yr}^{-1}$. While this expression is the basis of the varying IMF we consider throughout the rest of this work, it is not in the most convenient form for our purposes. In particular, the independent quantity is the SFR, which is inferred from the luminosity of the H$\alpha$ emission line. To calculate the astrophysical observables discussed below, we will need galaxy luminosity functions up to high redshifts. Unfortunately, the H$\alpha$ emission line is not the ideal tracer of these luminosity functions as dust reprocesses most light emitted by galaxies into the infrared. On the other hand, galaxy surveys (and therefore galaxy luminosity functions) are more complete and readily available in the far-infrared (FIR) band (i.e., in the wavelength range 8-1000 $\mu m$) up to high redshifts. As a result, although using infrared luminosities can introduce significant uncertainty into the calculated SFRs \citep{Madau:2014bja, Wilkins2019}, it is essential for our calculations below.\footnote{ Note that \citet{Wilkins2019} found that the precise stellar mass range considered can alter the FIR and H$\alpha$ calibration factors, although the alteration is not necessarily the same between the two frequency bands. We therefore point out that by shifting from H$\alpha$ to FIR, we are introducing additional error on the overall magnitude of each of the observables discussed below. } With this in mind, we convert $\langle \mathrm{SFR} \rangle$ to the FIR luminosity $L_{{\rm FIR}}$, using fixed conversion factors from \citet{1998ARA&A..36..189K}.\footnote{Specifically, we used the relation $\mathrm{SFR}\, ({\rm M}_\odot \, \mathrm{yr}^{-1}) = 4.5 \times 10^{-44} L_{FIR}\, (\mathrm{erg} \, \mathrm{s}^{-1})$\citep{1998ARA&A..36..189K}. We discuss how this value depends on the IMF in Section \ref{sec:calib}.} This mimics the process used by \citet{1998ARA&A..36..189K} in reverse, but implicitly assumes that the SFRs predicted by both tracers (H$\alpha$ luminosity and FIR luminosity) are consistent. Using this procedure, we can rewrite the varying IMF expression from \citet{1998ARA&A..36..189K} as \begin{equation} \alpha_{\mathrm{var}, >0.5} \approx 0.36 \log\langle L_{{\rm FIR}} \rangle - 6.1\,. \label{IMF LIR} \end{equation} Ultimately, the IMF we consider here is empirically based, so we choose to confine ourselves to the range of IMFs that were observed in the corresponding data. In particular, the analysis in \citet{2011MNRAS.415.1647G} calculated IMFs ranging from $\alpha \approx -2.35$ to $-1.8$, with some populations of galaxies having IMFs as steep as $\alpha \approx -2.5$. We limit ourselves to consider only the range of $\alpha \in [-2.35, -1.8],$ which ensures that low luminosity galaxies have an IMF with slope $\alpha=-2.35$.\footnote{ We note however, that increasing the range of possible $\alpha$'s does not significantly affect our results. In particular, we verified that extending the range to $\alpha \in [-2.5, -1.8]$ has no noticeable effect on all results shown below. } This $\alpha$ range corresponds to enforcing galaxies with a luminosity $\log\langle L/L_\odot \rangle \gtrsim 12$ to have $\alpha = -1.8$, and for galaxies with luminosity $\log\langle L/L_\odot \rangle \lesssim 10.4$ to have $\alpha = -2.35$. Furthermore, we explore only the effect of varying the IMF above a mass cutoff of $0.5\, {\rm M}_\odot$, which gives comparable low-mass behavior to the Chabrier and Kroupa IMFs. Below this mass cutoff, we use a fixed power law \begin{equation} \alpha_{\mathrm{var}, <0.5} = -1.3\,, \end{equation} which matches the low-mass power law of the Kroupa IMF from 0.1 to 0.5 ${\rm M}_\odot$. We plot the range of IMFs that may appear in this luminosity-dependent varying IMF in Fig.~\ref{fig:IMF} (blue band). Special attention is given to the IMF which consists of a shallow power law like that in the Kroupa IMF at low masses and a Salpeter IMF at high masses. Throughout this paper, we will use this \textit{Salpeter-like} IMF (blue line) as a benchmark against which to test the effects of allowing the IMF to vary. One important fact that is readily seen from Fig.~\ref{fig:IMF}, and which has been noted by, for example \citet{Hopkins2018}, is that all of the IMF models we consider are quite similar, with only slight variation between them. However, despite the smallness of these variations, when the different IMF models are used to predict the values of observables, especially those that depend on integration of IMF-dependent quantities, we can see substantial differences appearing between the predictions made under those IMF models. \subsection{Luminosity to SFR Calibration Factor} \label{sec:calib} We are interested in using observables which vary on cosmological scales to probe the IMF, and on those scales directly measuring the IMF is unrealistic. Instead, we will be using luminosity as a proxy for star formation, and by extension the IMF, as described in Eq.~\eqref{IMF LIR}. Because all of the observables we consider are related to the rates at which stars form or die, a necessary factor in their calculation is the calibration factor, which we denote $\chi$, that relates luminosity to SFR. In general, the calibration factor depends on the IMF, and because we are considering a non-universal IMF, we must consider how the $\chi$ will depend on our assumed IMF. For a Salpeter IMF, multiple calculations of the calibration factor have been performed. In particular, \citet{1998ARA&A..36..189K} found the calibration factor using three different wavelength ranges. While modeling of factors such as dust has improved~\citep{KE2012}, the values in \citet{1998ARA&A..36..189K} are often useful as a benchmark for illustrative purposes. Throughout this paper, we focus on the far infrared (FIR) wavelength range, 8-1000 $\mu$m, for which the value of the calibration factor from \citet{1998ARA&A..36..189K}, assuming a Salpeter IMF, is \begin{equation} \chi_{\mathrm{K98, FIR}} = 4.5 \times 10^{-44} \, \mathrm{{\rm M}_\odot \, yr^{-1} \, s \, erg^{-1}}\,. \end{equation} While the values obtained in \citet{1998ARA&A..36..189K} are derived assuming a Salpeter IMF, and are reasonably consistent with a Salpeter-like IMF (as shown in Fig.~\ref{fig:IMF}), we are interested in IMFs with a range of high-mass behaviors. In order to calculate the impact that changing the IMF has on the calibration factor, we use the code \texttt{P\'egase.3} \citep{2019A&A...623A.143F}, which simulates the radiation spectrum of a galaxy with a set of user-defined inputs (our particular scenarios are provided here: \href{https://github.com/joshziegler/DSNB/tree/main/Pegase}{\texttt{P\'egase} inputs}). In each \texttt{P\'egase} simulation, a cloud of gas is converted to stars at a prescribed SFR, and with a prescribed IMF. The stellar spectrum of each star that is formed is computed and allowed to evolve according to stellar evolution processes. These stellar spectra are then summed for the ensemble of stars in the galaxy at each timestep in the simulation, resulting in a galactic spectrum. That galactic spectrum is then adjusted to account for the reprocessing of stellar light by dust. Through this process, we can get a spectrum which may be integrated over various frequency ranges and used to calculate luminosities in different frequency bands. In our simulations, we consider galaxies in the local universe that have a constant rate of star formation, and with other properties that we allow to vary. Besides allowing for different IMFs, we look at galaxies with two different geometries: disky spiral galaxies and spheroidal starburst galaxies, and with different metallicities and different dust models. In particular, for metallicity we consider a high-metallicity case with $Z = 0.026$ and a low-metallicity case with $Z = 0.013$.\footnote{Note that some work has been done to self-consistently model metallicity evolution together with a varying IMF~\citep{2010AIPC.1240..123K}.} For the dust models, we consider the dust models of \citet{2004ApJS..152..211Z} (ZWD), and \citet{2001ApJ...554..778L,2001ApJ...548..296W} (LWD). We summarize the combinations of the models we used in Table~\ref{tab:calibdustZ}. For each of the simulated galaxies, we calculate the luminosity in an $8$--$1000~\mu$m wavelength band at different times from $10$~Myr to $1$~Gyr after the star formation begins. Figure~\ref{fig:calib} shows how the calibration factor is affected considering each of these changes in input parameters. Here it can be clearly seen that while changing the metallicity and dust model does lead to a distinguishable difference in the calibration factor, those differences are small compared to the changes induced by changing the IMF and geometry. \begin{table} \label{tab:calibdustZ} \renewcommand{\arraystretch}{1.3} \begin{center} \begin{tabular}{c|c|c} Scenario & $Z$ & Grains File \\ \hline \hline low Z & 0.013 & ZDA\\ high Z & 0.026 & ZDA\\ dust ZDA & 0.0195 & ZDA\\ dust LWD & 0.0195 & LWD\\ \end{tabular} \caption{Choices of input parameters in \texttt{P\'egase.3}. We use the various scenarios to estimate the impact of these parameters on the luminosity to SFR calibration factor. For all other results in the paper, we use the calibration factors derived with the ``low Z'' conditions.} \end{center} \end{table} \begin{figure*} \centering \includegraphics[width=0.49\linewidth]{plots/Calib_alpha.pdf} \includegraphics[width=0.49\linewidth]{plots/Calib_range.pdf} \caption{\textbf{Calibration factor vs IMF slope:} \textit{(Left Panel)} Comparison of the calibration factor $\chi = R_{SF}/L$ for a range of IMF slopes ($\alpha = -2.35$ to $-1.8$) used in our \texttt{P\'egase.3} simulations. We also show the impact of galaxy morphology by comparing calibration factors assuming spiral galaxies (solid lines) and spheroidal galaxies (dashed lines). The horizontal black line is the calibration factor identified in Kennicutt 1998~\citep{1998ARA&A..36..189K} for an IMF slope $\alpha = -2.35$ and assuming a spheroidal galaxy. Conventionally, the calibration factor is reported at 100 Myr following an onset of star formation, indicated here by a grey dotted vertical line. \textit{(Right Panel)} The effect of different dust models and metallicities on the calibration factor, for both spiral and spheroidal morphologies with an IMF slope $\alpha = -2.35$. For comparison, all curves in the left panel use the ``low Z'' scenario.} \label{fig:calib} \end{figure*} The convention for reporting a single calibration factor is to take the value at 100 Myr after the start of star formation. For other tracers of star formation, particularly ultraviolet luminosity, the calibration factor is effectively a constant after 100 Myr~\citep{1998ARA&A..36..189K}. While that is not the case for the FIR calibration factor, we adopt the same convention. Under this definition, we observe that the calibration factor we calculate for a Salpeter-like IMF and a spheroidal starburst galaxy is within 10\% of the calibration factor determined by Kennicutt~\citep{1998ARA&A..36..189K} for a Salpeter IMF in a spheroidal galaxy. We do not account for other effects, e.g., stellar rotation on the calibrations \citep{Horiuchi:2013bc}. Note that for $\alpha=-2.35$ we compared \texttt{P\'egase} with \texttt{Starburst~99}~\citep{Leitherer:1999rq} and found similar calibration factors. \section{Probes of a Non-universal IMF} \label{implications} Now that we have established our IMF models and the associated calibration factors, we will explore five astrophysical observables that intrinsically depend on the IMF. For each, we present the theoretical prediction for both IMF models and discuss whether current or future data are able to distinguish between the two. \subsection{Star Formation Rate Density} \label{sec:SFRD} We first explore how the SFR of galaxies could provide constraints on the nature of the IMF. The SFR is the rate at which gas in a star-forming region turns into stars, typically measured in $\mathrm{{\rm M}_\odot \, yr^{-1}}$. While an interesting quantity in its own right, we will focus on the related star formation rate density (SFRD), which measures the star formation rate per unit volume and typically has units $\mathrm{{\rm M}_\odot \, yr^{-1} \, Mpc^{-3}}$. By looking at the SFRD rather than individual galaxies' SFR, we can average over the variance introduced because of different galactic properties and specifically explore how star formation depends on redshift. As a result, while both quantities give insight into the star formation process, the SFRD is more directly tied to the cosmic star formation history and less dependent on conditions within individual star-forming regions~\citep{Madau:2014bja}. While an understanding of the SFR is critical to theories of galactic evolution, it is challenging to measure directly. In fact, only in local systems, where stars can be resolved, can the SFR be directly measured~\citep{2013seg..book..419C, KE2012}. Where young stars can be resolved, namely within the Milky Way and the nearest galaxies, it is possible to count those young stars and therefore directly estimate the SFR~\citep{2011AJ....142..197C}. In systems slightly more distant, where it is possible to resolve stars but impossible to see young stars shrouded in dust, fitting the galactic color-magnitude diagram to simulations can provide an accurate measure of the SFR, among other properties. However, for more distant systems, in which stars cannot individually be resolved, an indirect measure of the SFR must be used, typically treating luminosity as a tracer of the SFR.\footnote{While the methods described here are among the most direct ways to estimate the SFR, work has been done to improve these estimates by combining these methods with observations that depend indirectly on the SFR. For example, see \citet{2008MNRAS.385..687W,2008MNRAS.391..363W}} To convert from luminosity to SFR, one uses the calibration factor introduced in the previous section. As mentioned before, unfortunately these calibration factors are determined using simulations which require assumptions to be made about the IMF. In section \ref{sec:calib}, we describe the impact that allowing the IMF to vary can have on the calibration factor. To calculate the SFRD, we need the calibration factor as well as the luminosity distribution of galaxies. This distribution can be described through the luminosity function ${dN}/{d\log L}$,\footnote{ Note that all equations below are written for a generic luminosity $L$. For notational simplicity, we therefore drop the subscript FIR on all luminosities. However, all calculations are performed within the FIR luminosity range (8-1000$\,\mu$m). } which will generically be a function of redshift $z$. In all of our calculations, we use the set of luminosity functions calculated from data collected by the Herschel observatory in multiple complementary surveys including the PACS Evolutionary Probe (PEP), Herschel Multi-Tiered Extragalactic Survey (HerMES), and Herschel Great Observatories Origin Deep Survey (GOODS) \citep{Gruppioni:2013jna}. By including deep, pencil beam surveys like GOODS, these data include galaxies out to a redshift of $z\sim 4$. Meanwhile, broad, shallow surveys, like those in PEP and HerMES, can help provide more accurate identification of galaxies' morphologies, Therefore, from this combined dataset, \citet{Gruppioni:2013jna} were able to develop accurate, galaxy-morphology specific luminosity functions, labeled as ``spiral'', ``starburst'', and ``AGN-SF'' for redshifts $z\approx0-4$.\footnote{ Note that care must be taken in how AGN are considered. The luminosity functions we consider are derived from the total luminosity of the galaxies, which includes both AGN and stellar sources. However, when calculating calibration factors, it is conventional to include only luminosity from stellar sources, not including AGN. As a result, introducing AGN may decrease the calibration factors from what we derive in the previous section, but we do not consider the effects of such a decrease in this work. } Respectively, these describe: spiral, disky galaxies without extreme star formation; spheroidal galaxies with intense star formation; and galaxies with a bright active galactic nucleus (AGN). We further distinguish the AGN category into spiral galaxies with an AGN and starburst galaxies with anAGN, based on the fraction of each type presented in \citet{Gruppioni:2013jna}. For both spiral galaxies with or without an AGN, we use the spiral calibration factors from the previous section. Similarly, for starburst galaxies with or without an AGN, we use the spheroidal calbiration factors. In Fig.~\ref{fig:lum_func}, we show the luminosity density as functions of redshift. In particular, we show the quantity $\int dL \: {dN}/{d\log L} $ for both spiral and starburst galaxies, as well as their sum. Assuming a Salpeter-like IMF, the calibration factor is constant, so this quantity is proportional to the SFRD, as can be seen clearly below in Eq.~\eqref{eq:rsf}. We additionally show the luminosity dependence of this integrated quantity by presenting contributions from three luminosity ranges. \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/Luminosity_funcs.pdf} \caption{\textbf{Luminosity density:} We show how the luminosity functions ${dN_g}/{d\log L}$ from \citet{Gruppioni:2013jna} depend on redshift. These luminosity functions give the density of galaxies as a function of luminosity and redshift. Here we present the integral $\int dL \: {dN_g}/{d\log L}$ for spiral and starburst galaxies. We also show the contribution to these integrals for the luminosity ranges: $10^8$--$10^{10} L_\odot$, $10^{10}$--$10^{12} L_\odot$, and $10^{12}$--$10^{14} L_\odot$. The luminosity functions in \citet{Gruppioni:2013jna} are defined by fitting to modified Schecter functions, with parameters that are defined piecewise on $z$. These piecewise fits have breaks at the redshifts $z=0.5$ and $z=1.1$, so it is at these redshifts that we see peaks in observables like the SFRD. } \label{fig:lum_func} \end{figure} From the calibration factor and luminosity function, we can calculate the SFRD for a given galaxy morphology $g$ by integrating over the luminosity $L$: \begin{equation} R_{\rm SF,\,g} = \int \chi(L) L \frac{dN_g}{d\log L}d\log L\,. \label{eq:rsf} \end{equation} The total observed SFRD is then given by the sum over galaxy types $\sum_{g}{R_{\rm SF,\,g}}$, where $R_{\rm SF,\,g}$ is the SFRD contribution from galaxies of type g.\footnote{ For simplicity, for the rest of this paper we drop the subscript g notation. All observable quantities defined below implicitly sum over galaxy type.} In Fig.~\ref{fig:SFR}, we compare the SFRD calculated using the varying IMF and Salpeter-like IMF. We also plot existing estimates of the SFRD, with data drawn from \citet{2011A&A...528A..35M,2013A&A...553A.132M,Gruppioni:2013jna}. Note that we only show data that explicitly uses the same FIR range as we consider for our luminosity functions. In principle, there is a wealth of other data from different wavelengths to compare to (e.g. \citet{Fermi-LAT:2018lqt, Madau:2014bja, 2018MNRAS.475.2891D, 2006ApJ...651..142H, 2007MNRAS.379..985F}). We leave a more careful comparison to these data sets to future work. \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/R_SF.pdf} \caption{\textbf{Star formation rate density:} We compare the SFRD assuming a Salpeter-like IMF (green dashed curve) and a varying IMF (blue solid curve) to observational data as a function of redshift. The data were chosen to match with the FIR band we explore in this work. To limit clutter in the plot, we chose a representative subset from the catalogue of data~\citep{Madau:2014bja}. Features in the prediction curves at $z=0.5$, $z=1.1$ arise from non-smooth features in the luminosity functions we consider, and features at $z=1.0$, $z=1.2$, and $z=2.0$ arise from a non-smooth division of galaxies with an AGN into spiral and spheroidal sub-categories. While the observed data (red colored points) agrees quite well with the SFRD predicted from a Salpeter-like IMF, the data themselves are derived quantities which assume a Salpeter, Kroupa, or Chabrier IMF. For this reason, it is unsurprising that the observed data do not match the SFRD predicted using the varying IMF, particularly at high redshift. If a varying IMF is assumed when calculating the SFRD from observations, the results are expected to closely follow the predictions we make for a varying IMF. For illustration, we perform a preliminary reanalysis of the \citep{2013A&A...553A.132M} data using the luminosity functions described therein and the varying IMF we use in this work, depicted as blue points. This illustration is meant only to show proof of concept, and a more careful reanalysis should be performed, particularly in order to estimate uncertainties.} \label{fig:SFR} \end{figure} At low redshift ($z\lesssim0.15$), the SFRD calculated using a varying IMF is slightly lower than (within about 20\% of) the SFRD calculated using a Salpeter-like IMF and is consistent with observations. The primary reason for this behavior is that at low redshifts, the dominant contribution to the luminosity functions comes from spiral galaxies with intrinsically lower galactic luminosity, which favor an IMF power law of $\alpha\approx-2.35$. At higher redshifts, the luminosity is dominated by a smaller density of intrinsically more luminous starburst galaxies, which favor a shallower IMF. Accordingly, we see that at redshifts $z \gtrsim 2$, the SFRD calculated using a varying IMF is up to a factor of three lower than the SFRD calculated from a Salpeter IMF and the reported observational data. However, all of the data plotted in Fig.~\ref{fig:SFR}, which is illustrative of much of the data in the literature (e.g. \citet{Fermi-LAT:2018lqt, Madau:2014bja, 2018MNRAS.475.2891D, 2006ApJ...651..142H, 2007MNRAS.379..985F}), assume an IMF with Salpeter-like behavior at high stellar mass. In particular, in each of the three observed data sets shown here, the SFRD was calculated while assuming either a Chabrier IMF, a Kroupa IMF, or a pure Salpeter IMF. It is unsurprising then that the data so closely matches the Salpeter-like IMF, while disagreeing with results obtained using any other IMF. We therefore expect that reanalyzing the SFR observations with a varying IMF would result in an SFRD that is lower than the existing data and that matches our predictions. We leave this analysis to future work. Since the effect of a varying IMF is signficant, we also note that direct observations of the SFR at high redshifts would provide a useful probe of the IMF variability as a function of galaxy type. \subsection{Extragalactic Background Light} In addition to measuring the SFRD directly, we can also look at the extragalactic background light (EBL) to potentially probe the IMF. The EBL is the integrated light from all sources in a particular direction. In particular, it includes light from all galaxies, even those too faint to resolve, and therefore provides an accurate measure of the luminosity function. In fact, the total EBL can be calculated as \begin{equation} L_{\rm EBL,total} = \int L\frac{d n_g}{d L} dL = \int \frac{d n_g}{d\log L} dL\,. \end{equation} That is, the total EBL is simply an integral of the luminosity function over galaxy luminosities. Starting from the luminosity functions then, we can calculate the total EBL without introducing a dependence on the IMF, and so it is impossible to probe the IMF from the total EBL. However, while the total EBL may be independent of IMF, the IMF affects the distribution of stellar masses. Because stars of different masses have different temperatures, and therefore different spectra, it is possible that the EBL spectrum may provide a way to probe the IMF. With this in mind, we followed the procedure outlined in \citet{Razzaque2009} to calculate an estimate of the EBL flux in the wavelength range 0.1 to 100 $\mathrm{\mu m}$. Specifically, we calculate the spectrum of a star of given mass $M$ with the corresponding effective temperature $T(M)$ as a blackbody spectrum $I_{\nu, BB}(T(M))$. We additionally denote the number of stars of a given mass inside of a galaxy as $\mathcal{N}(M,L)$. This number therefore intrinsically depends on the IMF. The EBL at a given frequency can then be calculated as \begin{equation} I_{{\rm EBL}, \nu} =\int \int I_{\nu,BB}(T(M)) \mathcal{N}(M,L) dM \frac{d N}{d\log L} dL\,. \end{equation} Although this technique can give an estimate of the EBL emitted from galaxies, it does not take into account dust, and because of this offers only limited insight into the observed EBL. Absorption of starlight by dust causes the short-wavelength end of the spectrum to be reduced, while re-emission by that dust causes the long-wavelength end to be increased. While this generic picture is true in all dust models, exactly how dust affects the shape of the spectrum depends heavily on the dust model. We leave careful accounting of these dust effects to future work. Instead, we can look at the narrow range of frequencies where the effects from both dust absorption and emission on the EBL are minimized. In particular, we consider the range approximately $4-7 \,\mu$m~\citep{1989ApJ...345..245C, Kennedy_2013}. As can be seen in Fig.~\ref{fig:ebl}, in this wavelength range, the EBL predicted from both a Salpeter-like and varying IMF are quite similar, with the varying IMF prediction being very slightly bluer than the Salpeter-like prediction, and both visually fit existing data equally well. \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/EBL-2.pdf} \caption{\textbf{Extragalactic Background Light Spectrum:} Estimates of the EBL spectra assuming a varying IMF (blue solid curve), and a universal Salpeter-like IMF (green dashed curve). These are compared to data from \citet{BW2015}, showing the best fit values of the EBL calculated from various observed measurements of upper and lower bounds on the EBL spectrum. The estimates we show do not include processing from dust, so we generally expect the estimates to overpredict the intensity at short wavelengths, but begin to match at longer wavelengths. At the longest wavelengths, radiation from dust, rather than from stellar sources, will dominate the observed spectrum and our estimates will underpredict the data. This behavior is seen in our predictions which, in the wavelength range $3-7 \,\mu$m which is least affected by dust, agrees quite well with data, regardless of IMF considered.} \label{fig:ebl} \end{figure} \subsection{Core-Collapse Supernova Rate} \label{sec:CCSNe} Along with the SFRD and EBL, we can look at the rate at which stars collapse into supernovae as a way to constrain the IMF. Stars which begin their life with a mass between 8 and approximately 125~${\rm M}_\odot$ are expected to end their life as a core-collapse supernova (CCSN)~\citep{Heger:2002by}. Standard CCSNe occur when their iron or oxygen-neon-magnesium core, produced through nuclear fusion, exceeds the Chandresekhar mass limit and rapidly collapses~\citep{2017RSPTA.37560271C, Janka:2017vcp, Burrows:2020qrp}. This facilitates electron capture on nuclei and free protons in the center of the collapsing core, which makes matter more neutron rich and produces a copious number of electron neutrinos~\citep{Bethe:1979zd, Fuller:1981mu}. Once the density reaches the nuclear saturation density (approximately $2.6 \times 10^{14}~\mathrm{g}~\mathrm{cm}^{-3}$~\citep{Bethe:1979zd}) the strong nuclear force stops the collapse of the inner core~\citep{1979NuPhA.324..487B, 2017RSPTA.37560271C, Bethe:1979zd, BranchWheeler}. The sudden halt causes the core to bounce and launches a shock wave, which carries stellar material away from the core. The shock stalls after losing energy through the dissociation of heavy nuclei but can be re-energized by neutrinos, which revive the shock leading to a successful explosion. This is the so-called neutrino-driven delayed explosion mechanism~\citep{1966ApJ...143..626C, 1985ApJ...295...14B}. Eventually, the electromagnetic radiation emitted by the material ejected in a successful explosion is observed as a supernova. Depending on the chemical makeup of the ejected material, CCSNe are classified as Type Ib, Ic, or II supernovae~\citep{Turatto2003, Smith:2014txa}. The supernova can leave behind either a neutron star or black hole depending on how much energy is imparted to the shock wave by neutrinos, compared to the gravitational binding energy of the outer layers of the star. Because some of these types of supernovae will be more detectable than others and any stars that collapse directly to a black hole do not produce a supernova, the fraction of core collapses that can be observed through electromagnetic signatures will depend on the fate of the collapsing massive star, and that in turn may depend on the IMF. As with the SFR, we will again focus on the core-collapse supernova rate density (CCSNRD), which allows us to focus on only the redshift dependence. On timescales that are long compared to the lifetime of a star massive enough to undergo core collapse ($\lesssim 10$~Myr), we can assume that when one star goes supernova another star of equal mass is formed. As a result, we can calculate the CCSNRD directly from the SFRD of stars with mass greater than approximately $8\,{\rm M}_\odot$. In particular, \begin{equation} R_{{\rm CCSN}}(z) = \int \chi(L) L \frac{dN}{d\log L} \frac{\int_{8 \mathrm{{\rm M}_\odot}}^{M_{\mathrm{max}}} \xi(M) dM}{\int_{M_{\mathrm{min}}}^{M_{\mathrm{max}}} M\xi(M) dM} d\log L. \label{eqn:RCC} \end{equation} Here, $M_{\mathrm{min}}$ and $M_{\mathrm{max}}$ refer to the minimum and maximum masses stars can take in the IMF we consider. In all of our calculations we use $M_\mathrm{min} = 0.1\,{{\rm M}_\odot}$ and $M_\mathrm{max} = 125\,{{\rm M}_\odot}$, respectively the approximate lowest mass at which stars can fuse hydrogen and a somewhat arbitrary high mass cutoff that does not significantly affect our results. The factor of $M$ in the denominator is necessary because SFRs measure the total mass of stars that form, whereas the core-collapse rate measures the number of supernova events. \begin{figure*} \centering \includegraphics[width=0.49\linewidth]{plots/R_cc_total.pdf} \includegraphics[width=0.49\linewidth]{plots/R_cc_split.pdf} \caption{\textbf{Core collapse supernova rate density:} \textit{(Left Panel)} Comparison of the predictions of the rate density of core-collapse supernovae assuming either a Salpeter-like IMF (green dashed curve) or a varying IMF (blue solid curve) with observational data as a function of redshift. See Fig.~\ref{fig:SFR} for discussion of features at $z=0.5$, $z=1.0$, $z=1.1$, $z=1.2$, and $z=2.0$. \textit{(Right Panel)} Rate of supernovae in each of the galaxy morphologies we consider. Here, blue corresponds to spiral galaxies, while green corresponds to spheroidal starburst galaxies. Again, dashed lines correspond to Salpeter-like IMFs, while solid lines correspond to the varying IMF.} \label{fig:RCC} \end{figure*} In Fig.~\ref{fig:RCC}, we compare the CCSNRD we predict from a varying IMF to that predicted from a Salpeter-like IMF and to observed CCSNRD data from \citet{Petrushevska:2016kie,Strolger:2015kra,Dahlen2012,Mattila2012}. As in the case of SFRs, at low redshift, all three CCSNRD are consistent. At high redshift, the CCSNRD predicted using the varying IMF is slightly lower than that predicted using the Salpeter-like IMF, but the discrepancy between the CCSNRD is significantly smaller than the related difference between SFRs. This improved agreement is to be expected because the SFR's dependence on the IMF partially cancels against the explicit IMF dependence in Eq.~\eqref{eqn:RCC}, as discussed in \citet{Madau:2014bja}. Ultimately, the existing CCSNe data appears to agree with either IMF model equally well. However, as new observatories including, the James Webb Space Telescope~\citep{2019ApJ...874..158R}, the Vera Rubin Observatory (through the LSST survey)~\citep{2019ApJ...873..111I}, Euclid~\citep{laureijs2011euclid}, and the Nancy Grace Roman Telescope~\citep{koekemoer2019ultra} begin to take data, estimates of the high redshift CCSNRD will become more precise, potentially favoring one model over the other. Likewise, gravitational wave detectors may offer another avenue to probe the supernova rate, and consequently the SFR, by measuring the binary black hole merger rate~\citep{Vitale2019}. We find that the two IMF models produce an $\mathcal{O}(2)$ difference in the total CCSN rate at redshifts greater than approximately 1.5. Therefore, at least a 100\% determination of the SN rate for $z>1.5$ will be required to distinguish these two scenarios. Based on projections of the rates of supernovae expected to be observed by the Roman Telescope~\citep{https://doi.org/10.48550/arxiv.2111.03081}, it is not unreasonable to expect observational uncertainties at that level. Furthermore, a greater difference in the predicted supernova rates under our two models may appear if changing the IMF changes the fraction of stars that collapse into black holes versus those that collapse to neutron stars. All else held equal, a shallower IMF would increase the fraction of stars that evolve to black holes and decrease the fraction that evolve to neutron stars, relative to a steeper IMF. As shown in Fig.~\ref{fig:bhfrac}, this is precisely the situation we expect from the varying versus Salpeter-like IMFs. As a result, we can expect that a varying IMF would lead to fewer obervable CCSNe than a Salpeter-like IMF, particularly at high redshifts, all other factors held equal. \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/BHfrac.pdf} \caption{\textbf{Fraction of black hole forming collapses:} The fraction of supernovae that result in black holes, rather than neutron stars. For the Salpeter-like IMF, approximately $21\%$ of stellar collapses lead to black hole formation (this fraction is assumed to be constant as a function of the redshift for simplicity), while for the varying IMF, this fraction depends on redshift, reaching approximately 35\% at $z=3$.} \label{fig:bhfrac} \end{figure} \subsection{Type Ia Supernova Rate} As with CCSNe, we can hope to probe properties of the IMF by looking at Type Ia supernovae (SNeIa). Type Ia supernovae occur when mass accretes onto white dwarfs from a giant star, typically when the two form a binary~\citep{Mazzali2007}. As the mass of the white dwarf approaches the Chandrasekhar mass~\citep{Chandrasekhar:1931ih}, temperatures and densities within the core of the star become high enough to initiate nuclear reactions from the abundant carbon and oxygen. These nuclear reactions produce so much energy that the entire star becomes unbound. Nuclear decays within the ejected material can then be observed as a SNeIa. For our purposes, SNeIa can be seen as a tracer of SFR like the CCSN rate. In addition, measurements of the SNIa rate do not require one to use a calibration factor and are therefore relatively independent of the IMF. However, since SNeIa are sourced by white dwarfs, which form from stars whose lifetimes are on the order of 1-10 Gyr, they can only occur after enough time has passed for the white dwarf to accrete sufficient mass. Both the lifetime of the progenitor star and the period between the formation of a white dwarf and the occurrence of a SNIa must be accounted for when calculating the SNIa rate. This accounting is done through a delay-time distribution (DTD) $F(\tau)$, which measures the probability that a star formed at some time $t-\tau$ will undergo a supernova at time $t$. In our calculations, we use the simple approximation that $F(\tau) \propto \tau^{-1}$, justified in \citet{Maoz2014}. The SNIa rate density can therefore be calculated from the convolution \begin{equation} R_{\rm SNIa} = \int_0^t R_{\rm SF}(t-\tau) F(\tau) d\tau\,. \label{eqn:RSN1a} \end{equation} Here, we convert between redshift and time assuming a flat $\Lambda$CDM Universe that is dominated by $\Lambda$ and matter, and where $\Omega_{m,0} = 0.308$~\citep{Planck2016}. In Fig.~\ref{fig:SN1a} we compare observed SNIa rates, using data from \citet{Strolger2020, Perrett2012, Cappellaro2015}, with predictions of the supernova rate assuming a Salpeter-like IMF and a varying IMF. To make this comparison, we fixed the normalization of the DTD to $10^{-3} \, {\rm M}_\odot^{-1}$ in order to match the DTD presented in \citet{Maoz2014}.\footnote{However, as noted in \citet{Maoz2014}, measurements of the DTD in different environments (e.g. dwarf galaxies, galaxies, and galaxy clusters) can vary by an order of magnitude.} Using this normalization, the Salpeter-like IMF is largely consistent with the data, while the varying IMF leads to a SNIa rate that is consistently smaller than the observed SNIa rate. However, if we allow the normalization of the DTD to vary, then increasing it by a factor of 2 produces much closer agreement between the varying IMF and observed SNIa rates. This change to the normalization is still within the $1\sigma$ confidence range for the DTD. In other words, based on current observations and their uncertainties, the varying IMF cannot be ruled out, and more precise measurements of the DTD would be necessary to place meaningful constraints on either IMF model. \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/SN1a.pdf} \caption{\textbf{Type Ia supernova rate density:} We compare the rate density of type Ia supernovae, assuming either a Salpeter-like IMF (green dashed) or varying IMF as described in the text (blue), to a selection of observed data. See Fig.~\ref{fig:SFR} for discussion of features at $z=0.5$, $z=1.0$, $z=1.1$, $z=1.2$, and $z=2.0$. Predictions of the supernova rate depend on a poorly constrained delay time distribution, and by increasing the overall normalization of this DTD by a factor of 2 (still within $1\sigma$ uncertainties), we can increase the varying IMF result from the blue solid curve to the blue dot-dashed curve.} \label{fig:SN1a} \end{figure} \subsection{Diffuse Supernova Neutrino Background} \label{sec:DSNB} Finally, in addition to directly observing of supernova rates, we can look to the neutrinos supernovae produce in order to estimate their rate, and therefore potentially probe the IMF. Despite being relatively rare in any individual galaxy, supernovae are quite common throughout the Universe. Combining this with the fact that a single CCSN produces an immense number of neutrinos (approximately $10^{58}$~\citep{Burrows:2020qrp, Mirizzi:2015eza}) leads to the emergence of a background of neutrinos that is isotropic and nearly constant in time. This neutrino flux is commonly named the diffuse supernova neutrino background (DSNB)~\citep{1984NYASA.422..319B, Krauss:1983zn, Wilson:1986ha, Beacom2010, Lunardini:2010ab, Mirizzi:2015eza}. Only in recent years have experiments begun to approach the sensitivity necessary to directly observe the DSNB~\citep{SuperKamiokande2003, Bays:2011si, Zhang:2013tua, KamLAND:2021gvi, Super-Kamiokande:2021jaq,Li:2022myd}. While no signal has yet been detected, the enrichment of Super-Kamiokande (SK) with gadolinium~\citep{Beacom:2003nk, Horiuchi:2008jz} and the future proposed and planned experiments such as Hyper-Kamiokande (HK), JUNO, Jinping, and THEIA~\citep{JUNO:2015zny, Jinping:2016iiq, Hyper-Kamiokande:2018ofw, Sawatzki:2020mpb, Li:2022myd} are expected to have enough sensitivity to make a first detection in the coming years. Once observed, the DSNB will provide a test of astrophysical observables~\citep{Lunardini:2009ya, Keehn:2010pn, Nakazato:2013maa, Nakazato:2015rya, Priya:2017bmm, Moller:2018kpn, Kresse:2020nto, Singh:2020tmt, Horiuchi:2020jnc, Libanov:2022yta}, neutrino flavor physics~\citep{Lunardini:2012ne, Tabrizi:2020vmo, Suliga:2021hek}, and physics beyond the Standard Model~\citep{Ando:2003ie, Fogli:2004gy, Goldberg:2005yw, Baker:2006gm, Farzan:2014gza, Jeong:2018yts, Creque-Sarbinowski:2020qhz, DeGouvea2020, Das2021, Suliga:2021hek, deGouvea:2022dtw}. \subsubsection{Theoretical Models} \label{sec:Neutrino Spectra} The calculation of the DSNB flux requires two components: the rate of supernovae as a function of their progenitor masses and the time-integrated neutrino energy spectra associated with each supernova. The former can be calculated as described in Section~\ref{sec:CCSNe}, while a calculation of the latter is sketched here. Following \citet{Moller:2018kpn,Ashida:2022nnv}, we consider three possible outcomes of supernovae, depending on the mass of their stellar progenitor. Stars can either evolve into black holes or low/high mass neutron stars. A characteristic neutrino spectrum is then associated with each type of explosion. More details on these spectra can be found in Appendix~\ref{app:neutrino}. As discussed in Appendix~\ref{app:neutrino}, the characteristic neutrino spectra associated with the different supernovae outcomes can be significantly different. The DSNB signal is therefore also affected by the fraction of black hole forming collapses~\citep{Lunardini:2009ya}. Unfortunately, the fraction of stellar collapses leading to black hole formation is unknown. Recent theoretical work and observational surveys indicate that this fraction could be approximately $10\,$--$\,40\%$ of all CCSNe~\citep{Byrne:2022oik,Neustadt:2021jjt,Kochanek:2008mp, Lien:2010yb, Gerke:2014ooa,Horiuchi:2014ska, Sukhbold:2015wba, Ertl:2015rga, Adams:2016ffj, Adams:2016hit, Davies:2020iom}. For the Salpeter-like IMF, our DSNB modeling follows one of the scenarios considered in \citet{Moller:2018kpn} where the fraction of progenitors evolving into black holes is set to $21 \%$ and for simplicity it is assumed to be constant as a function of redshift out to at least $z=5$. To make this assumption, we implicitly assume that both the stellar masses that evolve to black holes and the IMF do not change over cosmological history. However, when we consider the varying IMF, we cannot assume that the IMF is constant as a function of redshift; in fact, because it depends explicitly on the star formation rate, which evolves over cosmic history, the varying IMF cannot remain constant. As a result, we expect to see a substantially larger fraction of stars evolve to black holes at high redshifts in the non-universal case than in the Salpeter-like case, as seen in Fig.~\ref{fig:bhfrac}.\footnote{ It should be noted that this fraction is calculated assuming that the stellar mass is the only factor which controls whether a supernova leads to a black hole formation or not (see Appendix~\ref{app:neutrino}.). It is therefore constant for the universal Salpeter-like IMF. Other stellar properties, such as metallicity, may lead to changes in the fraction of supernovae that lead to black hole formation.} In addition, because our main goal is to investigate the impact of the variable IMF on the DSNB, we do not include neutrino oscillations in our modeling, as they would change the DSNB in the same way in both cases, i.e., Salpeter-like and variable IMF. Making use of the supernova rate and the neutrino spectrum, we can calculate the DSNB flux $\Phi$ as a function of neutrino energy $E$. Specifically, \begin{equation} \label{eqn:DSNBsimple} \begin{split} \Phi(E) = c &\int_{0}^{z_{\max}} \frac{\mathrm{d} z}{H(z)} \\ &\times\int \chi(L) L \frac{dN}{d\log L} \left[\int_{8M_{\odot}}^{M_{\max}}\frac{\mathrm{d}n}{\mathrm{d}E^\prime} \frac{\xi(M) dM}{\overline{M}}\right] d\log L \,, \end{split} \end{equation} where $\frac{dn}{dE}$\footnote{ Note that although Eq.~\eqref{eqn:DSNBsimple} is true for all flavors, as mentioned in Appendix~\ref{app:neutrino} we will focus solely on electron-antineutrinos since they have the best detection prospects. } is the neutrino spectrum, $E^\prime = E(1+z)$ is the source energy necessary at a redshift of $z$ to be observed with energy $E$, and $\overline{M} = \int_{M_{\min}}^{M_{\max}} M\xi(M)dM$ is the average mass of newly formed stars. The integral $\int \chi(L) L \frac{dN}{d\log L} d \log L$ is equivalent to $R_{\rm SF}$ if the term in brackets does not depend on luminosity. While this condition is met for the Salpeter-like IMF, when we consider a varying IMF, the IMF depends on luminosity, so the factor in brackets picks up a dependence on luminosity. In addition, $H(z) = H_0(\Omega_{m,0}(1+z)^3 + (1-\Omega_{m,0}))^{1/2}$ is the Hubble expansion parameter at $z$, where we assume a flat $\Lambda$CDM universe dominated by matter and $\Lambda$, with $\Omega_{m,0} = 0.308$ and $H_0= 67.8 \, \mathrm{km\, s^{-1}\, Mpc^{-1}}$~\citep{Planck2016}. Using the CCSNRD calculated from both a Salpeter-like and varying IMF we find the DSNB fluxes shown in Fig.~\ref{fig:DSNB}. We emphasize here that we have only considered a single benchmark for each IMF model, but in reality there are a number of other uncertainties which would create a band of possible DSNB realizations. We do not directly consider these uncertainties in the modeling of the DSNB (i.e., in Fig.~\ref{fig:Rate}), although below we account for a systematic uncertainty when evaluating the discriminability of the two IMF models. For reference, we also show a hatched region which shows the approximate parameter space currently ruled out by SK observations, as well as the primary signal region for SK and future detectors~\citep{elhedri:hal-03373391}. Perhaps the most notable result is the similarity between the predictions from using the Salpeter-like and varying IMFs, especially at energies greater than approximately 20\,MeV. While this will likely make it difficult to distinguish between the two scenarios once the DSNB is detected, it clearly demonstrates that the DSNB is robust to significant changes to the IMF. \begin{figure*} \centering \includegraphics[width=0.49\linewidth]{plots/DSNB.pdf} \includegraphics[width=0.49\linewidth]{plots/DSNB_z.pdf} \caption{\textbf{Diffuse supernova neutrino background flux:} \textit{(Left Panel)} We compare the predicted DSNB $\bar\nu_e$ flux, assuming either a Salpeter-like (green dashed) or varying IMF (blue solid) with the region probed by SK (hatched) \citep{Super-Kamiokande:2021jaq}. The red shaded region indicates the range of energies that could be observable by SK with the addition of gadolinium. The different IMFs might have an impact on the observed DSNB flux only at low energies, and it would be difficult to distinguish this difference against background neutrino sources. \textit{(Right Panel)} We show the DSNB broken down into contributions from different redshift bins for the varying IMF. Because the emitted neutrinos are redshifted, distant supernovae only contribute significantly at low energies.} \label{fig:DSNB} \end{figure*} At lower energies (below approximately $20$ MeV), we predict the DSNB flux to be slightly lower when assuming a varying IMF than when assuming a Salpeter-like IMF. While the IMFs we consider give similar predictions for the CCSNRD at low redshift, they begin to disagree at higher redshifts. The difference in the DSNB flux that we see here ultimately arises from this difference in supernova rates. This is only noticeable at low neutrino energies because distant supernovae only contribute significantly to the low energy spectrum. At higher energies, because of the redshifting of the neutrinos as they propagate, the source energy $E^\prime = E(1+z)$ can be significantly higher for distant supernovae than for nearby ones. As a result, the contribution to the DSNB flux from distant supernovae comes from a higher energy portion of the spectrum, which is exponentially suppressed. This effect is illustrated in the right panel of Fig.~\ref{fig:DSNB} where we show the contribution to the DSNB in different redshift bins. Therefore, while a varying IMF is likely indistinguishable from a Salpeter-like IMF at high energies, sufficiently precise measurements of lower energy neutrinos may allow some degree of distinction between the two models. Varying the IMF is not the only source of uncertainty expected to appear in the low-energy DSNB region (around $20$~MeV). Variations to the star formation histories, for example, could yield comparable differences between DSNB predictions~\citep{Singh:2020tmt, Kresse:2020nto}, which will be degenerate with differences due to variations of the IMF. Furthermore, additional uncertainties in the DSNB flux which may appear, independent of the choice of IMF, include the unknown fraction of high-mass stars that evolve to black holes and the neutrino spectra emitted during this evolution~\citep{Lunardini:2009ya,Horiuchi:2017qja, Kresse:2020nto}, the precise normalization of the CCSN rate~\citep{Horiuchi:2011zz,Mathews:2014qba}, the evolution of neutrino flavors in the dense medium encountered during supernovae~\citep{Duan:2010bg, Chakraborty:2016yeg, Tamborra:2020cul}, and any possible stellar binary interactions~\citep{Horiuchi:2020jnc}. To partially account for these uncertainties in the following subsection~\ref{Sec:DSNB_IN_DET}, we include a systematic uncertainty of $50\%$ in our calculations of the discriminating power of the detectors to the Varying IMF. \subsubsection{Expected Sensitivities of Super-Kamiokande and Hyper-Kamiokande} \label{Sec:DSNB_IN_DET} \begin{figure} \centering \includegraphics[width=\columnwidth]{plots/HK_10.pdf} \caption{ \textbf{Diffuse supernova neutrino background rate:} $\bar\nu_e$ DSNB event rates in HK enriched with gadolinium detectors for 10 yrs of data taking. The sum of the $\bar\nu_e$ DSNB event rate plus background rate for the Varying IMF (Salpeter-like) is plotted with solid blue (dashed green) line. The backgrounds rates are depicted as grey regions, and the error bars reflect the $\pm 1 \sigma$ statistic uncertainties. As discussed in the main text, while SK cannot distinguish the two investigated IMF scenarios, HK might present a low significance hint towards a particular scenario. Note that we do not show other astrophysical uncertainties (e.g., errors on the SFR and uncertainty in the neutrino flux modeling), but partially account for this with a systematic uncertainty (see main text for details).} \label{fig:Rate} \end{figure} Although no detection of the DSNB has yet been made, the strongest constraints come from the SK experiment~\citep{Bays:2011si, Super-Kamiokande:2021jaq}. In 2019, upgrades to SK began which allowed for the introduction of gadolinium into the SK tank by 2021. The gadolinium doping will make the detection of electron antineutrinos significantly easier, which will subsequently improve our ability to detect neutrinos from the DSNB~\citep{Beacom:2003nk}. As a result, it is expected that a positive measurement of the DSNB will be observed in the near future~\citep{Li:2022myd}. Figure~\ref{fig:Rate} shows the predicted accumulated DSNB flux after 10 years of operation of HK (3740 kton~yr exposure) compared to its respective neutrino backgrounds, where we assume a concentration of 0.1\% GdCl${}_3$ in water. The blue solid (green dashed) line depicts the combined neutrino flux from both the DSNB and background sources, where we calculate the DSNB flux using a varying IMF (Salpeter-like IMF). Sources of background neutrinos that we consider include atmospheric charged-current events, invisible muons, $^9$Li spallation, and reactor antineutrinos~\citep{Hyper-Kamiokande:2018ofw,Super-Kamiokande:2021jaq}. We can use a simple $\Delta \chi^2$ Pearson test to estimate the detection prospects of distinguishing between the varying IMF and Salpeter-like IMF. In both SK (225 kton yr exposure with 0.1\% GdCl${}_3$) and HK, the two IMFs are not distinguishable at the $3\sigma$ level, even after 10 years of data collection. Furthermore, in SK, the two models remain indistinguishable at the $1\sigma$ level. However, in HK, the varying and Salpeter-like IMFs are distinguishable at the $1.3\sigma$ level. This marks an upper bound to the distinguishability, as we have not introduced other sources of uncertainty. Including a systematic uncertainty for the background of 20\% and for the DSNB models of 50\% reduces the difference between the two models to $1.1\sigma$ (note that these additional systematics are not shown in Fig.~\ref{fig:Rate}). Once SK or HK detects the DSNB, it may be possible to generate an improved statistic, using an unbinned maximum likelihood ratio test with a parameterized family of models that include the Salpeter-like and varying IMFs, which could allow for a better ability to distinguish between these two models, assuming all other uncertainties become negligible in comparison. \section{Conclusion and Outlook} \label{sec:conclusion} In this paper, we explored whether one can find evidence for a non-universal IMF in five astrophysical observables that arise from integrating over cosmological scales. Throughout, we have seen that these observables show small but non-zero differences when assuming the non-universal IMF (described in Sec.~\ref{sec:varIMF}) versus a universal Salpeter-like IMF. The differences are typically too small to distinguish in currently existing data, but as detectors improve, there are a variety of signals which may offer practical ways to study the IMF. In particular, we find that studying the star formation rate (SFR) and the core-collapse rate at high redshifts ($z\gtrsim0.5$) may offer the greatest distinguishability between the different IMF models. At redshifts greater than approximately 0.5, the SFR predicted assuming a varying IMF is lower than the corresponding prediction from a Salpeter-like IMF by up to a factor of $\sim3$ (see Fig.~\ref{fig:SFR}). Because observing the SFR requires a calculation that depends strongly on the assumed IMF, the predictions, though significantly different, can both still be consistent with current observations. However, due to the SFR's prominent role in, for example, modeling star formation histories and cosmological simulations, it would be interesting to see whether an indirect test of the SFR could favor one IMF model over the other. For example, the binary black hole (BBH) merger rate~\citep{Fishbach:2018edt,vanSon:2021zpk} acts as an independent probe of the SFR. LIGO and Virgo, at design sensitivity, are expected to observe BBH mergers up to redshifts of around one. On the other hand, 3rd generation telescopes may reach $z\sim15$ and thus independently measure the star formation rate density (SFRD) to a few percent according to \citet{Vitale2019}. We leave a more careful examination of this method to future work. Similarly to the SFR, above $z\gtrsim 0.5$ the core-collapse rate can differ by a factor of $\sim2$ between the two IMF models (see Fig.~\ref{fig:RCC}). Current observations of core-collapse rates are still too poor at high redshifts to distinguish between these models. However, next-generation telescopes such as James Webb Space Telescope~\citep{2019ApJ...874..158R}, Roman Space Telescope~\citep{koekemoer2019ultra}, Vera Rubin Telescope (through the LSST)~\citep{2019ApJ...873..111I}, and EUCLID~\citep{laureijs2011euclid}, may provide significantly better rate estimates at these high redshifts. An additional subtlety here is that a varying IMF will produce a larger fraction of black hole collapses (see Fig.~\ref{fig:bhfrac}) which may be less luminous. A careful treatment of the observational efficiency of any core-collapse rate measurement is therefore required to distinguish the two IMF models. The stellar IMF plays a fundamental role throughout astrophysics and many unsolved questions require an accurate model of the IMF to address. It is therefore vital that new methods are developed to decipher its dependence on the local environment. Here we have examined a few indirect methods. Future work should more carefully examine the most promising of these scenarios with a meticulous treatment of their associated uncertainties, including studying whether the impact of different IMFs can be distinguished from potentially degenerate or partially degenerate sources of uncertainty. Moreover, combining the different probes presented here may lead to significantly tighter constraints on possible IMF variations. Through this, we hope that indirect probes may provide additional evidence towards distinguishing a varying IMF. \section*{Acknowledgments} We thank Andrew Hopkins for a careful reading of the manuscript and helpful discussions. T.E. and K.F. acknowledge support by the Vetenskapsr{\aa}det (Swedish Research Council) through contract No. 638-2013-8993 and the Oskar Klein Centre for Cosmoparticle Physics at Stockholm University. T.E. was supported by the NWO through the VIDI research program ``Probing the Genesis of Dark Matter'' (680-47-5). J.Z. and K.F. are grateful for support from the Jeff \& Gail Kodosky Endowed Chair held by K. F. at the University of Texas. J.Z. and K.F. acknowledge funding from the U.S. Department of Energy, Office of Science, Office of High Energy Physics program under Award Number DE-SC0022021. A.M.S. acknowledges the support form the US National Science Foundation (Grant No. PHY-2020275). In Copenhagen, this work was supported by the Villum Foundation (Projects Nos. 13164 and 37358), the Danmarks Frie Forskningsfonds (Project No. 8049-00038B), the Deutsche Forschungsgemeinschaft through Sonder- forschungbereich SFB 1258 “Neutrinos and Dark Matter in Astro- and Particle Physics” (NDM). The work of SH is supported by the US Department of Energy under the award number DE-SC0020262, NSF Grant numbers AST-1908960 and PHY-1914409, and JSPS KAKENHI Grant Number JP22K03630. SA was supported by MEXT KAKENHI Grant Numbers, JP20H05850 and JP20H05861. This work was supported by World Premier International Research Center Initiative (WPI Initiative), MEXT, Japan. A.M.S. and S.H. would like to thank Kavli Institute for Theoretical Physics for the hospitality during this work. This research was supported in part by the National Science Foundation under Grant No. NSF PHY-1748958. \bibliographystyle{mnras}
\section{Conclusion} We adapted \mondrianforests to support data streams and we proposed five out-of-memory strategies to deploy them under memory constraints. Results show that the Extend Node method has the best improvement on average. With a carefully tuned number of trees, the Extend Node also has the highest F1 score gain compared to the Stopped strategy. Thus, we recommend using Extend Node as the default strategy. We also compared node trimming methods for the \mondriantrees and there are two viable methods depending on the situation. Not trimming is the best option in most case of stable dataset. However, when expecting a concept drift, the trim Random with splits is preferable. The drawback with the Trim Random method is that it deteriorates the F1 score on stable streams. Overall, this paper showed that using our out-of-memory strategies is critical in order to make the \mondrianforest work in a memory-constrained environment. In particular, existing \mondrianforest implementations~\cite{mondrian_implementation_1, mondrian_implementation_2} do not have any out-of-memory strategy and will fail if they cannot allocate any more nodes. Using the Extend Node strategy allows an average F1 score gain of 0.28 accross all datasets compared to not doing anything. Similarly, using Trim Random offers an average F1 score gain of 0.3. Our results show no significant difference between the two types of node splitting strategy. By default, we would recommend using Split AVG because it is less compute-intensive. We observe that with a carefully picked number of trees, using trimming can lead to improvement with RandomRBF stable. This statement needs more investigation to understand why it happened on one dataset and if similar behavior can be obtained with the other datasets. Future work should focus on the tree count adjustment as our results have shown its critical impact on the performances. Finally, we suggest exploring the use of drift detectors such as ADWIN~\cite{adwin} to switch between No Trim and Trim Random. \section*{Acknowledgement} This work was funded by a Strategic Project Grant of the Natural Sciences and Engineering Research Council of Canada. The computing platform was obtained with funding from the Canada Foundation for Innovation. \section{Discussion} \section{Introduction} \label{sec:introduction} Supervised classification algorithms mostly assume the availability of abundant memory to store data and models. This is an issue when processing data streams --- which are infinite sequences by definition --- or when using memory-limited devices as is commonly the case in the Internet of Things. This paper studies how the \mondrianforest, a popular online classification method, can be adapted to work with data streams and memory constraints. Although online and data stream classification methods both assume that the dataset is available as a sequence of elements, data stream methods assume that the dataset is infinite whereas online methods consider that it is large but still bounded in size. Consequently, online methods usually store the processed elements for future access whereas data stream methods do not. Under memory constraints, a data stream classification model that has reached its memory limit faces two issues: (1) how to update the model when new data points become available, which we denote as the \emph{out-of-memory} strategy, and (2) how to adapt to concept drifts. The mechanisms described in this paper address these two issues in the \mondrianforest. The \mondrianforest is an ensemble tree-based online learning method with comparable performance to offline Random Forest~\cite{mondrian2014}. Previous experiments highlighted the \mondrianforest sensitivity to the amount of available memory~\cite{khannouz2020}, which motivates their extension to memory-constrained environments. In practice, existing implementations~\cite{mondrian_implementation_1, mondrian_implementation_2} of the \mondrianforest all assume enough memory and crash when memory is not available. The concept drift is a common problem in data streams that occurs when the distribution of features changes throughout the stream. By design, the \mondrianforest is not equipped to adapt to concept drifts as its trees cannot be prunned, trimmed, or modified. This is not an issue in online classification or when enough memory is available since the trees can grow new branches to accommodate changes in feature distributions. However, in a memory-constrained environment, the memory limit prevents the growth of new branches. Therefore, the \mondrianforest needs a mechanism to free memory to accomodate the growth of new tree nodes. Such a mechanism might also be useful for stable data streams as it would replace less accurate nodes with better performing ones. This paper makes the following contributions: \begin{enumerate} \item We adapt the \mondrianforest for data streams; \item We present five out-of-memory strategies for the \mondrianforest under memory constraints; \item We present three node trimming mechanisms to make \mondrianforest adaptive to concept drits; \item We evaluate our strategies on six simulated and real datasets. \end{enumerate} \section{Materials and Methods} All the methods presented in this section are implemented in the OrpailleCC framework~\cite{OrpailleCC}. The scripts to reproduce our experiments are available on GitHub at \url{https://github.com/big-data-lab-team/benchmark-har-data-stream}. \subsection{Mondrian Forest} The \mondrianforest~\cite{mondrian2014} is an ensemble method that combines Mondrian trees. Each tree in the forest recursively splits the feature space, similar to a regular decision tree. However, the feature used in the split and the value of the split are picked randomly. The probability to select a feature is proportional to its range, and the value for the split is uniformly selected in the range of the feature. In contrast with other decision trees, the Mondrian tree does not split leaves to introduce new nodes. Instead, it introduces a new parent and a sibling to the node where the split occurs. The original node and its descendant are not modified and no data point is moved to that new sibling beside the data point that initialized the split. This approach allows the Mondrian tree to introduce new branches to internal nodes. This training algorithm does not rely on labels to build the tree, however, each node maintains counters for each label seen. Therefore, labels can be delayed, but are needed before the prediction. In addition to the counters, each node keeps track of the range of its feature that represents a box that containing all data points. A data point can create a new branch only if it is sorted to a node and it falls outside of the node's box. \subsection{Mondrian Forest for Data Stream Classification} The implementation of \mondrianforest presented in~\cite{mondrian2014, mondrian_implementation_1} is online because trees rely on potentially all the previously seen data points to grow new branches. To support data streams, the \mondrianforest has to access data points only once as the dataset is assumed to be infinite in size. Algorithm~\ref{alg:training-node}, adapted from reference~\cite{mondrian2014}, describes our data-stream implementation. Function \texttt{update\_box} updates the node's box using the data point's features. Function \texttt{update\_counters} updates the label counters assigned to the node. Function \texttt{is\_enough\_memory} returns true if there is enough memory to run \texttt{extend\_tree}. Function \texttt{distance\_to\_box} compute the distance between a data point and the node's box and it returns zero if the data point fall inside the box. Function \texttt{random\_bool} randomly select a boolean that is more likely to be true the farther the data point is from the node's box. This function always return false if the distance is zero. Finally, function \texttt{extend\_tree} extends the tree by introducing a new parent and a new sibling to the current node. To make a prediction, a node assigns a score to each label. This score uses the node's counters, the parent's scores, and the score generated by an hypothetical split. The successive scores of the nodes encountered by the test data point are combined together to create the tree score. Finally, the scores of the trees are averaged to get the forest's score. The prediction is the label with the highest score. Mondrian trees can be tuned using three parameters: the base count, the discount factor, and the budget. The base count is a default score given to the root's parent. The discount factor controls the contribution of a node to the score of its children. A discount factor closer to one makes the prediction of a node closer to the prediction of its parent. Finally, the budget controls the tree~depth. A small budget makes nodes virtually closer to each other, and thus, less likely to introduce new splits. \begin{algorithm} \SetAlgoLined \LinesNumbered \SetKwProg{Fn}{Function}{ is}{end} \KwData{x = a data point} \KwData{l = label of the data point} \KwData{node = current node containing attributes in Table~\ref{tab:node-attributes}} \Fn{train\_node(x, l, node)}{ m = is\_enough\_memory()\; distance = node.distance\_to\_box(x)\; \If{distance is positive}{ r = random\_bool(node, node.parent, distance)\; \If{r and m}{ extend\_tree(node, node.parent, x, l)\; return\; } } update\_box(node, x, r, m)\; update\_counters(node, l, r, m)\; \If{!node.is\_leaf()} { \eIf{x[node.split\_feature] $<$ node.split\_value}{ train\_node(x, l, node.right)\; }{ train\_node(x, l, node.left)\; } } } \caption{Recursive function to train a node in the data stream \mondrianforest. This function is called on each root node of the forest when a new labeled data point arrives. The implementation of functions \texttt{update\_box} and \texttt{update\_counters} called at lines 11 and 12 vary depending on the out-of-memory strategy adopted (see Section~\ref{sec:method-xp1}). Table~\ref{tab:out-of-memory-strategies} summarizes these strategies. Table~\ref{tab:node-attributes} describes the attributes of the node data structure.} \label{alg:training-node} \end{algorithm} \begin{table} \begin{center} \resizebox{\linewidth}{!}{ \begin{tabular}{ r c } \hline Attributes & Description \\ \hline parent & Node's parent or empty for the root. \\ split\_feature & Feature used for the split.\\ split\_value & Value used for the split.\\ right & Right child of the node.\\ left & Left child of the node.\\ counters & An array counting labels\\ lower\_bound & An array saving the minimum value for each feature\\ upper\_bound & An array saving the maximum value for each feature\\ prev\_lower\_bound & Same as lower\_bound but saving the previous minimum\\ prev\_upper\_bound & Same as upper\_bound but saving the previous maximum\\ \hline \end{tabular} } \caption{Summary of the node structure used in Algorithm~\ref{alg:training-node}.} \label{tab:node-attributes} \end{center} \end{table} \subsection{Out-of-memory Strategies in the Mondrian Tree} \label{sec:method-xp1} A memory-constrained \mondrianforest needs to determine what to do with data points when the memory limit is reached. We designed five out-of-memory strategies for this purpose. These strategies specify how the statistics, namely the counters and the box limits, should be updated when training nodes. They are implemented in functions \texttt{update\_box} and \texttt{update\_counters} called at lines 11 and 12 in Algorithm~\ref{alg:training-node}. Table~\ref{tab:out-of-memory-strategies} summarizes these strategies. The \textbf{Stopped} strategy discards any subsequent data point when the memory limit is reached. It is the most straightforward method as it only uses the model created so far. In this strategy, functions \texttt{update\_box} and \texttt{update\_counters} are no-ops. The Stopped strategy has the advantage of not corrupting the node's box with outlier data points that would have required a split earlier in the tree. However, it also drops a lot of data after the model reached the memory limit. The \textbf{Extend Node} strategy disables the creation of new nodes when the memory limit is reached. Each data point is passed down the tree and no splits are created. However, the counters and the box of each node are updated. In Algorithm~\ref{alg:training-node}, functions \texttt{update\_box} and \texttt{update\_counters} work as if there were no split, thus updating counters and nodes as if \texttt{r} was always false. Compared to the Stopped method, the Extend Node one includes all the data points in the model. However, since the tree structure does not change, outlier data points may extensively increase node's boxes and as a result \mondriantrees tend to have large boxes, which is 1) detrimental to classification performance, and 2) prevents further tree creation since the distance to the node's box is unlikely to be positive when computing $m$ at line 4 of Algorithm~\ref{alg:training-node}. The \textbf{Partial Update} strategy discards the points that would have created a split if enough memory was available, and updates the model with the other ones. This strategy discards fewer data points than in the Stopped method while it is less sensitive to outlier data points than the Extend Node method. In Algorithm~\ref{alg:training-node}, functions \texttt{update\_box} and \texttt{update\_counters} update statistics as in the original implementation, except when a split is triggered ($r=true$). In that case, all modifications done previously are canceled. Algorithm~\ref{alg:partial-update-counter} and~\ref{alg:partial-update-box} describe functions \texttt{update\_counters} and \texttt{update\_box} in more details. The \textbf{Count Only} strategy never updates node boxes and simply updates the counters with every new data point. In Algorithm~\ref{alg:training-node}, the function \texttt{update\_box} is a no-op, while the function \texttt{update\_counters} works as in the original implementation. This strategy is less sensitive to outliers than the Extend Node method and it discards less data points than Partial Update. However, it may create nodes that count data points outside of their box, thus nodes that do not properly describe the data distribution. The \textbf{Ghost} strategy is similar to Partial Update for data points that do not create a split ($r=false$). In case of a split ($r=true$), the data point is dropped, however, in contrast with the Partial Update method, the changes applied between the node parent and the root are not canceled. This allows internal nodes to keep some information about data points that would have introduced a split, which preserves some information from the discarded data points. \begin{table} \begin{center} \resizebox{\linewidth}{!}{ \begin{tabular}{ r c c c c c c c } \hline Method & \texttt{update\_counters} & \texttt{update\_box} \\ \hline Stopped & --- & --- \\ Extend Node & Always & Always\\ Partial Update& Only if no split is triggered & Only if no split is triggered\\ Count Only & Always & ---\\ Ghost & Update until a split is triggered & Update until a split is triggered\\ \hline \end{tabular} } \caption{Summary of the proposed out-of-memory strategies. \texttt{update\_counters} and \texttt{update\_box} refer to the functions in Algorithm~\ref{alg:training-node}. ---: no-op.} \label{tab:out-of-memory-strategies} \end{center} \end{table} \begin{algorithm} \SetAlgoLined \LinesNumbered \SetKwProg{Fn}{Function}{ is}{end} \KwData{node = current node containing attributes Table~\ref{tab:node-attributes}} \KwData{l = label of the data point} \KwData{r = true if a split has been introduced.} \KwData{m = true if there is enough memory to run extend\_tree.} \Fn{update\_counters(node, l, r, m)}{ node.counters[l] += 1\; \If{m is false and r is true }{ \While{node.parent is not root}{ node.counters[l] -= 1\; node = node.parent } } } \caption{Partial Update algorithm for function \texttt{update\_counters}.} \label{alg:partial-update-counter} \end{algorithm} \begin{algorithm} \SetAlgoLined \LinesNumbered \SetKwProg{Fn}{Function}{ is}{end} \KwData{node = current node containing attributes Table~\ref{tab:node-attributes}} \KwData{x = the data point} \KwData{r = true if a split has been introduced.} \KwData{m = true if there is enough memory to run extend\_tree.} \Fn{update\_box(node, x, r, m)}{ \ForEach{f $\in$ all features}{ node.prev\_lower\_bound[f] = node.lower\_bound[f]\; node.prev\_upper\_bound[f] = node.upper\_bound[f]\; node.lower\_bound[f] = min(x[f], node.lower\_bound[f])\; node.upper\_bound[f] = min(x[f], node.upper\_bound[f])\; } \If{m is false and r is true }{ \While{node.parent is not root}{ \ForEach{f $\in$ all features}{ node.lower\_bound[f] = node.prev\_lower\_bound[f]\; node.upper\_bound[f] = node.prev\_upper\_bound[f]\; } node = node.parent } } } \caption{Partial Update algorithm for function \texttt{update\_box}.} \label{alg:partial-update-box} \end{algorithm} \subsection{Concept Drift Adaptation for Mondrian Forest under Memory Constraint} \label{sec:method-xp2} In this section, we propose methods to adapt \mondrianforests to concept drifts under memory constraints. We design and compare mechanisms to free up some memory by trimming tree leaves, and resume the growth of the forest after an out-of-memory strategy was applied. More specifically, we propose three methods to select a tree leaf for trimming: (1) Random trimming, (2) Data Count, and (3) Fading Count. In all cases, the trimming mechanism is called periodically on all trees when the memory limit is reached. The \textbf{Random} method, used as baseline, selects a leaf to trim with uniform probability. The \textbf{Count} method selects the leaf with the lowest data point counter: it assumes that leaves with few data points are less critical for the classification than leaves with many data points. The exception to this would be leaves that have been recently created. To address this issue, the \textbf{Fading count} method applies a fading factor to the leaf counters: when a new data point arrives in a leaf, the leaf counter $c$ is updated to $c = 1 + c \times f$, where $f$ is the fading factor. The other leaves get their counter updated to $c = c \times f$. As a result, leaves that haven't received data points recently are more prone to be discarded. For all methods, the selected leaf is not trimmed if it contains more data points than a configurable threshold. This threshold prevents the trimming of an important leaf. The trimming mechanism is triggered every hundred data points when the memory limit is reached. Once leaves have been trimmed, new nodes are available for the forest to resume its growth. The forest can extend according to the original algorithm, meaning that only new data points with features outside of the node boxes can create a split. However, with the Extend Node and Ghost strategies, this method creates leaves containing mostly outliers since node boxes have extensively increased when memory was full. This scenario is problematic because these new leaves might be even less used than the trimmed ones. To address this issue, we propose to split the tree leaves that may have expanded as a result of the memory limitation in the Extend Node and Ghost strategies. The splitting of tree leaves is defined from two points: a new data point, and a split helper (Figure~\ref{fig:split-mechanism}). The split is triggered in the tree leaf that contains the new data point, along a dimension defined using the split helper. We propose two variants of the splitting method corresponding to different definitions of the split helpers: in variant \textbf{Split AVG}, the split helper is the fading average data point, whereas in \textbf{Split Barycenter}, it is the weighted average of the leaves. The split dimension is randomly picked amongst the dimensions along which the split helper features are included within the leaf box. The split value along this dimension (green region in Figure~\ref{fig:split-mechanism}) is randomly picked between the data point feature value and the split helper feature value along this dimension. The counters in the original leaf are proportionally split between the new leaves. The idea behind the split helper is to create new leaves in the parts of the tree that already contain a lot of data points. \begin{figure}[!t] \centering \resizebox{\columnwidth}{!}{ \begin{tikzpicture} \node [draw, line width=0.2mm, minimum width=20mm, minimum height=10mm] at (0, 4) {Leaf 2}; \node [draw, line width=0.2mm, minimum width=30mm, minimum height=20mm] at (1, 0) {}; \node [] at (-0.5, 1.25) {Leaf 1}; \node [minimum width=15mm, minimum height=20mm, fill=green!35] at (1.25, 0) {}; \draw (0.5,2) pic[rotate=0,black] {cross=2mm}; \node [] at (1.6, 2.25) {Split Helper}; \node[isosceles triangle, isosceles triangle apex angle=60, draw,fill=teal!60, minimum size =1pt, rotate=90] (T60)at (2,0){}; \node [] at (2.9, -0.3) {Data Point}; \draw [dashed] (0.5,2) -- (0.5,-2); \draw [dashed] (2,2) -- (2,-2); \draw [] (-2,-2) -- (-2,5); \draw [] (-2,-2) -- (5,-2); \node [rotate=90] at (-2.25, 2.5) {Feature 2}; \node [] at (3, -2.25) {Feature 1}; \end{tikzpicture} \begin{tikzpicture} \node [draw, line width=0.2mm, minimum width=20mm, minimum height=10mm] at (0, 4) {Leaf 2}; \node [draw, line width=0.2mm, minimum width=30mm, minimum height=20mm] at (1, 0) {}; \node [] at (1, 1.25) {Leaf 1}; \node [minimum width=30mm, minimum height=8mm, fill=green!35] at (1, 0.4) {}; \draw (-1,0.8) pic[rotate=0,black] {cross=2mm}; \node [rotate=30] at (-1, 1.25) {Split Helper}; \node[isosceles triangle, isosceles triangle apex angle=60, draw,fill=teal!60, minimum size =1pt, rotate=90] (T60)at (2,0){}; \node [] at (2.9, -0.3) {Data Point}; \draw [dashed] (-2,0.8) -- (2.5,0.8); \draw [dashed] (-2,0) -- (2.5,0); \draw [] (-2,-2) -- (-2,5); \draw [] (-2,-2) -- (5,-2); \node [rotate=90] at (-2.25, 2.5) {Feature 2}; \node [] at (3, -2.25) {Feature 1}; \end{tikzpicture} } \caption{A two-feature example of the split definition. In each scenario, rectangles represent leaf boxes, the triangle is the new data point, and the cross is the split helper. The green area indicates the range of values where the new split will be created. The split helper is arbitrarily placed to illustrate different situations.} \label{fig:split-mechanism} \end{figure} \subsection{Datasets} We used six datasets to evaluate our proposed methods: three synthetic datasets to mimic real-world situations and to make comparisons with and without concept drifts, and two real Human Activity Recognition datasets. \subsubsection{\banosdataset} The \banosdataset~dataset~\cite{Banos_2014}\footnote{available \href{https://archive.ics.uci.edu/ml/datasets/REALDISP+Activity+Recognition+Dataset\#:\~:text=The\%20REALDISP\%20(REAListic\%20sensor\%20DISPlacement,\%2Dplacement\%20and\%20induced\%2Ddisplacement}{here}} is a human activity dataset with 17 participants and 9~sensors per participant. Each sensor samples a 3D acceleration, gyroscope, and magnetic field, as well as the orientation in a quaternion format, producing a total of 13 values. Sensors are sampled at 50~Hz, and each sample is associated with one of 33 activities. In addition to the 33 activities, an extra activity labeled 0 indicates no specific activity. We pre-processed the \banosdataset dataset as in \cite{Banos_2014}, using non-overlapping windows of one second (50~samples), and using only the 6 axes (acceleration and gyroscope) of the right forearm sensor. We computed the average and standard deviation over the window as features for each axis. We assigned the most frequent label to the window. The resulting data points were shuffled uniformly. In addition, we constructed another dataset from \banosdataset, in which we simulated a concept drift by shifting the activity labels in the second half of the data stream. \subsubsection{\recofitdataset} The \recofitdataset dataset~\cite{recofit, recofit_data} is a human activity dataset containing 94 participants. Similar to the \banosdataset dataset, the activity labeled 0 indicates no specific activity. Since many of these activities were similar, we merged some of them together based on the table in~\cite{cross_subject_validation}. We pre-processed the dataset similarly to the \banosdataset dataset, using non-overlapping windows of one second, and only using 6 axes (acceleration and gyroscope) from one sensor. From these 6 axes, we used the average and the standard deviation over the window as features. We assigned the most frequent label to the window. \subsubsection{MOA Datasets} We generated two synthetic datasets using Massive Online Analysis~\cite{moa} (MOA) is a Java framework to compare data stream classifiers. In addition to classification algorithms, MOA provides many tools to read and generate datasets. We~generate two synthetic datasets (MOA commands available \href{https://github.com/big-data-lab-team/benchmark-har-data-stream/blob/956e81f446a531111c1680a1abb96d6117a19a87/Makefile#L200}{here}) using the RandomRBF algorithm, a stable dataset, and a dataset with a drift. Both datasets have 12 features and 33 labels, similar to the \banosdataset dataset. We generated 20,000 data points for each of these synthetic datasets. \subsubsection{Covtype} The \covtypedataset dataset\footnote{available \href{https://archive.ics.uci.edu/ml/datasets/covertype}{here}} is a tree dataset. Each data point is a tree described by 54 features including ten quantitative variables and 44 binary variables. The 581,012 data points are labeled with one of the seven forest cover types and these labels are highly imbalanced. In particular, two labels represent 85\% of the dataset. \subsection{Evaluation Metric} We evaluated our methods using a prequential fading macro F1-score. We focused on the F1 score because most datasets are imbalanced. We used the prequential version of the F1 score to evaluate classification on data stream~\cite{issues_learning_from_stream}. We used a fading factor to minimize the impact of old data points, especially data points at the beginning or data points saw before a drift occur. To obtain this fading F1 score, we multiplied the confusion matrix with the fading factor before incrementing the cell in the confusion matrix. \section{Related Work} \label{sec:related-work} Edge computing is a concept where processing is done close to the device that produced the data, which generally means on devices with much less memory than regular computing servers. There are many surveys about classification for edge computing~\cite{survey-edge-machine-learning,tinyML-survey-1, tinyML-survey-2}, but most of the work focuses on deep learning, which is not applicable in our case because it requires a lot of data and time to train the model. They discuss inherent problems related to learning with edge devices, in particular about lighter architecture and distributed training. They also depict areas where machine learning on edge devices would be impactful like computer vision, fraud detection, or autonomous vehicles. Finally, these studies draw future work opportunities such as data augmentation, distributed training, and explainable AI. Aside from the deep learning approaches, the survey in~\cite{survey-edge-machine-learning} discusses two machine learning techniques with a small memory footprint: the Bonsai and ProtoNN methods. Bonsai~\cite{bonzai_tree} is a tree-based algorithm designed to fit in an edge device memory. It is a sparse tree that comes with a low-dimension projection of the feature space to improve learning while limiting memory usage and achieving state-of-the-art accuracy. Similarly, ProtoNN~\cite{protoNN} is a kNN based model that performs a low-dimension projection of the features to increase accuracy and improve its memory footprint. It also compresses the training set into a fixed amount of clusters. ProtoNN and Bonsai claim to remain below 2KB while retaining high accuracy. However, these models don't apply to evolving data streams because their low-dimension projections and their structures are pre-trained based on existing data, thus, adjusting them would require more time and memory. Additionally, our method starts from scratch whereas ProtoNN or Bonsai require data before being used. When it comes to forests designed for concept drift, there are many variations and many mechanisms. The Hoeffding Adaptive Tree~\cite{HAT} embeds a concept drift detector and grows a ghost branch when it detects a drift in a branch. The ghost branch replaces the old one when its performance becomes better. Similarly, the Adaptive Random Forest~\cite{adaptive_learning_from_stream} keeps a drift detector for each tree and starts growing a ghost tree when a drift is detected. The work in~\cite{online_random_forest_2} presents a forest that is constantly evolving where each decision tree has its size limit. When the limit is reached, it restarts from the last created node. With this mechanism, trees with a smaller limit will adapt faster to recent data points. Additionally, the forest also embeds the ADWIN~\cite{adwin} concept drift detector and restarts the worst base learner when a drift is detected. This mechanism called the ADWIN bagging is used in the Adaptive Rotation Forest~\cite{adaptive_rotation_forest} in addition to a low-dimension projection of the features with an incremental PCA. Such combinations allow the forest to maintain the most accurate base classifiers while keeping the projection up-to-date. Our methods differ from ADWIN or the Adaptive Rotation Forest because we rely on passive drift adaptation rather than using a drift detector. The Kappa Updated Ensemble~\cite{kappa_updated_ensemble} is an ensemble method that notices drifts by self-monitoring the performance of its base classifiers. In case of a drift, the model trains new classifiers. The prediction is made using only the best classifiers from the ensemble but the method never discards a base classifier as it can still be useful in the future. This mechanism of keeping unused trees raises a memory problem since it may fill the memory faster for very little benefit. Similarly, the work in~\cite{pruning_ensemble_for_evolving_streams} proposes a method to prune base learners based on their global and class-wise performances. It is used to reduce memory consumption while retaining good accuracy across all classes. The method evaluates the base learners for each class then ranks them using a modified version Borda Count. The Mean error rate Weighted Online Boosting~\cite{mean_error_weighted_online_boosting} is an online boosting method where the weights are calculated based on the accuracy of previous data. Even though the method is not designed for concept drift, the self-monitoring of the accuracy makes the base learner train more on recent data making the ensemble robust to concept drift. These last studies rely on ranking the base learners of the ensemble to either adjust or disable them. However, these coarse-grain approaches are memory intensive and are not applicable to the trimming methods because they would require keeping statistics for each node. \section{Results} Our experiments evaluated the out-of-memory and adaptation strategies presented previously. We evaluated both sets of methods separately. Unless specified otherwise, we allocated 600~KB of memory for the forest, which allowed for 940 to 1600 nodes in the forest depending on the number of features, labels, and trees. As a comparison, the Raspberry Pi Pico has 256~KB of memory and the Arduino has between 2~KB (Uno) and 8~KB (MEGA 2560). \subsection{Baselines} Figure~\ref{fig:f1_xp1} shows the F1 score obtained at the end of each dataset as a function of the number of trees in the forest. The experiment includes the methods described in Section~\ref{sec:method-xp1} --- executed wih a memory limit of 0.6~MB --- as well as the online \mondrianforest and the Data Stream \mondrianforest with 2~GB of memory for reference. The limit of 2~GB is reached for the \covtypedataset and \recofitdataset datasets, and the Data Stream Mondrian 2~GB method applies the extend node method in that situation. The Online Mondrian is the Python implementation available on GitHub~\cite{mondrian_implementation_1} that we modified to output the F1 score. The Online Mondrian reaches state-of-the-art performances in the real datasets~\cite{StreamDM-CPP, fast_and_slow,kappa_updated_ensemble, cross_subject_validation}. The Data Stream Mondrian~2~GB achieves similar performances for the \banosdataset dataset and RandomRBF stable. However it is significativly lower with the \recofitdataset dataset, the RandomRBF with drift, and the \covtypedataset dataset. These differences are explained by three factors: the 2~GB limit is reached for the \recofitdataset and \covtypedataset datasets; the Online Mondrian is evaluated with a holdout set randomly selected from the dataset whereas the Data Stream Mondrian is evaluated with a prequential method (as is commonly done in data streams); the Online Mondrian can access to previous data points while the Data Stream Mondrian cannot. The Online Mondrian is given here as a reference for comparison, however, it should not be directly compared to the Data Stream Mondrian as these methods operate in different contexts. The Stopped method, the default reference for evaluation under memory constraints, has by far the lowest F1 score, which demonstrates the usefulness of our out-of-memory strategies. The impact of memory limitation is clear and can be seen by the substantial performance edge of Data Stream Mondrian 2~GB over the other methods. \subsection{Out-of-memory strategies} \label{sec:xp1_result} Figure~\ref{fig:f1_xp1} shows that for the stable and drift RandomRBF datasets all our proposed out-of-memory strategies achieve similar F1 scores --- clearly better than the default Stopped method. Since none of these methods take concept drifts into account, the RandomRBF with drift exhibit F1 scores lower than RandomRBF stable by roughly 0.65. In the four other datasets, the Extend Node method consistently stands above the other ones except for the \banosdataset with drift dataset where the Partial Update method achieves the best F1 score. This is due to a faster recovery of the nodes' counters after the drift. The other three methods, Count Only, Ghost, and Partial Update, tend to have similar F1 scores. The Extend Node makes the best of two factors. First, it does not drop any data points compare to Partial Update or Count Only. Second, since it extends the boxes, future data points fall within the box and receive the prediction of the corresponding leaf, whereas the Count Only and the Ghost methods soften the leaf prediction depending on the data point distance with the box. \begin{figure*}[!t] \centering \includegraphics[width=\textwidth]{figures/f1_xp1.pdf} \caption{Comparison of the out-of-memory strategies proposed in Section~\ref{sec:method-xp1} for six datasets.} \label{fig:f1_xp1} \end{figure*} The difference in F1 score between the Stopped Mondrian and the other methods is reported in Table~\ref{tab:delta-f1-xp1}. The difference is computed for all numbers of trees and we report the minimum, the mean, and the maximum. On average, the Extend Node has the best improvement over Stopped Mondrian with an average improvement in F1-score of 0.27, a minimum of 0.03, and a maximum of 0.73. \begin{table} \begin{center} \resizebox{\columnwidth}{!}{ \begin{tabular}{ | r | l | c c c |} \hline & & & $\Delta$ F1 & \\ Dataset & Method Name & Min & Mean & Max\\ \hline RandomRBF stable &Count Only &\textbf{.29} &\textbf{.64} &\textbf{.73}\\ &Extend Node &\textbf{.29} &\textbf{.64} &\textbf{.73}\\ &Ghost &\textbf{.29} & .63 &\textbf{.73}\\ &Partial Update &\textbf{.29} &\textbf{.64} &\textbf{.73}\\ \hline RandomRBF drift &Count Only &\textbf{.03} &\textbf{.05} & .06 \\ &Extend Node &\textbf{.03} &\textbf{.05} &\textbf{.07}\\ &Ghost &\textbf{.03} &\textbf{.05} &\textbf{.07}\\ &Partial Update &\textbf{.03} &\textbf{.05} &\textbf{.07}\\ \hline Banos et al &Count Only & .28 & .43 & .51 \\ &Extend Node &\textbf{.40} &\textbf{.50} &\textbf{.56}\\ &Ghost & .29 & .44 & .51 \\ &Partial Update & .30 & .41 & .49 \\ \hline Banos et al (drift) &Count Only & .10 & .17 & .21 \\ &Extend Node & .13 & .20 & .26 \\ &Ghost & .10 & .18 & .25 \\ &Partial Update &\textbf{.17} &\textbf{.26} &\textbf{.32}\\ \hline Covtype &Count Only & .02 & .04 & .08 \\ &Extend Node &\textbf{.03} &\textbf{.13} &\textbf{.21}\\ &Ghost & .00 & .08 & .16 \\ &Partial Update & .00 & .07 & .16 \\ \hline Recofit &Count Only & .03 & .04 & .08 \\ &Extend Node &\textbf{.05} &\textbf{.10} &\textbf{.18}\\ &Ghost & .03 & .07 & .16 \\ &Partial Update & .03 & .06 & .11 \\ \hline \end{tabular} } \end{center} \caption{$\Delta$F1 score compared to Stopped Mondrian. Minimum, maximum, and average scores are computed across all tree numbers.} \label{tab:delta-f1-xp1} \end{table} Finally, we note on Figure~\ref{fig:f1_xp1} that the F1 score generally decreases when the number of trees increases. This deterioration occurs due to the trade-off between the number of trees and the trees' size. Indeed, since the memory bound is shared by all trees, the more trees there are, the shallower they must be, making them more prone to underfit. This does not happen when enough memory is available because in such cases, trees do not influence each other's size. This is why the Mondrian 2GB reaches plateaus instead of decreasing. Therefore, under memory constraint, the number of trees has a significant impact on the performance. From these results, we conclude that the Extend Node should be the default strategy to follow when the \mondrianforest reaches the memory limit. \subsection{Concept Drift Adaptation for Mondrian Forest under Memory Constraint} Figure~\ref{fig:f1-xp2-1} shows the F1 score for the three proposed leaf trimming strategies. All trimming strategies were evaluated with the Extend Node out-of-memory strategy as it outperforms the other out-of-memory strategies per our previous experiment. In the case of concept drift (RandomRBF drift, \banosdataset drift), the random trimming method outperforms the other ones whereas for the stable datasets (RandomRBF, \banosdataset, \covtypedataset, \recofitdataset), no trimming appears to be the best strategy. \begin{figure*}[!t] \includegraphics[width=\textwidth]{figures/f1_xp2.1.pdf} \caption{Comparison of trimming methods applied with the Extend Node out-of-memory strategy.} \label{fig:f1-xp2-1} \end{figure*} Figure~\ref{fig:f1-xp2-3} shows the F1 score for the three splitting methods (no split, Split AVG, and Split Barycenter) combined with random trimming and extend node as the out-of-memory strategy. With the two drift datasets, the three methods perform better than not trimming. With RandomRBF stable, the two splitting methods perform better than not trimming with 5 and 10 trees. Finally, with \banosdataset, \recofitdataset, and \covtypedataset datasets, not trimming is generally better than randomly trimming. \begin{figure*}[!t] \includegraphics[width=\textwidth]{figures/f1_xp2.3.pdf} \caption{Comparison of tree leaf splitting methods combined with the Random trimming strategy.} \label{fig:f1-xp2-3} \end{figure*} On Figure~\ref{fig:f1-xp2-3}, we note that for the RandomRBF stable with 5 and 10 trees, the split methods get their F1 score higher than No Trim and Mondrian 2GB. Their F1 scores improve over time even though the dataset is stable. Table~\ref{tab:delta-f1-xp2} summarizes the delta of F1 scores of the trimming methods compared to the Stopped method. From these results, we conclude that randomly trimming allows the \mondrianforest to adapt to concept drift. We also conclude that using the split methods (Split AVG and Split Barycenter) should be the default method to grow the \mondriantrees after trimming as they exhibit a better F1 score than not splitting. \begin{table} \begin{center} \resizebox{\columnwidth}{!}{ \begin{tabular}{ | r | l | c c c |} \hline & & & $\Delta$ F1 & \\ Dataset & Method Name & Min & Mean & Max\\ \hline RandomRBF stable &Trim Count, No Split &\textbf{.29} & .63 & .72 \\ &Trim Count, Split AVG &\textbf{.29} &\textbf{.66} & .74 \\ &Trim Count, Split Barycenter &\textbf{.29} &\textbf{.66} & .75 \\ &Trim Fading, No Split &\textbf{.29} & .62 & .71 \\ &Trim Fading, Split AVG &\textbf{.29} &\textbf{.66} &\textbf{.76}\\ &Trim Fading, Split Barycenter &\textbf{.29} &\textbf{.66} &\textbf{.76}\\ &Trim Random, No Split &\textbf{.29} & .55 & .64 \\ &Trim Random, Split AVG &\textbf{.29} & .63 & .74 \\ &Trim Random, Split Barycenter &\textbf{.29} & .62 & .73 \\ \hline RandomRBF drift &Trim Count, No Split & .03 & .05 & .07 \\ &Trim Count, Split AVG &\textbf{.05} & .09 & .13 \\ &Trim Count, Split Barycenter &\textbf{.05} & .09 & .14 \\ &Trim Fading, No Split & .02 & .05 & .07 \\ &Trim Fading, Split AVG &\textbf{.05} & .25 & .32 \\ &Trim Fading, Split Barycenter &\textbf{.05} & .25 & .33 \\ &Trim Random, No Split &\textbf{.05} & .16 & .25 \\ &Trim Random, Split AVG &\textbf{.05} &\textbf{.27} &\textbf{.38}\\ &Trim Random, Split Barycenter &\textbf{.05} & .26 & .37 \\ \hline Banos et al &Trim Count, No Split & .36 & .48 &\textbf{.57}\\ &Trim Count, Split AVG &\textbf{.38} &\textbf{.49} & .56 \\ &Trim Count, Split Barycenter &\textbf{.38} &\textbf{.49} &\textbf{.57}\\ &Trim Fading, No Split & .34 & .48 & .56 \\ &Trim Fading, Split AVG & .36 & .48 & .56 \\ &Trim Fading, Split Barycenter & .37 & .48 & .56 \\ &Trim Random, No Split & .30 & .43 & .52 \\ &Trim Random, Split AVG & .25 & .43 & .54 \\ &Trim Random, Split Barycenter & .26 & .43 & .53 \\ \hline Banos et al (drift) &Trim Count, No Split & .16 & .22 & .25 \\ &Trim Count, Split AVG & .20 & .28 & .32 \\ &Trim Count, Split Barycenter & .20 & .28 & .31 \\ &Trim Fading, No Split & .18 & .23 & .26 \\ &Trim Fading, Split AVG & .27 & .38 & .46 \\ &Trim Fading, Split Barycenter & .28 &\textbf{.39} & .47 \\ &Trim Random, No Split &\textbf{.29} & .38 & .46 \\ &Trim Random, Split AVG & .23 & .37 &\textbf{.48}\\ &Trim Random, Split Barycenter & .24 & .37 & .47 \\ \hline Covtype &Trim Count, No Split & .03 & .10 &\textbf{.21} \\ &Trim Count, Split AVG & .03 &\textbf{.12} &\textbf{.21} \\ &Trim Count, Split Barycenter & .03 &\textbf{.12} &\textbf{.21}\\ &Trim Fading, No Split & .02 & .08 &\textbf{.21}\\ &Trim Fading, Split AVG &\textbf{.04} &\textbf{.12} &\textbf{.21}\\ &Trim Fading, Split Barycenter &\textbf{.04} &\textbf{.12} & .20 \\ &Trim Random, No Split & .00 & .06 & .16 \\ &Trim Random, Split AVG & .02 & .07 &\textbf{.21}\\ &Trim Random, Split Barycenter & .02 & .06 & .18 \\ \hline Recofit &Trim Count, No Split & .04 & .09 & .18 \\ &Trim Count, Split AVG &\textbf{.05} &\textbf{.10} & .18 \\ &Trim Count, Split Barycenter &\textbf{.05} &\textbf{.10} & .18 \\ &Trim Fading, No Split & .03 & .09 & .18 \\ &Trim Fading, Split AVG &\textbf{.05} &\textbf{.10} &\textbf{.19}\\ &Trim Fading, Split Barycenter & .04 &\textbf{.10} &\textbf{.19}\\ &Trim Random, No Split & .04 & .08 & .16 \\ &Trim Random, Split AVG & .03 & .08 & .17 \\ &Trim Random, Split Barycenter & .03 & .08 & .17 \\ \hline \end{tabular} } \end{center} \caption{$\Delta$F1 score compared to Stopped Mondrian for the trimming methods. Minimum, maximum, and average scores are computed across all tree numbers.} \label{tab:delta-f1-xp2} \end{table}